diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4338219f31..979a8311e0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,7 +17,7 @@ If adding a new definition: If changing an existing definition: - [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <> - [ ] Increase the version number in the header if appropriate. -- [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "dslint/dt.json" }`. +- [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "dtslint/dt.json" }`. If removing a declaration: - [ ] If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.) diff --git a/.gitignore b/.gitignore index 5b79863e52..c8e25cec8d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ *.map *.swp .DS_Store -npm-debug.log _Resharper.DefinitelyTyped bin @@ -25,19 +24,28 @@ Properties # test folder _infrastructure/tests/build +# IntelliJ based IDEs .idea *.iml + *.js.map !*.js/ !scripts/new-package.js !scripts/not-needed.js !scripts/lint.js +# npm node_modules +package-lock.json +npm-debug.log +# Sublime .sublimets -.settings/launch.json +# Visual Studio Code +.settings/launch.json .vs .vscode + +# yarn yarn.lock diff --git a/notNeededPackages.json b/notNeededPackages.json index ca42f4d9f5..50d71d2165 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -54,6 +54,12 @@ "sourceRepoURL": "http://www.babylonjs.com/", "asOfVersion": "2.4.1" }, + { + "libraryName": "BigInteger.js", + "typingsPackageName": "big-integer", + "sourceRepoURL": "https://github.com/peterolson/BigInteger.js", + "asOfVersion": "0.0.31" + }, { "libraryName": "Bugsnag Browser", "typingsPackageName": "bugsnag-js", @@ -120,18 +126,36 @@ "sourceRepoURL": "https://github.com/bterlson/ecmarkup", "asOfVersion": "3.4.0" }, + { + "libraryName": "electron", + "typingsPackageName": "electron", + "sourceRepoURL": "https://github.com/electron/electron", + "asOfVersion": "1.6.10" + }, { "libraryName": "electron-builder", "typingsPackageName": "electron-builder", "sourceRepoURL": "https://github.com/loopline-systems/electron-builder", "asOfVersion": "2.8.0" }, + { + "libraryName": "eventemitter2", + "typingsPackageName": "eventemitter2", + "sourceRepoURL": "https://github.com/asyncly/EventEmitter2", + "asOfVersion": "4.1.0" + }, { "libraryName": "EventEmitter3", "typingsPackageName": "eventemitter3", "sourceRepoURL": "https://github.com/primus/eventemitter3", "asOfVersion": "2.0.2" }, + { + "libraryName": "express-validator", + "typingsPackageName": "express-validator", + "sourceRepoURL": "https://github.com/ctavan/express-validator", + "asOfVersion": "3.0.0" + }, { "libraryName": "JSON-Patch", "typingsPackageName": "fast-json-patch", @@ -222,6 +246,12 @@ "sourceRepoURL": "https://github.com/blakeembrey/is-upper-case", "asOfVersion": "1.1.2" }, + { + "libraryName": "jquery.ajaxfile", + "typingsPackageName": "jquery.ajaxfile", + "sourceRepoURL": "https://github.com/fpellet/jquery.ajaxFile", + "asOfVersion": "0.2.29" + }, { "libraryName": "JSNLog", "typingsPackageName": "jsnlog", @@ -396,12 +426,24 @@ "sourceRepoURL": "https://github.com/angular/protractor", "asOfVersion": "4.0.0" }, + { + "libraryName": "qiniu", + "typingsPackageName": "qiniu", + "sourceRepoURL": "https://github.com/qiniu/nodejs-sdk", + "asOfVersion": "7.0.1" + }, { "libraryName": "Raven JS", "typingsPackageName": "raven-js", "sourceRepoURL": "https://github.com/getsentry/raven-js", "asOfVersion": "3.10.0" }, + { + "libraryName": "react-day-picker", + "typingsPackageName": "react-day-picker", + "sourceRepoURL": "https://github.com/gpbl/react-day-picker", + "asOfVersion": "5.3.0" + }, { "libraryName": "Redux", "typingsPackageName": "redux", @@ -414,6 +456,12 @@ "sourceRepoURL": "https://github.com/tshelburne/redux-batched-actions", "asOfVersion": "0.1.5" }, + { + "libraryName": "redux-devtools-extension", + "typingsPackageName": "redux-devtools-extension", + "sourceRepoURL": "https://github.com/zalmoxisus/redux-devtools-extension", + "asOfVersion": "2.13.2" + }, { "libraryName": "redux-persist", "typingsPackageName": "redux-persist", diff --git a/package.json b/package.json index 1be6d06c89..c2fef9b679 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "scripts": { "compile-scripts": "tsc -p scripts", "not-needed": "node scripts/not-needed.js", - "test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed --nProcesses 1", + "test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed --nProcesses 8", "lint": "dtslint types" }, "devDependencies": { diff --git a/types/acc-wizard/index.d.ts b/types/acc-wizard/index.d.ts index 9c20bf3e5f..d96ef1a93a 100644 --- a/types/acc-wizard/index.d.ts +++ b/types/acc-wizard/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/sathomas/acc-wizard // Definitions by: Cyril Schumacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 interface AccWizardOptions { /** @@ -110,4 +111,4 @@ interface AccWizardOptions { */ interface JQuery { accwizard(options?: AccWizardOptions): void; -} \ No newline at end of file +} diff --git a/types/accounting/accounting-tests.ts b/types/accounting/accounting-tests.ts index a397c559eb..41150f7a37 100644 --- a/types/accounting/accounting-tests.ts +++ b/types/accounting/accounting-tests.ts @@ -3,6 +3,9 @@ // Default usage: accounting.formatMoney(12345678); // $12,345,678.00 +// Stringified usage: +accounting.formatMoney('$4394958309392.9401'); // $4,394,958,309,392.94 + // European formatting (custom symbol and separators), could also use options object as second param: accounting.formatMoney(4999.99, "€", 2, ".", ","); // €4.999,99 diff --git a/types/accounting/index.d.ts b/types/accounting/index.d.ts index ef8991999f..9a990a6519 100644 --- a/types/accounting/index.d.ts +++ b/types/accounting/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for accounting.js 0.3 -// Project: http://josscrowcroft.github.io/accounting.js/ +// Type definitions for accounting.js 0.4 +// Project: http://openexchangerates.github.io/accounting.js/ // Definitions by: Sergey Gerasimov +// Christopher Eck // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace accounting { @@ -30,9 +31,9 @@ declare namespace accounting { } interface Static { - // format any number into currency - formatMoney(number: number, symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string; - formatMoney(number: number, options: CurrencySettings | CurrencySettings): string; + // format any number or stringified number into currency + formatMoney(number: number | string, symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string; + formatMoney(number: number | string, options: CurrencySettings | CurrencySettings): string; formatMoney(numbers: number[], symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string[]; formatMoney(numbers: number[], options: CurrencySettings | CurrencySettings): string[]; diff --git a/types/ace/index.d.ts b/types/ace/index.d.ts index 1ac19c7c63..58bf1c2bd8 100644 --- a/types/ace/index.d.ts +++ b/types/ace/index.d.ts @@ -474,7 +474,9 @@ declare namespace AceAjax { removeFold(arg: any): void; expandFold(arg: any): void; - + + foldAll(startRow?: number, endRow?: number, depth?: number): void + unfold(arg1: any, arg2: boolean): void; screenToDocumentColumn(row: number, column: number): void; @@ -2643,7 +2645,9 @@ declare namespace AceAjax { characterWidth: number; lineHeight: number; - + + setScrollMargin(top:number, bottom:number, left: number, right: number): void; + screenToTextCoordinates(left: number, top: number): void; /** diff --git a/types/ace/test/virtual_renderer.ts b/types/ace/test/virtual_renderer.ts index 74bcec2fa8..262f81e885 100644 --- a/types/ace/test/virtual_renderer.ts +++ b/types/ace/test/virtual_renderer.ts @@ -15,6 +15,7 @@ const aceVirtualRendererTests = { var renderer = new AceAjax.VirtualRenderer(el); renderer.setPadding(0); + renderer.setScrollMargin(0,0,0,0) renderer.setSession(new AceAjax.EditSession("1234")); var r = renderer.scroller.getBoundingClientRect(); diff --git a/types/acl/index.d.ts b/types/acl/index.d.ts index 069631d2e0..3aa81de8e3 100644 --- a/types/acl/index.d.ts +++ b/types/acl/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/optimalbits/node_acl // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/activex-adodb/activex-adodb-tests.ts b/types/activex-adodb/activex-adodb-tests.ts new file mode 100644 index 0000000000..cadb01c15e --- /dev/null +++ b/types/activex-adodb/activex-adodb-tests.ts @@ -0,0 +1,30 @@ +let obj0 = new ActiveXObject('ADODB.Command'); + +let obj1 = new ActiveXObject('ADODB.Connection'); + +let obj2 = new ActiveXObject('ADODB.Parameter'); + +let obj3 = new ActiveXObject('ADODB.Record'); + +let obj4 = new ActiveXObject('ADODB.Recordset'); + +let obj5 = new ActiveXObject('ADODB.Stream'); + +// open connection to an Excel file +let pathToExcelFile = 'C:\\path\\to\\excel\\file.xlsx'; +let conn = new ActiveXObject('ADODB.Connection'); +conn.Provider = 'Microsoft.ACE.OLEDB.12.0'; +conn.ConnectionString = + 'Data Source="' + pathToExcelFile + '";' + + 'Extended Properties="Excel 12.0;HDR=Yes"'; +conn.Open(); + +// create a Command to access the data +let cmd = new ActiveXObject('ADODB.Command'); +cmd.CommandText = 'SELECT DISTINCT LastName, CityName FROM [Sheet1$]'; +// get a Recordset +let rs = cmd.Execute(); +// build a string from the Recordset +let s = rs.GetString(ADODB.StringFormatEnum.adClipString, -1, '\t', '\n', '(NULL)'); +rs.Close(); +WScript.Echo(s); diff --git a/types/activex-data-objects/index.d.ts b/types/activex-adodb/index.d.ts similarity index 54% rename from types/activex-data-objects/index.d.ts rename to types/activex-adodb/index.d.ts index d3ccf7a6c7..ec5d67167a 100644 --- a/types/activex-data-objects/index.d.ts +++ b/types/activex-adodb/index.d.ts @@ -1,11 +1,9 @@ -// Type definitions for Microsoft ActiveX Data Objects -// Project: https://msdn.microsoft.com/en-us/library/windows/desktop/ms675532(v=vs.85).aspx +// Type definitions for Microsoft ActiveX Data Objects 6.1 +// Project: https://msdn.microsoft.com/en-us/library/jj249010.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace ADODB { - - //Enums const enum ADCPROP_ASYNCTHREADPRIORITY_ENUM { adPriorityAboveNormal = 4, adPriorityBelowNormal = 2, @@ -595,240 +593,415 @@ declare namespace ADODB { adXactSyncPhaseOne = 1048576 } - //Interfaces interface Command { ActiveConnection: Connection; - Cancel: () => void; - CommandStream: any /*VT_UNKNOWN*/; + Cancel(): void; + CommandStream: any; CommandText: string; CommandTimeout: number; CommandType: CommandTypeEnum; - CreateParameter: (Name?: string, Type?: DataTypeEnum, Direction?: ParameterDirectionEnum, Size?: number, Value?: any) => Parameter; + + /** + * @param string [Name=''] + * @param ADODB.DataTypeEnum [Type=0] + * @param ADODB.ParameterDirectionEnum [Direction=1] + * @param number [Size=0] + */ + CreateParameter(Name?: string, Type?: DataTypeEnum, Direction?: ParameterDirectionEnum, Size?: number, Value?: any): Parameter; Dialect: string; - Execute: (RecordsAffected?: any, Parameters?: any, Options?: number) => Recordset; + + /** @param number [Options=-1] */ + Execute(RecordsAffected?: any, Parameters?: any, Options?: number): Recordset; Name: string; NamedParameters: boolean; - Parameters: Parameters; + readonly Parameters: Parameters; Prepared: boolean; - Properties: Properties; - State: number; + readonly Properties: Properties; + readonly State: number; } interface Connection { Attributes: number; - BeginTrans: () => number; - Cancel: () => void; - Close: () => void; + BeginTrans(): number; + Cancel(): void; + Close(): void; CommandTimeout: number; - CommitTrans: () => void; + CommitTrans(): void; ConnectionString: string; ConnectionTimeout: number; CursorLocation: CursorLocationEnum; DefaultDatabase: string; - Errors: Errors; - Execute: (CommandText: string, RecordsAffected: any, Options?: number) => Recordset; + readonly Errors: Errors; + + /** @param number [Options=-1] */ + Execute(CommandText: string, RecordsAffected: any, Options?: number): Recordset; IsolationLevel: IsolationLevelEnum; Mode: ConnectModeEnum; - Open: (ConnectionString?: string, UserID?: string, Password?: string, Options?: number) => void; - OpenSchema: (Schema: SchemaEnum, Restrictions?: any, SchemaID?: any) => Recordset; - Properties: Properties; + + /** + * @param string [ConnectionString=''] + * @param string [UserID=''] + * @param string [Password=''] + * @param number [Options=-1] + */ + Open(ConnectionString?: string, UserID?: string, Password?: string, Options?: number): void; + OpenSchema(Schema: SchemaEnum, Restrictions?: any, SchemaID?: any): Recordset; + readonly Properties: Properties; Provider: string; - RollbackTrans: () => void; - State: number; - Version: string; + RollbackTrans(): void; + readonly State: number; + readonly Version: string; } interface Error { - Description: string; - HelpContext: number; - HelpFile: string; - NativeError: number; - Number: number; - Source: string; - SQLState: string; + readonly Description: string; + readonly HelpContext: number; + readonly HelpFile: string; + readonly NativeError: number; + readonly Number: number; + readonly Source: string; + readonly SQLState: string; } interface Errors { - Clear: () => void; - Count: number; - Item: (Index: any) => Error; - Refresh: () => void; + Clear(): void; + readonly Count: number; + Item(Index: any): Error; + Refresh(): void; } interface Field { - ActualSize: number; - AppendChunk: (Data: any) => void; + readonly ActualSize: number; + AppendChunk(Data: any): void; Attributes: number; - DataFormat: any /*VT_UNKNOWN*/; + DataFormat: any; DefinedSize: number; - GetChunk: (Length: number) => any; - Name: string; + GetChunk(Length: number): any; + readonly Name: string; NumericScale: number; - OriginalValue: any; + readonly OriginalValue: any; Precision: number; - Properties: Properties; - Status: number; + readonly Properties: Properties; + readonly Status: number; Type: DataTypeEnum; - UnderlyingValue: any; + readonly UnderlyingValue: any; Value: any; } interface Fields { - _Append: (Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum) => void; - Append: (Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum, FieldValue?: any) => void; - CancelUpdate: () => void; - Count: number; - Delete: (Index: any) => void; - Item: (Index: any) => Field; - Refresh: () => void; - Resync: (ResyncValues?: ResyncEnum) => void; - Update: () => void; + /** + * @param number [DefinedSize=0] + * @param ADODB.FieldAttributeEnum [Attrib=-1] + */ + _Append(Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum): void; + + /** + * @param number [DefinedSize=0] + * @param ADODB.FieldAttributeEnum [Attrib=-1] + */ + Append(Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum, FieldValue?: any): void; + CancelUpdate(): void; + readonly Count: number; + Delete(Index: any): void; + Item(Index: any): Field; + Refresh(): void; + + /** @param ADODB.ResyncEnum [ResyncValues=2] */ + Resync(ResyncValues?: ResyncEnum): void; + Update(): void; } interface Parameter { - AppendChunk: (Val: any) => void; + AppendChunk(Val: any): void; Attributes: number; Direction: ParameterDirectionEnum; Name: string; NumericScale: number; Precision: number; - Properties: Properties; + readonly Properties: Properties; Size: number; Type: DataTypeEnum; Value: any; } interface Parameters { - Append: (Object: any /*VT_DISPATCH*/) => void; - Count: number; - Delete: (Index: any) => void; - Item: (Index: any) => Parameter; - Refresh: () => void; + Append(Object: any): void; + readonly Count: number; + Delete(Index: any): void; + Item(Index: any): Parameter; + Refresh(): void; } interface Properties { - Count: number; - Item: (Index: any) => Property; - Refresh: () => void; + readonly Count: number; + Item(Index: any): Property; + Refresh(): void; } interface Property { Attributes: number; - Name: string; - Type: DataTypeEnum; + readonly Name: string; + readonly Type: DataTypeEnum; Value: any; } interface Record { ActiveConnection: any; - Cancel: () => void; - Close: () => void; - CopyRecord: (Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: CopyRecordOptionsEnum, Async?: boolean) => string; - DeleteRecord: (Source?: string, Async?: boolean) => void; - Fields: Fields; - GetChildren: () => Recordset; + Cancel(): void; + Close(): void; + + /** + * @param string [Source=''] + * @param string [Destination=''] + * @param string [UserName=''] + * @param string [Password=''] + * @param ADODB.CopyRecordOptionsEnum [Options=-1] + * @param boolean [Async=false] + */ + CopyRecord(Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: CopyRecordOptionsEnum, Async?: boolean): string; + + /** + * @param string [Source=''] + * @param boolean [Async=false] + */ + DeleteRecord(Source?: string, Async?: boolean): void; + readonly Fields: Fields; + GetChildren(): Recordset; Mode: ConnectModeEnum; - MoveRecord: (Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: MoveRecordOptionsEnum, Async?: boolean) => string; - Open: (Source: any, ActiveConnection: any, Mode?: ConnectModeEnum, CreateOptions?: RecordCreateOptionsEnum, Options?: RecordOpenOptionsEnum, UserName?: string, Password?: string) => void; - ParentURL: string; - Properties: Properties; - RecordType: RecordTypeEnum; + + /** + * @param string [Source=''] + * @param string [Destination=''] + * @param string [UserName=''] + * @param string [Password=''] + * @param ADODB.MoveRecordOptionsEnum [Options=-1] + * @param boolean [Async=false] + */ + MoveRecord(Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: MoveRecordOptionsEnum, Async?: boolean): string; + + /** + * @param ADODB.ConnectModeEnum [Mode=0] + * @param ADODB.RecordCreateOptionsEnum [CreateOptions=-1] + * @param ADODB.RecordOpenOptionsEnum [Options=-1] + * @param string [UserName=''] + * @param string [Password=''] + */ + Open(Source: any, ActiveConnection: any, Mode?: ConnectModeEnum, CreateOptions?: RecordCreateOptionsEnum, Options?: RecordOpenOptionsEnum, UserName?: string, Password?: string): void; + readonly ParentURL: string; + readonly Properties: Properties; + readonly RecordType: RecordTypeEnum; Source: any; - State: ObjectStateEnum; + readonly State: ObjectStateEnum; } interface Recordset { - _xClone: () => Recordset; - _xResync: (AffectRecords?: AffectEnum) => void; - _xSave: (FileName?: string, PersistFormat?: PersistFormatEnum) => void; + _xClone(): Recordset; + + /** @param ADODB.AffectEnum [AffectRecords=3] */ + _xResync(AffectRecords?: AffectEnum): void; + + /** + * @param string [FileName=''] + * @param ADODB.PersistFormatEnum [PersistFormat=0] + */ + _xSave(FileName?: string, PersistFormat?: PersistFormatEnum): void; AbsolutePage: PositionEnum; AbsolutePosition: PositionEnum; - ActiveCommand: any /*VT_DISPATCH*/; - ActiveConnection: any /*VT_DISPATCH*/; - AddNew: (FieldList?: any, Values?: any) => void; - BOF: boolean; + readonly ActiveCommand: any; + ActiveConnection: any; + AddNew(FieldList?: any, Values?: any): void; + readonly BOF: boolean; Bookmark: any; CacheSize: number; - Cancel: () => void; - CancelBatch: (AffectRecords?: AffectEnum) => void; - CancelUpdate: () => void; - Clone: (LockType?: LockTypeEnum) => Recordset; - Close: () => void; - Collect: (Index: any) => any; //Also has setter with parameters - CompareBookmarks: (Bookmark1: any, Bookmark2: any) => CompareEnum; + Cancel(): void; + + /** @param ADODB.AffectEnum [AffectRecords=3] */ + CancelBatch(AffectRecords?: AffectEnum): void; + CancelUpdate(): void; + + /** @param ADODB.LockTypeEnum [LockType=-1] */ + Clone(LockType?: LockTypeEnum): Recordset; + Close(): void; + Collect(Index: any): any; + CompareBookmarks(Bookmark1: any, Bookmark2: any): CompareEnum; CursorLocation: CursorLocationEnum; CursorType: CursorTypeEnum; DataMember: string; - DataSource: any /*VT_UNKNOWN*/; - Delete: (AffectRecords?: AffectEnum) => void; - EditMode: EditModeEnum; - EOF: boolean; - Fields: Fields; + DataSource: any; + + /** @param ADODB.AffectEnum [AffectRecords=1] */ + Delete(AffectRecords?: AffectEnum): void; + readonly EditMode: EditModeEnum; + readonly EOF: boolean; + readonly Fields: Fields; Filter: any; - Find: (Criteria: string, SkipRecords?: number, SearchDirection?: SearchDirectionEnum, Start?: any) => void; - GetRows: (Rows?: number, Start?: any, Fields?: any) => any; - GetString: (StringFormat?: StringFormatEnum, NumRows?: number, ColumnDelimeter?: string, RowDelimeter?: string, NullExpr?: string) => string; + + /** + * @param number [SkipRecords=0] + * @param ADODB.SearchDirectionEnum [SearchDirection=1] + */ + Find(Criteria: string, SkipRecords?: number, SearchDirection?: SearchDirectionEnum, Start?: any): void; + + /** @param number [Rows=-1] */ + GetRows(Rows?: number, Start?: any, Fields?: any): any; + + /** + * @param ADODB.StringFormatEnum [StringFormat=2] + * @param number [NumRows=-1] + * @param string [ColumnDelimeter=''] + * @param string [RowDelimeter=''] + * @param string [NullExpr=''] + */ + GetString(StringFormat?: StringFormatEnum, NumRows?: number, ColumnDelimeter?: string, RowDelimeter?: string, NullExpr?: string): string; Index: string; LockType: LockTypeEnum; MarshalOptions: MarshalOptionsEnum; MaxRecords: number; - Move: (NumRecords: number, Start?: any) => void; - MoveFirst: () => void; - MoveLast: () => void; - MoveNext: () => void; - MovePrevious: () => void; - NextRecordset: (RecordsAffected?: any) => Recordset; - Open: (Source: any, ActiveConnection: any, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: number) => void; - PageCount: number; + Move(NumRecords: number, Start?: any): void; + MoveFirst(): void; + MoveLast(): void; + MoveNext(): void; + MovePrevious(): void; + NextRecordset(RecordsAffected?: any): Recordset; + + /** + * @param ADODB.CursorTypeEnum [CursorType=-1] + * @param ADODB.LockTypeEnum [LockType=-1] + * @param number [Options=-1] + */ + Open(Source: any, ActiveConnection: any, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: number): void; + readonly PageCount: number; PageSize: number; - Properties: Properties; - RecordCount: number; - Requery: (Options?: number) => void; - Resync: (AffectRecords?: AffectEnum, ResyncValues?: ResyncEnum) => void; - Save: (Destination: any, PersistFormat?: PersistFormatEnum) => void; - Seek: (KeyValues: any, SeekOption?: SeekEnum) => void; + readonly Properties: Properties; + readonly RecordCount: number; + + /** @param number [Options=-1] */ + Requery(Options?: number): void; + + /** + * @param ADODB.AffectEnum [AffectRecords=3] + * @param ADODB.ResyncEnum [ResyncValues=2] + */ + Resync(AffectRecords?: AffectEnum, ResyncValues?: ResyncEnum): void; + + /** @param ADODB.PersistFormatEnum [PersistFormat=0] */ + Save(Destination: any, PersistFormat?: PersistFormatEnum): void; + + /** @param ADODB.SeekEnum [SeekOption=1] */ + Seek(KeyValues: any, SeekOption?: SeekEnum): void; Sort: string; - Source: any /*VT_DISPATCH*/; - State: number; - Status: number; + Source: any; + readonly State: number; + readonly Status: number; StayInSync: boolean; - Supports: (CursorOptions: CursorOptionEnum) => boolean; - Update: (Fields?: any, Values?: any) => void; - UpdateBatch: (AffectRecords?: AffectEnum) => void; + Supports(CursorOptions: CursorOptionEnum): boolean; + Update(Fields?: any, Values?: any): void; + + /** @param ADODB.AffectEnum [AffectRecords=3] */ + UpdateBatch(AffectRecords?: AffectEnum): void; } interface Stream { - Cancel: () => void; + Cancel(): void; Charset: string; - Close: () => void; - CopyTo: (DestStream: Stream, CharNumber?: number) => void; - EOS: boolean; - Flush: () => void; - LineSeparator: LineSeparatorEnum; - LoadFromFile: (FileName: string) => void; - Mode: ConnectModeEnum; - Open: (Source: any, Mode?: ConnectModeEnum, Options?: StreamOpenOptionsEnum, UserName?: string, Password?: string) => void; - Position: number; - Read: (NumBytes?: number) => any; - ReadText: (NumChars?: number) => string; - SaveToFile: (FileName: string, Options?: SaveOptionsEnum) => void; - SetEOS: () => void; - Size: number; - SkipLine: () => void; - State: ObjectStateEnum; - Type: StreamTypeEnum; - Write: (Buffer: any) => void; - WriteText: (Data: string, Options?: StreamWriteEnum) => void; - } + Close(): void; + /** @param number [CharNumber=-1] */ + CopyTo(DestStream: Stream, CharNumber?: number): void; + readonly EOS: boolean; + Flush(): void; + LineSeparator: LineSeparatorEnum; + LoadFromFile(FileName: string): void; + Mode: ConnectModeEnum; + + /** + * @param ADODB.ConnectModeEnum [Mode=0] + * @param ADODB.StreamOpenOptionsEnum [Options=-1] + * @param string [UserName=''] + * @param string [Password=''] + */ + Open(Source: any, Mode?: ConnectModeEnum, Options?: StreamOpenOptionsEnum, UserName?: string, Password?: string): void; + Position: number; + + /** @param number [NumBytes=-1] */ + Read(NumBytes?: number): any; + + /** @param number [NumChars=-1] */ + ReadText(NumChars?: number): string; + + /** @param ADODB.SaveOptionsEnum [Options=1] */ + SaveToFile(FileName: string, Options?: SaveOptionsEnum): void; + SetEOS(): void; + readonly Size: number; + SkipLine(): void; + readonly State: ObjectStateEnum; + Type: StreamTypeEnum; + Write(Buffer: any): void; + + /** @param ADODB.StreamWriteEnum [Options=0] */ + WriteText(Data: string, Options?: StreamWriteEnum): void; + } } interface ActiveXObject { - new (progID: 'ADODB.Connection'): ADODB.Connection; - new (progID: 'ADODB.Record'): ADODB.Record; - new (progID: 'ADODB.Stream'): ADODB.Stream; - new (progID: 'ADODB.Command'): ADODB.Command; - new (progID: 'ADODB.Recordset'): ADODB.Recordset; - new (progID: 'ADODB.Parameter'): ADODB.Parameter; + on(obj: ADODB.Connection, event: 'BeginTransComplete', argNames: ['TransactionLevel', 'pError', 'adStatus', 'pConnection'], handler: ( + this: ADODB.Connection, parameter: { + TransactionLevel: number, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'Disconnect', argNames: ['adStatus', 'pConnection'], handler: ( + this: ADODB.Connection, parameter: { + adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'ExecuteComplete', argNames: ['RecordsAffected', 'pError', 'adStatus', 'pCommand', 'pRecordset', 'pConnection'], handler: ( + this: ADODB.Connection, parameter: { + RecordsAffected: number, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pCommand: ADODB.Command, pRecordset: ADODB.Recordset, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'InfoMessage' | 'CommitTransComplete' | 'RollbackTransComplete' | 'ConnectComplete', argNames: ['pError', 'adStatus', 'pConnection'], handler: ( + this: ADODB.Connection, parameter: { + pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'WillConnect', argNames: ['ConnectionString', 'UserID', 'Password', 'Options', 'adStatus', 'pConnection'], handler: ( + this: ADODB.Connection, parameter: { + ConnectionString: string, UserID: string, Password: string, Options: number, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'WillExecute', argNames: ['Source', 'CursorType', 'LockType', 'Options', 'adStatus', 'pCommand', 'pRecordset', 'pConnection'], handler: ( + this: ADODB.Connection, parameter: { + Source: string, CursorType: ADODB.CursorTypeEnum, LockType: ADODB.LockTypeEnum, Options: number, adStatus: ADODB.EventStatusEnum, pCommand: ADODB.Command, + pRecordset: ADODB.Recordset, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Recordset, event: 'EndOfRecordset', argNames: ['fMoreData', 'adStatus', 'pRecordset'], handler: ( + this: ADODB.Recordset, parameter: { + fMoreData: boolean, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FetchComplete', argNames: ['pError', 'adStatus', 'pRecordset'], handler: ( + this: ADODB.Recordset, parameter: { + pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FetchProgress', argNames: ['Progress', 'MaxProgress', 'adStatus', 'pRecordset'], handler: ( + this: ADODB.Recordset, parameter: { + Progress: number, MaxProgress: number, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FieldChangeComplete', argNames: ['cFields', 'Fields', 'pError', 'adStatus', 'pRecordset'], handler: ( + this: ADODB.Recordset, parameter: { + cFields: number, Fields: any, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'RecordChangeComplete', argNames: ['adReason', 'cRecords', 'pError', 'adStatus', 'pRecordset'], handler: ( + this: ADODB.Recordset, parameter: { + adReason: ADODB.EventReasonEnum, cRecords: number, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'RecordsetChangeComplete' | 'MoveComplete', argNames: ['adReason', 'pError', 'adStatus', 'pRecordset'], handler: ( + this: ADODB.Recordset, parameter: { + adReason: ADODB.EventReasonEnum, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeField', argNames: ['cFields', 'Fields', 'adStatus', 'pRecordset'], handler: ( + this: ADODB.Recordset, parameter: { + cFields: number, Fields: any, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeRecord', argNames: ['adReason', 'cRecords', 'adStatus', 'pRecordset'], handler: ( + this: ADODB.Recordset, parameter: { + adReason: ADODB.EventReasonEnum, cRecords: number, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeRecordset' | 'WillMove', argNames: ['adReason', 'adStatus', 'pRecordset'], handler: ( + this: ADODB.Recordset, parameter: { + adReason: ADODB.EventReasonEnum, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + set(obj: ADODB.Recordset, propertyName: 'Collect', parameterTypes: [any], newValue: any): void; + new(progid: 'ADODB.Command'): ADODB.Command; + new(progid: 'ADODB.Connection'): ADODB.Connection; + new(progid: 'ADODB.Parameter'): ADODB.Parameter; + new(progid: 'ADODB.Record'): ADODB.Record; + new(progid: 'ADODB.Recordset'): ADODB.Recordset; + new(progid: 'ADODB.Stream'): ADODB.Stream; } +interface EnumeratorConstructor { + new(col: ADODB.Errors): ADODB.Error; + new(col: ADODB.Fields): ADODB.Field; + new(col: ADODB.Parameters): ADODB.Parameter; + new(col: ADODB.Properties): ADODB.Property; +} diff --git a/types/activex-adodb/package.json b/types/activex-adodb/package.json new file mode 100644 index 0000000000..d798f99261 --- /dev/null +++ b/types/activex-adodb/package.json @@ -0,0 +1 @@ +{ "dependencies": { "activex-helpers": "*"}} \ No newline at end of file diff --git a/types/activex-adodb/tsconfig.json b/types/activex-adodb/tsconfig.json new file mode 100644 index 0000000000..484faf1ed0 --- /dev/null +++ b/types/activex-adodb/tsconfig.json @@ -0,0 +1,22 @@ + +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es5", "scripthost"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strict": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "activex-adodb-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-adodb/tslint.json b/types/activex-adodb/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/activex-adodb/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/activex-data-objects/activex-data-objects-tests.ts b/types/activex-data-objects/activex-data-objects-tests.ts deleted file mode 100644 index 6298298a48..0000000000 --- a/types/activex-data-objects/activex-data-objects-tests.ts +++ /dev/null @@ -1,18 +0,0 @@ -//open connection to an Excel file -var pathToExcelFile = 'C:\\path\\to\\excel\\file.xlsx'; -var conn = new ActiveXObject('ADODB.Connection'); -conn.Provider = 'Microsoft.ACE.OLEDB.12.0'; -conn.ConnectionString = - 'Data Source="' + pathToExcelFile + '";' + - 'Extended Properties="Excel 12.0;HDR=Yes"'; -conn.Open(); - -//create a Command to access the data -var cmd = new ActiveXObject('ADODB.Command'); -cmd.CommandText = 'SELECT DISTINCT LastName, CityName FROM [Sheet1$]'; -//get a Recordset -var rs = cmd.Execute(); -//build a string from the Recordset -var s = rs.GetString(ADODB.StringFormatEnum.adClipString, -1, '\t', '\n', '(NULL)'); -rs.Close(); -WScript.Echo(s); \ No newline at end of file diff --git a/types/activex-scripting-runtime/index.d.ts b/types/activex-scripting-runtime/index.d.ts deleted file mode 100644 index 54065e1bd7..0000000000 --- a/types/activex-scripting-runtime/index.d.ts +++ /dev/null @@ -1,205 +0,0 @@ -// Type definitions for Microsoft Scripting Runtime -// Project: https://msdn.microsoft.com/en-us/library/bstcxhf7.aspx -// Definitions by: Zev Spitz -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace Scripting { - - //Enums - const enum CompareMethod { - BinaryCompare = 0, - DatabaseCompare = 2, - TextCompare = 1 - } - - const enum DriveTypeConst { - CDRom = 4, - Fixed = 2, - RamDisk = 5, - Remote = 3, - Removable = 1, - UnknownType = 0 - } - - const enum FileAttribute { - Alias = 1024, - Archive = 32, - Compressed = 2048, - Directory = 16, - Hidden = 2, - Normal = 0, - ReadOnly = 1, - System = 4, - Volume = 8 - } - - const enum IOMode { - ForAppending = 8, - ForReading = 1, - ForWriting = 2 - } - - const enum SpecialFolderConst { - SystemFolder = 1, - TemporaryFolder = 2, - WindowsFolder = 0 - } - - const enum StandardStreamTypes { - StdErr = 2, - StdIn = 0, - StdOut = 1 - } - - const enum Tristate { - TristateFalse = 0, - TristateMixed = -2, - TristateTrue = -1, - TristateUseDefault = -2 - } - - //Interfaces - interface Dictionary { - Add: (Key: any, Item: any) => void; - CompareMode: CompareMethod; - Count: number; - Exists: (Key: any) => boolean; - HashVal: (Key: any) => any; - Item: (Key: any) => any; //Also has setter with parameters - Items: () => any; - Key: (Key: any) => any; - Keys: () => any; - Remove: (Key: any) => void; - RemoveAll: () => void; - } - - interface Drive { - AvailableSpace: any; - DriveLetter: string; - DriveType: DriveTypeConst; - FileSystem: string; - FreeSpace: any; - IsReady: boolean; - Path: string; - RootFolder: Folder; - SerialNumber: number; - ShareName: string; - TotalSize: any; - VolumeName: string; - } - - interface Drives { - Count: number; - Item: (Key: any) => Drive; - } - - interface Encoder { - EncodeScriptFile: (szExt: string, bstrStreamIn: string, cFlags: number, bstrDefaultLang: string) => string; - } - - interface File { - Attributes: FileAttribute; - Copy: (Destination: string, OverWriteFiles?: boolean) => void; - DateCreated: VarDate; - DateLastAccessed: VarDate; - DateLastModified: VarDate; - Delete: (Force?: boolean) => void; - Drive: Drive; - Move: (Destination: string) => void; - Name: string; - OpenAsTextStream: (IOMode?: IOMode, Format?: Tristate) => TextStream; - ParentFolder: Folder; - Path: string; - ShortName: string; - ShortPath: string; - Size: any; - Type: string; - } - - interface Files { - Count: number; - Item: (Key: any) => File; - } - - interface FileSystemObject { - BuildPath: (Path: string, Name: string) => string; - CopyFile: (Source: string, Destination: string, OverWriteFiles?: boolean) => void; - CopyFolder: (Source: string, Destination: string, OverWriteFiles?: boolean) => void; - CreateFolder: (Path: string) => Folder; - CreateTextFile: (FileName: string, Overwrite?: boolean, Unicode?: boolean) => TextStream; - DeleteFile: (FileSpec: string, Force?: boolean) => void; - DeleteFolder: (FolderSpec: string, Force?: boolean) => void; - DriveExists: (DriveSpec: string) => boolean; - Drives: Drives; - FileExists: (FileSpec: string) => boolean; - FolderExists: (FolderSpec: string) => boolean; - GetAbsolutePathName: (Path: string) => string; - GetBaseName: (Path: string) => string; - GetDrive: (DriveSpec: string) => Drive; - GetDriveName: (Path: string) => string; - GetExtensionName: (Path: string) => string; - GetFile: (FilePath: string) => File; - GetFileName: (Path: string) => string; - GetFileVersion: (FileName: string) => string; - GetFolder: (FolderPath: string) => Folder; - GetParentFolderName: (Path: string) => string; - GetSpecialFolder: (SpecialFolder: SpecialFolderConst) => Folder; - GetStandardStream: (StandardStreamType: StandardStreamTypes, Unicode?: boolean) => TextStream; - GetTempName: () => string; - MoveFile: (Source: string, Destination: string) => void; - MoveFolder: (Source: string, Destination: string) => void; - OpenTextFile: (FileName: string, IOMode?: IOMode, Create?: boolean, Format?: Tristate) => TextStream; - } - - interface Folder { - Attributes: FileAttribute; - Copy: (Destination: string, OverWriteFiles?: boolean) => void; - CreateTextFile: (FileName: string, Overwrite?: boolean, Unicode?: boolean) => TextStream; - DateCreated: VarDate; - DateLastAccessed: VarDate; - DateLastModified: VarDate; - Delete: (Force?: boolean) => void; - Drive: Drive; - Files: Files; - IsRootFolder: boolean; - Move: (Destination: string) => void; - Name: string; - ParentFolder: Folder; - Path: string; - ShortName: string; - ShortPath: string; - Size: any; - SubFolders: Folders; - Type: string; - } - - interface Folders { - Add: (Name: string) => Folder; - Count: number; - Item: (Key: any) => Folder; - } - - interface TextStream { - AtEndOfLine: boolean; - AtEndOfStream: boolean; - Close: () => void; - Column: number; - Line: number; - Read: (Characters: number) => string; - ReadAll: () => string; - ReadLine: () => string; - Skip: (Characters: number) => void; - SkipLine: () => void; - Write: (Text: string) => void; - WriteBlankLines: (Lines: number) => void; - WriteLine: (Text?: string) => void; - } - -} - -interface ActiveXObject { - new (progID: 'Scripting.Dictionary'): Scripting.Dictionary; - new (progID: 'Scripting.FileSystemObject'): Scripting.FileSystemObject; - new (progID: 'Scripting.Encoder'): Scripting.Encoder; -} - diff --git a/types/activex-scripting-runtime/activex-scripting-runtime-tests.ts b/types/activex-scripting/activex-scripting-tests.ts similarity index 62% rename from types/activex-scripting-runtime/activex-scripting-runtime-tests.ts rename to types/activex-scripting/activex-scripting-tests.ts index 1510b98e1b..cc14a421ff 100644 --- a/types/activex-scripting-runtime/activex-scripting-runtime-tests.ts +++ b/types/activex-scripting/activex-scripting-tests.ts @@ -1,8 +1,7 @@ -//source -- https://msdn.microsoft.com/en-us/library/ebkhfaaz.aspx +// source -- https://msdn.microsoft.com/en-us/library/ebkhfaaz.aspx - -//Generates a string describing the drive type of a given Drive object. -var showDriveType = (drive: Scripting.Drive) => { +// Generates a string describing the drive type of a given Drive object. +let showDriveType = (drive: Scripting.Drive) => { switch (drive.DriveType) { case Scripting.DriveTypeConst.Removable: return 'Removeable'; @@ -19,14 +18,13 @@ var showDriveType = (drive: Scripting.Drive) => { } }; - -//Generates a string describing the attributes of a file or folder. -var showFileAttributes = (file: Scripting.File) => { - var attr = file.Attributes; +// Generates a string describing the attributes of a file or folder. +let showFileAttributes = (file: Scripting.File) => { + let attr = file.Attributes; if (attr === 0) { return 'Normal'; } - var attributeStrings: string[] = []; + let attributeStrings: string[] = []; if (attr & Scripting.FileAttribute.Directory) { attributeStrings.push('Directory'); } if (attr & Scripting.FileAttribute.ReadOnly) { attributeStrings.push('Read-only'); } if (attr & Scripting.FileAttribute.Hidden) { attributeStrings.push('Hidden'); } @@ -38,24 +36,22 @@ var showFileAttributes = (file: Scripting.File) => { return attributeStrings.join(','); }; - -//source --https://msdn.microsoft.com/en-us/library/ts2t8ybh(v=vs.84).aspx -var showFreeSpace = (drvPath: string) => { - var fso = new ActiveXObject('Scripting.FileSystemObject'); - var d = fso.GetDrive(fso.GetDriveName(drvPath)); - var s = 'Drive ' + drvPath + ' - '; +// source --https://msdn.microsoft.com/en-us/library/ts2t8ybh(v=vs.84).aspx +let showFreeSpace = (drvPath: string) => { + let fso = new ActiveXObject('Scripting.FileSystemObject'); + let d = fso.GetDrive(fso.GetDriveName(drvPath)); + let s = 'Drive ' + drvPath + ' - '; s += d.VolumeName + '
'; s += 'Free Space: ' + d.FreeSpace / 1024 + ' Kbytes'; return (s); }; +// source -- https://msdn.microsoft.com/en-us/library/kaf6yaft(v=vs.84).aspx +let getALine = (filespec: string) => { + let fso = new ActiveXObject('Scripting.FileSystemObject'); + let file = fso.OpenTextFile(filespec, Scripting.IOMode.ForReading, false); -//source -- https://msdn.microsoft.com/en-us/library/kaf6yaft(v=vs.84).aspx -var getALine = (filespec: string) => { - var fso = new ActiveXObject('Scripting.FileSystemObject'); - var file = fso.OpenTextFile(filespec, Scripting.IOMode.ForReading, false); - - var s = ''; + let s = ''; while (!file.AtEndOfLine) { s += file.Read(1); } diff --git a/types/activex-scripting/index.d.ts b/types/activex-scripting/index.d.ts new file mode 100644 index 0000000000..c4a64c54af --- /dev/null +++ b/types/activex-scripting/index.d.ts @@ -0,0 +1,465 @@ +// Type definitions for Microsoft Scripting Runtime 1.0 +// Project: https://msdn.microsoft.com/en-us/library/bstcxhf7.aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace Scripting { + const enum CompareMethod { + BinaryCompare = 0, + DatabaseCompare = 2, + TextCompare = 1 + } + + const enum DriveTypeConst { + CDRom = 4, + Fixed = 2, + RamDisk = 5, + Remote = 3, + Removable = 1, + UnknownType = 0 + } + + const enum FileAttribute { + Alias = 1024, + Archive = 32, + Compressed = 2048, + Directory = 16, + Hidden = 2, + Normal = 0, + ReadOnly = 1, + System = 4, + Volume = 8 + } + + const enum IOMode { + ForAppending = 8, + ForReading = 1, + ForWriting = 2 + } + + const enum SpecialFolderConst { + SystemFolder = 1, + TemporaryFolder = 2, + WindowsFolder = 0 + } + + const enum StandardStreamTypes { + StdErr = 2, + StdIn = 0, + StdOut = 1 + } + + const enum Tristate { + TristateFalse = 0, + TristateMixed = -2, + TristateTrue = -1, + TristateUseDefault = -2 + } + + /** Scripting.Dictionary */ + interface Dictionary { + /** Add a new key and item to the dictionary. */ + Add(Key: any, Item: any): void; + + /** Set or get the string comparison method. */ + CompareMode: CompareMethod; + + /** Get the number of items in the dictionary. */ + readonly Count: number; + + /** Determine if a given key is in the dictionary. */ + Exists(Key: any): boolean; + HashVal(Key: any): any; + + /** Set or get the item for a given key */ + Item(Key: any): any; + + /** Get an array containing all items in the dictionary. */ + Items(): any; + + /** Change a key to a different key. */ + Key(Key: any): any; + + /** Get an array containing all keys in the dictionary. */ + Keys(): any; + + /** Remove a given key from the dictionary. */ + Remove(Key: any): void; + + /** Remove all information from the dictionary. */ + RemoveAll(): void; + } + + /** Drive Object */ + interface Drive { + /** Get available space */ + readonly AvailableSpace: any; + + /** Drive letter */ + readonly DriveLetter: string; + + /** Drive type */ + readonly DriveType: DriveTypeConst; + + /** Filesystem type */ + readonly FileSystem: string; + + /** Get drive free space */ + readonly FreeSpace: any; + + /** Check if disk is available */ + readonly IsReady: boolean; + + /** Path */ + readonly Path: string; + + /** Root folder */ + readonly RootFolder: Folder; + + /** Serial number */ + readonly SerialNumber: number; + + /** Share name */ + readonly ShareName: string; + + /** Get total drive size */ + readonly TotalSize: any; + + /** Name of volume */ + VolumeName: string; + } + + /** Collection of drives associated with drive letters */ + interface Drives { + /** Number of drives */ + readonly Count: number; + + /** Get drive */ + Item(Key: any): Drive; + } + + /** Script Encoder Object */ + interface Encoder { + /** Call the Encoder determined by szExt, passing bstrStreamIn and optional arguments */ + EncodeScriptFile(szExt: string, bstrStreamIn: string, cFlags: number, bstrDefaultLang: string): string; + } + + /** File object */ + interface File { + /** File attributes */ + Attributes: FileAttribute; + + /** + * Copy this file + * @param boolean [OverWriteFiles=true] + */ + Copy(Destination: string, OverWriteFiles?: boolean): void; + + /** Date file was created */ + readonly DateCreated: VarDate; + + /** Date file was last accessed */ + readonly DateLastAccessed: VarDate; + + /** Date file was last modified */ + readonly DateLastModified: VarDate; + + /** + * Delete this file + * @param boolean [Force=false] + */ + Delete(Force?: boolean): void; + + /** Get drive that contains file */ + readonly Drive: Drive; + + /** Move this file */ + Move(Destination: string): void; + + /** Get name of file */ + Name: string; + + /** + * Open a file as a TextStream + * @param Scripting.IOMode [IOMode=1] + * @param Scripting.Tristate [Format=0] + */ + OpenAsTextStream(IOMode?: IOMode, Format?: Tristate): TextStream; + + /** Get folder that contains file */ + readonly ParentFolder: Folder; + + /** Path to the file */ + readonly Path: string; + + /** Short name */ + readonly ShortName: string; + + /** Short path */ + readonly ShortPath: string; + + /** File size */ + readonly Size: any; + + /** Type description */ + readonly Type: string; + } + + /** Collection of files in a folder */ + interface Files { + /** Number of folders */ + readonly Count: number; + + /** Get file */ + Item(Key: any): File; + } + + /** FileSystem Object */ + interface FileSystemObject { + /** Generate a path from an existing path and a name */ + BuildPath(Path: string, Name: string): string; + + /** + * Copy a file + * @param boolean [OverWriteFiles=true] + */ + CopyFile(Source: string, Destination: string, OverWriteFiles?: boolean): void; + + /** + * Copy a folder + * @param boolean [OverWriteFiles=true] + */ + CopyFolder(Source: string, Destination: string, OverWriteFiles?: boolean): void; + + /** Create a folder */ + CreateFolder(Path: string): Folder; + + /** + * Create a file as a TextStream + * @param boolean [Overwrite=true] + * @param boolean [Unicode=false] + */ + CreateTextFile(FileName: string, Overwrite?: boolean, Unicode?: boolean): TextStream; + + /** + * Delete a file + * @param boolean [Force=false] + */ + DeleteFile(FileSpec: string, Force?: boolean): void; + + /** + * Delete a folder + * @param boolean [Force=false] + */ + DeleteFolder(FolderSpec: string, Force?: boolean): void; + + /** Check if a drive or a share exists */ + DriveExists(DriveSpec: string): boolean; + + /** Get drives collection */ + readonly Drives: Drives; + + /** Check if a file exists */ + FileExists(FileSpec: string): boolean; + + /** Check if a path exists */ + FolderExists(FolderSpec: string): boolean; + + /** Return the canonical representation of the path */ + GetAbsolutePathName(Path: string): string; + + /** Return base name from a path */ + GetBaseName(Path: string): string; + + /** Get drive or UNC share */ + GetDrive(DriveSpec: string): Drive; + + /** Return drive from a path */ + GetDriveName(Path: string): string; + + /** Return extension from path */ + GetExtensionName(Path: string): string; + + /** Get file */ + GetFile(FilePath: string): File; + + /** Return the file name from a path */ + GetFileName(Path: string): string; + + /** Retrieve the file version of the specified file into a string */ + GetFileVersion(FileName: string): string; + + /** Get folder */ + GetFolder(FolderPath: string): Folder; + + /** Return path to the parent folder */ + GetParentFolderName(Path: string): string; + + /** Get location of various system folders */ + GetSpecialFolder(SpecialFolder: SpecialFolderConst): Folder; + + /** + * Retrieve the standard input, output or error stream + * @param boolean [Unicode=false] + */ + GetStandardStream(StandardStreamType: StandardStreamTypes, Unicode?: boolean): TextStream; + + /** Generate name that can be used to name a temporary file */ + GetTempName(): string; + + /** Move a file */ + MoveFile(Source: string, Destination: string): void; + + /** Move a folder */ + MoveFolder(Source: string, Destination: string): void; + + /** + * Open a file as a TextStream + * @param Scripting.IOMode [IOMode=1] + * @param boolean [Create=false] + * @param Scripting.Tristate [Format=0] + */ + OpenTextFile(FileName: string, IOMode?: IOMode, Create?: boolean, Format?: Tristate): TextStream; + } + + /** Folder object */ + interface Folder { + /** Folder attributes */ + Attributes: FileAttribute; + + /** + * Copy this folder + * @param boolean [OverWriteFiles=true] + */ + Copy(Destination: string, OverWriteFiles?: boolean): void; + + /** + * Create a file as a TextStream + * @param boolean [Overwrite=true] + * @param boolean [Unicode=false] + */ + CreateTextFile(FileName: string, Overwrite?: boolean, Unicode?: boolean): TextStream; + + /** Date folder was created */ + readonly DateCreated: VarDate; + + /** Date folder was last accessed */ + readonly DateLastAccessed: VarDate; + + /** Date folder was last modified */ + readonly DateLastModified: VarDate; + + /** + * Delete this folder + * @param boolean [Force=false] + */ + Delete(Force?: boolean): void; + + /** Get drive that contains folder */ + readonly Drive: Drive; + + /** Get files collection */ + readonly Files: Files; + + /** True if folder is root */ + readonly IsRootFolder: boolean; + + /** Move this folder */ + Move(Destination: string): void; + + /** Get name of folder */ + Name: string; + + /** Get parent folder */ + readonly ParentFolder: Folder; + + /** Path to folder */ + readonly Path: string; + + /** Short name */ + readonly ShortName: string; + + /** Short path */ + readonly ShortPath: string; + + /** Sum of files and subfolders */ + readonly Size: any; + + /** Get folders collection */ + readonly SubFolders: Folders; + + /** Type description */ + readonly Type: string; + } + + /** Collection of subfolders in a folder */ + interface Folders { + /** Create a new folder */ + Add(Name: string): Folder; + + /** Number of folders */ + readonly Count: number; + + /** Get folder */ + Item(Key: any): Folder; + } + + /** TextStream object */ + interface TextStream { + /** Is the current position at the end of a line? */ + readonly AtEndOfLine: boolean; + + /** Is the current position at the end of the stream? */ + readonly AtEndOfStream: boolean; + + /** Close a text stream */ + Close(): void; + + /** Current column number */ + readonly Column: number; + + /** Current line number */ + readonly Line: number; + + /** Read a specific number of characters into a string */ + Read(Characters: number): string; + + /** Read the entire stream into a string */ + ReadAll(): string; + + /** Read an entire line into a string */ + ReadLine(): string; + + /** Skip a specific number of characters */ + Skip(Characters: number): void; + + /** Skip a line */ + SkipLine(): void; + + /** Write a string to the stream */ + Write(Text: string): void; + + /** Write a number of blank lines to the stream */ + WriteBlankLines(Lines: number): void; + + /** + * Write a string and an end of line to the stream + * @param string [Text=''] + */ + WriteLine(Text?: string): void; + } +} + +interface ActiveXObject { + set(obj: Scripting.Dictionary, propertyName: 'Item', parameterTypes: [any], newValue: any): void; + new(progid: 'Scripting.Dictionary'): Scripting.Dictionary; + new(progid: 'Scripting.Encoder'): Scripting.Encoder; + new(progid: 'Scripting.FileSystemObject'): Scripting.FileSystemObject; +} + +interface EnumeratorConstructor { + new(col: Scripting.Dictionary): any; + new(col: Scripting.Drives): Scripting.Drive; + new(col: Scripting.Files): Scripting.File; + new(col: Scripting.Folders): Scripting.Folder; +} diff --git a/types/activex-scripting/package.json b/types/activex-scripting/package.json new file mode 100644 index 0000000000..d798f99261 --- /dev/null +++ b/types/activex-scripting/package.json @@ -0,0 +1 @@ +{ "dependencies": { "activex-helpers": "*"}} \ No newline at end of file diff --git a/types/activex-scripting/tsconfig.json b/types/activex-scripting/tsconfig.json new file mode 100644 index 0000000000..190e7bdcd6 --- /dev/null +++ b/types/activex-scripting/tsconfig.json @@ -0,0 +1,22 @@ + +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es5", "scripthost"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strict": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "activex-scripting-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-scripting/tslint.json b/types/activex-scripting/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/activex-scripting/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts b/types/activex-wia/activex-wia-tests.ts similarity index 50% rename from types/activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts rename to types/activex-wia/activex-wia-tests.ts index 549bb4433f..8384291f5d 100644 --- a/types/activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts +++ b/types/activex-wia/activex-wia-tests.ts @@ -1,31 +1,43 @@ -//source -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms630826(v=vs.85).aspx +// source -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms630826(v=vs.85).aspx +// Convert a file +let commonDialog = new ActiveXObject('WIA.CommonDialog'); +let img = commonDialog.ShowAcquireImage(); -//Convert a file -var commonDialog = new ActiveXObject('WIA.CommonDialog'); -var img = commonDialog.ShowAcquireImage(); -if (img.FormatID !== WIA.FormatID.wiaFormatJPEG) { - var ip = new ActiveXObject('WIA.ImageProcess'); +// when DefinitelyTyped supports Typescript 2.4 -- end of July 2017, replace these: +let jpegFormatID = '{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}'; +if (img.FormatID !== jpegFormatID) { + let ip = new ActiveXObject('WIA.ImageProcess'); + ip.Filters.Add(ip.FilterInfos.Item('Convert').FilterID); + ip.Filters.Item(1).Properties.Item('FormatID').Value = jpegFormatID; + img = ip.Apply(img); +} +// with this: +/*if (img.FormatID !== WIA.FormatID.wiaFormatJPEG) { + let ip = new ActiveXObject('WIA.ImageProcess'); ip.Filters.Add(ip.FilterInfos.Item('Convert').FilterID); ip.Filters.Item(1).Properties.Item('FormatID').Value = WIA.FormatID.wiaFormatJPEG; img = ip.Apply(img); -} +}*/ - -//Take a picture -var dev = commonDialog.ShowSelectDevice(); +// Take a picture +let dev = commonDialog.ShowSelectDevice(); if (dev.Type === WIA.WiaDeviceType.CameraDeviceType) { - var itm = dev.ExecuteCommand(WIA.CommandID.wiaCommandTakePicture); + // when DefinitelyTyped supports Typescript 2.4 -- end of July 2017, replace these: + let commandID = '{AF933CAC-ACAD-11D2-A093-00C04F72DC3C}'; + let itm = dev.ExecuteCommand(commandID); + + // with this: + // let itm = dev.ExecuteCommand(WIA.CommandID.wiaCommandTakePicture); } - -//Display detailed property information +// Display detailed property information dev = commonDialog.ShowSelectDevice(); -var e = new Enumerator(dev.Properties); //no foreach over ActiveX collections +let e = new Enumerator(dev.Properties); // no foreach over ActiveX collections e.moveFirst(); while (!e.atEnd()) { - var p = e.item(); - var s = p.Name + ' (' + p.PropertyID + ') = '; + let p = e.item(); + let s = p.Name + ' (' + p.PropertyID + ') = '; if (p.IsVector) { s += '[vector of data]'; } else { @@ -48,8 +60,8 @@ while (!e.atEnd()) { } else { s += ' [valid values include: '; } - var count = p.SubTypeValues.Count; - for (var i = 1; i <= count; i++) { + let count = p.SubTypeValues.Count; + for (let i = 1; i <= count; i++) { s += p.SubTypeValues.Item(i); if (i < count) { s += ', '; @@ -63,9 +75,5 @@ while (!e.atEnd()) { } } - if (WScript) { - WScript.Echo(s); - } else if (window) { - window.alert(s); - } -} \ No newline at end of file + WScript.Echo(s); +} diff --git a/types/activex-wia/index.d.ts b/types/activex-wia/index.d.ts new file mode 100644 index 0000000000..7d7cbae727 --- /dev/null +++ b/types/activex-wia/index.d.ts @@ -0,0 +1,759 @@ +// Type definitions for Windows Image Acquisition 2.0 +// Project: https://msdn.microsoft.com/en-us/library/windows/desktop/ms630368(v=vs.85).aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Typescript Version: 2.4 + +declare namespace WIA { + /** String versions of globally unique identifiers (GUIDs) that identify common Device and Item commands. */ + // uncomment when DefinitelyTyped supports Typescript 2.4 (end of July 2017) + /*const enum CommandID { + wiaCommandChangeDocument = '{04E725B0-ACAE-11D2-A093-00C04F72DC3C}', + wiaCommandDeleteAllItems = '{E208C170-ACAD-11D2-A093-00C04F72DC3C}', + wiaCommandSynchronize = '{9B26B7B2-ACAD-11D2-A093-00C04F72DC3C}', + wiaCommandTakePicture = '{AF933CAC-ACAD-11D2-A093-00C04F72DC3C}', + wiaCommandUnloadDocument = '{1F3B3D8E-ACAE-11D2-A093-00C04F72DC3C}' + }*/ + + /** String versions of globally unique identifiers (GUIDs) that identify DeviceManager events. */ + // uncomment when DefinitelyTyped supports Typescript 2.4 (end of July 2017) + /*const enum EventID { + wiaEventDeviceConnected = '{A28BBADE-64B6-11D2-A231-00C04FA31809}', + wiaEventDeviceDisconnected = '{143E4E83-6497-11D2-A231-00C04FA31809}', + wiaEventItemCreated = '{4C8F4EF5-E14F-11D2-B326-00C04F68CE61}', + wiaEventItemDeleted = '{1D22A559-E14F-11D2-B326-00C04F68CE61}', + wiaEventScanEmailImage = '{C686DCEE-54F2-419E-9A27-2FC7F2E98F9E}', + wiaEventScanFaxImage = '{C00EB793-8C6E-11D2-977A-0000F87A926F}', + wiaEventScanFilmImage = '{9B2B662C-6185-438C-B68B-E39EE25E71CB}', + wiaEventScanImage = '{A6C5A715-8C6E-11D2-977A-0000F87A926F}', + wiaEventScanImage2 = '{FC4767C1-C8B3-48A2-9CFA-2E90CB3D3590}', + wiaEventScanImage3 = '{154E27BE-B617-4653-ACC5-0FD7BD4C65CE}', + wiaEventScanImage4 = '{A65B704A-7F3C-4447-A75D-8A26DFCA1FDF}', + wiaEventScanOCRImage = '{9D095B89-37D6-4877-AFED-62A297DC6DBE}', + wiaEventScanPrintImage = '{B441F425-8C6E-11D2-977A-0000F87A926F}' + }*/ + + /** String versions of globally unique identifiers (GUIDs) that indicate the file format of an image. */ + // uncomment when DefinitelyTyped supports Typescript 2.4 (end of July 2017) + /*const enum FormatID { + wiaFormatBMP = '{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}', + wiaFormatGIF = '{B96B3CB0-0728-11D3-9D7B-0000F81EF32E}', + wiaFormatJPEG = '{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}', + wiaFormatPNG = '{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}', + wiaFormatTIFF = '{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}' + }*/ + + /** Miscellaneous string constants */ + // uncomment when DefinitelyTyped supports Typescript 2.4 (end of July 2017) + /*const enum Miscellaneous { + wiaAnyDeviceID = '*', + wiaIDUnknown = '{00000000-0000-0000-0000-000000000000}' + }*/ + + /** + * The WiaDeviceType enumeration specifies the type of device attached to a user's computer. Use the Type property on the DeviceInfo object or the Device + * object to obtain these values from the device. + */ + const enum WiaDeviceType { + CameraDeviceType = 2, + ScannerDeviceType = 1, + UnspecifiedDeviceType = 0, + VideoDeviceType = 3 + } + + /** + * A DeviceEvent's type is composed of bits from the WiaEventFlags enumeration. You can test a DeviceEvent's type by using the AND operation with DeviceEv + * ent.Type and a member from the WiaEventFlags enumeration. + */ + const enum WiaEventFlag { + ActionEvent = 2, + NotificationEvent = 1 + } + + /** The WiaImageBias enumeration helps specify what type of data the image is intended to represent. */ + const enum WiaImageBias { + MaximizeQuality = 131072, + MinimizeSize = 65536 + } + + /** The WiaImageIntent enumeration helps specify what type of data the image is intended to represent. */ + const enum WiaImageIntent { + ColorIntent = 1, + GrayscaleIntent = 2, + TextIntent = 4, + UnspecifiedIntent = 0 + } + + /** + * The WiaImagePropertyType enumeration specifies the type of the value of an image property. Image properties can be found in the Properties collection o + * f an ImageFile object. + */ + const enum WiaImagePropertyType { + ByteImagePropertyType = 1001, + LongImagePropertyType = 1004, + RationalImagePropertyType = 1006, + StringImagePropertyType = 1002, + UndefinedImagePropertyType = 1000, + UnsignedIntegerImagePropertyType = 1003, + UnsignedLongImagePropertyType = 1005, + UnsignedRationalImagePropertyType = 1007, + VectorOfBytesImagePropertyType = 1101, + VectorOfLongsImagePropertyType = 1103, + VectorOfRationalsImagePropertyType = 1105, + VectorOfUndefinedImagePropertyType = 1100, + VectorOfUnsignedIntegersImagePropertyType = 1102, + VectorOfUnsignedLongsImagePropertyType = 1104, + VectorOfUnsignedRationalsImagePropertyType = 1106 + } + + /** + * An Item's type is composed of bits from the WiaItemFlags enumeration. You can test an Item's type by using the AND operation with Item.Properties("Item + * Flags") and a member from the WiaItemFlags enumeration. + */ + const enum WiaItemFlag { + AnalyzeItemFlag = 16, + AudioItemFlag = 32, + BurstItemFlag = 2048, + DeletedItemFlag = 128, + DeviceItemFlag = 64, + DisconnectedItemFlag = 256, + FileItemFlag = 2, + FolderItemFlag = 4, + FreeItemFlag = 0, + GeneratedItemFlag = 16384, + HasAttachmentsItemFlag = 32768, + HPanoramaItemFlag = 512, + ImageItemFlag = 1, + RemovedItemFlag = -2147483648, + RootItemFlag = 8, + StorageItemFlag = 4096, + TransferItemFlag = 8192, + VideoItemFlag = 65536, + VPanoramaItemFlag = 1024 + } + + /** + * The WiaPropertyType enumeration specifies the type of the value of an item property. Item properties can be found in the Properties collection of a Dev + * ice or Item object. + */ + const enum WiaPropertyType { + BooleanPropertyType = 1, + BytePropertyType = 2, + ClassIDPropertyType = 15, + CurrencyPropertyType = 12, + DatePropertyType = 13, + DoublePropertyType = 11, + ErrorCodePropertyType = 7, + FileTimePropertyType = 14, + HandlePropertyType = 18, + IntegerPropertyType = 3, + LargeIntegerPropertyType = 8, + LongPropertyType = 5, + ObjectPropertyType = 17, + SinglePropertyType = 10, + StringPropertyType = 16, + UnsignedIntegerPropertyType = 4, + UnsignedLargeIntegerPropertyType = 9, + UnsignedLongPropertyType = 6, + UnsupportedPropertyType = 0, + VariantPropertyType = 19, + VectorOfBooleansPropertyType = 101, + VectorOfBytesPropertyType = 102, + VectorOfClassIDsPropertyType = 115, + VectorOfCurrenciesPropertyType = 112, + VectorOfDatesPropertyType = 113, + VectorOfDoublesPropertyType = 111, + VectorOfErrorCodesPropertyType = 107, + VectorOfFileTimesPropertyType = 114, + VectorOfIntegersPropertyType = 103, + VectorOfLargeIntegersPropertyType = 108, + VectorOfLongsPropertyType = 105, + VectorOfSinglesPropertyType = 110, + VectorOfStringsPropertyType = 116, + VectorOfUnsignedIntegersPropertyType = 104, + VectorOfUnsignedLargeIntegersPropertyType = 109, + VectorOfUnsignedLongsPropertyType = 106, + VectorOfVariantsPropertyType = 119 + } + + /** + * The WiaSubType enumeration specifies more detail about the property value. Use the SubType property on the Property object to obtain these values for t + * he property. + */ + const enum WiaSubType { + FlagSubType = 3, + ListSubType = 2, + RangeSubType = 1, + UnspecifiedSubType = 0 + } + + /** + * The CommonDialog control is an invisible-at-runtime control that contains all the methods that display a User Interface. A CommonDialog control can be + * created using "WIA.CommonDialog" in a call to CreateObject or by dropping a CommonDialog on a form. + */ + interface CommonDialog { + /** + * Displays one or more dialog boxes that enable the user to acquire an image from a hardware device for image acquisition and returns an ImageFile object + * on success, otherwise Nothing + * @param WIA.WiaDeviceType [DeviceType=0] + * @param WIA.WiaImageIntent [Intent=0] + * @param WIA.WiaImageBias [Bias=131072] + * @param string [FormatID='{00000000-0000-0000-0000-000000000000}'] + * @param boolean [AlwaysSelectDevice=false] + * @param boolean [UseCommonUI=true] + * @param boolean [CancelError=false] + */ + ShowAcquireImage( + DeviceType?: WiaDeviceType, Intent?: WiaImageIntent, Bias?: WiaImageBias, FormatID?: string, AlwaysSelectDevice?: boolean, UseCommonUI?: boolean, CancelError?: boolean): ImageFile; + + /** Launches the Windows Scanner and Camera Wizard and returns Nothing. Future versions may return a collection of ImageFile objects. */ + ShowAcquisitionWizard(Device: Device): any; + + /** + * Displays the properties dialog box for the specified Device + * @param boolean [CancelError=false] + */ + ShowDeviceProperties(Device: Device, CancelError?: boolean): void; + + /** + * Displays the properties dialog box for the specified Item + * @param boolean [CancelError=false] + */ + ShowItemProperties(Item: Item, CancelError?: boolean): void; + + /** Launches the Photo Printing Wizard with the absolute path of a specific file or Vector of absolute paths to files */ + ShowPhotoPrintingWizard(Files: any): void; + + /** + * Displays a dialog box that enables the user to select a hardware device for image acquisition. Returns the selected Device object on success, otherwise + * Nothing + * @param WIA.WiaDeviceType [DeviceType=0] + * @param boolean [AlwaysSelectDevice=false] + * @param boolean [CancelError=false] + */ + ShowSelectDevice(DeviceType?: WiaDeviceType, AlwaysSelectDevice?: boolean, CancelError?: boolean): Device; + + /** + * Displays a dialog box that enables the user to select an item for transfer from a hardware device for image acquisition. Returns the selection as an It + * ems collection on success, otherwise Nothing + * @param WIA.WiaImageIntent [Intent=0] + * @param WIA.WiaImageBias [Bias=131072] + * @param boolean [SingleSelect=true] + * @param boolean [UseCommonUI=true] + * @param boolean [CancelError=false] + */ + ShowSelectItems(Device: Device, Intent?: WiaImageIntent, Bias?: WiaImageBias, SingleSelect?: boolean, UseCommonUI?: boolean, CancelError?: boolean): Items; + + /** + * Displays a progress dialog box while transferring the specified Item to the local machine. See Item.Transfer for additional information. + * @param string [FormatID='{00000000-0000-0000-0000-000000000000}'] + * @param boolean [CancelError=false] + */ + ShowTransfer(Item: Item, FormatID?: string, CancelError?: boolean): any; + } + + /** The Device object represents an active connection to an imaging device. */ + interface Device { + /** A collection of all commands for this imaging device */ + readonly Commands: DeviceCommands; + + /** Returns the DeviceID for this Device */ + readonly DeviceID: string; + + /** A collection of all events for this imaging device */ + readonly Events: DeviceEvents; + + /** + * Issues the command specified by CommandID to the imaging device. CommandIDs are device dependent. Valid CommandIDs for this Device are contained in the + * Commands collection. + */ + ExecuteCommand(CommandID: string): Item; + + /** Returns the Item object specified by ItemID if it exists */ + GetItem(ItemID: string): Item; + + /** A collection of all items for this imaging device */ + readonly Items: Items; + + /** A collection of all properties for this imaging device */ + readonly Properties: Properties; + + /** Returns the Type of Device */ + readonly Type: WiaDeviceType; + + /** Returns the underlying IWiaItem interface for this Device object */ + readonly WiaItem: any; + } + + /** The DeviceCommand object describes a CommandID that can be used when calling ExecuteCommand on a Device or Item object. */ + interface DeviceCommand { + /** Returns the commandID for this Command */ + readonly CommandID: string; + + /** Returns the command Description */ + readonly Description: string; + + /** Returns the command Name */ + readonly Name: string; + } + + /** + * The DeviceCommands object is a collection of all the supported DeviceCommands for an imaging device. See the Commands property of a Device or Item obje + * ct for more details on determining the collection of supported device commands. + */ + interface DeviceCommands { + /** Returns the number of members in the collection */ + readonly Count: number; + + /** Returns the specified item in the collection by position */ + Item(Index: number): DeviceCommand; + } + + /** The DeviceEvent object describes an EventID that can be used when calling RegisterEvent or RegisterPersistentEvent on a DeviceManager object. */ + interface DeviceEvent { + /** Returns the event Description */ + readonly Description: string; + + /** Returns the EventID for this Event */ + readonly EventID: string; + + /** Returns the event Name */ + readonly Name: string; + + /** Returns the Type of this Event */ + readonly Type: WiaEventFlag; + } + + /** + * The DeviceEvents object is a collection of all the supported DeviceEvent for an imaging device. See the Events property of a Device object for more det + * ails on determining the collection of supported device events. + */ + interface DeviceEvents { + /** Returns the number of members in the collection */ + readonly Count: number; + + /** Returns the specified item in the collection by position */ + Item(Index: number): DeviceEvent; + } + + /** + * The DeviceInfo object is a container that describes the unchanging (static) properties of an imaging device that is currently connected to the computer + * . + */ + interface DeviceInfo { + /** Establish a connection with this device and return a Device object */ + Connect(): Device; + + /** Returns the DeviceID for this Device */ + readonly DeviceID: string; + + /** A collection of all properties for this imaging device that are applicable when the device is not connected */ + readonly Properties: Properties; + + /** Returns the Type of Device */ + readonly Type: WiaDeviceType; + } + + /** + * The DeviceInfos object is a collection of all the imaging devices currently connected to the computer. See the DeviceInfos property on the DeviceManage + * r object for detail on accessing the DeviceInfos object. + */ + interface DeviceInfos { + /** Returns the number of members in the collection */ + readonly Count: number; + + /** Returns the specified item in the collection either by position or Device ID */ + Item(Index: any): DeviceInfo; + } + + /** + * The DeviceManager control is an invisible-at-runtime control that manages the imaging devices connected to the computer. A DeviceManager control can be + * created using "WIA.DeviceManager" in a call to CreateObject or by dropping a DeviceManager on a form. + */ + interface DeviceManager { + /** A collection of all imaging devices connected to this computer */ + readonly DeviceInfos: DeviceInfos; + + /** + * Registers the specified EventID for the specified DeviceID. If DeviceID is "*" then OnEvent will be called whenever the event specified occurs for any + * device. Otherwise, OnEvent will only be called if the event specified occurs on the device specified. + * @param string [DeviceID='*'] + */ + RegisterEvent(EventID: string, DeviceID?: string): void; + + /** + * Registers the specified Command to launch when the specified EventID for the specified DeviceID occurs. Command can be either a ClassID or the full pat + * h name and the appropriate command-line arguments needed to invoke the application. + * @param string [DeviceID='*'] + */ + RegisterPersistentEvent(Command: string, Name: string, Description: string, Icon: string, EventID: string, DeviceID?: string): void; + + /** + * Unregisters the specified EventID for the specified DeviceID. UnregisterEvent should only be called for EventID and DeviceID for which you called Regis + * terEvent. + * @param string [DeviceID='*'] + */ + UnregisterEvent(EventID: string, DeviceID?: string): void; + + /** + * Unregisters the specified Command for the specified EventID for the specified DeviceID. UnregisterPersistentEvent should only be called for the Command + * , Name, Description, Icon, EventID and DeviceID for which you called RegisterPersistentEvent. + * @param string [DeviceID='*'] + */ + UnregisterPersistentEvent(Command: string, Name: string, Description: string, Icon: string, EventID: string, DeviceID?: string): void; + } + + /** + * The Filter object represents a unit of modification on an ImageFile. To use a Filter, add it to the Filters collection, then set the filter's propertie + * s and finally use the Apply method of the ImageProcess object to filter an ImageFile. + */ + interface Filter { + /** Returns a Description of what the filter does */ + readonly Description: string; + + /** Returns the FilterID for this Filter */ + readonly FilterID: string; + + /** Returns the Filter Name */ + readonly Name: string; + + /** A collection of all properties for this filter */ + readonly Properties: Properties; + } + + /** + * The FilterInfo object is a container that describes a Filter object without requiring a Filter to be Added to the process chain. See the FilterInfos pr + * operty on the ImageProcess object for details on accessing FilterInfo objects. + */ + interface FilterInfo { + /** Returns a technical Description of what the filter does and how to use it in a filter chain */ + readonly Description: string; + + /** Returns the FilterID for this filter */ + readonly FilterID: string; + + /** Returns the FilterInfo Name */ + readonly Name: string; + } + + /** + * The FilterInfos object is a collection of all the available FilterInfo objects. See the FilterInfos property on the ImageProcess object for detail on a + * ccessing the FilterInfos object. + */ + interface FilterInfos { + /** Returns the number of members in the collection */ + readonly Count: number; + + /** Returns the specified item in the collection either by position or name */ + Item(Index: any): FilterInfo; + } + + /** The Filters object is a collection of the Filters that will be applied to an ImageFile when you call the Apply method on the ImageProcess object. */ + interface Filters { + /** + * Appends/Inserts a new Filter of the specified FilterID into a Filter collection + * @param number [Index=0] + */ + Add(FilterID: string, Index?: number): void; + + /** Returns the number of members in the collection */ + readonly Count: number; + + /** Returns the specified item in the collection by position or FilterID */ + Item(Index: number): Filter; + + /** Removes the designated filter */ + Remove(Index: number): void; + } + + /** + * The Formats object is a collection of supported FormatIDs that you can use when calling Transfer on an Item object or ShowTransfer on a CommonDialog ob + * ject for this Item. + */ + interface Formats { + /** Returns the number of members in the collection */ + readonly Count: number; + + /** Returns the specified item in the collection by position */ + Item(Index: number): string; + } + + /** + * The ImageFile object is a container for images transferred to your computer when you call Transfer or ShowTransfer. It also supports image files throug + * h LoadFile. An ImageFile object can be created using "WIA.ImageFile" in a call to CreateObject. + */ + interface ImageFile { + /** Returns/Sets the current frame in the image */ + ActiveFrame: number; + + /** Returns the raw image bits as a Vector of Long values */ + readonly ARGBData: Vector; + + /** Returns the raw image file as a Vector of Bytes */ + readonly FileData: Vector; + + /** Returns the file extension for this image file type */ + readonly FileExtension: string; + + /** Returns the FormatID for this file type */ + readonly FormatID: string; + + /** Returns the number of frames in the image */ + readonly FrameCount: number; + + /** Returns the Height of the image in pixels */ + readonly Height: number; + + /** Returns the Horizontal pixels per inch of the image */ + readonly HorizontalResolution: number; + + /** Indicates if the pixel format has an alpha component */ + readonly IsAlphaPixelFormat: boolean; + + /** Indicates whether the image is animated */ + readonly IsAnimated: boolean; + + /** Indicates if the pixel format is extended (16 bits/channel) */ + readonly IsExtendedPixelFormat: boolean; + + /** Indicates if the pixel data is an index into a palette or the actual color data */ + readonly IsIndexedPixelFormat: boolean; + + /** Loads the ImageFile object with the specified File */ + LoadFile(Filename: string): void; + + /** Returns the depth of the pixels of the image in bits per pixel */ + readonly PixelDepth: number; + + /** A collection of all properties for this image */ + readonly Properties: Properties; + + /** Save the ImageFile object to the specified File */ + SaveFile(Filename: string): void; + + /** Returns the Vertical pixels per inch of the image */ + readonly VerticalResolution: number; + + /** Returns the Width of the image in pixels */ + readonly Width: number; + } + + /** The ImageProcess object manages the filter chain. An ImageProcess object can be created using "WIA.ImageProcess" in a call to CreateObject. */ + interface ImageProcess { + /** Takes the specified ImageFile and returns the new ImageFile with all the filters applied on success */ + Apply(Source: ImageFile): ImageFile; + + /** A collection of all available filters */ + readonly FilterInfos: FilterInfos; + + /** A collection of the filters to be applied in this process */ + readonly Filters: Filters; + } + + /** + * The Item object is a container for an item on an imaging device object. See the Items property on the Device or Item object for details on accessing It + * em objects. + */ + interface Item { + /** A collection of all commands for this item */ + readonly Commands: DeviceCommands; + + /** Issues the command specified by CommandID. CommandIDs are device dependent. Valid CommandIDs for this Item are contained in the Commands collection. */ + ExecuteCommand(CommandID: string): Item; + + /** A collection of all supported format types for this item */ + readonly Formats: Formats; + + /** Returns the ItemID for this Item */ + readonly ItemID: string; + + /** A collection of all child items for this item */ + readonly Items: Items; + + /** A collection of all properties for this item */ + readonly Properties: Properties; + + /** + * Returns an ImageFile object, in this version, in the format specified in FormatID if supported, otherwise using the preferred format for this imaging d + * evice. Future versions may return a collection of ImageFile objects. + * @param string [FormatID='{00000000-0000-0000-0000-000000000000}'] + */ + Transfer(FormatID?: string): any; + + /** Returns the underlying IWiaItem interface for this Item object */ + readonly WiaItem: any; + } + + /** The Items object contains a collection of Item objects. See the Items property on the Device or Item object for details on accessing the Items object. */ + interface Items { + /** Adds a new Item with the specified Name and Flags. The Flags value is created by using the OR operation with members of the WiaItemFlags enumeration. */ + Add(Name: string, Flags: number): void; + + /** Returns the number of members in the collection */ + readonly Count: number; + + /** Returns the specified item in the collection by position */ + Item(Index: number): Item; + + /** Removes the designated Item */ + Remove(Index: number): void; + } + + /** + * The Properties object is a collection of all the Property objects associated with a given Device, DeviceInfo, Filter, ImageFile or Item object. See the + * Properties property on any of these objects for detail on accessing the Properties object. + */ + interface Properties { + /** Returns the number of members in the collection */ + readonly Count: number; + + /** Indicates whether the specified Property exists in the collection */ + Exists(Index: any): boolean; + + /** Returns the specified item in the collection either by position or name. */ + Item(Index: any): Property; + } + + /** + * The Property object is a container for a property associated with a Device, DeviceInfo, Filter, ImageFile or Item object. See the Properties property o + * n any of these objects for details on accessing Property objects. + */ + interface Property { + /** Indicates whether the Property Value is read only */ + readonly IsReadOnly: boolean; + + /** Indicates whether the Property Value is a vector */ + readonly IsVector: boolean; + + /** Returns the Property Name */ + readonly Name: string; + + /** Returns the PropertyID of this Property */ + readonly PropertyID: number; + + /** Returns the SubType of the Property, if any */ + readonly SubType: WiaSubType; + + /** Returns the default Property Value if the SubType is not UnspecifiedSubType */ + readonly SubTypeDefault: any; + + /** Returns the maximum valid Property Value if the SubType is RangeSubType */ + readonly SubTypeMax: number; + + /** Returns the minimum valid Property Value if the SubType is RangeSubType */ + readonly SubTypeMin: number; + + /** Returns the step increment of Property Values if the SubType is RangeSubType */ + readonly SubTypeStep: number; + + /** Returns a Vector of valid Property Values if the SubType is ListSubType or valid flag Values that can be ored together if the SubType is FlagSubType */ + readonly SubTypeValues: Vector; + + /** Returns either a WiaPropertyType or a WiaImagePropertyType */ + readonly Type: number; + + /** Returns/Sets the Property Value */ + Value: any; + } + + /** + * The Rational object is a container for the rational values found in Exif tags. It is a supported element type of the Vector object and may be created u + * sing "WIA.Rational" in a call to CreateObject. + */ + interface Rational { + /** Returns/Sets the Rational Value Denominator */ + Denominator: number; + + /** Returns/Sets the Rational Value Numerator */ + Numerator: number; + + /** Returns the Rational Value as a Double */ + readonly Value: number; + } + + /** + * The Vector object is a collection of values of the same type. It is used throughout the library in many different ways. The Vector object may be create + * d using "WIA.Vector" in a call to CreateObject. + */ + interface Vector { + /** + * If Index is not zero, Inserts a new element into the Vector collection before the specified Index. If Index is zero, Appends a new element to the Vecto + * r collection. + * @param number [Index=0] + */ + Add(Value: any, Index?: number): void; + + /** Returns/Sets the Vector of Bytes as an array of bytes */ + BinaryData: any; + + /** Removes all elements. */ + Clear(): void; + + /** Returns the number of members in the vector */ + readonly Count: number; + + /** Returns/Sets the Vector of Integers from a Date */ + Date: VarDate; + + /** + * Used to get the Thumbnail property of an ImageFile which is an image file, The thumbnail property of an Item which is RGB data, or creating an ImageFil + * e from raw ARGB data. Returns an ImageFile object on success. See the Picture method for more details. + * @param number [Width=0] + * @param number [Height=0] + */ + ImageFile(Width?: number, Height?: number): ImageFile; + + /** Returns/Sets the specified item in the vector by position */ + Item(Index: number): any; + + /** + * If the Vector of Bytes contains an image file, then Width and Height are ignored. Otherwise a Vector of Bytes must be RGB data and a Vector of Longs mu + * st be ARGB data. Returns a Picture object on success. See the ImageFile method for more details. + * @param number [Width=0] + * @param number [Height=0] + */ + Picture(Width?: number, Height?: number): any; + + /** Removes the designated element and returns it if successful */ + Remove(Index: number): any; + + /** + * Stores the string Value into the Vector of Bytes including the NULL terminator. Value may be truncated unless Resizable is True. The string will be sto + * red as an ANSI string unless Unicode is True, in which case it will be stored as a Unicode string. + * @param boolean [Resizable=true] + * @param boolean [Unicode=true] + */ + SetFromString(Value: string, Resizable?: boolean, Unicode?: boolean): void; + + /** + * Returns a Vector of Bytes as a String + * @param boolean [Unicode=true] + */ + String(Unicode?: boolean): string; + } +} + +interface ActiveXObject { + on(obj: WIA.DeviceManager, event: 'OnEvent', argNames: ['EventID', 'DeviceID', 'ItemID'], handler: ( + this: WIA.DeviceManager, parameter: { + EventID: string, DeviceID: string, ItemID: string}) => void): void; + set(obj: WIA.Vector, propertyName: 'Item', parameterTypes: [number], newValue: any): void; + new(progid: 'WIA.CommonDialog'): WIA.CommonDialog; + new(progid: 'WIA.DeviceManager'): WIA.DeviceManager; + new(progid: 'WIA.ImageFile'): WIA.ImageFile; + new(progid: 'WIA.ImageProcess'): WIA.ImageProcess; + new(progid: 'WIA.Rational'): WIA.Rational; + new(progid: 'WIA.Vector'): WIA.Vector; +} + +interface EnumeratorConstructor { + new(col: WIA.DeviceCommands): WIA.DeviceCommand; + new(col: WIA.DeviceEvents): WIA.DeviceEvent; + new(col: WIA.DeviceInfos): WIA.DeviceInfo; + new(col: WIA.FilterInfos): WIA.FilterInfo; + new(col: WIA.Filters): WIA.Filter; + new(col: WIA.Formats): string; + new(col: WIA.Items): WIA.Item; + new(col: WIA.Properties): WIA.Property; + new(col: WIA.Vector): any; +} diff --git a/types/activex-wia/package.json b/types/activex-wia/package.json new file mode 100644 index 0000000000..d798f99261 --- /dev/null +++ b/types/activex-wia/package.json @@ -0,0 +1 @@ +{ "dependencies": { "activex-helpers": "*"}} \ No newline at end of file diff --git a/types/activex-wia/tsconfig.json b/types/activex-wia/tsconfig.json new file mode 100644 index 0000000000..b06917d12c --- /dev/null +++ b/types/activex-wia/tsconfig.json @@ -0,0 +1,22 @@ + +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es5", "scripthost"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strict": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "activex-wia-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-wia/tslint.json b/types/activex-wia/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/activex-wia/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/activex-windows-image-acquisition/index.d.ts b/types/activex-windows-image-acquisition/index.d.ts deleted file mode 100644 index af32d8a865..0000000000 --- a/types/activex-windows-image-acquisition/index.d.ts +++ /dev/null @@ -1,379 +0,0 @@ -// Type definitions for Microsoft Windows Image Acquisition Library v2.0 -// Project: https://msdn.microsoft.com/en-us/library/windows/desktop/ms630827(v=vs.85).aspx -// Definitions by: Zev Spitz -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace WIA { - - //Enums - type CommandID = - "'{04E725B0-ACAE-11D2-A093-00C04F72DC3C}'" //wiaCommandChangeDocument - | "'{E208C170-ACAD-11D2-A093-00C04F72DC3C}'" //wiaCommandDeleteAllItems - | "'{9B26B7B2-ACAD-11D2-A093-00C04F72DC3C}'" //wiaCommandSynchronize - | "'{AF933CAC-ACAD-11D2-A093-00C04F72DC3C}'" //wiaCommandTakePicture - | "'{1F3B3D8E-ACAE-11D2-A093-00C04F72DC3C}'"; //wiaCommandUnloadDocument - const CommandID: { - wiaCommandChangeDocument: CommandID, - wiaCommandDeleteAllItems: CommandID, - wiaCommandSynchronize: CommandID, - wiaCommandTakePicture: CommandID, - wiaCommandUnloadDocument: CommandID - }; - - type EventID = - "'{A28BBADE-64B6-11D2-A231-00C04FA31809}'" //wiaEventDeviceConnected - | "'{143E4E83-6497-11D2-A231-00C04FA31809}'" //wiaEventDeviceDisconnected - | "'{4C8F4EF5-E14F-11D2-B326-00C04F68CE61}'" //wiaEventItemCreated - | "'{1D22A559-E14F-11D2-B326-00C04F68CE61}'" //wiaEventItemDeleted - | "'{C686DCEE-54F2-419E-9A27-2FC7F2E98F9E}'" //wiaEventScanEmailImage - | "'{C00EB793-8C6E-11D2-977A-0000F87A926F}'" //wiaEventScanFaxImage - | "'{9B2B662C-6185-438C-B68B-E39EE25E71CB}'" //wiaEventScanFilmImage - | "'{A6C5A715-8C6E-11D2-977A-0000F87A926F}'" //wiaEventScanImage - | "'{FC4767C1-C8B3-48A2-9CFA-2E90CB3D3590}'" //wiaEventScanImage2 - | "'{154E27BE-B617-4653-ACC5-0FD7BD4C65CE}'" //wiaEventScanImage3 - | "'{A65B704A-7F3C-4447-A75D-8A26DFCA1FDF}'" //wiaEventScanImage4 - | "'{9D095B89-37D6-4877-AFED-62A297DC6DBE}'" //wiaEventScanOCRImage - | "'{B441F425-8C6E-11D2-977A-0000F87A926F}'"; //wiaEventScanPrintImage - const EventID: { - wiaEventDeviceConnected: EventID, - wiaEventDeviceDisconnected: EventID, - wiaEventItemCreated: EventID, - wiaEventItemDeleted: EventID, - wiaEventScanEmailImage: EventID, - wiaEventScanFaxImage: EventID, - wiaEventScanFilmImage: EventID, - wiaEventScanImage: EventID, - wiaEventScanImage2: EventID, - wiaEventScanImage3: EventID, - wiaEventScanImage4: EventID, - wiaEventScanOCRImage: EventID, - wiaEventScanPrintImage: EventID - }; - - type FormatID = - "'{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}'" //wiaFormatBMP - | "'{B96B3CB0-0728-11D3-9D7B-0000F81EF32E}'" //wiaFormatGIF - | "'{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}'" //wiaFormatJPEG - | "'{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}'" //wiaFormatPNG - | "'{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}'"; //wiaFormatTIFF - const FormatID: { - wiaFormatBMP: FormatID, - wiaFormatGIF: FormatID, - wiaFormatJPEG: FormatID, - wiaFormatPNG: FormatID, - wiaFormatTIFF: FormatID - }; - - type Miscellaneous = - "'*'" //wiaAnyDeviceID - | "'{00000000-0000-0000-0000-000000000000}'"; //wiaIDUnknown - const Miscellaneous: { - wiaAnyDeviceID: Miscellaneous, - wiaIDUnknown: Miscellaneous - }; - - const enum WiaDeviceType { - CameraDeviceType = 2, - ScannerDeviceType = 1, - UnspecifiedDeviceType = 0, - VideoDeviceType = 3 - } - - const enum WiaEventFlag { - ActionEvent = 2, - NotificationEvent = 1 - } - - const enum WiaImageBias { - MaximizeQuality = 131072, - MinimizeSize = 65536 - } - - const enum WiaImageIntent { - ColorIntent = 1, - GrayscaleIntent = 2, - TextIntent = 4, - UnspecifiedIntent = 0 - } - - const enum WiaImagePropertyType { - ByteImagePropertyType = 1001, - LongImagePropertyType = 1004, - RationalImagePropertyType = 1006, - StringImagePropertyType = 1002, - UndefinedImagePropertyType = 1000, - UnsignedIntegerImagePropertyType = 1003, - UnsignedLongImagePropertyType = 1005, - UnsignedRationalImagePropertyType = 1007, - VectorOfBytesImagePropertyType = 1101, - VectorOfLongsImagePropertyType = 1103, - VectorOfRationalsImagePropertyType = 1105, - VectorOfUndefinedImagePropertyType = 1100, - VectorOfUnsignedIntegersImagePropertyType = 1102, - VectorOfUnsignedLongsImagePropertyType = 1104, - VectorOfUnsignedRationalsImagePropertyType = 1106 - } - - const enum WiaItemFlag { - AnalyzeItemFlag = 16, - AudioItemFlag = 32, - BurstItemFlag = 2048, - DeletedItemFlag = 128, - DeviceItemFlag = 64, - DisconnectedItemFlag = 256, - FileItemFlag = 2, - FolderItemFlag = 4, - FreeItemFlag = 0, - GeneratedItemFlag = 16384, - HasAttachmentsItemFlag = 32768, - HPanoramaItemFlag = 512, - ImageItemFlag = 1, - RemovedItemFlag = -2147483648, - RootItemFlag = 8, - StorageItemFlag = 4096, - TransferItemFlag = 8192, - VideoItemFlag = 65536, - VPanoramaItemFlag = 1024 - } - - const enum WiaPropertyType { - BooleanPropertyType = 1, - BytePropertyType = 2, - ClassIDPropertyType = 15, - CurrencyPropertyType = 12, - DatePropertyType = 13, - DoublePropertyType = 11, - ErrorCodePropertyType = 7, - FileTimePropertyType = 14, - HandlePropertyType = 18, - IntegerPropertyType = 3, - LargeIntegerPropertyType = 8, - LongPropertyType = 5, - ObjectPropertyType = 17, - SinglePropertyType = 10, - StringPropertyType = 16, - UnsignedIntegerPropertyType = 4, - UnsignedLargeIntegerPropertyType = 9, - UnsignedLongPropertyType = 6, - UnsupportedPropertyType = 0, - VariantPropertyType = 19, - VectorOfBooleansPropertyType = 101, - VectorOfBytesPropertyType = 102, - VectorOfClassIDsPropertyType = 115, - VectorOfCurrenciesPropertyType = 112, - VectorOfDatesPropertyType = 113, - VectorOfDoublesPropertyType = 111, - VectorOfErrorCodesPropertyType = 107, - VectorOfFileTimesPropertyType = 114, - VectorOfIntegersPropertyType = 103, - VectorOfLargeIntegersPropertyType = 108, - VectorOfLongsPropertyType = 105, - VectorOfSinglesPropertyType = 110, - VectorOfStringsPropertyType = 116, - VectorOfUnsignedIntegersPropertyType = 104, - VectorOfUnsignedLargeIntegersPropertyType = 109, - VectorOfUnsignedLongsPropertyType = 106, - VectorOfVariantsPropertyType = 119 - } - - const enum WiaSubType { - FlagSubType = 3, - ListSubType = 2, - RangeSubType = 1, - UnspecifiedSubType = 0 - } - - //Interfaces - interface CommonDialog { - ShowAcquireImage: (DeviceType?: WiaDeviceType, Intent?: WiaImageIntent, Bias?: WiaImageBias, FormatID?: string, AlwaysSelectDevice?: boolean, UseCommonUI?: boolean, CancelError?: boolean) => ImageFile; - ShowAcquisitionWizard: (Device: Device) => any; - ShowDeviceProperties: (Device: Device, CancelError?: boolean) => void; - ShowItemProperties: (Item: Item, CancelError?: boolean) => void; - ShowPhotoPrintingWizard: (Files: any) => void; - ShowSelectDevice: (DeviceType?: WiaDeviceType, AlwaysSelectDevice?: boolean, CancelError?: boolean) => Device; - ShowSelectItems: (Device: Device, Intent?: WiaImageIntent, Bias?: WiaImageBias, SingleSelect?: boolean, UseCommonUI?: boolean, CancelError?: boolean) => Items; - ShowTransfer: (Item: Item, FormatID?: string, CancelError?: boolean) => any; - } - - interface Device { - Commands: DeviceCommands; - DeviceID: string; - Events: DeviceEvents; - ExecuteCommand: (CommandID: string) => Item; - GetItem: (ItemID: string) => Item; - Items: Items; - Properties: Properties; - Type: WiaDeviceType; - WiaItem: any /*VT_UNKNOWN*/; - } - - interface DeviceCommand { - CommandID: string; - Description: string; - Name: string; - } - - interface DeviceCommands { - Count: number; - Item: (Index: number) => DeviceCommand; - } - - interface DeviceEvent { - Description: string; - EventID: string; - Name: string; - Type: WiaEventFlag; - } - - interface DeviceEvents { - Count: number; - Item: (Index: number) => DeviceEvent; - } - - interface DeviceInfo { - Connect: () => Device; - DeviceID: string; - Properties: Properties; - Type: WiaDeviceType; - } - - interface DeviceInfos { - Count: number; - Item: (Index: any) => DeviceInfo; - } - - interface DeviceManager { - DeviceInfos: DeviceInfos; - RegisterEvent: (EventID: string, DeviceID?: string) => void; - RegisterPersistentEvent: (Command: string, Name: string, Description: string, Icon: string, EventID: string, DeviceID?: string) => void; - UnregisterEvent: (EventID: string, DeviceID?: string) => void; - UnregisterPersistentEvent: (Command: string, Name: string, Description: string, Icon: string, EventID: string, DeviceID?: string) => void; - } - - interface Filter { - Description: string; - FilterID: string; - Name: string; - Properties: Properties; - } - - interface FilterInfo { - Description: string; - FilterID: string; - Name: string; - } - - interface FilterInfos { - Count: number; - Item: (Index: any) => FilterInfo; - } - - interface Filters { - Add: (FilterID: string, Index?: number) => void; - Count: number; - Item: (Index: number) => Filter; - Remove: (Index: number) => void; - } - - interface Formats { - Count: number; - Item: (Index: number) => string; - } - - interface ImageFile { - ActiveFrame: number; - ARGBData: Vector; - FileData: Vector; - FileExtension: string; - FormatID: string; - FrameCount: number; - Height: number; - HorizontalResolution: number; - IsAlphaPixelFormat: boolean; - IsAnimated: boolean; - IsExtendedPixelFormat: boolean; - IsIndexedPixelFormat: boolean; - LoadFile: (Filename: string) => void; - PixelDepth: number; - Properties: Properties; - SaveFile: (Filename: string) => void; - VerticalResolution: number; - Width: number; - } - - interface ImageProcess { - Apply: (Source: ImageFile) => ImageFile; - FilterInfos: FilterInfos; - Filters: Filters; - } - - interface Item { - Commands: DeviceCommands; - ExecuteCommand: (CommandID: string) => Item; - Formats: Formats; - ItemID: string; - Items: Items; - Properties: Properties; - Transfer: (FormatID?: string) => any; - WiaItem: any /*VT_UNKNOWN*/; - } - - interface Items { - Add: (Name: string, Flags: number) => void; - Count: number; - Item: (Index: number) => Item; - Remove: (Index: number) => void; - } - - interface Properties { - Count: number; - Exists: (Index: any) => boolean; - Item: (Index: any) => Property; - } - - interface Property { - IsReadOnly: boolean; - IsVector: boolean; - Name: string; - PropertyID: number; - SubType: WiaSubType; - SubTypeDefault: any; - SubTypeMax: number; - SubTypeMin: number; - SubTypeStep: number; - SubTypeValues: Vector; - Type: number; - Value: any; - } - - interface Rational { - Denominator: number; - Numerator: number; - Value: number; - } - - interface Vector { - Add: (Value: any, Index?: number) => void; - BinaryData: any; - Clear: () => void; - Count: number; - Date: VarDate; - ImageFile: (Width?: number, Height?: number) => ImageFile; - Item: (Index: number) => any; //Also has setter with parameters - Picture: (Width?: number, Height?: number) => any; - Remove: (Index: number) => any; - SetFromString: (Value: string, Resizable?: boolean, Unicode?: boolean) => void; - String: (Unicode?: boolean) => string; - } - -} - -interface ActiveXObject { - new (progID: 'WIA.Rational'): WIA.Rational; - new (progID: 'WIA.Vector'): WIA.Vector; - new (progID: 'WIA.ImageFile'): WIA.ImageFile; - new (progID: 'WIA.ImageProcess'): WIA.ImageProcess; - new (progID: 'WIA.CommonDialog'): WIA.CommonDialog; - new (progID: 'WIA.DeviceManager'): WIA.DeviceManager; -} - diff --git a/types/activex-windows-image-acquisition/tsconfig.json b/types/activex-windows-image-acquisition/tsconfig.json deleted file mode 100644 index 486d95921c..0000000000 --- a/types/activex-windows-image-acquisition/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom", - "scripthost" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "activex-windows-image-acquisition-tests.ts" - ] -} \ No newline at end of file diff --git a/types/adal/index.d.ts b/types/adal/index.d.ts index 552ca468aa..2150716b17 100644 --- a/types/adal/index.d.ts +++ b/types/adal/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/AzureAD/azure-activedirectory-library-for-js // Definitions by: mmaitre314 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare var AuthenticationContext: adal.AuthenticationContextStatic; declare var Logging: adal.Logging; diff --git a/types/aframe/aframe-tests.ts b/types/aframe/aframe-tests.ts new file mode 100644 index 0000000000..439d314f4a --- /dev/null +++ b/types/aframe/aframe-tests.ts @@ -0,0 +1,50 @@ +// Global + +const threeCamera = new AFRAME.THREE.Camera(); +AFRAME.TWEEN.Easing; + +// Entity +const entity = document.createElement('a-entity'); +entity.emit('rotate'); +entity.emit('collide', { target: entity }); +entity.emit('sink', null, false); + +const position = entity.getAttribute('position'); +position.x; +position.y; +position.z; +entity.setAttribute('material', 'color', 'red'); + +entity.components['geometry'].data; + +type MyEntity = AFrame.Entity<{ + camera: THREE.Camera; + material: THREE.Material; + sound: { pause(): void }; +}>; +const camera = document.querySelector('a-entity[camera]').components.camera; +const material = document.querySelector('a-entity[material]').components.material; +document.querySelector('a-entity[sound]').components.sound.pause(); + +entity.getDOMAttribute('geometry').primitive; + +entity.setAttribute('light', { + type: 'spot', + distance: 30, + intensity: 2.0 +}); + +entity.addEventListener('child-detached', (event) => { + event.detail; +}); + +// Components +const Component = AFRAME.registerComponent('test', {}); + +// Scene + +const scene = document.querySelector('a-scene'); +scene.hasLoaded; + +// System +const system = scene.systems['systemName']; diff --git a/types/aframe/index.d.ts b/types/aframe/index.d.ts new file mode 100644 index 0000000000..f1f5cd7a20 --- /dev/null +++ b/types/aframe/index.d.ts @@ -0,0 +1,328 @@ +// Type definitions for AFRAME 0.5 +// Project: https://aframe.io/ +// Definitions by: Paul Shannon +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/** + * Extended tests available at https://github.com/devpaul/aframe-typings.git + */ + +/// +/// + +// Globals +declare var AFRAME: AFrame.AFrameGlobal; +declare var hasNativeWebVRImplementation: boolean; + +interface NodeSelector { + querySelector(selectors: 'a-scene'): AFrame.Scene; + querySelector>(selectors: string): T; + querySelectorAll(selectors: string): NodeListOf | Element>; +} + +interface Document { + createElement(tagName: string): AFrame.Entity; +} + +// Interfaces +declare namespace AFrame { + interface ObjectMap { + [ key: string ]: T; + } + + interface AFrameGlobal { + AEntity: Entity; + ANode: ANode; + AScene: Scene; + components: { [ key: string ]: ComponentDescriptor }; + geometries: { [ key: string ]: GeometryDescriptor }; + primitives: { [ key: string ]: Entity }; + registerComponent(name: string, component: ComponentDefinition): ComponentConstructor; + registerElement(name: string, element: ANode): void; + registerGeometry(name: string, geometery: THREE.Geometry): Geometry; + registerPrimitive(name: string, primitive: PrimitiveDefinition): void; + registerShader(name: string, shader: any): void; + registerSystem(name: string, definition: SystemDefinition): void; + schema: SchemaUtils; + shaders: { [ key: string ]: ShaderDescriptor }; + systems: { [key: string]: System }; + THREE: typeof THREE; + TWEEN: typeof TWEEN; + utils: Utils; + version: string; + } + + interface Animation { + attribute: string; + begin: string | number; + delay: number; + direction: 'alternate' | 'alternateReverse' | 'normal' | 'reverse'; + dur: number; + easing(): void; + end: string; + fill: 'backwards' | 'both' | 'forwards' | 'none'; + from: any; // TODO type + repeat: number | 'indefinite'; + to: number; + } + + interface ANode extends HTMLElement { + // Only public APIs added. Many methods intentionally left out. + // createdCallback + // attachedCallback + // attributeChangedCallback + closestScene(): Scene; + closest(selector: string): ANode; + // detachedCallback + hasLoaded: boolean; + load(cb?: () => void, childFilter?: (el: Element) => boolean): void; + // updateMixins + registerMixin(id: string): void; + setAttribute(type: string, newValue: any): void; + unregisterMixin(id: string): void; + removeMixinListener(id: string): void; + attachMixinListener(mixin: HTMLElement): void; + emit(name: string, detail?: any, bubbles?: boolean): void; + emitter(name: string, detail?: any, bubbles?: boolean): () => void; + } + + interface Behavior { + tick(): void; + } + + interface Component { + attrName?: string; + data?: any; + dependencies?: string[]; + el: Entity; + id: string; + multiple?: boolean; + name: string; + schema: Schema; + + init(): void; + pause(): void; + play(): void; + remove(): void; + tick?(time: number, timeDelta: number): void; + update(oldData: any): void; + updateSchema?(): void; + + extendSchema(update: Schema): void; + flushToDOM(): void; + } + + interface ComponentConstructor { + new (el: Entity, name: string, id: string): Component; + } + + interface ComponentDefinition { + dependencies?: string[]; + el?: Entity; + id?: string; + multiple?: boolean; + schema?: Schema; + + init?(): void; + pause?(): void; + play?(): void; + remove?(): void; + tick?(time: number, timeDelta: number): void; + update?(oldData: any): void; + updateSchema?(): void; + + [ key: string ]: any; + } + + interface ComponentDescriptor { + Component: Component; + dependencies: string[] | null; + multiple: boolean | null; + + // internal APIs2 + // parse + // parseAttrValueForCache + // schema + // stringify + // type + [ key: string ]: any; + } + + interface Coordinate { + x: number; + y: number; + z: number; + } + + interface Entity> extends ANode { + components: C; + isPlaying: boolean; + object3D: THREE.Object3D; + object3DMap: ObjectMap; + sceneEl?: Scene; + + addState(name: string): void; + flushToDOM(recursive?: boolean): void; + /** + * @deprecated since 0.4.0 + */ + getComputedAttribute(attr: string): T; + getDOMAttribute(attr: string): T; + getObject3D(type: string): THREE.Object3D; + getOrCreateObject3D(type: string, construct: any): THREE.Object3D; + is(stateName: string): boolean; + pause(): void; + play(): void; + setObject3D(type: string, obj: THREE.Object3D): void; + removeAttribute(attr: string, property?: string): void; + removeObject3D(type: string): void; + removeState(stateName: string): void; + + // getAttribute specific usages + getAttribute(type: string): any; + getAttribute(attr: string): T; + getAttribute(type: 'position' | 'rotation' | 'scale'): Coordinate; + + // setAttribute specific usages + setAttribute(attr: string, value: any): void; + setAttribute(attr: string, property: string, componentAttrValue?: any): void; + setAttribute(type: 'position' | 'rotation' | 'scale', value: Coordinate): void; + + // addEventListener specific usages + addEventListener(type: K, listener: (event: Event & EntityEventMap[K]) => void, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + } + + type DetailEvent = Event & { detail: D }; + + interface EntityEventMap { + 'child-attached': DetailEvent<{ el: Element | Entity }>; + 'child-detached': DetailEvent<{ el: Element | Entity }>; + 'componentchanged': DetailEvent<{ name: string }>; + 'componentremoved': DetailEvent<{ + name: string, + id: string, + newData: any, + oldData: any + }>; + 'loaded': EventListener; + 'pause': EventListener; + 'play': EventListener; + 'stateadded': DetailEvent<{ state: string }>; + 'stateremoved': DetailEvent<{ state: string }>; + 'schemachanged': DetailEvent<{ componentName: string }>; + } + + interface Geometry { + name: string; + geometry: THREE.Geometry; + schema: Schema; + update(data: object): void; + [ key: string ]: any; + } + + interface GeometryDescriptor { + Geometry: Geometry; + schema: Schema; + } + + interface MultiPropertySchema { + [ key: string ]: SinglePropertySchema; + } + + interface PrimitiveDefinition { + defaultComponents?: any; // TODO cleanup type + deprecated?: boolean; + mappings?: any; // TODO cleanup type + transforms?: any; // TODO cleanup type + } + + type PropertyTypes = 'array' | 'boolean' | 'color' | 'int' | 'number' | 'selector' | + 'selectorAll' | 'src' | 'string' | 'vec2' | 'vec3' | 'vec4'; + + type SceneEvents = 'enter-vr' | 'exit-vr' | 'loaded' | 'renderstart'; + + interface Scene extends Entity { + behaviors: Behavior[]; + camera: THREE.Camera; + canvas: HTMLCanvasElement; + effect: THREE.VREffect; + isMobile: boolean; + object3D: THREE.Scene; + renderer: THREE.WebGLRenderer; + renderStarted: boolean; + systems: ObjectMap; + time: number; + + enterVR(): Promise | void; + exitVR(): Promise | void; + reload(): void; + + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + addEventListener(type: SceneEvents, listener: EventListener, useCapture?: boolean): void; + } + + type Schema = SinglePropertySchema | MultiPropertySchema; + + interface SchemaUtils { + isSingleProperty(schema: Schema): boolean; + process(schema: Schema): boolean; + } + + interface Shader { + name: string; + schema: Schema; + } + + interface ShaderDescriptor { + Shader: Shader; + schema: Schema; + } + + interface SinglePropertySchema { + type?: PropertyTypes; + 'default'?: T; + parse?(value: string): T; + stringify?(value: T): string; + [ key: string ]: any; + } + + interface System { + data: any; + schema: Schema; + init(): void; + pause(): void; + play(): void; + tick?(): void; + } + + interface SystemDefinition { + schema?: Schema; + init?(): void; + pause?(): void; + play?(): void; + tick?(): void; + [ key: string ]: any; + } + + interface Utils { + coordinates: { + isCoordinate(value: string): boolean; + parse(value: string): Coordinate; + stringify(coord: Coordinate): string; + }; + entity: { + getComponentProperty(entity: Entity, componentName: string, delimiter?: string): any; + setComponentProperty(entity: Entity, componentName: string, value: any, delimiter?: string): void; + }; + styleParser: { + parse(value: string): object; + stringify(data: object): string; + }; + deepEqual(a: any, b: any): boolean; + diff(a: object, b: object): object; + extend(target: object, ... source: object[]): object; + extendDeep(target: object, ... source: object[]): object; + } +} diff --git a/types/aframe/tsconfig.json b/types/aframe/tsconfig.json new file mode 100755 index 0000000000..9488fe8297 --- /dev/null +++ b/types/aframe/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "baseUrl": "..", + "lib": [ + "es5", + "dom", + "es2015.iterable", + "es2015.promise" + ], + "module": "commonjs", + "noImplicitAny": true, + "noImplicitThis": true, + "removeComments": false, + "sourceMap": true, + "strictNullChecks": true, + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "typeRoots": [ "../" ], + "types": [ ] + }, + "files": [ + "index.d.ts", + "aframe-tests.ts" + ] +} diff --git a/types/react-day-picker/tslint.json b/types/aframe/tslint.json similarity index 100% rename from types/react-day-picker/tslint.json rename to types/aframe/tslint.json diff --git a/types/agenda/index.d.ts b/types/agenda/index.d.ts index e859de3188..fe8ecc45a6 100644 --- a/types/agenda/index.d.ts +++ b/types/agenda/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/rschmukler/agenda // Definitions by: Meir Gottlieb // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/alexa-sdk/alexa-sdk-tests.ts b/types/alexa-sdk/alexa-sdk-tests.ts index 8d309e9e81..cbf1ba70a3 100644 --- a/types/alexa-sdk/alexa-sdk-tests.ts +++ b/types/alexa-sdk/alexa-sdk-tests.ts @@ -1,21 +1,19 @@ -/// - import * as Alexa from "alexa-sdk"; -exports.handler = function(event: Alexa.RequestBody, context: Alexa.Context, callback: Function) { +const handler = (event: Alexa.RequestBody, context: Alexa.Context, callback: () => void) => { let alexa = Alexa.handler(event, context); alexa.registerHandlers(handlers); alexa.execute(); }; let handlers: Alexa.Handlers = { - 'LaunchRequest': function () { + 'LaunchRequest': function() { this.emit('SayHello'); }, - 'HelloWorldIntent': function () { + 'HelloWorldIntent': function() { this.emit('SayHello'); }, - 'SayHello': function () { + 'SayHello': function() { this.emit(':tell', 'Hello World!'); } }; diff --git a/types/alexa-sdk/index.d.ts b/types/alexa-sdk/index.d.ts index 9f99b14995..256d3fee9a 100644 --- a/types/alexa-sdk/index.d.ts +++ b/types/alexa-sdk/index.d.ts @@ -1,13 +1,19 @@ -// Type definitions for Alexa SDK for Node.js v1.0.3 +// Type definitions for Alexa SDK for Node.js 1.0 // Project: https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs -// Definitions by: Pete Beegle +// Definitions by: Pete Beegle +// Huw +// pascalwhoop // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 -export function handler(event: RequestBody, context: Context, callback?: Function): AlexaObject; +export function handler(event: RequestBody, context: Context, callback?: (err: any, response: any) => void ): AlexaObject; export function CreateStateHandler(state: string, obj: any): any; -export var StateString: string; +export let StateString: string; -interface AlexaObject { +export type ConfirmationStatuses = "NONE" | "DENIED" | "CONFIRMED"; +export type DialogStates = "STARTED" | "IN_PROGRESS" | "COMPLETED"; + +export interface AlexaObject extends Handler { _event: any; _context: any; _callback: any; @@ -20,11 +26,11 @@ interface AlexaObject { execute: () => void; } -interface Handlers { +export interface Handlers { [intent: string]: (this: Handler) => void; } -interface Handler { +export interface Handler { on: any; emit(event: string, ...args: any[]): boolean; emitWithState: any; @@ -35,9 +41,10 @@ interface Handler { context: any; name: any; isOverriden: any; + t: (token: string) => void; } -interface Context { +export interface Context { callbackWaitsForEmptyEventLoop: boolean; logGroupName: string; logStreamName: string; @@ -48,13 +55,13 @@ interface Context { awsRequestId: string; } -interface RequestBody { +export interface RequestBody { version: string; session: Session; request: LaunchRequest | IntentRequest | SessionEndedRequest; } -interface Session { +export interface Session { new: boolean; sessionId: string; attributes: any; @@ -62,56 +69,64 @@ interface Session { user: SessionUser; } -interface SessionApplication { +export interface SessionApplication { applicationId: string; } -interface SessionUser { +export interface SessionUser { userId: string; accessToken: string; } -interface LaunchRequest extends IRequest { } +export interface LaunchRequest extends Request { } -interface IntentRequest extends IRequest { +export interface IntentRequest extends Request { + dialogState: DialogStates; intent: Intent; } -interface Intent { +export interface SlotValue { + confirmationStatus: ConfirmationStatuses; name: string; - slots: any; + value?: any; } -interface SessionEndedRequest extends IRequest { +export interface Intent { + confirmationStatus: ConfirmationStatuses; + name: string; + slots: Record; +} + +export interface SessionEndedRequest extends Request { reason: string; } -interface IRequest { +export interface Request { type: "LaunchRequest" | "IntentRequest" | "SessionEndedRequest"; requestId: string; timeStamp: string; } -interface ResponseBody { +export interface ResponseBody { version: string; sessionAttributes?: any; response: Response; } -interface Response { +export interface Response { outputSpeech?: OutputSpeech; card?: Card; reprompt?: Reprompt; shouldEndSession: boolean; } -interface OutputSpeech { +export interface OutputSpeech { type: "PlainText" | "SSML"; text?: string; ssml?: string; } -interface Card { +export interface Card { type: "Simple" | "Standard" | "LinkAccount"; title?: string; content?: string; @@ -119,13 +134,11 @@ interface Card { image?: Image; } -interface Image { +export interface Image { smallImageUrl: string; largeImageUrl: string; } -interface Reprompt { +export interface Reprompt { outputSpeech: OutputSpeech; } - - diff --git a/types/alexa-sdk/tslint.json b/types/alexa-sdk/tslint.json new file mode 100644 index 0000000000..0c1ca3b5b4 --- /dev/null +++ b/types/alexa-sdk/tslint.json @@ -0,0 +1,9 @@ +{ "extends": "dtslint/dt.json", + "rules": { + "object-literal-shorthand": false, + "object-literal-key-quote": false, + "no-empty-interface": false, + "prefer-method-signature": false, + "object-literal-key-quotes": false + } +} diff --git a/types/alexa-voice-service/alexa-voice-service-tests.ts b/types/alexa-voice-service/alexa-voice-service-tests.ts new file mode 100644 index 0000000000..f9bac4e549 --- /dev/null +++ b/types/alexa-voice-service/alexa-voice-service-tests.ts @@ -0,0 +1,34 @@ +import * as AVS from "alexa-voice-service"; + +const options = { + debug: true, + clientId: "", + clientSecret: "", + deviceId: "", + refreshToken: "", +}; + +const avsInstance = new AVS(options); + +avsInstance.on(AVS.EventTypes.RECORD_START, () => { +}); + +avsInstance.on(AVS.EventTypes.RECORD_STOP, () => { +}); + +avsInstance.player.on(AVS.Player.EventTypes.PLAY, () => { +}); + +avsInstance.refreshToken().then((tokens) => { +}).catch((error: Error) => { +}); + +avsInstance.requestMic(); + +avsInstance.startRecording(); + +avsInstance.stopRecording().then((dataView: any) => { }); + +const dataView = new DataView(new ArrayBuffer(1)); + +avsInstance.sendAudio(dataView).then(({ xhr, response }: any) => { }); diff --git a/types/alexa-voice-service/index.d.ts b/types/alexa-voice-service/index.d.ts new file mode 100644 index 0000000000..eb639729fd --- /dev/null +++ b/types/alexa-voice-service/index.d.ts @@ -0,0 +1,60 @@ +// Type definitions for alexa-voice-service 0.0 +// Project: https://github.com/miguelmota/alexa-voice-service.js +// Definitions by: Dolan Miu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace AVS; +export = AVS; + +declare namespace AVS { + enum EventTypes { + RECORD_STOP, RECORD_START, ERROR, TOKEN_INVALID, LOG, LOGIN, LOGOUT, TOKEN_SET, REFRESH_TOKEN_SET + } + + interface AVSParams { + debug: boolean; + clientId: string; + clientSecret: string; + deviceId: string; + refreshToken: string; + } + + interface TokenResponse { + token: string; + refreshToken: string; + } + + class Player { + on(eventType: Player.EventTypes, callback?: () => void): void; + } + + namespace Player { + enum EventTypes { + LOG, ERROR, PLAY, REPLAY, PAUSE, STOP, ENQUEUE, DEQUE + } + } +} + +declare class AVS { + player: AVS.Player; + constructor(params: AVS.AVSParams); + + on(eventType: AVS.EventTypes, callback?: () => void): void; + refreshToken(): Promise; + requestMic(): Promise; + startRecording(): Promise; + stopRecording(): Promise; + sendAudio(dataView: DataView): Promise<{ + xhr: any, response: { + httpVersion: string, + statusCode: string, + statusMessage: string, + method: string, + url: string, + headers: string, + body: string, + boundary: string, + multipart: string + } + }>; +} diff --git a/types/alexa-voice-service/tsconfig.json b/types/alexa-voice-service/tsconfig.json new file mode 100644 index 0000000000..70cb9b2201 --- /dev/null +++ b/types/alexa-voice-service/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", + "alexa-voice-service-tests.ts" + ] +} \ No newline at end of file diff --git a/types/js-search/tslint.json b/types/alexa-voice-service/tslint.json similarity index 100% rename from types/js-search/tslint.json rename to types/alexa-voice-service/tslint.json diff --git a/types/algoliasearch/algoliasearch-tests.ts b/types/algoliasearch/algoliasearch-tests.ts index a3a04aadc2..43a4d677cf 100644 --- a/types/algoliasearch/algoliasearch-tests.ts +++ b/types/algoliasearch/algoliasearch-tests.ts @@ -1,41 +1,52 @@ -import algoliasearch = require('algoliasearch'); -import { ClientOptions, SynonymOption, AlgoliaUserKeyOptions, SearchSynonymOptions, +import * as algoliasearch from "algoliasearch"; +import { ClientOptions, SynonymOption, AlgoliaUserKeyOptions, SearchSynonymOptions, AlgoliaResponse, AlgoliaSecuredApiOptions, AlgoliaIndexSettings, AlgoliaQueryParameters, AlgoliaIndex } from "algoliasearch"; -var _clientOptions: ClientOptions = { - timeout : 12, +let _algoliaResponse: AlgoliaResponse = { + hits: [{}, {}], + page: 0, + nbHits: 12, + nbPages: 6, + hitsPerPage: 2, + processingTimeMS: 32, + query: "", + params: "", +}; + +let _clientOptions: ClientOptions = { + timeout: 12, protocol: "", - httpAgent: "" + httpAgent: "", }; -var _synonymOption: SynonymOption = { +let _synonymOption: SynonymOption = { forwardToSlaves: false, - replaceExistingSynonyms: false + replaceExistingSynonyms: false, }; -var _algoliaUserKeyOptions : AlgoliaUserKeyOptions = { +let _algoliaUserKeyOptions: AlgoliaUserKeyOptions = { validity: 0, maxQueriesPerIPPerHour: 0, indexes: [""], queryParameters: { attributesToRetrieve: ["algolia"] }, - description: "" + description: "", }; -var _searchSynonymOptions : SearchSynonymOptions = { +let _searchSynonymOptions: SearchSynonymOptions = { query: "", page: 0, type: "", - hitsPerPage: 0 + hitsPerPage: 0, }; -var _algoliaSecuredApiOptions: AlgoliaSecuredApiOptions = { +let _algoliaSecuredApiOptions: AlgoliaSecuredApiOptions = { filters: "", validUntil: 0, restrictIndices: "", - userToken: "" + userToken: "", }; -var _algoliaIndexSettings : AlgoliaIndexSettings = { +let _algoliaIndexSettings: AlgoliaIndexSettings = { attributesToIndex: [""], attributesforFaceting: [""], unretrievableAttributes: [""], @@ -43,12 +54,12 @@ var _algoliaIndexSettings : AlgoliaIndexSettings = { ranking: [""], customRanking: [""], slaves: [""], - maxValuesPerFacet: '', + maxValuesPerFacet: "", attributesToHighlight: [""], attributesToSnippet: [""], - highlightPreTag: '', - highlightPostTag: '', - snippetEllipsisText: '', + highlightPreTag: "", + highlightPostTag: "", + snippetEllipsisText: "", restrictHighlightAndSnippetArrays: false, hitsPerPage: 0, minWordSizefor1Typo: 0, @@ -56,16 +67,16 @@ var _algoliaIndexSettings : AlgoliaIndexSettings = { typoTolerance: false, allowTyposOnNumericTokens: false, ignorePlurals: false, - disableTypoToleranceOnAttributes: '', - separatorsToIndex: '', - queryType: '', - removeWordsIfNoResults: '', + disableTypoToleranceOnAttributes: "", + separatorsToIndex: "", + queryType: "", + removeWordsIfNoResults: "", advancedSyntax: false, optionalWords: [""], removeStopWords: [""], disablePrefixOnAttributes: [""], disableExactOnAttributes: [""], - exactOnSingleWordQuery: '', + exactOnSingleWordQuery: "", alternativesAsExact: false, attributeForDistinct: "", distinct: false, @@ -73,21 +84,21 @@ var _algoliaIndexSettings : AlgoliaIndexSettings = { allowCompressionOfIntegerArray: false, altCorrections: [{}], minProximity: 0, - placeholders: '' + placeholders: "", }; -var _algoliaQueryParameters : AlgoliaQueryParameters = { - query: '', - filters: '', +let _algoliaQueryParameters: AlgoliaQueryParameters = { + query: "", + filters: "", attributesToRetrieve: [""], restrictSearchableAttributes: [""], - facets: '', - maxValuesPerFacet: '', - attributesToHighlight: [''], - attributesToSnippet: [''], - highlightPreTag: '', - highlightPostTag: '', - snippetEllipsisText: '', + facets: "", + maxValuesPerFacet: "", + attributesToHighlight: [""], + attributesToSnippet: [""], + highlightPreTag: "", + highlightPostTag: "", + snippetEllipsisText: "", restrictHighlightAndSnippetArrays: false, hitsPerPage: 0, page: 0, @@ -98,38 +109,36 @@ var _algoliaQueryParameters : AlgoliaQueryParameters = { typoTolerance: false, allowTyposOnNumericTokens: false, ignorePlurals: false, - disableTypoToleranceOnAttributes: '', - aroundLatLng: '', - aroundLatLngViaIP: '', - aroundRadius: '', + disableTypoToleranceOnAttributes: "", + aroundLatLng: "", + aroundLatLngViaIP: "", + aroundRadius: "", aroundPrecision: 0, minimumAroundRadius: 0, - insideBoundingBox: '', - queryType: '', - insidePolygon: '', - removeWordsIfNoResults: '', + insideBoundingBox: "", + queryType: "", + insidePolygon: "", + removeWordsIfNoResults: "", advancedSyntax: false, - optionalWords: [''], - removeStopWords: [''], - disableExactOnAttributes: [''], - exactOnSingleWordQuery: '', + optionalWords: [""], + removeStopWords: [""], + disableExactOnAttributes: [""], + exactOnSingleWordQuery: "", alternativesAsExact: true, distinct: 0, getRankingInfo: false, - numericAttributesToIndex: [''], - numericFilters: [''], - tagFilters: '', - facetFilters: '', + numericAttributesToIndex: [""], + numericFilters: [""], + tagFilters: "", + facetFilters: "", analytics: false, - analyticsTags: [''], + analyticsTags: [""], synonyms: true, replaceSynonymsInHighlight: false, - minProximity: 0 + minProximity: 0, }; -var index: AlgoliaIndex = algoliasearch('', '').initIndex(''); - -var search = index.search({query: ""}); -index.search({query: ""}, function(err, res){}); - +let index: AlgoliaIndex = algoliasearch("", "").initIndex(""); +let search = index.search({query: ""}); + index.search({query: ""}, (err, res) => {}); diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index 582e91999b..2fdd00f983 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -24,7 +24,7 @@ declare namespace algoliasearch { * Number of pages * https://github.com/algolia/algoliasearch-client-js#response-format */ - nbPage: number; + nbPages: number; /** * Number of hits per pages * https://github.com/algolia/algoliasearch-client-js#response-format @@ -407,7 +407,7 @@ declare namespace algoliasearch { * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym */ - saveSynonym(synonym: AlgoliaSynonym, option: SynonymOption, cb: (err: Error, res: any) => void): void; + saveSynonym(synonym: AlgoliaSynonym, options: SynonymOption, cb: (err: Error, res: any) => void): void; /** * Save a synonym object * @param synonyms @@ -659,7 +659,7 @@ declare namespace algoliasearch { * return {Promise} * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym */ - saveSynonym(synonym: AlgoliaSynonym, option: SynonymOption): Promise ; + saveSynonym(synonym: AlgoliaSynonym, options: SynonymOption): Promise ; /** * Save a synonym object * @param synonyms diff --git a/types/alt/alt-tests.ts b/types/alt/alt-tests.ts index 8d1108ada3..3556e3a167 100644 --- a/types/alt/alt-tests.ts +++ b/types/alt/alt-tests.ts @@ -119,7 +119,7 @@ interface ExtendedTestStore extends AltJS.AltStore { split():Array; } -var testStore = alt.createStore(TestStore); +var testStore = alt.createStore(new TestStore()); function testCallback(state:AltTestState) { console.log(state); diff --git a/types/alt/index.d.ts b/types/alt/index.d.ts index f0ea3ba008..2d4c6e259f 100644 --- a/types/alt/index.d.ts +++ b/types/alt/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/goatslacker/alt // Definitions by: Michael Shearer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 /// @@ -141,7 +141,7 @@ declare module "alt/utils/chromeDebug" { declare module "alt/AltContainer" { - import React = require("react"); + import * as React from "react"; interface ContainerProps { store?:AltJS.AltStore; @@ -152,7 +152,7 @@ declare module "alt/AltContainer" { flux?:AltJS.Alt; transform?:(store:AltJS.AltStore, actions:any) => any; shouldComponentUpdate?:(props:any) => boolean; - component?:React.Component; + component?:React.Component; } type AltContainer = React.ReactElement; diff --git a/types/amazon-product-api/amazon-product-api-tests.ts b/types/amazon-product-api/amazon-product-api-tests.ts index e173d76f36..0a02153236 100644 --- a/types/amazon-product-api/amazon-product-api-tests.ts +++ b/types/amazon-product-api/amazon-product-api-tests.ts @@ -1,5 +1,5 @@ - -/// +declare var console: { log(s: string): void }; +declare var process: { env: any }; import amazon = require('amazon-product-api'); diff --git a/types/amcharts/index.d.ts b/types/amcharts/index.d.ts index bc41907d50..98fae5adeb 100644 --- a/types/amcharts/index.d.ts +++ b/types/amcharts/index.d.ts @@ -2271,6 +2271,10 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val hideBulletsCount: number; /** Name of the high field (used by candlesticks and ohlc) in your dataProvider. */ highField: string; + + /** Unique id of a graph. It is not required to set one, unless you want to use this graph for as your scrollbar's graph and need to indicate which graph should be used.*/ + id?: string; + /** Whether to include this graph when calculating min and max value of the axis. @default true */ diff --git a/types/amplify-deferred/index.d.ts b/types/amplify-deferred/index.d.ts index c6d2940930..fd738e9cbe 100644 --- a/types/amplify-deferred/index.d.ts +++ b/types/amplify-deferred/index.d.ts @@ -2,6 +2,7 @@ // Project: http://amplifyjs.com/ // Definitions by: Jonas Eriksson , Laurentiu Stamate // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/amplify/index.d.ts b/types/amplify/index.d.ts index f88c754264..2c3e2e1e5a 100644 --- a/types/amplify/index.d.ts +++ b/types/amplify/index.d.ts @@ -2,6 +2,7 @@ // Project: http://amplifyjs.com/ // Definitions by: Jonas Eriksson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/amqp/amqp-tests.ts b/types/amqp/amqp-tests.ts new file mode 100644 index 0000000000..7940f44ed4 --- /dev/null +++ b/types/amqp/amqp-tests.ts @@ -0,0 +1,69 @@ +import * as amqp from 'amqp'; + +async function connect() { + const promise = new Promise((resolve, reject) => { + const client = amqp.createConnection({ + url: 'amqp://admin:password@localhost:5672' + }); + + client.once('error', reject); + client.once('ready', resolve); + }); + + return promise; +} + +async function start() { + try { + const client = await connect(); + console.log('Connected'); + + const queue = client.queue('perth-now', + { + autoDelete: false, + durable: true, + }, q => { + console.log('Queue opened'); + console.log('Name: %s Channel: %s', q.name, q.channel); + + queue.bind('amq.fanout', '#', () => { + queue.subscribe( + { ack: true }, + (msg, _, __, ack) => { + ack.acknowledge(true); + }); + }); + }); + + const exchange = client.exchange('amq.fanout', { confirm: true }); + + exchange.once('open', () => { + exchange.publish( + 'content', + { message: new Date().toLocaleTimeString() }, + { deliveryMode: 2 }, + (err, msg) => { + if (!err) { + return; + } + throw new Error(`Failed to publish: ${msg}`); + } + ); + + exchange.publish('content', { message: 'content message' }, () => { + console.log('Published'); + }); + }); + } catch (ex) { + console.log(ex); + process.exit(1); + } +} + +async function wait(ms: number) { + return new Promise(resolve => { + setTimeout(resolve, ms); + }); +} + +start(); diff --git a/types/amqp/index.d.ts b/types/amqp/index.d.ts new file mode 100644 index 0000000000..a7dae4eb56 --- /dev/null +++ b/types/amqp/index.d.ts @@ -0,0 +1,419 @@ +// Type definitions for amqp 0.2 +// Project: https://github.com/postwait/node-amqp +// Definitions by: Carl Winkler +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as net from 'net'; +import * as events from 'events'; + +export type Callback = (value: T) => void; +export interface AMQPClient extends net.Socket { + publish(routingKey: string, body: any, options: {}, callback: (err?: boolean, msg?: string) => void): void; + + disconnect(): void; + + queue(queueName: string, callback?: Callback): AMQPQueue; + queue(queueName: string, options: QueueOptions, callback?: Callback): AMQPQueue; + + exchange(callback?: Callback): AMQPExchange; + exchange(exchangeName: string, callback?: Callback): AMQPExchange; + exchange(exchangeName: string, options: ExchangeOptions, callback?: Callback): AMQPExchange; +} + +export interface AMQPQueue extends events.EventEmitter { + subscribe(callback: SubscribeCallback): void; + subscribe(options: SubscribeOptions, callback: SubscribeCallback): void; + + unsubscribe(consumerTag: string): void; + + bind(exchangeName: string, routingKey: string, callback?: Callback): void; + bind(routingKey: string, callback?: Callback): void; + + unbind(exchangeName: string, routingKey: string): void; + unbind(routingKey: string): void; + + bind_headers(exchangeName: string, routingKey: string): void; + bind_headers(routingKey: string): void; + + unbind_headers(exchangeName: string, routingKey: string): void; + unbind_headers(routingKey: string): void; + + shift(reject: boolean): void; + shift(reject: boolean, requeue: boolean): void; + + destroy(options?: DestroyOptions): void; +} + +export interface AMQPExchange extends events.EventEmitter { + on(event: 'open' | 'ack' | 'error' | 'exchangeBindOk' | 'exchangeUnbindOk', callback: Callback): this; + + publish(routingKey: string, message: Buffer | {}, options: ExchangePublishOptions, callback?: (err?: boolean, msg?: string) => void): void; + + /** + * ifUnused default: true + * + * Deletes an exchange. + * + * If the optional boolean second argument is set, the server will only delete the exchange if it has no queue bindings. + * + * If the exchange has queue bindings the server does not delete it but raises a channel exception instead + */ + destroy(ifUnused: boolean): void; + + bind(sourceExchange: string, routingKey: string, callback?: Callback): void; + unbind(sourceExchange: string, routingKey: string, callback?: Callback): void; + bind_headers(exchange: string, routing: string, callback?: Callback): void; +} + +export function createConnection(options: ConnectionOptions): AMQPClient; + +export interface DeliveryInfo { + contentType: string; + consumerTag: string; + deliveryTag: Uint8Array; + exchange: string; + queue: string; + redelivered: boolean; + routingKey: string; +} + +export interface Ack extends DeliveryInfo { + acknowledge(all: boolean): void; + reject(requeue: boolean): void; +} + +export interface ConnectionOptions { + host?: string; + url?: string; + port?: number; + login?: string; + passowrd?: string; + connectionTimeout?: number; + authMechanism?: string; + vhost?: string; + noDelay?: boolean; + ssl?: { + enabled: boolean; + keyFile?: string; + certFile?: string; + caFile?: string; + rejectUnauthorized?: boolean; + }; + + /** Default: 'node-amqp' */ + product?: string; + + /** Default: 'node-{NODE_VERSION}' */ + platform?: string; + + /** Default: node-amqp/package.json version */ + version?: string; + + defaultExchangeName?: string; + + /** Default: true */ + reconnect?: boolean; + + /** Default: 'linear' */ + reconnectBackoffStrategy?: string; + + /** Default: 120000 */ + reconnectExponentialLimit?: number; + + /** Default: 1000 */ + reconnectBackoffTime?: number; +} + +export interface QueueOptions { + /** + * Default: false + * + * If set, the server will not create the queue. + * + * The client can use this to check whether a queue exists without modifying the server state + */ + passive?: boolean; + + /** + * Default: false + * + * Durable queues remain active when a server restarts. + * + * Non-durable queues (transient queues) are purged if/when a server restarts. + * + * Note that durable queues do not necessarily hold persistent messages, + * although it does not make sense to send persistent messages to a transient queue + */ + durable?: boolean; + + /** + * Default: false + * + * Exclusive queues may only be consumed from by the current connection. + * + * Setting the 'exclusive' flag always implies 'autoDelete' + */ + exclusive?: boolean; + + /** + * Default: true + * + * If set, the queue is deleted when all consumers have finished using it. + * + * Last consumer can be cancelled either explicitly or because its channel is closed. + * + * If there was no consumer ever on the queue, it won't be deleted + */ + autoDelete?: boolean; + + /** + * Default: false + * + * If set, the queue will not be declared, this will allow a queue to be deleted if you don't know its previous options + */ + noDeclare?: boolean; + + /** + * a map of additional arguments to pass in when creating a queue + */ + arguments?: { [arg: string]: any }; + + /** + * Default: false + * + * when true the channel will close on unsubscribe + */ + closeChannelOnUnsubscribe?: boolean; +} + +export interface ExchangeOptions { + /** + * Default: 'topic' + */ + type?: 'direct' | 'fanout' | 'topic'; + + /** + * Default: false + * + * f set, the server will not create the exchange. The client can use this to check whether an exchange exists without modifying the server state + */ + passive?: boolean; + + /** + * Default: true + * + * If set when creating a new exchange, the exchange will be marked as durable. + * + * Durable exchanges remain active when a server restarts. + * + * Non-durable exchanges (transient exchanges) are purged if/when a server restarts + */ + durable?: boolean; + + /** + * Default: true + * + * If set, the exchange is deleted when there are no longer queues bound to it + */ + autoDelete?: boolean; + + /** + * Default: false + * + * If set, the exchange will not be declared, + * this will allow the exchange to be deleted if you dont know its previous options + */ + noDeclare?: boolean; + + /** + * Default: false + * + * If set, the exchange will be in confirm mode, and you will get a 'ack'|'error' event emitted on a publish, + * or the callback on the publish will be called + */ + confirm?: boolean; + + /** + * a map of additional arguments to pass in when creating an exchange + */ + arguments?: { [arg: string]: any }; +} + +export interface SubscribeOptions { + /** + * Default: false + * + * If set to true, only one subscriber is allowed at a time + */ + exclusive?: boolean; + + /** + * Default: false + * + * Make it so that the AMQP server only delivers single messages at a time. + * When you want the next message, call queue.shift() + * + * When false, you will receive messages as fast as they are emitted + */ + ack?: boolean; + + /** + * Default: 1 + * + * Will only send you N messages before you 'ack'. + * + * Setting to zero will widen that window to 'unlimited'. If this is set, queue.shift() should not be used + */ + prefetchCount?: number; + + /** + * Default: undefined + * + * Will inject the routingKey into the payload received + */ + routingKeyInPayload?: boolean; + + /** + * Default: undefined + * + * Will inject the routingKey into the payload received + */ + deliveryKeyInPayload?: boolean; +} + +export interface DestroyOptions { + /** + * Default: false + * + * Will only destroy the queue if it has no consumers + */ + ifUnused?: boolean; + + /** + * Default: false + * + * Will ony be deleted if the queue has no messages + */ + ifEmpty?: boolean; +} + +export type SubscribeCallback = ( + message: any, + headers: { [key: string]: any }, + deliveryInfo: DeliveryInfo, + ack: Ack +) => void; + +export interface QueueCallback { + name: string; + consumerTagListeners: { [tag: string]: any }; + consumerTagOptions: { [option: string]: any }; + options: QueueOptions; + state: string; + channel: number; +} + +export interface ExchangePublishOptions { + /** + * Default: false + * + * This flag tells the server how to react if the message cannot be routed to a queue. + * + * If this flag is set, the server will return an unroutable message with a Return method. + * + * If this flag is false, the server silently drops the message + */ + mandatory?: boolean; + + /** + * Default: false + * + * This flag tells the server how to react if the message cannot be routed to a queue consumer immediately. + * + * If this flag is set, the server will return an undeliverable message with a Return method. + * + * If this flag is false, the server will queue the message, but with no guarantee that it will ever be consumed + */ + immediate?: boolean; + + /** + * Default: 'application/octet-stream' + */ + contentType?: string; + + /** + * Default: null + */ + contentEncoding?: string; + + /** + * Default: {} + * + * Arbitrary application-specific message headers + */ + headers?: any; + + /** + * 1: Non-persistent + * 2: Persistent + */ + deliveryMode?: 1 | 2; + + priority?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; + + /** + * Application correlation identifier + */ + correlationId?: string; + + /** + * Usually used to name a reply queue for a request message + */ + replyTo?: string; + + /** + * Default: null + * + * Message expiration specification -- ISO date string? + */ + expiration?: string; + + /** + * Default: null + * + * Application message identifier + */ + messageId?: string; + + /** + * Default: null + * + * Message timestamp + * + * ISO date string? + */ + timestamp?: string; + + /** + * Default: null + * + * Message type name + */ + type?: string; + + /** + * Default: null + * + * Creating user id + */ + userId?: string; + + /** + * Default: null + * + * Creating application id + */ + appId?: string; +} diff --git a/types/amqp/tsconfig.json b/types/amqp/tsconfig.json new file mode 100644 index 0000000000..2b9b4d5ce9 --- /dev/null +++ b/types/amqp/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amqp-tests.ts" + ] +} diff --git a/types/amqp/tslint.json b/types/amqp/tslint.json new file mode 100644 index 0000000000..9b00d57fef --- /dev/null +++ b/types/amqp/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": [ + "false" + ] + } +} \ No newline at end of file diff --git a/types/amqplib/callback_api.d.ts b/types/amqplib/callback_api.d.ts index 5d025bf314..d36a849873 100644 --- a/types/amqplib/callback_api.d.ts +++ b/types/amqplib/callback_api.d.ts @@ -34,7 +34,7 @@ export interface Channel extends events.EventEmitter { consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume, callback?: (err: any, ok: Replies.Consume) => void): void; cancel(consumerTag: string, callback?: (err: any, ok: Replies.Empty) => void): void; - get(queue: string, options?: Options.Get, callback?: (err: any, ok: Message | boolean) => void): void; + get(queue: string, options?: Options.Get, callback?: (err: any, ok: Message | false) => void): void; ack(message: Message, allUpTo?: boolean): void; ackAll(): void; diff --git a/types/amqplib/index.d.ts b/types/amqplib/index.d.ts index 6cd326cd67..45b5e6e3ca 100644 --- a/types/amqplib/index.d.ts +++ b/types/amqplib/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/squaremo/amqp.node // Definitions by: Michael Nahkies , Ab Reitsma , Nicolás Fantone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -42,7 +43,7 @@ export interface Channel extends events.EventEmitter { consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume): Promise; cancel(consumerTag: string): Promise; - get(queue: string, options?: Options.Get): Promise; + get(queue: string, options?: Options.Get): Promise; ack(message: Message, allUpTo?: boolean): void; ackAll(): void; diff --git a/types/angular-agility/index.d.ts b/types/angular-agility/index.d.ts index 2ff1fcf1f2..df5d2782ad 100644 --- a/types/angular-agility/index.d.ts +++ b/types/angular-agility/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/AngularAgility/AngularAgility // Definitions by: Roland Zwaga // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-animate/index.d.ts b/types/angular-animate/index.d.ts index 219fb05b01..0ce96a2f2f 100644 --- a/types/angular-animate/index.d.ts +++ b/types/angular-animate/index.d.ts @@ -2,8 +2,7 @@ // Project: http://angularjs.org // Definitions by: Michel Salib , Adi Dahiya , Raphael Schweizer , Cody Schaaf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// +// TypeScript Version: 2.1 declare var _: string; export = _; diff --git a/types/angular-block-ui/index.d.ts b/types/angular-block-ui/index.d.ts index bf311b04a1..7733bc72f7 100644 --- a/types/angular-block-ui/index.d.ts +++ b/types/angular-block-ui/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/McNull/angular-block-ui // Definitions by: Lasse Nørregaard , Stephan Classen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from "angular"; diff --git a/types/angular-bootstrap-calendar/index.d.ts b/types/angular-bootstrap-calendar/index.d.ts index a451ee9b03..1b393fa78a 100644 --- a/types/angular-bootstrap-calendar/index.d.ts +++ b/types/angular-bootstrap-calendar/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/mattlewis92/angular-bootstrap-calendar // Definitions by: Egor Komarov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as moment from 'moment'; import * as angular from 'angular'; diff --git a/types/angular-breadcrumb/index.d.ts b/types/angular-breadcrumb/index.d.ts index acc5f159f0..bdc4b57abe 100644 --- a/types/angular-breadcrumb/index.d.ts +++ b/types/angular-breadcrumb/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/ncuillery/angular-breadcrumb // Definitions by: Marc Talary // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-clipboard/index.d.ts b/types/angular-clipboard/index.d.ts index bb2d93ce49..0f59feaf56 100644 --- a/types/angular-clipboard/index.d.ts +++ b/types/angular-clipboard/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/omichelsen/angular-clipboard // Definitions by: Bradford Wagner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /** * Definition of the Clipboard Service diff --git a/types/angular-cookie/index.d.ts b/types/angular-cookie/index.d.ts index 8f03fc7c11..0bacb1e2fb 100644 --- a/types/angular-cookie/index.d.ts +++ b/types/angular-cookie/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/ivpusic/angular-cookie // Definitions by: Borislav Zhivkov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-cookies/index.d.ts b/types/angular-cookies/index.d.ts index e71d636f73..502e83a2e9 100644 --- a/types/angular-cookies/index.d.ts +++ b/types/angular-cookies/index.d.ts @@ -2,6 +2,7 @@ // Project: http://angularjs.org // Definitions by: Diego Vilar , Anthony Ciccarello // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare var _: string; export = _; @@ -87,4 +88,4 @@ declare module 'angular' { remove(key: string): void; } } -} \ No newline at end of file +} diff --git a/types/angular-deferred-bootstrap/index.d.ts b/types/angular-deferred-bootstrap/index.d.ts index c01059cf25..df489e48ee 100644 --- a/types/angular-deferred-bootstrap/index.d.ts +++ b/types/angular-deferred-bootstrap/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/philippd/angular-deferred-bootstrap // Definitions by: Markus Wagner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -17,4 +18,4 @@ declare module angular { module?: string, resolve: any } -} \ No newline at end of file +} diff --git a/types/angular-dialog-service/index.d.ts b/types/angular-dialog-service/index.d.ts index 7d667c032c..36791262c4 100644 --- a/types/angular-dialog-service/index.d.ts +++ b/types/angular-dialog-service/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/m-e-conroy/angular-dialog-service // Definitions by: William Comartin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/angular-dynamic-locale/index.d.ts b/types/angular-dynamic-locale/index.d.ts index 4ee0e6eb89..1aa14d4c3b 100644 --- a/types/angular-dynamic-locale/index.d.ts +++ b/types/angular-dynamic-locale/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/lgalfaso/angular-dynamic-locale // Definitions by: Stephen Lautier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-feature-flags/index.d.ts b/types/angular-feature-flags/index.d.ts index 06cb6f5add..2335bf0eba 100644 --- a/types/angular-feature-flags/index.d.ts +++ b/types/angular-feature-flags/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/mjt01/angular-feature-flags // Definitions by: Borislav Zhivkov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -39,4 +40,4 @@ declare module "angular" { set(flagsPromise: angular.IPromise | angular.IHttpPromise): void; } } -} \ No newline at end of file +} diff --git a/types/angular-file-saver/index.d.ts b/types/angular-file-saver/index.d.ts index 2fb846eef4..cee78df620 100644 --- a/types/angular-file-saver/index.d.ts +++ b/types/angular-file-saver/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/alferov/angular-file-saver // Definitions by: Donald Nairn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from 'angular'; declare module 'angular' { diff --git a/types/angular-formly/index.d.ts b/types/angular-formly/index.d.ts index d37228fb79..8bcab28800 100644 --- a/types/angular-formly/index.d.ts +++ b/types/angular-formly/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/formly-js/angular-formly // Definitions by: Scott Hatcher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-fullscreen/index.d.ts b/types/angular-fullscreen/index.d.ts index fb6502079a..6dd6eeaefe 100644 --- a/types/angular-fullscreen/index.d.ts +++ b/types/angular-fullscreen/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/fabiobiondi/angular-fullscreen // Definitions by: Julien Paroche // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/angular-fullscreen +// TypeScript Version: 2.3 /// diff --git a/types/angular-gettext/index.d.ts b/types/angular-gettext/index.d.ts index 224f5032e0..107d9e10e2 100644 --- a/types/angular-gettext/index.d.ts +++ b/types/angular-gettext/index.d.ts @@ -2,6 +2,7 @@ // Project: https://angular-gettext.rocketeer.be/ // Definitions by: Ákos Lukács // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-google-analytics/index.d.ts b/types/angular-google-analytics/index.d.ts index 51a2d7eb7e..065815ce8b 100644 --- a/types/angular-google-analytics/index.d.ts +++ b/types/angular-google-analytics/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/revolunet/angular-google-analytics // Definitions by: Cyril Schumacher , Thomas Fuchs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// import * as angular from 'angular'; diff --git a/types/angular-gridster/index.d.ts b/types/angular-gridster/index.d.ts index 272470bc6f..3d4fbbe799 100644 --- a/types/angular-gridster/index.d.ts +++ b/types/angular-gridster/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/ManifestWebDesign/angular-gridster // Definitions by: Joao Monteiro // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from "angular"; diff --git a/types/angular-growl-v2/index.d.ts b/types/angular-growl-v2/index.d.ts index cf4b134d02..9cab9f66f8 100644 --- a/types/angular-growl-v2/index.d.ts +++ b/types/angular-growl-v2/index.d.ts @@ -2,6 +2,7 @@ // Project: http://janstevens.github.io/angular-growl-2 // Definitions by: Tadeusz Hucal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-hotkeys/index.d.ts b/types/angular-hotkeys/index.d.ts index 4515afca67..3db766706a 100644 --- a/types/angular-hotkeys/index.d.ts +++ b/types/angular-hotkeys/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/chieffancypants/angular-hotkeys // Definitions by: Jason Zhao , Stefan Steinhart // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 //readme written by David Valentine diff --git a/types/angular-http-auth/index.d.ts b/types/angular-http-auth/index.d.ts index 803ea36ae2..c5cf28b40a 100644 --- a/types/angular-http-auth/index.d.ts +++ b/types/angular-http-auth/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/witoldsz/angular-http-auth // Definitions by: vvakame // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-httpi/index.d.ts b/types/angular-httpi/index.d.ts index 15cea5994a..126c04eeca 100644 --- a/types/angular-httpi/index.d.ts +++ b/types/angular-httpi/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/bennadel/httpi // Definitions by: Andrew Camilleri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-idle/index.d.ts b/types/angular-idle/index.d.ts index 782d3b4ec2..25880fa7c2 100644 --- a/types/angular-idle/index.d.ts +++ b/types/angular-idle/index.d.ts @@ -2,6 +2,7 @@ // Project: http://hackedbychinese.github.io/ng-idle/ // Definitions by: mthamil // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-jwt/index.d.ts b/types/angular-jwt/index.d.ts index fd58699c79..c0d9408901 100644 --- a/types/angular-jwt/index.d.ts +++ b/types/angular-jwt/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/auth0/angular-jwt // Definitions by: Reto Rezzonico // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-load/index.d.ts b/types/angular-load/index.d.ts index 8e7c22b6b6..1e4d3ddf97 100644 --- a/types/angular-load/index.d.ts +++ b/types/angular-load/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/urish/angular-load // Definitions by: david-gang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-loading-bar/index.d.ts b/types/angular-loading-bar/index.d.ts index 464974631d..1639ab115b 100644 --- a/types/angular-loading-bar/index.d.ts +++ b/types/angular-loading-bar/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/chieffancypants/angular-loading-bar // Definitions by: Stephen Lautier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-local-storage/angular-local-storage-tests.ts b/types/angular-local-storage/angular-local-storage-tests.ts index ead14e85fb..b3fdde8b9e 100644 --- a/types/angular-local-storage/angular-local-storage-tests.ts +++ b/types/angular-local-storage/angular-local-storage-tests.ts @@ -64,6 +64,7 @@ app.config(function (localStorageServiceProvider: ng.local.storage.ILocalStorage localStorageServiceProvider .setPrefix('myApp') .setStorageType('sessionStorage') + .setDefaultToCookie(false) .setNotify(true, true); }); diff --git a/types/angular-local-storage/index.d.ts b/types/angular-local-storage/index.d.ts index f403126d7a..76ab65b1b5 100644 --- a/types/angular-local-storage/index.d.ts +++ b/types/angular-local-storage/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for angular-local-storage v0.1.6 +// Type definitions for angular-local-storage v0.6.0 // Project: https://github.com/grevory/angular-local-storage -// Definitions by: Ken Fukuyama +// Definitions by: Ken Fukuyama , Davide Donadello // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -26,12 +27,18 @@ declare module 'angular' { * @param storageType localstorage or sessionStorage. default: localStorage */ setStorageType(storageType: string): ILocalStorageServiceProvider; + /** + * If localStorage is not supported, the library will default to cookies instead. This behavior can be disabled + * @param shouldDefault default: true + */ + setDefaultToCookie(shouldDefault: boolean): ILocalStorageServiceProvider; /** * Setter for cookie config * @param exp number of days before cookies expire (0 = does not expire). default: 30 * @param path the web path the cookie represents. default: '/' + * @param secure to store cookies as secure. default: false */ - setStorageCookie(exp: number, path: string): ILocalStorageServiceProvider; + setStorageCookie(exp: number, path: string, secure: boolean): ILocalStorageServiceProvider; /** * Set the cookie domain, since this runs inside a the config() block, only providers and constants can be injected. As a result, $location service can't be used here, use a hardcoded string or window.location. * No default value diff --git a/types/angular-localforage/index.d.ts b/types/angular-localforage/index.d.ts index b37b27e7ee..c9159e5e1f 100644 --- a/types/angular-localforage/index.d.ts +++ b/types/angular-localforage/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/ocombe/angular-localForage // Definitions by: Stefan Steinhart // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/angular-locker/index.d.ts b/types/angular-locker/index.d.ts index b3395b223d..0fd1d0a472 100644 --- a/types/angular-locker/index.d.ts +++ b/types/angular-locker/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/tymondesigns/angular-locker // Definitions by: Niko Kovačič // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-material/index.d.ts b/types/angular-material/index.d.ts index 93b92290e4..58e1ae5dd6 100644 --- a/types/angular-material/index.d.ts +++ b/types/angular-material/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/angular/material // Definitions by: Blake Bigelow , Peter Hajdu , Davide Donadello , Geert Jansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from 'angular'; diff --git a/types/angular-media-queries/index.d.ts b/types/angular-media-queries/index.d.ts index a1f1cc820e..49c0e7450d 100644 --- a/types/angular-media-queries/index.d.ts +++ b/types/angular-media-queries/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jacopotarantino/angular-match-media // Definitions by: Joao Monteiro // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -32,4 +33,4 @@ declare module 'angular' { when(list: Array | string, callback: (result: boolean) => void, scope?: angular.IScope): boolean; } } -} \ No newline at end of file +} diff --git a/types/angular-meteor/index.d.ts b/types/angular-meteor/index.d.ts index 29bacb2e83..c842dd2cf0 100644 --- a/types/angular-meteor/index.d.ts +++ b/types/angular-meteor/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Urigo/angular-meteor // Definitions by: Peter Grman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-mocks/index.d.ts b/types/angular-mocks/index.d.ts index 8b94fab445..14571e2eba 100644 --- a/types/angular-mocks/index.d.ts +++ b/types/angular-mocks/index.d.ts @@ -2,6 +2,7 @@ // Project: http://angularjs.org // Definitions by: Diego Vilar , Tony Curtis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/angular-modal/index.d.ts b/types/angular-modal/index.d.ts index 8e11eab613..40106e955e 100644 --- a/types/angular-modal/index.d.ts +++ b/types/angular-modal/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/btford/angular-modal // Definitions by: Paul Lessing // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/angular-notifications/index.d.ts b/types/angular-notifications/index.d.ts index 1f33a7c840..8e6a109ebc 100644 --- a/types/angular-notifications/index.d.ts +++ b/types/angular-notifications/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/DerekRies/angular-notifications // Definitions by: Tomasz Ducin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-notify/index.d.ts b/types/angular-notify/index.d.ts index 1053b41b2f..526547f838 100644 --- a/types/angular-notify/index.d.ts +++ b/types/angular-notify/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/cgross/angular-notify // Definitions by: Suwato // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-oauth2/index.d.ts b/types/angular-oauth2/index.d.ts index 23df762df1..1c5e3ac6ed 100644 --- a/types/angular-oauth2/index.d.ts +++ b/types/angular-oauth2/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/oauthjs/angular-oauth2 // Definitions by: Antério Vieira // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from 'angular'; diff --git a/types/angular-odata-resources/index.d.ts b/types/angular-odata-resources/index.d.ts index 3af2573bf8..c999de4506 100644 --- a/types/angular-odata-resources/index.d.ts +++ b/types/angular-odata-resources/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/devnixs/ODataAngularResources // Definitions by: Raphael ATALLAH // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-permission/index.d.ts b/types/angular-permission/index.d.ts index 28781cb5df..7c9d4b5500 100644 --- a/types/angular-permission/index.d.ts +++ b/types/angular-permission/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Narzerus/angular-permission // Definitions by: Voislav Mishevski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/angular-promise-tracker/index.d.ts b/types/angular-promise-tracker/index.d.ts index b8957eab3d..ec2f7fd498 100644 --- a/types/angular-promise-tracker/index.d.ts +++ b/types/angular-promise-tracker/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/ajoslin/angular-promise-tracker // Definitions by: Rufus Linke // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-q-spread/index.d.ts b/types/angular-q-spread/index.d.ts index 57f6327071..d6da2499c5 100644 --- a/types/angular-q-spread/index.d.ts +++ b/types/angular-q-spread/index.d.ts @@ -2,6 +2,7 @@ // Project: https://www.npmjs.com/package/angular-q-spread // Definitions by: rafw87 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as a from "angular"; diff --git a/types/angular-resource/index.d.ts b/types/angular-resource/index.d.ts index 8880827de2..6b33790de5 100644 --- a/types/angular-resource/index.d.ts +++ b/types/angular-resource/index.d.ts @@ -2,6 +2,7 @@ // Project: http://angularjs.org // Definitions by: Diego Vilar , Michael Jess // Definitions: https://github.com/daptiv/DefinitelyTyped +// TypeScript Version: 2.3 declare var _: string; export = _; diff --git a/types/angular-route/index.d.ts b/types/angular-route/index.d.ts index 98ba467b66..29c59f955c 100644 --- a/types/angular-route/index.d.ts +++ b/types/angular-route/index.d.ts @@ -2,6 +2,7 @@ // Project: http://angularjs.org // Definitions by: Jonathan Park // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare var _: string; export = _; @@ -154,4 +155,4 @@ declare module 'angular' { when(path: string, route: IRoute): IRouteProvider; } } -} \ No newline at end of file +} diff --git a/types/angular-sanitize/index.d.ts b/types/angular-sanitize/index.d.ts index 8e4936b4b4..89273b42fb 100644 --- a/types/angular-sanitize/index.d.ts +++ b/types/angular-sanitize/index.d.ts @@ -2,6 +2,7 @@ // Project: http://angularjs.org // Definitions by: Diego Vilar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare var _: string; export = _; @@ -46,4 +47,4 @@ declare module 'angular' { (name: 'linky'): angular.sanitize.filter.ILinky; } } -} \ No newline at end of file +} diff --git a/types/angular-scenario/index.d.ts b/types/angular-scenario/index.d.ts index c5804ffd80..ad86b62c4c 100644 --- a/types/angular-scenario/index.d.ts +++ b/types/angular-scenario/index.d.ts @@ -2,6 +2,7 @@ // Project: http://angularjs.org // Definitions by: RomanoLindano // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-scroll/index.d.ts b/types/angular-scroll/index.d.ts index 3361dd31c0..7b8e42bae5 100644 --- a/types/angular-scroll/index.d.ts +++ b/types/angular-scroll/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/oblador/angular-scroll // Definitions by: Sam Herrmann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-signalr-hub/index.d.ts b/types/angular-signalr-hub/index.d.ts index 02238f5244..780fbdff76 100644 --- a/types/angular-signalr-hub/index.d.ts +++ b/types/angular-signalr-hub/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/JustMaier/angular-signalr-hub // Definitions by: Adam Santaniello // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/angular-spinner/index.d.ts b/types/angular-spinner/index.d.ts index e7710e60e2..78d70e5efe 100644 --- a/types/angular-spinner/index.d.ts +++ b/types/angular-spinner/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/urish/angular-spinner // Definitions by: Marcin Biegała // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /** * SpinnerService diff --git a/types/angular-storage/index.d.ts b/types/angular-storage/index.d.ts index be705f20d1..8021ba2f5e 100644 --- a/types/angular-storage/index.d.ts +++ b/types/angular-storage/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/auth0/angular-storage // Definitions by: Matthew DeKrey // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-strap/index.d.ts b/types/angular-strap/index.d.ts index 3f279619dc..2b31f00148 100644 --- a/types/angular-strap/index.d.ts +++ b/types/angular-strap/index.d.ts @@ -2,6 +2,7 @@ // Project: http://mgcrea.github.io/angular-strap/ // Definitions by: Sam Herrmann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-toastr/index.d.ts b/types/angular-toastr/index.d.ts index 83c42045d1..eddccb4021 100644 --- a/types/angular-toastr/index.d.ts +++ b/types/angular-toastr/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Foxandxss/angular-toastr // Definitions by: Niko Kovačič , Troy McKinnon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-toasty/index.d.ts b/types/angular-toasty/index.d.ts index 10596c2b5f..8794b2aab9 100644 --- a/types/angular-toasty/index.d.ts +++ b/types/angular-toasty/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/invertase/angular-toasty // Definitions by: Dominik Muench // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-tooltips/angular-tooltips-tests.ts b/types/angular-tooltips/angular-tooltips-tests.ts new file mode 100644 index 0000000000..5b89ec363f --- /dev/null +++ b/types/angular-tooltips/angular-tooltips-tests.ts @@ -0,0 +1,21 @@ +import * as angular from 'angular'; +import * as angularTooltips from 'angular-tooltips'; + +angular + .module('test.angular-tooltips', [ + angularTooltips + ]) + .config((tooltipsConfProvider: angularTooltips.TooltipsConfProvider) => { + tooltipsConfProvider.configure({ + side: 'left', + showTrigger: 'click', + hideTrigger: 'click', + class: 'class', + smart: true, + closeButton: false, + size: 'small', + speed: 'slow', + tooltipTemplateUrlCache: true, + show: false + }); + }); diff --git a/types/angular-tooltips/index.d.ts b/types/angular-tooltips/index.d.ts new file mode 100644 index 0000000000..d3cf83c1ec --- /dev/null +++ b/types/angular-tooltips/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for angular-tooltips 1.2 +// Project: http://720kb.github.io/angular-tooltips +// Definitions by: Leonard Thieu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare const AngularTooltips: '720kb.tooltips'; +export = AngularTooltips; + +declare namespace AngularTooltips { + interface TooltipsConfProvider { + configure(options: TooltipsConfProviderOptions): void; + } + + interface TooltipsConfProviderOptions { + side?: 'left' | 'right' | 'top' | 'bottom' | 'top left' | 'top right' | 'bottom left' | 'bottom right'; + showTrigger?: string; + hideTrigger?: string; + class?: string; + smart?: boolean; + closeButton?: boolean; + size?: 'small' | 'medium' | 'large'; + speed?: 'slow' | 'medium' | 'fast'; + tooltipTemplateUrlCache?: boolean; + show?: boolean; + } +} diff --git a/types/angular-tooltips/tsconfig.json b/types/angular-tooltips/tsconfig.json new file mode 100644 index 0000000000..945fa84c71 --- /dev/null +++ b/types/angular-tooltips/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "angular-tooltips-tests.ts" + ] +} diff --git a/types/angular-tooltips/tslint.json b/types/angular-tooltips/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/angular-tooltips/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/angular-touchspin/index.d.ts b/types/angular-touchspin/index.d.ts index 4827cf97bb..305a033275 100644 --- a/types/angular-touchspin/index.d.ts +++ b/types/angular-touchspin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/nkovacic/angular-touchspin // Definitions by: Niko Kovačič // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -39,4 +40,4 @@ declare module "angular" { defaults(touchSpinOptions: ITouchSpinOptions): void; } } -} \ No newline at end of file +} diff --git a/types/angular-translate/index.d.ts b/types/angular-translate/index.d.ts index 3caf9dc054..55c74629a8 100644 --- a/types/angular-translate/index.d.ts +++ b/types/angular-translate/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/PascalPrecht/angular-translate // Definitions by: Michel Salib // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-ui-bootstrap/index.d.ts b/types/angular-ui-bootstrap/index.d.ts index c09d8cfbb6..7eca42520d 100644 --- a/types/angular-ui-bootstrap/index.d.ts +++ b/types/angular-ui-bootstrap/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/angular-ui/bootstrap // Definitions by: Brian Surowiec , Ryan Southgate // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-ui-notification/index.d.ts b/types/angular-ui-notification/index.d.ts index e239f6b11d..85c16ec243 100644 --- a/types/angular-ui-notification/index.d.ts +++ b/types/angular-ui-notification/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/alexcrack/angular-ui-notification // Definitions by: Kamil Rojewski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-ui-router-default/index.d.ts b/types/angular-ui-router-default/index.d.ts index 0b62245406..98bb93b51b 100644 --- a/types/angular-ui-router-default/index.d.ts +++ b/types/angular-ui-router-default/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/nonplus/angular-ui-router-default // Definitions by: Stepan Riha // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as aur from "angular-ui-router"; diff --git a/types/angular-ui-router-uib-modal/index.d.ts b/types/angular-ui-router-uib-modal/index.d.ts index 931a2cbd29..b0abfdb031 100644 --- a/types/angular-ui-router-uib-modal/index.d.ts +++ b/types/angular-ui-router-uib-modal/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/nonplus/angular-ui-router-uib-modal // Definitions by: Stepan Riha // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as auir from "angular-ui-router"; diff --git a/types/angular-ui-router/index.d.ts b/types/angular-ui-router/index.d.ts index 380b4bfed6..f0b8ffd00b 100644 --- a/types/angular-ui-router/index.d.ts +++ b/types/angular-ui-router/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/angular-ui/ui-router // Definitions by: Michel Salib , Ivan Matiishyn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from 'angular'; diff --git a/types/angular-ui-scroll/index.d.ts b/types/angular-ui-scroll/index.d.ts index b1510f1b06..92fbb3ffcc 100644 --- a/types/angular-ui-scroll/index.d.ts +++ b/types/angular-ui-scroll/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/angular-ui/ui-scroll // Definitions by: Mark Nadig // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-ui-sortable/index.d.ts b/types/angular-ui-sortable/index.d.ts index fa27cf9b49..c364246dba 100644 --- a/types/angular-ui-sortable/index.d.ts +++ b/types/angular-ui-sortable/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/angular-ui/ui-sortable // Definitions by: Thodoris Greasidis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-ui-tree/index.d.ts b/types/angular-ui-tree/index.d.ts index d40dfc93d7..0c2a215b39 100644 --- a/types/angular-ui-tree/index.d.ts +++ b/types/angular-ui-tree/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/angular-ui-tree/angular-ui-tree // Definitions by: Calvin Fernandez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular-websocket/index.d.ts b/types/angular-websocket/index.d.ts index 9c2c93ea09..b7b3f55093 100644 --- a/types/angular-websocket/index.d.ts +++ b/types/angular-websocket/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/AngularClass/angular-websocket // Definitions by: Nick Veys // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as ng from "angular"; diff --git a/types/angular-wizard/index.d.ts b/types/angular-wizard/index.d.ts index 81af2e80c7..33fa8b2b0a 100644 --- a/types/angular-wizard/index.d.ts +++ b/types/angular-wizard/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mgonto/angular-wizard // Definitions by: Marko Jurisic , Ronald Wildenberg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 import * as angular from 'angular'; diff --git a/types/angular-xeditable/index.d.ts b/types/angular-xeditable/index.d.ts index a0069f6764..7a5f99ba61 100644 --- a/types/angular-xeditable/index.d.ts +++ b/types/angular-xeditable/index.d.ts @@ -2,6 +2,7 @@ // Project: https://vitalets.github.io/angular-xeditable/ // Definitions by: Joao Monteiro // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from "angular"; diff --git a/types/angular.throttle/index.d.ts b/types/angular.throttle/index.d.ts index c82d54ae44..c5b9e1bca4 100644 --- a/types/angular.throttle/index.d.ts +++ b/types/angular.throttle/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/BaggersIO/angular.throttle // Definitions by: Stefan Steinhart // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index d01dbd25b8..20de01f71f 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -178,7 +178,7 @@ mod.controller({ mod.directive('myDirectiveA', ($rootScope: ng.IRootScopeService) => { return (scope, el, attrs) => { let foo = 'none'; - el.click(e => { + el.on('click', e => { foo = e.type; $rootScope.$apply(); }); @@ -188,8 +188,9 @@ mod.directive('myDirectiveA', ($rootScope: ng.IRootScopeService) => { mod.directive('myDirectiveB', ['$rootScope', ($rootScope: ng.IRootScopeService) => { return { link(scope, el, attrs) { - el.click(e => { - el.hide(); + el.on('click', e => { + // Doesn't exist on jqLite + // el.hide(); }); } }; @@ -337,6 +338,16 @@ namespace TestQ { let result: angular.IPromise<{a: number; b: string; }>; result = $q.all<{a: number; b: string; }>({a: promiseAny, b: promiseAny}); } + { + let result = $q.all({ num: $q.when(2), str: $q.when('test') }); + // TS should infer that num is a number and str is a string + result.then(r => (r.num * 2) + r.str.indexOf('s')); + } + { + let result = $q.all({ num: $q.when(2), str: 'test' }); + // TS should infer that num is a number and str is a string + result.then(r => (r.num * 2) + r.str.indexOf('s')); + } // $q.defer { @@ -367,8 +378,7 @@ namespace TestQ { let result: angular.IPromise; result = $q.resolve(tResult); result = $q.resolve(promiseTResult); - result = $q.resolve(Math.random() > 0.5 ? tResult : promiseTOther); - result = $q.resolve(Math.random() > 0.5 ? tResult : promiseTOther); + let result2: angular.IPromise = $q.resolve(Math.random() > 0.5 ? tResult : promiseTOther); } // $q.when @@ -378,7 +388,8 @@ namespace TestQ { } { let result: angular.IPromise; - let resultOther: angular.IPromise; + let other: angular.IPromise; + let resultOther: angular.IPromise; result = $q.when(tResult); result = $q.when(promiseTResult); @@ -388,20 +399,21 @@ namespace TestQ { result = $q.when(tValue, (result: TValue) => tResult, (any) => any, (any) => any); result = $q.when(promiseTValue, (result: TValue) => tResult); - result = resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther); - result = resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther, (any) => any); - result = resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther); - result = resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther, (any) => any); + resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther); + resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther); + resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther, (any) => any); + resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther); + resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther, (any) => any); result = $q.when(tValue, (result: TValue) => promiseTResult); result = $q.when(tValue, (result: TValue) => promiseTResult, (any) => any); result = $q.when(tValue, (result: TValue) => promiseTResult, (any) => any, (any) => any); result = $q.when(promiseTValue, (result: TValue) => promiseTResult); - result = resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther); - result = resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther, (any) => any); - result = resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther); - result = resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther, (any) => any); + resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther); + resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther, (any) => any); + resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther); + resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther, (any) => any); } } @@ -547,7 +559,7 @@ namespace TestPromise { assertPromiseType(promise.then((result) => result, (any) => any, (any) => any)); assertPromiseType(promise.then((result) => result, (any) => reject, (any) => any)); - assertPromiseType(promise.then((result) => anyOf2(reject, result))); + assertPromiseType | TResult>(promise.then((result) => anyOf2(reject, result))); assertPromiseType(promise.then((result) => anyOf3(result, tresultPromise, reject))); assertPromiseType(promise.then( (result) => anyOf3(reject, result, tresultPromise), @@ -557,7 +569,7 @@ namespace TestPromise { assertPromiseType>(promise.then((result) => tresultHttpPromise)); assertPromiseType(promise.then((result) => result, (any) => tother)); - assertPromiseType(promise.then( + assertPromiseType | angular.IPromise | TOther | angular.IPromise>(promise.then( (result) => anyOf3(reject, result, totherPromise), (reason) => anyOf3(reject, tother, tresultPromise) )); @@ -588,10 +600,10 @@ namespace TestPromise { assertPromiseType(promise.catch((err) => err)); assertPromiseType(promise.catch((err) => any)); assertPromiseType(promise.catch((err) => tresult)); - assertPromiseType(promise.catch((err) => anyOf2(tresult, reject))); + assertPromiseType>(promise.catch((err) => anyOf2(tresult, reject))); assertPromiseType(promise.catch((err) => anyOf3(tresult, tresultPromise, reject))); assertPromiseType(promise.catch((err) => tresultPromise)); - assertPromiseType>(promise.catch((err) => tresultHttpPromise)); + assertPromiseType>(promise.catch((err) => tresultHttpPromise)); assertPromiseType(promise.catch((err) => tother)); assertPromiseType(promise.catch((err) => totherPromise)); assertPromiseType>(promise.catch((err) => totherHttpPromise)); @@ -615,11 +627,13 @@ function test_angular_forEach() { } // angular.element() tests -let element = angular.element('div.myApp'); +let element = angular.element('
'); let scope: ng.IScope = element.scope(); let isolateScope: ng.IScope = element.isolateScope(); -isolateScope = element.find('div.foo').isolateScope(); +isolateScope = element.find('div').isolateScope(); isolateScope = element.children().isolateScope(); +let element2 = angular.element(element); +let elementArray = angular.element(document.querySelectorAll('div')); // $timeout signature tests namespace TestTimeout { @@ -1006,13 +1020,13 @@ angular.module('multiSlotTranscludeExample', []) }, link(scope, element, attrs, ctrl, transclude) { // without scope - transclude().appendTo(element); - transclude(clone => clone.appendTo(element)); + element.append(transclude()); + transclude(clone => element.append(clone)); // with scope - transclude(scope, clone => clone.appendTo(element)); - transclude(scope, clone => clone.appendTo(element), element, 'button'); - transclude(scope, null, element, 'list').addClass('drop-down-list').appendTo(element); + transclude(scope, clone => element.append(clone)); + transclude(scope, clone => element.append(clone), element, 'button'); + element.append(transclude(scope, null, element, 'list').addClass('drop-down-list')); } }; }); diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index c895c4f7ee..3683c1aed6 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -1,9 +1,13 @@ // Type definitions for Angular JS 1.6 // Project: http://angularjs.org -// Definitions by: Diego Vilar , Georgii Dolzhykov , Caleb St-Denis +// Definitions by: Diego Vilar +// Georgii Dolzhykov +// Caleb St-Denis +// Leonard Thieu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 -/// +/// declare var angular: angular.IAngularStatic; @@ -487,8 +491,8 @@ declare namespace angular { $eval(expression: (scope: IScope) => any, locals?: Object): any; $evalAsync(): void; - $evalAsync(expression: string): void; - $evalAsync(expression: (scope: IScope) => any): void; + $evalAsync(expression: string, locals?: Object): void; + $evalAsync(expression: (scope: IScope) => void, locals?: Object): void; // Defaults to false by the implementation checking strategy $new(isolate?: boolean, parent?: IScope): IScope; @@ -1028,8 +1032,7 @@ declare namespace angular { * * @param promises A hash of promises. */ - all(promises: { [id: string]: IPromise; }): IPromise<{ [id: string]: any; }>; - all(promises: { [id: string]: IPromise; }): IPromise; + all(promises: { [K in keyof T]: (IPromise | T[K]); }): IPromise; /** * Creates a Deferred object which represents a task which will finish in the future. */ @@ -1048,6 +1051,10 @@ declare namespace angular { * @param value Value or a promise */ resolve(value: IPromise|T): IPromise; + /** + * @deprecated Since TS 2.4, inference is stricter and no longer produces the desired type when T1 !== T2. + * To use resolve with two different types, pass a union type to the single-type-argument overload. + */ resolve(value: IPromise|T2): IPromise; /** * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted. @@ -1845,6 +1852,10 @@ declare namespace angular { * different in Angular 1 there is no direct mapping and care should be taken when upgrading. */ $postLink?(): void; + + // IController implementations frequently do not implement any of its methods. + // A string indexer indicates to TypeScript not to issue a weak type error in this case. + [s: string]: any; } /** @@ -2108,22 +2119,3 @@ declare namespace angular { (obj: Object): string; } } - -declare global { - interface JQuery { - // TODO: events, how to define? - // $destroy - - find(element: any): JQuery; - find(obj: JQuery): JQuery; - controller(name?: string): any; - injector(): ng.auto.IInjectorService; - /** It's declared generic for custom scope interfaces */ - scope(): T; - isolateScope(): T; - - inheritedData(key: string, value: any): JQuery; - inheritedData(obj: { [key: string]: any; }): JQuery; - inheritedData(key?: string): any; - } -} diff --git a/types/angular/jqlite.d.ts b/types/angular/jqlite.d.ts new file mode 100644 index 0000000000..150c50b5dd --- /dev/null +++ b/types/angular/jqlite.d.ts @@ -0,0 +1,808 @@ +// Project: http://jquery.com/ +// Definitions by: Boris Yankov +// Christian Hoffmeister +// Steve Fenton +// Diullei Gomes +// Tass Iliopoulos +// Jason Swearingen +// Sean Hill +// Guus Goossens +// Kelly Summerlin +// Basarat Ali Syed +// Nicholas Wolverson +// Derek Cicerone +// Andrew Gaspar +// Seikichi Kondo +// Benjamin Jackman +// Poul Sorensen +// Josh Strobl +// John Reilly +// Dick van den Brink +// Thomas Schulz +// Leonard Thieu +// Andre Wiggins +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// Definitions copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0480c5ec87fab41aa23047a02b27f0ea71aaf975/types/jquery/v2/index.d.ts + +interface JQuery { + /** + * Adds the specified class(es) to each of the set of matched elements. + * + * @param className One or more space-separated classes to be added to the class attribute of each matched element. + * @see {@link https://api.jquery.com/addClass/#addClass-className} + */ + addClass(className: string): JQuery; + + /** + * Insert content, specified by the parameter, after each element in the set of matched elements. + * + * @param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements. + * @param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. + * @see {@link https://api.jquery.com/after/#after-content-content} + */ + after(content1: JQuery | any[] | Element | DocumentFragment | Text | string, ...content2: any[]): JQuery; + /** + * Insert content, specified by the parameter, after each element in the set of matched elements. + * + * @param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/after/#after-function} + */ + after(func: (index: number, html: string) => string | Element | JQuery): JQuery; + + /** + * Insert content, specified by the parameter, to the end of each element in the set of matched elements. + * + * @param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. + * @param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. + * @see {@link https://api.jquery.com/append/#append-content-content} + */ + append(content1: JQuery | any[] | Element | DocumentFragment | Text | string, ...content2: any[]): JQuery; + /** + * Insert content, specified by the parameter, to the end of each element in the set of matched elements. + * + * @param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/append/#append-function} + */ + append(func: (index: number, html: string) => string | Element | JQuery): JQuery; + + /** + * Get the value of an attribute for the first element in the set of matched elements. + * + * @param attributeName The name of the attribute to get. + * @see {@link https://api.jquery.com/attr/#attr-attributeName} + */ + attr(attributeName: string): string; + /** + * Set one or more attributes for the set of matched elements. + * + * @param attributeName The name of the attribute to set. + * @param value A value to set for the attribute. If this is `null`, the attribute will be deleted. + * @see {@link https://api.jquery.com/attr/#attr-attributeName-value} + */ + attr(attributeName: string, value: string | number | null): JQuery; + /** + * Set one or more attributes for the set of matched elements. + * + * @param attributes An object of attribute-value pairs to set. + * @see {@link https://api.jquery.com/attr/#attr-attributes} + */ + attr(attributes: Object): JQuery; + + /** + * Attach a handler to an event for the elements. + * + * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/bind/#bind-eventType-eventData-handler} + */ + bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; + /** + * Attach a handler to an event for the elements. + * + * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. + * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. + * @see {@link https://api.jquery.com/bind/#bind-eventType-eventData-preventBubble} + */ + bind(eventType: string, preventBubble: boolean): JQuery; + /** + * Attach a handler to an event for the elements. + * + * @param events An object containing one or more DOM event types and functions to execute for them. + * @see {@link https://api.jquery.com/bind/#bind-events} + */ + bind(events: any): JQuery; + + /** + * Get the children of each element in the set of matched elements, optionally filtered by a selector. + * + * @see {@link https://api.jquery.com/children/} + */ + children(): JQuery; + + /** + * Create a deep copy of the set of matched elements. + * + * @param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. + * @param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false). + * @see {@link https://api.jquery.com/clone/} + */ + clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery; + + /** + * Get the children of each element in the set of matched elements, including text and comment nodes. + * @see {@link https://api.jquery.com/contents/} + */ + contents(): JQuery; + + /** + * Get the value of style properties for the first element in the set of matched elements. + * + * @param propertyName A CSS property. + * @see {@link https://api.jquery.com/css/#css-propertyName} + */ + css(propertyName: string): string; + /** + * Get the value of style properties for the first element in the set of matched elements. + * Results in an object of property-value pairs. + * + * @param propertyNames An array of one or more CSS properties. + * @see {@link https://api.jquery.com/css/#css-propertyNames} + */ + css(propertyNames: string[]): any; + /** + * Set one or more CSS properties for the set of matched elements. + * + * @param propertyName A CSS property name. + * @param value A value to set for the property. + * @see {@link https://api.jquery.com/css/#css-propertyName-value} + */ + css(propertyName: string, value: string | number): JQuery; + /** + * Set one or more CSS properties for the set of matched elements. + * + * @param propertyName A CSS property name. + * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. + * @see {@link https://api.jquery.com/css/#css-propertyName-function} + */ + css(propertyName: string, value: (index: number, value: string) => string | number): JQuery; + /** + * Set one or more CSS properties for the set of matched elements. + * + * @param properties An object of property-value pairs to set. + * @see {@link https://api.jquery.com/css/#css-properties} + */ + css(properties: JQLiteCssProperties): JQuery; + + /** + * Store arbitrary data associated with the matched elements. + * + * @param key A string naming the piece of data to set. + * @param value The new data value; it can be any JavaScript type including Array or Object. + * @see {@link https://api.jquery.com/data/#data-key-value} + */ + data(key: string, value: any): JQuery; + /** + * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. + * + * @param key Name of the data stored. + * @see {@link https://api.jquery.com/data/#data-key} + */ + data(key: string): any; + /** + * Store arbitrary data associated with the matched elements. + * + * @param obj An object of key-value pairs of data to update. + * @see {@link https://api.jquery.com/data/#data-obj} + */ + data(obj: { [key: string]: any; }): JQuery; + /** + * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. + * @see {@link https://api.jquery.com/data/#data} + */ + data(): any; + + /** + * Remove the set of matched elements from the DOM. + * + * @param selector A selector expression that filters the set of matched elements to be removed. + * @see {@link https://api.jquery.com/detach/} + */ + detach(selector?: string): JQuery; + + /** + * Remove all child nodes of the set of matched elements from the DOM. + * @see {@link https://api.jquery.com/empty/} + */ + empty(): JQuery; + + /** + * Reduce the set of matched elements to the one at the specified index. + * + * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set. + * @see {@link https://api.jquery.com/eq/} + */ + eq(index: number): JQuery; + + /** + * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. + * + * @param selector A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/find/#find-selector} + */ + find(selector: string): JQuery; + find(element: any): JQuery; + find(obj: JQuery): JQuery; + + /** + * Determine whether any of the matched elements are assigned the given class. + * + * @param className The class name to search for. + * @see {@link https://api.jquery.com/hasClass/} + */ + hasClass(className: string): boolean; + + /** + * Get the HTML contents of the first element in the set of matched elements. + * @see {@link https://api.jquery.com/html/#html} + */ + html(): string; + /** + * Set the HTML contents of each element in the set of matched elements. + * + * @param htmlString A string of HTML to set as the content of each matched element. + * @see {@link https://api.jquery.com/html/#html-htmlString} + */ + html(htmlString: string): JQuery; + /** + * Set the HTML contents of each element in the set of matched elements. + * + * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/html/#html-function} + */ + html(func: (index: number, oldhtml: string) => string): JQuery; + + /** + * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. + * + * @see {@link https://api.jquery.com/next/} + */ + next(): JQuery; + + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax). + * @see {@link https://api.jquery.com/on/#on-events-selector-data-handler} + */ + on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. + * @see {@link https://api.jquery.com/on/#on-events-selector-data-handler} + */ + on(events: string, data: any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. + * @see {@link https://api.jquery.com/on/#on-events-selector-data-handler} + */ + on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. + * @see {@link https://api.jquery.com/on/#on-events-selector-data-handler} + */ + on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). + * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see {@link https://api.jquery.com/on/#on-events-selector-data} + */ + on(events: { [key: string]: (eventObject: JQueryEventObject, ...args: any[]) => any; }, selector?: string, data?: any): JQuery; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see {@link https://api.jquery.com/on/#on-events-selector-data} + */ + on(events: { [key: string]: (eventObject: JQueryEventObject, ...args: any[]) => any; }, data?: any): JQuery; + + /** + * Remove an event handler. + * @see {@link https://api.jquery.com/off/#off} + */ + off(): JQuery; + /** + * Remove an event handler. + * + * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". + * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. + * @param handler A handler function previously attached for the event(s), or the special value false. + * @see {@link https://api.jquery.com/off/#off-events-selector-handler} + */ + off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; + /** + * Remove an event handler. + * + * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". + * @param handler A handler function previously attached for the event(s), or the special value false. Takes handler with extra args that can be attached with on(). + * @see {@link https://api.jquery.com/off/#off-events-selector-handler} + */ + off(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; + /** + * Remove an event handler. + * + * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". + * @param handler A handler function previously attached for the event(s), or the special value false. + * @see {@link https://api.jquery.com/off/#off-events-selector-handler} + */ + off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; + /** + * Remove an event handler. + * + * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s). + * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. + * @see {@link https://api.jquery.com/off/#off-events-selector} + */ + off(events: { [key: string]: any; }, selector?: string): JQuery; + + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. + * @param handler A function to execute at the time the event is triggered. + * @see {@link https://api.jquery.com/one/#one-events-data-handler} + */ + one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. + * @param data An object containing data that will be passed to the event handler. + * @param handler A function to execute at the time the event is triggered. + * @see {@link https://api.jquery.com/one/#one-events-data-handler} + */ + one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. + * @see {@link https://api.jquery.com/one/#one-events-selector-data-handler} + */ + one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. + * @see {@link https://api.jquery.com/one/#one-events-selector-data-handler} + */ + one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). + * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see {@link https://api.jquery.com/one/#one-events-selector-data} + */ + one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see {@link https://api.jquery.com/one/#one-events-selector-data} + */ + one(events: { [key: string]: any; }, data?: any): JQuery; + + /** + * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. + * + * @see {@link https://api.jquery.com/parent/} + */ + parent(): JQuery; + + /** + * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. + * + * @param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. + * @param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. + * @see {@link https://api.jquery.com/prepend/#prepend-content-content} + */ + prepend(content1: JQuery | any[] | Element | DocumentFragment | Text | string, ...content2: any[]): JQuery; + /** + * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. + * + * @param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/prepend/#prepend-function} + */ + prepend(func: (index: number, html: string) => string | Element | JQuery): JQuery; + + /** + * Get the value of a property for the first element in the set of matched elements. + * + * @param propertyName The name of the property to get. + * @see {@link https://api.jquery.com/prop/#prop-propertyName} + */ + prop(propertyName: string): any; + /** + * Set one or more properties for the set of matched elements. + * + * @param propertyName The name of the property to set. + * @param value A value to set for the property. + * @see {@link https://api.jquery.com/prop/#prop-propertyName-value} + */ + prop(propertyName: string, value: string | number | boolean): JQuery; + /** + * Set one or more properties for the set of matched elements. + * + * @param properties An object of property-value pairs to set. + * @see {@link https://api.jquery.com/prop/#prop-properties} + */ + prop(properties: Object): JQuery; + /** + * Set one or more properties for the set of matched elements. + * + * @param propertyName The name of the property to set. + * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element. + * @see {@link https://api.jquery.com/prop/#prop-propertyName-function} + */ + prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery; + + /** + * Specify a function to execute when the DOM is fully loaded. + * + * @param handler A function to execute after the DOM is ready. + * @see {@link https://api.jquery.com/ready/} + */ + ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery; + + /** + * Remove the set of matched elements from the DOM. + * + * @param selector A selector expression that filters the set of matched elements to be removed. + * @see {@link https://api.jquery.com/remove/} + */ + remove(selector?: string): JQuery; + + /** + * Remove an attribute from each element in the set of matched elements. + * + * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. + * @see {@link https://api.jquery.com/removeAttr/} + */ + removeAttr(attributeName: string): JQuery; + + /** + * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. + * + * @param className One or more space-separated classes to be removed from the class attribute of each matched element. + * @see {@link https://api.jquery.com/removeClass/#removeClass-className} + */ + removeClass(className?: string): JQuery; + + /** + * Remove a previously-stored piece of data. + * + * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete. + * @see {@link https://api.jquery.com/removeData/#removeData-name} + */ + removeData(name: string): JQuery; + /** + * Remove a previously-stored piece of data. + * + * @param list An array of strings naming the pieces of data to delete. + * @see {@link https://api.jquery.com/removeData/#removeData-list} + */ + removeData(list: string[]): JQuery; + /** + * Remove all previously-stored piece of data. + * @see {@link https://api.jquery.com/removeData/} + */ + removeData(): JQuery; + + /** + * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. + * + * @param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. + * @see {@link https://api.jquery.com/replaceWith/#replaceWith-newContent} + */ + replaceWith(newContent: JQuery | any[] | Element | Text | string): JQuery; + /** + * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. + * + * @param func A function that returns content with which to replace the set of matched elements. + * @see {@link https://api.jquery.com/replaceWith/#replaceWith-function} + */ + replaceWith(func: () => Element | JQuery): JQuery; + + /** + * Get the combined text contents of each element in the set of matched elements, including their descendants. + * @see {@link https://api.jquery.com/text/#text} + */ + text(): string; + /** + * Set the content of each element in the set of matched elements to the specified text. + * + * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation. + * @see {@link https://api.jquery.com/text/#text-text} + */ + text(text: string | number | boolean): JQuery; + /** + * Set the content of each element in the set of matched elements to the specified text. + * + * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments. + * @see {@link https://api.jquery.com/text/#text-function} + */ + text(func: (index: number, text: string) => string): JQuery; + + /** + * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. + * + * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set. + * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. + * @see {@link https://api.jquery.com/toggleClass/#toggleClass-className} + */ + toggleClass(className: string, swtch?: boolean): JQuery; + /** + * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. + * + * @param swtch A boolean value to determine whether the class should be added or removed. + * @see {@link https://api.jquery.com/toggleClass/#toggleClass-state} + */ + toggleClass(swtch?: boolean): JQuery; + + /** + * Execute all handlers attached to an element for an event. + * + * @param eventType A string containing a JavaScript event type, such as click or submit. + * @param extraParameters An array of additional parameters to pass along to the event handler. + * @see {@link https://api.jquery.com/triggerHandler/#triggerHandler-eventType-extraParameters} + */ + triggerHandler(eventType: string, ...extraParameters: any[]): Object; + /** + * Execute all handlers attached to an element for an event. + * + * @param event A jQuery.Event object. + * @param extraParameters An array of additional parameters to pass along to the event handler. + * @see {@link https://api.jquery.com/triggerHandler/#triggerHandler-event-extraParameters} + */ + triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object; + + /** + * Remove a previously-attached event handler from the elements. + * + * @param eventType A string containing a JavaScript event type, such as click or submit. + * @param handler The function that is to be no longer executed. + * @see {@link https://api.jquery.com/unbind/#unbind-eventType-handler} + */ + unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; + /** + * Remove a previously-attached event handler from the elements. + * + * @param eventType A string containing a JavaScript event type, such as click or submit. + * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ). + * @see {@link https://api.jquery.com/unbind/#unbind-eventType-false} + */ + unbind(eventType: string, fls: boolean): JQuery; + /** + * Remove a previously-attached event handler from the elements. + * + * @param evt A JavaScript event object as passed to an event handler. + * @see {@link https://api.jquery.com/unbind/#unbind-event} + */ + unbind(evt: any): JQuery; + + /** + * Get the current value of the first element in the set of matched elements. + * @see {@link https://api.jquery.com/val/#val} + */ + val(): any; + /** + * Set the value of each element in the set of matched elements. + * + * @param value A string of text, an array of strings or number corresponding to the value of each matched element to set as selected/checked. + * @see {@link https://api.jquery.com/val/#val-value} + */ + val(value: string | string[] | number): JQuery; + /** + * Set the value of each element in the set of matched elements. + * + * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. + * @see {@link https://api.jquery.com/val/#val-function} + */ + val(func: (index: number, value: string) => string): JQuery; + + /** + * Wrap an HTML structure around each element in the set of matched elements. + * + * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. + * @see {@link https://api.jquery.com/wrap/#wrap-wrappingElement} + */ + wrap(wrappingElement: JQuery | Element | string): JQuery; + /** + * Wrap an HTML structure around each element in the set of matched elements. + * + * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/wrap/#wrap-function} + */ + wrap(func: (index: number) => string | JQuery): JQuery; + + // Undocumented + length: number; + + // TODO: events, how to define? + // $destroy + + controller(name?: string): any; + injector(): ng.auto.IInjectorService; + /** It's declared generic for custom scope interfaces */ + scope(): T; + isolateScope(): T; + + inheritedData(key: string, value: any): JQuery; + inheritedData(obj: { [key: string]: any; }): JQuery; + inheritedData(key?: string): any; +} + +interface JQueryStatic { + (element: string | Element | Document | JQuery | ArrayLike): JQuery; +} + +/** + * Interface of the JQuery extension of the W3C event object + * @see {@link https://api.jquery.com/category/events/event-object/} + */ +interface BaseJQueryEventObject extends Event { + /** + * The current DOM element within the event bubbling phase. + * @see {@link https://api.jquery.com/event.currentTarget/} + */ + currentTarget: Element; + /** + * An optional object of data passed to an event method when the current executing handler is bound. + * @see {@link https://api.jquery.com/event.data/} + */ + data: any; + /** + * The element where the currently-called jQuery event handler was attached. + * @see {@link https://api.jquery.com/event.delegateTarget/} + */ + delegateTarget: Element; + /** + * Returns whether event.preventDefault() was ever called on this event object. + * @see {@link https://api.jquery.com/event.isDefaultPrevented/} + */ + isDefaultPrevented(): boolean; + /** + * Returns whether event.stopImmediatePropagation() was ever called on this event object. + * @see {@link https://api.jquery.com/event.isImmediatePropagationStopped/} + */ + isImmediatePropagationStopped(): boolean; + /** + * Returns whether event.stopPropagation() was ever called on this event object. + * @see {@link https://api.jquery.com/event.isPropagationStopped/} + */ + isPropagationStopped(): boolean; + /** + * The namespace specified when the event was triggered. + * @see {@link https://api.jquery.com/event.namespace/} + */ + namespace: string; + /** + * The browser's original Event object. + * @see {@link https://api.jquery.com/category/events/event-object/} + */ + originalEvent: Event; + /** + * If this method is called, the default action of the event will not be triggered. + * @see {@link https://api.jquery.com/event.preventDefault/} + */ + preventDefault(): any; + /** + * The other DOM element involved in the event, if any. + * @see {@link https://api.jquery.com/event.relatedTarget/} + */ + relatedTarget: Element; + /** + * The last value returned by an event handler that was triggered by this event, unless the value was undefined. + * @see {@link https://api.jquery.com/event.result/} + */ + result: any; + /** + * Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree. + * @see {@link https://api.jquery.com/event.stopImmediatePropagation/} + */ + stopImmediatePropagation(): void; + /** + * Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. + * @see {@link https://api.jquery.com/event.stopPropagation/} + */ + stopPropagation(): void; + /** + * The DOM element that initiated the event. + * @see {@link https://api.jquery.com/event.target/} + */ + target: Element; + /** + * The mouse position relative to the left edge of the document. + * @see {@link https://api.jquery.com/event.pageX/} + */ + pageX: number; + /** + * The mouse position relative to the top edge of the document. + * @see {@link https://api.jquery.com/event.pageY/} + */ + pageY: number; + /** + * For key or mouse events, this property indicates the specific key or button that was pressed. + * @see {@link https://api.jquery.com/event.which/} + */ + which: number; + /** + * Indicates whether the META key was pressed when the event fired. + * @see {@link https://api.jquery.com/event.metaKey/} + */ + metaKey: boolean; +} + +interface JQueryInputEventObject extends BaseJQueryEventObject { + altKey: boolean; + ctrlKey: boolean; + metaKey: boolean; + shiftKey: boolean; +} + +interface JQueryMouseEventObject extends JQueryInputEventObject { + button: number; + clientX: number; + clientY: number; + offsetX: number; + offsetY: number; + pageX: number; + pageY: number; + screenX: number; + screenY: number; +} + +interface JQueryKeyEventObject extends JQueryInputEventObject { + char: any; + charCode: number; + key: any; + keyCode: number; +} + +interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject { +} + +/** + * The interface used to specify the properties parameter in css() + */ +// tslint:disable-next-line:class-name +interface cssPropertySetter { + (index: number, value?: string): string | number; +} +interface JQLiteCssProperties { + [propertyName: string]: string | number | cssPropertySetter; +} diff --git a/types/angular/test/jquery3-merging-tests.ts b/types/angular/test/jquery3-merging-tests.ts new file mode 100644 index 0000000000..0dbe37f640 --- /dev/null +++ b/types/angular/test/jquery3-merging-tests.ts @@ -0,0 +1,456 @@ +import * as $ from 'jquery'; +import * as angular from 'angular'; + +function JQuery() { + function addClass() { + // $ExpectType JQuery + $('p').addClass('className'); + + // $ExpectType JQuery + $('p').addClass(function(index, currentClassName) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType string + currentClassName; + + return 'className'; + }); + } + + function attr() { + // $ExpectType JQuery + $('#greatphoto').attr('alt', 'Beijing Brush Seller'); + + // $ExpectType JQuery + $('#greatphoto').attr('width', 200); + + // $ExpectType JQuery + $('#greatphoto').attr('title', null); + + // $ExpectType JQuery + $('#greatphoto').attr('alt', function(index, attr) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType string + attr; + + return 'Beijing Brush Seller'; + }); + + // $ExpectType JQuery + $('#greatphoto').attr('width', function(index, attr) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType string + attr; + + return 200; + }); + + // $ExpectType JQuery + $('#greatphoto').attr('title', function(index, attr) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType string + attr; + }); + + // $ExpectType JQuery + $('#greatphoto').attr('title', function(index, attr) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType string + attr; + + return undefined; + }); + + // $ExpectType JQuery + $('img').attr({ + src: '/resources/hat.gif', + title: 'jQuery', + alt: 'jQuery Logo' + }); + + // $ExpectType string + $('img').attr('src'); + } + + function bind() { + // $ExpectType JQuery + $('p').bind('myEvent', 'myData', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('p').bind('myEvent', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('p').bind('myEvent', false); + + // $ExpectType JQuery + $('p').bind({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + }, + myEvent2: false + }); + + // $ExpectType JQuery + $('p').bind('myEvent', null); + + // $ExpectType JQuery + $('p').bind('myEvent', undefined); + } + + function children() { + $('p').children(); + + $('p').children('span'); + } + + function off() { + // $ExpectType JQuery + $('table').off('myEvent', 'td', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').off('myEvent', 'td', false); + + // $ExpectType JQuery + $('table').off('myEvent', 'td'); + + // $ExpectType JQuery + $('table').off('myEvent', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').off('myEvent', false); + + // $ExpectType JQuery + $('table').off('myEvent'); + + // $ExpectType JQuery + $('table').off({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }, 'td'); + + // $ExpectType JQuery + $('table').off({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }); + + // $ExpectType JQuery + $('table').off($.Event('myEvent')); + + // $ExpectType JQuery + $('table').off(); + } + + function on() { + // $ExpectType JQuery + $('table').on('myEvent', 'td', 'myData', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', null, 'myData', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', 'td', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', 'td', false); + + // $ExpectType JQuery + $('table').on('myEvent', 3, function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', false); + + // $ExpectType JQuery + $('table').on({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }, 'td', 'myData'); + + // $ExpectType JQuery + $('table').on({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }, null, 'myData'); + + // $ExpectType JQuery + $('table').on({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }, 'td'); + + // $ExpectType JQuery + $('table').on({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }, 3); + + // $ExpectType JQuery + $('table').on({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }); + } + + function one() { + // $ExpectType JQuery + $('table').one('myEvent', 'td', 'myData', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').one('myEvent', null, 'myData', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').one('myEvent', 'td', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').one('myEvent', 'td', false); + + // $ExpectType JQuery + $('table').one('myEvent', 3, function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').one('myEvent', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }); + + // $ExpectType JQuery + $('table').one('myEvent', false); + + // $ExpectType JQuery + $('table').one({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }, 'td', 'myData'); + + // $ExpectType JQuery + $('table').one({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }, null, 'myData'); + + // $ExpectType JQuery + $('table').one({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }, 'td'); + + // $ExpectType JQuery + $('table').one({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }, 3); + + // $ExpectType JQuery + $('table').one({ + myEvent1(event) { + // $ExpectType HTMLElement + this; + // $ExpectType Event + event; + }, + myEvent2: false + }); + } + + function removeClass() { + // $ExpectType JQuery + $('p').removeClass('className'); + + // $ExpectType JQuery + $('p').removeClass(function(index, currentClassName) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType string + currentClassName; + + return 'className'; + }); + + // $ExpectType JQuery + $('p').removeClass(); + } + + function toggleClass() { + // $ExpectType JQuery + $('p').toggleClass('className', true); + + // $ExpectType JQuery + $('p').toggleClass(function(index, className, state) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType string + className; + // $ExpectType true + state; + + return 'className'; + }, true); + + // $ExpectType JQuery + $('p').toggleClass('className'); + + // $ExpectType JQuery + $('p').toggleClass(function(index, className, state) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType string + className; + // $ExpectType boolean + state; + + return 'className'; + }); + + // $ExpectType JQuery + $('p').toggleClass(false); + + // $ExpectType JQuery + $('p').toggleClass(); + } +} diff --git a/types/angular/tsconfig.json b/types/angular/tsconfig.json index 860cc82f22..33c9531cab 100644 --- a/types/angular/tsconfig.json +++ b/types/angular/tsconfig.json @@ -1,13 +1,16 @@ { "files": [ "index.d.ts", - "angular-tests.ts" + "jqlite.d.ts", + "angular-tests.ts", + "test/jquery3-merging-tests.ts" ], "compilerOptions": { "module": "commonjs", "lib": [ - "es6", - "dom" + "es5", + "dom", + "es2015.iterable" ], "noImplicitAny": false, "noImplicitThis": false, @@ -20,4 +23,4 @@ "noEmit": true, "forceConsistentCasingInFileNames": true } -} \ No newline at end of file +} diff --git a/types/angularfire/index.d.ts b/types/angularfire/index.d.ts index 5b86018eac..e27cbf5721 100644 --- a/types/angularfire/index.d.ts +++ b/types/angularfire/index.d.ts @@ -2,6 +2,7 @@ // Project: http://angularfire.com // Definitions by: Dénes Harmath // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/angularlocalstorage/angularlocalstorage-tests.ts b/types/angularlocalstorage/angularlocalstorage-tests.ts index f62b38c897..22d71f8b5d 100644 --- a/types/angularlocalstorage/angularlocalstorage-tests.ts +++ b/types/angularlocalstorage/angularlocalstorage-tests.ts @@ -15,6 +15,8 @@ class TestController { storage.clearAll(); } + $onInit() { + } } var app = angular.module('angularLocalStorageTests', ['angularLocalStorage']); diff --git a/types/angularlocalstorage/index.d.ts b/types/angularlocalstorage/index.d.ts index 34293b218b..67b84b925e 100644 --- a/types/angularlocalstorage/index.d.ts +++ b/types/angularlocalstorage/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/agrublev/angularLocalStorage // Definitions by: Horiuchi_H // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/angulartics/index.d.ts b/types/angulartics/index.d.ts index c7bc860ebd..0d9ba1f17f 100644 --- a/types/angulartics/index.d.ts +++ b/types/angulartics/index.d.ts @@ -2,6 +2,7 @@ // Project: http://luisfarzati.github.io/angulartics/ // Definitions by: Steven Fan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from 'angular'; diff --git a/types/anydb-sql-migrations/index.d.ts b/types/anydb-sql-migrations/index.d.ts index 5db740c70f..ae922c37ae 100644 --- a/types/anydb-sql-migrations/index.d.ts +++ b/types/anydb-sql-migrations/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/spion/anydb-sql-migrations // Definitions by: Gorgi Kosev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import Promise = require('bluebird'); import { Column, Table, Transaction, AnydbSql } from 'anydb-sql'; diff --git a/types/aphrodite/aphrodite-tests.tsx b/types/aphrodite/aphrodite-tests.tsx index f3c51f899e..685a9a4283 100644 --- a/types/aphrodite/aphrodite-tests.tsx +++ b/types/aphrodite/aphrodite-tests.tsx @@ -39,7 +39,7 @@ const withFont = StyleSheet.create({ }); -class App extends React.Component<{}, {}> { +class App extends React.Component { render() { return
diff --git a/types/aphrodite/index.d.ts b/types/aphrodite/index.d.ts index 63eba46927..0e04b07af7 100644 --- a/types/aphrodite/index.d.ts +++ b/types/aphrodite/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Khan/aphrodite // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 import * as React from "react"; diff --git a/types/applicationinsights-js/applicationinsights-js-tests.ts b/types/applicationinsights-js/applicationinsights-js-tests.ts index 1a4d585795..ecefb6d41a 100644 --- a/types/applicationinsights-js/applicationinsights-js-tests.ts +++ b/types/applicationinsights-js/applicationinsights-js-tests.ts @@ -44,7 +44,7 @@ appInsights = { trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number) { return null; }, trackException(exception: Error, handledAt?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, severityLevel?: AI.SeverityLevel) { return null; }, trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { [name: string]: string; }) { return null; }, - trackTrace(message: string, properties?: { [name: string]: string; }) { return null; }, + trackTrace(message: string, properties?: { [name: string]: string; }, severityLevel?: AI.SeverityLevel) { return null; }, flush() { return null; }, setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string) { return null; }, clearAuthenticatedUserContext() { return null; }, @@ -77,6 +77,7 @@ appInsights.trackException(new Error("sample error"), "handledAt", null, null); // trackTrace appInsights.trackTrace("message"); appInsights.trackTrace("message", null); +appInsights.trackTrace("message", { a: '1', b: '2' }, AI.SeverityLevel.Error); // trackDependency appInsights.trackDependency("id", "POST", "http://example.com/test/abc", "/test/abc", null, true, null); @@ -117,7 +118,18 @@ const envelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(dat context.track(envelope); -context.addTelemetryInitializer(telemetryEnvelope => false); +context.addTelemetryInitializer(envelope => false); +context.addTelemetryInitializer(envelope => { }); + +// a sample from: https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#example +context.addTelemetryInitializer(envelope => { + let telemetryItem = envelope.data.baseData; + if (envelope.name === Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType) { + telemetryItem.url = "URL CENSORED"; + } + telemetryItem.properties = telemetryItem.properties || {}; + telemetryItem.properties["globalProperty"] = "boo"; +}); // track event const eventObj = new Microsoft.ApplicationInsights.Telemetry.Event("test", null, null); diff --git a/types/applicationinsights-js/index.d.ts b/types/applicationinsights-js/index.d.ts index cce53f5823..17137d67dd 100644 --- a/types/applicationinsights-js/index.d.ts +++ b/types/applicationinsights-js/index.d.ts @@ -572,6 +572,7 @@ declare module Microsoft.ApplicationInsights { isPerfAnalyzerEnabled?: boolean; url?: string; isStorageUseDisabled?: boolean; + isBeaconApiDisabled?: boolean; } /** @@ -611,6 +612,7 @@ declare module Microsoft.ApplicationInsights { tags: { [name: string]: any; }; + data: any; } interface ITelemetryContext { @@ -650,7 +652,7 @@ declare module Microsoft.ApplicationInsights { * Adds telemetry initializer to the collection. Telemetry initializers will be called one by one * before telemetry item is pushed for sending and in the order they were added. */ - addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean): any; + addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean | void): any; /** * Tracks telemetry object. */ @@ -763,7 +765,7 @@ declare module Microsoft.ApplicationInsights { * @param message A message string * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty. */ - trackTrace(message: string, properties?: { [name: string]: string }): any; + trackTrace(message: string, properties?: { [name: string]: string }, severityLevel?: AI.SeverityLevel): any; /** * Immediately send all queued telemetry. */ diff --git a/types/arcgis-js-api/arcgis-js-api-tests.ts b/types/arcgis-js-api/arcgis-js-api-tests.ts index d5dfb99406..d2b961df66 100644 --- a/types/arcgis-js-api/arcgis-js-api-tests.ts +++ b/types/arcgis-js-api/arcgis-js-api-tests.ts @@ -15,7 +15,7 @@ class MapController { }); this.map = new Map({ - basemap: "topo" + basemap: { title: "topo" } }); let view = new MapView({ diff --git a/types/arcgis-js-api/index.d.ts b/types/arcgis-js-api/index.d.ts index d46dea1b81..115d270add 100644 --- a/types/arcgis-js-api/index.d.ts +++ b/types/arcgis-js-api/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ArcGIS API for JavaScript 4.3 +// Type definitions for ArcGIS API for JavaScript 4.4 // Project: http://js.arcgis.com // Definitions by: Esri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -51,179 +51,1349 @@ declare namespace __esri { protected _set(propertyName: string, value: T): this; } - export interface Text { - type: string; - text: string; + export interface PromisedWatchHandle extends IPromise { + remove(): void; + } + export type ItemCallback = (item: any, index: number) => void; + + export type ItemCompareCallback = (firstItem: any, secondItem: any) => number; + + export type ItemMapCallback = (item: any, index: number) => any; + + export type ItemReduceCallback = (previousValue: any, currentValue: any, index: number) => any; + + export type ItemTestCallback = (item: any, index: number) => boolean; + + export interface PortalItemFetchRelatedItemsParams { + relationshipType: string; + direction?: string; } - export interface Media { - type: string; - mediaInfos: any[]; + export interface PortalItemUpdateParams { + data: string | any; } - export interface Fields { - type: string; - fieldInfos: any[]; + export interface PortalUserAddItemParams { + item: PortalItem; + data?: string | any; + folder?: PortalFolder; } - export interface Attachments { + export interface PortalUserFetchItemsParams { + folder: PortalFolder; + num: number; + start: number; + } + + export interface PortalFeaturedGroups { + owner: string; + title: string; + } + + export interface GroundQueryElevationOptions { + returnSampleInfo?: boolean; + noDataValue?: number; + } + + export interface PopupTemplateExpressionInfos { + name: string; + title?: string; + expression: string; + returnType?: string; + } + + export interface PopupTemplateFieldInfos { + fieldName: string; + format?: PopupTemplateFieldInfosFormat; + isEditable?: boolean; + label?: string; + stringFieldOption?: string; + tooltip?: string; + visible?: boolean; + } + + export interface PopupTemplateFieldInfosFormat { + dateFormat?: string; + digitSeparator?: boolean; + places?: number; + } + + export interface FeatureLayerApplyEditsEdits { + addFeatures?: Graphic[]; + updateFeatures?: Graphic[]; + deleteFeatures?: Graphic[] | any[]; + } + + export interface FeatureLayerCapabilities { + data: FeatureLayerCapabilitiesData; + editing: FeatureLayerCapabilitiesEditing; + operations: FeatureLayerCapabilitiesOperations; + query: FeatureLayerCapabilitiesQuery; + queryRelated: FeatureLayerCapabilitiesQueryRelated; + } + + export interface FeatureLayerCapabilitiesData { + supportsAttachment: boolean; + supportsM: boolean; + supportsZ: boolean; + } + + export interface FeatureLayerCapabilitiesEditing { + supportsDeleteByAnonymous: boolean; + supportsDeleteByOthers: boolean; + supportsGeometryUpdate: boolean; + supportsGlobalId: boolean; + supportsRollbackOnFailure: boolean; + supportsUpdateByAnonymous: boolean; + supportsUpdateByOthers: boolean; + supportsUpdateWithoutM: boolean; + supportsUploadWithItemId: boolean; + } + + export interface FeatureLayerCapabilitiesOperations { + supportsAdd: boolean; + supportsDelete: boolean; + supportsUpdate: boolean; + supportsEditing: boolean; + supportsCalculate: boolean; + supportsQuery: boolean; + supportsValidateSql: boolean; + } + + export interface FeatureLayerCapabilitiesQuery { + supportsCentroid: boolean; + supportsDistance: boolean; + supportsDistinct: boolean; + supportsExtent: boolean; + supportsGeometryProperties: boolean; + supportsOrderBy: boolean; + supportsPagination: boolean; + supportsQuantization: boolean; + supportsResultType: boolean; + supportsSqlExpression: boolean; + supportsStandardizedQueriesOnly: boolean; + supportsStatistics: boolean; + } + + export interface FeatureLayerCapabilitiesQueryRelated { + supportsCount: boolean; + supportsOrderBy: boolean; + supportsPagination: boolean; + } + + export interface FeatureLayerElevationInfo { + mode: string; + offset?: number; + } + + export interface FeatureLayerFeatureReduction { type: string; } + export interface FeatureLayerGetFieldDomainOptions { + feature: Graphic; + } + + export interface FeatureLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type FeatureLayerLayerviewCreateEventHandler = (event: FeatureLayerLayerviewCreateEvent) => void; + + export interface FeatureLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type FeatureLayerLayerviewDestroyEventHandler = (event: FeatureLayerLayerviewDestroyEvent) => void; + + export interface GraphicsLayerElevationInfo { + mode: string; + offset?: number; + } + + export interface GraphicsLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type GraphicsLayerLayerviewCreateEventHandler = (event: GraphicsLayerLayerviewCreateEvent) => void; + + export interface GraphicsLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type GraphicsLayerLayerviewDestroyEventHandler = (event: GraphicsLayerLayerviewDestroyEvent) => void; + + export interface LayerFromArcGISServerUrlParams { + url: string; + properties?: any; + } + + export interface LayerFromPortalItemParams { + portalItem: PortalItem; + } + + export interface FeatureTemplateThumbnail { + contentType: any; + imageData: string; + height: number; + width: number; + } + + export interface LabelClassLabelExpressionInfo { + value?: string; + } + + export interface LabelSymbol3DVerticalOffsetProperties { + screenLength?: number; + minWorldLength?: number; + maxWorldLength?: number; + } + export interface LabelSymbol3DVerticalOffset extends Accessor { + screenLength: number; + minWorldLength?: number; + maxWorldLength?: number; + } + + export interface QueryQuantizationParameters { + extent?: Extent; + mode?: string; + originPosition?: string; + tolerance?: number; + } + + export interface ViewPadding { + left?: number; + top?: number; + right?: number; + bottom?: number; + } + + export interface WebMapSourceVersion { + major: number; + minor: number; + } + + export interface WebSceneSaveAsOptions { + folder?: PortalFolder; + ignoreUnsupported?: boolean; + } + + export interface WebSceneSaveOptions { + ignoreUnsupported?: boolean; + } + + export interface WebSceneSourceVersion { + major: number; + minor: number; + } + + export interface WebSceneUpdateFromOptions { + environmentExcluded?: boolean; + viewpointExcluded?: boolean; + } + + export type EventHandler = (event: any) => void; + + export interface SceneViewDragEventOrigin { + x: number; + y: number; + } + + export interface SceneViewClickEvent { + mapPoint: Point; + x: number; + y: number; + button: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewClickEventHandler = (event: SceneViewClickEvent) => void; + + export interface SceneViewDoubleClickEvent { + mapPoint: Point; + x: number; + y: number; + button: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewDoubleClickEventHandler = (event: SceneViewDoubleClickEvent) => void; + + export interface SceneViewDragEvent { + action: string; + x: number; + y: number; + origin: SceneViewDragEventOrigin; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewDragEventHandler = (event: SceneViewDragEvent) => void; + + export type EasingFunction = (t: number, duration: number) => number; + + export interface SceneViewHoldEvent { + mapPoint: Point; + x: number; + y: number; + button: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewHoldEventHandler = (event: SceneViewHoldEvent) => void; + + export interface SceneViewKeyDownEvent { + repeat: boolean; + key: string; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewKeyDownEventHandler = (event: SceneViewKeyDownEvent) => void; + + export interface SceneViewKeyUpEvent { + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewKeyUpEventHandler = (event: SceneViewKeyUpEvent) => void; + + export interface SceneViewLayerviewCreateEvent { + layer: Layer; + layerView: LayerView; + } + + export type SceneViewLayerviewCreateEventHandler = (event: SceneViewLayerviewCreateEvent) => void; + + export interface SceneViewLayerviewDestroyEvent { + layer: Layer; + layerView: LayerView; + } + + export type SceneViewLayerviewDestroyEventHandler = (event: SceneViewLayerviewDestroyEvent) => void; + + export interface SceneViewMouseWheelEvent { + x: number; + y: number; + deltaY: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewMouseWheelEventHandler = (event: SceneViewMouseWheelEvent) => void; + + export interface SceneViewPointerDownEvent { + pointerId: number; + pointerType: string; + x: number; + y: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewPointerDownEventHandler = (event: SceneViewPointerDownEvent) => void; + + export interface SceneViewPointerMoveEvent { + pointerId: number; + pointerType: string; + x: number; + y: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewPointerMoveEventHandler = (event: SceneViewPointerMoveEvent) => void; + + export interface SceneViewPointerUpEvent { + pointerId: number; + pointerType: string; + x: number; + y: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type SceneViewPointerUpEventHandler = (event: SceneViewPointerUpEvent) => void; + + export interface SceneViewResizeEvent { + oldWidth: number; + oldHeight: number; + width: number; + height: number; + } + + export type SceneViewResizeEventHandler = (event: SceneViewResizeEvent) => void; + + export interface SceneViewConstraintsProperties { + altitude?: SceneViewConstraintsAltitudeProperties; + clipDistance?: SceneViewConstraintsClipDistanceProperties; + collision?: SceneViewConstraintsCollision; + tilt?: SceneViewConstraintsTiltProperties; + } + export interface SceneViewConstraints extends Accessor { + altitude?: SceneViewConstraintsAltitude; + clipDistance?: SceneViewConstraintsClipDistance; + collision?: SceneViewConstraintsCollision; + tilt?: SceneViewConstraintsTilt; + } + + export interface SceneViewConstraintsAltitudeProperties { + min?: number; + max?: number; + } + export interface SceneViewConstraintsAltitude extends Accessor { + min?: number; + max?: number; + } + + export interface SceneViewConstraintsClipDistanceProperties { + near?: number; + far?: number; + mode?: string; + } + export interface SceneViewConstraintsClipDistance extends Accessor { + near?: number; + far?: number; + mode?: string; + } + + export interface SceneViewConstraintsCollision { + enabled?: boolean; + } + + export interface SceneViewConstraintsTiltProperties { + max?: number; + mode?: string; + } + export interface SceneViewConstraintsTilt extends Accessor { + max?: number; + mode?: string; + } + + export interface SceneViewEnvironmentProperties { + lighting?: SceneViewEnvironmentLightingProperties; + atmosphereEnabled?: boolean; + atmosphere?: SceneViewEnvironmentAtmosphereProperties; + starsEnabled?: boolean; + } + export interface SceneViewEnvironment extends Accessor { + lighting?: SceneViewEnvironmentLighting; + atmosphereEnabled?: boolean; + atmosphere?: SceneViewEnvironmentAtmosphere; + starsEnabled?: boolean; + } + + export interface SceneViewEnvironmentAtmosphereProperties { + quality?: string; + } + export interface SceneViewEnvironmentAtmosphere extends Accessor { + quality?: string; + } + + export interface SceneViewEnvironmentLightingProperties { + date?: Date; + directShadowsEnabled?: boolean; + ambientOcclusionEnabled?: boolean; + cameraTrackingEnabled?: boolean; + } + export interface SceneViewEnvironmentLighting extends Accessor { + date?: Date; + directShadowsEnabled?: boolean; + ambientOcclusionEnabled?: boolean; + cameraTrackingEnabled?: boolean; + } + + export interface SceneViewGoToOptions { + animate?: boolean; + speedFactor?: number; + duration?: number; + maxDuration?: number; + easing?: string | EasingFunction; + } + + export interface SceneViewHighlightOptions { + color?: Color; + haloOpacity?: number; + fillOpacity?: number; + } + + export interface SceneViewHitTestScreenPoint { + x: number; + y: number; + } + + export interface SceneViewToMapScreenPoint { + x: number; + y: number; + } + export interface WatchHandle { remove(): void; } - export interface EachAlwaysResult { - promise: IPromise; - value: any; - error: any; + export type WatchCallback = (newValue: any, oldValue: any, propertyName: string, target: Accessor) => void; + + export interface IdentityManagerBaseGenerateTokenOptions { + serverUrl: string; + token: string; + ssl: boolean; } - export interface PausableWatchHandle { - remove(): void; - pause(): void; - resume(): void; + export interface IdentityManagerBaseGetCredentialOptions { + error?: Error; + oAuthPopupConfirmation?: boolean; + retry?: boolean; + token?: string; } - export interface FeatureEditResult { - objectId: number; - error: any; + export interface IdentityManagerBaseOAuthSignInOptions { + error: Error; + oAuthPopupConfirmation: boolean; + token: string; } + export interface IdentityManagerBaseRegisterTokenProperties { + expires?: number; + server: string; + ssl?: boolean; + token: string; + userId?: string; + } + + export interface IdentityManagerBaseSetProtocolErrorHandlerHandlerFunction { + resourceUrl: string; + serverInfo: ServerInfo; + } + + export interface IdentityManagerBaseSetRedirectionHandlerHandlerFunction { + resourceUrl: string; + returnUrlParamName: string; + serverInfo: ServerInfo; + signInPage: string; + } + + export interface IdentityManagerBaseSignInOptions { + error: Error; + } + + export interface IdentityManagerCredentialCreateEvent { + credential: Credential; + } + + export type IdentityManagerCredentialCreateEventHandler = (event: IdentityManagerCredentialCreateEvent) => void; + + export interface IdentityManagerCredentialsDestroyEvent { + } + + export type IdentityManagerCredentialsDestroyEventHandler = (event: IdentityManagerCredentialsDestroyEvent) => void; + + export type HandlerCallback = (authorizeParams: any, authorizeUrl: string, oAuthInfo: OAuthInfo, resourceUrl: string, serverInfo: ServerInfo) => void; + + export interface BaseElevationLayerFetchTileOptions { + noDataValue?: number; + } + + export interface BaseElevationLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type BaseElevationLayerLayerviewCreateEventHandler = (event: BaseElevationLayerLayerviewCreateEvent) => void; + + export interface BaseElevationLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type BaseElevationLayerLayerviewDestroyEventHandler = (event: BaseElevationLayerLayerviewDestroyEvent) => void; + + export interface CSVLayerElevationInfo { + mode: string; + offset?: number; + } + + export interface CSVLayerFeatureReduction { + type: string; + } + + export interface CSVLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type CSVLayerLayerviewCreateEventHandler = (event: CSVLayerLayerviewCreateEvent) => void; + + export interface CSVLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type CSVLayerLayerviewDestroyEventHandler = (event: CSVLayerLayerviewDestroyEvent) => void; + + export interface ElevationLayerQueryElevationOptions { + demResolution?: number | string; + returnSampleInfo?: boolean; + noDataValue?: number; + } + + export interface ElevationLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type ElevationLayerLayerviewCreateEventHandler = (event: ElevationLayerLayerviewCreateEvent) => void; + + export interface ElevationLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type ElevationLayerLayerviewDestroyEventHandler = (event: ElevationLayerLayerviewDestroyEvent) => void; + + export interface GeoRSSLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type GeoRSSLayerLayerviewCreateEventHandler = (event: GeoRSSLayerLayerviewCreateEvent) => void; + + export interface GeoRSSLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type GeoRSSLayerLayerviewDestroyEventHandler = (event: GeoRSSLayerLayerviewDestroyEvent) => void; + + export interface GroupLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type GroupLayerLayerviewCreateEventHandler = (event: GroupLayerLayerviewCreateEvent) => void; + + export interface GroupLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type GroupLayerLayerviewDestroyEventHandler = (event: GroupLayerLayerviewDestroyEvent) => void; + + export interface ImageryLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type ImageryLayerLayerviewCreateEventHandler = (event: ImageryLayerLayerviewCreateEvent) => void; + + export interface ImageryLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type ImageryLayerLayerviewDestroyEventHandler = (event: ImageryLayerLayerviewDestroyEvent) => void; + + export interface IntegratedMeshLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type IntegratedMeshLayerLayerviewCreateEventHandler = (event: IntegratedMeshLayerLayerviewCreateEvent) => void; + + export interface IntegratedMeshLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type IntegratedMeshLayerLayerviewDestroyEventHandler = (event: IntegratedMeshLayerLayerviewDestroyEvent) => void; + + export interface MapImageLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type MapImageLayerLayerviewCreateEventHandler = (event: MapImageLayerLayerviewCreateEvent) => void; + + export interface MapImageLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type MapImageLayerLayerviewDestroyEventHandler = (event: MapImageLayerLayerviewDestroyEvent) => void; + + export interface MapNotesLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type MapNotesLayerLayerviewCreateEventHandler = (event: MapNotesLayerLayerviewCreateEvent) => void; + + export interface MapNotesLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type MapNotesLayerLayerviewDestroyEventHandler = (event: MapNotesLayerLayerviewDestroyEvent) => void; + + export interface OpenStreetMapLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type OpenStreetMapLayerLayerviewCreateEventHandler = (event: OpenStreetMapLayerLayerviewCreateEvent) => void; + + export interface OpenStreetMapLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type OpenStreetMapLayerLayerviewDestroyEventHandler = (event: OpenStreetMapLayerLayerviewDestroyEvent) => void; + + export interface PointCloudLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type PointCloudLayerLayerviewCreateEventHandler = (event: PointCloudLayerLayerviewCreateEvent) => void; + + export interface PointCloudLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type PointCloudLayerLayerviewDestroyEventHandler = (event: PointCloudLayerLayerviewDestroyEvent) => void; + + export interface PointCloudLayerElevationInfo { + mode: string; + offset?: number; + } + + export interface PointCloudRendererColorModulation { + field: string; + minValue: number; + maxValue: number; + } + + export interface PointCloudRendererPointSizeAlgorithm { + type?: string; + useRealWorldSymbolSizes?: boolean; + size?: number; + scaleFactor?: number; + minSize?: number; + } + + export interface SceneLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type SceneLayerLayerviewCreateEventHandler = (event: SceneLayerLayerviewCreateEvent) => void; + + export interface SceneLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type SceneLayerLayerviewDestroyEventHandler = (event: SceneLayerLayerviewDestroyEvent) => void; + + export interface SceneLayerElevationInfo { + mode: string; + offset?: number; + } + + export interface SceneLayerFeatureReduction { + type: string; + } + + export interface StreamLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type StreamLayerLayerviewCreateEventHandler = (event: StreamLayerLayerviewCreateEvent) => void; + + export interface StreamLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type StreamLayerLayerviewDestroyEventHandler = (event: StreamLayerLayerviewDestroyEvent) => void; + + export interface StreamLayerFilter { + geometry?: Extent; + where?: string; + } + + export interface StreamLayerPurgeOptions { + displayCount: number; + age: number; + } + + export interface StreamLayerUpdateFilterFilterChanges { + geometry: Extent; + where: string; + } + + export interface TileLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type TileLayerLayerviewCreateEventHandler = (event: TileLayerLayerviewCreateEvent) => void; + + export interface TileLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type TileLayerLayerviewDestroyEventHandler = (event: TileLayerLayerviewDestroyEvent) => void; + + export interface TileLayerFetchTileOptions { + allowImageDataAccess?: boolean; + } + + export interface UnknownLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type UnknownLayerLayerviewCreateEventHandler = (event: UnknownLayerLayerviewCreateEvent) => void; + + export interface UnknownLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type UnknownLayerLayerviewDestroyEventHandler = (event: UnknownLayerLayerviewDestroyEvent) => void; + + export interface UnsupportedLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type UnsupportedLayerLayerviewCreateEventHandler = (event: UnsupportedLayerLayerviewCreateEvent) => void; + + export interface UnsupportedLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type UnsupportedLayerLayerviewDestroyEventHandler = (event: UnsupportedLayerLayerviewDestroyEvent) => void; + + export interface VectorTileLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type VectorTileLayerLayerviewCreateEventHandler = (event: VectorTileLayerLayerviewCreateEvent) => void; + + export interface VectorTileLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type VectorTileLayerLayerviewDestroyEventHandler = (event: VectorTileLayerLayerviewDestroyEvent) => void; + + export interface VectorTileLayerCurrentStyleInfo { + serviceUrl: string; + styleUrl: string; + spriteUrl: string; + glyphsUrl: string; + style: any; + layerDefinition: any; + } + + export interface WebTileLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type WebTileLayerLayerviewCreateEventHandler = (event: WebTileLayerLayerviewCreateEvent) => void; + + export interface WebTileLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type WebTileLayerLayerviewDestroyEventHandler = (event: WebTileLayerLayerviewDestroyEvent) => void; + + export interface WMSLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type WMSLayerLayerviewCreateEventHandler = (event: WMSLayerLayerviewCreateEvent) => void; + + export interface WMSLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type WMSLayerLayerviewDestroyEventHandler = (event: WMSLayerLayerviewDestroyEvent) => void; + + export interface WMSLayerFetchImageOptions { + allowImageDataAccess?: boolean; + pixelRatio?: number; + rotation?: number; + } + + export interface WMTSLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type WMTSLayerLayerviewCreateEventHandler = (event: WMTSLayerLayerviewCreateEvent) => void; + + export interface WMTSLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type WMTSLayerLayerviewDestroyEventHandler = (event: WMTSLayerLayerviewDestroyEvent) => void; + + export interface BaseDynamicLayerFetchImageOptions { + allowImageDataAccess?: boolean; + } + + export interface BaseDynamicLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type BaseDynamicLayerLayerviewCreateEventHandler = (event: BaseDynamicLayerLayerviewCreateEvent) => void; + + export interface BaseDynamicLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type BaseDynamicLayerLayerviewDestroyEventHandler = (event: BaseDynamicLayerLayerviewDestroyEvent) => void; + + export interface BaseTileLayerFetchTileOptions { + allowImageDataAccess?: boolean; + } + + export interface BaseTileLayerLayerviewCreateEvent { + view: View; + layerView: LayerView; + } + + export type BaseTileLayerLayerviewCreateEventHandler = (event: BaseTileLayerLayerviewCreateEvent) => void; + + export interface BaseTileLayerLayerviewDestroyEvent { + view: View; + layerView: LayerView; + } + + export type BaseTileLayerLayerviewDestroyEventHandler = (event: BaseTileLayerLayerviewDestroyEvent) => void; + + export interface CodedValueDomainCodedValues { + name: string; + code: string | number; + } + + export interface PixelBlockAddDataPlaneData { + pixels: number[][]; + statistics: any[]; + } + + export interface PixelBlockStatistics { + maxValue?: number; + minValue?: number; + noDataValue?: number; + } + + export interface ClassBreaksRendererClassBreakInfos { + minValue: number; + maxValue: number; + symbol: Symbol; + label?: string; + } + + export interface ClassBreaksRendererLegendOptions { + title: string; + } + + export interface UniqueValueRendererLegendOptions { + title?: string; + } + + export interface UniqueValueRendererUniqueValueInfos { + value: string | number; + symbol: Symbol; + label?: string; + } + + export interface PointCloudClassBreaksRendererColorClassBreakInfos { + minValue: number; + maxValue: number; + color: Color; + label?: string; + } + + export interface PointCloudStretchRendererStops { + value: number; + label?: string; + color: Color; + } + + export interface PointCloudUniqueValueRendererColorUniqueValueInfos { + values: number[]; + color: Color; + label?: string; + } + + export interface FillSymbol3DLayerOutline { + color: Color; + size: number; + } + + export interface IconSymbol3DLayerOutline { + color?: Color; + size?: number; + } + + export interface IconSymbol3DLayerResource { + primitive?: string; + href?: string; + } + + export interface ObjectSymbol3DLayerResource { + primitive?: string; + href?: string; + } + + export interface PointSymbol3DVerticalOffsetProperties { + screenLength?: number; + minWorldLength?: number; + maxWorldLength?: number; + } + export interface PointSymbol3DVerticalOffset extends Accessor { + screenLength: number; + minWorldLength?: number; + maxWorldLength?: number; + } + + export interface Symbol3DStyleOrigin { + styleName?: string; + styleUrl?: string; + name: string; + } + + export interface TextSymbol3DLayerFont { + family?: string; + weight?: string; + style?: string; + } + + export interface TextSymbol3DLayerHalo { + color?: Color; + size?: number; + } + + export interface LineCallout3DBorderProperties { + color?: Color; + } + export interface LineCallout3DBorder extends Accessor { + color?: Color; + } + + export interface ClosestFacilityParametersAttributeParameterValues { + attributeName: string; + parameterName: string; + value: string; + } + + export interface GeometryServiceFromGeoCoordinateStringParams { + strings: string[]; + sr: SpatialReference | string; + conversionType: string; + conversionMode?: string; + } + + export interface GeometryServiceToGeoCoordinateStringParams { + sr: SpatialReference | string; + coordinates: number[][]; + conversionType: string; + conversionMode?: string; + numOfDigits?: number; + rounding?: boolean; + addSpaces?: boolean; + } + + export interface ProjectParametersTransformation { + wkid?: number; + wkt?: string; + } + + export interface LocatorAddressToLocationsParams { + address: any; + categories: string[]; + countryCode: string; + distance: number; + forStorage: boolean; + location: Point; + magicKey: string; + maxLocations: number; + outFields: string[]; + searchExtent: Extent; + } + + export interface LocatorAddressesToLocationsParams { + addresses: any[]; + countryCode: string; + categories: string[]; + } + + export interface LocatorSuggestLocationsParams { + categories: string[]; + distance: number; + location: Point; + text: string; + } + + export interface PrintTemplateExportOptions { + width?: number; + height?: number; + dpi?: number; + } + + export interface PrintTemplateLayoutOptions { + titleText: string; + authorText: string; + copyrightText: string; + scalebarUnit: string; + legendLayers: LegendLayer[]; + customTextElements: any[]; + } + + export interface MapViewDragEventOrigin { + x: number; + y: number; + } + + export interface MapViewClickEvent { + mapPoint: Point; + x: number; + y: number; + button: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewClickEventHandler = (event: MapViewClickEvent) => void; + + export interface MapViewDoubleClickEvent { + mapPoint: Point; + x: number; + y: number; + button: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewDoubleClickEventHandler = (event: MapViewDoubleClickEvent) => void; + + export interface MapViewDragEvent { + action: string; + x: number; + y: number; + origin: MapViewDragEventOrigin; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewDragEventHandler = (event: MapViewDragEvent) => void; + + export interface MapViewHoldEvent { + mapPoint: Point; + x: number; + y: number; + button: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewHoldEventHandler = (event: MapViewHoldEvent) => void; + + export interface MapViewKeyDownEvent { + repeat: boolean; + key: string; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewKeyDownEventHandler = (event: MapViewKeyDownEvent) => void; + + export interface MapViewKeyUpEvent { + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewKeyUpEventHandler = (event: MapViewKeyUpEvent) => void; + + export interface MapViewLayerviewCreateEvent { + layer: Layer; + layerView: LayerView; + } + + export type MapViewLayerviewCreateEventHandler = (event: MapViewLayerviewCreateEvent) => void; + + export interface MapViewLayerviewDestroyEvent { + layer: Layer; + layerView: LayerView; + } + + export type MapViewLayerviewDestroyEventHandler = (event: MapViewLayerviewDestroyEvent) => void; + + export interface MapViewConstraints { + lods?: LOD[]; + minScale?: number; + maxScale?: number; + minZoom?: number; + maxZoom?: number; + snapToZoom?: boolean; + rotationEnabled?: boolean; + effectiveLODs?: LOD[]; + effectiveMinZoom?: number; + effectiveMaxZoom?: number; + effectiveMinScale?: number; + effectiveMaxScale?: number; + } + + export interface MapViewGoToOptions { + animate?: boolean; + duration?: number; + easing?: string | Function; + } + + export interface MapViewHitTestScreenPoint { + x: number; + y: number; + } + + export interface MapViewToMapScreenPoint { + x: number; + y: number; + } + + export interface MapViewMouseWheelEvent { + x: number; + y: number; + deltaY: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewMouseWheelEventHandler = (event: MapViewMouseWheelEvent) => void; + + export interface MapViewPointerDownEvent { + pointerId: number; + pointerType: string; + x: number; + y: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewPointerDownEventHandler = (event: MapViewPointerDownEvent) => void; + + export interface MapViewPointerMoveEvent { + pointerId: number; + pointerType: string; + x: number; + y: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewPointerMoveEventHandler = (event: MapViewPointerMoveEvent) => void; + + export interface MapViewPointerUpEvent { + pointerId: number; + pointerType: string; + x: number; + y: number; + type: string; + stopPropagation: Function; + timestamp: number; + native: any; + } + + export type MapViewPointerUpEventHandler = (event: MapViewPointerUpEvent) => void; + + export interface MapViewResizeEvent { + oldWidth: number; + oldHeight: number; + width: number; + height: number; + } + + export type MapViewResizeEventHandler = (event: MapViewResizeEvent) => void; + export interface AttributeParamValue { attributeName: string; parameterName: string; value: string; } - export interface DataWorkspace { - id: string; - name: string; + export interface ConfigurationTaskGetDataWorkspaceDetailsParams { + dataWorkspaceId: string; + user: string; } - export interface GroupMembership { - id: number; - name: string; + export interface ConfigurationTaskGetUserJobQueryDetailsParams { + queryId: number; + user: string; } - export interface HoldType { - description: string; - id: number; - name: string; - } - - export interface JobPriority { - description: string; - name: string; - value: number; - } - - export interface JobQuery { - id: number; - name: string; - } - - export interface JobStatus { - caption: string; - description: string; - id: number; - name: string; - } - - export interface JobQueryContainer { - containers: JobQueryContainer[]; - id: number; - name: string; - queries: JobQuery[]; - } - - export interface JobQueryDetails { - aliases: string[]; - fields: string[]; - id: number; - name: string; - orderBy: string; - tables: string[]; - where: string; - } - - export interface Privilege { - description: string; - id: number; - name: string; - } - - export interface UserDetails { - lastName: string; - address: string; - faxNumber: string; - firstName: string; - fullName: string; - groups: GroupMembership[]; - email: string; - phoneNumber: string; - privileges: Privilege[]; - roomNumber: string; - userName: string; - userQueries: JobQueryContainer[]; - zipCode: string; - } - - export interface VersionInfo { - access: string; - name: string; - parent: string; - } - - export interface WorkflowManagerServiceInfo { - jobPriorities: JobPriority[]; - activityTypes: ActivityType[]; - currentVersion: number; - dataWorkspaces: DataWorkspace[]; - holdTypes: HoldType[]; - configProperties: any; - jobStatuses: JobStatus[]; - jobTypes: JobType[]; - notificationTypes: NotificationType[]; - privileges: Privilege[]; - publicQueries: JobQueryContainer[]; - } - - export interface JobType { - category: string; - description: string; - id: string; - name: string; - state: string; - } - - export interface JobTypeDetails { - defaultParentVersionName: string; - autoExecuteCreatedJobs: boolean; - category: string; - defaultAssignedTo: string; - defaultAssignedType: string; - defaultDataWorkspaceId: string; - defaultDescription: string; - defaultDueDate: string; - defaultJobDuration: number; - canDataWorkspaceChange: boolean; - defaultPriority: string; - defaultStartDate: Date; - description: string; - id: string; - jobNamingScheme: string; - jobVersionNamingScheme: string; - mxdNamingScheme: string; - name: string; - state: string; - } - - export interface TableRelationship { - cardinality: string; - linkField: string; - tableAlias: string; + export interface AuxRecordDescription { + properties: any; + recordId: number; tableName: string; } @@ -256,803 +1426,6 @@ declare namespace __esri { user: string; } - export interface JobUpdateParameters { - ownedBy: string; - assignedTo: string; - dataWorkspaceId: string; - description: string; - dueDate: Date; - loi: Geometry; - jobId: number; - name: string; - assignedType: string; - parentJobId: number; - parentVersion: string; - percent: number; - priority: number; - startDate: Date; - status: number; - versionName: string; - user: string; - } - - export interface AuxRecordDescription { - properties: any; - recordId: number; - tableName: string; - } - - export interface ActivityType { - desription: string; - id: number; - message: string; - name: string; - } - - export interface AuxRecordContainer { - records: AuxRecord; - relationshipType: string; - tableAlias: string; - tableName: string; - } - - export interface JobTaskJobInfo { - name: string; - assignedTo: string; - childJobIds: number[]; - createdBy: string; - createdDate: Date; - dataWorkspaceId: string; - description: string; - dueDate: Date; - endDate: Date; - id: number; - jobTypeId: number; - loi: Geometry; - assignedType: string; - ownedBy: string; - parentJobId: number; - parentVersion: string; - pendingDays: number; - percentageComplete: number; - priority: number; - stage: string; - startDate: Date; - status: number; - versionExists: boolean; - versionInfo: JobVersionInfo; - versionName: string; - } - - export interface QueryResult { - fields: QueryFieldInfo[]; - rows: string[]; - } - - export interface AuxRecord { - displayProperty: any; - id: number; - recordvalues: AuxRecordValue; - } - - export interface AuxRecordValue { - filter: string; - alias: string; - data: any; - dataType: string; - displayOrder: number; - displayType: string; - domain: string; - canUpdate: boolean; - length: number; - name: string; - required: boolean; - tableListClass: string; - tableListDisplayField: string; - tableListStoreField: string; - userVisible: boolean; - } - - export interface FieldValue { - description: string; - value: any; - } - - export interface JobVersionInfo { - dataWorkspaceId: string; - name: string; - parent: string; - created: boolean; - owner: string; - } - - export interface QueryFieldInfo { - alias: string; - length: string; - name: string; - type: string; - } - - export interface JobAttachment { - filename: string; - folder: string; - id: number; - storageType: string; - } - - export interface JobDependency { - depJobId: number; - depOnType: string; - depOnValue: string; - heldOnValue: number; - holdOnType: string; - id: number; - jobID: string; - } - - export interface ChangeRule { - description: string; - evaluators: any[]; - id: number; - name: string; - notifier: any; - summarize: boolean; - } - - export interface DataSetEvaluator { - dataSetConfigurations: DatasetConfiguration[]; - name: string; - type: string; - } - - export interface AOIEvaluator { - aoi: Polygon; - inverse: boolean; - name: string; - relation: string; - type: string; - useJobAOI: boolean; - } - - export interface DatasetConfiguration { - changeCondition: number; - changeFields: string; - dataset: string; - dataWorkspaceId: string; - name: string; - whereConditions: WhereCondition[]; - } - - export interface EmailNotifier { - attachJobAttachments: boolean; - message: string; - name: string; - senderEmail: string; - senderName: string; - subject: string; - subscribers: string[]; - type: string; - } - - export interface WhereCondition { - compareValue: any; - field: string; - operator: string; - } - - export interface NotificationType { - attachJobAttachments: boolean; - id: number; - message: string; - senderEmail: string; - senderName: string; - subject: string; - subscribers: string[]; - type: string; - } - - export interface ChangeRuleMatch { - changeTime: Date; - changeType: string; - dataset: string; - dataWorkspaceId: string; - id: string; - jobID: string; - ruleID: string; - } - - export interface ReportDataGroup { - aggregateLabel: string; - aggregateValue: string; - row: string[]; - value: string; - } - - export interface ReportData { - columns: string[]; - description: string; - groups: ReportDataGroup[]; - title: string; - } - - export interface Report { - description: string; - hierarchy: string; - id: number; - name: string; - title: string; - } - - export interface ExecuteInfo { - conflicts: WorkflowConflicts; - errorCode: number; - errorDescription: string; - executionResult: string; - hasConflicts: boolean; - hasReturnCode: boolean; - jobID: number; - returnCode: number; - stepID: number; - threwError: boolean; - } - - export interface Step { - hasBeenExecuted: boolean; - assignedTo: string; - async: boolean; - autoRun: boolean; - canSkip: boolean; - canSpawnConcurrency: boolean; - commonId: number; - defaultPercentComplete: number; - assignedType: string; - hasBeenStarted: boolean; - id: number; - name: string; - selfCheck: boolean; - statusId: number; - stepPercentComplete: number; - notificationType: string; - stepType: StepType; - } - - export interface StepType { - program: string; - arguments: string; - executionType: string; - id: number; - name: string; - description: string; - stepDescriptionLink: string; - stepDescriptionType: string; - stepIndicatorType: string; - supportedPlatform: string; - visible: boolean; - } - - export interface WorkflowDisplayDetails { - annotations: WorkflowAnnotationDisplayDetails[]; - paths: WorkflowPathDisplayDetails[]; - steps: WorkflowStepDisplayDetails[]; - } - - export interface WorkflowOption { - returnCode: number; - steps: WorkflowStepInfo[]; - } - - export interface WorkflowStepInfo { - id: number; - name: string; - } - - export interface WorkflowAnnotationDisplayDetails { - centerX: number; - centerY: number; - fillColor: any; - height: number; - label: string; - labelColor: any; - OutlineColor: any; - width: number; - } - - export interface WorkflowConflicts { - jobID: number; - options: WorkflowOption[]; - spawnsConcurrency: boolean; - stepId: number; - } - - export interface WorkflowPathDisplayDetails { - destStepId: number; - sourceStepID: number; - label: string; - labelColor: any; - labelX: number; - labelY: number; - lineColor: any; - pathObject: any; - } - - export interface WorkflowStepDisplayDetails { - labelColor: any; - centerX: number; - fillColor: any; - height: number; - label: string; - centerY: number; - OutlineColor: any; - shape: string; - stepId: number; - stepType: string; - width: number; - } - - export interface ExternalRenderer { - setup(): void; - render(): void; - } - - export interface RenderContext { - gl: any; - camera: any; - sunLight: any; - - resetWebGLState(): void; - bindRenderTarget(): void; - } - - export interface RenderCamera { - viewMatrix: any; - viewInverseTransposeMatrix: any; - projectionMatrix: any; - eye: any; - center: any; - up: any; - near: number; - far: number; - fovX: number; - fovY: number; - } - - export interface SunLight { - direction: any; - diffuse: any; - ambient: any; - } - - export interface ColorAndIntensity { - color: any; - intensity: number; - } - - export interface LocatorSource { - categories: string[]; - countryCode: string; - localSearchOptions: any; - locationToAddressDistance: number; - searchTemplate: string; - locator: Locator; - singleLineFieldName: string; - } - - export interface FeatureLayerSource { - displayField: string; - exactMatch: boolean; - featureLayer: FeatureLayer; - searchFields: string[]; - searchQueryParams: any; - suggestQueryParams: any; - suggestionTemplate: string; - } - - export type GetHeader = (headerName: string) => string; - - export type WatchCallback = (newValue: any, oldValue: any, propertyName: string, target: Accessor) => void; - - export type ItemCallback = (item: any, index: number) => void; - - export type ItemTestCallback = (item: any, index: number) => boolean; - - export type ItemMapCallback = (item: any, index: number) => any; - - export type ItemReduceCallback = (previousValue: any, currentValue: any, index: number) => any; - - export type ItemCompareCallback = (firstItem: any, secondItem: any) => number; - - export type EventAttachedCallback = (target: any, propName: string, obj: Accessor, eventName: string) => void; - - export type HandlerCallback = (authorizeParams: any, authorizeUrl: string, oAuthInfo: OAuthInfo, resourceUrl: string, serverInfo: ServerInfo) => void; - - export type EasingFunction = (t: number, duration: number) => number; - - export type EventHandler = (event: any) => void; - - export interface PromisedWatchHandle extends IPromise { - remove(): void; - } - - export interface GroundQueryElevationOptions { - returnSampleInfo?: boolean; - noDataValue?: number; - } - - export interface PopupTemplateFieldInfos { - fieldName: string; - format: PopupTemplateFieldInfosFormat; - isEditable: boolean; - label: string; - stringFieldOption: string; - tooltip: string; - visible: boolean; - } - - export interface PopupTemplateFieldInfosFormat { - dateFormat: string; - digitSeparator: boolean; - places: number; - } - - export interface WebMapSourceVersion { - major: number; - minor: number; - } - - export interface WebSceneSaveAsOptions { - folder?: PortalFolder; - ignoreUnsupported?: boolean; - } - - export interface WebSceneSaveOptions { - ignoreUnsupported?: boolean; - } - - export interface WebSceneSourceVersion { - major: number; - minor: number; - } - - export interface WebSceneUpdateFromOptions { - environmentExcluded?: boolean; - viewpointExcluded?: boolean; - } - - export interface IdentityManagerBaseGenerateTokenOptions { - serverUrl: string; - token: string; - ssl: boolean; - } - - export interface IdentityManagerBaseGetCredentialOptions { - error: Error; - oAuthPopupConfirmation: boolean; - retry: boolean; - token: string; - } - - export interface IdentityManagerBaseOAuthSignInOptions { - error: Error; - oAuthPopupConfirmation: boolean; - token: string; - } - - export interface IdentityManagerBaseRegisterTokenProperties { - expires: number; - server: string; - ssl: boolean; - token: string; - useId: string; - } - - export interface IdentityManagerBaseSetProtocolErrorHandlerHandlerFunction { - resourceUrl: string; - serverInfo: ServerInfo; - } - - export interface IdentityManagerBaseSetRedirectionHandlerHandlerFunction { - resourceUrl: string; - returnUrlParamName: string; - serverInfo: ServerInfo; - signInPage: string; - } - - export interface IdentityManagerBaseSignInOptions { - error: Error; - } - - export interface ElevationLayerQueryElevationOptions { - demResolution?: number | string; - returnSampleInfo?: boolean; - noDataValue?: number; - } - - export interface CSVLayerElevationInfo { - mode: string; - offset?: number; - } - - export interface FeatureLayerApplyEditsEdits { - addFeatures?: Graphic[]; - updateFeatures?: Graphic[]; - deleteFeatures?: Graphic[] | any[]; - } - - export interface FeatureLayerCapabilities { - operations: FeatureLayerCapabilitiesOperations; - } - - export interface FeatureLayerCapabilitiesOperations { - supportsAdd: boolean; - supportsDelete: boolean; - supportsUpdate: boolean; - supportsEditing: boolean; - supportsQuery: boolean; - } - - export interface FeatureLayerElevationInfo { - mode: string; - offset?: number; - } - - export interface FeatureLayerGetFieldDomainOptions { - feature: Graphic; - } - - export interface GraphicsLayerElevationInfo { - mode: string; - offset?: number; - } - - export interface LayerFromArcGISServerUrlParams { - url: string; - properties?: any; - } - - export interface LayerFromPortalItemParams { - portalItem: PortalItem; - } - - export interface SceneLayerElevationInfo { - mode: string; - offset?: number; - } - - export interface StreamLayerFilter { - geometry: Extent; - where: string; - } - - export interface StreamLayerPurgeOptions { - displayCount: number; - age: number; - } - - export interface StreamLayerUpdateFilterFilterChanges { - geometry: Extent; - where: string; - } - - export interface VectorTileLayerCurrentStyleInfo { - serviceUrl: string; - styleUrl: string; - spriteUrl: string; - glyphsUrl: string; - style: any; - layerDefinition: any; - } - - export interface CodedValueDomainCodedValues { - name: string; - code: string | number; - } - - export interface LabelClassLabelExpressionInfo { - value: string; - } - - export interface PixelBlockAddDataPlaneData { - pixels: number[][]; - statistics: any[]; - } - - export interface PixelBlockStatistics { - maxValue: number; - minValue: number; - noDataValue: number; - } - - export interface PortalFeaturedGroups { - owner: string; - title: string; - } - - export interface PortalItemFetchRelatedItemsParams { - relationshipType: string; - direction?: string; - } - - export interface PortalItemUpdateParams { - data: string | any; - } - - export interface PortalUserAddItemParams { - item: PortalItem; - data?: string | any; - folder?: PortalFolder; - } - - export interface PortalUserFetchItemsParams { - folder: PortalFolder; - num: number; - start: number; - } - - export interface ClassBreaksRendererClassBreakInfos { - minValue: number; - maxValue: number; - symbol: Symbol; - label: string; - } - - export interface ClassBreaksRendererLegendOptions { - title: string; - } - - export interface UniqueValueRendererLegendOptions { - title: string; - } - - export interface UniqueValueRendererUniqueValueInfos { - value: string; - symbol: Symbol; - label: string; - } - - export interface PointCloudRendererPointSizeAlgorithm { - type: string; - useRealWorldSymbolSizes: boolean; - size: number; - scaleFactor: number; - minSize: number; - } - - export interface PointCloudClassBreaksRendererColorClassBreakInfos { - minValue: number; - maxValue: number; - color: Color; - label: string; - } - - export interface PointCloudStretchRendererStops { - value: number; - label: string; - color: Color; - } - - export interface PointCloudUniqueValueRendererColorUniqueValueInfos { - values: number[]; - color: Color; - label: string; - } - - export interface FillSymbol3DLayerOutline { - color: Color | string; - size: number | string; - } - - export interface IconSymbol3DLayerOutline { - color: Color | string; - size: number | string; - } - - export interface IconSymbol3DLayerResource { - primitive?: string; - href?: string; - } - - export interface ObjectSymbol3DLayerResource { - primitive?: string; - href?: string; - } - - export interface Symbol3DStyleOrigin { - styleName?: string; - styleUrl?: string; - name: string; - } - - export interface TextSymbol3DLayerFont { - family: string; - weight: string; - style: string; - } - - export interface GeometryServiceFromGeoCoordinateStringParams { - strings: string[]; - sr: SpatialReference | string; - conversionType: string; - conversionMode?: string; - } - - export interface GeometryServiceToGeoCoordinateStringParams { - sr: SpatialReference | string; - coordinates: number[][]; - conversionType: string; - conversionMode?: string; - numOfDigits?: number; - rounding?: boolean; - addSpaces?: boolean; - } - - export interface LocatorAddressToLocationsParams { - address: any; - categories: string[]; - countryCode: string; - distance: number; - forStorage: boolean; - location: Point; - magicKey: string; - maxLocations: number; - outFields: string[]; - searchExtent: Extent; - } - - export interface LocatorAddressesToLocationsParams { - addresses: any[]; - countryCode: string; - categories: string[]; - } - - export interface LocatorSuggestLocationsParams { - categories: string[]; - distance: number; - location: Point; - text: string; - } - - export interface ClosestFacilityParametersAttributeParameterValues { - attributeName: string; - parameterName: string; - value: string; - } - - export interface PrintTemplateExportOptions { - width: number; - height: number; - dpi: number; - } - - export interface PrintTemplateLayoutOptions { - titleText: string; - authorText: string; - copyrightText: string; - scalebarUnit: string; - legendLayers: LegendLayer[]; - customTextElements: any[]; - } - - export interface ProjectParametersTransformation { - wkid: number; - } - - export interface QueryQuantizationParameters { - extent: Extent; - mode: string; - originPosition: string; - tolerance: number; - } - - export interface ConfigurationTaskGetDataWorkspaceDetailsParams { - dataWorkspaceId: string; - user: string; - } - - export interface ConfigurationTaskGetUserJobQueryDetailsParams { - queryId: number; - user: string; - } - export interface JobTaskAddEmbeddedAttachmentParams { jobId: number; form: any; @@ -1200,6 +1573,35 @@ declare namespace __esri { user: string; } + export interface JobUpdateParameters { + ownedBy: string; + assignedTo: string; + dataWorkspaceId: string; + description: string; + dueDate: Date; + loi: Geometry; + jobId: number; + name: string; + assignedType: string; + parentJobId: number; + parentVersion: string; + percent: number; + priority: number; + startDate: Date; + status: number; + versionName: string; + user: string; + } + + export interface ChangeRule { + description: string; + evaluators: any[]; + id: number; + name: string; + notifier: any; + summarize: boolean; + } + export interface NotificationTaskAddChangeRuleParams { rule: ChangeRule; user: string; @@ -1331,136 +1733,26 @@ declare namespace __esri { user: string; } - export interface MapViewConstraints { - lods?: LOD[]; - minScale?: number; - maxScale?: number; - minZoom?: number; - maxZoom?: number; - snapToZoom?: boolean; - rotationEnabled?: boolean; - effectiveLODs?: LOD[]; - effectiveMinZoom?: number; - effectiveMaxZoom?: number; - effectiveMinScale?: number; - effectiveMaxScale?: number; - } - - export interface MapViewGoToOptions { - animate?: boolean; - duration?: number; - easing?: string | Function; - } - - export interface MapViewHitTestScreenPoint { - x: number; - y: number; - } - - export interface SceneViewConstraintsProperties { - altitude?: SceneViewConstraintsAltitudeProperties; - clipDistance?: SceneViewConstraintsClipDistanceProperties; - collision?: SceneViewConstraintsCollision; - tilt?: SceneViewConstraintsTiltProperties; - } - export interface SceneViewConstraints extends Accessor { - altitude: SceneViewConstraintsAltitude; - clipDistance: SceneViewConstraintsClipDistance; - collision: SceneViewConstraintsCollision; - tilt: SceneViewConstraintsTilt; - } - - export interface SceneViewConstraintsAltitudeProperties { - min?: number; - max?: number; - } - export interface SceneViewConstraintsAltitude extends Accessor { - min: number; - max: number; - } - - export interface SceneViewConstraintsClipDistanceProperties { - near?: number; - far?: number; - mode?: string; - } - export interface SceneViewConstraintsClipDistance extends Accessor { - near: number; - far: number; - mode: string; - } - - export interface SceneViewConstraintsCollision { - enabled: boolean; - } - - export interface SceneViewConstraintsTiltProperties { - max?: number; - mode?: string; - } - export interface SceneViewConstraintsTilt extends Accessor { - max: number; - mode: string; - } - - export interface SceneViewEnvironmentProperties { - lighting?: SceneViewEnvironmentLightingProperties; - atmosphereEnabled?: boolean; - atmosphere?: SceneViewEnvironmentAtmosphereProperties; - starsEnabled?: boolean; - } - export interface SceneViewEnvironment extends Accessor { - lighting: SceneViewEnvironmentLighting; - atmosphereEnabled: boolean; - atmosphere: SceneViewEnvironmentAtmosphere; - starsEnabled: boolean; - } - - export interface SceneViewEnvironmentAtmosphereProperties { - quality?: string; - } - export interface SceneViewEnvironmentAtmosphere extends Accessor { - quality: string; - } - - export interface SceneViewEnvironmentLightingProperties { - date?: Date; - directShadowsEnabled?: boolean; - ambientOcclusionEnabled?: boolean; - cameraTrackingEnabled?: boolean; - } - export interface SceneViewEnvironmentLighting extends Accessor { - date: Date; - directShadowsEnabled: boolean; - ambientOcclusionEnabled: boolean; - cameraTrackingEnabled: boolean; - } - - export interface SceneViewGoToOptions { - animate?: boolean; - speedFactor?: number; - duration?: number; - maxDuration?: number; - easing?: string | EasingFunction; - } - - export interface SceneViewHitTestScreenPoint { - x: number; - y: number; - } - - export interface ViewPadding { - left: number; - top: number; - right: number; - bottom: number; - } - export interface ImageryLayerViewPixelData { - extent: Extent; + extent?: Extent; pixelBlock: PixelBlock; } + export interface StreamLayerViewDataReceivedEvent { + } + + export type StreamLayerViewDataReceivedEventHandler = (event: StreamLayerViewDataReceivedEvent) => void; + + export interface StreamLayerViewFilter { + geometry?: Extent; + where?: string; + } + + export interface StreamLayerViewUpdateFilterFilter { + geometry?: Extent; + where?: string; + } + export interface SlideApplyToOptions { animate: boolean; speedFactor?: number; @@ -1484,21 +1776,21 @@ declare namespace __esri { text?: string; } export interface SlideDescription extends Accessor { - text: string; + text?: string; } export interface SlideThumbnailProperties { url?: string; } export interface SlideThumbnail extends Accessor { - url: string; + url?: string; } export interface SlideTitleProperties { text?: string; } export interface SlideTitle extends Accessor { - text: string; + text?: string; } export interface SlideUpdateFromOptions { @@ -1523,14 +1815,14 @@ declare namespace __esri { } export interface LegendLayerInfos { - title: string; + title?: string; layer: Layer; } export interface PopupDockOptions { - breakpoint: any | boolean; - buttonEnabled: boolean; - position: string | Function; + breakpoint?: any | boolean; + buttonEnabled?: boolean; + position?: string | Function; } export interface PopupOpenOptions { @@ -1542,52 +1834,99 @@ declare namespace __esri { updateLocationEnabled?: boolean; } - export interface SearchSources extends Collection { - autoNavigate: boolean; - resultGraphicEnabled: boolean; - resultSymbol: Symbol; - popupEnabled: boolean; - suggestionsEnabled: boolean; - popup: Popup; - maxResults: number; - maxSuggestions: number; - minSuggestCharacters: number; - name: string; - outFields: string[]; - placeholder: string; - prefix: string; - searchExtent: Extent[]; - popupOpenOnSelect: boolean; - suffix: string; - withinViewEnabled: boolean; - zoomScale: number; + export interface SearchViewModelSearchCompleteEventResults { + results: SearchViewModelSearchCompleteEventResultsResults[]; + sourceIndex: number; + source: any[]; } - export interface SearchViewModelSources { - autoNavigate: boolean; - resultGraphicEnabled: boolean; - resultSymbol: Symbol; - popupEnabled: boolean; - suggestionsEnabled: boolean; - popup: Popup; - maxResults: number; - maxSuggestions: number; - minSuggestCharacters: number; + export interface SearchViewModelSearchCompleteEventResultsResults { + extent: Extent; + feature: Graphic; name: string; - outFields: string[]; - placeholder: string; - prefix: string; - searchExtent: Extent[]; - popupOpenOnSelect: boolean; - suffix: string; - withinViewEnabled: boolean; - zoomScale: number; + } + + export interface SearchViewModelSelectResultEventResult { + extent: Extent; + feature: Graphic; + name: string; + } + + export interface SearchViewModelSuggestCompleteEventResults { + results: SearchViewModelSuggestCompleteEventResultsResults[]; + sourceIndex: number; + source: any; + } + + export interface SearchViewModelSuggestCompleteEventResultsResults { + extent: Extent; + feature: Graphic; + name: string; + isCollection: boolean; + magicKey: string; + text: string; + } + + export interface SearchViewModelLoadEvent { + } + + export type SearchViewModelLoadEventHandler = (event: SearchViewModelLoadEvent) => void; + + export interface SearchViewModelSearchClearEvent { + } + + export type SearchViewModelSearchClearEventHandler = (event: SearchViewModelSearchClearEvent) => void; + + export interface SearchViewModelSearchCompleteEvent { + activeSourceIndex: number; + errors: Error[]; + numResults: number; + searchTerm: string; + results: SearchViewModelSearchCompleteEventResults[]; + } + + export type SearchViewModelSearchCompleteEventHandler = (event: SearchViewModelSearchCompleteEvent) => void; + + export interface SearchViewModelSearchStartEvent { + } + + export type SearchViewModelSearchStartEventHandler = (event: SearchViewModelSearchStartEvent) => void; + + export interface SearchViewModelSelectResultEvent { + result: SearchViewModelSelectResultEventResult; + source: any; + sourceIndex: number; + } + + export type SearchViewModelSelectResultEventHandler = (event: SearchViewModelSelectResultEvent) => void; + + export interface SearchViewModelSuggestCompleteEvent { + activeSourceIndex: number; + errors: Error[]; + numResults: number; + searchTerm: string; + results: SearchViewModelSuggestCompleteEventResults[]; + } + + export type SearchViewModelSuggestCompleteEventHandler = (event: SearchViewModelSuggestCompleteEvent) => void; + + export interface SearchViewModelSuggestStartEvent { + } + + export type SearchViewModelSuggestStartEventHandler = (event: SearchViewModelSuggestStartEvent) => void; + + export interface DynamicLayerFetchImageOptions { + allowImageDataAccess?: boolean; + rotation?: number; + pixelRatio?: number; + } + + export interface DynamicLayerGetImageUrlOptions { + pixelRatio?: number; + rotation?: number; } export interface ArcGISDynamicMapServiceGetExportImageParametersOptions { - extent: Extent; - width: number; - height: number; rotation?: number; } @@ -1605,37 +1944,37 @@ declare namespace __esri { } export interface configRequest { - corsDetection: boolean; - corsDetectionTimeout: number; - corsEnabledServers: Array; - forceProxy: boolean; - httpsDomains: string[]; - maxUrlLength: number; - proxyUrl: string; - timeout: number; - useCors: string | boolean; - proxyRules: configRequestProxyRules[]; + corsDetection?: boolean; + corsDetectionTimeout?: number; + corsEnabledServers?: Array; + forceProxy?: boolean; + httpsDomains?: string[]; + maxUrlLength?: number; + proxyUrl?: string; + timeout?: number; + useCors?: string | boolean; + proxyRules?: configRequestProxyRules[]; } export interface configRequestCorsEnabledServers { - host: string; - withCredentials: boolean; + host?: string; + withCredentials?: boolean; } export interface configRequestProxyRules { - proxyUrl: string; - urlPrefix: string; + proxyUrl?: string; + urlPrefix?: string; } export interface configWorkers { - loaderConfig: configWorkersLoaderConfig; + loaderConfig?: configWorkersLoaderConfig; } export interface configWorkersLoaderConfig { - has: any; - paths: any; - map: any; - packages: any[]; + has?: any; + paths?: any; + map?: any; + packages?: any[]; } export interface requestEsriRequestOptions { @@ -1645,16 +1984,31 @@ declare namespace __esri { headers?: any; timeout?: number; method?: string; + body?: any | any | string; useProxy?: boolean; cacheBust?: boolean; allowImageDataAccess?: boolean; } + export interface EachAlwaysResult { + promise: IPromise; + value: any; + error: any; + } + export interface urlUtilsAddProxyRuleRule { proxyUrl: string; urlPrefix: string; } + export type EventAttachedCallback = (target: any, propName: string, obj: Accessor, eventName: string) => void; + + export interface PausableWatchHandle { + remove(): void; + pause(): void; + resume(): void; + } + export interface decoratorsPropertyPropertyMetadata { dependsOn?: string[]; type?: Function; @@ -1678,6 +2032,7 @@ declare namespace __esri { defaultSymbolEnabled?: boolean; view?: SceneView; symbolType?: string; + colorMixMode?: string; } export interface colorCreateContinuousRendererParamsLegendOptions { @@ -1709,6 +2064,7 @@ declare namespace __esri { locationScheme?: any | any | any; view?: SceneView; symbolType?: string; + colorMixMode?: string; } export interface sizeCreateContinuousRendererParams { @@ -1749,6 +2105,25 @@ declare namespace __esri { title: string; } + export interface typeCreateRendererParams { + layer: FeatureLayer | SceneLayer; + field: string; + basemap?: string | Basemap; + numTypes?: number; + sortBy?: string; + typeScheme?: any | any | any; + legendOptions?: typeCreateRendererParamsLegendOptions; + defaultSymbolEnabled?: boolean; + view?: SceneView; + symbolType?: string; + statistics?: any; + colorMixMode?: string; + } + + export interface typeCreateRendererParamsLegendOptions { + title: string; + } + export interface univariateColorSizeCreateContinuousRendererParams { layer: FeatureLayer | SceneLayer; basemap?: string | Basemap; @@ -1848,6 +2223,13 @@ declare namespace __esri { maxValue?: number; } + export interface uniqueValuesUniqueValuesParams { + layer: FeatureLayer | SceneLayer; + field: string; + features?: Graphic[]; + returnAllCodedValues?: boolean; + } + export interface colorGetSchemesParams { basemap: string | Basemap; geometryType: string; @@ -1870,6 +2252,238 @@ declare namespace __esri { worldScale?: boolean; } + export interface typeGetSchemesParams { + basemap: string | Basemap; + geometryType: string; + worldScale?: boolean; + view?: SceneView; + } + + export interface JobQuery { + id: number; + name: string; + } + + export interface GroupMembership { + id: number; + name: string; + } + + export interface JobQueryContainer { + containers: JobQueryContainer[]; + id: number; + name: string; + queries: JobQuery[]; + } + + export interface Privilege { + description: string; + id: number; + name: string; + } + + export interface DataWorkspace { + id: string; + name: string; + } + + export interface HoldType { + description: string; + id: number; + name: string; + } + + export interface JobPriority { + description: string; + name: string; + value: number; + } + + export interface JobStatus { + caption: string; + description: string; + id: number; + name: string; + } + + export interface JobType { + category: string; + description: string; + id: string; + name: string; + state: string; + } + + export interface ActivityType { + desription: string; + id: number; + message: string; + name: string; + } + + export interface NotificationType { + attachJobAttachments: boolean; + id: number; + message: string; + senderEmail: string; + senderName: string; + subject: string; + subscribers: string[]; + type: string; + } + + export interface AuxRecord { + displayProperty: any; + id: number; + recordvalues: AuxRecordValue; + } + + export interface AuxRecordValue { + filter: string; + alias: string; + data: any; + dataType: string; + displayOrder: number; + displayType: string; + domain: string; + canUpdate: boolean; + length: number; + name: string; + required: boolean; + tableListClass: string; + tableListDisplayField: string; + tableListStoreField: string; + userVisible: boolean; + } + + export interface JobVersionInfo { + dataWorkspaceId: string; + name: string; + parent: string; + created: boolean; + owner: string; + } + + export interface QueryFieldInfo { + alias: string; + length: string; + name: string; + type: string; + } + + export interface DatasetConfiguration { + changeCondition: number; + changeFields: string; + dataset: string; + dataWorkspaceId: string; + name: string; + whereConditions: WhereCondition[]; + } + + export interface WhereCondition { + compareValue: any; + field: string; + operator: string; + } + + export interface ReportDataGroup { + aggregateLabel: string; + aggregateValue: string; + row: string[]; + value: string; + } + + export interface WorkflowConflicts { + jobID: number; + options: WorkflowOption[]; + spawnsConcurrency: boolean; + stepId: number; + } + + export interface WorkflowOption { + returnCode: number; + steps: WorkflowStepInfo[]; + } + + export interface WorkflowStepInfo { + id: number; + name: string; + } + + export interface StepType { + program: string; + arguments: string; + executionType: string; + id: number; + name: string; + description: string; + stepDescriptionLink: string; + stepDescriptionType: string; + stepIndicatorType: string; + supportedPlatform: string; + visible: boolean; + } + + export interface WorkflowAnnotationDisplayDetails { + centerX: number; + centerY: number; + fillColor: any; + height: number; + label: string; + labelColor: any; + OutlineColor: any; + width: number; + } + + export interface WorkflowPathDisplayDetails { + destStepId: number; + sourceStepID: number; + label: string; + labelColor: any; + labelX: number; + labelY: number; + lineColor: any; + pathObject: any; + } + + export interface WorkflowStepDisplayDetails { + labelColor: any; + centerX: number; + fillColor: any; + height: number; + label: string; + centerY: number; + OutlineColor: any; + shape: string; + stepId: number; + stepType: string; + width: number; + } + + export interface ColorAndIntensity { + color: any; + intensity: number; + } + + export interface RenderCamera { + viewMatrix: any; + viewInverseTransposeMatrix: any; + projectionMatrix: any; + eye: any; + center: any; + up: any; + near: number; + far: number; + fovX: number; + fovY: number; + } + + export interface SunLight { + direction: any; + diffuse: ColorAndIntensity; + ambient: ColorAndIntensity; + } + interface Basemap extends Accessor, Loadable, JSONSupport { baseLayers: Collection; id: string; @@ -1879,7 +2493,7 @@ declare namespace __esri { thumbnailUrl: string; title: string; - clone(): Basemap; + clone(): this; } interface BasemapConstructor { @@ -1909,7 +2523,7 @@ declare namespace __esri { position: Point; tilt: number; - clone(): Camera; + clone(): this; } interface CameraConstructor { @@ -1933,7 +2547,7 @@ declare namespace __esri { g: number; r: number; - clone(): Color; + clone(): this; setColor(color: string | number[] | any): Color; toCss(includeAlpha?: boolean): string; toHex(): string; @@ -1946,7 +2560,7 @@ declare namespace __esri { blendColors(start: Color, end: Color, weight: number, obj?: Color): Color; new(color: string | number[] | any): Color; - fromArray(a: number, obj?: Color): Color; + fromArray(a: number[], obj?: Color): Color; fromHex(color: string, obj?: Color): Color; fromJSON(json: any): Color; fromRgb(color: string, obj?: Color): Color; @@ -1963,7 +2577,7 @@ declare namespace __esri { symbol: Symbol; visible: boolean; - clone(): Graphic; + clone(): this; getAttribute(name: string): any; getEffectivePopupTemplate(): PopupTemplate; setAttribute(name: string, newValue: any): void; @@ -1989,7 +2603,7 @@ declare namespace __esri { interface Ground extends Accessor { layers: Collection; - clone(): Ground; + clone(): this; queryElevation(geometry: Point | Multipoint | Polyline, options?: GroundQueryElevationOptions): IPromise; } @@ -2024,11 +2638,12 @@ declare namespace __esri { interface PopupTemplate extends Accessor, JSONSupport { actions: Collection; content: string; + expressionInfos: PopupTemplateExpressionInfos[]; fieldInfos: PopupTemplateFieldInfos[]; overwriteActions: boolean; title: string; - clone(): PopupTemplate; + clone(): this; } interface PopupTemplateConstructor { @@ -2041,7 +2656,8 @@ declare namespace __esri { interface PopupTemplateProperties { actions?: Collection | any[]; - content?: string | any[] | Function; + content?: string | any[] | Function | IPromise; + expressionInfos?: PopupTemplateExpressionInfos[]; fieldInfos?: PopupTemplateFieldInfos[]; overwriteActions?: boolean; title?: string | Function; @@ -2053,7 +2669,7 @@ declare namespace __esri { scale: number; targetGeometry: Geometry; - clone(): Viewpoint; + clone(): this; } interface ViewpointConstructor { @@ -2153,7 +2769,7 @@ declare namespace __esri { add(item: any, index?: number): void; addMany(items: any[] | Collection, index?: number): void; - clone(): Collection; + clone(): this; concat(value: any[] | Collection): Collection; every(callback: ItemTestCallback): boolean; filter(callback: ItemTestCallback): Collection; @@ -2290,7 +2906,7 @@ declare namespace __esri { spatialReference: SpatialReference; type: string; - clone(): Geometry; + clone(): this; } interface GeometryConstructor { @@ -2443,7 +3059,7 @@ declare namespace __esri { wkid: number; wkt: string; - clone(): SpatialReference; + clone(): this; equals(spatialReference: SpatialReference): boolean; } @@ -2505,7 +3121,7 @@ declare namespace __esri { findServerInfo(url: string): ServerInfo; generateToken(serverInfo: ServerInfo, userInfo: any, options?: IdentityManagerBaseGenerateTokenOptions): IPromise; getCredential(url: string, options?: IdentityManagerBaseGetCredentialOptions): IPromise; - initialize(json: any): any; + initialize(json: any): void; isBusy(): boolean; oAuthSignIn(resUrl: string, serverInfo: ServerInfo, oAuthInfo: OAuthInfo, options?: IdentityManagerBaseOAuthSignInOptions): IPromise; registerOAuthInfos(oAuthInfos: OAuthInfo[]): void; @@ -2528,6 +3144,11 @@ declare namespace __esri { setOAuthRedirectionHandler(handlerFunction: HandlerCallback): void; setOAuthResponseHash(hash: string): void; + + on(name: "credential-create", eventHandler: IdentityManagerCredentialCreateEventHandler): IHandle; + on(name: "credential-create", modifiers: string[], eventHandler: IdentityManagerCredentialCreateEventHandler): IHandle; + on(name: "credentials-destroy", eventHandler: IdentityManagerCredentialsDestroyEventHandler): IHandle; + on(name: "credentials-destroy", modifiers: string[], eventHandler: IdentityManagerCredentialsDestroyEventHandler): IHandle; } interface IdentityManagerConstructor { @@ -2536,7 +3157,7 @@ declare namespace __esri { export const IdentityManager: IdentityManagerConstructor; - interface OAuthInfo { + interface OAuthInfo extends Accessor, JSONSupport { appId: string; authNamespace: string; expiration: number; @@ -2546,38 +3167,142 @@ declare namespace __esri { popupCallbackUrl: string; popupWindowFeatures: string; portalUrl: string; - showSocialLogins: boolean; - toJSON(): any; + clone(): this; } interface OAuthInfoConstructor { - new(properties?: any): OAuthInfo; + new(properties?: OAuthInfoProperties): OAuthInfo; + + fromJSON(json: any): OAuthInfo; } export const OAuthInfo: OAuthInfoConstructor; - interface ServerInfo { + interface OAuthInfoProperties { + appId?: string; + authNamespace?: string; + expiration?: number; + locale?: string; + minTimeUntilExpiration?: number; + popup?: boolean; + popupCallbackUrl?: string; + popupWindowFeatures?: string; + portalUrl?: string; + } + + interface ServerInfo extends Accessor, JSONSupport { adminTokenServiceUrl: string; currentVersion: number; server: string; shortLivedTokenValidity: number; tokenServiceUrl: string; - - toJSON(): any; } interface ServerInfoConstructor { - new(properties?: any): ServerInfo; + new(properties?: ServerInfoProperties): ServerInfo; + + fromJSON(json: any): ServerInfo; } export const ServerInfo: ServerInfoConstructor; + interface ServerInfoProperties { + adminTokenServiceUrl?: string; + currentVersion?: number; + server?: string; + shortLivedTokenValidity?: number; + tokenServiceUrl?: string; + } + + interface BaseElevationLayer extends Layer { + spatialReference: SpatialReference; + tileInfo: TileInfo; + + addResolvingPromise(promiseToLoad: IPromise): IPromise; + fetchTile(level: number, row: number, column: number, options?: BaseElevationLayerFetchTileOptions): IPromise; + getTileBounds(level: number, row: number, column: number, out?: number[]): number[]; + + on(name: "layerview-create", eventHandler: BaseElevationLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: BaseElevationLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: BaseElevationLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: BaseElevationLayerLayerviewDestroyEventHandler): IHandle; + } + + interface BaseElevationLayerConstructor { + new(properties?: BaseElevationLayerProperties): BaseElevationLayer; + } + + export const BaseElevationLayer: BaseElevationLayerConstructor; + + interface BaseElevationLayerProperties extends LayerProperties { + spatialReference?: SpatialReferenceProperties; + tileInfo?: TileInfoProperties; + } + + interface CSVLayer extends Layer { + copyright: string; + delimiter: string; + elevationInfo: CSVLayerElevationInfo; + featureReduction: CSVLayerFeatureReduction; + fields: Field[]; + labelingInfo: LabelClass[]; + labelsVisible: boolean; + latitudeField: string; + legendEnabled: boolean; + longitudeField: string; + maxScale: number; + minScale: number; + outFields: string[]; + popupEnabled: boolean; + popupTemplate: PopupTemplate; + renderer: Renderer; + screenSizePerspectiveEnabled: boolean; + url: string; + + on(name: "layerview-create", eventHandler: CSVLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: CSVLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: CSVLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: CSVLayerLayerviewDestroyEventHandler): IHandle; + } + + interface CSVLayerConstructor { + new(properties?: CSVLayerProperties): CSVLayer; + } + + export const CSVLayer: CSVLayerConstructor; + + interface CSVLayerProperties extends LayerProperties { + copyright?: string; + delimiter?: string; + elevationInfo?: CSVLayerElevationInfo; + featureReduction?: CSVLayerFeatureReduction; + fields?: FieldProperties[]; + labelingInfo?: LabelClassProperties[]; + labelsVisible?: boolean; + latitudeField?: string; + legendEnabled?: boolean; + longitudeField?: string; + maxScale?: number; + minScale?: number; + outFields?: string[]; + popupEnabled?: boolean; + popupTemplate?: PopupTemplateProperties; + renderer?: RendererProperties; + screenSizePerspectiveEnabled?: boolean; + url?: string; + } + interface ElevationLayer extends Layer, ArcGISMapService, ArcGISCachedService, PortalLayer, TiledLayer { url: string; fetchTile(level: number, row: number, column: number, noDataValue?: number): IPromise; queryElevation(geometry: Point | Multipoint | Polyline, options?: ElevationLayerQueryElevationOptions): IPromise; + + on(name: "layerview-create", eventHandler: ElevationLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: ElevationLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: ElevationLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: ElevationLayerLayerviewDestroyEventHandler): IHandle; } interface ElevationLayerConstructor { @@ -2592,118 +3317,13 @@ declare namespace __esri { url?: string; } - interface ImageryLayer extends Layer, ArcGISImageService, ScaleRangeLayer { - pixelFilter: Function; - popupEnabled: boolean; - portalItem: PortalItem; - token: string; - - redraw(): void; - } - - interface ImageryLayerConstructor { - new(properties?: ImageryLayerProperties): ImageryLayer; - - fromJSON(json: any): ImageryLayer; - } - - export const ImageryLayer: ImageryLayerConstructor; - - interface ImageryLayerProperties extends LayerProperties, ArcGISImageServiceProperties, ScaleRangeLayerProperties { - pixelFilter?: Function; - popupEnabled?: boolean; - portalItem?: PortalItemProperties; - token?: string; - } - - interface MapImageLayer extends Layer, ArcGISMapService, ArcGISDynamicMapService, DynamicLayer { - } - - interface MapImageLayerConstructor { - new(properties?: MapImageLayerProperties): MapImageLayer; - - fromJSON(json: any): MapImageLayer; - } - - export const MapImageLayer: MapImageLayerConstructor; - - interface MapImageLayerProperties extends LayerProperties, ArcGISMapServiceProperties, ArcGISDynamicMapServiceProperties, DynamicLayerProperties { - - } - - interface TileLayer extends Layer, ArcGISMapService, ArcGISCachedService, PortalLayer, TiledLayer { - attributionDataUrl: string; - hasAttributionData: boolean; - legendEnabled: boolean; - tileServers: string[]; - url: string; - } - - interface TileLayerConstructor { - new(properties?: TileLayerProperties): TileLayer; - - fromJSON(json: any): TileLayer; - } - - export const TileLayer: TileLayerConstructor; - - interface TileLayerProperties extends LayerProperties, ArcGISMapServiceProperties, ArcGISCachedServiceProperties, PortalLayerProperties, TiledLayerProperties { - attributionDataUrl?: string; - hasAttributionData?: boolean; - legendEnabled?: boolean; - tileServers?: string[]; - url?: string; - } - - interface CSVLayer extends Layer { - copyright: string; - delimiter: string; - elevationInfo: CSVLayerElevationInfo; - fields: Field[]; - labelingInfo: LabelClass[]; - labelsVisible: boolean; - latitudeField: string; - legendEnabled: boolean; - longitudeField: string; - maxScale: number; - minScale: number; - outFields: string[]; - popupEnabled: boolean; - popupTemplate: PopupTemplate; - renderer: Renderer; - url: string; - } - - interface CSVLayerConstructor { - new(properties?: CSVLayerProperties): CSVLayer; - } - - export const CSVLayer: CSVLayerConstructor; - - interface CSVLayerProperties extends LayerProperties { - copyright?: string; - delimiter?: string; - elevationInfo?: CSVLayerElevationInfo; - fields?: FieldProperties[]; - labelingInfo?: LabelClassProperties[]; - labelsVisible?: boolean; - latitudeField?: string; - legendEnabled?: boolean; - longitudeField?: string; - maxScale?: number; - minScale?: number; - outFields?: string[]; - popupEnabled?: boolean; - popupTemplate?: PopupTemplateProperties; - renderer?: RendererProperties; - url?: string; - } - interface FeatureLayer extends Layer, PortalLayer, ScaleRangeLayer { capabilities: FeatureLayerCapabilities; copyright: string; definitionExpression: string; + displayField: string; elevationInfo: FeatureLayerElevationInfo; + featureReduction: FeatureLayerFeatureReduction; fields: Field[]; gdbVersion: string; geometryType: string; @@ -2721,9 +3341,13 @@ declare namespace __esri { renderer: Renderer; returnM: boolean; returnZ: boolean; + screenSizePerspectiveEnabled: boolean; source: Collection; spatialReference: SpatialReference; + templates: FeatureTemplate[]; token: string; + typeIdField: string; + types: FeatureType[]; url: string; version: number; @@ -2734,6 +3358,11 @@ declare namespace __esri { queryFeatureCount(params?: Query): IPromise; queryFeatures(params?: Query): IPromise; queryObjectIds(params?: Query): IPromise; + + on(name: "layerview-create", eventHandler: FeatureLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: FeatureLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: FeatureLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: FeatureLayerLayerviewDestroyEventHandler): IHandle; } interface FeatureLayerConstructor { @@ -2748,7 +3377,9 @@ declare namespace __esri { capabilities?: FeatureLayerCapabilities; copyright?: string; definitionExpression?: string; + displayField?: string; elevationInfo?: FeatureLayerElevationInfo; + featureReduction?: FeatureLayerFeatureReduction; fields?: FieldProperties[]; gdbVersion?: string; geometryType?: string; @@ -2766,9 +3397,13 @@ declare namespace __esri { renderer?: RendererProperties; returnM?: boolean; returnZ?: boolean; + screenSizePerspectiveEnabled?: boolean; source?: Collection | any[]; spatialReference?: SpatialReferenceProperties; + templates?: FeatureTemplateProperties[]; token?: string; + typeIdField?: string; + types?: FeatureTypeProperties[]; url?: string; version?: number; } @@ -2778,6 +3413,11 @@ declare namespace __esri { pointSymbol: PictureMarkerSymbol; polygonSymbol: SimpleFillSymbol; url: string; + + on(name: "layerview-create", eventHandler: GeoRSSLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: GeoRSSLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: GeoRSSLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: GeoRSSLayerLayerviewDestroyEventHandler): IHandle; } interface GeoRSSLayerConstructor { @@ -2796,12 +3436,18 @@ declare namespace __esri { interface GraphicsLayer extends Layer, ScaleRangeLayer { elevationInfo: GraphicsLayerElevationInfo; graphics: Collection; + screenSizePerspectiveEnabled: boolean; add(graphic: Graphic): void; addMany(graphics: Graphic[]): void; remove(graphic: Graphic): void; removeAll(): void; removeMany(graphics: Graphic[]): void; + + on(name: "layerview-create", eventHandler: GraphicsLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: GraphicsLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: GraphicsLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: GraphicsLayerLayerviewDestroyEventHandler): IHandle; } interface GraphicsLayerConstructor { @@ -2813,10 +3459,16 @@ declare namespace __esri { interface GraphicsLayerProperties extends LayerProperties, ScaleRangeLayerProperties { elevationInfo?: GraphicsLayerElevationInfo; graphics?: Collection | any[]; + screenSizePerspectiveEnabled?: boolean; } - interface GroupLayer extends Layer, LayersMixin, JSONSupport, PortalLayer { + interface GroupLayer extends Layer, LayersMixin, PortalLayer { visibilityMode: string; + + on(name: "layerview-create", eventHandler: GroupLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: GroupLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: GroupLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: GroupLayerLayerviewDestroyEventHandler): IHandle; } interface GroupLayerConstructor { @@ -2831,7 +3483,40 @@ declare namespace __esri { visibilityMode?: string; } + interface ImageryLayer extends Layer, ArcGISImageService, ScaleRangeLayer { + pixelFilter: Function; + popupEnabled: boolean; + portalItem: PortalItem; + token: string; + + redraw(): void; + + on(name: "layerview-create", eventHandler: ImageryLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: ImageryLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: ImageryLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: ImageryLayerLayerviewDestroyEventHandler): IHandle; + } + + interface ImageryLayerConstructor { + new(properties?: ImageryLayerProperties): ImageryLayer; + + fromJSON(json: any): ImageryLayer; + } + + export const ImageryLayer: ImageryLayerConstructor; + + interface ImageryLayerProperties extends LayerProperties, ArcGISImageServiceProperties, ScaleRangeLayerProperties { + pixelFilter?: Function; + popupEnabled?: boolean; + portalItem?: PortalItemProperties; + token?: string; + } + interface IntegratedMeshLayer extends Layer, SceneService, PortalLayer { + on(name: "layerview-create", eventHandler: IntegratedMeshLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: IntegratedMeshLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: IntegratedMeshLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: IntegratedMeshLayerLayerviewDestroyEventHandler): IHandle; } interface IntegratedMeshLayerConstructor { @@ -2880,7 +3565,49 @@ declare namespace __esri { visible?: boolean; } + interface MapImageLayer extends Layer, ArcGISMapService, ArcGISDynamicMapService, DynamicLayer { + on(name: "layerview-create", eventHandler: MapImageLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: MapImageLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: MapImageLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: MapImageLayerLayerviewDestroyEventHandler): IHandle; + } + + interface MapImageLayerConstructor { + new(properties?: MapImageLayerProperties): MapImageLayer; + + fromJSON(json: any): MapImageLayer; + } + + export const MapImageLayer: MapImageLayerConstructor; + + interface MapImageLayerProperties extends LayerProperties, ArcGISMapServiceProperties, ArcGISDynamicMapServiceProperties, DynamicLayerProperties { + + } + + interface MapNotesLayer extends Layer, PortalLayer { + on(name: "layerview-create", eventHandler: MapNotesLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: MapNotesLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: MapNotesLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: MapNotesLayerLayerviewDestroyEventHandler): IHandle; + } + + interface MapNotesLayerConstructor { + new(properties?: MapNotesLayerProperties): MapNotesLayer; + + fromJSON(json: any): MapNotesLayer; + } + + export const MapNotesLayer: MapNotesLayerConstructor; + + interface MapNotesLayerProperties extends LayerProperties, PortalLayerProperties { + + } + interface OpenStreetMapLayer extends WebTileLayer { + on(name: "layerview-create", eventHandler: OpenStreetMapLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: OpenStreetMapLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: OpenStreetMapLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: OpenStreetMapLayerLayerviewDestroyEventHandler): IHandle; } interface OpenStreetMapLayerConstructor { @@ -2896,8 +3623,14 @@ declare namespace __esri { } interface PointCloudLayer extends Layer, SceneService, PortalLayer { + elevationInfo: PointCloudLayerElevationInfo; fields: Field[]; renderer: PointCloudRenderer; + + on(name: "layerview-create", eventHandler: PointCloudLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: PointCloudLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: PointCloudLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: PointCloudLayerLayerviewDestroyEventHandler): IHandle; } interface PointCloudLayerConstructor { @@ -2909,6 +3642,7 @@ declare namespace __esri { export const PointCloudLayer: PointCloudLayerConstructor; interface PointCloudLayerProperties extends LayerProperties, SceneServiceProperties, PortalLayerProperties { + elevationInfo?: PointCloudLayerElevationInfo; fields?: FieldProperties[]; renderer?: PointCloudRendererProperties; } @@ -2916,6 +3650,7 @@ declare namespace __esri { interface SceneLayer extends Layer, SceneService, PortalLayer { definitionExpression: string; elevationInfo: SceneLayerElevationInfo; + featureReduction: SceneLayerFeatureReduction; fields: Field[]; geometryType: string; labelingInfo: LabelClass[]; @@ -2925,6 +3660,7 @@ declare namespace __esri { popupEnabled: boolean; popupTemplate: PopupTemplate; renderer: Renderer; + screenSizePerspectiveEnabled: boolean; createQuery(): Query; getFieldUsageInfo(fieldName: string): any; @@ -2932,6 +3668,11 @@ declare namespace __esri { queryFeatureCount(params?: Query): IPromise; queryFeatures(params?: Query): IPromise; queryObjectIds(params?: Query): IPromise; + + on(name: "layerview-create", eventHandler: SceneLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: SceneLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: SceneLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: SceneLayerLayerviewDestroyEventHandler): IHandle; } interface SceneLayerConstructor { @@ -2945,6 +3686,7 @@ declare namespace __esri { interface SceneLayerProperties extends LayerProperties, SceneServiceProperties, PortalLayerProperties { definitionExpression?: string; elevationInfo?: SceneLayerElevationInfo; + featureReduction?: SceneLayerFeatureReduction; fields?: FieldProperties[]; geometryType?: string; labelingInfo?: LabelClassProperties[]; @@ -2954,6 +3696,7 @@ declare namespace __esri { popupEnabled?: boolean; popupTemplate?: PopupTemplateProperties; renderer?: RendererProperties; + screenSizePerspectiveEnabled?: boolean; } interface StreamLayer extends FeatureLayer { @@ -2963,6 +3706,11 @@ declare namespace __esri { purgeOptions: StreamLayerPurgeOptions; updateFilter(filterChanges: StreamLayerUpdateFilterFilterChanges): IPromise; + + on(name: "layerview-create", eventHandler: StreamLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: StreamLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: StreamLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: StreamLayerLayerviewDestroyEventHandler): IHandle; } interface StreamLayerConstructor { @@ -2980,7 +3728,43 @@ declare namespace __esri { purgeOptions?: StreamLayerPurgeOptions; } + interface TileLayer extends Layer, ArcGISMapService, ArcGISCachedService, PortalLayer, TiledLayer { + attributionDataUrl: string; + hasAttributionData: boolean; + legendEnabled: boolean; + tileServers: string[]; + url: string; + + fetchTile(level: number, row: number, column: number, options?: TileLayerFetchTileOptions): IPromise; + getTileUrl(level: number, row: number, col: number): string; + + on(name: "layerview-create", eventHandler: TileLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: TileLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: TileLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: TileLayerLayerviewDestroyEventHandler): IHandle; + } + + interface TileLayerConstructor { + new(properties?: TileLayerProperties): TileLayer; + + fromJSON(json: any): TileLayer; + } + + export const TileLayer: TileLayerConstructor; + + interface TileLayerProperties extends LayerProperties, ArcGISMapServiceProperties, ArcGISCachedServiceProperties, PortalLayerProperties, TiledLayerProperties { + attributionDataUrl?: string; + hasAttributionData?: boolean; + legendEnabled?: boolean; + tileServers?: string[]; + url?: string; + } + interface UnknownLayer extends Layer { + on(name: "layerview-create", eventHandler: UnknownLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: UnknownLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: UnknownLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: UnknownLayerLayerviewDestroyEventHandler): IHandle; } interface UnknownLayerConstructor { @@ -2994,6 +3778,10 @@ declare namespace __esri { } interface UnsupportedLayer extends Layer { + on(name: "layerview-create", eventHandler: UnsupportedLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: UnsupportedLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: UnsupportedLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: UnsupportedLayerLayerviewDestroyEventHandler): IHandle; } interface UnsupportedLayerConstructor { @@ -3012,6 +3800,13 @@ declare namespace __esri { spatialReference: SpatialReference; token: string; url: string; + + loadStyle(style: string | any): IPromise; + + on(name: "layerview-create", eventHandler: VectorTileLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: VectorTileLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: VectorTileLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: VectorTileLayerLayerviewDestroyEventHandler): IHandle; } interface VectorTileLayerConstructor { @@ -3036,6 +3831,11 @@ declare namespace __esri { subDomains: string[]; tileServers: string[]; urlTemplate: string; + + on(name: "layerview-create", eventHandler: WebTileLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: WebTileLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: WebTileLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: WebTileLayerLayerviewDestroyEventHandler): IHandle; } interface WebTileLayerConstructor { @@ -3054,16 +3854,151 @@ declare namespace __esri { urlTemplate?: string; } + interface WMSLayer extends Layer, PortalLayer { + copyright: string; + customLayerParameters: any; + customParameters: any; + description: string; + featureInfoFormat: string; + featureInfoUrl: string; + fullExtents: Extent[]; + imageFormat: string; + imageMaxHeight: number; + imageMaxWidth: number; + imageTransparency: boolean; + spatialReference: SpatialReference; + spatialReferences: number[]; + sublayers: Collection; + version: string; + + fetchImage(extent: Extent, width: number, height: number, options?: WMSLayerFetchImageOptions): IPromise; + findSublayerById(id: number): WMSSublayer; + + on(name: "layerview-create", eventHandler: WMSLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: WMSLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: WMSLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: WMSLayerLayerviewDestroyEventHandler): IHandle; + } + + interface WMSLayerConstructor { + new(properties?: WMSLayerProperties): WMSLayer; + + fromJSON(json: any): WMSLayer; + } + + export const WMSLayer: WMSLayerConstructor; + + interface WMSLayerProperties extends LayerProperties, PortalLayerProperties { + copyright?: string; + customLayerParameters?: any; + customParameters?: any; + description?: string; + featureInfoFormat?: string; + featureInfoUrl?: string; + fullExtents?: ExtentProperties[]; + imageFormat?: string; + imageMaxHeight?: number; + imageMaxWidth?: number; + imageTransparency?: boolean; + spatialReference?: SpatialReferenceProperties; + spatialReferences?: number[]; + sublayers?: Collection | any[]; + version?: string; + } + + interface WMTSLayer extends Layer, PortalLayer { + activeLayer: WMTSSublayer; + copyright: string; + customLayerParameters: any; + customParameters: any; + serviceMode: string; + sublayers: Collection; + url: string; + version: string; + + findSublayerById(id: string): WMTSSublayer; + + on(name: "layerview-create", eventHandler: WMTSLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: WMTSLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: WMTSLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: WMTSLayerLayerviewDestroyEventHandler): IHandle; + } + + interface WMTSLayerConstructor { + new(properties?: WMTSLayerProperties): WMTSLayer; + + fromJSON(json: any): WMTSLayer; + } + + export const WMTSLayer: WMTSLayerConstructor; + + interface WMTSLayerProperties extends LayerProperties, PortalLayerProperties { + activeLayer?: WMTSSublayerProperties; + copyright?: string; + customLayerParameters?: any; + customParameters?: any; + serviceMode?: string; + sublayers?: Collection | any[]; + url?: string; + version?: string; + } + + interface BaseDynamicLayer extends Layer { + addResolvingPromise(promiseToLoad: IPromise): IPromise; + fetchImage(extent: Extent, width: number, height: number, options?: BaseDynamicLayerFetchImageOptions): IPromise; + getImageUrl(extent: Extent, width: number, height: number): IPromise | string; + + on(name: "layerview-create", eventHandler: BaseDynamicLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: BaseDynamicLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: BaseDynamicLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: BaseDynamicLayerLayerviewDestroyEventHandler): IHandle; + } + + interface BaseDynamicLayerConstructor { + new(properties?: BaseDynamicLayerProperties): BaseDynamicLayer; + } + + export const BaseDynamicLayer: BaseDynamicLayerConstructor; + + interface BaseDynamicLayerProperties extends LayerProperties { + + } + + interface BaseTileLayer extends Layer { + spatialReference: SpatialReference; + tileInfo: TileInfo; + + addResolvingPromise(promiseToLoad: IPromise): IPromise; + fetchTile(level: number, row: number, column: number, options?: BaseTileLayerFetchTileOptions): IPromise; + getTileBounds(level: number, row: number, column: number, out?: number[]): number[]; + getTileUrl(level: number, row: number, column: number): string | IPromise; + + on(name: "layerview-create", eventHandler: BaseTileLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: BaseTileLayerLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: BaseTileLayerLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: BaseTileLayerLayerviewDestroyEventHandler): IHandle; + } + + interface BaseTileLayerConstructor { + new(properties?: BaseTileLayerProperties): BaseTileLayer; + } + + export const BaseTileLayer: BaseTileLayerConstructor; + + interface BaseTileLayerProperties extends LayerProperties { + spatialReference?: SpatialReferenceProperties; + tileInfo?: TileInfoProperties; + } + interface CodedValueDomain extends Domain { codedValues: CodedValueDomainCodedValues[]; + + getName(code: string | number): string; } interface CodedValueDomainConstructor { new(properties?: CodedValueDomainProperties): CodedValueDomain; - - getName(code: string | number): string; - fromJSON(json: any): CodedValueDomain; } @@ -3134,6 +4069,52 @@ declare namespace __esri { type?: string; } + interface FeatureTemplate extends Accessor, JSONSupport { + description: string; + drawingTool: string; + name: string; + prototype: any; + thumbnail: FeatureTemplateThumbnail; + } + + interface FeatureTemplateConstructor { + new(properties?: FeatureTemplateProperties): FeatureTemplate; + + fromJSON(json: any): FeatureTemplate; + } + + export const FeatureTemplate: FeatureTemplateConstructor; + + interface FeatureTemplateProperties { + description?: string; + drawingTool?: string; + name?: string; + prototype?: any; + thumbnail?: FeatureTemplateThumbnail; + } + + interface FeatureType extends Accessor, JSONSupport { + domains: any; + id: number | string; + name: string; + templates: FeatureTemplate[]; + } + + interface FeatureTypeConstructor { + new(properties?: FeatureTypeProperties): FeatureType; + + fromJSON(json: any): FeatureType; + } + + export const FeatureType: FeatureTypeConstructor; + + interface FeatureTypeProperties { + domains?: any; + id?: number | string; + name?: string; + templates?: FeatureTemplateProperties[]; + } + interface ImageParameters extends Accessor { dpi: number; extent: Extent; @@ -3193,7 +4174,7 @@ declare namespace __esri { useCodedValues: boolean; where: string; - clone(): LabelClass; + clone(): this; } interface LabelClassConstructor { @@ -3374,6 +4355,7 @@ declare namespace __esri { labelingInfo: LabelClass[]; labelsVisible: boolean; layer: MapImageLayer; + legendEnabled: boolean; maxScale: number; minScale: number; opacity: number; @@ -3385,7 +4367,7 @@ declare namespace __esri { url: string; visible: boolean; - clone(): Sublayer; + clone(): this; createQuery(): Query; queryFeatures(params?: Query): IPromise; } @@ -3402,6 +4384,7 @@ declare namespace __esri { labelingInfo?: LabelClassProperties[]; labelsVisible?: boolean; layer?: MapImageLayerProperties; + legendEnabled?: boolean; maxScale?: number; minScale?: number; opacity?: number; @@ -3440,11 +4423,117 @@ declare namespace __esri { spatialReference?: SpatialReferenceProperties; } + interface TileMatrixSet extends Accessor, JSONSupport { + fullExtent: Extent; + id: string; + tileInfo: TileInfo; + + clone(): this; + } + + interface TileMatrixSetConstructor { + new(properties?: TileMatrixSetProperties): TileMatrixSet; + + fromJSON(json: any): TileMatrixSet; + } + + export const TileMatrixSet: TileMatrixSetConstructor; + + interface TileMatrixSetProperties { + fullExtent?: ExtentProperties; + id?: string; + tileInfo?: TileInfoProperties; + } + + interface WMSSublayer { + description: string; + fullExtent: Extent; + id: number; + layer: WMSLayer; + name: string; + popupEnabled: boolean; + spatialReferences: number[]; + sublayers: Collection; + title: string; + visible: boolean; + + clone(): this; + } + + interface WMSSublayerConstructor { + new(properties?: any): WMSSublayer; + } + + export const WMSSublayer: WMSSublayerConstructor; + + interface WMTSStyle extends Accessor, JSONSupport { + description: string; + id: string; + legendUrl: string; + title: string; + + clone(): this; + } + + interface WMTSStyleConstructor { + new(properties?: WMTSStyleProperties): WMTSStyle; + + fromJSON(json: any): WMTSStyle; + } + + export const WMTSStyle: WMTSStyleConstructor; + + interface WMTSStyleProperties { + description?: string; + id?: string; + legendUrl?: string; + title?: string; + } + + interface WMTSSublayer extends Accessor, JSONSupport { + description: string; + fullExtent: Extent; + id: string; + imageFormat: string; + imageFormats: string[]; + layer: WMTSLayer; + styleId: string; + styles: Collection; + tileMatrixSetId: string; + tileMatrixSets: Collection; + title: string; + + clone(): this; + } + + interface WMTSSublayerConstructor { + new(properties?: WMTSSublayerProperties): WMTSSublayer; + + fromJSON(json: any): WMTSSublayer; + } + + export const WMTSSublayer: WMTSSublayerConstructor; + + interface WMTSSublayerProperties { + description?: string; + fullExtent?: ExtentProperties; + id?: string; + imageFormat?: string; + imageFormats?: string[]; + layer?: WMTSLayerProperties; + styleId?: string; + styles?: Collection | any[]; + tileMatrixSetId?: string; + tileMatrixSets?: Collection | any[]; + title?: string; + } + interface Portal extends Accessor, Loadable { access: string; allSSL: boolean; authMode: string; authorizedCrossOriginDomains: string[]; + basemapGalleryGroupQuery: string; bingKey: string; canListApps: boolean; canListData: boolean; @@ -3462,10 +4551,12 @@ declare namespace __esri { customBaseUrl: string; defaultBasemap: Basemap; defaultExtent: Extent; + defaultVectorBasemap: Basemap; description: string; featuredGroups: PortalFeaturedGroups[]; featuredItemsGroupQuery: string; galleryTemplatesGroupQuery: string; + helperServices: any; homePageFeaturedContent: string; homePageFeaturedContentCount: number; httpPort: number; @@ -3495,6 +4586,8 @@ declare namespace __esri { urlKey: string; user: PortalUser; useStandardizedQuery: boolean; + useVectorBasemaps: boolean; + vectorBasemapGalleryGroupQuery: string; fetchBasemaps(): IPromise; fetchFeaturedGroups(): IPromise; @@ -3517,6 +4610,7 @@ declare namespace __esri { allSSL?: boolean; authMode?: string; authorizedCrossOriginDomains?: string[]; + basemapGalleryGroupQuery?: string; bingKey?: string; canListApps?: boolean; canListData?: boolean; @@ -3534,10 +4628,12 @@ declare namespace __esri { customBaseUrl?: string; defaultBasemap?: BasemapProperties; defaultExtent?: ExtentProperties; + defaultVectorBasemap?: BasemapProperties; description?: string; featuredGroups?: PortalFeaturedGroups[]; featuredItemsGroupQuery?: string; galleryTemplatesGroupQuery?: string; + helperServices?: any; homePageFeaturedContent?: string; homePageFeaturedContentCount?: number; httpPort?: number; @@ -3567,6 +4663,8 @@ declare namespace __esri { urlKey?: string; user?: PortalUserProperties; useStandardizedQuery?: boolean; + useVectorBasemaps?: boolean; + vectorBasemapGalleryGroupQuery?: string; } interface PortalFolder extends Accessor { @@ -3602,10 +4700,12 @@ declare namespace __esri { portal: Portal; snippet: string; tags: string[]; + thumbnailUrl: string; title: string; url: string; fetchMembers(): IPromise; + getThumbnailUrl(width?: number): string; queryItems(queryParams?: PortalQueryParams): IPromise; } @@ -3626,6 +4726,7 @@ declare namespace __esri { portal?: PortalProperties; snippet?: string; tags?: string[]; + thumbnailUrl?: string; title?: string; url?: string; } @@ -3665,6 +4766,7 @@ declare namespace __esri { fetchData(responseType?: string): IPromise; fetchRating(): IPromise; fetchRelatedItems(params: PortalItemFetchRelatedItemsParams): IPromise; + getThumbnailUrl(width?: number): string; update(params?: PortalItemUpdateParams): IPromise; } @@ -3731,7 +4833,7 @@ declare namespace __esri { sortOrder: string; start: number; - clone(): PortalQueryParams; + clone(): this; } interface PortalQueryParamsConstructor { @@ -3793,6 +4895,7 @@ declare namespace __esri { fetchFolders(): IPromise; fetchGroups(): IPromise; fetchItems(params: PortalUserFetchItemsParams): IPromise; + getThumbnailUrl(width?: number): string; queryFavorites(queryParams?: PortalQueryParams): IPromise; } @@ -3837,7 +4940,7 @@ declare namespace __esri { valueExpressionTitle: string; addClassBreakInfo(min: number | any, max: number, symbol: Symbol): void; - clone(): ClassBreaksRenderer; + clone(): this; getClassBreakInfo(graphic: Graphic): any; removeClassBreakInfo(min: number, max: number): void; } @@ -3886,7 +4989,7 @@ declare namespace __esri { symbol: Symbol; type: string; - clone(): SimpleRenderer; + clone(): this; } interface SimpleRendererConstructor { @@ -3916,8 +5019,8 @@ declare namespace __esri { valueExpression: string; valueExpressionTitle: string; - addUniqueValueInfo(valueOrInfo: string | any, symbol?: Symbol): void; - clone(): UniqueValueRenderer; + addUniqueValueInfo(valueOrInfo: string | number | any, symbol?: Symbol): void; + clone(): this; getUniqueValueInfo(graphic: Graphic): any; removeUniqueValueInfo(value: string): void; } @@ -3945,8 +5048,11 @@ declare namespace __esri { } interface PointCloudRenderer extends Accessor, JSONSupport { + colorModulation: PointCloudRendererColorModulation; pointSizeAlgorithm: PointCloudRendererPointSizeAlgorithm; pointsPerInch: number; + + clone(): this; } interface PointCloudRendererConstructor { @@ -3958,6 +5064,7 @@ declare namespace __esri { export const PointCloudRenderer: PointCloudRendererConstructor; interface PointCloudRendererProperties { + colorModulation?: PointCloudRendererColorModulation; pointSizeAlgorithm?: PointCloudRendererPointSizeAlgorithm; pointsPerInch?: number; } @@ -4053,7 +5160,7 @@ declare namespace __esri { title: string; visible: boolean; - clone(): Action; + clone(): this; } interface ActionConstructor { @@ -4073,7 +5180,7 @@ declare namespace __esri { interface ExtrudeSymbol3DLayer extends Symbol3DLayer { size: number; - clone(): ExtrudeSymbol3DLayer; + clone(): this; } interface ExtrudeSymbol3DLayerConstructor { @@ -4107,7 +5214,7 @@ declare namespace __esri { interface FillSymbol3DLayer extends Symbol3DLayer { outline: FillSymbol3DLayerOutline; - clone(): FillSymbol3DLayer; + clone(): this; } interface FillSymbol3DLayerConstructor { @@ -4123,7 +5230,7 @@ declare namespace __esri { } interface Font extends Accessor, JSONSupport { - clone(): Font; + clone(): this; } interface FontConstructor { @@ -4142,9 +5249,9 @@ declare namespace __esri { anchor: string; outline: IconSymbol3DLayerOutline; resource: IconSymbol3DLayerResource; - size: number | string; + size: number; - clone(): IconSymbol3DLayer; + clone(): this; } interface IconSymbol3DLayerConstructor { @@ -4159,11 +5266,14 @@ declare namespace __esri { anchor?: string; outline?: IconSymbol3DLayerOutline; resource?: IconSymbol3DLayerResource; - size?: number | string; + size?: number; } interface LabelSymbol3D extends Symbol3D { - clone(): LabelSymbol3D; + callout: Callout3D; + verticalOffset: LabelSymbol3DVerticalOffset; + + clone(): this; } interface LabelSymbol3DConstructor { @@ -4175,7 +5285,8 @@ declare namespace __esri { export const LabelSymbol3D: LabelSymbol3DConstructor; interface LabelSymbol3DProperties extends Symbol3DProperties { - + callout?: Callout3DProperties; + verticalOffset?: LabelSymbol3DVerticalOffsetProperties; } interface LineSymbol extends Symbol { @@ -4197,7 +5308,7 @@ declare namespace __esri { } interface LineSymbol3D extends Symbol3D { - clone(): LineSymbol3D; + clone(): this; } interface LineSymbol3DConstructor { @@ -4213,9 +5324,9 @@ declare namespace __esri { } interface LineSymbol3DLayer extends Symbol3DLayer { - size: number | string; + size: number; - clone(): LineSymbol3DLayer; + clone(): this; } interface LineSymbol3DLayerConstructor { @@ -4227,7 +5338,7 @@ declare namespace __esri { export const LineSymbol3DLayer: LineSymbol3DLayerConstructor; interface LineSymbol3DLayerProperties extends Symbol3DLayerProperties { - size?: number | string; + size?: number; } interface MarkerSymbol extends Symbol { @@ -4251,7 +5362,7 @@ declare namespace __esri { } interface MeshSymbol3D extends Symbol3D { - clone(): MeshSymbol3D; + clone(): this; } interface MeshSymbol3DConstructor { @@ -4272,9 +5383,11 @@ declare namespace __esri { heading: number; height: number; resource: ObjectSymbol3DLayerResource; + roll: number; + tilt: number; width: number; - clone(): ObjectSymbol3DLayer; + clone(): this; } interface ObjectSymbol3DLayerConstructor { @@ -4291,6 +5404,8 @@ declare namespace __esri { heading?: number; height?: number; resource?: ObjectSymbol3DLayerResource; + roll?: number; + tilt?: number; width?: number; } @@ -4302,6 +5417,8 @@ declare namespace __esri { xscale: number; yoffset: number; yscale: number; + + clone(): this; } interface PictureFillSymbolConstructor { @@ -4327,7 +5444,7 @@ declare namespace __esri { url: string; width: number; - clone(): PictureMarkerSymbol; + clone(): this; } interface PictureMarkerSymbolConstructor { @@ -4347,7 +5464,7 @@ declare namespace __esri { interface PathSymbol3DLayer extends Symbol3DLayer { size: number; - clone(): PathSymbol3DLayer; + clone(): this; } interface PathSymbol3DLayerConstructor { @@ -4363,7 +5480,10 @@ declare namespace __esri { } interface PointSymbol3D extends Symbol3D { - clone(): PointSymbol3D; + callout: Callout3D; + verticalOffset: PointSymbol3DVerticalOffset; + + clone(): this; } interface PointSymbol3DConstructor { @@ -4375,11 +5495,12 @@ declare namespace __esri { export const PointSymbol3D: PointSymbol3DConstructor; interface PointSymbol3DProperties extends Symbol3DProperties { - + callout?: Callout3DProperties; + verticalOffset?: PointSymbol3DVerticalOffsetProperties; } interface PolygonSymbol3D extends Symbol3D { - clone(): PolygonSymbol3D; + clone(): this; } interface PolygonSymbol3DConstructor { @@ -4398,7 +5519,7 @@ declare namespace __esri { color: Color; style: string; - clone(): SimpleFillSymbol; + clone(): this; } interface SimpleFillSymbolConstructor { @@ -4420,7 +5541,7 @@ declare namespace __esri { miterLimit: number; style: string; - clone(): SimpleLineSymbol; + clone(): this; } interface SimpleLineSymbolConstructor { @@ -4445,7 +5566,7 @@ declare namespace __esri { size: number; style: string; - clone(): SimpleMarkerSymbol; + clone(): this; } interface SimpleMarkerSymbolConstructor { @@ -4533,7 +5654,7 @@ declare namespace __esri { xoffset: number; yoffset: number; - clone(): TextSymbol; + clone(): this; } interface TextSymbolConstructor { @@ -4564,10 +5685,11 @@ declare namespace __esri { interface TextSymbol3DLayer extends Symbol3DLayer { font: TextSymbol3DLayerFont; - size: number | string; + halo: TextSymbol3DLayerHalo; + size: number; text: string; - clone(): TextSymbol3DLayer; + clone(): this; } interface TextSymbol3DLayerConstructor { @@ -4580,7 +5702,8 @@ declare namespace __esri { interface TextSymbol3DLayerProperties extends Symbol3DLayerProperties { font?: TextSymbol3DLayerFont; - size?: number | string; + halo?: TextSymbol3DLayerHalo; + size?: number; text?: string; } @@ -4590,7 +5713,7 @@ declare namespace __esri { styleName: string; styleUrl: string; - clone(): WebStyleSymbol; + clone(): this; fetchSymbol(): IPromise; } @@ -4609,6 +5732,44 @@ declare namespace __esri { styleUrl?: string; } + interface Callout3D extends Accessor, JSONSupport { + clone(): this; + } + + interface Callout3DConstructor { + new(properties?: Callout3DProperties): Callout3D; + + fromJSON(json: any): Callout3D; + } + + export const Callout3D: Callout3DConstructor; + + interface Callout3DProperties { + + } + + interface LineCallout3D extends Callout3D { + border: LineCallout3DBorder; + color: Color; + size: number; + type: string; + } + + interface LineCallout3DConstructor { + new(properties?: LineCallout3DProperties): LineCallout3D; + + fromJSON(json: any): LineCallout3D; + } + + export const LineCallout3D: LineCallout3DConstructor; + + interface LineCallout3DProperties extends Callout3DProperties { + border?: LineCallout3DBorderProperties; + color?: Color; + size?: number; + type?: string; + } + interface ClosestFacilityTask extends Task { solve(params: ClosestFacilityParameters, requestOptions?: any): IPromise; } @@ -4754,6 +5915,8 @@ declare namespace __esri { } interface QueryTask extends Task { + gdbVersion: string; + execute(params: Query, requestOptions?: any): IPromise; executeForCount(params: Query, requestOptions?: any): IPromise; executeForExtent(params: Query, requestOptions?: any): IPromise; @@ -4768,7 +5931,7 @@ declare namespace __esri { export const QueryTask: QueryTaskConstructor; interface QueryTaskProperties extends TaskProperties { - + gdbVersion?: string; } interface PrintTask extends Task { @@ -5577,6 +6740,7 @@ declare namespace __esri { interface ProjectParameters extends Accessor { geometries: Geometry[]; + outSpatialReference: SpatialReference; outSR: SpatialReference; transformation: ProjectParametersTransformation; transformForward: boolean; @@ -5592,6 +6756,7 @@ declare namespace __esri { interface ProjectParametersProperties { geometries?: GeometryProperties[]; + outSpatialReference?: SpatialReferenceProperties; outSR?: SpatialReferenceProperties; transformation?: ProjectParametersTransformation; transformForward?: boolean; @@ -6160,8 +7325,35 @@ declare namespace __esri { hasEventListener(type: string): boolean; hitTest(screenPoint: MapViewHitTestScreenPoint): IPromise; on(type: string | string[], modifiersOrHandler: string[] | EventHandler, handler?: EventHandler): IHandle; - toMap(screenPoint: ScreenPoint, mapPoint?: Point): Point; + toMap(screenPoint: MapViewToMapScreenPoint): Point; toScreen(point: Point, screenPoint?: ScreenPoint): ScreenPoint; + + on(name: "resize", eventHandler: MapViewResizeEventHandler): IHandle; + on(name: "resize", modifiers: string[], eventHandler: MapViewResizeEventHandler): IHandle; + on(name: "layerview-create", eventHandler: MapViewLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: MapViewLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: MapViewLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: MapViewLayerviewDestroyEventHandler): IHandle; + on(name: "click", eventHandler: MapViewClickEventHandler): IHandle; + on(name: "click", modifiers: string[], eventHandler: MapViewClickEventHandler): IHandle; + on(name: "double-click", eventHandler: MapViewDoubleClickEventHandler): IHandle; + on(name: "double-click", modifiers: string[], eventHandler: MapViewDoubleClickEventHandler): IHandle; + on(name: "hold", eventHandler: MapViewHoldEventHandler): IHandle; + on(name: "hold", modifiers: string[], eventHandler: MapViewHoldEventHandler): IHandle; + on(name: "drag", eventHandler: MapViewDragEventHandler): IHandle; + on(name: "drag", modifiers: string[], eventHandler: MapViewDragEventHandler): IHandle; + on(name: "mouse-wheel", eventHandler: MapViewMouseWheelEventHandler): IHandle; + on(name: "mouse-wheel", modifiers: string[], eventHandler: MapViewMouseWheelEventHandler): IHandle; + on(name: "key-down", eventHandler: MapViewKeyDownEventHandler): IHandle; + on(name: "key-down", modifiers: string[], eventHandler: MapViewKeyDownEventHandler): IHandle; + on(name: "key-up", eventHandler: MapViewKeyUpEventHandler): IHandle; + on(name: "key-up", modifiers: string[], eventHandler: MapViewKeyUpEventHandler): IHandle; + on(name: "pointer-down", eventHandler: MapViewPointerDownEventHandler): IHandle; + on(name: "pointer-down", modifiers: string[], eventHandler: MapViewPointerDownEventHandler): IHandle; + on(name: "pointer-move", eventHandler: MapViewPointerMoveEventHandler): IHandle; + on(name: "pointer-move", modifiers: string[], eventHandler: MapViewPointerMoveEventHandler): IHandle; + on(name: "pointer-up", eventHandler: MapViewPointerUpEventHandler): IHandle; + on(name: "pointer-up", modifiers: string[], eventHandler: MapViewPointerUpEventHandler): IHandle; } interface MapViewConstructor { @@ -6188,6 +7380,7 @@ declare namespace __esri { constraints: SceneViewConstraints; environment: SceneViewEnvironment; extent: Extent; + highlightOptions: SceneViewHighlightOptions; qualityProfile: string; scale: number; viewingMode: string; @@ -6198,8 +7391,35 @@ declare namespace __esri { hasEventListener(type: string): boolean; hitTest(screenPoint: SceneViewHitTestScreenPoint): IPromise; on(type: string | string[], modifiersOrHandler: string[] | EventHandler, handler?: EventHandler): IHandle; - toMap(screenPoint: ScreenPoint, mapPoint?: Point): Point; + toMap(screenPoint: SceneViewToMapScreenPoint, mapPoint?: Point): Point; toScreen(point: Point, screenPoint?: ScreenPoint): ScreenPoint; + + on(name: "resize", eventHandler: SceneViewResizeEventHandler): IHandle; + on(name: "resize", modifiers: string[], eventHandler: SceneViewResizeEventHandler): IHandle; + on(name: "layerview-create", eventHandler: SceneViewLayerviewCreateEventHandler): IHandle; + on(name: "layerview-create", modifiers: string[], eventHandler: SceneViewLayerviewCreateEventHandler): IHandle; + on(name: "layerview-destroy", eventHandler: SceneViewLayerviewDestroyEventHandler): IHandle; + on(name: "layerview-destroy", modifiers: string[], eventHandler: SceneViewLayerviewDestroyEventHandler): IHandle; + on(name: "click", eventHandler: SceneViewClickEventHandler): IHandle; + on(name: "click", modifiers: string[], eventHandler: SceneViewClickEventHandler): IHandle; + on(name: "double-click", eventHandler: SceneViewDoubleClickEventHandler): IHandle; + on(name: "double-click", modifiers: string[], eventHandler: SceneViewDoubleClickEventHandler): IHandle; + on(name: "hold", eventHandler: SceneViewHoldEventHandler): IHandle; + on(name: "hold", modifiers: string[], eventHandler: SceneViewHoldEventHandler): IHandle; + on(name: "drag", eventHandler: SceneViewDragEventHandler): IHandle; + on(name: "drag", modifiers: string[], eventHandler: SceneViewDragEventHandler): IHandle; + on(name: "mouse-wheel", eventHandler: SceneViewMouseWheelEventHandler): IHandle; + on(name: "mouse-wheel", modifiers: string[], eventHandler: SceneViewMouseWheelEventHandler): IHandle; + on(name: "key-down", eventHandler: SceneViewKeyDownEventHandler): IHandle; + on(name: "key-down", modifiers: string[], eventHandler: SceneViewKeyDownEventHandler): IHandle; + on(name: "key-up", eventHandler: SceneViewKeyUpEventHandler): IHandle; + on(name: "key-up", modifiers: string[], eventHandler: SceneViewKeyUpEventHandler): IHandle; + on(name: "pointer-down", eventHandler: SceneViewPointerDownEventHandler): IHandle; + on(name: "pointer-down", modifiers: string[], eventHandler: SceneViewPointerDownEventHandler): IHandle; + on(name: "pointer-move", eventHandler: SceneViewPointerMoveEventHandler): IHandle; + on(name: "pointer-move", modifiers: string[], eventHandler: SceneViewPointerMoveEventHandler): IHandle; + on(name: "pointer-up", eventHandler: SceneViewPointerUpEventHandler): IHandle; + on(name: "pointer-up", modifiers: string[], eventHandler: SceneViewPointerUpEventHandler): IHandle; } interface SceneViewConstructor { @@ -6215,6 +7435,7 @@ declare namespace __esri { constraints?: SceneViewConstraintsProperties; environment?: SceneViewEnvironmentProperties; extent?: ExtentProperties; + highlightOptions?: SceneViewHighlightOptions; qualityProfile?: string; scale?: number; viewingMode?: string; @@ -6299,7 +7520,26 @@ declare namespace __esri { visible?: boolean; } + interface CSVLayerView extends LayerView { + highlight(target?: Graphic | Graphic[]): any; + queryExtent(params?: Query): IPromise; + queryFeatureCount(params?: Query): IPromise; + queryFeatures(params?: Query): IPromise; + queryObjectIds(params?: Query): IPromise; + } + + interface CSVLayerViewConstructor { + new(properties?: CSVLayerViewProperties): CSVLayerView; + } + + export const CSVLayerView: CSVLayerViewConstructor; + + interface CSVLayerViewProperties extends LayerViewProperties { + + } + interface FeatureLayerView extends LayerView { + highlight(target?: Graphic | Graphic[] | number | number[]): any; queryExtent(params?: Query): IPromise; queryFeatureCount(params?: Query): IPromise; queryFeatures(params?: Query): IPromise; @@ -6317,6 +7557,7 @@ declare namespace __esri { } interface GraphicsLayerView extends LayerView { + highlight(target?: Graphic | Graphic[] | number | number[]): any; queryGraphics(): IPromise; } @@ -6345,6 +7586,7 @@ declare namespace __esri { } interface SceneLayerView extends LayerView { + highlight(target?: Graphic | Graphic[] | number | number[]): any; queryExtent(params?: Query): IPromise; queryFeatureCount(params?: Query): IPromise; queryFeatures(params?: Query): IPromise; @@ -6361,6 +7603,33 @@ declare namespace __esri { } + interface StreamLayerView extends Accessor, Evented { + connectionError: Error; + connectionStatus: string; + filter: StreamLayerViewFilter; + graphics: Collection; + + connect(): IPromise; + disconnect(): void; + updateFilter(filter: StreamLayerViewUpdateFilterFilter): IPromise; + + on(name: "data-received", eventHandler: StreamLayerViewDataReceivedEventHandler): IHandle; + on(name: "data-received", modifiers: string[], eventHandler: StreamLayerViewDataReceivedEventHandler): IHandle; + } + + interface StreamLayerViewConstructor { + new(properties?: StreamLayerViewProperties): StreamLayerView; + } + + export const StreamLayerView: StreamLayerViewConstructor; + + interface StreamLayerViewProperties { + connectionError?: Error; + connectionStatus?: string; + filter?: StreamLayerViewFilter; + graphics?: Collection | any[]; + } + interface UI extends Accessor { container: any; height: number; @@ -6406,7 +7675,7 @@ declare namespace __esri { spatialReference: SpatialReference; viewpoint: Viewpoint; - clone(): InitialViewProperties; + clone(): this; } interface InitialViewPropertiesConstructor { @@ -6423,7 +7692,7 @@ declare namespace __esri { interface Environment extends Accessor { lighting: Lighting; - clone(): Environment; + clone(): this; } interface EnvironmentConstructor { @@ -6442,7 +7711,7 @@ declare namespace __esri { viewingMode: string; viewpoint: Viewpoint; - clone(): websceneInitialViewProperties; + clone(): this; } interface websceneInitialViewPropertiesConstructor { @@ -6463,7 +7732,7 @@ declare namespace __esri { directShadowsEnabled: boolean; displayUTCOffset: number; - clone(): Lighting; + clone(): this; } interface LightingConstructor { @@ -6481,7 +7750,7 @@ declare namespace __esri { interface Presentation extends Accessor { slides: Collection; - clone(): Presentation; + clone(): this; } interface PresentationConstructor { @@ -6504,8 +7773,8 @@ declare namespace __esri { viewpoint: Viewpoint; visibleLayers: SlideVisibleLayers; - applyTo(view: SceneView, options?: SlideApplyToOptions): void; - clone(): Slide; + applyTo(view: SceneView, options?: SlideApplyToOptions): IPromise; + clone(): this; updateFrom(view: SceneView, options?: SlideUpdateFromOptions): IPromise; } @@ -6654,6 +7923,8 @@ declare namespace __esri { } interface Expand extends Widget { + autoCollapse: boolean; + collapseIconClass: string; collapseTooltip: string; content: any; expanded: boolean; @@ -6676,8 +7947,10 @@ declare namespace __esri { export const Expand: ExpandConstructor; interface ExpandProperties extends WidgetProperties { + autoCollapse?: boolean; + collapseIconClass?: string; collapseTooltip?: string; - content?: any | any | string | Widget; + content?: any | string | Widget; expanded?: boolean; expandIconClass?: string; expandTooltip?: string; @@ -6709,6 +7982,7 @@ declare namespace __esri { interface LayerList extends Widget { createActionsFunction: Function; + listItemCreatedFunction: Function; operationalItems: Collection; view: MapView | SceneView; viewModel: LayerListViewModel; @@ -6725,14 +7999,17 @@ declare namespace __esri { interface LayerListProperties extends WidgetProperties { createActionsFunction?: Function; + listItemCreatedFunction?: Function; operationalItems?: Collection | any[]; view?: MapView | SceneView; viewModel?: LayerListViewModelProperties; } - interface Legend extends Accessor, Widgette { + interface Legend extends Widget { layerInfos: LegendLayerInfos[]; view: MapView | SceneView; + + render(): any; } interface LegendConstructor { @@ -6741,7 +8018,7 @@ declare namespace __esri { export const Legend: LegendConstructor; - interface LegendProperties extends WidgetteProperties { + interface LegendProperties extends WidgetProperties { layerInfos?: LegendLayerInfos[]; view?: MapView | SceneView; } @@ -6800,6 +8077,7 @@ declare namespace __esri { dockOptions: PopupDockOptions; featureCount: number; features: Graphic[]; + highlightEnabled: boolean; location: Point; promises: IPromise[]; selectedFeature: Graphic; @@ -6831,6 +8109,7 @@ declare namespace __esri { dockOptions?: PopupDockOptions; featureCount?: number; features?: GraphicProperties[]; + highlightEnabled?: boolean; location?: PointProperties; promises?: IPromise[]; selectedFeature?: GraphicProperties; @@ -6901,13 +8180,15 @@ declare namespace __esri { searching: boolean; searchTerm: string; selectedResult: any; - sources: SearchSources; + sources: Collection; suggestions: any[]; suggestionsEnabled: boolean; view: MapView | SceneView; viewModel: SearchViewModel; + blur(): void; clear(): void; + focus(): void; render(): any; search(searchTerm?: string | Geometry | any | number[][]): IPromise; suggest(value?: string): IPromise; @@ -6938,7 +8219,7 @@ declare namespace __esri { searching?: boolean; searchTerm?: string; selectedResult?: any; - sources?: SearchSources; + sources?: Collection | any[]; suggestions?: any[]; suggestionsEnabled?: boolean; view?: MapView | SceneView; @@ -7146,6 +8427,9 @@ declare namespace __esri { interface BasemapToggleViewModelConstructor { new(properties?: BasemapToggleViewModelProperties): BasemapToggleViewModel; + + + getThumbnailUrl(basemap: Basemap): string; } export const BasemapToggleViewModel: BasemapToggleViewModelConstructor; @@ -7178,6 +8462,7 @@ declare namespace __esri { } interface ExpandViewModel extends Accessor { + autoCollapse: boolean; expanded: boolean; state: string; view: MapView | SceneView; @@ -7190,6 +8475,7 @@ declare namespace __esri { export const ExpandViewModel: ExpandViewModelConstructor; interface ExpandViewModelProperties { + autoCollapse?: boolean; expanded?: boolean; state?: string; view?: MapView | SceneView; @@ -7217,6 +8503,7 @@ declare namespace __esri { interface LayerListViewModel extends Accessor { createActionsFunction: Function; + listItemCreatedFunction: Function; operationalItems: Collection; state: string; view: MapView | SceneView; @@ -7232,6 +8519,7 @@ declare namespace __esri { interface LayerListViewModelProperties { createActionsFunction?: Function; + listItemCreatedFunction?: Function; operationalItems?: Collection | any[]; state?: string; view?: MapView | SceneView; @@ -7243,6 +8531,7 @@ declare namespace __esri { children: Collection; error: Error; layer: Layer; + layerView: LayerView; open: boolean; title: string; updating: boolean; @@ -7251,7 +8540,7 @@ declare namespace __esri { visible: boolean; visibleAtCurrentScale: boolean; - clone(): ListItem; + clone(): this; } interface ListItemConstructor { @@ -7321,6 +8610,7 @@ declare namespace __esri { content: string; featureCount: number; features: Graphic[]; + highlightEnabled: boolean; location: Point; pendingPromisesCount: number; promises: IPromise[]; @@ -7347,6 +8637,7 @@ declare namespace __esri { content?: string | any; featureCount?: number; features?: GraphicProperties[]; + highlightEnabled?: boolean; location?: PointProperties; pendingPromisesCount?: number; promises?: IPromise[]; @@ -7376,7 +8667,7 @@ declare namespace __esri { activeSourceIndex: number; allPlaceholder: string; autoSelect: boolean; - defaultSource: any; + defaultSource: any | any; maxInputLength: number; maxResults: number; maxSuggestions: number; @@ -7391,7 +8682,7 @@ declare namespace __esri { searchAllEnabled: boolean; searchTerm: string; selectedResult: any; - sources: SearchViewModelSources[]; + sources: Collection; suggestionDelay: number; suggestions: any[]; suggestionsEnabled: boolean; @@ -7401,6 +8692,21 @@ declare namespace __esri { clear(): void; search(searchTerm?: string | Geometry | any | number[][]): IPromise; suggest(value?: string): IPromise; + + on(name: "suggest-complete", eventHandler: SearchViewModelSuggestCompleteEventHandler): IHandle; + on(name: "suggest-complete", modifiers: string[], eventHandler: SearchViewModelSuggestCompleteEventHandler): IHandle; + on(name: "search-clear", eventHandler: SearchViewModelSearchClearEventHandler): IHandle; + on(name: "search-clear", modifiers: string[], eventHandler: SearchViewModelSearchClearEventHandler): IHandle; + on(name: "search-start", eventHandler: SearchViewModelSearchStartEventHandler): IHandle; + on(name: "search-start", modifiers: string[], eventHandler: SearchViewModelSearchStartEventHandler): IHandle; + on(name: "suggest-start", eventHandler: SearchViewModelSuggestStartEventHandler): IHandle; + on(name: "suggest-start", modifiers: string[], eventHandler: SearchViewModelSuggestStartEventHandler): IHandle; + on(name: "load", eventHandler: SearchViewModelLoadEventHandler): IHandle; + on(name: "load", modifiers: string[], eventHandler: SearchViewModelLoadEventHandler): IHandle; + on(name: "search-complete", eventHandler: SearchViewModelSearchCompleteEventHandler): IHandle; + on(name: "search-complete", modifiers: string[], eventHandler: SearchViewModelSearchCompleteEventHandler): IHandle; + on(name: "select-result", eventHandler: SearchViewModelSelectResultEventHandler): IHandle; + on(name: "select-result", modifiers: string[], eventHandler: SearchViewModelSelectResultEventHandler): IHandle; } interface SearchViewModelConstructor { @@ -7414,7 +8720,7 @@ declare namespace __esri { activeSourceIndex?: number; allPlaceholder?: string; autoSelect?: boolean; - defaultSource?: any; + defaultSource?: any | any; maxInputLength?: number; maxResults?: number; maxSuggestions?: number; @@ -7429,7 +8735,7 @@ declare namespace __esri { searchAllEnabled?: boolean; searchTerm?: string; selectedResult?: any; - sources?: SearchViewModelSources[]; + sources?: Collection | any[]; suggestionDelay?: number; suggestions?: any[]; suggestionsEnabled?: boolean; @@ -7548,7 +8854,8 @@ declare namespace __esri { portalItem: PortalItem; url: string; - getImageUrl(extent: Extent, width: number, height: number, callback: Function): string; + fetchImage(extent: Extent, width: number, height: number, options?: DynamicLayerFetchImageOptions): IPromise; + getImageUrl(extent: Extent, width: number, height: number, options?: DynamicLayerGetImageUrlOptions): IPromise | string; } interface DynamicLayerConstructor { @@ -7558,14 +8865,12 @@ declare namespace __esri { export const DynamicLayer: DynamicLayerConstructor; interface DynamicLayerProperties { - portalItem?: PortalItem; + portalItem?: PortalItemProperties; url?: string; } interface TiledLayer { tileInfo: TileInfo; - - getTileUrl(level: number, row: number, col: number): string; } interface TiledLayerConstructor { @@ -7615,7 +8920,7 @@ declare namespace __esri { createServiceSublayers(): Collection; findSublayerById(id: number): Sublayer; - getExportImageParameters(options: ArcGISDynamicMapServiceGetExportImageParametersOptions): any; + getExportImageParameters(extent: Extent, width: number, height: number, options?: ArcGISDynamicMapServiceGetExportImageParametersOptions): any; } interface ArcGISDynamicMapServiceConstructor { @@ -7646,6 +8951,8 @@ declare namespace __esri { fullExtent: Extent; hasMultidimensions: boolean; hasRasterAttributeTable: boolean; + imageMaxHeight: number; + imageMaxWidth: number; mosaicRule: MosaicRule; multidimensionalInfo: any; pixelType: string; @@ -7658,6 +8965,7 @@ declare namespace __esri { url: string; version: number; + fetchImage(extent: Extent, width: number, height: number): IPromise; fromJSON(json: any): any; toJSON(): any; } @@ -7681,6 +8989,8 @@ declare namespace __esri { fullExtent?: ExtentProperties; hasMultidimensions?: boolean; hasRasterAttributeTable?: boolean; + imageMaxHeight?: number; + imageMaxWidth?: number; mosaicRule?: MosaicRuleProperties; multidimensionalInfo?: any; pixelType?: string; @@ -7850,11 +9160,11 @@ declare namespace __esri { interface DOMContainerProperties { container?: HTMLDivElement | string; height?: number; - popup?: Popup; + popup?: PopupProperties; resizing?: boolean; size?: number[]; suspended?: boolean; - ui?: DefaultUI; + ui?: DefaultUIProperties; width?: number; } @@ -7892,7 +9202,7 @@ declare namespace __esri { interface GeolocationPositioningProperties { geolocationOptions?: any; goToLocationEnabled?: boolean; - graphic?: Graphic; + graphic?: GraphicProperties; view?: MapView | SceneView; } @@ -8113,6 +9423,12 @@ declare namespace __esri { export const size: size; + interface type { + createRenderer(params: typeCreateRendererParams): IPromise; + } + + export const type: type; + interface univariateColorSize { createContinuousRenderer(params: univariateColorSizeCreateContinuousRendererParams): IPromise; createVisualVariables(params: univariateColorSizeCreateVisualVariablesParams): IPromise; @@ -8124,7 +9440,9 @@ declare namespace __esri { classBreaks(params: classBreaksClassBreaksParams): IPromise; } - export const classBreaks: classBreaks; + const __classBreaksMapped: classBreaks; + export const classBreaks: typeof __classBreaksMapped.classBreaks; + interface histogram { histogram(params: histogramHistogramParams): IPromise; @@ -8142,6 +9460,14 @@ declare namespace __esri { export const summaryStatistics: typeof __summaryStatisticsMapped.summaryStatistics; + interface uniqueValues { + uniqueValues(params: uniqueValuesUniqueValuesParams): IPromise; + } + + const __uniqueValuesMapped: uniqueValues; + export const uniqueValues: typeof __uniqueValuesMapped.uniqueValues; + + interface symbologyColor { cloneScheme(scheme: any): any; flipColors(scheme: any): any; @@ -8165,6 +9491,13 @@ declare namespace __esri { export const symbologySize: symbologySize; + interface symbologyType { + cloneScheme(scheme: any | any | any): any; + getSchemes(params: typeGetSchemesParams): any; + } + + export const symbologyType: symbologyType; + interface supportJsonUtils { fromJSON(json: any): Renderer; } @@ -8191,8 +9524,8 @@ declare namespace __esri { interface widget { accessibleHandler(): Function; join(...classNames: string[]): string; - jsxFactory(selector: string, properties?: any, children?: any): any; renderable(propertyName?: string | string[]): Function; + tsx(selector: string, properties?: any, children?: any): any; vmEvent(eventNames: string | string[]): Function; } @@ -8225,170 +9558,88 @@ declare namespace __esri { } declare module "esri" { - export import Text = __esri.Text; - - export import Media = __esri.Media; - - export import Fields = __esri.Fields; - - export import Attachments = __esri.Attachments; - - export import WatchHandle = __esri.WatchHandle; - - export import EachAlwaysResult = __esri.EachAlwaysResult; - - export import PausableWatchHandle = __esri.PausableWatchHandle; - - export import FeatureEditResult = __esri.FeatureEditResult; - - export import AttributeParamValue = __esri.AttributeParamValue; - - export import DataWorkspace = __esri.DataWorkspace; - - export import GroupMembership = __esri.GroupMembership; - - export import HoldType = __esri.HoldType; - - export import JobPriority = __esri.JobPriority; - - export import JobQuery = __esri.JobQuery; - - export import JobStatus = __esri.JobStatus; - - export import JobQueryContainer = __esri.JobQueryContainer; - - export import JobQueryDetails = __esri.JobQueryDetails; - - export import Privilege = __esri.Privilege; - - export import UserDetails = __esri.UserDetails; - - export import VersionInfo = __esri.VersionInfo; - - export import WorkflowManagerServiceInfo = __esri.WorkflowManagerServiceInfo; - - export import JobType = __esri.JobType; - - export import JobTypeDetails = __esri.JobTypeDetails; - - export import TableRelationship = __esri.TableRelationship; - - export import JobCreationParameters = __esri.JobCreationParameters; - - export import JobQueryParameters = __esri.JobQueryParameters; - - export import JobUpdateParameters = __esri.JobUpdateParameters; - - export import AuxRecordDescription = __esri.AuxRecordDescription; - - export import ActivityType = __esri.ActivityType; - - export import AuxRecordContainer = __esri.AuxRecordContainer; - - export import JobTaskJobInfo = __esri.JobTaskJobInfo; - - export import QueryResult = __esri.QueryResult; - - export import AuxRecord = __esri.AuxRecord; - - export import AuxRecordValue = __esri.AuxRecordValue; - - export import FieldValue = __esri.FieldValue; - - export import JobVersionInfo = __esri.JobVersionInfo; - - export import QueryFieldInfo = __esri.QueryFieldInfo; - - export import JobAttachment = __esri.JobAttachment; - - export import JobDependency = __esri.JobDependency; - - export import ChangeRule = __esri.ChangeRule; - - export import DataSetEvaluator = __esri.DataSetEvaluator; - - export import AOIEvaluator = __esri.AOIEvaluator; - - export import DatasetConfiguration = __esri.DatasetConfiguration; - - export import EmailNotifier = __esri.EmailNotifier; - - export import WhereCondition = __esri.WhereCondition; - - export import NotificationType = __esri.NotificationType; - - export import ChangeRuleMatch = __esri.ChangeRuleMatch; - - export import ReportDataGroup = __esri.ReportDataGroup; - - export import ReportData = __esri.ReportData; - - export import Report = __esri.Report; - - export import ExecuteInfo = __esri.ExecuteInfo; - - export import Step = __esri.Step; - - export import StepType = __esri.StepType; - - export import WorkflowDisplayDetails = __esri.WorkflowDisplayDetails; - - export import WorkflowOption = __esri.WorkflowOption; - - export import WorkflowStepInfo = __esri.WorkflowStepInfo; - - export import WorkflowAnnotationDisplayDetails = __esri.WorkflowAnnotationDisplayDetails; - - export import WorkflowConflicts = __esri.WorkflowConflicts; - - export import WorkflowPathDisplayDetails = __esri.WorkflowPathDisplayDetails; - - export import WorkflowStepDisplayDetails = __esri.WorkflowStepDisplayDetails; - - export import ExternalRenderer = __esri.ExternalRenderer; - - export import RenderContext = __esri.RenderContext; - - export import RenderCamera = __esri.RenderCamera; - - export import SunLight = __esri.SunLight; - - export import ColorAndIntensity = __esri.ColorAndIntensity; - - export import LocatorSource = __esri.LocatorSource; - - export import FeatureLayerSource = __esri.FeatureLayerSource; - - export import GetHeader = __esri.GetHeader; - - export import WatchCallback = __esri.WatchCallback; - + export import PromisedWatchHandle = __esri.PromisedWatchHandle; export import ItemCallback = __esri.ItemCallback; - export import ItemTestCallback = __esri.ItemTestCallback; + export import ItemCompareCallback = __esri.ItemCompareCallback; export import ItemMapCallback = __esri.ItemMapCallback; export import ItemReduceCallback = __esri.ItemReduceCallback; - export import ItemCompareCallback = __esri.ItemCompareCallback; + export import ItemTestCallback = __esri.ItemTestCallback; - export import EventAttachedCallback = __esri.EventAttachedCallback; + export import PortalItemFetchRelatedItemsParams = __esri.PortalItemFetchRelatedItemsParams; - export import HandlerCallback = __esri.HandlerCallback; + export import PortalItemUpdateParams = __esri.PortalItemUpdateParams; - export import EasingFunction = __esri.EasingFunction; + export import PortalUserAddItemParams = __esri.PortalUserAddItemParams; - export import EventHandler = __esri.EventHandler; + export import PortalUserFetchItemsParams = __esri.PortalUserFetchItemsParams; - export import PromisedWatchHandle = __esri.PromisedWatchHandle; + export import PortalFeaturedGroups = __esri.PortalFeaturedGroups; export import GroundQueryElevationOptions = __esri.GroundQueryElevationOptions; + export import PopupTemplateExpressionInfos = __esri.PopupTemplateExpressionInfos; + export import PopupTemplateFieldInfos = __esri.PopupTemplateFieldInfos; export import PopupTemplateFieldInfosFormat = __esri.PopupTemplateFieldInfosFormat; + export import FeatureLayerApplyEditsEdits = __esri.FeatureLayerApplyEditsEdits; + + export import FeatureLayerCapabilities = __esri.FeatureLayerCapabilities; + + export import FeatureLayerCapabilitiesData = __esri.FeatureLayerCapabilitiesData; + + export import FeatureLayerCapabilitiesEditing = __esri.FeatureLayerCapabilitiesEditing; + + export import FeatureLayerCapabilitiesOperations = __esri.FeatureLayerCapabilitiesOperations; + + export import FeatureLayerCapabilitiesQuery = __esri.FeatureLayerCapabilitiesQuery; + + export import FeatureLayerCapabilitiesQueryRelated = __esri.FeatureLayerCapabilitiesQueryRelated; + + export import FeatureLayerElevationInfo = __esri.FeatureLayerElevationInfo; + + export import FeatureLayerFeatureReduction = __esri.FeatureLayerFeatureReduction; + + export import FeatureLayerGetFieldDomainOptions = __esri.FeatureLayerGetFieldDomainOptions; + + export import FeatureLayerLayerviewCreateEvent = __esri.FeatureLayerLayerviewCreateEvent; + + export import FeatureLayerLayerviewCreateEventHandler = __esri.FeatureLayerLayerviewCreateEventHandler; + + export import FeatureLayerLayerviewDestroyEvent = __esri.FeatureLayerLayerviewDestroyEvent; + + export import FeatureLayerLayerviewDestroyEventHandler = __esri.FeatureLayerLayerviewDestroyEventHandler; + + export import GraphicsLayerElevationInfo = __esri.GraphicsLayerElevationInfo; + + export import GraphicsLayerLayerviewCreateEvent = __esri.GraphicsLayerLayerviewCreateEvent; + + export import GraphicsLayerLayerviewCreateEventHandler = __esri.GraphicsLayerLayerviewCreateEventHandler; + + export import GraphicsLayerLayerviewDestroyEvent = __esri.GraphicsLayerLayerviewDestroyEvent; + + export import GraphicsLayerLayerviewDestroyEventHandler = __esri.GraphicsLayerLayerviewDestroyEventHandler; + + export import LayerFromArcGISServerUrlParams = __esri.LayerFromArcGISServerUrlParams; + + export import LayerFromPortalItemParams = __esri.LayerFromPortalItemParams; + + export import FeatureTemplateThumbnail = __esri.FeatureTemplateThumbnail; + + export import LabelClassLabelExpressionInfo = __esri.LabelClassLabelExpressionInfo; + + export import LabelSymbol3DVerticalOffsetProperties = __esri.LabelSymbol3DVerticalOffsetProperties; + export import LabelSymbol3DVerticalOffset = __esri.LabelSymbol3DVerticalOffset; + + export import QueryQuantizationParameters = __esri.QueryQuantizationParameters; + + export import ViewPadding = __esri.ViewPadding; + export import WebMapSourceVersion = __esri.WebMapSourceVersion; export import WebSceneSaveAsOptions = __esri.WebSceneSaveAsOptions; @@ -8399,6 +9650,99 @@ declare module "esri" { export import WebSceneUpdateFromOptions = __esri.WebSceneUpdateFromOptions; + export import EventHandler = __esri.EventHandler; + + export import SceneViewDragEventOrigin = __esri.SceneViewDragEventOrigin; + + export import SceneViewClickEvent = __esri.SceneViewClickEvent; + + export import SceneViewClickEventHandler = __esri.SceneViewClickEventHandler; + + export import SceneViewDoubleClickEvent = __esri.SceneViewDoubleClickEvent; + + export import SceneViewDoubleClickEventHandler = __esri.SceneViewDoubleClickEventHandler; + + export import SceneViewDragEvent = __esri.SceneViewDragEvent; + + export import SceneViewDragEventHandler = __esri.SceneViewDragEventHandler; + + export import EasingFunction = __esri.EasingFunction; + + export import SceneViewHoldEvent = __esri.SceneViewHoldEvent; + + export import SceneViewHoldEventHandler = __esri.SceneViewHoldEventHandler; + + export import SceneViewKeyDownEvent = __esri.SceneViewKeyDownEvent; + + export import SceneViewKeyDownEventHandler = __esri.SceneViewKeyDownEventHandler; + + export import SceneViewKeyUpEvent = __esri.SceneViewKeyUpEvent; + + export import SceneViewKeyUpEventHandler = __esri.SceneViewKeyUpEventHandler; + + export import SceneViewLayerviewCreateEvent = __esri.SceneViewLayerviewCreateEvent; + + export import SceneViewLayerviewCreateEventHandler = __esri.SceneViewLayerviewCreateEventHandler; + + export import SceneViewLayerviewDestroyEvent = __esri.SceneViewLayerviewDestroyEvent; + + export import SceneViewLayerviewDestroyEventHandler = __esri.SceneViewLayerviewDestroyEventHandler; + + export import SceneViewMouseWheelEvent = __esri.SceneViewMouseWheelEvent; + + export import SceneViewMouseWheelEventHandler = __esri.SceneViewMouseWheelEventHandler; + + export import SceneViewPointerDownEvent = __esri.SceneViewPointerDownEvent; + + export import SceneViewPointerDownEventHandler = __esri.SceneViewPointerDownEventHandler; + + export import SceneViewPointerMoveEvent = __esri.SceneViewPointerMoveEvent; + + export import SceneViewPointerMoveEventHandler = __esri.SceneViewPointerMoveEventHandler; + + export import SceneViewPointerUpEvent = __esri.SceneViewPointerUpEvent; + + export import SceneViewPointerUpEventHandler = __esri.SceneViewPointerUpEventHandler; + + export import SceneViewResizeEvent = __esri.SceneViewResizeEvent; + + export import SceneViewResizeEventHandler = __esri.SceneViewResizeEventHandler; + + export import SceneViewConstraintsProperties = __esri.SceneViewConstraintsProperties; + export import SceneViewConstraints = __esri.SceneViewConstraints; + + export import SceneViewConstraintsAltitudeProperties = __esri.SceneViewConstraintsAltitudeProperties; + export import SceneViewConstraintsAltitude = __esri.SceneViewConstraintsAltitude; + + export import SceneViewConstraintsClipDistanceProperties = __esri.SceneViewConstraintsClipDistanceProperties; + export import SceneViewConstraintsClipDistance = __esri.SceneViewConstraintsClipDistance; + + export import SceneViewConstraintsCollision = __esri.SceneViewConstraintsCollision; + + export import SceneViewConstraintsTiltProperties = __esri.SceneViewConstraintsTiltProperties; + export import SceneViewConstraintsTilt = __esri.SceneViewConstraintsTilt; + + export import SceneViewEnvironmentProperties = __esri.SceneViewEnvironmentProperties; + export import SceneViewEnvironment = __esri.SceneViewEnvironment; + + export import SceneViewEnvironmentAtmosphereProperties = __esri.SceneViewEnvironmentAtmosphereProperties; + export import SceneViewEnvironmentAtmosphere = __esri.SceneViewEnvironmentAtmosphere; + + export import SceneViewEnvironmentLightingProperties = __esri.SceneViewEnvironmentLightingProperties; + export import SceneViewEnvironmentLighting = __esri.SceneViewEnvironmentLighting; + + export import SceneViewGoToOptions = __esri.SceneViewGoToOptions; + + export import SceneViewHighlightOptions = __esri.SceneViewHighlightOptions; + + export import SceneViewHitTestScreenPoint = __esri.SceneViewHitTestScreenPoint; + + export import SceneViewToMapScreenPoint = __esri.SceneViewToMapScreenPoint; + + export import WatchHandle = __esri.WatchHandle; + + export import WatchCallback = __esri.WatchCallback; + export import IdentityManagerBaseGenerateTokenOptions = __esri.IdentityManagerBaseGenerateTokenOptions; export import IdentityManagerBaseGetCredentialOptions = __esri.IdentityManagerBaseGetCredentialOptions; @@ -8413,54 +9757,232 @@ declare module "esri" { export import IdentityManagerBaseSignInOptions = __esri.IdentityManagerBaseSignInOptions; - export import ElevationLayerQueryElevationOptions = __esri.ElevationLayerQueryElevationOptions; + export import IdentityManagerCredentialCreateEvent = __esri.IdentityManagerCredentialCreateEvent; + + export import IdentityManagerCredentialCreateEventHandler = __esri.IdentityManagerCredentialCreateEventHandler; + + export import IdentityManagerCredentialsDestroyEvent = __esri.IdentityManagerCredentialsDestroyEvent; + + export import IdentityManagerCredentialsDestroyEventHandler = __esri.IdentityManagerCredentialsDestroyEventHandler; + + export import HandlerCallback = __esri.HandlerCallback; + + export import BaseElevationLayerFetchTileOptions = __esri.BaseElevationLayerFetchTileOptions; + + export import BaseElevationLayerLayerviewCreateEvent = __esri.BaseElevationLayerLayerviewCreateEvent; + + export import BaseElevationLayerLayerviewCreateEventHandler = __esri.BaseElevationLayerLayerviewCreateEventHandler; + + export import BaseElevationLayerLayerviewDestroyEvent = __esri.BaseElevationLayerLayerviewDestroyEvent; + + export import BaseElevationLayerLayerviewDestroyEventHandler = __esri.BaseElevationLayerLayerviewDestroyEventHandler; export import CSVLayerElevationInfo = __esri.CSVLayerElevationInfo; - export import FeatureLayerApplyEditsEdits = __esri.FeatureLayerApplyEditsEdits; + export import CSVLayerFeatureReduction = __esri.CSVLayerFeatureReduction; - export import FeatureLayerCapabilities = __esri.FeatureLayerCapabilities; + export import CSVLayerLayerviewCreateEvent = __esri.CSVLayerLayerviewCreateEvent; - export import FeatureLayerCapabilitiesOperations = __esri.FeatureLayerCapabilitiesOperations; + export import CSVLayerLayerviewCreateEventHandler = __esri.CSVLayerLayerviewCreateEventHandler; - export import FeatureLayerElevationInfo = __esri.FeatureLayerElevationInfo; + export import CSVLayerLayerviewDestroyEvent = __esri.CSVLayerLayerviewDestroyEvent; - export import FeatureLayerGetFieldDomainOptions = __esri.FeatureLayerGetFieldDomainOptions; + export import CSVLayerLayerviewDestroyEventHandler = __esri.CSVLayerLayerviewDestroyEventHandler; - export import GraphicsLayerElevationInfo = __esri.GraphicsLayerElevationInfo; + export import ElevationLayerQueryElevationOptions = __esri.ElevationLayerQueryElevationOptions; - export import LayerFromArcGISServerUrlParams = __esri.LayerFromArcGISServerUrlParams; + export import ElevationLayerLayerviewCreateEvent = __esri.ElevationLayerLayerviewCreateEvent; - export import LayerFromPortalItemParams = __esri.LayerFromPortalItemParams; + export import ElevationLayerLayerviewCreateEventHandler = __esri.ElevationLayerLayerviewCreateEventHandler; + + export import ElevationLayerLayerviewDestroyEvent = __esri.ElevationLayerLayerviewDestroyEvent; + + export import ElevationLayerLayerviewDestroyEventHandler = __esri.ElevationLayerLayerviewDestroyEventHandler; + + export import GeoRSSLayerLayerviewCreateEvent = __esri.GeoRSSLayerLayerviewCreateEvent; + + export import GeoRSSLayerLayerviewCreateEventHandler = __esri.GeoRSSLayerLayerviewCreateEventHandler; + + export import GeoRSSLayerLayerviewDestroyEvent = __esri.GeoRSSLayerLayerviewDestroyEvent; + + export import GeoRSSLayerLayerviewDestroyEventHandler = __esri.GeoRSSLayerLayerviewDestroyEventHandler; + + export import GroupLayerLayerviewCreateEvent = __esri.GroupLayerLayerviewCreateEvent; + + export import GroupLayerLayerviewCreateEventHandler = __esri.GroupLayerLayerviewCreateEventHandler; + + export import GroupLayerLayerviewDestroyEvent = __esri.GroupLayerLayerviewDestroyEvent; + + export import GroupLayerLayerviewDestroyEventHandler = __esri.GroupLayerLayerviewDestroyEventHandler; + + export import ImageryLayerLayerviewCreateEvent = __esri.ImageryLayerLayerviewCreateEvent; + + export import ImageryLayerLayerviewCreateEventHandler = __esri.ImageryLayerLayerviewCreateEventHandler; + + export import ImageryLayerLayerviewDestroyEvent = __esri.ImageryLayerLayerviewDestroyEvent; + + export import ImageryLayerLayerviewDestroyEventHandler = __esri.ImageryLayerLayerviewDestroyEventHandler; + + export import IntegratedMeshLayerLayerviewCreateEvent = __esri.IntegratedMeshLayerLayerviewCreateEvent; + + export import IntegratedMeshLayerLayerviewCreateEventHandler = __esri.IntegratedMeshLayerLayerviewCreateEventHandler; + + export import IntegratedMeshLayerLayerviewDestroyEvent = __esri.IntegratedMeshLayerLayerviewDestroyEvent; + + export import IntegratedMeshLayerLayerviewDestroyEventHandler = __esri.IntegratedMeshLayerLayerviewDestroyEventHandler; + + export import MapImageLayerLayerviewCreateEvent = __esri.MapImageLayerLayerviewCreateEvent; + + export import MapImageLayerLayerviewCreateEventHandler = __esri.MapImageLayerLayerviewCreateEventHandler; + + export import MapImageLayerLayerviewDestroyEvent = __esri.MapImageLayerLayerviewDestroyEvent; + + export import MapImageLayerLayerviewDestroyEventHandler = __esri.MapImageLayerLayerviewDestroyEventHandler; + + export import MapNotesLayerLayerviewCreateEvent = __esri.MapNotesLayerLayerviewCreateEvent; + + export import MapNotesLayerLayerviewCreateEventHandler = __esri.MapNotesLayerLayerviewCreateEventHandler; + + export import MapNotesLayerLayerviewDestroyEvent = __esri.MapNotesLayerLayerviewDestroyEvent; + + export import MapNotesLayerLayerviewDestroyEventHandler = __esri.MapNotesLayerLayerviewDestroyEventHandler; + + export import OpenStreetMapLayerLayerviewCreateEvent = __esri.OpenStreetMapLayerLayerviewCreateEvent; + + export import OpenStreetMapLayerLayerviewCreateEventHandler = __esri.OpenStreetMapLayerLayerviewCreateEventHandler; + + export import OpenStreetMapLayerLayerviewDestroyEvent = __esri.OpenStreetMapLayerLayerviewDestroyEvent; + + export import OpenStreetMapLayerLayerviewDestroyEventHandler = __esri.OpenStreetMapLayerLayerviewDestroyEventHandler; + + export import PointCloudLayerLayerviewCreateEvent = __esri.PointCloudLayerLayerviewCreateEvent; + + export import PointCloudLayerLayerviewCreateEventHandler = __esri.PointCloudLayerLayerviewCreateEventHandler; + + export import PointCloudLayerLayerviewDestroyEvent = __esri.PointCloudLayerLayerviewDestroyEvent; + + export import PointCloudLayerLayerviewDestroyEventHandler = __esri.PointCloudLayerLayerviewDestroyEventHandler; + + export import PointCloudLayerElevationInfo = __esri.PointCloudLayerElevationInfo; + + export import PointCloudRendererColorModulation = __esri.PointCloudRendererColorModulation; + + export import PointCloudRendererPointSizeAlgorithm = __esri.PointCloudRendererPointSizeAlgorithm; + + export import SceneLayerLayerviewCreateEvent = __esri.SceneLayerLayerviewCreateEvent; + + export import SceneLayerLayerviewCreateEventHandler = __esri.SceneLayerLayerviewCreateEventHandler; + + export import SceneLayerLayerviewDestroyEvent = __esri.SceneLayerLayerviewDestroyEvent; + + export import SceneLayerLayerviewDestroyEventHandler = __esri.SceneLayerLayerviewDestroyEventHandler; export import SceneLayerElevationInfo = __esri.SceneLayerElevationInfo; + export import SceneLayerFeatureReduction = __esri.SceneLayerFeatureReduction; + + export import StreamLayerLayerviewCreateEvent = __esri.StreamLayerLayerviewCreateEvent; + + export import StreamLayerLayerviewCreateEventHandler = __esri.StreamLayerLayerviewCreateEventHandler; + + export import StreamLayerLayerviewDestroyEvent = __esri.StreamLayerLayerviewDestroyEvent; + + export import StreamLayerLayerviewDestroyEventHandler = __esri.StreamLayerLayerviewDestroyEventHandler; + export import StreamLayerFilter = __esri.StreamLayerFilter; export import StreamLayerPurgeOptions = __esri.StreamLayerPurgeOptions; export import StreamLayerUpdateFilterFilterChanges = __esri.StreamLayerUpdateFilterFilterChanges; + export import TileLayerLayerviewCreateEvent = __esri.TileLayerLayerviewCreateEvent; + + export import TileLayerLayerviewCreateEventHandler = __esri.TileLayerLayerviewCreateEventHandler; + + export import TileLayerLayerviewDestroyEvent = __esri.TileLayerLayerviewDestroyEvent; + + export import TileLayerLayerviewDestroyEventHandler = __esri.TileLayerLayerviewDestroyEventHandler; + + export import TileLayerFetchTileOptions = __esri.TileLayerFetchTileOptions; + + export import UnknownLayerLayerviewCreateEvent = __esri.UnknownLayerLayerviewCreateEvent; + + export import UnknownLayerLayerviewCreateEventHandler = __esri.UnknownLayerLayerviewCreateEventHandler; + + export import UnknownLayerLayerviewDestroyEvent = __esri.UnknownLayerLayerviewDestroyEvent; + + export import UnknownLayerLayerviewDestroyEventHandler = __esri.UnknownLayerLayerviewDestroyEventHandler; + + export import UnsupportedLayerLayerviewCreateEvent = __esri.UnsupportedLayerLayerviewCreateEvent; + + export import UnsupportedLayerLayerviewCreateEventHandler = __esri.UnsupportedLayerLayerviewCreateEventHandler; + + export import UnsupportedLayerLayerviewDestroyEvent = __esri.UnsupportedLayerLayerviewDestroyEvent; + + export import UnsupportedLayerLayerviewDestroyEventHandler = __esri.UnsupportedLayerLayerviewDestroyEventHandler; + + export import VectorTileLayerLayerviewCreateEvent = __esri.VectorTileLayerLayerviewCreateEvent; + + export import VectorTileLayerLayerviewCreateEventHandler = __esri.VectorTileLayerLayerviewCreateEventHandler; + + export import VectorTileLayerLayerviewDestroyEvent = __esri.VectorTileLayerLayerviewDestroyEvent; + + export import VectorTileLayerLayerviewDestroyEventHandler = __esri.VectorTileLayerLayerviewDestroyEventHandler; + export import VectorTileLayerCurrentStyleInfo = __esri.VectorTileLayerCurrentStyleInfo; - export import CodedValueDomainCodedValues = __esri.CodedValueDomainCodedValues; + export import WebTileLayerLayerviewCreateEvent = __esri.WebTileLayerLayerviewCreateEvent; - export import LabelClassLabelExpressionInfo = __esri.LabelClassLabelExpressionInfo; + export import WebTileLayerLayerviewCreateEventHandler = __esri.WebTileLayerLayerviewCreateEventHandler; + + export import WebTileLayerLayerviewDestroyEvent = __esri.WebTileLayerLayerviewDestroyEvent; + + export import WebTileLayerLayerviewDestroyEventHandler = __esri.WebTileLayerLayerviewDestroyEventHandler; + + export import WMSLayerLayerviewCreateEvent = __esri.WMSLayerLayerviewCreateEvent; + + export import WMSLayerLayerviewCreateEventHandler = __esri.WMSLayerLayerviewCreateEventHandler; + + export import WMSLayerLayerviewDestroyEvent = __esri.WMSLayerLayerviewDestroyEvent; + + export import WMSLayerLayerviewDestroyEventHandler = __esri.WMSLayerLayerviewDestroyEventHandler; + + export import WMSLayerFetchImageOptions = __esri.WMSLayerFetchImageOptions; + + export import WMTSLayerLayerviewCreateEvent = __esri.WMTSLayerLayerviewCreateEvent; + + export import WMTSLayerLayerviewCreateEventHandler = __esri.WMTSLayerLayerviewCreateEventHandler; + + export import WMTSLayerLayerviewDestroyEvent = __esri.WMTSLayerLayerviewDestroyEvent; + + export import WMTSLayerLayerviewDestroyEventHandler = __esri.WMTSLayerLayerviewDestroyEventHandler; + + export import BaseDynamicLayerFetchImageOptions = __esri.BaseDynamicLayerFetchImageOptions; + + export import BaseDynamicLayerLayerviewCreateEvent = __esri.BaseDynamicLayerLayerviewCreateEvent; + + export import BaseDynamicLayerLayerviewCreateEventHandler = __esri.BaseDynamicLayerLayerviewCreateEventHandler; + + export import BaseDynamicLayerLayerviewDestroyEvent = __esri.BaseDynamicLayerLayerviewDestroyEvent; + + export import BaseDynamicLayerLayerviewDestroyEventHandler = __esri.BaseDynamicLayerLayerviewDestroyEventHandler; + + export import BaseTileLayerFetchTileOptions = __esri.BaseTileLayerFetchTileOptions; + + export import BaseTileLayerLayerviewCreateEvent = __esri.BaseTileLayerLayerviewCreateEvent; + + export import BaseTileLayerLayerviewCreateEventHandler = __esri.BaseTileLayerLayerviewCreateEventHandler; + + export import BaseTileLayerLayerviewDestroyEvent = __esri.BaseTileLayerLayerviewDestroyEvent; + + export import BaseTileLayerLayerviewDestroyEventHandler = __esri.BaseTileLayerLayerviewDestroyEventHandler; + + export import CodedValueDomainCodedValues = __esri.CodedValueDomainCodedValues; export import PixelBlockAddDataPlaneData = __esri.PixelBlockAddDataPlaneData; export import PixelBlockStatistics = __esri.PixelBlockStatistics; - export import PortalFeaturedGroups = __esri.PortalFeaturedGroups; - - export import PortalItemFetchRelatedItemsParams = __esri.PortalItemFetchRelatedItemsParams; - - export import PortalItemUpdateParams = __esri.PortalItemUpdateParams; - - export import PortalUserAddItemParams = __esri.PortalUserAddItemParams; - - export import PortalUserFetchItemsParams = __esri.PortalUserFetchItemsParams; - export import ClassBreaksRendererClassBreakInfos = __esri.ClassBreaksRendererClassBreakInfos; export import ClassBreaksRendererLegendOptions = __esri.ClassBreaksRendererLegendOptions; @@ -8469,8 +9991,6 @@ declare module "esri" { export import UniqueValueRendererUniqueValueInfos = __esri.UniqueValueRendererUniqueValueInfos; - export import PointCloudRendererPointSizeAlgorithm = __esri.PointCloudRendererPointSizeAlgorithm; - export import PointCloudClassBreaksRendererColorClassBreakInfos = __esri.PointCloudClassBreaksRendererColorClassBreakInfos; export import PointCloudStretchRendererStops = __esri.PointCloudStretchRendererStops; @@ -8485,34 +10005,110 @@ declare module "esri" { export import ObjectSymbol3DLayerResource = __esri.ObjectSymbol3DLayerResource; + export import PointSymbol3DVerticalOffsetProperties = __esri.PointSymbol3DVerticalOffsetProperties; + export import PointSymbol3DVerticalOffset = __esri.PointSymbol3DVerticalOffset; + export import Symbol3DStyleOrigin = __esri.Symbol3DStyleOrigin; export import TextSymbol3DLayerFont = __esri.TextSymbol3DLayerFont; + export import TextSymbol3DLayerHalo = __esri.TextSymbol3DLayerHalo; + + export import LineCallout3DBorderProperties = __esri.LineCallout3DBorderProperties; + export import LineCallout3DBorder = __esri.LineCallout3DBorder; + + export import ClosestFacilityParametersAttributeParameterValues = __esri.ClosestFacilityParametersAttributeParameterValues; + export import GeometryServiceFromGeoCoordinateStringParams = __esri.GeometryServiceFromGeoCoordinateStringParams; export import GeometryServiceToGeoCoordinateStringParams = __esri.GeometryServiceToGeoCoordinateStringParams; + export import ProjectParametersTransformation = __esri.ProjectParametersTransformation; + export import LocatorAddressToLocationsParams = __esri.LocatorAddressToLocationsParams; export import LocatorAddressesToLocationsParams = __esri.LocatorAddressesToLocationsParams; export import LocatorSuggestLocationsParams = __esri.LocatorSuggestLocationsParams; - export import ClosestFacilityParametersAttributeParameterValues = __esri.ClosestFacilityParametersAttributeParameterValues; - export import PrintTemplateExportOptions = __esri.PrintTemplateExportOptions; export import PrintTemplateLayoutOptions = __esri.PrintTemplateLayoutOptions; - export import ProjectParametersTransformation = __esri.ProjectParametersTransformation; + export import MapViewDragEventOrigin = __esri.MapViewDragEventOrigin; - export import QueryQuantizationParameters = __esri.QueryQuantizationParameters; + export import MapViewClickEvent = __esri.MapViewClickEvent; + + export import MapViewClickEventHandler = __esri.MapViewClickEventHandler; + + export import MapViewDoubleClickEvent = __esri.MapViewDoubleClickEvent; + + export import MapViewDoubleClickEventHandler = __esri.MapViewDoubleClickEventHandler; + + export import MapViewDragEvent = __esri.MapViewDragEvent; + + export import MapViewDragEventHandler = __esri.MapViewDragEventHandler; + + export import MapViewHoldEvent = __esri.MapViewHoldEvent; + + export import MapViewHoldEventHandler = __esri.MapViewHoldEventHandler; + + export import MapViewKeyDownEvent = __esri.MapViewKeyDownEvent; + + export import MapViewKeyDownEventHandler = __esri.MapViewKeyDownEventHandler; + + export import MapViewKeyUpEvent = __esri.MapViewKeyUpEvent; + + export import MapViewKeyUpEventHandler = __esri.MapViewKeyUpEventHandler; + + export import MapViewLayerviewCreateEvent = __esri.MapViewLayerviewCreateEvent; + + export import MapViewLayerviewCreateEventHandler = __esri.MapViewLayerviewCreateEventHandler; + + export import MapViewLayerviewDestroyEvent = __esri.MapViewLayerviewDestroyEvent; + + export import MapViewLayerviewDestroyEventHandler = __esri.MapViewLayerviewDestroyEventHandler; + + export import MapViewConstraints = __esri.MapViewConstraints; + + export import MapViewGoToOptions = __esri.MapViewGoToOptions; + + export import MapViewHitTestScreenPoint = __esri.MapViewHitTestScreenPoint; + + export import MapViewToMapScreenPoint = __esri.MapViewToMapScreenPoint; + + export import MapViewMouseWheelEvent = __esri.MapViewMouseWheelEvent; + + export import MapViewMouseWheelEventHandler = __esri.MapViewMouseWheelEventHandler; + + export import MapViewPointerDownEvent = __esri.MapViewPointerDownEvent; + + export import MapViewPointerDownEventHandler = __esri.MapViewPointerDownEventHandler; + + export import MapViewPointerMoveEvent = __esri.MapViewPointerMoveEvent; + + export import MapViewPointerMoveEventHandler = __esri.MapViewPointerMoveEventHandler; + + export import MapViewPointerUpEvent = __esri.MapViewPointerUpEvent; + + export import MapViewPointerUpEventHandler = __esri.MapViewPointerUpEventHandler; + + export import MapViewResizeEvent = __esri.MapViewResizeEvent; + + export import MapViewResizeEventHandler = __esri.MapViewResizeEventHandler; + + export import AttributeParamValue = __esri.AttributeParamValue; export import ConfigurationTaskGetDataWorkspaceDetailsParams = __esri.ConfigurationTaskGetDataWorkspaceDetailsParams; export import ConfigurationTaskGetUserJobQueryDetailsParams = __esri.ConfigurationTaskGetUserJobQueryDetailsParams; + export import AuxRecordDescription = __esri.AuxRecordDescription; + + export import JobCreationParameters = __esri.JobCreationParameters; + + export import JobQueryParameters = __esri.JobQueryParameters; + export import JobTaskAddEmbeddedAttachmentParams = __esri.JobTaskAddEmbeddedAttachmentParams; export import JobTaskAddLinkedAttachmentParams = __esri.JobTaskAddLinkedAttachmentParams; @@ -8561,6 +10157,10 @@ declare module "esri" { export import JobTaskUpdateRecordParams = __esri.JobTaskUpdateRecordParams; + export import JobUpdateParameters = __esri.JobUpdateParameters; + + export import ChangeRule = __esri.ChangeRule; + export import NotificationTaskAddChangeRuleParams = __esri.NotificationTaskAddChangeRuleParams; export import NotificationTaskDeleteChangeRuleParams = __esri.NotificationTaskDeleteChangeRuleParams; @@ -8605,43 +10205,16 @@ declare module "esri" { export import WorkflowTaskSetCurrentStepParams = __esri.WorkflowTaskSetCurrentStepParams; - export import MapViewConstraints = __esri.MapViewConstraints; - - export import MapViewGoToOptions = __esri.MapViewGoToOptions; - - export import MapViewHitTestScreenPoint = __esri.MapViewHitTestScreenPoint; - - export import SceneViewConstraintsProperties = __esri.SceneViewConstraintsProperties; - export import SceneViewConstraints = __esri.SceneViewConstraints; - - export import SceneViewConstraintsAltitudeProperties = __esri.SceneViewConstraintsAltitudeProperties; - export import SceneViewConstraintsAltitude = __esri.SceneViewConstraintsAltitude; - - export import SceneViewConstraintsClipDistanceProperties = __esri.SceneViewConstraintsClipDistanceProperties; - export import SceneViewConstraintsClipDistance = __esri.SceneViewConstraintsClipDistance; - - export import SceneViewConstraintsCollision = __esri.SceneViewConstraintsCollision; - - export import SceneViewConstraintsTiltProperties = __esri.SceneViewConstraintsTiltProperties; - export import SceneViewConstraintsTilt = __esri.SceneViewConstraintsTilt; - - export import SceneViewEnvironmentProperties = __esri.SceneViewEnvironmentProperties; - export import SceneViewEnvironment = __esri.SceneViewEnvironment; - - export import SceneViewEnvironmentAtmosphereProperties = __esri.SceneViewEnvironmentAtmosphereProperties; - export import SceneViewEnvironmentAtmosphere = __esri.SceneViewEnvironmentAtmosphere; - - export import SceneViewEnvironmentLightingProperties = __esri.SceneViewEnvironmentLightingProperties; - export import SceneViewEnvironmentLighting = __esri.SceneViewEnvironmentLighting; - - export import SceneViewGoToOptions = __esri.SceneViewGoToOptions; - - export import SceneViewHitTestScreenPoint = __esri.SceneViewHitTestScreenPoint; - - export import ViewPadding = __esri.ViewPadding; - export import ImageryLayerViewPixelData = __esri.ImageryLayerViewPixelData; + export import StreamLayerViewDataReceivedEvent = __esri.StreamLayerViewDataReceivedEvent; + + export import StreamLayerViewDataReceivedEventHandler = __esri.StreamLayerViewDataReceivedEventHandler; + + export import StreamLayerViewFilter = __esri.StreamLayerViewFilter; + + export import StreamLayerViewUpdateFilterFilter = __esri.StreamLayerViewUpdateFilterFilter; + export import SlideApplyToOptions = __esri.SlideApplyToOptions; export import SlideCreateFromOptions = __esri.SlideCreateFromOptions; @@ -8671,9 +10244,47 @@ declare module "esri" { export import PopupOpenOptions = __esri.PopupOpenOptions; - export import SearchSources = __esri.SearchSources; + export import SearchViewModelSearchCompleteEventResults = __esri.SearchViewModelSearchCompleteEventResults; - export import SearchViewModelSources = __esri.SearchViewModelSources; + export import SearchViewModelSearchCompleteEventResultsResults = __esri.SearchViewModelSearchCompleteEventResultsResults; + + export import SearchViewModelSelectResultEventResult = __esri.SearchViewModelSelectResultEventResult; + + export import SearchViewModelSuggestCompleteEventResults = __esri.SearchViewModelSuggestCompleteEventResults; + + export import SearchViewModelSuggestCompleteEventResultsResults = __esri.SearchViewModelSuggestCompleteEventResultsResults; + + export import SearchViewModelLoadEvent = __esri.SearchViewModelLoadEvent; + + export import SearchViewModelLoadEventHandler = __esri.SearchViewModelLoadEventHandler; + + export import SearchViewModelSearchClearEvent = __esri.SearchViewModelSearchClearEvent; + + export import SearchViewModelSearchClearEventHandler = __esri.SearchViewModelSearchClearEventHandler; + + export import SearchViewModelSearchCompleteEvent = __esri.SearchViewModelSearchCompleteEvent; + + export import SearchViewModelSearchCompleteEventHandler = __esri.SearchViewModelSearchCompleteEventHandler; + + export import SearchViewModelSearchStartEvent = __esri.SearchViewModelSearchStartEvent; + + export import SearchViewModelSearchStartEventHandler = __esri.SearchViewModelSearchStartEventHandler; + + export import SearchViewModelSelectResultEvent = __esri.SearchViewModelSelectResultEvent; + + export import SearchViewModelSelectResultEventHandler = __esri.SearchViewModelSelectResultEventHandler; + + export import SearchViewModelSuggestCompleteEvent = __esri.SearchViewModelSuggestCompleteEvent; + + export import SearchViewModelSuggestCompleteEventHandler = __esri.SearchViewModelSuggestCompleteEventHandler; + + export import SearchViewModelSuggestStartEvent = __esri.SearchViewModelSuggestStartEvent; + + export import SearchViewModelSuggestStartEventHandler = __esri.SearchViewModelSuggestStartEventHandler; + + export import DynamicLayerFetchImageOptions = __esri.DynamicLayerFetchImageOptions; + + export import DynamicLayerGetImageUrlOptions = __esri.DynamicLayerGetImageUrlOptions; export import ArcGISDynamicMapServiceGetExportImageParametersOptions = __esri.ArcGISDynamicMapServiceGetExportImageParametersOptions; @@ -8693,8 +10304,14 @@ declare module "esri" { export import requestEsriRequestOptions = __esri.requestEsriRequestOptions; + export import EachAlwaysResult = __esri.EachAlwaysResult; + export import urlUtilsAddProxyRuleRule = __esri.urlUtilsAddProxyRuleRule; + export import EventAttachedCallback = __esri.EventAttachedCallback; + + export import PausableWatchHandle = __esri.PausableWatchHandle; + export import decoratorsPropertyPropertyMetadata = __esri.decoratorsPropertyPropertyMetadata; export import colorCreateContinuousRendererParams = __esri.colorCreateContinuousRendererParams; @@ -8715,6 +10332,10 @@ declare module "esri" { export import sizeCreateVisualVariablesParamsLegendOptions = __esri.sizeCreateVisualVariablesParamsLegendOptions; + export import typeCreateRendererParams = __esri.typeCreateRendererParams; + + export import typeCreateRendererParamsLegendOptions = __esri.typeCreateRendererParamsLegendOptions; + export import univariateColorSizeCreateContinuousRendererParams = __esri.univariateColorSizeCreateContinuousRendererParams; export import univariateColorSizeCreateContinuousRendererParamsColorOptions = __esri.univariateColorSizeCreateContinuousRendererParamsColorOptions; @@ -8741,11 +10362,71 @@ declare module "esri" { export import summaryStatisticsSummaryStatisticsParams = __esri.summaryStatisticsSummaryStatisticsParams; + export import uniqueValuesUniqueValuesParams = __esri.uniqueValuesUniqueValuesParams; + export import colorGetSchemesParams = __esri.colorGetSchemesParams; export import locationGetSchemesParams = __esri.locationGetSchemesParams; export import sizeGetSchemesParams = __esri.sizeGetSchemesParams; + + export import typeGetSchemesParams = __esri.typeGetSchemesParams; + + export import JobQuery = __esri.JobQuery; + + export import GroupMembership = __esri.GroupMembership; + + export import JobQueryContainer = __esri.JobQueryContainer; + + export import Privilege = __esri.Privilege; + + export import DataWorkspace = __esri.DataWorkspace; + + export import HoldType = __esri.HoldType; + + export import JobPriority = __esri.JobPriority; + + export import JobStatus = __esri.JobStatus; + + export import JobType = __esri.JobType; + + export import ActivityType = __esri.ActivityType; + + export import NotificationType = __esri.NotificationType; + + export import AuxRecord = __esri.AuxRecord; + + export import AuxRecordValue = __esri.AuxRecordValue; + + export import JobVersionInfo = __esri.JobVersionInfo; + + export import QueryFieldInfo = __esri.QueryFieldInfo; + + export import DatasetConfiguration = __esri.DatasetConfiguration; + + export import WhereCondition = __esri.WhereCondition; + + export import ReportDataGroup = __esri.ReportDataGroup; + + export import WorkflowConflicts = __esri.WorkflowConflicts; + + export import WorkflowOption = __esri.WorkflowOption; + + export import WorkflowStepInfo = __esri.WorkflowStepInfo; + + export import StepType = __esri.StepType; + + export import WorkflowAnnotationDisplayDetails = __esri.WorkflowAnnotationDisplayDetails; + + export import WorkflowPathDisplayDetails = __esri.WorkflowPathDisplayDetails; + + export import WorkflowStepDisplayDetails = __esri.WorkflowStepDisplayDetails; + + export import ColorAndIntensity = __esri.ColorAndIntensity; + + export import RenderCamera = __esri.RenderCamera; + + export import SunLight = __esri.SunLight; } declare module "esri/Basemap" { @@ -8883,24 +10564,9 @@ declare module "esri/identity/ServerInfo" { export = ServerInfo; } -declare module "esri/layers/ElevationLayer" { - import ElevationLayer = __esri.ElevationLayer; - export = ElevationLayer; -} - -declare module "esri/layers/ImageryLayer" { - import ImageryLayer = __esri.ImageryLayer; - export = ImageryLayer; -} - -declare module "esri/layers/MapImageLayer" { - import MapImageLayer = __esri.MapImageLayer; - export = MapImageLayer; -} - -declare module "esri/layers/TileLayer" { - import TileLayer = __esri.TileLayer; - export = TileLayer; +declare module "esri/layers/BaseElevationLayer" { + import BaseElevationLayer = __esri.BaseElevationLayer; + export = BaseElevationLayer; } declare module "esri/layers/CSVLayer" { @@ -8908,6 +10574,11 @@ declare module "esri/layers/CSVLayer" { export = CSVLayer; } +declare module "esri/layers/ElevationLayer" { + import ElevationLayer = __esri.ElevationLayer; + export = ElevationLayer; +} + declare module "esri/layers/FeatureLayer" { import FeatureLayer = __esri.FeatureLayer; export = FeatureLayer; @@ -8928,6 +10599,11 @@ declare module "esri/layers/GroupLayer" { export = GroupLayer; } +declare module "esri/layers/ImageryLayer" { + import ImageryLayer = __esri.ImageryLayer; + export = ImageryLayer; +} + declare module "esri/layers/IntegratedMeshLayer" { import IntegratedMeshLayer = __esri.IntegratedMeshLayer; export = IntegratedMeshLayer; @@ -8938,6 +10614,16 @@ declare module "esri/layers/Layer" { export = Layer; } +declare module "esri/layers/MapImageLayer" { + import MapImageLayer = __esri.MapImageLayer; + export = MapImageLayer; +} + +declare module "esri/layers/MapNotesLayer" { + import MapNotesLayer = __esri.MapNotesLayer; + export = MapNotesLayer; +} + declare module "esri/layers/OpenStreetMapLayer" { import OpenStreetMapLayer = __esri.OpenStreetMapLayer; export = OpenStreetMapLayer; @@ -8958,6 +10644,11 @@ declare module "esri/layers/StreamLayer" { export = StreamLayer; } +declare module "esri/layers/TileLayer" { + import TileLayer = __esri.TileLayer; + export = TileLayer; +} + declare module "esri/layers/UnknownLayer" { import UnknownLayer = __esri.UnknownLayer; export = UnknownLayer; @@ -8978,6 +10669,26 @@ declare module "esri/layers/WebTileLayer" { export = WebTileLayer; } +declare module "esri/layers/WMSLayer" { + import WMSLayer = __esri.WMSLayer; + export = WMSLayer; +} + +declare module "esri/layers/WMTSLayer" { + import WMTSLayer = __esri.WMTSLayer; + export = WMTSLayer; +} + +declare module "esri/layers/BaseDynamicLayer" { + import BaseDynamicLayer = __esri.BaseDynamicLayer; + export = BaseDynamicLayer; +} + +declare module "esri/layers/BaseTileLayer" { + import BaseTileLayer = __esri.BaseTileLayer; + export = BaseTileLayer; +} + declare module "esri/layers/support/CodedValueDomain" { import CodedValueDomain = __esri.CodedValueDomain; export = CodedValueDomain; @@ -8998,6 +10709,16 @@ declare module "esri/layers/support/Field" { export = Field; } +declare module "esri/layers/support/FeatureTemplate" { + import FeatureTemplate = __esri.FeatureTemplate; + export = FeatureTemplate; +} + +declare module "esri/layers/support/FeatureType" { + import FeatureType = __esri.FeatureType; + export = FeatureType; +} + declare module "esri/layers/support/ImageParameters" { import ImageParameters = __esri.ImageParameters; export = ImageParameters; @@ -9053,6 +10774,26 @@ declare module "esri/layers/support/TileInfo" { export = TileInfo; } +declare module "esri/layers/support/TileMatrixSet" { + import TileMatrixSet = __esri.TileMatrixSet; + export = TileMatrixSet; +} + +declare module "esri/layers/support/WMSSublayer" { + import WMSSublayer = __esri.WMSSublayer; + export = WMSSublayer; +} + +declare module "esri/layers/support/WMTSStyle" { + import WMTSStyle = __esri.WMTSStyle; + export = WMTSStyle; +} + +declare module "esri/layers/support/WMTSSublayer" { + import WMTSSublayer = __esri.WMTSSublayer; + export = WMTSSublayer; +} + declare module "esri/portal/Portal" { import Portal = __esri.Portal; export = Portal; @@ -9273,6 +11014,16 @@ declare module "esri/symbols/WebStyleSymbol" { export = WebStyleSymbol; } +declare module "esri/symbols/callouts/Callout3D" { + import Callout3D = __esri.Callout3D; + export = Callout3D; +} + +declare module "esri/symbols/callouts/LineCallout3D" { + import LineCallout3D = __esri.LineCallout3D; + export = LineCallout3D; +} + declare module "esri/tasks/ClosestFacilityTask" { import ClosestFacilityTask = __esri.ClosestFacilityTask; export = ClosestFacilityTask; @@ -9588,6 +11339,11 @@ declare module "esri/views/layers/LayerView" { export = LayerView; } +declare module "esri/views/layers/CSVLayerView" { + import CSVLayerView = __esri.CSVLayerView; + export = CSVLayerView; +} + declare module "esri/views/layers/FeatureLayerView" { import FeatureLayerView = __esri.FeatureLayerView; export = FeatureLayerView; @@ -9608,6 +11364,11 @@ declare module "esri/views/layers/SceneLayerView" { export = SceneLayerView; } +declare module "esri/views/layers/StreamLayerView" { + import StreamLayerView = __esri.StreamLayerView; + export = StreamLayerView; +} + declare module "esri/views/ui/UI" { import UI = __esri.UI; export = UI; @@ -10013,6 +11774,11 @@ declare module "esri/renderers/smartMapping/creators/size" { export = size; } +declare module "esri/renderers/smartMapping/creators/type" { + import type = __esri.type; + export = type; +} + declare module "esri/renderers/smartMapping/creators/univariateColorSize" { import univariateColorSize = __esri.univariateColorSize; export = univariateColorSize; @@ -10033,6 +11799,11 @@ declare module "esri/renderers/smartMapping/statistics/summaryStatistics" { export = summaryStatistics; } +declare module "esri/renderers/smartMapping/statistics/uniqueValues" { + import uniqueValues = __esri.uniqueValues; + export = uniqueValues; +} + declare module "esri/renderers/smartMapping/symbology/color" { import symbologyColor = __esri.symbologyColor; export = symbologyColor; @@ -10048,6 +11819,11 @@ declare module "esri/renderers/smartMapping/symbology/size" { export = symbologySize; } +declare module "esri/renderers/smartMapping/symbology/type" { + import symbologyType = __esri.symbologyType; + export = symbologyType; +} + declare module "esri/renderers/support/jsonUtils" { import supportJsonUtils = __esri.supportJsonUtils; export = supportJsonUtils; diff --git a/types/arcgis-js-api/v3/index.d.ts b/types/arcgis-js-api/v3/index.d.ts index 40875ddd48..0c30ae898d 100644 --- a/types/arcgis-js-api/v3/index.d.ts +++ b/types/arcgis-js-api/v3/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ArcGIS API for JavaScript 3.20 +// Type definitions for ArcGIS API for JavaScript 3.21 // Project: https://developers.arcgis.com/javascript/3/ // Definitions by: Esri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -18,6 +18,7 @@ declare module "esri" { import BasemapLayer = require("esri/dijit/BasemapLayer"); import Symbol = require("esri/symbols/Symbol"); import BookmarkItem = require("esri/dijit/BookmarkItem"); + import TimeInfo = require("esri/layers/TimeInfo"); import Color = require("esri/Color"); import LocationProviderBase = require("esri/tasks/locationproviders/LocationProviderBase"); import PictureMarkerSymbol = require("esri/symbols/PictureMarkerSymbol"); @@ -213,6 +214,8 @@ declare module "esri" { isReference?: boolean; /** Initial opacity or transparency of the basemap layer. */ opacity?: number; + /** A url to a JSON file containing the stylesheet information to render the VectorTileLayer. */ + styleUrl?: string; /** Specify subDomains where tiles are served to speed up tile retrieval (using subDomains gets around the browser limit of the max number of concurrent requests to a domain). */ subDomains?: string[]; /** The URL template used to retrieve the tiles. */ @@ -221,7 +224,7 @@ declare module "esri" { tileInfo?: TileInfo; /** Define additional tile server domains for the layer. */ tileServer?: string[]; - /** The type of layer, valid values are "BingMapsAerial", "BingMapsHybrid", "BingMapsRoad", "OpenStreetMap", or "WebTiledLayer". */ + /** The type of layer. */ type?: string; /** URL to the ArcGIS Server REST resource that represents a map or image service. */ url?: string; @@ -293,6 +296,8 @@ declare module "esri" { outFields?: string[]; /** Refresh interval of the layer in minutes. */ refreshInterval?: number; + /** Time information for the layer, such as start time field, end time field, track id field, layers time extent and the draw time interval. */ + timeInfo?: TimeInfo; /** Visibility of the layer. */ visible?: boolean; } @@ -474,17 +479,17 @@ declare module "esri" { /** The selected color. */ color: Color; /** The row size of the palette. */ - colorsPerRow: number; + colorsPerRow?: number; /** The set of available color options. */ - palette: Color[]; + palette?: Color[]; /** Array of recent colors to show in the recent colors row. */ - recentColors: Color[]; + recentColors?: Color[]; /** Toggles color selection being required. */ - required: boolean; + required?: boolean; /** Toggles the recent color row. */ - showRecentColors: boolean; + showRecentColors?: boolean; /** Toggles the transparency slider. */ - showTransparencySlider: boolean; + showTransparencySlider?: boolean; } export interface ConnectOriginsToDestinationsOptions { /** The URL to the GPServer used to execute an analysis job. */ @@ -879,6 +884,8 @@ declare module "esri" { showSelectFolder?: boolean; } export interface FeatureLayerOptions { + /** Indicates whether attribute features containing m-values can be edited. */ + allowUpdateWithoutMValues?: boolean; /** Enable or disable the auto generalization of features from a non-editable layer in on-demand mode. */ autoGeneralize?: boolean; /** Class attribute to set for the layer's node. */ @@ -1401,6 +1408,22 @@ declare module "esri" { force3DTransforms?: boolean; /** By default the map creates and uses an out-of-the-box esri/dijit/Popup. */ infoWindow?: InfoWindowBase; + /** Indicates whether to enable double-click on a map to recenter and zoom in a level by using SHIFT + Click. */ + isClickRecenter?: boolean; + /** Indicates whether double-clicking on map zooms in on extent. */ + isDoubleClickZoom?: boolean; + /** Indicates whether to enable navigation of the map using a keyboard's arrow keys. */ + isKeyboardNavigation?: boolean; + /** Indicates whether all map navigation is enabled. */ + isMapNavigation?: boolean; + /** Indicates whether panning is enabled within the map. */ + isPan?: boolean; + /** Indicates whether pinch zoom navigation is enabled on touch-enabled devices. */ + isPinchZoom?: boolean; + /** Indicates whether to enable a mouse drag to zoom into to a specific region on the map. */ + isRubberBandZoom?: boolean; + /** (Added at version 3.21). */ + isScrollWheel?: boolean; /** If provided, the map is initialized with the specified levels of detail. */ lods?: LOD[]; /** Display the esri logo on the map. */ @@ -1547,8 +1570,6 @@ declare module "esri" { popupWindowFeatures?: string; /** The ArcGIS for Portal URL. */ portalUrl?: string; - /** Indicates whether to display social logins such as Google/Facebook. */ - showSocialLogins?: boolean; } export interface ObliqueViewerOptions { /** Azimuth angle value for which to display oblique images. */ @@ -1765,6 +1786,8 @@ declare module "esri" { export interface PrintOptions { /** Set to true if the print service is an asynchronous geoprocessing service. */ async?: boolean; + /** Additional parameters for the print service. */ + extraParameters?: any; /** The map to print. */ map?: Map; /** An optional array of user-defined templates. */ @@ -1891,8 +1914,6 @@ declare module "esri" { expanded?: boolean; /** This the specified graphicsLayer to use for the highlightGraphic and labelGraphic instead of map.graphics. */ graphicsLayer?: Layer; - /** The symbol used for highlightGraphic. */ - highlightSymbol?: Symbol; /** A customized infoTemplate for the selected feature. */ infoTemplate?: InfoTemplate; /** The text symbol for the label graphic. */ @@ -2528,7 +2549,7 @@ declare module "esri/IdentityManagerBase" { findCredential(url: string, userId?: string): Credential; /** * Returns the OAuth configuration for the passed in Portal server URL. - * @param url The URL to the Portal. + * @param url The ArcGIS for Portal URL, for example "https://www.arcgis.com" for ArcGIS Online and "https://www.example.com/portal" for your in-house portal. */ findOAuthInfo(url: string): OAuthInfo; /** @@ -2553,7 +2574,7 @@ declare module "esri/IdentityManagerBase" { * Call this method (during your application initialization) with JSON previously obtained from toJson method to re-hydrate the state of identity manager. * @param json The JSON obtained from the toJson method. */ - initialize(json: Object): any; + initialize(json: Object): void; /** Returns true if the identity manager is busy accepting user input, i.e., the user has invoked signIn and is waiting for a response. */ isBusy(): boolean; /** @@ -2576,7 +2597,7 @@ declare module "esri/IdentityManagerBase" { registerServers(serverInfos: ServerInfo[]): void; /** * Registers the given OAuth2 access token with the identity manager. - * @param properties See the object specifications table below for the structure of the properties object. + * @param properties See the object specifications table below for the structure of the properties object. */ registerToken(properties: any): void; /** @@ -2889,8 +2910,6 @@ declare module "esri/arcgis/OAuthInfo" { popupWindowFeatures: string; /** The ArcGIS for Portal URL. */ portalUrl: string; - /** Indicates whether to display social logins like Google/Facebook. */ - showSocialLogins: boolean; /** * Creates a new OAuthInfo given the specified parameters. * @param params Various options to configure the OAuthInfo object. @@ -2947,6 +2966,8 @@ declare module "esri/arcgis/Portal" { defaultBasemap: any; /** The default extent for the map the portal displays in the map viewer. */ defaultExtent: any; + /** The default vector basemap to use for the portal. */ + defaultVectorBasemap: any; /** A description of the organization / portal. */ description: string; /** The featured groups for the portal. */ @@ -2957,6 +2978,8 @@ declare module "esri/arcgis/Portal" { featuredItemsGroupQuery: string; /** The query that identifies the group containing features items for the gallery. */ galleryTemplatesGroupQuery: string; + /** Helper services provided by the portal. */ + helperServices: any; /** The group that contains featured content to be displayed on the home page. */ homePageFeaturedContent: string; /** The number of featured items that can be displayed on the home page. */ @@ -2991,7 +3014,7 @@ declare module "esri/arcgis/Portal" { portalProperties: any; /** The URL to the thumbnail of the portal. */ portalThumbnail: string; - /** URL to the portal. */ + /** The REST URL for the portal, for example "https://www.arcgis.com/sharing/rest/" for ArcGIS Online and "https://www.example.com/arcgis/sharing/rest/" for your in-house portal. */ portalUrl: string; /** The region for the organization. */ region: string; @@ -3013,7 +3036,7 @@ declare module "esri/arcgis/Portal" { thumbnailUrl: string; /** Sets the units of measure for the organization's users. */ units: string; - /** The portal url. */ + /** The ArcGIS for Portal URL, for example "https://www.arcgis.com" for ArcGIS Online and "https://www.example.com/arcgis" for your in-house portal. */ url: string; /** The prefix selected by the organization's administrator to be used with the customBaseURL. */ urlKey: string; @@ -3021,9 +3044,13 @@ declare module "esri/arcgis/Portal" { user: PortalUser; /** If true, only simple where clauses that are complaint with SQL92 can be used when querying layers and tables. */ useStandardizedQuery: boolean; + /** Whether an organization has opted in to use the vector tile basemaps. */ + useVectorBasemaps: boolean; + /** The query that defines the vector tiles basemaps that should be displayed in the Basemap Gallery when useVectorBasemaps is true. */ + vectorBasemapGalleryGroupQuery: string; /** * Creates a new Portal object. - * @param url URL to the ArcGIS.com site or in-house portal. + * @param url The ArcGIS for Portal URL, for example "https://www.arcgis.com" for ArcGIS Online and "https://www.example.com/arcgis" for your in-house portal. */ constructor(url: string); /** Returns a PortalUser object that describes the user currently signed in to the portal. */ @@ -3111,6 +3138,11 @@ declare module "esri/arcgis/Portal" { url: string; /** Get the current members for the group. */ getMembers(): any; + /** + * Get the URL to the thumbnail image for the portal group. + * @param width The desired image width. + */ + getThumbnailUrl(width?: number): string; /** * Execute a query against the group to return a deferred that when resolved returns PortalQueryResult that contain a results array of PortalItem objects that match the input query. * @param queryParams The input query parameters. @@ -3196,6 +3228,11 @@ declare module "esri/arcgis/Portal" { getComments(): any; /** Returns the rating (if any) given to the item. */ getRating(): any; + /** + * Get the URL to the thumbnail image for the portal item. + * @param width The desired image width. + */ + getThumbnailUrl(width?: number): string; /** * Updates an item comment. * @param comment A PortalComment that contains the comment updates. @@ -3274,6 +3311,11 @@ declare module "esri/arcgis/Portal" { getNotifications(): any; /** Access the tag objects that have been created by the portal user. */ getTags(): any; + /** + * Get the URL to the thumbnail image for the portal user. + * @param width The desired image width. + */ + getThumbnailUrl(width?: number): string; } } @@ -3440,7 +3482,7 @@ declare module "esri/dijit/BasemapGallery" { import esri = require("esri"); import Basemap = require("esri/dijit/Basemap"); - /** The BasemapGallery dijit displays a collection basemaps from ArcGIS.com or a user-defined set of map or image services. */ + /** The BasemapGallery dijit displays a collection of basemaps from ArcGIS.com or a user-defined set of map or image services. */ class BasemapGallery { /** List of basemaps displayed in the BasemapGallery. */ basemaps: Basemap[]; @@ -3508,6 +3550,8 @@ declare module "esri/dijit/BasemapLayer" { fullExtent: Extent; /** The initial extent of the layer. */ initialExtent: Extent; + /** A url to a JSON file containing the stylesheet information to render the VectorTileLayer. */ + styleUrl: string; /** The subDomains where tiles are served to speed up tile retrieval (using subDomains gets around the browser limit of the max number of concurrent requests to a domain). */ subDomains: string[]; /** The tile info for the layer including lods, rows, cols, origin and spatial reference. */ @@ -5288,6 +5332,8 @@ declare module "esri/dijit/PopupTemplate" { /** The PopupTemplate class extends esri/InfoTemplate and provides support for defining a layout. */ class PopupTemplate extends InfoTemplate { + /** An array of objects that reference Arcade expressions. */ + expressionInfos: any[]; /** The popup definition defined as a JavaScript object. */ info: any; /** @@ -5640,6 +5686,9 @@ declare module "esri/dijit/SymbolStyler" { startup(): void; /** Saves the recent fill and outline colors. */ storeColors(): void; + /** Fired every time an edit is committed. */ + on(type: "style-update", listener: (event: { target: SymbolStyler }) => void): esri.Handle; + on(type: string, listener: (event: any) => void): esri.Handle; } export = SymbolStyler; } @@ -5865,7 +5914,7 @@ declare module "esri/dijit/analysis/AnalysisBase" { checkJobStatus(jobId: string): void; /** * Starts an analysis tool. - * @param params See the object specifications table below for the structure of the params object. + * @param params See the object specifications table below for the structure of the params object. */ execute(params: string): void; /** @@ -8633,6 +8682,8 @@ declare module "esri/graphic" { getShape(): any; /** Returns one or more dojox/gfx/shape.Shape used to draw the graphic. */ getShapes(): any[]; + /** In contrast to the getLayer method, getSouceLayer does not change when a graphic is added to another layer. */ + getSourceLayer(): Layer; /** Returns the title string based on attributes and infoTemplate values. */ getTitle(): string; /** Hides the graphic. */ @@ -9471,6 +9522,8 @@ declare module "esri/layers/FeatureLayer" { advancedQueryCapabilities: any; /** Returns true if the geometry of the features in the layer can be edited, false otherwise. */ allowGeometryUpdates: boolean; + /** Indicates whether attribute features containing m-values can be edited. */ + allowUpdateWithoutMValues: boolean; /** The URL, when available, where the layer's attribution data is stored. */ attributionDataUrl: string; /** Information about the capabilities enabled for this layer. */ @@ -10279,6 +10332,8 @@ declare module "esri/layers/KMLLayer" { getFeature(featureInfo: any): any; /** Get an array of map layers that were created to draw placemarks, ground and screen overlays. */ getLayers(): Layer[]; + /** Refreshes the features in the KML Layer. */ + refresh(): void; /** * Set the visibility for the specified folder. * @param folder A KML folder. @@ -11034,6 +11089,8 @@ declare module "esri/layers/VectorTileLayer" { fullExtent: Extent; /** The initial extent of the layer. */ initialExtent: Extent; + /** Name of the vector tile layer. */ + name: string; /** The spatial reference of the layer. */ spatialReference: SpatialReference; /** Contains information about the tiling scheme for the layer. */ @@ -11055,6 +11112,10 @@ declare module "esri/layers/VectorTileLayer" { setStyle(styleUrl: string | any): void; /** Fires when the style is changed on the layer. */ on(type: "style-change", listener: (event: { style: any; target: VectorTileLayer }) => void): esri.Handle; + /** Fires when the layer has finished updating its content. */ + on(type: "update-end", listener: (event: { target: VectorTileLayer }) => void): esri.Handle; + /** Fires when the layer begins to update its content. */ + on(type: "update-start", listener: (event: { target: VectorTileLayer }) => void): esri.Handle; on(type: string, listener: (event: any) => void): esri.Handle; } export = VectorTileLayer; @@ -11773,12 +11834,18 @@ declare module "esri/map" { isDoubleClickZoom: boolean; /** When true, keyboard navigation is enabled. */ isKeyboardNavigation: boolean; + /** Indicates whether all map navigation is enabled. */ + isMapNavigation: boolean; /** When true, map panning is enabled using the mouse. */ isPan: boolean; /** When true, pan arrows are displayed around the edge of the map. */ isPanArrows: boolean; + /** Indicates whether pinch zoom navigation is enabled on touch-enabled devices. */ + isPinchZoom: boolean; /** When true, rubberband zoom is enabled. */ isRubberBandZoom: boolean; + /** It indicates whether map navigation based on mouse scroll wheel is enabled. */ + isScrollWheel: boolean; /** When true, the mouse scroll wheel zoom is enabled. */ isScrollWheelZoom: boolean; /** When true, shift double click zoom is enabled. */ @@ -11853,8 +11920,11 @@ declare module "esri/map" { disableMapNavigation(): void; /** Disallows panning a map using the mouse. */ disablePan(): void; + disablePinchZoom(): void; /** Disallows zooming in or out on a map using a bounding box. */ disableRubberBandZoom(): void; + /** Disables navigation of the map based on mouse scroll wheel. */ + disableScrollWheel(): void; /** Disallows zooming in or out on a map using the mouse scroll wheel. */ disableScrollWheelZoom(): void; /** Disallows shift double clicking on a map to zoom in a level and center the map. */ @@ -11871,8 +11941,12 @@ declare module "esri/map" { enableMapNavigation(): void; /** Permits users to pan a map using the mouse. */ enablePan(): void; + /** Enables the user to work with pinch zoom navigation for touch-enabled devices. */ + enablePinchZoom(): void; /** Permits users to zoom in or out on a map using a bounding box. */ enableRubberBandZoom(): void; + /** Enables the user to navigate the map based on mouse scroll wheel. */ + enableScrollWheel(): void; /** Permits users to zoom in or out on a map using the mouse scroll wheel. */ enableScrollWheelZoom(): void; /** Permits users to shift double click on a map to zoom in a level and center the map. */ @@ -12947,7 +13021,7 @@ declare module "esri/renderers/HeatmapRenderer" { import esri = require("esri"); import Renderer = require("esri/renderers/Renderer"); - /** The HeatmapRenderer renders point data into a raster visualization that emphasizes areas of higher density or weighted values. */ + /** The HeatmapRenderer renders feature layer point data into a raster visualization that emphasizes areas of higher density or weighted values. */ class HeatmapRenderer extends Renderer { /** The radius (in pixels) of the circle over which the majority of each points value is spread out over. */ blurRadius: number; @@ -13052,7 +13126,7 @@ declare module "esri/renderers/Renderer" { * Returns the visual variable of the specified type. * @param type The type of visual variable desired. */ - getVisualVariablesForType(type: string): any; + getVisualVariablesForType(type: string): any[]; /** Indicates if the renderer has defined visualVariables. */ hasVisualVariables(): boolean; /** @@ -14873,7 +14947,7 @@ declare module "esri/tasks/GeometryService" { distance(params: DistanceParameters, callback?: Function, errback?: Function): any; /** * Converts an array of well-known strings into xy-coordinates based on the conversion type and spatial reference supplied by the user. - * @param params See the object specifications table below for the structure of the params object. + * @param params See the object specifications table below for the structure of the params object. * @param callback The function to call when the method has completed. * @param errback An error object is returned if an error occurs during task execution. */ @@ -14945,7 +15019,7 @@ declare module "esri/tasks/GeometryService" { simplify(geometries: Geometry[], callback?: Function, errback?: Function): any; /** * Converts an array of xy-coordinates into well-known strings based on the conversion type and spatial reference supplied by the user. - * @param params See the object specifications table below for the structure of the params object. + * @param params See the object specifications table below for the structure of the params object. * @param callback The function to call when the method has completed. * @param errback An error object is returned if an error occurs during task execution. */ @@ -15890,7 +15964,7 @@ declare module "esri/tasks/RouteParameters" { startTimeIsUTC: boolean; /** The set of stops loaded as network locations during analysis. */ stops: any; - /** If true , the TimeWindowStart and TimeWindowEnd attributes of a stop are in UTC time (milliseconds). */ + /** If true, the TimeWindowStart and TimeWindowEnd attributes of a stop are in UTC time (milliseconds). */ timeWindowsAreUTC: boolean; /** Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. */ travelMode: any; @@ -17172,7 +17246,7 @@ declare module "esri/tasks/locator" { */ constructor(url: string); /** - * Find address candidates for the input addresses. + * Find address candidates for multiple input addresses. * @param params The input addresses in the format supported by the geocoding service. * @param callback The function to call when the method has completed. * @param errback The function to call if an error occurs on the server during task execution. @@ -17180,7 +17254,7 @@ declare module "esri/tasks/locator" { addressesToLocations(params: any, callback: Function, errback: Function): any; /** * Sends a request to the ArcGIS REST geocode resource to find candidates for a single address specified in the address parameter. - * @param params Specify the address and optionally specify the outFields and searchExtent. + * @param params Specify at least the address and optionally other properties. * @param callback The function to call when the method has completed. * @param errback An error object is returned if an error occurs on the Server during task execution. */ diff --git a/types/archiver/index.d.ts b/types/archiver/index.d.ts index 2e4b1063ff..0dc91ec554 100644 --- a/types/archiver/index.d.ts +++ b/types/archiver/index.d.ts @@ -15,9 +15,7 @@ /// -import * as fs from 'fs'; import * as stream from 'stream'; -import * as express from 'express'; import * as glob from 'glob'; declare function archiver(format: archiver.Format, options?: archiver.ArchiverOptions): archiver.Archiver; @@ -46,8 +44,6 @@ declare namespace archiver { glob(pattern: string, options?: glob.IOptions, data?: EntryData): this; finalize(): this; - pipe(stream: fs.WriteStream | express.Response): void; - setFormat(format: string): this; setModule(module: Function): this; diff --git a/types/are-we-there-yet/are-we-there-yet-tests.ts b/types/are-we-there-yet/are-we-there-yet-tests.ts new file mode 100644 index 0000000000..1750cac0c2 --- /dev/null +++ b/types/are-we-there-yet/are-we-there-yet-tests.ts @@ -0,0 +1,25 @@ +import { Tracker, TrackerStream, TrackerGroup } from "are-we-there-yet"; + +let simple = new Tracker("simple"); +simple.addListener("change", (name, completed, tracker) => { + console.log(`name: ${name}, completed: ${completed}`); +}); +simple.addWork(10); +simple.completeWork(1); +console.log(simple.completed() < 1); + +let group = new TrackerGroup("group"); +group.addUnit(simple); + +let subgroup = group.newGroup("subgroup"); +console.log(group.completed()); + +let stream = new TrackerStream("stream", 100, { encoding: "utf8" }); +subgroup.addUnit(stream); + +stream.addListener("change", (name, completed, tracker) => { + console.log(`name: ${name}, completed: ${completed}`); +}); + +simple.finish(); +console.log(group.debug()); diff --git a/types/are-we-there-yet/index.d.ts b/types/are-we-there-yet/index.d.ts new file mode 100644 index 0000000000..4b70c7a012 --- /dev/null +++ b/types/are-we-there-yet/index.d.ts @@ -0,0 +1,90 @@ +// Type definitions for are-we-there-yet 1.1 +// Project: https://github.com/iarna/are-we-there-yet +// Definitions by: Brian J Brennan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { EventEmitter } from "events"; +import { Transform, TransformOptions } from "stream"; + +export type TrackerObject = Tracker | TrackerGroup | TrackerStream; +export type TrackerEventListener = (name: string, completed: number, tracker: TrackerObject) => void; +export type GenericEventListener = (...args: any[]) => void; + +export class TrackerBase extends EventEmitter { + constructor(name?: string); + addListener(event: "change", listener: TrackerEventListener): this; + addListener(event: string, listener: GenericEventListener): this; + on(event: "change", listener: TrackerEventListener): this; + on(event: string, listener: GenericEventListener): this; + once(event: "change", listener: TrackerEventListener): this; + once(event: string, listener: GenericEventListener): this; + prependListener(event: "change", listener: TrackerEventListener): this; + prependListener(event: string, listener: GenericEventListener): this; + prependOnceListener(event: "change", listener: TrackerEventListener): this; + prependOnceListener(event: string, listener: GenericEventListener): this; + removeListener(event: "change", listener: TrackerEventListener): this; + removeListener(event: string, listener: GenericEventListener): this; +} + +export class Tracker extends TrackerBase { + constructor(name?: string, todo?: number); + addWork(work: number): void; + completeWork(completed: number): void; + completed(): number; + finish(): void; +} + +export class TrackerGroup extends TrackerBase { + constructor(name?: string); + addUnit(tracker: TrackerBase, weight?: number): TrackerObject; + completed(): number; + debug(): string; + finish(): void; + newGroup(name?: string, weight?: number): TrackerGroup; + newItem(name?: string, todo?: number, weight?: number): Tracker; + newStream(name?: string, todo?: number, weight?: number): TrackerStream; +} + +export class TrackerStream extends Transform { + constructor(name?: string, size?: number, options?: TransformOptions); + addWork(work: number): void; + completed(): number; + + addListener(event: "change", listener: TrackerEventListener): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "readable" | "end" | "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string, listener: GenericEventListener): this; + + on(event: "change", listener: TrackerEventListener): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "readable" | "end" | "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string, listener: GenericEventListener): this; + + once(event: "change", listener: TrackerEventListener): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "readable" | "end" | "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string, listener: GenericEventListener): this; + + prependListener(event: "change", listener: TrackerEventListener): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "readable" | "end" | "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string, listener: GenericEventListener): this; + + prependOnceListener(event: "change", listener: TrackerEventListener): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "readable" | "end" | "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string, listener: GenericEventListener): this; + + removeListener(event: "change", listener: TrackerEventListener): this; + removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "readable" | "end" | "close", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: string, listener: GenericEventListener): this; +} diff --git a/types/redux-devtools-extension/tsconfig.json b/types/are-we-there-yet/tsconfig.json similarity index 90% rename from types/redux-devtools-extension/tsconfig.json rename to types/are-we-there-yet/tsconfig.json index 6d8d644ea6..e4dc1462ce 100644 --- a/types/redux-devtools-extension/tsconfig.json +++ b/types/are-we-there-yet/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "redux-devtools-extension-tests.ts" + "are-we-there-yet-tests.ts" ] } diff --git a/types/redux-devtools-extension/tslint.json b/types/are-we-there-yet/tslint.json similarity index 100% rename from types/redux-devtools-extension/tslint.json rename to types/are-we-there-yet/tslint.json diff --git a/types/asana/asana-tests.ts b/types/asana/asana-tests.ts index 3bef3e2c07..0f12c97b0c 100644 --- a/types/asana/asana-tests.ts +++ b/types/asana/asana-tests.ts @@ -1,7 +1,6 @@ -/// - import * as asana from 'asana'; -import * as util from 'util'; +declare var console: { log(x: any): void }; +declare var process: { env: { ASANA_API_KEY: string } }; let version: string = asana.VERSION; @@ -95,9 +94,6 @@ client.users.me() task.assignee_status === 'new'; }) .then((list: any) => { - console.log(util.inspect(list, { - colors: true, - depth: null - })); + console.log(list); }); diff --git a/types/asana/index.d.ts b/types/asana/index.d.ts index 364980b66c..ede3bc99f9 100644 --- a/types/asana/index.d.ts +++ b/types/asana/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Asana/node-asana // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/askmethat-rating/askmethat-rating-tests.ts b/types/askmethat-rating/askmethat-rating-tests.ts new file mode 100644 index 0000000000..2f17ad0b62 --- /dev/null +++ b/types/askmethat-rating/askmethat-rating-tests.ts @@ -0,0 +1,15 @@ +import { AskmethatRating, AskmethatRatingSteps } from "askmethat-rating"; + +let options = { + backgroundColor: "#e5e500", + hoverColor: "#ffff66", + fontClass: "fa fa-star", + minRating: 1, + maxRating: 5, + readonly: false, + step: AskmethatRatingSteps["OnePerOneStep"], + inputName: "AskmethatRating" +}; + +let div = document.createElement("div"); +let amcRating = new AskmethatRating(div, 2 , options); diff --git a/types/askmethat-rating/index.d.ts b/types/askmethat-rating/index.d.ts new file mode 100644 index 0000000000..ff31f81747 --- /dev/null +++ b/types/askmethat-rating/index.d.ts @@ -0,0 +1,131 @@ +// Type definitions for askmethat-rating 0.3 +// Project: https://alexteixeira.github.io/Askmethat-Rating/ +// Definitions by: Alexandre Teixeira +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +export enum AskmethatRatingSteps { + /** + * Step 0.1 per 0.1 + */ + DecimalStep = 0, + /** + * Step 0.5 per 0.5 + */ + HalfStep = 1, + /** + * Step 1 per 1 + */ + OnePerOneStep = 2, +} +export interface AskmethatRatingOptions { + hoverColor?: string; + /** + * Color when the rating is not hovered + */ + backgroundColor?: string; + /** + * Mininmum rating that the user can set + */ + minRating?: number; + /** + * Maximum rating that the plugin display + */ + maxRating?: number; + /** + * Class to display as rating (FontAwesome or Rating for exemple) + */ + fontClass: string; + /** + * Set the rating to readonly + */ + readonly: boolean; + /** + * The stepping for the rating + */ + step: AskmethatRatingSteps; + /** + * Input name (Default is AskmethatRating) + */ + inputName: string; +} +export class AskmethatRating { + private parentElement; + private pValue; + private styleSheet; + private changeEvent; + private ratingClick; + private mouseMove; + /** + * @function get the current value for the rating + */ + /** + * @function set a new value for the rating + * + * @param _value this is the new value you want to set to the rating + * @returns the current number + */ + value: number; + /** + * Default option base on @type IAskmethatRatingOptions + */ + private _defaultOptions; + /** + * @function get the default option for the rating + * + * @return options based on @type AskmethatRatingOptions + */ + readonly defaultOptions: any; + /** + * constructor with div element, default rating value & default options + * + * @param element This is the html container for the rating elements + * @param defaultValue Default value set when the plugin render the rating + * @param options Default option base on AskmethatRatingOptions type + */ + constructor(element: HTMLDivElement, defaultValue?: number, options?: any); + /** + * render a new rating, by default value is the minRating + * + * @param value this is the default value set when the plugin is rendered, by default IAskmethatRatingOptions.minRating + */ + render(value?: number): void; + /** + * @function when a rating is clicked + * @param {type} event : Event {event object} + */ + private onRatingClick(event?); + /** + * @function Calculate the value according to the step provided in options + * @param {Number} value:number the current value + * @return {Number} the new value according to step + */ + protected getValueAccordingToStep(value: number): number; + /** + * @function mouse event enter in rating + * @param {type} event?: Event {event} + */ + private onMouseMove(event?); + /** + * @function mouse out event in rating + * @param {type} event?: Event {event} + */ + private onMouseLeave(event?); + /** + * @function set or unset the active class and color + * @param {HTMLSpanElement} current : current span element + * @param {number} current : value needed for the if + */ + protected setOrUnsetActive(value: number): void; + /** + * Check if disabled attribute is added or removed from the input + * Update readonly status if needed for the rating + */ + private mutationEvent(); + /** + * @function static method to retrieve with identifier the value + * @param {string} identifier: string container identifier + * @return {number} current rating + */ + static value(identifier: string): number; +} diff --git a/types/askmethat-rating/tsconfig.json b/types/askmethat-rating/tsconfig.json new file mode 100644 index 0000000000..fd5ef4ae50 --- /dev/null +++ b/types/askmethat-rating/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "askmethat-rating-tests.ts" + ] +} diff --git a/types/askmethat-rating/tslint.json b/types/askmethat-rating/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/askmethat-rating/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/assert-equal-jsx/index.d.ts b/types/assert-equal-jsx/index.d.ts index 5deb9ede36..f571020ef8 100644 --- a/types/assert-equal-jsx/index.d.ts +++ b/types/assert-equal-jsx/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/thejameskyle/assert-equal-jsx // Definitions by: Josh Toft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import * as React from 'react'; diff --git a/types/async.nexttick/async.nexttick-tests.ts b/types/async.nexttick/async.nexttick-tests.ts new file mode 100644 index 0000000000..90f6ae7f15 --- /dev/null +++ b/types/async.nexttick/async.nexttick-tests.ts @@ -0,0 +1,11 @@ +import {nextTick} from 'async.nexttick'; + +function calledOnNextTick(a: string): number { + return parseInt(a, 10); +} + +const aString = 'Hi!'; + +nextTick(() => { + calledOnNextTick(aString); +}); diff --git a/types/async.nexttick/index.d.ts b/types/async.nexttick/index.d.ts new file mode 100644 index 0000000000..a8572cc087 --- /dev/null +++ b/types/async.nexttick/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for async.nexttick 0.5 +// Project: https://www.npmjs.com/package/async.nexttick +// Definitions by: Damien "pyrho" Rajon +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function nextTick(callback: () => void, ...args: any[]): void; diff --git a/types/async.nexttick/tsconfig.json b/types/async.nexttick/tsconfig.json new file mode 100644 index 0000000000..68011bfd96 --- /dev/null +++ b/types/async.nexttick/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "async.nexttick-tests.ts" + ] +} + diff --git a/types/async.nexttick/tslint.json b/types/async.nexttick/tslint.json new file mode 100644 index 0000000000..d0858559ac --- /dev/null +++ b/types/async.nexttick/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/asyncblock/asyncblock-tests.ts b/types/asyncblock/asyncblock-tests.ts index 472ec80a1b..d93c9fc07a 100644 --- a/types/asyncblock/asyncblock-tests.ts +++ b/types/asyncblock/asyncblock-tests.ts @@ -32,7 +32,7 @@ asyncblock((flow) => { //Wait for a large number of tasks for(var i = 0; i < 100; i++){ //Add each task in parallel with i as the key - fs.readFile(paths[i], 'utf8', flow.add(i)); + fs.readFile(paths[i], 'utf8', flow.add(i)); } //Wait for all the tasks to finish. Results is an object of the form {key1: value1, key2: value2, ...} @@ -76,7 +76,7 @@ asyncblock.nostack((flow) => { fs.readFile('path2', 'utf8', flow.add('second')); //Wait until done reading the first and second files, then write them to another file - fs.writeFile('path3', flow.wait('first') + flow.wait('second'), flow.add()); + fs.writeFile('path3', flow.wait('first') + flow.wait('second'), flow.add()); flow.wait(); //Wait on all outstanding tasks fs.readFile('path3', 'utf8', flow.add('data')); diff --git a/types/atom/atom-tests.ts b/types/atom/atom-tests.ts index 1b141fb492..5987f4901d 100644 --- a/types/atom/atom-tests.ts +++ b/types/atom/atom-tests.ts @@ -1,5 +1,3 @@ -/// - import path = require("path"); import _atom = require("atom"); diff --git a/types/atom/index.d.ts b/types/atom/index.d.ts index 05c9794eec..30aa6b881b 100644 --- a/types/atom/index.d.ts +++ b/types/atom/index.d.ts @@ -2,6 +2,7 @@ // Project: https://atom.io/ // Definitions by: vvakame // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/audiosprite/audiosprite-tests.ts b/types/audiosprite/audiosprite-tests.ts new file mode 100644 index 0000000000..a3f400d454 --- /dev/null +++ b/types/audiosprite/audiosprite-tests.ts @@ -0,0 +1,26 @@ +import * as audiosprite from 'audiosprite'; + +const files = ['file1.mp3', 'file2.mp3']; +const opts = {output: 'result'}; + +audiosprite(files, opts, (err, obj) => { + if (err) { + return err; + } + + return JSON.stringify(obj, null, 2); +}); + +audiosprite(files, { + path: "aaa", + format: "howler", + export: "ogg,mp3", + minlength: 9999, + vbr: 9, + 'vbr:vorbis': 10, + logger: { + debug(a) { + } + } +}, (err, obj) => { +}); diff --git a/types/audiosprite/index.d.ts b/types/audiosprite/index.d.ts new file mode 100644 index 0000000000..c1738386d6 --- /dev/null +++ b/types/audiosprite/index.d.ts @@ -0,0 +1,55 @@ +// Type definitions for audiosprite 0.6 +// Project: https://github.com/tonistiigi/audiosprite +// Definitions by: Gyusun Yeom +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace audiosprite; +export = audiosprite; + +declare function audiosprite(files: string[], callback: (error: Error, obj: audiosprite.Result) => void): void; +declare function audiosprite(files: string[], option: audiosprite.Option, callback: (error: Error, obj: audiosprite.Result) => void): void; + +declare namespace audiosprite { + type ExportType = "jukebox" | "howler" | "createjs" | null; + type LogLevel = "debug" | "info" | "notice" | "warning" | "error"; + type VBR = -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; + type VBR_Vorbis = VBR | 10; + type Channels = 1 | 2; + interface Option { + output?: string; + path?: string; + export?: string; + format?: ExportType; + log?: LogLevel; + autoplay?: string | null; + loop?: string[]; + silence?: number; + gap?: number; + minlength?: number; + bitrate?: number; + vbr?: VBR; + 'vbr:vorbis'?: VBR_Vorbis; + samplerate?: number; + channels?: Channels; + rawparts?: string; + logger?: Logger; + } + + interface Logger { + debug?(...log: any[]): void; + info?(...log: any[]): void; + log?(...log: any[]): void; + } + + interface Result { + resources: string[]; + spritemap: { + [key: string]: { + start: number; + end: number; + loop: boolean; + } + }; + autoplay?: string; + } +} diff --git a/types/audiosprite/tsconfig.json b/types/audiosprite/tsconfig.json new file mode 100644 index 0000000000..7348d046e8 --- /dev/null +++ b/types/audiosprite/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", + "audiosprite-tests.ts" + ] +} diff --git a/types/audiosprite/tslint.json b/types/audiosprite/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/audiosprite/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/auth0-angular/index.d.ts b/types/auth0-angular/index.d.ts index 16203813e1..0bc8e7b34d 100644 --- a/types/auth0-angular/index.d.ts +++ b/types/auth0-angular/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/auth0/auth0-angular // Definitions by: Matt Emory // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/auth0-js/auth0-js-tests.ts b/types/auth0-js/auth0-js-tests.ts index cd7789c62d..5356dc605a 100644 --- a/types/auth0-js/auth0-js-tests.ts +++ b/types/auth0-js/auth0-js-tests.ts @@ -12,7 +12,64 @@ webAuth.authorize({ redirectUri: 'https://example.com/auth/callback' }); -webAuth.parseHash(window.location.hash, (err, authResult) => { +webAuth.parseHash((err, authResult) => { + if (err) { + return console.log(err); + } + + // The contents of authResult depend on which authentication parameters were used. + // It can include the following: + // authResult.accessToken - access token for the API specified by `audience` + // authResult.expiresIn - string with the access token's expiration time in seconds + // authResult.idToken - ID token JWT containing user profile information + + webAuth.client.userInfo(authResult.accessToken, (err, user) => { + // Now you have the user's information + }); +}); + +webAuth.parseHash((err, authResult) => { + if (err) { + return console.log(err); + } + + // The contents of authResult depend on which authentication parameters were used. + // It can include the following: + // authResult.accessToken - access token for the API specified by `audience` + // authResult.expiresIn - string with the access token's expiration time in seconds + // authResult.idToken - ID token JWT containing user profile information + + webAuth.client.userInfo(authResult.accessToken, (err, user) => { + // Now you have the user's information + }); +}); + +webAuth.parseHash( + { + nonce: 'asfd', + hash: '#access_token=VjubIMBmpgQ2W2&id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlF6RTROMFpCTTBWRFF6RTJSVVUwTnpJMVF6WTFNelE0UVRrMU16QXdNRUk0UkRneE56RTRSZyJ9.eyJpc3MiOiJodHRwczovL3dwdGVzdC5hdXRoMC5jb20vIiwic3ViIjoiYXV0aDB8NTVkNDhjNTdkNWIwYWQwMjIzYzQwOGQ3IiwiYXVkIjoiZ1lTTmxVNFlDNFYxWVBkcXE4elBRY3VwNnJKdzFNYnQiLCJleHAiOjE0ODI5NjkwMzEsImlhdCI6MTQ4MjkzMzAzMSwibm9uY2UiOiJhc2ZkIn0.PPoh-pITcZ8qbF5l5rMZwXiwk5efbESuqZ0IfMUcamB6jdgLwTxq-HpOT_x5q6-sO1PBHchpSo1WHeDYMlRrOFd9bh741sUuBuXdPQZ3Zb0i2sNOAC2RFB1E11mZn7uNvVPGdPTg-Y5xppz30GSXoOJLbeBszfrVDCmPhpHKGGMPL1N6HV-3EEF77L34YNAi2JQ-b70nFK_dnYmmv0cYTGUxtGTHkl64UEDLi3u7bV-kbGky3iOOCzXKzDDY6BBKpCRTc2KlbrkO2A2PuDn27WVv1QCNEFHvJN7HxiDDzXOsaUmjrQ3sfrHhzD7S9BcCRkekRfD9g95SKD5J0Fj8NA&token_type=Bearer&state=theState&refresh_token=kajshdgfkasdjhgfas&scope=foo' + }, + (err, authResult) => { + if (err) { + return console.log(err); + } + + // The contents of authResult depend on which authentication parameters were used. + // It can include the following: + // authResult.accessToken - access token for the API specified by `audience` + // authResult.expiresIn - string with the access token's expiration time in seconds + // authResult.idToken - ID token JWT containing user profile information + + webAuth.client.userInfo(authResult.accessToken, (err, user) => { + // Now you have the user's information + }); +}); + +webAuth.parseHash( + { + nonce: 'asfd' + }, + (err, authResult) => { if (err) { return console.log(err); } @@ -29,18 +86,35 @@ webAuth.parseHash(window.location.hash, (err, authResult) => { }); webAuth.renewAuth({ - audience: 'https://mystore.com/api/v2', - scope: 'read:order write:order', - redirectUri: 'https://example.com/auth/silent-callback', - - // this will use postMessage to comunicate between the silent callback - // and the SPA. When false the SDK will attempt to parse the url hash - // should ignore the url hash and no extra behaviour is needed. - usePostMessage: true }, function (err, authResult) { // Renewed tokens or error }); +webAuth.renewAuth({ + nonce: '123', + state: '456' +}, function (err, authResult) { + // Renewed tokens or error +}); + +webAuth.renewAuth({}, (err, authResult) => {}); + +webAuth.renewAuth({ + nonce: '123', + state: '456', + postMessageDataType: 'auth0:silent-authentication' +}, function (err, authResult) { + // Renewed tokens or error +}); + +webAuth.renewAuth({ + audience: 'urn:site:demo:blog', + redirectUri: 'http://page.com/callback', + usePostMessage: true +}, (err, authResult) => { + +}); + webAuth.changePassword({connection: 'the_connection', email: 'me@example.com', password: '123456' @@ -90,6 +164,9 @@ webAuth.popup.signupAndLogin({}, (err, data) => { // do something with data }); +webAuth.login({username: 'bar', password: 'foo'}, (err, data) => {}); + +webAuth.crossOriginAuthenticationCallback(); let authentication = new auth0.Authentication({ domain: 'me.auth0.com', @@ -108,7 +185,7 @@ authentication.buildAuthorizeUrl({ connection_scope: 'scope1,scope2' }); -authentication.buildLogoutUrl('asdfasdfds'); +authentication.buildLogoutUrl({ clientID: 'asdfasdfds' }); authentication.buildLogoutUrl(); authentication.userInfo('abcd1234', (err, data) => { //user info retrieved @@ -150,7 +227,7 @@ authentication.dbConnection.signup({connection: 'bla', email: 'blabla', password authentication.dbConnection.changePassword({connection: 'bla', email: 'blabla', password: '123456'}, () => {}); authentication.passwordless.start({ connection: 'bla', send: 'blabla' }, () => {}); -authentication.passwordless.verify({ connection: 'bla', send: 'link', verificationCode: 'asdfasd', email: 'me@example.com' }, () => {}); +authentication.passwordless.verify({ connection: 'bla', verificationCode: 'asdfasd', email: 'me@example.com' }, () => {}); authentication.loginWithResourceOwner({ username: 'the username', diff --git a/types/auth0-js/index.d.ts b/types/auth0-js/index.d.ts index d8d1e6f392..4e6afded1d 100644 --- a/types/auth0-js/index.d.ts +++ b/types/auth0-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Auth0.js 8.3 +// Type definitions for Auth0.js 8.6 // Project: https://github.com/auth0/auth0.js // Definitions by: Adrian Chia // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -15,7 +15,6 @@ export class Authentication { /** * Builds and returns the `/authorize` url in order to initialize a new authN/authZ transaction * - * @method buildAuthorizeUrl * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db */ buildAuthorizeUrl(options: any): string; @@ -23,34 +22,32 @@ export class Authentication { /** * Builds and returns the Logout url in order to initialize a new authN/authZ transaction * - * @method buildLogoutUrl * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--v2-logout */ - buildLogoutUrl(options?: any): string; + buildLogoutUrl(options?: LogoutOptions): string; /** * Makes a call to the `oauth/token` endpoint with `password` grant type * - * @method loginWithDefaultDirectory - * @param {Object} options: https://auth0.com/docs/api-auth/grant/password + * @param {DefaultDirectoryLoginOptions} options: https://auth0.com/docs/api-auth/grant/password * @param {Function} callback */ - loginWithDefaultDirectory(options: any, callback: Auth0Callback): void; + loginWithDefaultDirectory(options: DefaultDirectoryLoginOptions, callback: Auth0Callback): void; /** * Makes a call to the `/ro` endpoint - * @param {any} options + * @param {ResourceOwnerLoginOptions} options * @param {Function} callback * @deprecated `loginWithResourceOwner` will be soon deprecated, user `login` instead. */ - loginWithResourceOwner(options: any, callback: Auth0Callback): void; + loginWithResourceOwner(options: ResourceOwnerLoginOptions, callback: Auth0Callback): void; /** * Makes a call to the `oauth/token` endpoint with `password-realm` grant type - * @param {any} options + * @param {DefaultLoginOptions} options * @param {Function} callback */ - login(options: any, callback: Auth0Callback): void; + login(options: DefaultLoginOptions, callback: Auth0Callback): void; /** * Makes a call to the `oauth/token` endpoint @@ -62,7 +59,6 @@ export class Authentication { /** * Makes a call to the `/ssodata` endpoint * - * @method getSSOData * @param {Function} callback */ getSSOData(callback?: Auth0Callback): void; @@ -70,7 +66,6 @@ export class Authentication { /** * Makes a call to the `/ssodata` endpoint * - * @method getSSOData * @param {Boolean} withActiveDirectories * @param {Function} callback */ @@ -79,25 +74,22 @@ export class Authentication { /** * Makes a call to the `/userinfo` endpoint and returns the user profile * - * @method userInfo * @param {String} accessToken * @param {Function} callback */ - userInfo(token: string, callback: Auth0Callback): void; + userInfo(accessToken: string, callback: Auth0Callback): void; /** * Makes a call to the `/delegation` endpoint * - * @method delegation - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--delegation + * @param {DelegationOptions} options: https://auth0.com/docs/api/authentication#!#post--delegation * @param {Function} callback */ - delegation(options: any, callback: Auth0Callback): any; + delegation(options: DelegationOptions, callback: Auth0Callback): any; /** * Fetches the user country based on the ip. * - * @method getUserCountry * @param {Function} callback */ getUserCountry(callback: Auth0Callback<{ countryCode: string }>): void; @@ -109,16 +101,14 @@ export class PasswordlessAuthentication { /** * Builds and returns the passwordless TOTP verify url in order to initialize a new authN/authZ transaction * - * @method buildVerifyUrl - * @param {Object} options + * @param {PasswordlessVerifyOptions} options * @param {Function} callback */ - buildVerifyUrl(options: any): string; + buildVerifyUrl(options: PasswordlessVerifyOptions): string; /** * Initializes a new passwordless authN/authZ transaction * - * @method start * @param {Object} options: https://auth0.com/docs/api/authentication#passwordless * @param {Function} callback */ @@ -127,11 +117,10 @@ export class PasswordlessAuthentication { /** * Verifies the passwordless TOTP and returns an error if any. * - * @method buildVerifyUrl - * @param {Object} options + * @param {PasswordlessVerifyOptions} options * @param {Function} callback */ - verify(options: any, callback: Auth0Callback): void; + verify(options: PasswordlessVerifyOptions, callback: Auth0Callback): void; } export class DBConnection { @@ -140,17 +129,15 @@ export class DBConnection { /** * Signup a new user * - * @method signup - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup + * @param {DbSignUpOptions} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup * @param {Function} calback */ - signup(options: any, callback: Auth0Callback): void; + signup(options: DbSignUpOptions, callback: Auth0Callback): void; /** * Initializes the change password flow * - * @method signup - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password + * @param {ChangePasswordOptions} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password * @param {Function} callback */ changePassword(options: ChangePasswordOptions, callback: Auth0Callback): void; @@ -162,7 +149,6 @@ export class Management { /** * Returns the user profile. https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id * - * @method getUser * @param {String} userId * @param {Function} callback */ @@ -172,7 +158,6 @@ export class Management { * Updates the user metdata. It will patch the user metdata with the attributes sent. * https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id * - * @method patchUserMetadata * @param {String} userId * @param {Object} userMetadata * @param {Function} callback @@ -182,7 +167,6 @@ export class Management { /** * Link two users. https://auth0.com/docs/api/management/v2#!/Users/post_identities * - * @method linkUser * @param {String} userId * @param {String} secondaryUserToken * @param {Function} callback @@ -195,14 +179,14 @@ export class WebAuth { client: Authentication; popup: Popup; redirect: Redirect; + crossOriginAuthentication: CrossOriginAuthentication; /** * Redirects to the hosted login page (`/authorize`) in order to initialize a new authN/authZ transaction * - * @method authorize - * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db + * @param {AuthorizeOptions} options: https://auth0.com/docs/api/authentication#!#get--authorize_db */ - authorize(options: any): void; + authorize(options: AuthorizeOptions): void; /** * Parse the url hash and extract the returned tokens depending on the transaction. @@ -211,82 +195,99 @@ export class WebAuth { * by the `/.well-known/jwks.json` endpoint. Id tokens signed with other algorithms will not be * accepted. * - * @method parseHash - * @param {Object} options: - * @param {String} options._idTokenVerification [OPTIONAL] Default: true - * @param {String} options.state [OPTIONAL] to verify the response - * @param {String} options.nonce [OPTIONAL] to verify the id_token - * @param {String} options.hash [OPTIONAL] the url hash. If not provided it will extract from window.location.hash + * @param {ParseHashOptions} options * @param {Function} callback: any(err, token_payload) */ - parseHash(options: any, callback: Auth0Callback): void; + parseHash(callback: Auth0Callback): void; + + /** + * Parse the url hash and extract the returned tokens depending on the transaction. + * + * Only validates id_tokens signed by Auth0 using the RS256 algorithm using the public key exposed + * by the `/.well-known/jwks.json` endpoint. Id tokens signed with other algorithms will not be + * accepted. + * + * @param {ParseHashOptions} options + * @param {Function} callback: any(err, token_payload) + */ + parseHash(options: ParseHashOptions, callback: Auth0Callback): void; /** * Decodes the id_token and verifies the nonce. * - * @method validateToken * @param {String} token - * @param {String} state * @param {String} nonce * @param {Function} callback: function(err, {payload, transaction}) */ - validateToken(token: string, state: string, nonce: string, callback: Auth0Callback): void; + validateToken(token: string, nonce: string, callback: Auth0Callback): void; /** - * Executes a silent authentication transaction under the hood in order to fetch a new token. + * Executes a silent authentication transaction under the hood in order to fetch a new tokens for the current session. + * This method requires that all Auth is performed with {@link authorize} + * Watch out! If you're not using the hosted login page to do social logins, you have to use your own [social connection keys](https://manage.auth0.com/#/connections/social). If you use Auth0's dev keys, you'll always get `login_required` as an error when calling this method. * - * @method renewAuth - * @param {Object} options: any valid oauth2 parameter to be sent to the `/authorize` endpoint + * @param {RenewAuthOptions} options: any valid oauth2 parameter to be sent to the `/authorize` endpoint * @param {Function} callback */ - renewAuth(options: any, callback: Auth0Callback): void; + renewAuth(options: RenewAuthOptions, callback: Auth0Callback): void; /** * Initialices a change password transaction * - * @method changePassword - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password + * @param {ChangePasswordOptions} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password * @param {Function} callback */ - changePassword(options: any, callback: Auth0Callback): void; + changePassword(options: ChangePasswordOptions, callback: Auth0Callback): void; /** * Signs up a new user * - * @method signup - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup + * @param {DbSignUpOptions} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup * @param {Function} callback */ - signup(options: any, callback: Auth0Callback): void; + signup(options: DbSignUpOptions, callback: Auth0Callback): void; /** * Signs up a new user, automatically logs the user in after the signup and returns the user token. * The login will be done using /oauth/token with password-realm grant type. * - * @method signupAndAuthorize - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup + * @param {DbSignUpOptions} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup * @param {Function} callback */ - signupAndAuthorize(options: any, callback: Auth0Callback): void; + signupAndAuthorize(options: DbSignUpOptions, callback: Auth0Callback): void; /** - * Redirects to the auth0 logout page + * Logs in the user with username and password using the cross origin authentication (/co/authenticate) flow. You can use either `username` or `email` to identify the user, but `username` will take precedence over `email`. + * This only works when 3rd party cookies are enabled in the browser. After the /co/authenticate call, you'll have to use the {@link parseHash} function at the `redirectUri` specified in the constructor. * - * @method logout - * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--v2-logout + * @param {CrossOriginLoginOptions} options options used in the {@link authorize} call after the login_ticket is acquired + * @param {crossOriginLoginCallback} cb Callback function called only when an authentication error, like invalid username or password, occurs. For other types of errors, there will be a redirect to the `redirectUri`. */ - logout(options: any): void; + login(options: CrossOriginLoginOptions, callback: Auth0Callback): void; + + /** + * Runs the callback code for the cross origin authentication call. This method is meant to be called by the cross origin authentication callback url. + * + */ + crossOriginAuthenticationCallback(): void; + + /** + * Redirects to the auth0 logout endpoint + * + * If you want to navigate the user to a specific URL after the logout, set that URL at the returnTo parameter. The URL should be included in any the appropriate Allowed Logout URLs list: + * + * - If the client_id parameter is included, the returnTo URL must be listed in the Allowed Logout URLs set at the client level (see Setting Allowed Logout URLs at the App Level). + * - If the client_id parameter is NOT included, the returnTo URL must be listed in the Allowed Logout URLs set at the account level (see Setting Allowed Logout URLs at the Account Level). + * + * @param {LogoutOptions} options + * @see {@link https://auth0.com/docs/api/authentication#logout} + */ + logout(options: LogoutOptions): void; /** * Initialices a passwordless authentication transaction * - * @method passwordlessStart - * @param {Object} options: https://auth0.com/docs/api/authentication#passwordless - * @param {Object} options.send: `link` or `code` - * @param {Object} options.phoneNumber: send should be code and email not set - * @param {Object} options.email: phoneNumber should be ignored - * @param {Object} options.connection - * @param {Object} options.authParams + * @param {PasswordlessStartOptions} options: https://auth0.com/docs/api/authentication#passwordless * @param {Function} callback */ passwordlessStart(options: PasswordlessStartOptions, callback: Auth0Callback): void; @@ -295,27 +296,28 @@ export class WebAuth { * Verifies the passwordless TOTP and redirects to finish the passwordless transaction * * @method passwordlessVerify - * @param {Object} options: - * @param {Object} options.type: `sms` or `email` - * @param {Object} options.phoneNumber: only if type = sms - * @param {Object} options.email: only if type = email - * @param {Object} options.connection: the connection name - * @param {Object} options.verificationCode: the TOTP code + * @param {PasswordlessVerifyOptions} options: * @param {Function} callback */ - passwordlessVerify(options: any, callback: Auth0Callback): void; + passwordlessVerify(options: PasswordlessVerifyOptions, callback: Auth0Callback): void; } export class Redirect { constructor(client: any, options: any); /** - * Initializes the legacy Lock login flow in a popup + * Performs authentication with username/email and password with a database connection + * + * This method is not compatible with API Auth so if you need to fetch API tokens with audience + * you should use {@link authorize} or {@link login}. * * @method loginWithCredentials * @param {Object} options - * @param {Function} callback - * @deprecated `webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead. + * @param {String} [options.redirectUri] url that the Auth0 will redirect after Auth with the Authorization Response + * @param {String} [options.responseType] type of the response used. It can be any of the values `code` and `token` + * @param {String} [options.responseMode] how the AuthN response is encoded and redirected back to the client. Supported values are `query` and `fragment` + * @param {String} [options.scope] scopes to be requested during AuthN. e.g. `openid email` + * @param {credentialsCallback} cb */ loginWithCredentials(options: any, callback: Auth0Callback): void; @@ -323,8 +325,11 @@ export class Redirect { * Signs up a new user and automatically logs the user in after the signup. * * @method signupAndLogin - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup - * @param {Function} callback + * @param {Object} options + * @param {String} options.email user email address + * @param {String} options.password user password + * @param {String} options.connection name of the connection where the user will be created + * @param {credentialsCallback} cb */ signupAndLogin(options: any, callback: Auth0Callback): void; } @@ -348,21 +353,51 @@ export class Popup { preload(options: any): any; /** - * Opens in a popup the hosted login page (`/authorize`) in order to initialize a new authN/authZ transaction + * Handles the popup logic for the callback page. + * + * @method callback + * @param {Object} options + * @param {String} options.hash the url hash. If not provided it will extract from window.location.hash + * @param {String} [options.state] value originally sent in `state` parameter to {@link authorize} to mitigate XSRF + * @param {String} [options.nonce] value originally sent in `nonce` parameter to {@link authorize} to prevent replay attacks + * @param {String} [options._idTokenVerification] makes parseHash perform or skip `id_token` verification. We **strongly** recommend validating the `id_token` yourself if you disable the verification. + * @see {@link parseHash} + */ + callback(options: any): void; + + /** + * Shows inside a new window the hosted login page (`/authorize`) in order to start a new authN/authZ transaction and post its result using `postMessage`. * * @method authorize - * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db - * @param {Function} callback + * @param {Object} options + * @param {String} [options.domain] your Auth0 domain + * @param {String} [options.clientID] your Auth0 client identifier obtained when creating the client in the Auth0 Dashboard + * @param {String} options.redirectUri url that the Auth0 will redirect after Auth with the Authorization Response + * @param {String} options.responseType type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `code`, `token`, `id_token`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0} + * @param {String} [options.responseMode] how the Auth response is encoded and redirected back to the client. Supported values are `query`, `fragment` and `form_post`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes} + * @param {String} [options.state] value used to mitigate XSRF attacks. {@link https://auth0.com/docs/protocols/oauth2/oauth-state} + * @param {String} [options.nonce] value used to mitigate replay attacks when using Implicit Grant. {@link https://auth0.com/docs/api-auth/tutorials/nonce} + * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email` + * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth + * @param {Boolean} [options.owp] determines if Auth0 should render the relay page or not and the caller is responsible of handling the response. + * @param {authorizeCallback} cb + * @see {@link https://auth0.com/docs/api/authentication#authorize-client} */ authorize(options: any, callback: Auth0Callback): void; /** - * Initializes the legacy Lock login flow in a popup + * Performs authentication with username/email and password with a database connection inside a new window + * + * This method is not compatible with API Auth so if you need to fetch API tokens with audience + * you should use {@link authorize} or {@link login}. * * @method loginWithCredentials * @param {Object} options - * @param {Function} callback - * @deprecated `webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead. + * @param {String} [options.redirectUri] url that the Auth0 will redirect after Auth with the Authorization Response + * @param {String} [options.responseType] type of the response used. It can be any of the values `code` and `token` + * @param {String} [options.responseMode] how the AuthN response is encoded and redirected back to the client. Supported values are `query` and `fragment` + * @param {String} [options.scope] scopes to be requested during AuthN. e.g. `openid email` + * @param {credentialsCallback} cb */ loginWithCredentials(options: any, callback: Auth0Callback): void; @@ -383,13 +418,38 @@ export class Popup { /** * Signs up a new user and automatically logs the user in after the signup. * + * This method is not compatible with API Auth so if you need to fetch API tokens with audience + * you should use {@link authorize} or {@link signupAndAuthorize}. + * * @method signupAndLogin - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup - * @param {Function} callback + * @param {Object} options + * @param {String} options.email user email address + * @param {String} options.password user password + * @param {String} options.connection name of the connection where the user will be created + * @param {credentialsCallback} cb */ signupAndLogin(options: any, callback: Auth0Callback): void; } +export class CrossOriginAuthentication { + constructor(webAuth: any, options: any); + + /** + * Logs in the user with username and password using the cross origin authentication (/co/authenticate) flow. You can use either `username` or `email` to identify the user, but `username` will take precedence over `email`. + * This only works when 3rd party cookies are enabled in the browser. After the /co/authenticate call, you'll have to use the {@link parseHash} function at the `redirectUri` specified in the constructor. + * + * @param {CrossOriginLoginOptions} options options used in the {@link authorize} call after the login_ticket is acquired + * @param {crossOriginLoginCallback} cb Callback function called only when an authentication error, like invalid username or password, occurs. For other types of errors, there will be a redirect to the `redirectUri`. + */ + login(options: CrossOriginLoginOptions, callback: Auth0Callback): void; + + /** + * Runs the callback code for the cross origin authentication call. This method is meant to be called by the cross origin authentication callback url. + * + */ + callback(): void; +} + type Auth0Callback = (error: null | Auth0Error, result: T) => void; interface ManagementOptions { @@ -472,6 +532,7 @@ interface PasswordlessVerifyOptions { verificationCode: string; phoneNumber?: string; email?: string; + send?: string; } interface Auth0UserProfile { @@ -514,3 +575,87 @@ interface Auth0Identity { provider: string; user_id: string; } + +interface LoginOptions { + username: string; + password: string; + scope?: string; +} + +interface DefaultLoginOptions extends LoginOptions { + audience?: string; + realm: string; +} + +interface DefaultDirectoryLoginOptions extends LoginOptions { + audience?: string; +} + +interface ResourceOwnerLoginOptions extends LoginOptions { + connection: string; + device?: string; +} + +interface CrossOriginLoginOptions { + username?: string; + email?: string; + password: string; + realm?: string; +} + +interface LogoutOptions { + clientID?: string; + returnTo?: string; + federated?: boolean; +} + +interface DelegationOptions { + client_id?: string; + grant_type: string; + id_token?: string; + refresh_token?: string; + target?: string; + scope?: string; + api_type?: string; +} + +interface DbSignUpOptions { + email: string; + password: string; + connection: string; + scope?: string; +} + +interface ParseHashOptions { + hash?: string; + state?: string; + nonce?: string; + _idTokenVerification?: boolean; +} + +interface RenewAuthOptions { + domain?: string; + clientID?: string; + redirectUri?: string; + responseType?: string; + responseMode?: string; + state?: string; + nonce?: string; + scope?: string; + audience?: string; + usePostMessage?: boolean; + postMessageDataType?: string; +} + +interface AuthorizeOptions { + domain?: string; + clientID?: string; + connection?:string; + redirectUri?: string; + responseType?: string; + responseMode?: string; + state?: string; + nonce?: string; + scope?: string; + audience?: string; +} diff --git a/types/auth0-lock/auth0-lock-tests.ts b/types/auth0-lock/auth0-lock-tests.ts index a241eb6d0c..3abe93a7c2 100644 --- a/types/auth0-lock/auth0-lock-tests.ts +++ b/types/auth0-lock/auth0-lock-tests.ts @@ -61,11 +61,22 @@ lock.on("authenticated", function(authResult : any) { }); }); - // test theme var themeOptions : Auth0LockConstructorOptions = { theme: { + authButtons: { + fooProvider: { + displayName: 'foo' + }, + barProvider: { + displayName: 'foo', + primaryColor: '#FF0000', + foregroundColor: '#00FF00', + icon: 'http://baz.com/icon.png' + } + }, + labeledSubmitButton: false, logo: "https://example.com/assets/logo.png", primaryColor: "green" } @@ -73,6 +84,14 @@ var themeOptions : Auth0LockConstructorOptions = { new Auth0Lock(CLIENT_ID, DOMAIN, themeOptions); +// test empty theme + +var themeOptionsEmpty : Auth0LockConstructorOptions = { + theme: { } +}; + +new Auth0Lock(CLIENT_ID, DOMAIN, themeOptions); + // test authentication var authOptions : Auth0LockConstructorOptions = { @@ -170,7 +189,7 @@ var selectFieldOptionsWithCallbacks : Auth0LockConstructorOptions = { cb(null, prefill); } }] -} +}; new Auth0Lock(CLIENT_ID, DOMAIN, selectFieldOptionsWithCallbacks); @@ -198,3 +217,17 @@ var avatarOptions : Auth0LockConstructorOptions = { }; new Auth0Lock(CLIENT_ID, DOMAIN, avatarOptions); + +var authResult : AuthResult = { + accessToken: 'fake_access_token', + idToken: 'fake_id_token', + idTokenPayload: { + aud: "EaQzyHt1Dy57l-r5iHcMeT-lh1fFZntg", + exp: 1494393724, + iat: 1494357724, + iss: "https://www.foo.com", + sub: "auth0|aksjfkladsf" + }, + refreshToken: undefined, + state: "923jf092j3.FFSDJFDSKLDF" +}; diff --git a/types/auth0-lock/index.d.ts b/types/auth0-lock/index.d.ts index 285ad25288..e49c23a308 100644 --- a/types/auth0-lock/index.d.ts +++ b/types/auth0-lock/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for auth0-lock 10.10 +// Type definitions for auth0-lock 10.16 // Project: http://auth0.com // Definitions by: Brian Caruso +// Dan Caddigan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -40,7 +41,19 @@ interface Auth0LockAvatarOptions { displayName: (email: string, callback: Auth0LockAvatarDisplayNameCallback) => void; } +interface Auth0LockThemeButton { + displayName: string; + primaryColor?: string; + foregroundColor?: string; + icon?: string; +} +interface Auth0LockThemeButtonOptions { + [provider: string]: Auth0LockThemeButton; +} + interface Auth0LockThemeOptions { + authButtons?: Auth0LockThemeButtonOptions; + labeledSubmitButton?: boolean; logo?: string; primaryColor?: string; } @@ -121,6 +134,20 @@ interface Auth0LockShowOptions { rememberLastLogin?: boolean; } +interface AuthResult { + accessToken: string; + idToken: string; + idTokenPayload: { + aud: string; + exp: number; + iat: number; + iss: string; + sub: string; + }; + refreshToken?: string; + state: string; +} + interface Auth0LockStatic { new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic; @@ -128,14 +155,14 @@ interface Auth0LockStatic { getProfile(token: string, callback: (error: auth0.Auth0Error, profile: auth0.Auth0UserProfile) => void): void; getUserInfo(token: string, callback: (error: auth0.Auth0Error, profile: auth0.Auth0UserProfile) => void): void; // https://github.com/auth0/lock#resumeauthhash-callback - resumeAuth( hash: string, callback: (error: auth0.Auth0Error, authResult: any) => void): void; + resumeAuth( hash: string, callback: (error: auth0.Auth0Error, authResult: AuthResult) => void): void; show(options?: Auth0LockShowOptions): void; hide(): void; logout(query: any): void; on(event: "show" | "hide", callback: () => void): void; on(event: "unrecoverable_error" | "authorization_error", callback: (error: auth0.Auth0Error) => void): void; - on(event: "authenticated", callback: (authResult: any) => void): void; + on(event: "authenticated", callback: (authResult: AuthResult) => void): void; on(event: string, callback: (...args: any[]) => void): void; } diff --git a/types/auth0-lock/tslint.json b/types/auth0-lock/tslint.json new file mode 100644 index 0000000000..51b68d9fc6 --- /dev/null +++ b/types/auth0-lock/tslint.json @@ -0,0 +1,12 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "only-arrow-functions": false, + "no-misused-new": false, + "no-single-declare-module": false, + "prefer-method-signature": false, + "object-literal-shorthand": false, + "typedef-whitespace": false, + "no-var": false + } +} diff --git a/types/auth0/auth0-tests.ts b/types/auth0/auth0-tests.ts index 24a4aad87d..08a866e9b1 100644 --- a/types/auth0/auth0-tests.ts +++ b/types/auth0/auth0-tests.ts @@ -7,7 +7,8 @@ const management = new auth0.ManagementClient({ const auth = new auth0.AuthenticationClient({ domain: '{YOUR_ACCOUNT}.auth0.com', - clientId: '{OPTIONAL_CLIENT_ID}' + clientId: '{OPTIONAL_CLIENT_ID}', + clientSecret: '{OPTIONAL_CLIENT_SECRET}' }); // Using a callback. @@ -28,6 +29,42 @@ management // Handle the error. }); +// Using a callback. +management.getUser({id: 'user_id'},(err: Error, user: auth0.User) => { + if (err) { + // Handle error. + } + console.log(user); +}); + +// Using a Promise. +management + .getUser({id: 'user_id'}) + .then((user) => { + console.log(user); + }) + .catch((err) => { + // Handle the error. + }); + +// Using a callback. +management.deleteUser({id: 'user_id'},(err: Error) => { + if (err) { + // Handle error. + } + console.log('deleted'); +}); + +// Using a Promise. +management + .deleteUser({id: 'user_id'}) + .then(() => { + console.log('deleted'); + }) + .catch((err) => { + // Handle the error. + }); + management .createUser({ connection: 'My-Connection', diff --git a/types/auth0/index.d.ts b/types/auth0/index.d.ts index a8a6242bb4..07a316268a 100644 --- a/types/auth0/index.d.ts +++ b/types/auth0/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for auth0 2.4 +// Type definitions for auth0 2.3 // Project: https://github.com/auth0/node-auth0 -// Definitions by: Wilson Hobbs , Seth Westphal +// Definitions by: Wilson Hobbs , Seth Westphal , Amiram Korach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as Promise from 'bluebird'; @@ -14,16 +15,29 @@ export interface UserMetadata { } export interface AppMetadata { } export interface UserData { - connection: string; email?: string; username?: string; + email_verified?: boolean; + verify_email?: boolean; password?: string; phone_number?: string; + phone_verified?: boolean, user_metadata?: UserMetadata; - email_verified?: boolean; app_metadata?: AppMetadata; } +export interface CreateUserData extends UserData { + connection: string; +} + +export interface UpdateUserData extends UserData { + connection?: string; + blocked?: boolean; + verify_phone_number?: boolean, + verify_password?: boolean, + client_id?: string +} + export interface GetUsersData { per_page?: number; page?: number; @@ -67,12 +81,9 @@ export interface Identity { isSocial: boolean; } -export interface UpdateUserParameters { - id: string; -} - export interface AuthenticationClientOptions { clientId?: string; + clientSecret?: string; domain: string; } @@ -121,6 +132,16 @@ export interface ResetPasswordEmailOptions { connection: string; } +export interface ClientCredentialsGrantOptions { + audience: string; +} + +export interface PasswordGrantOptions { + username: string; + password: string; + realm?: string; +} + export interface ObjectWithId { id: string; } @@ -134,20 +155,51 @@ export interface ClientParams { client_id: string; } +export type DeleteDeleteMultifactorParamsProvider = 'duo' | 'google-authenticator'; + export interface DeleteMultifactorParams { id: string; - provider: string; + provider: DeleteDeleteMultifactorParamsProvider; } -export interface LinkAccountsParams { +export type UnlinkAccountsParamsProvider = 'ad' | 'adfs' | 'amazon' | 'dropbox' | 'bitbucket' | 'aol' | 'auth0-adldap' | + 'auth0-oidc' | 'auth0' | 'baidu' | 'bitly' | 'box' | 'custom' | 'dwolla' | 'email' | 'evernote-sandbox' | 'evernote' | + 'exact' | 'facebook' | 'fitbit' | 'flickr' | 'github' | 'google-apps' | 'google-oauth2' | 'guardian' | 'instagram' | + 'ip' | 'linkedin' | 'miicard' | 'oauth1' | 'oauth2' | 'office365' | 'paypal' | 'paypal-sandbox' | 'pingfederate' | + 'planningcenter' | 'renren' | 'salesforce-community' | 'salesforce-sandbox' | 'salesforce' | 'samlp' | 'sharepoint' | + 'shopify' | 'sms' | 'soundcloud' | 'thecity-sandbox' | 'thecity' | 'thirtysevensignals' | 'twitter' | 'untappd' | + 'vkontakte' | 'waad' | 'weibo' | 'windowslive' | 'wordpress' | 'yahoo' | 'yammer' | 'yandex'; + +export interface UnlinkAccountsParams { id: string; - provider: string; + provider: UnlinkAccountsParamsProvider; user_id: string; } +export interface UnlinkAccountsResponseProfile { + email?: string; + email_verified?: boolean; + name?: string; + username?: string; + given_name?: string; + phone_number?: string; + phone_verified?: boolean; + family_name?: string; +} + +export interface UnlinkAccountsResponse { + connection: string; + user_id: string; + provider: string; + isSocial?: boolean; + access_token?: string; + profileData?: UnlinkAccountsResponseProfile +} + export interface LinkAccountsData { user_id: string; - connection_id: string; + connection_id?: string; + provider?: string; } export interface Token { @@ -214,8 +266,11 @@ export class AuthenticationClient { getProfile(accessToken: string): Promise; getProfile(accessToken: string, cb: (err: Error, message: string) => void): void; - getCredentialsGrant(scope: string): Promise; - getCredentialsGrant(scope: string, cb: (err: Error, message: string) => void): void; + clientCredentialsGrant(options: ClientCredentialsGrantOptions): Promise; + clientCredentialsGrant(options: ClientCredentialsGrantOptions, cb: (err: Error, response: any) => void): void; + + passwordGrant(options: PasswordGrantOptions): Promise; + passwordGrant(options: PasswordGrantOptions, cb: (err: Error, response: any) => void): void; } @@ -307,32 +362,33 @@ export class ManagementClient { getUsers(params?: GetUsersData): Promise; getUsers(params?: GetUsersData, cb?: (err: Error, users: User[]) => void): void; - getUser(params?: ObjectWithId): Promise; - getUser(params?: ObjectWithId, cb?: (err: Error, users: User[]) => void): void; + getUser(params: ObjectWithId): Promise; + getUser(params: ObjectWithId, cb?: (err: Error, user: User) => void): void; - createUser(data: UserData): Promise; - createUser(data: UserData, cb: (err: Error, data: User) => void): void; + createUser(data: CreateUserData): Promise; + createUser(data: CreateUserData, cb: (err: Error, data: User) => void): void; - updateUser(params: UpdateUserParameters, data: User): Promise; - updateUser(params: UpdateUserParameters, data: User, cb: (err: Error, data: User) => void): void; + updateUser(params: ObjectWithId, data: UpdateUserData): Promise; + updateUser(params: ObjectWithId, data: UpdateUserData, cb: (err: Error, data: User) => void): void; - updateUserMetadata(params: UpdateUserParameters, data: UserMetadata): Promise; - updateUserMetadata(params: UpdateUserParameters, data: UserMetadata, cb: (err: Error, data: User) => void): void; + updateUserMetadata(params: ObjectWithId, data: UserMetadata): Promise; + updateUserMetadata(params: ObjectWithId, data: UserMetadata, cb: (err: Error, data: User) => void): void; + // Should be removed from auth0 also. Doesn't exist in api. deleteAllUsers(): Promise; deleteAllUsers(cb: (err: Error, data: any) => void): void; - deleteUser(params?: ObjectWithId): Promise; - deleteUser(params?: ObjectWithId, cb?: (err: Error, users: User[]) => void): void; + deleteUser(params: ObjectWithId): Promise; + deleteUser(params: ObjectWithId, cb?: (err: Error) => void): void; - updateAppMetadata(params: UpdateUserParameters, data: AppMetadata): Promise; - updateAppMetadata(params: UpdateUserParameters, data: AppMetadata, cb: (err: Error, data: User) => void): void; + updateAppMetadata(params: ObjectWithId, data: AppMetadata): Promise; + updateAppMetadata(params: ObjectWithId, data: AppMetadata, cb: (err: Error, data: User) => void): void; - deleteUserMultifactor(params: DeleteMultifactorParams): Promise; - deleteUserMultifactor(params: DeleteMultifactorParams, cb: (err: Error, data: any) => void): void; + deleteUserMultifactor(params: DeleteMultifactorParams): Promise; + deleteUserMultifactor(params: DeleteMultifactorParams, cb: (err: Error) => void): void; - unlinkUsers(params: LinkAccountsParams): Promise; - unlinkUsers(params: LinkAccountsParams, cb: (err: Error, data: any) => void): void; + unlinkUsers(params: UnlinkAccountsParams): Promise; + unlinkUsers(params: UnlinkAccountsParams, cb: (err: Error, data: UnlinkAccountsResponse) => void): void; linkUsers(params: ObjectWithId, data: LinkAccountsData): Promise; linkUsers(params: ObjectWithId, data: LinkAccountsData, cb: (err: Error, data: any) => void): void; diff --git a/types/autoprefixer/index.d.ts b/types/autoprefixer/index.d.ts index b5249746d1..1957632053 100644 --- a/types/autoprefixer/index.d.ts +++ b/types/autoprefixer/index.d.ts @@ -7,7 +7,7 @@ import { Plugin, Transformer as PostcssTransformer } from 'postcss'; declare namespace autoprefixer { interface Options { - browsers?: string[]; + browsers?: string[] | string; env?: string; cascade?: boolean; add?: boolean; diff --git a/types/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts index e793442177..7f8b8fabdd 100644 --- a/types/aws-lambda/aws-lambda-tests.ts +++ b/types/aws-lambda/aws-lambda-tests.ts @@ -60,7 +60,9 @@ var S3CreateEvent: AWSLambda.S3CreateEvent = { } ] }; - +var cognitoUserPoolEvent: AWSLambda.CognitoUserPoolEvent; +var cloudformationCustomResourceEvent: AWSLambda.CloudFormationCustomResourceEvent; +var cloudformationCustomResourceResponse: AWSLambda.CloudFormationCustomResourceResponse; /* API Gateway Event */ str = apiGwEvt.body; @@ -164,6 +166,82 @@ authResponse = { policyDocument: policyDocument }; +// CognitoUserPoolEvent +num = cognitoUserPoolEvent.version; +cognitoUserPoolEvent.triggerSource === "PreSignUp_SignUp"; +cognitoUserPoolEvent.triggerSource === "PostConfirmation_ConfirmSignUp"; +cognitoUserPoolEvent.triggerSource === "PreAuthentication_Authentication"; +cognitoUserPoolEvent.triggerSource === "PostAuthentication_Authentication"; +cognitoUserPoolEvent.triggerSource === "CustomMessage_SignUp"; +cognitoUserPoolEvent.triggerSource === "CustomMessage_AdminCreateUser"; +cognitoUserPoolEvent.triggerSource === "CustomMessage_ResendCode"; +cognitoUserPoolEvent.triggerSource === "CustomMessage_ForgotPassword"; +cognitoUserPoolEvent.triggerSource === "CustomMessage_UpdateUserAttribute"; +cognitoUserPoolEvent.triggerSource === "CustomMessage_VerifyUserAttribute"; +cognitoUserPoolEvent.triggerSource === "CustomMessage_Authentication"; +cognitoUserPoolEvent.triggerSource === "DefineAuthChallenge_Authentication"; +cognitoUserPoolEvent.triggerSource === "CreateAuthChallenge_Authentication"; +cognitoUserPoolEvent.triggerSource === "VerifyAuthChallengeResponse_Authentication"; +str = cognitoUserPoolEvent.region; +str = cognitoUserPoolEvent.userPoolId; +str = cognitoUserPoolEvent.userName; +str = cognitoUserPoolEvent.callerContext.awsSdkVersion; +str = cognitoUserPoolEvent.callerContext.clientId; +str = cognitoUserPoolEvent.request.userAttributes["email"]; +str = cognitoUserPoolEvent.request.validationData["k1"]; +str = cognitoUserPoolEvent.request.codeParameter; +str = cognitoUserPoolEvent.request.usernameParameter; +b = cognitoUserPoolEvent.request.newDeviceUsed; +cognitoUserPoolEvent.request.session[0].challengeName === "CUSTOM_CHALLENGE"; +cognitoUserPoolEvent.request.session[0].challengeName === "PASSWORD_VERIFIER"; +cognitoUserPoolEvent.request.session[0].challengeName === "SMS_MFA"; +cognitoUserPoolEvent.request.session[0].challengeName === "DEVICE_SRP_AUTH"; +cognitoUserPoolEvent.request.session[0].challengeName === "DEVICE_PASSWORD_VERIFIER"; +cognitoUserPoolEvent.request.session[0].challengeName === "ADMIN_NO_SRP_AUTH"; +b = cognitoUserPoolEvent.request.session[0].challengeResult; +str = cognitoUserPoolEvent.request.session[0].challengeMetaData; +str = cognitoUserPoolEvent.request.challengeName; +str = cognitoUserPoolEvent.request.privateChallengeParameters["answer"]; +str = cognitoUserPoolEvent.request.challengeAnswer["answer"]; +b = cognitoUserPoolEvent.response.answerCorrect; +str = cognitoUserPoolEvent.response.smsMessage; +str = cognitoUserPoolEvent.response.emailMessage; +str = cognitoUserPoolEvent.response.emailSubject; +str = cognitoUserPoolEvent.response.challengeName; +b = cognitoUserPoolEvent.response.issueTokens; +b = cognitoUserPoolEvent.response.failAuthentication; +str = cognitoUserPoolEvent.response.publicChallengeParameters["captchaUrl"]; +str = cognitoUserPoolEvent.response.privateChallengeParameters["answer"]; +str = cognitoUserPoolEvent.response.challengeMetaData; +b = cognitoUserPoolEvent.response.answerCorrect; + +// CloudFormation Custom Resource +switch (cloudformationCustomResourceEvent.RequestType) { + case "Create": + str = cloudformationCustomResourceEvent.LogicalResourceId; + str = cloudformationCustomResourceEvent.RequestId; + anyObj = cloudformationCustomResourceEvent.ResourceProperties; + str = cloudformationCustomResourceEvent.ResourceProperties.ServiceToken; + str = cloudformationCustomResourceEvent.ResourceType; + str = cloudformationCustomResourceEvent.ResponseURL; + str = cloudformationCustomResourceEvent.ServiceToken; + str = cloudformationCustomResourceEvent.StackId; + break; + case "Update": + anyObj = cloudformationCustomResourceEvent.OldResourceProperties; + break; + case "Delete": + str = cloudformationCustomResourceEvent.PhysicalResourceId; + break; +} +anyObj = cloudformationCustomResourceResponse.Data; +str = cloudformationCustomResourceResponse.LogicalResourceId; +str = cloudformationCustomResourceResponse.PhysicalResourceId; +str = cloudformationCustomResourceResponse.Reason; +str = cloudformationCustomResourceResponse.RequestId; +str = cloudformationCustomResourceResponse.StackId; +str = cloudformationCustomResourceResponse.Status; + /* Context */ b = context.callbackWaitsForEmptyEventLoop; str = context.functionName; diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts index a5fa271699..df8effb82b 100644 --- a/types/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for AWS Lambda // Project: http://docs.aws.amazon.com/lambda -// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath , Toby Hede , Rich Buggy , Simon Ramsay +// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath , Toby Hede , Rich Buggy , Yoriki Yamaguchi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // API Gateway "event" @@ -124,6 +124,108 @@ interface S3CreateEvent { ]; } +/** + * Cognito User Pool event + * http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html + */ +interface CognitoUserPoolEvent { + version: number; + triggerSource: "PreSignUp_SignUp" | "PostConfirmation_ConfirmSignUp" | "PreAuthentication_Authentication" | "PostAuthentication_Authentication" | "CustomMessage_SignUp" | "CustomMessage_AdminCreateUser" | "CustomMessage_ResendCode" | "CustomMessage_ForgotPassword" | "CustomMessage_UpdateUserAttribute" | "CustomMessage_VerifyUserAttribute" | "CustomMessage_Authentication" | "DefineAuthChallenge_Authentication" | "CreateAuthChallenge_Authentication" | "VerifyAuthChallengeResponse_Authentication"; + region: string; + userPoolId: string; + userName?: string; + callerContext: { + awsSdkVersion: string; + clientId: string; + }; + request: { + userAttributes: {[key: string]: string}; + validationData?: {[key: string]: string}; + codeParameter?: string; + usernameParameter?: string; + newDeviceUsed?: boolean; + session?: { + challengeName: "CUSTOM_CHALLENGE" | "PASSWORD_VERIFIER" | "SMS_MFA" | "DEVICE_SRP_AUTH" | "DEVICE_PASSWORD_VERIFIER" | "ADMIN_NO_SRP_AUTH"; + challengeResult: boolean; + challengeMetaData?: string; + }[]; + challengeName?: string; + privateChallengeParameters?: {[key: string]: string}; + challengeAnswer?: {[key: string]: string}; + }; + response: { + autoConfirmUser?: boolean; + smsMessage?: string; + emailMessage?: string; + emailSubject?: string; + challengeName?: string; + issueTokens?: boolean; + failAuthentication?: boolean; + publicChallengeParameters?: {[key: string]: string}; + privateChallengeParameters?: {[key: string]: string}; + challengeMetaData?: string; + answerCorrect?: boolean; + }; +} + +/** + * CloudFormation Custom Resource event and response + * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref.html + */ +type CloudFormationCustomResourceEventCommon = { + ServiceToken: string; + ResponseURL: string; + StackId: string; + RequestId: string; + LogicalResourceId: string; + ResourceType: string; + ResourceProperties: { + ServiceToken: string; + [Key: string]: any; + } +} + +type CloudFormationCustomResourceCreateEvent = CloudFormationCustomResourceEventCommon & { + RequestType: "Create"; +} + +type CloudFormationCustomResourceUpdateEvent = CloudFormationCustomResourceEventCommon & { + RequestType: "Update"; + PhysicalResourceId: string; + OldResourceProperties: { + [Key: string]: any; + }; +} + +type CloudFormationCustomResourceDeleteEvent = CloudFormationCustomResourceEventCommon & { + RequestType: "Delete"; + PhysicalResourceId: string; +} + +export type CloudFormationCustomResourceEvent = CloudFormationCustomResourceCreateEvent | CloudFormationCustomResourceUpdateEvent | CloudFormationCustomResourceDeleteEvent; + +type CloudFormationCustomResourceResponseCommon = { + PhysicalResourceId: string; + StackId: string; + RequestId: string; + LogicalResourceId: string; + Data?: { + [Key: string]: any; + } +} + +type CloudFormationCustomResourceSuccessResponse = CloudFormationCustomResourceResponseCommon & { + Status: "SUCCESS"; + Reason?: string; +} + +type CloudFormationCustomResourceFailedResponse = CloudFormationCustomResourceResponseCommon & { + Status: "FAILED"; + Reason: string; +} + +export type CloudFormationCustomResourceResponse = CloudFormationCustomResourceSuccessResponse | CloudFormationCustomResourceFailedResponse; + // Context // http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html interface Context { diff --git a/types/babel-generator/babel-generator-tests.ts b/types/babel-generator/babel-generator-tests.ts index a27fba50c5..92c65b7f54 100644 --- a/types/babel-generator/babel-generator-tests.ts +++ b/types/babel-generator/babel-generator-tests.ts @@ -1,7 +1,3 @@ -/// - - - // Example from https://github.com/babel/babel/tree/master/packages/babel-generator import {parse} from 'babylon'; import generate from 'babel-generator'; @@ -14,13 +10,13 @@ ast.loc.start; const output = generate(ast, { /* options */ }, code); - // Example from https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-generator let result = generate(ast, { retainLines: false, compact: "auto", concise: false, quotes: "double", + jsonCompatibleStrings: true, // ... }, code); result.code; diff --git a/types/babel-generator/index.d.ts b/types/babel-generator/index.d.ts index f30505623f..3b3d8126e9 100644 --- a/types/babel-generator/index.d.ts +++ b/types/babel-generator/index.d.ts @@ -1,12 +1,10 @@ -// Type definitions for babel-generator v6.7 +// Type definitions for babel-generator 6.25 // Project: https://github.com/babel/babel/tree/master/packages/babel-generator // Definitions by: Troy Gerwien +// Johnny Estilles // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - import * as t from 'babel-types'; -type Node = t.Node; /** * Turns an AST into code, maintaining sourcemaps, user preferences, and valid output. @@ -15,18 +13,17 @@ type Node = t.Node; * @param code - the original source code, used for source maps. * @returns - an object containing the output code and source map. */ -export default function generate(ast: Node, opts?: GeneratorOptions, code?: string | {[filename: string]: string}): GeneratorResult; +export default function generate(ast: t.Node, opts?: GeneratorOptions, code?: string | {[filename: string]: string}): GeneratorResult; export interface GeneratorOptions { - /** * Optional string to add as a block comment at the start of the output file. - */ + */ auxiliaryCommentBefore?: string; /** * Optional string to add as a block comment at the end of the output file. - */ + */ auxiliaryCommentAfter?: string; /** @@ -34,7 +31,7 @@ export interface GeneratorOptions { * By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment * contains `@preserve` or `@license`. */ - shouldPrintComment?: (comment: string) => boolean; + shouldPrintComment?(comment: string): boolean; /** * Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces). @@ -60,7 +57,7 @@ export interface GeneratorOptions { /** * Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`. */ - concise?: boolean; + concise?: boolean; /** * The type of quote to use in the output. If omitted, autodetects based on `ast.tokens`. @@ -70,7 +67,7 @@ export interface GeneratorOptions { /** * Used in warning messages */ - filename?: string; + filename?: string; /** * Enable generating source maps. Defaults to `false`. @@ -92,10 +89,14 @@ export interface GeneratorOptions { * This will only be used if `code` is a string. */ sourceFileName?: string; + + /** + * Set to true to run jsesc with "json": true to print "\u00A9" vs. "©"; + */ + jsonCompatibleStrings?: boolean; } export interface GeneratorResult { - map: Object; + map: {}; code: string; } - diff --git a/types/babel-generator/tslint.json b/types/babel-generator/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/babel-generator/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/babel-traverse/babel-traverse-tests.ts b/types/babel-traverse/babel-traverse-tests.ts index 98afbbc0a7..5952faefd1 100644 --- a/types/babel-traverse/babel-traverse-tests.ts +++ b/types/babel-traverse/babel-traverse-tests.ts @@ -120,3 +120,15 @@ const BindingKindTest: Visitor = { // kind === 'anythingElse'; }, }; + +// https://github.com/babel/babel/blob/d33d02359474296402b1577ef53f20d94e9085c4/packages/babel-plugin-transform-es2015-block-scoping/test/fixtures/exec/scope-bindings.js#L15-L25 +const vScope: Visitor = { + Scope: { + enter(path) { + console.log(`Entering scope: ${path.node.type}`); + }, + exit(path) { + console.log(`Exiting scope: ${path.node.type}`); + } + } +}; diff --git a/types/babel-traverse/index.d.ts b/types/babel-traverse/index.d.ts index e307cd664d..8d34144d0a 100644 --- a/types/babel-traverse/index.d.ts +++ b/types/babel-traverse/index.d.ts @@ -305,6 +305,7 @@ export interface Visitor extends VisitNodeObject { FlowBaseAnnotation?: VisitNode; FlowDeclaration?: VisitNode; JSX?: VisitNode; + Scope?: VisitNode; } export type VisitNode = VisitNodeFunction | VisitNodeObject; diff --git a/types/backbone-associations/index.d.ts b/types/backbone-associations/index.d.ts index 84532c482d..9d0aa36614 100644 --- a/types/backbone-associations/index.d.ts +++ b/types/backbone-associations/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/dhruvaray/backbone-associations/ // Definitions by: Craig Brett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as Backbone from 'backbone'; diff --git a/types/backbone-fetch-cache/index.d.ts b/types/backbone-fetch-cache/index.d.ts index 0067bb4443..c5e8d84426 100644 --- a/types/backbone-fetch-cache/index.d.ts +++ b/types/backbone-fetch-cache/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/madglory/backbone-fetch-cache // Definitions by: delphinus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as Backbone from "backbone"; diff --git a/types/backbone-relational/index.d.ts b/types/backbone-relational/index.d.ts index f985a52d8f..b51c46f1d7 100644 --- a/types/backbone-relational/index.d.ts +++ b/types/backbone-relational/index.d.ts @@ -2,6 +2,7 @@ // Project: http://backbonerelational.org/ // Definitions by: Eirik Hoem // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/backbone.layoutmanager/index.d.ts b/types/backbone.layoutmanager/index.d.ts index a5c469eb1b..f4eb340e7c 100644 --- a/types/backbone.layoutmanager/index.d.ts +++ b/types/backbone.layoutmanager/index.d.ts @@ -2,6 +2,7 @@ // Project: http://layoutmanager.org/ // Definitions by: He Jiang // Definitions: https://github.com/hejiang2000/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/backbone.localstorage/index.d.ts b/types/backbone.localstorage/index.d.ts index d08d546ec2..9fd089cdec 100644 --- a/types/backbone.localstorage/index.d.ts +++ b/types/backbone.localstorage/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jeromegn/Backbone.localStorage // Definitions by: Louis Grignon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as Backbone from 'backbone'; diff --git a/types/backbone.marionette/index.d.ts b/types/backbone.marionette/index.d.ts index 93b82355db..ad623aa078 100644 --- a/types/backbone.marionette/index.d.ts +++ b/types/backbone.marionette/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/marionettejs/ // Definitions by: Zeeshan Hamid , Natan Vivo , Sven Tschui // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as Backbone from 'backbone'; import * as Radio from 'backbone.radio'; @@ -1264,17 +1265,17 @@ declare namespace Marionette { */ start(options?: any): void; - /** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/ - addRegions(regions: any): any; + /** Root region of the application*/ + region: string; - /** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/ - emptyRegions(): void; + /** Get the root region */ + getRegion(): Region; - /** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/ - removeRegion(region: Region): void; + /** Show a view in the root region */ + showView(view: Backbone.View): void; - /** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/ - getRegion(regionName: string): Region; + /** Get the view from the root region*/ + getView(): any; module(moduleNames: any, moduleDefinition: any): Module; diff --git a/types/backbone.paginator/backbone.paginator-tests.ts b/types/backbone.paginator/backbone.paginator-tests.ts index f4f5765988..f24e2855f5 100644 --- a/types/backbone.paginator/backbone.paginator-tests.ts +++ b/types/backbone.paginator/backbone.paginator-tests.ts @@ -107,60 +107,48 @@ namespace Paging { testCollection.getFirstPage(options); - // 'silent's type is boolean. (structural subtyping) - testCollection.getFirstPage({silent: 'aa'}); - // 'url's type is string. (structural subtyping) - testCollection.getFirstPage({url: true}); + testCollection.getFirstPage({silent: false}); + testCollection.getFirstPage({url: 'zombocom'}); result = testCollection.getLastPage(); testCollection.getLastPage(options); - // 'silent's type is boolean. (structural subtyping) - testCollection.getLastPage({silent: 'aa'}); - // 'url's type is string. (structural subtyping) - testCollection.getLastPage({url: true}); + testCollection.getLastPage({silent: true}); + testCollection.getLastPage({url: 'chickensnack'}); result = testCollection.getNextPage(); testCollection.getNextPage(options); - // 'silent's type is boolean. (structural subtyping) - testCollection.getNextPage({silent: 'aa'}); - // 'url's type is string. (structural subtyping) - testCollection.getNextPage({url: true}); + testCollection.getNextPage({silent: false}); + testCollection.getNextPage({url: 'hampsterdance'}); result = testCollection.getPage(1); testCollection.getPage("1", options); - // 'silent's type is boolean. (structural subtyping) - testCollection.getPage(1, {silent: 'aa'}); - // 'url's type is string. (structural subtyping) - testCollection.getPage(1, {url: true}); + testCollection.getPage(1, {silent: true}); + testCollection.getPage(1, {url: 'badcandy'}); result = testCollection.getPageByOffset(1); testCollection.getPageByOffset(1, options); - // 'silent's type is boolean. (structural subtyping) - testCollection.getPageByOffset(1, {silent: 'aa'}); - // 'url's type is string. (structural subtyping) - testCollection.getPageByOffset(1, {url: true}); + testCollection.getPageByOffset(1, {silent: false}); + testCollection.getPageByOffset(1, {url: 'oldmanmurray'}); result = testCollection.getPreviousPage(); testCollection.getPreviousPage(options); - // 'silent's type is boolean. (structural subtyping) - testCollection.getPreviousPage({silent: 'aa'}); - // 'url's type is string. (structural subtyping) - testCollection.getPreviousPage({url: true}); + testCollection.getPreviousPage({silent: false}); + testCollection.getPreviousPage({url: 'uncyclopedia'}); var hasPage:boolean = testCollection.hasNextPage(); @@ -231,7 +219,7 @@ namespace Setting { var result2:TestCollection - = testCollection.setSorting('id', 1, options); + = testCollection.setSorting('id', 1, { full: true}); result1 = testCollection.switchMode( 'server', diff --git a/types/backbone.paginator/index.d.ts b/types/backbone.paginator/index.d.ts index 521ccda8bf..fc7c39e995 100644 --- a/types/backbone.paginator/index.d.ts +++ b/types/backbone.paginator/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/backbone-paginator/backbone.paginator // Definitions by: Nyamazing // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as Backbone from 'backbone'; diff --git a/types/backbone.radio/index.d.ts b/types/backbone.radio/index.d.ts index 7596722342..61c996f6de 100644 --- a/types/backbone.radio/index.d.ts +++ b/types/backbone.radio/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/marionettejs/backbone.radio // Definitions by: Peter Palotas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as Backbone from 'backbone'; diff --git a/types/backbone/index.d.ts b/types/backbone/index.d.ts index 975d7f33c9..f151b2f42e 100644 --- a/types/backbone/index.d.ts +++ b/types/backbone/index.d.ts @@ -2,6 +2,7 @@ // Project: http://backbonejs.org/ // Definitions by: Boris Yankov , Natan Vivo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/backgrid/index.d.ts b/types/backgrid/index.d.ts index 83dc86bcbe..fdf7785b59 100644 --- a/types/backgrid/index.d.ts +++ b/types/backgrid/index.d.ts @@ -2,6 +2,7 @@ // Project: http://backgridjs.com/ // Definitions by: Jeremy Lujan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as Backbone from 'backbone'; diff --git a/types/baconjs/index.d.ts b/types/baconjs/index.d.ts index 0550d6ec48..5b85bfb38e 100644 --- a/types/baconjs/index.d.ts +++ b/types/baconjs/index.d.ts @@ -2,6 +2,7 @@ // Project: https://baconjs.github.io/ // Definitions by: Alexander Matsievsky , Joonas Javanainen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/bagpipes/index.d.ts b/types/bagpipes/index.d.ts index 82a1fa32f4..ec1d0cceb7 100755 --- a/types/bagpipes/index.d.ts +++ b/types/bagpipes/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Michael Mrowetz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface FittingContext { +export interface FittingContext { /** The input defined in the fitting definition * (string, number, object, array) */ @@ -17,9 +17,9 @@ interface FittingContext { * Fitting types has pre-defined fittings `system` and `user` * but can be any any string for custom types like `swagger` or `node-machine` */ -type FittingType = "system" | "user" | string; +export type FittingType = "system" | "user" | string; -interface FittingDef { +export interface FittingDef { /** * If type is omitted (as it must be for in-line usage), Bagpipes will * first check the user fittings then the system fittings for the name and @@ -46,8 +46,8 @@ interface FittingDef { * * Will be called called when the `Pipe` it is contained it gets 'played' */ -type Fitting = ( - context: FittingContext, +export type Fitting = ( + context: FittingContext, next: {(err: Error | null | undefined, res?: any): void}) => void; /** @@ -58,18 +58,18 @@ type Fitting = ( * * @param {Object} fittingDef Fitting Definition */ -type FittingFactory = (fittingDef: FittingDef, bagpipes: any) => Fitting; +export type FittingFactory = (fittingDef: FittingDef, bagpipes: any) => Fitting; /** * Hashmap of `fittingType`s (the name of a fitting) and the * `FittingFactory` functions used to create them */ -interface FittingTypesMap { +export interface FittingTypesMap { [fittingType: string]: FittingFactory; } /** The Pipe Definition */ -type PipeDef = any[] | string | FittingDef; +export type PipeDef = any[] | string | FittingDef; /** Hashmap of Pipe Definitons */ export interface PipeDefMap { @@ -143,10 +143,10 @@ export function create(pipesDefs: PipeDefMap, conf?: Config): Bagpipes; // Types for imports from `pipeworks` module -type Affinity = "hoist" | "sink"; +export type Affinity = "hoist" | "sink"; /** PipeDef used in `pipeworks` module */ -interface PipeworksOptions { +export interface PipeworksOptions { /** * Adds to the pre and post queues, respectively. * Ensures a pipe gets fitted before or after the main execution pipeline. diff --git a/types/bagpipes/tslint.json b/types/bagpipes/tslint.json index 3db14f85ea..a4bcc87748 100755 --- a/types/bagpipes/tslint.json +++ b/types/bagpipes/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "callable-types": false + } +} diff --git a/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts b/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts new file mode 100644 index 0000000000..cc525509c6 --- /dev/null +++ b/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts @@ -0,0 +1,24 @@ +import "./index" +namespace BMapTests { + export class TestFixture { + //document: http://lbsyun.baidu.com/index.php?title=jspopular + public createMap(container: string | HTMLElement) { + navigator.geolocation.getCurrentPosition((position: Position) => { + let point = new BMap.Point(position.coords.longitude, position.coords.latitude); + let map = new BMap.Map(container); + map.centerAndZoom(point, 15); + }, console.log, { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true }); + } + public addControl(map: BMap.Map) { + map.addControl(new BMap.ScaleControl({ anchor: BMAP_ANCHOR_TOP_LEFT })); + map.addControl(new BMap.NavigationControl()); + map.addControl(new BMap.MapTypeControl({ mapTypes: [BMAP_NORMAL_MAP, BMAP_HYBRID_MAP] })); + map.addControl(new BMap.OverviewMapControl({ isOpen: true, anchor: BMAP_ANCHOR_BOTTOM_RIGHT })); + } + public addMarker(map: BMap.Map, point: BMap.Point) { + var marker = new BMap.Marker(point); + map.addOverlay(marker); + marker.setAnimation(BMAP_ANIMATION_BOUNCE); + } + } +} diff --git a/types/baidumap-web-sdk/baidumap.base.d.ts b/types/baidumap-web-sdk/baidumap.base.d.ts new file mode 100644 index 0000000000..9dc07a9377 --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.base.d.ts @@ -0,0 +1,56 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +declare namespace BMap { + class Point { + constructor (lng: number, lat: number) + lng: number + lat: number + equals(other: Point): boolean + } + class Pixel { + constructor (x: number, y: number) + x: number + y: number + equals(other: Pixel): boolean + } + class Size { + constructor (width: number, height: number) + width: number + height: number + equals(other: Size): boolean + } + class Bounds { + constructor (minX: number, minY: number, maxX: number, maxY: number) + constructor (sw: Point, ne: Point) + minX: number + minY: number + maxX: number + maxY: number + equals(other: Bounds): boolean + containsPoint(point: Point): boolean + containsBounds(bounds: Bounds): boolean + intersects(other: Bounds): boolean + extend(point: Point): void + getCenter(): Point + isEmpty(): boolean + getSouthWest(): Point + getNorthEast(): Point + toSpan(): Point + } +} \ No newline at end of file diff --git a/types/baidumap-web-sdk/baidumap.control.d.ts b/types/baidumap-web-sdk/baidumap.control.d.ts new file mode 100644 index 0000000000..6e3fb771be --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.control.d.ts @@ -0,0 +1,132 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// +/// +/// +declare namespace BMap { + class Control { + constructor() + defaultAnchor: ControlAnchor + defaultOffset: Size + initialize(map: Map): HTMLElement + setAnchor(anchor: ControlAnchor): void + getAnchor(): ControlAnchor + setOffset(offset: Size): void + getOffset(): Size + show(): void + hide(): void + isVisible(): boolean + } + interface NavigationControlOptions { + anchor?: ControlAnchor + offset?: Size + type?: NavigationControlType + showZoomInfo?: boolean + enableGeolocation?: boolean + } + interface ScaleControlOptions { + anchor?: ControlAnchor + offset?: Size + } + interface CopyrightControlOptions { + anchor?: ControlAnchor + offset?: Size + } + type ControlAnchor = number + class OverviewMapControl extends Control { + constructor(opts: OverviewMapControlOptions) + changeView(): void + setSize(size: Size): void + getSize(): Size + onviewchanged: (event: { type: string, target: any, isOpen: boolean }) => void + onviewchanging: (event: { type: string, target: any }) => void + } + type LengthUnit = string + class MapTypeControl extends Control { + constructor(opts?: MapTypeControlOptions) + } + class NavigationControl extends Control { + constructor(opts?: NavigationControlOptions) + getType(): NavigationControlOptions + setType(type: NavigationControlType): void + } + interface OverviewMapControlOptions { + anchor?: ControlAnchor + offset?: Size + size?: Size + isOpen?: boolean + } + class CopyrightControl extends Control { + constructor(opts?: CopyrightControlOptions) + addCopyright(copyright: Copyright): void + removeCopyright(id: number): void + getCopyright(id: number): Copyright + getCopyrightCollection(): Copyright[] + } + interface MapTypeControlOptions { + type?: MapTypeControlType, + mapTypes?: MapType[] + } + type NavigationControlType = number + class ScaleControl extends Control { + constructor(opts?: ScaleControlOptions) + getUnit(): LengthUnit + setUnit(unit: LengthUnit): void + } + interface Copyright { + id?: number + content?: string + bounds?: Bounds + } + type MapTypeControlType = number + class GeolocationControl extends Control { + constructor(opts?: GeolocationControlOptions) + } + interface GeolocationControlOptions { + anchor?: ControlAnchor + offset?: Size + showAddressBar?: boolean + enableAutoLocation?: boolean + locationIcon?: Icon + } + type StatusCode = number + class PanoramaControl extends Control { + constructor() + } +} +declare const BMAP_UNIT_METRIC: BMap.LengthUnit +declare const BMAP_UNIT_IMPERIAL: BMap.LengthUnit + +declare const BMAP_ANCHOR_TOP_LEFT: BMap.ControlAnchor +declare const BMAP_ANCHOR_TOP_RIGHT: BMap.ControlAnchor +declare const BMAP_ANCHOR_BOTTOM_LEFT: BMap.ControlAnchor +declare const BMAP_ANCHOR_BOTTOM_RIGHT: BMap.ControlAnchor + +declare const BMAP_NAVIGATION_CONTROL_LARGE: BMap.NavigationControlType +declare const BMAP_NAVIGATION_CONTROL_SMALL: BMap.NavigationControlType +declare const BMAP_NAVIGATION_CONTROL_PAN: BMap.NavigationControlType +declare const BMAP_NAVIGATION_CONTROL_ZOOM: BMap.NavigationControlType + +declare const BMAP_MAPTYPE_CONTROL_HORIZONTAL: BMap.MapTypeControlType +declare const BMAP_MAPTYPE_CONTROL_DROPDOWN: BMap.MapTypeControlType +declare const BMAP_MAPTYPE_CONTROL_MAP: BMap.MapTypeControlType + +declare const BMAP_STATUS_PERMISSION_DENIED: BMap.StatusCode +declare const BMAP_STATUS_SERVICE_UNAVAILABLE: BMap.StatusCode +declare const BMAP_STATUS_TIMEOUT: BMap.StatusCode \ No newline at end of file diff --git a/types/baidumap-web-sdk/baidumap.core.d.ts b/types/baidumap-web-sdk/baidumap.core.d.ts new file mode 100644 index 0000000000..24d1aed9f0 --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.core.d.ts @@ -0,0 +1,154 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// +/// +/// +declare namespace BMap { + class Map { + constructor(container: string | HTMLElement, opts?: MapOptions) + enableDragging(): void + disableDragging(): void + enableScrollWheelZoom(): void + disableScrollWheelZoom(): void + enableDoubleClickZoom(): void + disableDoubleClickZoom(): void + enableKeyboard(): void + disableKeyboard(): void + enableInertialDragging(): void + disableInertialDragging(): void + enableContinuousZoom(): void + disableContinuousZoom(): void + enablePinchToZoom(): void + disablePinchToZoom(): void + enableAutoResize(): void + disableAutoResize(): void + setDefaultCursor(cursor: string): void + getDefaultCursor(): string + setDraggingCursor(cursor: string): void + getDraggingCursor(): string + setMinZoom(zoom: number): void + setMaxZoom(zoom: number): void + setMapStyle(mapStyle: MapStyle): void + setPanorama(pano: Panorama): void + disable3DBuilding(): void + getBounds(): Bounds + getCenter(): Point + getDistance(start: Point, end: Point): number + getMapType(): MapType + getSize(): Size + getViewport(view: Point[], viewportOptions?: ViewportOptions): Viewport + getZoom(): number + getPanorama(): Panorama + centerAndZoom(center: Point, zoom: number): void + panTo(center: Point, opts?: PanOptions): void + panBy(x: number, y: number, opts?: PanOptions): void + reset(): void + setCenter(center: Point | string): void + setCurrentCity(city: string): void + setMapType(mapType: MapType): void + setViewport(view: Point[], viewportOptions?: ViewportOptions): void + setZoom(zoom: number): void + highResolutionEnabled(): boolean + zoomIn(): void + zoomOut(): void + addHotspot(hotspot: Hotspot): void + removeHotspot(hotspot: Hotspot): void + clearHotspots(): void + addControl(control: Control): void + removeControl(control: Control): void + getContainer(): HTMLElement + addContextMenu(menu: ContextMenu): void + removeContextMenu(menu: ContextMenu): void + addOverlay(overlay: Overlay): void + removeOverlay(overlay: Overlay): void + clearOverlays(): void + openInfoWindow(infoWnd: InfoWindow, point: Point): void + closeInfoWindow(): void + pointToOverlayPixel(point: Point): Pixel + overlayPixelToPoint(pixel: Pixel): Point + getInfoWindow(): InfoWindow + getOverlays(): Overlay[] + getPanes(): MapPanes + addTileLayer(tileLayer: TileLayer): void + removeTileLayer(tilelayer: TileLayer): void + getTileLayer(mapType: string): TileLayer + pixelToPoint(pixel: Pixel): Point + pointToPixel(point: Point): Pixel + onclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void + ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onrightclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void + onrightdblclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void + onmaptypechange: (event: { type: string, target: any }) => void + onmousemove: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void + onmouseover: (event: { type: string, target: any }) => void + onmouseout: (event: { type: string, target: any }) => void + onmovestart: (event: { type: string, target: any }) => void + onmoving: (event: { type: string, target: any }) => void + onmoveend: (event: { type: string, target: any }) => void + onzoomstart: (event: { type: string, target: any }) => void + onzoomend: (event: { type: string, target: any }) => void + onaddoverlay: (event: { type: string, target: any }) => void + onaddcontrol: (event: { type: string, target: any }) => void + onremovecontrol: (event: { type: string, target: any }) => void + onremoveoverlay: (event: { type: string, target: any }) => void + onclearoverlays: (event: { type: string, target: any }) => void + ondragstart: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + ondragging: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + ondragend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onaddtilelayer: (event: { type: string, target: any }) => void + onremovetilelayer: (event: { type: string, target: any }) => void + onload: (event: { type: string, target: any, point: Point, pixel: Pixel, zoom: number }) => void + onresize: (event: { type: string, target: any, size: Size }) => void + onhotspotclick: (event: { type: string, target: any, spots: HotspotOptions }) => void + onhotspotover: (event: { type: string, target: any, spots: HotspotOptions }) => void + onhotspotout: (event: { type: string, target: any, spots: HotspotOptions }) => void + ontilesloaded: (event: { type: string, target: any }) => void + ontouchstart: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + ontouchmove: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + ontouchend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onlongpress: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + } + interface PanOptions { + noAnimation?: boolean + } + interface MapOptions { + minZoom?: number + maxZoom?: number + mapType?: MapType + enableHighResolution?: boolean + enableAutoResize?: boolean + enableMapClick?: boolean + } + interface Viewport { + center: Point + zoom: number + } + interface ViewportOptions { + enableAnimation?: boolean + margins?: number[] + zoomFactor?: number + delay?: number + } + type APIVersion = number + interface MapStyle { + features: any[] + style: string + } +} +declare const BMAP_API_VERSION: BMap.APIVersion \ No newline at end of file diff --git a/types/baidumap-web-sdk/baidumap.maplayer.d.ts b/types/baidumap-web-sdk/baidumap.maplayer.d.ts new file mode 100644 index 0000000000..244fff0c7b --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.maplayer.d.ts @@ -0,0 +1,82 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// +/// +declare namespace BMap { + class TileLayer { + constructor(opts?: TileLayerOptions) + getTilesUrl(tileCoord: Pixel, zoom: number): string + getCopyright(): Copyright + isTransparentPng(): boolean + } + interface TileLayerOptions { + transparentPng?: boolean + tileUrlTemplate?: string + copyright?: Copyright + zIndex?: number + } + class TrafficLayer extends TileLayer { + constructor(opts?: TrafficLayerOptions) + } + interface TrafficLayerOptions { + predictDate?: PredictDate + } + interface PredictDate { + weekday: number + hour: number + } + class CustomLayer extends TileLayer { + constructor(opts: CustomLayerOptions) + onhotspotclick: (event: { type: string, target: any, content: any }) => void + } + interface Custompoi { + poiId: string + databoxId: string + title: string + address: string + phoneNumber: string + postcode: string + provinceCode: number + province: string + cityCode: number + city: string + districtCode: number + district: string + point: Point + tags: string[] + typeId: number + extendedData: any + } + class PanoramaCoverageLayer extends TileLayer { + constructor() + } + interface CustomLayerOptions { + databoxId?: string + geotableId?: string + q?: string + tags?: string + filter?: string + pointDensityType?: PointDensityType + } + type PointDensityType = number +} + +declare const BMAP_POINT_DENSITY_HIGH: BMap.PointDensityType +declare const BMAP_POINT_DENSITY_MEDIUM: BMap.PointDensityType +declare const BMAP_POINT_DENSITY_LOW: BMap.PointDensityType \ No newline at end of file diff --git a/types/baidumap-web-sdk/baidumap.maptype.d.ts b/types/baidumap-web-sdk/baidumap.maptype.d.ts new file mode 100644 index 0000000000..01056212bc --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.maptype.d.ts @@ -0,0 +1,51 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// +/// +declare namespace BMap { + class MapType { + constructor(name: string, layers: TileLayer | TileLayer[], opts?: MapTypeOptions) + getName(): string + getTileLayer(): TileLayer + getMinZoom(): number + getMaxZoom(): number + getProjection(): Projection + getTextColor(): string + getTips(): string + } + interface MapTypeOptions { + minZoom?: number + maxZoom?: number + errorImageUrl?: string + textColor?: number + tips?: string + } + interface Projection { + lngLatToPoint(lngLat: Point): Pixel + pointToLngLat(point: Pixel): Point + } + interface MercatorProjection extends Projection { + } + interface PerspectiveProjection extends Projection { + } +} +declare const BMAP_NORMAL_MAP: BMap.MapType +declare const BMAP_PERSPECTIVE_MAP: BMap.MapType +declare const BMAP_SATELLITE_MAP: BMap.MapType +declare const BMAP_HYBRID_MAP: BMap.MapType \ No newline at end of file diff --git a/types/baidumap-web-sdk/baidumap.overlay.d.ts b/types/baidumap-web-sdk/baidumap.overlay.d.ts new file mode 100644 index 0000000000..d723ac5e48 --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.overlay.d.ts @@ -0,0 +1,438 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// +/// +/// +declare namespace BMap { + interface Overlay { + initialize?(map: Map): HTMLElement + isVisible?(): boolean + draw?(): void + show?(): void + hide?(): void + } + type SymbolShapeType = number + interface PolylineOptions { + strokeColor?: string + strokeWeight?: number + strokeOpacity?: number + strokeStyle?: string + enableMassClear?: boolean + enableEditing?: boolean + enableClicking?: boolean + } + interface GroundOverlayOptions { + opacity?: number + imageURL?: string + displayOnMinLevel?: number + displayOnMaxLevel?: number + } + class Marker implements Overlay { + constructor(point: Point, opts?: MarkerOptions) + openInfoWindow(infoWnd: InfoWindow): void + closeInfoWindow(): void + setIcon(icon: Icon): void + getIcon(): Icon + setPosition(position: Point): void + getPosition(): Point + setOffset(offset: Size): void + getOffset(): Size + setLabel(label: Label): void + getLabel(): Label + setTitle(title: string): void + getTitle(): string + setTop(isTop: boolean): void + enableDragging(): void + disableDragging(): void + enableMassClear(): void + disableMassClear(): void + setZIndex(zIndex: number): void + getMap(): Map + addContextMenu(menu: ContextMenu): void + removeContextMenu(menu: ContextMenu): void + setAnimation(animation?: Animation): void + setRotation(rotation: number): void + getRotation(): number + setShadow(shadow: Icon): void + getShadow(): void + addEventListener(event: string, handler: Function): void + removeEventListener(event: string, handler: Function): void + onclick: (event: { type: string, target: any }) => void + ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onremove: (event: { type: string, target: any }) => void + oninfowindowclose: (event: { type: string, target: any }) => void + oninfowindowopen: (event: { type: string, target: any }) => void + ondragstart: (event: { type: string, target: any }) => void + ondragging: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + ondragend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onrightclick: (event: { type: string, target: any }) => void + } + interface SymbolOptions { + anchor?: Size + fillColor?: string + fillOpacity?: number + scale?: number + rotation?: number + strokeColor?: string + strokeOpacity?: number + strokeWeight?: number + } + class IconSequence { + constructor(symbol: Symbol, offset?: string, repeat?: string, fixedRotation?: boolean) + } + class PointCollection implements Overlay { + constructor(points: Point[], opts?: PointCollectionOption) + setPoints(points: Point[]): void + setStyles(styles: PointCollectionOption): void + clear(): void + onclick: (event: { type: string, target: any, point: Point }) => void + onmouseover: (event: { type: string, target: any, point: Point }) => void + onmouseout: (event: { type: string, target: any, point: Point }) => void + } + interface MarkerOptions { + offset?: Size + icon?: Icon + enableMassClear?: boolean + enableDragging?: boolean + enableClicking?: boolean + raiseOnDrag?: boolean + draggingCursor?: string + rotation?: number + shadow?: Icon + title?: string + } + class InfoWindow implements Overlay { + constructor(content: string | HTMLElement, opts?: InfoWindowOptions) + setWidth(width: number): void + setHeight(height: number): void + redraw(): void + setTitle(title: string | HTMLElement): void + getTitle(): string | HTMLElement + setContent(content: string | HTMLElement): void + getContent(): string | HTMLElement + getPosition(): Point + enableMaximize(): void + disableMaximize(): void + isOpen(): boolean + setMaxContent(content: string): void + maximize(): void + restore(): void + enableAutoPan(): void + disableAutoPan(): void + enableCloseOnClick(): void + disableCloseOnClick(): void + addEventListener(event: string, handler: Function): void + removeEventListener(event: string, handler: Function): void + onclose: (event: { type: string, target: any, point: Point }) => void + onopen: (event: { type: string, target: any, point: Point }) => void + onmaximize: (event: { type: string, target: any }) => void + onrestore: (event: { type: string, target: any }) => void + onclickclose: (event: { type: string, target: any }) => void + } + class Polygon implements Overlay { + constructor(points: Array, opts?: PolygonOptions) + setPath(path: Point[]): void + getPath(): Point[] + setStrokeColor(color: string): void + getStrokeColor(): string + setFillColor(color: string): void + getFillColor(): string + setStrokeOpacity(opacity: number): void + getStrokeOpacity(): number + setFillOpacity(opacity: number): void + getFillOpacity(): number + setStrokeWeight(weight: number): void + getStrokeWeight(): number + setStrokeStyle(style: string): void + getStrokeStyle(): string + getBounds(): Bounds + enableEditing(): void + disableEditing(): void + enableMassClear(): void + disableMassClear(): void + setPointAt(index: number, point: Point): void + setPositionAt(index: number, point: Point): void + getMap(): Map + addEventListener(event: string, handler: Function): void + removeEventListener(event: string, handler: Function): void + onclick: (event: { type: string, target: any }) => void + ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onremove: (event: { type: string, target: any }) => void + onlineupdate: (event: { type: string, target: any }) => void + } + interface PointCollectionOption { + shape?: ShapeType + color?: string + size?: SizeType + } + type Animation = number + interface InfoWindowOptions { + width?: number + height?: number + maxWidth?: number + offset?: Size + title?: string + enableAutoPan?: boolean + enableCloseOnClick?: boolean + enableMessage?: boolean + message?: string + } + interface PolygonOptions { + strokeColor?: string + fillColor?: string + strokeWeight?: number + strokeOpacity?: number + fillOpacity?: number + strokeStyle?: number + enableMassClear?: boolean + enableEditing?: boolean + enableClicking?: boolean + } + type ShapeType = number + class Icon implements Overlay { + constructor(url: string, size: Size, opts?: IconOptions) + anchor: Size + size: Size + imageOffset: Size + imageSize: Size + imageUrl: Size + infoWindowAnchor: Size + printImageUrl: string + setImageUrl(imageUrl: string): void + setSize(size: Size): void + setImageSize(offset: Size): void + setAnchor(anchor: Size): void + setImageOffset(offset: Size): void + setInfoWindowAnchor(anchor: Size): void + setPrintImageUrl(url: string): void + } + class Label implements Overlay { + constructor(content: string, opts?: LabelOptions) + setStyle(styles: Object): void + setContent(content: string): void + setPosition(position: Point): void + getPosition(): Point + setOffset(offset: Size): void + getOffset(): Size + setTitle(title: string): void + getTitle(): string + enableMassClear(): void + disableMassClear(): void + setZIndex(zIndex: number): void + setPosition(position: Point): void + getMap(): Map + addEventListener(event: string, handler: Function): void + removeEventListener(event: string, handler: Function): void + onclick: (event: { type: string, target: any }) => void + ondblclick: (event: { type: string, target: any }) => void + onmousedown: (event: { type: string, target: any }) => void + onmouseup: (event: { type: string, target: any }) => void + onmouseout: (event: { type: string, target: any }) => void + onmouseover: (event: { type: string, target: any }) => void + onremove: (event: { type: string, target: any }) => void + onrightclick: (event: { type: string, target: any }) => void + } + class Circle implements Overlay { + constructor(center: Point, radius: number, opts?: CircleOptions) + setCenter(center: Point): void + getCenter(): Point + setRadius(radius: number): void + getRadius(): number + getBounds(): Bounds + setStrokeColor(color: string): void + getStrokeColor(): string + setFillColor(color: string): void + getFillColor(): string + setStrokeOpacity(opacity: number): void + getStrokeOpacity(): number + setFillOpacity(opacity: number): void + getFillOpacity(): number + setStrokeWeight(weight: number): void + getStrokeWeight(): number + setStrokeStyle(style: string): void + getStrokeStyle(): string + getBounds(): Bounds + enableEditing(): void + disableEditing(): void + enableMassClear(): void + disableMassClear(): void + getMap(): Map + addEventListener(event: string, handler: Function): void + removeEventListener(event: string, handler: Function): void + onclick: (event: { type: string, target: any }) => void + ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onremove: (event: { type: string, target: any }) => void + onlineupdate: (event: { type: string, target: any }) => void + } + type SizeType = number + interface IconOptions { + anchor?: Size + imageOffset?: Size + infoWindowAnchor?: Size + printImageUrl?: string + } + interface LabelOptions { + offset?: Size + position?: Point + enableMassClear?: boolean + } + interface CircleOptions { + strokeColor?: string + fillColor?: string + strokeWeight?: number + strokeOpacity?: number + fillOpacity?: number + strokeStyle?: string + enableMassClear?: boolean + enableEditing?: boolean + enableClicking?: boolean + } + class Hotspot implements Overlay { + constructor(position: Point, opts?: HotspotOptions) + setPosition(position: Point): void + getPosition(): Point + setText(text: string): void + getText(): string + setUserData(data: any): void + getUserData(): any + } + class Symbol implements Overlay { + constructor(path: string | SymbolShapeType, opts?: SymbolOptions) + setPath(path: string | SymbolShapeType): void + setAnchor(anchor: Size): void + setRotation(rotation: number): void + setScale(scale: number): void + setStrokeWeight(strokeWeight: number): void + setStrokeColor(color: string): void + setStrokeOpacity(opacity: number): void + setFillOpacity(opacity: number): void + setFillColor(color: string): void + } + class Polyline implements Overlay { + constructor(points: Point[], opts?: PolylineOptions) + setPath(path: Point[]): void + getPath(): Point[] + setStrokeColor(color: string): void + getStrokeColor(): string + setFillColor(color: string): void + getFillColor(): string + setStrokeOpacity(opacity: number): void + getStrokeOpacity(): number + setFillOpacity(opacity: number): void + getFillOpacity(): number + setStrokeWeight(weight: number): void + getStrokeWeight(): number + setStrokeStyle(style: string): void + getStrokeStyle(): string + getBounds(): Bounds + enableEditing(): void + disableEditing(): void + enableMassClear(): void + disableMassClear(): void + setPointAt(index: number, point: Point): void + setPositionAt(index: number, point: Point): void + getMap(): Map + addEventListener(event: string, handler: Function): void + removeEventListener(event: string, handler: Function): void + onclick: (event: { type: string, target: any }) => void + ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onremove: (event: { type: string, target: any }) => void + onlineupdate: (event: { type: string, target: any }) => void + } + class GroundOverlay implements Overlay { + constructor(bounds: Bounds, opts?: GroundOverlayOptions) + setBounds(bounds: Bounds): void + getBounds(): Bounds + setOpacity(opcity: number): void + getOpacity(): number + setImageURL(url: string): void + getImageURL(): string + setDisplayOnMinLevel(level: number): void + getDisplayOnMinLevel(): number + setDispalyOnMaxLevel(level: number): void + getDispalyOnMaxLevel(): number + onclick: (event: { type: string, target: any }) => void + ondblclick: (event: { type: string, target: any }) => void + } + interface HotspotOptions { + text?: string + offsets?: number[] + userData?: any + minZoom?: number + maxZoom?: number + } + interface MapPanes { + floatPane?: HTMLElement + markerMouseTarget?: HTMLElement + floatShadow?: HTMLElement + labelPane?: HTMLElement + markerPane?: HTMLElement + markerShadow?: HTMLElement + mapPane?: HTMLElement + } +} + +declare const BMap_Symbol_SHAPE_CIRCLE: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_RECTANGLE: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_RHOMBUS: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_STAR: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_POINT: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_PLANE: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_CAMERA: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_WARNING: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_SMILE: BMap.SymbolShapeType +declare const BMap_Symbol_SHAPE_CLOCK: BMap.SymbolShapeType + + +declare const BMAP_ANIMATION_DROP: BMap.Animation +declare const BMAP_ANIMATION_BOUNCE: BMap.Animation + +declare const BMAP_POINT_SHAPE_CIRCLE: BMap.ShapeType +declare const APE_STAR: BMap.ShapeType +declare const APE_SQUARE: BMap.ShapeType +declare const APE_RHOMBUS: BMap.ShapeType +declare const APE_WATERDROP: BMap.ShapeType + +declare const BMAP_POINT_SIZE_TINY: BMap.SizeType +declare const BMAP_POINT_SIZE_SMALLER: BMap.SizeType +declare const BMAP_POINT_SIZE_SMALL: BMap.SizeType +declare const BMAP_POINT_SIZE_NORMAL: BMap.SizeType +declare const BMAP_POINT_SIZE_BIG: BMap.SizeType +declare const BMAP_POINT_SIZE_BIGGER: BMap.SizeType +declare const BMAP_POINT_SIZE_HUGE: BMap.SizeType \ No newline at end of file diff --git a/types/baidumap-web-sdk/baidumap.panorama.d.ts b/types/baidumap-web-sdk/baidumap.panorama.d.ts new file mode 100644 index 0000000000..f087732fb4 --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.panorama.d.ts @@ -0,0 +1,121 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// +/// +declare namespace BMap { + class Panorama { + constructor(container: string | HTMLElement, opts?: PanoramaOptions) + getLinks(): PanoramaLink[] + getId(): string + getPosition(): Point + getPov(): PanoramaPov + getZoom(): number + setId(id: string): void + setPosition(position: Point): void + setPov(pov: PanoramaPov): void + setZoom(zoom: number): void + enableScrollWheelZoom(): void + disableScrollWheelZoom(): void + show(): void + hide(): void + addOverlay(overlay: PanoramaLabel): void + removeOverlay(overlay: PanoramaLabel): void + getSceneType(): PanoramaSceneType + setOptions(opts?: PanoramaOptions): void + setPanoramaPOIType(): PanoramaPOIType + onposition_changed: () => void + onlinks_changed: () => void + onpov_changed: () => void + onzoom_changed: () => void + onscene_type_changed: () => void + } + + interface PanoramaOptions { + navigationControl?: boolean + linksControl?: boolean + indoorSceneSwitchControl?: boolean + albumsControl?: boolean + albumsControlOptions?: AlbumsControlOptions + } + interface PanoramaLink { + description: string + heading: string + id: string + } + interface PanoramaPov { + heading: number + pitch: number + } + class PanoramaService { + constructor() + getPanoramaById(id: string, callback: (data: PanoramaData) => void): void + getPanoramaByLocation(point: Point, radius?: number, callback?: (data: PanoramaData) => void): void + } + interface PanoramaData { + id: string + description: string + links: PanoramaLink[] + position: Point + tiles: PanoramaTileData + } + interface PanoramaTileData { + centerHeading: number + tileSize: Size + worldSize: Size + } + class PanoramaLabel { + constructor(content: string, opts?: PanoramaLabelOptions) + setPosition(position: Point): void + getPosition(): Point + getPov(): PanoramaPov + setContent(content: string): void + getContent(): string + show(): void + hide(): void + setAltitude(altitude: number): void + getAltitude(): number + addEventListener(event: string, handler: Function): void + removeEventListener(event: string, handler: Function): void + onclick: (event: { type: string, target: any }) => void + onmouseover: (event: { type: string, target: any }) => void + onmouseout: (event: { type: string, target: any }) => void + onremove: (event: { type: string, target: any }) => void + } + interface PanoramaLabelOptions { + position?: Point + altitude?: number + } + interface AlbumsControlOptions { + anchor?: ControlAnchor + offset?: Size + maxWidth?: number | string + imageHeight?: number + } + type PanoramaSceneType = string + type PanoramaPOIType = string +} +declare const BMAP_PANORAMA_INDOOR_SCENE: string +declare const BMAP_PANORAMA_STREET_SCENE: string + +declare const BMAP_PANORAMA_POI_HOTEL: string +declare const BMAP_PANORAMA_POI_CATERING: string +declare const BMAP_PANORAMA_POI_MOVIE: string +declare const BMAP_PANORAMA_POI_TRANSIT: string +declare const BMAP_PANORAMA_POI_INDOOR_SCENE: string +declare const BMAP_PANORAMA_POI_NONE: string diff --git a/types/baidumap-web-sdk/baidumap.rightmenu.d.ts b/types/baidumap-web-sdk/baidumap.rightmenu.d.ts new file mode 100644 index 0000000000..b760c73561 --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.rightmenu.d.ts @@ -0,0 +1,47 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// + +declare namespace BMap { + type ContextMenuIcon = string + interface MenuItemOptions { + width?: number + id?: string + iconUrl?: string + } + class MenuItem { + constructor(text: string, callback: (point: Point) => void, opts?: MenuItemOptions) + setText(text: string): void + setIcon(iconUrl: string): void + enable(): void + disable(): void + } + class ContextMenu { + constructor() + addItem(item: MenuItem): void + getItem(index: number): MenuItem + removeItem(item: MenuItem): void + addSeparator(): void + removeSeparator(index: number): void + onopen: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + onclose: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void + } +} +declare const BMAP_CONTEXT_MENU_ICON_ZOOMIN: string +declare const BMAP_CONTEXT_MENU_ICON_ZOOMOUT: string \ No newline at end of file diff --git a/types/baidumap-web-sdk/baidumap.service.d.ts b/types/baidumap-web-sdk/baidumap.service.d.ts new file mode 100644 index 0000000000..dbff0b7dfe --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.service.d.ts @@ -0,0 +1,432 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// +/// +declare namespace BMap { + class LocalSearch { + constructor(location: Map | Point | string, opts?: LocalSearchOptions) + search(keyword: string | Array, option?: Object): void + searchInBounds(keyword: string | Array, bounds: Bounds, option?: Object): void + searchNearby(keyword: string | Array, center: LocalResultPoi | string | Point, radius: number, option?: Object): void + getResults(): LocalResult | LocalResult[] + clearResults(): void + gotoPage(page: number): void + enableAutoViewport(): void + disableAutoViewport(): void + enableFirstResultSelection(): void + disableFirstResultSelection(): void + setLocation(location: Map | Point | string): void + setPageCapacity(capacity: number): void + getPageCapacity(): number + setSearchCompleteCallback(callback: (results: LocalResult | LocalResult[]) => void): void + setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void + setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void + setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void + getStatus(): ServiceStatusCode + } + type LineType = number + interface WalkingRouteResult { + city: string + getStart(): LocalResultPoi + getEnd(): LocalResultPoi + getNumPlans(): number + getPlan(i: number): RoutePlan + } + class BusLineSearch { + constructor(location: Map | Point | string, opts?: BusLineSearchOptions) + getBusList(keyword: string): void + getBusLine(busLstItem: BusListItem): void + clearResults(): void + enableAutoViewport(): void + disableAutoViewport(): void + setLocation(location: Map | Point | string): void + getStatus(): ServiceStatusCode + toString(): string + setGetBusListCompleteCallback(callback: (rs: BusListResult) => void): void + setGetBusLineCompleteCallback(callback: (rs: BusLine) => void): void + setBusListHtmlSetCallback(callback: (container: HTMLElement) => void): void + setBusLineHtmlSetCallback(callback: (container: HTMLElement) => void): void + setPolylinesSetCallback(callback: (ply: Polyline) => void): void + setMarkersSetCallback(callback: (markers: Marker[]) => void): void + } + interface LocalSearchOptions { + renderOptions?: RenderOptions + onMarkersSet?: (pois: LocalResultPoi[]) => void + onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void + onResultsHtmlSet?: (container: HTMLElement) => void + pageCapacity?: number + onSearchComplete?: (results: LocalResult[]) => void + } + class DrivingRoute { + constructor(location: Map | Point | string, opts?: DrivingRouteOptions) + search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi, opts?: Object): void + getResults(): DrivingRouteResult + clearResults(): void + enableAutoViewport(): void + disableAutoViewport(): void + setLocation(location: Map | Point | string): void + setPolicy(policy: DrivingPolicy): void + setSearchCompleteCallback(callback: (results: DrivingRouteResult) => void): void + setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void + setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void + setPolylinesSetCallback(callback: (routes: Route[]) => void): void + setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void + getStatus(): ServiceStatusCode + toString(): string + } + class Geocoder { + constructor() + getPoint(address: string, callback: (point: Point) => void, city: string): void + getLocation(point: Point, callback: (result: GeocoderResult) => void, opts?: LocationOptions): void + } + interface BusLineSearchOptions { + renderOptions?: RenderOptions + onGetBusListComplete?: (rs: BusListResult) => void + onGetBusLineComplete?: (rs: BusLine) => void + onBusListHtmlSet?: (container: HTMLElement) => void + onBusLineHtmlSet?: (container: HTMLElement) => void + onPolylinesSet?: (ply: Polyline) => void + onMarkersSet?: (sts: Marker[]) => void + } + interface CustomData { + geotableId: number + tags: string + filter: string + } + interface DrivingRouteOptions { + renderOptions?: RenderOptions + policy?: DrivingPolicy + onSearchComplete?: (results: DrivingRouteResult) => void + onMarkersSet?: (pois: LocalResultPoi[]) => void + onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void + onPolylinesSet?: (routes: Route[]) => void + onResultsHtmlSet?: (container: HTMLElement) => void + } + interface GeocoderResult { + point: Point + address: string + addressComponents: AddressComponent + surroundingPoi: LocalResultPoi[] + business: string + } + interface BusListResult { + keyword: string + city: string + moreResultsUrl: string + getNumBusList(): number + getBusListItem(i: number): BusListItem + } + interface RenderOptions { + map: Map + panel?: string | HTMLElement + selectFirstResult?: boolean + autoViewport?: boolean + highlightMode?: HighlightModes + } + type DrivingPolicy = number + interface AddressComponent { + streetNumber: string + street: string + district: string + city: string + province: string + } + interface BusLine { + name: string + startTime: string + endTime: string + company: string + getNumBusStations(): string + getBusStation(i: number): BusStation + getPath(): Point[] + getPolyline(): Polyline + } + interface LocalResult { + keyword: string + center: LocalResultPoi + radius: number + bounds: Bounds + city: string + moreResultsUrl: string + province: string + suggestions: string[] + getPoi(i: number): LocalResultPoi + getCurrentNumPois(): number + getNumPois(): number + getNumPages(): number + getPageIndex(): number + getCityList(): any[] + } + + interface DrivingRouteResult { + policy: DrivingPolicy + city: string + moreResultsUrl: string + taxiFare: TaxiFare + getStart(): LocalResultPoi + getEnd(): LocalResultPoi + getNumPlans(): number + getPlan(i: number): RoutePlan + } + interface LocationOptions { + poiRadius?: number + numPois?: number + } + interface BusListItem { + name: string + } + interface LocalResultPoi { + title: string + point: Point + url: string + address: string + city: string + phoneNumber: string + postcode: string + type: PoiType + isAccurate: boolean + province: string + tags: string[] + detailUrl: string + } + interface TaxiFare { + day: TaxiFareDetail + night: TaxiFareDetail + distance: number + remark: string + } + class LocalCity { + constructor(opts?: LocalCityOptions) + get(callback: (result: LocalCityResult) => void): void + } + interface BusStation { + name: string + position: Point + } + type PoiType = number + interface TaxiFareDetail { + initialFare: number + unitFare: number + totalFare: number + } + interface LocalCityOptions { + renderOptions?: RenderOptions + } + class Autocomplete { + constructor(opts?: AutocompleteOptions) + show(): void + hide(): void + setTypes(types: string[]): void + setLocation(location: string | Map | Point): void + search(keywords: string): void + getResults(): AutocompleteResult + setInputValue(keyword: string): void + dispose(): void + onconfirm: (event: { type: string, target: any, item: any }) => void + onhighlight: (event: { type: string, target: any, fromitem: any, toitem: any }) => void + } + class TransitRoute { + constructor(location: Map | Point | string, opts?: TransitRouteOptions) + search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi): void + getResults(): TransitRouteResult + clearResults(): void + enableAutoViewport(): void + disableAutoViewport(): void + setPageCapacity(capacity: number): void + setLocation(location: Map | Point | string): void + setPolicy(policy: TransitPolicy): void + setSearchCompleteCallback(callback: (results: TransitRouteResult) => void): void + setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void + setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void + setPolylinesSetCallback(callback: (lines: Line[], routes: Route[]) => void): void + setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void + getStatus(): ServiceStatusCode + toString(): string + } + interface RoutePlan { + getNumRoutes(): number + getRoute(i: number): Route + getDistance(format?: boolean): string | number + getDuration(format?: boolean): string | number + getDragPois(): LocalResultPoi[] + } + interface LocalCityResult { + center: Point + level: number + name: string + } + interface AutocompleteOptions { + location?: string | Map | Point + types?: string[] + onSearchComplete?: (result: AutocompleteResult) => void + input?: string | HTMLElement + } + interface TransitRouteOptions { + renderOptions?: RenderOptions + policy?: TransitPolicy + pageCapacity?: number + onSearchComplete?: (result: TransitRouteResult) => void + onMarkersSet?: (pois: LocalResultPoi[], transfers: LocalResultPoi[]) => void + onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void + onPolylinesSet?: (lines: Line[]) => void + onResultsHtmlSet?: (container: HTMLElement) => void + } + interface Route { + getNumRoutes(): number + getStep(i: number): Step + getDistance(format?: boolean): string | number + getIndex(): number + getPolyline(): Polyline + getPoints(): Point[] + getPath(): Point[] + getRouteType(): RouteType + } + class TrafficControl { + constructor() + setPanelOffset(offset: Size): void + show(): void + hide(): void + } + interface AutocompleteResultPoi { + province: string + City: string//wtf + district: string + street: string + streetNumber: string + business: string + } + type TransitPolicy = number + type RouteType = number + class Geolocation { + constructor() + getCurrentPosition(callback: (result: GeolocationResult) => void, opts?: PositionOptions): void + getStatus(): ServiceStatusCode + } + interface AutocompleteResult { + keyword: string + getPoi(i: number): AutocompleteResultPoi + getNumPois(): number + } + interface TransitRouteResult { + policy: TransitPolicy + city: string + moreResultsUrl: string + getStart(): LocalResultPoi + getEnd(): LocalResultPoi + getNumPlans(): number + getPlan(i: number): TransitRoutePlan + } + interface Step { + getPoint(): Point + getPosition(): Point + getIndex(): number + getDescription(includeHtml: boolean): string + getDistance(format?: boolean): string | number + } + interface GeolocationResult { + point: Point + accuracy: number + } + class Boundary { + constructor() + get(name: string, callback: (result: string[]) => void): void + } + interface TransitRoutePlan { + getNumLines(): number + getLine(i: number): Line + getNumRoutes(): number + getRoute(i: number): Route + getDistance(format?: boolean): string | number + getDuration(format?: boolean): string | number + getDescription(includeHtml: boolean): string + } + class WalkingRoute { + constructor(location: Map | Point | string, opts?: WalkingRouteOptions) + search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi): void + getResults(): WalkingRouteResult + clearResults(): void + enableAutoViewport(): void + disableAutoViewport(): void + setLocation(location: Map | Point | string): void + setSearchCompleteCallback(callback: (result: WalkingRouteResult) => void): void + setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void + setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void + setPolylinesSetCallback(callback: (routes: Route[]) => void): void + setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void + getStatus(): ServiceStatusCode + toString(): string + } + interface PositionOptions { + enableHighAccuracy?: boolean + timeout?: number + maximumAge?: number + } + interface Line { + title: string + type: LineType + getNumViaStops(): number + getGetOnStop(): LocalResultPoi + getGetOffStop(): LocalResultPoi + getPoints(): Point[] + getPath(): Point[] + getPolyline(): Polyline + getDistance(format?: boolean): string | number + } + interface WalkingRouteOptions { + renderOptions?: RenderOptions, + onSearchComplete?: (result: WalkingRouteResult) => void, + onMarkersSet?: (pois: LocalResultPoi[]) => void, + onPolylinesSet?: (routes: Route[]) => void, + onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void, + onResultsHtmlSet?: (container: HTMLElement) => void + } + type HighlightModes = number + type ServiceStatusCode = number +} + +declare const BMAP_LINE_TYPE_BUS: BMap.LineType +declare const BMAP_LINE_TYPE_SUBWAY: BMap.LineType +declare const BMAP_LINE_TYPE_FERRY: BMap.LineType + +declare const BMAP_DRIVING_POLICY_LEAST_TIME: BMap.DrivingPolicy +declare const BMAP_DRIVING_POLICY_LEAST_DISTANCE: BMap.DrivingPolicy +declare const BMAP_DRIVING_POLICY_AVOID_HIGHWAYS: BMap.DrivingPolicy + +declare const BMAP_POI_TYPE_NORMAL: BMap.PoiType +declare const BMAP_POI_TYPE_BUSSTOP: BMap.PoiType +declare const BMAP_POI_TYPE_SUBSTOP: BMap.PoiType + + +declare const BMAP_TRANSIT_POLICY_LEAST_TIME: BMap.TransitPolicy +declare const BMAP_TRANSIT_POLICY_LEAST_TRANSFER: BMap.TransitPolicy +declare const BMAP_TRANSIT_POLICY_LEAST_WALKING: BMap.TransitPolicy +declare const BMAP_TRANSIT_POLICY_AVOID_SUBWAYS: BMap.TransitPolicy + +declare const BMAP_ROUTE_TYPE_DRIVING: BMap.RouteType +declare const BMAP_ROUTE_TYPE_WALKING: BMap.RouteType + +declare const BMAP_HIGHLIGHT_STEP: BMap.HighlightModes +declare const BMAP_HIGHLIGHT_ROUTE: BMap.HighlightModes + +declare const BMAP_STATUS_SUCCESS: BMap.ServiceStatusCode +declare const BMAP_STATUS_CITY_LIST: BMap.ServiceStatusCode +declare const BMAP_STATUS_UNKNOWN_LOCATION: BMap.ServiceStatusCode +declare const BMAP_STATUS_UNKNOWN_ROUTE: BMap.ServiceStatusCode +declare const BMAP_STATUS_INVALID_KEY: BMap.ServiceStatusCode +declare const BMAP_STATUS_INVALID_REQUEST: BMap.ServiceStatusCode \ No newline at end of file diff --git a/types/baidumap-web-sdk/baidumap.tools.d.ts b/types/baidumap-web-sdk/baidumap.tools.d.ts new file mode 100644 index 0000000000..c1bc6bf929 --- /dev/null +++ b/types/baidumap-web-sdk/baidumap.tools.d.ts @@ -0,0 +1,61 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// +/// +/// +declare namespace BMap { + class PushpinTool { + constructor(map: Map, opts?: PushpinToolOptions) + open(): boolean + close(): boolean + setIcon(icon: Icon): Icon + getIcon(): Icon + setCursor(cursor: string): string + getCursor(): string + toString(): string + onmarkend: (event: { type: string, target: any, marker: Marker }) => void + } + interface PushpinToolOptions { + icon?: Icon + cursor?: string + followText?: string + } + class DistanceTool { + constructor(map: Map) + open(): boolean + close(): void + toString(): string + ondrawend: (event: { type: string, target: any, points: Point[], polylines: Polyline[], distance: number }) => void + } + class DragAndZoomTool { + constructor(map: Map, opts?: DragAndZoomToolOptions) + open(): boolean + close(): void + toString(): string + ondrawend: (event: { type: string, target: any, bounds: Bounds[] }) => void + } + interface DragAndZoomToolOptions { + zoomType?: ZoomType, + autoClose?: boolean, + followText?: string + } + type ZoomType = number +} +declare const BMAP_ZOOM_IN: BMap.ZoomType +declare const BMAP_ZOOM_OUT: BMap.ZoomType \ No newline at end of file diff --git a/types/baidumap-web-sdk/index.d.ts b/types/baidumap-web-sdk/index.d.ts new file mode 100644 index 0000000000..ac8f27c87b --- /dev/null +++ b/types/baidumap-web-sdk/index.d.ts @@ -0,0 +1,28 @@ +// Type definitions for BaiduMap v2.0 +// Project: http://lbsyun.baidu.com/index.php?title=jspopular +// Definitions by: Codemonk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* ***************************************************************************** +Copyright [Codemonk] [Codemonk@live.cn] + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +***************************************************************************** */ + +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// \ No newline at end of file diff --git a/types/baidumap-web-sdk/tsconfig.json b/types/baidumap-web-sdk/tsconfig.json new file mode 100644 index 0000000000..6af444e434 --- /dev/null +++ b/types/baidumap-web-sdk/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "baidumap-web-sdk-tests.ts" + ] +} diff --git a/types/baidumap-web-sdk/tslint.json b/types/baidumap-web-sdk/tslint.json new file mode 100644 index 0000000000..aab43caa1d --- /dev/null +++ b/types/baidumap-web-sdk/tslint.json @@ -0,0 +1,15 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // All are TODOs + "eofline": false, + "comment-format": false, + "dt-header": false, + "max-line-length": false, + "member-access": false, + "no-namespace": false, + "no-useless-files": false, + "no-var": false, + "semicolon": false + } +} diff --git a/types/bardjs/index.d.ts b/types/bardjs/index.d.ts index d8a5bfd9f0..5f2a5a1863 100644 --- a/types/bardjs/index.d.ts +++ b/types/bardjs/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/wardbell/bardjs // Definitions by: Andrew Archibald // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/basic-auth/basic-auth-tests.ts b/types/basic-auth/basic-auth-tests.ts index 1fab9c10e2..e416afe352 100644 --- a/types/basic-auth/basic-auth-tests.ts +++ b/types/basic-auth/basic-auth-tests.ts @@ -1,4 +1,12 @@ - +import {IncomingMessage} from 'http'; import auth = require('basic-auth'); -auth(null); +const loginData = auth(undefined! as IncomingMessage); +if (loginData) { + const {name, pass} = loginData; +} + +const parsed = auth.parse('Basic QmFzaWM6QXV0aA=='); +if (parsed) { + const {name, pass} = parsed; +} diff --git a/types/basic-auth/index.d.ts b/types/basic-auth/index.d.ts index 51ada3b0c7..276b5b8af6 100644 --- a/types/basic-auth/index.d.ts +++ b/types/basic-auth/index.d.ts @@ -1,19 +1,25 @@ -// Type definitions for basic-auth +// Type definitions for basic-auth 1.1 // Project: https://github.com/jshttp/basic-auth -// Definitions by: Clément Bourgeois +// Definitions by: Clément Bourgeois , Vesa Poikajärvi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// import * as http from 'http'; -declare function auth(req: http.IncomingMessage): auth.BasicAuthResult; +// See https://github.com/jshttp/basic-auth/blob/v1.1.0/index.js#L49 +declare function auth(req: http.IncomingMessage): auth.BasicAuthResult | undefined; declare namespace auth { interface BasicAuthResult { name: string; pass: string; } + + /** + * Parse basic auth to object. + */ + function parse(authorizationHeader: string): auth.BasicAuthResult | undefined; } export = auth; diff --git a/types/basic-auth/tsconfig.json b/types/basic-auth/tsconfig.json index b9f77df9d2..8d9222de2c 100644 --- a/types/basic-auth/tsconfig.json +++ b/types/basic-auth/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/basic-auth/tslint.json b/types/basic-auth/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/basic-auth/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/bem-cn/bem-cn-tests.ts b/types/bem-cn/bem-cn-tests.ts new file mode 100644 index 0000000000..d57e138777 --- /dev/null +++ b/types/bem-cn/bem-cn-tests.ts @@ -0,0 +1,46 @@ +import * as block from "bem-cn"; + +// expected 'block' +block("block")(); + +// expected 'block__elem' +block("block")("elem")(); + +// expected 'block__elem block__elem_disabled block__elem_size_small' +block("block")("elem", { disabled: true, size: 'small' })(); + +// expected 'block block_disabled' +block("block")({ disabled: true})(); + +// expected 'block mix' +block("block").mix("mix"); + +// expected 'block mix mix2' +block("block").mix(["mix", "mix2"]); + +// expected 'block is-hidden' +block("block").state({ hidden: true }); + +// expected 'block' +block("block").state({ hidden: false }); + +// expected 'block is-hidden is-error' +block("block").state({ hidden: true, error: true }); + +// expected 'block is-loading' +block("block").is({ loading: true }); + +// expected 'block has-content' +block("block").has({ content: true }); + +block.setup({ + el: '~~', + mod: '--', + modValue: '-' +}); + +// expected 'block~~elem' +block("block")("elem"); + +// expected 'block block--mod-value' +block("block")({ mod: "value"}); diff --git a/types/bem-cn/index.d.ts b/types/bem-cn/index.d.ts new file mode 100644 index 0000000000..5a78df4435 --- /dev/null +++ b/types/bem-cn/index.d.ts @@ -0,0 +1,41 @@ +// Type definitions for bem-cn 2.1 +// Project: https://github.com/albburtsev/bem-cn +// Definitions by: Vitaly Selkin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type StateFn = (states: { [key: string]: boolean }) => Inner; + +interface Modifications { + [key: string]: (string | boolean); +} + +interface Block { + (name: string): Inner; + + reset(): void; + setup(settings?: Settings): void; +} + +interface Inner { + (elem: string | Modifications): Inner; + (elem: string, mods: Modifications): Inner; + (): string; + + mix(mixes: string | string[]): Inner; + has: StateFn; + state: StateFn; + is: StateFn; + toString(): string; + split(separator: string, limit?: number): string[]; +} + +interface Settings { + ns?: string; + el?: string; + mod?: string; + modValue?: string; + classMap?: { [className: string]: string } | null; +} + +declare const block: Block; +export = block; diff --git a/types/bem-cn/tsconfig.json b/types/bem-cn/tsconfig.json new file mode 100644 index 0000000000..a4c2cd86cb --- /dev/null +++ b/types/bem-cn/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", + "bem-cn-tests.ts" + ] +} diff --git a/types/bem-cn/tslint.json b/types/bem-cn/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/bem-cn/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/big-integer/big-integer-tests.ts b/types/big-integer/big-integer-tests.ts deleted file mode 100644 index 62f234b371..0000000000 --- a/types/big-integer/big-integer-tests.ts +++ /dev/null @@ -1,118 +0,0 @@ - - -// constructor tests -var noArgument = bigInt(), - numberArgument = bigInt( 93 ), - stringArgument = bigInt( "75643564363473453456342378564387956906736546456235345" ), - baseArgumentInt = bigInt( "101010", 2 ), - baseArgumentStr = bigInt( "101010", "2" ), - baseArgumentBi = bigInt( "101010", bigInt( 2 ) ), - bigIntArgument = bigInt( noArgument ); - -// method tests -var x = bigInt(), - isBigInteger: BigInteger, - isNumber: number, - isBoolean: boolean, - isString: string, - isDivmod: { - quotient: BigInteger; - remainder: BigInteger; - }; - -isBigInteger = x.abs(); - -isBigInteger = x.add( 0 ); -isBigInteger = x.add( x ); -isBigInteger = x.add( "100" ); - -isNumber = x.compare( 0 ); -isNumber = x.compare( x ); -isNumber = x.compare( "100" ); - -isNumber = x.compareAbs( 0 ); -isNumber = x.compareAbs( x ); -isNumber = x.compareAbs( "100" ); - -isBigInteger = x.divide( 0 ); -isBigInteger = x.divide( x ); -isBigInteger = x.divide( "100" ); - -isDivmod = x.divmod( 0 ); -isDivmod = x.divmod( x ); -isDivmod = x.divmod( "100" ); - -isBoolean = x.equals( 0 ); -isBoolean = x.equals( x ); -isBoolean = x.equals( "100" ); - -isBoolean = x.greater( 0 ); -isBoolean = x.greater( x ); -isBoolean = x.greater( "100" ); - -isBoolean = x.greaterOrEquals( 0 ); -isBoolean = x.greaterOrEquals( x ); -isBoolean = x.greaterOrEquals( "100" ); - -isBoolean = x.isEven(); - -isBoolean = x.isNegative(); - -isBoolean = x.isOdd(); - -isBoolean = x.isPositive(); - -isBoolean = x.lesser( 0 ); -isBoolean = x.lesser( x ); -isBoolean = x.lesser( "100" ); - -isBoolean = x.lesserOrEquals( 0 ); -isBoolean = x.lesserOrEquals( x ); -isBoolean = x.lesserOrEquals( "100" ); - -isBigInteger = x.minus( 0 ); -isBigInteger = x.minus( x ); -isBigInteger = x.minus( "100" ); - -isBigInteger = x.mod( 0 ); -isBigInteger = x.mod( x ); -isBigInteger = x.mod( "100" ); - -isBigInteger = x.multiply( 0 ); -isBigInteger = x.multiply( x ); -isBigInteger = x.multiply( "100" ); - -isBigInteger = x.next(); - -isBoolean = x.notEquals( 0 ); -isBoolean = x.notEquals( x ); -isBoolean = x.notEquals( "100" ); - -isBigInteger = x.over( 0 ); -isBigInteger = x.over( x ); -isBigInteger = x.over( "100" ); - -isBigInteger = x.plus( 0 ); -isBigInteger = x.plus( x ); -isBigInteger = x.plus( "100" ); - -isBigInteger = x.pow( 0 ); -isBigInteger = x.pow( x ); -isBigInteger = x.pow( "100" ); - -isBigInteger = x.prev(); - -isBigInteger = x.subtract( 0 ); -isBigInteger = x.subtract( x ); -isBigInteger = x.subtract( "100" ); - -isBigInteger = x.times( 0 ); -isBigInteger = x.times( x ); -isBigInteger = x.times( "100" ); - -isNumber = x.toJSNumber(); - -isString = x.toString(); -isString = x.toString(36); - -isNumber = x.valueOf(); diff --git a/types/big-integer/index.d.ts b/types/big-integer/index.d.ts deleted file mode 100644 index f8ca2b488c..0000000000 --- a/types/big-integer/index.d.ts +++ /dev/null @@ -1,226 +0,0 @@ -// Type definitions for BigInteger.js -// Project: https://github.com/peterolson/BigInteger.js -// Definitions by: Ingo Bürk , Roel van Uden -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface BigInteger { - /** Returns the absolute value of a bigInt. */ - abs(): BigInteger; - - /** Performs addition */ - add( number: number ): BigInteger; - /** Performs addition */ - add( number: BigInteger ): BigInteger; - /** Performs addition */ - add( number: string ): BigInteger; - - /** Alias for the add method. */ - plus( number: number ): BigInteger; - /** Alias for the add method. */ - plus( number: BigInteger ): BigInteger; - /** Alias for the add method. */ - plus( number: string ): BigInteger; - - /** Alias for the subtract method. */ - minus( number: number ): BigInteger; - /** Alias for the subtract method. */ - minus( number: BigInteger ): BigInteger; - /** Alias for the subtract method. */ - minus( number: string ): BigInteger; - - /** Performs subtraction. */ - subtract( number: number ): BigInteger; - /** Performs subtraction. */ - subtract( number: BigInteger ): BigInteger; - /** Performs subtraction. */ - subtract( number: string ): BigInteger; - - /** Performs multiplication. */ - multiply( number: number ): BigInteger; - /** Performs multiplication. */ - multiply( number: BigInteger ): BigInteger; - /** Performs multiplication. */ - multiply( number: string ): BigInteger; - - /** Alias for the multiply method. */ - times( number: number ): BigInteger; - /** Alias for the multiply method. */ - times( number: BigInteger ): BigInteger; - /** Alias for the multiply method. */ - times( number: string ): BigInteger; - - /** Performs integer division, disregarding the remainder. */ - divide( number: number ): BigInteger; - /** Performs integer division, disregarding the remainder. */ - divide( number: BigInteger ): BigInteger; - /** Performs integer division, disregarding the remainder. */ - divide( number: string ): BigInteger; - - /** Alias for the divide method. */ - over( number: number ): BigInteger; - /** Alias for the divide method. */ - over( number: BigInteger ): BigInteger; - /** Alias for the divide method. */ - over( number: string ): BigInteger; - - /** Performs exponentiation. If the exponent is less than 0, pow returns 0. bigInt.zero.pow(0) returns 1. */ - pow( number: number ): BigInteger; - /** Performs exponentiation. If the exponent is less than 0, pow returns 0. bigInt.zero.pow(0) returns 1. */ - pow( number: BigInteger ): BigInteger; - /** Performs exponentiation. If the exponent is less than 0, pow returns 0. bigInt.zero.pow(0) returns 1. */ - pow( number: string ): BigInteger; - - /** Adds one to the number. */ - next(): BigInteger; - - /** Subtracts one from the number. */ - prev(): BigInteger; - - /** Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. */ - mod( number: number ): BigInteger; - /** Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. */ - mod( number: BigInteger ): BigInteger; - /** Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. */ - mod( number: string ): BigInteger; - - /** Performs division and returns an object with two properties: quotient and remainder. The sign of the remainder will match the sign of the dividend. */ - divmod( number: number ): { quotient: BigInteger; remainder: BigInteger }; - /** Performs division and returns an object with two properties: quotient and remainder. The sign of the remainder will match the sign of the dividend. */ - divmod( number: BigInteger ): { quotient: BigInteger; remainder: BigInteger }; - /** Performs division and returns an object with two properties: quotient and remainder. The sign of the remainder will match the sign of the dividend. */ - divmod( number: string ): { quotient: BigInteger; remainder: BigInteger }; - - /** Checks if the first number is greater than the second. */ - greater( number: number ): boolean; - /** Checks if the first number is greater than the second. */ - greater( number: BigInteger ): boolean; - /** Checks if the first number is greater than the second. */ - greater( number: string ): boolean; - - /** Checks if the first number is greater than or equal to the second. */ - greaterOrEquals( number: number ): boolean; - /** Checks if the first number is greater than or equal to the second. */ - greaterOrEquals( number: BigInteger ): boolean; - /** Checks if the first number is greater than or equal to the second. */ - greaterOrEquals( number: string ): boolean; - - /** Checks if the first number is lesser than the second. */ - lesser( number: number ): boolean; - /** Checks if the first number is lesser than the second. */ - lesser( number: BigInteger ): boolean; - /** Checks if the first number is lesser than the second. */ - lesser( number: string ): boolean; - - /** Checks if the first number is less than or equal to the second. */ - lesserOrEquals( number: number ): boolean; - /** Checks if the first number is less than or equal to the second. */ - lesserOrEquals( number: BigInteger ): boolean; - /** Checks if the first number is less than or equal to the second. */ - lesserOrEquals( number: string ): boolean; - - /** Returns true if the number is even, false otherwise. */ - isEven(): boolean; - - /** Returns true if the number is odd, false otherwise. */ - isOdd(): boolean; - - /** Return true if the number is positive, false otherwise. Returns true for 0 and false for -0. */ - isPositive(): boolean; - - /** Returns true if the number is negative, false otherwise. Returns false for 0 and true for -0. */ - isNegative(): boolean; - - /** - * Performs a comparison between two numbers. If the numbers are equal, it returns 0. - * If the first number is greater, it returns 1. If the first number is lesser, it returns -1. - */ - compare( number: number ): number; - /** - * Performs a comparison between two numbers. If the numbers are equal, it returns 0. - * If the first number is greater, it returns 1. If the first number is lesser, it returns -1. - */ - compare( number: BigInteger ): number; - /** - * Performs a comparison between two numbers. If the numbers are equal, it returns 0. - * If the first number is greater, it returns 1. If the first number is lesser, it returns -1. - */ - compare( number: string ): number; - - /** Performs a comparison between the absolute value of two numbers. */ - compareAbs( number: number ): number; - /** Performs a comparison between the absolute value of two numbers. */ - compareAbs( number: BigInteger ): number; - /** Performs a comparison between the absolute value of two numbers. */ - compareAbs( number: string ): number; - - /** Checks if two numbers are equal. */ - equals( number: number ): boolean; - /** Checks if two numbers are equal. */ - equals( number: BigInteger ): boolean; - /** Checks if two numbers are equal. */ - equals( number: string ): boolean; - - /** Checks if two numbers are not equal. */ - notEquals( number: number ): boolean; - /** Checks if two numbers are not equal. */ - notEquals( number: BigInteger ): boolean; - /** Checks if two numbers are not equal. */ - notEquals( number: string ): boolean; - - /** Performs the bitwise AND operation. */ - and( number: number ): BigInteger; - /** Performs the bitwise AND operation. */ - and( number: BigInteger ): BigInteger; - /** Performs the bitwise AND operation. */ - and( number: string ): BigInteger; - - /** Performs the bitwise NOT operation. */ - not(): BigInteger; - - /** Performs the bitwise OR operation. */ - or( number: number ): BigInteger; - /** Performs the bitwise OR operation. */ - or( number: BigInteger ): BigInteger; - /** Performs the bitwise OR operation. */ - or( number: string ): BigInteger; - - /** Performs the bitwise XOR operation. */ - xor( number: number ): BigInteger; - /** Performs the bitwise XOR operation. */ - xor( number: BigInteger ): BigInteger; - /** Performs the bitwise XOR operation. */ - xor( number: string ): BigInteger; - - /** Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range. */ - toJSNumber(): number; - - /** Converts a bigInt to a string. */ - toString( radix?: number ): string; - - /** Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion. */ - valueOf(): number; -} - -interface BigIntegerStatic { - /** Equivalent to bigInt(1) */ - one: BigInteger; - /** Equivalent to bigInt(0) */ - zero: BigInteger; - /** Equivalent to bigInt(-1) */ - minusOne: BigInteger; - - /** Equivalent to bigInt(0) */ - (): BigInteger; - /** Parse a Javascript number into a bigInt */ - ( number: number ): BigInteger; - /** Parse a string into a bigInt */ - ( string: string, base?: string | number | BigInteger): BigInteger; - /** no-op */ - ( bigInt: BigInteger ): BigInteger; -} - -declare var bigInt: BigIntegerStatic; - -declare module "big-integer" { - export = bigInt; -} diff --git a/types/bittorrent-protocol/index.d.ts b/types/bittorrent-protocol/index.d.ts index b5ef1a4a44..7c205edc33 100644 --- a/types/bittorrent-protocol/index.d.ts +++ b/types/bittorrent-protocol/index.d.ts @@ -81,7 +81,7 @@ declare namespace BittorrentProtocol { // TODO: bitfield is a bitfield instance on(event: 'bitfield', listener: (bitfield: any) => void): this; - on(event: string | 'keep-alive' | 'choke' | 'unchoke' | 'interested' | 'uninterested' | 'timeout', listener: () => void): this; + on(event: 'keep-alive' | 'choke' | 'unchoke' | 'interested' | 'uninterested' | 'timeout', listener: () => void): this; on(event: 'upload' | 'have' | 'download' | 'port', listener: (length: number) => void): this; on(event: 'handshake', listener: (infoHash: string, peerId: string, extensions: Extension[]) => void): this; on(event: 'request', listener: (index: number, offset: number, length: number, respond: () => void) => void): this; @@ -89,6 +89,7 @@ declare namespace BittorrentProtocol { on(event: 'cancel', listener: (index: number, offset: number, length: number) => void): this; on(event: 'extended', listener: (ext: 'handshake' | string, buf: any) => void): void; on(event: 'unknownmessage', listener: (buffer: Buffer) => void): this; + on(event: string, listener: (...args: any[]) => void): this; } } diff --git a/types/blob-util/blob-util-tests.ts b/types/blob-util/blob-util-tests.ts new file mode 100644 index 0000000000..af860a7ee1 --- /dev/null +++ b/types/blob-util/blob-util-tests.ts @@ -0,0 +1,17 @@ +import * as blobUtil from 'blob-util'; + +const testBlob = new Blob(['abcd']); + +blobUtil.base64StringToBlob('abcd'); // $ExpectType Promise +blobUtil.createObjectURL(testBlob); // $ExpectType string +blobUtil.imgSrcToBlob('test.jpg'); // $ExpectType Promise +blobUtil.createBlob(['abcd']); // $ExpectType Blob +blobUtil.arrayBufferToBlob(new ArrayBuffer(0)); // $ExpectType Promise +blobUtil.binaryStringToBlob('0101'); // $ExpectType Promise +blobUtil.blobToArrayBuffer(testBlob); // $ExpectType Promise +blobUtil.blobToBase64String(testBlob); // $ExpectType Promise +blobUtil.blobToBinaryString(testBlob); // $ExpectType Promise +blobUtil.canvasToBlob(new HTMLCanvasElement()); // $ExpectType Promise +blobUtil.dataURLToBlob('data:abcd'); // $ExpectType Promise +blobUtil.imgSrcToDataURL('test.jpg'); // $ExpectType Promise +blobUtil.revokeObjectURL('blob:example'); // $ExpectType void diff --git a/types/blob-util/index.d.ts b/types/blob-util/index.d.ts new file mode 100644 index 0000000000..ce99c3d893 --- /dev/null +++ b/types/blob-util/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for blob-util 1.2 +// Project: https://github.com/nolanlawson/blob-util#readme +// Definitions by: Max Battcher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +export function createBlob(parts: any[], options?: { type: string }): Blob; +export function createObjectURL(blob: Blob): string; +export function revokeObjectURL(url: string): void; +export function blobToBinaryString(blob: Blob): Promise; +export function binaryStringToBlob(binary: string, type?: string): Promise; +export function blobToBase64String(blob: Blob): Promise; +export function base64StringToBlob(base64: string, type?: string): Promise; +export function dataURLToBlob(dataURL: string): Promise; +export function imgSrcToDataURL(src: string, type?: string, crossOrigin?: string): Promise; +export function canvasToBlob(canvas: HTMLCanvasElement, type?: string): Promise; +export function imgSrcToBlob(src: string, type?: string, crossOrigin?: string): Promise; +export function arrayBufferToBlob(arrayBuff: ArrayBuffer, type?: string): Promise; +export function blobToArrayBuffer(blob: Blob): Promise; diff --git a/types/blob-util/tsconfig.json b/types/blob-util/tsconfig.json new file mode 100644 index 0000000000..f34519775d --- /dev/null +++ b/types/blob-util/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "blob-util-tests.ts" + ] +} diff --git a/types/blob-util/tslint.json b/types/blob-util/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/blob-util/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/blue-tape/index.d.ts b/types/blue-tape/index.d.ts index 133968a165..c2d2d50ab5 100644 --- a/types/blue-tape/index.d.ts +++ b/types/blue-tape/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/spion/blue-tape // Definitions by: Haoqun Jiang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bluebird-global/index.d.ts b/types/bluebird-global/index.d.ts index 835bc59c31..c0e220ce07 100644 --- a/types/bluebird-global/index.d.ts +++ b/types/bluebird-global/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/petkaantonov/bluebird // Definitions by: d-ph // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /* * 1. Why use `bluebird-global` instead of `bluebird`? @@ -117,19 +118,19 @@ declare global { * * @todo Duplication of code is never ideal. See whether there's a better way of achieving this. */ - catch(predicate: (error: any) => boolean, onReject: (error: any) => T | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - catch(predicate: (error: any) => boolean, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; - catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => T | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable): Bluebird; - catch(predicate: Object, onReject: (error: any) => T | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - catch(predicate: Object, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; + catch(predicate: (error: any) => boolean, onReject: (error: any) => T | PromiseLike | void | PromiseLike): Bluebird; + catch(predicate: (error: any) => boolean, onReject: (error: any) => U | PromiseLike): Bluebird; + catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => T | PromiseLike | void | PromiseLike): Bluebird; + catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | PromiseLike): Bluebird; + catch(predicate: Object, onReject: (error: any) => T | PromiseLike | void | PromiseLike): Bluebird; + catch(predicate: Object, onReject: (error: any) => U | PromiseLike): Bluebird; } /* * Patch all static methods and the constructor */ interface PromiseConstructor { - new (callback: (resolve: (thenableOrResult?: T | Bluebird.Thenable) => void, reject: (error?: any) => void, onCancel?: (callback: () => void) => void) => void): Promise; + new (callback: (resolve: (thenableOrResult?: T | PromiseLike) => void, reject: (error?: any) => void, onCancel?: (callback: () => void) => void) => void): Promise; // all: typeof Bluebird.all; any: typeof Bluebird.any; diff --git a/types/bluebird-retry/index.d.ts b/types/bluebird-retry/index.d.ts index 63adc1476d..97d756524b 100644 --- a/types/bluebird-retry/index.d.ts +++ b/types/bluebird-retry/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jut-io/bluebird-retry // Definitions by: Pascal Vomhoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts index b9fc8d0cef..8aef9daa66 100644 --- a/types/bluebird/bluebird-tests.ts +++ b/types/bluebird/bluebird-tests.ts @@ -361,6 +361,46 @@ fooProm = fooProm.catch(CustomError, reason => { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +{ + class CustomError1 extends Error {} + class CustomError2 extends Error {} + class CustomError3 extends Error {} + class CustomError4 extends Error {} + class CustomError5 extends Error {} + + fooProm = fooProm.catch(CustomError1, error => {}); + fooProm = fooProm.catch(CustomError1, CustomError2, error => {}); + fooProm = fooProm.catch(CustomError1, CustomError2, CustomError3, error => {}); + fooProm = fooProm.catch(CustomError1, CustomError2, CustomError3, CustomError4, error => {}); + fooProm = fooProm.catch(CustomError1, CustomError2, CustomError3, CustomError4, CustomError5, error => {}); + + const booPredicate1 = (error: CustomError1) => true; + const booPredicate2 = (error: [number]) => true; + const booPredicate3 = (error: string) => true; + const booPredicate4 = (error: Object) => true; + const booPredicate5 = (error: any) => true; + + fooProm = fooProm.catch(booPredicate1, error => {}); + fooProm = fooProm.catch(booPredicate1, booPredicate2, error => {}); + fooProm = fooProm.catch(booPredicate1, booPredicate2, booPredicate3, error => {}); + fooProm = fooProm.catch(booPredicate1, booPredicate2, booPredicate3, booPredicate4, error => {}); + fooProm = fooProm.catch(booPredicate1, booPredicate2, booPredicate3, booPredicate4, booPredicate5, error => {}); + + const booObject1 = new CustomError1(); + const booObject2 = [400, 500]; + const booObject3 = ["Error1", "Error2"]; + const booObject4 = {code: 400}; + const booObject5: any = null; + + fooProm = fooProm.catch(booObject1, error => {}); + fooProm = fooProm.catch(booObject1, booObject2, error => {}); + fooProm = fooProm.catch(booObject1, booObject2, booObject3, error => {}); + fooProm = fooProm.catch(booObject1, booObject2, booObject3, booObject4, error => {}); + fooProm = fooProm.catch(booObject1, booObject2, booObject3, booObject4, booObject5, error => {}); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + barProm = fooProm.error((reason: any) => { return bar; }); @@ -536,7 +576,6 @@ barProm = fooArrProm.spread((one: Foo, two: Bar, twotwo: Foo) => { //TODO fix collection inference barArrProm = fooProm.all(); -objProm = fooProm.props(); fooInspectionPromise = fooProm.reflect(); barProm = fooProm.any(); barArrProm = fooProm.some(num); @@ -544,6 +583,17 @@ barProm = fooProm.race(); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +var propsValue: { num: number, str: string }; +Promise.resolve({ num: 1, str: Promise.resolve('a') }).props().then(val => { propsValue = val }); +Promise.props({ num: 1, str: Promise.resolve('a') }).then(val => { propsValue = val }); +Promise.props(Promise.props({ num: 1, str: Promise.resolve('a') })).then(val => { propsValue = val }); + +var propsMapValue: Map; +Promise.resolve(new Map>()).props().then(val => { propsMapValue = val }); +Promise.props(new Map>()).then(val => { propsMapValue = val }); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Promise.all([fooProm, barProm]).then(result => { result[0].foo(); result[1].bar(); diff --git a/types/bluebird/index.d.ts b/types/bluebird/index.d.ts index cceb0ebc54..844dad53d4 100644 --- a/types/bluebird/index.d.ts +++ b/types/bluebird/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/petkaantonov/bluebird // Definitions by: Leonard Hecker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /*! * The code following this comment originates from: @@ -34,30 +35,29 @@ * THE SOFTWARE. */ -declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection { +declare class Bluebird implements PromiseLike, Bluebird.Inspection { /** * Create a new promise. The passed in function will receive functions `resolve` and `reject` as its arguments which can be called to seal the fate of the created promise. * If promise cancellation is enabled, passed in function will receive one more function argument `onCancel` that allows to register an optional cancellation callback. */ - constructor(callback: (resolve: (thenableOrResult?: R | Bluebird.Thenable) => void, reject: (error?: any) => void, onCancel?: (callback: () => void) => void) => void); + constructor(callback: (resolve: (thenableOrResult?: R | PromiseLike) => void, reject: (error?: any) => void, onCancel?: (callback: () => void) => void) => void); /** * Promises/A+ `.then()`. Returns a new promise chained from this promise. The new promise will be rejected or resolved dedefer on the passed `fulfilledHandler`, `rejectedHandler` and the state of this promise. */ - then(onFulfill: (value: R) => U1 | Bluebird.Thenable, onReject: (error: any) => U2 | Bluebird.Thenable): Bluebird; - then(onFulfill: (value: R) => U | Bluebird.Thenable, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; - then(onFulfill: (value: R) => U | Bluebird.Thenable): Bluebird; - then(): Bluebird; + // Based on PromiseLike.then, but returns a Bluebird instance. + then(onFulfill?: (value: R) => U | Bluebird.Thenable, onReject?: (error: any) => U | Bluebird.Thenable): Bluebird; // For simpler signature help. + then(onfulfilled?: ((value: R) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Bluebird; /** * This is a catch-all exception handler, shortcut for calling `.then(null, handler)` on this promise. Any exception happening in a `.then`-chain will propagate to nearest `.catch` handler. * * Alias `.caught();` for compatibility with earlier ECMAScript version. */ - catch(onReject?: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - caught(onReject?: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - catch(onReject?: (error: any) => U | Bluebird.Thenable): Bluebird; - caught(onReject?: (error: any) => U | Bluebird.Thenable): Bluebird; + catch(onReject?: (error: any) => R | PromiseLike | void | PromiseLike): Bluebird; + caught(onReject?: (error: any) => R | PromiseLike | void | PromiseLike): Bluebird; + catch(onReject?: (error: any) => U | PromiseLike): Bluebird; + caught(onReject?: (error: any) => U | PromiseLike): Bluebird; /** * This extends `.catch` to work more like catch-clauses in languages like Java or C#. Instead of manually checking `instanceof` or `.name === "SomeError"`, you may specify a number of error constructors which are eligible for this catch handler. The catch handler that is first met that has eligible constructors specified, is the one that will be called. @@ -65,38 +65,267 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection boolean, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - caught(predicate: (error: any) => boolean, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + filter4: (new (...args: any[]) => E4), + filter5: (new (...args: any[]) => E5), + onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + filter4: ((error: E4) => boolean) | (E4 & object), + filter5: ((error: E5) => boolean) | (E5 & object), + onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + filter4: (new (...args: any[]) => E4), + filter5: (new (...args: any[]) => E5), + onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + filter4: ((error: E4) => boolean) | (E4 & object), + filter5: ((error: E5) => boolean) | (E5 & object), + onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + filter4: (new (...args: any[]) => E4), + filter5: (new (...args: any[]) => E5), + onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + filter4: ((error: E4) => boolean) | (E4 & object), + filter5: ((error: E5) => boolean) | (E5 & object), + onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + filter4: (new (...args: any[]) => E4), + filter5: (new (...args: any[]) => E5), + onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + filter4: ((error: E4) => boolean) | (E4 & object), + filter5: ((error: E5) => boolean) | (E5 & object), + onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike, + ): Bluebird; - catch(predicate: (error: any) => boolean, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; - caught(predicate: (error: any) => boolean, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + filter4: (new (...args: any[]) => E4), + onReject: (error: E1 | E2 | E3 | E4) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + filter4: ((error: E4) => boolean) | (E4 & object), + onReject: (error: E1 | E2 | E3 | E4) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + filter4: (new (...args: any[]) => E4), + onReject: (error: E1 | E2 | E3 | E4) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + filter4: ((error: E4) => boolean) | (E4 & object), + onReject: (error: E1 | E2 | E3 | E4) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + filter4: (new (...args: any[]) => E4), + onReject: (error: E1 | E2 | E3 | E4) => U | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + filter4: ((error: E4) => boolean) | (E4 & object), + onReject: (error: E1 | E2 | E3 | E4) => U | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + filter4: (new (...args: any[]) => E4), + onReject: (error: E1 | E2 | E3 | E4) => U | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + filter4: ((error: E4) => boolean) | (E4 & object), + onReject: (error: E1 | E2 | E3 | E4) => U | PromiseLike, + ): Bluebird; - catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - caught(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + onReject: (error: E1 | E2 | E3) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + onReject: (error: E1 | E2 | E3) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + onReject: (error: E1 | E2 | E3) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + onReject: (error: E1 | E2 | E3) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + onReject: (error: E1 | E2 | E3) => U | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + onReject: (error: E1 | E2 | E3) => U | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + filter3: (new (...args: any[]) => E3), + onReject: (error: E1 | E2 | E3) => U | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + filter3: ((error: E3) => boolean) | (E3 & object), + onReject: (error: E1 | E2 | E3) => U | PromiseLike, + ): Bluebird; - catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable): Bluebird; - caught(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + onReject: (error: E1 | E2) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + onReject: (error: E1 | E2) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + onReject: (error: E1 | E2) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + onReject: (error: E1 | E2) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + onReject: (error: E1 | E2) => U | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + onReject: (error: E1 | E2) => U | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + filter2: (new (...args: any[]) => E2), + onReject: (error: E1 | E2) => U | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + filter2: ((error: E2) => boolean) | (E2 & object), + onReject: (error: E1 | E2) => U | PromiseLike, + ): Bluebird; - catch(predicate: Object, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - caught(predicate: Object, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - - catch(predicate: Object, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; - caught(predicate: Object, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + onReject: (error: E1) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + onReject: (error: E1) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + onReject: (error: E1) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + onReject: (error: E1) => R | PromiseLike | void | PromiseLike, + ): Bluebird; + catch( + filter1: (new (...args: any[]) => E1), + onReject: (error: E1) => U | PromiseLike, + ): Bluebird; + catch( + filter1: ((error: E1) => boolean) | (E1 & object), + onReject: (error: E1) => U | PromiseLike, + ): Bluebird; + caught( + filter1: (new (...args: any[]) => E1), + onReject: (error: E1) => U | PromiseLike, + ): Bluebird; + caught( + filter1: ((error: E1) => boolean) | (E1 & object), + onReject: (error: E1) => U | PromiseLike, + ): Bluebird; /** * Like `.catch` but instead of catching all types of exceptions, it only catches those that don't originate from thrown errors but rather from explicit rejections. */ - error(onReject: (reason: any) => U | Bluebird.Thenable): Bluebird; + error(onReject: (reason: any) => U | PromiseLike): Bluebird; /** * Pass a handler that will be called regardless of this promise's fate. Returns a new promise chained from this promise. There are special semantics for `.finally()` in that the final value cannot be modified from the handler. * * Alias `.lastly();` for compatibility with earlier ECMAScript version. */ - finally(handler: () => U | Bluebird.Thenable): Bluebird; + finally(handler: () => U | PromiseLike): Bluebird; - lastly(handler: () => U | Bluebird.Thenable): Bluebird; + lastly(handler: () => U | PromiseLike): Bluebird; /** * Create a promise that follows this promise, but is bound to the given `thisArg` value. A bound promise will call its handlers with the bound value set to `this`. Additionally promises derived from a bound promise will also be bound promises with the same `thisArg` binding as the original promise. @@ -106,21 +335,50 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(onFulfilled?: (value: R) => U | Bluebird.Thenable, onRejected?: (error: any) => U | Bluebird.Thenable): void; + done(onFulfilled?: (value: R) => U | PromiseLike, onRejected?: (error: any) => U | PromiseLike): void; /** * Like `.finally()`, but not called for rejections. */ - tap(onFulFill: (value: R) => Bluebird.Thenable): Bluebird; + tap(onFulFill: (value: R) => PromiseLike): Bluebird; tap(onFulfill: (value: R) => U): Bluebird; /** * Like `.catch()` but rethrows the error + * TODO: disallow non-objects */ - tapCatch(onReject: (error?: any) => U | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - tapCatch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - tapCatch(predicate: (error?: any) => boolean, onReject: (error?: any) => U | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; + tapCatch(onReject: (error?: any) => U | PromiseLike): Bluebird; + tapCatch( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object, + filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object, + filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | Object, + onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike, + ): Bluebird; + tapCatch( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object, + filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object, + onReject: (error: E1 | E2 | E3 | E4) => U | PromiseLike, + ): Bluebird; + tapCatch( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object, + onReject: (error: E1 | E2 | E3) => U | PromiseLike, + ): Bluebird; + tapCatch( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + onReject: (error: E1 | E2) => U | PromiseLike, + ): Bluebird; + tapCatch( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + onReject: (error: E1) => U | PromiseLike, + ): Bluebird; /** * Same as calling `Promise.delay(ms, this)`. @@ -228,8 +486,8 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection; - thenReturn(): Bluebird; + return(): Bluebird; + thenReturn(): Bluebird; return(value: U): Bluebird; thenReturn(value: U): Bluebird; @@ -258,11 +516,40 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection * * in the case where `value` doesn't change its value. That means `value` is bound at the time of calling `.catchReturn()` + * TODO: disallow non-objects */ catchReturn(value: U): Bluebird; - catchReturn(predicate: (error: any) => boolean, value: U): Bluebird; - catchReturn(ErrorClass: new (...args: any[]) => E, value: U): Bluebird; - catchReturn(predicate: Object, value: U): Bluebird; + + catchReturn( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object, + filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object, + filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | Object, + value: U, + ): Bluebird; + catchReturn( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object, + filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object, + value: U, + ): Bluebird; + catchReturn( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object, + value: U, + ): Bluebird; + catchReturn( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + value: U, + ): Bluebird; + catchReturn( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + value: U, + ): Bluebird; /** * Convenience method for: @@ -273,11 +560,40 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection * Same limitations apply as with `.catchReturn()`. + * TODO: disallow non-objects */ catchThrow(reason: Error): Bluebird; - catchThrow(predicate: (error: any) => boolean, reason: Error): Bluebird; - catchThrow(ErrorClass: new (...args: any[]) => E, reason: Error): Bluebird; - catchThrow(predicate: Object, reason: Error): Bluebird; + + catchThrow( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object, + filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object, + filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | Object, + reason: Error, + ): Bluebird; + catchThrow( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object, + filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object, + reason: Error, + ): Bluebird; + catchThrow( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object, + reason: Error, + ): Bluebird; + catchThrow( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object, + reason: Error, + ): Bluebird; + catchThrow( + filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object, + reason: Error, + ): Bluebird; /** * Convert to String. @@ -292,7 +608,7 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(fulfilledHandler: (...values: W[]) => U | Bluebird.Thenable): Bluebird; + spread(fulfilledHandler: (...values: W[]) => U | PromiseLike): Bluebird; spread(fulfilledHandler: Function): Bluebird; /** @@ -304,8 +620,8 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection; + props(this: PromiseLike | V>>): Bluebird>; + props(this: PromiseLike>): Bluebird; /** * Same as calling `Promise.any(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. @@ -329,29 +645,29 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(mapper: (item: Q, index: number, arrayLength: number) => U | Bluebird.Thenable, options?: Bluebird.ConcurrencyOption): Bluebird; + map(mapper: (item: Q, index: number, arrayLength: number) => U | PromiseLike, options?: Bluebird.ConcurrencyOption): Bluebird; /** * Same as calling `Promise.reduce(thisPromise, Function reducer, initialValue)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. */ // TODO type inference from array-resolving promise? - reduce(reducer: (memo: U, item: Q, index: number, arrayLength: number) => U | Bluebird.Thenable, initialValue?: U): Bluebird; + reduce(reducer: (memo: U, item: Q, index: number, arrayLength: number) => U | PromiseLike, initialValue?: U): Bluebird; /** * Same as calling ``Promise.filter(thisPromise, filterer)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. */ // TODO type inference from array-resolving promise? - filter(filterer: (item: U, index: number, arrayLength: number) => boolean | Bluebird.Thenable, options?: Bluebird.ConcurrencyOption): Bluebird; + filter(filterer: (item: U, index: number, arrayLength: number) => boolean | PromiseLike, options?: Bluebird.ConcurrencyOption): Bluebird; /** * Same as calling ``Bluebird.each(thisPromise, iterator)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. */ - each(iterator: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable): Bluebird; + each(iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike): Bluebird; /** * Same as calling ``Bluebird.mapSeries(thisPromise, iterator)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. */ - mapSeries(iterator: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable): Bluebird; + mapSeries(iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike): Bluebird; /** * Cancel this `promise`. Will not do anything if this promise is already settled or if the cancellation feature has not been enabled @@ -372,8 +688,8 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(fn: () => R | Bluebird.Thenable): Bluebird; - static attempt(fn: () => R | Bluebird.Thenable): Bluebird; + static try(fn: () => R | PromiseLike): Bluebird; + static attempt(fn: () => R | PromiseLike): Bluebird; /** * Returns a new function that wraps the given function `fn`. The new function will always return a promise that is fulfilled with the original functions return values or rejected with thrown exceptions from the original function. @@ -385,7 +701,7 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection; - static resolve(value: R | Bluebird.Thenable): Bluebird; + static resolve(value: R | PromiseLike): Bluebird; /** * Create a promise that is rejected with the given `reason`. @@ -401,7 +717,7 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(value: R | Bluebird.Thenable): Bluebird; + static cast(value: R | PromiseLike): Bluebird; /** * Sugar for `Promise.resolve(undefined).bind(thisArg);`. See `.bind()`. @@ -423,7 +739,7 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(ms: number, value: R | Bluebird.Thenable): Bluebird; + static delay(ms: number, value: R | PromiseLike): Bluebird; static delay(ms: number): Bluebird; /** @@ -475,13 +791,13 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(values: [Bluebird.Thenable | T1, Bluebird.Thenable | T2, Bluebird.Thenable | T3, Bluebird.Thenable | T4, Bluebird.Thenable | T5]): Bluebird<[T1, T2, T3, T4, T5]>; - static all(values: [Bluebird.Thenable | T1, Bluebird.Thenable | T2, Bluebird.Thenable | T3, Bluebird.Thenable | T4]): Bluebird<[T1, T2, T3, T4]>; - static all(values: [Bluebird.Thenable | T1, Bluebird.Thenable | T2, Bluebird.Thenable | T3]): Bluebird<[T1, T2, T3]>; - static all(values: [Bluebird.Thenable | T1, Bluebird.Thenable | T2]): Bluebird<[T1, T2]>; - static all(values: [Bluebird.Thenable | T1]): Bluebird<[T1]>; + static all(values: [PromiseLike | T1, PromiseLike | T2, PromiseLike | T3, PromiseLike | T4, PromiseLike | T5]): Bluebird<[T1, T2, T3, T4, T5]>; + static all(values: [PromiseLike | T1, PromiseLike | T2, PromiseLike | T3, PromiseLike | T4]): Bluebird<[T1, T2, T3, T4]>; + static all(values: [PromiseLike | T1, PromiseLike | T2, PromiseLike | T3]): Bluebird<[T1, T2, T3]>; + static all(values: [PromiseLike | T1, PromiseLike | T2]): Bluebird<[T1, T2]>; + static all(values: [PromiseLike | T1]): Bluebird<[T1]>; // array with values - static all(values: Bluebird.Thenable<(Bluebird.Thenable | R)[]> | (Bluebird.Thenable | R)[]): Bluebird; + static all(values: PromiseLike<(PromiseLike | R)[]> | (PromiseLike | R)[]): Bluebird; /** * Like ``Promise.all`` but for object properties instead of array items. Returns a promise that is fulfilled when all the properties of the object are fulfilled. The promise's fulfillment value is an object with fulfillment values at respective keys to the original object. If any promise in the object rejects, the returned promise is rejected with the rejection reason. @@ -490,23 +806,25 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection): Bluebird; + static props(map: PromiseLike | V>>): Bluebird>; + static props(object: PromiseLike>): Bluebird; + // map + static props(map: Map | V>): Bluebird>; // object - static props(object: Object): Bluebird; + static props(object: Bluebird.ResolvableProps): Bluebird; /** * Like `Promise.some()`, with 1 as `count`. However, if the promise fulfills, the fulfillment value is not an array of 1 but the value directly. */ - static any(values: Bluebird.Thenable<(Bluebird.Thenable | R)[]> | (Bluebird.Thenable | R)[]): Bluebird; + static any(values: PromiseLike<(PromiseLike | R)[]> | (PromiseLike | R)[]): Bluebird; /** * Given an array, or a promise of an array, which contains promises (or a mix of promises and values) return a promise that is fulfilled or rejected as soon as a promise in the array is fulfilled or rejected with the respective rejection reason or fulfillment value. * * **Note** If you pass empty array or a sparse array with no values, or a promise/thenable for such, it will be forever pending. */ - static race(values: Bluebird.Thenable<(Bluebird.Thenable | R)[]> | (Bluebird.Thenable | R)[]): Bluebird; + static race(values: PromiseLike<(PromiseLike | R)[]> | (PromiseLike | R)[]): Bluebird; /** * Initiate a competetive race between multiple promises or values (values will become immediately fulfilled promises). When `count` amount of promises have been fulfilled, the returned promise is fulfilled with an array that contains the fulfillment values of the winners in order of resolution. @@ -516,11 +834,11 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(values: Bluebird.Thenable[]>, count: number): Bluebird; + static some(values: PromiseLike[]>, count: number): Bluebird; // promise of array with values - static some(values: Bluebird.Thenable, count: number): Bluebird; + static some(values: PromiseLike, count: number): Bluebird; // array with promises of value - static some(values: Bluebird.Thenable[], count: number): Bluebird; + static some(values: PromiseLike[], count: number): Bluebird; // array with values static some(values: R[], count: number): Bluebird; @@ -533,15 +851,15 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(arg1: A1 | Bluebird.Thenable, handler: (arg1: A1) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2, arg3: A3) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, arg5: A5 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | PromiseLike, handler: (arg1: A1) => R | PromiseLike): Bluebird; + static join(arg1: A1 | PromiseLike, arg2: A2 | PromiseLike, handler: (arg1: A1, arg2: A2) => R | PromiseLike): Bluebird; + static join(arg1: A1 | PromiseLike, arg2: A2 | PromiseLike, arg3: A3 | PromiseLike, handler: (arg1: A1, arg2: A2, arg3: A3) => R | PromiseLike): Bluebird; + static join(arg1: A1 | PromiseLike, arg2: A2 | PromiseLike, arg3: A3 | PromiseLike, arg4: A4 | PromiseLike, handler: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => R | PromiseLike): Bluebird; + static join(arg1: A1 | PromiseLike, arg2: A2 | PromiseLike, arg3: A3 | PromiseLike, arg4: A4 | PromiseLike, arg5: A5 | PromiseLike, handler: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => R | PromiseLike): Bluebird; // variadic array /** @deprecated use .all instead */ - static join(...values: (R | Bluebird.Thenable)[]): Bluebird; + static join(...values: (R | PromiseLike)[]): Bluebird; /** * Map an array, or a promise of an array, which contains a promises (or a mix of promises and values) with the given `mapper` function with the signature `(item, index, arrayLength)` where `item` is the resolved value of a respective promise in the input array. If any promise in the input array is rejected the returned promise is rejected as well. @@ -551,16 +869,16 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(values: Bluebird.Thenable[]>, mapper: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable, options?: Bluebird.ConcurrencyOption): Bluebird; + static map(values: PromiseLike[]>, mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike, options?: Bluebird.ConcurrencyOption): Bluebird; // promise of array with values - static map(values: Bluebird.Thenable, mapper: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable, options?: Bluebird.ConcurrencyOption): Bluebird; + static map(values: PromiseLike, mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike, options?: Bluebird.ConcurrencyOption): Bluebird; // array with promises of value - static map(values: Bluebird.Thenable[], mapper: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable, options?: Bluebird.ConcurrencyOption): Bluebird; + static map(values: PromiseLike[], mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike, options?: Bluebird.ConcurrencyOption): Bluebird; // array with values - static map(values: R[], mapper: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable, options?: Bluebird.ConcurrencyOption): Bluebird; + static map(values: R[], mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike, options?: Bluebird.ConcurrencyOption): Bluebird; /** * Reduce an array, or a promise of an array, which contains a promises (or a mix of promises and values) with the given `reducer` function with the signature `(total, current, index, arrayLength)` where `item` is the resolved value of a respective promise in the input array. If any promise in the input array is rejected the returned promise is rejected as well. @@ -570,16 +888,16 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(values: Bluebird.Thenable[]>, reducer: (total: U, current: R, index: number, arrayLength: number) => U | Bluebird.Thenable, initialValue?: U): Bluebird; + static reduce(values: PromiseLike[]>, reducer: (total: U, current: R, index: number, arrayLength: number) => U | PromiseLike, initialValue?: U): Bluebird; // promise of array with values - static reduce(values: Bluebird.Thenable, reducer: (total: U, current: R, index: number, arrayLength: number) => U | Bluebird.Thenable, initialValue?: U): Bluebird; + static reduce(values: PromiseLike, reducer: (total: U, current: R, index: number, arrayLength: number) => U | PromiseLike, initialValue?: U): Bluebird; // array with promises of value - static reduce(values: Bluebird.Thenable[], reducer: (total: U, current: R, index: number, arrayLength: number) => U | Bluebird.Thenable, initialValue?: U): Bluebird; + static reduce(values: PromiseLike[], reducer: (total: U, current: R, index: number, arrayLength: number) => U | PromiseLike, initialValue?: U): Bluebird; // array with values - static reduce(values: R[], reducer: (total: U, current: R, index: number, arrayLength: number) => U | Bluebird.Thenable, initialValue?: U): Bluebird; + static reduce(values: R[], reducer: (total: U, current: R, index: number, arrayLength: number) => U | PromiseLike, initialValue?: U): Bluebird; /** * Filter an array, or a promise of an array, which contains a promises (or a mix of promises and values) with the given `filterer` function with the signature `(item, index, arrayLength)` where `item` is the resolved value of a respective promise in the input array. If any promise in the input array is rejected the returned promise is rejected as well. @@ -589,16 +907,16 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(values: Bluebird.Thenable[]>, filterer: (item: R, index: number, arrayLength: number) => boolean | Bluebird.Thenable, option?: Bluebird.ConcurrencyOption): Bluebird; + static filter(values: PromiseLike[]>, filterer: (item: R, index: number, arrayLength: number) => boolean | PromiseLike, option?: Bluebird.ConcurrencyOption): Bluebird; // promise of array with values - static filter(values: Bluebird.Thenable, filterer: (item: R, index: number, arrayLength: number) => boolean | Bluebird.Thenable, option?: Bluebird.ConcurrencyOption): Bluebird; + static filter(values: PromiseLike, filterer: (item: R, index: number, arrayLength: number) => boolean | PromiseLike, option?: Bluebird.ConcurrencyOption): Bluebird; // array with promises of value - static filter(values: Bluebird.Thenable[], filterer: (item: R, index: number, arrayLength: number) => boolean | Bluebird.Thenable, option?: Bluebird.ConcurrencyOption): Bluebird; + static filter(values: PromiseLike[], filterer: (item: R, index: number, arrayLength: number) => boolean | PromiseLike, option?: Bluebird.ConcurrencyOption): Bluebird; // array with values - static filter(values: R[], filterer: (item: R, index: number, arrayLength: number) => boolean | Bluebird.Thenable, option?: Bluebird.ConcurrencyOption): Bluebird; + static filter(values: R[], filterer: (item: R, index: number, arrayLength: number) => boolean | PromiseLike, option?: Bluebird.ConcurrencyOption): Bluebird; /** * Iterate over an array, or a promise of an array, which contains promises (or a mix of promises and values) with the given iterator function with the signature (item, index, value) where item is the resolved value of a respective promise in the input array. Iteration happens serially. If any promise in the input array is rejected the returned promise is rejected as well. @@ -606,11 +924,11 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(values: Bluebird.Thenable[]>, iterator: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable): Bluebird; + static each(values: PromiseLike[]>, iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike): Bluebird; // array with promises of value - static each(values: Bluebird.Thenable[], iterator: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable): Bluebird; + static each(values: PromiseLike[], iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike): Bluebird; // array with values OR promise of array with values - static each(values: R[] | Bluebird.Thenable, iterator: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable): Bluebird; + static each(values: R[] | PromiseLike, iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike): Bluebird; /** * Given an Iterable(arrays are Iterable), or a promise of an Iterable, which produces promises (or a mix of promises and values), iterate over all the values in the Iterable into an array and iterate over the array serially, in-order. @@ -619,7 +937,7 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(values: (R | Bluebird.Thenable)[] | Bluebird.Thenable<(R | Bluebird.Thenable)[]>, iterator: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable): Bluebird; + static mapSeries(values: (R | PromiseLike)[] | PromiseLike<(R | PromiseLike)[]>, iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike): Bluebird; /** * A meta method used to specify the disposer method that cleans up a resource when using `Promise.using`. @@ -631,16 +949,16 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection) => void | Bluebird.Thenable): Bluebird.Disposer; + disposer(disposeFn: (arg: R, promise: Bluebird) => void | PromiseLike): Bluebird.Disposer; /** * In conjunction with `.disposer`, using will make sure that no matter what, the specified disposer * will be called when the promise returned by the callback passed to using has settled. The disposer is * necessary because there is no standard interface in node for disposing resources. */ - static using(disposer: Bluebird.Disposer, executor: (transaction: R) => Bluebird.Thenable): Bluebird; - static using(disposer: Bluebird.Disposer, disposer2: Bluebird.Disposer, executor: (transaction1: R1, transaction2: R2) => Bluebird.Thenable): Bluebird; - static using(disposer: Bluebird.Disposer, disposer2: Bluebird.Disposer, disposer3: Bluebird.Disposer, executor: (transaction1: R1, transaction2: R2, transaction3: R3) => Bluebird.Thenable): Bluebird; + static using(disposer: Bluebird.Disposer, executor: (transaction: R) => PromiseLike): Bluebird; + static using(disposer: Bluebird.Disposer, disposer2: Bluebird.Disposer, executor: (transaction1: R1, transaction2: R2) => PromiseLike): Bluebird; + static using(disposer: Bluebird.Disposer, disposer2: Bluebird.Disposer, disposer3: Bluebird.Disposer, executor: (transaction1: R1, transaction2: R2, transaction3: R3) => PromiseLike): Bluebird; /** * Add handler as the handler to call when there is a possibly unhandled rejection. @@ -695,7 +1013,7 @@ declare namespace Bluebird { suffix?: string; filter?: (name: string, func: Function, target?: any, passesDefaultFilter?: boolean) => boolean; // The promisifier gets a reference to the original method and should return a function which returns a promise - promisifier?: (originalMethod: Function) => () => Thenable; + promisifier?: (originalMethod: Function) => () => PromiseLike; } /** @@ -755,10 +1073,10 @@ declare namespace Bluebird { export class Disposer { } - export interface Thenable { - then(onFulfilled: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable; - then(onFulfilled: (value: R) => U | Thenable, onRejected?: (error: any) => void | Thenable): Thenable; - } + /** @deprecated Use PromiseLike directly. */ + export type Thenable = PromiseLike; + + export type ResolvableProps = object & { [K in keyof T]: PromiseLike | T[K] }; export interface Resolver { /** diff --git a/types/body-parser/index.d.ts b/types/body-parser/index.d.ts index 54a9b463ed..be10668973 100644 --- a/types/body-parser/index.d.ts +++ b/types/body-parser/index.d.ts @@ -21,7 +21,7 @@ declare namespace bodyParser { } interface OptionsJson extends Options { - reviever?(key: string, value: any): any; + reviver?(key: string, value: any): any; strict?: boolean; } diff --git a/types/bonjour/index.d.ts b/types/bonjour/index.d.ts index bba5debb3c..0c2578121e 100644 --- a/types/bonjour/index.d.ts +++ b/types/bonjour/index.d.ts @@ -2,7 +2,8 @@ // Project: https://github.com/watson/bonjour // Definitions by: Quentin Lampin , Nicolas Voigt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// + +/// declare function bonjour(opts?: bonjour.BonjourOptions): bonjour.Bonjour; export = bonjour; diff --git a/types/bookshelf/index.d.ts b/types/bookshelf/index.d.ts index 86176ed2e8..55be61ba9e 100644 --- a/types/bookshelf/index.d.ts +++ b/types/bookshelf/index.d.ts @@ -2,7 +2,7 @@ // Project: http://bookshelfjs.org/ // Definitions by: Andrew Schurman , Vesa Poikajärvi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import Knex = require('knex'); import knex = require('knex'); @@ -40,7 +40,8 @@ declare namespace Bookshelf { tableName?: string; } - abstract class ModelBase> extends Events> implements IModelBase { + interface ModelBase> extends IModelBase { } + abstract class ModelBase> extends Events> { /** If overriding, must use a getter instead of a plain property. */ idAttribute: string; diff --git a/types/boom/boom-tests.ts b/types/boom/boom-tests.ts index e31e376dde..38dc39058f 100644 --- a/types/boom/boom-tests.ts +++ b/types/boom/boom-tests.ts @@ -1,44 +1,154 @@ - import Boom = require('boom'); +import * as Hapi from 'hapi'; -var bo = Boom.wrap(new Error('test'), 400, 'some message'); -var a: string = bo.output.headers['some header']; +// 4xx and data type -Boom.create(500, 'Internal server error', { timestamp: Date.now() }); +const badRequestError = Boom.badRequest('message', {some: 'data'}); +badRequestError.data.some; +const badRequestError2: Boom.BoomError = Boom.badImplementation('message'); -Boom.badRequest('message', {some: 'data'}); -Boom.unauthorized('message', 'scheme', {some: 'data'}); -Boom.unauthorized(null, 'scheme', 'data'); -Boom.paymentRequired('message', {some: 'data'}); -Boom.forbidden('message', {some: 'data'}); -Boom.notFound('message', {some: 'data'}); -Boom.methodNotAllowed('message', {some: 'data'}); -Boom.notAcceptable('message', {some: 'data'}); -Boom.proxyAuthRequired('message', {some: 'data'}); -Boom.clientTimeout('message', {some: 'data'}); -Boom.conflict('message', {some: 'data'}); -Boom.resourceGone('message', {some: 'data'}); -Boom.lengthRequired('message', {some: 'data'}); -Boom.preconditionFailed('message', {some: 'data'}); -Boom.entityTooLarge('message', {some: 'data'}); -Boom.uriTooLong('message', {some: 'data'}); -Boom.unsupportedMediaType('message', {some: 'data'}); -Boom.rangeNotSatisfiable('message', {some: 'data'}); -Boom.expectationFailed('message', {some: 'data'}); -Boom.teapot('message', {some: 'data'}); -Boom.badData('message', {some: 'data'}); -Boom.locked('message', {some: 'data'}); -Boom.preconditionRequired('message', {some: 'data'}); -Boom.tooManyRequests('message', {some: 'data'}); -Boom.illegal('message', {some: 'data'}); +const unauthorizedError1 = Boom.unauthorized('message', 'scheme', {some: 'attribute'}); +unauthorizedError1.output.payload.attributes === { some: 'attribute', error: 'message' }; +unauthorizedError1.output.headers === { 'WWW-Authenticate': 'scheme some="attribute", error="message"' }; -Boom.badImplementation('message', {some: 'data'}); -Boom.notImplemented('message', {some: 'data'}); -Boom.badGateway('message', {some: 'data'}); -Boom.serverUnavailable('message', {some: 'data'}); -Boom.gatewayTimeout('message', {some: 'data'}); +const unauthorizedError2 = Boom.unauthorized('message', ['scheme']); +unauthorizedError2.output.payload.attributes === undefined; +unauthorizedError2.output.headers === { 'WWW-Authenticate': 'scheme' }; -Boom.unauthorized() as Error; +const unauthorizedError3 = Boom.unauthorized(null, 'scheme', 'attribute'); +unauthorizedError3.output.payload.attributes === 'attribute'; +unauthorizedError3.output.headers === { 'WWW-Authenticate': 'scheme attribute' }; + +const unauthorizedError4 = Boom.unauthorized(null, 'scheme', {some: 'attribute'}); +unauthorizedError4.output.payload.attributes === { some: 'attribute' }; +unauthorizedError4.output.headers === { 'WWW-Authenticate': 'scheme some="attribute"' }; + +const paymentRequiredError = Boom.paymentRequired('message', {some: 'data'}); +paymentRequiredError.data.some; +const paymentRequiredError2: Boom.BoomError = Boom.paymentRequired('message'); + +const forbiddenError = Boom.forbidden('message', {some: 'data'}); +forbiddenError.data.some; +const forbiddenError2: Boom.BoomError = Boom.forbidden('message'); + +const notFoundError = Boom.notFound('message', {some: 'data'}); +notFoundError.data.some; +const notFoundError2: Boom.BoomError = Boom.notFound('message'); + +const methodNotAllowedError = Boom.methodNotAllowed('message', {some: 'data'}); +methodNotAllowedError.data.some; +const methodNotAllowedError2: Boom.BoomError = Boom.methodNotAllowed('message'); + +const notAcceptableError = Boom.notAcceptable('message', {some: 'data'}); +notAcceptableError.data.some; +const notAcceptableError2: Boom.BoomError = Boom.notAcceptable('message'); + +const proxyAuthRequiredError = Boom.proxyAuthRequired('message', {some: 'data'}); +proxyAuthRequiredError.data.some; +const proxyAuthRequiredError2: Boom.BoomError = Boom.proxyAuthRequired('message'); + +const clientTimeoutError = Boom.clientTimeout('message', {some: 'data'}); +clientTimeoutError.data.some; +const clientTimeoutError2: Boom.BoomError = Boom.clientTimeout('message'); + +const conflictError = Boom.conflict('message', {some: 'data'}); +conflictError.data.some; + +const resourceGoneError = Boom.resourceGone('message', {some: 'data'}); +resourceGoneError.data.some; +const resourceGoneError2: Boom.BoomError = Boom.resourceGone('message'); + +const lengthRequiredError = Boom.lengthRequired('message', {some: 'data'}); +lengthRequiredError.data.some; +const lengthRequiredError2: Boom.BoomError = Boom.lengthRequired('message'); + +const preconditionFailedError = Boom.preconditionFailed('message', {some: 'data'}); +preconditionFailedError.data.some; +const preconditionFailedError2: Boom.BoomError = Boom.preconditionFailed('message'); + +const entityTooLargeError = Boom.entityTooLarge('message', {some: 'data'}); +entityTooLargeError.data.some; +const entityTooLargeError2: Boom.BoomError = Boom.lengthRequired('message'); + +const uriTooLongError = Boom.uriTooLong('message', {some: 'data'}); +uriTooLongError.data.some; +const uriTooLongError2: Boom.BoomError = Boom.uriTooLong('message'); + +const unsupportedMediaTypeError = Boom.unsupportedMediaType('message', {some: 'data'}); +unsupportedMediaTypeError.data.some; +const unsupportedMediaTypeError2: Boom.BoomError = Boom.unsupportedMediaType('message'); + +const rangeNotSatisfiableError = Boom.rangeNotSatisfiable('message', {some: 'data'}); +rangeNotSatisfiableError.data.some; +const rangeNotSatisfiableError2: Boom.BoomError = Boom.rangeNotSatisfiable('message'); + +const expectationFailedError = Boom.expectationFailed('message', {some: 'data'}); +expectationFailedError.data.some; +const expectationFailedError2: Boom.BoomError = Boom.expectationFailed('message'); + +const teapotError = Boom.teapot('message', {some: 'data'}); +teapotError.data.some; +const teapotError2: Boom.BoomError = Boom.teapot('message'); + +const badDataError = Boom.badData('message', {some: 'data'}); +badDataError.data.some; +const badDataError2: Boom.BoomError = Boom.badData('message'); + +const lockedError = Boom.locked('message', {some: 'data'}); +lockedError.data.some; +const lockedError2: Boom.BoomError = Boom.locked('message'); + +const preconditionRequiredError = Boom.preconditionRequired('message', {some: 'data'}); +preconditionRequiredError.data.some; +const preconditionRequiredError2: Boom.BoomError = Boom.preconditionRequired('message'); + +const tooManyRequestsError = Boom.tooManyRequests('message', {some: 'data'}); +tooManyRequestsError.data.some; +const tooManyRequestsError2: Boom.BoomError = Boom.tooManyRequests('message'); + +const illegalError = Boom.illegal('message', {some: 'data'}); +illegalError.data.some; +const illegalError2: Boom.BoomError = Boom.illegal('message'); + +// 5xx and data type + +const badImplementationError = Boom.badImplementation('message', {some: 'data'}); +badImplementationError.data.some; +const badImplementationError2: Boom.BoomError = Boom.badImplementation('message'); + +const internalError = Boom.internal('message', {some: 'data'}); +internalError.data.some; +const internalError2: Boom.BoomError = Boom.internal('message'); + +const notImplementedError = Boom.notImplemented('message', {some: 'data'}); +notImplementedError.data.some; +const notImplementedError2: Boom.BoomError = Boom.notImplemented('message'); + +const badGatewayError = Boom.badGateway('message', {some: 'data'}); +badGatewayError.data.some; +const badGatewayError2: Boom.BoomError = Boom.badGateway('message'); + +const serverUnavailableError = Boom.serverUnavailable('message', {some: 'data'}); +serverUnavailableError.data.some; +const serverUnavailableError2: Boom.BoomError = Boom.serverUnavailable('message'); + +const gatewayTimeoutError = Boom.gatewayTimeout('message', {some: 'data'}); +gatewayTimeoutError.data.some; +const gatewayTimeoutError2: Boom.BoomError = Boom.gatewayTimeout('message'); + +// wrap and create + +const wrappedError = Boom.wrap(new Error('test'), 400, 'some message'); + +const error1 = Boom.create(500, 'Internal server error', { timestamp: Date.now() }); +error1.data.timestamp; +const error2: Boom.BoomError = Boom.create(500, 'Internal server error'); + +// type widen asserting + +const unauthorizedError = Boom.unauthorized() as Error; + +// status code and reformat const error = Boom.badRequest('Cannot feed after midnight'); error.output.statusCode = 499; // Assign a custom error code @@ -53,3 +163,30 @@ interface CustomPayload extends Boom.Payload { } (error.output.payload as CustomPayload).custom = 'abc_123'; + +/** + * Test assignment of custom error data: + */ +const errorWithData = Boom.badImplementation('', { custom1: 'test', customType: 'Custom1', isCustom: true } as CustomData1); +const errorWithNoExplicitDataType: Boom.BoomError = errorWithData; // can assign to error without explicit data type +const errorWithExplicitType: Boom.BoomError = errorWithData; // can assign to union data type +const errorWithConcreteCustomData: Boom.BoomError = errorWithData; // can assign to concrete data type +// assignment to CustomData2 would not be possible +// const errorWithConcreteCustomData2: Boom.BoomError = errorWithData; + +// Some complex error data types for testing purposes: +interface CustomDataBase { + isCustom: true; +} + +interface CustomData1 extends CustomDataBase { + customType: 'Custom1'; + custom1: string; +} + +interface CustomData2 extends CustomDataBase { + customType: 'Custom2'; + custom2: string; +} + +type CustomData = CustomData1 | CustomData2; diff --git a/types/boom/index.d.ts b/types/boom/index.d.ts index 4d9d0b3a5b..b8f41a85be 100644 --- a/types/boom/index.d.ts +++ b/types/boom/index.d.ts @@ -2,6 +2,7 @@ // Project: http://github.com/hapijs/boom // Definitions by: Igor Rogatty , AJP // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 export = Boom; @@ -11,7 +12,7 @@ declare namespace Boom { * boom provides a set of utilities for returning HTTP errors. Each utility returns a Boom error response object (instance of Error) which includes the following properties: * @see {@link https://github.com/hapijs/boom#boom} */ - export interface BoomError extends Error { + export interface BoomError extends Error { /** isBoom - if true, indicates this is a Boom object instance. */ isBoom: boolean; /** isServer - convenience bool indicating status code >= 500. */ @@ -24,6 +25,8 @@ declare namespace Boom { reformat: () => string; /** "If message is unset, the 'error' segment of the header will not be present and isMissing will be true on the error object." mentioned in @see {@link https://github.com/hapijs/boom#boomunauthorizedmessage-scheme-attributes} */ isMissing?: boolean; + /** https://github.com/hapijs/boom#createstatuscode-message-data and https://github.com/hapijs/boom/blob/v4.3.0/lib/index.js#L99 */ + data: Data; } export interface Output { @@ -34,6 +37,7 @@ declare namespace Boom { /** payload - the formatted object used as the response payload (stringified). Can be directly manipulated but any changes will be lost if reformat() is called. Any content allowed and by default includes the following content: */ payload: Payload; } + export interface Payload { /** statusCode - the HTTP status code, derived from error.output.statusCode. */ statusCode: number; @@ -41,6 +45,11 @@ declare namespace Boom { error: string; /** message - the error message derived from error.message. */ message: string; + /** + * "Every key/value pair will be included ... in the response payload under the attributes key." + * [see docs](https://github.com/hapijs/boom#boomunauthorizedmessage-scheme-attributes) + */ + attributes?: any; // Excluded this to aid typing of the other values. See tests for example casting to a custom interface to manipulate the payload // [anyContent: string]: any; } @@ -52,7 +61,7 @@ declare namespace Boom { * @param message optional message string. If the error already has a message, it adds the message as a prefix. Defaults to no message. * @see {@link https://github.com/hapijs/boom#wraperror-statuscode-message} */ - export function wrap(error: Error, statusCode?: number, message?: string): BoomError; + export function wrap(error: Error, statusCode?: number, message?: string): BoomError; /** * Generates an Error object with the boom decorations @@ -61,7 +70,7 @@ declare namespace Boom { * @param data additional error data set to error.data property. * @see {@link https://github.com/hapijs/boom#createstatuscode-message-data} */ - export function create(statusCode: number, message?: string, data?: any): BoomError; + export function create(statusCode: number, message?: string, data?: Data): BoomError; // 4xx /** @@ -70,7 +79,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boombadrequestmessage-data} */ - export function badRequest(message?: string, data?: any): BoomError; + export function badRequest(message?: string, data?: Data): BoomError; /** * Returns a 401 Unauthorized error @@ -81,8 +90,10 @@ declare namespace Boom { * @param attributes an object of values to use while setting the 'WWW-Authenticate' header. This value is only used when scheme is a string, otherwise it is ignored. Every key/value pair will be included in the 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the attributes key. Alternatively value can be a string which is use to set the value of the scheme, for example setting the token value for negotiate header. If string is used message parameter must be null. null and undefined will be replaced with an empty string. If attributes is set, message will be used as the 'error' segment of the 'WWW-Authenticate' header. If message is unset, the 'error' segment of the header will not be present and isMissing will be true on the error object. * @see {@link https://github.com/hapijs/boom#boomunauthorizedmessage-scheme-attributes} */ - export function unauthorized(message?: string, scheme?: string | string[], attributes?: {[index: string]: string}): BoomError; - export function unauthorized(message?: null, scheme?: string | string[], attributes?: string): BoomError; + export function unauthorized(message?: string, scheme?: string, attributes?: {[index: string]: string}): BoomError; + export function unauthorized(message?: string, scheme?: string[]): BoomError; + export function unauthorized(message?: null, scheme?: string, attributes?: {[index: string]: string} | string): BoomError; + export function unauthorized(message?: null, scheme?: string[]): BoomError; /** * Returns a 402 Payment Required error @@ -90,7 +101,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boompaymentrequiredmessage-data} */ - export function paymentRequired(message?: string, data?: any): BoomError; + export function paymentRequired(message?: string, data?: Data): BoomError; /** * Returns a 403 Forbidden error @@ -98,7 +109,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomforbiddenmessage-data} */ - export function forbidden(message?: string, data?: any): BoomError; + export function forbidden(message?: string, data?: Data): BoomError; /** * Returns a 404 Not Found error @@ -106,7 +117,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomnotfoundmessage-data} */ - export function notFound(message?: string, data?: any): BoomError; + export function notFound(message?: string, data?: Data): BoomError; /** * Returns a 405 Method Not Allowed error @@ -115,7 +126,7 @@ declare namespace Boom { * @param allow optional string or array of strings (to be combined and separated by ', ') which is set to the 'Allow' header. * @see {@link https://github.com/hapijs/boom#boommethodnotallowedmessage-data-allow} */ - export function methodNotAllowed(message?: string, data?: any, allow?: string | string[]): BoomError; + export function methodNotAllowed(message?: string, data?: Data, allow?: string | string[]): BoomError; /** * Returns a 406 Not Acceptable error @@ -123,7 +134,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomnotacceptablemessage-data} */ - export function notAcceptable(message?: string, data?: any): BoomError; + export function notAcceptable(message?: string, data?: Data): BoomError; /** * Returns a 407 Proxy Authentication Required error @@ -131,7 +142,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomproxyauthrequiredmessage-data} */ - export function proxyAuthRequired(message?: string, data?: any): BoomError; + export function proxyAuthRequired(message?: string, data?: Data): BoomError; /** * Returns a 408 Request Time-out error @@ -139,7 +150,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomclienttimeoutmessage-data} */ - export function clientTimeout(message?: string, data?: any): BoomError; + export function clientTimeout(message?: string, data?: Data): BoomError; /** * Returns a 409 Conflict error @@ -147,7 +158,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomconflictmessage-data} */ - export function conflict(message?: string, data?: any): BoomError; + export function conflict(message?: string, data?: Data): BoomError; /** * Returns a 410 Gone error @@ -155,7 +166,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomresourcegonemessage-data} */ - export function resourceGone(message?: string, data?: any): BoomError; + export function resourceGone(message?: string, data?: Data): BoomError; /** * Returns a 411 Length Required error @@ -163,7 +174,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomlengthrequiredmessage-data} */ - export function lengthRequired(message?: string, data?: any): BoomError; + export function lengthRequired(message?: string, data?: Data): BoomError; /** * Returns a 412 Precondition Failed error @@ -171,7 +182,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boompreconditionfailedmessage-data} */ - export function preconditionFailed(message?: string, data?: any): BoomError; + export function preconditionFailed(message?: string, data?: Data): BoomError; /** * Returns a 413 Request Entity Too Large error @@ -179,7 +190,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomentitytoolargemessage-data} */ - export function entityTooLarge(message?: string, data?: any): BoomError; + export function entityTooLarge(message?: string, data?: Data): BoomError; /** * Returns a 414 Request-URI Too Large error @@ -187,7 +198,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomuritoolongmessage-data} */ - export function uriTooLong(message?: string, data?: any): BoomError; + export function uriTooLong(message?: string, data?: Data): BoomError; /** * Returns a 415 Unsupported Media Type error @@ -195,7 +206,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomunsupportedmediatypemessage-data} */ - export function unsupportedMediaType(message?: string, data?: any): BoomError; + export function unsupportedMediaType(message?: string, data?: Data): BoomError; /** * Returns a 416 Requested Range Not Satisfiable error @@ -203,7 +214,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomrangenotsatisfiablemessage-data} */ - export function rangeNotSatisfiable(message?: string, data?: any): BoomError; + export function rangeNotSatisfiable(message?: string, data?: Data): BoomError; /** * Returns a 417 Expectation Failed error @@ -211,7 +222,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomexpectationfailedmessage-data} */ - export function expectationFailed(message?: string, data?: any): BoomError; + export function expectationFailed(message?: string, data?: Data): BoomError; /** * Returns a 418 I'm a Teapot error @@ -219,7 +230,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomteapotmessage-data} */ - export function teapot(message?: string, data?: any): BoomError; + export function teapot(message?: string, data?: Data): BoomError; /** * Returns a 422 Unprocessable Entity error @@ -227,7 +238,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boombaddatamessage-data} */ - export function badData(message?: string, data?: any): BoomError; + export function badData(message?: string, data?: Data): BoomError; /** * Returns a 423 Locked error @@ -235,7 +246,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomlockedmessage-data} */ - export function locked(message?: string, data?: any): BoomError; + export function locked(message?: string, data?: Data): BoomError; /** * Returns a 428 Precondition Required error @@ -243,7 +254,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boompreconditionrequiredmessage-data} */ - export function preconditionRequired(message?: string, data?: any): BoomError; + export function preconditionRequired(message?: string, data?: Data): BoomError; /** * Returns a 429 Too Many Requests error @@ -251,7 +262,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomtoomanyrequestsmessage-data} */ - export function tooManyRequests(message?: string, data?: any): BoomError; + export function tooManyRequests(message?: string, data?: Data): BoomError; /** * Returns a 451 Unavailable For Legal Reasons error @@ -259,7 +270,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomillegalmessage-data} */ - export function illegal(message?: string, data?: any): BoomError; + export function illegal(message?: string, data?: Data): BoomError; // 5xx /** @@ -269,7 +280,16 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boombadimplementationmessage-data---alias-internal} */ - export function badImplementation(message?: string, data?: any): BoomError; + export function badImplementation(message?: string, data?: Data): BoomError; + + /** + * Returns a 500 Internal Server Error error + * Only 500 errors will hide your message from the end user. Your message is recorded in the server log. + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boombadimplementationmessage-data---alias-internal} + */ + export function internal(message?: string, data?: Data): BoomError; /** * Returns a 501 Not Implemented error with your error message to the user @@ -277,7 +297,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomnotimplementedmessage-data} */ - export function notImplemented(message?: string, data?: any): BoomError; + export function notImplemented(message?: string, data?: Data): BoomError; /** * Returns a 502 Bad Gateway error with your error message to the user @@ -285,7 +305,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boombadgatewaymessage-data} */ - export function badGateway(message?: string, data?: any): BoomError; + export function badGateway(message?: string, data?: Data): BoomError; /** * Returns a 503 Service Unavailable error with your error message to the user @@ -293,7 +313,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomserverunavailablemessage-data} */ - export function serverUnavailable(message?: string, data?: any): BoomError; + export function serverUnavailable(message?: string, data?: Data): BoomError; /** * Returns a 504 Gateway Time-out error with your error message to the user @@ -301,5 +321,5 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomgatewaytimeoutmessage-data} */ - export function gatewayTimeout(message?: string, data?: any): BoomError; + export function gatewayTimeout(message?: string, data?: Data): BoomError; } diff --git a/types/bootbox/index.d.ts b/types/bootbox/index.d.ts index 28d30e2ba0..7007d80feb 100644 --- a/types/bootbox/index.d.ts +++ b/types/bootbox/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/makeusabrew/bootbox // Definitions by: Vincent Bortone , Kon Pik , Anup Kattel , Dominik Schroeter , Troy McKinnon , Stanny Nuytkens // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bootpag/index.d.ts b/types/bootpag/index.d.ts index 2063cf5b93..20fee59ff2 100644 --- a/types/bootpag/index.d.ts +++ b/types/bootpag/index.d.ts @@ -2,6 +2,7 @@ // Project: http://botmonster.com/jquery-bootpag/ // Definitions by: MAF.DAP / Romain Deneau // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bootstrap-datepicker/index.d.ts b/types/bootstrap-datepicker/index.d.ts index 5a6e80f72e..9287ee1ba3 100644 --- a/types/bootstrap-datepicker/index.d.ts +++ b/types/bootstrap-datepicker/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/eternicode/bootstrap-datepicker // Definitions by: Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -17,25 +18,28 @@ interface DatepickerOptions { format?: string | DatepickerCustomFormatOptions; weekStart?: number; - startDate?: any; - endDate?: any; + startDate?: Date|string; + endDate?: Date|string; autoclose?: boolean; startView?: number; - todayBtn?: any; + todayBtn?: boolean|"linked"; todayHighlight?: boolean; keyboardNavigation?: boolean; language?: string; - beforeShowDay?: (date: any) => any; + beforeShowDay?: (date: Date) => undefined|string|boolean|DatepickerBeforeShowDayResponse; + beforeShowYear?: (date: Date) => undefined|string|boolean|DatepickerBeforeShowResponse; + beforeShowDecade?: (date: Date) => undefined|string|boolean|DatepickerBeforeShowResponse; + beforeShowCentury?: (date: Date) => undefined|string|boolean|DatepickerBeforeShowResponse; calendarWeeks?: boolean; clearBtn?: boolean; daysOfWeekDisabled?: number[]; forceParse?: boolean; inputs?: any[]; - minViewMode?: any; - multidate?: any; + minViewMode?: 0|"days"|1|"months"|2|"years"|3|"decades"|4|"centuries"|"millenium"; + multidate?: boolean|number; multidateSeparator?: string; - orientation?: string; - assumeNearbyYear?: any; + orientation?: "auto"|"left top"|"left bottom"|"right top"|"right bottom"; + assumeNearbyYear?: boolean|number; viewMode?: string; templates?: any; zIndexOffset?: number; @@ -43,6 +47,28 @@ interface DatepickerOptions { immediateUpdates?: boolean; title?: string; container?: string; + datesDisabled?:string|string[]; + daysOfWeekHighlighted?:string|number[]; + defaultViewDate?:Date|string|DatepickerViewDate; + updateViewDate?:boolean; +} + +interface DatepickerViewDate { + year:number; + /** Month starting with 0 */ + month:number; + /** Day of the month starting with 1 */ + day:number; +} + +interface DatepickerBeforeShowResponse { + enabled?:boolean; + classes?: string; + tooltip?: string; +} + +interface DatepickerBeforeShowDayResponse extends DatepickerBeforeShowResponse { + content?: string; } interface DatepickerCustomFormatOptions { @@ -52,7 +78,10 @@ interface DatepickerCustomFormatOptions { interface DatepickerEventObject extends JQueryEventObject { date: Date; + dates: Date[]; + format(ix?:number): string; format(format?: string): string; + format(ix?:number, format?: string): string; } interface JQuery { diff --git a/types/bootstrap-fileinput/index.d.ts b/types/bootstrap-fileinput/index.d.ts index b7dcd6fd16..8a7df2dbbc 100644 --- a/types/bootstrap-fileinput/index.d.ts +++ b/types/bootstrap-fileinput/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kartik-v/bootstrap-fileinput // Definitions by: Ché Coxshall // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -1036,4 +1037,4 @@ declare module BootstrapFileInput { */ indicatorLoadingTitle: string; } -} \ No newline at end of file +} diff --git a/types/bootstrap-maxlength/index.d.ts b/types/bootstrap-maxlength/index.d.ts index fefe196dff..e1fd71deb8 100644 --- a/types/bootstrap-maxlength/index.d.ts +++ b/types/bootstrap-maxlength/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/mimo84/bootstrap-maxlength // Definitions by: Dan Manastireanu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bootstrap-notify/index.d.ts b/types/bootstrap-notify/index.d.ts index c6939a7c2c..441bb33c39 100644 --- a/types/bootstrap-notify/index.d.ts +++ b/types/bootstrap-notify/index.d.ts @@ -2,6 +2,7 @@ // Project: http://bootstrap-notify.remabledesigns.com/ // Definitions by: Blake Niemyjski , Robert McIntosh , Robert Voica // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -62,4 +63,4 @@ interface NotifyReturn { $ele: JQueryStatic; close: () => void; update: (command: string, update: any) => void; -} \ No newline at end of file +} diff --git a/types/bootstrap-select/index.d.ts b/types/bootstrap-select/index.d.ts index 5f511685ba..95dd32b348 100644 --- a/types/bootstrap-select/index.d.ts +++ b/types/bootstrap-select/index.d.ts @@ -2,6 +2,7 @@ // Project: https://silviomoreto.github.io/bootstrap-select/ // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bootstrap-slider/bootstrap-slider-tests.ts b/types/bootstrap-slider/bootstrap-slider-tests.ts index df143d4c72..8b59a25a36 100644 --- a/types/bootstrap-slider/bootstrap-slider-tests.ts +++ b/types/bootstrap-slider/bootstrap-slider-tests.ts @@ -1,117 +1,146 @@ -$(function() { +import $ = require('jquery'); + +$(() => { // examples from http://seiyria.github.io/bootstrap-slider/ $('#ex1').slider({ - formatter: function(value) { + formatter(value) { return 'Current value: ' + value; } }); + $('#ex2').slider({}); - - $("#ex2").slider({}); - - var RGBChange = function() { - $('#RGB').css('background', 'rgb('+r.getValue()+','+g.getValue()+','+b.getValue()+')') + const RGBChange = () => { + $('#RGB').css('background', 'rgb(' + r.getValue() + ',' + g.getValue() + ',' + b.getValue() + ')'); }; - var r = $('#R').slider() - .on('slide', RGBChange) - .data('slider'); - var g = $('#G').slider() - .on('slide', RGBChange) - .data('slider'); - var b = $('#B').slider() - .on('slide', RGBChange) - .data('slider'); + const r = $('#R').slider() + .on('slide', RGBChange) + .data('slider'); + const g = $('#G').slider() + .on('slide', RGBChange) + .data('slider'); + const b = $('#B').slider() + .on('slide', RGBChange) + .data('slider'); - - - $("#ex4").slider({ - reversed : true + $('#ex4').slider({ + reversed: true }); + $('#ex5').slider(); - - $("#ex5").slider(); - - $("#destroyEx5Slider").click(function() { - $("#ex5").slider('destroy'); + $('#destroyEx5Slider').click(() => { + $('#ex5').slider('destroy'); }); - - - $("#ex6").slider(); - $("#ex6").on("slide", function(slideEvt) { - $("#ex6SliderVal").text(slideEvt.value); + $('#ex6').slider(); + $('#ex6').on('slide', (slideEvt) => { + $('#ex6SliderVal').text( slideEvt.value); }); + $('#ex7').slider(); - - $("#ex7").slider(); - - $("#ex7-enabled").click(function() { - if((this as HTMLInputElement).checked) { + $('#ex7-enabled').click(function(this: HTMLInputElement) { + if (this.checked) { // With JQuery - $("#ex7").slider("enable"); - } - else { + $('#ex7').slider('enable'); + } else { // With JQuery - $("#ex7").slider("disable"); + $('#ex7').slider('disable'); } }); - - - $("#ex8").slider({ + $('#ex8').slider({ tooltip: 'always' }); - - - $("#ex9").slider({ + $('#ex9').slider({ precision: 2, value: 8.115 // Slider will instantiate showing 8.12 due to specified precision }); + $('#ex11').slider({ step: 20000, min: 0, max: 200000 }); + $('#ex12a').slider({ id: 'slider12a', min: 0, max: 10, value: 5 }); + $('#ex12b').slider({ id: 'slider12b', min: 0, max: 10, range: true, value: [3, 7] }); + $('#ex12c').slider({ id: 'slider12c', min: 0, max: 10, range: true, value: [3, 7] }); - $("#ex11").slider({step: 20000, min: 0, max: 200000}); - - - - $("#ex12a").slider({ id: "slider12a", min: 0, max: 10, value: 5 }); - $("#ex12b").slider({ id: "slider12b", min: 0, max: 10, range: true, value: [3, 7] }); - $("#ex12c").slider({ id: "slider12c", min: 0, max: 10, range: true, value: [3, 7] }); - - - - $("#ex13").slider({ + $('#ex13').slider({ ticks: [0, 100, 200, 300, 400], ticks_labels: ['$0', '$100', '$200', '$300', '$400'], ticks_snap_bounds: 30 }); - - - $("#ex14").slider({ + $('#ex14').slider({ ticks: [0, 100, 200, 300, 400], ticks_positions: [0, 30, 60, 70, 90, 100], ticks_labels: ['$0', '$100', '$200', '$300', '$400'], ticks_snap_bounds: 30 }); - - - $("#ex15").slider({ + $('#ex15').slider({ min: 1000, max: 10000000, scale: 'logarithmic', step: 10 }); + $('#ex16a').slider({ min: 0, max: 10, value: 0, focus: true }); + $('#ex16b').slider({ min: 0, max: 10, value: [0, 10], focus: true }); + // examples from https://github.com/seiyria/bootstrap-slider/blob/master/README.md - $("#ex16a").slider({ min: 0, max: 10, value: 0, focus: true }); - $("#ex16b").slider({ min: 0, max: 10, value: [0, 10], focus: true }); + { + // Instantiate a slider + const mySlider = $('input.slider').slider(); + + // Call a method on the slider + const value = mySlider.slider('getValue'); + + // For non-getter methods, you can chain together commands + mySlider + .slider('setValue', 5) + .slider('setValue', 7); + } + + { // Instantiate a slider + const mySlider = $('input.slider').bootstrapSlider(); + + // Call a method on the slider + const value = mySlider.bootstrapSlider('getValue'); + + // For non-getter methods, you can chain together commands + mySlider + .bootstrapSlider('setValue', 5) + .bootstrapSlider('setValue', 7); + } + + { + // Instantiate a slider + const mySlider = $('input.slider').bootstrapSlider(); + + // Call a method on the slider + const value = mySlider.bootstrapSlider('getValue'); + + // For non-getter methods, you can chain together commands + mySlider + .bootstrapSlider('setValue', 5) + .bootstrapSlider('setValue', 7); + } + + { // Instantiate a slider + const mySlider = new Slider('input.slider', { + // initial options object + }); + + // Call a method on the slider + const value = mySlider.getValue(); + + // For non-getter methods, you can chain together commands + mySlider + .setValue(5) + .setValue(7); + } }); diff --git a/types/bootstrap-slider/index.d.ts b/types/bootstrap-slider/index.d.ts index 9ed5c440c3..557c7aa5ad 100644 --- a/types/bootstrap-slider/index.d.ts +++ b/types/bootstrap-slider/index.d.ts @@ -1,9 +1,11 @@ -// Type definitions for bootstrap-slider.js 4.8.3 +// Type definitions for bootstrap-slider.js 9.8 // Project: https://github.com/seiyria/bootstrap-slider // Definitions by: Daniel Beckwith +// Leonard Thieu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 -/// +/// interface SliderOptions { /** @@ -40,7 +42,7 @@ interface SliderOptions { * Default: 5 * initial value. Use array to have a range slider. */ - value?: number|number[]; + value?: number | number[]; /** * Default: false * make range slider. Optional if initial value is an array. If initial value is scalar, max will be used for second value. @@ -81,10 +83,12 @@ interface SliderOptions { * formatter callback. Return the value wanted to be displayed in the tooltip * @param val the current value to display */ - formatter?(val:number): string; + formatter?(val: number): string; /** * Default: false - * The natural order is used for the arrow keys. Arrow up select the upper slider value for vertical sliders, arrow right the righter slider value for a horizontal slider - no matter if the slider was reversed or not. By default the arrow keys are oriented by arrow up/right to the higher slider value, arrow down/left to the lower slider value. + * The natural order is used for the arrow keys. Arrow up select the upper slider value for vertical sliders, + * arrow right the righter slider value for a horizontal slider - no matter if the slider was reversed or not. + * By default the arrow keys are oriented by arrow up/right to the higher slider value, arrow down/left to the lower slider value. */ natural_arrow_keys?: boolean; /** @@ -120,12 +124,19 @@ interface SliderOptions { } interface JQuery { + slider: SliderPlugin; + bootstrapSlider: SliderPlugin; + + on(event: 'slide', handler: (slideEvt: SliderEvent) => false | void): this; +} + +interface SliderPlugin { + (methodName: string, ...args: any[]): TJQuery; /** * Creates a slider from the current element. * @param options */ - slider(options?:SliderOptions): JQuery; - slider(methodName:string, ...args:any[]): JQuery; + (options?: SliderOptions): TJQuery; } interface ChangeValue { @@ -133,46 +144,42 @@ interface ChangeValue { newValue: number; } -interface JQueryEventObject { - value: number|ChangeValue; +interface SliderEvent extends JQuery.Event { + value: number | ChangeValue; } -interface SliderStatics { - new (selector: string, opts: SliderOptions): Slider; - prototype: Slider; -} - -declare var Slider: SliderStatics; - /** * This class is actually not used when using the jQuery version of bootstrap-slider * The method documentation is still here thouh. * When using jQuery, slider methods like setValue(3, true) have to be called like $slider.slider('setValue', 3, true) */ -interface Slider extends JQuery { +declare class Slider { + constructor(selector: string, opts: SliderOptions); + /** * Get the current value from the slider */ getValue(): number; /** - * Set a new value for the slider. If optional triggerSlideEvent parameter is true, 'slide' events will be triggered. If optional triggerChangeEvent parameter is true, 'change' events will be triggered. + * Set a new value for the slider. If optional triggerSlideEvent parameter is true, 'slide' events will be triggered. + * If optional triggerChangeEvent parameter is true, 'change' events will be triggered. * @param newValue * @param triggerSlideEvent * @param triggerChangeEvent */ - setValue(newValue:number, triggerSlideEvent?:boolean, triggerChangeEvent?:boolean): void; + setValue(newValue: number, triggerSlideEvent?: boolean, triggerChangeEvent?: boolean): this; /** * Properly clean up and remove the slider instance */ - destroy(): void; + destroy(): this; /** * Disables the slider and prevents the user from changing the value */ - disable(): void; + disable(): this; /** * Enables the slider */ - enable(): void; + enable(): this; /** * Returns true if enabled, false if disabled */ @@ -182,26 +189,18 @@ interface Slider extends JQuery { * @param attribute * @param value */ - setAttribute(attribute:string, value:any): void; + setAttribute(attribute: string, value: any): this; /** * Get the slider's attributes * @param attribute */ - getAttribute(attribute:string): any; + getAttribute(attribute: string): any; /** * Refreshes the current slider */ - refresh(): void; + refresh(): this; /** * Renders the tooltip again, after initialization. Useful in situations when the slider and tooltip are initially hidden. */ - relayout(): void; - on: { - (eventType:string, callback:(eventObject:JQueryEventObject, ...args:any[]) => any): Slider; - (eventType:string, data:any, callback:(eventObject:JQueryEventObject, ...args:any[]) => any): Slider; - (eventType:string, selector:string, callback:(eventObject:JQueryEventObject, ...eventData:any[]) => any): Slider; - (eventType:string, selector:string, data:any, callback:(eventObject:JQueryEventObject, ...eventData:any[]) => any): Slider; - (eventType:{ [key: string]: any; }, selector?:string, data?:any): Slider; - (eventType:{ [key: string]: any; }, data?:any): Slider; - } + relayout(): this; } diff --git a/types/bootstrap-slider/tsconfig.json b/types/bootstrap-slider/tsconfig.json index 7c807ad0d1..a793a1d164 100644 --- a/types/bootstrap-slider/tsconfig.json +++ b/types/bootstrap-slider/tsconfig.json @@ -6,8 +6,8 @@ "dom" ], "noImplicitAny": true, - "noImplicitThis": false, - "strictNullChecks": false, + "noImplicitThis": true, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -20,4 +20,4 @@ "index.d.ts", "bootstrap-slider-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/bootstrap-slider/tslint.json b/types/bootstrap-slider/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/bootstrap-slider/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/bootstrap-switch/index.d.ts b/types/bootstrap-switch/index.d.ts index 670c50c73c..329a58fa53 100644 --- a/types/bootstrap-switch/index.d.ts +++ b/types/bootstrap-switch/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.bootstrap-switch.org/ // Definitions by: John M. Baughman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /** * bootstrap-switch - v3.3.2 Copyright (c) 2012-2013 Mattia Larentis diff --git a/types/bootstrap-table/index.d.ts b/types/bootstrap-table/index.d.ts index 5ed1b5e529..e70ada9e38 100644 --- a/types/bootstrap-table/index.d.ts +++ b/types/bootstrap-table/index.d.ts @@ -2,6 +2,7 @@ // Project: http://bootstrap-table.wenzhixin.net.cn/ // Definitions by: Talat Baig // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bootstrap-touchspin/index.d.ts b/types/bootstrap-touchspin/index.d.ts index 3026560f02..126cdd36f3 100644 --- a/types/bootstrap-touchspin/index.d.ts +++ b/types/bootstrap-touchspin/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.virtuosoft.eu/code/bootstrap-touchspin/ // Definitions by: Albin Sunnanbo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bootstrap-validator/index.d.ts b/types/bootstrap-validator/index.d.ts index 92dee2c310..e9f2073d70 100644 --- a/types/bootstrap-validator/index.d.ts +++ b/types/bootstrap-validator/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/1000hz/bootstrap-validator // Definitions by: Brady Liles // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bootstrap.paginator/index.d.ts b/types/bootstrap.paginator/index.d.ts index 52aedd0656..b79e7bca0a 100644 --- a/types/bootstrap.paginator/index.d.ts +++ b/types/bootstrap.paginator/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/lyonlai/bootstrap-paginator // Definitions by: derikwhittaker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bootstrap.timepicker/index.d.ts b/types/bootstrap.timepicker/index.d.ts index 417f385526..f0cc7f472b 100644 --- a/types/bootstrap.timepicker/index.d.ts +++ b/types/bootstrap.timepicker/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jdewit/bootstrap-timepicker // Definitions by: derikwhittaker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -44,6 +45,6 @@ interface JQuery { timepicker(options: TimepickerOptions): JQuery; } -interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject { +interface JQueryEventObject { time?: TimepickerTime; } diff --git a/types/bootstrap.v3.datetimepicker/index.d.ts b/types/bootstrap.v3.datetimepicker/index.d.ts index f37a42b67d..0dee893fc5 100644 --- a/types/bootstrap.v3.datetimepicker/index.d.ts +++ b/types/bootstrap.v3.datetimepicker/index.d.ts @@ -2,6 +2,7 @@ // Project: http://eonasdan.github.io/bootstrap-datetimepicker // Definitions by: Katona Péter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // based on the previous version created by Jesica N. Fera /** diff --git a/types/bootstrap.v3.datetimepicker/v3/index.d.ts b/types/bootstrap.v3.datetimepicker/v3/index.d.ts index 2c69607cb9..ecfa6d44c1 100644 --- a/types/bootstrap.v3.datetimepicker/v3/index.d.ts +++ b/types/bootstrap.v3.datetimepicker/v3/index.d.ts @@ -2,6 +2,7 @@ // Project: http://eonasdan.github.io/bootstrap-datetimepicker // Definitions by: Jesica N. Fera // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /** * bootstrap-datetimepicker.js 3.0.0 Copyright (c) 2014 Jonathan Peterson diff --git a/types/bootstrap/index.d.ts b/types/bootstrap/index.d.ts index 4a7d9676be..53d9b45b37 100644 --- a/types/bootstrap/index.d.ts +++ b/types/bootstrap/index.d.ts @@ -2,6 +2,7 @@ // Project: http://twitter.github.com/bootstrap/ // Definitions by: Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/bounce.js/bounce.js-tests.ts b/types/bounce.js/bounce.js-tests.ts index afa0cdcae2..eaf736dee5 100644 --- a/types/bounce.js/bounce.js-tests.ts +++ b/types/bounce.js/bounce.js-tests.ts @@ -2,7 +2,6 @@ import Bounce from 'bounce.js'; -import * as $ from 'jquery'; function test_chaining_transformations() { var bounce = new Bounce(); diff --git a/types/bounce.js/index.d.ts b/types/bounce.js/index.d.ts index 250fef1a51..0db872fb30 100644 --- a/types/bounce.js/index.d.ts +++ b/types/bounce.js/index.d.ts @@ -2,6 +2,7 @@ // Project: http://github.com/tictail/bounce.js // Definitions by: Cherry // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/breeze/breeze-tests.ts b/types/breeze/breeze-tests.ts index 17653706ad..7f46780828 100644 --- a/types/breeze/breeze-tests.ts +++ b/types/breeze/breeze-tests.ts @@ -7,6 +7,11 @@ function test_dataType() { var typ = breeze.DataType.DateTime; var nm = typ.getName(); var dv = typ.defaultValue; + var isDate = typ.isDate; + var isFloat = typ.isFloat; + var isInteger = typ.isInteger; + var isNumeric = typ.isNumeric; + var qjod = typ.quoteJsonOData; var symbs = breeze.DataType.getSymbols(); var x = typ.parentEnum === breeze.DataType; var isFalse = breeze.DataType.contains(breeze.DataType.Double); diff --git a/types/breeze/index.d.ts b/types/breeze/index.d.ts index 323e9a8f87..bfd3479d3c 100644 --- a/types/breeze/index.d.ts +++ b/types/breeze/index.d.ts @@ -16,7 +16,7 @@ // Updated Jul 15 2016 - Added methods to JsonResultsAdapter - Steve Schmitt // Updated Sep 23 2016 - Added core methods // Updated March 5 2017 - Eliminate promises.IPromise and replace with Promise - +// Updated Apr 28 2017 - Fixed DataType declare namespace breeze.core { export interface ErrorCallback { @@ -266,9 +266,33 @@ declare namespace breeze { export class DataTypeSymbol extends breeze.core.EnumSymbol { defaultValue: any; - isNumeric: boolean; - isDate: boolean; + isDate?: boolean; + isFloat?: boolean; + isInteger?: boolean; + isNumeric?: boolean; + quoteJsonOData?: boolean; + + validatorCtor: (context: any) => Validator; + + /** Function to convert a value from string to this DataType. Note that this will be called each time a property is changed, so make it fast. */ + parse?: (val: any, sourceTypeName?: string) => any; + + /** Function to format this DataType for OData queries. */ + fmtOData: (val: any) => any; + + /** Optional function to get the next value for key generation, if this datatype is used as a key. Uses an internal table of previous values. */ + getNext?: () => any; + + /** Optional function to normalize a data value for comparison, if its value cannot be used directly. Note that this will be called each time a property is changed, so make it fast. */ + normalize?: (val: any) => any; + + /** Optional function to get the next value when the datatype is used as a concurrency property. */ + getConcurrencyValue?: (val: any) => any; + + /** Optional function to convert a raw (server) value from string to this DataType. */ + parseRawValue?: (val: any) => any; } + export interface DataType extends breeze.core.IEnum { Binary: DataTypeSymbol; Boolean: DataTypeSymbol; @@ -285,30 +309,16 @@ declare namespace breeze { String: DataTypeSymbol; Time: DataTypeSymbol; Undefined: DataTypeSymbol; - - toDataType(typeName: string): DataTypeSymbol; + + constants: { nextNumber: number, nextNumberIncrement: number, stringPrefix: string }; + + fromEdmDataType(typeName: string): DataTypeSymbol; + fromValue(val: any): DataTypeSymbol; + getComparableFn(dataType: DataTypeSymbol): (value: any) => any; + parseDateAsUTC(source: any): Date; parseDateFromServer(date: any): Date; - defaultValue: any; - isNumeric: boolean; - isInteger: boolean; - - /** Function to convert a value from string to this DataType. Note that this will be called each time a property is changed, so make it fast. */ - parse: (val: any, sourceTypeName: string) => any; - - /** Function to format this DataType for OData queries. */ - fmtOData: (val: any) => any; - - /** Optional function to get the next value for key generation, if this datatype is used as a key. Uses an internal table of previous values. */ - getNext?: () => any; - - /** Optional function to normalize a data value for comparison, if its value cannot be used directly. Note that this will be called each time a property is changed, so make it fast. */ - normalize?: (val: any) => any; - - /** Optional function to get the next value when the datatype is used as a concurrency property. */ - getConcurrencyValue?: (val: any) => any; - - /** Optional function to convert a raw (server) value from string to this DataType. */ - parseRawValue?: (val: any) => any; + parseRawValue(val: any, dataType?: DataTypeSymbol): any; + parseTimeFromServer(source: any): string; } export var DataType: DataType; diff --git a/types/browser-report/browser-report-tests.ts b/types/browser-report/browser-report-tests.ts new file mode 100644 index 0000000000..9f50b5b0f2 --- /dev/null +++ b/types/browser-report/browser-report-tests.ts @@ -0,0 +1,12 @@ +import 'browser-report'; + +function test_sync() { + var browserInfo = window.browserReportSync(); + console.log(browserInfo.browser.name); +} + +function test_async() { + window.browserReport((error, result) => { + console.log(result.ip + ' ' + result.browser.name); + }); +} \ No newline at end of file diff --git a/types/browser-report/index.d.ts b/types/browser-report/index.d.ts new file mode 100644 index 0000000000..c5852aae97 --- /dev/null +++ b/types/browser-report/index.d.ts @@ -0,0 +1,56 @@ +// Type definitions for browser-report v2.2.9 +// Project: https://github.com/JTOne123/browser-report +// Definitions by: Paul Datsiuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Window { + browserReport(result: (error: ErrorEvent, report: ReportResult) => any): void; + browserReportSync(): ReportResult; +} + +interface ReportResult { + "browser": { + "name": string, + "version": string + }, + "cookies": boolean, + "flash": { + "version": string + }, + "ip": string, + "country": { + "name": string, + "code": string, + "city": string, + "latitude" : string, + "longitude": string, + "timezone": string + }, + "java": { + "version": string + }, + "lang": Array, + "os": { + "name": string, + "version": string + }, + "screen": { + "colors": number, + "dppx": number, + "height": number, + "width": number + }, + "scripts": boolean, + "timestamp": string, + "userAgent": string, + "viewport": { + "height": number, + "layout": { + "height": number, + "width": number + } + "width": number, + "zoom": number + } + "websockets": boolean +} \ No newline at end of file diff --git a/types/state-machine/tsconfig.json b/types/browser-report/tsconfig.json similarity index 92% rename from types/state-machine/tsconfig.json rename to types/browser-report/tsconfig.json index 3d1eaef3f7..997b307339 100644 --- a/types/state-machine/tsconfig.json +++ b/types/browser-report/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "state-machine-tests.ts" + "browser-report-tests.ts" ] } \ No newline at end of file diff --git a/types/browser-sync/browser-sync-tests.ts b/types/browser-sync/browser-sync-tests.ts index 43d68326ea..c20f27236a 100644 --- a/types/browser-sync/browser-sync-tests.ts +++ b/types/browser-sync/browser-sync-tests.ts @@ -82,7 +82,7 @@ var has = browserSync.has("My server"); var bs = browserSync.create(); bs.init({ - server: "./app" + server: { index: "./app" } }); bs.reload(); diff --git a/types/browser-sync/index.d.ts b/types/browser-sync/index.d.ts index 84b604c993..449063192d 100644 --- a/types/browser-sync/index.d.ts +++ b/types/browser-sync/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for browser-sync // Project: http://www.browsersync.io/ // Definitions by: Asana , Joe Skeen +// Thomas "Thasmo" Deinhamer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -134,6 +135,12 @@ declare namespace browserSync { * Default: default */ browser?: string | string[]; + /** + * Add HTTP access control (CORS) headers to assets served by Browsersync. + * Default: false + * Note: requires at least version 2.16.0 + */ + cors?: boolean; /** * Requires an internet connection - useful for services such as Typekit as it allows you to configure * domains such as *.xip.io in your kit settings diff --git a/types/browserify/browserify-tests.ts b/types/browserify/browserify-tests.ts index 68ebb59c7f..2a1da315ed 100644 --- a/types/browserify/browserify-tests.ts +++ b/types/browserify/browserify-tests.ts @@ -1,6 +1,7 @@ import browserify = require("browserify"); import fs = require("fs"); import stream = require('stream'); +import insertGlobals = require("insert-module-globals"); var bNoArg = browserify(); @@ -47,4 +48,15 @@ var record_pipeline = b.pipeline.get('record'); b.bundle().pipe(process.stdout); +var argv = { igv: "__filename,__dirname" }; +var insertGlobalVars: insertGlobals.VarsOption = {}; +var wantedGlobalVars = argv.igv.split(','); +Object.keys(insertGlobals.vars).forEach((x) => { + if (wantedGlobalVars.indexOf(x) === -1) { + insertGlobalVars[x] = undefined; + } +}); +var b = browserify('./browser/main.js', { + insertGlobalVars: insertGlobalVars +}); diff --git a/types/browserify/index.d.ts b/types/browserify/index.d.ts index 8554025402..8b51a34dd5 100644 --- a/types/browserify/index.d.ts +++ b/types/browserify/index.d.ts @@ -1,10 +1,12 @@ -// Type definitions for Browserify v12.0.1 +// Type definitions for Browserify 12.0 // Project: http://browserify.org/ -// Definitions by: Andrew Gaspar , John Vilk +// Definitions by: Andrew Gaspar , John Vilk , Leonard Thieu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +import insertGlobals = require('insert-module-globals'); + declare var browserify: browserify.BrowserifyConstructor; export = browserify; @@ -34,13 +36,22 @@ interface FileOptions { // for each file in a bundle. type InputFile = string | NodeJS.ReadableStream | FileOptions; +/** + * Core options pertaining to a Browserify instance, extended by user options + */ +interface CustomOptions { + /** + * Custom properties can be defined on Options. + * These options are forwarded along to module-deps and browser-pack directly. + */ + [propName: string]: any; + /** the directory that Browserify starts bundling from for filenames that start with .. */ + basedir?: string; +} /** * Options pertaining to a Browserify instance. */ -interface Options { - // Custom properties can be defined on Options. - // These options are forwarded along to module-deps and browser-pack directly. - [propName: string]: any; +interface Options extends CustomOptions { // String, file object, or array of those types (they may be mixed) specifying entry file(s). entries?: InputFile | InputFile[]; // an array which will skip all require() and global parsing for each file in the array. @@ -49,8 +60,6 @@ interface Options { // an array of optional extra extensions for the module lookup machinery to use when the extension has not been specified. // By default Browserify considers only .js and .json files in such cases. extensions?: string[]; - // the directory that Browserify starts bundling from for filenames that start with .. - basedir?: string; // an array of directories that Browserify searches when looking for modules which are not referenced using relative path. // Can be absolute or relative to basedir. Equivalent of setting NODE_PATH environmental variable when calling Browserify command. paths?: string[]; @@ -74,7 +83,7 @@ interface Options { // The global export will be sanitized and camel cased. standalone?: string; // will be passed to insert-module-globals as the opts.vars parameter. - insertGlobalVars?: {[globalName: string]: (file: string, basedir: string) => any}; + insertGlobalVars?: insertGlobals.VarsOption; // defaults to 'require' in expose mode but you can use another name. externalRequireName?: string; } @@ -113,32 +122,32 @@ interface BrowserifyObject extends NodeJS.EventEmitter { * If file is an array, each item in file will be externalized. * If file is another bundle, that bundle's contents will be read and excluded from the current bundle as the bundle in file gets bundled. */ - external(file: string[], opts?: { basedir?: string }): BrowserifyObject; - external(file: string, opts?: { basedir?: string }): BrowserifyObject; + external(file: string[], opts?: CustomOptions): BrowserifyObject; + external(file: string, opts?: CustomOptions): BrowserifyObject; external(file: BrowserifyObject): BrowserifyObject; /** * Prevent the module name or file at file from showing up in the output bundle. * Instead you will get a file with module.exports = {}. */ - ignore(file: string, opts?: { basedir?: string }): BrowserifyObject; + ignore(file: string, opts?: CustomOptions): BrowserifyObject; /** * Prevent the module name or file at file from showing up in the output bundle. * If your code tries to require() that file it will throw unless you've provided another mechanism for loading it. */ - exclude(file: string, opts?: { basedir?: string }): BrowserifyObject; + exclude(file: string, opts?: CustomOptions): BrowserifyObject; /** * Transform source code before parsing it for require() calls with the transform function or module name tr. * If tr is a function, it will be called with tr(file) and it should return a through-stream that takes the raw file contents and produces the transformed source. * If tr is a string, it should be a module name or file path of a transform module */ - transform(tr: string, opts?: T): BrowserifyObject; - transform(tr: (file: string, opts: T) => NodeJS.ReadWriteStream, opts?: T): BrowserifyObject; + transform(tr: string, opts?: T): BrowserifyObject; + transform(tr: (file: string, opts: T) => NodeJS.ReadWriteStream, opts?: T): BrowserifyObject; /** * Register a plugin with opts. Plugins can be a string module name or a function the same as transforms. * plugin(b, opts) is called with the Browserify instance b. */ - plugin(plugin: string, opts?: T): BrowserifyObject; - plugin(plugin: (b: BrowserifyObject, opts: T) => any, opts?: T): BrowserifyObject; + plugin(plugin: string, opts?: T): BrowserifyObject; + plugin(plugin: (b: BrowserifyObject, opts: T) => any, opts?: T): BrowserifyObject; /** * Reset the pipeline back to a normal state. This function is called automatically when bundle() is called multiple times. * This function triggers a 'reset' event. diff --git a/types/bufferstream/postbuffer.d.ts b/types/bufferstream/postbuffer.d.ts index f8591771cc..bd348b84db 100644 --- a/types/bufferstream/postbuffer.d.ts +++ b/types/bufferstream/postbuffer.d.ts @@ -8,5 +8,5 @@ declare class PostBuffer extends BufferStream { /** set a callback to get all post data from a http server request */ onEnd(callback: (data: any) => void): void; /** pumps data into another stream to allow incoming streams given options will be passed to Stream.pipe */ - pipe(stream: NodeJS.WritableStream, options?: BufferStream.Opts): NodeJS.ReadableStream; + pipe(stream: NodeJS.WritableStream, options?: { end?: boolean }): NodeJS.ReadableStream; } diff --git a/types/bull/bull-tests.tsx b/types/bull/bull-tests.tsx index fcf339b3c3..cbdcc83e0a 100644 --- a/types/bull/bull-tests.tsx +++ b/types/bull/bull-tests.tsx @@ -2,71 +2,92 @@ * Created by Bruno Grieder */ -import * as Queue from "bull" +import * as Redis from "ioredis"; +import * as Queue from "bull"; -var videoQueue = Queue( 'video transcoding', 6379, '127.0.0.1' ); -var audioQueue = Queue( 'audio transcoding', 6379, '127.0.0.1' ); -var imageQueue = Queue( 'image transcoding', 6379, '127.0.0.1' ); - -videoQueue.process( ( job: Queue.Job, done: Queue.DoneCallback ) => { +const videoQueue = new Queue('video transcoding', 'redis://127.0.0.1:6379'); +const audioQueue = new Queue('audio transcoding', {redis: {port: 6379, host: '127.0.0.1'}}); // Specify Redis connection using object +const imageQueue = new Queue('image transcoding'); +videoQueue.process((job, done) => { // job.data contains the custom data passed when the job was created // job.jobId contains id of this job. // transcode video asynchronously and report progress - job.progress( 42 ); + job.progress(42); // call done when finished done(); // or give a error if error - done( Error( 'error transcoding' ) ); + done(new Error('error transcoding')); // or pass it a result - done( null, { framerate: 29.5 /* etc... */ } ); + done(null, { framerate: 29.5 /* etc... */ }); // If the job throws an unhandled exception it is also handled correctly - throw (Error( 'some unexpected error' )); -} ); + throw new Error('some unexpected error'); +}); -audioQueue.process( ( job: Queue.Job, done: Queue.DoneCallback ) => { +audioQueue.process((job, done) => { // transcode audio asynchronously and report progress - job.progress( 42 ); + job.progress(42); // call done when finished done(); // or give a error if error - done( Error( 'error transcoding' ) ); + done(new Error('error transcoding')); // or pass it a result - done( null, { samplerate: 48000 /* etc... */ } ); + done(null, { samplerate: 48000 /* etc... */ }); // If the job throws an unhandled exception it is also handled correctly - throw (Error( 'some unexpected error' )); -} ); + throw new Error('some unexpected error'); +}); -imageQueue.process( ( job: Queue.Job, done: Queue.DoneCallback ) => { +imageQueue.process((job, done) => { // transcode image asynchronously and report progress - job.progress( 42 ); + job.progress(42); // call done when finished done(); // or give a error if error - done( Error( 'error transcoding' ) ); + done(new Error('error transcoding')); // or pass it a result - done( null, { width: 1280, height: 720 /* etc... */ } ); + done(null, { width: 1280, height: 720 /* etc... */ }); // If the job throws an unhandled exception it is also handled correctly - throw (Error( 'some unexpected error' )); -} ); + throw new Error('some unexpected error'); +}); -videoQueue.add( { video: 'http://example.com/video1.mov' } ); -audioQueue.add( { audio: 'http://example.com/audio1.mp3' } ); -imageQueue.add( { image: 'http://example.com/image1.tiff' } ); +videoQueue.add({video: 'http://example.com/video1.mov'}); +audioQueue.add({audio: 'http://example.com/audio1.mp3'}); +imageQueue.add({image: 'http://example.com/image1.tiff'}); +////////////////////////////////////////////////////////////////////////////////// +// +// Re-using Redis Connections +// +////////////////////////////////////////////////////////////////////////////////// + +const client = new Redis(); +const subscriber = new Redis(); + +const pdfQueue = new Queue('pdf transcoding', { + createClient: (type: string, options: Redis.RedisOptions) => { + switch (type) { + case 'client': + return client; + case 'subscriber': + return subscriber; + default: + return new Redis(options); + } + } +}); ////////////////////////////////////////////////////////////////////////////////// // @@ -74,42 +95,38 @@ imageQueue.add( { image: 'http://example.com/image1.tiff' } ); // ////////////////////////////////////////////////////////////////////////////////// -const fetchVideo = ( url: string ): Promise => { return null } -const transcodeVideo = ( data: any ): Promise => { return null } +pdfQueue.process((job) => { + // Processors can also return promises instead of using the done callback + return Promise.resolve(); +}); -interface VideoJob extends Queue.Job { - data: {url: string} -} - - -videoQueue.process( ( job: VideoJob ) => { // don't forget to remove the done callback! - // Simply return a promise - fetchVideo( job.data.url ).then( transcodeVideo ); - - // Handles promise rejection - Promise.reject( new Error( 'error transcoding' ) ); - - // Passes the value the promise is resolved with to the "completed" event - Promise.resolve( { framerate: 29.5 /* etc... */ } ); - - // same as - Promise.reject( new Error( 'some unexpected error' ) ); - - // If the job throws an unhandled exception it is also handled correctly - throw new Error( 'some unexpected error' ); -} ); - - -var addVideo1Job = videoQueue.add( { video: 'http://example.com/video1.mov' } ); - -addVideo1Job.then((video1Job) => { +videoQueue.add({ video: 'http://example.com/video1.mov' }, { jobId: 1 }) +.then((video1Job) => { // When job has successfully be placed in the queue the job is returned // then wait for completion return video1Job.finished(); }) .then(() => { - // video1Job completed successfully + // completed successfully }) .catch((err) => { // error }); + +////////////////////////////////////////////////////////////////////////////////// +// +// Typed Event Handlers +// +////////////////////////////////////////////////////////////////////////////////// + +pdfQueue +.on('error', (err: Error) => undefined) +.on('active', (job: Queue.Job, jobPromise: Queue.JobPromise) => jobPromise.cancel()) +.on('active', (job: Queue.Job) => undefined) +.on('stalled', (job: Queue.Job) => undefined) +.on('progress', (job: Queue.Job) => undefined) +.on('completed', (job: Queue.Job) => undefined) +.on('failed', (job: Queue.Job) => undefined) +.on('paused', () => undefined) +.on('resumed', () => undefined) +.on('cleaned', (jobs: Queue.Job[], status: Queue.JobStatus) => undefined); diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 3c89655101..82a31a4ff3 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -1,316 +1,414 @@ -// Type definitions for bull 2.1.2 +// Type definitions for bull 3.0 // Project: https://github.com/OptimalBits/bull -// Definitions by: Bruno Grieder , Cameron Crothers +// Definitions by: Bruno Grieder +// Cameron Crothers +// Marshall Cottrell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as Redis from "ioredis"; -declare module "bull" { +/** + * This is the Queue constructor. + * It creates a new Queue that is persisted in Redis. + * Everytime the same queue is instantiated it tries to process all the old jobs that may exist from a previous unfinished session. + */ +declare const Bull: { + // tslint:disable:unified-signatures + (queueName: string, opts?: Bull.QueueOptions): Bull.Queue; + (queueName: string, url?: string): Bull.Queue; + new (queueName: string, opts?: Bull.QueueOptions): Bull.Queue; + new (queueName: string, url?: string): Bull.Queue; + // tslint:enable:unified-signatures +}; - import * as Redis from "redis"; - - /** - * This is the Queue constructor. - * It creates a new Queue that is persisted in Redis. - * Everytime the same queue is instantiated it tries to process all the old jobs that may exist from a previous unfinished session. - */ - function Bull(queueName: string, redisPort: number, redisHost: string, redisOpt?: Redis.ClientOpts): Bull.Queue; - - namespace Bull { - - export interface DoneCallback { - (error?: Error, value?: any): void - } - - export interface Job { - - jobId: string - - /** - * The custom data passed when the job was created - */ - data: Object; - - /** - * Report progress on a job - */ - progress(value: any): Promise; - - /** - * Removes a Job from the queue from all the lists where it may be included. - * @returns {Promise} A promise that resolves when the job is removed. - */ - remove(): Promise; - - /** - * Rerun a Job that has failed. - * @returns {Promise} A promise that resolves when the job is scheduled for retry. - */ - retry(): Promise; - - /** - * Returns a promise the resolves when the job has been finished. - * TODO: Add a watchdog to check if the job has finished periodically. - * since pubsub does not give any guarantees. - */ - finished(): Promise; - } - - export interface Backoff { - - /** - * Backoff type, which can be either `fixed` or `exponential` - */ - type: string - - /** - * Backoff delay, in milliseconds - */ - delay: number; - } - - export interface AddOptions { - /** - * An amount of miliseconds to wait until this job can be processed. - * Note that for accurate delays, both server and clients should have their clocks synchronized - */ - delay?: number; - - /** - * A number of attempts to retry if the job fails [optional] - */ - attempts?: number; - - /** - * Backoff setting for automatic retries if the job fails - */ - backoff?: number | Backoff - - /** - * A boolean which, if true, adds the job to the right - * of the queue instead of the left (default false) - */ - lifo?: boolean; - - /** - * The number of milliseconds after which the job should be fail with a timeout error - */ - timeout?: number; - } - - export interface Queue { - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The callback is called everytime a job is placed in the queue. - * It is passed an instance of the job as first argument. - * - * The done callback can be called with an Error instance, to signal that the job did not complete successfully, - * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. - * Errors will be passed as a second argument to the "failed" event; - * results, as a second argument to the "completed" event. - * - * concurrency: Bull will then call you handler in parallel respecting this max number. - */ - process(concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The callback is called everytime a job is placed in the queue. - * It is passed an instance of the job as first argument. - * - * The done callback can be called with an Error instance, to signal that the job did not complete successfully, - * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. - * Errors will be passed as a second argument to the "failed" event; - * results, as a second argument to the "completed" event. - */ - process(callback: (job: Job, done: DoneCallback) => void): void; - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The callback is called everytime a job is placed in the queue. - * It is passed an instance of the job as first argument. - * - * A promise must be returned to signal job completion. - * If the promise is rejected, the error will be passed as a second argument to the "failed" event. - * If it is resolved, its value will be the "completed" event's second argument. - * - * concurrency: Bull will then call you handler in parallel respecting this max number. - */ - process(concurrency: number, callback: (job: Job) => void): Promise; - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The callback is called everytime a job is placed in the queue. - * It is passed an instance of the job as first argument. - * - * A promise must be returned to signal job completion. - * If the promise is rejected, the error will be passed as a second argument to the "failed" event. - * If it is resolved, its value will be the "completed" event's second argument. - */ - process(callback: (job: Job) => void): Promise; - - // process(callback: (job: Job, done?: DoneCallback) => void): Promise; - - /** - * Creates a new job and adds it to the queue. - * If the queue is empty the job will be executed directly, - * otherwise it will be placed in the queue and executed as soon as possible. - */ - add(data: Object, opts?: AddOptions): Promise; - - /** - * Returns a promise that resolves when the queue is paused. - * The pause is global, meaning that all workers in all queue instances for a given queue will be paused. - * A paused queue will not process new jobs until resumed, - * but current jobs being processed will continue until they are finalized. - * - * Pausing a queue that is already paused does nothing. - */ - pause(): Promise; - - /** - * Returns a promise that resolves when the queue is resumed after being paused. - * The resume is global, meaning that all workers in all queue instances for a given queue will be resumed. - * - * Resuming a queue that is not paused does nothing. - */ - resume(): Promise; - - /** - * Returns a promise that returns the number of jobs in the queue, waiting or paused. - * Since there may be other processes adding or processing jobs, this value may be true only for a very small amount of time. - */ - count(): Promise; - - /** - * Empties a queue deleting all the input lists and associated jobs. - */ - empty(): Promise; - - /** - * Closes the underlying redis client. Use this to perform a graceful shutdown. - * - * `close` can be called from anywhere, with one caveat: - * if called from within a job handler the queue won't close until after the job has been processed - */ - close(): Promise; - - /** - * Returns a promise that will return the job instance associated with the jobId parameter. - * If the specified job cannot be located, the promise callback parameter will be set to null. - */ - getJob(jobId: string): Promise; - - /** - * Tells the queue remove all jobs created outside of a grace period in milliseconds. - * You can clean the jobs with the following states: completed, waiting, active, delayed, and failed. - */ - clean(gracePeriod: number, jobsState?: string): Promise; - - /** - * Listens to queue events - * 'ready', 'error', 'activ', 'progress', 'completed', 'failed', 'paused', 'resumed', 'cleaned' - */ - on(eventName: string, callback: EventCallback): void; - } - - interface EventCallback { - (...args: any[]): void - } - - interface ReadyEventCallback extends EventCallback { - (): void; - } - - interface ErrorEventCallback extends EventCallback { - (error: Error): void; - } - - interface JobPromise { - /** - * Abort this job - */ - cancel(): void - } - - interface ActiveEventCallback extends EventCallback { - (job: Job, jobPromise: JobPromise): void; - } - - interface ProgressEventCallback extends EventCallback { - (job: Job, progress: any): void; - } - - interface CompletedEventCallback extends EventCallback { - (job: Job, result: Object): void; - } - - interface FailedEventCallback extends EventCallback { - (job: Job, error: Error): void; - } - - interface PausedEventCallback extends EventCallback { - (): void; - } - - interface ResumedEventCallback extends EventCallback { - (job?: Job): void; - } +declare namespace Bull { + interface QueueOptions { + /** + * Options passed directly to the `ioredis` constructor + */ + redis?: Redis.RedisOptions; /** - * @see clean() for details + * When specified, the `Queue` will use this function to create new `ioredis` client connections. + * This is useful if you want to re-use connections. */ - interface CleanedEventCallback extends EventCallback { - (jobs: Job[], type: string): void; - } + createClient?(type: 'client' | 'subscriber', redisOpts?: Redis.RedisOptions): Redis.Redis; + + /** + * Prefix to use for all redis keys + */ + prefix?: string; + + settings?: AdvancedSettings; } - export = Bull; -} + interface AdvancedSettings { + /** + * Key expiration time for job locks + */ + lockDuration?: number; -declare module "bull/lib/priority-queue" { + /** + * How often check for stalled jobs (use 0 for never checking) + */ + stalledInterval?: number; - import * as Bull from "bull"; - import * as Redis from "redis"; + /** + * Max amount of times a stalled job will be re-processed + */ + maxStalledCount?: number; - /** - * This is the Queue constructor of priority queue. - * - * It works same a normal queue, with same function and parameters. - * The only difference is that the Queue#add() allow an options opts.priority - * that could take ["low", "normal", "medium", "hight", "critical"]. If no options provider, "normal" will be taken. - * - * The priority queue will process more often highter priority jobs than lower. - */ - function PQueue(queueName: string, redisPort: number, redisHost: string, redisOpt?: Redis.ClientOpts): PQueue.PriorityQueue; + /** + * Poll interval for delayed jobs and added jobs + */ + guardInterval?: number; - namespace PQueue { - - export interface AddOptions extends Bull.AddOptions { - - /** - * "low", "normal", "medium", "high", "critical" - */ - priority?: string; - } - - - export interface PriorityQueue extends Bull.Queue { - - /** - * Creates a new job and adds it to the queue. - * If the queue is empty the job will be executed directly, - * otherwise it will be placed in the queue and executed as soon as possible. - */ - add(data: Object, opts?: PQueue.AddOptions): Promise; - - } + /** + * Delay before processing next job in case of internal error + */ + retryProcessDelay?: number; } - export = PQueue; + type DoneCallback = (error?: Error | null, value?: any) => void; + + type JobId = number | string; + + interface Job { + id: JobId; + + /** + * The custom data passed when the job was created + */ + data: any; + + /** + * Report progress on a job + */ + progress(value: any): Promise; + + /** + * Removes a job from the queue and from any lists it may be included in. + * @returns {Promise} A promise that resolves when the job is removed. + */ + remove(): Promise; + + /** + * Re-run a job that has failed. + * @returns {Promise} A promise that resolves when the job is scheduled for retry. + */ + retry(): Promise; + + /** + * Returns a promise the resolves when the job has been finished. + * TODO: Add a watchdog to check if the job has finished periodically. + * since pubsub does not give any guarantees. + */ + finished(): Promise; + } + + type JobStatus = 'completed' | 'waiting' | 'active' | 'delayed' | 'failed'; + + interface BackoffOptions { + /** + * Backoff type, which can be either `fixed` or `exponential` + */ + type: 'fixed' | 'exponential'; + + /** + * Backoff delay, in milliseconds + */ + delay: number; + } + + interface RepeatOptions { + /** + * Cron pattern specifying when the job should execute + */ + cron: string; + + /** + * Timezone + */ + tz?: string; + + /** + * End date when the repeat job should stop repeating + */ + endDate?: Date | string | number; + } + + interface JobOptions { + /** + * Optional priority value. ranges from 1 (highest priority) to MAX_INT (lowest priority). + * Note that using priorities has a slight impact on performance, so do not use it if not required + */ + priority?: number; + + /** + * An amount of miliseconds to wait until this job can be processed. + * Note that for accurate delays, both server and clients should have their clocks synchronized. [optional] + */ + delay?: number; + + /** + * The total number of attempts to try the job until it completes + */ + attempts?: number; + + /** + * Repeat job according to a cron specification + */ + repeat?: RepeatOptions; + + /** + * Backoff setting for automatic retries if the job fails + */ + backoff?: number | BackoffOptions; + + /** + * A boolean which, if true, adds the job to the right + * of the queue instead of the left (default false) + */ + lifo?: boolean; + + /** + * The number of milliseconds after which the job should be fail with a timeout error + */ + timeout?: number; + + /** + * Override the job ID - by default, the job ID is a unique + * integer, but you can use this setting to override it. + * If you use this option, it is up to you to ensure the + * jobId is unique. If you attempt to add a job with an id that + * already exists, it will not be added. + */ + jobId?: JobId; + + /** + * A boolean which, if true, removes the job when it successfully completes. + * Default behavior is to keep the job in the completed set. + */ + removeOnComplete?: boolean; + + /** + * A boolean which, if true, removes the job when it fails after all attempts + * Default behavior is to keep the job in the completed set. + */ + removeOnFail?: boolean; + } + + interface JobCounts { + wait: number; + active: number; + completed: number; + failed: number; + delayed: number; + } + + interface Queue { + /** + * Returns a promise that resolves when Redis is connected and the queue is ready to accept jobs. + * This replaces the `ready` event emitted on Queue in previous verisons. + */ + isReady(): Promise; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * + * The done callback can be called with an Error instance, to signal that the job did not complete successfully, + * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. + * Errors will be passed as a second argument to the "failed" event; + * results, as a second argument to the "completed" event. + * + * concurrency: Bull will then call you handler in parallel respecting this max number. + */ + process(concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * + * The done callback can be called with an Error instance, to signal that the job did not complete successfully, + * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. + * Errors will be passed as a second argument to the "failed" event; + * results, as a second argument to the "completed" event. + */ + process(callback: (job: Job, done: DoneCallback) => void): void; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + * + * concurrency: Bull will then call you handler in parallel respecting this max number. + */ + process(concurrency: number, callback: (job: Job) => void): Promise; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + */ + process(callback: (job: Job) => void): Promise; + + /** + * Creates a new job and adds it to the queue. + * If the queue is empty the job will be executed directly, + * otherwise it will be placed in the queue and executed as soon as possible. + */ + add(data: any, opts?: JobOptions): Promise; + + /** + * Returns a promise that resolves when the queue is paused. + * The pause is global, meaning that all workers in all queue instances for a given queue will be paused. + * A paused queue will not process new jobs until resumed, + * but current jobs being processed will continue until they are finalized. + * + * Pausing a queue that is already paused does nothing. + */ + pause(): Promise; + + /** + * Returns a promise that resolves when the queue is resumed after being paused. + * The resume is global, meaning that all workers in all queue instances for a given queue will be resumed. + * + * Resuming a queue that is not paused does nothing. + */ + resume(): Promise; + + /** + * Returns a promise that returns the number of jobs in the queue, waiting or paused. + * Since there may be other processes adding or processing jobs, this value may be true only for a very small amount of time. + */ + count(): Promise; + + /** + * Empties a queue deleting all the input lists and associated jobs. + */ + empty(): Promise; + + /** + * Closes the underlying redis client. Use this to perform a graceful shutdown. + * + * `close` can be called from anywhere, with one caveat: + * if called from within a job handler the queue won't close until after the job has been processed + */ + close(): Promise; + + /** + * Returns a promise that will return the job instance associated with the jobId parameter. + * If the specified job cannot be located, the promise callback parameter will be set to null. + */ + getJob(jobId: JobId): Promise; + + /** + * Returns a promise that resolves with the job counts for the given queue + */ + getJobCounts(): Promise; + + /** + * Tells the queue remove all jobs created outside of a grace period in milliseconds. + * You can clean the jobs with the following states: completed, waiting, active, delayed, and failed. + */ + clean(grace: number, status?: JobStatus, limit?: number): Promise; + + // tslint:disable:unified-signatures + + /** + * Listens to queue events + */ + on(event: string, callback: (...args: any[]) => void): this; + + /** + * An error occured + */ + on(event: 'error', callback: ErrorEventCallback): this; + + /** + * A job has started. You can use `jobPromise.cancel()` to abort it + */ + on(event: 'active', callback: ActiveEventCallback): this; + + /** + * A job has been marked as stalled. + * This is useful for debugging job workers that crash or pause the event loop. + */ + on(event: 'stalled', callback: StalledEventCallback): this; + + /** + * A job's progress was updated + */ + on(event: 'progress', callback: ProgressEventCallback): this; + + /** + * A job successfully completed with a `result` + */ + on(event: 'completed', callback: CompletedEventCallback): this; + + /** + * A job failed with `err` as the reason + */ + on(event: 'failed', callback: FailedEventCallback): this; + + /** + * The queue has been paused + */ + on(event: 'paused', callback: EventCallback): this; + + /** + * The queue has been resumed + */ + on(event: 'resumed', callback: EventCallback): this; + + /** + * Old jobs have been cleaned from the queue. + * `jobs` is an array of jobs that were removed, and `type` is the type of those jobs. + * + * @see Queue#clean() for details + */ + on(event: 'cleaned', callback: CleanedEventCallback): this; + + // tslint:enable:unified-signatures + } + + type EventCallback = () => void; + + type ErrorEventCallback = (error: Error) => void; + + interface JobPromise { + /** + * Abort this job + */ + cancel(): void; + } + + type ActiveEventCallback = (job: Job, jobPromise?: JobPromise) => void; + + type StalledEventCallback = (job: Job) => void; + + type ProgressEventCallback = (job: Job, progress: any) => void; + + type CompletedEventCallback = (job: Job, result: any) => void; + + type FailedEventCallback = (job: Job, error: Error) => void; + + type CleanedEventCallback = (jobs: Job[], status: JobStatus) => void; } + +export = Bull; diff --git a/types/bull/tsconfig.json b/types/bull/tsconfig.json index 56a53750f3..0751a977c1 100644 --- a/types/bull/tsconfig.json +++ b/types/bull/tsconfig.json @@ -1,16 +1,12 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6" - ], + "lib": [ "es6" ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": [ "../" ], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/bull/tslint.json b/types/bull/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/bull/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/bull/v2/bull-tests.tsx b/types/bull/v2/bull-tests.tsx new file mode 100644 index 0000000000..fcf339b3c3 --- /dev/null +++ b/types/bull/v2/bull-tests.tsx @@ -0,0 +1,115 @@ +/** + * Created by Bruno Grieder + */ + +import * as Queue from "bull" + +var videoQueue = Queue( 'video transcoding', 6379, '127.0.0.1' ); +var audioQueue = Queue( 'audio transcoding', 6379, '127.0.0.1' ); +var imageQueue = Queue( 'image transcoding', 6379, '127.0.0.1' ); + +videoQueue.process( ( job: Queue.Job, done: Queue.DoneCallback ) => { + + // job.data contains the custom data passed when the job was created + // job.jobId contains id of this job. + + // transcode video asynchronously and report progress + job.progress( 42 ); + + // call done when finished + done(); + + // or give a error if error + done( Error( 'error transcoding' ) ); + + // or pass it a result + done( null, { framerate: 29.5 /* etc... */ } ); + + // If the job throws an unhandled exception it is also handled correctly + throw (Error( 'some unexpected error' )); +} ); + +audioQueue.process( ( job: Queue.Job, done: Queue.DoneCallback ) => { + // transcode audio asynchronously and report progress + job.progress( 42 ); + + // call done when finished + done(); + + // or give a error if error + done( Error( 'error transcoding' ) ); + + // or pass it a result + done( null, { samplerate: 48000 /* etc... */ } ); + + // If the job throws an unhandled exception it is also handled correctly + throw (Error( 'some unexpected error' )); +} ); + +imageQueue.process( ( job: Queue.Job, done: Queue.DoneCallback ) => { + // transcode image asynchronously and report progress + job.progress( 42 ); + + // call done when finished + done(); + + // or give a error if error + done( Error( 'error transcoding' ) ); + + // or pass it a result + done( null, { width: 1280, height: 720 /* etc... */ } ); + + // If the job throws an unhandled exception it is also handled correctly + throw (Error( 'some unexpected error' )); +} ); + +videoQueue.add( { video: 'http://example.com/video1.mov' } ); +audioQueue.add( { audio: 'http://example.com/audio1.mp3' } ); +imageQueue.add( { image: 'http://example.com/image1.tiff' } ); + + +////////////////////////////////////////////////////////////////////////////////// +// +// Using Promises +// +////////////////////////////////////////////////////////////////////////////////// + +const fetchVideo = ( url: string ): Promise => { return null } +const transcodeVideo = ( data: any ): Promise => { return null } + +interface VideoJob extends Queue.Job { + data: {url: string} +} + + +videoQueue.process( ( job: VideoJob ) => { // don't forget to remove the done callback! + // Simply return a promise + fetchVideo( job.data.url ).then( transcodeVideo ); + + // Handles promise rejection + Promise.reject( new Error( 'error transcoding' ) ); + + // Passes the value the promise is resolved with to the "completed" event + Promise.resolve( { framerate: 29.5 /* etc... */ } ); + + // same as + Promise.reject( new Error( 'some unexpected error' ) ); + + // If the job throws an unhandled exception it is also handled correctly + throw new Error( 'some unexpected error' ); +} ); + + +var addVideo1Job = videoQueue.add( { video: 'http://example.com/video1.mov' } ); + +addVideo1Job.then((video1Job) => { + // When job has successfully be placed in the queue the job is returned + // then wait for completion + return video1Job.finished(); +}) +.then(() => { + // video1Job completed successfully +}) +.catch((err) => { + // error +}); diff --git a/types/bull/v2/index.d.ts b/types/bull/v2/index.d.ts new file mode 100644 index 0000000000..3c89655101 --- /dev/null +++ b/types/bull/v2/index.d.ts @@ -0,0 +1,316 @@ +// Type definitions for bull 2.1.2 +// Project: https://github.com/OptimalBits/bull +// Definitions by: Bruno Grieder , Cameron Crothers +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "bull" { + + import * as Redis from "redis"; + + /** + * This is the Queue constructor. + * It creates a new Queue that is persisted in Redis. + * Everytime the same queue is instantiated it tries to process all the old jobs that may exist from a previous unfinished session. + */ + function Bull(queueName: string, redisPort: number, redisHost: string, redisOpt?: Redis.ClientOpts): Bull.Queue; + + namespace Bull { + + export interface DoneCallback { + (error?: Error, value?: any): void + } + + export interface Job { + + jobId: string + + /** + * The custom data passed when the job was created + */ + data: Object; + + /** + * Report progress on a job + */ + progress(value: any): Promise; + + /** + * Removes a Job from the queue from all the lists where it may be included. + * @returns {Promise} A promise that resolves when the job is removed. + */ + remove(): Promise; + + /** + * Rerun a Job that has failed. + * @returns {Promise} A promise that resolves when the job is scheduled for retry. + */ + retry(): Promise; + + /** + * Returns a promise the resolves when the job has been finished. + * TODO: Add a watchdog to check if the job has finished periodically. + * since pubsub does not give any guarantees. + */ + finished(): Promise; + } + + export interface Backoff { + + /** + * Backoff type, which can be either `fixed` or `exponential` + */ + type: string + + /** + * Backoff delay, in milliseconds + */ + delay: number; + } + + export interface AddOptions { + /** + * An amount of miliseconds to wait until this job can be processed. + * Note that for accurate delays, both server and clients should have their clocks synchronized + */ + delay?: number; + + /** + * A number of attempts to retry if the job fails [optional] + */ + attempts?: number; + + /** + * Backoff setting for automatic retries if the job fails + */ + backoff?: number | Backoff + + /** + * A boolean which, if true, adds the job to the right + * of the queue instead of the left (default false) + */ + lifo?: boolean; + + /** + * The number of milliseconds after which the job should be fail with a timeout error + */ + timeout?: number; + } + + export interface Queue { + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * + * The done callback can be called with an Error instance, to signal that the job did not complete successfully, + * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. + * Errors will be passed as a second argument to the "failed" event; + * results, as a second argument to the "completed" event. + * + * concurrency: Bull will then call you handler in parallel respecting this max number. + */ + process(concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * + * The done callback can be called with an Error instance, to signal that the job did not complete successfully, + * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. + * Errors will be passed as a second argument to the "failed" event; + * results, as a second argument to the "completed" event. + */ + process(callback: (job: Job, done: DoneCallback) => void): void; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + * + * concurrency: Bull will then call you handler in parallel respecting this max number. + */ + process(concurrency: number, callback: (job: Job) => void): Promise; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + */ + process(callback: (job: Job) => void): Promise; + + // process(callback: (job: Job, done?: DoneCallback) => void): Promise; + + /** + * Creates a new job and adds it to the queue. + * If the queue is empty the job will be executed directly, + * otherwise it will be placed in the queue and executed as soon as possible. + */ + add(data: Object, opts?: AddOptions): Promise; + + /** + * Returns a promise that resolves when the queue is paused. + * The pause is global, meaning that all workers in all queue instances for a given queue will be paused. + * A paused queue will not process new jobs until resumed, + * but current jobs being processed will continue until they are finalized. + * + * Pausing a queue that is already paused does nothing. + */ + pause(): Promise; + + /** + * Returns a promise that resolves when the queue is resumed after being paused. + * The resume is global, meaning that all workers in all queue instances for a given queue will be resumed. + * + * Resuming a queue that is not paused does nothing. + */ + resume(): Promise; + + /** + * Returns a promise that returns the number of jobs in the queue, waiting or paused. + * Since there may be other processes adding or processing jobs, this value may be true only for a very small amount of time. + */ + count(): Promise; + + /** + * Empties a queue deleting all the input lists and associated jobs. + */ + empty(): Promise; + + /** + * Closes the underlying redis client. Use this to perform a graceful shutdown. + * + * `close` can be called from anywhere, with one caveat: + * if called from within a job handler the queue won't close until after the job has been processed + */ + close(): Promise; + + /** + * Returns a promise that will return the job instance associated with the jobId parameter. + * If the specified job cannot be located, the promise callback parameter will be set to null. + */ + getJob(jobId: string): Promise; + + /** + * Tells the queue remove all jobs created outside of a grace period in milliseconds. + * You can clean the jobs with the following states: completed, waiting, active, delayed, and failed. + */ + clean(gracePeriod: number, jobsState?: string): Promise; + + /** + * Listens to queue events + * 'ready', 'error', 'activ', 'progress', 'completed', 'failed', 'paused', 'resumed', 'cleaned' + */ + on(eventName: string, callback: EventCallback): void; + } + + interface EventCallback { + (...args: any[]): void + } + + interface ReadyEventCallback extends EventCallback { + (): void; + } + + interface ErrorEventCallback extends EventCallback { + (error: Error): void; + } + + interface JobPromise { + /** + * Abort this job + */ + cancel(): void + } + + interface ActiveEventCallback extends EventCallback { + (job: Job, jobPromise: JobPromise): void; + } + + interface ProgressEventCallback extends EventCallback { + (job: Job, progress: any): void; + } + + interface CompletedEventCallback extends EventCallback { + (job: Job, result: Object): void; + } + + interface FailedEventCallback extends EventCallback { + (job: Job, error: Error): void; + } + + interface PausedEventCallback extends EventCallback { + (): void; + } + + interface ResumedEventCallback extends EventCallback { + (job?: Job): void; + } + + /** + * @see clean() for details + */ + interface CleanedEventCallback extends EventCallback { + (jobs: Job[], type: string): void; + } + } + + export = Bull; +} + +declare module "bull/lib/priority-queue" { + + import * as Bull from "bull"; + import * as Redis from "redis"; + + /** + * This is the Queue constructor of priority queue. + * + * It works same a normal queue, with same function and parameters. + * The only difference is that the Queue#add() allow an options opts.priority + * that could take ["low", "normal", "medium", "hight", "critical"]. If no options provider, "normal" will be taken. + * + * The priority queue will process more often highter priority jobs than lower. + */ + function PQueue(queueName: string, redisPort: number, redisHost: string, redisOpt?: Redis.ClientOpts): PQueue.PriorityQueue; + + namespace PQueue { + + export interface AddOptions extends Bull.AddOptions { + + /** + * "low", "normal", "medium", "high", "critical" + */ + priority?: string; + } + + + export interface PriorityQueue extends Bull.Queue { + + /** + * Creates a new job and adds it to the queue. + * If the queue is empty the job will be executed directly, + * otherwise it will be placed in the queue and executed as soon as possible. + */ + add(data: Object, opts?: PQueue.AddOptions): Promise; + + } + } + + export = PQueue; +} diff --git a/types/bull/v2/tsconfig.json b/types/bull/v2/tsconfig.json new file mode 100644 index 0000000000..12445fc199 --- /dev/null +++ b/types/bull/v2/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ "es6" ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../../", + "typeRoots": [ "../../" ], + "types": [], + "paths": { + "bull": [ "bull/v2" ], + "bull/*": [ "bull/v2/*" ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bull-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/bunnymq/bunnymq-tests.ts b/types/bunnymq/bunnymq-tests.ts index 4105363f25..960c0b6949 100644 --- a/types/bunnymq/bunnymq-tests.ts +++ b/types/bunnymq/bunnymq-tests.ts @@ -1,34 +1,27 @@ import * as bunnymq from "bunnymq"; // Basic usage -var instance = bunnymq({ host: 'amqp://localhost' }); +const instance = bunnymq({ host: "amqp://localhost" }); // Publisher -instance.producer.produce('queue:name', 'Hello World!'); +instance.publish("queue:name", "message"); +instance.producer.produce("queue:name", "message"); + // Subscriber -instance.consumer.consume('queue:name', message => { }); +instance.subscribe("queue:name", (message: string) => "response"); +instance.consumer.consume("queue:name", (message: string) => "response"); // RPC Support -instance.producer.produce('queue:name', { message: 'content' }, { rpc: true }) - .then(function (consumerResponse) { - console.log(consumerResponse); - }); - -// Routing keys -instance.producer.produce('queue:name', { message: 'content' }, { routingKey: 'my-routing-key' }); +instance.publish("queue:name", { message: "content" }, { routingKey: "my-routing-key", rpc: true, timeout: 1000 }).then((consumerResponse: string) => "response"); +instance.producer.produce("queue:name", { message: "content" }, { rpc: true, routingKey: "my-routing-key", timeout: 1000 }); // Config -var custom = bunnymq({ - host: 'amqp://localhost', - //number of fetched messages at once on the channel +const instanceWithCustomOptions = bunnymq({ + host: "amqp://localhost", prefetch: 5, - //requeue put back message into the broker if consumer crashes/trigger exception requeue: true, - //time between two reconnect (ms) timeout: 1000, - consumerSuffix: '', - //generate a hostname so we can track this connection on the broker (rabbitmq management plugin) + consumerSuffix: "", hostname: "", - //the transport to use to debug. if provided, bunnymq will show some logs transport: new Object() -}); \ No newline at end of file +}); diff --git a/types/bunnymq/index.d.ts b/types/bunnymq/index.d.ts index 1167db21ed..c4c0a770e1 100644 --- a/types/bunnymq/index.d.ts +++ b/types/bunnymq/index.d.ts @@ -1,120 +1,98 @@ -// Type definitions for node-bunnymq 2.2.1 +// Type definitions for node-bunnymq 2.3 // Project: https://github.com/dial-once/node-bunnymq // Definitions by: Cyril Schumacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module "bunnymq" { - namespace bunnymq { - export type ConsumerCallback = (message: Object) => void; +declare function bunnymq(options?: bunnymq.Options): bunnymq.Instance; +declare namespace bunnymq { + type ConsumerCallback = (...args: any[]) => T; + type LoggerOutput = (format: any, ...args: any[]) => void; - /** - * Consumer. - * @interface - */ - export interface Consumer { - /** - * Handle messages from a named queue. - * @param {string} queue A named queue. - * @param {ConsumerCallback} callback A callback. - */ - consume(queue: string, callback: ConsumerCallback): void; - } - - /** - * bunnymq instance. - * @interface - */ - export interface Instance { - /** - * Consumer. - * @type {Consumer} - */ - consumer: Consumer; - - /** - * Producer. - * @type {Producer} - */ - producer: Producer; - } - - /** - * Options. - * @interface - */ - export interface Options { - /** - * Consumer suffix. - * @type {string} - */ - consumerSuffix?: string; - - /** - * Host. - * @type {string} - */ - host?: string; - - /** - * Hostname. - * @type {string} - */ - hostname?: string; - - /** - * Number of fetched messages at once on the channel. - * @type {number} - */ - prefetch?: number; - - /** - * Requeue put back message into the broker if consumer crashes/trigger exception. - * @type {boolean} - */ - requeue?: boolean; - - /** - * Time between two reconnect (in milliseconds). - * @type {number} - */ - timeout?: number; - - /** - * Transport. - * @type {any} - */ - transport?: any; - } - - /** - * Producer. - * @inteface - */ - export interface Producer { - /** - * Send messages to a named queue. - * @param {string} queue A named queue. - * @param {Object} message A message. - * @return {Object} The consumer response. - */ - produce(queue: string, message: Object, options?: ProducerOptions): PromiseLike; - } - - /** - * Options for producer. - * @interface - */ - export interface ProducerOptions { - routingKey?: string; - rpc?: boolean; - } + interface Connection { + [address: string]: any; + startedAt: string; } - /** - * Constructor. - * @param {Options} [options] Options. - * @return {Instance} A instance of bunnymq. - */ - function bunnymq(options?: bunnymq.Options): bunnymq.Instance; - export = bunnymq; + interface Consumer { + /** + * Handle messages from a named queue. + * + * @param {string} queue A named queue. + * @param {ConsumerCallback} callback A callback. + */ + consume(queue: string, callback: ConsumerCallback): void; + } + + interface Instance { + connection: Connection; + consumer: Consumer; + producer: Producer; + + /** + * Subscriber to handle messages from a named queue. + * + * @param {string} queue A named queue. + * @param {ConsumerCallback} callback A callback. + */ + subscribe(queueName: string, callback: ConsumerCallback): void; + + /** + * Publisher to send messages to a named queue. + * + * @type {Producer} + * @return {Promise} The consumer response. + */ + publish(queueName: string, message: any, options?: ProducerOptions): Promise; + } + + interface Logger { + debug: LoggerOutput; + error: LoggerOutput; + info: LoggerOutput; + log: LoggerOutput; + warn: LoggerOutput; + } + + interface Options { + consumerSuffix?: string; + host?: string; + hostname?: string; + + /** + * Number of fetched messages at once on the channel. + * + * @type {number} + */ + prefetch?: number; + + /** + * Requeue put back message into the broker if consumer crashes/trigger exception. + * + * @type {boolean} + */ + requeue?: boolean; + rpcTimeout?: number; + timeout?: number; + transport?: any; + } + + interface Producer { + /** + * Send messages to a named queue. + * + * @param {string} queue A named queue. + * @param {any} message A message. + * @return {Promise} The consumer response. + */ + produce(queue: string, message: any, options?: ProducerOptions): Promise; + } + + interface ProducerOptions { + routingKey?: string; + rpc?: boolean; + timeout?: number; + } } + +export = bunnymq; +export as namespace bunnymq; diff --git a/types/bunnymq/tslint.json b/types/bunnymq/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/bunnymq/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/bunyan-config/index.d.ts b/types/bunyan-config/index.d.ts index 49b642eaa1..0ff84fd9d2 100644 --- a/types/bunyan-config/index.d.ts +++ b/types/bunyan-config/index.d.ts @@ -7,6 +7,23 @@ declare module "bunyan-config" { import * as bunyan from "bunyan"; + interface StreamConfiguration { + name: string, + params?: { + host: string, + port: number + } + } + + interface Stream { + type?: string; + level?: bunyan.LogLevel; + path?: string; + stream?: string | StreamConfiguration + closeOnExit?: boolean; + period?: string; + count?: number; + } /** * Configuration. @@ -14,7 +31,7 @@ declare module "bunyan-config" { */ interface Configuration { name: string; - streams?: bunyan.Stream[]; + streams?: Stream[]; level?: string | number; stream?: NodeJS.WritableStream; serializers?: {}; diff --git a/types/bunyan-winston-adapter/bunyan-winston-adapter-tests.ts b/types/bunyan-winston-adapter/bunyan-winston-adapter-tests.ts new file mode 100644 index 0000000000..fc4518fa29 --- /dev/null +++ b/types/bunyan-winston-adapter/bunyan-winston-adapter-tests.ts @@ -0,0 +1,9 @@ +import { createAdapter } from "bunyan-winston-adapter"; +import { Logger, LoggerInstance, transports } from "winston"; + +const logger = new Logger(); +const mapping = { + trace: 'silly' +}; +const adapterA = createAdapter(logger); +const adapterB = createAdapter(logger, mapping); diff --git a/types/bunyan-winston-adapter/index.d.ts b/types/bunyan-winston-adapter/index.d.ts new file mode 100644 index 0000000000..e0c4f835d9 --- /dev/null +++ b/types/bunyan-winston-adapter/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for bunyan-winston-adapter 0.2 +// Project: https://github.com/gluwer/bunyan-winston-adapter +// Definitions by: Steve Hipwell +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as bunyan from "bunyan"; +import { LoggerInstance } from "winston"; + +export function createAdapter(logger: LoggerInstance, mapping?: any): bunyan; diff --git a/types/bunyan-winston-adapter/tsconfig.json b/types/bunyan-winston-adapter/tsconfig.json new file mode 100644 index 0000000000..7185731caf --- /dev/null +++ b/types/bunyan-winston-adapter/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", + "bunyan-winston-adapter-tests.ts" + ] +} diff --git a/types/bunyan-winston-adapter/tslint.json b/types/bunyan-winston-adapter/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bunyan-winston-adapter/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bunyan/bunyan-tests.ts b/types/bunyan/bunyan-tests.ts index acf382c7c2..657a59c3a8 100644 --- a/types/bunyan/bunyan-tests.ts +++ b/types/bunyan/bunyan-tests.ts @@ -1,16 +1,15 @@ - import Logger = require('bunyan'); -var ringBufferOptions: Logger.RingBufferOptions = { +let ringBufferOptions: Logger.RingBufferOptions = { limit: 100 }; -var ringBuffer: Logger.RingBuffer = new Logger.RingBuffer(ringBufferOptions); +let ringBuffer: Logger.RingBuffer = new Logger.RingBuffer(ringBufferOptions); ringBuffer.write("hello"); ringBuffer.end(); ringBuffer.destroy(); ringBuffer.destroySoon(); -var level: number; +let level: number; level = Logger.resolveLevel("trace"); level = Logger.resolveLevel("debug"); level = Logger.resolveLevel("info"); @@ -24,7 +23,7 @@ level = Logger.resolveLevel(Logger.WARN); level = Logger.resolveLevel(Logger.ERROR); level = Logger.resolveLevel(Logger.FATAL); -var options: Logger.LoggerOptions = { +let options: Logger.LoggerOptions = { name: 'test-logger', serializers: Logger.stdSerializers, streams: [{ @@ -54,13 +53,13 @@ var options: Logger.LoggerOptions = { }] }; -var log = Logger.createLogger(options); +let log = Logger.createLogger(options); -var customSerializer = function(anything: any) { - return { obj: anything}; +let customSerializer = (anything: any) => { + return { obj: anything }; }; -log.addSerializers({anything: customSerializer}); +log.addSerializers({ anything: customSerializer }); log.addSerializers(Logger.stdSerializers); log.addSerializers( { @@ -70,9 +69,9 @@ log.addSerializers( } ); -var child = log.child({name: 'child'}); +let child = log.child({ name: 'child' }); child.reopenFileStreams(); -log.addStream({path: '/dev/null'}); +log.addStream({ path: '/dev/null' }); child.level(Logger.DEBUG); child.level('debug'); child.levels(0, Logger.ERROR); @@ -80,9 +79,9 @@ child.levels(0, 'error'); child.levels('stream1', Logger.FATAL); child.levels('stream1', 'fatal'); -var buffer = new Buffer(0); -var error = new Error(''); -var object = { +let buffer = new Buffer(0); +let error = new Error(''); +let object = { test: 123 }; @@ -117,12 +116,11 @@ log.fatal(error); log.fatal(object); log.fatal('Hello, %s', 'world!'); -var recursive: any = { +let recursive: any = { hello: 'world', - whats: { - huh: recursive - } -} + whats: {} +}; +recursive.whats['huh'] = recursive; JSON.stringify(recursive, Logger.safeCycles()); diff --git a/types/bunyan/index.d.ts b/types/bunyan/index.d.ts index 060fa8eaa3..bc1dca298d 100644 --- a/types/bunyan/index.d.ts +++ b/types/bunyan/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for node-bunyan +// Type definitions for bunyan 1.8 // Project: https://github.com/trentm/node-bunyan // Definitions by: Alex Mikhalev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -10,21 +10,24 @@ import { EventEmitter } from 'events'; declare class Logger extends EventEmitter { constructor(options: Logger.LoggerOptions); addStream(stream: Logger.Stream): void; - addSerializers(serializers: Logger.Serializers | Logger.StdSerializers): void; - child(options: Logger.LoggerOptions, simple?: boolean): Logger; - child(obj: Object, simple?: boolean): Logger; + addSerializers(serializers: Logger.Serializers): void; + child(options: Object, simple?: boolean): Logger; reopenFileStreams(): void; - level(): string | number; - level(value: number | string): void; - levels(name: number | string, value: number | string): void; + level(): number; + level(value: Logger.LogLevel): void; + levels(): number[]; + levels(name: number | string): number; + levels(name: number | string, value: Logger.LogLevel): void; fields: any; src: boolean; + /* tslint:disable:unified-signatures */ + /** * Returns a boolean: is the `trace` level enabled? - * + * * This is equivalent to `log.isTraceEnabled()` or `log.isEnabledFor(TRACE)` in log4j. */ trace(): boolean; @@ -35,27 +38,25 @@ declare class Logger extends EventEmitter { * (including the stack) and sets `msg` to the exception * message or you can specify the `msg`. */ - trace(error: Error, format?: any, ...params: any[]): void; - - trace(buffer: Buffer, format?: any, ...params: any[]): void; - - /** - * Uses `util.format` for msg formatting. - */ - trace(format: string | number, ...params: any[]): void; + trace(error: Error, ...params: any[]): void; /** * The first field can optionally be a "fields" object, which * is merged into the log record. - * + * * To pass in an Error *and* other fields, use the `err` * field name for the Error instance. */ - trace(obj: Object, format?: any, ...params: any[]): void; + trace(obj: Object, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + trace(format: any, ...params: any[]): void; /** * Returns a boolean: is the `debug` level enabled? - * + * * This is equivalent to `log.isDebugEnabled()` or `log.isEnabledFor(DEBUG)` in log4j. */ debug(): boolean; @@ -66,27 +67,25 @@ declare class Logger extends EventEmitter { * (including the stack) and sets `msg` to the exception * message or you can specify the `msg`. */ - debug(error: Error, format?: any, ...params: any[]): void; - - debug(buffer: Buffer, format?: any, ...params: any[]): void; - - /** - * Uses `util.format` for msg formatting. - */ - debug(format: string | number, ...params: any[]): void; + debug(error: Error, ...params: any[]): void; /** * The first field can optionally be a "fields" object, which * is merged into the log record. - * + * * To pass in an Error *and* other fields, use the `err` * field name for the Error instance. */ - debug(obj: Object, format?: any, ...params: any[]): void; + debug(obj: Object, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + debug(format: any, ...params: any[]): void; /** * Returns a boolean: is the `info` level enabled? - * + * * This is equivalent to `log.isInfoEnabled()` or `log.isEnabledFor(INFO)` in log4j. */ info(): boolean; @@ -97,27 +96,25 @@ declare class Logger extends EventEmitter { * (including the stack) and sets `msg` to the exception * message or you can specify the `msg`. */ - info(error: Error, format?: any, ...params: any[]): void; - - info(buffer: Buffer, format?: any, ...params: any[]): void; - - /** - * Uses `util.format` for msg formatting. - */ - info(format: string | number, ...params: any[]): void; + info(error: Error, ...params: any[]): void; /** * The first field can optionally be a "fields" object, which * is merged into the log record. - * + * * To pass in an Error *and* other fields, use the `err` * field name for the Error instance. */ - info(obj: Object, format?: any, ...params: any[]): void; + info(obj: Object, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + info(format: any, ...params: any[]): void; /** * Returns a boolean: is the `warn` level enabled? - * + * * This is equivalent to `log.isWarnEnabled()` or `log.isEnabledFor(WARN)` in log4j. */ warn(): boolean; @@ -128,27 +125,25 @@ declare class Logger extends EventEmitter { * (including the stack) and sets `msg` to the exception * message or you can specify the `msg`. */ - warn(error: Error, format?: any, ...params: any[]): void; - - warn(buffer: Buffer, format?: any, ...params: any[]): void; - - /** - * Uses `util.format` for msg formatting. - */ - warn(format: string | number, ...params: any[]): void; + warn(error: Error, ...params: any[]): void; /** * The first field can optionally be a "fields" object, which * is merged into the log record. - * + * * To pass in an Error *and* other fields, use the `err` * field name for the Error instance. */ - warn(obj: Object, format?: any, ...params: any[]): void; + warn(obj: Object, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + warn(format: any, ...params: any[]): void; /** * Returns a boolean: is the `error` level enabled? - * + * * This is equivalent to `log.isErrorEnabled()` or `log.isEnabledFor(ERROR)` in log4j. */ error(): boolean; @@ -159,27 +154,25 @@ declare class Logger extends EventEmitter { * (including the stack) and sets `msg` to the exception * message or you can specify the `msg`. */ - error(error: Error, format?: any, ...params: any[]): void; - - error(buffer: Buffer, format?: any, ...params: any[]): void; - - /** - * Uses `util.format` for msg formatting. - */ - error(format: string | number, ...params: any[]): void; + error(error: Error, ...params: any[]): void; /** * The first field can optionally be a "fields" object, which * is merged into the log record. - * + * * To pass in an Error *and* other fields, use the `err` * field name for the Error instance. */ - error(obj: Object, format?: any, ...params: any[]): void; + error(obj: Object, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + error(format: any, ...params: any[]): void; /** * Returns a boolean: is the `fatal` level enabled? - * + * * This is equivalent to `log.isFatalEnabled()` or `log.isEnabledFor(FATAL)` in log4j. */ fatal(): boolean; @@ -190,90 +183,90 @@ declare class Logger extends EventEmitter { * (including the stack) and sets `msg` to the exception * message or you can specify the `msg`. */ - fatal(error: Error, format?: any, ...params: any[]): void; - - fatal(buffer: Buffer, format?: any, ...params: any[]): void; - - /** - * Uses `util.format` for msg formatting. - */ - fatal(format: string | number, ...params: any[]): void; + fatal(error: Error, ...params: any[]): void; /** * The first field can optionally be a "fields" object, which * is merged into the log record. - * + * * To pass in an Error *and* other fields, use the `err` * field name for the Error instance. */ - fatal(obj: Object, format?: any, ...params: any[]): void; + fatal(obj: Object, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + fatal(format: any, ...params: any[]): void; + + /* tslint:enable:unified-signatures */ } declare namespace Logger { - const TRACE: number; - const DEBUG: number; - const INFO: number; - const WARN: number; - const ERROR: number; - const FATAL: number; + const TRACE: number; + const DEBUG: number; + const INFO: number; + const WARN: number; + const ERROR: number; + const FATAL: number; - const stdSerializers: StdSerializers; + type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' | number; - function createLogger(options: LoggerOptions): Logger; + const stdSerializers: StdSerializers; - function safeCycles(): (key: string, value: any) => any; + function createLogger(options: LoggerOptions): Logger; - function resolveLevel(value: number | string): number; + function safeCycles(): (key: string, value: any) => any; - interface Stream { - type?: string; - level?: number | string; - path?: string; - stream?: NodeJS.WritableStream | Stream; - closeOnExit?: boolean; - period?: string; - count?: number; - } + function resolveLevel(value: LogLevel): number; - interface LoggerOptions { - name: string; - streams?: Stream[]; - level?: string | number; - stream?: NodeJS.WritableStream; - serializers?: Serializers | StdSerializers; - src?: boolean; - [custom: string]: any; - } + interface Stream { + type?: string; + level?: LogLevel; + path?: string; + stream?: NodeJS.WritableStream | Stream; + closeOnExit?: boolean; + period?: string; + count?: number; + } - interface Serializer { - (input:any): any; - } + interface LoggerOptions { + name: string; + streams?: Stream[]; + level?: LogLevel; + stream?: NodeJS.WritableStream; + serializers?: Serializers; + src?: boolean; + [custom: string]: any; + } - interface Serializers { - [key: string]: Serializer - } + type Serializer = (input: any) => any; - interface StdSerializers { - err: Serializer; - res: Serializer; - req: Serializer; - } + interface Serializers { + [key: string]: Serializer; + } - interface RingBufferOptions { - limit?: number; - } + interface StdSerializers extends Serializers { + err: Serializer; + res: Serializer; + req: Serializer; + } - class RingBuffer extends EventEmitter { - constructor(options: RingBufferOptions); + interface RingBufferOptions { + limit?: number; + } - writable: boolean; - records: any[]; + class RingBuffer extends EventEmitter implements NodeJS.WritableStream { + constructor(options: RingBufferOptions); - write(record: any): void; - end(record?: any): void; - destroy(): void; - destroySoon(): void; - } + writable: boolean; + records: any[]; + + write(record: any): boolean; + end(record?: any): void; + destroy(): void; + destroySoon(): void; + } } export = Logger; diff --git a/types/bunyan/tslint.json b/types/bunyan/tslint.json new file mode 100644 index 0000000000..09f94cd344 --- /dev/null +++ b/types/bunyan/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // ban-types needs to be disabled to support TypeScript <2.2 + "ban-types": false + } +} diff --git a/types/bytes/bytes-tests.ts b/types/bytes/bytes-tests.ts index 9c7f7abd5d..69bac3977d 100644 --- a/types/bytes/bytes-tests.ts +++ b/types/bytes/bytes-tests.ts @@ -9,8 +9,9 @@ console.log(bytes.format(104857, { thousandsSeparator: ' ' })); console.log(bytes.format(104857, { decimalPlaces: 2 })); console.log(bytes.format(104857, { fixedDecimals: true })); console.log(bytes.format(104857, { unitSeparator: '-' })); +console.log(bytes.format(104857, { unit: 'GB' })); console.log(bytes('1024kb')); console.log(bytes(1024)); console.log(bytes.parse('1024kb')); -console.log(bytes.parse(1024)); \ No newline at end of file +console.log(bytes.parse(1024)); diff --git a/types/bytes/index.d.ts b/types/bytes/index.d.ts index fd0a65c365..ae9e8f2d87 100644 --- a/types/bytes/index.d.ts +++ b/types/bytes/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for bytes v2.4.0 +// Type definitions for bytes v2.5.0 // Project: https://github.com/visionmedia/bytes.js // Definitions by: Zhiyuan Wang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,7 +7,8 @@ interface BytesOptions { decimalPlaces?: number, thousandsSeparator?: string, unitSeparator?: string, - fixedDecimals?: boolean + fixedDecimals?: boolean, + unit?: string } /** *Convert the given value in bytes into a string. diff --git a/types/c3/c3-tests.ts b/types/c3/c3-tests.ts index d9057eabb6..029946c710 100644 --- a/types/c3/c3-tests.ts +++ b/types/c3/c3-tests.ts @@ -1,11 +1,9 @@ - - ////////////////// // Doc Examples ////////////////// function chart_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, bindto: "#myContainer", size: { @@ -24,27 +22,27 @@ function chart_examples() { transition: { duration: 500 }, - oninit: function() { /* code*/ }, - onrendered: function() { /* code*/ }, - onmouseover: function() { /* code*/ }, - onmouseout: function() { /* code*/ }, - onresize: function() { /* code*/ }, - onresized: function() { /* code*/ } + oninit: () => { /* code*/ }, + onrendered: () => { /* code*/ }, + onmouseover: () => { /* code*/ }, + onmouseout: () => { /* code*/ }, + onresize: () => { /* code*/ }, + onresized: () => { /* code*/ } }); - var chart2 = c3.generate({ + let chart2 = c3.generate({ bindto: document.getElementById("myContainer"), data: {} }); - var chart3 = c3.generate({ + let chart3 = c3.generate({ bindto: d3.select("#myContainer"), data: {} }); } function data_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: { url: "/data/c3_test.csv", json: [ @@ -102,9 +100,9 @@ function data_examples() { labels: true, order: "asc", regions: { - data1: [{ "start": 1, "end": 2, "style": "dashed" }, { "start": 3 }], + data1: [{ start: 1, end: 2, style: "dashed" }, { start: 3 }], }, - color: function(color, d) { return "#ff0000"; }, + color: (color, d) => "#ff0000", colors: { data1: "#ff0000" /* ... */ @@ -120,24 +118,24 @@ function data_examples() { grouped: true, multiple: true, draggable: true, - isselectable: function(d) { return true; } + isselectable: (d) => true }, - onclick: function(d, element) { /* code */ }, - onmouseover: function(d) { /* code */ }, - onmouseout: function(d) { /* code */ } + onclick: (d, element) => { /* code */ }, + onmouseover: (d) => { /* code */ }, + onmouseout: (d) => { /* code */ } } }); - var chart2 = c3.generate({ + let chart2 = c3.generate({ data: { - labels: { format: function(v, id, i, j) { /* code */ } }, + labels: { format: (v, id, i, j) => { /* code */ } }, hide: ["data1"] } }); } function axis_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, axis: { rotated: true, @@ -148,7 +146,7 @@ function axis_examples() { categories: ["Category 1", "Category 2"], tick: { centered: true, - format: function(x: Date) { return x.getFullYear(); }, + format: (x: Date) => x.getFullYear(), culling: false, count: 5, fit: true, @@ -209,7 +207,7 @@ function axis_examples() { } }); - var chart2 = c3.generate({ + let chart2 = c3.generate({ data: {}, axis: { x: { @@ -229,7 +227,7 @@ function axis_examples() { position: "outer-middle", }, tick: { - format: function(d) { return "$" + d; } + format: (d) => "$" + d } }, y2: { @@ -243,7 +241,7 @@ function axis_examples() { } function grid_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, grid: { x: { @@ -267,7 +265,7 @@ function grid_examples() { } function region_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, regions: [ { axis: "x", start: 1, end: 4, class: "region-1-4" }, @@ -276,7 +274,7 @@ function region_examples() { } function legend_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, legend: { show: true, @@ -289,14 +287,14 @@ function legend_examples() { step: undefined }, item: { - onclick: function(id) { /* code */ }, - onmouseover: function(id) { /* code */ }, - onmouseout: function(id) { /* code */ }, + onclick: (id) => { /* code */ }, + onmouseover: (id) => { /* code */ }, + onmouseout: (id) => { /* code */ }, } } }); - var chart2 = c3.generate({ + let chart2 = c3.generate({ data: {}, legend: { hide: "data1", @@ -309,7 +307,7 @@ function legend_examples() { } }); - var chart3 = c3.generate({ + let chart3 = c3.generate({ data: {}, legend: { hide: ["data1", "data2"] @@ -318,34 +316,34 @@ function legend_examples() { } function subchart_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, subchart: { show: true, size: { height: 20 }, - onbrush: function(domain) { /* code */ } + onbrush: (domain) => { /* code */ } } }); } function zoom_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, zoom: { enabled: false, rescale: true, extent: [1, 100], // enable more zooming - onzoom: function(domain) { /* code */ }, - onzoomstart: function(event) { /* code */ }, - onzoomend: function(domain) { /* code */ } + onzoom: (domain) => { /* code */ }, + onzoomstart: (event) => { /* code */ }, + onzoomend: (domain) => { /* code */ } } }); } function point_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, point: { show: false, @@ -364,7 +362,7 @@ function point_examples() { } function line_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, line: { connectNull: true, @@ -376,7 +374,7 @@ function line_examples() { } function area_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, area: { zerobased: false @@ -385,7 +383,7 @@ function area_examples() { } function bar_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, bar: { width: 10, @@ -393,7 +391,7 @@ function bar_examples() { } }); - var chart2 = c3.generate({ + let chart2 = c3.generate({ data: {}, bar: { width: { @@ -405,12 +403,12 @@ function bar_examples() { } function pie_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, pie: { label: { show: false, - format: function(value, ratio, id) { + format: (value, ratio, id) => { return d3.format("$")(value); }, threshold: 0.1 @@ -421,12 +419,12 @@ function pie_examples() { } function donut_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, donut: { label: { show: false, - format: function(value, ratio, id) { + format: (value, ratio, id) => { return d3.format("$")(value); }, threshold: 0.05 @@ -439,12 +437,12 @@ function donut_examples() { } function gauge_examples() { - var chart = c3.generate({ + let chart = c3.generate({ data: {}, gauge: { label: { show: false, - format: function(value, ratio) { + format: (value, ratio) => { return d3.format("$")(value); } }, @@ -462,8 +460,7 @@ function gauge_examples() { ///////////////// function simple_multiple() { - - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -481,10 +478,10 @@ function simple_multiple() { chart.unload({ ids: "data1" }); -}; +} function timeseries() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", xFormat: "%Y%m%d", // 'xFormat' can be used as custom format of 'x' @@ -506,7 +503,7 @@ function timeseries() { } function chart_spline() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -518,7 +515,7 @@ function chart_spline() { } function simple_xy() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", columns: [ @@ -531,11 +528,11 @@ function simple_xy() { } function simple_xy_multiple() { - var chart = c3.generate({ + let chart = c3.generate({ data: { xs: { - "data1": "x1", - "data2": "x2", + data1: "x1", + data2: "x2", }, columns: [ ["x1", 10, 30, 45, 50, 70, 100], @@ -548,22 +545,22 @@ function simple_xy_multiple() { } function simple_regions() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], ["data2", 50, 20, 10, 40, 15, 25] ], regions: { - "data1": [{ "start": 1, "end": 2, "style": "dashed" }, { "start": 3 }], // currently 'dashed' style only - "data2": [{ "end": 3 }] + data1: [{ start: 1, end: 2, style: "dashed" }, { start: 3 }], // currently 'dashed' style only + data2: [{ end: 3 }] } } }); } function chart_step() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 300, 350, 300, 0, 0, 100], @@ -578,7 +575,7 @@ function chart_step() { } function area_chart() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 300, 350, 300, 0, 0, 0], @@ -593,7 +590,7 @@ function area_chart() { } function chart_area_stacked() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 300, 350, 300, 0, 0, 120], @@ -610,7 +607,7 @@ function chart_area_stacked() { } function chart_bar() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -620,16 +617,17 @@ function chart_bar() { }, bar: { width: { - ratio: 0.5 // this makes bar width 50% of length between ticks + ratio: 0.5, // this makes bar width 50% of length between ticks + max: 50 // this limits maximum width of bar to 50px } // or - //width: 100 // this makes bar width 100px + // width: 100 // this makes bar width 100px } }); } function chart_bar_stacked() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", -30, 200, 200, 400, -150, 250], @@ -650,7 +648,7 @@ function chart_bar_stacked() { } function chart_scatter() { - var chart = c3.generate({ + let chart = c3.generate({ data: { xs: { setosa: "setosa_x", @@ -658,10 +656,14 @@ function chart_scatter() { }, // iris data from R columns: [ - ["setosa_x", 3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1, 3.7, 3.4, 3.0, 3.0, 4.0, 4.4, 3.9, 3.5, 3.8, 3.8, 3.4, 3.7, 3.6, 3.3, 3.4, 3.0, 3.4, 3.5, 3.4, 3.2, 3.1, 3.4, 4.1, 4.2, 3.1, 3.2, 3.5, 3.6, 3.0, 3.4, 3.5, 2.3, 3.2, 3.5, 3.8, 3.0, 3.8, 3.2, 3.7, 3.3], - ["versicolor_x", 3.2, 3.2, 3.1, 2.3, 2.8, 2.8, 3.3, 2.4, 2.9, 2.7, 2.0, 3.0, 2.2, 2.9, 2.9, 3.1, 3.0, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3.0, 2.8, 3.0, 2.9, 2.6, 2.4, 2.4, 2.7, 2.7, 3.0, 3.4, 3.1, 2.3, 3.0, 2.5, 2.6, 3.0, 2.6, 2.3, 2.7, 3.0, 2.9, 2.9, 2.5, 2.8], - ["setosa", 0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.2, 0.4, 0.4, 0.3, 0.3, 0.3, 0.2, 0.4, 0.2, 0.5, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.2, 0.4, 0.1, 0.2, 0.2, 0.2, 0.2, 0.1, 0.2, 0.2, 0.3, 0.3, 0.2, 0.6, 0.4, 0.3, 0.2, 0.2, 0.2, 0.2], - ["versicolor", 1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1.0, 1.3, 1.4, 1.0, 1.5, 1.0, 1.4, 1.3, 1.4, 1.5, 1.0, 1.5, 1.1, 1.8, 1.3, 1.5, 1.2, 1.3, 1.4, 1.4, 1.7, 1.5, 1.0, 1.1, 1.0, 1.2, 1.6, 1.5, 1.6, 1.5, 1.3, 1.3, 1.3, 1.2, 1.4, 1.2, 1.0, 1.3, 1.2, 1.3, 1.3, 1.1, 1.3], + ["setosa_x", 3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1, 3.7, 3.4, 3.0, 3.0, 4.0, 4.4, 3.9, 3.5, 3.8, 3.8, 3.4, 3.7, 3.6, 3.3, 3.4, 3.0, 3.4, 3.5, 3.4, 3.2, 3.1, 3.4, + 4.1, 4.2, 3.1, 3.2, 3.5, 3.6, 3.0, 3.4, 3.5, 2.3, 3.2, 3.5, 3.8, 3.0, 3.8, 3.2, 3.7, 3.3], + ["versicolor_x", 3.2, 3.2, 3.1, 2.3, 2.8, 2.8, 3.3, 2.4, 2.9, 2.7, 2.0, 3.0, 2.2, 2.9, 2.9, 3.1, 3.0, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3.0, 2.8, 3.0, 2.9, 2.6, 2.4, + 2.4, 2.7, 2.7, 3.0, 3.4, 3.1, 2.3, 3.0, 2.5, 2.6, 3.0, 2.6, 2.3, 2.7, 3.0, 2.9, 2.9, 2.5, 2.8], + ["setosa", 0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.2, 0.4, 0.4, 0.3, 0.3, 0.3, 0.2, 0.4, 0.2, 0.5, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.2, 0.4, + 0.1, 0.2, 0.2, 0.2, 0.2, 0.1, 0.2, 0.2, 0.3, 0.3, 0.2, 0.6, 0.4, 0.3, 0.2, 0.2, 0.2, 0.2], + ["versicolor", 1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1.0, 1.3, 1.4, 1.0, 1.5, 1.0, 1.4, 1.3, 1.4, 1.5, 1.0, 1.5, 1.1, 1.8, 1.3, 1.5, 1.2, 1.3, 1.4, 1.4, 1.7, 1.5, 1.0, 1.1, + 1.0, 1.2, 1.6, 1.5, 1.6, 1.5, 1.3, 1.3, 1.3, 1.2, 1.4, 1.2, 1.0, 1.3, 1.2, 1.3, 1.3, 1.1, 1.3], ], type: "scatter" }, @@ -680,7 +682,7 @@ function chart_scatter() { } function chart_pie() { - var chart = c3.generate({ + let chart = c3.generate({ data: { // iris data from R columns: [ @@ -688,24 +690,24 @@ function chart_pie() { ["data2", 120], ], type: "pie", - onclick: function(d, i) { console.log("onclick", d, i); }, - onmouseover: function(d, i) { console.log("onmouseover", d, i); }, - onmouseout: function(d, i) { console.log("onmouseout", d, i); } + onclick: (d, i) => { console.log("onclick", d, i); }, + onmouseover: (d, i) => { console.log("onmouseover", d, i); }, + onmouseout: (d, i) => { console.log("onmouseout", d, i); } } }); } function chart_donut() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30], ["data2", 120], ], type: "donut", - onclick: function(d, i) { console.log("onclick", d, i); }, - onmouseover: function(d, i) { console.log("onmouseover", d, i); }, - onmouseout: function(d, i) { console.log("onmouseout", d, i); } + onclick: (d, i) => { console.log("onclick", d, i); }, + onmouseover: (d, i) => { console.log("onmouseover", d, i); }, + onmouseout: (d, i) => { console.log("onmouseout", d, i); } }, donut: { title: "Iris Petal Width" @@ -714,19 +716,19 @@ function chart_donut() { } function gauge_chart() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data", 91.4] ], type: "gauge", - onclick: function(d, i) { console.log("onclick", d, i); }, - onmouseover: function(d, i) { console.log("onmouseover", d, i); }, - onmouseout: function(d, i) { console.log("onmouseout", d, i); } + onclick: (d, i) => { console.log("onclick", d, i); }, + onmouseover: (d, i) => { console.log("onmouseover", d, i); }, + onmouseout: (d, i) => { console.log("onmouseout", d, i); } }, gauge: { label: { - format: function(value, ratio) { + format: (value, ratio) => { return value; }, show: false // to turn off the min/max labels. @@ -751,7 +753,7 @@ function gauge_chart() { } function chart_combination() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 20, 50, 40, 60, 50], @@ -779,7 +781,7 @@ function chart_combination() { //////////////////// function categorized() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250, 50, 100, 250] @@ -795,7 +797,7 @@ function categorized() { } function axes_rotated() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -812,7 +814,7 @@ function axes_rotated() { } function axes_y2() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -832,7 +834,7 @@ function axes_y2() { } function axes_x_tick_format() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", columns: [ @@ -844,8 +846,8 @@ function axes_x_tick_format() { x: { type: "timeseries", tick: { - format: function(x: Date) { return x.getFullYear(); } - //format: '%Y' // format string is also available for timeseries data + format: (x: Date) => x.getFullYear() + // format: '%Y' // format string is also available for timeseries data } } } @@ -853,7 +855,7 @@ function axes_x_tick_format() { } function axes_x_tick_count() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", columns: [ @@ -874,7 +876,7 @@ function axes_x_tick_count() { } function axes_x_tick_values() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", columns: [ @@ -895,7 +897,7 @@ function axes_x_tick_values() { } function axes_x_tick_culling() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 200, 100, 400, 150, 250] @@ -917,7 +919,7 @@ function axes_x_tick_culling() { } function axes_x_tick_fit() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", columns: [ @@ -938,7 +940,7 @@ function axes_x_tick_fit() { } function axes_x_localtime() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", xFormat: "%Y", @@ -964,11 +966,12 @@ function axes_x_localtime() { } function axes_x_tick_rotate() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", columns: [ - ["x", "www.somesitename1.com", "www.somesitename2.com", "www.somesitename3.com", "www.somesitename4.com", "www.somesitename5.com", "www.somesitename6.com", "www.somesitename7.com", "www.somesitename8.com", "www.somesitename9.com", "www.somesitename10.com", "www.somesitename11.com", "www.somesitename12.com"], + ["x", "www.somesitename1.com", "www.somesitename2.com", "www.somesitename3.com", "www.somesitename4.com", "www.somesitename5.com", "www.somesitename6.com", "www.somesitename7.com", + "www.somesitename8.com", "www.somesitename9.com", "www.somesitename10.com", "www.somesitename11.com", "www.somesitename12.com"], ["pv", 90, 100, 140, 200, 100, 400, 90, 100, 140, 200, 100, 400], ], type: "bar" @@ -987,7 +990,7 @@ function axes_x_tick_rotate() { } function axes_y_tick_format() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 2500] @@ -997,7 +1000,7 @@ function axes_y_tick_format() { y: { tick: { format: d3.format("$,") - // format: function (d) { return "$" + d; } + // format: (d) => { return "$" + d; } } } } @@ -1005,7 +1008,7 @@ function axes_y_tick_format() { } function axes_y_padding() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -1029,7 +1032,7 @@ function axes_y_padding() { } function axes_y_range() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 250] @@ -1047,7 +1050,7 @@ function axes_y_range() { } function axes_label() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 250], @@ -1073,7 +1076,7 @@ function axes_label() { } function axes_label_position() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample1", 30, 200, 100, 400, 150, 250], @@ -1131,7 +1134,7 @@ function axes_label_position() { /////////////////// function data_columned() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 20, 50, 40, 60, 50], @@ -1143,7 +1146,7 @@ function data_columned() { } function data_rowed() { - var chart = c3.generate({ + let chart = c3.generate({ data: { rows: [ ["data1", "data2", "data3"], @@ -1159,7 +1162,7 @@ function data_rowed() { } function data_json() { - var chart = c3.generate({ + let chart = c3.generate({ data: { json: { data1: [30, 20, 50, 40, 60, 50], @@ -1169,7 +1172,7 @@ function data_json() { } }); - setTimeout(function() { + setTimeout(() => { chart = c3.generate({ data: { json: [ @@ -1191,7 +1194,7 @@ function data_json() { }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.load({ json: [ { name: "www.site1.com", upload: 800, download: 500, total: 400 }, @@ -1207,13 +1210,13 @@ function data_json() { } function data_url() { - var chart = c3.generate({ + let chart = c3.generate({ data: { url: "/data/c3_test.csv" } }); - setTimeout(function() { + setTimeout(() => { c3.generate({ data: { url: "/data/c3_test.json", @@ -1224,7 +1227,7 @@ function data_url() { } function data_stringx() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", columns: [ @@ -1244,7 +1247,7 @@ function data_stringx() { } }); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["x", "www.siteA.com", "www.siteB.com", "www.siteC.com", "www.siteD.com"], @@ -1254,7 +1257,7 @@ function data_stringx() { }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["x", "www.siteE.com", "www.siteF.com", "www.siteG.com"], @@ -1264,7 +1267,7 @@ function data_stringx() { }); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["x", "www.site1.com", "www.site2.com", "www.site3.com", "www.site4.com"], @@ -1274,7 +1277,7 @@ function data_stringx() { }); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["download", 30, 30, 20, 170], @@ -1283,7 +1286,7 @@ function data_stringx() { }); }, 4000); - setTimeout(function() { + setTimeout(() => { chart.load({ url: "/data/c3_string_x.csv" }); @@ -1291,20 +1294,20 @@ function data_stringx() { } function data_load() { - var chart = c3.generate({ + let chart = c3.generate({ data: { url: "/data/c3_test.csv", type: "line" } }); - setTimeout(function() { + setTimeout(() => { chart.load({ url: "/data/c3_test2.csv" }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["data1", 130, 120, 150, 140, 160, 150], @@ -1314,7 +1317,7 @@ function data_load() { }); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.load({ rows: [ ["data2", "data3"], @@ -1329,7 +1332,7 @@ function data_load() { }); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["data4", 30, 20, 50, 40, 60, 50, 100, 200] @@ -1338,13 +1341,13 @@ function data_load() { }); }, 4000); - setTimeout(function() { + setTimeout(() => { chart.unload({ ids: "data4" }); }, 5000); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["data2", null, 30, 20, 50, 40, 60, 50] @@ -1352,11 +1355,11 @@ function data_load() { }); }, 6000); - setTimeout(function() { + setTimeout(() => { chart.unload(); }, 7000); - setTimeout(function() { + setTimeout(() => { chart.load({ rows: [ ["data4", "data2", "data3"], @@ -1371,7 +1374,7 @@ function data_load() { }); }, 8000); - setTimeout(function() { + setTimeout(() => { chart.load({ rows: [ ["data5", "data6"], @@ -1386,7 +1389,7 @@ function data_load() { }); }, 9000); - setTimeout(function() { + setTimeout(() => { chart.unload({ ids: ["data2", "data3"] }); @@ -1394,7 +1397,7 @@ function data_load() { } function data_name() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -1409,7 +1412,7 @@ function data_name() { } function data_color() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 20, 50, 40, 60, 50], @@ -1422,7 +1425,7 @@ function data_color() { data2: "#00ff00", data3: "#0000ff" }, - color: function(color, d) { + color: (color, d) => { // d will be 'id' when called for legends return d.id && d.id === "data3" ? d3.rgb(color).darker(d.value / 150) : color; } @@ -1431,7 +1434,7 @@ function data_color() { } function data_order() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 130, 200, 320, 400, 530, 750], @@ -1453,7 +1456,7 @@ function data_order() { } }); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["data4", 1200, 1300, 1450, 1600, 1520, 1820], @@ -1461,7 +1464,7 @@ function data_order() { }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["data5", 200, 300, 450, 600, 520, 820], @@ -1469,13 +1472,13 @@ function data_order() { }); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.groups([["data1", "data2", "data3", "data4", "data5"]]); }, 3000); } function data_label() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, -200, -100, 400, 150, 250], @@ -1497,7 +1500,7 @@ function data_label() { } function data_label_format() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, -200, -100, 400, 150, 250], @@ -1529,7 +1532,7 @@ function data_label_format() { /////////////////// function options_gridline() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 250, 120, 200] @@ -1547,7 +1550,7 @@ function options_gridline() { } function grid_x_lines() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 250] @@ -1566,7 +1569,7 @@ function grid_x_lines() { } function grid_y_lines() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 250], @@ -1598,7 +1601,7 @@ function grid_y_lines() { /////////////////// function region() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250, 400], @@ -1628,7 +1631,7 @@ function region() { } function region_timeseries() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "date", columns: [ @@ -1654,7 +1657,7 @@ function region_timeseries() { ///////////////////// function options_subchart() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 250] @@ -1667,10 +1670,11 @@ function options_subchart() { } function interaction_zoom() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ - ["sample", 30, 200, 100, 400, 150, 250, 150, 200, 170, 240, 350, 150, 100, 400, 150, 250, 150, 200, 170, 240, 100, 150, 250, 150, 200, 170, 240, 30, 200, 100, 400, 150, 250, 150, 200, 170, 240, 350, 150, 100, 400, 350, 220, 250, 300, 270, 140, 150, 90, 150, 50, 120, 70, 40] + ["sample", 30, 200, 100, 400, 150, 250, 150, 200, 170, 240, 350, 150, 100, 400, 150, 250, 150, 200, 170, 240, 100, 150, 250, 150, 200, 170, 240, 30, 200, 100, 400, 150, 250, 150, + 200, 170, 240, 350, 150, 100, 400, 350, 220, 250, 300, 270, 140, 150, 90, 150, 50, 120, 70, 40] ] }, zoom: { @@ -1684,7 +1688,7 @@ function interaction_zoom() { ///////////////////// function options_legend() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 250] @@ -1697,7 +1701,7 @@ function options_legend() { } function legend_position() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -1709,7 +1713,7 @@ function legend_position() { } }); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["data3", 130, 150, 200, 300, 200, 100] @@ -1717,23 +1721,23 @@ function legend_position() { }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.unload({ ids: "data1" }); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.transform("pie"); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.transform("line"); }, 4000); } function legend_custom() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 100], @@ -1754,21 +1758,22 @@ function legend_custom() { d3.select(".container").insert("div", ".chart").attr("class", "legend").selectAll("span") .data(["data1", "data2", "data3"]) .enter().append("span") - .attr("data-id", function(id) { return id; }) - .html(function(id) { return id; }) - .each(function(id) { + .attr("data-id", (id) => id) + .html((id) => id) + .each((id) => { + // this is most likely the wrong context now + // tslint:disable-next-line d3.select(this).style("background-color", chart.color(id)); }) - .on("mouseover", function(id) { + .on("mouseover", (id) => { chart.focus(id); }) - .on("mouseout", function(id) { + .on("mouseout", (id) => { chart.revert(); }) - .on("click", function(id) { + .on("click", (id) => { chart.toggle(id); }); - } ///////////////////// @@ -1776,7 +1781,7 @@ function legend_custom() { ///////////////////// function tooltip_show() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -1790,7 +1795,7 @@ function tooltip_show() { } function tooltip_grouped() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -1805,7 +1810,7 @@ function tooltip_grouped() { } function tooltip_format() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30000, 20000, 10000, 40000, 15000, 250000], @@ -1830,9 +1835,9 @@ function tooltip_format() { }, tooltip: { format: { - title: function(d: any) { return "Data " + d; }, - value: function(value: any, ratio: any, id: any) { - var format = id === "data1" ? d3.format(",") : d3.format("$"); + title: (d: any) => "Data " + d, + value: (value: any, ratio: any, id: any) => { + let format = id === "data1" ? d3.format(",") : d3.format("$"); return format(value); } // value: d3.format(",") // apply this format to both y and y2 @@ -1846,7 +1851,7 @@ function tooltip_format() { //////////////////////// function options_size() { - var chart = c3.generate({ + let chart = c3.generate({ size: { height: 240, width: 480 @@ -1860,7 +1865,7 @@ function options_size() { } function options_padding() { - var chart = c3.generate({ + let chart = c3.generate({ padding: { top: 40, right: 100, @@ -1876,7 +1881,7 @@ function options_padding() { } function options_color() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -1888,13 +1893,14 @@ function options_color() { ] }, color: { - pattern: ["#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5"] + pattern: ["#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", "#c7c7c7", + "#bcbd22", "#dbdb8d", "#17becf", "#9edae5"] } }); } function transition_duration() { - var chart = c3.generate({ + let chart = c3.generate({ data: { url: "/data/c3_test.csv" }, @@ -1903,13 +1909,13 @@ function transition_duration() { } }); - setTimeout(function() { + setTimeout(() => { chart.load({ url: "/data/c3_test2.csv" }); }, 500); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["data1", 30, 20, 50, 40, 60, 50], @@ -1919,7 +1925,7 @@ function transition_duration() { }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.load({ rows: [ ["data1", "data2", "data3"], @@ -1933,7 +1939,7 @@ function transition_duration() { }); }, 1500); - setTimeout(function() { + setTimeout(() => { chart.load({ columns: [ ["data1", null, 30, 20, 50, 40, 60, 50, 100, 200] @@ -1947,7 +1953,7 @@ function transition_duration() { ///////////////////////////// function point_show() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -1965,7 +1971,7 @@ function point_show() { //////////////////////////// function pie_label_format() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30], @@ -1975,7 +1981,7 @@ function pie_label_format() { }, pie: { label: { - format: function(value: any, ratio: any, id: any) { + format: (value: any, ratio: any, id: any) => { return d3.format("$")(value); } } @@ -1988,7 +1994,7 @@ function pie_label_format() { ///////////////////// function api_flow() { - var chart = c3.generate({ + let chart = c3.generate({ data: { x: "x", columns: [ @@ -2008,7 +2014,7 @@ function api_flow() { } }); - setTimeout(function() { + setTimeout(() => { chart.flow({ columns: [ ["x", "2013-01-11", "2013-01-21"], @@ -2017,7 +2023,7 @@ function api_flow() { ["data3", 200, 120], ], duration: 1500, - done: function() { + done: () => { chart.flow({ columns: [ ["x", "2013-02-11", "2013-02-12", "2013-02-13", "2013-02-14"], @@ -2027,7 +2033,7 @@ function api_flow() { ], length: 0, duration: 1500, - done: function() { + done: () => { chart.flow({ columns: [ ["x", "2013-03-01", "2013-03-02"], @@ -2037,7 +2043,7 @@ function api_flow() { ], length: 2, duration: 1500, - done: function() { + done: () => { chart.flow({ columns: [ ["x", "2013-03-21", "2013-04-01"], @@ -2058,7 +2064,7 @@ function api_flow() { } function api_data_name() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2071,17 +2077,17 @@ function api_data_name() { } }); - setTimeout(function() { + setTimeout(() => { chart.data.names({ data1: "New name for data1", data2: "New name for data2" }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.data.names({ data1: "New name for data1 again" }); }, 2000); } function api_data_color() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 20, 50, 40, 60, 50], @@ -2098,7 +2104,7 @@ function api_data_color() { } }); - setTimeout(function() { + setTimeout(() => { chart.data.colors({ data1: d3.rgb("#ff0000").darker(1), data2: d3.rgb("#00ff00").darker(1), @@ -2106,7 +2112,7 @@ function api_data_color() { }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.data.colors({ data1: d3.rgb("#ff0000").darker(2), data2: d3.rgb("#00ff00").darker(2), @@ -2116,7 +2122,7 @@ function api_data_color() { } function api_axis_label() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2138,17 +2144,17 @@ function api_axis_label() { } }); - setTimeout(function() { + setTimeout(() => { chart.axis.labels({ y2: "New Y2 Axis Label" }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.axis.labels({ y: "New Y Axis Label", y2: "New Y2 Axis Label Again" }); }, 2000); } function api_axis_range() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2166,45 +2172,45 @@ function api_axis_range() { } }); - setTimeout(function() { + setTimeout(() => { chart.axis.max(500); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.axis.min(-500); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.axis.max({ y: 600, y2: 100 }); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.axis.min({ y: -600, y2: -100 }); }, 4000); - setTimeout(function() { + setTimeout(() => { chart.axis.range({ max: 1000, min: -1000 }); }, 5000); - setTimeout(function() { + setTimeout(() => { chart.axis.range({ max: { y: 600, y2: 100 }, min: { y: -100, y2: 0 } }); }, 6000); - setTimeout(function() { + setTimeout(() => { chart.axis.max({ x: 10 }); }, 7000); - setTimeout(function() { + setTimeout(() => { chart.axis.min({ x: -10 }); }, 8000); - setTimeout(function() { + setTimeout(() => { chart.axis.range({ max: { x: 5 }, min: { x: 0 } }); }, 9000); } function api_resize() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2213,21 +2219,21 @@ function api_resize() { } }); - setTimeout(function() { + setTimeout(() => { chart.resize({ height: 100, width: 300 }); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.resize({ height: 200 }); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.resize(); }, 3000); } function api_grid_x() { - var chart = c3.generate({ + let chart = c3.generate({ bindto: "#chart", data: { columns: [ @@ -2236,31 +2242,31 @@ function api_grid_x() { } }); - setTimeout(function() { + setTimeout(() => { chart.xgrids([{ value: 1, text: "Label 1" }, { value: 4, text: "Label 4" }]); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.xgrids([{ value: 2, text: "Label 2" }]); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.xgrids.add([{ value: 3, text: "Label 3", class: "hoge" }]); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.xgrids.remove({ value: 2 }); }, 4000); - setTimeout(function() { + setTimeout(() => { chart.xgrids.remove({ class: "hoge" }); }, 5000); - setTimeout(function() { + setTimeout(() => { chart.xgrids([{ value: 1, text: "Label 1" }, { value: 4, text: "Label 4" }]); }, 6000); - setTimeout(function() { + setTimeout(() => { chart.xgrids.remove(); }, 7000); } @@ -2270,7 +2276,7 @@ function api_grid_x() { ///////////////////// function transform_line() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2280,25 +2286,25 @@ function transform_line() { } }); - setTimeout(function() { + setTimeout(() => { chart.transform("line", "data1"); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.transform("line", "data2"); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.transform("bar"); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.transform("line"); }, 4000); } function transform_spline() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2308,25 +2314,25 @@ function transform_spline() { } }); - setTimeout(function() { + setTimeout(() => { chart.transform("spline", "data1"); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.transform("spline", "data2"); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.transform("bar"); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.transform("spline"); }, 4000); } function transform_bar() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2336,25 +2342,25 @@ function transform_bar() { } }); - setTimeout(function() { + setTimeout(() => { chart.transform("bar", "data1"); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.transform("bar", "data2"); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.transform("line"); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.transform("bar"); }, 4000); } function transform_area() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2364,25 +2370,25 @@ function transform_area() { } }); - setTimeout(function() { + setTimeout(() => { chart.transform("area", "data1"); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.transform("area", "data2"); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.transform("bar"); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.transform("area"); }, 4000); } function transform_areaspline() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2392,25 +2398,25 @@ function transform_areaspline() { } }); - setTimeout(function() { + setTimeout(() => { chart.transform("area-spline", "data1"); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.transform("area-spline", "data2"); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.transform("bar"); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.transform("area-spline"); }, 4000); } function transform_scatter() { - var chart = c3.generate({ + let chart = c3.generate({ data: { xs: { setosa: "setosa_x", @@ -2418,10 +2424,14 @@ function transform_scatter() { }, // iris data from R columns: [ - ["setosa_x", 3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1, 3.7, 3.4, 3.0, 3.0, 4.0, 4.4, 3.9, 3.5, 3.8, 3.8, 3.4, 3.7, 3.6, 3.3, 3.4, 3.0, 3.4, 3.5, 3.4, 3.2, 3.1, 3.4, 4.1, 4.2, 3.1, 3.2, 3.5, 3.6, 3.0, 3.4, 3.5, 2.3, 3.2, 3.5, 3.8, 3.0, 3.8, 3.2, 3.7, 3.3], - ["versicolor_x", 3.2, 3.2, 3.1, 2.3, 2.8, 2.8, 3.3, 2.4, 2.9, 2.7, 2.0, 3.0, 2.2, 2.9, 2.9, 3.1, 3.0, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3.0, 2.8, 3.0, 2.9, 2.6, 2.4, 2.4, 2.7, 2.7, 3.0, 3.4, 3.1, 2.3, 3.0, 2.5, 2.6, 3.0, 2.6, 2.3, 2.7, 3.0, 2.9, 2.9, 2.5, 2.8], - ["setosa", 0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.2, 0.4, 0.4, 0.3, 0.3, 0.3, 0.2, 0.4, 0.2, 0.5, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.2, 0.4, 0.1, 0.2, 0.2, 0.2, 0.2, 0.1, 0.2, 0.2, 0.3, 0.3, 0.2, 0.6, 0.4, 0.3, 0.2, 0.2, 0.2, 0.2], - ["versicolor", 1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1.0, 1.3, 1.4, 1.0, 1.5, 1.0, 1.4, 1.3, 1.4, 1.5, 1.0, 1.5, 1.1, 1.8, 1.3, 1.5, 1.2, 1.3, 1.4, 1.4, 1.7, 1.5, 1.0, 1.1, 1.0, 1.2, 1.6, 1.5, 1.6, 1.5, 1.3, 1.3, 1.3, 1.2, 1.4, 1.2, 1.0, 1.3, 1.2, 1.3, 1.3, 1.1, 1.3], + ["setosa_x", 3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1, 3.7, 3.4, 3.0, 3.0, 4.0, 4.4, 3.9, 3.5, 3.8, 3.8, 3.4, 3.7, 3.6, 3.3, 3.4, 3.0, 3.4, 3.5, 3.4, 3.2, 3.1, 3.4, + 4.1, 4.2, 3.1, 3.2, 3.5, 3.6, 3.0, 3.4, 3.5, 2.3, 3.2, 3.5, 3.8, 3.0, 3.8, 3.2, 3.7, 3.3], + ["versicolor_x", 3.2, 3.2, 3.1, 2.3, 2.8, 2.8, 3.3, 2.4, 2.9, 2.7, 2.0, 3.0, 2.2, 2.9, 2.9, 3.1, 3.0, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3.0, 2.8, 3.0, 2.9, 2.6, 2.4, 2.4, + 2.7, 2.7, 3.0, 3.4, 3.1, 2.3, 3.0, 2.5, 2.6, 3.0, 2.6, 2.3, 2.7, 3.0, 2.9, 2.9, 2.5, 2.8], + ["setosa", 0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.2, 0.4, 0.4, 0.3, 0.3, 0.3, 0.2, 0.4, 0.2, 0.5, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.2, 0.4, 0.1, + 0.2, 0.2, 0.2, 0.2, 0.1, 0.2, 0.2, 0.3, 0.3, 0.2, 0.6, 0.4, 0.3, 0.2, 0.2, 0.2, 0.2], + ["versicolor", 1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1.0, 1.3, 1.4, 1.0, 1.5, 1.0, 1.4, 1.3, 1.4, 1.5, 1.0, 1.5, 1.1, 1.8, 1.3, 1.5, 1.2, 1.3, 1.4, 1.4, 1.7, 1.5, 1.0, 1.1, 1.0, + 1.2, 1.6, 1.5, 1.6, 1.5, 1.3, 1.3, 1.3, 1.2, 1.4, 1.2, 1.0, 1.3, 1.2, 1.3, 1.3, 1.1, 1.3], ], type: "pie" }, @@ -2438,21 +2448,21 @@ function transform_scatter() { } }); - setTimeout(function() { + setTimeout(() => { chart.transform("scatter"); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.transform("pie"); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.transform("scatter"); }, 3000); } function transform_pie() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2461,21 +2471,21 @@ function transform_pie() { } }); - setTimeout(function() { + setTimeout(() => { chart.transform("pie"); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.transform("line"); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.transform("pie"); }, 3000); } function transform_donut() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 30, 200, 100, 400, 150, 250], @@ -2484,19 +2494,19 @@ function transform_donut() { } }); - setTimeout(function() { + setTimeout(() => { chart.transform("donut"); }, 1000); - setTimeout(function() { + setTimeout(() => { chart.transform("line"); }, 2000); - setTimeout(function() { + setTimeout(() => { chart.transform("pie"); }, 3000); - setTimeout(function() { + setTimeout(() => { chart.transform("donut"); }, 4000); } @@ -2506,7 +2516,7 @@ function transform_donut() { ///////////////////// function style_region() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["sample", 30, 200, 100, 400, 150, 250] @@ -2520,7 +2530,7 @@ function style_region() { } function style_grid() { - var chart = c3.generate({ + let chart = c3.generate({ data: { columns: [ ["data1", 100, 200, 1000, 900, 500] @@ -2536,3 +2546,19 @@ function style_grid() { } }); } + +// set colors via function +c3.generate({ + bindto: '#chart', + data: { + columns: [ + ['data1', ...[]], + ], + type: 'bar', + colors: { + data1: (d: any) => { + return d.value > 90 ? 'green' : 'orange'; + } + } + } +}); diff --git a/types/c3/index.d.ts b/types/c3/index.d.ts index 748b19bfc5..2d0c4381d6 100644 --- a/types/c3/index.d.ts +++ b/types/c3/index.d.ts @@ -1,31 +1,37 @@ -// Type definitions for C3js v0.4 +// Type definitions for C3js 0.4 // Project: http://c3js.org/ // Definitions by: Marc Climent +// Gerin Jacob +// Bernd Hacker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import * as d3 from "d3"; +/* tslint:disable:export-just-namespace */ + export = c3; export as namespace c3; declare namespace c3 { - - type PrimitiveArray = Array; + type PrimitiveArray = Array; type FormatFunction = (v: any, id: string, i: number, j: number) => void; interface TargetIds { ids: ArrayOrString; } - type ArrayOrString = Array | string; + type ArrayOrString = string[] | string; interface ChartConfiguration { /** - * The CSS selector or the element which the chart will be set to. D3 selection object can be specified. If other chart is set already, it will be replaced with the new one (only one chart can be set in one element). + * The CSS selector or the element which the chart will be set to. D3 selection object can be specified. If other chart is set already, it will be replaced with the new one (only one chart + * can be set in one element). * If this option is not specified, the chart will be generated but not be set. Instead, we can access the element by chart.element and set it by ourselves. - * Note: When chart is not binded, c3 starts observing if chart.element is binded by MutationObserver. In this case, polyfill is required in IE9 and IE10 becuase they do not support MutationObserver. On the other hand, if chart always will be binded, polyfill will not be required because MutationObserver will never be called. + * Note: When chart is not binded, c3 starts observing if chart.element is binded by MutationObserver. In this case, polyfill is required in IE9 and IE10 becuase they do not support + * MutationObserver. On the other hand, if chart always will be binded, polyfill will not be required because MutationObserver will never be called. */ - bindto?: string | HTMLElement | d3.Selection; + bindto?: string | HTMLElement | d3.Selection | null; size?: { /** * The desired width of the chart element. @@ -63,7 +69,7 @@ declare namespace c3 { /** * Set custom color pattern. */ - pattern?: Array; + pattern?: string[]; threshold?: any; // Undocumented }; @@ -86,32 +92,32 @@ declare namespace c3 { /** * Set a callback to execute when the chart is initialized. */ - oninit?: () => void; + oninit?(): void; /** * Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed. */ - onrendered?: () => void; + onrendered?(): void; /** * Set a callback to execute when mouse enters the chart. */ - onmouseover?: () => void; + onmouseover?(): void; /** * Set a callback to execute when mouse leaves the chart. */ - onmouseout?: () => void; + onmouseout?(): void; /** * Set a callback to execute when user resizes the screen. */ - onresize?: () => void; + onresize?(): void; /** * Set a callback to execute when screen resize finished. */ - onresized?: () => void; + onresized?(): void; data: Data; @@ -122,9 +128,10 @@ declare namespace c3 { /** * Show rectangles inside the chart. * This option accepts array including object that has axis, start, end and class. The keys start, end and class are optional. - * axis must be x, y or y2. start and end should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and unixtime integer can be used. If class is set, the region element will have it as class. + * axis must be x, y or y2. start and end should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and + * unixtime integer can be used. If class is set, the region element will have it as class. */ - regions?: Array; + regions?: RegionOptions[]; legend?: LegendOptions; @@ -146,8 +153,8 @@ declare namespace c3 { * Change step type for step chart. 'step', 'step-before' and 'step-after' can be used. */ step?: { - type: string; - }; + type: string; + }; }; area?: { @@ -161,7 +168,16 @@ declare namespace c3 { /** * Change the width of bar chart. If ratio is specified, change the width of bar chart by ratio. */ - width?: number | { ratio: number }; + width?: number | { + /** + * Set the width of each bar by ratio + */ + ratio: number, + /** + * Set max width of each bar + */ + max?: number + }; /** * Set if min or max value will be 0 on bar chart. */ @@ -177,7 +193,7 @@ declare namespace c3 { /** * Set formatter for the label on each pie piece. */ - format?: (value: number, ratio: number, id: string) => string; + format?(value: number, ratio: number, id: string): string; /** * Set threshold to show/hide labels. */ @@ -198,7 +214,7 @@ declare namespace c3 { /** * Set formatter for the label on each donut piece. */ - format?: (value: number, ratio: number, id: string) => string; + format?(value: number, ratio: number, id: string): string; /** * Set threshold to show/hide labels. */ @@ -227,7 +243,7 @@ declare namespace c3 { /** * Set formatter for the label on gauge. */ - format?: (value: any, ratio: number) => string; + format?(value: any, ratio: number): string; }; /** * Enable or disable expanding gauge. @@ -269,15 +285,15 @@ declare namespace c3 { /** * Parse a JSON object for data. */ - json?: Object; + json?: {}; /** * Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order. */ - rows?: Array; + rows?: PrimitiveArray[]; /* * Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values. */ - columns?: Array; + columns?: PrimitiveArray[]; /** * Used if loading JSON via data.url */ @@ -285,10 +301,11 @@ declare namespace c3 { /** * Choose which JSON object keys correspond to desired data. */ - keys?: { x?: string; value: Array; }; + keys?: { x?: string; value: string[]; }; /** * Specify the key of x values in the data. - * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names. + * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data + * on the key will be used for category names. */ x?: string; /** @@ -301,8 +318,8 @@ declare namespace c3 { * Default is %Y-%m-%d */ xFormat?: string; - //xLocaltime?: any; - //xSort?: any; + // xLocaltime?: any; + // xSort?: any; /** * Set custom data name. */ @@ -315,7 +332,7 @@ declare namespace c3 { /** * Set groups for the data for stacking. */ - groups?: Array>; + groups?: string[][]; /** * Set y axis the data related to. y and y2 can be used. */ @@ -345,30 +362,33 @@ declare namespace c3 { { format: { [key: string]: FormatFunction } }; /** * Define the order of the data. - * This option changes the order of stacking the data and pieces of pie/donut. If null specified, it will be the order the data loaded. If function specified, it will be used to sort the data and it will recieve the data as argument. + * This option changes the order of stacking the data and pieces of pie/donut. If null specified, it will be the order the data loaded. If function specified, it will be used to sort the data + * and it will recieve the data as argument. * Available Values: desc, asc, function (data1, data2) { ... }, null */ order?: string | ((...data: string[]) => void); /** * Define regions for each data. - * The values must be an array for each data and it should include an object that has start, end, style. If start is not set, the start will be the first data point. If end is not set, the end will be the last data point. + * The values must be an array for each data and it should include an object that has start, end, style. If start is not set, the start will be the first data point. If end is not set, the + * end will be the last data point. * Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions. */ regions?: { [key: string]: any }; /** * Set color converter function. - * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00'). + * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that + * represents color (e.g. '#00ff00'). */ - color?: (color: string, d: any) => string | d3.Rgb; + color?(color: string, d: any): string | d3.Rgb; /** * Set color for each data. */ - colors?: { [key: string]: string | d3.Rgb }; + colors?: { [key: string]: string | d3.Rgb | ((d: any) => string | d3.Rgb) }; /** * Hide each data when the chart appears. * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden. */ - hide?: boolean | Array; + hide?: boolean | string[]; /** * Set text displayed when empty data. */ @@ -379,30 +399,30 @@ declare namespace c3 { grouped?: boolean; multiple?: boolean; draggable?: boolean; - isselectable?: (d?: any) => boolean; + isselectable?(d?: any): boolean; }; /** * Set a callback for click event on each data point. * This callback will be called when each data point clicked and will receive d and element as the arguments. * - d is the data clicked and element is the element clicked. In this callback, this will be the Chart object. */ - onclick?: (d: any, element: any) => void; + onclick?(d: any, element: any): void; /** * Set a callback for mouseover event on each data point. * This callback will be called when mouse cursor moves onto each data point and will receive d as the argument. * - d is the data where mouse cursor moves onto. In this callback, this will be the Chart object. */ - onmouseover?: (d: any, element?: any) => void; + onmouseover?(d: any, element?: any): void; /** * Set a callback for mouseout event on each data point. * This callback will be called when mouse cursor moves out each data point and will receive d as the argument. * - d is the data where mouse cursor moves out. In this callback, this will be the Chart object. */ - onmouseout?: (d: any, element?: any) => void; + onmouseout?(d: any, element?: any): void; - onselected?: (d: any, element?: any) => void; + onselected?(d: any, element?: any): void; - onunselected?: (d: any, element?: any) => void; + onunselected?(d: any, element?: any): void; } interface Axis { @@ -433,7 +453,7 @@ declare namespace c3 { * Set category names on category axis. * This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required. */ - categories?: Array; + categories?: string[]; tick?: XTickConfiguration; /** @@ -446,7 +466,8 @@ declare namespace c3 { min?: number; /** * Set padding for x axis. - * If this option is set, the range of x axis will increase/decrease according to the values. If no padding is needed in the ragen of x axis, 0 should be set. On category axis, this option will be ignored. + * If this option is set, the range of x axis will increase/decrease according to the values. If no padding is needed in the ragen of x axis, 0 should be set. On category axis, this option + * will be ignored. */ padding?: { left?: number; @@ -460,10 +481,11 @@ declare namespace c3 { /** * Set default extent for subchart and zoom. This can be an array or function that returns an array. */ - extent?: Array | (() => Array); + extent?: number[] | (() => number[]); /** * Set label on x axis. - * You can set x axis label and change its position by this option. string and object can be passed and we can change the poisiton by passing object that has position key. Available position differs according to the axis direction (vertical or horizontal). If string set, the position will be the default. + * You can set x axis label and change its position by this option. string and object can be passed and we can change the poisiton by passing object that has position key. Available position + * differs according to the axis direction (vertical or horizontal). If string set, the position will be the default. * Valid horizontal positions: inner-right (Default), inner-center, inner-left, outer-right, outer-center, outer-left * Valid vertical positions: inner-top, inner-middle, inner-bottom, outer-top, outer-middle, outer-bottom */ @@ -514,8 +536,7 @@ declare namespace c3 { /** * Set default range of y axis. This option set the default value for y axis when there is no data on init. */ - default?: Array; - + default?: number[]; } interface XTickConfiguration { @@ -528,14 +549,15 @@ declare namespace c3 { */ format?: string | ((x: number | Date) => string | number); /** - * Setting for culling ticks. - * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown. - */ + * Setting for culling ticks. + * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown. + */ culling?: boolean | CullingConfiguration; /** * The number of x axis ticks to show. - * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value). - */ + * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will + * have rough second value). + */ count?: number; /** * Fit x axis ticks. @@ -544,9 +566,10 @@ declare namespace c3 { fit?: boolean; /** * Set the x values of ticks manually. - * If this option is provided, the position of the ticks will be determined based on those values. This option works with timeseries data and the x values will be parsed accoding to the type of the value and data.xFormat option. + * If this option is provided, the position of the ticks will be determined based on those values. This option works with timeseries data and the x values will be parsed accoding to the type + * of the value and data.xFormat option. */ - values?: Array | Array; + values?: number[] | string[]; /** * Rotate x axis tick text. If you set negative value, it will rotate to opposite direction. */ @@ -563,7 +586,7 @@ declare namespace c3 { * Set formatter for y axis tick text. * This option accepts d3.format object as well as a function you define. */ - format?: (x: number) => string; + format?(x: number): string; /** * Show or hide outer tick. */ @@ -571,18 +594,18 @@ declare namespace c3 { /** * Set the y values of ticks manually. */ - values?: Array; + values?: number[]; /** * The number of y axis ticks to show. * The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful. - */ + */ count?: number; } interface CullingConfiguration { /** - * The number of tick texts will be adjusted to less than this value. - */ + * The number of tick texts will be adjusted to less than this value. + */ max: number; } @@ -597,7 +620,7 @@ declare namespace c3 { * This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available. * If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer. */ - lines?: Array; + lines?: LineOptions[]; }; y?: { /** @@ -608,7 +631,7 @@ declare namespace c3 { * Show additional grid lines along y axis. * This option accepts array including object that has value, text, position and class. */ - lines?: Array; + lines?: LineOptions[]; }; } @@ -660,15 +683,15 @@ declare namespace c3 { /** * Set click event handler to the legend item. */ - onclick?: (id: any) => void; + onclick?(id: any): void; /** * Set mouseover event handler to the legend item. */ - onmouseover?: (id: any) => void; + onmouseover?(id: any): void; /** * Set mouseout event handler to the legend item. */ - onmouseout?: (id: any) => void; + onmouseout?(id: any): void; }; } @@ -685,27 +708,28 @@ declare namespace c3 { /** * Set format for the title of tooltip. Specified function receives x of the data point to show. */ - title?: (x: any) => string; + title?(x: any): string; /** - * Set format for the name of each data in tooltip. Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge. + * Set format for the name of each data in tooltip. Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not + * donut/pie/gauge. */ - name?: (name: string, ratio: number, id: string, index: number) => string; + name?(name: string, ratio: number, id: string, index: number): string; /** * Set format for the value of each data in tooltip. * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge. * If undefined returned, the row of that value will be skipped. */ - value?: (value: any, ratio: number, id: string, index: number) => string; + value?(value: any, ratio: number, id: string, index: number): string; }; /** * Set custom position for the tooltip. This option can be used to modify the tooltip position by returning object that has top and left. */ - position?: (data: any, width: number, height: number, element: any) => { top: number; left: number }; + position?(data: any, width: number, height: number, element: any): { top: number; left: number }; /** * Set custom HTML for the tooltip. * Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points. */ - contents?: (data: any, defaultTitleFormat: string, defaultValueFormat: string, color: any) => string; + contents?(data: any, defaultTitleFormat: string, defaultValueFormat: string, color: any): string; } interface SubchartOptions { @@ -723,7 +747,7 @@ declare namespace c3 { * Set callback for brush event. * Specified function receives the current zoomed x domain. */ - onbrush?: (domain: any) => void; + onbrush?(domain: any): void; } interface ZoomOptions { @@ -742,15 +766,15 @@ declare namespace c3 { /** * Set callback that is called when the chart is zooming. Specified function receives the zoomed domain. */ - onzoom?: (domain: any) => void; + onzoom?(domain: any): void; /** * Set callback that is called when zooming starts. Specified function receives the zoom event. */ - onzoomstart?: (event: Event) => void; + onzoomstart?(event: Event): void; /** * Set callback that is called when zooming ends. Specified function receives the zoomed domain. */ - onzoomend?: (domain: any) => void; + onzoomend?(domain: any): void; } interface PointOptions { @@ -829,23 +853,24 @@ declare namespace c3 { * If type or types given, the type of targets will be updated. type must be String and types must be Object. * If unload given, data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. * If done given, the specified function will be called after data loded. - * NOTE: unload should be used if some data needs to be unloaded simultaneously. If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation. + * NOTE: unload should be used if some data needs to be unloaded simultaneously. If you call unload API soon after/before load instead of unload param, chart will not be rendered properly + * because of cancel of animation. * NOTE: done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering. */ load(args: { url?: string; - json?: Object; - keys?: { x?: string; value: Array; } - rows?: Array; - columns?: Array; + json?: {}; + keys?: { x?: string; value: string[]; } + rows?: PrimitiveArray[]; + columns?: PrimitiveArray[]; classes?: { [key: string]: string }; - categories?: Array; + categories?: string[]; axes?: { [key: string]: string }; colors?: { [key: string]: string | d3.Rgb }; type?: string; types?: { [key: string]: string }; unload?: boolean | ArrayOrString; - done?: () => any; + done?(): any; }): void; /** * Unload data to the chart. @@ -858,21 +883,22 @@ declare namespace c3 { unload(targetIds?: TargetIds, done?: () => any): any; /** * Flow data to the chart. By this API, you can append new data points to the chart. - * If json, rows and columns given, the data will be loaded. If data that has the same target id is given, the chart will be appended. Otherwise, new target will be added. One of these is required when calling. If json specified, keys is required as well as data.json + * If json, rows and columns given, the data will be loaded. If data that has the same target id is given, the chart will be appended. Otherwise, new target will be added. One of these is + * required when calling. If json specified, keys is required as well as data.json * If to is given, the lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points. * If length is given, the lower x edge will move by the number of this argument. * If duration is given, the duration of the transition will be specified value. If not given, transition.duration will be used as default. * If done is given, the specified function will be called when flow ends. */ flow(args: { - json?: Object; - keys?: { x?: string; value: Array; } - rows?: Array; - columns?: Array; + json?: {}; + keys?: { x?: string; value: string[]; } + rows?: PrimitiveArray[]; + columns?: PrimitiveArray[]; to?: any; length?: number; duration?: number; - done?: () => any; + done?(): any; }): void; /** * Change data point state to selected. By this API, you can select data points. To use this API, data.selection.enabled needs to be set true. @@ -880,13 +906,13 @@ declare namespace c3 { * @param indices Specify indices to be selected. If this argument is not given, all data points will be the candidate. * @param resetOthers If this argument is set true, the data points that are not specified by ids, indices will be unselected. */ - select(ids?: Array, indices?: Array, resetOthers?: boolean): void; + select(ids?: string[], indices?: number[], resetOthers?: boolean): void; /** * Change data point state to unselected. By this API, you can unselect data points. To use this API, data.selection.enabled needs to be set true. * @param ids Specify target ids to be unselected. If this argument is not given, all targets will be the candidate. * @param indices Specify indices to be unselected. If this argument is not given, all data points will be the candidate. */ - unselect(ids?: Array, indices?: Array): void; + unselect(ids?: string[], indices?: number[]): void; /** * Get selected data points. By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true. * @param targetId You can filter the result by giving target id that you want to get. If not given, all of data points will be returned. @@ -902,7 +928,7 @@ declare namespace c3 { * Update groups for the targets. * @param groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped. */ - groups(groups: Array>): void; + groups(groups: string[][]): void; xgrids: GridOperations; @@ -913,15 +939,16 @@ declare namespace c3 { * Update regions. * @param regions Regions will be replaced with this argument. The format of this argument is the same as regions. */ - (regions: Array): void; + (regions: any[]): void; /** * Add new region. This API adds new region instead of replacing like regions. * @param grids New region will be added. The format of this argument is the same as regions and it's possible to give an Object if only one region will be added. */ - add(regions: Array | Object): void; + add(regions: any[] | {}): void; /** * Remove regions. This API removes regions. - * @param args This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be removed. + * @param args This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be + * removed. */ remove(args?: { value?: number | string; class?: string }): void; }; @@ -941,7 +968,7 @@ declare namespace c3 { * Get values of the data loaded in the chart. * @param targetIds This API returns the values of specified target. If this argument is not given, null will be retruned. */ - values(targetIds?: ArrayOrString): Array; + values(targetIds?: ArrayOrString): any[]; /** * Get and set names of the data loaded in the chart. * @param names If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as data.names. @@ -970,7 +997,7 @@ declare namespace c3 { * Get and set the categories * @param categories: Value of the categories to update */ - categories(categories?: Array): Array; + categories(categories?: string[]): string[]; /** * Get the color for the specified targetId @@ -1015,12 +1042,14 @@ declare namespace c3 { legend: { /** * Show legend for each target. - * @param targetIds If targetIds is given, specified target's legend will be shown. If only one target is the candidate, String can be passed. If no argument is given, all of target's legend will be shown. + * @param targetIds If targetIds is given, specified target's legend will be shown. If only one target is the candidate, String can be passed. If no argument is given, all of target's + * legend will be shown. */ show(targetIds?: ArrayOrString): void; /** * Hide legend for each target. - * @param targetIds If targetIds is given, specified target's legend will be hidden. If only one target is the candidate, String can be passed. If no argument is given, all of target's legend will be hidden. + * @param targetIds If targetIds is given, specified target's legend will be hidden. If only one target is the candidate, String can be passed. If no argument is given, all of target's + * legend will be hidden. */ hide(targetIds?: ArrayOrString): void; }; @@ -1030,7 +1059,7 @@ declare namespace c3 { * Zoom by giving x domain. * @param domain If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned. */ - (domain?: Array): Array; + (domain?: number[]): number[]; /** * Enable and disable zooming. @@ -1066,18 +1095,19 @@ declare namespace c3 { * Update the x/y grid lines. * @param grids X/Y grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines or grid.y.lines. */ - (grids: Array): void; + (grids: any[]): void; /** * Add x/y grid lines. This API adds new x/y grid lines instead of replacing like xgrids. * @param grids New x/y grid lines will be added. The format of this argument is the same as grid.x.lines or grid.y.lines and it's possible to give an Object if only one line will be added. */ - add(grids: Array | Object): void; + add(grids: any[] | {}): void; /** * Remove x/y grid lines. This API removes x/y grid lines. - * @param args This argument should include value or class. If value is given, the x/y grid lines that have specified x/y value will be removed. If class is given, the x/y grid lines that have specified class will be removed. If args is not given, all of x/y grid lines will be removed. + * @param args This argument should include value or class. If value is given, the x/y grid lines that have specified x/y value will be removed. If class is given, the x/y grid lines that + * have specified class will be removed. If args is not given, all of x/y grid lines will be removed. */ remove(args?: { class?: string; value?: number | string }): void; } - export function generate(config: ChartConfiguration): ChartAPI; + function generate(config: ChartConfiguration): ChartAPI; } diff --git a/types/c3/tsconfig.json b/types/c3/tsconfig.json index 640f7156af..e94921ceb7 100644 --- a/types/c3/tsconfig.json +++ b/types/c3/tsconfig.json @@ -6,8 +6,8 @@ "dom" ], "noImplicitAny": true, - "noImplicitThis": false, - "strictNullChecks": false, + "noImplicitThis": true, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/c3/tslint.json b/types/c3/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/c3/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/cal-heatmap/index.d.ts b/types/cal-heatmap/index.d.ts index 194d9fa128..f4b9f4df4f 100644 --- a/types/cal-heatmap/index.d.ts +++ b/types/cal-heatmap/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/wa0x6e/cal-heatmap // Definitions by: Chris Baker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as d3 from "d3"; diff --git a/types/catbox/index.d.ts b/types/catbox/index.d.ts index e832f58446..5dad5af29a 100644 --- a/types/catbox/index.d.ts +++ b/types/catbox/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/hapijs/catbox // Definitions by: Jason Swearingen , AJP // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import * as Boom from 'boom'; diff --git a/types/chai-arrays/index.d.ts b/types/chai-arrays/index.d.ts index d387d1614d..d50be4f101 100644 --- a/types/chai-arrays/index.d.ts +++ b/types/chai-arrays/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Clément Prévot // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare global { namespace Chai { diff --git a/types/chai-as-promised/chai-as-promised-tests.ts b/types/chai-as-promised/chai-as-promised-tests.ts index 7dceef924a..7e422521aa 100644 --- a/types/chai-as-promised/chai-as-promised-tests.ts +++ b/types/chai-as-promised/chai-as-promised-tests.ts @@ -7,7 +7,7 @@ class TestClass {} // ReSharper disable WrongExpressionStatement // BDD API (expect) -var thenableNum: PromiseLike; +var thenableNum: PromiseLike = Promise.resolve(3); thenableNum = chai.expect(thenableNum).to.eventually.equal(3); thenableNum = chai.expect(thenableNum).to.eventually.have.property('foo'); thenableNum = chai.expect(thenableNum).to.become(3); @@ -40,8 +40,8 @@ thenableNum = thenableNum.should.eventually.equal(3).notify(() => console.log('d thenableNum = thenableNum.should.be.fulfilled.and.notify(() => console.log('done')); // Complex examples on https://github.com/domenic/chai-as-promised#working-with-non-promisefriendly-test-runners -thenableNum.should.be.fulfilled.then(function () { - thenableNum.should.equal("after"); +thenableNum.should.be.fulfilled.then(() => { + thenableNum.should.equal("after"); }).should.notify(() => console.log('done')); Promise.all([ @@ -63,3 +63,15 @@ thenableVoid = chai.assert.isRejected(thenableNum, /error message matcher/, "opt // Check that original chai assertions are not broken var undef: void; undef = chai.assert.equal(10, 4, 'Message'); + +chaiAsPromised.transferPromiseness = (assertion, promise) => { + assertion.then = promise.then.bind(promise); +}; + +chaiAsPromised.transformAsserterArgs = (args) => { + return args.map((x) => x + 1); +}; + +chaiAsPromised.transformAsserterArgs = (args) => { + return Promise.all(args); +}; diff --git a/types/chai-as-promised/index.d.ts b/types/chai-as-promised/index.d.ts index 4c36eccb61..0dde8837dd 100644 --- a/types/chai-as-promised/index.d.ts +++ b/types/chai-as-promised/index.d.ts @@ -1,13 +1,19 @@ // Type definitions for chai-as-promised // Project: https://github.com/domenic/chai-as-promised/ -// Definitions by: jt000 , Yuki Kokubun +// Definitions by: jt000 , Yuki Kokubun , Leonard Thieu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// declare module 'chai-as-promised' { function chaiAsPromised(chai: any, utils: any): void; - namespace chaiAsPromised {} + + namespace chaiAsPromised { + function transferPromiseness(assertion: Chai.PromisedAssertion, promise: PromiseLike): void; + + function transformAsserterArgs(values: any[]): any; + } + export = chaiAsPromised; } @@ -59,7 +65,7 @@ declare namespace Chai { haveOwnProperty: PromisedOwnProperty; length: PromisedLength; lengthOf: PromisedLength; - match(regexp: RegExp|string, message?: string): PromisedAssertion; + match(regexp: RegExp | string, message?: string): PromisedAssertion; string(string: string, message?: string): PromisedAssertion; keys: PromisedKeys; key(string: string): PromisedAssertion; diff --git a/types/chai-as-promised/tsconfig.json b/types/chai-as-promised/tsconfig.json index cdca01dc50..71874931b3 100644 --- a/types/chai-as-promised/tsconfig.json +++ b/types/chai-as-promised/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -20,4 +20,4 @@ "index.d.ts", "chai-as-promised-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/chai-enzyme/chai-enzyme-tests.tsx b/types/chai-enzyme/chai-enzyme-tests.tsx index 8fc64e2711..77ad5a0169 100644 --- a/types/chai-enzyme/chai-enzyme-tests.tsx +++ b/types/chai-enzyme/chai-enzyme-tests.tsx @@ -5,7 +5,7 @@ import { shallow } from "enzyme"; const Test = () =>
; -class Test2 extends React.Component<{}, {}> { +class Test2 extends React.Component { render() { return
; } diff --git a/types/chai-enzyme/index.d.ts b/types/chai-enzyme/index.d.ts index 92c5817504..86b6f6f7b3 100644 --- a/types/chai-enzyme/index.d.ts +++ b/types/chai-enzyme/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/producthunt/chai-enzyme // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 /// diff --git a/types/chai-jquery/index.d.ts b/types/chai-jquery/index.d.ts index 839a57a370..453336b08b 100644 --- a/types/chai-jquery/index.d.ts +++ b/types/chai-jquery/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/chaijs/chai-jquery // Definitions by: Kazi Manzur Rashid // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/chai-string/chai-string-tests.ts b/types/chai-string/chai-string-tests.ts index 16f32760f8..615a6c1f95 100644 --- a/types/chai-string/chai-string-tests.ts +++ b/types/chai-string/chai-string-tests.ts @@ -1,12 +1,11 @@ /// -/// var should = chai.should(); var assert = chai.assert; var expect = chai.expect; -var chai_string = require('chai-string'); +import chai_string = require("chai-string"); chai.use(chai_string); describe('chai-string', function() { diff --git a/types/chai/chai-tests.ts b/types/chai/chai-tests.ts index 756212995d..31802ca303 100644 --- a/types/chai/chai-tests.ts +++ b/types/chai/chai-tests.ts @@ -490,20 +490,20 @@ function property() { ({ foo: { bar: 'baz' } }).should.have.property('foo.bar'); } -function deepProperty() { +function nestedProperty() { expect({ 'foo.bar': 'baz' }) - .to.not.have.deep.property('foo.bar'); + .to.not.have.nested.property('foo.bar'); ({ 'foo.bar': 'baz' }).should - .not.have.deep.property('foo.bar'); + .not.have.nested.property('foo.bar'); expect({ foo: { bar: 'baz' } }) - .to.have.deep.property('foo.bar'); + .to.have.nested.property('foo.bar'); ({ foo: { bar: 'baz' } }).should - .have.deep.property('foo.bar'); + .have.nested.property('foo.bar'); expect({ 'foo.bar': 'baz' }) - .to.have.deep.property('foo.bar'); + .to.have.nested.property('foo.bar'); ({ 'foo.bar': 'baz' }).should - .have.deep.property('foo.bar'); + .have.nested.property('foo.bar'); } function property2() { @@ -525,24 +525,24 @@ function property2() { 'asd'.should.have.property('constructor', Number, 'blah'); } -function deepProperty2() { +function nestedProperty2() { expect({ foo: { bar: 'baz' } }) - .to.have.deep.property('foo.bar', 'baz'); + .to.have.nested.property('foo.bar', 'baz'); ({ foo: { bar: 'baz' } }).should - .have.deep.property('foo.bar', 'baz'); + .have.nested.property('foo.bar', 'baz'); expect({ foo: { bar: 'baz' } }) - .to.have.deep.property('foo.bar', 'quux', 'blah'); + .to.have.nested.property('foo.bar', 'quux', 'blah'); ({ foo: { bar: 'baz' } }).should - .have.deep.property('foo.bar', 'quux', 'blah'); + .have.nested.property('foo.bar', 'quux', 'blah'); expect({ foo: { bar: 'baz' } }) - .to.not.have.deep.property('foo.bar', 'baz', 'blah'); + .to.not.have.nested.property('foo.bar', 'baz', 'blah'); ({ foo: { bar: 'baz' } }).should - .not.have.deep.property('foo.bar', 'baz', 'blah'); + .not.have.nested.property('foo.bar', 'baz', 'blah'); expect({ foo: 5 }) - .to.not.have.deep.property('foo.bar', 'baz', 'blah'); + .to.not.have.nested.property('foo.bar', 'baz', 'blah'); ({ foo: 5 }).should - .not.have.deep.property('foo.bar', 'baz', 'blah'); + .not.have.nested.property('foo.bar', 'baz', 'blah'); } function ownProperty() { @@ -1017,6 +1017,24 @@ function sameDeepMembers() { assert.sameDeepMembers([{ id: 5 }, { id: 4 }], [{ id: 4 }, { id: 5 }]); } +function orderedMembers() { + expect([1, 2]).to.have.ordered.members([1, 2]).but.not.have.ordered.members([2, 1]); + expect([1, 2, 3]).to.include.ordered.members([1, 2]).but.not.include.ordered.members([2, 3]); + expect([1, 2, 3]).to.have.ordered.members([1, 2, 3]); + expect([1, 2, 3]).to.have.members([2, 1, 3]).but.not.ordered.members([2, 1, 3]); + expect([{a: 1}, {b: 2}, {c: 3}]).to.include.deep.ordered.members([{a: 1}, {b: 2}]).but.not.include.deep.ordered.members([{b: 2}, {c: 3}]); + + assert.sameOrderedMembers([ 1, 2, 3 ], [ 1, 2, 3 ], 'same ordered members'); + assert.notSameOrderedMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'not same ordered members'); + assert.sameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 }, { c: 3 } ], 'same deep ordered members'); + assert.notSameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 }, { c: 3 } ], 'not same deep ordered members'); + + assert.includeOrderedMembers([ 1, 2, 3 ], [ 1, 2 ], 'include ordered members'); + assert.notIncludeOrderedMembers([ 1, 2, 3 ], [ 2, 1 ], 'not include ordered members'); + assert.includeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 } ], 'include deep ordered members'); + assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { c: 3 } ], 'not include deep ordered members'); +} + function members() { expect([5, 4]).members([4, 5]); expect([5, 4]).members([5, 4]); @@ -1343,7 +1361,7 @@ suite('assert', () => { assert.lengthOf([1, 2, 3], 3); assert.lengthOf('foobar', 6); assert.lengthOf('foobar', 5); - assert.lengthOf(1, 5); + assert.lengthOf({ length: 1 }, 5); }); test('match', () => { @@ -1659,4 +1677,4 @@ suite('assert', () => { assert.notFrozen(obj); assert.notFrozen(obj, 'message'); }); -}); \ No newline at end of file +}); diff --git a/types/chai/index.d.ts b/types/chai/index.d.ts index 7690fe49a7..20f3c2b7df 100644 --- a/types/chai/index.d.ts +++ b/types/chai/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for chai 3.5.0 +// Type definitions for chai 4.0.0 // Project: http://chaijs.com/ // Definitions by: Jed Mao , // Bart van der Schoor , @@ -61,6 +61,8 @@ declare namespace Chai { interface Assertion extends LanguageChains, NumericComparison, TypeComparison { not: Assertion; deep: Deep; + ordered: Ordered; + nested: Nested; any: KeyFilter; all: KeyFilter; a: TypeComparison; @@ -133,6 +135,8 @@ declare namespace Chai { at: Assertion; of: Assertion; same: Assertion; + but: Assertion; + does: Assertion; } interface NumericComparison { @@ -167,6 +171,12 @@ declare namespace Chai { (expected: number, delta: number, message?: string): Assertion; } + interface Nested { + include: Include; + property: Property; + members: Members; + } + interface Deep { equal: Equal; equals: Equal; @@ -174,6 +184,11 @@ declare namespace Chai { include: Include; property: Property; members: Members; + ordered: Ordered; + } + + interface Ordered { + members: Members; } interface KeyFilter { @@ -206,6 +221,8 @@ declare namespace Chai { (value: string, message?: string): Assertion; (value: number, message?: string): Assertion; keys: Keys; + deep: Deep; + ordered: Ordered; members: Members; any: KeyFilter; all: KeyFilter; @@ -256,7 +273,7 @@ declare namespace Chai { /** * Throws a failure. - * + * * @type T Type of the objects. * @param actual Actual value. * @param expected Potential expected value. @@ -268,7 +285,7 @@ declare namespace Chai { /** * Asserts that object is truthy. - * + * * @type T Type of object. * @param object Object to test. * @param message Message to display on error. @@ -277,7 +294,7 @@ declare namespace Chai { /** * Asserts that object is truthy. - * + * * @type T Type of object. * @param object Object to test. * @param message Message to display on error. @@ -286,7 +303,7 @@ declare namespace Chai { /** * Asserts that object is falsy. - * + * * @type T Type of object. * @param object Object to test. * @param message Message to display on error. @@ -295,7 +312,7 @@ declare namespace Chai { /** * Asserts that object is falsy. - * + * * @type T Type of object. * @param object Object to test. * @param message Message to display on error. @@ -304,7 +321,7 @@ declare namespace Chai { /** * Asserts non-strict equality (==) of actual and expected. - * + * * @type T Type of the objects. * @param actual Actual value. * @param expected Potential expected value. @@ -314,7 +331,7 @@ declare namespace Chai { /** * Asserts non-strict inequality (==) of actual and expected. - * + * * @type T Type of the objects. * @param actual Actual value. * @param expected Potential expected value. @@ -324,7 +341,7 @@ declare namespace Chai { /** * Asserts strict equality (===) of actual and expected. - * + * * @type T Type of the objects. * @param actual Actual value. * @param expected Potential expected value. @@ -334,7 +351,7 @@ declare namespace Chai { /** * Asserts strict inequality (==) of actual and expected. - * + * * @type T Type of the objects. * @param actual Actual value. * @param expected Potential expected value. @@ -344,7 +361,7 @@ declare namespace Chai { /** * Asserts that actual is deeply equal to expected. - * + * * @type T Type of the objects. * @param actual Actual value. * @param expected Potential expected value. @@ -354,7 +371,7 @@ declare namespace Chai { /** * Asserts that actual is not deeply equal to expected. - * + * * @type T Type of the objects. * @param actual Actual value. * @param expected Potential expected value. @@ -364,7 +381,7 @@ declare namespace Chai { /** * Asserts valueToCheck is strictly greater than (>) valueToBeAbove. - * + * * @param valueToCheck Actual value. * @param valueToBeAbove Minimum Potential expected value. * @param message Message to display on error. @@ -373,7 +390,7 @@ declare namespace Chai { /** * Asserts valueToCheck is greater than or equal to (>=) valueToBeAtLeast. - * + * * @param valueToCheck Actual value. * @param valueToBeAtLeast Minimum Potential expected value. * @param message Message to display on error. @@ -382,7 +399,7 @@ declare namespace Chai { /** * Asserts valueToCheck is strictly less than (<) valueToBeBelow. - * + * * @param valueToCheck Actual value. * @param valueToBeBelow Minimum Potential expected value. * @param message Message to display on error. @@ -391,7 +408,7 @@ declare namespace Chai { /** * Asserts valueToCheck is greater than or equal to (>=) valueToBeAtMost. - * + * * @param valueToCheck Actual value. * @param valueToBeAtMost Minimum Potential expected value. * @param message Message to display on error. @@ -400,7 +417,7 @@ declare namespace Chai { /** * Asserts that value is true. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -409,7 +426,7 @@ declare namespace Chai { /** * Asserts that value is false. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -418,7 +435,7 @@ declare namespace Chai { /** * Asserts that value is not true. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -427,7 +444,7 @@ declare namespace Chai { /** * Asserts that value is not false. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -436,7 +453,7 @@ declare namespace Chai { /** * Asserts that value is null. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -445,7 +462,7 @@ declare namespace Chai { /** * Asserts that value is not null. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -454,7 +471,7 @@ declare namespace Chai { /** * Asserts that value is not null. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -463,7 +480,7 @@ declare namespace Chai { /** * Asserts that value is not null. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -472,7 +489,7 @@ declare namespace Chai { /** * Asserts that value is undefined. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -481,7 +498,7 @@ declare namespace Chai { /** * Asserts that value is not undefined. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -490,7 +507,7 @@ declare namespace Chai { /** * Asserts that value is a function. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -499,7 +516,7 @@ declare namespace Chai { /** * Asserts that value is not a function. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -509,7 +526,7 @@ declare namespace Chai { /** * Asserts that value is an object of type 'Object' * (as revealed by Object.prototype.toString). - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -520,7 +537,7 @@ declare namespace Chai { /** * Asserts that value is not an object of type 'Object' * (as revealed by Object.prototype.toString). - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -529,7 +546,7 @@ declare namespace Chai { /** * Asserts that value is an array. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -538,7 +555,7 @@ declare namespace Chai { /** * Asserts that value is not an array. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -547,7 +564,7 @@ declare namespace Chai { /** * Asserts that value is a string. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -556,7 +573,7 @@ declare namespace Chai { /** * Asserts that value is not a string. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -565,7 +582,7 @@ declare namespace Chai { /** * Asserts that value is a number. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -574,7 +591,7 @@ declare namespace Chai { /** * Asserts that value is not a number. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -583,7 +600,7 @@ declare namespace Chai { /** * Asserts that value is a boolean. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -592,7 +609,7 @@ declare namespace Chai { /** * Asserts that value is not a boolean. - * + * * @type T Type of value. * @param value Actual value. * @param message Message to display on error. @@ -601,7 +618,7 @@ declare namespace Chai { /** * Asserts that value's type is name, as determined by Object.prototype.toString. - * + * * @type T Type of value. * @param value Actual value. * @param name Potential expected type name of value. @@ -611,7 +628,7 @@ declare namespace Chai { /** * Asserts that value's type is not name, as determined by Object.prototype.toString. - * + * * @type T Type of value. * @param value Actual value. * @param name Potential expected type name of value. @@ -621,7 +638,7 @@ declare namespace Chai { /** * Asserts that value is an instance of constructor. - * + * * @type T Type of value. * @param value Actual value. * @param constructor Potential expected contructor of value. @@ -631,7 +648,7 @@ declare namespace Chai { /** * Asserts that value is not an instance of constructor. - * + * * @type T Type of value. * @param value Actual value. * @param constructor Potential expected contructor of value. @@ -641,7 +658,7 @@ declare namespace Chai { /** * Asserts that haystack includes needle. - * + * * @param haystack Container string. * @param needle Potential expected substring of haystack. * @param message Message to display on error. @@ -650,7 +667,7 @@ declare namespace Chai { /** * Asserts that haystack includes needle. - * + * * @type T Type of values in haystack. * @param haystack Container array. * @param needle Potential value contained in haystack. @@ -660,7 +677,7 @@ declare namespace Chai { /** * Asserts that haystack does not include needle. - * + * * @param haystack Container string. * @param needle Potential expected substring of haystack. * @param message Message to display on error. @@ -669,7 +686,7 @@ declare namespace Chai { /** * Asserts that haystack does not include needle. - * + * * @type T Type of values in haystack. * @param haystack Container array. * @param needle Potential value contained in haystack. @@ -679,7 +696,7 @@ declare namespace Chai { /** * Asserts that value matches the regular expression regexp. - * + * * @param value Actual value. * @param regexp Potential match of value. * @param message Message to display on error. @@ -688,7 +705,7 @@ declare namespace Chai { /** * Asserts that value does not match the regular expression regexp. - * + * * @param value Actual value. * @param regexp Potential match of value. * @param message Message to display on error. @@ -697,7 +714,7 @@ declare namespace Chai { /** * Asserts that object has a property named by property. - * + * * @type T Type of object. * @param object Container object. * @param property Potential contained property of object. @@ -707,7 +724,7 @@ declare namespace Chai { /** * Asserts that object has a property named by property. - * + * * @type T Type of object. * @param object Container object. * @param property Potential contained property of object. @@ -718,7 +735,7 @@ declare namespace Chai { /** * Asserts that object has a property named by property, which can be a string * using dot- and bracket-notation for deep reference. - * + * * @type T Type of object. * @param object Container object. * @param property Potential contained property of object. @@ -729,7 +746,7 @@ declare namespace Chai { /** * Asserts that object does not have a property named by property, which can be a * string using dot- and bracket-notation for deep reference. - * + * * @type T Type of object. * @param object Container object. * @param property Potential contained property of object. @@ -739,7 +756,7 @@ declare namespace Chai { /** * Asserts that object has a property named by property with value given by value. - * + * * @type T Type of object. * @type V Type of value. * @param object Container object. @@ -751,7 +768,7 @@ declare namespace Chai { /** * Asserts that object has a property named by property with value given by value. - * + * * @type T Type of object. * @type V Type of value. * @param object Container object. @@ -764,7 +781,7 @@ declare namespace Chai { /** * Asserts that object has a property named by property, which can be a string * using dot- and bracket-notation for deep reference. - * + * * @type T Type of object. * @type V Type of value. * @param object Container object. @@ -777,7 +794,7 @@ declare namespace Chai { /** * Asserts that object does not have a property named by property, which can be a * string using dot- and bracket-notation for deep reference. - * + * * @type T Type of object. * @type V Type of value. * @param object Container object. @@ -789,7 +806,7 @@ declare namespace Chai { /** * Asserts that object has a length property with the expected value. - * + * * @type T Type of object. * @param object Container object. * @param length Potential expected length of object. @@ -799,7 +816,7 @@ declare namespace Chai { /** * Asserts that fn will throw an error. - * + * * @param fn Function that may throw. * @param message Message to display on error. */ @@ -807,7 +824,7 @@ declare namespace Chai { /** * Asserts that function will throw an error with message matching regexp. - * + * * @param fn Function that may throw. * @param regExp Potential expected message match. * @param message Message to display on error. @@ -816,7 +833,7 @@ declare namespace Chai { /** * Asserts that function will throw an error that is an instance of constructor. - * + * * @param fn Function that may throw. * @param constructor Potential expected error constructor. * @param message Message to display on error. @@ -826,7 +843,7 @@ declare namespace Chai { /** * Asserts that function will throw an error that is an instance of constructor * and an error with message matching regexp. - * + * * @param fn Function that may throw. * @param constructor Potential expected error constructor. * @param message Message to display on error. @@ -835,7 +852,7 @@ declare namespace Chai { /** * Asserts that fn will throw an error. - * + * * @param fn Function that may throw. * @param message Message to display on error. */ @@ -843,7 +860,7 @@ declare namespace Chai { /** * Asserts that function will throw an error with message matching regexp. - * + * * @param fn Function that may throw. * @param regExp Potential expected message match. * @param message Message to display on error. @@ -852,7 +869,7 @@ declare namespace Chai { /** * Asserts that function will throw an error that is an instance of constructor. - * + * * @param fn Function that may throw. * @param constructor Potential expected error constructor. * @param message Message to display on error. @@ -862,7 +879,7 @@ declare namespace Chai { /** * Asserts that function will throw an error that is an instance of constructor * and an error with message matching regexp. - * + * * @param fn Function that may throw. * @param constructor Potential expected error constructor. * @param message Message to display on error. @@ -871,7 +888,7 @@ declare namespace Chai { /** * Asserts that fn will throw an error. - * + * * @param fn Function that may throw. * @param message Message to display on error. */ @@ -879,7 +896,7 @@ declare namespace Chai { /** * Asserts that function will throw an error with message matching regexp. - * + * * @param fn Function that may throw. * @param regExp Potential expected message match. * @param message Message to display on error. @@ -888,7 +905,7 @@ declare namespace Chai { /** * Asserts that function will throw an error that is an instance of constructor. - * + * * @param fn Function that may throw. * @param constructor Potential expected error constructor. * @param message Message to display on error. @@ -898,7 +915,7 @@ declare namespace Chai { /** * Asserts that function will throw an error that is an instance of constructor * and an error with message matching regexp. - * + * * @param fn Function that may throw. * @param constructor Potential expected error constructor. * @param message Message to display on error. @@ -907,7 +924,7 @@ declare namespace Chai { /** * Asserts that fn will not throw an error. - * + * * @param fn Function that may throw. * @param message Message to display on error. */ @@ -915,7 +932,7 @@ declare namespace Chai { /** * Asserts that function will throw an error with message matching regexp. - * + * * @param fn Function that may throw. * @param regExp Potential expected message match. * @param message Message to display on error. @@ -924,7 +941,7 @@ declare namespace Chai { /** * Asserts that function will throw an error that is an instance of constructor. - * + * * @param fn Function that may throw. * @param constructor Potential expected error constructor. * @param message Message to display on error. @@ -934,7 +951,7 @@ declare namespace Chai { /** * Asserts that function will throw an error that is an instance of constructor * and an error with message matching regexp. - * + * * @param fn Function that may throw. * @param constructor Potential expected error constructor. * @param message Message to display on error. @@ -943,7 +960,7 @@ declare namespace Chai { /** * Compares two values using operator. - * + * * @param val1 Left value during comparison. * @param operator Comparison operator. * @param val2 Right value during comparison. @@ -953,7 +970,7 @@ declare namespace Chai { /** * Asserts that the target is equal to expected, to within a +/- delta range. - * + * * @param actual Actual value * @param expected Potential expected value. * @param delta Maximum differenced between values. @@ -963,7 +980,7 @@ declare namespace Chai { /** * Asserts that the target is equal to expected, to within a +/- delta range. - * + * * @param actual Actual value * @param expected Potential expected value. * @param delta Maximum differenced between values. @@ -973,7 +990,7 @@ declare namespace Chai { /** * Asserts that set1 and set2 have the same members. Order is not take into account. - * + * * @type T Type of set values. * @param set1 Actual set of values. * @param set2 Potential expected set of values. @@ -984,7 +1001,7 @@ declare namespace Chai { /** * Asserts that set1 and set2 have the same members using deep equality checking. * Order is not take into account. - * + * * @type T Type of set values. * @param set1 Actual set of values. * @param set2 Potential expected set of values. @@ -992,9 +1009,97 @@ declare namespace Chai { */ sameDeepMembers(set1: T[], set2: T[], message?: string): void; + /** + * Asserts that set1 and set2 have the same members in the same order. + * Uses a strict equality check (===). + * + * @type T Type of set values. + * @param set1 Actual set of values. + * @param set2 Potential expected set of values. + * @param message Message to display on error. + */ + sameOrderedMembers(set1: T[], set2: T[], message?: string): void; + + /** + * Asserts that set1 and set2 don’t have the same members in the same order. + * Uses a strict equality check (===). + * + * @type T Type of set values. + * @param set1 Actual set of values. + * @param set2 Potential expected set of values. + * @param message Message to display on error. + */ + notSameOrderedMembers(set1: T[], set2: T[], message?: string): void; + + /** + * Asserts that set1 and set2 have the same members in the same order. + * Uses a deep equality check. + * + * @type T Type of set values. + * @param set1 Actual set of values. + * @param set2 Potential expected set of values. + * @param message Message to display on error. + */ + sameDeepOrderedMembers(set1: T[], set2: T[], message?: string): void; + + /** + * Asserts that set1 and set2 don’t have the same members in the same order. + * Uses a deep equality check. + * + * @type T Type of set values. + * @param set1 Actual set of values. + * @param set2 Potential expected set of values. + * @param message Message to display on error. + */ + notSameDeepOrderedMembers(set1: T[], set2: T[], message?: string): void; + + /** + * Asserts that subset is included in superset in the same order beginning with the first element in superset. + * Uses a strict equality check (===). + * + * @type T Type of set values. + * @param superset Actual set of values. + * @param subset Potential contained set of values. + * @param message Message to display on error. + */ + includeOrderedMembers(superset: T[], subset: T[], message?: string): void; + + /** + * Asserts that subset isn’t included in superset in the same order beginning with the first element in superset. + * Uses a strict equality check (===). + * + * @type T Type of set values. + * @param superset Actual set of values. + * @param subset Potential contained set of values. + * @param message Message to display on error. + */ + notIncludeOrderedMembers(superset: T[], subset: T[], message?: string): void; + + /** + * Asserts that subset is included in superset in the same order beginning with the first element in superset. + * Uses a deep equality check. + * + * @type T Type of set values. + * @param superset Actual set of values. + * @param subset Potential contained set of values. + * @param message Message to display on error. + */ + includeDeepOrderedMembers(superset: T[], subset: T[], message?: string): void; + + /** + * Asserts that subset isn’t included in superset in the same order beginning with the first element in superset. + * Uses a deep equality check. + * + * @type T Type of set values. + * @param superset Actual set of values. + * @param subset Potential contained set of values. + * @param message Message to display on error. + */ + notIncludeDeepOrderedMembers(superset: T[], subset: T[], message?: string): void; + /** * Asserts that subset is included in superset. Order is not take into account. - * + * * @type T Type of set values. * @param superset Actual set of values. * @param subset Potential contained set of values. @@ -1005,7 +1110,7 @@ declare namespace Chai { /** * Asserts that subset is included in superset using deep equality checking. * Order is not take into account. - * + * * @type T Type of set values. * @param superset Actual set of values. * @param subset Potential contained set of values. @@ -1015,7 +1120,7 @@ declare namespace Chai { /** * Asserts that non-object, non-array value inList appears in the flat array list. - * + * * @type T Type of list values. * @param inList Value expected to be in the list. * @param list List of values. @@ -1025,7 +1130,7 @@ declare namespace Chai { /** * Asserts that a function changes the value of a property. - * + * * @type T Type of object. * @param modifier Function to run. * @param object Container object. @@ -1036,7 +1141,7 @@ declare namespace Chai { /** * Asserts that a function does not change the value of a property. - * + * * @type T Type of object. * @param modifier Function to run. * @param object Container object. @@ -1047,7 +1152,7 @@ declare namespace Chai { /** * Asserts that a function increases an object property. - * + * * @type T Type of object. * @param modifier Function to run. * @param object Container object. @@ -1058,7 +1163,7 @@ declare namespace Chai { /** * Asserts that a function does not increase an object property. - * + * * @type T Type of object. * @param modifier Function to run. * @param object Container object. @@ -1069,7 +1174,7 @@ declare namespace Chai { /** * Asserts that a function decreases an object property. - * + * * @type T Type of object. * @param modifier Function to run. * @param object Container object. @@ -1080,7 +1185,7 @@ declare namespace Chai { /** * Asserts that a function does not decrease an object property. - * + * * @type T Type of object. * @param modifier Function to run. * @param object Container object. @@ -1091,7 +1196,7 @@ declare namespace Chai { /** * Asserts if value is not a false value, and throws if it is a true value. - * + * * @type T Type of object. * @param object Actual value. * @param message Message to display on error. @@ -1102,7 +1207,7 @@ declare namespace Chai { /** * Asserts that object is extensible (can have new properties added to it). - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1111,7 +1216,7 @@ declare namespace Chai { /** * Asserts that object is extensible (can have new properties added to it). - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1120,7 +1225,7 @@ declare namespace Chai { /** * Asserts that object is not extensible. - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1129,7 +1234,7 @@ declare namespace Chai { /** * Asserts that object is not extensible. - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1139,7 +1244,7 @@ declare namespace Chai { /** * Asserts that object is sealed (can have new properties added to it * and its existing properties cannot be removed). - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1149,7 +1254,7 @@ declare namespace Chai { /** * Asserts that object is sealed (can have new properties added to it * and its existing properties cannot be removed). - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1158,7 +1263,7 @@ declare namespace Chai { /** * Asserts that object is not sealed. - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1167,7 +1272,7 @@ declare namespace Chai { /** * Asserts that object is not sealed. - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1177,7 +1282,7 @@ declare namespace Chai { /** * Asserts that object is frozen (cannot have new properties added to it * and its existing properties cannot be removed). - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1187,7 +1292,7 @@ declare namespace Chai { /** * Asserts that object is frozen (cannot have new properties added to it * and its existing properties cannot be removed). - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1197,7 +1302,7 @@ declare namespace Chai { /** * Asserts that object is not frozen (cannot have new properties added to it * and its existing properties cannot be removed). - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. @@ -1207,7 +1312,7 @@ declare namespace Chai { /** * Asserts that object is not frozen (cannot have new properties added to it * and its existing properties cannot be removed). - * + * * @type T Type of object * @param object Actual value. * @param message Message to display on error. diff --git a/types/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts index 2b38efaa25..b9ffd7a8f6 100644 --- a/types/chart.js/chart.js-tests.ts +++ b/types/chart.js/chart.js-tests.ts @@ -1,15 +1,17 @@ -import { Chart, LinearChartData } from 'chart.js'; +import { Chart, ChartData } from 'chart.js'; -//alternative: -//import chartjs = require('chart.js'); +// alternative: +// import chartjs = require('chart.js'); // => chartjs.Chart -var chart = new Chart(new CanvasRenderingContext2D(), { +let chart: Chart = new Chart(new CanvasRenderingContext2D(), { type: 'bar', - data: { + data: { labels: ['group 1'], datasets: [ { + backgroundColor: '#000000', + borderWidth: 1, label: 'test', data: [1] } diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index cad58a2aa8..6724d27112 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -1,7 +1,9 @@ -// Type definitions for Chart.js 2.4.0 +// Type definitions for Chart.js 2.4 // Project: https://github.com/nnnick/Chart.js // Definitions by: Alberto Nuti +// Fabien Lavocat // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -22,24 +24,63 @@ declare class Chart { toBase64: () => string; generateLegend: () => {}; getElementAtEvent: (e: any) => {}; - getElementsAtEvent: (e: any) => {}[]; - getDatasetAtEvent: (e: any) => {}[]; + getElementsAtEvent: (e: any) => Array<{}>; + getDatasetAtEvent: (e: any) => Array<{}>; + static pluginService: PluginServiceStatic; static defaults: { global: Chart.ChartOptions; - } + }; +} +declare class PluginServiceStatic { + register(plugin?: PluginServiceRegistrationOptions): void; +} + +interface PluginServiceRegistrationOptions { + beforeInit?(chartInstance: Chart): void; + afterInit?(chartInstance: Chart): void; + + resize?(chartInstance: Chart, newChartSize: Size): void; + + beforeUpdate?(chartInstance: Chart): void; + afterScaleUpdate?(chartInstance: Chart): void; + beforeDatasetsUpdate?(chartInstance: Chart): void; + afterDatasetsUpdate?(chartInstance: Chart): void; + afterUpdate?(chartInstance: Chart): void; + + // This is called at the start of a render. It is only called once, even if the animation will run for a number of frames. Use beforeDraw or afterDraw + // to do something on each animation frame + beforeRender?(chartInstance: Chart): void; + + // Easing is for animation + beforeDraw?(chartInstance: Chart, easing: string): void; + afterDraw?(chartInstance: Chart, easing: string): void; + // Before the datasets are drawn but after scales are drawn + beforeDatasetsDraw?(chartInstance: Chart, easing: string): void; + afterDatasetsDraw?(chartInstance: Chart, easing: string): void; + + destroy?(chartInstance: Chart): void; + + // Called when an event occurs on the chart + beforeEvent?(chartInstance: Chart, event: Event): void; + afterEvent?(chartInstance: Chart, event: Event): void; +} + +interface Size { + height: number; + width: number; } declare namespace Chart { - export type ChartType = 'line' | 'bar' | 'radar' | 'doughnut' | 'polarArea' | 'bubble'; + type ChartType = 'line' | 'bar' | 'radar' | 'doughnut' | 'polarArea' | 'bubble'; - export type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'; + type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'; - export type ScaleType = 'category' | 'linear' | 'logarithmic' | 'time' | 'radialLinear'; + type ScaleType = 'category' | 'linear' | 'logarithmic' | 'time' | 'radialLinear'; - export type PositionType = 'left' | 'right' | 'top' | 'bottom'; + type PositionType = 'left' | 'right' | 'top' | 'bottom'; - export interface ChartLegendItem { + interface ChartLegendItem { text?: string; fillStyle?: string; hidden?: boolean; @@ -51,58 +92,54 @@ declare namespace Chart { strokeStyle?: string; } - export interface ChartTooltipItem { + interface ChartTooltipItem { xLabel?: string; yLabel?: string; datasetIndex?: number; index?: number; } - export interface ChartTooltipCallback { - beforeTitle?: (item?: ChartTooltipItem[], data?: any) => void; - title?: (item?: ChartTooltipItem[], data?: any) => void; - afterTitle?: (item?: ChartTooltipItem[], data?: any) => void; - beforeBody?: (item?: ChartTooltipItem[], data?: any) => void; - beforeLabel?: (tooltipItem?: ChartTooltipItem, data?: any) => void; - label?: (tooltipItem?: ChartTooltipItem, data?: any) => void; - afterLabel?: (tooltipItem?: ChartTooltipItem, data?: any) => void; - afterBody?: (item?: ChartTooltipItem[], data?: any) => void; - beforeFooter?: (item?: ChartTooltipItem[], data?: any) => void; - footer?: (item?: ChartTooltipItem[], data?: any) => void; - afterFooter?: (item?: ChartTooltipItem[], data?: any) => void; + interface ChartTooltipCallback { + beforeTitle?(item?: ChartTooltipItem[], data?: any): void; + title?(item?: ChartTooltipItem[], data?: any): void; + afterTitle?(item?: ChartTooltipItem[], data?: any): void; + beforeBody?(item?: ChartTooltipItem[], data?: any): void; + beforeLabel?(tooltipItem?: ChartTooltipItem, data?: any): void; + label?(tooltipItem?: ChartTooltipItem, data?: any): void; + afterLabel?(tooltipItem?: ChartTooltipItem, data?: any): void; + afterBody?(item?: ChartTooltipItem[], data?: any): void; + beforeFooter?(item?: ChartTooltipItem[], data?: any): void; + footer?(item?: ChartTooltipItem[], data?: any): void; + afterFooter?(item?: ChartTooltipItem[], data?: any): void; } - export interface ChartAnimationParameter { + interface ChartAnimationParameter { chartInstance?: any; animationObject?: any; } - export interface ChartPoint { + interface ChartPoint { x?: number | string | Date; y?: number; } - export interface ChartConfiguration { + interface ChartConfiguration { type?: ChartType | string; data?: ChartData; options?: ChartOptions; } - export interface ChartData { - - } - - export interface LinearChartData extends ChartData { - labels?: string[]; + interface ChartData { + labels?: Array; datasets?: ChartDataSets[]; } - export interface ChartOptions { + interface ChartOptions { responsive?: boolean; responsiveAnimationDuration?: number; maintainAspectRatio?: boolean; events?: string[]; - onClick?: (any?: any) => any; + onClick?(any?: any): any; title?: ChartTitleOptions; legend?: ChartLegendOptions; tooltips?: ChartTooltipOptions; @@ -113,14 +150,14 @@ declare namespace Chart { cutoutPercentage?: number; } - export interface ChartFontOptions { + interface ChartFontOptions { defaultFontColor?: ChartColor; defaultFontFamily?: string; defaultFontSize?: number; defaultFontStyle?: string; } - export interface ChartTitleOptions { + interface ChartTitleOptions { display?: boolean; position?: string; fullWdith?: boolean; @@ -132,27 +169,27 @@ declare namespace Chart { text?: string; } - export interface ChartLegendOptions { + interface ChartLegendOptions { display?: boolean; position?: string; fullWidth?: boolean; - onClick?: (event: any, legendItem: any) => void; + onClick?(event: any, legendItem: any): void; labels?: ChartLegendLabelOptions; } - export interface ChartLegendLabelOptions { + interface ChartLegendLabelOptions { boxWidth?: number; fontSize?: number; fontStyle?: number; fontColor?: ChartColor; fontFamily?: string; padding?: number; - generateLabels?: (chart: any) => any; + generateLabels?(chart: any): any; } - export interface ChartTooltipOptions { + interface ChartTooltipOptions { enabled?: boolean; - custom?: (a: any) => void; + custom?(a: any): void; mode?: string; backgroundColor?: ChartColor; titleFontFamily?: string; @@ -180,42 +217,42 @@ declare namespace Chart { callbacks?: ChartTooltipCallback; } - export interface ChartHoverOptions { + interface ChartHoverOptions { mode?: string; animationDuration?: number; - onHover?: (active: any) => void; + onHover?(active: any): void; } - export interface ChartAnimationObject { + interface ChartAnimationObject { currentStep?: number; numSteps?: number; easing?: string; - render?: (arg: any) => void; - onAnimationProgress?: (arg: any) => void; - onAnimationComplete?: (arg: any) => void; + render?(arg: any): void; + onAnimationProgress?(arg: any): void; + onAnimationComplete?(arg: any): void; } - export interface ChartAnimationOptions { + interface ChartAnimationOptions { duration?: number; easing?: string; - onProgress?: (chart: any) => void; - onComplete?: (chart: any) => void; + onProgress?(chart: any): void; + onComplete?(chart: any): void; } - export interface ChartElementsOptions { + interface ChartElementsOptions { point?: ChartPointOptions; line?: ChartLineOptions; arc?: ChartArcOptions; rectangle?: ChartRectangleOptions; } - export interface ChartArcOptions { + interface ChartArcOptions { backgroundColor?: ChartColor; borderColor?: ChartColor; borderWidth?: number; } - export interface ChartLineOptions { + interface ChartLineOptions { tension?: number; backgroundColor?: ChartColor; borderWidth?: number; @@ -224,9 +261,12 @@ declare namespace Chart { borderDash?: any[]; borderDashOffset?: number; borderJoinStyle?: string; + capBezierPoints?: boolean; + fill?: 'zero' | 'top' | 'bottom' | boolean; + stepped?: boolean; } - export interface ChartPointOptions { + interface ChartPointOptions { radius?: number; pointStyle?: string; backgroundColor?: ChartColor; @@ -237,13 +277,13 @@ declare namespace Chart { hoverBorderWidth?: number; } - export interface ChartRectangleOptions { + interface ChartRectangleOptions { backgroundColor?: ChartColor; borderWidth?: number; borderColor?: ChartColor; borderSkipped?: string; } - export interface GridLineOptions { + interface GridLineOptions { display?: boolean; color?: ChartColor; lineWidth?: number; @@ -256,7 +296,7 @@ declare namespace Chart { offsetGridLines?: boolean; } - export interface ScaleTitleOptions { + interface ScaleTitleOptions { display?: boolean; labelString?: string; fontColor?: ChartColor; @@ -265,9 +305,9 @@ declare namespace Chart { fontStyle?: string; } - export interface TickOptions { + interface TickOptions { autoSkip?: boolean; - callback?: (value: any, index: any, values: any) => string; + callback?(value: any, index: any, values: any): string; display?: boolean; fontColor?: ChartColor; fontFamily?: string; @@ -282,28 +322,28 @@ declare namespace Chart { min?: any; max?: any; } - export interface AngleLineOptions { + interface AngleLineOptions { display?: boolean; color?: ChartColor; lineWidth?: number; } - export interface PointLabelOptions { - callback?: (arg: any) => any; + interface PointLabelOptions { + callback?(arg: any): any; fontColor?: ChartColor; fontFamily?: string; fontSize?: number; fontStyle?: string; } - export interface TickOptions { + interface TickOptions { backdropColor?: ChartColor; backdropPaddingX?: number; backdropPaddingY?: number; maxTicksLimit?: number; showLabelBackdrop?: boolean; } - export interface LinearTickOptions extends TickOptions { + interface LinearTickOptions extends TickOptions { beginAtZero?: boolean; min?: number; max?: number; @@ -313,15 +353,15 @@ declare namespace Chart { suggestedMax?: number; } - export interface LogarithmicTickOptions extends TickOptions { + interface LogarithmicTickOptions extends TickOptions { min?: number; max?: number; } - type ChartColor = string | CanvasGradient | CanvasPattern; + type ChartColor = string | CanvasGradient | CanvasPattern | string[]; - export interface ChartDataSets { - backgroundColor?: ChartColor; + interface ChartDataSets { + backgroundColor?: ChartColor | ChartColor[]; borderWidth?: number; borderColor?: ChartColor; borderCapStyle?: string; @@ -344,26 +384,30 @@ declare namespace Chart { pointStyle?: string | string[] | HTMLImageElement | HTMLImageElement[]; xAxisID?: string; yAxisID?: string; + type?: string; + hidden?: boolean; + hideInLegendAndTooltip?: boolean; + stack?: string; } - export interface ChartScales { + interface ChartScales { type?: ScaleType | string; display?: boolean; position?: PositionType | string; - beforeUpdate?: (scale?: any) => void; - beforeSetDimension?: (scale?: any) => void; - beforeDataLimits?: (scale?: any) => void; - beforeBuildTicks?: (scale?: any) => void; - beforeTickToLabelConversion?: (scale?: any) => void; - beforeCalculateTickRotation?: (scale?: any) => void; - beforeFit?: (scale?: any) => void; - afterUpdate?: (scale?: any) => void; - afterSetDimension?: (scale?: any) => void; - afterDataLimits?: (scale?: any) => void; - afterBuildTicks?: (scale?: any) => void; - afterTickToLabelConversion?: (scale?: any) => void; - afterCalculateTickRotation?: (scale?: any) => void; - afterFit?: (scale?: any) => void; + beforeUpdate?(scale?: any): void; + beforeSetDimension?(scale?: any): void; + beforeDataLimits?(scale?: any): void; + beforeBuildTicks?(scale?: any): void; + beforeTickToLabelConversion?(scale?: any): void; + beforeCalculateTickRotation?(scale?: any): void; + beforeFit?(scale?: any): void; + afterUpdate?(scale?: any): void; + afterSetDimension?(scale?: any): void; + afterDataLimits?(scale?: any): void; + afterBuildTicks?(scale?: any): void; + afterTickToLabelConversion?(scale?: any): void; + afterCalculateTickRotation?(scale?: any): void; + afterFit?(scale?: any): void; gridLines?: GridLineOptions; scaleLabel?: ScaleTitleOptions; ticks?: TickOptions; @@ -371,7 +415,7 @@ declare namespace Chart { yAxes?: ChartYAxe[]; } - export interface CommonAxe { + interface CommonAxe { type?: ScaleType | string; display?: boolean; id?: string; @@ -383,24 +427,25 @@ declare namespace Chart { scaleLabel?: ScaleTitleOptions; } - export interface ChartXAxe extends CommonAxe { + interface ChartXAxe extends CommonAxe { categoryPercentage?: number; barPercentage?: number; time?: TimeScale; } - export interface ChartYAxe extends CommonAxe { + // tslint:disable-next-line no-empty-interface + interface ChartYAxe extends CommonAxe { } - export interface LinearScale extends ChartScales { + interface LinearScale extends ChartScales { ticks?: LinearTickOptions; } - export interface LogarithmicScale extends ChartScales { + interface LogarithmicScale extends ChartScales { ticks?: LogarithmicTickOptions; } - export interface TimeDisplayFormat { + interface TimeDisplayFormat { millisecond?: string; second?: string; minute?: string; @@ -412,7 +457,7 @@ declare namespace Chart { year?: string; } - export interface TimeScale extends ChartScales { + interface TimeScale extends ChartScales { displayFormats?: TimeDisplayFormat; isoWeekday?: boolean; max?: string; @@ -425,7 +470,7 @@ declare namespace Chart { minUnit?: TimeUnit; } - export interface RadialLinearScale { + interface RadialLinearScale { lineArc?: boolean; angleLines?: AngleLineOptions; pointLabels?: PointLabelOptions; diff --git a/types/chart.js/tslint.json b/types/chart.js/tslint.json new file mode 100644 index 0000000000..a62d0d4e68 --- /dev/null +++ b/types/chart.js/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": false + } +} diff --git a/types/chartist/chartist-tests.ts b/types/chartist/chartist-tests.ts index 2a4a362e7e..13a7c7dd1c 100644 --- a/types/chartist/chartist-tests.ts +++ b/types/chartist/chartist-tests.ts @@ -401,3 +401,29 @@ var overlappingBarsResponsiveOptions: Array +// Definitions by: Matt Gibbs , Simon Pfeifer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Chartist { @@ -20,6 +20,7 @@ declare namespace Chartist { Pie: IChartistPieChart; Bar: IChartistBarChart; Line: IChartistLineChart; + Candle: IChartistCandleChart; FixedScaleAxis: IFixedScaleAxisStatic; AutoScaleAxis: IAutoScaleAxisStatic; @@ -138,6 +139,10 @@ declare namespace Chartist { new (target: any, data: IChartistData, options?: IBarChartOptions, responsiveOptions?: Array>): IChartistBarChart; } + interface IChartistCandleChart extends IChartistBase { + new (target: any, data: IChartistData, options?: ICandleChartOptions, responsiveOptions?: Array>): IChartistCandleChart; + } + interface IChartOptions { /** * If true the whole data is reversed including labels, the series order as well as the whole series data arrays. @@ -352,6 +357,124 @@ declare namespace Chartist { end?: string; } + interface ICandleChartOptions extends IChartOptions { + + /** + * Options for X-Axis + */ + axisX?: ICandleChartAxis; + + /** + * Options for Y-Axis + */ + axisY?: ICandleChartAxis; + + /** + * Specify a fixed width for the chart as a string (i.e. '100px' or '50%') + */ + width?: number | string; + + /** + * Specify a fixed height for the chart as a string (i.e. '100px' or '50%') + */ + height?: number | string; + + /** + * Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value + */ + hight?: number | string; + + /** + * Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value + */ + low?: number | string; + + /** + * Width of candle body in pixel (IMO is 2 px best minimum value) + */ + candleWidth?: number | string; + + /** + * Width of candle wick in pixel (IMO is 1 px best minimum value) + */ + candleWickWidth?: number | string; + + /** + * Use calculated x-axis step length, depending on the number of quotes to display, as candle width. Otherwise the candleWidth is being used. + */ + useStepLengthAsCandleWidth?: boolean | string; + + /** + * Use 1/3 of candle body width as width for the candle wick, otherwise the candleWickWidth is being used. + */ + useOneThirdAsCandleWickWidth?: boolean | string; + + /** + * Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5} + */ + chartPadding?: IChartPadding | number; + + /** + * When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawn correctly you might need to add chart padding or offset the last label with a draw event handler. + */ + fullWidth?: boolean | string; + + /** + * Override the class names that get used to generate the SVG structure of the chart + */ + classNames?: ICandleChartClasses; + } + + interface ICandleChartAxis { + /** + * The offset of the chart drawing area to the border of the container + */ + offset?: number; + /** + * Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis. + */ + position?: string; + /** + * Allows you to correct label positioning on this axis by positive or negative x and y offset. + */ + labelOffset?: { + x?: number; + y?: number; + }; + /** + * If labels should be shown or not + */ + showLabel?: boolean; + /** + * If the axis grid should be drawn or not + */ + showGrid?: boolean; + /** + * Interpolation function that allows you to intercept the value from the axis label + */ + labelInterpolationFnc?: Function; + /** + * Set the axis type to be used to project values on this axis. If not defined, Chartist.StepAxis will be used for the X-Axis, where the ticks option will be set to the labels in the data and the stretch option will be set to the global fullWidth option. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here. + */ + type?: any; + } + + interface ICandleChartClasses { + chart?: string; + label?: string; + labelGroup?: string; + series?: string; + candlePositive?: string; + candleNegative?: string, + grid?: string, + gridGroup?: string, + gridBackground?: string, + vertical?: string, + horizontal?: string, + start?: string, + end?: string, + } + interface ChartistSvgStatic { new (name: HTMLElement | string, attributes: Object, className?: string, parent?: Object, insertFirst?: boolean): IChartistSvg; diff --git a/types/chartjs/chartjs-tests.ts b/types/chartjs/chartjs-tests.ts index d6b47d45bf..ef50da1b40 100644 --- a/types/chartjs/chartjs-tests.ts +++ b/types/chartjs/chartjs-tests.ts @@ -51,12 +51,14 @@ var lineData: LinearChartData = { datasets: [ { label: 'Accepted', + type: 'bar', fillColor: 'rgba(220,220,220,0.2)', strokeColor: 'rgba(220,220,220,1)', pointColor: 'rgba(220,220,220,1)', pointStrokeColor: '#fff', pointHighlightFill: '#fff', pointHighlightStroke: 'rgba(220,220,220,1)', + borderColor: "#9b0391", data: [65, 59, 80, 81, 56, 55, 40] }, { @@ -67,7 +69,8 @@ var lineData: LinearChartData = { pointStrokeColor: '#fff', pointHighlightFill: '#fff', pointHighlightStroke: 'rgba(151,187,205,1)', - data: [28, 48, 40, 19, 86, 27, 90] + data: [28, 48, 40, 19, 86, 27, 90], + yAxisID: 'quarantined' } ] }; @@ -85,6 +88,21 @@ var myLineChart = new Chart(ctx).Line(lineData, { datasetStroke: true, datasetStrokeWidth: 2, datasetFill: true, + scales: { + xAxes: [{ + stacked: true, + }], + yAxes: [{ + position: "left", + "id": "users" + }, { + position: "right", + "id": "ratio", + ticks: { + min: -13 + } + }] + }, legendTemplate: "
    -legend\"><% for (var i=0; i
  • \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>
" }); @@ -129,6 +147,10 @@ var myBarChart = new Chart(ctx).Bar(barData, { barStrokeWidth: 2, barValueSpacing: 5, barDatasetSpacing: 1, + legend: { + display: true, + position: 'bottom' + }, legendTemplate: "
    -legend\"><% for (var i=0; i
  • \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>
" }); @@ -369,4 +391,3 @@ var my2ndRadarChart = new Chart(ctx).Radar(radarData, partialOpts); var my2ndPolarAreaChart = new Chart(ctx).PolarArea(polarAreaData, partialOpts); var my2ndPieChart = new Chart(ctx).Pie(pieData, partialOpts); var my2ndDoughnutChart = new Chart(ctx).Doughnut(pieData, partialOpts); - diff --git a/types/chartjs/index.d.ts b/types/chartjs/index.d.ts index fca81b6d22..a9075e02a2 100644 --- a/types/chartjs/index.d.ts +++ b/types/chartjs/index.d.ts @@ -1,13 +1,18 @@ // Type definitions for Chart.js // Project: https://github.com/nnnick/Chart.js // Definitions by: Steve Fenton +// Alessio Fanelli // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface ChartDataSet { label: string; fillColor: string; strokeColor: string; + type?: string; + yAxisID?: string; + xAxisID?: string; + borderColor?: string; /* Line, Radar */ pointColor?: string; pointStrokeColor?: string; @@ -17,6 +22,8 @@ interface ChartDataSet { /* Bar */ highlightFill?: string; highlightStroke?: string; + backgroundColorHover?: string; + data: number[]; } @@ -80,8 +87,44 @@ interface ChartOptions extends ChartSettings { scaleGridLineColor?: string; scaleGridLineWidth?: number; scaleShowHorizontalLines?: boolean; - scaleShowVerticalLines?: boolean; + scaleShowVerticalLines?: boolean; legendTemplate?: string; + tooltips?: ChartTooltips; + legend?: ChartLegend; + scales?: ChartScales; + title?: ChartTitle; +} + +interface ChartTooltips { + mode?: string; + intersect?: boolean; +} + +interface ChartLegend { + display?: boolean; + position?: string; +} + +interface ChartScales { + xAxes?: Array; + yAxes?: Array; +} + +interface ChartScalesOptions { + stacked?: boolean; + position?: string; + id?: string; + ticks?: ScaleTicksOptions; +} + +interface ScaleTicksOptions { + min?: number; + max?: number; +} + +interface ChartTitle { + display?: boolean; + text?: string; } interface PointsAtEvent { @@ -137,7 +180,7 @@ interface BarChartOptions extends ChartOptions { barShowStroke?: boolean; barStrokeWidth?: number; barValueSpacing?: number; - barDatasetSpacing?: number; + barDatasetSpacing?: number; } interface RadarChartOptions extends ChartSettings { diff --git a/types/cheerio/cheerio-tests.ts b/types/cheerio/cheerio-tests.ts index 1c0848eef7..4a15f029f0 100644 --- a/types/cheerio/cheerio-tests.ts +++ b/types/cheerio/cheerio-tests.ts @@ -306,3 +306,5 @@ $.parseHTML(html, null, true); * Not in doc */ $el.toArray(); + +cheerio.html($el); diff --git a/types/cheerio/index.d.ts b/types/cheerio/index.d.ts index 4096a0f9c2..f525a46ee6 100644 --- a/types/cheerio/index.d.ts +++ b/types/cheerio/index.d.ts @@ -263,7 +263,7 @@ interface CheerioElement { nodeValue: string; } -interface CheerioAPI extends CheerioSelector { +interface CheerioAPI extends CheerioSelector, CheerioStatic { load(html: string, options?: CheerioOptionsInterface): CheerioStatic; load(element: CheerioElement, options?: CheerioOptionsInterface): CheerioStatic; } diff --git a/types/chokidar/index.d.ts b/types/chokidar/index.d.ts index dd0569656c..09e957aa05 100644 --- a/types/chokidar/index.d.ts +++ b/types/chokidar/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for chokidar 1.6.1 +// Type definitions for chokidar 1.7.0 // Project: https://github.com/paulmillr/chokidar // Definitions by: Stefan Steinhart , Felix Becker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -79,6 +79,12 @@ export interface WatchOptions { * be relative to this. */ cwd?: string; + + /** + * If set to true then the strings passed to .watch() and .add() are treated as literal path + * names, even if they look like globs. Default: false. + */ + disableGlobbing?: boolean; /** * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU diff --git a/types/chosen-js/index.d.ts b/types/chosen-js/index.d.ts index c7ffa437bc..221eefb3d3 100644 --- a/types/chosen-js/index.d.ts +++ b/types/chosen-js/index.d.ts @@ -2,6 +2,7 @@ // Project: http://harvesthq.github.com/chosen/ // Definitions by: Boris Yankov , denis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/chroma-js/chroma-js-tests.ts b/types/chroma-js/chroma-js-tests.ts index 200d07615a..53a3e912b8 100644 --- a/types/chroma-js/chroma-js-tests.ts +++ b/types/chroma-js/chroma-js-tests.ts @@ -1,13 +1,9 @@ - - -import * as myChroma from "chroma-js"; - function test_chroma() { chroma('hotpink'); chroma('#ff3399'); chroma('F39'); chroma.hex("#fff"); - + chroma(0xff3399); chroma(0xff, 0x33, 0x99); chroma(255, 51, 153); @@ -37,15 +33,15 @@ function test_chroma() { chroma.contrast('pink', 'hotpink'); chroma.contrast('pink', 'purple'); chroma.brewer.OrRd; - var data = [3.0, 3.5, 3.6, 3.8, 3.8, 4.1, 4.3, 4.4, + const data = [3.0, 3.5, 3.6, 3.8, 3.8, 4.1, 4.3, 4.4, 4.6, 4.9, 5.2, 5.3, 5.4, 5.7, 5.8, 5.9, 6.2, 6.5, 6.8, 7.2, 9]; chroma.limits(data, 'e', 5); chroma.limits(data, 'q', 5); chroma.limits(data, 'k', 5); - myChroma(0xff3399); - myChroma.limits(data, 'k', 5); + chroma(0xff3399); + chroma.limits(data, 'k', 5); } function test_color() { @@ -105,13 +101,13 @@ function test_color() { chroma('#b3ccff').temperature(); chroma('33cc00').gl(); - myChroma('teal').alpha(0.5).css(); - myChroma('teal').css('hsl'); - myChroma('orange').rgb(); + chroma('teal').alpha(0.5).css(); + chroma('teal').css('hsl'); + chroma('orange').rgb(); } function test_scale() { - var f = chroma.scale(); + const f = chroma.scale(); f(0.25); f(0.5); f(0.75); @@ -173,7 +169,7 @@ function test_scale() { chroma.scale('OrRd').classes(5); chroma.scale('OrRd').classes(8); - myChroma.cubehelix() + chroma.cubehelix() .start(200) .rotations(-0.35) .gamma(0.7) @@ -183,6 +179,6 @@ function test_scale() { .correctLightness() .colors(5); - myChroma.scale('RdYlBu'); - myChroma.scale('RdYlBu').padding(0.15); + chroma.scale('RdYlBu'); + chroma.scale('RdYlBu').padding(0.15); } diff --git a/types/chroma-js/index.d.ts b/types/chroma-js/index.d.ts index e3f463d368..1b679b816a 100644 --- a/types/chroma-js/index.d.ts +++ b/types/chroma-js/index.d.ts @@ -1,29 +1,35 @@ -// Type definitions for Chroma.js v1.1.1 +// Type definitions for Chroma.js 1.3 // Project: https://github.com/gka/chroma.js // Definitions by: Sebastian Brückner , Marcin Pacholec // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /** * Chroma.js is a tiny library for all kinds of color conversions and color scales. */ declare namespace Chroma { - export interface ChromaStatic { + interface ColorSpaces { + rgb: [number, number, number]; + rgba: [number, number, number, number]; + hsl: [number, number, number]; + hsv: [number, number, number]; + hsi: [number, number, number]; + lab: [number, number, number]; + lch: [number, number, number]; + hcl: [number, number, number]; + cmyk: [number, number, number, number]; + gl: [number, number, number, number]; + } + interface ChromaStatic { /** * Creates a color from a string representation (as supported in CSS). + * Creates a color from a number representation [0; 16777215] * * @param color The string to convert to a color. * @return the color object. */ - (color: string): Color; - - /** - * Creates a color from a number representation [0; 16777215] - * - * @param color The number to convert to a color. - * @return the color object. - */ - (number: number): Color; + (color: string | number): Color; /** * Create a color in the specified color space using a, b and c as values. @@ -31,21 +37,21 @@ declare namespace Chroma { * @param a * @param b * @param c - * @param colorSpace The color space to use (one of "rgb", "hsl", "hsv", "lab", "lch", "gl"). Defaults to "rgb". + * @param colorSpace The color space to use. Defaults to "rgb". * @return the color object. - */ - (a: number, b: number, c: number, colorSpace?: string): Color; + */ + (a: number, b: number, c: number, colorSpace?: keyof ColorSpaces): Color; - (a: number, b: number, c: number, d: number, colorSpace?: string): Color; + (a: number, b: number, c: number, d: number, colorSpace?: keyof ColorSpaces): Color; /** - * Create a color in the specified color space using values. - * - * @param values An array of values (e.g. [r, g, b, a?]). - * @param colorSpace The color space to use (one of "rgb", "hsl", "hsv", "lab", "lch", "gl"). Defaults to "rgb". - * @return the color object. - */ - (values: number[], colorSpace?: string): Color; + * Create a color in the specified color space using values. + * + * @param values An array of values (e.g. [r, g, b, a?]). + * @param colorSpace The color space to use. Defaults to "rgb". + * @return the color object. + */ + (values: number[], colorSpace?: keyof ColorSpaces): Color; /** * Create a color from a hex or string representation (as supported in CSS). @@ -67,25 +73,43 @@ declare namespace Chroma { rgb(r: number, g: number, b: number): Color; - /** + /** * GL is a variant of RGB(A), with the only difference that the components are normalized to the range of 0..1. - */ + */ gl(red: number, green: number, blue: number, alpha?: number): Color; - /** - * light 2000K, bright sunlight 6000K. Based on Neil Bartlett's implementation. + /** + * Returns a color from the color temperature scale. + * light 2000K, bright sunlight 6000K. + * Based on Neil Bartlett's implementation. * https://github.com/neilbartlett/color-temperature - */ + */ temperature(t: number): Color; - mix(col1: string | Color, col2: string | Color, f?: number, colorSpace?: string): Color; - - interpolate(col1: string | Color, col2: string | Color, f?: number, colorSpace?: string): Color; + /** + * Mixes two colors. The mix ratio is a value between 0 and 1. + * The color mixing produces different results based the color space used for interpolation. + * @example chroma.mix('red', 'blue', 0.25) // => #bf0040 + * @example chroma.mix('red', 'blue', 0.5, 'hsl') // => #ff00ff + */ + mix(color1: string | Color, color2: string | Color, f?: number, colorSpace?: keyof ColorSpaces): Color; /** - * Blends two colors using RGB channel-wise blend functions. Valid blend modes are multiply, darken, lighten, screen, overlay, burn, and dogde. + * Alias for {@see mix}. */ - blend(col1: string, col2: string, blendMode: string): Color; + interpolate(color1: string | Color, color2: string | Color, f?: number, colorSpace?: keyof ColorSpaces): Color; + + /** + * Similar to {@link mix}, but accepts more than two colors. Simple averaging of R,G,B components and the alpha + * channel. + */ + average(colors: Array, colorSpace?: keyof ColorSpaces): Color; + + /** + * Blends two colors using RGB channel-wise blend functions. + */ + blend(color1: string | Color, color2: string | Color, + blendMode: 'multiply' | 'darken' | 'lighten' | 'screen' | 'overlay' | 'burn' | 'dogde'): Color; /** * Returns a random color. @@ -93,19 +117,29 @@ declare namespace Chroma { random(): Color; /** - * Computes the WCAG contrast ratio between two colors. - * A minimum contrast of 4.5:1 is recommended to ensure that text is still readable against a background color. - * - * @param color1 The first color. - * @param color2 The second color. - * @return the contrast ratio. + * Computes the WCAG contrast ratio between two colors. + * A minimum contrast of 4.5:1 is recommended {@link https://www.w3.org/TR/WCAG20-TECHS/G18.html} + * to ensure that text is still readable against a background color. */ - contrast(col1: string | Color, col2: string | Color): number; - - bezier(colors: string[]): Scale; + contrast(color1: string | Color, color2: string | Color): number; /** - * chroma.brewer is an map of ColorBrewer scales that are included in chroma.js for convenience. + * Computes the eucledian distance between two colors in a given color space (default is 'lab'). + * {@link https://en.wikipedia.org/wiki/Euclidean_distance#Three_dimensions} + */ + distance(color1: string | Color, color2: string | Color, colorSpace?: keyof ColorSpaces): Color; + + /** + * Computes color difference {@link https://en.wikipedia.org/wiki/Color_difference#CMC_l:c_.281984.29} as + * developed by the Colour Measurement Committee of the Society of Dyers and Colourists (CMC) in 1984. + * The implementation is adapted from Bruce Lindbloom. + * {@link https://web.archive.org/web/20160306044036/http://www.brucelindbloom.com/javascript/ColorDiff.js} + * The parameters L (default 1) and C (default 1) are weighting factors for lightness and chromacity. + */ + deltaE(color1: string | Color, color2: string | Color, L?: number, C?: number): Color; + + /** + * chroma.brewer is an map of ColorBrewer scales that are included in chroma.js for convenience. * chroma.scale uses the colors to construct. */ brewer: { @@ -147,123 +181,179 @@ declare namespace Chroma { }; /** - * Helper function that computes class breaks for you, based on actual data. - * Supports three different modes: equidistant breaks, quantiles breaks and breaks based on k-means clusting. + * Helper function that computes class breaks based on data. + * Mode: + *
  • equidistant 'e' breaks are computed by dividing the total range of the data into n groups + * of equal size. + *
  • quantile 'q' input domain is divided by quantile ranges. + *
  • logarithmic 'l' breaks are equidistant breaks but on a logarithmic scale. + *
  • k-means 'k' breaks use the 1-dimensional + * [k-means clustering algorithm]{@link https://en.wikipedia.org/wiki/K-means_clustering} to find (roughly) n + * groups of "similar" values. Note that this k-means implementation does not guarantee to find exactly n groups. */ - limits(data: number[], mode: string, c: number): number[]; + limits(data: number[], mode: 'e' | 'q' | 'l' | 'k', c: number): number[]; - scale(name: string): Scale; + /** + * Returns a function that + * [bezier-interpolates]{@link https://www.vis4.net/blog/posts/mastering-multi-hued-color-scales/} between + * colors in Lab space. The input range of the function is [0..1]. + * You can convert it to a scale instance by calling chroma.bezier(...).scale() + */ + bezier(colors: string[]): { (t: number): Color, scale(): Scale}; - scale(colors?: string[]): Scale; + scale(name: string | Color): Scale; + + scale(colors?: Array): Scale; cubehelix(): Cubehelix; cmyk(c: number, m: number, y: number, k: number): Color; - - /** - * Create a color from a hex or string representation (as supported in CSS). - * - * This is an alias of chroma.hex(). - * - * @param color The string to convert to a color. - * @return the color object. - */ - css(col: string, mode?: string): string; + + css(col: string): Color; } - export interface Color { + type Color = { + /** + * Get and set the color opacity. + */ alpha(a?: number): Color; darken(f?: number): Color; brighten(f?: number): Color; + /** + * Changes the saturation of a color by manipulating the Lch chromacity. + */ saturate(s?: number): Color; + /** + * Similar to saturate, but the opposite direction. + */ desaturate(s?: number): Color; + /** + * Changes a single channel and returns the result a new chroma object. + * @example + * // half Lab lightness + * chroma('orangered').set('lab.l', '*0.5') + * @example + * // double Lch saturation + * chroma('darkseagreen').set('lch.c', '*2') + */ set(modechan: string, v: number | string): Color; + /** + * Returns a single channel value. + * @see set + */ get(modechan: string): number; + /** + * Relative brightness, according to the + * [WCAG]{@link http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef} definition. Normalized to + * 0 for darkest black and 1 for lightest white. + */ luminance(): number; - luminance(l: number, mode?: string): Color; + /** + * Set luminance of color. The source color will be interpolated with black or white until the correct luminance is found. + * The color space used defaults to RGB. + */ + luminance(l: number, colorSpace?: keyof ColorSpaces): Color; + /** + * Get color as hexadecimal string. E.g. '#ffa500' + */ hex(): string; + /** + * Returns the named color. Falls back to hexadecimal RGB string, if the color isn't present. + */ name(): string; /** - * Create a color from a hex or string representation (as supported in CSS). - * - * This is an alias of chroma.hex(). - * - * @param color The string to convert to a color. - * @return the color object. + * Returns a RGB() or HSL() string representation that can be used as CSS-color definition. + * mode defaults to 'rgb' */ - css(mode?: string): string; - - rgb(): number[]; - - rgba(): number[]; - - hsl(): number[]; - - hsv(): number[]; - - hsi(): number[]; - - lab(): number[]; - - lch(): number[]; - - hcl(): number[]; + css(mode?: 'hsl'): string; + /** + * Estimate the temperature in Kelvin of any given color, though this makes the only sense for colors from the + * [temperature gradient]{@link ChromaStatic.temperature} above. + */ temperature(): number; + } & { + [K in keyof ColorSpaces]: () => ColorSpaces[K]; + }; - gl(): number[]; - } - - export interface Scale { + interface Scale { (c: string[]): Scale; - (value: number): any; + (value: number): OutType; - domain(d?: number[], n?: number, mode?: string): Scale; + domain(d?: number[], n?: number, mode?: string): this; - mode(mode: string): Scale; + mode(mode: keyof ColorSpaces): this; - correctLightness(enable?: boolean): Scale; + cache(use: boolean): boolean; - bezier(colors: string[]): Scale; + correctLightness(enable?: boolean): this; - padding(p: number | number[]): Scale; + padding(p: number | number[]): this; - colors(c?: number): string[]; + /** + * You can call scale.colors(n) to quickly grab `c` equi-distant colors from a color scale. If called with no + * arguments, scale.colors returns the original array of colors used to create the scale. + */ + colors(c?: number, format?: 'hex' | 'name'): string[]; + colors(c?: number, format?: null | 'alpha' | 'darken' | 'brighten' | 'saturate' | 'desaturate'): Color[]; + colors(c?: number, format?: 'luminance' | 'temperature'): number[]; + colors(c?: number, format?: K): Array; - classes(c: number | number[]): (t: number) => Color; + /** + * If you want the scale function to return a distinct set of colors instead of a continuous gradient, you can + * use scale.classes. If you pass a number the scale will broken into equi-distant classes. + * You can also define custom class breaks by passing them as array + */ + classes(c: number | number[]): this; - range(arg: string[]): Scale; - - scale(): Scale; - - out(mode: string): Scale; + /** + * Set out format for scale() call. Passing null will result in a scale which outputs colors. + */ + out(format: null): Scale; + out(format: K): Scale; } - export interface Cubehelix extends Scale { + interface Cubehelix { + /** + * Set start color for hue rotation, default=300 + */ start(s: number): Cubehelix; + /** + * number (and direction) of hue rotations (e.g. 1=360°, 1.5=`540°``), default=-1.5 + */ rotations(r: number): Cubehelix; + /** + * gamma factor can be used to emphasise low or high intensity values, default=1 + */ gamma(g: number): Cubehelix; + /** + * lightness range: default: [0,1] (black -> white) + */ lightness(l: number[]): Cubehelix; + + /** + * You can call cubehelix.scale() to use the cube-helix through the chroma.scale interface. + */ + scale(): Scale; } } declare var chroma: Chroma.ChromaStatic; -declare module "chroma-js" { - export = chroma; -} +export = chroma; +export as namespace chroma; diff --git a/types/chroma-js/tslint.json b/types/chroma-js/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/chroma-js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 8fe0f9b993..ee61cf5575 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -2,6 +2,7 @@ // Project: http://developer.chrome.com/extensions/ // Definitions by: Matthew Kimber , otiai10 , couven92 , RReverser , sreimer15 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/chrome/test/index.ts b/types/chrome/test/index.ts index ffe1ece74d..b7b7868ba3 100644 --- a/types/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -80,7 +80,7 @@ function bookmarksExample() { 'Add': function () { chrome.bookmarks.create({ parentId: bookmarkNode.id, - title: $('#title').val(), url: $('#url').val() + title: $('#title').val() as string, url: $('#url').val() as string }); $('#bookmarks').empty(); $(this).dialog('destroy'); @@ -100,9 +100,9 @@ function bookmarksExample() { show: 'slide', buttons: { 'Save': function () { chrome.bookmarks.update(String(bookmarkNode.id), { - title: edit.val() + title: edit.val() as string }); - anchor.text(edit.val()); + anchor.text(edit.val() as string); options.show(); $(this).dialog('destroy'); }, diff --git a/types/chrome/tsconfig.json b/types/chrome/tsconfig.json index 2512d73c9d..96c0c31496 100644 --- a/types/chrome/tsconfig.json +++ b/types/chrome/tsconfig.json @@ -23,4 +23,4 @@ "test/index.ts", "test/chrome-app.ts" ] -} \ No newline at end of file +} diff --git a/types/chui/chui-tests.ts b/types/chui/chui-tests.ts index 5e1e549dc7..f37ab7caf0 100644 --- a/types/chui/chui-tests.ts +++ b/types/chui/chui-tests.ts @@ -1,4 +1,4 @@ -/// +import $ = require('jquery'); $(function() { @@ -94,4 +94,4 @@ $(function() { $('#mySwitch').UISwitch(); $('#myRangeControl').UIRange(); -}); \ No newline at end of file +}); diff --git a/types/chui/index.d.ts b/types/chui/index.d.ts index 4bf597e869..7042edd4bd 100644 --- a/types/chui/index.d.ts +++ b/types/chui/index.d.ts @@ -1545,4 +1545,4 @@ interface JQueryKeyEventObject extends JQueryInputEventObject { } interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject { -} \ No newline at end of file +} diff --git a/types/chui/tsconfig.json b/types/chui/tsconfig.json index a3163f3e43..08c1f7740e 100644 --- a/types/chui/tsconfig.json +++ b/types/chui/tsconfig.json @@ -12,6 +12,11 @@ "typeRoots": [ "../" ], + "paths": { + "jquery": [ + "jquery/v2" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -20,4 +25,4 @@ "index.d.ts", "chui-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/ckeditor/index.d.ts b/types/ckeditor/index.d.ts index 518c44ae2a..71a9202557 100644 --- a/types/ckeditor/index.d.ts +++ b/types/ckeditor/index.d.ts @@ -77,7 +77,7 @@ declare namespace CKEDITOR { function addCss(css: string): void; function addTemplate(name: string, source: string): template; function appendTo(element: string, config?: config, data?: string): editor; - function appendTo(element: HTMLTextAreaElement, config?: config, data?: string): editor; + function appendTo(element: HTMLElement, config?: config, data?: string): editor; function domReady(): void; function dialogCommand(dialogName: string): void; function editorConfig(config: config): void; @@ -1681,7 +1681,7 @@ declare namespace CKEDITOR { function addUIElement(typeName: string, builder: Function): void; function cancelButton(): void; function exists(name: string | number): void; // NOTE: documentation says object, but it's an array accessor, so really a string or number will work - function getCurrent(): void; + function getCurrent(): CKEDITOR.dialog; function isTabEnabled(editor: CKEDITOR.editor, dialogName: string, tabName: string): boolean; function okButton(): void; } diff --git a/types/cli-table2/cli-table2-tests.ts b/types/cli-table2/cli-table2-tests.ts new file mode 100644 index 0000000000..dfaed4ec33 --- /dev/null +++ b/types/cli-table2/cli-table2-tests.ts @@ -0,0 +1,232 @@ +import * as Table from "cli-table2"; + +// Code snippets from README.md + +// Horizontal table +const table1 = new Table({ head: ['TH 1 label', 'TH 2 label'], colWidths: [100, 200] }) as Table.HorizontalTable; +table1.push( + ['First value', 'Second value'], + ['First value', 'Second value'] +); + +// Vertical table +const table2 = new Table() as Table.VerticalTable; +table2.push( + { 'Some key': 'Some value' }, + { 'Another key': 'Another value' } +); + +// Cross table +const table3 = new Table({ head: ["", "Top Header 1", "Top Header 2"] }) as Table.CrossTable; +table3.push( + { 'Left Header 1': ['Value Row 1 Col 1', 'Value Row 1 Col 2'] }, + { 'Left Header 2': ['Value Row 2 Col 1', 'Value Row 2 Col 2'] } +); + +// Custom styles +const table4 = new Table({ + chars: { + top: '═', 'top-mid': '╤', 'top-left': '╔', 'top-right': '╗', + bottom: '═', 'bottom-mid': '╧', 'bottom-left': '╚', 'bottom-right': '╝', + left: '║', 'left-mid': '╟', mid: '─', 'mid-mid': '┼', + right: '║', 'right-mid': '╢', middle: '│' + } +}) as Table.HorizontalTable; +table4.push( + ['foo', 'bar', 'baz'], + ['frob', 'bar', 'quuz'] +); +const table5 = new Table({ chars: { mid: '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' } }) as Table.HorizontalTable; +table5.push( + ['foo', 'bar', 'baz'], + ['frobnicate', 'bar', 'quuz'] +); +const table6 = new Table({ + chars: { + top: '', 'top-mid': '', 'top-left': '', 'top-right': '', + bottom: '', 'bottom-mid': '', 'bottom-left': '', 'bottom-right': '', + left: '', 'left-mid': '', mid: '', 'mid-mid': '', + right: '', 'right-mid': '', middle: ' ' + }, + style: { 'padding-left': 0, 'padding-right': 0 } +}) as Table.HorizontalTable; +table6.push( + ['foo', 'bar', 'baz'], + ['frobnicate', 'bar', 'quuz'] +); + +// Code snippets from basic-usage.md + +// Basic Usage +const table7 = new Table({ head: ['a', 'b'] }) as Table.HorizontalTable; +table7.push(['c', 'd']); + +// Basic Usage - disable colors - (used often in the examples and tests) +const table8 = new Table({ + head: ['Rel', 'Change', 'By', 'When'], + style: { head: [], border: [] }, + colWidths: [6, 21, 25, 17] +}) as Table.HorizontalTable; +table8.push( + ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago'], + ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago'] +); + +// Create vertical tables by adding objects a that specify key-value pairs +const table9 = new Table({ style: { 'padding-left': 0, 'padding-right': 0, head: [], border: [] } }) as Table.VerticalTable; +table9.push( + { 'v0.1': 'Testing something cool' }, + { 'v0.1': 'Testing something cool' } +); + +// Cross tables are similar to vertical tables, but include an empty string for the first header +const table10 = new Table({ + head: ["", "Header 1", "Header 2"], + style: { 'padding-left': 0, 'padding-right': 0, head: [], border: [] } +}) as Table.CrossTable; +table10.push( + { "Header 3": ['v0.1', 'Testing something cool'] }, + { "Header 4": ['v0.1', 'Testing something cool'] } +); + +// Stylize the table with custom border characters +const table11 = new Table({ + chars: { + top: '═', + 'top-mid': '╤', + 'top-left': '╔', + 'top-right': '╗', + bottom: '═', + 'bottom-mid': '╧', + 'bottom-left': '╚', + 'bottom-right': '╝', + left: '║', + 'left-mid': '╟', + right: '║', + 'right-mid': '╢' + }, + style: { head: [], border: [] } +}) as Table.HorizontalTable; +table11.push( + ['foo', 'bar', 'baz'], + ['frob', 'bar', 'quuz'] +); + +// Use ansi colors (i.e. colors.js) to style text within the cells at will, even across multiple lines +const table12 = new Table({ style: { border: [], head: [] } }) as Table.HorizontalTable; +table12.push([ + /*colors.red(*/'Hello\nhow\nare\nyou?'/*)*/, + /*colors.blue(*/'I\nam\nfine\nthanks!'/*)*/ +]); + +// Set wordWrap to true to make lines of text wrap instead of being truncated +const table13 = new Table({ + style: { border: [], head: [] }, + colWidths: [7, 9], + wordWrap: true +}) as Table.HorizontalTable; +table13.push([ + 'Hello how are you?', + 'I am fine thanks!' +]); + +// Code snippets from advanced-usage.md + +// use colSpan to span columns - (colSpan above normal cell) +const table14 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table14.push( + [{ colSpan: 2, content: 'greetings' }], + [{ colSpan: 2, content: 'greetings' }], + ['hello', 'howdy'] +); + +// use colSpan to span columns - (colSpan below normal cell) +const table15 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table15.push( + ['hello', 'howdy'], + [{ colSpan: 2, content: 'greetings' }], + [{ colSpan: 2, content: 'greetings' }] +); + +// use rowSpan to span rows - (rowSpan on the left side) +const table16 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table16.push( + [{ rowSpan: 2, content: 'greetings' }, { rowSpan: 2, content: 'greetings', vAlign: 'center' }, 'hello'], + ['howdy'] +); + +// use rowSpan to span rows - (rowSpan on the right side) +const table17 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table17.push( + ['hello', { rowSpan: 2, content: 'greetings' }, { rowSpan: 2, content: 'greetings', vAlign: 'bottom' }], + ['howdy'] +); + +// mix rowSpan and colSpan together for complex table layouts +const table18 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table18.push( + [{ content: 'hello', colSpan: 2 }, { rowSpan: 2, colSpan: 2, content: 'sup' }, { rowSpan: 3, content: 'hi' }], + [{ content: 'howdy', colSpan: 2 }], + ['o', 'k', '', ''] +); + +// multi-line content will flow across rows in rowSpan cells +const table19 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table19.push( + ['hello', { rowSpan: 2, content: 'greetings\nfriends' }, { rowSpan: 2, content: 'greetings\nfriends' }], + ['howdy'] +); + +// multi-line content will flow across rows in rowSpan cells - (complex layout) +const table20 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table20.push( + [{ content: 'hello', colSpan: 2 }, { rowSpan: 2, colSpan: 2, content: 'sup\nman\nhey' }, { rowSpan: 3, content: 'hi\nyo' }], + [{ content: 'howdy', colSpan: 2 }], + ['o', 'k', '', ''] +); + +// rowSpan cells can have a staggered layout +const table21 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table21.push( + [{ content: 'a', rowSpan: 2 }, 'b'], + [{ content: 'c', rowSpan: 2 }], + ['d'] +); + +// the layout manager automatically create empty cells to fill in the table +const table22 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table22.push( + [{ content: 'a', rowSpan: 3, colSpan: 2 }, 'b'], + [], + [{ content: 'c', rowSpan: 2, colSpan: 2 }], + [] +); + +// use table rowHeights option to fix row height. The truncation symbol will be shown on the last line. +const table23 = new Table({ rowHeights: [2], style: { head: [], border: [] } }) as Table.HorizontalTable; +table23.push(['hello\nhi\nsup']); + +// if colWidths is not specified, the layout manager will automatically widen rows to fit the content +const table24 = new Table({ style: { head: [], border: [] } }) as Table.HorizontalTable; +table24.push( + [{ colSpan: 2, content: 'hello there' }], + ['hi', 'hi'] +); + +// you can specify a column width for only the first row, other rows will be automatically widened to fit content +const table25 = new Table({ colWidths: [4], style: { head: [], border: [] } }) as Table.HorizontalTable; +table25.push( + [{ colSpan: 2, content: 'hello there' }], + ['hi', { hAlign: 'center', content: 'hi' }] +); + +// a column with a null column width will be automatically widened to fit content +const table26 = new Table({ colWidths: [null, 4], style: { head: [], border: [] } }) as Table.HorizontalTable; +table26.push( + [{ colSpan: 2, content: 'hello there' }], + [{ hAlign: 'right', content: 'hi' }, 'hi'] +); + +// feel free to use colors in your content strings, column widths will be calculated correctly +const table27 = new Table({ colWidths: [5], style: { head: [], border: [] } }) as Table.HorizontalTable; +table27.push([/*colors.red(*/'hello'/*)*/]); diff --git a/types/cli-table2/index.d.ts b/types/cli-table2/index.d.ts new file mode 100644 index 0000000000..46d4619162 --- /dev/null +++ b/types/cli-table2/index.d.ts @@ -0,0 +1,101 @@ +// Type definitions for cli-table2 0.2 +// Project: https://github.com/jamestalmage/cli-table2 +// Definitions by: Melvin Groenhoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace CliTable2 { + type CharName = + "top" | + "top-mid" | + "top-left" | + "top-right" | + "bottom" | + "bottom-mid" | + "bottom-left" | + "bottom-right" | + "left" | + "left-mid" | + "mid" | + "mid-mid" | + "right" | + "right-mid" | + "middle"; + + type HorizontalAlignment = "left" | "center" | "right"; + type VerticalAlignment = "top" | "center" | "bottom"; + + interface TableOptions { + truncate: string; + colWidths: Array; + rowHeights: Array; + colAligns: HorizontalAlignment[]; + rowAligns: VerticalAlignment[]; + head: string[]; + wordWrap: boolean; + } + + interface TableInstanceOptions extends TableOptions { + chars: Record; + style: { + "padding-left": number; + "padding-right": number; + head: string[]; + border: string[]; + compact: boolean; + }; + } + + interface TableConstructorOptions extends Partial { + chars?: Partial>; + style?: Partial; + } + + type CellValue = boolean | number | string | null | undefined; + + interface CellOptions { + content: CellValue; + chars?: Partial>; + truncate?: string; + colSpan?: number; + rowSpan?: number; + hAlign?: HorizontalAlignment; + vAlign?: VerticalAlignment; + style?: { + "padding-left"?: number; + "padding-right"?: number; + head?: string[]; + border?: string[]; + }; + } + + interface GenericTable extends Array { + options: CliTable2.TableInstanceOptions; + readonly width: number; + } + + type Table = HorizontalTable | VerticalTable | CrossTable; + type Cell = CellValue | CellOptions; + + type HorizontalTable = GenericTable; + type HorizontalTableRow = Cell[]; + + type VerticalTable = GenericTable; + interface VerticalTableRow { + [name: string]: Cell; + } + + type CrossTable = GenericTable; + interface CrossTableRow { + [name: string]: Cell[]; + } +} + +interface CliTable2 { + new (options?: CliTable2.TableConstructorOptions): CliTable2.Table; + readonly prototype: CliTable2.Table; +} + +declare const CliTable2: CliTable2; + +export = CliTable2; diff --git a/types/cli-table2/tsconfig.json b/types/cli-table2/tsconfig.json new file mode 100644 index 0000000000..e816ba5105 --- /dev/null +++ b/types/cli-table2/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", + "cli-table2-tests.ts" + ] +} \ No newline at end of file diff --git a/types/cli-table2/tslint.json b/types/cli-table2/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/cli-table2/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/clipboard/clipboard-tests.ts b/types/clipboard/clipboard-tests.ts index 23de4c89e6..361ccddd93 100644 --- a/types/clipboard/clipboard-tests.ts +++ b/types/clipboard/clipboard-tests.ts @@ -16,6 +16,7 @@ const cb5 = new Clipboard('.btn', { }); cb1.destroy(); +cb1.isSupported(); cb2.on('success', e => { console.info('Action:', e.action); diff --git a/types/clipboard/index.d.ts b/types/clipboard/index.d.ts index 861d8c326b..0aa51518dd 100644 --- a/types/clipboard/index.d.ts +++ b/types/clipboard/index.d.ts @@ -18,6 +18,11 @@ declare class Clipboard { * Clears all event bindings. */ destroy(): void; + + /** + * Checks if clipboard.js is supported + */ + isSupported(): boolean; } declare namespace Clipboard { diff --git a/types/clndr/index.d.ts b/types/clndr/index.d.ts index 3e9fbbb09c..6e0c22d2f3 100644 --- a/types/clndr/index.d.ts +++ b/types/clndr/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kylestetz/CLNDR // Definitions by: jasperjn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/clndr/tsconfig.json b/types/clndr/tsconfig.json index 8e68c59399..47e9476079 100644 --- a/types/clndr/tsconfig.json +++ b/types/clndr/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "clndr-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/cloud-env/cloud-env-tests.ts b/types/cloud-env/cloud-env-tests.ts new file mode 100644 index 0000000000..64cbadd7f0 --- /dev/null +++ b/types/cloud-env/cloud-env-tests.ts @@ -0,0 +1,9 @@ +import * as cloudEnv from 'cloud-env'; + +if (cloudEnv.get('IP', '0.0.0.0') !== '0.0.0.0') { + throw new Error(`cloudEnv.get: expected value 0.0.0.0, but actually received value ${cloudEnv.get('IP', '0.0.0.0')}`); +} + +if (!(cloudEnv.defaults instanceof Object)) { + throw new Error(`cloudEnv.defaults: expected value of defaults be an instance of Object, but it was actually an instance of another class: ${typeof cloudEnv.defaults}`); +} diff --git a/types/cloud-env/index.d.ts b/types/cloud-env/index.d.ts new file mode 100644 index 0000000000..daec09022f --- /dev/null +++ b/types/cloud-env/index.d.ts @@ -0,0 +1,51 @@ +// Type definitions for cloud-env 0.2.2 +// Project: https://github.com/ryanj/cloud-env +// Definitions by: Ben Davies +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare interface DefaultSettings { + PORT?: number; + IP?: string; + HOSTNAME?: string; + APP_NAME?: string; + MONGODB_DB_URL?: string; + MONGODB_DB_HOST?: string; + MONGODB_DB_PORT?: number; + MONGODB_DB_USERNAME?: string; + MONGODB_DB_PASSWORD?: string; + POSTGRESQL_DB_URL?: string; + POSTGRESQL_DB_HOST?: string; + POSTGRESQL_DB_PORT?: number; + POSTGRESQL_DB_USERNAME?: string; + POSTGRESQL_DB_PASSWORD?: string; + MYSQL_DB_URL?: string; + MYSQL_DB_HOST?: string; + MYSQL_DB_PORT?: number; + MYSQL_DB_USERNAME?: string; + MYSQL_DB_PASSWORD?: string; +} + +declare type MaybeNum = number | void; +declare type MaybeStr = string | void; + +export const get: (key: string, default_key?: string) => MaybeStr; +export const defaults: { [key: string]: DefaultSettings; }; +export const PORT: MaybeNum; +export const IP: MaybeStr; +export const HOSTNAME: MaybeStr; +export const APP_NAME: MaybeStr; +export const MONGODB_DB_URL: MaybeStr; +export const MONGODB_DB_HOST: MaybeStr; +export const MONGODB_DB_PORT: MaybeNum; +export const MONGODB_DB_USERNAME: MaybeStr; +export const MONGODB_DB_PASSWORD: MaybeStr; +export const POSTGRESQL_DB_URL: MaybeStr; +export const POSTGRESQL_DB_HOST: MaybeStr; +export const POSTGRESQL_DB_PORT: MaybeNum; +export const POSTGRESQL_DB_USERNAME: MaybeStr; +export const POSTGRESQL_DB_PASSWORD: MaybeStr; +export const MYSQL_DB_URL: MaybeStr; +export const MYSQL_DB_HOST: MaybeStr; +export const MYSQL_DB_PORT: MaybeNum; +export const MYSQL_DB_USERNAME: MaybeStr; +export const MYSQL_DB_PASSWORD: MaybeStr; diff --git a/types/cloud-env/tsconfig.json b/types/cloud-env/tsconfig.json new file mode 100644 index 0000000000..e6a1323629 --- /dev/null +++ b/types/cloud-env/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cloud-env-tests.ts" + ] +} diff --git a/types/codemirror/index.d.ts b/types/codemirror/index.d.ts index 9a74dc1e53..b42ebabae3 100644 --- a/types/codemirror/index.d.ts +++ b/types/codemirror/index.d.ts @@ -1097,7 +1097,7 @@ declare namespace CodeMirror { * Both modes get to parse all of the text, but when both assign a non-null style to a piece of code, the overlay wins, unless * the combine argument was true and not overridden, or state.overlay.combineTokens was true, in which case the styles are combined. */ - function overlayMode(base: Mode, overlay: Mode, combine?: boolean): Mode + function overlayMode(base: Mode, overlay: Mode, combine?: boolean): Mode; /** * async specifies that the lint process runs asynchronously. hasGutters specifies that lint errors should be displayed in the CodeMirror @@ -1114,13 +1114,20 @@ declare namespace CodeMirror { * linter. */ interface LintOptions extends LintStateOptions { - getAnnotations: AnnotationsCallback; + getAnnotations: Linter | AsyncLinter; + } + + /** + * A function that return errors found during the linting process. + */ + interface Linter { + (content: string, options: LintStateOptions, codeMirror: Editor): Annotation[] | PromiseLike; } /** * A function that calls the updateLintingCallback with any errors found during the linting process. */ - interface AnnotationsCallback { + interface AsyncLinter { (content: string, updateLintingCallback: UpdateLintingCallback, options: LintStateOptions, codeMirror: Editor): void; } diff --git a/types/codemirror/test/index.ts b/types/codemirror/test/index.ts index 41b7170fd1..e283abe974 100644 --- a/types/codemirror/test/index.ts +++ b/types/codemirror/test/index.ts @@ -28,7 +28,7 @@ var lintStateOptions: CodeMirror.LintStateOptions = { hasGutters: true }; -var lintOptions: CodeMirror.LintOptions = { +var asyncLintOptions: CodeMirror.LintOptions = { async: true, hasGutters: true, getAnnotations: (content: string, @@ -37,6 +37,14 @@ var lintOptions: CodeMirror.LintOptions = { codeMirror: CodeMirror.Editor) => {} }; +var syncLintOptions: CodeMirror.LintOptions = { + async: false, + hasGutters: true, + getAnnotations: (content: string, + options: CodeMirror.LintStateOptions, + codeMirror: CodeMirror.Editor): CodeMirror.Annotation[] => { return []; } +}; + var updateLintingCallback: CodeMirror.UpdateLintingCallback = (codeMirror: CodeMirror.Editor, annotations: CodeMirror.Annotation[]) => {}; diff --git a/types/collections/collections-tests.ts b/types/collections/collections-tests.ts new file mode 100644 index 0000000000..b7feef3c05 --- /dev/null +++ b/types/collections/collections-tests.ts @@ -0,0 +1,32 @@ +import SortedSet = require('collections/sorted-set'); + +interface Person { + name: string; +} + +let set = new SortedSet( + [{name: 'John'}, {name: 'Jack'}, {name: 'Linda'}], + (a: Person, b: Person) => a.name === b.name, + (a: Person, b: Person) => { + if (a.name < b.name) { + return -1; + } + if (a.name > b.name) { + return 1; + } + return 0; + } +); + +let p1: Person | undefined = set.max(); +let p2: Person | undefined = set.min(); + + +set.push({name: 'Laurie'}, {name: 'Max'}); +set.pop(); + +set.get({name: 'Laurie'}); +set.has({name: 'John'}); + +let a = 1; +set.forEach((p: Person) => a++); \ No newline at end of file diff --git a/types/collections/index.d.ts b/types/collections/index.d.ts new file mode 100644 index 0000000000..8a92df0f2d --- /dev/null +++ b/types/collections/index.d.ts @@ -0,0 +1,133 @@ +// Type definitions for collections v5.0.6 +// Project: http://www.collectionsjs.com/ +// Definitions by: Scarabe Dore +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'collections/sorted-set' { + namespace internal { + // TODO: These methods can be similar in others collection. One's should make some + // class model. + abstract class AbstractSet { + union(...plus: any[]): any; + intersection(...plus: any[]): any; + difference(...plus: any[]): any; + symmetricDifference(...plus: any[]): any; + remove(...plus: any[]): any; + contains(...plus: any[]): any; + toggle(...plus: any[]): any; + addEach(...plus: any[]): any; + deleteEach(...plus: any[]): any; + deleteAll(...plus: any[]): any; + findValue(...plus: any[]): any; + iterator(...plus: any[]): any; + forEach(...plus: any[]): any; + map(...plus: any[]): any; + + filter(...plus: any[]): any; + group(...plus: any[]): any; + some(...plus: any[]): any; + every(...plus: any[]): any; + any(...plus: any[]): any; + all(...plus: any[]): any; + only(...plus: any[]): any; + sorted(...plus: any[]): any; + reversed(...plus: any[]): any; + join(...plus: any[]): any; + sum(...plus: any[]): any; + average(...plus: any[]): any; + zip(...plus: any[]): any; + enumerate(...plus: any[]): any; + concat(...plus: any[]): any; + flatten(...plus: any[]): any; + toArray(...plus: any[]): any; + toObject(...plus: any[]): any; + toJSON(...plus: any[]): any; + equals(...plus: any[]): any; + clone(...plus: any[]): any; + contentCompare(...plus: any[]): any; + contentEquals(...plus: any[]): any; + sortedSetLog(...plus: any[]): any; + addRangeChangeListener(...plus: any[]): any; + removeRangeChangeListener(...plus: any[]): any; + dispatchRangeChange(...plus: any[]): any; + addBeforeRangeChangeListener(...plus: any[]): any; + removeBeforeRangeChangeListener(...plus: any[]): any; + dispatchBeforeRangeChange(...plus: any[]): any; + addOwnPropertyChangeListener(...plus: any[]): any; + addBeforeOwnPropertyChangeListener(...plus: any[]): any; + removeOwnPropertyChangeListener(...plus: any[]): any; + removeBeforeOwnPropertyChangeListener(...plus: any[]): any; + dispatchOwnPropertyChange(...plus: any[]): any; + dispatchBeforeOwnPropertyChange(...plus: any[]): any; + makePropertyObservable(...plus: any[]): any; + } + + class Node { + reduce(cb: (result?: any, val?: any, key?: any, collection?: any) => any, + basis: any, index: number, thisp: any, tree: any, depth: number): any; + touch(...plus: any[]): void; + checkIntegrity(...plus: any[]): number; + getNext(...plus: any[]): Node | undefined; + getPrevious(...plus: any[]): Node | undefined; + summary(...plus: any[]): string; + log(charmap: any, logNode: any, log: any, logAbove: any): any; + } + + class Iterator { + next(): {done: true, value: T | null | undefined}; + } + + export class SortedSet extends AbstractSet { + constructor( + values?: T[], + equals?: (a: T, b: T) => boolean, + compare?: (a: T, b: T) => number, + getDefault?: any + ); + constructClone(values?: T[]): SortedSet; + + add(value: T): boolean; + clear(): void; + ['delete'](value: T): boolean; + + find(value: T): Node | undefined; + findGreatest(n?: Node | undefined): Node | undefined; + findGreatestLessThan(value: T): Node | undefined; + findGreatestLessThanOrEqual(value: T): Node | undefined; + findLeast(n?: Node | undefined): Node | undefined; + findLeastGreaterThan(value: T): Node | undefined; + findLeastGreaterThanOrEqual(value: T): Node | undefined; + max(n?: Node): T | undefined; + min(n?: Node): T | undefined; + one(): T | undefined; + + get(elt: T): T | undefined; + has(elt: T): boolean; + indexOf(value: T): number; + + pop(): T | undefined; + push(...rest: T[]): void; + + shift(): T | undefined; + unshift(...rest: T[]): void; + + slice(start?: number, end?: number): T[]; + splice(start: Node, length: number, ...values: T[]): T[]; + swap(start: number, length: number, values?: T[]): T[]; + + splay(value: T): void; + splayIndex(index: number): boolean; + + reduce(callback: (result?: any, val?: any, key?: any, collection?: any) => any, + basis?: any, thisp?: any): any; + reduceRight( + callback: (result?: any, val?: any, key?: any, collection?: any) => any, + basis?: any, thisp?: any + ): any; + + iterate(start: number, stop: number): Iterator; + } + } + + export = internal.SortedSet; +} diff --git a/types/collections/tsconfig.json b/types/collections/tsconfig.json new file mode 100644 index 0000000000..6b5293a242 --- /dev/null +++ b/types/collections/tsconfig.json @@ -0,0 +1,16 @@ +{ + "files": [ + "collections-tests.ts", + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "lib": ["es6"], + "forceConsistentCasingInFileNames": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "noEmit": true + } +} diff --git a/types/color/color-tests.ts b/types/color/color-tests.ts index 7b1a48a945..2d05e86f05 100644 --- a/types/color/color-tests.ts +++ b/types/color/color-tests.ts @@ -3,6 +3,7 @@ import * as Color from "color" var color: Color.Color = Color("white") var colorOther: Color.Color = Color("black") var colorRGB: Color.Color = Color({ r : 0, g : 0, b : 0 }, "rgb") +var colorInt: Color.Color = Color(0x000000) var hex: string = color.hex() var percent: string = color.percentString() diff --git a/types/color/index.d.ts b/types/color/index.d.ts index 8d6016c7d8..a9fc18f29a 100644 --- a/types/color/index.d.ts +++ b/types/color/index.d.ts @@ -5,7 +5,7 @@ declare namespace Color { - type ColorParam = string | { [param: string]: number }; + type ColorParam = string | { [param: string]: number } | number; type ColorModel = "rgb" | "hsl" | "hsv" | "hwb" | "hcg" | "cmyk" | "xyz" | "lab" | "hex" | "gray" | "keyword"; diff --git a/types/combine-source-map/combine-source-map-tests.ts b/types/combine-source-map/combine-source-map-tests.ts new file mode 100644 index 0000000000..70f426d7ce --- /dev/null +++ b/types/combine-source-map/combine-source-map-tests.ts @@ -0,0 +1,12 @@ +import combine = require("combine-source-map"); + +const sourcemap = combine.create(); + +sourcemap.addFile({ sourceFile: "file.js", source: "return 123" }) + .addFile({ sourceFile: "source.js", source: "return 'abc'" }); + +const res: string = sourcemap.base64(); + +const res2 = sourcemap.comment(); + +combine.removeComments("(123 | 'abc') // #sourceMappingURL=file.js.map"); diff --git a/types/combine-source-map/index.d.ts b/types/combine-source-map/index.d.ts new file mode 100644 index 0000000000..43f1c994b0 --- /dev/null +++ b/types/combine-source-map/index.d.ts @@ -0,0 +1,59 @@ +// Type definitions for combine-source-map 0.8 +// Project: https://github.com/thlorenz/combine-source-map +// Definitions by: TeamworkGuy2 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** Add source maps of multiple files, offset them and then combine them into one source map. + * (documentation based on project's README file) + */ +declare class Combiner { + constructor(file?: string, sourceRoot?: string); + + /** Adds map to underlying source map. + * If source contains a source map comment that has the source of the original file inlined it will offset these + * mappings and include them. + * If no source map comment is found or it has no source inlined, mappings for the file will be generated and included + * @param opts the 'sourceFile' path/name and the file's 'source' contents + * @param offset the source file 'line' number and 'column' number offsets + */ + addFile(opts: { sourceFile: string; source: string }, offset?: Combiner.Offset): Combiner; + + /** output the combined source map in base64 format + * @return base64 encoded combined source map + */ + base64(): string; + + /** generate a base64 encoded sourceMappingURL comment + * @return base64 encoded sourceMappingUrl comment of the combined source map + */ + comment(): string; + + _addGeneratedMap(sourceFile: string, source: string, offset?: Combiner.Offset): Combiner; + + _addExistingMap(sourceFile: string, source: string, existingMap: any, offset?: Combiner.Offset): Combiner; +} + +declare namespace Combiner { + /** An offset line and column number */ + interface Offset { + line?: number; + column?: number; + } + + /** Create a source map combiner that accepts multiple files, offsets them and then combines them into one source map. + * @param file optional name of the generated file + * @param sourceRoot optional sourceRoot of the map to be generated + * @return Combiner instance to which source maps can be added and later combined + */ + function create(file?: string, sourceRoot?: string): Combiner; + + /** removeComments + * @param src + * @return src with all sourceMappingUrl comments removed + */ + function removeComments(src: string): string; +} + +export = Combiner; + +export as namespace Combiner; diff --git a/types/combine-source-map/tsconfig.json b/types/combine-source-map/tsconfig.json new file mode 100644 index 0000000000..8ee6b85743 --- /dev/null +++ b/types/combine-source-map/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", + "combine-source-map-tests.ts" + ] +} \ No newline at end of file diff --git a/types/combine-source-map/tslint.json b/types/combine-source-map/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/combine-source-map/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/command-line-args/command-line-args-tests.ts b/types/command-line-args/command-line-args-tests.ts new file mode 100644 index 0000000000..11848ee202 --- /dev/null +++ b/types/command-line-args/command-line-args-tests.ts @@ -0,0 +1,10 @@ +import commandLineArgs = require('command-line-args'); + +const optionDefinitions = [ + { name: 'verbose', alias: 'v', type: Boolean }, + { name: 'src', type: String, multiple: true, defaultOption: true }, + { name: 'timeout', alias: 't', type: Number } +]; + +const options = commandLineArgs(optionDefinitions); + diff --git a/types/command-line-args/index.d.ts b/types/command-line-args/index.d.ts new file mode 100644 index 0000000000..33af16bcf5 --- /dev/null +++ b/types/command-line-args/index.d.ts @@ -0,0 +1,74 @@ +// Type definitions for command-line-args 4.0.6 +// Project: https://github.com/75lb/command-line-args +// Definitions by: CzBuCHi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Returns an object containing all options set on the command line. By default it parses the global [`process.argv`](https://nodejs.org/api/process.html#process_process_argv) array. + * + * By default, an exception is thrown if the user sets an unknown option (one without a valid [definition](#exp_module_definition--OptionDefinition)). To enable __partial parsing__, invoke `commandLineArgs` with the `partial` option - all unknown arguments will be returned in the `_unknown` property. + * + * + * @param {module:definition[]} - An array of [OptionDefinition](#exp_module_definition--OptionDefinition) objects + * @param [options] {object} - Options. + * @param [options.argv] {string[]} - An array of strings, which if passed will be parsed instead of `process.argv`. + * @param [options.partial] {boolean} - If `true`, an array of unknown arguments is returned in the `_unknown` property of the output. + * @returns {object} + * @throws `UNKNOWN_OPTION` if `options.partial` is false and the user set an undefined option + * @throws `NAME_MISSING` if an option definition is missing the required `name` property + * @throws `INVALID_TYPE` if an option definition has a `type` value that's not a function + * @throws `INVALID_ALIAS` if an alias is numeric, a hyphen or a length other than 1 + * @throws `DUPLICATE_NAME` if an option definition name was used more than once + * @throws `DUPLICATE_ALIAS` if an option definition alias was used more than once + * @throws `DUPLICATE_DEFAULT_OPTION` if more than one option definition has `defaultOption: true` + * @alias module:command-line-args + */ +declare function commandLineArgs(optionDefinitions: commandLineArgs.OptionDefinition[], options?: commandLineArgs.Options): any; + +declare module commandLineArgs { + + export interface OptionDefinition { + /** + * The only required definition property is name, the value of each option will be either a Boolean or string. + */ + name: string, + /** + * The type value is a setter function (you receive the output from this), enabling you to be specific about the type and value received. + */ + type?: (arg: string) => any, + /** + * getopt-style short option names. Can be any single character (unicode included) except a digit or hypen. + */ + alias?: string, + /** + * Set this flag if the option takes a list of values. You will receive an array of values, each passed through the type function (if specified). + */ + multiple?: boolean, + /** + * Any unclaimed command-line args will be set on this option. This flag is typically set on the most commonly-used option to make for more concise usage (i.e. $ myapp *.js instead of $ myapp --files *.js). + */ + defaultOption?: boolean, + /** + * An initial value for the option. + */ + defaultValue?: any, + /** + * When your app has a large amount of options it makes sense to organise them in groups. + * There are two automatic groups: _all (contains all options) and _none (contains options without a group specified in their definition). + */ + group?: string | string[], + } + + export interface Options { + /** + * An array of strings, which if passed will be parsed instead of `process.argv`. + */ + argv?: string[]; + /** + * If `true`, an array of unknown arguments is returned in the `_unknown` property of the output. + */ + partial?: boolean; + } +} + +export = commandLineArgs; diff --git a/types/cookiejs/tsconfig.json b/types/command-line-args/tsconfig.json similarity index 91% rename from types/cookiejs/tsconfig.json rename to types/command-line-args/tsconfig.json index 310990fba6..2f22f95af1 100644 --- a/types/cookiejs/tsconfig.json +++ b/types/command-line-args/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "cookiejs-tests.ts" + "command-line-args-tests.ts" ] } \ No newline at end of file diff --git a/types/command-line-commands/command-line-commands-tests.ts b/types/command-line-commands/command-line-commands-tests.ts new file mode 100644 index 0000000000..5ba96986d7 --- /dev/null +++ b/types/command-line-commands/command-line-commands-tests.ts @@ -0,0 +1,7 @@ +import commandLineCommands = require('command-line-commands'); + +const commands = [null, 'first', 'second']; + +const { command, argv } = commandLineCommands(commands, ['first', '--arg']); + + diff --git a/types/command-line-commands/index.d.ts b/types/command-line-commands/index.d.ts new file mode 100644 index 0000000000..cf69198dac --- /dev/null +++ b/types/command-line-commands/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for command-line-commands 2.0.0 +// Project: https://github.com/75lb/command-line-commands +// Definitions by: CzBuCHi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Parses the `argv` value supplied (or `process.argv` by default), extracting and returning the `command` and remainder of `argv`. The command will be the first value in the `argv` array unless it is an option (e.g. `--help`). + * + * @param {string|string[]} - One or more command strings, one of which the user must supply. Include `null` to represent "no command" (effectively making a command optional). + * @param [argv] {string[]} - An argv array, defaults to the global `process.argv` if not supplied. + * @returns {{ command: string, argv: string[] }} + * @throws `INVALID_COMMAND` - user supplied a command not specified in `commands`. + */ +declare function commandLineCommands(commands: (string | null)[], argv?: string[]): { command: string | null, argv: string[] }; + +export = commandLineCommands; + diff --git a/types/express-validator/tsconfig.json b/types/command-line-commands/tsconfig.json similarity index 91% rename from types/express-validator/tsconfig.json rename to types/command-line-commands/tsconfig.json index cd9c9145d7..5d98c64e58 100644 --- a/types/express-validator/tsconfig.json +++ b/types/command-line-commands/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "express-validator-tests.ts" + "command-line-commands-tests.ts" ] } \ No newline at end of file diff --git a/types/commander/commander-tests.ts b/types/commander/commander-tests.ts index fe09be7b34..259b107bbf 100644 --- a/types/commander/commander-tests.ts +++ b/types/commander/commander-tests.ts @@ -1,5 +1,11 @@ -// NOTE: import statement can not use in TypeScript 1.0.1 -import program = require('commander'); +import * as program from "commander"; + +interface ExtendedOptions extends program.CommandOptions { + isNew: any; +} + +const commandInstance = new program.Command("-f"); +const optionsInstance = new program.Option("-f"); program .version('0.0.1') @@ -54,7 +60,6 @@ console.log(' collect: %j', program['collect']); console.log(' verbosity: %j', program['verbose']); console.log(' args: %j', program['args']); - program .version('0.0.1') .option('-f, --foo', 'enable some foo') diff --git a/types/commander/index.d.ts b/types/commander/index.d.ts index 675ece0417..017495784a 100644 --- a/types/commander/index.d.ts +++ b/types/commander/index.d.ts @@ -5,6 +5,267 @@ /// +declare class Option { + flags: string; + required: boolean; + optional: boolean; + bool: boolean; + short?: string; + long: string; + description: string; + + /** + * Initialize a new `Option` with the given `flags` and `description`. + * + * @param {string} flags + * @param {string} [description] + */ + constructor(flags: string, description?: string); +} + +declare class Command extends NodeJS.EventEmitter { + [key: string]: any; + + args: string[]; + + /** + * Initialize a new `Command`. + * + * @param {string} [name] + */ + constructor(name?: string); + + /** + * Set the program version to `str`. + * + * This method auto-registers the "-V, --version" flag + * which will print the version number when passed. + * + * @param {string} str + * @param {string} [flags] + * @returns {Command} for chaining + */ + version(str: string, flags?: string): Command; + + /** + * Add command `name`. + * + * The `.action()` callback is invoked when the + * command `name` is specified via __ARGV__, + * and the remaining arguments are applied to the + * function for access. + * + * When the `name` is "*" an un-matched command + * will be passed as the first arg, followed by + * the rest of __ARGV__ remaining. + * + * @example + * program + * .version('0.0.1') + * .option('-C, --chdir ', 'change the working directory') + * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') + * .option('-T, --no-tests', 'ignore test hook') + * + * program + * .command('setup') + * .description('run remote setup commands') + * .action(function() { + * console.log('setup'); + * }); + * + * program + * .command('exec ') + * .description('run the given remote command') + * .action(function(cmd) { + * console.log('exec "%s"', cmd); + * }); + * + * program + * .command('teardown [otherDirs...]') + * .description('run teardown commands') + * .action(function(dir, otherDirs) { + * console.log('dir "%s"', dir); + * if (otherDirs) { + * otherDirs.forEach(function (oDir) { + * console.log('dir "%s"', oDir); + * }); + * } + * }); + * + * program + * .command('*') + * .description('deploy the given env') + * .action(function(env) { + * console.log('deploying "%s"', env); + * }); + * + * program.parse(process.argv); + * + * @param {string} name + * @param {string} [desc] for git-style sub-commands + * @param {CommandOptions} [opts] command options + * @returns {Command} the new command + */ + command(name: string, desc?: string, opts?: commander.CommandOptions): Command; + + /** + * Define argument syntax for the top-level command. + * + * @param {string} desc + * @returns {Command} for chaining + */ + arguments(desc: string): Command; + + /** + * Parse expected `args`. + * + * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. + * + * @param {string[]} args + * @returns {Command} for chaining + */ + parseExpectedArgs(args: string[]): Command; + /** + * Register callback `fn` for the command. + * + * @example + * program + * .command('help') + * .description('display verbose help') + * .action(function() { + * // output help here + * }); + * + * @param {(...args: any[]) => void} fn + * @returns {Command} for chaining + */ + action(fn: (...args: any[]) => void): Command; + + /** + * Define option with `flags`, `description` and optional + * coercion `fn`. + * + * The `flags` string should contain both the short and long flags, + * separated by comma, a pipe or space. The following are all valid + * all will output this way when `--help` is used. + * + * "-p, --pepper" + * "-p|--pepper" + * "-p --pepper" + * + * @example + * // simple boolean defaulting to false + * program.option('-p, --pepper', 'add pepper'); + * + * --pepper + * program.pepper + * // => Boolean + * + * // simple boolean defaulting to true + * program.option('-C, --no-cheese', 'remove cheese'); + * + * program.cheese + * // => true + * + * --no-cheese + * program.cheese + * // => false + * + * // required argument + * program.option('-C, --chdir ', 'change the working directory'); + * + * --chdir /tmp + * program.chdir + * // => "/tmp" + * + * // optional argument + * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * + * @param {string} flags + * @param {string} [description] + * @param {((arg1: any, arg2: any) => void) | RegExp} [fn] function or default + * @param {*} [defaultValue] + * @returns {Command} for chaining + */ + option(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; + option(flags: string, description?: string, defaultValue?: any): Command; + + /** + * Allow unknown options on the command line. + * + * @param {boolean} [arg] if `true` or omitted, no error will be thrown for unknown options. + * @returns {Command} for chaining + */ + allowUnknownOption(arg?: boolean): Command; + + /** + * Parse `argv`, settings options and invoking commands when defined. + * + * @param {string[]} argv + * @returns {Command} for chaining + */ + parse(argv: string[]): Command; + + /** + * Parse options from `argv` returning `argv` void of these options. + * + * @param {string[]} argv + * @returns {ParseOptionsResult} + */ + parseOptions(argv: string[]): commander.ParseOptionsResult; + + /** + * Return an object containing options as key-value pairs + * + * @returns {{[key: string]: string}} + */ + opts(): { [key: string]: string }; + + /** + * Set the description to `str`. + * + * @param {string} str + * @return {(Command | string)} + */ + description(str: string): Command; + description(): string; + + /** + * Set an alias for the command. + * + * @param {string} alias + * @return {(Command | string)} + */ + alias(alias: string): Command; + alias(): string; + + /** + * Set or get the command usage. + * + * @param {string} str + * @return {(Command | string)} + */ + usage(str: string): Command; + usage(): string; + + /** + * Get the name of the command. + * + * @return {string} + */ + name(): string; + + /** + * Output help information for this command. + * + * @param {() => void} [cb] Callback method + */ + outputHelp(cb?: () => void): void; + + /** Output help information and exit. */ + help(): void; +} + declare namespace commander { interface CommandOptions { @@ -17,266 +278,14 @@ declare namespace commander { unknown: string[]; } - class Option { - flags: string; - required: boolean; - optional: boolean; - bool: boolean; - short?: string; - long: string; - description: string; - - /** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {string} flags - * @param {string} [description] - */ - constructor(flags: string, description?: string); + interface CommanderStatic extends Command { + Command: typeof Command; + Option: typeof Option; + CommandOptions: CommandOptions; + ParseOptionsResult: ParseOptionsResult; } - class Command extends NodeJS.EventEmitter { - args: string[]; - - /** - * Initialize a new `Command`. - * - * @param {string} [name] - */ - constructor(name?: string); - - /** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {string} str - * @param {string} [flags] - * @returns {Command} for chaining - */ - version(str: string, flags?: string): Command; - - /** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * @example - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function() { - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd) { - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('teardown [otherDirs...]') - * .description('run teardown commands') - * .action(function(dir, otherDirs) { - * console.log('dir "%s"', dir); - * if (otherDirs) { - * otherDirs.forEach(function (oDir) { - * console.log('dir "%s"', oDir); - * }); - * } - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env) { - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {string} name - * @param {string} [desc] for git-style sub-commands - * @param {CommandOptions} [opts] command options - * @returns {Command} the new command - */ - command(name: string, desc?: string, opts?: CommandOptions): Command; - - - /** - * Define argument syntax for the top-level command. - * - * @param {string} desc - * @returns {Command} for chaining - */ - arguments(desc: string): Command; - - /** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {string[]} args - * @returns {Command} for chaining - */ - parseExpectedArgs(args: string[]): Command; - /** - * Register callback `fn` for the command. - * - * @example - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); - * - * @param {(...args: any[]) => void} fn - * @returns {Command} for chaining - */ - action(fn: (...args: any[]) => void): Command; - - /** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - *@example - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to true - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => false - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {string} flags - * @param {string} [description] - * @param {((arg1: any, arg2: any) => void) | RegExp} [fn] function or default - * @param {*} [defaultValue] - * @returns {Command} for chaining - */ - option(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; - option(flags: string, description?: string, defaultValue?: any): Command; - - /** - * Allow unknown options on the command line. - * - * @param {boolean} [arg] if `true` or omitted, no error will be thrown for unknown options. - * @returns {Command} for chaining - */ - allowUnknownOption(arg?: boolean): Command; - - /** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {string[]} argv - * @returns {Command} for chaining - */ - parse(argv: string[]): Command; - - /** - * Parse options from `argv` returning `argv` void of these options. - * - * @param {string[]} argv - * @returns {ParseOptionsResult} - */ - parseOptions(argv: string[]): ParseOptionsResult; - - /** - * Return an object containing options as key-value pairs - * - * @returns {{[key: string]: string}} - */ - opts(): { [key: string]: string }; - - /** - * Set the description to `str`. - * - * @param {string} str - * @return {(Command | string)} - */ - description(str: string): Command; - description(): string; - - /** - * Set an alias for the command. - * - * @param {string} alias - * @return {(Command | string)} - */ - alias(alias: string): Command; - alias(): string; - - /** - * Set or get the command usage. - * - * @param {string} str - * @return {(Command | string)} - */ - usage(str: string): Command; - usage(): string; - - /** - * Get the name of the command. - * - * @return {string} - */ - name(): string; - - /** - * Output help information for this command. - * - * @param {() => void} [cb] Callback method - */ - outputHelp(cb?: () => void): void; - - /** Output help information and exit. */ - help(): void; - } } -declare var command: commander.Command & commander.Option & { [key: string]: any }; -export = command; +declare const commander: commander.CommanderStatic; +export = commander; diff --git a/types/commangular/index.d.ts b/types/commangular/index.d.ts index 06126ac64f..4eb9d07230 100644 --- a/types/commangular/index.d.ts +++ b/types/commangular/index.d.ts @@ -2,6 +2,7 @@ // Project: http://commangular.org // Definitions by: Hiraash Thawfeek // Definitions: https://github.com/borisyankov/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -270,4 +271,4 @@ declare module angular { } -} \ No newline at end of file +} diff --git a/types/commonmark/commonmark-tests.ts b/types/commonmark/commonmark-tests.ts index d298972f89..8d3a3a5447 100644 --- a/types/commonmark/commonmark-tests.ts +++ b/types/commonmark/commonmark-tests.ts @@ -1,9 +1,6 @@ - - import commonmark = require('commonmark'); function logNode(node: commonmark.Node) { - console.log( node.destination, node.firstChild, @@ -24,12 +21,10 @@ function logNode(node: commonmark.Node) { node.sourcepos, node.title, node.type); - } -var parser = new commonmark.Parser({ smart: true, time: true }); -var node = parser.parse('# a piece of _markdown_'); - +const parser = new commonmark.Parser({ smart: true, time: true }); +const node = parser.parse('# a piece of _markdown_'); let w = node.walker(); let step = w.next(); @@ -37,11 +32,75 @@ if (step.entering) { logNode(step.node); } - let xmlRenderer = new commonmark.XmlRenderer({ sourcepos: true, time: true }); let xml = xmlRenderer.render(node); console.log(xml); -let htmlRenderer = new commonmark.HtmlRenderer({ safe: true, smart: true, sourcepos: true, time: true}); +let htmlRenderer = new commonmark.HtmlRenderer({ safe: true, smart: true, sourcepos: true, time: true }); let html = htmlRenderer.render(node); -console.log(html); \ No newline at end of file +console.log(html); + +function basic_usage() { + const reader = new commonmark.Parser(); + const writer = new commonmark.HtmlRenderer(); + const parsed = reader.parse('Hello *world*'); // parsed is a 'Node' tree + // transform parsed if you like... + const result = writer.render(parsed); // result is a String +} + +function constructor_optional_options() { + const writer = new commonmark.HtmlRenderer({ sourcepos: true }); +} + +function soft_breaks_as_hard_breaks() { + const writer = new commonmark.HtmlRenderer(); + writer.softbreak = '
    '; +} + +function soft_breaks_as_spaces() { + const writer = new commonmark.HtmlRenderer(); + writer.softbreak = ' '; +} + +function text_to_ALL_CAPS(parsed: commonmark.Node) { + const walker = parsed.walker(); + let event: commonmark.NodeWalkingStep; + let node: commonmark.Node; + + event = walker.next(); + while (event) { + node = event.node; + if (event.entering && node.type === 'text') { + node.literal = node.literal!.toUpperCase(); + } + event = walker.next(); + } +} + +function emphasis_to_ALL_CAPS(parsed: commonmark.Node) { + const walker = parsed.walker(); + let event: commonmark.NodeWalkingStep; + let node: commonmark.Node; + let inEmph = false; + + event = walker.next(); + while (event) { + node = event.node; + if (node.type === 'emph') { + if (event.entering) { + inEmph = true; + } else { + inEmph = false; + // add Emph node's children as siblings + while (node.firstChild) { + node.insertBefore(node.firstChild); + } + // remove the empty Emph node + node.unlink(); + } + } else if (inEmph && node.type === 'text') { + node.literal = node.literal!.toUpperCase(); + } + event = walker.next(); + } +} diff --git a/types/commonmark/index.d.ts b/types/commonmark/index.d.ts index bba8cd7e36..01b9541efa 100644 --- a/types/commonmark/index.d.ts +++ b/types/commonmark/index.d.ts @@ -1,212 +1,221 @@ -// Type definitions for commonmark.js 0.22.1 +// Type definitions for commonmark.js 0.27 // Project: https://github.com/jgm/commonmark.js // Definitions by: Nico Jansen +// Leonard Thieu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export = commonmark; -export as namespace commonmark; - -declare namespace commonmark { - - export interface NodeWalkingStep { - /** - * a boolean, which is true when we enter a Node from a parent or sibling, and false when we reenter it from a child - */ - entering: boolean; - /** - * The node belonging to this step - */ - node: Node; - } - - export interface NodeWalker { - /** - * Returns an object with properties entering and node. Returns null when we have finished walking the tree. - */ - next(): NodeWalkingStep; - /** - * Resets the iterator to resume at the specified node and setting for entering. (Normally this isn't needed unless you do destructive updates to the Node tree.) - */ - resumeAt(node: Node, entering?: boolean): void; - } - - export interface Position extends Array> { - } - - export interface ListData { - type?: string, - tight?: boolean, - delimiter?: string, - bulletChar?: string - } - - export class Node { - constructor(nodeType: string, sourcepos?: Position); - isContainer: boolean; - - /** - * (read-only): one of Text, Softbreak, Hardbreak, Emph, Strong, Html, Link, Image, Code, Document, Paragraph, BlockQuote, Item, List, Heading, CodeBlock, HtmlBlock ThematicBreak. - */ - type: string; - /** - * (read-only): a Node or null. - */ - firstChild: Node; - /** - * (read-only): a Node or null. - */ - lastChild: Node; - /** - * (read-only): a Node or null. - */ - next: Node; - /** - * (read-only): a Node or null. - */ - prev: Node; - /** - * (read-only): a Node or null. - */ - parent: Node; - /** - * (read-only): an Array with the following form: [[startline, startcolumn], [endline, endcolumn]] - */ - sourcepos: Position; - /** - * the literal String content of the node or null. - */ - literal: string; - /** - * link or image destination (String) or null. - */ - destination: string; - /** - * link or image title (String) or null. - */ - title: string; - /** - * fenced code block info string (String) or null. - */ - info: string; - /** - * heading level (Number). - */ - level: number; - /** - * either Bullet or Ordered (or undefined). - */ - listType: string; - /** - * true if list is tight - */ - listTight: boolean; - /** - * a Number, the starting number of an ordered list. - */ - listStart: number; - /** - * a String, either ) or . for an ordered list. - */ - listDelimiter: string; - /** - * used only for CustomBlock or CustomInline. - */ - onEnter: string; - /** - * used only for CustomBlock or CustomInline. - */ - onExit: string; - /** - * Append a Node child to the end of the Node's children. - */ - appendChild(child: Node): void; - /** - * Prepend a Node child to the beginning of the Node's children. - */ - prependChild(child: Node): void; - /** - * Remove the Node from the tree, severing its links with siblings and parents, and closing up gaps as needed. - */ - unlink(): void; - /** - * Insert a Node sibling after the Node. - */ - insertAfter(sibling: Node): void; - /** - * Insert a Node sibling before the Node. - */ - insertBefore(sibling: Node): void; - /** - * Returns a NodeWalker that can be used to iterate through the Node tree rooted in the Node - */ - walker(): NodeWalker; - /** - * Setting the backing object of listType, listTight, listStat and listDelimiter directly. - * Not needed unless creating list nodes directly. Should be fixed from v>0.22.1 - * https://github.com/jgm/commonmark.js/issues/74 - */ - _listData: ListData; - } +export class Node { + constructor(nodeType: string, sourcepos?: Position); /** - * Instead of converting Markdown directly to HTML, as most converters do, commonmark.js parses Markdown to an AST (abstract syntax tree), and then renders this AST as HTML. - * This opens up the possibility of manipulating the AST between parsing and rendering. For example, one could transform emphasis into ALL CAPS. + * (read-only): a String, one of text, softbreak, linebreak, emph, strong, html_inline, link, image, code, document, paragraph, + * block_quote, item, list, heading, code_block, html_block, thematic_break. */ - export class Parser { - /** - * Constructs a new Parser - */ - constructor(options?: ParserOptions); - parse(input: string): Node; - } + readonly type: 'text' | 'softbreak' | 'linebreak' | 'emph' | 'strong' | 'html_inline' | 'link' | 'image' | 'code' | 'document' | 'paragraph' | + 'block_quote' | 'item' | 'list' | 'heading' | 'code_block' | 'html_block' | 'thematic_break' | 'custom_inline' | 'custom_block'; + /** + * (read-only): a Node or null. + */ + readonly firstChild: Node | null; + /** + * (read-only): a Node or null. + */ + readonly lastChild: Node | null; + /** + * (read-only): a Node or null. + */ + readonly next: Node | null; + /** + * (read-only): a Node or null. + */ + readonly prev: Node | null; + /** + * (read-only): a Node or null. + */ + readonly parent: Node | null; + /** + * (read-only): an Array with the following form: [[startline, startcolumn], [endline, endcolumn]] + */ + readonly sourcepos: Position; + /** + * (read-only): true if the Node can contain other Nodes as children. + */ + readonly isContainer: boolean; + /** + * the literal String content of the node or null. + */ + literal: string | null; + /** + * link or image destination (String) or null. + */ + destination: string | null; + /** + * link or image title (String) or null. + */ + title: string | null; + /** + * fenced code block info string (String) or null. + */ + info: string | null; + /** + * heading level (Number). + */ + level: number; + /** + * either Bullet or Ordered (or undefined). + */ + listType: 'Bullet' | 'Ordered'; + /** + * true if list is tight + */ + listTight: boolean; + /** + * a Number, the starting number of an ordered list. + */ + listStart: number; + /** + * a String, either ) or . for an ordered list. + */ + listDelimiter: ')' | '.'; + /** + * used only for CustomBlock or CustomInline. + */ + onEnter: string; + /** + * used only for CustomBlock or CustomInline. + */ + onExit: string; - export interface ParserOptions { - /** - * if true, straight quotes will be made curly, -- will be changed to an en dash, --- will be changed to an em dash, and ... will be changed to ellipses. - */ - smart?: boolean; - time?: boolean; - } + /** + * Append a Node child to the end of the Node's children. + */ + appendChild(child: Node): void; - export interface HtmlRenderingOptions extends XmlRenderingOptions { - /** - * if true, raw HTML will not be passed through to HTML output (it will be replaced by comments), and potentially unsafe URLs in links and images (those beginning with javascript:, vbscript:, file:, and with a few exceptions data:) will be replaced with empty strings. - */ - safe?: boolean; - /** - * if true, straight quotes will be made curly, -- will be changed to an en dash, --- will be changed to an em dash, and ... will be changed to ellipses. - */ - smart?: boolean; - /** - * if true, source position information for block-level elements will be rendered in the data-sourcepos attribute (for HTML) or the sourcepos attribute (for XML). - */ - sourcepos?: boolean; - } + /** + * Prepend a Node child to the beginning of the Node's children. + */ + prependChild(child: Node): void; - export class HtmlRenderer { - constructor(options?: HtmlRenderingOptions) - render(root: Node): string; - /** - * Let's you override the softbreak properties of a renderer. So, to make soft breaks render as hard breaks in HTML: - * writer.softbreak = "
    "; - */ - softbreak: string; - /** - * Override the function that will be used to escape (sanitize) the html output. Return value is used to add to the html output - * @param input the input to escape - * @param isAttributeValue indicates wheter or not the input value will be used as value of an html attribute. - */ - escape: (input: string, isAttributeValue: boolean) => string; - } + /** + * Remove the Node from the tree, severing its links with siblings and parents, and closing up gaps as needed. + */ + unlink(): void; - export interface XmlRenderingOptions { - time?: boolean; - sourcepos?: boolean; - } + /** + * Insert a Node sibling after the Node. + */ + insertAfter(sibling: Node): void; - export class XmlRenderer { - constructor(options?: XmlRenderingOptions) - render(root: Node): string; - } + /** + * Insert a Node sibling before the Node. + */ + insertBefore(sibling: Node): void; + /** + * Returns a NodeWalker that can be used to iterate through the Node tree rooted in the Node + */ + walker(): NodeWalker; + + /** + * Setting the backing object of listType, listTight, listStat and listDelimiter directly. + * Not needed unless creating list nodes directly. Should be fixed from v>0.22.1 + * https://github.com/jgm/commonmark.js/issues/74 + */ + _listData: ListData; +} + +/** + * Instead of converting Markdown directly to HTML, as most converters do, commonmark.js parses Markdown to an AST (abstract syntax tree), and then renders this AST as HTML. + * This opens up the possibility of manipulating the AST between parsing and rendering. For example, one could transform emphasis into ALL CAPS. + */ +export class Parser { + /** + * Constructs a new Parser + */ + constructor(options?: ParserOptions); + + parse(input: string): Node; +} + +export class HtmlRenderer { + constructor(options?: HtmlRenderingOptions) + + render(root: Node): string; + + /** + * Let's you override the softbreak properties of a renderer. So, to make soft breaks render as hard breaks in HTML: + * writer.softbreak = "
    "; + */ + softbreak: string; + /** + * Override the function that will be used to escape (sanitize) the html output. Return value is used to add to the html output + * @param input the input to escape + * @param isAttributeValue indicates wheter or not the input value will be used as value of an html attribute. + */ + escape: (input: string, isAttributeValue: boolean) => string; +} + +export class XmlRenderer { + constructor(options?: XmlRenderingOptions) + + render(root: Node): string; +} +export interface NodeWalkingStep { + /** + * a boolean, which is true when we enter a Node from a parent or sibling, and false when we reenter it from a child + */ + entering: boolean; + /** + * The node belonging to this step + */ + node: Node; +} + +export interface NodeWalker { + /** + * Returns an object with properties entering and node. Returns null when we have finished walking the tree. + */ + next(): NodeWalkingStep; + /** + * Resets the iterator to resume at the specified node and setting for entering. (Normally this isn't needed unless you do destructive updates to the Node tree.) + */ + resumeAt(node: Node, entering?: boolean): void; +} + +export type Position = [[number, number], [number, number]]; + +export interface ListData { + type?: string; + tight?: boolean; + delimiter?: string; + bulletChar?: string; +} + +export interface ParserOptions { + /** + * if true, straight quotes will be made curly, -- will be changed to an en dash, --- will be changed to an em dash, and ... will be changed to ellipses. + */ + smart?: boolean; + time?: boolean; +} + +export interface HtmlRenderingOptions extends XmlRenderingOptions { + /** + * if true, raw HTML will not be passed through to HTML output (it will be replaced by comments), and potentially unsafe URLs in links and images + * (those beginning with javascript:, vbscript:, file:, and with a few exceptions data:) will be replaced with empty strings. + */ + safe?: boolean; + /** + * if true, straight quotes will be made curly, -- will be changed to an en dash, --- will be changed to an em dash, and ... will be changed to ellipses. + */ + smart?: boolean; + /** + * if true, source position information for block-level elements will be rendered in the data-sourcepos attribute (for HTML) or the sourcepos attribute (for XML). + */ + sourcepos?: boolean; +} + +export interface XmlRenderingOptions { + time?: boolean; + sourcepos?: boolean; } diff --git a/types/commonmark/tsconfig.json b/types/commonmark/tsconfig.json index e424e972ca..82e3004b78 100644 --- a/types/commonmark/tsconfig.json +++ b/types/commonmark/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -20,4 +20,4 @@ "index.d.ts", "commonmark-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/commonmark/tslint.json b/types/commonmark/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/commonmark/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/connect-history-api-fallback/connect-history-api-fallback-tests.ts b/types/connect-history-api-fallback/connect-history-api-fallback-tests.ts new file mode 100644 index 0000000000..382e436366 --- /dev/null +++ b/types/connect-history-api-fallback/connect-history-api-fallback-tests.ts @@ -0,0 +1,64 @@ +import * as historyApiFallback from 'connect-history-api-fallback'; + +import * as express from "express"; + +const app = express(); +app.use(historyApiFallback()); + +historyApiFallback({ + verbose: true +}); + +historyApiFallback({ + logger: console.log.bind(console) +}); + +historyApiFallback({ + rewrites: [ + { from: /\/soccer/, to: '/soccer.html' } + ] +}); + +historyApiFallback({ + index: 'default.html' +}); + +historyApiFallback({ + htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'] +}); + +historyApiFallback({ + rewrites: [ + { + from: /^\/libs\/(.*)$/, + to(context) { + return './bower_components' + context.parsedUrl.pathname; + } + } + ] +}); + +historyApiFallback({ + rewrites: [ + { + from: /\/app\/login/, + to: function onMatch(ctx) { + if (ctx.parsedUrl.path && ctx.parsedUrl.path.indexOf('.js')) { + return ctx.parsedUrl.href || ''; + } + return '/app/login/index.html'; + } + } + ] +}); + +historyApiFallback({ + rewrites: [ + { + from: /^\/libs\/(.*)$/, + to(context) { + return '/' + context.match[2] + '/' + context.match[3]; + } + } + ] +}); diff --git a/types/connect-history-api-fallback/index.d.ts b/types/connect-history-api-fallback/index.d.ts new file mode 100644 index 0000000000..9cd77ac174 --- /dev/null +++ b/types/connect-history-api-fallback/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for connect-history-api-fallback 1.3 +// Project: https://github.com/bripkens/connect-history-api-fallback#readme +// Definitions by: Douglas Duteil +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { Url } from 'url'; + +import * as core from "express-serve-static-core"; + +declare function historyApiFallback(options?: Options): core.RequestHandler; +declare namespace historyApiFallback {} +export = historyApiFallback; + +interface Options { + disableDotRule?: true; + htmlAcceptHeaders?: string[]; + index?: string; + logger?: typeof console.log; + rewrites?: Rewrite[]; + verbose?: boolean; +} + +interface Context { + match: RegExpMatchArray; + parsedUrl: Url; +} +type RewriteTo = (context: Context) => string; + +interface Rewrite { + from: RegExp; + to: string | RegExp | RewriteTo; +} diff --git a/types/connect-history-api-fallback/tsconfig.json b/types/connect-history-api-fallback/tsconfig.json new file mode 100644 index 0000000000..124c7dc340 --- /dev/null +++ b/types/connect-history-api-fallback/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", + "connect-history-api-fallback-tests.ts" + ] +} diff --git a/types/connect-history-api-fallback/tslint.json b/types/connect-history-api-fallback/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/connect-history-api-fallback/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/connect-mongo/index.d.ts b/types/connect-mongo/index.d.ts index b469d08d00..0b7443f7e1 100644 --- a/types/connect-mongo/index.d.ts +++ b/types/connect-mongo/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kcbanner/connect-mongo // Definitions by: Mizuki Yamamoto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/connect-redis/connect-redis-tests.ts b/types/connect-redis/connect-redis-tests.ts index 3c50074117..11cd583a74 100644 --- a/types/connect-redis/connect-redis-tests.ts +++ b/types/connect-redis/connect-redis-tests.ts @@ -2,3 +2,9 @@ import * as connectRedis from "connect-redis"; import * as session from "express-session"; let RedisStore = connectRedis(session); +const store = new RedisStore({ + host: 'localhost', + port: 6379, + logErrors: error => console.warn(error), + scanCount: 80, +}); diff --git a/types/connect-redis/index.d.ts b/types/connect-redis/index.d.ts index f66314a083..b5084609a2 100644 --- a/types/connect-redis/index.d.ts +++ b/types/connect-redis/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for connect-redis // Project: https://npmjs.com/package/connect-redis // Definitions by: Xavier Stouder +// Albert Kurniawan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -32,6 +33,8 @@ declare module "connect-redis" { prefix?: string; unref?: boolean; serializer?: Serializer | JSON; + logErrors?: boolean | ((error: string) => void); + scanCount?: number; } interface Serializer { stringify: Function; diff --git a/types/consolidate/consolidate-tests.ts b/types/consolidate/consolidate-tests.ts index 06239710c0..c4bbe207c8 100644 --- a/types/consolidate/consolidate-tests.ts +++ b/types/consolidate/consolidate-tests.ts @@ -4,133 +4,136 @@ import cons = require('consolidate'); var path: string = 'test/path'; var options = {user: 'tobi'}; var fn = function(err: Error, html: string) {}; +(async () => { + let res: string; -cons.atpl(path); -cons.atpl(path, options); -cons.atpl(path, options, fn); + res = await cons.atpl(path); + res = await cons.atpl(path, options); + cons.atpl(path, options, fn); -cons.dot(path); -cons.dot(path, options); -cons.dot(path, options, fn); + res = await cons.dot(path); + res = await cons.dot(path, options); + cons.dot(path, options, fn); -cons.dust(path); -cons.dust(path, options); -cons.dust(path, options, fn); + res = await cons.dust(path); + res = await cons.dust(path, options); + cons.dust(path, options, fn); -cons.eco(path); -cons.eco(path, options); -cons.eco(path, options, fn); + res = await cons.eco(path); + res = await cons.eco(path, options); + cons.eco(path, options, fn); -cons.ect(path); -cons.ect(path, options); -cons.ect(path, options, fn); + res = await cons.ect(path); + res = await cons.ect(path, options); + cons.ect(path, options, fn); -cons.ejs(path); -cons.ejs(path, options); -cons.ejs(path, options, fn); + res = await cons.ejs(path); + res = await cons.ejs(path, options); + cons.ejs(path, options, fn); -cons.haml(path); -cons.haml(path, options); -cons.haml(path, options, fn); + res = await cons.haml(path); + res = await cons.haml(path, options); + cons.haml(path, options, fn); -// TODO figure out how to type haml-coffee -// cons['haml-coffee'](path, options, fn); + // TODO figure out how to type haml-coffee + // cons['haml-coffee'](path, options, fn); -cons.hamlet(path); -cons.hamlet(path, options); -cons.hamlet(path, options, fn); + res = await cons.hamlet(path); + res = await cons.hamlet(path, options); + cons.hamlet(path, options, fn); -cons.handlebars(path); -cons.handlebars(path, options); -cons.handlebars(path, options, fn); + res = await cons.handlebars(path); + res = await cons.handlebars(path, options); + cons.handlebars(path, options, fn); -cons.hogan(path); -cons.hogan(path, options); -cons.hogan(path, options, fn); + res = await cons.hogan(path); + res = await cons.hogan(path, options); + cons.hogan(path, options, fn); -cons.htmling(path); -cons.htmling(path, options); -cons.htmling(path, options, fn); + res = await cons.htmling(path); + res = await cons.htmling(path, options); + cons.htmling(path, options, fn); -cons.jade(path); -cons.jade(path, options); -cons.jade(path, options, fn); + res = await cons.jade(path); + res = await cons.jade(path, options); + cons.jade(path, options, fn); -cons.jazz(path); -cons.jazz(path, options); -cons.jazz(path, options, fn); + res = await cons.jazz(path); + res = await cons.jazz(path, options); + cons.jazz(path, options, fn); -cons.jqtpl(path); -cons.jqtpl(path, options); -cons.jqtpl(path, options, fn); + res = await cons.jqtpl(path); + res = await cons.jqtpl(path, options); + cons.jqtpl(path, options, fn); -cons.just(path); -cons.just(path, options); -cons.just(path, options, fn); + res = await cons.just(path); + res = await cons.just(path, options); + cons.just(path, options, fn); -cons.liquid(path); -cons.liquid(path, options); -cons.liquid(path, options, fn); + res = await cons.liquid(path); + res = await cons.liquid(path, options); + cons.liquid(path, options, fn); -cons.liquor(path); -cons.liquor(path, options); -cons.liquor(path, options, fn); + res = await cons.liquor(path); + res = await cons.liquor(path, options); + cons.liquor(path, options, fn); -cons.lodash(path); -cons.lodash(path, options); -cons.lodash(path, options, fn); + res = await cons.lodash(path); + res = await cons.lodash(path, options); + cons.lodash(path, options, fn); -cons.mote(path); -cons.mote(path, options); -cons.mote(path, options, fn); + res = await cons.mote(path); + res = await cons.mote(path, options); + cons.mote(path, options, fn); -cons.mustache(path); -cons.mustache(path, options); -cons.mustache(path, options, fn); + res = await cons.mustache(path); + res = await cons.mustache(path, options); + cons.mustache(path, options, fn); -cons.nunjucks(path); -cons.nunjucks(path, options); -cons.nunjucks(path, options, fn); + res = await cons.nunjucks(path); + res = await cons.nunjucks(path, options); + cons.nunjucks(path, options, fn); -cons.pug(path); -cons.pug(path, options); -cons.pug(path, options, fn); + res = await cons.pug(path); + res = await cons.pug(path, options); + cons.pug(path, options, fn); -cons.qejs(path); -cons.qejs(path, options); -cons.qejs(path, options, fn); + res = await cons.qejs(path); + res = await cons.qejs(path, options); + cons.qejs(path, options, fn); -cons.ractive(path); -cons.ractive(path, options); -cons.ractive(path, options, fn); + res = await cons.ractive(path); + res = await cons.ractive(path, options); + cons.ractive(path, options, fn); -cons.react(path); -cons.react(path, options); -cons.react(path, options, fn); + res = await cons.react(path); + res = await cons.react(path, options); + cons.react(path, options, fn); -cons.swig(path); -cons.swig(path, options); -cons.swig(path, options, fn); + res = await cons.swig(path); + res = await cons.swig(path, options); + cons.swig(path, options, fn); -cons.templayed(path); -cons.templayed(path, options); -cons.templayed(path, options, fn); + res = await cons.templayed(path); + res = await cons.templayed(path, options); + cons.templayed(path, options, fn); -cons.toffee(path); -cons.toffee(path, options); -cons.toffee(path, options, fn); + res = await cons.toffee(path); + res = await cons.toffee(path, options); + cons.toffee(path, options, fn); -cons.underscore(path); -cons.underscore(path, options); -cons.underscore(path, options, fn); + res = await cons.underscore(path); + res = await cons.underscore(path, options); + cons.underscore(path, options, fn); -cons.walrus(path); -cons.walrus(path, options); -cons.walrus(path, options, fn); + res = await cons.walrus(path); + res = await cons.walrus(path, options); + cons.walrus(path, options, fn); -cons.whiskers(path); -cons.whiskers(path, options); -cons.whiskers(path, options, fn); + res = await cons.whiskers(path); + res = await cons.whiskers(path, options); + cons.whiskers(path, options, fn); +})(); /** * Examples from documentation diff --git a/types/consolidate/index.d.ts b/types/consolidate/index.d.ts index 454d13263f..bfe432214f 100644 --- a/types/consolidate/index.d.ts +++ b/types/consolidate/index.d.ts @@ -1,7 +1,8 @@ // Type definitions for consolidate // Project: https://github.com/visionmedia/consolidate.js -// Definitions by: Carlos Ballesteros Velasco , Theo Sherry +// Definitions by: Carlos Ballesteros Velasco , Theo Sherry , Nicolas Henry // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // Imported from: https://github.com/soywiz/typescript-node-definitions/consolidate.d.ts @@ -61,15 +62,15 @@ interface Consolidate { } interface RendererInterface { - render(path: String, fn: (err: Error, html: String) => any): any; + render(path: string, fn: (err: Error, html: string) => any): any; - render(path: String, options: { cache?: boolean, [otherOptions: string]: any }, fn: (err: Error, html: String) => any): any; + render(path: string, options: { cache?: boolean, [otherOptions: string]: any }, fn: (err: Error, html: string) => any): any; - render(path: String, options?: { cache?: boolean, [otherOptions: string]: any }): Promise; + render(path: string, options?: { cache?: boolean, [otherOptions: string]: any }): Promise; - (path: String, fn: (err: Error, html: String) => any): any; + (path: string, fn: (err: Error, html: string) => any): any; - (path: String, options: { cache?: boolean, [otherOptions: string]: any }, fn: (err: Error, html: String) => any): any; + (path: string, options: { cache?: boolean, [otherOptions: string]: any }, fn: (err: Error, html: string) => any): any; - (path: String, options?: { cache?: boolean, [otherOptions: string]: any }): Promise; + (path: string, options?: { cache?: boolean, [otherOptions: string]: any }): Promise; } diff --git a/types/consolidate/tsconfig.json b/types/consolidate/tsconfig.json index a7ae476c88..c03c07a3a9 100644 --- a/types/consolidate/tsconfig.json +++ b/types/consolidate/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "module": "commonjs", + "target": "es6", "lib": [ "es6" ], @@ -19,4 +20,4 @@ "index.d.ts", "consolidate-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/content-type/content-type-tests.ts b/types/content-type/content-type-tests.ts index f173a1efbb..0705d440c1 100644 --- a/types/content-type/content-type-tests.ts +++ b/types/content-type/content-type-tests.ts @@ -1,19 +1,18 @@ import contentType = require('content-type'); import express = require('express'); -var obj = contentType.parse('image/svg+xml; charset=utf-8'); +let obj = contentType.parse('image/svg+xml; charset=utf-8'); console.log(obj.type); // => 'image/svg+xml' console.log(obj.parameters.charset); // => 'utf-8' - -var req: express.Request; +let req: express.Request; obj = contentType.parse(req); -var res: express.Response; +let res: express.Response; obj = contentType.parse(res); -var str: string = contentType.format({type: 'image/svg+xml'}); +let str: string = contentType.format({type: 'image/svg+xml'}); -var media: contentType.MediaType; +let media: contentType.MediaType; contentType.format(media); diff --git a/types/content-type/index.d.ts b/types/content-type/index.d.ts index 3dd39182f4..ec60de446f 100644 --- a/types/content-type/index.d.ts +++ b/types/content-type/index.d.ts @@ -1,16 +1,16 @@ -// Type definitions for content-type v1.0.1 +// Type definitions for content-type 1.1 // Project: https://www.npmjs.com/package/content-type // Definitions by: Hiroki Horiuchi // Definitions: https://github.com/borisyankov/DefinitelyTyped +import * as express from 'express'; + declare var ct: ct.StaticFunctions; export = ct; declare namespace ct { interface StaticFunctions { - parse(string: string): MediaType; - parse(req: { headers: any; }): MediaType; - parse(res: { getHeader(key: string): string; }): MediaType; + parse(input: express.Request | express.Response | string): MediaType; format(obj: MediaType): string; } diff --git a/types/content-type/tslint.json b/types/content-type/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/content-type/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/convict/convict-tests.ts b/types/convict/convict-tests.ts index a61c27bdad..daa07c6875 100644 --- a/types/convict/convict-tests.ts +++ b/types/convict/convict-tests.ts @@ -1,48 +1,41 @@ - -/// - import convict = require('convict'); import validator = require('validator'); // define a schema // straight from the convict tests -const format : convict.Format = { +const format: convict.Format = { name: 'float-percent', - validate: function(val) { + validate(val) { if (val !== 0 && (!val || val > 1 || val < 0)) { throw new Error('must be a float between 0 and 1, inclusive'); } }, - coerce: function(val) { - return +( val); + coerce(val) { + return parseFloat(val); } }; - - - convict.addFormat(format); convict.addFormats({ - prime: { - validate: function(val) { - function isPrime(n: number) { - if (n <= 1) return false; // zero and one are not prime - for (var i=2; i*i <= n; i++) { - if (n % i === 0) return false; - } - return true; - } - if (!isPrime(val)) throw new Error('must be a prime number'); - }, - coerce: function(val) { - return parseInt(val, 10); + prime: { + validate(val) { + function isPrime(n: number) { + if (n <= 1) return false; // zero and one are not prime + for (let i = 2; i * i <= n; i++) { + if (n % i === 0) return false; } + return true; } - }); + if (!isPrime(val)) throw new Error('must be a prime number'); + }, + coerce(val) { + return parseInt(val, 10); + } + } +}); - -var conf = convict({ +let conf = convict({ env: { doc: 'The applicaton environment.', format: ['production', 'development', 'test'], @@ -65,7 +58,11 @@ var conf = convict({ }, key: { doc: "API key", - format: (val: string) => validator.isUUID(val), + format: (val: string) => { + if (!validator.isUUID(val)) { + throw new Error('must be a valid UUID'); + } + }, default: '01527E56-8431-11E4-AF91-47B661C210CA' }, db: { @@ -81,7 +78,13 @@ var conf = convict({ default: 0, env: 'PORT', arg: 'port', - } + }, + password: { + doc: 'The database password.', + default: 'secret', + format: String, + sensitive: true, + }, }, primeNumber: { format: 'prime', @@ -91,22 +94,32 @@ var conf = convict({ format: 'float-percent', default: 0.5 }, - }); - // load environment dependent configuration -var env = conf.get('env'); -var dbip = conf.get('db.ip'); +let env = conf.get('env'); +let dbip = conf.get('db.ip'); conf.loadFile('./config/' + env + '.json'); conf.loadFile(['./configs/always.json', './configs/sometimes.json']); // perform validation conf.validate({ strict: true }); +conf.validate({ allowed: 'strict' }); +conf.validate({ allowed: 'warn' }); -var port: number = conf.default('port'); +// Chaining + +conf + .loadFile(['./configs/always.json', './configs/sometimes.json']) + .loadFile('./config/' + env + '.json') + .load({ jsonKey: 'jsonValue' }) + .set('key', 'value') + .validate({ allowed: 'warn' }) + .toString(); + +let port: number = conf.default('port'); if (conf.has('key')) { conf.set('the.awesome', true); @@ -117,6 +130,7 @@ if (conf.has('key')) { }); } +conf.get(); conf.getSchema(); conf.getProperties(); conf.getSchemaString(); diff --git a/types/convict/index.d.ts b/types/convict/index.d.ts index 981bc8148b..183d91ed91 100644 --- a/types/convict/index.d.ts +++ b/types/convict/index.d.ts @@ -1,15 +1,30 @@ -// Type definitions for node-convict v0.6.0 +// Type definitions for convict 4.0 // Project: https://github.com/mozilla/node-convict // Definitions by: Wim Looman +// Vesa Poikajärvi +// Eli Young // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - declare namespace convict { + type ValidationMethod = 'strict' | 'warn'; + + interface ValidateOptions { + /** + * If set to warn, any properties specified in config files that are not declared in + * the schema will print a warning. This is the default behavior. If set to strict, + * any properties specified in config files that are not declared in the schema will + * throw errors. This is to ensure that the schema and the config files are in sync. + */ + allowed?: ValidationMethod; + + /** @deprecated use allowed instead */ + strict?: boolean; + } interface Format { name?: string; - validate?: (val: any) => void; - coerce?: (val: any) => any; + validate?(val: any): void; + coerce?(val: any): any; } interface Schema { @@ -20,28 +35,62 @@ declare namespace convict { * From the implementation: * * format can be a: - * - predefine type, as seen below + * - predefined type, as seen below * - an array of enumerated values, e.g. ["production", "development", "testing"] * - built-in JavaScript type, i.e. Object, Array, String, Number, Boolean - * - or if omitted, the Object.prototype.toString.call of the default value + * - function that performs validation and throws an Error on failure * - * The docs also state that any function that validates is ok too + * If omitted, format will be set to the value of Object.prototype.toString.call + * for the default value */ - format?: string | Array | Function; + format?: string | any[] | ((val: any) => void); env?: string; arg?: string; + sensitive?: boolean; }; } interface Config { - get(name: string): any; + /** + * @returns the current value of the name property. name can use dot + * notation to reference nested values + */ + get(name?: string): any; + /** + * @returns the default value of the name property. name can use dot + * notation to reference nested values + */ default(name: string): any; + /** + * @returns true if the property name is defined, or false otherwise + */ has(name: string): boolean; - set(name: string, value: any): void; - load(conf: Object): void; - loadFile(file: string): void; - loadFile(files: string[]): void; - validate(options?: { strict?: boolean }): void; + /** + * Sets the value of name to value. name can use dot notation to reference + * nested values, e.g. "database.port". If objects in the chain don't yet + * exist, they will be initialized to empty objects + * + * @return {Config} instance + */ + set(name: string, value: any): Config; + /** + * Loads and merges a JavaScript object into config + * + * @return {Config} instance + */ + load(conf: Object): Config; + /** + * Loads and merges JSON configuration file(s) into config + * + * @return {Config} instance + */ + loadFile(files: string | string[]): Config; + /** + * Validates config against the schema used to initialize it + * + * @param options + */ + validate(options?: ValidateOptions): Config; /** * Exports all the properties (that is the keys and their current values) as a {JSON} {Object} * @returns {Object} A {JSON} compliant {Object} diff --git a/types/convict/tslint.json b/types/convict/tslint.json new file mode 100644 index 0000000000..09f94cd344 --- /dev/null +++ b/types/convict/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // ban-types needs to be disabled to support TypeScript <2.2 + "ban-types": false + } +} diff --git a/types/cookiejs/cookiejs-tests.ts b/types/cookie_js/cookie_js-tests.ts similarity index 82% rename from types/cookiejs/cookiejs-tests.ts rename to types/cookie_js/cookie_js-tests.ts index 43047f4fb6..51a71f4bab 100644 --- a/types/cookiejs/cookiejs-tests.ts +++ b/types/cookie_js/cookie_js-tests.ts @@ -1,8 +1,4 @@ - - -// Based on https://github.com/js-coder/cookie.js/blob/gh-pages/tests/spec.js - -import cookie = require("cookiejs"); +import cookie = require("cookie_js"); cookie.set({a: '1', b: '2', c: '3'}); diff --git a/types/cookiejs/index.d.ts b/types/cookie_js/index.d.ts similarity index 83% rename from types/cookiejs/index.d.ts rename to types/cookie_js/index.d.ts index ad769bcb0e..6e5a0813b6 100644 --- a/types/cookiejs/index.d.ts +++ b/types/cookie_js/index.d.ts @@ -1,13 +1,18 @@ -// Type definitions for cookie.js v1.2.2 +// Type definitions for cookie_js v1.2.2 // Project: https://github.com/florian/cookie.js -// Definitions by: Boltmade +// Definitions by: slawiko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/** - * Shortcut for cookie.get() - */ -export = cookie; -export as namespace cookie; +declare module 'cookie_js' { + export = cookie; +} + +/** + * https://github.com/DefinitelyTyped/DefinitelyTyped/pull/16025#issuecomment-295784660 + */ +declare module 'cookiejs' { + export = cookie; +} declare function cookie(key : string, fallback?: string) : string; declare function cookie(keys : string[], fallback?: string) : string; diff --git a/types/cookie_js/tsconfig.json b/types/cookie_js/tsconfig.json new file mode 100644 index 0000000000..146b1adc25 --- /dev/null +++ b/types/cookie_js/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cookie_js-tests.ts" + ] +} diff --git a/types/copy-paste/copy-paste-tests.ts b/types/copy-paste/copy-paste-tests.ts index 24ab6c5d95..8b17d67ace 100644 --- a/types/copy-paste/copy-paste-tests.ts +++ b/types/copy-paste/copy-paste-tests.ts @@ -1,5 +1,3 @@ -/// - import * as CopyPaste from 'copy-paste'; class TestClass {} diff --git a/types/cordova-plugin-badge/cordova-plugin-badge-tests.ts b/types/cordova-plugin-badge/cordova-plugin-badge-tests.ts new file mode 100644 index 0000000000..453b27d884 --- /dev/null +++ b/types/cordova-plugin-badge/cordova-plugin-badge-tests.ts @@ -0,0 +1,16 @@ +/// + +function callback(badgeOrGranted: number | boolean) { + console.log(badgeOrGranted); +} + +window.cordova.plugins.notification.badge.clear(); +window.cordova.plugins.notification.badge.set(10, callback); +window.cordova.plugins.notification.badge.decrease(2, callback); +window.cordova.plugins.notification.badge.increase(5, callback); +window.cordova.plugins.notification.badge.hasPermission(callback); +window.cordova.plugins.notification.badge.requestPermission(callback); +window.cordova.plugins.notification.badge.get(callback); +window.cordova.plugins.notification.badge.configure({ + autoClear: true +}); diff --git a/types/cordova-plugin-badge/index.d.ts b/types/cordova-plugin-badge/index.d.ts new file mode 100644 index 0000000000..6b4e780d5f --- /dev/null +++ b/types/cordova-plugin-badge/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for cordova-plugin-badge 0.8 +// Project: https://github.com/katzer/cordova-plugin-badge +// Definitions by: Tim Brust +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface CordovaPlugins { + notification: { + badge: CordovaPluginBadge; + }; +} + +interface CordovaPluginBadgeOptions { + autoClear: boolean; +} + +interface CordovaPluginBadge { + clear(callback?: (badge: number) => void, scope?: any): void; + set(badge?: number, callback?: (badge: number) => void, scope?: any): void; + get(callback?: (badge: number) => void, scope?: any): void; + increase(count?: number, callback?: (badge: number) => void, scope?: any): void; + decrease(count?: number, callback?: (badge: number) => void, scope?: any): void; + hasPermission(callback?: (granted: boolean) => void, scope?: any): void; + requestPermission(callback?: (granted: boolean) => void, scope?: any): void; + configure(config: CordovaPluginBadgeOptions): CordovaPluginBadgeOptions; +} diff --git a/types/cordova-plugin-badge/tsconfig.json b/types/cordova-plugin-badge/tsconfig.json new file mode 100644 index 0000000000..5f6a71f137 --- /dev/null +++ b/types/cordova-plugin-badge/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cordova-plugin-badge-tests.ts" + ] +} diff --git a/types/cordova-plugin-badge/tslint.json b/types/cordova-plugin-badge/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cordova-plugin-badge/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts b/types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts index 1c62521293..dbad990b8d 100644 --- a/types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts +++ b/types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts @@ -1,5 +1,29 @@ -window.addEventListener('batterystatus', - (ev: BatteryStatusEvent) => { console.log('Battery level is ' + ev.level); }); +function eventCallBack(ev: BatteryStatusEvent) { + console.log('Battery level is ' + ev.level); +} +window.addEventListener('batterystatus', (ev: BatteryStatusEvent) => { console.log('Battery level is ' + ev.level); }); +window.addEventListener('batterystatus', (ev) => { console.log('Battery level is ' + ev.level); }); +window.addEventListener('batterycritical', (ev) => { console.log('Battery is critical: ' + ev.level); }); +window.addEventListener('batterylow', (ev) => { console.log('Battery is low: ' + ev.level); }); -window.addEventListener('batterycritical', - () => { alert('Battery is critical low!'); }); \ No newline at end of file +window.addEventListener('baterystatus', eventCallBack); +window.addEventListener('batterycritical', eventCallBack); +window.addEventListener('batterylow', eventCallBack); + +window.removeEventListener('batterystatus', eventCallBack); +window.removeEventListener('batterycritical', eventCallBack); +window.removeEventListener('batterylow', eventCallBack); + +window.addEventListener('batterycritical', () => { alert('Battery is critical low!'); }); +window.addEventListener('batterylow', () => { alert('Battery is low!'); }); + +function batteryCriticalCallback() { + alert('Battery is critical low!'); +} + +function batteryLowCallback() { + alert('Battery is critical low!'); +} + +window.addEventListener('batterycritical', batteryCriticalCallback); +window.addEventListener('batterylow', batteryLowCallback); \ No newline at end of file diff --git a/types/cordova-plugin-battery-status/index.d.ts b/types/cordova-plugin-battery-status/index.d.ts index 9baedc8cb0..0cdf729d30 100644 --- a/types/cordova-plugin-battery-status/index.d.ts +++ b/types/cordova-plugin-battery-status/index.d.ts @@ -4,116 +4,28 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // // Copyright (c) Microsoft Open Technologies Inc -// Licensed under the MIT license. +// Licensed under the MIT license. +// TypeScript Version: 2.3 + +interface WindowEventMap { + /** + * batterystatus: event fires when the percentage of battery charge changes by at least 1 percent, or if the device is plugged in or unplugged. + */ + "batterystatus" : BatteryStatusEvent; + /** + * batterycritical: event fires when the percentage of battery charge has reached the critical battery threshold. The value is device-specific. + */ + "batterycritical": BatteryStatusEvent; + /** + * batterylow: event fires when the percentage of battery charge has reached the low battery threshold, device-specific value. + */ + "batterylow": BatteryStatusEvent; +} interface Window { onbatterystatus: (type: BatteryStatusEvent) => void; onbatterycritical: (type: BatteryStatusEvent) => void; onbatterylow: (type: BatteryStatusEvent) => void; - /** - * Adds a listener for an event from the BatteryStatus plugin. - * @param type the event to listen for - * batterystatus: event fires when the percentage of battery charge - * changes by at least 1 percent, or if the device is plugged in or unplugged. - * batterycritical: event fires when the percentage of battery charge has reached - * the critical battery threshold. The value is device-specific. - * batterylow: event fires when the percentage of battery charge has - * reached the low battery threshold, device-specific value. - * @param listener the function that executes when the event fires. The function is - * passed an BatteryStatusEvent object as a parameter. - */ - addEventListener(type: "batterystatus", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; - /** - * Adds a listener for an event from the BatteryStatus plugin. - * @param type the event to listen for - * batterystatus: event fires when the percentage of battery charge - * changes by at least 1 percent, or if the device is plugged in or unplugged. - * batterycritical: event fires when the percentage of battery charge has reached - * the critical battery threshold. The value is device-specific. - * batterylow: event fires when the percentage of battery charge has - * reached the low battery threshold, device-specific value. - * @param listener the function that executes when the event fires. The function is - * passed an BatteryStatusEvent object as a parameter. - */ - addEventListener(type: "batterycritical", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; - /** - * Adds a listener for an event from the BatteryStatus plugin. - * @param type the event to listen for - * batterystatus: event fires when the percentage of battery charge - * changes by at least 1 percent, or if the device is plugged in or unplugged. - * batterycritical: event fires when the percentage of battery charge has reached - * the critical battery threshold. The value is device-specific. - * batterylow: event fires when the percentage of battery charge has - * reached the low battery threshold, device-specific value. - * @param listener the function that executes when the event fires. The function is - * passed an BatteryStatusEvent object as a parameter. - */ - addEventListener(type: "batterylow", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; - /** - * Adds a listener for an event from the BatteryStatus plugin. - * @param type the event to listen for - * batterystatus: event fires when the percentage of battery charge - * changes by at least 1 percent, or if the device is plugged in or unplugged. - * batterycritical: event fires when the percentage of battery charge has reached - * the critical battery threshold. The value is device-specific. - * batterylow: event fires when the percentage of battery charge has - * reached the low battery threshold, device-specific value. - * @param listener the function that executes when the event fires. The function is - * passed an BatteryStatusEvent object as a parameter. - */ - addEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; - /** - * Removes a listener for an event from the BatteryStatus plugin. - * @param type The event to stop listening for. - * batterystatus: event fires when the percentage of battery charge - * changes by at least 1 percent, or if the device is plugged in or unplugged. - * batterycritical: event fires when the percentage of battery charge has reached - * the critical battery threshold. The value is device-specific. - * batterylow: event fires when the percentage of battery charge has - * reached the low battery threshold, device-specific value. - * @param callback the function that executes when the event fires. The function is - * passed an BatteryStatusEvent object as a parameter. - */ - removeEventListener(type: "batterystatus", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; - /** - * Removes a listener for an event from the BatteryStatus plugin. - * @param type The event to stop listening for. - * batterystatus: event fires when the percentage of battery charge - * changes by at least 1 percent, or if the device is plugged in or unplugged. - * batterycritical: event fires when the percentage of battery charge has reached - * the critical battery threshold. The value is device-specific. - * batterylow: event fires when the percentage of battery charge has - * reached the low battery threshold, device-specific value. - * @param callback the function that executes when the event fires. The function is - * passed an BatteryStatusEvent object as a parameter. - */ - removeEventListener(type: "batterycritical", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; - /** - * Removes a listener for an event from the BatteryStatus plugin. - * @param type The event to stop listening for. - * batterystatus: event fires when the percentage of battery charge - * changes by at least 1 percent, or if the device is plugged in or unplugged. - * batterycritical: event fires when the percentage of battery charge has reached - * the critical battery threshold. The value is device-specific. - * batterylow: event fires when the percentage of battery charge has - * reached the low battery threshold, device-specific value. - * @param callback the function that executes when the event fires. The function is - * passed an BatteryStatusEvent object as a parameter. - */ - removeEventListener(type: "batterylow", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; - /** - * Removes a listener for an event from the BatteryStatus plugin. - * @param type The event to stop listening for. - * batterystatus: event fires when the percentage of battery charge - * changes by at least 1 percent, or if the device is plugged in or unplugged. - * batterycritical: event fires when the percentage of battery charge has reached - * the critical battery threshold. The value is device-specific. - * batterylow: event fires when the percentage of battery charge has - * reached the low battery threshold, device-specific value. - * @param callback the function that executes when the event fires. The function is - * passed an BatteryStatusEvent object as a parameter. - */ - removeEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; } /** Object, that passed into battery event listener */ diff --git a/types/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts b/types/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts index cef288c921..1497eec386 100644 --- a/types/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts +++ b/types/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts @@ -1,13 +1,34 @@ // InAppBrowser plugin -//---------------------------------------------------------------------- +// ---------------------------------------------------------------------- // signature of window.open() added by InAppBrowser plugin // is similar to native window.open signature, so the compiler can's // select proper overload, but we cast result to InAppBrowser manually. -var iab = window.open('google.com', '_self'); +const iab = window.open('google.com', '_self'); + iab.addEventListener('loadstart', (ev: InAppBrowserEvent) => { console.log('Start opening ' + ev.url); }); +iab.addEventListener('loadstart', (ev) => { console.log('loadstart' + ev.url); }); +iab.addEventListener('loadstop', (ev) => { console.log('loadstop' + ev.code); }); +iab.addEventListener('loaderror', (ev) => { console.log('loaderror' + ev.code); }); +iab.addEventListener('exit', (ev) => { console.log('exit' + ev.code); }); + +function inAppBrowserCallBack(ev: InAppBrowserEvent) { + console.log('InAppBrowser callback ' + ev.url); +} + +iab.addEventListener('loadstart', inAppBrowserCallBack); +iab.addEventListener('loadstart', inAppBrowserCallBack); +iab.addEventListener('loadstop', inAppBrowserCallBack); +iab.addEventListener('loaderror', inAppBrowserCallBack); +iab.addEventListener('exit', inAppBrowserCallBack); + +iab.removeEventListener('loadstart', inAppBrowserCallBack); +iab.removeEventListener('loadstop', inAppBrowserCallBack); +iab.removeEventListener('loaderror', inAppBrowserCallBack); +iab.removeEventListener('exit', inAppBrowserCallBack); + iab.show(); iab.executeScript( { code: "console.log('Injected script in action')" }, - ()=> { console.log('Script is executed'); } -); \ No newline at end of file + () => { console.log('Script is executed'); } +); diff --git a/types/cordova-plugin-inappbrowser/index.d.ts b/types/cordova-plugin-inappbrowser/index.d.ts index ea3d3adba8..b266fbab44 100644 --- a/types/cordova-plugin-inappbrowser/index.d.ts +++ b/types/cordova-plugin-inappbrowser/index.d.ts @@ -1,39 +1,14 @@ -// Type definitions for Apache Cordova InAppBrowser plugin +// Type definitions for Apache Cordova InAppBrowser plugin 1.7 // Project: https://github.com/apache/cordova-plugin-inappbrowser // Definitions by: Microsoft Open Technologies Inc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// +// // Copyright (c) Microsoft Open Technologies Inc // Licensed under the MIT license. +// TypeScript Version: 2.3 +type channel = "loadstart" | "loadstop" | "loaderror" | "exit"; interface Window { - /** - * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. - * @param url The URL to load. - * @param target The target in which to load the URL, an optional parameter that defaults to _self. - * @param options Options for the InAppBrowser. Optional, defaulting to: location=yes. - * The options string must not contain any blank space, and each feature's - * name/value pairs must be separated by a comma. Feature names are case insensitive. - */ - open(url: string, target?: "_self", options?: string): InAppBrowser; - /** - * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. - * @param url The URL to load. - * @param target The target in which to load the URL, an optional parameter that defaults to _self. - * @param options Options for the InAppBrowser. Optional, defaulting to: location=yes. - * The options string must not contain any blank space, and each feature's - * name/value pairs must be separated by a comma. Feature names are case insensitive. - */ - open(url: string, target?: "_blank", options?: string): InAppBrowser; - /** - * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. - * @param url The URL to load. - * @param target The target in which to load the URL, an optional parameter that defaults to _self. - * @param options Options for the InAppBrowser. Optional, defaulting to: location=yes. - * The options string must not contain any blank space, and each feature's - * name/value pairs must be separated by a comma. Feature names are case insensitive. - */ - open(url: string, target?: "_system", options?: string): InAppBrowser; /** * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. * @param url The URL to load. @@ -50,66 +25,21 @@ interface Window { * NOTE: The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs. */ interface InAppBrowser extends Window { - onloadstart: (type: InAppBrowserEvent) => void; - onloadstop: (type: InAppBrowserEvent) => void; - onloaderror: (type: InAppBrowserEvent) => void; - onexit: (type: InAppBrowserEvent) => void; + onloadstart(type: InAppBrowserEvent): void; + onloadstop(type: InAppBrowserEvent): void; + onloaderror(type: InAppBrowserEvent): void; + onexit(type: InAppBrowserEvent): void; // addEventListener overloads /** * Adds a listener for an event from the InAppBrowser. - * @param type the event to listen for - * loadstart: event fires when the InAppBrowser starts to load a URL. + * @param type loadstart: event fires when the InAppBrowser starts to load a URL. * loadstop: event fires when the InAppBrowser finishes loading a URL. * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. * exit: event fires when the InAppBrowser window is closed. * @param callback the function that executes when the event fires. The function is * passed an InAppBrowserEvent object as a parameter. */ - addEventListener(type: "loadstart", callback: (event: InAppBrowserEvent) => void): void; - /** - * Adds a listener for an event from the InAppBrowser. - * @param type the event to listen for - * loadstart: event fires when the InAppBrowser starts to load a URL. - * loadstop: event fires when the InAppBrowser finishes loading a URL. - * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. - * exit: event fires when the InAppBrowser window is closed. - * @param callback the function that executes when the event fires. The function is - * passed an InAppBrowserEvent object as a parameter. - */ - addEventListener(type: "loadstop", callback: (event: InAppBrowserEvent) => void): void; - /** - * Adds a listener for an event from the InAppBrowser. - * @param type the event to listen for - * loadstart: event fires when the InAppBrowser starts to load a URL. - * loadstop: event fires when the InAppBrowser finishes loading a URL. - * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. - * exit: event fires when the InAppBrowser window is closed. - * @param callback the function that executes when the event fires. The function is - * passed an InAppBrowserEvent object as a parameter. - */ - addEventListener(type: "loaderror", callback: (event: InAppBrowserEvent) => void): void; - /** - * Adds a listener for an event from the InAppBrowser. - * @param type the event to listen for - * loadstart: event fires when the InAppBrowser starts to load a URL. - * loadstop: event fires when the InAppBrowser finishes loading a URL. - * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. - * exit: event fires when the InAppBrowser window is closed. - * @param callback the function that executes when the event fires. The function is - * passed an InAppBrowserEvent object as a parameter. - */ - addEventListener(type: "exit", callback: (event: InAppBrowserEvent) => void): void; - /** - * Adds a listener for an event from the InAppBrowser. - * @param type the event to listen for - * loadstart: event fires when the InAppBrowser starts to load a URL. - * loadstop: event fires when the InAppBrowser finishes loading a URL. - * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. - * exit: event fires when the InAppBrowser window is closed. - * @param callback the function that executes when the event fires. The function is - * passed an Event object as a parameter. - */ - addEventListener(type: string, callback: (event: Event) => void): void; + addEventListener(type: channel, callback: (event: InAppBrowserEvent) => void): void; // removeEventListener overloads /** * Removes a listener for an event from the InAppBrowser. @@ -121,51 +51,7 @@ interface InAppBrowser extends Window { * @param callback the function that executes when the event fires. The function is * passed an InAppBrowserEvent object as a parameter. */ - removeEventListener(type: "loadstart", callback: (event: InAppBrowserEvent) => void): void; - /** - * Removes a listener for an event from the InAppBrowser. - * @param type The event to stop listening for. - * loadstart: event fires when the InAppBrowser starts to load a URL. - * loadstop: event fires when the InAppBrowser finishes loading a URL. - * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. - * exit: event fires when the InAppBrowser window is closed. - * @param callback the function that executes when the event fires. The function is - * passed an InAppBrowserEvent object as a parameter. - */ - removeEventListener(type: "loadstop", callback: (event: InAppBrowserEvent) => void): void; - /** - * Removes a listener for an event from the InAppBrowser. - * @param type The event to stop listening for. - * loadstart: event fires when the InAppBrowser starts to load a URL. - * loadstop: event fires when the InAppBrowser finishes loading a URL. - * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. - * exit: event fires when the InAppBrowser window is closed. - * @param callback the function that executes when the event fires. The function is - * passed an InAppBrowserEvent object as a parameter. - */ - removeEventListener(type: "loaderror", callback: (event: InAppBrowserEvent) => void): void; - /** - * Removes a listener for an event from the InAppBrowser. - * @param type The event to stop listening for. - * loadstart: event fires when the InAppBrowser starts to load a URL. - * loadstop: event fires when the InAppBrowser finishes loading a URL. - * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. - * exit: event fires when the InAppBrowser window is closed. - * @param callback the function that executes when the event fires. The function is - * passed an InAppBrowserEvent object as a parameter. - */ - removeEventListener(type: "exit", callback: (event: InAppBrowserEvent) => void): void; - /** - * Removes a listener for an event from the InAppBrowser. - * @param type The event to stop listening for. - * loadstart: event fires when the InAppBrowser starts to load a URL. - * loadstop: event fires when the InAppBrowser finishes loading a URL. - * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. - * exit: event fires when the InAppBrowser window is closed. - * @param callback the function that executes when the event fires. The function is - * passed an Event object as a parameter. - */ - removeEventListener(type: string, callback: (event: Event) => void): void; + removeEventListener(type: channel, callback: (event: InAppBrowserEvent) => void): void; /** Closes the InAppBrowser window. */ close(): void; /** Hides the InAppBrowser window. Calling this has no effect if the InAppBrowser was already hidden. */ @@ -184,29 +70,13 @@ interface InAppBrowser extends Window { * For multi-line scripts, this is the return value of the last statement, * or the last expression evaluated. */ - executeScript(script: { code: string }, callback: (result: any) => void): void; - /** - * Injects JavaScript code into the InAppBrowser window. - * @param script Details of the script to run, specifying either a file or code key. - * @param callback The function that executes after the JavaScript code is injected. - * If the injected script is of type code, the callback executes with - * a single parameter, which is the return value of the script, wrapped in an Array. - * For multi-line scripts, this is the return value of the last statement, - * or the last expression evaluated. - */ - executeScript(script: { file: string }, callback: (result: any) => void): void; + executeScript(script: { code: string } | { file: string }, callback: (result: any) => void): void; /** * Injects CSS into the InAppBrowser window. * @param css Details of the script to run, specifying either a file or code key. * @param callback The function that executes after the CSS is injected. */ - insertCSS(css: { code: string }, callback: () => void): void; - /** - * Injects CSS into the InAppBrowser window. - * @param css Details of the script to run, specifying either a file or code key. - * @param callback The function that executes after the CSS is injected. - */ - insertCSS(css: { file: string }, callback: () => void): void; + insertCSS(css: { code: string } | { file: string }, callback: () => void): void; } interface InAppBrowserEvent extends Event { @@ -218,4 +88,8 @@ interface InAppBrowserEvent extends Event { code: number; /** the error message, only in the case of loaderror. */ message: string; -} \ No newline at end of file +} + +interface Cordova { + InAppBrowser: InAppBrowser; +} diff --git a/types/cordova-plugin-inappbrowser/tslint.json b/types/cordova-plugin-inappbrowser/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cordova-plugin-inappbrowser/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts b/types/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts index 62e44e3e77..ad8fa420a9 100644 --- a/types/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts +++ b/types/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts @@ -60,3 +60,4 @@ window.plugins.socialsharing.shareViaFacebook("Optional message, may be ignored window.plugins.socialsharing.share("Optional message", "Optional title", ["www/manual.pdf", "https://www.google.nl/images/srpr/logo4w.png"], "http://www.myurl.com"); window.plugins.socialsharing.saveToPhotoAlbum(["https://www.google.nl/images/srpr/logo4w.png", "www/image.gif"], function () { console.log("share ok") }, function (msg) { alert("error: " + msg) }); +window.plugins.socialsharing.shareWithOptions({"message":"sharethis","subject":"thesubject","files":["",""],"url":"https: //www.website.com/foo/#bar?a=b","chooserTitle":"Pickanapp"}, function () { console.log("share ok") }, function (msg) { alert("error: " + msg) }); diff --git a/types/cordova-plugin-x-socialsharing/index.d.ts b/types/cordova-plugin-x-socialsharing/index.d.ts index e68a072ee2..4560dd3f1a 100644 --- a/types/cordova-plugin-x-socialsharing/index.d.ts +++ b/types/cordova-plugin-x-socialsharing/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for SocialSharing-PhoneGap-Plugin v5.0.12 +// Type definitions for SocialSharing-PhoneGap-Plugin v5.1.8 // Project: https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin -// Definitions by: Markus Wagner +// Definitions by: Markus Wagner , Larry Bahr // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface Window { @@ -18,6 +18,7 @@ declare module SocialSharingPlugin { subject?: string; files?: string | string[]; url?: string; + chooserTitle?: string; } interface ShareResult { diff --git a/types/core-js/core-js-tests.ts b/types/core-js/core-js-tests.ts index 3f585db33e..325ff56fc1 100644 --- a/types/core-js/core-js-tests.ts +++ b/types/core-js/core-js-tests.ts @@ -243,15 +243,15 @@ promiseLikeOfPoint = promiseLikeOfPoint.then(p => promiseLikeOfPoint); promiseLikeOfPoint = promiseLikeOfPoint.then(p => point, e => point); promiseLikeOfPoint = promiseLikeOfPoint.then(p => promiseLikeOfPoint, e => point); promiseLikeOfPoint = promiseLikeOfPoint.then(p => point, e => promiseLikeOfPoint); -promiseLikeOfPoint = promiseLikeOfPoint.then(p => point, e => { }); -promiseLikeOfPoint = promiseLikeOfPoint.then(p => promiseLikeOfPoint, e => { }); +promiseLikeOfPoint = promiseLikeOfPoint.then(p => point, e => { throw e; }); +promiseLikeOfPoint = promiseLikeOfPoint.then(p => promiseLikeOfPoint, e => { throw e; }); promiseLikeOfPoint3D = promiseLikeOfPoint.then(p => point3d); promiseLikeOfPoint3D = promiseLikeOfPoint.then(p => promiseLikeOfPoint3D); promiseLikeOfPoint3D = promiseLikeOfPoint.then(p => point3d, e => point3d); promiseLikeOfPoint3D = promiseLikeOfPoint.then(p => promiseLikeOfPoint3D, e => point3d); promiseLikeOfPoint3D = promiseLikeOfPoint.then(p => point3d, e => promiseLikeOfPoint3D); -promiseLikeOfPoint3D = promiseLikeOfPoint.then(p => point3d, e => { }); -promiseLikeOfPoint3D = promiseLikeOfPoint.then(p => promiseLikeOfPoint3D, e => { }); +promiseLikeOfPoint3D = promiseLikeOfPoint.then(p => point3d, e => { throw e; }); +promiseLikeOfPoint3D = promiseLikeOfPoint.then(p => promiseLikeOfPoint3D, e => { throw e; }); promiseOfPoint.then((point: Point) => { }); promiseOfPoint = promiseOfPoint.then(); promiseOfPoint = promiseOfPoint.then(p => point); @@ -262,9 +262,9 @@ promiseOfPoint = promiseOfPoint.then(p => promiseOfPoint, e => point); promiseOfPoint = promiseOfPoint.then(p => promiseLikeOfPoint, e => point); promiseOfPoint = promiseOfPoint.then(p => point, e => promiseOfPoint); promiseOfPoint = promiseOfPoint.then(p => point, e => promiseLikeOfPoint); -promiseOfPoint = promiseOfPoint.then(p => point, e => { }); -promiseOfPoint = promiseOfPoint.then(p => promiseOfPoint, e => { }); -promiseOfPoint = promiseOfPoint.then(p => promiseLikeOfPoint, e => { }); +promiseOfPoint = promiseOfPoint.then(p => point, e => { throw e; }); +promiseOfPoint = promiseOfPoint.then(p => promiseOfPoint, e => { throw e; }); +promiseOfPoint = promiseOfPoint.then(p => promiseLikeOfPoint, e => { throw e; }); promiseOfPoint3D = promiseOfPoint.then(p => point3d); promiseOfPoint3D = promiseOfPoint.then(p => promiseOfPoint3D); promiseOfPoint3D = promiseOfPoint.then(p => promiseLikeOfPoint3D); @@ -273,16 +273,16 @@ promiseOfPoint3D = promiseOfPoint.then(p => promiseOfPoint3D, e => point3d); promiseOfPoint3D = promiseOfPoint.then(p => promiseLikeOfPoint3D, e => point3d); promiseOfPoint3D = promiseOfPoint.then(p => point3d, e => promiseOfPoint3D); promiseOfPoint3D = promiseOfPoint.then(p => point3d, e => promiseLikeOfPoint3D); -promiseOfPoint3D = promiseOfPoint.then(p => point3d, e => { }); -promiseOfPoint3D = promiseOfPoint.then(p => promiseOfPoint3D, e => { }); -promiseOfPoint3D = promiseOfPoint.then(p => promiseLikeOfPoint3D, e => { }); +promiseOfPoint3D = promiseOfPoint.then(p => point3d, e => { throw e; }); +promiseOfPoint3D = promiseOfPoint.then(p => promiseOfPoint3D, e => { throw e; }); +promiseOfPoint3D = promiseOfPoint.then(p => promiseLikeOfPoint3D, e => { throw e; }); promiseOfPoint = promiseOfPoint.catch(e => point); promiseOfPoint = promiseOfPoint.catch(e => promiseOfPoint); promiseOfPoint = promiseOfPoint.catch(e => promiseLikeOfPoint); -promiseOfPoint = promiseOfPoint.catch(e => { }); -promiseOfPoint3D = promiseOfPoint.catch(e => point3d); -promiseOfPoint3D = promiseOfPoint.catch(e => promiseOfPoint3D); -promiseOfPoint3D = promiseOfPoint.catch(e => promiseLikeOfPoint3D); +promiseOfPoint = promiseOfPoint.catch(e => { throw e; }); +promiseOfPoint3D = promiseOfPoint.then(p2d => ({ ...p2d, z: 0 })).catch(e => point3d); +promiseOfPoint3D = promiseOfPoint.then(p2d => ({ ...p2d, z: 0 })).catch(e => promiseOfPoint3D); +promiseOfPoint3D = promiseOfPoint.then(p2d => ({ ...p2d, z: 0 })).catch(e => promiseLikeOfPoint3D); promiseOfPoint = new Promise((resolve, reject) => resolve(point)); promiseOfPoint = new Promise((resolve, reject) => resolve(promiseOfPoint)); promiseOfPoint = new Promise((resolve, reject) => resolve(promiseLikeOfPoint)); diff --git a/types/core-js/index.d.ts b/types/core-js/index.d.ts index 9593bc7a76..0a8f506df4 100644 --- a/types/core-js/index.d.ts +++ b/types/core-js/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for core-js 0.9 // Project: https://github.com/zloirock/core-js/ -// Definitions by: Ron Buckton +// Definitions by: Ron Buckton , Michel Felipe // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -50,7 +50,10 @@ declare function $for(iterable: Iterable): $for; // ECMAScript 7 // Modules: es7.array.includes, es7.string.at, es7.string.pad-start, es7.string.pad-end, // es7.object.to-array, es7.object.get-own-property-descriptors, es7.regexp.escape, -// es7.map.to-json, and es7.set.to-json +// es7.map.to-json, es7.set.to-json, es7.reflect.define-metadata, es7.reflect.delete-metadata +// es7.reflect.get-metadata, es7.reflect.get-metadata-keys, es7.reflect.get-own-metadata, +// es7.reflect.get-own-metadata-keys, es7.reflect.has-metadata, es7.reflect.has-own-metadata +// es7.reflect.metadata // ############################################################################################# interface String { @@ -473,6 +476,202 @@ declare namespace core { function preventExtensions(target: any): boolean; function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; function setPrototypeOf(target: any, proto: any): boolean; + /** + * Define a unique metadata entry on the target. + * @param metadataKey A key used to store and retrieve metadata. + * @param metadataValue A value that contains attached metadata. + * @param target The target object on which to define metadata. + * @example + * + * ### Example + * + * ```typescript + * class Example { + * } + * + * // constructor + * Reflect.defineMetadata("custom:annotation", options, Example); + * + * // decorator factory as metadata-producing annotation. + * function MyAnnotation(options): ClassDecorator { + * return target => Reflect.defineMetadata("custom:annotation", options, target); + * } + * ``` + */ + function defineMetadata(metadataKey: any, metadataValue: any, target: Object, targetKey?: string | symbol): void; + /** + * Deletes the metadata entry from the target object with the provided key. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @returns `true` if the metadata entry was found and deleted; otherwise, false. + * @example + * + * ### Example + * + * ```typescript + * class Example { + * } + * + * // constructor + * result = Reflect.deleteMetadata("custom:annotation", Example); + * ``` + */ + function deleteMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): boolean; + /** + * Gets the metadata value for the provided metadata key on the target object or its prototype chain. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @returns The metadata value for the metadata key if found; otherwise, `undefined`. + * @example + * + * ### Example + * + * ```typescript + * class Example { + * } + * + * // constructor + * result = Reflect.getMetadata("custom:annotation", Example); + * ``` + */ + function getMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): any; + /** + * Gets the metadata keys defined on the target object or its prototype chain. + * @param target The target object on which the metadata is defined. + * @returns An array of unique metadata keys. + * @example + * + * ### Example + * + * ```typescript + * class Example { + * } + * + * // constructor + * result = Reflect.getMetadataKeys(Example); + * ``` + */ + function getMetadataKeys(target: Object, targetKey?: string | symbol): any[]; + /** + * Gets the metadata value for the provided metadata key on the target object. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @returns The metadata value for the metadata key if found; otherwise, `undefined`. + * @example + * + * ### Example + * + * ```typescript + * class Example { + * } + * + * // constructor + * result = Reflect.getOwnMetadata("custom:annotation", Example); + * ``` + */ + function getOwnMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): any; + + /** + * Gets the unique metadata keys defined on the target object. + * @param target The target object on which the metadata is defined. + * @returns An array of unique metadata keys. + * @example + * + * ### Example + * + * ```typescript + * class Example { + * } + * + * // constructor + * result = Reflect.getOwnMetadataKeys(Example); + * ``` + */ + function getOwnMetadataKeys(target: Object, targetKey?: string | symbol): any[]; + /** + * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. + * @example + * + * ### Example + * + * ```typescript + * class Example { + * } + * + * // constructor + * result = Reflect.hasMetadata("custom:annotation", Example); + * ``` + */ + function hasMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): boolean; + /** + * Gets a value indicating whether the target object has the provided metadata key defined. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. + * @example + * + * ### Example + * + * ```typescript + * + * class Example { + * } + * + * // constructor + * result = Reflect.hasOwnMetadata("custom:annotation", Example); + * ``` + */ + function hasOwnMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): boolean; + /** + * A default metadata decorator factory that can be used on a class, class member, or parameter. + * @param metadataKey The key for the metadata entry. + * @param metadataValue The value for the metadata entry. + * @returns A decorator function. + * @remarks + * If `metadataKey` is already defined for the target and target key, the + * metadataValue for that key will be overwritten. + * @example + * + * ### Example + * + * ```typescript + * // constructor + * @Reflect.metadata(key, value) + * class Example { + * } + * + * // property (on constructor, TypeScript only) + * class Example { + * @Reflect.metadata(key, value) + * static staticProperty; + * } + * + * // property (on prototype, TypeScript only) + * class Example { + * @Reflect.metadata(key, value) + * property; + * } + * + * // method (on constructor) + * class Example { + * @Reflect.metadata(key, value) + * static staticMethod() { } + * } + * + * // method (on prototype) + * class Example { + * @Reflect.metadata(key, value) + * method() { } + * } + * ``` + */ + function metadata(metadataKey: any, metadataValue: any): { + (target: Function): void; + (target: Object, targetKey: string | symbol): void; + }; } const Object: { @@ -1991,6 +2190,42 @@ declare module "core-js/library/fn/reflect/set-prototype-of" { const setPrototypeOf: typeof core.Reflect.setPrototypeOf; export = setPrototypeOf; } +declare module "core-js/library/fn/reflect/es7/define-metadata" { + const defineMetadata: typeof core.Reflect.defineMetadata; + export = defineMetadata; +} +declare module "core-js/library/fn/reflect/es7/delete-metadata" { + const deleteMetadata: typeof core.Reflect.deleteMetadata; + export = deleteMetadata; +} +declare module "core-js/library/fn/reflect/es7/get-metadata" { + const getMetadata: typeof core.Reflect.getMetadata; + export = getMetadata; +} +declare module "core-js/library/fn/reflect/es7/get-metadata-keys" { + const getMetadataKeys: typeof core.Reflect.getMetadataKeys; + export = getMetadataKeys; +} +declare module "core-js/library/fn/reflect/es7/get-own-metadata" { + const getOwnMetadata: typeof core.Reflect.getOwnMetadata; + export = getOwnMetadata; +} +declare module "core-js/library/fn/reflect/es7/get-own-metadata-keys'" { + const getOwnMetadataKeys: typeof core.Reflect.getOwnMetadataKeys; + export = getOwnMetadataKeys; +} +declare module "core-js/library/fn/reflect/es7/has-metadata'" { + const hasMetadata: typeof core.Reflect.hasMetadata; + export = hasMetadata; +} +declare module "core-js/library/fn/reflect/es7/has-own-metadata'" { + const hasOwnMetadata: typeof core.Reflect.hasOwnMetadata; + export = hasOwnMetadata; +} +declare module "core-js/library/fn/reflect/es7/metadata'" { + const metadata: typeof core.Reflect.metadata; + export = metadata; +} declare module "core-js/library/fn/regexp" { const RegExp: typeof core.RegExp; export = RegExp; diff --git a/types/cote/cote-tests.ts b/types/cote/cote-tests.ts new file mode 100644 index 0000000000..8fd52a73a4 --- /dev/null +++ b/types/cote/cote-tests.ts @@ -0,0 +1,451 @@ +import * as cote from 'cote'; + +/** + * Examples from https://github.com/dashersw/cote. Note some differences, such + * as stricter request shape and Promises everywhere. + */ +class Readme { + requester() { + const randomRequester = new cote.Requester({ + name: 'Random Requester', + namespace: 'rnd', + key: 'a certain key', + requests: ['randomRequest'] + }); + + const req = { + type: 'randomRequest', + payload: { + val: Math.floor(Math.random() * 10) + } + }; + + randomRequester.send(req) + .then(console.log) + .catch(console.log) + .then(() => process.exit()); + } + + requesterCallback() { + const randomRequester = new cote.Requester({ + name: 'Random Requester', + namespace: 'rnd', + key: 'a certain key', + requests: ['randomRequest'] + }); + + const req = { + type: 'randomRequest', + payload: { + val: Math.floor(Math.random() * 10) + } + }; + + randomRequester.send(req, res => { + console.log(res); + process.exit(); + }); + } + + responder() { + const randomResponder = new cote.Responder({ + name: 'Random Responder', + namespace: 'rnd', + key: 'a certain key', + respondsTo: ['randomRequest'] + }); + + interface RandomRequest { + type: 'randomRequest'; + payload: { val: number }; + } + + randomResponder.on('randomRequest', (req: RandomRequest) => { + const answer = Math.floor(Math.random() * 10); + console.log('request', req.payload.val, 'answering with', answer); + return Promise.resolve(answer); + }); + } + + responderCallback() { + const randomResponder = new cote.Responder({ + name: 'Random Responder', + namespace: 'rnd', + key: 'a certain key', + respondsTo: ['randomRequest'] + }); + + interface RandomRequest { + type: 'randomRequest'; + payload: { val: number }; + } + + randomResponder.on('randomRequest', (req: RandomRequest, callback: (answer: number) => void) => { + const answer = Math.floor(Math.random() * 10); + console.log('request', req.payload.val, 'answering with', answer); + callback(answer); + }); + } + + mongooseResponder() { + const UserModel = require('UserModel'); // a promise-based model API + + const userResponder = new cote.Responder({ name: 'User Responder' }); + + interface Find { + type: 'find'; + payload: { username: string }; + } + + userResponder.on('find', (req: Find) => UserModel.findOne(req.payload)); + } + + mongooseRequester() { + const userRequester = new cote.Requester({ name: 'User Requester' }); + + userRequester + .send({ type: 'find', payload: { username: 'foo' } }) + .then(user => console.log(user)) + .then(() => process.exit()); + } + + publisher() { + const randomPublisher = new cote.Publisher({ + name: 'Random Publisher', + namespace: 'rnd', + key: 'a certain key', + broadcasts: ['randomUpdate'] + }); + + setInterval(() => { + const event = { + type: 'randomUpdate', + payload: { + val: Math.floor(Math.random() * 1000) + } + }; + + console.log('emitting', event); + + randomPublisher.publish('randomUpdate', event); + }, 3000); + } + + subscriber() { + const randomSubscriber = new cote.Subscriber({ + name: 'Random Subscriber', + namespace: 'rnd', + key: 'a certain key', + subscribesTo: ['randomUpdate'] + }); + + randomSubscriber.on('randomUpdate', (req) => { + console.log('notified of ', req); + }); + } + + sockend() { + const app = require('http').createServer(handler); + const io = require('socket.io').listen(app); + const fs = require('fs'); + + app.listen(process.argv[2] || 5555); + + function handler(req: any, res: any) { + fs.readFile(__dirname + '/index.html', (err: Error, data: Buffer) => { + if (err) { + res.writeHead(500); + return res.end('Error loading index.html'); + } + + res.writeHead(200); + res.end(data); + }); + } + + const sockend = new cote.Sockend(io, { + name: 'Sockend', + key: 'a certain key' + }); + } + + keys() { + const purchaseRequester = new cote.Requester({ + name: 'Purchase Requester', + key: 'purchase' + }); + + const inventoryRequester = new cote.Requester({ + name: 'Inventory Requester', + key: 'inventory' + }); + } + + namespacesFront() { + const responder = new cote.Responder({ + name: 'Conversion Sockend Responder', + namespace: 'conversion' + }); + + const conversionRequester = new cote.Requester({ + name: 'Conversion Requester', + key: 'conversion backend' + }); + + responder.on('convert', (req: any) => { + return conversionRequester.send(req); // proxy the request + }); + } + + namespacesBack() { + const responder = new cote.Responder({ + name: 'Conversion Responder', + key: 'conversion backend' + }); + + const rates: { [key: string]: number } = { + usd_eur: 0.91, + eur_usd: 1.10 + }; + + interface Convert { + type: 'convert'; + payload: { + amount: number, + from: string, + to: string + }; + } + + responder.on('convert', (req: Convert) => { + const { payload } = req; + return Promise.resolve(payload.amount * rates[`${payload.from}_${payload.to}`]); + }); + } + + multicast() { + const cote = require('cote')({ multicast: '239.1.11.111' }); + } + + multicastComponent() { + const req = new cote.Requester({ name: 'req' }, { multicast: '239.1.11.111' }); + } + + broadcast() { + const cote = require('cote')({ broadcast: '255.255.255.255' }); + } + + broadcastComponent() { + const req = new cote.Requester({ name: 'req' }, { broadcast: '255.255.255.255' }); + } +} + +/** + * Fixes for initial errors and shortcomings. + * @see https://github.com/makepost/DefinitelyTyped/projects/1 + */ +class InitialObservations { + event() { + const event: cote.Event = { type: 'someEvent' }; + } + + eventEmitter() { + const quitter = new cote.Requester({ name: 'Quitter' }); + quitter.onAny(() => process.exit); + + const indecisive = new cote.Responder({ name: 'Indecisive' }); + const callback = (x: T) => Promise.resolve(x); + indecisive.on('choice', callback); + indecisive.off('choice', callback); + + const techno = new cote.Publisher({ name: 'Techno' }); + techno.removeAllListeners(); + + const village = new cote.Subscriber({ name: 'Village' }); + const doHelp = () => { }; + village.many('wolf', 2, doHelp); + village.emit('wolf'); + village.emit('wolf'); + const emptyArray = village.listenersAny(); + village.emit('wolf'); // no reaction + + const eternity = new cote.Sockend(null as any, { name: 'Eternity' }); + const handler = () => { + if (Math.random() === Number.MIN_VALUE) { + console.log('It happened.'); + eternity.offAny(handler); + } + }; + eternity.addListener('request', handler); + + const monitor = new cote.Monitor({ + name: 'Monitor', + port: 8025 + }); + monitor.setMaxListeners(1); + monitor.once('foobar', () => { + monitor.removeAllListeners(); + monitor.once('foobar', () => { + console.log('Not a warning.'); + }); + }); + } + + advertisement() { + // Incorrect: + // const requester = new cote.Requester({ + // name: 'Requester', + // respondsTo: ['foo'] + // }) + + // Incorrect: + // const responder = new cote.Responder({ + // name: 'Responder', + // subscribesTo: ['bar'] + // }) + + // Incorrect: + // const publisher = new cote.Publisher({ + // name: 'Publisher', + // requests: ['baz'] + // }) + + // Incorrect: + // const subscriber = new cote.Subscriber({ + // name: 'Subscriber', + // broadcasts: ['qux'] + // }) + } + + discovery() { + new cote.Responder({ name: 'LocalUnlessForwarded' }, { address: '127.0.0.1' }); + + new cote.Publisher({ name: 'PassionateGreeter' }, { helloInterval: 100 }); + + new cote.Requester({ name: 'Optimist' }, { + checkInterval: 1e5, + nodeTimeout: 1e6 + }); + + new cote.Subscriber({ name: 'Hachiko' }, { masterTimeout: 9 * 365 * 24 * 60 * 60 * 1000 }); + + new cote.Monitor({ name: 'HelloService', port: 2345 }, { + monitor: false, + statusLogsEnabled: false + }); + + new cote.Monitor({ name: 'OfflineLogger', port: 2346 }, { + disableScreen: true, + helloLogsEnabled: false, + log: true + }); + + new cote.Responder({ name: 'HearsNoneAbove' }, { ignoreProcess: true }); + + new cote.Requester({ name: 'OwnStatusReporter' }, { statusInterval: 100 }); + } + + callbackApi() { + // Added to Readme above, near respective Promise examples. + } + + timeBalancedRequester() { + const randomRequester = new cote.TimeBalancedRequester({ + name: 'Random Requester', + namespace: 'rnd', + key: 'a certain key', + requests: ['randomRequest'] + }); + + const req = { + type: 'randomRequest', + payload: { + val: Math.floor(Math.random() * 10) + } + }; + + randomRequester.send(req) + .then(console.log) + .catch(console.log) + .then(() => process.exit()); + } + + pendingBalancedRequester() { + const randomRequester = new cote.PendingBalancedRequester({ + name: 'Random Requester', + namespace: 'rnd', + key: 'a certain key', + requests: ['randomRequest'] + }); + + const req = { + type: 'randomRequest', + payload: { + val: Math.floor(Math.random() * 10) + } + }; + + randomRequester.send(req) + .then(console.log) + .catch(console.log) + .then(() => process.exit()); + } + + lifecycle() { + const key = Math.random().toString(); + + const requester = new cote.Requester({ + name: `${key} requester`, + key + }); + + const responder = new cote.Responder({ + name: `${key} responder`, + key + }); + + responder.on('cote:added', ({ advertisement, type }) => { + console.log({ + advertisement: { + broadcasts: advertisement.broadcasts, + key: advertisement.key, + name: advertisement.name, + namespace: advertisement.namespace, + requests: advertisement.requests, + respondsTo: advertisement.respondsTo, + subscribesTo: advertisement.subscribesTo + }, + type + }); + + requester.close(); + }); + + responder.on('cote:removed', ({ advertisement, type }) => { + console.assert(advertisement.name === `${key} requester`); + + console.log({ + advertisement: { + broadcasts: advertisement.broadcasts, + key: advertisement.key, + name: advertisement.name, + namespace: advertisement.namespace, + requests: advertisement.requests, + respondsTo: advertisement.respondsTo, + subscribesTo: advertisement.subscribesTo + }, + type + }); + + responder.close(); + }); + } + + monitorAdvertisement() { + const name = 'Service'; + const port = undefined; + + new cote.Monitor({ name, port }); + new cote.Monitor({ name }); + } +} diff --git a/types/cote/index.d.ts b/types/cote/index.d.ts new file mode 100644 index 0000000000..f6c60c54a2 --- /dev/null +++ b/types/cote/index.d.ts @@ -0,0 +1,399 @@ +// Type definitions for cote 0.14 +// Project: https://github.com/dashersw/cote#readme +// Definitions by: makepost +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { EventEmitter2 } from "eventemitter2"; +import * as SocketIO from "socket.io"; +import { Stream } from "stream"; +import { Server } from "http"; + +export abstract class Component extends EventEmitter2 { + constructor( + /** + * Configuration which controls the data being advertised for auto-discovery. + */ + advertisement: Advertisement, + + /** + * Controls the network-layer configuration and environments for components. + */ + discoveryOptions?: DiscoveryOptions + ); + + /** + * Closes socket and stops discovery. + */ + close(): void; +} + +export class Requester extends Component { + constructor( + /** + * Configuration which controls the data being advertised for auto-discovery. + */ + advertisement: RequesterAdvertisement, + + /** + * Controls the network-layer configuration and environments for components. + */ + discoveryOptions?: DiscoveryOptions + ); + + /** + * Queues a request until a Responder is available, and once so, delivers + * the request. Requests are dispatched to Responders in a round-robin way. + * + * @param event Request. + */ + send(event: T): Promise; + + /** + * Queues a request until a Responder is available, and once so, delivers + * the request. Requests are dispatched to Responders in a round-robin way. + * + * @param event Request. + * @param callback Function to execute after getting a result. + */ + send(event: T, callback: (result: any) => void): void; +} + +/** + * Configuration which controls the data being advertised for auto-discovery. + */ +export interface RequesterAdvertisement extends Advertisement { + /** + * Request types that a Requester can send. + */ + requests?: string[]; +} + +export class Responder extends Component { + constructor( + /** + * Configuration which controls the data being advertised for auto-discovery. + */ + advertisement: ResponderAdvertisement, + + /** + * Controls the network-layer configuration and environments for components. + */ + discoveryOptions?: DiscoveryOptions + ); + + /** + * Listens to internal `cote:added` and `cote:removed` events. + * + * @param listener Callback. + */ + on( + type: 'cote:added' | 'cote:removed', + listener: (event: Status) => void + ): this; + + /** + * Responds to certain requests from a Requester. + * + * @param type Type. May be wildcarded or namespaced like in EventEmitter2. + * @param listener Callback. Should return a result. + */ + on( + type: string | string[], + listener: ( + ((event: T, callback: (result: any) => void) => void) | + ((event: T) => Promise) + ) + ): this; +} + +/** + * Configuration which controls the data being advertised for auto-discovery. + */ +export interface ResponderAdvertisement extends Advertisement { + /** + * Request types that a Responder can listen to. + */ + respondsTo?: string[]; +} + +export class Publisher extends Component { + constructor( + /** + * Configuration which controls the data being advertised for auto-discovery. + */ + advertisement: PublisherAdvertisement, + + /** + * Controls the network-layer configuration and environments for components. + */ + discoveryOptions?: DiscoveryOptions + ); + + /** + * Publishes an event to all Subscribers. Does not wait for results. If + * there are no Subscribers listening, the event is lost. + * + * @param type EventEmitter-compatible type. + * @param event Request. + */ + publish( + type: string, + event: T + ): void; +} + +/** + * Configuration which controls the data being advertised for auto-discovery. + */ +export interface PublisherAdvertisement extends Advertisement { + /** + * Event types that a Publisher can publish. + */ + broadcasts?: string[]; +} + +export class Subscriber extends Component { + constructor( + /** + * Configuration which controls the data being advertised for auto-discovery. + */ + advertisement: SubscriberAdvertisement, + + /** + * Controls the network-layer configuration and environments for components. + */ + discoveryOptions?: DiscoveryOptions + ); + + /** + * Subscribes to events emitted from a Publisher. + * + * @param type Type. May be wildcarded or namespaced like in EventEmitter2. + * @param listener Callback. Returns nothing. + */ + on( + type: string | string[], + listener: (event: T) => void + ): this; +} + +/** + * Configuration which controls the data being advertised for auto-discovery. + */ +export interface SubscriberAdvertisement extends Advertisement { + /** + * Event types that a Subscriber can listen to. + */ + subscribesTo?: string[]; +} + +export class Sockend extends Component { + /** + * Exposes APIs directly to front-end. Make sure to use namespaces. + */ + constructor( + io: SocketIO.Server, + + /** + * Configuration which controls the data being advertised for auto-discovery. + */ + advertisement: SockendAdvertisement, + + /** + * Controls the network-layer configuration and environments for components. + */ + discoveryOptions?: DiscoveryOptions + ); +} + +/** + * Configuration which controls the data being advertised for auto-discovery. + */ +export interface SockendAdvertisement extends ResponderAdvertisement, PublisherAdvertisement { } + +export class Monitor extends Component { + constructor( + /** + * Configuration which controls the data being advertised for auto-discovery. + */ + advertisement: MonitorAdvertisement, + + /** + * Controls the network-layer configuration and environments for components. + */ + discoveryOptions?: DiscoveryOptions, + + stream?: Stream + ) +} + +/** + * Configuration which controls the data being advertised for auto-discovery. + */ +export interface MonitorAdvertisement extends Advertisement { + /** + * Port for Monitor to listen on. By default will start searching from 8000. + */ + port?: number | string; +} + +/** + * Displays the cote ecosystem running in your environment in a nice graph. + * + * @param port Open in browser to see network graph in action. + */ +export function MonitoringTool(port: number): { + monitor: Monitor, + server: Server +}; + +/** + * Takes average response times of each connected socket and balances requests + * among them accordingly. + */ +export class TimeBalancedRequester extends Requester { + /** + * How long to wait for response before neglecting its calculation time, + * in milliseconds. + */ + CALCULATION_TIMEOUT: number; + + /** + * How many requests to make before exploring a random server for response + * time improvement. + */ + MAX_REQUESTS: number; + + /** + * How often to check whether a response arrived. Readonly because used in + * constructor right after being set. + */ + readonly SAMPLE_INTERVAL: number; +} + +/** + * Keeps track of open, pending requests for each known Responder. Each new + * request goes to the Responder with the minimum open requests. + */ +export class PendingBalancedRequester extends Requester { } + +/** + * Event is nothing but object with `type`. + */ +export interface Event { + type: string; +} + +/** + * Internal `cote:added` and `cote:removed` events. + */ +export interface Status extends Event { + advertisement: StatusAdvertisement; +} + +/** + * Advertisement in internal `cote:added` and `cote:removed` events. + */ +export interface StatusAdvertisement extends + RequesterAdvertisement, + ResponderAdvertisement, + PublisherAdvertisement, + SubscriberAdvertisement { } + +/** + * Configuration which controls the data being advertised for auto-discovery. + */ +export interface Advertisement { + name: string; + + /** + * Maps to a socket.io namespace. Shields a service from the rest of the + * system. Components with different namespaces won't recognize each other + * and try to communicate. + */ + namespace?: string; + + /** + * Tunes the performance by grouping certain components. Two components + * with exact same `environment`s with different `key`s wouldn't be able + * to communicate. Think of it as `${environment}_${key}`. + */ + key?: string; +} + +/** + * Controls the network-layer configuration and environments for components. + */ +export interface DiscoveryOptions { + /** + * Multicast address if using multicast. + */ + multicast?: string; + + /** + * Broadcast address if using broadcast. + */ + broadcast?: string; + + /** + * Address to bind to. + */ + address?: string; + + /** + * How often to broadcast a hello packet in milliseconds. + */ + helloInterval?: number; + + /** + * How often to to check for missing nodes in milliseconds. + */ + checkInterval?: number; + + /** + * Consider a node dead if not seen in this many milliseconds. + */ + nodeTimeout?: number; + + /** + * Consider a master node dead if not seen in this many milliseconds. + */ + masterTimeout?: number; + + /** + * Skips key equality checks when logging. + */ + monitor?: boolean; + + /** + * If false, disables `helloLogsEnabled` and `statusLogsEnabled` no matter + * what value they have, and also own hello log. + */ + log?: boolean; + + /** + * Notifies when another service goes online. + */ + helloLogsEnabled?: boolean; + + /** + * Notifies when another service goes online or offline. If false, disables + * `helloLogsEnabled` as well. + */ + statusLogsEnabled?: boolean; + + /** + * Ignores messages from other services within the same process. + */ + ignoreProcess?: boolean; + + /** + * Prevents Monitor from drawing. + */ + disableScreen?: boolean; + + /** + * Milliseconds between emissions of own status for monitoring. + */ + statusInterval?: number; +} diff --git a/types/cote/package.json b/types/cote/package.json new file mode 100644 index 0000000000..ce4365fc69 --- /dev/null +++ b/types/cote/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "eventemitter2": "^4.1.0" + } +} diff --git a/types/cote/tsconfig.json b/types/cote/tsconfig.json new file mode 100644 index 0000000000..2f8460f53d --- /dev/null +++ b/types/cote/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", + "cote-tests.ts" + ] +} diff --git a/types/cote/tslint.json b/types/cote/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cote/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/country-list/country-list-tests.ts b/types/country-list/country-list-tests.ts new file mode 100644 index 0000000000..d96fe630e2 --- /dev/null +++ b/types/country-list/country-list-tests.ts @@ -0,0 +1,16 @@ +import countries from 'country-list'; +const Countries = countries(); + +Countries.getCode('Barbados'); // BB + +Countries.getCodes(); + +Countries.getCodeList(); + +Countries.getData(); + +Countries.getName('BB'); // Barbados + +Countries.getNameList(); + +Countries.getNames(); diff --git a/types/country-list/index.d.ts b/types/country-list/index.d.ts new file mode 100644 index 0000000000..6c1747ff2a --- /dev/null +++ b/types/country-list/index.d.ts @@ -0,0 +1,41 @@ +// Type definitions for country-list 1.1 +// Project: https://github.com/fannarsh/country-list +// Definitions by: Kyle Roach +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export default function Countries(): { + /** + * Expects a two-digit country code. Returns the name for that country. If not found, it returns undefined. + */ + getName(code: string): string | undefined; + + /** + * Expects the English country name. Returns the code for that country. If not found, it returns undefined. + */ + getCode(name: string): string | undefined; + + /** + * Returns an array of all country names. + */ + getNames(): string[]; + + /** + * Returns an array of all country codes. + */ + getCodes(): string[]; + + /** + * Returns a key-value object of all countries using the name as key. + */ + getNameList(): {[name: string]: string}; + + /** + * Returns a key-value object of all countries using the code as key. + */ + getCodeList(): {[code: string]: string}; + + /** + * Returns an array of all country information, in the same format as it gets imported. + */ + getData(): Array<{ code: string, name: string }>; +}; diff --git a/types/country-list/tsconfig.json b/types/country-list/tsconfig.json new file mode 100644 index 0000000000..dce3c4a287 --- /dev/null +++ b/types/country-list/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", + "country-list-tests.ts" + ] +} diff --git a/types/country-list/tslint.json b/types/country-list/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/country-list/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/country-select-js/country-select-js-tests.ts b/types/country-select-js/country-select-js-tests.ts new file mode 100644 index 0000000000..a3bf640b69 --- /dev/null +++ b/types/country-select-js/country-select-js-tests.ts @@ -0,0 +1,7 @@ +$('#country').countrySelect(); + +$('#country').countrySelect({ + defaultCountry: 'gb' +}); + +$('#country').countrySelect('destroy'); diff --git a/types/country-select-js/index.d.ts b/types/country-select-js/index.d.ts new file mode 100644 index 0000000000..8ed28a224c --- /dev/null +++ b/types/country-select-js/index.d.ts @@ -0,0 +1,58 @@ +// Type definitions for country-select-js 1.0 +// Project: https://github.com/mrmarkfrench/country-select-js +// Definitions by: Humberto Rocha +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace CountrySelectJs { + interface Options { + /** + * Set the default country by it's country code. Otherwise it will just be + * the first country in the list. + */ + defaultCountry?: string; + + /** + * Display only the countries you specify. Takes an array of country codes. + */ + onlyCountries?: string[]; + + /** + * Specify the countries to appear at the top of the list. Defaults to + * ["us", "gb"] + */ + preferredCountries?: string[]; + + /** + * Set the dropdown's width to be the same as the input. This is + * automatically enabled for small screens. + */ + responsiveDropdown?: boolean; + } + + interface CountryData { + name: string; + iso2: string; + } +} + +interface JQuery { + /** + * Remove the plugin from the input, and unbind any event listeners. + */ + countrySelect(method: 'destroy'): void; + + /** + * Get the country data for the currently selected flag. + */ + countrySelect(method: 'getSelectedCountryData'): CountrySelectJs.CountryData; + + countrySelect(method: string, value: string): void; + + /** + * initialize the plugin with optional options. + */ + countrySelect(options?: CountrySelectJs.Options): JQueryDeferred; +} diff --git a/types/country-select-js/tsconfig.json b/types/country-select-js/tsconfig.json new file mode 100644 index 0000000000..749b1b3af1 --- /dev/null +++ b/types/country-select-js/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "country-select-js-tests.ts" + ] +} diff --git a/types/country-select-js/tslint.json b/types/country-select-js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/country-select-js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/create-error/create-error-tests.ts b/types/create-error/create-error-tests.ts index 51cdab4381..7a635b8dc6 100644 --- a/types/create-error/create-error-tests.ts +++ b/types/create-error/create-error-tests.ts @@ -1,9 +1,9 @@ - -/// /// +declare function equal(a: T, b: T): void; +declare function deepEqual(a: T, b: T): void; + import * as createError from 'create-error'; -import * as assert from 'assert'; // Example taken from https://github.com/tgriesser/create-error/blob/0.3.1/README.md#use @@ -23,14 +23,12 @@ sub instanceof SubCustomError // true sub instanceof MyCustomError // true sub instanceof Error // true -assert.deepEqual(sub.messages, []) // true -assert.equal(sub.someVal, 'value') // true +deepEqual(sub.messages, []) // true +equal(sub.someVal, 'value') // true // Taken and adapted from https://github.com/tgriesser/create-error/blob/0.3.1/test/index.js -var equal = assert.equal; -var deepEqual = assert.deepEqual; describe('create-error', function() { diff --git a/types/cropperjs/index.d.ts b/types/cropperjs/index.d.ts index a82fa718f9..ca957ccc3f 100644 --- a/types/cropperjs/index.d.ts +++ b/types/cropperjs/index.d.ts @@ -86,6 +86,15 @@ declare namespace cropperjs { */ checkCrossOrigin?: boolean; /** + * Check the current image's Exif Orientation information. + * More exactly, read the Orientation value for rotating or flipping the image, and then override the Orientation + * value with 1 (the default value) to avoid some issues (1, 2) on iOS devices. + * Requires to set both the rotatable and scalable options to true at the same time. + * Note: Don't trust this all the time as some JPG images have incorrect (not standard) Orientation values. + * @default true + */ + checkOrientation?: boolean; + /** * Show the black modal above the image and under the crop box. * @default true */ diff --git a/types/cryptiles/cryptiles-tests.ts b/types/cryptiles/cryptiles-tests.ts new file mode 100644 index 0000000000..b4d6eb1340 --- /dev/null +++ b/types/cryptiles/cryptiles-tests.ts @@ -0,0 +1,5 @@ +import * as cryptiles from "cryptiles"; + +cryptiles.randomString(0); // $ExpectType string +cryptiles.randomDigits(0); // $ExpectType string +cryptiles.fixedTimeComparison("", ""); // $ExpectTpe boolean diff --git a/types/cryptiles/index.d.ts b/types/cryptiles/index.d.ts new file mode 100644 index 0000000000..31a7972a58 --- /dev/null +++ b/types/cryptiles/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for cryptiles 3.1 +// Project: https://github.com/hapijs/cryptiles +// Definitions by: Alex Wendland +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string. + */ +export function randomString(size: number): string; + +/** + * Returns a cryptographically strong pseudo-random data string consisting of only numerical digits (0-9). + * Takes a size argument for the length of the string. + */ +export function randomDigits(size: number): string; + +/** + * Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). + * Returns true if the strings match, false if they differ. + */ +export function fixedTimeComparison(a: string, b: string): boolean; diff --git a/types/cryptiles/tsconfig.json b/types/cryptiles/tsconfig.json new file mode 100644 index 0000000000..2515c735a4 --- /dev/null +++ b/types/cryptiles/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", + "cryptiles-tests.ts" + ] +} diff --git a/types/cryptiles/tslint.json b/types/cryptiles/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cryptiles/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/css-modules-require-hook/css-modules-require-hook-tests.ts b/types/css-modules-require-hook/css-modules-require-hook-tests.ts index 93da1326bd..9a7325ab0c 100644 --- a/types/css-modules-require-hook/css-modules-require-hook-tests.ts +++ b/types/css-modules-require-hook/css-modules-require-hook-tests.ts @@ -1,7 +1,4 @@ -/// - import * as hook from 'css-modules-require-hook'; -import * as path from 'path'; // // https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#usage @@ -170,4 +167,4 @@ hook({ mode: 'pure' }); // https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#rootdir-string // -hook({ rootDir: path.resolve('./my-folder') }); +hook({ rootDir: './my-folder' }); diff --git a/types/csvtojson/csvtojson-tests.ts b/types/csvtojson/csvtojson-tests.ts index a4ee3d76d4..5b58451fac 100644 --- a/types/csvtojson/csvtojson-tests.ts +++ b/types/csvtojson/csvtojson-tests.ts @@ -9,6 +9,18 @@ const csvStr: string = `1,2,3 4,5,6 7,8,9`; +// Factory instantiation with options. +csv({ + noheader: true, + constructResult: false, + delimiter: 'auto', + checkType: false, + trim: true, + workerNum: 2, + checkColumn: true, + maxRowLength: 65535 +}); + // event emitter version using factory function csv({ noheader: true }) .fromString(csvStr) diff --git a/types/csvtojson/index.d.ts b/types/csvtojson/index.d.ts index 87e8286867..832a4acb6a 100644 --- a/types/csvtojson/index.d.ts +++ b/types/csvtojson/index.d.ts @@ -17,6 +17,12 @@ declare namespace csvtojson { * Converter options */ interface ConverterOptions { + /** + * Whether to construct final json object in memory which will be populated in "end_parsed" + * event. Set to false if deal with huge csv data. default: true. + */ + constructResult?: boolean; + /** * Delimiter used for seperating columns. Use "auto" if delimiter is unknown in advance, * in this case, delimiter will be auto-detected (by best attempt). Use an array to give diff --git a/types/cypress/cypress-tests.ts b/types/cypress/cypress-tests.ts new file mode 100644 index 0000000000..ac987e757a --- /dev/null +++ b/types/cypress/cypress-tests.ts @@ -0,0 +1,38 @@ +// Samples taken from the cypress kitchen sink example (https://github.com/cypress-io/cypress-example-kitchensink) +cy.title().should('include', 'Kitchen Sink'); + +cy + .get('.query-list') + .contains('bananas').should('have.class', 'third') + .contains(/^b\w+/).should('have.class', 'third') + .get('.query-list') + .contains('apples').should('have.class', 'first') + .get('#querying') + .contains('ul', 'oranges').should('have.class', 'query-list') + .get('.query-button') + .contains('Save Form').should('have.class', 'btn'); + +cy + .get('form') + .find('input') + .then($input => $input.click()); + +cy + .wrap({ sum: (a: number, b: number, c: number) => a + b + c }) + .invoke('sum', 2, 4, 6); + +cy + .get('ul>li') + .each(($el, index, $list) => { + // $el is wrapped jquery element + if ($el.someMethod() === "something") { + // wrap this element so we can + // use cypress commands on it + cy.wrap($el).click(); + } else { + // do something else + } + }) + .spread((x , y, z) => { + x + y + z; + }); diff --git a/types/cypress/index.d.ts b/types/cypress/index.d.ts new file mode 100644 index 0000000000..d3fe95c92b --- /dev/null +++ b/types/cypress/index.d.ts @@ -0,0 +1,544 @@ +// Type definitions for cypress 0.1 +// Project: https://cypress.io +// Definitions by: Gert Hengeveld +// Mike Woudenberg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace Cypress { + type FileContents = string | any[] | object; + type HistoryDirection = "back" | "forward"; + type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "OPTIONS" | "HEAD" | "TRACE" | "CONNECT"; + type RequestBody = string | object; + type ViewportOrientation = "portrait" | "landscape"; + + interface Core { + /** + * @see https://on.cypress.io/api/config + */ + config(): object; + config(key: string): any; + config(key: string, value: any): void; + config(Object: object): void; + + /** + * @see https://on.cypress.io/api/env + */ + env(): object; + env(key: string): any; + env(key: string, value: any): void; + env(Object: object): void; + + /** + * @see https://on.cypress.io/api/commands + */ + addChildCommand(name: string, fn: (...args: any[]) => void): void; + addDualCommand(name: string, fn: (...args: any[]) => void): void; + addParentCommand(name: string, fn: (...args: any[]) => void): void; + + _: any; + $: any; + minimatch: any; + moment: any; + Blob: any; + Promise: any; + Log: any; + + /** + * @see https://on.cypress.io/api/cookies + */ + Cookies: { + debug(enabled: boolean, options?: DebugOptions): void; + preserveOnce(...names: string[]): void; + defaults(options: CookieDefaults): void; + }; + + /** + * @see https://on.cypress.io/api/dom + */ + Dom: { + isHidden(element: object): boolean; + }; + + /** + * @see https://on.cypress.io/api/api-server + */ + Server: { + defaults(options: ServerOptions): void; + }; + } + + interface Chainable { + /** + * @see https://on.cypress.io/api/and + */ + and(chainers: string, value?: any): Chainable; + and(chainers: string, method: string, value: any): Chainable; + and(fn: (currentSubject?: any) => void): Chainable; + + /** + * @see https://on.cypress.io/api/as + */ + as(alias: string): Chainable; + + /** + * @see https://on.cypress.io/api/blur + */ + blur(options?: BlurOptions): Chainable; + + /** + * @see https://on.cypress.io/api/check + */ + check(options?: CheckOptions): Chainable; + check(value: string|string[]): Chainable; // no options + + /** + * @see https://on.cypress.io/api/children + */ + children(options?: LoggableTimeoutable): Chainable; + children(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/clear + */ + clear(options?: ClearOptions): Chainable; + + /** + * @see https://on.cypress.io/api/clearcookie + */ + clearCookie(name: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/clearcookies + */ + clearCookies(options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/clearlocalstorage + */ + clearLocalStorage(key?: string): Chainable; + clearLocalStorage(re: RegExp): Chainable; + + /** + * @see https://on.cypress.io/api/click + */ + click(options?: ClickOptions): Chainable; + click(position: string, options?: ClickOptions): Chainable; + click(x: number, y: number, options?: ClickOptions): Chainable; + + /** + * @see https://on.cypress.io/api/closest + */ + closest(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/contains + */ + contains(text: string, options?: LoggableTimeoutable): Chainable; + contains(num: number|RegExp): Chainable; + contains(selector: string, text: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/dblclick + */ + dblclick(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/debug + */ + debug(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/document + */ + document(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/each + */ + each(fn: (element?: any, index?: number, $list?: any) => void): Chainable; + + /** + * @see https://on.cypress.io/api/end + */ + end(): Chainable; + + /** + * @see https://on.cypress.io/api/eq + */ + eq(index: number, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/exec + */ + exec(command: string, options?: ExecOptions): Chainable; + + /** + * @see https://on.cypress.io/api/filter + */ + filter(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/find + */ + find(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/first + */ + first(options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/fixture + */ + fixture(path: string, options?: Timeoutable): Chainable; // no log? + fixture(path: string, encoding: string, options?: Timeoutable): Chainable; // no log? + + /** + * @see https://on.cypress.io/api/focus + */ + focus(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/focused + */ + focused(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/get + */ + get(selector: string, options?: LoggableTimeoutable): Chainable; + get(alias: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/getcookie + */ + getCookie(name: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/getcookies + */ + getCookies(options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/go + */ + go(direction: HistoryDirection|number, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/hash + */ + hash(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/invoke + */ + invoke(functionName: string, ...args: any[]): Chainable; + + /** + * @see https://on.cypress.io/api/its + */ + its(propertyName: string): Chainable; + + /** + * @see https://on.cypress.io/api/last + */ + last(options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/location + */ + location(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/log + */ + log(message: string, args: any): Chainable; + + /** + * @see https://on.cypress.io/api/next + */ + next(options?: LoggableTimeoutable): Chainable; + next(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/not + */ + not(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/parent + */ + parent(options?: LoggableTimeoutable): Chainable; + parent(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/parents + */ + parents(options?: LoggableTimeoutable): Chainable; + parents(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/pause + */ + pause(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/prev + */ + prev(options?: LoggableTimeoutable): Chainable; + prev(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/readfile + */ + readFile(filePath: string, options?: Timeoutable): Chainable; // no log? + readFile(filePath: string, encoding: string, options?: Timeoutable): Chainable; // no log? + + /** + * @see https://on.cypress.io/api/reload + */ + reload(options?: LoggableTimeoutable): Chainable; + reload(forceReload: boolean): Chainable; // no options? + + /** + * @see https://on.cypress.io/api/request + */ + request(url: string, body?: RequestBody): Chainable; + request(method: HttpMethod, url: string, body?: RequestBody): Chainable; + request(options: RequestOptions): Chainable; + + /** + * @see https://on.cypress.io/api/root + */ + root(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/route + */ + route(url: string, response?: any): Chainable; + route(method: string, url: string, response?: any): Chainable; + route(fn: () => RouteOptions | RouteOptions): Chainable; + + /** + * @see https://on.cypress.io/api/screenshot + */ + screenshot(options?: LoggableTimeoutable): Chainable; + screenshot(fileName: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/select + */ + select(text: string|string[], options?: SelectOptions): Chainable; + select(value: string|string[], options?: SelectOptions): Chainable; + + /** + * @see https://on.cypress.io/api/server + */ + server(options?: ServerOptions): Chainable; + + /** + * @see https://on.cypress.io/api/setcookie + */ + setCookie(name: string, value: string, options?: SetCookieOptions): Chainable; + + /** + * @see https://on.cypress.io/api/should + */ + should(chainers: string, value?: any): Chainable; + should(chainers: string, method: string, value: any): Chainable; + should(fn: (currentSubject?: any) => void): Chainable; + + /** + * @see https://on.cypress.io/api/siblings + */ + siblings(options?: LoggableTimeoutable): Chainable; + siblings(selector: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/spread + */ + spread(fn: (...args: any[]) => any): Chainable; + + /** + * @see https://on.cypress.io/api/submit + */ + submit(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/then + */ + then(fn: (currentSubject: any) => any): Chainable; + + /** + * @see https://on.cypress.io/api/title + */ + title(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/type + */ + type(text: string, options?: TypeOptions): Chainable; + + /** + * @see https://on.cypress.io/api/uncheck + */ + uncheck(options?: CheckOptions): Chainable; + uncheck(values: string[]): Chainable; // no options? missing single value variant + + /** + * @see https://on.cypress.io/api/url + */ + url(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/viewport + */ + viewport(width: number, height: number, options?: Loggable): Chainable; + viewport(preset: string, orientation: ViewportOrientation, options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/visit + */ + visit(url: string, options?: VisitOptions): Chainable; + + /** + * @see https://on.cypress.io/api/wait + */ + wait(ms: number|string[]): Chainable; // no options? + wait(alias: string, options?: LoggableTimeoutable): Chainable; + + /** + * @see https://on.cypress.io/api/window + */ + window(options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/within + */ + within(fn: (currentSubject?: any) => void): Chainable; + within(options: Loggable, fn: (currentSubject?: any) => void): Chainable; // inconsistent argument order + + /** + * @see https://on.cypress.io/api/wrap + */ + wrap(Object: object, options?: Loggable): Chainable; + + /** + * @see https://on.cypress.io/api/writefile + */ + writeFile(filePath: string, contents: FileContents, options?: Timeoutable): Chainable; + writeFile(filePath: string, contents: FileContents, encoding: string, options?: Timeoutable): Chainable; + } + + interface DebugOptions { + verbose?: boolean; + } + + interface CookieDefaults { + whitelist?: string | string[] | RegExp | ((cookie: any) => boolean); + } + + interface Loggable { + log?: boolean; + } + + interface Timeoutable { + timeout?: number; + } + + interface LoggableTimeoutable extends Loggable, Timeoutable {} + + interface BlurOptions extends Loggable { + force?: boolean; + } + + interface CheckOptions extends Loggable, Timeoutable { + interval?: number; + force?: boolean; + } + + interface ClearOptions extends Loggable, Timeoutable { + force?: boolean; + interval?: number; + } + + interface ClickOptions extends Loggable, Timeoutable { + force?: boolean; + multiple?: boolean; + interval?: number; + } + + interface ExecOptions extends Loggable, Timeoutable { + failOnNonZeroExit?: boolean; + env?: object; + } + + interface RequestOptions extends Loggable, Timeoutable { + auth?: object; + body?: RequestBody; + failOnStatusCode?: boolean; + followRedirect?: boolean; + form?: boolean; + gzip?: boolean; + headers?: object; + method?: HttpMethod; + qs?: string; + url: string; + } + + interface RouteOptions { + method?: HttpMethod; + url?: string | RegExp; + response?: any; + status?: number; + delay?: number; + headers?: object; + force404?: boolean; + onRequest?(...args: any[]): void; + onResponse?(...args: any[]): void; + onAbort?(...args: any[]): void; + } + + interface SelectOptions extends Loggable, Timeoutable { + force?: boolean; + interval?: number; + } + + interface ServerOptions { + delay?: number; + method?: HttpMethod; + status?: number; + headers?: object; + response?: any; + onRequest?(...args: any[]): void; + onResponse?(...args: any[]): void; + onAbort?(...args: any[]): void; + enable?: boolean; + force404?: boolean; + urlMatchingOptions?: object; + whitelist?(...args: any[]): void; + } + + interface SetCookieOptions extends Loggable, Timeoutable { + path?: string; + domain?: string; + secure?: boolean; + httpOnly?: boolean; + expiry?: number; + } + + interface TypeOptions extends Loggable, Timeoutable { + delay?: number; + force?: boolean; + release?: boolean; + interval?: number; + } + + interface VisitOptions extends Loggable, Timeoutable { + onBeforeLoad?(args: any[]): void; + onLoad?(args: any[]): void; + } +} + +declare const cy: Cypress.Chainable; diff --git a/types/cypress/tsconfig.json b/types/cypress/tsconfig.json new file mode 100644 index 0000000000..6e61b09e60 --- /dev/null +++ b/types/cypress/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", + "cypress-tests.ts" + ] +} diff --git a/types/cypress/tslint.json b/types/cypress/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cypress/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/d3-collection/d3-collection-tests.ts b/types/d3-collection/d3-collection-tests.ts index e862f9e601..af9bf8d075 100644 --- a/types/d3-collection/d3-collection-tests.ts +++ b/types/d3-collection/d3-collection-tests.ts @@ -23,11 +23,10 @@ let keyValueObj2 = { c: 'type' }; -let stringArray: string[], - anyArray: any[], - stringKVArray: Array<{ key: string, value: string }>, - anyKVArray: Array<{ key: string, value: any }>; - +let stringArray: string[]; +let anyArray: any[]; +let stringKVArray: Array<{ key: string, value: string }>; +let anyKVArray: Array<{ key: string, value: any }>; let num: number; let str: string; @@ -37,7 +36,6 @@ let booleanFlag: boolean; // Test Objects // --------------------------------------------------------------------- - // test keys(...) signatures ------------------------------------------------------ stringArray = d3Collection.keys(keyValueObj); @@ -74,7 +72,7 @@ interface TestObject { } let testObject: TestObject; -let testObjArray: Array; +let testObjArray: TestObject[]; let testObjKVArray: Array<{ key: string, value: TestObject }>; // Create Map ======================================================== @@ -87,7 +85,7 @@ basicMap = d3Collection.map(['foo', 'bar']); // map with key-value pairs { '0': // from array with accessor let testObjMap: d3Collection.Map; -testObjMap = d3Collection.map([{ name: 'foo', val: 10 }, { name: 'bar', val: 42 }], function (value, i, array) { +testObjMap = d3Collection.map([{ name: 'foo', val: 10 }, { name: 'bar', val: 42 }], (value, i, array) => { return value.name; }); @@ -102,7 +100,6 @@ objectMap = d3Collection.map(keyValueObj); let objectMap2: d3Collection.Map; objectMap2 = d3Collection.map(keyValueObj2); - // Use Map =========================================================== // has(...) ------------------------------------------------------------ @@ -133,14 +130,13 @@ stringArray = testObjMap.keys(); testObjArray = testObjMap.values(); - // entries() ----------------------------------------------------------- testObjKVArray = testObjMap.entries(); // each() -------------------------------------------------------------- -testObjMap.each(function (value, key, map) { +testObjMap.each((value, key, map) => { let v: TestObject = value; let k: string = key; let m: d3Collection.Map = map; @@ -172,10 +168,10 @@ basicSet = d3Collection.set(); // empty set basicSet = d3Collection.set(['foo', 'bar', 42]); // last element is coerced // from array without accessor -basicSet = d3Collection.set(testObjArray, function (value, index, array) { +basicSet = d3Collection.set(testObjArray, (value, index, array) => { let v: TestObject = value; let i: number = index; - let a: Array = array; + let a: TestObject[] = array; return v.name; }); @@ -211,7 +207,7 @@ stringArray = basicSet.values(); // each() -------------------------------------------------------------- -basicSet.each(function (value, valueRepeat, set) { +basicSet.each((value, valueRepeat, set) => { let v: string = value; let vr: string = valueRepeat; let s: d3Collection.Set = set; @@ -226,7 +222,6 @@ booleanFlag = basicSet.empty(); num = basicSet.size(); - // --------------------------------------------------------------------- // nest / Nest // --------------------------------------------------------------------- @@ -238,7 +233,7 @@ interface Yield { site: string; } -let raw: Array = [ +let raw: Yield[] = [ { yield: 27.00, variety: 'Manchuria', year: 1931, site: 'University Farm' }, { yield: 48.87, variety: 'Manchuria', year: 1931, site: 'Waseca' }, { yield: 27.43, variety: 'Manchuria', year: 1931, site: 'Morris' }, @@ -259,52 +254,49 @@ nestL2 = d3Collection.nest(); let nestL1Rollup: d3Collection.Nest; nestL1Rollup = d3Collection.nest(); - // Configure Nest ===================================================== // key(...) and sortKeys(...) ----------------------------------------- nestL2 = nestL2 - .key(function (d) { + .key(d => { return d.year.toString(); }); // with 2nd key with sortkey(...) nestL2 = nestL2 - .key(function (d) { + .key(d => { return d.variety; }) .sortKeys(ascending); nestL1Rollup = nestL1Rollup - .key(function (d) { + .key(d => { return d.year.toString(); }); // sortValues(...) ---------------------------------------------------- nestL2 = nestL2 - .sortValues(function (a, b) { + .sortValues((a, b) => { let val1: Yield = a; // data type Yield let val2: Yield = b; // data type Yield return a.yield - b.yield; }); - // rollup(...) -------------------------------------------------------- nestL1Rollup = nestL1Rollup - .rollup(function (values) { - let vs: Array = values; // correct data array type + .rollup(values => { + let vs: Yield[] = values; // correct data array type return vs.length; }); // Use Nest =========================================================== - // map(...) ----------------------------------------------------------- -type TestL2NestedMap = d3Collection.Map>>; +type TestL2NestedMap = d3Collection.Map>; type TestL1NestedMapRollup = d3Collection.Map; @@ -323,7 +315,7 @@ num = testL1NestedMapRollup.get('1931'); // get rollup value interface TestL2NestedObject { [keyL1: string]: { - [keyL2: string]: Array; + [keyL2: string]: Yield[]; }; } @@ -348,14 +340,14 @@ type TestL2NestedArray = Array<{ key: string; values: Array<{ key: string; - values: Array; + values: Yield[]; }> -}> +}>; type TestL1NestedArrayRollup = Array<{ key: string; value: number; -}> +}>; let testL2NestedArray: TestL2NestedArray; let testL1NestedArrayRollup: TestL1NestedArrayRollup; diff --git a/types/d3-collection/index.d.ts b/types/d3-collection/index.d.ts index 396d871767..e389862394 100644 --- a/types/d3-collection/index.d.ts +++ b/types/d3-collection/index.d.ts @@ -1,41 +1,45 @@ -// Type definitions for D3JS d3-collection module v1.0.1 +// Type definitions for D3JS d3-collection module 1.0 // Project: https://github.com/d3/d3-collection/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.0.1 + /** * Reference type things that can be coerced to string implicitely */ -type Stringifiable = { +export interface Stringifiable { toString(): string; -}; +} // --------------------------------------------------------------------- // Objects // --------------------------------------------------------------------- -export function keys(object: { [key: string]: any }): Array; -export function keys(object: Object): Array; +export function keys(object: { [key: string]: any }): string[]; +// TODO: When upgrading definitions to use TS 2.2+, use "object" data type in next line +export function keys(object: any): string[]; -export function values(object: { [key: string]: T }): Array; -export function values(object: Object): Array; +export function values(object: { [key: string]: T }): T[]; +// TODO: When upgrading definitions to use TS 2.2+, use "object" data type in next line +export function values(object: any): any[]; export function entries(object: { [key: string]: T }): Array<{ key: string, value: T }>; -export function entries(object: Object): Array<{ key: string, value: any }>; +// TODO: When upgrading definitions to use TS 2.2+, use "object" data type in next line +export function entries(object: any): Array<{ key: string, value: any }>; // --------------------------------------------------------------------- // map / Map // --------------------------------------------------------------------- - export interface Map { has(key: string): boolean; get(key: string): T | undefined; set(key: string, value: T): this; remove(key: string): boolean; clear(): void; - keys(): Array; - values(): Array; + keys(): string[]; + values(): T[]; entries(): Array<{ key: string, value: T }>; each(func: (value: T, key: string, map: Map) => void): void; empty(): boolean; @@ -46,20 +50,19 @@ export function map(): Map; export function map(d3Map: Map): Map; export function map(object: { [key: string]: T }): Map; export function map(object: { [key: number]: T }): Map; -export function map(array: Array, key?: (value: T, i?: number, array?: Array) => string): Map; -export function map(object: Object): Map; +export function map(array: T[], key?: (value: T, i?: number, array?: T[]) => string): Map; +export function map(object: any): Map; // TODO: When upgrading definitions to use TS 2.2+, use "object" data type for argument // --------------------------------------------------------------------- // set / Set // --------------------------------------------------------------------- - export interface Set { has(value: string | Stringifiable): boolean; add(value: string | Stringifiable): this; remove(value: string | Stringifiable): boolean; clear(): void; - values(): Array; + values(): string[]; /** * The first and second parameter of the function are both passed * the 'value' of the set entry for consistency with map.each(...) @@ -70,11 +73,10 @@ export interface Set { size(): number; } - export function set(): Set; export function set(d3Set: Set): Set; export function set(array: Array): Set; -export function set(array: Array, key: (value: T, index?: number, array?: Array) => string): Set; +export function set(array: T[], key: (value: T, index?: number, array?: T[]) => string): Set; // --------------------------------------------------------------------- // nest / Nest @@ -93,17 +95,19 @@ export function set(array: Array, key: (value: T, index?: number, array?: // Also note, that the below return types for Nest.entries(...), Nest.map(...) and Nest.object(...) strictly only work, // if AT LEAST ONE KEY was set. This seems a reasonable constraint in practice, given the intent of the nest operator. -// Otherwise, an additional '| Array | RollupType` would have to be added to the union type. This would cover +// Otherwise, an additional '| Datum[] | RollupType` would have to be added to the union type. This would cover // cases (a) without key or rollup (b) without key but with rollup. However, again, the union types make it cumbersome // without much gain. -export interface NestedArray extends Array<{ key: string, values: NestedArray | Array | undefined, value: RollupType | undefined }> { } -export interface NestedMap extends Map | Array | RollupType> { } +// tslint:disable-next-line:no-empty-interface +export interface NestedArray extends Array<{ key: string, values: NestedArray | Datum[] | undefined, value: RollupType | undefined }> { } +// tslint:disable-next-line:no-empty-interface +export interface NestedMap extends Map | Datum[] | RollupType> { } export interface NestedObject { - [key: string]: NestedObject | Array | RollupType; + [key: string]: NestedObject | Datum[] | RollupType; } -interface Nest { +export interface Nest { key(func: (datum: Datum) => string): this; sortKeys(comparator: (a: string, b: string) => number): this; sortValues(comparator: (a: Datum, b: Datum) => number): this; diff --git a/types/d3-collection/tslint.json b/types/d3-collection/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-collection/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-color/d3-color-tests.ts b/types/d3-color/d3-color-tests.ts index 29b9303a2b..c001080d36 100644 --- a/types/d3-color/d3-color-tests.ts +++ b/types/d3-color/d3-color-tests.ts @@ -20,11 +20,11 @@ function isHSL(color: d3Color.RGBColor | d3Color.HSLColor): color is d3Color.HSL // Signature tests for 'color', rgb and hsl -let c: d3Color.RGBColor | d3Color.HSLColor, - cRGB: d3Color.RGBColor, - cHSL: d3Color.HSLColor, - displayable: boolean, - cString: string; +let c: d3Color.RGBColor | d3Color.HSLColor; +let cRGB: d3Color.RGBColor; +let cHSL: d3Color.HSLColor; +let displayable: boolean; +let cString: string; // string signature c = d3Color.color('steelblue'); @@ -40,7 +40,6 @@ c = d3Color.color(cRGB); cRGB = d3Color.color('hsl(60, 100%, 20%, 0.5)').rgb(); - cRGB = d3Color.rgb(20, 100, 200); cRGB = d3Color.rgb(20, 100, 200, 0.5); cRGB = d3Color.rgb('steelblue'); @@ -90,7 +89,6 @@ cString = cLab.toString(); console.log('Channels = (l : %d, a: %d, b: %d)', cLab.l, cLab.a, cLab.b); console.log('Opacity = %d', cLab.opacity); - // Signature tests for HCL let cHcl: d3Color.HCLColor; diff --git a/types/d3-color/index.d.ts b/types/d3-color/index.d.ts index ed9c706667..96b24fd09e 100644 --- a/types/d3-color/index.d.ts +++ b/types/d3-color/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for D3JS d3-color module v1.0.1 +// Type definitions for D3JS d3-color module 1.0 // Project: https://github.com/d3/d3-color/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.0.1 + // --------------------------------------------------------------------------- // Shared Type Definitions and Interfaces // --------------------------------------------------------------------------- @@ -127,14 +129,14 @@ export interface CubehelixColorFactory extends Function { // Color object factories // -------------------------------------------------------------------------- -export var color: ColorFactory; +export const color: ColorFactory; -export var rgb: RGBColorFactory; +export const rgb: RGBColorFactory; -export var hsl: HSLColorFactory; +export const hsl: HSLColorFactory; -export var lab: LabColorFactory; +export const lab: LabColorFactory; -export var hcl: HCLColorFactory; +export const hcl: HCLColorFactory; -export var cubehelix: CubehelixColorFactory; +export const cubehelix: CubehelixColorFactory; diff --git a/types/d3-color/tslint.json b/types/d3-color/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-color/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-dispatch/d3-dispatch-tests.ts b/types/d3-dispatch/d3-dispatch-tests.ts index 6f358587f3..436bc3d6d4 100644 --- a/types/d3-dispatch/d3-dispatch-tests.ts +++ b/types/d3-dispatch/d3-dispatch-tests.ts @@ -15,25 +15,24 @@ interface Datum { b: string; } -let dispatch: d3Dispatch.Dispatch, - copy: d3Dispatch.Dispatch, - copy2: d3Dispatch.Dispatch; +let dispatch: d3Dispatch.Dispatch; +let copy: d3Dispatch.Dispatch; +let copy2: d3Dispatch.Dispatch; // Signature Tests ---------------------------------------- // create new dispatch object dispatch = d3Dispatch.dispatch('foo', 'bar'); - function cbFn(this: HTMLElement, d: Datum, i: number) { console.log(this.baseURI ? this.baseURI : 'nada'); console.log(d ? d.a : 'nada'); -}; +} function cbFn2(this: SVGElement, d: Datum, i: number) { console.log(this.baseURI ? this.baseURI : 'nada'); console.log(d ? d.a : 'nada'); -}; +} dispatch.on('foo', cbFn); // dispatch.on('foo', cbFn2); // test fails as 'this' context type is mismatched between dispatch and callback function diff --git a/types/d3-dispatch/index.d.ts b/types/d3-dispatch/index.d.ts index 71d77da9f7..1e6e82e06f 100644 --- a/types/d3-dispatch/index.d.ts +++ b/types/d3-dispatch/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for D3JS d3-dispatch module v1.0.1 +// Type definitions for D3JS d3-dispatch module 1.0 // Project: https://github.com/d3/d3-dispatch/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.0.1 + export interface Dispatch { apply(type: string, that?: T, args?: any[]): void; call(type: string, that?: T, ...args: any[]): void; diff --git a/types/d3-dispatch/tslint.json b/types/d3-dispatch/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-dispatch/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-hsv/d3-hsv-tests.ts b/types/d3-hsv/d3-hsv-tests.ts index fff2e55935..72e18145e6 100644 --- a/types/d3-hsv/d3-hsv-tests.ts +++ b/types/d3-hsv/d3-hsv-tests.ts @@ -9,10 +9,10 @@ import {hsv, HSVColor} from 'd3-hsv'; import {rgb, RGBColor} from 'd3-color'; -let c: RGBColor, - cHSV: HSVColor, - displayable: boolean, - cString: string; +let c: RGBColor; +let cHSV: HSVColor; +let displayable: boolean; +let cString: string; // hsv signature cHSV = hsv(120, 0.4, 0.5); diff --git a/types/d3-hsv/index.d.ts b/types/d3-hsv/index.d.ts index a7501b60c7..c10fa6ee44 100644 --- a/types/d3-hsv/index.d.ts +++ b/types/d3-hsv/index.d.ts @@ -1,11 +1,13 @@ -// Type definitions for D3JS d3-hsv module v0.0.3 +// Type definitions for D3JS d3-hsv module 0.0 // Project: https://github.com/d3/d3-hsv/ // Definitions by: Yuri Feldman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 0.0.3 + import {Color, RGBColor, ColorSpaceObject, ColorCommonInstance} from 'd3-color'; -type ColorSpaceObjectWithHSV = ColorSpaceObject | HSVColor; +export type ColorSpaceObjectWithHSV = ColorSpaceObject | HSVColor; export interface HSVColorFactory extends Function { (h: number, s: number, v: number, opacity?: number): HSVColor; @@ -23,4 +25,4 @@ export interface HSVColor extends Color { rgb(): RGBColor; } -export var hsv: HSVColorFactory; +export const hsv: HSVColorFactory; diff --git a/types/d3-hsv/tslint.json b/types/d3-hsv/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-hsv/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-interpolate/d3-interpolate-tests.ts b/types/d3-interpolate/d3-interpolate-tests.ts index 2ada5864cd..5cbb6fe3a0 100644 --- a/types/d3-interpolate/d3-interpolate-tests.ts +++ b/types/d3-interpolate/d3-interpolate-tests.ts @@ -17,54 +17,52 @@ interface Interpolator { } class NumCoercible { - public a: number; + a: number; constructor(a: number) { this.a = a; } - public valueOf() { + valueOf() { return this.a; } } class StringCoercible { - public a: string; + a: string; constructor(a: string) { this.a = a; } - public toString() { + toString() { return this.a; } } +let iNum: Interpolator; +let iString: Interpolator; +let iDate: Interpolator; +let iArrayNum: Interpolator; +let iArrayStr: Interpolator; +let iArrayDate: Interpolator; +let iArrayMixed: Interpolator<[Date, string]>; +let iKeyVal: Interpolator<{ [key: string]: any }>; +let iRGBColorObj: Interpolator; +let iZoom: d3Interpolate.ZoomInterpolator; -let iNum: Interpolator, - iString: Interpolator, - iDate: Interpolator, - iArrayNum: Interpolator>, - iArrayStr: Interpolator>, - iArrayDate: Interpolator>, - iArrayMixed: Interpolator<[Date, string]>, - iKeyVal: Interpolator<{ [key: string]: any }>, - iRGBColorObj: Interpolator, - iZoom: d3Interpolate.ZoomInterpolator; - -let num: number, - str: string, - arrNum: number[], - arrStr: string[], - objKeyVal: { [key: string]: any }, - objRGBColor: d3Color.RGBColor, - objHSVColor: d3Hsv.HSVColor, - zoom: [number, number, number]; +let num: number; +let str: string; +let arrNum: number[]; +let arrStr: string[]; +let objKeyVal: { [key: string]: any }; +let objRGBColor: d3Color.RGBColor; +let objHSVColor: d3Hsv.HSVColor; +let zoom: [number, number, number]; // test interpolate(a, b) signature ---------------------------------------------------- iNum = d3Interpolate.interpolate('1', 5); - // color interpolator returning a color string iString = d3Interpolate.interpolate('seagreen', d3Color.rgb(100, 100, 100)); iString = d3Interpolate.interpolate('seagreen', d3Hsv.hsv(60, 1, 0.2, 0.4)); @@ -118,13 +116,13 @@ iDate = d3Interpolate.interpolateDate(new Date(2016, 6, 1), new Date(2016, 6, 31 // test interpolateArray(a, b) signature ---------------------------------------------------- -iArrayNum = d3Interpolate.interpolateArray>([1, 2], [4, 8]); // explicit typing +iArrayNum = d3Interpolate.interpolateArray([1, 2], [4, 8]); // explicit typing arrNum = iArrayNum(0.5); iArrayNum = d3Interpolate.interpolateArray<[number, number]>(['1', '2'], [4, 8]); // explicit typing arrNum = iArrayNum(0.5); -iArrayStr = d3Interpolate.interpolateArray>(['1', '2'], ['4', '8']); // explicit typing +iArrayStr = d3Interpolate.interpolateArray(['1', '2'], ['4', '8']); // explicit typing arrStr = iArrayStr(0.5); iArrayStr = d3Interpolate.interpolateArray([1, 2], ['4', '8']); // infered typing @@ -151,7 +149,6 @@ str = iString(0.5); iString = d3Interpolate.interpolateTransformSvg('rotate(0)', 'rotate(60)'); str = iString(0.5); - // test interpolateZoom(a, b) signature ---------------------------------------------------- iZoom = d3Interpolate.interpolateZoom([50, 50, 300], [100, 100, 500]); @@ -229,9 +226,7 @@ str = iString(0.5); // with gamma correction iString = d3Interpolate.interpolateCubehelixLong.gamma(2.2)('purple', 'orange'); - - -// test interpolateBasis(splineNodes) and interpolateBasisClosed(splineNodes: Array) ---------------------------- +// test interpolateBasis(splineNodes) and interpolateBasisClosed(splineNodes: number[]) ---------------------------- iNum = d3Interpolate.interpolateBasis([1, 50, 30, 10]); diff --git a/types/d3-interpolate/index.d.ts b/types/d3-interpolate/index.d.ts index a4d145d2b8..e3fcfa21d8 100644 --- a/types/d3-interpolate/index.d.ts +++ b/types/d3-interpolate/index.d.ts @@ -1,16 +1,16 @@ -// Type definitions for D3JS d3-interpolate module v1.1.1 +// Type definitions for D3JS d3-interpolate module 1.1 // Project: https://github.com/d3/d3-interpolate/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import { ColorCommonInstance } from 'd3-color'; +// Last module patch version validated against: 1.1.1 +import { ColorCommonInstance } from 'd3-color'; // -------------------------------------------------------------------------- // Shared Type Definitions and Interfaces // -------------------------------------------------------------------------- - export interface ZoomInterpolator extends Function { (t: number): ZoomView; /** @@ -42,12 +42,11 @@ export function interpolate(a: number | { valueOf(): number }, b: number): ((t: export function interpolate(a: any, b: ColorCommonInstance): ((t: number) => string); export function interpolate(a: Date, b: Date): ((t: number) => Date); export function interpolate(a: string | { toString(): string }, b: string): ((t: number) => string); -export function interpolate>(a: Array, b: U): ((t: number) => U); +export function interpolate(a: any[], b: U): ((t: number) => U); export function interpolate(a: number | { valueOf(): number }, b: { valueOf(): number }): ((t: number) => number); -export function interpolate(a: any, b: U): ((t: number) => U); +export function interpolate(a: any, b: U): ((t: number) => U); // TODO: extends 'any' should become 'object' with TS 2.2+ definitions export function interpolate(a: any, b: { [key: string]: any }): ((t: number) => { [key: string]: any }); - export function interpolateNumber(a: number | { valueOf(): number }, b: number | { valueOf(): number }): ((t: number) => number); export function interpolateRound(a: number | { valueOf(): number }, b: number | { valueOf(): number }): ((t: number) => number); @@ -56,13 +55,11 @@ export function interpolateString(a: string | { toString(): string }, b: string export function interpolateDate(a: Date, b: Date): ((t: number) => Date); -export function interpolateArray>(a: Array, b: A): ((t: number) => A); +export function interpolateArray(a: any[], b: A): ((t: number) => A); -export function interpolateObject(a: any, b: U): ((t: number) => U); +export function interpolateObject(a: any, b: U): ((t: number) => U); // TODO: extends 'any' should become 'object' with TS 2.2+ definitions export function interpolateObject(a: { [key: string]: any }, b: { [key: string]: any }): ((t: number) => { [key: string]: any }); - - export function interpolateTransformCss(a: string, b: string): ((t: number) => string); export function interpolateTransformSvg(a: string, b: string): ((t: number) => string); @@ -71,12 +68,11 @@ export function interpolateTransformSvg(a: string, b: string): ((t: number) => s */ export function interpolateZoom(a: ZoomView, b: ZoomView): ZoomInterpolator; - -export function quantize(interpolator: ((t: number) => T), n: number): Array; +export function quantize(interpolator: ((t: number) => T), n: number): T[]; // Color interpolation related -export var interpolateRgb: ColorGammaInterpolationFactory; +export const interpolateRgb: ColorGammaInterpolationFactory; export function interpolateRgbBasis(colors: Array): ((t: number) => string); export function interpolateRgbBasisClosed(colors: Array): ((t: number) => string); @@ -86,10 +82,10 @@ export function interpolateHslLong(a: string | ColorCommonInstance, b: string | export function interpolateLab(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string); export function interpolateHcl(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string); export function interpolateHclLong(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string); -export var interpolateCubehelix: ColorGammaInterpolationFactory; -export var interpolateCubehelixLong: ColorGammaInterpolationFactory; +export const interpolateCubehelix: ColorGammaInterpolationFactory; +export const interpolateCubehelixLong: ColorGammaInterpolationFactory; // Spline related -export function interpolateBasis(splineNodes: Array): ((t: number) => number); -export function interpolateBasisClosed(splineNodes: Array): ((t: number) => number); +export function interpolateBasis(splineNodes: number[]): ((t: number) => number); +export function interpolateBasisClosed(splineNodes: number[]): ((t: number) => number); diff --git a/types/d3-interpolate/tslint.json b/types/d3-interpolate/tslint.json new file mode 100644 index 0000000000..604d5950cf --- /dev/null +++ b/types/d3-interpolate/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false, + "callable-types": false + } +} diff --git a/types/d3-path/d3-path-tests.ts b/types/d3-path/d3-path-tests.ts index 4240a8f7be..b11a3405e3 100644 --- a/types/d3-path/d3-path-tests.ts +++ b/types/d3-path/d3-path-tests.ts @@ -8,19 +8,16 @@ import * as d3Path from 'd3-path'; - // ----------------------------------------------------------------------------------------- // Test create new path serializer // ----------------------------------------------------------------------------------------- let context: d3Path.Path = d3Path.path(); - // ----------------------------------------------------------------------------------------- // Test path serializer methods // ----------------------------------------------------------------------------------------- - context.moveTo(50, 50); context.lineTo(100, 100); diff --git a/types/d3-path/index.d.ts b/types/d3-path/index.d.ts index 7315ced2cb..7c0f662018 100644 --- a/types/d3-path/index.d.ts +++ b/types/d3-path/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.0.3 +// Last module patch version validated against: 1.0.5 /** * A D3 path serializer implementing CanvasPathMethods diff --git a/types/d3-path/tslint.json b/types/d3-path/tslint.json new file mode 100644 index 0000000000..604d5950cf --- /dev/null +++ b/types/d3-path/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false, + "callable-types": false + } +} diff --git a/types/d3-polygon/index.d.ts b/types/d3-polygon/index.d.ts index 40dbaa4f4f..64e1d2c9b9 100644 --- a/types/d3-polygon/index.d.ts +++ b/types/d3-polygon/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for D3JS d3-polygon module v1.0.1 +// Type definitions for D3JS d3-polygon module 1.0 // Project: https://github.com/d3/d3-polygon/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.0.1 + /** * Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order ( * assuming a coordinate system where the origin ⟨0,0⟩ is in the top-left corner), the returned area is positive; diff --git a/types/d3-polygon/tslint.json b/types/d3-polygon/tslint.json new file mode 100644 index 0000000000..604d5950cf --- /dev/null +++ b/types/d3-polygon/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false, + "callable-types": false + } +} diff --git a/types/d3-quadtree/d3-quadtree-tests.ts b/types/d3-quadtree/d3-quadtree-tests.ts index 9a285dc204..5fabc66961 100644 --- a/types/d3-quadtree/d3-quadtree-tests.ts +++ b/types/d3-quadtree/d3-quadtree-tests.ts @@ -27,7 +27,7 @@ interface TestDatum { let testDatum: TestDatum; -let testData: Array = [ +let testData: TestDatum[] = [ { x: 10, y: 20 }, { x: 30, y: 10 }, { x: 15, y: 80 }, @@ -39,7 +39,6 @@ let testData: Array = [ let node: d3Quadtree.QuadtreeInternalNode | d3Quadtree.QuadtreeLeaf; let numberAccessor: (d: TestDatum) => number; - let simpleTestData: Array<[number, number]> = [ [10, 20], [30, 10], @@ -76,8 +75,8 @@ quadtree = d3Quadtree.quadtree(testData); // explicitly typed to Test // test with data AND accessors passed in right away quadtree = d3Quadtree.quadtree( testData, // data type Array - function (d) { return d.x; }, // x accessor with d of type TestDatum - function (d) { return d.y; } // y accessor with d of type TestDatum + d => d.x, // x accessor with d of type TestDatum + d => d.y // y accessor with d of type TestDatum ); // inferred type underlying quadtree TestDatum quadtree = d3Quadtree.quadtree(testData); // explicitly typed to TestDatum @@ -86,26 +85,20 @@ quadtree = d3Quadtree.quadtree(testData); // explicitly typed to Test quadtree = d3Quadtree.quadtree(); // quadtree = d3Quadtree.quadtree(); fails, wrong underlying data type - // Configure Quadtree ======================================================== // x(...) -------------------------------------------------------------------- -quadtree = quadtree.x(function (d) { - return d.x; // d of type TestDatum -}); +quadtree = quadtree.x(d => d.x); // d of type TestDatum numberAccessor = quadtree.x(); // y(...) -------------------------------------------------------------------- -quadtree = quadtree.y(function (d) { - return d.y; // d of type TestDatum -}); +quadtree = quadtree.y(d => d.y); // d of type TestDatum numberAccessor = quadtree.y(); - // extent(...) --------------------------------------------------------------- quadtree = quadtree.extent([[0, 0], [80, 80]]); @@ -125,7 +118,6 @@ quadtree = quadtree.add({ x: 35, y: 35 }); quadtree = quadtree.addAll(testData); // quadtree = quadtree.addAll([{x: 35}, {x: 55, y: 13}]); // fails, incompatible data type - // remove(...) --------------------------------------------------------------- quadtree = quadtree.remove({ x: 35, y: 35 }); @@ -164,7 +156,7 @@ testDatum = quadtree.find(20, 30, 10); // visit() -------------------------------------------------------------------- -quadtree = quadtree.visit(function (node, x0, y0, x1, y1) { +quadtree = quadtree.visit((node, x0, y0, x1, y1) => { let bound: number; bound = x0; // number bound = y0; // number @@ -182,7 +174,7 @@ quadtree = quadtree.visit(function (node, x0, y0, x1, y1) { // void -> undefined return treated as falsey }); -quadtree = quadtree.visit(function (node, x0, y0, x1, y1) { +quadtree = quadtree.visit((node, x0, y0, x1, y1) => { let bound: number; bound = x0; // number bound = y0; // number @@ -203,10 +195,9 @@ quadtree = quadtree.visit(function (node, x0, y0, x1, y1) { // return 10; // fails wrong return type // }); - // visitAfter() --------------------------------------------------------------- -quadtree = quadtree.visitAfter(function (node, x0, y0, x1, y1) { +quadtree = quadtree.visitAfter((node, x0, y0, x1, y1) => { let bound: number; bound = x0; // number bound = y0; // number @@ -221,19 +212,17 @@ quadtree = quadtree.visitAfter(function (node, x0, y0, x1, y1) { } else { console.log('Top-Right Quadrant: ', node[0]); } - }); // Test QuadtreeLeaf ========================================================= -let leaf: d3Quadtree.QuadtreeLeaf, - nextLeaf: d3Quadtree.QuadtreeLeaf | undefined; +let leaf: d3Quadtree.QuadtreeLeaf; +let nextLeaf: d3Quadtree.QuadtreeLeaf | undefined; testDatum = leaf.data; nextLeaf = leaf.next ? leaf.next : undefined; - // Test QuadtreeInternalNode ================================================= let internalNode: d3Quadtree.QuadtreeInternalNode; diff --git a/types/d3-quadtree/index.d.ts b/types/d3-quadtree/index.d.ts index 5607060fd5..8128c9e306 100644 --- a/types/d3-quadtree/index.d.ts +++ b/types/d3-quadtree/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for D3JS d3-quadtree module v1.0.1 +// Type definitions for D3JS d3-quadtree module 1.0 // Project: https://github.com/d3/d3-quadtree/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.0.1 + /** * Leaf node of the quadtree. */ @@ -31,20 +33,21 @@ export interface Quadtree { extent(extend: [[number, number], [number, number]]): this; cover(x: number, y: number): this; add(datum: T): this; - addAll(data: Array): this; + addAll(data: T[]): this; remove(datum: T): this; - removeAll(data: Array): this; + removeAll(data: T[]): this; copy(): Quadtree; root(): QuadtreeInternalNode | QuadtreeLeaf; - data(): Array; + data(): T[]; size(): number; find(x: number, y: number, radius?: number): T | undefined; + // TODO: Review below, when validating to strictNullChecks. + // tslint:disable-next-line:void-return visit(callback: (node: QuadtreeInternalNode | QuadtreeLeaf, x0: number, y0: number, x1: number, y1: number) => (void | boolean)): this; visitAfter(callback: (node: QuadtreeInternalNode | QuadtreeLeaf, x0: number, y0: number, x1: number, y1: number) => void): this; } - export function quadtree(): Quadtree<[number, number]>; export function quadtree(data: Array<[number, number]>): Quadtree<[number, number]>; export function quadtree(): Quadtree; -export function quadtree(data: Array, x?: (d: T) => number, y?: (d: T) => number): Quadtree; +export function quadtree(data: T[], x?: (d: T) => number, y?: (d: T) => number): Quadtree; diff --git a/types/d3-quadtree/tslint.json b/types/d3-quadtree/tslint.json new file mode 100644 index 0000000000..38aa3fb5b3 --- /dev/null +++ b/types/d3-quadtree/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false, + "no-empty-interface": false + } +} diff --git a/types/d3-queue/d3-queue-tests.ts b/types/d3-queue/d3-queue-tests.ts index 223978b355..312bb0c358 100644 --- a/types/d3-queue/d3-queue-tests.ts +++ b/types/d3-queue/d3-queue-tests.ts @@ -28,13 +28,12 @@ qWithResults = d3Queue.queue(3); // No Results Task --------------------------------------------------- function delayedHello(name: string, delay: number, callback: (error: any | null) => void) { - setTimeout(function () { + setTimeout(() => { console.log('Hello, ' + name + '!'); callback(null); }, delay); } - qNoResult = qNoResult.defer(delayedHello, 'Alice', 250); qNoResult.defer(delayedHello, 'Bob', 500); @@ -53,7 +52,7 @@ qWithResults // No Results Task --------------------------------------------------- -qNoResult = qNoResult.await(function (error) { +qNoResult = qNoResult.await((error) => { if (error) throw error; console.log('Goodbye!'); }); @@ -62,7 +61,7 @@ qNoResult = qNoResult.await(function (error) { // await qWithResults - .await(function (error, file1Stat, file2Stat) { + .await((error, file1Stat, file2Stat) => { if (error) throw error; console.log(file1Stat, file2Stat); }); @@ -72,12 +71,11 @@ qWithResults qWithResults = d3Queue.queue() .defer(getFileStats, './workingpath/file1.json') .defer(getFileStats, './yetanotherworkingpath/file2.json') - .awaitAll(function (error, fileStats) { + .awaitAll((error, fileStats) => { if (error) throw error; - console.log(fileStats[0], fileStats[1]); + console.log(fileStats[0], fileStats[1]); }); - // Abort Deferred Tasks ============================================== function requestDataFromInterWeb(url: string, callback: (error: any | null, data?: any) => void) { @@ -87,9 +85,9 @@ function requestDataFromInterWeb(url: string, callback: (error: any | null, data qWithResults = d3Queue.queue() .defer(requestDataFromInterWeb, 'http://www.google.com:81') .defer(requestDataFromInterWeb, 'http://www.google.com:81') - .awaitAll(function (error, results) { + .awaitAll((error, results) => { if (error) throw error; - console.log(results[0], results[1]); + console.log(results[0], results[1]); }); qWithResults.abort(); diff --git a/types/d3-queue/index.d.ts b/types/d3-queue/index.d.ts index 0ca41b698f..d672849622 100644 --- a/types/d3-queue/index.d.ts +++ b/types/d3-queue/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for D3JS d3-queue module v3.0.2 +// Type definitions for D3JS d3-queue module 3.0 // Project: https://github.com/d3/d3-queue/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 3.0.2 + /** * A d3-queue queue object as returned by queue(...) */ @@ -17,7 +19,7 @@ export interface Queue { * To return multiple results from a single callback, wrap the results in an object or array. * @param args Additional, optional arguments to be passed into deferred task on invocation */ - defer(task: (...args: Array) => void, ...args: any[]): this; + defer(task: (...args: any[]) => void, ...args: any[]): this; /** * Aborts any active tasks, invoking each active task’s task.abort function, if any. * Also prevents any new tasks from starting, and immediately invokes the queue.await or @@ -32,7 +34,7 @@ export interface Queue { * If an error occurred, there are no additional arguments to the callback. Otherwise, * the callback is passed each result as an additional argument. */ - await(callback: (error: any | null, ...results: Array) => void): this; + await(callback: (error: any | null, ...results: any[]) => void): this; /** * Sets the callback to be invoked when all deferred tasks have finished (results array). * @@ -41,7 +43,7 @@ export interface Queue { * or null if no error occurred. If an error occurred, there are no additional arguments to the callback. * Otherwise, the callback is also passed an array of results as the second argument. */ - awaitAll(callback: (error: any | null, results?: Array) => void): this; + awaitAll(callback: (error: any | null, results?: any[]) => void): this; } /** diff --git a/types/d3-queue/tslint.json b/types/d3-queue/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-queue/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-request/d3-request-tests.ts b/types/d3-request/d3-request-tests.ts index 798d200bd5..8d8061d76a 100644 --- a/types/d3-request/d3-request-tests.ts +++ b/types/d3-request/d3-request-tests.ts @@ -52,7 +52,7 @@ let listenerResult: (this: d3Request.Request, result: ResponseDatumGET[]) => voi let request: d3Request.Request = d3Request.request(url); // GET-request with callback, immediately sent -let requestWithCallback: d3Request.Request = d3Request.request(url, function (error, xhr) { +let requestWithCallback: d3Request.Request = d3Request.request(url, (error, xhr) => { let x: XMLHttpRequest; if (!error) { x = xhr; @@ -60,7 +60,6 @@ let requestWithCallback: d3Request.Request = d3Request.request(url, function (er } }); - // ------------------------------------------------------------------------------- // Request interface // ------------------------------------------------------------------------------- @@ -81,7 +80,7 @@ let r3: d3Request.Request = d3Request.request(url) // with callback for response handling let r4: d3Request.Request = d3Request.request(url) .response(xhr2Listing) - .get(function (error, response) { + .get((error, response) => { let r: ResponseDatumGET[]; if (!error) { r = response; @@ -92,7 +91,7 @@ let r4: d3Request.Request = d3Request.request(url) // with request datum and callback for response handling let r5: d3Request.Request = d3Request.request(url) .response(xhr2Listing) - .get({ kind: 'Listing' }, function (error, response) { + .get({ kind: 'Listing' }, (error, response) => { let r: ResponseDatumGET[]; if (!error) { r = response; @@ -124,54 +123,49 @@ let r10: d3Request.Request = d3Request.request(url); // beforesent -r10 = r10.on('beforesend', function (xhr) { +r10 = r10.on('beforesend', function(xhr) { let that: d3Request.Request = this; let x: XMLHttpRequest = xhr; // do something; }); - listenerXhr = r10.on('beforesend'); - // progress -r10 = r10.on('progress', function (progEvent) { +r10 = r10.on('progress', function(progEvent) { let that: d3Request.Request = this; let e: ProgressEvent = progEvent; // do something; }); - listenerProgress = r10.on('progress'); - // error -r10 = r10.on('error', function (error) { +r10 = r10.on('error', function(error) { let that: d3Request.Request = this; let err: any = error; // do something; }); - listenerError = r10.on('error'); // load -r10 = r10.on('load', function (result) { +r10 = r10.on('load', function(result) { let that: d3Request.Request = this; let res: ResponseDatumGET[] = result; // do something; }); -r10 = r10.on('load', function (result: ResponseDatumGET[]) { +r10 = r10.on('load', function(result: ResponseDatumGET[]) { let that: d3Request.Request = this; let res: ResponseDatumGET[] = result; // do something; }); -// r10 = r10.on('load', function (result: number) { // fails, wrong argument type for callback +// r10 = r10.on('load', function(result: number) { // fails, wrong argument type for callback // let that: d3Request.Request = this; // let res: number = result; // // do something; @@ -181,22 +175,20 @@ listenerResult = r10.on('load'); // general (for unknown type additional event listener e.g. 'beforesent.custom' or 'load.custom') -r10 = r10.on('progress.foo', function (progEvent: ProgressEvent) { +r10 = r10.on('progress.foo', function(progEvent: ProgressEvent) { let that: d3Request.Request = this; let e: any = ProgressEvent; // do something; }); - listenerProgress = r10.on('progress.foo'); -r10 = r10.on('error.foo', function (error) { +r10 = r10.on('error.foo', function(error) { let that: d3Request.Request = this; let err: any = error; // do something; }); - listenerError = r10.on('error.foo'); // Password --------------------------------------------------------------------- @@ -226,7 +218,7 @@ let r13: d3Request.Request = d3Request.request(url) // with callback for response handling let r14: d3Request.Request = d3Request.request(url).response(xhr2Success) - .post(function (error, response) { + .post(function(error, response) { let that: d3Request.Request = this; let err: any = error; let res: ResponseDatumPOST = response; @@ -234,7 +226,7 @@ let r14: d3Request.Request = d3Request.request(url).response(xhr2Success) }); let r15: d3Request.Request = d3Request.request(url).response(xhr2Success) - .post({ test: 'NewValue', value: 10 }, function (error, response) { + .post({ test: 'NewValue', value: 10 }, function(error, response) { let that: d3Request.Request = this; let err: any = error; let res: ResponseDatumPOST = response; @@ -252,7 +244,7 @@ function xhr2Listing(xhr: XMLHttpRequest): ResponseDatumGET[] { } let r16: d3Request.Request = d3Request.request(url) - .response>(xhr2Listing); + .response(xhr2Listing); // ResponseType ----------------------------------------------------------------- @@ -276,7 +268,7 @@ let r19: d3Request.Request = d3Request.request(url) // method and callback for response handling let r20: d3Request.Request = d3Request.request(url) .response(xhr2Listing) - .send('GET', function (error, response) { + .send('GET', (error, response) => { let r: ResponseDatumGET[]; if (!error) { r = response; @@ -287,7 +279,7 @@ let r20: d3Request.Request = d3Request.request(url) // method,request datum and callback for response handling let r21: d3Request.Request = d3Request.request(url) .response(xhr2Listing) - .send('GET', { kind: 'Listing' }, function (error, response) { + .send('GET', { kind: 'Listing' }, (error, response) => { let r: ResponseDatumGET[]; if (!error) { r = response; @@ -295,7 +287,6 @@ let r21: d3Request.Request = d3Request.request(url) } }); - // Timeout ----------------------------------------------------------------------- // get @@ -312,42 +303,36 @@ let user: string = request.user(); // set let r23: d3Request.Request = request.user('User'); - // ------------------------------------------------------------------------------- // HTML Request // ------------------------------------------------------------------------------- - let html: d3Request.Request = d3Request.html(url); -let htmlWithCallback: d3Request.Request = d3Request.html(url, function (error, data) { +let htmlWithCallback: d3Request.Request = d3Request.html(url, function(error, data) { let that: d3Request.Request = this; let err: any = error; let d: DocumentFragment = data; console.log(d); }); - // ------------------------------------------------------------------------------- // JSON Request // ------------------------------------------------------------------------------- - let json: d3Request.Request = d3Request.json(url); -let jsonWithCallback: d3Request.Request = d3Request.json(url, function (error, data) { +let jsonWithCallback: d3Request.Request = d3Request.json(url, function(error, data) { let that: d3Request.Request = this; let err: any = error; let d: ResponseDatumGET[] = data; console.log(d); }); - - // ------------------------------------------------------------------------------- // Text Request // ------------------------------------------------------------------------------- let text: d3Request.Request = d3Request.text(url); -let textWithCallback: d3Request.Request = d3Request.text(url, function (error, data) { +let textWithCallback: d3Request.Request = d3Request.text(url, function(error, data) { let that: d3Request.Request = this; let err: any = error; let d: string = data; @@ -359,15 +344,13 @@ let textWithCallback: d3Request.Request = d3Request.text(url, function (error, d // ------------------------------------------------------------------------------- let xml: d3Request.Request = d3Request.xml(url); -let xmlWithCallback: d3Request.Request = d3Request.xml(url, function (error, data) { +let xmlWithCallback: d3Request.Request = d3Request.xml(url, function(error, data) { let that: d3Request.Request = this; let err: any = error; let d: any = data; console.log(d); }); - - // ------------------------------------------------------------------------------- // CSV Request // ------------------------------------------------------------------------------- @@ -376,7 +359,7 @@ let xmlWithCallback: d3Request.Request = d3Request.xml(url, function (error, dat let csvRequest: d3Request.DsvRequest = d3Request.csv(url); // url and callback for response handling -let csvRequestWithCallback: d3Request.DsvRequest = d3Request.csv(url, function (error, data) { +let csvRequestWithCallback: d3Request.DsvRequest = d3Request.csv(url, function(error, data) { let that: d3Request.Request = this; let err: any = error; let d: DSVParsedArray = data; @@ -385,7 +368,7 @@ let csvRequestWithCallback: d3Request.DsvRequest = d3Request.csv(url, function ( // url, row mapping function and callback for response handling let csvRequestWithRowWithCallback: d3Request.DsvRequest = d3Request.csv(url, - function (rawRow, index, columns) { + (rawRow, index, columns) => { let rr: DSVRowString = rawRow; let i: number = index; let cols: string[] = columns; @@ -398,7 +381,7 @@ let csvRequestWithRowWithCallback: d3Request.DsvRequest = d3Request.csv = data; @@ -409,12 +392,11 @@ let csvRequestWithRowWithCallback: d3Request.DsvRequest = d3Request.csv = data; @@ -423,7 +405,7 @@ let tsvRequestWithCallback: d3Request.DsvRequest = d3Request.tsv(url, function ( // url, row mapping function and callback for response handling let tsvRequestWithRowWithCallback: d3Request.DsvRequest = d3Request.tsv(url, - function (rawRow, index, columns) { + (rawRow, index, columns) => { let rr: DSVRowString = rawRow; let i: number = index; let cols: string[] = columns; @@ -436,7 +418,7 @@ let tsvRequestWithRowWithCallback: d3Request.DsvRequest = d3Request.tsv = data; @@ -450,7 +432,7 @@ let tsvRequestWithRowWithCallback: d3Request.DsvRequest = d3Request.tsv(function (rawRow, index, columns) { + .row((rawRow, index, columns) => { let rr: DSVRowString = rawRow; let i: number = index; let cols: string[] = columns; diff --git a/types/d3-request/index.d.ts b/types/d3-request/index.d.ts index 2a0251a726..3b5ce96148 100644 --- a/types/d3-request/index.d.ts +++ b/types/d3-request/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for D3JS d3-request module v1.0.2 +// Type definitions for D3JS d3-request module 1.0 // Project: https://github.com/d3/d3-request/ // Definitions by: Hugues Stefanski , Alex Ford , Boris Yankov , Tom Wanzek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.0.2 + import { DSVParsedArray, DSVRowString, DSVRowAny } from 'd3-dsv'; export interface Request { @@ -57,12 +59,16 @@ export interface Request { } export interface DsvRequest extends Request { - row(value: (rawRow: DSVRowString, index: number, columns: Array) => ParsedRow): DsvRequest; + row(value: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow): DsvRequest; } export function csv(url: string): DsvRequest; export function csv(url: string, callback: (this: DsvRequest, error: any, d: DSVParsedArray) => void): DsvRequest; -export function csv(url: string, row: (rawRow: DSVRowString, index: number, columns: Array) => ParsedRow, callback: (this: DsvRequest, error: any, d: DSVParsedArray) => void): DsvRequest; +export function csv( + url: string, + row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow, + callback: (this: DsvRequest, error: any, d: DSVParsedArray) => void +): DsvRequest; export function html(url: string): Request; export function html(url: string, callback: (this: Request, error: any, d: DocumentFragment) => void): Request; @@ -78,7 +84,11 @@ export function text(url: string, callback: (this: Request, error: any, d: strin export function tsv(url: string): DsvRequest; export function tsv(url: string, callback: (this: DsvRequest, error: any, d: DSVParsedArray) => void): DsvRequest; -export function tsv(url: string, row: (rawRow: DSVRowString, index: number, columns: Array) => ParsedRow, callback: (this: DsvRequest, error: any, d: DSVParsedArray) => void): DsvRequest; +export function tsv( + url: string, + row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow, + callback: (this: DsvRequest, error: any, d: DSVParsedArray) => void +): DsvRequest; export function xml(url: string): Request; export function xml(url: string, callback: (this: Request, error: any, d: any) => void): Request; diff --git a/types/d3-request/tslint.json b/types/d3-request/tslint.json new file mode 100644 index 0000000000..da66196eee --- /dev/null +++ b/types/d3-request/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false, + "max-line-length": [false, 145] + } +} diff --git a/types/d3-sankey/d3-sankey-tests.ts b/types/d3-sankey/d3-sankey-tests.ts index 246755a900..abf61775b8 100644 --- a/types/d3-sankey/d3-sankey-tests.ts +++ b/types/d3-sankey/d3-sankey-tests.ts @@ -7,7 +7,8 @@ */ import * as d3Sankey from 'd3-sankey'; -import {select, Selection} from 'd3-selection'; +import { select, Selection } from 'd3-selection'; +import { Link } from 'd3-shape'; // --------------------------------------------------------------------------- // Preparatory Steps @@ -17,41 +18,47 @@ import {select, Selection} from 'd3-selection'; // the Sankey layout generator. The latter are reflected in the SankeyNode and SankeyLink interfaces provided // by the definitions file interface SNodeExtra { - nodeId: number; - name: string; + name: string; +} + +interface SNodeExtraCustomId { + nodeId: string; + name: string; } interface SLinkExtra { - uom: string; + uom: string; } // For convenience type SNode = d3Sankey.SankeyNode; +type SNodeCustomId = d3Sankey.SankeyNode; type SLink = d3Sankey.SankeyLink; +type SLinkCustomId = d3Sankey.SankeyLink; interface DAG { - nodes: SNode[]; - links: SLink[]; + customNodes: SNode[]; + customLinks: SLink[]; } -const graph: DAG = { - nodes: [{ - nodeId: 0, +interface DAGCustomId { + customNodes: SNodeCustomId[]; + customLinks: SLinkCustomId[]; +} + +const graphDefault: DAG = { + customNodes: [{ name: "node0" }, { - nodeId: 1, name: "node1" }, { - nodeId: 2, name: "node2" }, { - nodeId: 3, name: "node3" }, { - nodeId: 4, name: "node4" }], - links: [{ + customLinks: [{ source: 0, target: 2, value: 2, @@ -89,6 +96,61 @@ const graph: DAG = { }] }; +const graphCustomId: DAGCustomId = { + customNodes: [{ + nodeId: "n0", + name: "node0" + }, { + nodeId: "n1", + name: "node1" + }, { + nodeId: "n2", + name: "node2" + }, { + nodeId: "n3", + name: "node3" + }, { + nodeId: "n4", + name: "node4" + }], + customLinks: [{ + source: "n0", + target: "n2", + value: 2, + uom: 'Widget(s)' + }, { + source: "n1", + target: "n2", + value: 2, + uom: 'Widget(s)' + }, { + source: "n1", + target: "n3", + value: 2, + uom: 'Widget(s)' + }, { + source: "n0", + target: "n4", + value: 2, + uom: 'Widget(s)' + }, { + source: "n2", + target: "n3", + value: 2, + uom: 'Widget(s)' + }, { + source: "n2", + target: "n4", + value: 2, + uom: 'Widget(s)' + }, { + source: "n3", + target: "n4", + value: 4, + uom: 'Widget(s)' + }] +}; + let sNodes: SNode[]; let sLinks: SLink[]; @@ -96,15 +158,19 @@ let num: number; let numMaybe: number | undefined; let str: string; let size: [number, number]; +let extent: [[number, number], [number, number]]; const svgLinkPaths = select('svg').selectAll('.linkPath'); // assume mock DOM +let sGraph: d3Sankey.SankeyGraph; + // --------------------------------------------------------------------------- // Obtain SankeyLayout Generator // --------------------------------------------------------------------------- -let slgDefault: d3Sankey.SankeyLayout<{}, {}> = d3Sankey.sankey(); -let slgDAG: d3Sankey.SankeyLayout = d3Sankey.sankey(); +let slgDefault: d3Sankey.SankeyLayout, {}, {}> = d3Sankey.sankey(); +let slgDAG: d3Sankey.SankeyLayout = d3Sankey.sankey(); +let slgDAGCustomId: d3Sankey.SankeyLayout = d3Sankey.sankey(); // --------------------------------------------------------------------------- // NodeWidth @@ -132,6 +198,19 @@ slgDAG = slgDAG.nodePadding(8); num = slgDAG.nodePadding(); +// --------------------------------------------------------------------------- +// Extent +// --------------------------------------------------------------------------- + +// Set ----------------------------------------------------------------------- + +// test return type for chainability +slgDAG = slgDAG.extent([[0, 0], [1200, 800]]); + +// Get ----------------------------------------------------------------------- + +extent = slgDAG.extent(); + // --------------------------------------------------------------------------- // Size // --------------------------------------------------------------------------- @@ -146,17 +225,81 @@ slgDAG = slgDAG.size([1200, 800]); size = slgDAG.size(); // --------------------------------------------------------------------------- -// Nodes +// Iterations // --------------------------------------------------------------------------- // Set ----------------------------------------------------------------------- // test return type for chainability -slgDAG = slgDAG.nodes(graph.nodes); +slgDAG = slgDAG.iterations(40); // Get ----------------------------------------------------------------------- -sNodes = slgDAG.nodes(); +num = slgDAG.iterations(); + +// --------------------------------------------------------------------------- +// Node Id +// --------------------------------------------------------------------------- + +// Set ----------------------------------------------------------------------- + +slgDAGCustomId = slgDAGCustomId.nodeId((d) => { + const node: SNodeCustomId = d; + return d.nodeId; +}); + +// Get ----------------------------------------------------------------------- + +let nodeIdAccessor: (d: SNodeCustomId) => string | number; + +nodeIdAccessor = slgDAGCustomId.nodeId(); + +// --------------------------------------------------------------------------- +// Node Alignment +// --------------------------------------------------------------------------- + +// Set ----------------------------------------------------------------------- + +declare const testNode: SNode; + +// Test pre-defined alignment functions +slgDAG = slgDAG.nodeAlign(d3Sankey.sankeyLeft); +num = d3Sankey.sankeyLeft(testNode, 10); +slgDAG = slgDAG.nodeAlign(d3Sankey.sankeyRight); +num = d3Sankey.sankeyRight(testNode, 10); +slgDAG = slgDAG.nodeAlign(d3Sankey.sankeyCenter); +num = d3Sankey.sankeyCenter(testNode, 10); +slgDAG = slgDAG.nodeAlign(d3Sankey.sankeyJustify); +num = d3Sankey.sankeyJustify(testNode, 10); + +// Test custom +slgDAG = slgDAG.nodeAlign((node, maxN) => { + const n: SNode = node; + const mN: number = maxN; + return node.depth || 0; +}); + +// Get ----------------------------------------------------------------------- + +let nodeAlignmentFn: (d: SNode, n: number) => number; + +nodeAlignmentFn = slgDAG.nodeAlign(); + +// --------------------------------------------------------------------------- +// Nodes +// --------------------------------------------------------------------------- + +// Set ----------------------------------------------------------------------- + +// Use array and test return type for chainability +slgDAG = slgDAG.nodes(graphDefault.customNodes); + +// Use accessor function and test return type for chainability +slgDAG = slgDAG.nodes(d => d.customNodes); + +// Get ----------------------------------------------------------------------- + +let nodesAccessor: (d: DAG) => SNode[] = slgDAG.nodes(); // --------------------------------------------------------------------------- // Links @@ -165,65 +308,75 @@ sNodes = slgDAG.nodes(); // Set ----------------------------------------------------------------------- // test return type for chainability -slgDAG = slgDAG.links(graph.links); +slgDAG = slgDAG.links(graphDefault.customLinks); + +// Use accessor function and test return type for chainability +slgDAG = slgDAG.links(d => d.customLinks); // Get ----------------------------------------------------------------------- -sLinks = slgDAG.links(); +let linksAccessor: (d: DAG) => SLink[] = slgDAG.links(); // --------------------------------------------------------------------------- -// Compute Layout +// Compute Initial Layout // --------------------------------------------------------------------------- -// test return type for chainability -slgDAG = slgDAG.layout(22); +sGraph = slgDAG(graphDefault); +// With additional arguments, although here unused. +sGraph = slgDAG(graphDefault, "foo", 50); // --------------------------------------------------------------------------- -// Relayout +// Update Layout // --------------------------------------------------------------------------- -// test return type for chainability -slgDAG = slgDAG.relayout(); +sGraph = slgDAG.update(sGraph); // --------------------------------------------------------------------------- -// Obtain and Use Link SVG Path Generator +// Obtain and Use Horizontal Link Path Generator // --------------------------------------------------------------------------- -let pathGen: d3Sankey.SankeyLinkPathGenerator; +let defaultPathGen: Link, [number, number]>; +let pathGen: Link; -pathGen = slgDAG.link(); +defaultPathGen = d3Sankey.sankeyLinkHorizontal(); -// Adjust Link SVG Path Generator curvature ---------------------------------- +pathGen = d3Sankey.sankeyLinkHorizontal(); -// test return type -pathGen = pathGen.curvature(0.6); -num = pathGen.curvature(); +// Render to svg path -// uses - -let svgPathString: string = pathGen(slgDAG.links()[0]); +let svgPathString: string | null = pathGen(sGraph.links[0]); svgLinkPaths.attr('d', pathGen); +// Render to canvas + +declare const ctx: CanvasRenderingContext2D; + +pathGen.context(ctx); +pathGen(sGraph.links[0]); + // --------------------------------------------------------------------------- // Shape test Node/Link related interfaces and types // --------------------------------------------------------------------------- // Sankey Node -------------------------------------------------------------- +sNodes = sGraph.nodes; let sNode = sNodes[0]; // User-specified extra properties: -num = sNode.nodeId; str = sNode.name; // Sankey Layout calculated (if layout has been run, otherwise undefined): -numMaybe = sNode.dx; -numMaybe = sNode.x; -numMaybe = sNode.dy; -numMaybe = sNode.y; +numMaybe = sNode.x0; +numMaybe = sNode.x1; +numMaybe = sNode.y0; +numMaybe = sNode.y1; numMaybe = sNode.value; +numMaybe = sNode.index; +numMaybe = sNode.depth; +numMaybe = sNode.height; let linksArrMaybe: SLink[] | undefined; @@ -232,6 +385,7 @@ linksArrMaybe = sNode.targetLinks; // Sankey Link -------------------------------------------------------------- +sLinks = sGraph.links; let sLink = sLinks[0]; // User-specified extra properties: @@ -246,13 +400,14 @@ num = sLink.value; // layout(...) was invoked, the source and target nodes may be numbers // objects without the Sankey layout coordinates, or objects with calculated // information -let numOrSankeyNode: number | SNode; +let numStringOrSankeyNode: number | string | SNode; -numOrSankeyNode = sLink.source; -numOrSankeyNode = sLink.target; +numStringOrSankeyNode = sLink.source; +numStringOrSankeyNode = sLink.target; // Sankey Layout calculated (if layout has been run, otherwise undefined): -numMaybe = sLink.sy; -numMaybe = sLink.ty; -numMaybe = sLink.dy; +numMaybe = sLink.y0; +numMaybe = sLink.y1; +numMaybe = sLink.width; +numMaybe = sLink.index; diff --git a/types/d3-sankey/index.d.ts b/types/d3-sankey/index.d.ts index 1446bc917f..46a80b2671 100644 --- a/types/d3-sankey/index.d.ts +++ b/types/d3-sankey/index.d.ts @@ -1,14 +1,16 @@ -// Type definitions for D3JS d3-sankey module 0.4 +// Type definitions for D3JS d3-sankey module 0.7 // Project: https://github.com/d3/d3-sankey/ // Definitions by: Tom Wanzek , Alex Ford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 0.4.2 +// Last module patch version validated against: 0.7 + +import { Link } from 'd3-shape'; /** * A helper interface as an extension reference for user-provided properties of * nodes and links in the graph, which are not required or calculated by - * the Sankey Layout Generator + * the Sankey layout Generator */ export interface SankeyExtraProperties { [key: string]: any; } @@ -26,35 +28,48 @@ export interface SankeyExtraProperties { [key: string]: any; } */ export interface SankeyNodeMinimal { /** - * Array of links which have this node as their source. + * Array of outgoing links which have this node as their source. * This property is calculated internally by the Sankey layout generator. */ sourceLinks?: Array>; /** - * Array of links which have this node as their target. + * Array of incoming links which have this node as their target. * This property is calculated internally by the Sankey layout generator. */ targetLinks?: Array>; /** - * Node value calculated by Sankey Layout Generator based on values of incoming and outgoing links + * Node's value calculated by Sankey layout Generator; + * the sum of link.value for the node’s incoming links. */ value?: number; /** - * Node horizontal position calculated by Sankey layout generator + * Node’s zero-based index within the array of nodes calculated by Sankey layout generator. */ - x?: number; + index?: number; /** - * Node width calculated by Sankey layout generator + * Node’s zero-based graph depth, derived from the graph topology calculated by Sankey layout generator. */ - dx?: number; + depth?: number; /** - * Node vertical position (depth) calculated by Sankey layout generator + * Node’s zero-based graph height, derived from the graph topology calculated by Sankey layout generator. */ - y?: number; + height?: number; /** - * Node height (vertical extent based on node value) calculated by Sankey layout generator + * Node's minimum horizontal position (derived from the node.depth) calculated by Sankey layout generator. */ - dy?: number; + x0?: number; + /** + * Node’s maximum horizontal position (node.x0 + sankey.nodeWidth) calculated by Sankey layout generator. + */ + x1?: number; + /** + * Node's minimum vertical position calculated by Sankey layout generator. + */ + y0?: number; + /** + * Node's maximum vertical position (node.y1 - node.y0 is proportional to node.value) calculated by Sankey layout generator. + */ + y1?: number; } /** @@ -85,33 +100,45 @@ export type SankeyNode { /** - * Source node of the link. For convenience, when initializing a Sankey layout, source may be the index of the source node in the nodes array - * passed into the Sankey layout generator. Once the layout(...) method is invoked, the numeric index will be replaced with the corresponding - * source node object. + * Link's source node. For convenience, when initializing a Sankey layout using the default node id accessor, + * source may be the zero-based index of the corresponding node in the nodes array + * returned by the nodes accessor of the Sankey layout generator rather than object references. Alternatively, + * the Sankey layout can be configured with a custom node ID accessor to resolve the source node of the link upon initialization. + * + * Once the Sankey generator is invoked to return the Sankey graph object, + * the numeric index will be replaced with the corresponding source node object. */ - source: number | SankeyNode; + source: number | string | SankeyNode; /** - * Target node of the link. For convenience, when initializing a Sankey layout, target may be the index of the target node in the nodes array - * passed into the Sankey layout generator. Once the layout(...) method is invoked, the numeric index will be replaced with the corresponding - * target node object. + * Link's target node. For convenience, when initializing a Sankey layout using the default node id accessor, + * target may be the zero-based index of the corresponding node in the nodes array + * returned by the nodes accessor of the Sankey layout generator rather than object references. Alternatively, + * the Sankey layout can be configured with a custom node ID accessor to resolve the target node of the link upon initialization. + * + * Once the Sankey generator is invoked to return the Sankey graph object, + * the numeric index will be replaced with the corresponding target node object. */ - target: number | SankeyNode; + target: number | string | SankeyNode; /** - * Value of the link + * Link's numeric value */ value: number; /** - * Link breadth calculated by Sankey layout generator based on the link value + * Link's vertical starting position (at source node) calculated by Sankey layout generator. */ - dy?: number; + y0?: number; /** - * Vertical starting position of the link (at source node) calculated by Sankey layout generator + * Link's vertical end position (at target node) calculated by Sankey layout generator. */ - sy?: number; + y1?: number; /** - * Vertical end position of the link (at target node) calculated by Sankey layout generator + * Link's width (proportional to its value) calculated by Sankey layout generator. */ - ty?: number; + width?: number; + /** + * Link's zero-based index within the array of links calculated by Sankey layout generator. + */ + index?: number; } /** @@ -129,32 +156,7 @@ export interface SankeyLinkMinimal = L & SankeyLinkMinimal; /** - * An svg path generator factory for the link paths in a calculated Sankey Layout. - */ -export interface SankeyLinkPathGenerator { - /** - * Return svg path string for a given link. - * - * IMPORTANT: Only invoke for link data with Sankey Layout information previously calculated. - * - * @param link A Sankey diagram link, for which the layout has already been calculated. - */ - (link: SankeyLink): string; - /** - * Returns the current curvature used to calculate svg paths for links. - * The default curvature is 0.5. - */ - curvature(): number; - /** - * Set the curvature used to calculate svg paths for links and return the updated link path generator. - * - * @param curvature Curvature to be used when calculating svg paths for links. The default curvature is 0.5. - */ - curvature(curvature: number): this; -} - -/** - * A Sankey layout generator. + * A Sankey Graph Object which contains the computed layout information for nodes and links. * * The first generic N refers to user-defined properties contained in the node data passed into * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the @@ -164,7 +166,118 @@ export interface SankeyLinkPathGenerator { +export interface SankeyGraph { + /** + * Array of Sankey diagram nodes + */ + nodes: Array>; + /** + * Array of Sankey diagram links + */ + links: Array>; +} + +/** + * A Sankey layout generator. + * + * The first generic Data refers to the data type of the first argument passed in when invoking the + * Sankey layout generator and internally the configured nodes/links accessor functions. + * + * The second generic N refers to user-defined properties contained in the node data passed into + * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the + * SankeyNodeMinimal interface. + * + * The third generic L refers to user-defined properties contained in the link data passed into + * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the + * SankeyLinkMinimal interface. + */ +export interface SankeyLayout { + /** + * Computes the node and link positions for the given arguments, returning a graph representing the Sankey layout. + * + * @param data Data object being passed as the first argument to the nodes and links accessor functions. Additional arguments will also be passed + * to the accessor functions. + */ + (data: Data, ...args: any[]): SankeyGraph; + + /** + * Recomputes the specified graph’s links’ positions, updating the following properties of each link: + * + * - link.sy: the link’s vertical starting position (at source node) + * - link.ty: the link’s vertical end position (at target node) + * + * This method is intended to be called after computing the initial Sankey layout, for example when the diagram is repositioned interactively. + * + * @param graph + */ + update(graph: SankeyGraph): SankeyGraph; + + /** + * Return the current nodes accessor function, which defaults to a function returning the "nodes" property of the + * first argument it is invoked with. + */ + nodes(): (data: Data, ...args: any[]) => Array>; + /** + * Set the Sankey generator's nodes accessor to a function returning the specified array of objects and returns this Sankey layout generator. + * + * @param nodes Array of nodes. + */ + nodes(nodes: Array>): this; + /** + * Set the Sankey generator's nodes accessor to the specified function and returns this Sankey layout generator. + * + * @param nodes A nodes accessor function. The function is invoked when the Sankey layout is generated, being passed any arguments passed to the Sankey generator. + * This function must return an array of nodes. + */ + nodes(nodes: (data: Data, ...args: any[]) => Array>): this; + + /** + * Return the current links accessor function, which defaults to a function returning the "links" property of the + * first argument it is invoked with. + */ + links(): (data: Data, ...args: any[]) => Array>; + /** + * Set the Sankey generator's links accessor to a function returning the specified array of objects and returns this Sankey layout generator. + * + * @param links Array of links. + */ + links(links: Array>): this; + /** + * Set the Sankey generator's links accessor to the specified function and returns this Sankey layout generator. + * + * @param links A links accessor function. The function is invoked when the Sankey layout is generated, being passed any arguments passed to the Sankey generator. + * This function must return an array of links. + */ + links(links: (data: Data, ...args: any[]) => Array>): this; + + /** + * Return the current node id accessor. + * The default accessor is a function being passed in a Sankey layout node and returning its numeric node.index. + */ + nodeId(): (node: SankeyNode) => string | number; + /** + * Set the node id accessor to the specified function and return this Sankey layout generator. + * + * The default accessor is a function being passed in a Sankey layout node and returning its numeric node.index. + * The default id accessor allows each link’s source and target to be specified as a zero-based index into the nodes array. + * + * @param nodeId A node id accessor function being passed a node in the Sankey graph and returning its id. + */ + nodeId(nodeId: (node: SankeyNode) => string | number): this; + + /** + * Return the current node alignment method, which defaults to d3.sankeyLeft. + */ + nodeAlign(): (node: SankeyNode, n: number) => number; + /** + * Set the node alignment method the specified function and return this Sankey layout generator. + * + * @param nodeAlign A node alignment function which is evaluated for each input node in order, + * being passed the current node and the total depth n of the graph (one plus the maximum node.depth), + * and must return an integer between 0 and n - 1 that indicates the desired horizontal position of the node in the generated Sankey diagram. + */ + nodeAlign(nodeAlign: (node: SankeyNode, n: number) => number): this; + /** * Return the current node width, which defaults to 24. */ @@ -183,48 +296,23 @@ export interface SankeyLayout>; + extent(): [[number, number], [number, number]]; /** - * Set the sankey generator's nodes to the specified array of objects and returns this sankey layout generator. + * Set the extent of the Sankey layout to the specified bounds and returns this Sankey layout generator. * - * @param nodes Array of nodes. + * @param extent Extent bounds for the layout. The extent bounds are specified as an array [[x0, y0], [x1, y1]], + * where x0 is the left side of the extent, y0 is the top, x1 is the right and y1 is the bottom. The default is [[0, 0], [1, 1]]. */ - nodes(nodes: Array>): this; - - /** - * Return the current array of links, which defaults to []. - */ - links(): Array>; - /** - * Set the sankey generator's links to the specified array of objects and returns this sankey layout generator. - * - * @param links Array of links. - */ - links(links: Array>): this; - - /** - * Runs the sankey layout algorithm updating the nodes and links with their respective layout information and returns this sankey generator. - * - * @param iterations Number of passes to be used in the iterative relaxation algorithm for node placement. - */ - layout(iterations: number): this; - - /** - * Recalculate the depth of links and return this Sankey layout generator. - * This methods is primarily used when a node is moved vertically, e.g. using d3-drag. - */ - relayout(): this; + extent(extent: [[number, number], [number, number]]): this; /** * Return the current layout size in pixels. The size is a two element array of [width, height] which defaults to [1, 1]. @@ -232,18 +320,22 @@ export interface SankeyLayout path string for the link. - * By default the link path generator uses a curvature of 0.5. + * Return the current number of relaxation iterations, which defaults to 32. */ - link(): SankeyLinkPathGenerator; + iterations(): number; + /** + * Set the number of relaxation iterations when generating the layout and return this Sankey layout generator. + * + * @param iterations Number of relaxation iterations, which defaluts to 32. + */ + iterations(iterations: number): this; } /** @@ -251,11 +343,15 @@ export interface SankeyLayout; +export function sankey(): SankeyLayout, {}, {}>; /** * Get a Sankey layout generator. * + * Default nodes/links accessors are assumed. + * * The first generic N refers to user-defined properties contained in the node data passed into * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the * SankeyNodeMinimal interface. @@ -264,4 +360,81 @@ export function sankey(): SankeyLayout<{}, {}>; * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the * SankeyLinkMinimal interface. */ -export function sankey(): SankeyLayout; +export function sankey(): SankeyLayout, N, L>; +/** + * Get a Sankey layout generator. + * + * The nodes/links accessors need to be configured to work with the data type of the first argument passed + * in when invoking the Sankey lyout generator. + * + * The first generic corresponds to the data type of the first argument passed in when invoking the Sankey layout generator, + * and its nodes/links accessors. + * + * The second generic N refers to user-defined properties contained in the node data passed into + * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the + * SankeyNodeMinimal interface. + * + * The third generic L refers to user-defined properties contained in the link data passed into + * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the + * SankeyLinkMinimal interface. + */ +export function sankey(): SankeyLayout; + +/** + * Compute the horizontal node position of a node in a Sankey layout with left alignment. + * Returns (node.depth) to indicate the desired horizontal position of the node in the generated Sankey diagram. + * + * @param node Sankey node for which to calculate the horizontal node position. + * @param n Total depth n of the graph (one plus the maximum node.depth) + */ +export function sankeyLeft(node: SankeyNode<{}, {}>, n: number): number; + +/** + * Compute the horizontal node position of a node in a Sankey layout with right alignment. + * Returns (n - 1 - node.height) to indicate the desired horizontal position of the node in the generated Sankey diagram. + * + * @param node Sankey node for which to calculate the horizontal node position. + * @param n Total depth n of the graph (one plus the maximum node.depth) + */ +export function sankeyRight(node: SankeyNode<{}, {}>, n: number): number; + +/** + * Compute the horizontal node position of a node in a Sankey layout with center alignment. + * Like d3.sankeyLeft, except that nodes without any incoming links are moved as right as possible. + * Returns an integer between 0 and n - 1 that indicates the desired horizontal position of the node in the generated Sankey diagram. + * + * @param node Sankey node for which to calculate the horizontal node position. + * @param n Total depth n of the graph (one plus the maximum node.depth) + */ +export function sankeyCenter(node: SankeyNode<{}, {}>, n: number): number; + +/** + * Compute the horizontal node position of a node in a Sankey layout with justified alignment. + * Like d3.sankeyLeft, except that nodes without any outgoing links are moved to the far right. + * Returns an integer between 0 and n - 1 that indicates the desired horizontal position of the node in the generated Sankey diagram. + * + * @param node Sankey node for which to calculate the horizontal node position. + * @param n Total depth n of the graph (one plus the maximum node.depth) + */ +export function sankeyJustify(node: SankeyNode<{}, {}>, n: number): number; + +/** + * Get a horizontal link shape suitable for a Sankey diagram. + * Source and target accessors are pre-configured and work with the + * default x- and y- accessors of the link shape generator. + */ +export function sankeyLinkHorizontal(): Link, [number, number]>; +/** + * Get a horizontal link shape suitable for a Sankey diagram. + * Source and target accessors are pre-configured and work with the + * default x- and y- accessors of the link shape generator. + * + * The first generic N refers to user-defined properties contained in the node data passed into + * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the + * SankeyNodeMinimal interface. + * + * The second generic L refers to user-defined properties contained in the link data passed into + * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the + * SankeyLinkMinimal interface. + */ +export function sankeyLinkHorizontal(): Link, [number, number]>; diff --git a/types/d3-scale-chromatic/index.d.ts b/types/d3-scale-chromatic/index.d.ts index 8550b3b55c..450d103259 100644 --- a/types/d3-scale-chromatic/index.d.ts +++ b/types/d3-scale-chromatic/index.d.ts @@ -1,91 +1,217 @@ -// Type definitions for D3JS d3-scale-chromatic module v1.0.2 +// Type definitions for D3JS d3-scale-chromatic module 1.0 // Project: https://github.com/d3/d3-scale-chromatic/ // Definitions by: Hugues Stefanski , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.0.2 + // ----------------------------------------------------------------------- // Categorical // ----------------------------------------------------------------------- -/**An array of eight categorical colors represented as RGB hexadecimal strings. */ -export const schemeAccent: Array; -/**An array of eight categorical colors represented as RGB hexadecimal strings. */ -export const schemeDark2: Array; -/**An array of twelve categorical colors represented as RGB hexadecimal strings. */ -export const schemePaired: Array; -/**An array of nine categorical colors represented as RGB hexadecimal strings. */ -export const schemePastel1: Array; -/**An array of eight categorical colors represented as RGB hexadecimal strings. */ -export const schemePastel2: Array; -/**An array of nine categorical colors represented as RGB hexadecimal strings. */ -export const schemeSet1: Array; -/**An array of eight categorical colors represented as RGB hexadecimal strings. */ -export const schemeSet2: Array; -/**An array of twelve categorical colors represented as RGB hexadecimal strings. */ -export const schemeSet3: Array; +/** + * An array of eight categorical colors represented as RGB hexadecimal strings. + */ +export const schemeAccent: string[]; +/** + * An array of eight categorical colors represented as RGB hexadecimal strings. + */ +export const schemeDark2: string[]; +/** + * An array of twelve categorical colors represented as RGB hexadecimal strings. + */ +export const schemePaired: string[]; +/** + * An array of nine categorical colors represented as RGB hexadecimal strings. + */ +export const schemePastel1: string[]; +/** + * An array of eight categorical colors represented as RGB hexadecimal strings. + */ +export const schemePastel2: string[]; +/** + * An array of nine categorical colors represented as RGB hexadecimal strings. + */ +export const schemeSet1: string[]; +/** + * An array of eight categorical colors represented as RGB hexadecimal strings. + */ +export const schemeSet2: string[]; +/** + * An array of twelve categorical colors represented as RGB hexadecimal strings. + */ +export const schemeSet3: string[]; // ----------------------------------------------------------------------- // Diverging // ----------------------------------------------------------------------- -/**Given a number value in the range [0,1], returns the corresponding color from the “BrBG” diverging color scheme represented as an RGB string. */ +/** + * Given a number value in the range [0,1], returns the corresponding color from the “BrBG” diverging color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateBrBG(value: number): string; -/** Given a number t in the range [0,1], returns the corresponding color from the “PRGn” diverging color scheme represented as an RGB string.*/ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “PRGn” diverging color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolatePRGn(value: number): string; -/** Given a number t in the range [0,1], returns the corresponding color from the “PiYG” diverging color scheme represented as an RGB string.*/ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “PiYG” diverging color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolatePiYG(value: number): string; -/** Given a number t in the range [0,1], returns the corresponding color from the “PuOr” diverging color scheme represented as an RGB string.*/ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “PuOr” diverging color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolatePuOr(value: number): string; -/** Given a number t in the range [0,1], returns the corresponding color from the “RdBu” diverging color scheme represented as an RGB string.*/ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “RdBu” diverging color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateRdBu(value: number): string; -/** Given a number t in the range [0,1], returns the corresponding color from the “RdGy” diverging color scheme represented as an RGB string.*/ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “RdGy” diverging color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateRdGy(value: number): string; -/** Given a number t in the range [0,1], returns the corresponding color from the “RdYlBu” diverging color scheme represented as an RGB string.*/ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “RdYlBu” diverging color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateRdYlBu(value: number): string; -/** Given a number t in the range [0,1], returns the corresponding color from the “RdYlGn” diverging color scheme represented as an RGB string.*/ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “RdYlGn” diverging color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateRdYlGn(value: number): string; -/** Given a number t in the range [0,1], returns the corresponding color from the “Spectral” diverging color scheme represented as an RGB string.*/ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “Spectral” diverging color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateSpectral(value: number): string; // ----------------------------------------------------------------------- // Sequential // ----------------------------------------------------------------------- -/**Given a number t in the range [0,1], returns the corresponding color from the “Blues” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “Blues” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateBlues(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “Greens” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “Greens” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateGreens(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “Greys” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “Greys” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateGreys(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “Oranges” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “Oranges” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateOranges(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “Purples” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “Purples” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolatePurples(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “Reds” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “Reds” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateReds(value: number): string; // ----------------------------------------------------------------------- // Sequential(Multi-Hue) // ----------------------------------------------------------------------- -/**Given a number t in the range [0,1], returns the corresponding color from the “BuGn” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “BuGn” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateBuGn(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “BuPu” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “BuPu” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateBuPu(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “GnBu” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “GnBu” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateGnBu(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “OrRd” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “OrRd” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateOrRd(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “PuBuGn” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “PuBuGn” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolatePuBuGn(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “PuBu” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “PuBu” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolatePuBu(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “PuRd” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “PuRd” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolatePuRd(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “RdPu” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “RdPu” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateRdPu(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “YlGnBu” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “YlGnBu” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateYlGnBu(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “YlGn” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “YlGn” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateYlGn(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “YlOrBr” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “YlOrBr” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateYlOrBr(value: number): string; -/**Given a number t in the range [0,1], returns the corresponding color from the “YlOrRd” sequential color scheme represented as an RGB string. */ +/** + * Given a number t in the range [0,1], returns the corresponding color from the “YlOrRd” sequential color scheme represented as an RGB string. + * + * @param value Number in the range [0, 1]. + */ export function interpolateYlOrRd(value: number): string; diff --git a/types/d3-scale-chromatic/tslint.json b/types/d3-scale-chromatic/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-scale-chromatic/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-scale/index.d.ts b/types/d3-scale/index.d.ts index 8a114d90e1..38e204a6ea 100644 --- a/types/d3-scale/index.d.ts +++ b/types/d3-scale/index.d.ts @@ -17,8 +17,6 @@ import { CountableTimeInterval, TimeInterval } from 'd3-time'; * The first generic correponds to the data type of the interpolation boundaries. * The second generic corresponds to the data type of the return type of the interpolator. */ -// This is a base interface to be extended, hence the suppression of the warning -// tslint:disable-next-line:callable-types export interface InterpolatorFactory { /** * Construct a new interpolator function, based on the provided interpolation boundaries. @@ -628,7 +626,7 @@ export interface ScaleIdentity { * * @param range Array of range values. */ - range(range: Array): this; + range(range: Array): this; /** * Returns approximately count representative values from the scale’s domain. @@ -1299,7 +1297,7 @@ export interface ScaleQuantile { * * @param domain Array of domain values. */ - domain(domain: Array): this; + domain(domain: Array): this; /** * Returns the current range. diff --git a/types/d3-scale/tslint.json b/types/d3-scale/tslint.json index 08b1465cd6..604d5950cf 100644 --- a/types/d3-scale/tslint.json +++ b/types/d3-scale/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "unified-signatures": false + "unified-signatures": false, + "callable-types": false } } diff --git a/types/d3-selection/d3-selection-tests.ts b/types/d3-selection/d3-selection-tests.ts index 0b2dec77c2..baae76bad2 100644 --- a/types/d3-selection/d3-selection-tests.ts +++ b/types/d3-selection/d3-selection-tests.ts @@ -1036,6 +1036,13 @@ positions = d3Selection.touches(svg, changedTouches); positions = d3Selection.touches(g, changedTouches); positions = d3Selection.touches(h, changedTouches); +// --------------------------------------------------------------------------------------- +// Tests of style +// --------------------------------------------------------------------------------------- + +declare let n: Element; +str = d3Selection.style(n, 'opacity'); + // --------------------------------------------------------------------------------------- // Tests of Local // --------------------------------------------------------------------------------------- diff --git a/types/d3-selection/index.d.ts b/types/d3-selection/index.d.ts index ef164164cf..abbb14db0f 100644 --- a/types/d3-selection/index.d.ts +++ b/types/d3-selection/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for D3JS d3-selection module 1.0 +// Type definitions for D3JS d3-selection module 1.1 // Project: https://github.com/d3/d3-selection/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.0.2 +// Last module patch version validated against: 1.1 // -------------------------------------------------------------------------- // Shared Type Definitions and Interfaces @@ -194,7 +194,7 @@ export interface Selection(selector: ValueFn): Selection; @@ -241,7 +241,7 @@ export interface Selection(selector: ValueFn>): Selection; @@ -276,7 +276,7 @@ export interface Selection): this; @@ -304,16 +304,15 @@ export interface Selection): this; /** - * Returns the current computed value of the specified style for the first (non-null) element in the selection. - * This is generally useful only if you know that the selection contains exactly one element. - * The computed value may be different than the previously-set value, particularly if it was set using a - * shorthand property (such as the font style, which is shorthand for font-size, font-face, etc.). + * Returns the current value of the specified style property for the first (non-null) element in the selection. + * The current value is defined as the element’s inline value, if present, and otherwise its computed value. + * Accessing the current style value is generally useful only if you know the selection contains exactly one element. * * @param name Name of the style */ @@ -340,7 +339,7 @@ export interface Selection, priority?: null | 'important'): this; @@ -367,7 +366,7 @@ export interface Selection): this; /** @@ -423,7 +422,7 @@ export interface Selection): this; @@ -449,16 +448,17 @@ export interface Selection): this; /** - * Appends a new element of the specified type (tag name) as the last child of each selected element, or the next - * following sibling in the update selection if this is an enter selection. - * (The enter behavior allows you to insert elements into the DOM in an order consistent with bound data; - * however, the slower selection.order may still be required if updating elements change order.) + * Appends a new element of this type (tag name) as the last child of each selected element, + * or before the next following sibling in the update selection if this is an enter selection. + * The latter behavior for enter selections allows you to insert elements into the DOM in an order consistent with the new bound data; + * however, note that selection.order may still be required if updating elements change order + * (i.e., if the order of new data is inconsistent with old data). * * This method returns a new selection containing the appended elements. * Each new element inherits the data of the current elements, if any. @@ -472,10 +472,11 @@ export interface Selection(type: string): Selection; /** - * Appends a new element of the type provided by the element creator function as the last child of each selected element, - * or the next following sibling in the update selection if this is an enter selection. - * (The enter behavior allows you to insert elements into the DOM in an order consistent with bound data; - * however, the slower selection.order may still be required if updating elements change order.) + * Appends a new element of the type provided by the element creator functionas the last child of each selected element, + * or before the next following sibling in the update selection if this is an enter selection. + * The latter behavior for enter selections allows you to insert elements into the DOM in an order consistent with the new bound data; + * however, note that selection.order may still be required if updating elements change order + * (i.e., if the order of new data is inconsistent with old data). * * This method returns a new selection containing the appended elements. * Each new element inherits the data of the current elements, if any. @@ -483,14 +484,15 @@ export interface Selection(type: ValueFn): Selection; /** - * Inserts a new element of the specified type (tag name) before the element matching the specified "before" - * selector string for each selected element. + * Inserts a new element of the specified type (tag name) before the first element matching the specified + * before selector for each selected element. For example, a before selector :first-child will prepend nodes before the first child. + * If before is not specified, it defaults to null. (To append elements in an order consistent with bound data, use selection.append.) * * This method returns a new selection containing the appended elements. * Each new element inherits the data of the current elements, if any. @@ -503,12 +505,12 @@ export interface Selection( @@ -572,7 +574,7 @@ export interface Selection): Selection; @@ -584,7 +586,7 @@ export interface Selection(selector: ValueFn): Selection; @@ -639,7 +641,7 @@ export interface Selection(value: ValueFn): Selection; @@ -659,7 +661,7 @@ export interface Selection): this; @@ -810,11 +812,11 @@ export interface Selection): this; @@ -970,6 +972,20 @@ export function touch(container: ContainerElement, touches: TouchList, identifie */ export function touches(container: ContainerElement, touches?: TouchList): Array<[number, number]>; +// --------------------------------------------------------------------------- +// style +// --------------------------------------------------------------------------- + +/** + * Returns the value of the style property with the specified name for the specified node. + * If the node has an inline style with the specified name, its value is returned; otherwise, the computed property value is returned. + * See also selection.style. + * + * @param node A DOM node (e.g. HTMLElement, SVGElement) for which to retrieve the style property. + * @param name Style property name. + */ +export function style(node: Element, name: string): string; + // --------------------------------------------------------------------------- // local.js related // --------------------------------------------------------------------------- diff --git a/types/d3-shape/d3-shape-tests.ts b/types/d3-shape/d3-shape-tests.ts index 5b322772b6..6e0fa97d96 100644 --- a/types/d3-shape/d3-shape-tests.ts +++ b/types/d3-shape/d3-shape-tests.ts @@ -358,14 +358,14 @@ interface LineDatum { let lineXYAccessorFn: (d: LineDatum, index?: number, data?: LineDatum[]) => number; let lineDefAccessorFn: (d: LineDatum, index?: number, data?: LineDatum[]) => boolean; -interface RadialLineDatum { +interface LineRadialDatum { angle: number; radius: number; missing: boolean; } -let radialLineAngRAccessorFn: (d: RadialLineDatum, index?: number, data?: RadialLineDatum[]) => number; -let radialLineDefAccessorFn: (d: RadialLineDatum, index?: number, data?: RadialLineDatum[]) => boolean; +let lineRadialAngRAccessorFn: (d: LineRadialDatum, index?: number, data?: LineRadialDatum[]) => number; +let lineRadialDefAccessorFn: (d: LineRadialDatum, index?: number, data?: LineRadialDatum[]) => boolean; // line(...) create Line generator ===================================================== @@ -440,77 +440,85 @@ const lineData: LineDatum[] = [ const linePathStringMaybe: string | null = line(lineData); -// radialLine(...) create Line generator ===================================================== +// lineRadial(...) create Line generator ===================================================== -let defaultRadialLine: d3Shape.RadialLine<[number, number]> = d3Shape.radialLine(); -let radialLine: d3Shape.RadialLine = d3Shape.radialLine(); +let defaultLineRadial: d3Shape.LineRadial<[number, number]> = d3Shape.lineRadial(); +let lineRadial: d3Shape.LineRadial = d3Shape.lineRadial(); -// configure RadialLine(...) generator ====================================================== +// DEPRECATED Naming conventions test (cross-testing with new naming conventions) + +let defaultRadialLine: d3Shape.RadialLine<[number, number]> = defaultLineRadial; +let radialLine: d3Shape.RadialLine = lineRadial; + +defaultLineRadial = d3Shape.radialLine(); +lineRadial = d3Shape.radialLine(); + +// configure LineRadial(...) generator ====================================================== // context(...) ---------------------------------------------------------------------- if (context !== null) { - defaultRadialLine = defaultRadialLine.context(context); // draw to canvas + defaultLineRadial = defaultLineRadial.context(context); // draw to canvas } -context = defaultRadialLine.context(); +context = defaultLineRadial.context(); -radialLine = radialLine.context(null); // use as path string generator for SVG +lineRadial = lineRadial.context(null); // use as path string generator for SVG // angle(...) ---------------------------------------------------------------------------- -defaultRadialLine = defaultRadialLine.angle(Math.PI); +defaultLineRadial = defaultLineRadial.angle(Math.PI); -radialLine = radialLine.angle((d, t, data) => { +lineRadial = lineRadial.angle((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('Angle of first point: ', data[0].angle); // data type is Array - return d.angle; // d type is RadialLineDatum + console.log('Angle of first point: ', data[0].angle); // data type is Array + return d.angle; // d type is LineRadialDatum }); -radialLineAngRAccessorFn = radialLine.angle(); +lineRadialAngRAccessorFn = lineRadial.angle(); // radius(...) ---------------------------------------------------------------------------- -defaultRadialLine = defaultRadialLine.radius(30); +defaultLineRadial = defaultLineRadial.radius(30); -radialLine = radialLine.radius((d, t, data) => { +lineRadial = lineRadial.radius((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('Angle of first point: ', data[0].angle); // data type is Array - return d.radius; // d type is RadialLineDatum + console.log('Angle of first point: ', data[0].angle); // data type is Array + return d.radius; // d type is LineRadialDatum }); -radialLineAngRAccessorFn = radialLine.radius(); +lineRadialAngRAccessorFn = lineRadial.radius(); // defined(...) ---------------------------------------------------------------------- -defaultRadialLine = defaultRadialLine.defined(true); +defaultLineRadial = defaultLineRadial.defined(true); -radialLine = radialLine.defined((d, t, data) => { +lineRadial = lineRadial.defined((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('Angle of first point: ', data[0].angle); // data type is Array - return !d.missing; // d type is RadialLineDatum + console.log('Angle of first point: ', data[0].angle); // data type is Array + return !d.missing; // d type is LineRadialDatum }); -radialLineDefAccessorFn = radialLine.defined(); +lineRadialDefAccessorFn = lineRadial.defined(); // curve(...) ------------------------------------------------------------------------ -defaultRadialLine = defaultRadialLine.curve(d3Shape.curveLinear); +defaultLineRadial = defaultLineRadial.curve(d3Shape.curveLinear); -radialLine = radialLine.curve(d3Shape.curveBundle.beta(0.5)); +lineRadial = lineRadial.curve(d3Shape.curveBundle.beta(0.5)); -currentCurveFactory = radialLine.curve(); +currentCurveFactory = lineRadial.curve(); -// use RadialLine generator =============================================================== +// use LineRadial generator =============================================================== -defaultRadialLine([[10, 10], [20, 10], [20, 20]]); +defaultLineRadial([[10, 10], [20, 10], [20, 20]]); -const radialLineData: RadialLineDatum[] = [ +const lineRadialData: LineRadialDatum[] = [ { angle: 0, radius: 10, missing: false }, { angle: Math.PI / 2, radius: 20, missing: false }, { angle: 2 * Math.PI, radius: 10, missing: false } ]; -const radialLinePathStringMaybe: string | null = radialLine(radialLineData); +const lineRadialPathStringMaybe: string | null = lineRadial(lineRadialData); // ----------------------------------------------------------------------------------- // Test Area Generators @@ -528,7 +536,7 @@ let areaXYAccessorFn: (d: AreaDatum, index?: number, data?: AreaDatum[]) => numb let areaXYAccessorFnMaybe: null | ((d: AreaDatum, index?: number, data?: AreaDatum[]) => number); let areaDefAccessorFn: (d: AreaDatum, index?: number, data?: AreaDatum[]) => boolean; -interface RadialAreaDatum { +interface AreaRadialDatum { startAngle: number; endAngle: number; innerRadius: number; @@ -536,9 +544,9 @@ interface RadialAreaDatum { missing: boolean; } -let radialAreaAngRAccessorFn: (d: RadialAreaDatum, index?: number, data?: RadialAreaDatum[]) => number; -let radialAreaAngRAccessorFnMaybe: null | ((d: RadialAreaDatum, index?: number, data?: RadialAreaDatum[]) => number); -let radialAreaDefAccessorFn: (d: RadialAreaDatum, index?: number, data?: RadialAreaDatum[]) => boolean; +let areaRadialAngRAccessorFn: (d: AreaRadialDatum, index?: number, data?: AreaRadialDatum[]) => number; +let areaRadialAngRAccessorFnMaybe: null | ((d: AreaRadialDatum, index?: number, data?: AreaRadialDatum[]) => number); +let areaRadialDefAccessorFn: (d: AreaRadialDatum, index?: number, data?: AreaRadialDatum[]) => boolean; // area(...) create Area generator ===================================================== @@ -670,135 +678,143 @@ areaLineGenerator = area.lineY0(); areaLineGenerator = area.lineX1(); areaLineGenerator = area.lineY1(); -// radialArea(...) create RadialArea generator ===================================================== +// areaRadial(...) create AreaRadial generator ===================================================== -let defaultRadialArea: d3Shape.RadialArea<[number, number]> = d3Shape.radialArea(); -let radialArea: d3Shape.RadialArea = d3Shape.radialArea(); +let defaultAreaRadial: d3Shape.AreaRadial<[number, number]> = d3Shape.areaRadial(); +let areaRadial: d3Shape.AreaRadial = d3Shape.areaRadial(); -// configure RadialArea(...) generator ====================================================== +// DEPRECATED Naming conventions test (cross-testing with new naming conventions) + +let defaultRadialArea: d3Shape.RadialArea<[number, number]> = defaultAreaRadial; +let radialArea: d3Shape.RadialArea = areaRadial; + +defaultAreaRadial = d3Shape.radialArea(); +areaRadial = d3Shape.radialArea(); + +// configure AreaRadial(...) generator ====================================================== // context(...) ---------------------------------------------------------------------- if (context !== null) { - defaultRadialArea = defaultRadialArea.context(context); // draw to canvas + defaultAreaRadial = defaultAreaRadial.context(context); // draw to canvas } -context = defaultRadialArea.context(); +context = defaultAreaRadial.context(); -radialArea = radialArea.context(null); // use as path string generator for SVG +areaRadial = areaRadial.context(null); // use as path string generator for SVG // angle(...) ---------------------------------------------------------------------------- -defaultRadialArea = defaultRadialArea.angle(Math.PI); +defaultAreaRadial = defaultAreaRadial.angle(Math.PI); -radialArea = radialArea.angle((d, t, data) => { +areaRadial = areaRadial.angle((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('Start angle of first point: ', data[0].startAngle); // data type is Array - return d.startAngle; // d type is RadialAreaDatum + console.log('Start angle of first point: ', data[0].startAngle); // data type is Array + return d.startAngle; // d type is AreaRadialDatum }); -radialAreaAngRAccessorFn = radialArea.angle(); +areaRadialAngRAccessorFn = areaRadial.angle(); // startAngle(...) ---------------------------------------------------------------------------- -defaultRadialArea = defaultRadialArea.startAngle(Math.PI); +defaultAreaRadial = defaultAreaRadial.startAngle(Math.PI); -radialArea = radialArea.startAngle((d, t, data) => { +areaRadial = areaRadial.startAngle((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('Start angle of first point: ', data[0].startAngle); // data type is Array - return d.startAngle; // d type is RadialAreaDatum + console.log('Start angle of first point: ', data[0].startAngle); // data type is Array + return d.startAngle; // d type is AreaRadialDatum }); -radialAreaAngRAccessorFn = radialArea.startAngle(); +areaRadialAngRAccessorFn = areaRadial.startAngle(); // endAngle(...) ---------------------------------------------------------------------------- -defaultRadialArea = defaultRadialArea.endAngle(Math.PI); +defaultAreaRadial = defaultAreaRadial.endAngle(Math.PI); -radialArea = radialArea.endAngle((d, t, data) => { +areaRadial = areaRadial.endAngle((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('End angle of first point: ', data[0].endAngle); // data type is Array - return d.endAngle; // d type is RadialAreaDatum + console.log('End angle of first point: ', data[0].endAngle); // data type is Array + return d.endAngle; // d type is AreaRadialDatum }); -radialAreaAngRAccessorFnMaybe = radialArea.endAngle(); +areaRadialAngRAccessorFnMaybe = areaRadial.endAngle(); // radius(...) ---------------------------------------------------------------------------- -defaultRadialArea = defaultRadialArea.radius(10); +defaultAreaRadial = defaultAreaRadial.radius(10); -radialArea = radialArea.radius((d, t, data) => { +areaRadial = areaRadial.radius((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('Inner radius of first point: ', data[0].innerRadius); // data type is Array - return d.innerRadius; // d type is RadialAreaDatum + console.log('Inner radius of first point: ', data[0].innerRadius); // data type is Array + return d.innerRadius; // d type is AreaRadialDatum }); -radialAreaAngRAccessorFn = radialArea.radius(); +areaRadialAngRAccessorFn = areaRadial.radius(); // innerRadius(...) ---------------------------------------------------------------------------- -defaultRadialArea = defaultRadialArea.innerRadius(10); +defaultAreaRadial = defaultAreaRadial.innerRadius(10); -radialArea = radialArea.innerRadius((d, t, data) => { +areaRadial = areaRadial.innerRadius((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('Inner radius of first point: ', data[0].innerRadius); // data type is Array - return d.innerRadius; // d type is RadialAreaDatum + console.log('Inner radius of first point: ', data[0].innerRadius); // data type is Array + return d.innerRadius; // d type is AreaRadialDatum }); -radialAreaAngRAccessorFn = radialArea.innerRadius(); +areaRadialAngRAccessorFn = areaRadial.innerRadius(); // outerRadius(...) ---------------------------------------------------------------------------- -defaultRadialArea = defaultRadialArea.outerRadius(20); +defaultAreaRadial = defaultAreaRadial.outerRadius(20); -radialArea = radialArea.outerRadius((d, t, data) => { +areaRadial = areaRadial.outerRadius((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('Outer radius of first point: ', data[0].outerRadius); // data type is Array - return d.outerRadius; // d type is RadialAreaDatum + console.log('Outer radius of first point: ', data[0].outerRadius); // data type is Array + return d.outerRadius; // d type is AreaRadialDatum }); -radialAreaAngRAccessorFnMaybe = radialArea.outerRadius(); +areaRadialAngRAccessorFnMaybe = areaRadial.outerRadius(); // defined(...) ---------------------------------------------------------------------- -defaultRadialArea = defaultRadialArea.defined(true); +defaultAreaRadial = defaultAreaRadial.defined(true); -radialArea = radialArea.defined((d, t, data) => { +areaRadial = areaRadial.defined((d, t, data) => { console.log('Number of Points: ', data.length); - console.log('Inner radius of first point: ', data[0].innerRadius); // data type is Array - return !d.missing; // d type is RadialAreaDatum + console.log('Inner radius of first point: ', data[0].innerRadius); // data type is Array + return !d.missing; // d type is AreaRadialDatum }); -radialAreaDefAccessorFn = radialArea.defined(); +areaRadialDefAccessorFn = areaRadial.defined(); // curve(...) ------------------------------------------------------------------------ -defaultRadialArea = defaultRadialArea.curve(d3Shape.curveLinear); +defaultAreaRadial = defaultAreaRadial.curve(d3Shape.curveLinear); -radialArea = radialArea.curve(d3Shape.curveCardinal.tension(0.5)); -// radialArea = radialArea.curve(d3Shape.curveBundle.beta(0.5)); // fails, as curveBundle-based line generator does not support area-related methods +areaRadial = areaRadial.curve(d3Shape.curveCardinal.tension(0.5)); +// areaRadial = areaRadial.curve(d3Shape.curveBundle.beta(0.5)); // fails, as curveBundle-based line generator does not support area-related methods -currentCurveFactory = radialArea.curve(); +currentCurveFactory = areaRadial.curve(); -// use RadialArea generator =============================================================== +// use AreaRadial generator =============================================================== -defaultRadialArea([[10, 10], [20, 10], [20, 20]]); +defaultAreaRadial([[10, 10], [20, 10], [20, 20]]); -const radialAreaData: RadialAreaDatum[] = [ +const areaRadialData: AreaRadialDatum[] = [ { startAngle: 0, innerRadius: 10, endAngle: 0, outerRadius: 30, missing: false }, { startAngle: Math.PI / 2, innerRadius: 20, endAngle: Math.PI / 2, outerRadius: 40, missing: false }, { startAngle: Math.PI, innerRadius: 30, endAngle: Math.PI, outerRadius: 30, missing: false } ]; -const radialAreaPathStringMaybe: string | null = radialArea(radialAreaData); +const areaRadialPathStringMaybe: string | null = areaRadial(areaRadialData); -// Get RadialLine Generators from RadialArea generator ======================================================== +// Get LineRadial Generators from AreaRadial generator ======================================================== -let areaRadialLineGenerator: d3Shape.RadialLine; +let areaLineRadialGenerator: d3Shape.LineRadial; -areaRadialLineGenerator = radialArea.lineStartAngle(); -areaRadialLineGenerator = radialArea.lineInnerRadius(); -areaRadialLineGenerator = radialArea.lineEndAngle(); -areaRadialLineGenerator = radialArea.lineOuterRadius(); +areaLineRadialGenerator = areaRadial.lineStartAngle(); +areaLineRadialGenerator = areaRadial.lineInnerRadius(); +areaLineRadialGenerator = areaRadial.lineEndAngle(); +areaLineRadialGenerator = areaRadial.lineOuterRadius(); // ----------------------------------------------------------------------------------- // Test Curve Factories @@ -902,7 +918,7 @@ curveFactory = d3Shape.curveStepAfter; curveFactory = d3Shape.curveStepBefore; // ----------------------------------------------------------------------------------- -// Test Link/RadialLink Generators +// Test Link/LinkRadial Generators // ----------------------------------------------------------------------------------- // Preparatory steps ================================================================= @@ -946,17 +962,17 @@ let svgLink: d3Shape.Link, Hie svgLink = d3Shape.linkHorizontal, HierarchyPointNode>(); svgLink = d3Shape.linkVertical, HierarchyPointNode>(); -let defaultRadialLink: d3Shape.RadialLink; +let defaultLinkRadial: d3Shape.LinkRadial; -defaultRadialLink = d3Shape.linkRadial(); +defaultLinkRadial = d3Shape.linkRadial(); -let radialLink: d3Shape.RadialLink, HierarchyPointNode>; +let radialLink: d3Shape.LinkRadial, HierarchyPointNode>; radialLink = d3Shape.linkRadial, HierarchyPointNode>(); -let svgRadialLink: d3Shape.RadialLink, HierarchyPointNode>; +let svgLinkRadial: d3Shape.LinkRadial, HierarchyPointNode>; -svgRadialLink = d3Shape.linkRadial, HierarchyPointNode>(); +svgLinkRadial = d3Shape.linkRadial, HierarchyPointNode>(); // Configure link generators ======================================================== @@ -987,20 +1003,20 @@ svgTreeNodeAccessor = svgLink.source(); // radial -defaultRadialLink = defaultRadialLink.source(d => { +defaultLinkRadial = defaultLinkRadial.source(d => { const datum: d3Shape.DefaultLinkObject = d; return d.source; }); -defaultNodeAccessor = defaultRadialLink.source(); +defaultNodeAccessor = defaultLinkRadial.source(); -svgRadialLink = svgRadialLink.source(function(d) { +svgLinkRadial = svgLinkRadial.source(function(d) { const that: SVGPathElement = this; const datum: HierarchyPointLink = d; return d.source; }); -svgTreeNodeAccessor = svgRadialLink.source(); +svgTreeNodeAccessor = svgLinkRadial.source(); // target(...) ----------------------------------------------------------------------- @@ -1023,20 +1039,20 @@ svgTreeNodeAccessor = svgLink.target(); // radial -defaultRadialLink = defaultRadialLink.target(d => { +defaultLinkRadial = defaultLinkRadial.target(d => { const datum: d3Shape.DefaultLinkObject = d; return d.target; }); -defaultNodeAccessor = defaultRadialLink.target(); +defaultNodeAccessor = defaultLinkRadial.target(); -svgRadialLink = svgRadialLink.target(function(d) { +svgLinkRadial = svgLinkRadial.target(function(d) { const that: SVGPathElement = this; const datum: HierarchyPointLink = d; return d.target; }); -svgTreeNodeAccessor = svgRadialLink.target(); +svgTreeNodeAccessor = svgLinkRadial.target(); // x(...) ---------------------------------------------------------------------------- @@ -1074,37 +1090,37 @@ svgCoordinateAccessor = svgLink.y(); // angle(...) ------------------------------------------------------------------------ -defaultRadialLink = defaultRadialLink.angle(d => { +defaultLinkRadial = defaultLinkRadial.angle(d => { const datum: [number, number] = d; return datum[0]; }); -defaultCoordinateAccessor = defaultRadialLink.angle(); +defaultCoordinateAccessor = defaultLinkRadial.angle(); -svgRadialLink = svgRadialLink.angle(function(d) { +svgLinkRadial = svgLinkRadial.angle(function(d) { const that: SVGPathElement = this; const datum: HierarchyPointNode = d; return datum.x; }); -svgCoordinateAccessor = svgRadialLink.angle(); +svgCoordinateAccessor = svgLinkRadial.angle(); // radius(...) ------------------------------------------------------------------------ -defaultRadialLink = defaultRadialLink.radius(d => { +defaultLinkRadial = defaultLinkRadial.radius(d => { const datum: [number, number] = d; return datum[1]; }); -defaultCoordinateAccessor = defaultRadialLink.radius(); +defaultCoordinateAccessor = defaultLinkRadial.radius(); -svgRadialLink = svgRadialLink.radius(function(d) { +svgLinkRadial = svgLinkRadial.radius(function(d) { const that: SVGPathElement = this; const datum: HierarchyPointNode = d; return datum.y; }); -svgCoordinateAccessor = svgRadialLink.radius(); +svgCoordinateAccessor = svgLinkRadial.radius(); // context(...) ---------------------------------------------------------------------- @@ -1121,7 +1137,7 @@ area = area.context(null); // use as path string generator for SVG defaultLink(defaultLinkDatum); -defaultRadialLink(defaultLinkDatum); +defaultLinkRadial(defaultLinkDatum); // Render to svg --------------------------------------------------------------------- @@ -1137,13 +1153,13 @@ pathStringMaybe = link(linkDatum); // radial -pLink.attr('d', svgRadialLink); -// wrongLink1.attr('d', svgRadialLink); // fails, incompatible this contexts -// wrongLink2.attr('d', svgRadialLink); // fails, incompatible datum types +pLink.attr('d', svgLinkRadial); +// wrongLink1.attr('d', svgLinkRadial); // fails, incompatible this contexts +// wrongLink2.attr('d', svgLinkRadial); // fails, incompatible datum types pathStringMaybe = radialLink(linkDatum); -// pathStringMaybe = svgRadialLink(linkDatum); // fails, wrong this type for invocation +// pathStringMaybe = svgLinkRadial(linkDatum); // fails, wrong this type for invocation // ----------------------------------------------------------------------------------- // Test Symbols @@ -1302,6 +1318,12 @@ customSymbol = d3Shape.symbolStar; customSymbol = d3Shape.symbolTriangle; customSymbol = d3Shape.symbolWye; +// ----------------------------------------------------------------------------------- +// Test pointRadius +// ----------------------------------------------------------------------------------- + +let coordinatates: [number, number] = d3Shape.pointRadius(0, 12); + // ----------------------------------------------------------------------------------- // Test Stacks // ----------------------------------------------------------------------------------- diff --git a/types/d3-shape/index.d.ts b/types/d3-shape/index.d.ts index 00d37fa4ae..010c2108e9 100644 --- a/types/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for D3JS d3-shape module 1.1 +// Type definitions for D3JS d3-shape module 1.2 // Project: https://github.com/d3/d3-shape/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.1.0 +// Last module patch version validated against: 1.2.0 import { Path } from 'd3-path'; @@ -799,7 +799,7 @@ export function line(): Line; * * The generic refers to the data type of an element in the input array passed into the line generator. */ -export interface RadialLine { +export interface LineRadial { /** * Generates a radial line for the given array of data. Depending on this radial line generator’s associated curve, * the given input data may need to be sorted by x-value before being passed to the line generator. @@ -957,7 +957,7 @@ export interface RadialLine { * Ensure that the accessors used with the radial line generator correspond to the arguments passed into them, * or set them to constants as appropriate. */ -export function radialLine(): RadialLine<[number, number]>; +export function lineRadial(): LineRadial<[number, number]>; /** * Constructs a new radial line generator with the default settings. * @@ -966,6 +966,17 @@ export function radialLine(): RadialLine<[number, number]>; * * The generic refers to the data type of an element in the input array passed into the radial line generator. */ +export function lineRadial(): LineRadial; + +export type RadialLine = LineRadial; + +/** + * DEPRECATED: Use lineRadial() + */ +export function radialLine(): RadialLine<[number, number]>; +/** + * DEPRECATED: Use lineRadial() + */ export function radialLine(): RadialLine; // ----------------------------------------------------------------------------------- @@ -1283,7 +1294,7 @@ export function area(): Area; * * The generic refers to the data type of an element in the input array passed into the area generator. */ -export interface RadialArea { +export interface AreaRadial { /** * Generates a radial area for the given array of data. * @@ -1544,25 +1555,25 @@ export interface RadialArea { * Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. * The line’s angle accessor is this area’s start angle accessor, and the line’s radius accessor is this area’s inner radius accessor. */ - lineStartAngle(): RadialLine; + lineStartAngle(): LineRadial; /** * Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. * The line’s angle accessor is this area’s start angle accessor, and the line’s radius accessor is this area’s inner radius accessor. */ - lineInnerRadius(): RadialLine; + lineInnerRadius(): LineRadial; /** * Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. * The line’s angle accessor is this area’s end angle accessor, and the line’s radius accessor is this area’s inner radius accessor. */ - lineEndAngle(): RadialLine; + lineEndAngle(): LineRadial; /** * Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. * The line’s angle accessor is this area’s start angle accessor, and the line’s radius accessor is this area’s outer radius accessor. */ - lineOuterRadius(): RadialLine; + lineOuterRadius(): LineRadial; } /** @@ -1571,7 +1582,7 @@ export interface RadialArea { * Ensure that the accessors used with the area generator correspond to the arguments passed into them, * or set them to constants as appropriate. */ -export function radialArea(): RadialArea<[number, number]>; +export function areaRadial(): AreaRadial<[number, number]>; /** * Constructs a new radial area generator with the default settings. * @@ -1580,6 +1591,20 @@ export function radialArea(): RadialArea<[number, number]>; * * The generic refers to the data type of an element in the input array passed into the radial area generator. */ +export function areaRadial(): AreaRadial; + +/** + * DEPRECATED: Use AreaRadial interface + */ +export type RadialArea = AreaRadial; + +/** + * DEPRECATED: Use areaRadial() + */ +export function radialArea(): RadialArea<[number, number]>; +/** + * DEPRECATED: Use areaRadial() + */ export function radialArea(): RadialArea; // ----------------------------------------------------------------------------------- @@ -1870,7 +1895,7 @@ export const curveStepBefore: CurveFactory; /** * An interface describing the default Link Data structure expected - * by the Link and RadialLink generators + * by the Link and LinkRadial generators */ export interface DefaultLinkObject { /** @@ -2085,7 +2110,7 @@ export function linkVertical(): Link { +export interface LinkRadial { /** * Generates a radial link for the given arguments. * @@ -2187,13 +2212,18 @@ export interface RadialLink { context(context: null): this; } +/** + * DEPRECATED: Use LinkRadial interface + */ +export type RadialLink = LinkRadial; + /** * Constructs a new default link generator with radial tangents, for example, to visualize links in a tree diagram * rooted in the center of the display. * * With the default settings the link generator accepts a link object conforming to the DefaultLinkObject interface. */ -export function linkRadial(): RadialLink; +export function linkRadial(): LinkRadial; /** * Constructs a new link generator with radial tangents, for example, to visualize links in a tree diagram * rooted in the center of the display. @@ -2205,7 +2235,7 @@ export function linkRadial(): RadialLink(): RadialLink; +export function linkRadial(): LinkRadial; /** * Constructs a new link generator with radial tangents, for example, to visualize links in a tree diagram * rooted in the center of the display. @@ -2219,7 +2249,7 @@ export function linkRadial(): RadialLink(): RadialLink; +export function linkRadial(): LinkRadial; // ----------------------------------------------------------------------------------- // SYMBOLS @@ -2405,6 +2435,17 @@ export const symbolTriangle: SymbolType; */ export const symbolWye: SymbolType; +// ----------------------------------------------------------------------------------- +// pointRadius +// ----------------------------------------------------------------------------------- + +/** + * Returns the point [x, y] for the given angle and the given radius. + * @param angle Angle in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. + * @param radius Radius. + */ +export function pointRadius(angle: number, radius: number): [number, number]; + // ----------------------------------------------------------------------------------- // STACKS // ----------------------------------------------------------------------------------- diff --git a/types/d3-time-format/index.d.ts b/types/d3-time-format/index.d.ts index 4533d69dbb..3d1cecf221 100644 --- a/types/d3-time-format/index.d.ts +++ b/types/d3-time-format/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for d3JS d3-time-format module v2.0.2 +// Type definitions for d3JS d3-time-format module 2.0 // Project: https://github.com/d3/d3-time-format/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 2.0.2 + /** * Specification of time locale to use when creating a new TimeLocaleObject */ @@ -41,7 +43,6 @@ export interface TimeLocaleDefinition { shortMonths: [string, string, string, string, string, string, string, string, string, string, string, string]; } - export interface TimeLocaleObject { format(specifier: string): (date: Date) => string; parse(specifier: string): (dateString: string) => (Date | null); @@ -70,8 +71,6 @@ export function utcFormat(specifier: string): (date: Date) => string; export function utcParse(specifier: string): (dateString: string) => (Date | null); - - export function isoFormat(date: Date): string; export function isoParse(dateString: string): Date; diff --git a/types/d3-time-format/tslint.json b/types/d3-time-format/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-time-format/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-time/d3-time-tests.ts b/types/d3-time/d3-time-tests.ts index b16c3e40ea..a99cd818a0 100644 --- a/types/d3-time/d3-time-tests.ts +++ b/types/d3-time/d3-time-tests.ts @@ -8,14 +8,13 @@ import * as d3Time from 'd3-time'; - let countableI: d3Time.CountableTimeInterval; let simpleI: d3Time.TimeInterval; -let dateArray: Array; -let start: Date = new Date(2014, 1, 1, 6, 0, 0, 0), - end: Date = new Date(2016, 6, 13, 1, 25, 15, 500), - inBetween: Date = new Date(2015, 6, 13, 1, 30, 5, 700), - resultDate: Date; +let dateArray: Date[]; +let start: Date = new Date(2014, 1, 1, 6, 0, 0, 0); +let end: Date = new Date(2016, 6, 13, 1, 25, 15, 500); +let inBetween: Date = new Date(2015, 6, 13, 1, 30, 5, 700); +let resultDate: Date; let count: number; // Test custom factories' definitions ------------------------------------------ @@ -41,7 +40,7 @@ countableI = d3Time.timeInterval( // offset function (d: Date, step: number) => { d.setUTCHours(d.getUTCHours() + step); }, // count function - (start: Date, end: Date) => { return (end.valueOf() - start.valueOf()) / 36e5; } + (start: Date, end: Date) => (end.valueOf() - start.valueOf()) / 36e5 ); countableI = d3Time.timeInterval( @@ -50,9 +49,9 @@ countableI = d3Time.timeInterval( // offset function (d: Date, step: number) => { d.setUTCHours(d.getUTCHours() + step); }, // count function - (start: Date, end: Date) => { return (end.valueOf() - start.valueOf()) / 36e5; }, + (start: Date, end: Date) => (end.valueOf() - start.valueOf()) / 36e5, // field function - (d: Date) => { return d.valueOf() / 36e5; } + (d: Date) => d.valueOf() / 36e5 ); // Test signatures of (Countable)Interval methods ------------------------------ @@ -71,7 +70,7 @@ dateArray = countableI.range(new Date(), new Date()); // TODO: specify dates dateArray = countableI.range(new Date(), new Date(), 2); // TODO: specify dates // countableI = countableI.filter((d: Date)=>{ return d.getMonth() === 2;}); // Test fails, since .filter(...) return Interval and not CountableInterval -simpleI = countableI.filter((d: Date) => { return d.getMonth() === 2; }); +simpleI = countableI.filter((d: Date) => d.getMonth() === 2); count = countableI.count(start, end); @@ -84,7 +83,7 @@ resultDate = simpleI.ceil(inBetween); resultDate = simpleI.ceil(inBetween); resultDate = simpleI.offset(inBetween); resultDate = simpleI.offset(inBetween, 3); -simpleI = simpleI.filter((d: Date) => { return d.getMonth() === 2; }); +simpleI = simpleI.filter((d: Date) => d.getMonth() === 2); // count = simpleI.count(start, end); // Test fails, since .count(...) is not defined on Interval // simpleI = simpleI.every(10); // Test fails, since .every(...) is not defined on Interval @@ -151,7 +150,6 @@ countableI = d3Time.timeYear; dateArray = d3Time.timeYears(start, end); dateArray = d3Time.timeYears(start, end, 2); - countableI = d3Time.utcMillisecond; dateArray = d3Time.utcMilliseconds(start, end); dateArray = d3Time.utcMilliseconds(start, end, 60000); diff --git a/types/d3-time/index.d.ts b/types/d3-time/index.d.ts index 912d999ce4..5e2b66718f 100644 --- a/types/d3-time/index.d.ts +++ b/types/d3-time/index.d.ts @@ -19,10 +19,14 @@ export interface TimeInterval { * * For example, timeDay(date) typically returns 12:00 AM local time on the given date. * - * This function is idempotent: if the specified date is already floored to the current interval, a new date with an identical time is returned. - * Furthermore, the returned date is the minimum expressible value of the associated interval, such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. + * This function is idempotent: if the specified date is already floored to the current interval, + * a new date with an identical time is returned. + * Furthermore, the returned date is the minimum expressible value of the associated interval, + * such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. * - * Note that the == and === operators do not compare by value with Date objects, and thus you cannot use them to tell whether the specified date has already been floored. Instead, coerce to a number and then compare. + * Note that the == and === operators do not compare by value with Date objects, + * and thus you cannot use them to tell whether the specified date has already been floored. + * Instead, coerce to a number and then compare. * * This is more reliable than testing whether the time is 12:00 AM, as in some time zones midnight may not exist due to daylight saving. * @@ -35,10 +39,14 @@ export interface TimeInterval { * * For example, timeDay.floor(date) typically returns 12:00 AM local time on the given date. * - * This method is idempotent: if the specified date is already floored to the current interval, a new date with an identical time is returned. - * Furthermore, the returned date is the minimum expressible value of the associated interval, such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. + * This method is idempotent: if the specified date is already floored to the current interval, + * a new date with an identical time is returned. + * Furthermore, the returned date is the minimum expressible value of the associated interval, + * such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. * - * Note that the == and === operators do not compare by value with Date objects, and thus you cannot use them to tell whether the specified date has already been floored. Instead, coerce to a number and then compare. + * Note that the == and === operators do not compare by value with Date objects, + * and thus you cannot use them to tell whether the specified date has already been floored. + * Instead, coerce to a number and then compare. * * This is more reliable than testing whether the time is 12:00 AM, as in some time zones midnight may not exist due to daylight saving. * @@ -63,8 +71,10 @@ export interface TimeInterval { * * For example, timeDay.ceil(date) typically returns 12:00 AM local time on the date following the given date. * - * This method is idempotent: if the specified date is already ceilinged to the current interval, a new date with an identical time is returned. Furthermore, - * the returned date is the maximum expressible value of the associated interval, such that interval.ceil(interval.ceil(date) + 1) returns the following interval boundary date. + * This method is idempotent: if the specified date is already ceilinged to the current interval, + * a new date with an identical time is returned. Furthermore, + * the returned date is the maximum expressible value of the associated interval, + * such that interval.ceil(interval.ceil(date) + 1) returns the following interval boundary date. * * @param date A date object. */ @@ -79,7 +89,8 @@ export interface TimeInterval { * then timeDay.offset(date, 1) returns 5:34 PM tomorrow (even if daylight saving changes!). * * @param date A date object. - * @param step An optional number of steps to apply when calculating the offset date. If step is negative, then the returned date will be before the specified date; + * @param step An optional number of steps to apply when calculating the offset date. + * If step is negative, then the returned date will be before the specified date; * if step is zero, then a copy of the specified date is returned; if step is not an integer, it is floored. */ offset(date: Date, step?: number): Date; @@ -87,10 +98,12 @@ export interface TimeInterval { /** * Returns an array of dates representing every interval boundary after or equal to start (inclusive) and before stop (exclusive). * - * If step is specified, then every step-th boundary will be returned; for example, for the timeDay interval a step of 2 will return every other day. + * If step is specified, then every step-th boundary will be returned; for example, + * for the timeDay interval a step of 2 will return every other day. * If step is not an integer, it is floored. * - * The first date in the returned array is the earliest boundary after or equal to start; subsequent dates are offset by step intervals and floored. + * The first date in the returned array is the earliest boundary after or equal to start; + * subsequent dates are offset by step intervals and floored. * Thus, two overlapping ranges may be inconsistent. * * To make ranges consistent when a step is specified, use CountableInterval.every instead. @@ -104,7 +117,8 @@ export interface TimeInterval { /** * Returns a new interval that is a filtered subset of this interval using the specified test function. * - * @param test A test function which is passed a date and should return true if and only if the specified date should be considered part of the interval. + * @param test A test function which is passed a date and should return true if and only if + * the specified date should be considered part of the interval. */ filter(test: (date: Date) => boolean): TimeInterval; } @@ -129,7 +143,8 @@ export interface CountableTimeInterval extends TimeInterval { * The meaning of step is dependent on this interval’s parent interval as defined by the field function. * * For example, timeMinute.every(15) returns an interval representing every fifteen minutes, - * starting on the hour: :00, :15, :30, :45, etc. Note that for some intervals, the resulting dates may not be uniformly-spaced; + * starting on the hour: :00, :15, :30, :45, etc. Note that for some intervals, + * the resulting dates may not be uniformly-spaced; * timeDay’s parent interval is timeMonth, and thus the interval number resets at the start of each month. * * If step is not valid, returns null. If step is one, returns this interval. @@ -151,7 +166,8 @@ export interface CountableTimeInterval extends TimeInterval { * The returned custom interval is not countable, i.e. does not exposee the methods "count(..)" and "every(...)". * * @param floor A floor function which takes a single date as an argument and rounds it down to the nearest interval boundary. - * @param offset An offset function which takes a date and an integer step as arguments and advances the specified date by the specified number of boundaries; the step may be positive, negative or zero. + * @param offset An offset function which takes a date and an integer step as arguments and advances + * the specified date by the specified number of boundaries; the step may be positive, negative or zero. */ export function timeInterval( floor: (date: Date) => void, @@ -165,13 +181,17 @@ export function timeInterval( * Note: due to an internal optimization, the specified count function must not invoke interval.count on other time intervals. * * @param floor A floor function which takes a single date as an argument and rounds it down to the nearest interval boundary. - * @param offset An offset function which takes a date and an integer step as arguments and advances the specified date by the specified number of boundaries; the step may be positive, negative or zero. - * @param count A count function which takes a start date and an end date, already floored to the current interval, and returns the number of boundaries between the start (exclusive) and end (inclusive). + * @param offset An offset function which takes a date and an integer step as arguments and advances + * the specified date by the specified number of boundaries; the step may be positive, negative or zero. + * @param count A count function which takes a start date and an end date, already floored to the current interval, + * and returns the number of boundaries between the start (exclusive) and end (inclusive). * Note: due to an internal optimization, the specified count function must not invoke interval.count on other time intervals. - * @param field An optional field function which takes a date, already floored to the current interval, and returns the field value of the specified date, + * @param field An optional field function which takes a date, already floored to the current interval, + * and returns the field value of the specified date, * corresponding to the number of boundaries between this date (exclusive) and the latest previous parent boundary. - * For example, for the timeDay interval, this returns the number of days since the start of the month. If a field function is not specified, - * it defaults to counting the number of interval boundaries since the UNIX epoch of January 1, 1970 UTC. The field function defines the behavior of interval.every. + * For example, for the timeDay interval, this returns the number of days since the start of the month. + * If a field function is not specified, it defaults to counting the number of interval boundaries since + * the UNIX epoch of January 1, 1970 UTC. The field function defines the behavior of interval.every. */ export function timeInterval( floor: (date: Date) => void, @@ -184,13 +204,12 @@ export function timeInterval( // Built-In Factories and Date Array Creators // --------------------------------------------------------------- - // local time ---------------------------------------------------------- /** * Milliseconds Interval in Local Time; the shortest available time unit. */ -export var timeMillisecond: CountableTimeInterval; +export const timeMillisecond: CountableTimeInterval; /** * This is a convenience alias for timeMillisecond.range(...). @@ -204,7 +223,7 @@ export function timeMilliseconds(start: Date, stop: Date, step?: number): Date[] /** * Seconds Interval in Local Time; seconds (e.g., 01:23:45.0000 AM); 1,000 milliseconds. */ -export var timeSecond: CountableTimeInterval; +export const timeSecond: CountableTimeInterval; /** * This is a convenience alias for timeSecond.range(...). @@ -218,7 +237,7 @@ export function timeSeconds(start: Date, stop: Date, step?: number): Date[]; /** * Minutes Interval in Local Time; minutes (e.g., 01:02:00 AM); 60 seconds. Note that ECMAScript ignores leap seconds. */ -export var timeMinute: CountableTimeInterval; +export const timeMinute: CountableTimeInterval; /** * This is a convenience alias for timeMinute.range(...). @@ -234,7 +253,7 @@ export function timeMinutes(start: Date, stop: Date, step?: number): Date[]; * * Note that advancing time by one hour in local time can return the same hour or skip an hour due to daylight saving. */ -export var timeHour: CountableTimeInterval; +export const timeHour: CountableTimeInterval; /** * This is a convenience alias for timeHour.range(...). @@ -249,7 +268,7 @@ export function timeHours(start: Date, stop: Date, step?: number): Date[]; * Days Interval in Local Time; days (e.g., February 7, 2012 at 12:00 AM); typically 24 hours. * Days in local time may range from 23 to 25 hours due to daylight saving. */ -export var timeDay: CountableTimeInterval; +export const timeDay: CountableTimeInterval; /** * This is a convenience alias for timeDay.range(...). @@ -265,7 +284,7 @@ export function timeDays(start: Date, stop: Date, step?: number): Date[]; * * Weeks in local time may range from 167 to 169 hours due on daylight saving. */ -export var timeWeek: CountableTimeInterval; +export const timeWeek: CountableTimeInterval; /** * This is a convenience alias for timeWeek.range(...). @@ -282,7 +301,7 @@ export function timeWeeks(start: Date, stop: Date, step?: number): Date[]; * * Weeks in local time may range from 167 to 169 hours due on daylight saving. */ -export var timeSunday: CountableTimeInterval; +export const timeSunday: CountableTimeInterval; /** * This is a convenience alias for timeSunday.range(...). @@ -299,7 +318,7 @@ export function timeSundays(start: Date, stop: Date, step?: number): Date[]; * * Weeks in local time may range from 167 to 169 hours due on daylight saving. */ -export var timeMonday: CountableTimeInterval; +export const timeMonday: CountableTimeInterval; /** * This is a convenience alias for timeMonday.range(...). @@ -316,7 +335,7 @@ export function timeMondays(start: Date, stop: Date, step?: number): Date[]; * * Weeks in local time may range from 167 to 169 hours due on daylight saving. */ -export var timeTuesday: CountableTimeInterval; +export const timeTuesday: CountableTimeInterval; /** * This is a convenience alias for timeTuesday.range(...). @@ -333,7 +352,7 @@ export function timeTuesdays(start: Date, stop: Date, step?: number): Date[]; * * Weeks in local time may range from 167 to 169 hours due on daylight saving. */ -export var timeWednesday: CountableTimeInterval; +export const timeWednesday: CountableTimeInterval; /** * This is a convenience alias for timeWednesday.range(...). @@ -350,7 +369,7 @@ export function timeWednesdays(start: Date, stop: Date, step?: number): Date[]; * * Weeks in local time may range from 167 to 169 hours due on daylight saving. */ -export var timeThursday: CountableTimeInterval; +export const timeThursday: CountableTimeInterval; /** * This is a convenience alias for timeThursday.range(...). @@ -367,8 +386,7 @@ export function timeThursdays(start: Date, stop: Date, step?: number): Date[]; * * Weeks in local time may range from 167 to 169 hours due on daylight saving. */ -export var timeFriday: CountableTimeInterval; - +export const timeFriday: CountableTimeInterval; /** * This is a convenience alias for timeFriday.range(...). @@ -385,7 +403,7 @@ export function timeFridays(start: Date, stop: Date, step?: number): Date[]; * * Weeks in local time may range from 167 to 169 hours due on daylight saving. */ -export var timeSaturday: CountableTimeInterval; +export const timeSaturday: CountableTimeInterval; /** * This is a convenience alias for timeSaturday.range(...). @@ -399,7 +417,7 @@ export function timeSaturdays(start: Date, stop: Date, step?: number): Date[]; /** * Month Interval in Local Time; months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days. */ -export var timeMonth: CountableTimeInterval; +export const timeMonth: CountableTimeInterval; /** * This is a convenience alias for timeMonth.range(...). @@ -413,7 +431,7 @@ export function timeMonths(start: Date, stop: Date, step?: number): Date[]; /** * Year Interval in Local Time; years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days. */ -export var timeYear: CountableTimeInterval; +export const timeYear: CountableTimeInterval; /** * This is a convenience alias for timeYear.range(...). @@ -424,13 +442,12 @@ export var timeYear: CountableTimeInterval; */ export function timeYears(start: Date, stop: Date, step?: number): Date[]; - // utc Universal Coordinated Time ---------------------------------------------------------- /** * Milliseconds Interval in Univarsal Coordinated Time (UTC); the shortest available time unit. */ -export var utcMillisecond: CountableTimeInterval; +export const utcMillisecond: CountableTimeInterval; /** * This is a convenience alias for utcMilliesecond.range(...). @@ -444,7 +461,7 @@ export function utcMilliseconds(start: Date, stop: Date, step?: number): Date[]; /** * Seconds Interval in Univarsal Coordinated Time (UTC); seconds (e.g., 01:23:45.0000 AM); 1,000 milliseconds. */ -export var utcSecond: CountableTimeInterval; +export const utcSecond: CountableTimeInterval; /** * This is a convenience alias for utcSecond.range(...). @@ -456,9 +473,10 @@ export var utcSecond: CountableTimeInterval; export function utcSeconds(start: Date, stop: Date, step?: number): Date[]; /** - * Minutes Interval in Univarsal Coordinated Time (UTC); minutes (e.g., 01:02:00 AM); 60 seconds. Note that ECMAScript ignores leap seconds. + * Minutes Interval in Univarsal Coordinated Time (UTC); minutes (e.g., 01:02:00 AM); 60 seconds. + * Note that ECMAScript ignores leap seconds. */ -export var utcMinute: CountableTimeInterval; +export const utcMinute: CountableTimeInterval; /** * This is a convenience alias for utcMinute.range(...). @@ -472,7 +490,7 @@ export function utcMinutes(start: Date, stop: Date, step?: number): Date[]; /** * Hours Interval in Univarsal Coordinated Time (UTC); Hours (e.g., 01:00 AM); 60 minutes. */ -export var utcHour: CountableTimeInterval; +export const utcHour: CountableTimeInterval; /** * This is a convenience alias for utcHour.range(...). @@ -486,7 +504,7 @@ export function utcHours(start: Date, stop: Date, step?: number): Date[]; /** * Days Interval in Univarsal Coordinated Time (UTC); days (e.g., February 7, 2012 at 12:00 AM); 24 hours. */ -export var utcDay: CountableTimeInterval; +export const utcDay: CountableTimeInterval; /** * This is a convenience alias for utcDay.range(...). @@ -501,7 +519,7 @@ export function utcDays(start: Date, stop: Date, step?: number): Date[]; * Week Interval in Local Time. Alias for sunday; 7 days and 168 hours. * */ -export var utcWeek: CountableTimeInterval; +export const utcWeek: CountableTimeInterval; /** * This is a convenience alias for utcWeek.range(...). @@ -516,7 +534,7 @@ export function utcWeeks(start: Date, stop: Date, step?: number): Date[]; * Week Interval for Sunday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 5, 2012 at 12:00 AM). * 7 days and 168 hours. */ -export var utcSunday: CountableTimeInterval; +export const utcSunday: CountableTimeInterval; /** * This is a convenience alias for utcSunday.range(...). @@ -531,7 +549,7 @@ export function utcSundays(start: Date, stop: Date, step?: number): Date[]; * Week Interval for Monday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 6, 2012 at 12:00 AM). * 7 days and 168 hours. */ -export var utcMonday: CountableTimeInterval; +export const utcMonday: CountableTimeInterval; /** * This is a convenience alias for utcMonday.range(...). @@ -546,7 +564,7 @@ export function utcMondays(start: Date, stop: Date, step?: number): Date[]; * Week Interval for Tuesday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 7, 2012 at 12:00 AM). * 7 days and 168 hours. */ -export var utcTuesday: CountableTimeInterval; +export const utcTuesday: CountableTimeInterval; /** * This is a convenience alias for utcTuesday.range(...). @@ -561,7 +579,7 @@ export function utcTuesdays(start: Date, stop: Date, step?: number): Date[]; * Week Interval for Wednesday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 8, 2012 at 12:00 AM). * 7 days and 168 hours. */ -export var utcWednesday: CountableTimeInterval; +export const utcWednesday: CountableTimeInterval; /** * This is a convenience alias for utcWednesday.range(...). @@ -576,7 +594,7 @@ export function utcWednesdays(start: Date, stop: Date, step?: number): Date[]; * Week Interval for Thursday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 9, 2012 at 12:00 AM). * 7 days and 168 hours. */ -export var utcThursday: CountableTimeInterval; +export const utcThursday: CountableTimeInterval; /** * This is a convenience alias for utcThursday.range(...). @@ -591,7 +609,7 @@ export function utcThursdays(start: Date, stop: Date, step?: number): Date[]; * Week Interval for Friday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 10, 2012 at 12:00 AM). * 7 days and 168 hours. */ -export var utcFriday: CountableTimeInterval; +export const utcFriday: CountableTimeInterval; /** * This is a convenience alias for utcFriday.range(...). @@ -606,7 +624,7 @@ export function utcFridays(start: Date, stop: Date, step?: number): Date[]; * Week Interval for Saturday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 11, 2012 at 12:00 AM). * 7 days and 168 hours. */ -export var utcSaturday: CountableTimeInterval; +export const utcSaturday: CountableTimeInterval; /** * This is a convenience alias for utcSaturday.range(...). @@ -620,7 +638,7 @@ export function utcSaturdays(start: Date, stop: Date, step?: number): Date[]; /** * Month Interval in Univarsal Coordinated Time (UTC); months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days. */ -export var utcMonth: CountableTimeInterval; +export const utcMonth: CountableTimeInterval; /** * This is a convenience alias for utcMonth.range(...). @@ -634,7 +652,7 @@ export function utcMonths(start: Date, stop: Date, step?: number): Date[]; /** * Year Interval in Univarsal Coordinated Time (UTC); years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days. */ -export var utcYear: CountableTimeInterval; +export const utcYear: CountableTimeInterval; /** * This is a convenience alias for utcYear.range(...). diff --git a/types/d3-time/tslint.json b/types/d3-time/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-time/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-timer/index.d.ts b/types/d3-timer/index.d.ts index ecb62c7610..08fee97696 100644 --- a/types/d3-timer/index.d.ts +++ b/types/d3-timer/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for d3JS d3-timer module v1.0.2 +// Type definitions for d3JS d3-timer module 1.0 // Project: https://github.com/d3/d3-timer/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.0.2 + /** * Returns the current time as defined by performance.now if available, and Date.now if not. * The current time is updated at the start of a frame; it is thus consistent during the frame, and any timers scheduled during the same frame will be synchronized. @@ -11,7 +13,6 @@ */ export function now(): number; - export interface Timer { /** * Restart a timer with the specified callback and optional delay and time. diff --git a/types/d3-timer/tslint.json b/types/d3-timer/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-timer/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-transition/index.d.ts b/types/d3-transition/index.d.ts index 58c8fd4063..1ff8d46d04 100644 --- a/types/d3-transition/index.d.ts +++ b/types/d3-transition/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for D3JS d3-transition module 1.0 +// Type definitions for D3JS d3-transition module 1.1 // Project: https://github.com/d3/d3-transition/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.0.3 +// Last module patch version validated against: 1.1 import { ArrayLike, BaseType, Selection, ValueFn } from 'd3-selection'; @@ -110,7 +110,7 @@ export interface Transition(selector: ValueFn): Transition; @@ -135,7 +135,7 @@ export interface Transition(selector: ValueFn>): Transition; @@ -194,7 +194,7 @@ export interface Transition): this; @@ -221,7 +221,7 @@ export interface Transition string>): this; @@ -234,8 +234,9 @@ export interface Transition): this; @@ -348,7 +350,7 @@ export interface Transition void>): this; @@ -397,7 +399,7 @@ export interface Transition): Transition; @@ -411,7 +413,7 @@ export interface Transition(filter: ValueFn): Transition; @@ -448,7 +450,7 @@ export interface Transition): this; @@ -457,11 +459,11 @@ export interface Transition): this; @@ -513,7 +515,7 @@ export interface Transition): this; @@ -535,7 +537,7 @@ export interface Transition): this; diff --git a/types/d3-voronoi/d3-voronoi-tests.ts b/types/d3-voronoi/d3-voronoi-tests.ts index 966ab622ec..7dea86241e 100644 --- a/types/d3-voronoi/d3-voronoi-tests.ts +++ b/types/d3-voronoi/d3-voronoi-tests.ts @@ -8,7 +8,6 @@ import * as d3Voronoi from 'd3-voronoi'; - // --------------------------------------------------------------------- // Preparatory Steps // --------------------------------------------------------------------- @@ -18,15 +17,14 @@ let size: [number, number]; let coordinates: [number, number]; let num: number; -let numArray: Array; - +let numArray: number[]; interface VoronoiTestDatum { x: number; y: number; } -let testData: Array = [ +let testData: VoronoiTestDatum[] = [ { x: 10, y: 10 }, { x: 20, y: 10 }, { x: 10, y: 20 }, @@ -44,7 +42,6 @@ let cells: Array>; let cell: d3Voronoi.VoronoiCell; let site: d3Voronoi.VoronoiSite; - let polygons: Array>; let polygon: d3Voronoi.VoronoiPolygon; @@ -116,17 +113,13 @@ voronoiLayout = d3Voronoi.voronoi(); // x(...) ------------------------------------------------------------- -voronoiLayout = voronoiLayout.x(function (d) { - return d.x; // data type of d is VoronoiTestDatum -}); +voronoiLayout = voronoiLayout.x(d => d.x); // data type of d is VoronoiTestDatum numberAccessor = voronoiLayout.x(); // y(...) ------------------------------------------------------------- -voronoiLayout = voronoiLayout.y(function (d) { - return d.y; // data type of d is VoronoiTestDatum -}); +voronoiLayout = voronoiLayout.y(d => d.y); // data type of d is VoronoiTestDatum numberAccessor = voronoiLayout.y(); @@ -161,13 +154,11 @@ polygons = voronoiLayout.polygons(testData); // generated from Layout triangles = voronoiLayout.triangles(testData); - // Links --------------------------------------------------------------- // generated from Layout links = voronoiLayout.links(testData); - // --------------------------------------------------------------------- // Use VoronoiDiagram // --------------------------------------------------------------------- @@ -235,7 +226,6 @@ link = links[0]; testDatum = link.source; testDatum = link.target; - // find() =============================================================== let nearestSite: d3Voronoi.VoronoiSite | null; diff --git a/types/d3-voronoi/index.d.ts b/types/d3-voronoi/index.d.ts index 9bd270d11d..1a529e4a71 100644 --- a/types/d3-voronoi/index.d.ts +++ b/types/d3-voronoi/index.d.ts @@ -1,13 +1,14 @@ -// Type definitions for D3JS d3-voronoi module v1.1.0 +// Type definitions for D3JS d3-voronoi module 1.1 // Project: https://github.com/d3/d3-voronoi/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.1.0 + // -------------------------------------------------------------------------- // Shared Type Definitions and Interfaces // -------------------------------------------------------------------------- - /** * The VoronoiPoint interface is defined as a cue that the array is strictly of type [number, number] with two elements * for x and y coordinates. However, it is used as a base for interface definitions, and [number, number] @@ -80,10 +81,9 @@ export interface VoronoiCell { /** * An array of indexes into diagram.edges representing the cell’s polygon. */ - halfEdges: Array; + halfEdges: number[]; } - /** * Voronoi Edge in the diagram is an array [[x0, y0], [x1, y1]] with two additional properties: * left and right. @@ -128,7 +128,7 @@ export interface VoronoiLayout { * Computes the Voronoi diagram for the specified data points. * @param data Array of data elements */ - (data: Array): VoronoiDiagram; + (data: T[]): VoronoiDiagram; /** * Return the current x-coordinate accessor, @@ -206,24 +206,23 @@ export interface VoronoiLayout { * * @param data Array of data points. */ - polygons(data: Array): Array>; + polygons(data: T[]): Array>; /** * Return the Delaunay triangulation of the specified data array as an array of triangles. * Each triangle is a three-element array of elements from data. * * @param data Array of data points. */ - triangles(data: Array): Array>; + triangles(data: T[]): Array>; /** * Return the Delaunay triangulation of the specified data array as an array of links. * Each link has source and target attributes referring to elements in data. * * @param data Array of data points. */ - links(data: Array): Array>; + links(data: T[]): Array>; } - /** * Computed Voronoi diagram * @@ -276,7 +275,7 @@ export interface VoronoiDiagram { * @param y y-coordinate * @param radius Optional parameter for search radius around [x, y] */ - find(x: number, y:number, radius?:number): VoronoiSite | null; + find(x: number, y: number, radius?: number): VoronoiSite | null; } // -------------------------------------------------------------------------- diff --git a/types/d3-voronoi/tslint.json b/types/d3-voronoi/tslint.json new file mode 100644 index 0000000000..08b1465cd6 --- /dev/null +++ b/types/d3-voronoi/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false + } +} diff --git a/types/d3-zoom/d3-zoom-tests.ts b/types/d3-zoom/d3-zoom-tests.ts index 09974bf299..185b9fd45a 100644 --- a/types/d3-zoom/d3-zoom-tests.ts +++ b/types/d3-zoom/d3-zoom-tests.ts @@ -104,7 +104,7 @@ function zoomedCanvas(this: HTMLCanvasElement, d: CanvasDatum) { let canvasZoom: d3Zoom.ZoomBehavior; -canvasZoom = d3Zoom.zoom() +canvasZoom = d3Zoom.zoom() .scaleExtent([1 / 2, 4]) .on('zoom', zoomedCanvas); @@ -135,6 +135,23 @@ svgZoom = svgZoom.filter(function(d, i, group) { let filterFn: (this: SVGRectElement, d: SVGDatum, index: number, group: SVGRectElement[]) => boolean; filterFn = svgZoom.filter(); +// wheelDelta() ---------------------------------------------------------------- + +// chainable +svgZoom = svgZoom.wheelDelta(function(d, i, group) { + // Cast d3 event to D3ZoomEvent to be used in filter logic + const e = event; + const that: SVGRectElement = this; + const datum: SVGDatum = d; + const index: number = i; + const g: SVGRectElement[] | ArrayLike = group; + + return -e.deltaY * (e.deltaMode ? 100 : 1) / 600; +}); + +let wheelDeltaFn: (this: SVGRectElement, d: SVGDatum, index: number, group: SVGRectElement[]) => number; +wheelDeltaFn = svgZoom.wheelDelta(); + // extent() --------------------------------------------------------------- let extentAccessor: (this: SVGRectElement, d: SVGDatum, index: number, group: SVGRectElement[]) => [[number, number], [number, number]]; diff --git a/types/d3-zoom/index.d.ts b/types/d3-zoom/index.d.ts index 88a9a7b95f..a0980344bb 100644 --- a/types/d3-zoom/index.d.ts +++ b/types/d3-zoom/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for d3JS d3-zoom module 1.2 +// Type definitions for d3JS d3-zoom module 1.3 // Project: https://github.com/d3/d3-zoom/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.2.0 +// Last module patch version validated against: 1.3.0 import { ArrayLike, Selection, TransitionLike, ValueFn } from 'd3-selection'; import { ZoomView, ZoomInterpolator } from 'd3-interpolate'; @@ -371,17 +371,34 @@ export interface ZoomBehavior; /** * Sets the filter to the specified filter function and returns the zoom behavior. + * The filter function is invoked in the zoom initiating event handlers of each element to which the zoom behavior was applied. * * If the filter returns falsey, the initiating event is ignored and no zoom gesture is started. * Thus, the filter determines which input events are ignored. The default filter ignores mousedown events on secondary buttons, * since those buttons are typically intended for other purposes, such as the context menu. * - * @param filterFn A filter function which is evaluated for each selected element, + * @param filterFn A filter function which is invoked in the zoom initiating event handlers of each element to which the zoom behavior was applied, * in order, being passed the current datum (d), the current index (i), and the current group (nodes), * with this as the current DOM element. The function returns a boolean value. */ filter(filterFn: ValueFn): this; + /** + * Returns the current wheelDelta function. + */ + wheelDelta(): ValueFn; + /** + * Sets the wheel delta function to the specified function and returns the zoom behavior. The wheel delta function which is invoked in the wheel event handler + * of each element to which the zoom behavior was applied. + * The value Δ returned by the wheel delta function determines the amount of scaling applied in response to a WheelEvent. + * The scale factor transform.k is multiplied by 2Δ; for example, a Δ of +1 doubles the scale factor, Δ of -1 halves the scale factor. + * + * @param delta Wheel delta function which is invoked in the wheel event handler of each element to which the zoom behavior was applied, + * in order, being passed the current datum (d), the current index (i), and the current group (nodes), + * with this as the current DOM element. The function returns a numeric value. + */ + wheelDelta(delta: ValueFn): this; + /** * Return the current extent accessor, which defaults to [[0, 0], [width, height]] where width is the client width of the element and height is its client height; * for SVG elements, the nearest ancestor SVG element’s width and height is used. In this case, diff --git a/types/d3/index.d.ts b/types/d3/index.d.ts index 29d4a7c861..8bb0ae6bd8 100644 --- a/types/d3/index.d.ts +++ b/types/d3/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for D3JS d3 standard bundle 4.8 +// Type definitions for D3JS d3 standard bundle 4.9 // Project: https://github.com/d3/d3 // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/dat-gui/index.d.ts b/types/dat-gui/index.d.ts index 32b2083542..3cf4883fd8 100644 --- a/types/dat-gui/index.d.ts +++ b/types/dat-gui/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for dat.GUI v0.6.1 +// Type definitions for dat.GUI 0.6 // Project: https://github.com/dataarts/dat.gui -// Definitions by: Satoru Kimura , ZongJing Lu +// Definitions by: Satoru Kimura , ZongJing Lu , Richard Roylance // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + export as namespace dat; export class GUI { @@ -57,6 +58,7 @@ export class GUI { export interface GUIParams{ autoPlace?: boolean; closed?: boolean; + closeOnTop?: boolean; load?: any; name?: string; preset?: string; diff --git a/types/datatables.net-buttons/index.d.ts b/types/datatables.net-buttons/index.d.ts index ba4aa75654..a5b32c1bf6 100644 --- a/types/datatables.net-buttons/index.d.ts +++ b/types/datatables.net-buttons/index.d.ts @@ -2,6 +2,7 @@ // Project: http://datatables.net/extensions/buttons/ // Definitions by: Sam Germano , Jim Hartford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/datatables.net/datatables.net-tests.ts b/types/datatables.net/datatables.net-tests.ts index 838ca9131c..8ec7ecb084 100644 --- a/types/datatables.net/datatables.net-tests.ts +++ b/types/datatables.net/datatables.net-tests.ts @@ -60,12 +60,35 @@ $(document).ready(function () { sort: "asc" }; - var colRenderFunc: DataTables.FunctionColumnRender = function (data, type, row, meta) { + var colRenderFunc: DataTables.FunctionColumnRender = (data: any, type: 'filter' | 'display' | 'type' | 'sort' | undefined | any, row: any, meta: DataTables.CellMetaSettings): any => { meta.col; meta.row; meta.settings; + switch (type) { + case undefined: + return data.value; + case 'filter': + return data.filterValue; + case 'display': + return data.displayValue; + case 'type': + return data.typeValue; + case 'sort': + return data.sortValue; + default: + // Extensibility: the render type can be a custom value, useful for plugins that require custom rendering. + // Custom values are declared as any. + return data.valueForPlugin; + } }; + colRenderFunc({}, 'filter', {}, null); + colRenderFunc({}, 'display', {}, null); + colRenderFunc({}, 'type', {}, null); + colRenderFunc({}, 'sort', {}, null); + colRenderFunc({}, undefined, {}, null); + colRenderFunc({}, 'custom value', {}, null); + var col: DataTables.ColumnSettings = { cellType: "th", @@ -410,7 +433,7 @@ $(document).ready(function () { .on('change', function () { dt .column(0) - .search($(this).val()) + .search($(this).val() as string) .draw(); }); // Get the search data for the first column and add to the select list @@ -547,7 +570,7 @@ $(document).ready(function () { .on('change', function () { dt .column(colIdx) - .search($(this).val()) + .search($(this).val() as string) .draw(); }); @@ -631,7 +654,7 @@ $(document).ready(function () { .on('change', function () { dt .column(0) - .search($(this).val()) + .search($(this).val() as string) .draw(); }); @@ -715,7 +738,7 @@ $(document).ready(function () { .on('change', function () { dt .column(colIdx) - .search($(this).val()) + .search($(this).val() as string) .draw(); }); diff --git a/types/datatables.net/index.d.ts b/types/datatables.net/index.d.ts index c0aaf9cc6c..68e26ee048 100644 --- a/types/datatables.net/index.d.ts +++ b/types/datatables.net/index.d.ts @@ -2,11 +2,12 @@ // Project: http://www.datatables.net // Definitions by: Kiarash Ghiaseddin , Omid Rad , Armin Sander // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // missing: // - Static methods that are defined in JQueryStatic.fn are not typed. // - Plugin and extension definitions are not typed. -// - Some return types are not fully wokring +// - Some return types are not fully working /// @@ -1603,7 +1604,7 @@ declare namespace DataTables { } interface FunctionColumnRender { - (data: any, t: string, row: any, meta: CellMetaSettings): void; + (data: any, type: 'filter' | 'display' | 'type' | 'sort' | undefined | any, row: any, meta: CellMetaSettings): any; } interface CellMetaSettings { diff --git a/types/daterangepicker/index.d.ts b/types/daterangepicker/index.d.ts index 600e8b3d5f..3846ea2472 100644 --- a/types/daterangepicker/index.d.ts +++ b/types/daterangepicker/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.daterangepicker.com/ // Definitions by: SirMartin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// import moment = require("moment"); diff --git a/types/db-migrate-base/index.d.ts b/types/db-migrate-base/index.d.ts index de3a4c0812..a881fa6a06 100644 --- a/types/db-migrate-base/index.d.ts +++ b/types/db-migrate-base/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/db-migrate/db-migrate-base // Definitions by: nickiannone // Definitions: https://github.com/nickiannone/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/db-migrate-pg/index.d.ts b/types/db-migrate-pg/index.d.ts index 7804f4ddad..6a72fd1109 100644 --- a/types/db-migrate-pg/index.d.ts +++ b/types/db-migrate-pg/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/db-migrate/pg // Definitions by: nickiannone // Definitions: https://github.com/nickiannone/DefinitelyTyped +// TypeScript Version: 2.3 import * as pg from "pg"; import * as DbMigrateBase from "db-migrate-base"; diff --git a/types/dc/index.d.ts b/types/dc/index.d.ts index 9f9d7d3a57..7d893baf3e 100644 --- a/types/dc/index.d.ts +++ b/types/dc/index.d.ts @@ -44,6 +44,11 @@ declare namespace dc { (datum: T, index?: number): V; } + export interface Columns { + label: string; + format: Accessor; + } + export interface UnitFunction { (start: number, end: number, domain?: Array): number|Array; } @@ -117,6 +122,7 @@ declare namespace dc { itemHeight: IGetSet; horizontal: IGetSet; legendWidth: IGetSet; + legendText: IGetSet; itemWidth: IGetSet; autoItemWidth: IGetSet; render: () => void; @@ -139,6 +145,7 @@ declare namespace dc { svg: IGetSet, d3.Selection>; resetSvg(): void; filterPrinter: IGetSet<(filters: Array) => string, T>; + controlsUseVisibility: IGetSet; turnOnControls(): void; turnOffControls(): void; transitionDuration: IGetSet; @@ -299,7 +306,8 @@ declare namespace dc { export interface DataTableWidget extends BaseMixin { size: IGetSet; - columns: IGetSet|string|Array|string>>, DataTableWidget>; + showGroups: IGetSet; + columns: IGetSet|Columns>, DataTableWidget>; sortBy: IGetSet, DataTableWidget>; order: IGetSet<(a: any, b: any) => number, DataTableWidget>; } diff --git a/types/debessmann/debessmann-tests.ts b/types/debessmann/debessmann-tests.ts index 3e44ff8cd6..802257992e 100644 --- a/types/debessmann/debessmann-tests.ts +++ b/types/debessmann/debessmann-tests.ts @@ -1,7 +1,7 @@ import {DM, Event, EventId} from 'debessmann'; let eventId: EventId = {seq: 0, time: new Date()}; -let e: Event = {_id: eventId, headers: {'header1': 'header1Val'}}; +let e: Event = {_id: eventId, headers: {header1: 'header1Val'}}; let dm: DM = { init(endpoint: string, auth: string): void { diff --git a/types/dedent/dedent-tests.ts b/types/dedent/dedent-tests.ts new file mode 100644 index 0000000000..30c3546066 --- /dev/null +++ b/types/dedent/dedent-tests.ts @@ -0,0 +1,11 @@ +import * as dedent from 'dedent'; + +const lines: string = dedent` + first + second + third +`; + +const text: string = dedent(` + A test argument. + `); diff --git a/types/dedent/index.d.ts b/types/dedent/index.d.ts new file mode 100644 index 0000000000..1029974a22 --- /dev/null +++ b/types/dedent/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for dedent 0.7 +// Project: https://github.com/dmnd/dedent +// Definitions by: Douglas Duteil +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = dedent; + +declare function dedent(literals: string): string; +declare function dedent(literals: TemplateStringsArray, ...placeholders: any[]): string; +declare namespace dedent {} diff --git a/types/dedent/tsconfig.json b/types/dedent/tsconfig.json new file mode 100644 index 0000000000..29eb7040b0 --- /dev/null +++ b/types/dedent/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", + "dedent-tests.ts" + ] +} diff --git a/types/dedent/tslint.json b/types/dedent/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/dedent/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/deep-freeze/deep-freeze-tests.ts b/types/deep-freeze/deep-freeze-tests.ts index 4eeb1e9890..b8a6061859 100644 --- a/types/deep-freeze/deep-freeze-tests.ts +++ b/types/deep-freeze/deep-freeze-tests.ts @@ -1,8 +1,7 @@ - - import df = require('deep-freeze'); class Foo { - foo: string; + foo: string; } -var foo:Foo = df(new Foo()); +const foo = df(new Foo()); +const items = df([{id: 0, name: 'first'}]); diff --git a/types/deep-freeze/index.d.ts b/types/deep-freeze/index.d.ts index 92f6c8db2f..16e183d185 100644 --- a/types/deep-freeze/index.d.ts +++ b/types/deep-freeze/index.d.ts @@ -1,13 +1,17 @@ -// Type definitions for deep-freeze +// Type definitions for deep-freeze 0.1 // Project: https://github.com/substack/deep-freeze -// Definitions by: Bart van der Schoor +// Definitions by: Bart van der Schoor , Aluan Haddad // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 -declare var deepFreeze: DeepFreeze.DeepFreezeInterface; export = deepFreeze; -declare namespace DeepFreeze { - export interface DeepFreezeInterface { - (obj: T): T; - } +declare function deepFreeze(a: T[]): ReadonlyArray>; +declare function deepFreeze(f: T): T; +declare function deepFreeze(o: T): deepFreeze.DeepReadonly; + +declare namespace deepFreeze { + type DeepReadonly = { + readonly [P in keyof T]: DeepReadonly + }; } diff --git a/types/deep-freeze/tslint.json b/types/deep-freeze/tslint.json new file mode 100644 index 0000000000..1cd17c5dc4 --- /dev/null +++ b/types/deep-freeze/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // This package uses the Function type to align with lib.d.ts + "ban-types": false + } +} diff --git a/types/delaunator/delaunator-tests.ts b/types/delaunator/delaunator-tests.ts new file mode 100644 index 0000000000..1d50e0273a --- /dev/null +++ b/types/delaunator/delaunator-tests.ts @@ -0,0 +1,31 @@ +import * as Delaunator from 'delaunator'; +import { Points, GetPoint } from 'delaunator'; + +// Default [x, y] +const points: Points = [[168, 180], [168, 178], [168, 179], [168, 181], [168, 183], [167, 183], [167, 184]]; +const d = new Delaunator(points); + +// Custom getX & getY +interface CustomPoint { + x: number; + y: number; +} +const customPoints = [{x: 168, y: 180}, {x: 168, y: 178}, {x: 168, y: 179}, {x: 168, y: 181}, {x: 168, y: 183}, {x: 167, y: 183}, {x: 167, y: 184}]; + +const getX = (point: CustomPoint) => point.x; +const getY = (point: CustomPoint) => point.y; + +new Delaunator(customPoints, point => point.x, point => point.y); +new Delaunator(customPoints, getX, getY); + +// To get the coordinates of all triangles, use: +const triangles = d.triangles; +const halfedges = d.halfedges; +const coordinates: number[][][] = []; +for (let i = 0; i < triangles.length; i += 3) { + coordinates.push([ + points[triangles[i]], + points[triangles[i + 1]], + points[triangles[i + 2]] + ]); +} diff --git a/types/delaunator/index.d.ts b/types/delaunator/index.d.ts new file mode 100644 index 0000000000..5761fec4a8 --- /dev/null +++ b/types/delaunator/index.d.ts @@ -0,0 +1,35 @@ +// Type definitions for delaunator 1.0 +// Project: https://github.com/mapbox/delaunator#readme +// Definitions by: Denis Carriere +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare class Delaunator { + /** + * A flat Int32Array array of triangle vertex indices (each group of three numbers forms a triangle). All triangles are directed counterclockwise. + */ + triangles: Int32Array; + + /** + * A flat Int32Array array of triangle half-edge indices that allows you to traverse the triangulation. + * i-th half-edge in the array corresponds to vertex triangles[i] the half-edge is coming from. + * halfedges[i] is the index of a twin half-edge in an adjacent triangle (or -1 for outer half-edges on the convex hull). + * + * The flat array-based data structures might be counterintuitive, but they're one of the key reasons this library is fast. + */ + halfedges: Int32Array; + + /** + * Constructs a delaunay triangulation object given an array of points ([x, y] by default). Duplicate points are skipped. + */ + constructor(points: Delaunator.Points); + constructor(points: T[], getX: Delaunator.GetPoint, getY: Delaunator.GetPoint); +} + +declare namespace Delaunator { + type Point = number[]; + type Points = Point[]; + type Triangles = Int32Array; + type HalfEdges = Int32Array; + type GetPoint = (point: T) => number; +} +export = Delaunator; diff --git a/types/delaunator/tsconfig.json b/types/delaunator/tsconfig.json new file mode 100644 index 0000000000..438b1c53af --- /dev/null +++ b/types/delaunator/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", + "delaunator-tests.ts" + ] +} diff --git a/types/delaunator/tslint.json b/types/delaunator/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/delaunator/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/devexpress-web/README.md b/types/devexpress-web/README.md index 341304e192..897ec236e1 100644 --- a/types/devexpress-web/README.md +++ b/types/devexpress-web/README.md @@ -2,8 +2,7 @@ DevExpress ASP.NET/MVC TypeScript definitions ============================================= You can use these TypeScript definitions for your web projects, which contain -DevExpress ASP.NET or MVC controls. For this, simply add at the top of your -code ``. +DevExpress ASP.NET or MVC controls. The API enclosed into the DevExpress ASP.NET/MVC TypeScript definition file fully corresponds to the API described in the DevExpress ASP.NET/MVC diff --git a/types/devexpress-web/devexpress-web-tests.ts b/types/devexpress-web/devexpress-web-tests.ts index 8a76a68f26..ef7eb8de37 100644 --- a/types/devexpress-web/devexpress-web-tests.ts +++ b/types/devexpress-web/devexpress-web-tests.ts @@ -1,5 +1,3 @@ -/// - declare var hiddenField: ASPxClientHiddenField; declare var mainCallbackPanel: ASPxClientCallbackPanel; declare var loginPopup: ASPxClientPopupControl; @@ -82,7 +80,6 @@ module DXDemo { export function onSearchComboBoxIndexChanged(s: ASPxClientComboBox, e: ASPxClientProcessingModeEventArgs): void { hideMenu(); - $("#IndexContent").addClass("search-extend"); searchButton.AdjustControl(); }; @@ -303,19 +300,14 @@ module DXDemo { } catch (e) { } ASPxClientUtils.AttachEventToElement(window, "resize", onWindowResize); if (ASPxClientUtils.iOSPlatform) { - $("form :input").blur(function () { - $('html, body').animate({ scrollTop: 0 }, 0); - }); + // animate } }; export function updateRatingLabels(ratingControl: ASPxClientTrackBar) { - $("#cpLeftLabelID").html(ratingControl.GetPositionStart().toString()); - $("#cpRightLabelID").html(ratingControl.GetPositionEnd().toString()); - }; - - export function onAboutWindowCloseUp(): void { - $(mainCallbackPanel.GetMainElement()).removeClass("show-about"); + var start = ratingControl.GetPositionStart().toString(); + var end = ratingControl.GetPositionEnd().toString(); + document.getElementById("cpLeftLabelID").innerHTML = start + " " + end; }; export function onRatingControlItemClick(s: ASPxClientRatingControl, e: ASPxClientRatingControlItemClickEventArgs): void { @@ -324,10 +316,8 @@ module DXDemo { export function onInputKeyDown(s: ASPxClientTextBox, e: ASPxClientEditKeyEventArgs): void { var keyCode = ASPxClientUtils.GetKeyCode(e.htmlEvent); - if (keyCode == 13) { - (jQuery).event.fix(e.htmlEvent).preventDefault(); + if (keyCode == 13) (s.GetInputElement()).blur(); - } }; function getCurrentPage(): string { @@ -339,7 +329,6 @@ module DXDemo { }; function showAboutWindow(): void { - $(mainCallbackPanel.GetMainElement()).addClass("show-about"); aboutWindow.ShowAtElementByID("MainCallbackPanel_ContentPane"); }; diff --git a/types/devexpress-web/index.d.ts b/types/devexpress-web/index.d.ts index b52c31759d..50aac382b1 100644 --- a/types/devexpress-web/index.d.ts +++ b/types/devexpress-web/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for DevExpress ASP.NET 16.1 +// Type definitions for DevExpress ASP.NET v171.4 // Project: http://devexpress.com/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -41,7 +41,7 @@ interface ASPxClientDashboardItemUnderlyingData { interface ASPxClientDashboardItemRequestUnderlyingDataParameters { /** * Gets or sets an array of data member identifiers used to obtain underlying data. - * Value: An array of String objects that specify data member identifiers. + * Value: An array of string values that specify data member identifiers. */ DataMembers: string[]; /** @@ -71,23 +71,23 @@ interface ASPxClientDashboardItemRequestUnderlyingDataCompleted { (data: ASPxClientDashboardItemUnderlyingData): void; } /** - * References a method that will handle the ItemClick event. + * References a method that will handle the ItemClick events. */ interface ASPxClientDashboardItemClickEventHandler { /** - * References a method that will handle the ItemClick event. + * References a method that will handle the ItemClick events. * @param source The event source. * @param e A ASPxClientDashboardItemClickEventArgs object that contains event data. */ (source: S, e: ASPxClientDashboardItemClickEventArgs): void; } /** - * Provides data for the ItemClick event. + * Provides data for the ItemClick events. */ interface ASPxClientDashboardItemClickEventArgs extends ASPxClientEventArgs { /** * Gets the name of the dashboard item for which the event has been raised. - * Value: A String that is the dashboard item name. + * Value: A string value that is the dashboard item name. */ ItemName: string; /** @@ -115,28 +115,28 @@ interface ASPxClientDashboardItemClickEventArgs extends ASPxClientEventArgs { /** * Requests underlying data corresponding to the clicked visual element. * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. - * @param dataMembers An array of String values that specify data members used to obtain underlying data. + * @param dataMembers An array of string values that specify data members used to obtain underlying data. */ RequestUnderlyingData(onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted, dataMembers: string[]): void; } /** - * References a method that will handle the ItemVisualInteractivity event. + * References a method that will handle the ItemVisualInteractivity events. */ interface ASPxClientDashboardItemVisualInteractivityEventHandler { /** - * References a method that will handle the ItemVisualInteractivity event. + * References a method that will handle the ItemVisualInteractivity events. * @param source The event source. * @param e A ASPxClientDashboardItemVisualInteractivityEventArgs object containing event data. */ (source: S, e: ASPxClientDashboardItemVisualInteractivityEventArgs): void; } /** - * Provides data for the ItemVisualInteractivity event. + * Provides data for the ItemVisualInteractivity events. */ interface ASPxClientDashboardItemVisualInteractivityEventArgs extends ASPxClientEventArgs { /** * Gets the component name of the dashboard item for which the event was raised. - * Value: A String that is the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. */ ItemName: string; /** @@ -177,23 +177,23 @@ interface ASPxClientDashboardItemVisualInteractivityEventArgs extends ASPxClient SetDefaultSelection(values: ASPxClientDashboardItemDataAxisPointTuple[]): void; } /** - * References a method that will handle the ItemSelectionChanged event. + * References a method that will handle the ItemSelectionChanged events. */ interface ASPxClientDashboardItemSelectionChangedEventHandler { /** - * References a method that will handle the ItemSelectionChanged event. + * References a method that will handle the ItemSelectionChanged events. * @param source The event source. * @param e A ASPxClientDashboardItemSelectionChangedEventArgs object containing event data. */ (source: S, e: ASPxClientDashboardItemSelectionChangedEventArgs): void; } /** - * Provides data for the ItemSelectionChanged event. + * Provides data for the ItemSelectionChanged events. */ interface ASPxClientDashboardItemSelectionChangedEventArgs extends ASPxClientEventArgs { /** * Gets the component name of the dashboard item for which the event was raised. - * Value: A String that is the component name of the dashboard item. + * Value: A string that is the component name of the dashboard item. */ ItemName: string; /** @@ -206,19 +206,19 @@ interface ASPxClientDashboardItemSelectionChangedEventArgs extends ASPxClientEve */ interface ASPxClientDashboardItemElementCustomColorEventHandler { /** - * References a method that will handle the ItemElementCustomColor event. + * References a method that will handle the ItemElementCustomColor events. * @param source The event source. * @param e An ASPxClientDashboardItemElementCustomColorEventArgs object that contains event data. */ (source: S, e: ASPxClientDashboardItemElementCustomColorEventArgs): void; } /** - * Provides data for the ItemElementCustomColor event. + * Provides data for the ItemElementCustomColor events. */ interface ASPxClientDashboardItemElementCustomColorEventArgs extends ASPxClientEventArgs { /** * Gets the component name of the dashboard item for which the event was raised. - * Value: A String that is the component name of the dashboard item for which the event was raised. + * Value: A string value that is the component name of the dashboard item for which the event was raised. */ ItemName: string; /** @@ -240,11 +240,11 @@ interface ASPxClientDashboardItemElementCustomColorEventArgs extends ASPxClientE GetMeasures(): ASPxClientDashboardItemDataMeasure[]; } /** - * References a method that will handle the ItemWidgetCreated event. + * References a method that will handle the ItemWidgetCreated events. */ interface ASPxClientDashboardItemWidgetCreatedEventHandler { /** - * References a method that will handle the ItemWidgetCreated event. + * References a method that will handle the ItemWidgetCreated events. * @param source The event source. * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. */ @@ -273,11 +273,11 @@ interface ASPxClientDashboardItemWidgetUpdatedEventHandler { (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; } /** - * References a method that will handle the ItemBeforeWidgetDisposed event. + * References a method that will handle the ItemBeforeWidgetDisposed events. */ interface ASPxClientDashboardItemBeforeWidgetDisposedEventHandler { /** - * References a method that will handle the ItemBeforeWidgetDisposed event. + * References a method that will handle the ItemBeforeWidgetDisposed events. * @param source The event source. * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. */ @@ -289,7 +289,7 @@ interface ASPxClientDashboardItemBeforeWidgetDisposedEventHandler { interface ASPxClientDashboardItemWidgetEventArgs extends ASPxClientEventArgs { /** * Gets the component name of the dashboard item for which the event was raised. - * Value: A String that is the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. */ ItemName: string; /** @@ -391,27 +391,27 @@ interface ASPxClientDashboardItemDataAxis { interface ASPxClientDashboardItemDataDimension { /** * Gets the dimension identifier. - * Value: A String that is the dimension identifier. + * Value: A string value that is the dimension identifier. */ Id: string; /** * Gets or sets the name of the dimension. - * Value: A String that is the name of the dimension. + * Value: A string value that is the name of the dimension. */ Name: string; /** * Gets the data member identifier for the current dimension. - * Value: A String value that identifies a data member. + * Value: A string value that identifies a data member. */ DataMember: string; /** * Gets the group interval for date-time values for the current dimension. - * Value: A String value that represents how date-time values are grouped. + * Value: A string value that represents how date-time values are grouped. */ DateTimeGroupInterval: string; /** * Gets the group interval for string values. - * Value: A String value that specifies the group interval for string values. + * Value: A string value that specifies the group interval for string values. */ TextGroupInterval: string; /** @@ -426,22 +426,22 @@ interface ASPxClientDashboardItemDataDimension { interface ASPxClientDashboardItemDataMeasure { /** * Gets the measure identifier. - * Value: A String that is the measure identifier. + * Value: A string value that is the measure identifier. */ Id: string; /** * Gets the name of the measure. - * Value: A String that is the name of the measure. + * Value: A string value that is the name of the measure. */ Name: string; /** * Gets the data member that identifies the data source list used to provide data for the current measure. - * Value: A String value that identifies the data source list used to provide data for the current measure. + * Value: A string value that identifies the data source list used to provide data for the current measure. */ DataMember: string; /** * Gets the type of summary function calculated against the current measure. - * Value: A String value that identifies the type of summary function calculated against the current measure. + * Value: A string value that identifies the type of summary function calculated against the current measure. */ SummaryType: string; /** @@ -456,22 +456,22 @@ interface ASPxClientDashboardItemDataMeasure { interface ASPxClientDashboardItemDataDelta { /** * Gets the data item identifier. - * Value: A String that is the data item identifier. + * Value: A string that is the data item identifier. */ Id: string; /** * Gets the name of the data item container. - * Value: A String value that is the name of the data item container. + * Value: A string value that is the name of the data item container. */ Name: string; /** * Gets the identifier for the measure that provides actual values. - * Value: A String value that is the measure identifier. + * Value: A string value that is the measure identifier. */ ActualMeasureId: string; /** * Gets the identifier for the measure that provides target values. - * Value: A String value that is the measure identifier. + * Value: A string value that is the measure identifier. */ TargetMeasureId: string; } @@ -611,55 +611,1040 @@ interface ASPxClientDashboardItemDataAxisPointTuple { GetAxisPoint(axisName: string): ASPxClientDashboardItemDataAxisPoint; } /** - * A client-side equivalent of the ASPxDashboardDesigner control. + * A range in the Range Filter dashboard item. */ -interface ASPxClientDashboardDesigner extends ASPxClientControl { +interface ASPxClientDashboardRangeFilterSelection { /** - * Occurs after the state of the dashboard displayed in the ASPxClientDashboardDesigner is changed. + * Gets or sets a maximum value in the range of the Range Filter dashboard item. + * Value: A maximum value in the range of the Range Filter dashboard item. */ - DashboardStateChanged: ASPxClientEvent>; + Maximum: Object; /** - * Occurs after another dashboard is loaded to the ASPxClientDashboardDesigner. + * Gets or sets a minimum value in the range of the Range Filter dashboard item. + * Value: A minimum value in the range of the Range Filter dashboard item. */ - DashboardChanged: ASPxClientEvent>; + Minimum: Object; +} +/** + * A collection of ASPxClientDashboardParameter objects. + */ +interface ASPxClientDashboardParameters { + /** + * Returns an array of dashboard parameters from the ASPxClientDashboardParameters collection. + */ + GetParameterList(): ASPxClientDashboardParameter[]; + /** + * Returns a dashboard parameter by its name. + * @param name A String object that specifies the parameter name. + */ + GetParameterByName(name: string): ASPxClientDashboardParameter; + /** + * Returns a dashboard parameter by its index in the ASPxClientDashboardParameters collection. + * @param index An integer value that specifies the parameter index. + */ + GetParameterByIndex(index: number): ASPxClientDashboardParameter; +} +/** + * A client-side dashboard parameter. + */ +interface ASPxClientDashboardParameter { + /** + * Gets the dashboard parameter name on the client side. + * Value: A string value that is the dashboard parameter name on the client side. + */ + Name: string; + /** + * Gets the dashboard parameter value on the client side. + * Value: A string value that specifies the dashboard parameter value on the client side. + */ + Value: Object; + /** + * Returns a parameter name. + */ + GetName(): string; + /** + * Returns a current parameter value(s). + */ + GetValue(): Object; + /** + * Specifies the current parameter value(s). + * @param value The current parameter value(s). + */ + SetValue(value: Object): void; + /** + * Returns a default parameter value. + */ + GetDefaultValue(): Object; + /** + * Returns the parameter's description displayed to an end-user. + */ + GetDescription(): string; + /** + * Returns a parameter type. + */ + GetType(): string; + /** + * Returns possible parameter values. + */ + GetValues(): ASPxClientDashboardParameterValue[]; +} +/** + * Provides access to the parameter value and display text. + */ +interface ASPxClientDashboardParameterValue { + /** + * Returns the parameter display text. + */ + GetDisplayText(): string; + /** + * Returns a parameter value. + */ + GetValue(): Object; +} +/** + * Contains settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. + */ +interface ImageFormatOptions { + /** + * Gets or sets an image format in which the dashboard (dashboard item) is exported. + * Value: A value returned by the DashboardExportImageFormat class that specifies an image format in which the dashboard (dashboard item) is exported. + */ + Format: string; + /** + * Gets or sets the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. + * Value: An integer value that specifies the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. + */ + Resolution: number; +} +/** + * Contains options which define how the dashboard item is exported to Excel format. + */ +interface ExcelFormatOptions { + /** + * Gets or sets the Excel format in which the dashboard item is exported. + * Value: A value returned by the DashboardExportExcelFormat class that specifies the Excel format in which the dashboard item is exported. + */ + Format: string; + /** + * Gets or sets a character used to separate values in a CSV document. + * Value: A string value that specifies the character used to separate values in a CSV document. + */ + CsvValueSeparator: string; +} +/** + * Contains settings that specify parameters affecting how the Grid dashboard item is exported. + */ +interface GridExportOptions { + /** + * Gets or sets whether the size of the Grid dashboard item is changed according to the width of the exported page. + * Value: true, to change the size of the Grid dashboard item according to the width of the exported page; otherwise, false. + */ + FitToPageWidth: boolean; + /** + * Gets or sets whether to print column headers of the Grid dashboard item on every page. + * Value: true, to print column headers on every page; otherwise, false. + */ + PrintHeadersOnEveryPage: boolean; +} +/** + * Contains settings that specify parameters affecting how the Pivot dashboard item is exported. + */ +interface PivotExportOptions { + /** + * Gets or sets whether to print the column headers of the Pivot dashboard item on every page. + * Value: true, to print column headers on every page; otherwise, false. + */ + PrintHeadersOnEveryPage: boolean; +} +/** + * Contains settings that specify parameters affecting how the Pie dashboard item is exported. + */ +interface PieExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Gauge dashboard item is exported. + */ +interface GaugeExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Card dashboard item is exported. + */ +interface CardExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Range Filter dashboard item is exported. + */ +interface RangeFilterExportOptions { + /** + * Gets or sets whether the page orientation used to export a Range Filter dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a Range Filter dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Range Filter dashboard item. + * Value: A value returned by the RangeFilterExportSizeMode class that specifies the export size mode for the Range Filter dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how Chart dashboard items are exported. + */ +interface ChartExportOptions { + /** + * Gets or sets whether the page orientation used to export a Chart dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a Chart dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Chart dashboard item. + * Value: A value returned by the ChartExportSizeMode class that specifies the export size mode for the Chart dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how Map dashboard items are exported. + */ +interface MapExportOptions { + /** + * Gets or sets whether the page orientation used to export a map dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a map dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the map dashboard item. + * Value: A value returned by the MapExportSizeMode class that specifies specifies the export size mode for the map dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how the dashboard (dashboard item) is exported. + */ +interface ASPxClientDashboardExportOptions { + /** + * Gets or sets the standard paper size. + * Value: A string value returned by the DashboardExportPaperKind class that specifies the standard paper size. + */ + PaperKind: string; + /** + * Gets or sets the page orientation used to export a dashboard (dashboard item). + * Value: A string value returned by the DashboardExportPageLayout class that specifies the page orientation used to export a dashboard (dashboard item). + */ + PageLayout: string; + /** + * Gets or sets the mode for scaling when exporting a dashboard (dashboard item). + * Value: A string value returned by the DashboardExportScaleMode class that specifies the mode for scaling when exporting a dashboard (dashboard item). + */ + ScaleMode: string; + /** + * Gets or sets the scale factor (in fractions of 1) by which a dashboard (dashboard item) is scaled. + * Value: A Single value that specifies the scale factor by which a dashboard (dashboard item) is scaled. + */ + ScaleFactor: number; + /** + * Gets or sets the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). + * Value: An integer value that specifies the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). + */ + AutoFitPageCount: number; + /** + * Gets or sets the title of the exported document. + * Value: A string value that specifies the title of the exported document. + */ + Title: string; + /** + * Gets or sets whether a dashboard title (or dashboard item's caption) is included as the exported document title. + * Value: A boolean value that specifies whether a dashboard title (or dashboard item's caption) is included as the exported document title. + */ + ShowTitle: boolean; + /** + * Gets or sets the filter state's location on the exported document. + * Value: A string value returned by the DashboardExportFilterState class that specifies the filter state's location on the exported document. + */ + FilterState: string; + /** + * Provides access to options for exporting a dashboard or individual items in Image format. + * Value: An ImageFormatOptions object containing settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. + */ + ImageOptions: ImageFormatOptions; + /** + * Provides access to options for exporting individual dashboard items in Excel format. + * Value: An ExcelFormatOptions object containing settings that specify parameters affecting how the dashboard item is exported in Excel format. + */ + ExcelOptions: ExcelFormatOptions; + /** + * Provides access to options for exporting a Grid dashboard item. + * Value: A GridExportOptions object containing settings that specify parameters that affect how Grid dashboard items are exported. + */ + GridOptions: GridExportOptions; + /** + * Provides access to options for exporting a Pivot dashboard item. + * Value: A PivotExportOptions object containing settings that specify parameters that affect how Pivot dashboard items are exported. + */ + PivotOptions: PivotExportOptions; + /** + * Provides access to options for exporting a Pie dashboard item. + * Value: A PieExportOptions object containing settings that specify parameters that affect how Pie dashboard items are exported. + */ + PieOptions: PieExportOptions; + /** + * Provides access to options for exporting a Gauge dashboard item. + * Value: A GaugeExportOptions object containing settings that specify parameters that affect how Gauge dashboard items are exported. + */ + GaugeOptions: GaugeExportOptions; + /** + * Provides access to options for exporting a Card dashboard item. + * Value: A CardExportOptions object containing settings that specify parameters that affect how Card dashboard items are exported. + */ + CardOptions: CardExportOptions; + /** + * Provides access to options for exporting a Range Filter dashboard item. + * Value: A RangeFilterExportOptions object containing settings that specify parameters affecting how the Range Filter dashboard item is exported. + */ + RangeFilterOptions: RangeFilterExportOptions; + /** + * Provides access to options for exporting a Chart dashboard item. + * Value: A ChartExportOptions object containing settings that specify parameters that affect how Chart dashboard items are exported. + */ + ChartOptions: ChartExportOptions; + /** + * Provides access to options for exporting map dashboard items. + * Value: A MapExportOptions object containing settings that specify parameters that affect how map dashboard items are exported. + */ + MapOptions: MapExportOptions; +} +/** + * Contains options related to exporting a dashboard/dashboard item to the PDF format. + */ +interface DashboardPdfExportOptions { + /** + * Gets or sets the type of paper for the exported document. + * Value: A DashboardExportPaperKind value that specifies the type of paper for the exported document. + */ + PaperKind: string; + /** + * Gets or sets the page orientation used to export a dashboard/dashboard item. + * Value: A DashboardExportPageLayout value that specifies the page orientation used to export a dashboard/dashboard item. + */ + PageLayout: string; + /** + * Gets or sets the mode for scaling a dashboard/dashboard item in the exported document. + * Value: A DashboardExportScaleMode value that specifies the mode for scaling a dashboard/dashboard item in the exported document. + */ + ScaleMode: string; + /** + * Gets or sets the scale factor (in fractions of 1), by which a dashboard/dashboard item is scaled in the exported document. + * Value: A Single value that specifies the scale factor by which a dashboard/dashboard item is scaled in the exported document. + */ + ScaleFactor: number; + /** + * Gets or sets the number of horizontal/vertical pages spanning the total width/height of a dashboard/dashboard item. + * Value: An integer value that specifies the number of horizontal/vertical pages spanning the total width/height of a dashboard/dashboard item. + */ + AutoFitPageCount: number; + /** + * Gets or sets the title of the exported document. + * Value: A string value that specifies the title of the exported document. + */ + Title: string; + /** + * Gets or sets whether a dashboard title (or dashboard item's caption) is included as the exported document title. + * Value: A boolean value that specifies whether a dashboard title (or dashboard item's caption) is included as the exported document title. + */ + ShowTitle: boolean; + /** + * Gets or sets whether to add the state of master filter items to the exported document. + * Value: true, to add the state of master filter items to the exported document; otherwise, false. + */ + ExportFilters: boolean; + /** + * Gets or sets whether to add current parameter values to the exported document. + * Value: true, to add current parameter values to the exported document; otherwise, false. + */ + ExportParameters: boolean; + /** + * Gets or sets whether to add current values of a hidden parameter to the exported document. + * Value: true, to add current values of a hidden parameter to the exported document; otherwise, false. + */ + IncludeHiddenParameters: boolean; + /** + * Gets or sets a position of the dashboard state (such as master filter or current parameter values) in the exported document. + * Value: A DashboardStateExportPosition object that specifies the position of the dashboard state in the exported document. + */ + DashboardStatePosition: string; + /** + * Gets or sets whether cards within the Card dashboard item are arranged automatically on the exported page. + * Value: true, to arrange cards automatically on the exported page; otherwise, false. + */ + CardAutoArrangeContent: boolean; + /** + * Gets or sets whether the page orientation used to export the Chart dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export the Chart dashboard item; otherwise, false. + */ + ChartAutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Chart dashboard item. + * Value: A ChartExportSizeMode value that specifies the export size mode for the Chart dashboard item. + */ + ChartSizeMode: string; + /** + * Gets or sets whether gauges within the Gauge dashboard item are arranged automatically on the exported page. + * Value: true, to arrange gauges automatically on the exported page; otherwise, false. + */ + GaugeAutoArrangeContent: boolean; + /** + * Gets or sets whether the size of the Grid dashboard item is changed according to the width of the exported page. + * Value: true, to change the size of the Grid dashboard item according to the width of the exported page; otherwise, false. + */ + GridFitToPageWidth: boolean; + /** + * Gets or sets whether to add column headers of the Grid dashboard item to every page. + * Value: true, to add column headers to every page; otherwise, false. + */ + GridPrintHeadersOnEveryPage: boolean; + /** + * Gets or sets whether the page orientation used to export the Map dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export the Map dashboard item; otherwise, false. + */ + MapAutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Map dashboard item. + * Value: A MapExportSizeMode value that specifies the export size mode for the Map dashboard item. + */ + MapSizeMode: string; + /** + * Gets or sets whether pies within the Pie dashboard item are arranged automatically on the exported page. + * Value: true, to arrange pies automatically on the exported page; otherwise, false. + */ + PieAutoArrangeContent: boolean; + /** + * Gets or sets whether to add column headers of the Pivot dashboard item to every page. + * Value: true, to add column headers to every page; otherwise, false. + */ + PivotPrintHeadersOnEveryPage: boolean; + /** + * Gets or sets whether the page orientation used to export the Range Filter dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export the Range Filter dashboard item; otherwise, false. + */ + RangeFilterAutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Range Filter dashboard item. + * Value: A RangeFilterExportSizeMode value that specifies the export size mode for the Range Filter dashboard item. + */ + RangeFilterSizeMode: string; + /** + * Gets or sets whether the page orientation used to export the Treemap dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export the Treemap dashboard item; otherwise, false. + */ + TreemapAutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Treemap dashboard item. + * Value: A TreemapExportSizeMode value that specifies the export size mode for the Treemap dashboard item. + */ + TreemapSizeMode: string; +} +/** + * Contains options related to exporting a dashboard/dashboard item to an image. + */ +interface DashboardImageExportOptions { + /** + * Gets or sets a title of the exported document. + * Value: A string value that specifies the title of the exported document. + */ + Title: string; + /** + * Gets or sets whether a dashboard title (or dashboard item's caption) is included as the exported document title. + * Value: true, to include a dashboard title (or dashboard item's caption) as the exported document title; otherwise, false. + */ + ShowTitle: boolean; + /** + * Gets or sets whether to add the state of master filter items to the exported document. + * Value: true, to add the state of master filter items to the exported document; otherwise, false. + */ + ExportFilters: boolean; + /** + * Gets or sets whether to add current parameter values to the exported document. + * Value: true, to add current parameter values to the exported document; otherwise, false. + */ + ExportParameters: boolean; + /** + * Gets or sets whether to add current values of a hidden parameter to the exported document. + * Value: true, to add current values of a hidden parameter to the exported document; otherwise, false. + */ + IncludeHiddenParameters: boolean; + /** + * Gets or sets an image format in which the dashboard/dashboard item is exported. + * Value: A DashboardExportImageFormat value that specifies an image format in which the dashboard/dashboard item is exported. + */ + Format: string; + /** + * Gets or sets the resolution (in dpi) used to export a dashboard/dashboard item to an image. + * Value: An integer value that specifies the resolution (in dpi) used to export a dashboard/dashboard item to an image. + */ + Resolution: number; + /** + * Gets or sets the scale factor (in fractions of 1), by which a dashboard/dashboard item is scaled in the exported document. + * Value: A string value that specifies the scale factor by which a dashboard/dashboard item is scaled in the exported document. + */ + ScaleFactor: number; +} +/** + * Contains options related to exporting a dashboard/dashboard item to the Excel format. + */ +interface DashboardExcelExportOptions { + /** + * Gets or sets the Excel format in which the dashboard item is exported. + * Value: A DashboardExportExcelFormat value that specifies the Excel format in which the dashboard item is exported. + */ + Format: string; + /** + * Gets or sets a character used to separate values in a CSV document. + * Value: A string value that specifies the character used to separate values in a CSV document. + */ + CsvValueSeparator: string; + /** + * Gets or sets whether to add the state of master filter items to the exported document. + * Value: true, to add the state of master filter items to the exported document; otherwise, false. + */ + ExportFilters: boolean; + /** + * Gets or sets whether to add current parameter values to the exported document. + * Value: true, to add current parameter values to the exported document; otherwise, false. + */ + ExportParameters: boolean; + /** + * Gets or sets whether to add current values of a hidden parameter to the exported document. + * Value: true, to add current values of a hidden parameter to the exported document; otherwise, false. + */ + IncludeHiddenParameters: boolean; + /** + * Gets or sets the position of the dashboard state (such as master filter or current parameter values) in the exported document. + * Value: A DashboardStateExcelExportPosition object that specifies the position of the dashboard state in the exported document. + */ + DashboardStatePosition: string; +} +/** + * A client-side equivalent of the ASPxDashboard control. + */ +interface ASPxClientDashboard extends ASPxClientControl { + /** + * Fires when a round trip to the server has been initiated by a call to the client PerformDataCallback method. + */ + CustomDataCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after the state of the dashboard displayed in the ASPxClientDashboard is changed. + */ + DashboardStateChanged: ASPxClientEvent>; + /** + * Occurs after a new dashboard is displayed in the ASPxClientDashboard. + */ + DashboardChanged: ASPxClientEvent>; /** * For internal use. */ - CustomizeMenuItems: ASPxClientEvent>; - BeforeRender: ASPxClientEvent>; + CustomizeMenuItems: ASPxClientEvent>; /** - * Switches the ASPxClientDashboardDesigner to the viewer mode. + * Occurs before any element in the Web Dashboard control has been rendered. + */ + BeforeRender: ASPxClientEvent>; + /** + * Occurs when an end-user clicks a dashboard item. + */ + ItemClick: ASPxClientEvent>; + /** + * Allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting. + */ + ItemVisualInteractivity: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetCreated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdating: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemBeforeWidgetDisposed: ASPxClientEvent>; + /** + * Occurs after the selection within the dashboard item is changed. + */ + ItemSelectionChanged: ASPxClientEvent>; + /** + * Allows you to color the required dashboard item elements using the specified colors. + */ + ItemElementCustomColor: ASPxClientEvent>; + /** + * Occurs when a master filter state is changed. + */ + ItemMasterFilterStateChanged: ASPxClientEvent>; + /** + * Occurs when a drill-down/drill-up is performed. + */ + ItemDrillDownStateChanged: ASPxClientEvent>; + /** + * Occurs after the available interactivity actions have changed for the specific dashboard item. + */ + ActionAvailabilityChanged: ASPxClientEvent>; + /** + * Occurs after parameter values provided using a Dynamic List are loaded. + */ + DynamicLookUpValuesLoaded: ASPxClientEvent>; + /** + * Occurs when a dashboard item update is initiated. + */ + ItemBeginUpdate: ASPxClientEvent>; + /** + * Occurs after the dashboard item update is performed. + */ + ItemEndUpdate: ASPxClientEvent>; + /** + * Occurs when a dashboard update is initiated. + */ + DashboardBeginUpdate: ASPxClientEvent>; + /** + * Occurs after the dashboard update is performed. + */ + DashboardEndUpdate: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientDataCallback object that represents the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; + /** + * Gets an inner part of the ASPxClientDashboard control. + */ + GetDashboardControl(): DashboardControl; + /** + * Switches the ASPxClientDashboard to the viewer mode. */ SwitchToViewer(): void; /** - * Switches the ASPxClientDashboardDesigner to the designer mode. + * Switches the ASPxClientDashboard to the designer mode. */ SwitchToDesigner(): void; /** - * Gets the current working mode of the Web Designer. + * Gets the current working mode of the Web Dashboard. */ GetWorkingMode(): string; /** - * Gets the identifier of the dashboard that is displayed in the ASPxClientDashboardDesigner. + * Gets the identifier of the dashboard that is displayed in the ASPxClientDashboard. */ GetDashboardId(): string; /** - * Gets the name of the dashboard that is displayed in the ASPxClientDashboardDesigner. + * Gets the name of the dashboard that is displayed in the ASPxClientDashboard. */ GetDashboardName(): string; /** - * Gets the state of the dashboard (for instance, the master filtering state) displayed in the ASPxClientDashboardDesigner. + * Gets the state of the dashboard displayed in the ASPxClientDashboard. */ GetDashboardState(): string; /** - * Loads a dashboard with the specified identifier. - * @param dashboardId A String value that specifies the dashboard identifier. + * Sets the state of the dashboard displayed in the ASPxClientDashboard. + * @param dashboardState A JSON object that specifies the dashboard state. + */ + SetDashboardState(dashboardState: Object): void; + /** + * Sets the state of the dashboard displayed in the ASPxClientDashboard. + * @param dashboardStateString A string value that specifies the state of the dashboard displayed in the ASPxClientDashboard. + */ + SetDashboardState(dashboardStateString: string): void; + /** + * Loads a dashboard with the specified identifier from the dashboard storage. + * @param dashboardId A string value that specifies the dashboard identifier. */ LoadDashboard(dashboardId: string): void; /** - * Saves a dashboard to the dashboard storage. + * Saves a current dashboard to the dashboard storage. */ SaveDashboard(): void; + /** + * Invokes the Dashboard Parameters dialog. + */ + ShowParametersDialog(): void; + /** + * Closes the Dashboard Parameters dialog. + */ + HideParametersDialog(): void; + /** + * Returns dashboard parameter settings and metadata. + */ + GetParameters(): ASPxClientDashboardParameters; + /** + * Invokes the dialog that allows end-users to export the entire dashboard to the specified format. + * @param format A string value that specifies the format. For instance, you can use 'PDF' or 'Image'. + */ + ShowExportDashboardDialog(format: string): void; + /** + * Invokes the dialog that allows end-users to export the dashboard item to the specified format. + * @param itemComponentName A string value that specifies the component name of the dashboard item to export. + * @param format A string value that specifies the format. For instance, you can use 'PDF, 'Image' or 'Excel'. Note that some items (i.e., ImageDashboardItem) do not support exporting to the 'Excel' format. + */ + ShowExportDashboardItemDialog(itemComponentName: string, format: string): void; + /** + * Hides the dialog that allows end-users to export the dashboard/dashboard item. + */ + HideExportDialog(): void; + /** + * Returns settings that specify parameters affecting how the dashboard is exported. + */ + GetExportOptions(): ASPxClientDashboardExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to the PDF format. + */ + GetPdfExportOptions(): DashboardPdfExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to an image. + */ + GetImageExportOptions(): DashboardImageExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to the Excel format. + */ + GetExcelExportOptions(): DashboardExcelExportOptions; + /** + * Specifies settings that specify parameters affecting how the dashboard is exported. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + SetExportOptions(options: ASPxClientDashboardExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to the PDF format. + * @param options A DashboardPdfExportOptions object containing options related to exporting a dashboard/dashboard item to the PDF format. + */ + SetPdfExportOptions(options: DashboardPdfExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to an image. + * @param options A DashboardImageExportOptions object containing options related to exporting a dashboard/dashboard item to an image. + */ + SetImageExportOptions(options: DashboardImageExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to the Excel format. + * @param options A DashboardExcelExportOptions object containing options related to exporting a dashboard item to the Excel format. + */ + SetExcelExportOptions(options: DashboardExcelExportOptions): void; + /** + * Exports a dashboard to a PDF file and writes it to the Response. + */ + ExportToPdf(): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + */ + ExportToPdf(options: DashboardPdfExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: DashboardPdfExportOptions, fileName: string): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard to an Image file and writes it to the Response. + */ + ExportToImage(): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A DashboardImageExportOptions object containing image-specific export options. + */ + ExportToImage(options: DashboardImageExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A DashboardImageExportOptions object containing image-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: DashboardImageExportOptions, fileName: string): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToImage(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports dashboard data to the specified file in Excel format. + */ + ExportToExcel(): void; + /** + * Exports dashboard data to the specified file in Excel format. + * @param options A DashboardExcelExportOptions object containing Excel-specific options. + */ + ExportToExcel(options: DashboardExcelExportOptions): void; + /** + * Exports dashboard data to the specified file in Excel format. + * @param options A DashboardExcelExportOptions object containing Excel-specific options. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportToExcel(options: DashboardExcelExportOptions, fileName: string): void; + /** + * Exports a dashboard item to a PDF file and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToPdf(itemName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + */ + ExportDashboardItemToPdf(itemName: string, options: DashboardPdfExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: DashboardPdfExportOptions, fileName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Image file and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToImage(itemName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardImageExportOptions object containing image-specific export options. + */ + ExportDashboardItemToImage(itemName: string, options: DashboardImageExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardImageExportOptions object containing image-specific export options. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: DashboardImageExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Excel file and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToExcel(itemName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardExcelExportOptions object containing Excel export options. + */ + ExportDashboardItemToExcel(itemName: string, options: DashboardExcelExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardExcelExportOptions object containing Excel export options. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: DashboardExcelExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Returns whether or not master filtering can be applied in the current state of the specified master filter item. + * @param itemName A string that specifies the component name of the master filter item. + */ + CanSetMasterFilter(itemName: string): boolean; + /** + * Returns whether or not the specified master filter can be cleared in the current state. + * @param itemName A string that specifies the component name of the master filter item. + */ + CanClearMasterFilter(itemName: string): boolean; + /** + * Returns whether or not drill down is possible in the current state of the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + */ + CanPerformDrillDown(itemName: string): boolean; + /** + * Returns whether or not drill up is possible in the current state of the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + */ + CanPerformDrillUp(itemName: string): boolean; + /** + * Selects required elements by their values in the specified master filter item. + * @param itemName A String that specifies the component name of the master filter item. + * @param values Values that will be used to select elements in the master filter item. + */ + SetMasterFilter(itemName: string, values: Object[][]): void; + /** + * Selects the required elements in the specified master filter item. + * @param itemName A String that species the component name of the master filter item. + * @param axisPointTuples An array of ASPxClientDashboardItemDataAxisPointTuple objects used to identify master filter elements. + */ + SetMasterFilter(itemName: string, axisPointTuples: ASPxClientDashboardItemDataAxisPointTuple[]): void; + /** + * Performs a drill-down into the required element by its value. + * @param itemName A String that species the component name of the dashboard item. + * @param value A value that will be used to perform a drill-down for the required element. + */ + PerformDrillDown(itemName: string, value: Object): void; + /** + * Performs a drill-down into the required element. + * @param itemName A String that specifies the component name of the dashboard item. + * @param axisPointTuple A ASPxClientDashboardItemDataAxisPointTuple object representing a set of axis points. + */ + PerformDrillDown(itemName: string, axisPointTuple: ASPxClientDashboardItemDataAxisPointTuple): void; + /** + * Clears the specified master filter item. + * @param itemName A string that specifies the component name of the master filter item. + */ + ClearMasterFilter(itemName: string): void; + /** + * Performs a drill-up for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + PerformDrillUp(itemName: string): void; + /** + * Returns axis point tuples identifying elements that can be used to perform drill-down in the specified dashboard item. + * @param itemName A String that is the component name of the dashboard item. + */ + GetAvailableDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns the axis point tuple identifying the current drill-down state. + * @param itemName A String that is the component name of the dashboard item. + */ + GetCurrentDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Returns axis point tuples identifying elements that can be selected in the current state of the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetAvailableFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns axis point tuples identifying currently selected elements in the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetCurrentFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns currently selected elements in the master filter item. + * @param itemName A String that specifies a component name of the master filter item. + */ + GetCurrentSelection(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns the client data for the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + */ + GetItemData(itemName: string): ASPxClientDashboardItemData; + /** + * Refreshes an entire dashboard displayed in the Web Dashboard control. + */ + Refresh(): void; + /** + * Refreshes the specific item from the dashboard displayed in the Web Dashboard control. + * @param itemName A string value that specifies the component name of the dashboard item to be refreshed. + */ + Refresh(itemName: string): void; + /** + * Refreshes specific items from the dashboard displayed in the Web Dashboard control. + * @param itemName An array of string values that specify the component names of the dashboard items to be refreshed. + */ + Refresh(itemName: string[]): void; + /** + * Requests underlying data for the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + * @param args A ASPxClientDashboardItemRequestUnderlyingDataParameters object containing parameters used to obtain the underlying data. + * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. + */ + RequestUnderlyingData(itemName: string, args: ASPxClientDashboardItemRequestUnderlyingDataParameters, onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted): void; + /** + * Returns the currently selected range in the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Returns the visible range for the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetEntireRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Selects the required range in the specified Range Filter dashboard item. + * @param itemName A String that specifies the component name of the Range Filter dashboard item. + * @param range A ASPxClientDashboardRangeFilterSelection object that specifies a range to be selected. + */ + SetRange(itemName: string, range: ASPxClientDashboardRangeFilterSelection): void; + /** + * Selects a predefined range in the Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter. + * @param dateTimePeriodName A String value that specifies the predefined range name. + */ + SetPredefinedRange(itemName: string, dateTimePeriodName: string): void; + /** + * Returns names of the predefined ranges available for the specified Range Filter. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetAvailablePredefinedRanges(itemName: string): string[]; + /** + * Returns the name of the currently selected predefined range. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentPredefinedRange(itemName: string): string; } /** * References a method that will handle the DashboardStateChanged event. @@ -678,7 +1663,7 @@ interface ASPxClientDashboardStateChangedEventHandler { interface ASPxClientDashboardStateChangedEventArgs extends ASPxClientEventArgs { /** * Gets the current state of the dashboard. - * Value: A String that is the current state of the dashboard. + * Value: A string value that is the current state of the dashboard. */ DashboardState: string; } @@ -699,19 +1684,19 @@ interface ASPxClientDashboardChangedEventHandler { interface ASPxClientDashboardChangedEventArgs extends ASPxClientEventArgs { /** * Gets the identifier of a newly opened dashboard. - * Value: A String values that is an identifier of newly opened dashboard. + * Value: A string value that is an identifier of newly opened dashboard. */ DashboardId: string; /** * Gets the name of a newly opened dashboard. - * Value: A String values that is the name of newly opened dashboard. + * Value: A string value that is the name of newly opened dashboard. */ DashboardName: string; } -interface ASPxClientDashboardDesignerCustomizeMenuItemsEventHandler { - (source: S, e: ASPxClientDashboardDesignerCustomizeMenuItemsEventArgs): void; +interface ASPxClientDashboardCustomizeMenuItemsEventHandler { + (source: S, e: ASPxClientDashboardCustomizeMenuItemsEventArgs): void; } -interface ASPxClientDashboardDesignerMenuItem { +interface ASPxClientDashboardMenuItem { id: string; title: string; template: string; @@ -721,13 +1706,214 @@ interface ASPxClientDashboardDesignerMenuItem { click: Function; hotKey: number; } -interface ASPxClientDashboardDesignerCustomizeMenuItemsEventArgs extends ASPxClientEventArgs { - Items: ASPxClientDashboardDesignerMenuItem[]; - FindById(itemId: string): ASPxClientDashboardDesignerMenuItem; +interface ASPxClientDashboardCustomizeMenuItemsEventArgs extends ASPxClientEventArgs { + Items: ASPxClientDashboardMenuItem[]; + FindById(itemId: string): ASPxClientDashboardMenuItem; } -interface ASPxClientDashboardDesignerBeforeRenderEventHandler { +/** + * References a method that will handle the BeforeRender event. + */ +interface ASPxClientDashboardBeforeRenderEventHandler { + /** + * References a method that will handle the BeforeRender event. + * @param source The event source. + * @param e An ASPxClientEventArgs object that contains event data. + */ (source: S, e: ASPxClientEventArgs): void; } +/** + * Serves as the base class for classes that provide data for client-side events related to dashboard items. + */ +interface ASPxClientDashboardItemEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Returns whether or not the specified value is null. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is 'others'. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; +} +/** + * References a method that will handle the ItemMasterFilterStateChanged event. + */ +interface ASPxClientDashboardItemMasterFilterStateChangedEventHandler { + /** + * References a method that will handle the ItemMasterFilterStateChanged event. + * @param source The event source. + * @param e An ASPxClientDashboardItemMasterFilterStateChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemMasterFilterStateChangedEventArgs): void; +} +/** + * Provides data for the ItemMasterFilterStateChanged event. + */ +interface ASPxClientDashboardItemMasterFilterStateChangedEventArgs extends ASPxClientDashboardItemEventArgs { + /** + * Gets the currently selected values. + * Value: An array of objects that are the currently selected values. + */ + Values: Object[][]; +} +/** + * References a method that will handle the ItemDrillDownStateChanged event. + */ +interface ASPxClientDashboardItemDrillDownStateChangedEventHandler { + /** + * References a method that will handle the ItemDrillDownStateChanged event. + * @param source The event source. + * @param e An ASPxClientDashboardItemDrillDownStateChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemDrillDownStateChangedEventArgs): void; +} +/** + * Provides data for the ItemDrillDownStateChanged event. + */ +interface ASPxClientDashboardItemDrillDownStateChangedEventArgs extends ASPxClientDashboardItemEventArgs { + /** + * Gets the drill-down action performed in the dashboard item. + * Value: A string value that is the drill-down action performed in the dashboard item. + */ + Action: string; + /** + * Gets values from the current drill-down hierarchy. + * Value: An array of values from the current drill-down hierarchy. + */ + Values: Object[]; +} +/** + * References a method that will handle the ActionAvailabilityChanged event. + */ +interface ASPxClientActionAvailabilityChangedEventHandler { + /** + * References a method that will handle the ActionAvailabilityChanged event. + * @param source The event source. + * @param e A ASPxClientActionAvailabilityChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientActionAvailabilityChangedEventArgs): void; +} +/** + * Provides data for the ActionAvailabilityChanged event. + */ +interface ASPxClientActionAvailabilityChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; +} +/** + * References a method that will handle the DynamicLookUpValuesLoaded event. + */ +interface ASPxClientDynamicLookUpValuesLoadedEventHandler { + /** + * References a method that will handle the DynamicLookUpValuesLoaded event. + * @param source The event source. + * @param e A ASPxClientDynamicLookUpValuesLoadedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDynamicLookUpValuesLoadedEventArgs): void; +} +/** + * Provides data for the DynamicLookUpValuesLoaded event. + */ +interface ASPxClientDynamicLookUpValuesLoadedEventArgs extends ASPxClientEventArgs { + /** + * Gets the dashboard parameter name whose values have been loaded. + * Value: A string value that is the dashboard parameter name whose values have been loaded. + */ + ParameterName: string; +} +/** + * References a method that will handle the ItemBeginUpdate event. + */ +interface ASPxClientItemBeginUpdateEventHandler { + /** + * References a method that will handle the ItemBeginUpdate event. + * @param source The event source. + * @param e A ASPxClientItemBeginUpdateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientItemBeginUpdateEventArgs): void; +} +/** + * Provides data for the ItemBeginUpdate event. + */ +interface ASPxClientItemBeginUpdateEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; +} +/** + * References a method that will handle the ItemEndUpdate event. + */ +interface ASPxClientItemEndUpdateEventHandler { + /** + * References a method that will handle the ItemEndUpdate event. + * @param source The event source. + * @param e A ASPxClientItemEndUpdateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientItemEndUpdateEventArgs): void; +} +/** + * Provides data for the ItemEndUpdate event. + */ +interface ASPxClientItemEndUpdateEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; +} +/** + * References a method that will handle the DashboardBeginUpdate event. + */ +interface ASPxClientDashboardBeginUpdateEventHandler { + /** + * References a method that will handle the DashboardBeginUpdate event. + * @param source The event source. + * @param e A ASPxClientDashboardBeginUpdateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardBeginUpdateEventArgs): void; +} +/** + * Provides data for the DashboardBeginUpdate event. + */ +interface ASPxClientDashboardBeginUpdateEventArgs extends ASPxClientEventArgs { + /** + * Gets the identifier of the dashboard for which the event was raised. + * Value: A string value that is the dashboard identifier. + */ + DashboardId: string; +} +/** + * References a method that will handle the DashboardEndUpdate event. + */ +interface ASPxClientDashboardEndUpdateEventHandler { + /** + * References a method that will handle the DashboardEndUpdate event. + * @param source The event source. + * @param e An ASPxClientDashboardEndUpdateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardEndUpdateEventArgs): void; +} +/** + * Provides data for the DashboardEndUpdate event. + */ +interface ASPxClientDashboardEndUpdateEventArgs extends ASPxClientEventArgs { + /** + * Gets the identifier of the dashboard for which the event was raised. + * Value: A string value that is the dashboard identifier. + */ + DashboardId: string; +} /** * A client-side equivalent of the ASPxDashboardViewer control. */ @@ -773,7 +1959,7 @@ interface ASPxClientDashboardViewer extends ASPxClientControl { */ ItemClick: ASPxClientEvent>; /** - * Allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting + * Allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting. */ ItemVisualInteractivity: ASPxClientEvent>; /** @@ -834,15 +2020,25 @@ interface ASPxClientDashboardViewer extends ASPxClientControl { /** * Selects the required range in the specified Range Filter dashboard item. * @param itemName A String that specifies the component name of the Range Filter dashboard item. - * @param range A String value that specifies the component name of the Range Filter dashboard item. + * @param range A ASPxClientDashboardRangeFilterSelection object that specifies a range to be selected. */ SetRange(itemName: string, range: ASPxClientDashboardRangeFilterSelection): void; /** - * Selects the specified range in the specified Range Filter dashboard item. - * @param itemName A String that specifies the component name of the Range Filter dashboard item. - * @param dateTimePeriodName A String that specifies the name of the predefined range used to perform a selection. + * Selects a predefined range in the Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter. + * @param dateTimePeriodName A String value that specifies the predefined range name. */ - SetRange(itemName: string, dateTimePeriodName: string): void; + SetPredefinedRange(itemName: string, dateTimePeriodName: string): void; + /** + * Returns names of the predefined ranges available for the specified Range Filter. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetAvailablePredefinedRanges(itemName: string): string[]; + /** + * Returns the name of the currently selected predefined range. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentPredefinedRange(itemName: string): string; /** * Returns axis point tuples identifying elements that can be used to perform drill-down in the specified dashboard item. * @param itemName A String that is the component name of the dashboard item. @@ -870,7 +2066,7 @@ interface ASPxClientDashboardViewer extends ASPxClientControl { GetCurrentSelection(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; /** * Requests underlying data for the specified dashboard item. - * @param itemName A String that specifies the component name of the dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. * @param args A ASPxClientDashboardItemRequestUnderlyingDataParameters object containing parameters used to obtain the underlying data. * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. */ @@ -887,62 +2083,198 @@ interface ASPxClientDashboardViewer extends ASPxClientControl { * Returns settings that specify parameters affecting how the dashboard is exported. */ GetExportOptions(): ASPxClientDashboardExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to the PDF format. + */ + GetPdfExportOptions(): DashboardPdfExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to an image. + */ + GetImageExportOptions(): DashboardImageExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to the Excel format. + */ + GetExcelExportOptions(): DashboardExcelExportOptions; /** * Specifies settings that specify parameters affecting how the dashboard is exported. * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. */ SetExportOptions(options: ASPxClientDashboardExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to the PDF format. + * @param options A DashboardPdfExportOptions object containing options related to exporting a dashboard/dashboard item to the PDF format. + */ + SetPdfExportOptions(options: DashboardPdfExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to an image. + * @param options A DashboardImageExportOptions object containing options related to exporting a dashboard/dashboard item to an image. + */ + SetImageExportOptions(options: DashboardImageExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to the Excel format. + * @param options A DashboardExcelExportOptions object containing options related to exporting a dashboard item to the Excel format. + */ + SetExcelExportOptions(options: DashboardExcelExportOptions): void; /** * Exports a dashboard to a PDF file and writes it to the Response. */ ExportToPdf(): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + */ + ExportToPdf(options: DashboardPdfExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: DashboardPdfExportOptions, fileName: string): void; /** * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. */ ExportToPdf(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions, fileName: string): void; /** * Exports a dashboard to an Image file and writes it to the Response. */ ExportToImage(): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A DashboardImageExportOptions object containing image-specific export options. + */ + ExportToImage(options: DashboardImageExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A DashboardImageExportOptions object containing image-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: DashboardImageExportOptions, fileName: string): void; /** * Exports a dashboard to an Image file with the specified export options and writes it to the Response. * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. */ ExportToImage(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports dashboard data to the specified file in Excel format. + */ + ExportToExcel(): void; + /** + * Exports dashboard data to the specified file in Excel format. + * @param options A DashboardExcelExportOptions object containing Excel-specific options. + */ + ExportToExcel(options: DashboardImageExportOptions): void; + /** + * Exports dashboard data to the specified file in Excel format. + * @param options A DashboardExcelExportOptions object containing Excel-specific options. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportToExcel(options: DashboardImageExportOptions, fileName: string): void; /** * Exports a dashboard item to a PDF file and writes it to the Response. * @param itemName A String that is the component name of the dashboard item to be exported. */ ExportDashboardItemToPdf(itemName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + */ + ExportDashboardItemToPdf(itemName: string, options: DashboardPdfExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: DashboardPdfExportOptions, fileName: string): void; /** * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. * @param itemName A String that is the component name of the dashboard item to be exported. * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. */ ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; /** * Exports a dashboard item to an Image file and writes it to the Response. * @param itemName A String that is the component name of the dashboard item to be exported. */ ExportDashboardItemToImage(itemName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardImageExportOptions object containing image-specific export options. + */ + ExportDashboardItemToImage(itemName: string, options: DashboardImageExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardImageExportOptions object containing image-specific export options. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: DashboardImageExportOptions, fileName: string): void; /** * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. * @param itemName A String that is the component name of the dashboard item to be exported. * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. */ ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; /** * Exports a dashboard item to an Excel file and writes it to the Response. * @param itemName A String that is the component name of the dashboard item to be exported. */ ExportDashboardItemToExcel(itemName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardExcelExportOptions object containing Excel export options. + */ + ExportDashboardItemToExcel(itemName: string, options: DashboardExcelExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardExcelExportOptions object containing Excel export options. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: DashboardExcelExportOptions, fileName: string): void; /** * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. * @param itemName A String that is the component name of the dashboard item to be exported. * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. */ ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; /** * Returns the dashboard width. */ @@ -1023,326 +2355,10 @@ interface ASPxClientDashboardViewer extends ASPxClientControl { CanPerformDrillUp(itemName: string): boolean; /** * Returns the client data for the specified dashboard item. - * @param itemName A String that specifies the component name of the dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. */ GetItemData(itemName: string): ASPxClientDashboardItemData; } -/** - * A range in the Range Filter dashboard item. - */ -interface ASPxClientDashboardRangeFilterSelection { - /** - * Gets or sets a maximum value in the range of the Range Filter dashboard item. - * Value: A maximum value in the range of the Range Filter dashboard item. - */ - Maximum: Object; - /** - * Gets or sets a minimum value in the range of the Range Filter dashboard item. - * Value: A minimum value in the range of the Range Filter dashboard item. - */ - Minimum: Object; -} -/** - * A collection of ASPxClientDashboardParameter objects. - */ -interface ASPxClientDashboardParameters { - /** - * Returns an array of dashboard parameters from the ASPxClientDashboardParameters collection. - */ - GetParameterList(): ASPxClientDashboardParameter[]; - /** - * Returns a dashboard parameter by its name. - * @param name A String object that specifies the parameter name. - */ - GetParameterByName(name: string): ASPxClientDashboardParameter; - /** - * Returns a dashboard parameter by its index in the ASPxClientDashboardParameters collection. - * @param index An integer value that specifies the parameter index. - */ - GetParameterByIndex(index: number): ASPxClientDashboardParameter; -} -/** - * A client-side dashboard parameter. - */ -interface ASPxClientDashboardParameter { - /** - * Gets the dashboard parameter name on the client side. - * Value: A String that is the dashboard parameter name on the client side. - */ - Name: string; - /** - * Gets the dashboard parameter value on the client side. - * Value: A String that specifies the dashboard parameter value on the client side. - */ - Value: Object; - /** - * Returns a parameter name. - */ - GetName(): string; - /** - * Returns a current parameter value. - */ - GetValue(): Object; - /** - * Specifies the current parameter value. - * @param value The current parameter value. - */ - SetValue(value: Object): void; - /** - * Returns a default parameter value. - */ - GetDefaultValue(): Object; - /** - * Returns the parameter's description displayed to an end-user. - */ - GetDescription(): string; - /** - * Returns a parameter type. - */ - GetType(): string; - /** - * Returns possible parameter values. - */ - GetValues(): ASPxClientDashboardParameterValue[]; -} -/** - * Provides access to the parameter value and display text. - */ -interface ASPxClientDashboardParameterValue { - /** - * Returns the parameter display text. - */ - GetDisplayText(): string; - /** - * Returns a parameter value. - */ - GetValue(): Object; -} -/** - * Contains settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. - */ -interface ImageFormatOptions { - /** - * Gets or sets an image format in which the dashboard (dashboard item) is exported. - * Value: A value returned by the DashboardExportImageFormat class that specifies an image format in which the dashboard (dashboard item) is exported. - */ - Format: string; - /** - * Gets or sets the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. - * Value: An integer value that specifies the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. - */ - Resolution: number; -} -/** - * Contains options which define how the dashboard item is exported to Excel format. - */ -interface ExcelFormatOptions { - /** - * Gets or sets the Excel format in which the dashboard item is exported. - * Value: A value returned by the DashboardExportExcelFormat class that specifies the Excel format in which the dashboard item is exported. - */ - Format: string; - /** - * Gets or sets a character used to separate values in a CSV document. - * Value: A String value that specifies the character used to separate values in a CSV document. - */ - CsvValueSeparator: string; -} -/** - * Contains settings that specify parameters affecting how the Grid dashboard item is exported. - */ -interface GridExportOptions { - /** - * Gets or sets whether the size of the Grid dashboard item is changed according to the width of the exported page. - * Value: true, to change the size of the Grid dashboard item according to the width of the exported page; otherwise, false. - */ - FitToPageWidth: boolean; - /** - * Gets or sets whether to print column headers of the Grid dashboard item on every page. - * Value: true, to print column headers on every page; otherwise, false. - */ - PrintHeadersOnEveryPage: boolean; -} -/** - * Contains settings that specify parameters affecting how the Pivot dashboard item is exported. - */ -interface PivotExportOptions { - /** - * Gets or sets whether to print the column headers of the pivot dashboard item on every page. - * Value: true, to print column headers on every page; otherwise, false. - */ - PrintHeadersOnEveryPage: boolean; -} -/** - * Contains settings that specify parameters affecting how the Pie dashboard item is exported. - */ -interface PieExportOptions { - /** - * Gets or sets whether dashboard item elements are arranged automatically on the exported page. - * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. - */ - AutoArrangeContent: boolean; -} -/** - * Contains settings that specify parameters affecting how the Gauge dashboard item is exported. - */ -interface GaugeExportOptions { - /** - * Gets or sets whether dashboard item elements are arranged automatically on the exported page. - * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. - */ - AutoArrangeContent: boolean; -} -/** - * Contains settings that specify parameters affecting how the Card dashboard item is exported. - */ -interface CardExportOptions { - /** - * Gets or sets whether dashboard item elements are arranged automatically on the exported page. - * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. - */ - AutoArrangeContent: boolean; -} -/** - * Contains settings that specify parameters affecting how the Range Filter dashboard item is exported. - */ -interface RangeFilterExportOptions { - /** - * Gets or sets whether the page orientation used to export a Range Filter dashboard item is selected automatically. - * Value: true, to automatically select the page orientation used to export a Range Filter dashboard item; otherwise, false. - */ - AutomaticPageLayout: boolean; - /** - * Gets or sets the export size mode for the Range Filter dashboard item. - * Value: A value returned by the RangeFilterExportSizeMode class that specifies the export size mode for the Range Filter dashboard item. - */ - SizeMode: string; -} -/** - * Contains settings that specify parameters affecting how Chart dashboard items are exported. - */ -interface ChartExportOptions { - /** - * Gets or sets whether the page orientation used to export a Chart dashboard item is selected automatically. - * Value: true, to automatically select the page orientation used to export a Chart dashboard item; otherwise, false. - */ - AutomaticPageLayout: boolean; - /** - * Gets or sets the export size mode for the Chart dashboard item. - * Value: A value returned by the ChartExportSizeMode class that specifies the export size mode for the Chart dashboard item. - */ - SizeMode: string; -} -/** - * Contains settings that specify parameters affecting how map dashboard items are exported. - */ -interface MapExportOptions { - /** - * Gets or sets whether the page orientation used to export a map dashboard item is selected automatically. - * Value: true, to automatically select the page orientation used to export a map dashboard item; otherwise, false. - */ - AutomaticPageLayout: boolean; - /** - * Gets or sets the export size mode for the map dashboard item. - * Value: A value returned by the MapExportSizeMode class that specifies specifies the export size mode for the map dashboard item. - */ - SizeMode: string; -} -/** - * Contains settings that specify parameters affecting how the dashboard (dashboard item) is exported. - */ -interface ASPxClientDashboardExportOptions { - /** - * Gets or sets the standard paper size. - * Value: A string value returned by the DashboardExportPaperKind class that specifies the standard paper size. - */ - PaperKind: string; - /** - * Gets or sets the page orientation used to export a dashboard (dashboard item). - * Value: A string value returned by the DashboardExportPageLayout class that specifies the page orientation used to export a dashboard (dashboard item). - */ - PageLayout: string; - /** - * Gets or sets the mode for scaling when exporting a dashboard (dashboard item). - * Value: A string value returned by the DashboardExportScaleMode class that specifies the mode for scaling when exporting a dashboard (dashboard item). - */ - ScaleMode: string; - /** - * Gets or sets the scale factor (in fractions of 1) by which a dashboard (dashboard item) is scaled. - * Value: A Single value that specifies the scale factor by which a dashboard (dashboard item) is scaled. - */ - ScaleFactor: number; - /** - * Gets or sets the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). - * Value: An integer value that specifies the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). - */ - AutoFitPageCount: number; - /** - * Gets or sets the title of the exported document. - * Value: A String value that specifies the title of the exported document. - */ - Title: string; - /** - * Gets or sets whether a dashboard title (or dashboard item's caption) is included as the exported document title. - * Value: A DefaultBoolean value that specifies whether a dashboard title (or dashboard item's caption) is included as the exported document title. - */ - ShowTitle: boolean; - /** - * Gets or sets the filter state's location on the exported document. - * Value: A string value returned by the DashboardExportFilterState class that specifies the filter state's location on the exported document. - */ - FilterState: string; - /** - * Provides access to options for exporting a dashboard or individual items in Image format. - * Value: An ImageFormatOptions object containing settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. - */ - ImageOptions: ImageFormatOptions; - /** - * Provides access to options for exporting individual dashboard items in Excel format. - * Value: An ExcelFormatOptions object containing settings that specify parameters affecting how the dashboard item is exported in Excel format. - */ - ExcelOptions: ExcelFormatOptions; - /** - * Provides access to options for exporting a Grid dashboard item. - * Value: A GridExportOptions object containing settings that specify parameters that affect how Grid dashboard items are exported. - */ - GridOptions: GridExportOptions; - /** - * Provides access to options for exporting a Pivot dashboard item. - * Value: A PivotExportOptions object containing settings that specify parameters that affect how Pivot dashboard items are exported. - */ - PivotOptions: PivotExportOptions; - /** - * Provides access to options for exporting a Pie dashboard item. - * Value: A PieExportOptions object containing settings that specify parameters that affect how Pie dashboard items are exported. - */ - PieOptions: PieExportOptions; - /** - * Provides access to options for exporting a Gauge dashboard item. - * Value: A GaugeExportOptions object containing settings that specify parameters that affect how Gauge dashboard items are exported. - */ - GaugeOptions: GaugeExportOptions; - /** - * Provides access to options for exporting a Card dashboard item. - * Value: A CardExportOptions object containing settings that specify parameters that affect how Card dashboard items are exported. - */ - CardOptions: CardExportOptions; - /** - * Provides access to options for exporting a Range Filter dashboard item. - * Value: A RangeFilterExportOptions object containing settings that specify parameters affecting how the Range Filter dashboard item is exported. - */ - RangeFilterOptions: RangeFilterExportOptions; - /** - * Provides access to options for exporting a Chart dashboard item. - * Value: A ChartExportOptions object containing settings that specify parameters that affect how Chart dashboard items are exported. - */ - ChartOptions: ChartExportOptions; - /** - * Provides access to options for exporting map dashboard items. - * Value: A MapExportOptions object containing settings that specify parameters that affect how map dashboard items are exported. - */ - MapOptions: MapExportOptions; -} /** * References a method that will handle the ActionAvailabilityChanged event. */ @@ -1409,7 +2425,7 @@ interface ASPxClientDashboardDataLoadingErrorEventArgs extends ASPxClientEventAr interface ASPxClientDashboardItemAction { /** * Gets the name of the dashboard item. - * Value: A String that specifies the name of the dashboard item. + * Value: A string that specifies the name of the dashboard item. */ ItemName: string; /** @@ -1441,7 +2457,7 @@ interface ASPxClientDashboardMasterFilterSetEventHandler { interface ASPxClientDashboardMasterFilterSetEventArgs extends ASPxClientEventArgs { /** * Gets the name of the dashboard item. - * Value: A String that specifies the name of the dashboard item. + * Value: A string value that specifies the component name of the dashboard item. */ ItemName: string; /** @@ -1477,7 +2493,7 @@ interface ASPxClientDashboardMasterFilterClearedEventHandler { interface ASPxClientDashboardMasterFilterClearedEventArgs extends ASPxClientEventArgs { /** * Gets the name of the dashboard item. - * Value: A String that is the name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. */ ItemName: string; } @@ -1498,14 +2514,14 @@ interface ASPxClientDashboardDrillDownPerformedEventHandler { interface ASPxClientDashboardDrillDownPerformedEventArgs extends ASPxClientEventArgs { /** * Gets the name of the dashboard item. - * Value: A String that specifies the name of the dashboard item. + * Value: A string that specifies the name of the dashboard item. */ ItemName: string; /** - * Gets the bottommost value from the current drill-down hierarchy. - * Value: The bottommost value from the current drill-down hierarchy. + * Gets values from the current drill-down hierarchy. + * Value: An array of values from the current drill-down hierarchy. */ - Value: Object[]; + Values: Object[]; /** * Returns whether or not the specified value is NullValue. * @param value The specified value. @@ -1534,10 +2550,449 @@ interface ASPxClientDashboardDrillUpPerformedEventHandler { interface ASPxClientDashboardDrillUpPerformedEventArgs extends ASPxClientEventArgs { /** * Gets the name of the dashboard item. - * Value: A String that is the name of the dashboard item. + * Value: A string that is the name of the dashboard item. */ ItemName: string; } +interface CardWidgetCustomizeTextEventArgs { + getValue(): Object; + getDefaultText(): string; +} +/** + * A Card widget that visualizes a Card dashboard item's data. + */ +interface CardWidget { + /** + * Gets or sets the background color for a card. + * Value: A string that specifies the HTML color used to paint a card's background. + */ + cardBackColor: string; + onCustomizeText: Object; +} +/** + * When implemented, represents the Web Dashboard extension. + */ +interface IExtension { + /** + * Gets a unique name of a Web Dashboard extension. + * Value: A string value that is a unique name of a Web Dashboard extension. + */ + name: string; + /** + * Contains code that will be invoked when you register the dashboard extension. + */ + start(): void; + /** + * Contains code that will be invoked when you unregister the dashboard extension. + */ + stop(): void; +} +/** + * An inner part of the ASPxClientDashboard control. + */ +interface DashboardControl { + /** + * Gets or sets knockout templates that you can use in the Web Dashboard. + * Value: A object that is a knockout template collection. + */ + customTemplates: KnockoutObservableArray; + /** + * Provides an access to the collection of registered dashboard extensions. + * Value: An array of IExtension objects that are dashboard extensions. + */ + extensions: IExtension[]; + /** + * Initializes a new dashboard with the specified name and JSON model. + * @param id A string value that is a unique name of the created dashboard. + * @param dashboardJson A dashboard model encoded in the specified JSON string. + */ + initializeDashboard(id: string, dashboardJson: string): void; + /** + * Initializes a new dashboard with the specified name, JSON model and initial state. + * @param id A string value that is a unique name of the created dashboard. + * @param dashboardJson A dashboard model encoded in the specified JSON string. + * @param initialState A JSON object that specifies the dashboard state. + */ + initializeDashboard(id: string, dashboardJson: string, initialState: Object): void; + /** + * Allows you to register a dashboard extension to add its functionality to the Web Dashboard. + * @param extension An IExtension object that is a dashboard extension. + */ + registerExtension(extension: IExtension): void; + /** + * Allows you to get access to the extension. + * @param extensionName A string value that is the dashboard extension name. + */ + findExtension(extensionName: string): IExtension; + /** + * Allows you to unregister a dashboard extension to disable its functionality in the Web Dashboard. + * @param extensionName A string value that is a dashboard extension name. + */ + unregisterExtension(extensionName: string): void; +} +interface DashboardParameterDialogExtension extends IExtension { +} +interface DashboardExportExtension extends IExtension { +} +interface DashboardClientApiExtension extends IExtension { +} +interface DashboardCurrencyEditorExtension extends IExtension { +} +interface DataSourceBrowserExtension extends IExtension { +} +interface DataSourceWizardExtension extends IExtension { +} +interface DashboadItemMenuExtension extends IExtension { +} +/** + * A Web Dashboard extension that allows you to keep track of all user actions, and cancel or repeat them. + */ +interface UndoRedoExtension extends IExtension { + /** + * Allows you to track whether the Web Dashboard has unsaved changes. + */ + isChanged(): boolean; +} +/** + * An extension that is the dashboard item's Binding menu allowing you to create and modify data binding. + */ +interface BindingPanelExtension extends IExtension { +} +/** + * A Web Dashboard extension that allows you to configure color schemes. + */ +interface DashboardColorSchemeEditorExtension extends IExtension { +} +/** + * An extension that is the dashboard item's Convert To menu allowing you to convert or duplicate the current item. + */ +interface ConversionPanelExtension extends IExtension { +} +/** + * A Web Dashboard extension that allows you to save the current dashboard. + */ +interface SaveDashboardExtension extends IExtension { + /** + * Allows you to save the current dashboard with a specified unique name and JSON model. + * @param dashboardId A string value that is a unique name of the created dashboard. + * @param dashboardJson A dashboard model encoded in the specified JSON string. + */ + performSaveDashboard(dashboardId: string, dashboardJson: string): void; + /** + * Allows you to invoke a custom function while you save a dashboard. + * @param action A custom function that is invoked when the dashboard is about to be saved. + */ + ensureDashboardSaved(action: Function): void; + /** + * Saves the opened dashboard. + */ + saveDashboard(): void; +} +/** + * A Web Dashboard extension that allows you to create a new dashboard. + */ +interface CreateDashboardExtension extends IExtension { + /** + * Creates a new dashboard with a specified name and JSON model. + * @param dashboardName A string value that is the name of the created dashboard. + * @param dashboardJson A dashboard model encoded in the specified JSON string. + */ + performCreateDashboard(dashboardName: string, dashboardJson: string): void; +} +/** + * A Web Dashboard extension that allows you to open the created dashboards. + */ +interface OpenDashboardExtension extends IExtension { + /** + * Loads a dashboard with the specified identifier from the dashboard storage. + * @param id A String value that specifies the unique dashboard name. + */ + loadDashboard(id: string): void; +} +/** + * An extension that is the dashboard item's Interactivity menu containing settings that affect on interaction between various dashboard items. + */ +interface InteractivityPanelExtension extends IExtension { +} +/** + * An extension that is the dashboard item's Options menu containing specific options and settings related to the current dashboard item. + */ +interface OptionsPanelExtension extends IExtension { +} +/** + * An extension that is the Web Dashboard title editor. + */ +interface DashboardTitleEditorExtension extends IExtension { +} +/** + * The Dashboard Panel extension that displays a list of available dashboards and lets you switch between the designer and viewer modes. + */ +interface DashboardPanelExtension extends IExtension { + /** + * Gets or sets the width of the Dashboard Panel extension. + * Value: An integer value that specifies the Dashboard Panel's width. + */ + panelWidth: number; + /** + * Gets or sets whether the Dashboard Panel is visible. + * Value: true, to display the Dashboard Panel; otherwise, false. + */ + visible: KnockoutObservableBoolean; + /** + * Gets or sets whether you can switch into the designer mode. + * Value: true, to display the Edit in Designer button on the dashboard panel; otherwise, false. + */ + allowSwitchToDesigner: KnockoutObservableBoolean; +} +/** + * An extension that is a list of available data sources used to provide data to the Web Dashboard. + */ +interface AvailableDataSourcesExtension extends IExtension { +} +/** + * A dashboard menu item. + */ +interface DashboardMenuItem { + /** + * Gets or sets a unique identifier of a dashboard menu item. + * Value: A string value that is a menu item's unique identifier. + */ + id: string; + /** + * Gets or sets a dashboard menu item title. + * Value: A string value that is a dashboard menu item title. + */ + title: string; + /** + * Gets or sets a position of the dashboard menu item within the dashboard menu. + * Value: A zero-based integer specifying the position of the current dashboard menu item. + */ + index: number; + /** + * Gets or sets a code of the key used in the keyboard shortcut. This shortcut allows you to invoke the current menu item. + * Value: An integer value that specifies a key code. + */ + hotKey: number; + /** + * Gets or sets a custom function that is invoked when a click occurs. + * Value: A custom function that is invoked when a click occurs. + */ + click: Function; + /** + * Gets or sets a knockout template for the extension. + * Value: A string value that is an id of the knockout template. + */ + template: string; + /** + * Gets or sets whether the dashboard menu item is selected. + * Value: true, if the dashboard menu item is selected; otherwise, false; + */ + selected: KnockoutObservableBoolean; + /** + * Gets whether a dashboard menu item is disabled. + * Value: true, if a dashboard menu item should be disabled; otherwise, false. + */ + disabled: KnockoutObservableBoolean; + /** + * Gets or sets whether a dashboard menu item has a separator. + * Value: true, if a dashboard menu item has a separator; otherwise, false. + */ + hasSeparator: boolean; + /** + * Gets or sets data that is used by a menu item. + * Value: An object that contains data used by a menu item. + */ + data: Object; +} +/** + * A toolbox item of the specified dashboard toolbox group. + */ +interface DashboardToolboxItem { + /** + * Gets or sets a dashboard item type. + * Value: A string value that is a dashboard item type. + */ + type: string; + /** + * Gets or sets an icon of the dashboard toolbox item. + * Value: A string value that is the icon id from the SVG definition. + */ + icon: string; + /** + * Gets or sets a unique name of the dashboard toolbox item. + * Value: A string value that is a toolbox item's unique name. + */ + name: string; + /** + * Gets or sets a dashboard toolbox item title. + * Value: A string value that is a dashboard toolbox item title. + */ + title: string; + /** + * Gets or sets whether a toolbox item should be disabled. + * Value: true, if a toolbox item should be disabled; otherwise, false. + */ + disabled: KnockoutObservableBoolean; + /** + * Gets or sets a custom function that is invoked when a click occurs. + * Value: A custom function that is invoked when a click occurs. + */ + click: Function; +} +/** + * A toolbar item of the specified dashboard toolbar group. + */ +interface DashboardToolbarItem { + /** + * Gets or sets an icon of the dashboard toolbar item. + * Value: A string value that is the icon id from the SVG definition. + */ + icon: string; + /** + * Gets or sets a unique name of the dashboard toolbar item. + * Value: A string value that is a unique toolbar item name. + */ + name: string; + /** + * Gets or sets a dashboard toolbar item title. + * Value: A string value that is a dashboard toolbar item title. + */ + title: string; + /** + * Gets or sets whether a toolbar item should be disabled. + * Value: true, if a toolbar item is disabled; otherwise, false. + */ + disabled: KnockoutObservableBoolean; + /** + * Gets or sets a knockout extension template. + * Value: A string value that is an id of the knockout template. + */ + template: string; + /** + * Gets or sets a custom function that is invoked when a click occurs. + * Value: A custom function that is invoked when a click occurs. + */ + click: Function; +} +/** + * A toolbox group that contains dashboard toolbox items. + */ +interface DashboardToolboxGroup { + /** + * Gets or sets a unique name of the dashboard toolbox group. + * Value: A string value that is a unique toolbox group name. + */ + name: string; + /** + * Gets or sets a dashboard toolbox group title. + * Value: A string value that is a dashboard toolbox group title. + */ + title: string; + /** + * Gets or sets a position of the toolbox group within the Toolbox. + * Value: A zero-based integer specifying the position of the current toolbox group. + */ + index: number; + /** + * Provide an access to the collection of toolbox items obtained from the specified toolbox group. + * Value: A object that is an array of items obtained from the specified toolbox group. + */ + items: KnockoutObservableArray; +} +/** + * A toolbar group that contains dashboard toolbar items. + */ +interface DashboardToolbarGroup { + /** + * Gets or sets a unique name of the dashboard toolbar group. + * Value: A string value that is a unique toolbar group name. + */ + name: string; + /** + * Gets or sets a dashboard toolbar group title. + * Value: A string value that is a dashboard toolbar group title. + */ + title: string; + /** + * Gets or sets a position of the toolbar group within the Toolbox. + * Value: A zero-based integer specifying the position of the current toolbar group. + */ + index: number; + /** + * Provide an access to the collection of toolbox items obtained from the specified toolbar group. + * Value: A object that is an array of items obtained from the specified toolbar group. + */ + items: KnockoutObservableArray; +} +/** + * The Web Dashboard Toolbox extension that provides access to the dashboard menu and allows you to add dashboard items, as well as undo or repeat user actions. + */ +interface ToolboxExtension extends IExtension { + /** + * Gets or sets the visibility of the dashboard menu. + * Value: true, to display the dashboard menu; otherwise, false. + */ + menuVisible: KnockoutObservableBoolean; + /** + * Provide an access to the collection of menu items obtained from the dashboard menu. + * Value: A object that is a collection the dashboard menu items . + */ + menuItems: KnockoutObservableArray; + /** + * Provide an access to the collection of toolbox groups obtained from the Toolbox. + * Value: A object that is a collection the toolbox groups. + */ + toolboxGroups: KnockoutObservableArray; + /** + * Provide an access to the collection of toolbar groups obtained from the Toolbox. + * Value: A object that is a collection the toolbar groups. + */ + toolbarGroups: KnockoutObservableArray; + /** + * Allows you to add a specified menu item to the dashboard menu. + * @param menuItem A DashboardMenuItem object that is a dashboard menu item. + */ + addMenuItem(menuItem: DashboardMenuItem): void; + /** + * Removes the specified dashboard item from the dashboard menu. + * @param menuItemId A string value that is a unique dashboard item name. + */ + removeMenuItem(menuItemId: string): void; + /** + * Simulates a dashboard menu item selection. + * @param menuItem A DashboardMenuItem object that is a dashboard menu item. + */ + selectMenuItem(menuItem: DashboardMenuItem): void; + /** + * Allows you to add a specified toolbox item into a specified toolbox group. + * @param groupName A string value that is a toolbox group name. To get a toolbox group name, use the name property. + * @param toolboxItem A DashboardToolboxItem object that is a dashboard toolbox item. + */ + addToolboxItem(groupName: string, toolboxItem: DashboardToolboxItem): void; + /** + * Removes the specified toolbox item from the specified toolbox group. + * @param groupName A string value that is a unique toolbox group name. + * @param toolboxItemName A string value that is a unique toolbox item name. + */ + removeToolboxItem(groupName: string, toolboxItemName: string): void; + /** + * Allows you to add a specified toolbar item into a specified toolbar group. + * @param groupName A string value that is a toolbar group name. To get a toolbar group name, use the name property. + * @param toolbarItem A DashboardToolbarItem object that is a dashboard toolbar item. + */ + addToolbarItem(groupName: string, toolbarItem: DashboardToolbarItem): void; + /** + * Removes the specified toolbar item from the specified toolbar group. + * @param groupName A string value that is a unique toolbar group name. + * @param toolbarItemName A string value that is a unique toolbar item name. + */ + removeToolbarItem(groupName: string, toolbarItemName: string): void; +} +/** + * A Web Dashboard extension that allows you to create and edit dashboard parameters. + */ +interface DashboardParameterEditorExtension extends IExtension { +} /** * Serves as the base object for all the editors included in the client-side object model. */ @@ -2001,6 +3456,10 @@ interface ASPxClientTextEdit extends ASPxClientEdit { * @param position An integer value that specifies the zero-based index of a text character that shall precede the caret. */ SetCaretPosition(position: number): void; + /** + * Obtains the caret position within the edited text. + */ + GetCaretPosition(): number; /** * Selects the specified portion of the editor's text. * @param startPos A zero-based integer value specifying the selection's starting position. @@ -2265,6 +3724,58 @@ interface ASPxClientComboBox extends ASPxClientDropDownEditBase { * @param callbackFunction An object that is the JavaScript function that receives the callback data as a parameter. The function is performed after the combo box content is loaded. */ EnsureDropDownLoaded(callbackFunction: Object): void; + /** + * Defines the HTML content for the specified combo box item. + * @param index An integer value specifying the zero-based index of the item. + * @param html A string value that is the HTML code defining the content of the combo box item. + */ + SetItemHtml(index: number, html: string): void; + /** + * Sets the tooltip text for the combo box editor's item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTooltip(index: number, tooltip: string): void; + /** + * Sets the CSS class for a combo box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + AddItemCssClass(index: number, className: string): void; + /** + * Removes the CSS class from a combo box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + RemoveItemCssClass(index: number, className: string): void; + /** + * Defines the HTML content for the specified combo box item's text cell. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param html A string value that is the HTML code defining the content of the combo box item. + */ + SetItemTextCellHtml(itemIndex: number, textCellIndex: number, html: string): void; + /** + * Sets the tooltip text for the text cell of the editor's item specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTextCellTooltip(itemIndex: number, textCellIndex: number, tooltip: string): void; + /** + * Sets the CSS class for a combo box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + AddItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + /** + * Removes the CSS class from a combo box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + RemoveItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; } /** * Represents the client-side equivalent of the ASPxDateEdit control. @@ -2295,10 +3806,13 @@ interface ASPxClientDateEdit extends ASPxClientDropDownEditBase { */ GetTimeEdit(): ASPxClientTimeEdit; /** - * - * @param date + * Specifies the date for the editor. + * @param date A DateTime object that is the date. */ SetDate(date: Date): void; + /** + * Gets the date that is the editor's value. + */ GetDate(): Date; /** * Returns the number of days in a range selected within a date edit. @@ -2773,6 +4287,58 @@ interface ASPxClientListBox extends ASPxClientListEdit { * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. */ InsertItem(index: number, texts: string[]): void; + /** + * Defines the HTML content for the specified list box item. + * @param index An integer value specifying the zero-based index of the item. + * @param html A string value that is the HTML code defining the content of the list box item. + */ + SetItemHtml(index: number, html: string): void; + /** + * Sets the tooltip text for the list box editor's item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTooltip(index: number, tooltip: string): void; + /** + * Sets the CSS class for a list box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + AddItemCssClass(index: number, className: string): void; + /** + * Removes the CSS class from a list box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + RemoveItemCssClass(index: number, className: string): void; + /** + * Defines the HTML content for the specified list box item's text cell. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param html A string value that is the HTML code defining the content of the list box item. + */ + SetItemTextCellHtml(itemIndex: number, textCellIndex: number, html: string): void; + /** + * Sets the tooltip text for the text cell of the editor's item specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTextCellTooltip(itemIndex: number, textCellIndex: number, tooltip: string): void; + /** + * Sets the CSS class for a list box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + AddItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + /** + * Removes the CSS class from a list box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + RemoveItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; } /** * Serves as the base type for the ASPxClientRadioButtonList objects. @@ -2997,10 +4563,13 @@ interface ASPxClientTimeEdit extends ASPxClientSpinEditBase { */ DateChanged: ASPxClientEvent>; /** - * - * @param date + * Specifies the date for the editor. + * @param date A DateTime object that is the date. */ SetDate(date: Date): void; + /** + * Gets the date that is the editor's value. + */ GetDate(): Date; } /** @@ -3407,16 +4976,87 @@ interface ASPxClientGaugeControl extends ASPxClientControl { */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } +/** + * Lists values that specify the position relative to the target column in which a moved column should be placed. + */ +interface ASPxClientGridColumnMovingTargetPosition { + /** + * A moved column should be placed to the right of the target column. + */ + Right: number; + /** + * A moved column should be placed to the left of the target column. + */ + Left: number; + /** + * A moved column should be placed at the top of the target column. + */ + Top: number; + /** + * A moved column should be placed at the bottom of the target column. + */ + Bottom: number; +} /** * Represents the client ASPxGridView. */ interface ASPxClientGridBase extends ASPxClientControl { + /** + * Fires after a toolbar item has been clicked. + */ + ToolbarItemClick: ASPxClientEvent>; + /** + * Returns a toolbar specified by its name. + * @param name A string value specifying the toolbar name. + */ + GetToolbarByName(name: string): ASPxClientMenu; + /** + * Returns a grid's toolbar specified by its index. + * @param index An integer value specifying the zero-based index of the toolbar object to retrieve. + */ + GetToolbar(index: number): ASPxClientMenu; } /** * Serves as a base object implementing the client column functionality. */ interface ASPxClientGridColumnBase { } +/** + * A method that will handle the ToolbarItemClick event. + */ +interface ASPxClientGridToolbarItemClickEventHandler { + /** + * A method that will handle the ToolbarItemClick event. + * @param source The event source. + * @param e An ASPxClientGridToolbarItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridToolbarItemClickEventArgs): void; +} +/** + * Provides data for the ToolbarItemClick event. + */ +interface ASPxClientGridToolbarItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the toolbar index. + * Value: An integer value that is the toolbar index. + */ + toolbarIndex: number; + /** + * Gets the toolbar name. + * Value: A string value that is the toolbar name. + */ + toolbarName: string; + /** + * Gets the clicked toolbar item. + * Value: A ASPxClientMenuItem object that is the toolbar item. + */ + item: ASPxClientMenuItem; + /** + * Specifies whether a postback or a callback is used to finally process the event on the server side. + * Value: true to perform the round trip to the server side via postback; false to perform the round trip to the server side via callback. + */ + usePostBack: boolean; +} /** * The client-side equivalent of the ASPxGridLookup control. */ @@ -3503,6 +5143,10 @@ interface ASPxClientCardView extends ASPxClientGridBase { * Occurs on the client side before a card is deleted in batch edit mode. */ BatchEditCardDeleting: ASPxClientEvent>; + /** + * Occurs on the client side when the focused cell is about to be changed. + */ + FocusedCellChanging: ASPxClientEvent>; /** * Fires on the client when a card is clicked. */ @@ -3531,6 +5175,21 @@ interface ASPxClientCardView extends ASPxClientGridBase { * Fires after the customization window has been closed. */ CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + */ + GetEditValue(column: ASPxClientCardViewColumn): string; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + */ + GetEditValue(columnIndex: number): string; + /** + * Returns the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditValue(columnFieldNameOrId: string): string; /** * Moves focus to the specified edit cell within the edited card. * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. @@ -3911,6 +5570,12 @@ interface ASPxClientCardView extends ASPxClientGridBase { * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. */ PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; /** * Selects the specified page. * @param pageIndex An integer value that specifies the active page's index. @@ -4036,21 +5701,6 @@ interface ASPxClientCardView extends ASPxClientGridBase { * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). */ GetEditor(columnFieldNameOrId: string): ASPxClientEdit; - /** - * Returns the value of the specified edit cell. - * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. - */ - GetEditValue(column: ASPxClientCardViewColumn): string; - /** - * Returns the value of the specified edit cell. - * @param columnIndex An integer value that identifies the data column within the grid's column collection. - */ - GetEditValue(columnIndex: number): string; - /** - * Returns the value of the specified edit cell. - * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). - */ - GetEditValue(columnFieldNameOrId: string): string; } /** * Represents a client column. @@ -4435,6 +6085,27 @@ interface ASPxClientCardViewBatchEditCardDeletingEventArgs extends ASPxClientCan */ cardValues: Object; } +/** + * A method that will handle the FocusedCellChanging event. + */ +interface ASPxClientCardViewFocusedCellChangingEventHandler { + /** + * A method that will handle the FocusedCellChanging event. + * @param source The event source. + * @param e An ASPxClientCardViewFocusedCellChangingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewFocusedCellChangingEventArgs): void; +} +/** + * Provides data for the FocusedCellChanging event. + */ +interface ASPxClientCardViewFocusedCellChangingEventArgs extends ASPxClientCancelEventArgs { + /** + * Provides information of a card's cell currently being focused. + * Value: A ASPxClientCardViewCellInfo object that provides information about the card's cell. + */ + cellInfo: ASPxClientCardViewCellInfo; +} /** * Provides members related to Batch Edit Mode */ @@ -4503,6 +6174,12 @@ interface ASPxClientCardViewBatchEditApi { * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). */ GetCellValue(visibleIndex: number, columnFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets a container holding a data cell content. + * @param visibleIndex An integer value that is the visible index. + * @param columnFieldNameOrId A string value that is the column's Field Name or ID. + */ + GetCellTextContainer(visibleIndex: number, columnFieldNameOrId: string): Object; /** * Gets information about the cell currently being edited. */ @@ -4672,6 +6349,10 @@ interface ASPxClientGridView extends ASPxClientGridBase { * Occurs on the client side before a data row is deleted in batch edit mode. */ BatchEditRowDeleting: ASPxClientEvent>; + /** + * Occurs on the client side when the focused cell is about to be changed. + */ + FocusedCellChanging: ASPxClientEvent>; /** * Occurs when a callback for server-side processing is initiated. */ @@ -4688,6 +6369,55 @@ interface ASPxClientGridView extends ASPxClientGridBase { * Fires after the Customization Window has been closed. */ CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Selects or deselects the specified row displayed within the grid. + * @param key An object that uniquely identifies the row. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRowsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + */ + SelectRowsByKey(keys: Object[]): void; + /** + * Selects a grid row by its key. + * @param key An object that uniquely identifies the row. + */ + SelectRowsByKey(key: Object): void; + /** + * Deselects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + */ + UnselectRowsByKey(keys: Object[]): void; + /** + * Deselects the specified row displayed within the grid. + * @param key An object that uniquely identifies the row. + */ + UnselectRowsByKey(key: Object): void; + /** + * Deselects all the selected rows within the grid. + */ + UnselectRows(): void; + /** + * Deselects the specified rows (if selected) within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + */ + UnselectRows(visibleIndices: number[]): void; + /** + * Deselects the specified row (if selected) within the grid. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + UnselectRows(visibleIndex: number): void; + /** + * Deselects all grid rows that match the filter criteria currently applied to the grid. + */ + UnselectFilteredRows(): void; + /** + * Selects the specified row displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + SelectRowOnPage(visibleIndex: number): void; /** * Selects or deselects the specified row displayed on the current page. * @param visibleIndex A zero-based integer value that specifies the row's visible index. @@ -4763,6 +6493,11 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param position An integer value specifying the horizontal scroll position. */ SetHorizontalScrollPosition(position: number): void; + /** + * Sets the scrollability of various types of grid rows when the grid displays fixed columns. + * @param scrollableRowSettings An object specifying which types of grid rows should or should not be scrollable. + */ + SetFixedColumnScrollableRows(scrollableRowSettings: Object): void; /** * Applies a filter specified in the filter row to the GridView. */ @@ -4827,6 +6562,12 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. */ PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; /** * Selects the specified page. * @param pageIndex An integer value that specifies the active page's index. @@ -5036,6 +6777,10 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param columnIndex A zero-based index that identifies the column in the column collection (the column's Index property value). */ SetFocusedCell(rowVisibleIndex: number, columnIndex: number): void; + /** + * Invokes the Customization Dialog and displays it over the grid. + */ + ShowCustomizationDialog(): void; /** * Sorts data by the specified data column's values. * @param column An ASPxClientGridViewColumn object that represents the data column. @@ -5219,6 +6964,38 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. */ MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnFieldNameOrId A String value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + * @param moveToGroup true, to group the ASPxGridView's data by the column; otherwise, false. + * @param moveFromGroup true, to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + * @param moveToGroup true, to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true, to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition, moveToGroup: boolean, moveFromGroup: boolean): void; /** * Groups data by the values of the specified column. * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. @@ -5288,6 +7065,21 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). */ UnGroup(columnFieldNameOrId: string): void; + /** + * Ungroups data by the values of a specified column. + * @param column A ASPxClientGridViewColumn object that is the grid column. + */ + Ungroup(column: ASPxClientGridViewColumn): void; + /** + * Ungroups data by the values of a specified column. + * @param columnIndex An integer value that is the column index. + */ + Ungroup(columnIndex: number): void; + /** + * Ungroups data by the values of a specified column. + * @param columnFieldNameOrId A string value that is the column's FieldName or ID. + */ + Ungroup(columnFieldNameOrId: string): void; /** * Expands all group rows. */ @@ -5415,55 +7207,6 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param selected true to select the specified rows; false to deselect the rows. */ SelectRowsByKey(keys: Object[], selected?: boolean): void; - /** - * Selects or deselects the specified row displayed within the grid. - * @param key An object that uniquely identifies the row. - * @param selected true to select the specified row; false to deselect the row. - */ - SelectRowsByKey(key: Object, selected?: boolean): void; - /** - * Selects the specified rows displayed within the grid. - * @param keys An array of objects that uniquely identify the rows. - */ - SelectRowsByKey(keys: Object[]): void; - /** - * Selects a grid row by its key. - * @param key An object that uniquely identifies the row. - */ - SelectRowsByKey(key: Object): void; - /** - * Deselects the specified rows displayed within the grid. - * @param keys An array of objects that uniquely identify the rows. - */ - UnselectRowsByKey(keys: Object[]): void; - /** - * Deselects the specified row displayed within the grid. - * @param key An object that uniquely identifies the row. - */ - UnselectRowsByKey(key: Object): void; - /** - * Deselects all the selected rows within the grid. - */ - UnselectRows(): void; - /** - * Deselects the specified rows (if selected) within the grid. - * @param visibleIndices An array of zero-based indices that identify data rows within the grid. - */ - UnselectRows(visibleIndices: number[]): void; - /** - * Deselects the specified row (if selected) within the grid. - * @param visibleIndex A zero-based integer value that specifies the row's visible index. - */ - UnselectRows(visibleIndex: number): void; - /** - * Deselects all grid rows that match the filter criteria currently applied to the grid. - */ - UnselectFilteredRows(): void; - /** - * Selects the specified row displayed on the current page. - * @param visibleIndex A zero-based integer value that specifies the row's visible index. - */ - SelectRowOnPage(visibleIndex: number): void; } /** * A client grid column. @@ -6013,6 +7756,27 @@ interface ASPxClientGridViewBatchEditRowDeletingEventArgs extends ASPxClientCanc */ rowValues: Object; } +/** + * A method that will handle the FocusedCellChanging event. + */ +interface ASPxClientGridViewFocusedCellChangingEventHandler { + /** + * A method that will handle the FocusedCellChanging event. + * @param source The event source. + * @param e An ASPxClientGridViewFocusedCellChangingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewFocusedCellChangingEventArgs): void; +} +/** + * Provides data for the FocusedCellChanging event. + */ +interface ASPxClientGridViewFocusedCellChangingEventArgs extends ASPxClientCancelEventArgs { + /** + * Provides information on a cell currently being focused. + * Value: A ASPxClientGridViewCellInfo object that is the cell information. + */ + cellInfo: ASPxClientGridViewCellInfo; +} /** * Contains information on a grid cell. */ @@ -6096,6 +7860,12 @@ interface ASPxClientGridViewBatchEditApi { * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). */ GetCellValue(visibleIndex: number, columnFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets a container holding a data cell content. + * @param visibleIndex An integer value that is the visible index. + * @param columnFieldNameOrId A string value that is the column's Field Name or ID. + */ + GetCellTextContainer(visibleIndex: number, columnFieldNameOrId: string): Object; /** * Gets information about the cell currently being edited. */ @@ -6190,6 +7960,10 @@ interface ASPxClientVerticalGrid extends ASPxClientGridBase { * Enables you to specify whether record data is valid and provide an error text. */ BatchEditRecordValidating: ASPxClientEvent>; + /** + * Occurs on the client side when the focused cell is about to be changed. + */ + FocusedCellChanging: ASPxClientEvent>; /** * Enables you to prevent rows from being sorted. */ @@ -6477,6 +8251,12 @@ interface ASPxClientVerticalGrid extends ASPxClientGridBase { * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. */ PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; /** * Selects the specified page. * @param pageIndex An integer value that specifies the active page's index. @@ -7050,6 +8830,27 @@ interface ASPxClientVerticalGridBatchEditRecordDeletingEventArgs extends ASPxCli */ recordValues: Object; } +/** + * A method that will handle the FocusedCellChanging event. + */ +interface ASPxClientVerticalGridFocusedCellChangingEventHandler { + /** + * A method that will handle the FocusedCellChanging event. + * @param source The event source. + * @param e An ASPxClientVerticalGridFocusedCellChangingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridFocusedCellChangingEventArgs): void; +} +/** + * Provides data for the FocusedCellChanging event. + */ +interface ASPxClientVerticalGridFocusedCellChangingEventArgs extends ASPxClientCancelEventArgs { + /** + * Provides information on a cell currently being focused. + * Value: A ASPxClientVerticalGridCellInfo object that is the cell information. + */ + cellInfo: ASPxClientVerticalGridCellInfo; +} /** * Contains information on a cell that is being edited. */ @@ -7133,6 +8934,12 @@ interface ASPxClientVerticalGridBatchEditApi { * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). */ GetCellValue(visibleIndex: number, rowFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets a container holding the data cell content. + * @param visibleIndex An integer value that is the visible index. + * @param columnFieldNameOrId A string value that is the column's Field Name or ID. + */ + GetCellTextContainer(visibleIndex: number, columnFieldNameOrId: string): Object; /** * Gets information about the cell currently being edited. */ @@ -7228,6 +9035,21 @@ interface ASPxClientHtmlEditorCommandStyleSettings { * Value: A string that specifies an element's left margin in any correct format. */ marginLeft: string; + /** + * Gets or sets a media element's background color. + * Value: A string that specifies a background color in any correct format. + */ + backgroundColor: string; + /** + * Gets or sets the element's text alignment. + * Value: A string value that specifies the element's text alignment in any correct format. + */ + textAlign: string; + /** + * Gets or sets the element's vertical alignment. + * Value: A string value that specifies the element's vertical alignment in any correct format. + */ + verticalAlign: string; } /** * The base class for parameters used in the ASPxHtmlEditor's client-side commands. @@ -7298,6 +9120,11 @@ interface ASPxClientHtmlEditorInsertLinkCommandArguments extends ASPxClientHtmlE * Value: A string value defining the title of the target link. */ title: string; + /** + * Contains the style settings defining the appearance of the target link element. + * Value: An object that contains the style settings defining the appearance of the target link element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; } /** * The base class for parameters related to inserting or changing media elements in the ASPxHtmlEditor. @@ -7443,6 +9270,101 @@ interface ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments extends ASPxCli */ interface ASPxClientHtmlEditorChangeYouTubeVideoCommandArguments extends ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments { } +/** + * Contains settings related to the TABLEPROPERTIES_DIALOG_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorTablePropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Contains the style settings defining the appearance of the target table element. + * Value: An object that contains the style settings defining the appearance of the target table element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; + /** + * Determines the position of the target table element. + * Value: A string value indicating the position of the target table element. + */ + align: string; + /** + * Gets or sets a table cell padding. + * Value: An integer value that is the cell padding. + */ + cellPadding: number; + /** + * Gets or sets the table cell spacing. + * Value: An integer value that is the table cell spacing. + */ + cellSpacing: number; + /** + * Gets or sets a value that is the table caption. + * Value: A string value that is the caption. + */ + caption: string; + /** + * Gets or sets a value indicating whether the first row/column serves as the table's header. + * Value: A string value that specifies whether the first row/column serves as the table's header. + */ + headers: string; + /** + * Gets or sets the table's summary. + * Value: A string value that is the table's summary. + */ + summary: string; +} +/** + * Contains settings related to the INSERTTABLE_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertTableCommandArguments extends ASPxClientHtmlEditorTablePropertiesCommandArguments { + /** + * Gets or sets the count of columns in the table. + * Value: An integer value that is the count of columns. + */ + columns: number; + /** + * Gets or sets the count of rows in the table. + * Value: An integer value that is the count of rows. + */ + rows: number; + /** + * Gets or sets a value indicating whether all table columns should have equal width. + * Value: true, to create equal widths for all columns; otherwise, false. + */ + isEqualColumnWidth: boolean; +} +/** + * Contains settings related to the TABLECELLPROPERTIES_DIALOG_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorTableCellPropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Contains the style settings defining the appearance of the target cell element. + * Value: An object that contains the style settings defining the appearance of the target cell element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; + /** + * Gets or sets a value that indicates whether the cell settings should be applied to all cells in the table. + * Value: true, if the cell settings should be applied to all cells in the table; otherwise, false. + */ + applyForAll: boolean; +} +/** + * Contains settings related to the TABLEROWPROPERTIES_DIALOG_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorTableRowPropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Contains the style settings specifying the appearance of the specified table row. + * Value: An object that contains the style settings specifying the appearance of the specified table row. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +/** + * Contains settings related to the TABLECOLUMNPROPERTIES_DIALOG_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorTableColumnPropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Contains the style settings defining the appearance of the target column element. + * Value: An object that contains the style settings defining the appearance of the target column element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} /** * A method that will handle the DialogInitialized client event. */ @@ -7463,6 +9385,68 @@ interface ASPxClientHtmlEditorDialogInitializedEventArgs extends ASPxClientEvent * Value: A string value that is the name of the initialized dialog. */ dialogName: string; + /** + * Gets a dialog object related to the event. + * Value: A ASPxClientHtmlEditorDialogBase object that is the dialog. + */ + dialog: ASPxClientHtmlEditorDialogBase; +} +/** + * Provides data for the event that fires when the HTML Editor dialogs are closed or are going to be closed. + */ +interface ASPxClientHtmlEditorDialogCloseEventArgs extends ASPxClientEventArgs { + /** + * Gets the dialog name related to the event. + * Value: A string value that is the dialog name. + */ + dialogName: string; + /** + * Gets the dialog object related to the event. + * Value: An ASPxClientHtmlEditorDialogBase object that is the dialog. + */ + dialog: ASPxClientHtmlEditorDialogBase; + /** + * Gets a string that contains specific information (if any) passed from the client side for server-side processing. + * Value: A string value representing specific information passed from the client to the server side. + */ + parameter: Object; +} +/** + * A method that will handle the DialogClosing event. + */ +interface ASPxClientHtmlEditorDialogClosingEventHandler { + /** + * A method that will handle the DialogClosing event. + * @param source The event source. + * @param e An ASPxClientHtmlEditorDialogClosingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorDialogClosingEventArgs): void; +} +/** + * Provides data for the DialogClosing event. + */ +interface ASPxClientHtmlEditorDialogClosingEventArgs extends ASPxClientHtmlEditorDialogCloseEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the DialogClosed event. + */ +interface ASPxClientHtmlEditorDialogClosedEventHandler { + /** + * A method that will handle the DialogClosed event. + * @param source The event source. + * @param e An ASPxClientHtmlEditorDialogClosedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorDialogClosedEventArgs): void; +} +/** + * Provides data for the DialogClosed event. + */ +interface ASPxClientHtmlEditorDialogClosedEventArgs extends ASPxClientHtmlEditorDialogCloseEventArgs { } /** * A method that will handle the CommandExecuting event. @@ -7696,6 +9680,14 @@ interface ASPxClientHtmlEditor extends ASPxClientControl { * Occurs on the client side after a dialog has been initialized. */ DialogInitialized: ASPxClientEvent>; + /** + * Fires on the client side before a dialog is going to be closed. + */ + DialogClosing: ASPxClientEvent>; + /** + * Occurs on the client side after a dialog is closed. + */ + DialogClosed: ASPxClientEvent>; /** * Occurs before a default or custom command has been executed and allows you to cancel the action. */ @@ -7780,6 +9772,10 @@ interface ASPxClientHtmlEditor extends ASPxClientControl { * Returns the document object generated by an iframe element within a design view area. */ GetDesignViewDocument(): Object; + /** + * Provides access to the client ASPxPopupControl object that is a Html Editor's dialog. + */ + GetDialogPopupControl(): ASPxClientPopupControl; /** * Returns the document object generated by an iframe element within a preview area. */ @@ -7910,6 +9906,513 @@ interface ASPxClientHtmlEditor extends ASPxClientControl { */ PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; } +/** + * Provides client functionality for dialogs within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client ASPxFormLayout object that arranges all editors in the Html Editor's dialogs. + */ + GetFormLayout(): ASPxClientFormLayout; + /** + * Provides access to the client object of the "OK" button in the Html Editor's dialogs. + */ + GetOkButton(): ASPxClientButton; + /** + * Provides access to the client object of the "Cancel" button in the Html Editor's dialogs. + */ + GetCancelButton(): ASPxClientButton; +} +/** + * Provides client functionality for Html Editor dialogs operated with its elements. + */ +interface ASPxClientHtmlEditorEditElementDialog extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client object of the "Border style" combo box in the Html Editor's dialogs (Style Settings). + */ + GetBorderStyleComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Border width" spin editor in the Html Editor's dialogs (Style Settings). + */ + GetBorderWidthSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Border color" color editor in the Html Editor's dialogs (Style Settings). + */ + GetBorderColorColorEdit(): ASPxClientColorEdit; + /** + * Provides access to the client object of the "Top margin" text box in the Html Editor's dialogs (Style Settings). + */ + GetTopMarginTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Bottom margin" text box in the Html Editor's dialogs (Style Settings). + */ + GetBottomMarginTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Left margin" text box in the Html Editor's dialogs (Style Settings). + */ + GetLeftMarginTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Right margin" text box in the Html Editor's dialogs (Style Settings). + */ + GetRightMarginTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "CSS class" combo box in the Html Editor's dialogs (Style Settings). + */ + GetCssClassNameComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Change Element Properties dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorChangeElementPropertiesDialog extends ASPxClientHtmlEditorEditElementDialog { + /** + * Provides access to the client object of the "ID" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetIdTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Title" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetTitleTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Direction" combo box in the Html Editor's "Change Element Properties" dialog. + */ + GetDirectionComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Value" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetValueTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Tab index" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetTabIndexTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Disabled" check box in the Html Editor's "Change Element Properties" dialog. + */ + GetDisabledCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Input type" combo box in the Html Editor's "Change Element Properties" dialog. + */ + GetInputTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "For" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetForTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Name" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetNameTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Method" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetMethodTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Action" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetActionTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Checked" check box in the Html Editor's "Change Element Properties" dialog. + */ + GetCheckedCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Max length" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetMaxLengthTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Size" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetSizeTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Readonly" check box in the Html Editor's "Change Element Properties" dialog. + */ + GetReadonlyCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Src" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetSrcTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Accept" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetAcceptTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Alt" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetAltTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Start" spin editor in the Html Editor's "Change Element Properties" dialog. + */ + GetStartSpinEdit(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Width" spin editor in the Html Editor's "Change Element Properties" dialog. + */ + GetWidthValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client ASPxComboBox object that allows you to specify the element width measurement unit in the Html Editor's "Change Element Properties" dialog. + */ + GetWidthValueTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Height" spin editor in the Html Editor's "Change Element Properties" dialog. + */ + GetHeightValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client ASPxComboBox object that allows to specify the element height measurement unit in the Html Editor's "Change Element Properties" dialog. + */ + GetHeightValueTypeComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Link dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorLinkDialog extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client object of the "E-mail to" text box in the Html Editor's Link dialog. + */ + GetEmailTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Text" text box in the Html Editor's Link dialog. + */ + GetTextTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "ToolTip" text box in the Html Editor's Link dialog. + */ + GetTooltipTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Subject" text box in the Html Editor's Link dialog. + */ + GetSubjectTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "URL" text box in the Html Editor's Link dialog. + */ + GetUrlTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the file manager used in the Link dialog's "Select Document" popup window. + */ + GetFileManager(): ASPxClientFileManager; + /** + * Provides access to the client object of the "Cancel" button in the Link dialog's "Select Document" popup window. + */ + GetSelectDocumentPopupCancelButton(): ASPxClientButton; + /** + * Provides access to the client object of the "Select" button in the Link dialog's "Select Document" popup window. + */ + GetSelectDocumentPopupSelectButton(): ASPxClientButton; + /** + * Provides access to the client popup control object that is the "Select Document" popup window in the Html Editor's Link dialog. + */ + GetSelectDocumentPopupControl(): ASPxClientPopupControl; + /** + * Provides access to the client object of the "Open in new window" check box in the Html Editor's Link dialog. + */ + GetOpenInNewWindowCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client radio button list object used to specify the link type in the Html Editor's Link dialog. + */ + GetLinkTypeRadioButtonList(): ASPxClientRadioButtonList; +} +/** + * Provides client functionality for the Placeholder dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorPlaceholderDialog extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the ASPxListBox client object that lists placeholder names in the Html Editor's Placeholder dialog. + */ + GetPlaceholderNameListBox(): ASPxClientListBox; +} +/** + * Provides client functionality for the Paste From Word dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorPasteFromWordDialog extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client object of the "Remove font family" check box in the Html Editor's Flash dialog. + */ + GetRemoveFontFamilyCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the media dialogs within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorMediaDialogBase extends ASPxClientHtmlEditorEditElementDialog { + /** + * Provides access to the client object of the media file selector that allows you to insert/change media files in the Html Editor's Audio/Video/Flash dialogs. + */ + GetMediaFileSelector(): ASPxClientMediaFileSelector; + /** + * Provides access to the client object of the "More options" check box in the Html Editor's Audio/Video/Flash/Image dialogs. + */ + GetMoreOptionsCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Width" spin editor in the Html Editor's Audio/Video/Flash dialogs. + */ + GetWidthSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Height" spin editor in the Html Editor's Audio/Video/Flash dialogs. + */ + GetHeightSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Position" combo box in the Html Editor's Audio/Video/Flash/Image dialogs. + */ + GetPositionComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Image dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorImageDialog extends ASPxClientHtmlEditorMediaDialogBase { + /** + * Provides access to the client object of the "Size" combo box in the Html Editor's Image dialog. + */ + GetSizeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Create thumbnail" check box in the Html Editor's Image dialog. + */ + GetCreateThumbnailCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "New image name" text box in the Html Editor's Image dialog. + */ + GetThumbnailNameTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Wrap text around image" check box in the Html Editor's Image dialog. + */ + GetWrapTextCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Description" text box in the Html Editor's Image dialog. + */ + GetDescriptionTextBox(): ASPxClientTextBox; +} +/** + * Provides client functionality for the Flash dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorFlashDialog extends ASPxClientHtmlEditorMediaDialogBase { + /** + * Provides access to the client object of the "Quality" combo box in the Html Editor's Flash dialog. + */ + GetQualityComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Auto play" check box in the Html Editor's Flash dialog. + */ + GetAutoPlayCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Enable flash menu" check box in the Html Editor's Flash dialog. + */ + GetEnableFlashMenuCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Loop" check box in the Html Editor's Flash dialog. + */ + GetLoopCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Allow fullscreen" check box in the Html Editor's Flash dialog. + */ + GetAllowFullscreenCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the Audio dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorAudioDialog extends ASPxClientHtmlEditorMediaDialogBase { + /** + * Provides access to the client object of the "Auto play" check box in the Html Editor's Audio dialogs. + */ + GetAutoPlayCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Preload mode" combo box in the Html Editor's Audio dialogs. + */ + GetPreloadModeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Loop" check box in the Html Editor's Audio dialogs. + */ + GetLoopCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show player controls" check box in the Html Editor's Audio dialogs. + */ + GetShowPlayerControlsCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the Video dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorVideoDialog extends ASPxClientHtmlEditorMediaDialogBase { + /** + * Provides access to the client object of the "Auto play" check box in the Html Editor's Video dialog. + */ + GetAutoPlayCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Preload mode" combo box in the Html Editor's Video dialog. + */ + GetPreloadModeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Loop" check box in the Html Editor's Video dialog. + */ + GetLoopCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show player controls" check box in the Html Editor's Video dialog. + */ + GetShowPlayerControlsCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Poster URL" text box in the Html Editor's Video dialog. + */ + GetPosterTextBox(): ASPxClientTextBox; +} +/** + * Provides client functionality for the YouTube Video dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorYouTubeDialog extends ASPxClientHtmlEditorEditElementDialog { + /** + * Provides access to the client object of the "Enable privacy-enhanced mode" check box in the Html Editor's YouTube Video dialog. + */ + GetConfidentModeCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show suggested videos when the video finishes" check box in the Html Editor's YouTube Video dialog. + */ + GetShowSameVideosCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show video title and player actions" check box in the Html Editor's YouTube Video dialog. + */ + GetShowVideoNameCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show player controls" check box in the Html Editor's YouTube Video dialog. + */ + GetShowPlayerControlsCheckBox(): ASPxClientCheckBox; +} +/** + * Provides base client functionality for the Table dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableDialogBase extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client object of the "Background color" color editor in the Html Editor's Table dialogs. + */ + GetBackgroundColorColorEdit(): ASPxClientColorEdit; +} +/** + * Provides client functionality for the Table dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableDialog extends ASPxClientHtmlEditorTableDialogBase { + /** + * Provides access to the client object of the "Width" combo box in the Html Editor's Table dialogs. + */ + GetWidthTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the spin editor in the Html Editor's Table dialogs that allows you to specify the table width value. + */ + GetWidthValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the combo box in the Html Editor's Table dialogs that allows you to specify the table width measurement unit. + */ + GetWidthValueTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Height" combo box in the Html Editor's Table dialogs. + */ + GetHeightTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the spin editor in the Html Editor's Table dialogs that allows you specify the table height value. + */ + GetHeightValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the combo box in the Html Editor's Table dialogs that allows you to specify the table height measurement unit. + */ + GetHeightValueTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Cell padding" spin editor in the Html Editor's Table dialogs. + */ + GetCellPaddingSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Cell spacing" spin editor in the Html Editor's Table dialogs. + */ + GetCellSpacingSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Alignment" combo box in the Html Editor's Table dialogs. + */ + GetAlignmentComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Border Color" color editor in the Html Editor's Table dialogs. + */ + GetBorderColorColorEdit(): ASPxClientColorEdit; + /** + * Provides access to the client object of the "Border size" spin editor in the Html Editor's Table dialogs. + */ + GetBorderWidthSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Headers" combo box in the Html Editor's Table dialogs. + */ + GetHeadersComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Caption" text box in the Html Editor's Table dialogs. + */ + GetCaptionTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Summary" text box in the Html Editor's Table dialogs. + */ + GetSummaryTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Accessibility" check box related to the Html Editor's Table dialogs. + */ + GetAccessibilityCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the Insert Table dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorInsertTableDialog extends ASPxClientHtmlEditorTableDialog { + /** + * Provides access to the client object of the "Columns" spin editor in the Html Editor's Table dialogs. + */ + GetColumnCountSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Rows" spin editor in the Html Editor's Table dialogs. + */ + GetRowCountSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Equal column widths" check box in the Html Editor's Table dialogs. + */ + GetEqualWidthCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for Table dialogs within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableElementPropertiesDialog extends ASPxClientHtmlEditorTableDialogBase { + /** + * Provides access to the client object of the "Horizontal" combo box in the Html Editor's Row/Column/Cell Properties dialog's Alignment group. + */ + GetHorizontalAlignmentComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Vertical" combo box in the Html Editor's Row/Column/Cell Properties dialog's Alignment group. + */ + GetVerticalAlignmentComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Cell Properties dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableCellPropertiesDialog extends ASPxClientHtmlEditorTableElementPropertiesDialog { + /** + * Provides access to the client object of the "Apply to all cells in the table" check box in the Html Editor's Cell Properties dialog. + */ + GetApplyToAllCellsCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the Row Properties dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableRowPropertiesDialog extends ASPxClientHtmlEditorTableElementPropertiesDialog { + /** + * Provides access to the client object of the "Height" combo box in the Html Editor's "Row Properties" dialog. + */ + GetHeightTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client ASPxSpinEdit object that allows you to specify the row height in the Html Editor's "Row Properties" dialog. + */ + GetHeightValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client ASPxComboBox object that allows you to specify the row height measurement unit in the Html Editor's "Row Properties" dialog. + */ + GetHeightValueTypeComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Column Properties dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableColumnPropertiesDialog extends ASPxClientHtmlEditorTableElementPropertiesDialog { + /** + * Provides access to the client object of the "Width" combo box in the Html Editor's "Column Properties" dialog. + */ + GetWidthTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the spin editor that allows you to set the column width value in the Html Editor's "Column Properties" dialog. + */ + GetWidthValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the combo box that allows you to specify the column width measurement unit in the Html Editor's "Column Properties" dialog. + */ + GetWidthValueTypeComboBox(): ASPxClientComboBox; +} /** * A selection in the ASPxHtmlEditor. */ @@ -7938,7 +10441,7 @@ interface ASPxClientHtmlEditorSelection { SetHtml(html: string, addToHistory: boolean): void; } /** - * A client-side equivalent of the ASPxPivotGrid control. + * The client-side equivalent of the ASPxPivotGrid control. */ interface ASPxClientPivotGrid extends ASPxClientControl { /** @@ -8246,6 +10749,10 @@ interface ASPxClientRichEdit extends ASPxClientControl { * Value: A object that lists methods to work with the selection. */ selection: RichEditSelection; + /** + * Gets a unit converter. + * Value: A object representing a unit converter. + */ unitConverter: RichEditUnitConverter; /** * Occurs after a custom command has been executed on the client side. @@ -8350,6 +10857,11 @@ interface RichEditCommands { * Value: A object that provides methods for executing the command and checking its state. */ fileSaveAs: FileSaveAsCommand; + /** + * Gets a command to open the file's Save As dialog. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileSaveAsDialog: FileSaveAsDialogCommand; /** * Gets a command to invoke a browser-specific Print dialog allowing one to print the current document. * Value: A object that provides methods for executing the command and checking its state. @@ -8461,7 +10973,7 @@ interface RichEditCommands { */ changeFontBackColor: ChangeFontBackColorCommand; /** - * Gets a command to reset the selected text's formatting to default. + * Gets a command to reset text and paragraph formatting in the selected range to default. * Value: A object that provides methods for executing the command and checking its state. */ clearFormatting: ClearFormattingCommand; @@ -8491,7 +11003,7 @@ interface RichEditCommands { */ increaseIndent: IncreaseIndentCommand; /** - * Gets a command to decrement the indent level of paragraphs in a selected range. + * Gets a command to decrease the indent level of paragraphs in a selected range. * Value: A object that provides methods for executing the command and checking its state. */ decreaseIndent: DecreaseIndentCommand; @@ -8591,7 +11103,7 @@ interface RichEditCommands { */ openInsertTableDialog: OpenInsertTableDialogCommand; /** - * Gets a command to invoke the Insert Table dialog window. + * Gets a command to insert a rectangle table of a specified size. * Value: A object that provides methods for executing the command and checking its state. */ insertTable: InsertTableCommand; @@ -8601,7 +11113,7 @@ interface RichEditCommands { */ openInsertPictureDialog: OpenInsertPictureDialogCommand; /** - * Gets a command to insert a picture from a file. + * Gets a command to insert an inline picture stored by specifed web address. * Value: A object that provides methods for executing the command and checking its state. */ insertPicture: InsertPictureCommand; @@ -8620,6 +11132,10 @@ interface RichEditCommands { * Value: A object that provides methods for executing the command and checking its state. */ deleteBookmark: DeleteBookmarkCommand; + /** + * Gets a command to navigate to the specified bookmark. + * Value: A object that provides methods for executing the command and checking its state. + */ goToBookmark: GoToBookmarkCommand; /** * Gets a command to invoke the Hyperlink dialog window. @@ -8671,6 +11187,10 @@ interface RichEditCommands { * Value: A object that provides methods for executing the command and checking its state. */ changePageOrientation: ChangePageOrientationCommand; + /** + * Gets a command to define the page size dialog's settings. + * Value: A object that provides methods for executing the command and checking its state. + */ setPageSizeDialog: SetPageSizeDialogCommand; /** * Gets a command to invoke the Paper tab of the Page Setup dialog window. @@ -8752,6 +11272,16 @@ interface RichEditCommands { * Value: A object that provides methods for executing the command and checking its state. */ delete: DeleteCommand; + /** + * Gets a command to remove the previous word. + * Value: A object that provides methods for executing the command and checking its state. + */ + removePrevWord: RemovePrevWordCommand; + /** + * Gets a command to remove the next word. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeNextWord: RemoveNextWordCommand; /** * Gets a command to move the cursor backwards and erase the character in that space. * Value: A object that provides methods for executing the command and checking its state. @@ -8798,7 +11328,7 @@ interface RichEditCommands { */ openTabsDialog: OpenTabsDialogCommand; /** - * Gets a command to change paragraph tab stops. + * Gets a command to change the tab stop value of a document or selected paragraphs * Value: A object that provides methods for executing the command and checking its state. */ changeTabs: ChangeTabsCommand; @@ -8828,7 +11358,7 @@ interface RichEditCommands { */ decrementNumberingIndent: DecrementNumberingIndentCommand; /** - * Gets a command to create an empty field in the document. + * Gets a command to create a field with an empty code and populate it with the selection (if it is not collapsed). * Value: A object that provides methods for executing the command and checking its state. */ createField: CreateFieldCommand; @@ -8868,17 +11398,17 @@ interface RichEditCommands { */ updateAllFields: UpdateAllFieldsCommand; /** - * Gets a command to insert a DATE field displaying the current date. + * Gets a command to insert and update a field with a DATE code. * Value: A object that provides methods for executing the command and checking its state. */ createDateField: CreateDateFieldCommand; /** - * Gets a command to insert a TIME field displaying the current time. + * Gets a command to replace the selection with a TIME field displaying the current time. * Value: A object that provides methods for executing the command and checking its state. */ createTimeField: CreateTimeFieldCommand; /** - * A command to insert a PAGE field displaying the current page number. + * A command to replace the selection with a PAGE field displaying the current page number. * Value: A object that provides methods for executing the command and checking its state. */ createPageField: CreatePageFieldCommand; @@ -8928,7 +11458,7 @@ interface RichEditCommands { */ mergeFieldDialog: MergeFieldDialogCommand; /** - * Gets a command to insert a MERGEFIELD field (with a data source column name) at the current position in the document. + * Gets a command to replace the selection with a MERGEFIELD (a data source column name is passed with a parameter). * Value: A object that provides methods for executing the command and checking its state. */ createMergeField: CreateMergeFieldCommand; @@ -8998,7 +11528,7 @@ interface RichEditCommands { */ closeHeaderFooter: CloseHeaderFooterCommand; /** - * Gets a command to insert a NUMPAGES field displaying the total number of pages. + * Gets a command to replace the selection with a NUMPAGES field displaying the total number of pages. * Value: A object that provides methods for executing the command and checking its state. */ createPageCountField: CreatePageCountFieldCommand; @@ -9022,6 +11552,10 @@ interface RichEditCommands { * Value: A object that provides methods for executing the command and checking its state. */ changeTableCellPreferredWidth: ChangeTableCellPreferredWidthCommand; + /** + * Gets a command to toggle inside borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ toggleTableCellInsideBorders: ToggleTableCellInsideBordersCommand; /** * Gets a command to change the selected table columns' preferred width. @@ -9273,7 +11807,87 @@ interface RichEditCommands { * Value: A object that provides methods for executing the command and checking its state. */ openSpellingDialog: OpenSpellingDialogCommand; + /** + * Gets a command to assign a shortcut to the specified client command. + * Value: A object that provides methods for executing the command and checking its state. + */ assignShortcut: AssignShortcutCommand; + /** + * Gets a command to invoke the Layout dialog window to customize the settings of a floating object. + * Value: A object that provides methods for executing the command and checking its state. + */ + openLayoutOptionsDialog: OpenLayoutOptionsDialogCommand; + /** + * Gets a command to insert a floating text box. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertFloatingTextBox: InsertFloatingTextBoxCommand; + /** + * Gets a command to modify a floating object's alignment position. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectAlignmentPosition: ChangeFloatingObjectAlignmentPositionCommand; + /** + * Gets a command to change a floating object's absolute position. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectAbsolutePosition: ChangeFloatingObjectAbsolutePositionCommand; + /** + * Gets a command to modify a floating object's relative position. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectRelativePosition: ChangeFloatingObjectRelativePositionCommand; + /** + * Gets a command to lock a floating object's anchor. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectLockAnchor: ChangeFloatingObjectLockAnchorCommand; + /** + * Gets a command to modify a floating object's text wrapping settings. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectTextWrapping: ChangeFloatingObjectTextWrappingCommand; + /** + * Gets a command to change a floating object's absolute size. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectAbsoluteSize: ChangeFloatingObjectAbsoluteSizeCommand; + /** + * Gets a command to modify a text box' relative size settings. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTextBoxRelativeSize: ChangeTextBoxRelativeSizeCommand; + /** + * Gets a command to rotate a floating object. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectRotation: ChangeFloatingObjectRotationCommand; + /** + * Gets a command to lock a floating object's aspect ratio. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectLockAspectRatio: ChangeFloatingObjectLockAspectRatioCommand; + /** + * Gets a command to modify a floating object's background fill color. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectFillColor: ChangeFloatingObjectFillColorCommand; + /** + * Gets a command to modify a floating object's outline color. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectOutlineColor: ChangeFloatingObjectOutlineColorCommand; + /** + * Gets a command to modify a floating object's outline width. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectOutlineWidth: ChangeFloatingObjectOutlineWidthCommand; + /** + * Gets a command to modify a text box' content margins. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTextBoxContentMargins: ChangeTextBoxContentMarginsCommand; + changeTextBoxResizeShapeToFitText: ChangeTextBoxResizeShapeToFitTextCommand; } /** * Serves as a base for objects that implement different client command functionalities. @@ -9303,7 +11917,7 @@ interface CommandWithBooleanStateBase extends CommandBase { */ interface SimpleCommandState { /** - * Gets a value indicating whether the command's UI element is enabled. + * Gets a value indicating whether the command's UI element is enabled (within the ribbon and context menu). * Value: true, if the command's related UI element is enabled; otherwise, false. */ enabled: boolean; @@ -9357,6 +11971,10 @@ interface RichEditDocument { * Value: An array of TableStyle objects storing information about table styles. */ tableStylesInfo: TableStyle[]; + /** + * Provides information about spell checking in the current document. + * Value: A object. + */ spellingInfo: SpellingInfo; } /** @@ -9379,6 +11997,10 @@ interface Paragraph { * Value: An integer value specifying the start position. */ start: number; + /** + * Gets the text buffer interval occupied by the current paragraph element. + * Value: An object specifying the interval settings. + */ interval: Interval; /** * Gets the name of the paragraph style applied to the current paragraph (see name). @@ -9391,7 +12013,7 @@ interface Paragraph { */ listIndex: number; /** - * Gets or sets the index of the list level applied to the current paragraph in the numbering list. + * Gets the index of the list level applied to the current paragraph in the numbering list. * Value: An integer that is the index of the list level of the current paragraph. */ listLevelIndex: number; @@ -9410,6 +12032,20 @@ interface Field { * Value: An integer value specifying the field length. */ length: number; + /** + * Gets the text buffer interval occupied by the field code element. + * Value: An object specifying the interval settings. + */ + codeInterval: Interval; + /** + * Gets the text buffer interval occupied by the field result element. + * Value: An object specifying the interval settings. + */ + resultInterval: Interval; + /** + * Gets the text buffer interval occupied by the current field element. + * Value: An object specifying the interval settings. + */ interval: Interval; /** * Gets or sets a URI to navigate to when the hyperlink (represented by the current field) is activated. @@ -9426,6 +12062,10 @@ interface Field { * Value: A string representing the bookmark's name. */ hyperlinkAnchor: string; + /** + * Gets a value specifying whether a field's code or result is dispalyed. + * Value: true, if the field code is displayed; false, if the field result is displayed. + */ showCode: boolean; } /** @@ -9442,6 +12082,10 @@ interface Bookmark { * Value: An integer value specifying the length of the bookmark. */ length: number; + /** + * Gets the text buffer interval occupied by the current bookmark element. + * Value: An object specifying the interval settings. + */ interval: Interval; /** * Gets the name of a bookmark in the document. @@ -9463,6 +12107,10 @@ interface Section { * Value: An integer value specifying the element length in characters. */ length: number; + /** + * Gets the text buffer interval occupied by the current section element. + * Value: An object specifying the interval settings. + */ interval: Interval; /** * Provides access to the section's headers. @@ -9490,15 +12138,50 @@ interface HeaderFooter { */ subDocument: SubDocument; } +/** + * Contains in-line picture settings. + */ interface InlinePictureInfo { + /** + * Gets the image identifier. + * Value: An integer value specifying the image identifier. + */ id: number; + /** + * Gets the image position. + * Value: An integer value specifying the image position. + */ position: number; + /** + * Gets the initial image width. + * Value: An integer value specifying the image width. + */ initialWidth: number; + /** + * Gets the initial image height. + * Value: An integer value specifying the image height. + */ initialHeight: number; + /** + * Gets the X-scaling factor of the inline image. + * Value: An integer value specifying the scaling factor for the X-axis. + */ scaleX: number; + /** + * Gets the Y-scaling factor of the inline image. + * Value: An integer value specifying the scaling factor for the Y-axis. + */ scaleY: number; + /** + * Gets the actual image width. + * Value: An integer value specifying the image width. + */ actualWidth: number; - actualHeigth: number; + /** + * Gets the actual image height. + * Value: An integer value specifying the image height. + */ + actualHeight: number; } declare enum HeaderFooterType { First=0, @@ -9506,6 +12189,26 @@ declare enum HeaderFooterType { Primary=1, Even=2 } +/** + * Contains the settings defining a file to save to. + */ +interface RichEditFileInfo { + /** + * Gets or sets the file's folder name. + * Value: A string value specifying the folder name. + */ + folderPath: string; + /** + * Gets or sets the file name. + * Value: A string value specifying the file name. + */ + fileName: string; + /** + * Gets or sets the file's document format. + * Value: A DocumentFormat enumeration value. + */ + documentFormat: any; +} declare enum DocumentFormat { Undefined=0, PlainText=1, @@ -9523,11 +12226,19 @@ declare enum DocumentFormat { */ interface RichEditSelection { /** - * Gets or sets an array of document interval in the selection. + * Gets or sets an array of document intervals in the selection. * Value: An array of Interval objects. */ intervals: Interval[]; + /** + * Gets or sets a value specifying whether the current selection is collapsed (and represents the cursor position). + * Value: true, if the selection is collapsed; otherwise, false. + */ collapsed: boolean; + /** + * Gets the maximum position of a document interval in the selection. + */ + getIntervalMaxPosition(): number; /** * Moves the cursor to the next line. */ @@ -9667,6 +12378,24 @@ interface RichEditSelection { * Selects the paragraph in which the cursor is located. */ selectParagraph(): void; + /** + * Moves the cursor to the next page break mark. + */ + goToStartNextPageCommand(): void; + /** + * Moves the cursor to the next page break mark and extends the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToStartNextPageCommand(extendSelection: boolean): void; + /** + * Moves the cursor to the previous page break mark. + */ + goToStartPrevPageCommand(): void; + /** + * Moves the cursor to the previous page break mark and extends the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToStartPrevPageCommand(extendSelection: boolean): void; /** * Selects the table cell in which the cursor is located. */ @@ -9699,17 +12428,17 @@ interface RichEditSelection { */ selectAll(): void; /** - * Moves the cursor to the main sub-document. + * Makes the main sub-document active and moves the cursor to its beginning. */ setMainSubDocumentAsActive(): void; /** - * Moves the cursor to the footer of the specified document page. - * @param pageIndex An integer value specifying the page index. + * Creates a footer sub-document (if it was not created before) and sets the footer as the active sub-document. Moves the cursor to the footer's start position. + * @param pageIndex An integer value specifying the active page's index. */ setFooterSubDocumentAsActiveByPageIndex(pageIndex: number): void; /** - * Moves the cursor to the header of the specified document page. - * @param pageIndex An integer value specifying the page index. + * Creates a header sub-document (if it was not created before) and sets the header as the active sub-document. Moves the cursor to the header's start position. + * @param pageIndex An integer value specifying the active page's index. */ setHeaderSubDocumentAsActiveByPageIndex(pageIndex: number): void; } @@ -9728,8 +12457,19 @@ interface Interval { */ length: number; } +/** + * Contains spell checking related settings. + */ interface SpellingInfo { + /** + * Gets a value specifying the spell checking state. + * Value: One of the enumeration values. + */ spellCheckerState: any; + /** + * Provides access to an array containing misspelled intervals. + * Value: An array of objects. + */ misspelledIntervals: MisspelledInterval[]; } declare enum SpellCheckerState { @@ -9737,12 +12477,39 @@ declare enum SpellCheckerState { InProgress=1, Done=2 } +/** + * Contains the settings defining a misspelled interval. + */ interface MisspelledInterval { + /** + * Gets the start position of the misspelled word in the interval. + * Value: An integer value specifying the misspelled word's start position. + */ start: number; + /** + * Gets the length of the misspelled interval. + * Value: An integer value specifying the misspelled interval's length. + */ length: number; + /** + * Gets the text buffer interval occupied by the current element. + * Value: An object specifying the interval settings. + */ interval: Interval; + /** + * Gets the spelling error type. + * Value: One of the enumeration values. + */ errorType: any; + /** + * Gets an erroneous word found during spell check. + * Value: A string that is the erroneous or misspelled word. + */ word: string; + /** + * Gets a list of suggested words to replace the misspelled word. + * Value: A string array containing suggested words. + */ suggestions: string[]; } declare enum SpellingErrorType { @@ -9823,7 +12590,15 @@ interface TableStyle extends StyleBase { * Exposes the settings providing the information about the essential document functionality. */ interface SubDocument { + /** + * Gets the sub-document identifier. + * Value: An integer value specifying the sub-document identifier. + */ id: number; + /** + * Gets a value specifying the sub-document type. + * Value: One of the enumeration values. + */ type: any; /** * Provides information about paragraphs contained in the document. @@ -9845,6 +12620,10 @@ interface SubDocument { * Value: An array of Bookmark objects storing information about document bookmarks. */ bookmarksInfo: Bookmark[]; + /** + * Provides access to an array of objects containing in-line picture settings. + * Value: An array of objects. + */ inlinePicturesInfo: InlinePictureInfo[]; /** * Gets the document's textual representation. @@ -9877,6 +12656,10 @@ interface Table { * Value: A integer value specifying the character length of the table. */ length: number; + /** + * Gets the text buffer interval occupied by the current table element. + * Value: An object specifying the interval settings. + */ interval: Interval; /** * Provides access to a collection of table rows. @@ -9903,6 +12686,10 @@ interface TableRow { * Value: An integer value specifying the element length in characters. */ length: number; + /** + * Gets the text buffer interval occupied by the current table row element. + * Value: An object specifying the interval settings. + */ interval: Interval; /** * Provides information about the table row's cells. @@ -9924,18 +12711,65 @@ interface TableCell { * Value: An integer value specifying the element length in characters. */ length: number; + /** + * Gets the text buffer interval occupied by the current table cell element. + * Value: An object specifying the interval settings. + */ interval: Interval; } +/** + * Contains the method to convert different units of measurement. + */ interface RichEditUnitConverter { + /** + * Converts a measurement from pixels to twips. + * @param value The pixels value to be converted. + */ pixelsToTwips(value: number): number; + /** + * Converts a measurement from inches to twips. + * @param value The inches value (floating) to be converted. + */ inchesToTwips(value: number): number; + /** + * Converts a measurement from points to twips. + * @param value The points value to be converted. + */ pointsToTwips(value: number): number; + /** + * Converts a value in centimeters to twips. + * @param value A floating value specifying the value in centimeters to convert. + */ centimetersToTwips(value: number): number; + /** + * Converts a measurement from twips to centimeters. + * @param value The twips value to be converted. + */ twipsToCentimeters(value: number): number; + /** + * Converts a measurement from pixels to centimeters. + * @param value The pixels value to be converted. + */ pixelsToCentimeters(value: number): number; + /** + * Converts a measurement from twips to inches. + * @param value The twips value to be converted. + */ twipsToInches(value: number): number; + /** + * Converts a measurement from pixels to inches. + * @param value The pixels value to be converted. + */ pixelsToInches(value: number): number; + /** + * Converts a measurement from pixels to points. + * @param value The pixels value to be converted. + */ pixelsToPoints(value: number): number; + /** + * Converts a measurement from twips to points. + * @param value The twips value to be converted. + */ twipsToPoints(value: number): number; } /** @@ -9953,9 +12787,9 @@ interface OpenInsertBookmarkDialogCommand extends CommandWithSimpleStateBase { interface InsertBookmarkCommand extends CommandWithSimpleStateBase { /** * Executes the InsertBookmarkCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param name A string value specifying name of creating bookmark. - * @param start An integer value specifying the start position of bookmark's range. - * @param length An integer value specifying the length of bookmark's range. + * @param name A string value specifying a name of the created bookmark. + * @param start An integer value specifying the start position of the bookmark's range. + * @param length An integer value specifying the length of the bookmark's range. */ execute(name: string, start: number, length: number): boolean; } @@ -9965,7 +12799,7 @@ interface InsertBookmarkCommand extends CommandWithSimpleStateBase { interface DeleteBookmarkCommand extends CommandWithSimpleStateBase { /** * Executes the DeleteBookmarkCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param name A string value specifying name of the deleted bookmark. + * @param name A string value specifying a name of the deleted bookmark. */ execute(name: string): boolean; } @@ -10097,9 +12931,19 @@ interface GoToDataRecordCommand extends CommandBase { * @param activeRecordIndex An integer value specifying index of the next data record. */ execute(activeRecordIndex: number): boolean; + /** + * Gets information about the command state. + */ getState(): any; } +/** + * Contains the settings defining a data record. + */ interface DataRecordOptions { + /** + * Gets or sets the index of the active data record. + * Value: An integer value specifying the data record index. + */ activeRecordIndex: number; recordCount: number; } @@ -10190,12 +13034,23 @@ interface MailMergeAndDownloadCommand extends CommandBase { * @param fileExtension A string value specifying the file extension of the resulting document. */ execute(fileExtension: string): boolean; + /** + * Executes the MailMergeAndDownloadCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param documentFormat One of the DocumentFormat enumeration values. + */ + execute(documentFormat: any): boolean; /** * Executes the MailMergeAndDownloadCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. * @param fileExtension A string value specifying the file extension of the resulting document. * @param settings A MailMergeSettings object containing settings to set up mail merge operations. */ execute(fileExtension: string, settings: MailMergeSettings): boolean; + /** + * Executes the MailMergeAndDownloadCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param documentFormat One of the DocumentFormat enumeration values. + * @param settings A MailMergeSettings object specifying the mail merge settings. + */ + execute(documentFormat: any, settings: MailMergeSettings): boolean; /** * Gets information about the command state. */ @@ -10212,10 +13067,10 @@ interface MailMergeAndSaveAsCommand extends CommandBase { execute(filePath: string): boolean; /** * Executes the MailMergeAndSaveAsCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param filePath A string value specifying path to the saving file. - * @param settings A MailMergeSettings object specifying hyperlink settings. + * @param fileInfo A RichEditFileInfo object specifying a file to save to. + * @param settings A MailMergeSettings object specifying the mail merge settings. */ - execute(filePath: string, settings: MailMergeSettings): boolean; + execute(fileInfo: RichEditFileInfo, settings: MailMergeSettings): boolean; /** * Gets information about the command state. */ @@ -10311,6 +13166,11 @@ interface FileSaveAsCommand extends CommandWithSimpleStateBase { * @param path A string value specifying path to the saving file. */ execute(path: string): boolean; + /** + * Executes the FileSaveAsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fileInfo A object specifying a file to save to. + */ + execute(fileInfo: RichEditFileInfo): boolean; } /** * A command to download the document file, specifying its extension. @@ -10321,6 +13181,20 @@ interface FileDownloadCommand extends CommandWithSimpleStateBase { * @param fileExtension A string value specifying the extension of the downloading file. */ execute(fileExtension: string): boolean; + /** + * Executes the FileDownloadCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param documentFormat A DocumentFormat enumeration value. + */ + execute(documentFormat: any): boolean; +} +/** + * A command to open the file's Save As dialog. + */ +interface FileSaveAsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileSaveAsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; } /** * A command to invoke a browser-specific Print dialog allowing one to print the current document. @@ -10384,8 +13258,8 @@ interface HideFindResultsCommand extends CommandWithSimpleStateBase { interface ReplaceAllCommand extends CommandWithSimpleStateBase { /** * Executes the ReplaceAllCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param text A string value specifying text to replace. - * @param replaceText A string value specifying replacing text. + * @param text A string value specifying a text to replace. + * @param replaceText A string value specifying the replacing text. * @param matchCase true, to perform a case-sensitive search; otherwise, false. */ execute(text: string, replaceText: string, matchCase: boolean): boolean; @@ -10402,6 +13276,422 @@ interface ReplaceNextCommand extends CommandWithSimpleStateBase { */ execute(text: string, replaceText: string, matchCase: boolean): boolean; } +interface OpenLayoutOptionsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenLayoutOptionsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a floating text box. + */ +interface InsertFloatingTextBoxCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertFloatingTextBoxCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to lock a floating object's anchor. + */ +interface ChangeFloatingObjectLockAnchorCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectLockAnchorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param lockAnchor true to lock the anchor; false, otherwise. + */ + execute(lockAnchor: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's alignment position. + */ +interface ChangeFloatingObjectAlignmentPositionCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectAlignmentPositionCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A FloatingObjectAlignmentPositionSettings object specifying alignment position settings. + */ + execute(settings: FloatingObjectAlignmentPositionSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change a floating object's absolute position. + */ +interface ChangeFloatingObjectAbsolutePositionCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectAbsolutePositionCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A FloatingObjectAbsolutePositionSettings object specifying page margin settings. + */ + execute(settings: FloatingObjectAbsolutePositionSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's relative position. + */ +interface ChangeFloatingObjectRelativePositionCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectRelativePositionCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A FloatingObjectRelativePositionSettings object specifying relative positioin settings. + */ + execute(settings: FloatingObjectRelativePositionSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's text wrapping settings. + */ +interface ChangeFloatingObjectTextWrappingCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectTextWrappingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A FloatingObjectTextWrappingSettings object specifying text wrapping settings. + */ + execute(settings: FloatingObjectTextWrappingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change a floating object's absolute size. + */ +interface ChangeFloatingObjectAbsoluteSizeCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectAbsoluteSizeCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A FloatingObjectAbsoluteSizeSettings object specifying absolute size settings. + */ + execute(settings: FloatingObjectAbsoluteSizeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a text box' relative size settings. + */ +interface ChangeTextBoxRelativeSizeCommand extends CommandBase { + /** + * Executes the ChangeTextBoxRelativeSizeCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TextBoxRelativeSizeSettings object specifying relative size settings. + */ + execute(settings: TextBoxRelativeSizeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to rotate a floating object. + */ +interface ChangeFloatingObjectRotationCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectRotationCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param rotation An integer value specifying the angle of rotation. + */ + execute(rotation: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to lock a floating object's aspect ratio. + */ +interface ChangeFloatingObjectLockAspectRatioCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectLockAspectRatioCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param lockAspectRatio true to lock the aspect ratio and maintain the proportions; otherwise, false. + */ + execute(lockAspectRatio: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's background fill color. + */ +interface ChangeFloatingObjectFillColorCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectFillColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string value specifying the color. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's outline color. + */ +interface ChangeFloatingObjectOutlineColorCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectOutlineColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string value specifying the color. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's outline width. + */ +interface ChangeFloatingObjectOutlineWidthCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectOutlineWidthCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param width An integer value specifying the outline width. + */ + execute(width: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a text box' content margins. + */ +interface ChangeTextBoxContentMarginsCommand extends CommandBase { + /** + * Executes the ChangeTextBoxContentMarginsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A Margins object specifying margin settings. + */ + execute(settings: Margins): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +interface ChangeTextBoxResizeShapeToFitTextCommand extends CommandBase { + execute(resizeShapeToFitText: boolean): boolean; + getState(): any; +} +/** + * Contains alignment position settings for floating objects. + */ +interface FloatingObjectAlignmentPositionSettings { + /** + * Gets or sets a value specifying how a floating object is horizontally aligned relative to an element specified by the horizontalPositionAlignment property. + * Value: One of the enumeration values. + */ + horizontalPositionAlignment: any; + /** + * Gets or sets a value specifying to what element the horizontal alignment of a floating object is relative. + * Value: One of the enumeration values. + */ + horizontalPositionType: any; + /** + * Gets or sets a value specifying how a floating object is vertically aligned relative to an element specified by the verticalPositionAlignment property. + * Value: One of the enumeration values. + */ + verticalPositionAlignment: any; + /** + * Gets or sets a value specifying to what element the vertical alignment of a floating object is relative. + * Value: One of the enumeration values. + */ + verticalPositionType: any; +} +/** + * Contains page margin settings. + */ +interface FloatingObjectAbsolutePositionSettings { + /** + * Gets or sets a floating object's horizontal position relative to an element specified by the horizontalPositionType property. + * Value: An integer value specifying the position. + */ + horizontalAbsolutePosition: number; + /** + * Gets or sets a value specifying to what element the horizontal position of a floating object is relative. + * Value: One of the enumeration values. + */ + horizontalPositionType: any; + /** + * Gets or sets a floating object's vertical position relative to an element specified by the verticalPositionType property. + * Value: An integer value specifying the position. + */ + verticalAbsolutePosition: number; + /** + * Gets or sets a value specifying to what element the vertical position of a floating object is relative. + * Value: One of the enumeration values. + */ + verticalPositionType: any; +} +/** + * Contains relative position settings for floating objects. + */ +interface FloatingObjectRelativePositionSettings { + /** + * Gets or sets the horizontal distance between the edge of a floating object and the element specified by the horizontalRelativePosition property + * Value: An integer value specifying the horizontal position. + */ + horizontalRelativePosition: number; + /** + * Gets or sets a value specifying to what element the horizontal position of a floating object is relative. + * Value: One of the enumeration values. + */ + horizontalPositionType: any; + /** + * Gets or sets the horizontal distance between the edge of a floating object and the element specified by the verticalRelativePosition property + * Value: An integer value specifying the vertical position. + */ + verticalRelativePosition: number; + /** + * Gets or sets a value specifying to what element the vertical position of a floating object is relative. + * Value: One of the enumeration values. + */ + verticalPositionType: any; +} +/** + * Contains text wrapping settings for floating objects. + */ +interface FloatingObjectTextWrappingSettings { + /** + * Gets or sets a value specifying how text is wrapped around a floating object. + * Value: One of the enumeration values. + */ + floatingObjectTextWrapType: any; + /** + * Gets or sets a value specifying how text can wrap around a floating object's left and right sides. + * Value: One of the enumeration values. + */ + floatingObjectTextWrapSide: any; + /** + * Gets or sets the left offset of text wrapping. + * Value: An integer value specifying the left offset. + */ + leftDistance: number; + /** + * Gets or sets the right offset of text wrapping. + * Value: An integer value specifying the right offset. + */ + rightDistance: number; + /** + * Gets or sets the top offset of text wrapping. + * Value: An integer value specifying the top offset. + */ + topDistance: number; + /** + * Gets or sets the bottom offset of text wrapping. + * Value: An integer value specifying the bottom offset. + */ + bottomDistance: number; +} +/** + * Contains absolute size settings for floating objects. + */ +interface FloatingObjectAbsoluteSizeSettings { + /** + * Gets or sets a floating object's absolute width. + * Value: An integer value specifying the width. + */ + absoluteWidth: number; + /** + * Gets or sets a floating object's absolute height. + * Value: An integer value specifying the height. + */ + absoluteHeight: number; +} +/** + * Contains relative size settings for floating objects. + */ +interface TextBoxRelativeSizeSettings { + /** + * Gets or sets the percentage specifying a floating object's width relative to the element defined by the relativeWidthType property. + * Value: An integer value specifying the relative width, as a percentage. + */ + relativeWidth: number; + /** + * Gets or sets a value specifying to what element the floating object width is relative. + * Value: One of the enumeration values. + */ + relativeWidthType: any; + /** + * Gets or sets the percentage specifying a floating object's height relative to the element defined by the relativeHeightType property. + * Value: An integer value specifying the relative height, as a percentage. + */ + relativeHeight: number; + /** + * Gets or sets a value specifying to what element the floating object height is relative. + * Value: One of the enumeration values. + */ + relativeHeightType: any; +} +declare enum FloatingObjectRelativeWidthType { + Margin=0, + Page=1, + LeftMargin=2, + RightMargin=3, + InsideMargin=4, + OutsideMargin=5 +} +declare enum FloatingObjectRelativeHeightType { + Margin=0, + Page=1, + TopMargin=2, + BottomMargin=3, + InsideMargin=4, + OutsideMargin=5 +} +declare enum FloatingObjectTextWrapType { + None=0, + TopAndBottom=1, + Tight=2, + Through=3, + Square=4 +} +declare enum FloatingObjectTextWrapSide { + Both=0, + Left=1, + Right=2, + Largest=3 +} +declare enum FloatingObjectHorizontalPositionType { + Page=0, + Character=1, + Column=2, + Margin=3, + LeftMargin=4, + RightMargin=5, + InsideMargin=6, + OutsideMargin=7 +} +declare enum FloatingObjectHorizontalPositionAlignment { + None=0, + Left=1, + Center=2, + Right=3, + Inside=4, + Outside=5 +} +declare enum FloatingObjectVerticalPositionType { + Page=0, + Line=1, + Paragraph=2, + Margin=3, + TopMargin=4, + BottomMargin=5, + InsideMargin=6, + OutsideMargin=7 +} +declare enum FloatingObjectVerticalPositionAlignment { + None=0, + Top=1, + Center=2, + Bottom=3, + Inside=4, + Outside=5 +} /** * A command to cancel changes caused by the previous command. */ @@ -10658,7 +13948,7 @@ interface InsertNumerationCommand extends CommandWithSimpleStateBase { execute(abstractNumberingListIndex: number): boolean; /** * Executes the InsertNumerationCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param numberingListIndex An integer value specifying index of numbering list. + * @param numberingListIndex An integer value specifying an index of the numbering list. * @param isAbstractNumberingList true, to insert an abstract numbering list; otherwise, false. */ execute(numberingListIndex: number, isAbstractNumberingList: boolean): boolean; @@ -10696,6 +13986,10 @@ interface ListLevelSettings { * Value: One of the values. */ alignment: any; + /** + * Gets or sets the character inserted after the number for a numbered list item. + * Value: A string value that is the trailing character for the list level. + */ separator: string; /** * Gets or sets the left indent for text within the current list level's paragraph. @@ -10840,7 +14134,7 @@ interface InsertSymbolCommand extends CommandWithSimpleStateBase { /** * Executes the InsertSymbolCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. * @param symbol A string value specifying symbols to insert. - * @param fontName A string value specifying font of symbols to insert. + * @param fontName A string value specifying the font of symbols to insert. */ execute(symbol: string, fontName: string): boolean; } @@ -10859,7 +14153,7 @@ interface InsertParagraphCommand extends CommandWithSimpleStateBase { interface InsertTextCommand extends CommandWithSimpleStateBase { /** * Executes the InsertTextCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param text A string value specifying text to insert. + * @param text A string value specifying a text to insert. */ execute(text: string): boolean; } @@ -10872,6 +14166,24 @@ interface DeleteCommand extends CommandWithSimpleStateBase { */ execute(): boolean; } +/** + * A command to remove the previous word. + */ +interface RemovePrevWordCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemovePrevWordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to remove the next word. + */ +interface RemoveNextWordCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveNextWordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} /** * A command to move the cursor backwards and erase the character in that space. */ @@ -10934,7 +14246,15 @@ interface InsertTabCommand extends CommandWithSimpleStateBase { * Defines the scaling settings. */ interface Scale { + /** + * Gets or sets the image's y-scale factor as a percent. + * Value: An integer value that is the y-scale factor as a percent. + */ x: number; + /** + * Gets or sets the image's x-scale factor as a percent. + * Value: An integer value that is the x-scale factor as a percent. + */ y: number; } /** @@ -10973,8 +14293,8 @@ interface OpenPageMarginsDialogCommand extends CommandWithSimpleStateBase { */ interface ChangePageOrientationCommand extends CommandBase { /** - * - * @param isPortrait + * Executes the ChangePageOrientationCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param isPortrait One of the Orientation enumeration values. */ execute(isPortrait: any): boolean; /** @@ -11048,8 +14368,8 @@ interface OpenSectionColumnsDialogCommand extends CommandWithSimpleStateBase { */ interface ChangeSectionColumnsCommand extends CommandBase { /** - * - * @param columns + * Executes the ChangeSectionColumnsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param columns An array of SectionColumn objects. */ execute(columns: SectionColumn[]): boolean; /** @@ -11063,7 +14383,7 @@ interface ChangeSectionColumnsCommand extends CommandBase { interface ChangePageColorCommand extends CommandBase { /** * Executes the ChangePageColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param color A string specifying background color of the page. May be specified as color name or hex color value. + * @param color A string specifying a background color the page. May be specified as a color name or a hex color value. */ execute(color: string): boolean; /** @@ -11144,7 +14464,7 @@ interface SetDifferentFirstPageHeaderFooterCommand extends CommandWithBooleanSta execute(): boolean; /** * Executes the SetDifferentFirstPageHeaderFooterCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param differentFirstPage true to apply different text for first page's header and footer, false to remove difference. + * @param differentFirstPage true to apply a different text for the first page's header and footer, false to remove the difference. */ execute(differentFirstPage: boolean): boolean; } @@ -11158,7 +14478,7 @@ interface SetDifferentOddAndEvenPagesHeaderFooterCommand extends CommandWithBool execute(): boolean; /** * Executes the SetDifferentOddAndEvenPagesHeaderFooterCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param differentOddAndEvenPages true to apply different text for odd and even pages' header and footer, false to remove difference. + * @param differentOddAndEvenPages true to apply a different text for the header and footer of the odd and even pages , false to remove the difference. */ execute(differentOddAndEvenPages: boolean): boolean; } @@ -11367,7 +14687,7 @@ interface RemoveSpacingAfterParagraphCommand extends CommandWithSimpleStateBase interface ChangeParagraphBackColorCommand extends CommandBase { /** * Executes the ChangeParagraphBackColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param color A string specifying highlighting color of the paragraphs in a selected range. May be specified as color name or hex color value. + * @param color A string specifying a background color of the paragraphs in a selected range. May be specified as a color name or a hex color value. */ execute(color: string): boolean; /** @@ -11588,10 +14908,24 @@ declare enum ParagraphFirstLineIndent { Indented=1, Hanging=2 } +/** + * A command to assign a shortcut to the specified client command. + */ interface AssignShortcutCommand extends CommandWithSimpleStateBase { + /** + * Executes the AssignShortcutCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param keyCode An integer value specifying the code uniquely identifying the key combination. + * @param callback A callback function to execute on pressing the shortcut. + */ execute(keyCode: number, callback: (arg1: string) => void): boolean; } +/** + * A command to invoke the Spelling dialog window. + */ interface OpenSpellingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenSpellingDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ execute(): boolean; } /** @@ -11609,8 +14943,8 @@ interface OpenInsertTableDialogCommand extends CommandWithSimpleStateBase { interface InsertTableCommand extends CommandWithSimpleStateBase { /** * Executes the InsertTableCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param columnCount An integer value specifying number of columns in a generated table. - * @param rowCount An integer value specifying number of rows in a generated table. + * @param columnCount An integer value specifying a number of columns in a generated table. + * @param rowCount An integer value specifying a number of rows in a generated table. */ execute(columnCount: number, rowCount: number): boolean; } @@ -11825,9 +15159,9 @@ interface SplitTableCellsDialogCommand extends CommandWithSimpleStateBase { interface SplitTableCellsCommand extends CommandWithSimpleStateBase { /** * Executes the SplitTableCellsCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param rowCount An integer value specifying number of rows in the splitted table cells. - * @param columnCount An integer value specifying number of columns in the splitted table cells. - * @param mergeBeforeSplit true to merge the selected cells before splitting; otherwise, false. + * @param rowCount An integer value specifying a number of rows in the split table cells. + * @param columnCount An integer value specifying a number of columns in the split table cells. + * @param mergeBeforeSplit true to merge the selected cells before the splitting; otherwise, false. */ execute(rowCount: number, columnCount: number, mergeBeforeSplit: boolean): boolean; } @@ -11991,7 +15325,13 @@ interface ToggleTableCellBottomBorderCommand extends CommandWithBooleanStateBase */ execute(): boolean; } +/** + * A command to toggle left borders for selected cells on/off. + */ interface ToggleTableCellLeftBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellLeftBorderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ execute(): boolean; } /** @@ -12082,7 +15422,7 @@ interface ChangeTableBorderRepositoryItemCommand extends CommandBase { interface ChangeTableCellShadingCommand extends CommandBase { /** * Executes the ChangeTableCellShadingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param color A string specifying color of the selected cells' shading. May be specified as color name or hex color value. + * @param color A string specifying the color of the selected cells' shading. May be specified as a color name or a hex color value. */ execute(color: string): boolean; /** @@ -12522,6 +15862,10 @@ interface TableHeightUnit { * Value: An integer value specifying the table height. */ value: number; + /** + * Gets or sets the unit type for the table height. + * Value: One of the enumeration values. + */ type: any; } declare enum TableHeightUnitType { @@ -12549,7 +15893,7 @@ declare enum TableWidthUnitType { interface ChangeFontNameCommand extends CommandBase { /** * Executes the ChangeFontNameCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param fontName A string specifying font name. + * @param fontName A string specifying the font name. */ execute(fontName: string): boolean; /** @@ -12563,7 +15907,7 @@ interface ChangeFontNameCommand extends CommandBase { interface ChangeFontSizeCommand extends CommandBase { /** * Executes the ChangeFontSizeCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param fontSize An integer number specifying font size. + * @param fontSize An integer number specifying the font size. */ execute(fontSize: number): boolean; /** @@ -12715,7 +16059,7 @@ interface ChangeFontSubscriptCommand extends CommandWithBooleanStateBase { interface ChangeFontForeColorCommand extends CommandBase { /** * Executes the ChangeFontForeColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param color A string specifying font color. May be specified as color name or hex color value. + * @param color A string specifying the font color. May be specified as a color name or a hex color value. */ execute(color: string): boolean; /** @@ -12729,7 +16073,7 @@ interface ChangeFontForeColorCommand extends CommandBase { interface ChangeFontBackColorCommand extends CommandBase { /** * Executes the ChangeFontBackColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param color A string specifying highlighting color. May be specified as color name or hex color value. + * @param color A string specifying the background font color. May be specified as a color name or a hex color value. */ execute(color: string): boolean; /** @@ -12757,8 +16101,8 @@ interface ChangeStyleCommand extends CommandBase { execute(style: StyleBase): boolean; /** * Executes the ChangeStyleCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param styleName A string specifying the name of applying style. - * @param isParagraphStyle true to apply style to paragraph, false to apply style to character. + * @param styleName A string specifying the applying style's name. + * @param isParagraphStyle true to apply the style to a paragraph, false to apply the style to a character. */ execute(styleName: string, isParagraphStyle: boolean): boolean; /** @@ -12851,6 +16195,10 @@ interface FontFormattingSettings { * Value: true, if characters are italicized; otherwise, false. */ italic: boolean; + /** + * Gets or sets a value specifying whether the strikeout formatting is applied to a character(s). + * Value: true if the strikeout formatting is applied; otherwise, false. + */ strikeout: boolean; /** * Gets or sets whether only word characters are underlined. @@ -12902,7 +16250,7 @@ interface SetFullscreenCommand extends CommandWithBooleanStateBase { execute(): boolean; /** * Executes the SetFullscreenCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param fullscreen true to apply fullscreen mode, false to remove fullscreen mode. + * @param fullscreen true to apply the fullscreen mode, false to disable the fullscreen mode. */ execute(fullscreen: boolean): boolean; } @@ -13239,9 +16587,9 @@ interface ASPxClientRecurrenceInfo { GetPeriodicity(): number; /** * Sets the ordinal number of a day within a defined month. - * @param dayNubmer A positive integer value that specifies the day number within a month. + * @param dayNumber A positive integer value that specifies the day number within a month. */ - SetDayNumber(dayNubmer: number): void; + SetDayNumber(dayNumber: number): void; /** * Gets the ordinal number of a day within a defined month. */ @@ -13547,7 +16895,7 @@ interface DefaultRecurrenceRuleValuesAccessor { */ GetMonth(): number; /** - * Gets the days of the week to which a weekly recurrent appointment is scheduled. + * Gets the days of the week on which a weekly recurrent appointment is scheduled. */ GetWeekDays(): ASPxClientWeekDays; /** @@ -13577,7 +16925,7 @@ interface WeeklyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAcce */ GetPeriodicity(): number; /** - * Gets the days of the week to which a weekly recurrent appointment is scheduled. + * Gets the days of the week on which a weekly recurrent appointment is scheduled. */ GetWeekDays(): ASPxClientWeekDays; } @@ -13586,7 +16934,7 @@ interface WeeklyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAcce */ interface MonthlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { /** - * Gets the number of the month's day in which the appointment is scheduled. + * Gets the day of the month on which the appointment is scheduled. */ GetDayNumber(): number; /** @@ -13594,7 +16942,7 @@ interface MonthlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAcc */ GetPeriodicity(): number; /** - * Gets the days of the week to which a monthly recurrent appointment is scheduled. + * Gets the days of the week on which a monthly recurrent appointment is scheduled. */ GetWeekDays(): ASPxClientWeekDays; /** @@ -13607,7 +16955,7 @@ interface MonthlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAcc */ interface YearlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { /** - * Gets the number of the month's day in which the appointment is scheduled. + * Gets the day of the month on which the appointment is scheduled. */ GetDayNumber(): number; /** @@ -13615,7 +16963,7 @@ interface YearlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAcce */ GetMonth(): number; /** - * Gets the days of the week to which a yearly recurrent appointment is scheduled. + * Gets the days of the week on which a yearly recurrent appointment is scheduled. */ GetWeekDays(): ASPxClientWeekDays; /** @@ -13789,6 +17137,10 @@ interface ASPxClientScheduler extends ASPxClientControl { * Client-side event. Occurs after the active view of the ASPxScheduler has been changed. */ ActiveViewChanged: ASPxClientEvent>; + /** + * Occurs when an end-user presses a keyboard shortcut. + */ + Shortcut: ASPxClientEvent>; /** * Occurs when the end-user clicks an appointment. */ @@ -13797,6 +17149,14 @@ interface ASPxClientScheduler extends ASPxClientControl { * Occurs when the end-user double clicks on an appointment. */ AppointmentDoubleClick: ASPxClientEvent>; + /** + * Occurs when an end-user clicks a time cell. + */ + CellClick: ASPxClientEvent>; + /** + * Occurs when and end-user double-clicks a time cell. + */ + CellDoubleClick: ASPxClientEvent>; /** * Occurs on the client side when the user selects an appointment. */ @@ -13825,6 +17185,14 @@ interface ASPxClientScheduler extends ASPxClientControl { * Client-side event that occurs after an appointment has been dragged and dropped. */ AppointmentDrop: ASPxClientEvent>; + /** + * A client-side event that occurs when an appointment is being dragged. + */ + AppointmentDrag: ASPxClientEvent>; + /** + * A client-side event that occurs when an appointment is being resized. + */ + AppointmentResizing: ASPxClientEvent>; /** * Client-side event that occurs when an appointment is resized. */ @@ -13901,6 +17269,10 @@ interface ASPxClientScheduler extends ASPxClientControl { * Client-side function that returns the ResourceId of selected time cell's resource. */ GetSelectedResource(): string; + /** + * Gets a collection of visible appointments. + */ + GetVisibleAppointments(): ASPxClientAppointment[]; /** * Client-side function that returns an appointment with the specified ID. * @param id An appointment's identifier. @@ -14102,6 +17474,11 @@ interface ASPxSchedulerViewType { * Value: A string "FullWeek", indicating the FullWeekView. */ FullWeek: string; + /** + * Gets a string representation equivalent to the Agenda enumeration for use in client scripts. + * Value: A string "Agenda", indicating the AgendaView. + */ + Agenda: string; } /** * Represents a client-side equivalent of the SchedulerGroupType enumeration. @@ -14220,6 +17597,37 @@ interface AppointmentsSelectionEventArgs extends ASPxClientEventArgs { */ appointmentIds: string[]; } +/** + * A method that will handle the Shortcut event. + */ +interface ShortcutEventHandler { + /** + * A method that will handle the Shortcut event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A ShortcutEventArgs object that contains event data. + */ + (source: S, e: ShortcutEventArgs): void; +} +/** + * Provides data for the client-side Shortcut event. + */ +interface ShortcutEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of a command associated with the keyboard shortcut. + * Value: A string containing a command name. + */ + commandName: string; + /** + * Gets an object containing information about a keyboard shortcut event. + * Value: An object containing event data. + */ + htmlEvent: Object; + /** + * Gets or sets whether an event is handled, and that default actions are not required. + * Value: true, if no default processing is required; otherwise, false. + */ + handled: boolean; +} /** * A method that will handle the ActiveViewChanging event. */ @@ -14313,21 +17721,55 @@ interface MenuItemClickedEventArgs extends ASPxClientEventArgs { */ handled: boolean; } -interface AppointmentDropEventHandler { +/** + * A method that will handle the AppointmentDrag event. + */ +interface AppointmentDragEventHandler { /** - * A method that will handle the AppointmentDrop event. - * @param source The event sender (typically an ASPxClientScheduler control). + * A method that will handle the AppointmentDrag event. + * @param source The event sender (typically an ASPxClientScheduler object). * @param e A ASPxClientAppointmentDragEventArgs object that contains event data. */ (source: S, e: ASPxClientAppointmentDragEventArgs): void; } /** - * Provides data for the AppointmentDrop event. + * Provides data for the AppointmentDrag event. */ interface ASPxClientAppointmentDragEventArgs extends ASPxClientEventArgs { /** - * Gets or sets whether default event processing is required. - * Value: true to process an event using only custom code; otherwise, false. + * Specifies whether or not appointments can be dropped into the intervals over which they are currently dragged. + * Value: true to allow dropping appointments; otherwise, false. + */ + allow: boolean; + /** + * Gets a mouse event object related to the current drag operation. + * Value: An object providing event properties specific to mouse events. + */ + mouseEvent: Object; + /** + * Provides information about dragged appointments. + * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dragged appointments. + */ + dragInformation: ASPxClientAppointmentDragInfo[]; +} +/** + * A method that will handle the AppointmentDrop event. + */ +interface AppointmentDropEventHandler { + /** + * A method that will handle the AppointmentDrop event. + * @param source The event sender (typically an ASPxClientScheduler object). + * @param e A ASPxClientAppointmentDropEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentDropEventArgs): void; +} +/** + * Provides data for the AppointmentDrop event. + */ +interface ASPxClientAppointmentDropEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value that specifies whether the event is handled, and the default processing is not required. + * Value: true, if if the event is completely handled by custom code and no default processing is required; otherwise, false. */ handled: boolean; /** @@ -14336,8 +17778,8 @@ interface ASPxClientAppointmentDragEventArgs extends ASPxClientEventArgs { */ operation: ASPxClientAppointmentOperation; /** - * Provides information about dragged appointments. - * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dragged appointments. + * Provides information about dropped appointments. + * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dropped appointments. */ dragInformation: ASPxClientAppointmentDragInfo[]; } @@ -14379,6 +17821,47 @@ interface ASPxClientAppointmentResizeEventArgs extends ASPxClientEventArgs { */ newInterval: ASPxClientTimeInterval; } +/** + * A method that will handle the AppointmentResizing event. + */ +interface AppointmentResizingEventHandler { + /** + * A method that will handle the AppointmentResizing event. + * @param source The event sender (typically an ASPxClientScheduler object). + * @param e A ASPxClientAppointmentResizingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentResizingEventArgs): void; +} +/** + * Provides data for the AppointmentResizing event. + */ +interface ASPxClientAppointmentResizingEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not an appointment can be resized to the new time interval. + * Value: true to allow resizing the appointment; otherwise, false. + */ + allow: boolean; + /** + * Gets a mouse event object related to the current appointment resizing operation. + * Value: An object providing event properties specific to mouse events. + */ + mouseEvent: Object; + /** + * Gets the resized appointment's identifier. + * Value: A string containing an appointment identifier. + */ + appointmentId: string; + /** + * Gets the appointment's interval before resizing. + * Value: An object representing the interval assigned to the appointment. + */ + oldInterval: ASPxClientTimeInterval; + /** + * Gets the appointment's interval after resizing. + * Value: An object representing the interval assigned to the appointment. + */ + newInterval: ASPxClientTimeInterval; +} /** * Stores information about an appointment drag operation. */ @@ -14409,6 +17892,37 @@ interface ASPxClientAppointmentDragInfo { */ newResources: string[]; } +/** + * A method that will handle the CellDoubleClick events. + */ +interface CellClickEventHandler { + /** + * A method that will handle the CellClick event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A CellClickEventArgs object that contains event data. + */ + (source: S, e: CellClickEventArgs): void; +} +/** + * Provides data for the CellDoubleClick events. + */ +interface CellClickEventArgs extends ASPxClientEventArgs { + /** + * Provides access to an object containing information about an HTML element representing the clicked time cell. + * Value: An object containing information about an HTML element. + */ + htmlElement: Object; + /** + * Provides access to a time interval occupied by the clicked time cell. + * Value: An object. + */ + interval: ASPxClientTimeInterval; + /** + * Gets the name of a resource to which the clicked time cell belongs. + * Value: A string containing the name of a resource. + */ + resource: string; +} /** * Contains information about a client tooltip. */ @@ -14449,8 +17963,8 @@ interface ASPxClientToolTipBase { */ Close(): void; /** - * - * @param bounds + * Gets the tooltip position. + * @param bounds An object that represents the tooltip bounds. */ CalculatePosition(bounds: Object): ASPxClientPoint; /** @@ -14560,6 +18074,11 @@ interface ASPxClientSpellCheckerAfterCheckEventArgs extends ASPxClientEventArgs * Value: A string, containing checked text. */ checkedText: string; + /** + * Gets a value specifying whether spell checking is finished or stopped by the user. + * Value: A string value identifying the reason ("Default" or "User"). + */ + reason: string; } /** * Represents an object that will handle the client-side WordChanged event. @@ -14572,6 +18091,15 @@ interface ASPxClientWordChangedEventHandler { */ (source: S, e: ASPxClientSpellCheckerAfterCheckEventArgs): void; } +declare enum ASPxClientSpreadsheetPopupMenuType { + ColumnHeading=0, + RowHeading=1, + SheetTab=3, + Picture=4, + Chart=5, + Cell=7, + AutoFilter=8 +} /** * A method that will handle the CustomCommandExecuted event. */ @@ -14597,6 +18125,9 @@ interface ASPxClientSpreadsheetCustomCommandExecutedEventArgs extends ASPxClient * Value: A string value containing additional information about the processed command. */ parameter: string; + /** + * This property is now obsolete. Use the commandName property instead. + */ item: ASPxClientRibbonItem; } /** @@ -14667,6 +18198,32 @@ interface ASPxClientSpreadsheetHyperlinkClickEventArgs extends ASPxClientEventAr */ targetUri: string; } +/** + * A method that will handle the PopupMenuShowing event. + */ +interface ASPxClientSpreadsheetPopupMenuShowingEventHandler { + /** + * A method that will handle the PopupMenuShowing event. + * @param source The event sender (typically an ASPxClientSpreadsheet object). + * @param e A ASPxClientSpreadsheetPopupMenuShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetPopupMenuShowingEventArgs): void; +} +/** + * Provides data for the PopupMenuShowing event. + */ +interface ASPxClientSpreadsheetPopupMenuShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Provides access to a collection of menu items in the context menu being invoked. + * Value: A object representing the context menu's item collection. + */ + menuItems: ASPxClientSpreadsheetPopupMenuItemCollection; + /** + * Gets the currently displayed context menu's type. + * Value: One of the enumeration values. + */ + menuType: any; +} /** * A client-side equivalent of the ASPxSpreadsheet object. */ @@ -14707,6 +18264,10 @@ interface ASPxClientSpreadsheet extends ASPxClientControl { * Occurs on the client side after a hyperlink is clicked within the Spreadsheet's document. */ HyperlinkClick: ASPxClientEvent>; + /** + * Occurs before the context menu is displayed and allows menu customization. + */ + PopupMenuShowing: ASPxClientEvent>; /** * Sets input focus to the Spreadsheet. */ @@ -14734,6 +18295,12 @@ interface ASPxClientSpreadsheet extends ASPxClientControl { * @param rowModelIndex An integer value specifying the cell's row index. */ GetCellValue(colModelIndex: number, rowModelIndex: number): Object; + /** + * Returns the comment associated with the specified data cell. + * @param colModelIndex An integer value specifying the data cell's column index. + * @param rowModelIndex An integer value specifying the data cell's row index. + */ + GetCellComment(colModelIndex: number, rowModelIndex: number): Object; /** * Gets the value of the currently active cell. */ @@ -14815,6 +18382,123 @@ interface ASPxClientSpreadsheetSelection { */ bottomRowIndex: number; } +/** + * Represents an individual item of the Spreadsheet's context menu. + */ +interface ASPxClientSpreadsheetPopupMenuItem { + /** + * Gets the immediate parent menu item to which the current menu item belongs. + * Value: A ASPxClientSpreadsheetPopupMenuItem object representing the menu item's immediate parent. + */ + parent: ASPxClientSpreadsheetPopupMenuItem; + /** + * Gets or sets the unique identifier name for the current menu item. + * Value: A string value that specifies the item's unique identifier name. + */ + name: string; + /** + * Gets or sets the text content of the current menu item. + * Value: A string value that specifies the text content of the menu item. + */ + text: string; + /** + * Gets or sets a value that indicates whether the menu item is enabled, allowing the item to respond to end-user interactions. + * Value: true if the item is enabled; otherwise, false. + */ + enabled: boolean; + /** + * Gets or sets the CSS class name defining the menu item's image. + * Value: A string value specifying the class name. + */ + imageClassName: string; + /** + * Gets or sets an URL which defines the navigation location. + * Value: A string value which represents an URL where the client web browser will navigate. + */ + navigateUrl: string; + /** + * Gets or sets the URL of the menu item's image. + * Value: A string value that specifies the location of an image. + */ + imageUrl: string; + /** + * Gets or sets a value that specifies whether the current menu item starts a group. + * Value: true if the current menu item starts a group; otherwise, false. + */ + beginGroup: boolean; + /** + * Gets or sets the current menu item's tooltip text. + * Value: A string which specifies the text content of the current menu item's tooltip. + */ + tooltip: string; + /** + * Gets or sets the window or frame at which to target the contents of the URL associated with the current menu item. + * Value: A string which identifies the window or frame at which to target the URL content. + */ + target: string; + /** + * Gets a collection that contains the submenu items of the current menu item. + */ + GetSubItems(): ASPxClientSpreadsheetPopupMenuItemCollection; + /** + * Returns the menu item's sub-item with the specified index. + * @param index An integer value specifying the index of the sub-item within a collection of the current menu item's submenu items. + */ + GetItem(index: number): ASPxClientSpreadsheetPopupMenuItem; + /** + * Returns the menu item's sub-item with the specified name property value. + * @param name A string value specifying the name property value of the sub-item to find. + */ + GetItemByName(name: string): ASPxClientSpreadsheetPopupMenuItem; + /** + * Returns the total number of the menu item's child items (submenu items). + */ + GetItemCount(): number; +} +/** + * Represents a collection of items in the Spreadhseet's context menu. + */ +interface ASPxClientSpreadsheetPopupMenuItemCollection { + /** + * Adds the specified menu item to the end of the collection. + * @param item An ASPxClientSpreadsheetPopupMenuItem object specifying the item to be added to the collection. + */ + Add(item: ASPxClientSpreadsheetPopupMenuItem): void; + /** + * Removes a menu item specified by its index within the collection. + * @param index An integer value specifying the index of the menu item to remove. + */ + Remove(index: number): void; + /** + * Removes a menu item specified by its name. + * @param name A string value specifying the name property value of a menu item to remove from the collection. + */ + RemoveByName(name: string): void; + /** + * Adds the specified item to the specified position within the collection. + * @param index An integer value that specifies the zero-based index at which the specified item should be inserted. + * @param item An ASPxClientSpreadsheetPopupMenuItem object to insert. + */ + Insert(index: number, item: ASPxClientSpreadsheetPopupMenuItem): void; + /** + * Returns the total number of menu items in the collection. + */ + GetCount(): number; + /** + * Returns an item object with the specified name property value. + * @param name A string value representing the name property value of the required item. + */ + GetByName(name: string): ASPxClientSpreadsheetPopupMenuItem; + /** + * Returns a menu item specified by its index in the collection. + * @param index An integer value that is the zero-based index of the to retrieve from the ASPxClientSpreadsheetPopupMenuItemCollection. + */ + Get(index: number): ASPxClientSpreadsheetPopupMenuItem; + /** + * Removes all menu items from the collection. + */ + Clear(): void; +} /** * Represents the client ASPxTreeList. */ @@ -14839,6 +18523,10 @@ interface ASPxClientTreeList extends ASPxClientControl { * Occurs when a custom command button has been clicked. */ CustomButtonClick: ASPxClientEvent>; + /** + * Fires after a toolbar item has been clicked. + */ + ToolbarItemClick: ASPxClientEvent>; /** * Fires before the focused node has been changed. */ @@ -14899,6 +18587,16 @@ interface ASPxClientTreeList extends ASPxClientControl { * Gets the Popup Edit Form. */ GetPopupEditForm(): ASPxClientPopupControl; + /** + * Returns a toolbar specified by its name. + * @param name A string value specifying the toolbar name. + */ + GetToolbarByName(name: string): ASPxClientMenu; + /** + * Returns a toolbar specified by its index. + * @param index An integer value specifying the zero-based index of the toolbar object to retrieve. + */ + GetToolbar(index: number): ASPxClientMenu; /** * Returns the focused node's key value. */ @@ -15514,6 +19212,683 @@ interface ASPxClientTreeListColumnResizedEventHandler { */ (source: S, e: ASPxClientTreeListColumnResizedEventArgs): void; } +/** + * Provides data for the ToolbarItemClick event. + */ +interface ASPxClientTreeListToolbarItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the toolbar index related to the event. + * Value: An integer value that is the toolbar index. + */ + toolbarIndex: number; + /** + * Gets the toolbar name. + * Value: A string object that is the toolbar name. + */ + toolbarName: string; + /** + * Gets the toolbar item related to the event. + * Value: An ASPxClientMenuItem object that is the toolbar item. + */ + item: ASPxClientMenuItem; + /** + * Specifies whether a postback or a callback is used to finally process the event on the server side. + * Value: true to perform the round trip to the server side via postback; false to perform the round trip to the server side via callback. + */ + usePostBack: boolean; +} +/** + * A method that will handle the ToolbarItemClick event. + */ +interface ASPxClientTreeListToolbarItemClickEventHandler { + /** + * A method that will handle the ToolbarItemClick event. + * @param source The event source. + * @param e An ASPxClientTreeListToolbarItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListToolbarItemClickEventArgs): void; +} +/** + * Represents a client-side equivalent of the BootstrapAccordion control. + */ +interface BootstrapClientAccordion extends ASPxClientNavBar { +} +interface BootstrapClientBinaryImage extends ASPxClientHyperLink { +} +/** + * Represents a client-side equivalent of the BootstrapButton control. + */ +interface BootstrapClientButton extends ASPxClientButton { + /** + * Returns the text displayed within the button. + */ + GetText(): string; + /** + * Sets the text to be displayed within the button. + * @param value A string value specifying the text to be displayed within the button. + */ + SetText(value: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapCalendar control. + */ +interface BootstrapClientCalendar extends ASPxClientCalendar { +} +/** + * Represents a client-side equivalent of the BootstrapCallbackPanel control. + */ +interface BootstrapClientCallbackPanel extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the BootstrapClientCallbackPanel. + */ + CallbackError: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Returns the HTML code that specifies the contents of the control's window. + */ + GetContentHtml(): string; + /** + * Sets the HTML markup specifying the contents of the control's window. + * @param html A string value that specifies the HTML markup. + */ + SetContentHtml(html: string): void; + /** + * Sets a value specifying whether the callback panel is enabled. + * @param enabled true, to enable the callback panel; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value specifying whether a callback panel is enabled. + */ + GetEnabled(): boolean; +} +/** + * Serves as the base type for the BootstrapClientPieChart objects. + */ +interface BootstrapClientChartBase extends ASPxClientControl { + Done: ASPxClientEvent>; + LegendClick: ASPxClientEvent>; + PointClick: ASPxClientEvent>; + PointHoverChanged: ASPxClientEvent>; + PointSelectionChanged: ASPxClientEvent>; + TooltipHidden: ASPxClientEvent>; + TooltipShown: ASPxClientEvent>; + ArgumentAxisClick: ASPxClientEvent>; + SeriesClick: ASPxClientEvent>; + SeriesHoverChanged: ASPxClientEvent>; + SeriesSelectionChanged: ASPxClientEvent>; +} +/** + * Represents a client-side equivalent of the BootstrapChart control. + */ +interface BootstrapClientChart extends BootstrapClientChartBase { + ZoomStart: ASPxClientEvent>; + ZoomEnd: ASPxClientEvent>; +} +/** + * Represents a client-side equivalent of the BootstrapPolarChart control. + */ +interface BootstrapClientPolarChart extends BootstrapClientChartBase { +} +/** + * Represents a client-side equivalent of the BootstrapPieChart control. + */ +interface BootstrapClientPieChart extends BootstrapClientChartBase { +} +interface BootstrapClientChartBaseDoneEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapClientChartBaseLegendClickEventHandler { + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +interface BootstrapClientCoordinateSystemChartArgumentAxisClickEventHandler { + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +interface BootstrapClientChartBasePointClickEventHandler { + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +interface BootstrapClientChartBasePointHoverChangedEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientChartBasePointSelectionChangedEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientChartBaseTooltipHiddenEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientChartBaseTooltipShownEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientCoordinateSystemChartSeriesClickEventHandler { + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +interface BootstrapClientCoordinateSystemChartSeriesHoverChangedEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientCoordinateSystemChartSeriesSelectionChangedEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientChartZoomStartEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapClientChartZoomEndEventHandler { + (source: S, e: BootstrapClientChartZoomEndEventArgs): void; +} +interface BootstrapUIWidgetEventArgsBase extends ASPxClientEventArgs { + component: Object; + element: Object; +} +interface BootstrapClientChartZoomEndEventArgs extends BootstrapUIWidgetEventArgsBase { + rangeStart: Object; + rangeEnd: Object; +} +/** + * Represents a client-side equivalent of the BootstrapCheckBox control. + */ +interface BootstrapClientCheckBox extends ASPxClientEdit { + /** + * Occurs on the client side when the editor's checked state is changed. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Returns a value indicating whether the check box editor is checked. + */ + GetChecked(): boolean; + /** + * Sets a value which specifies the checked status of the check box editor. + * @param isChecked + */ + SetChecked(isChecked: boolean): void; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Returns a value which specifies a check box checked state. + */ + GetCheckState(): string; + /** + * Sets a value specifying the state of a check box. + * @param checkState + */ + SetCheckState(checkState: string): void; + /** + * Sets the text to be displayed within the editor. + * @param text + */ + SetText(text: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapRadioButton control. + */ +interface BootstrapClientRadioButton extends BootstrapClientCheckBox { +} +/** + * Represents a client-side equivalent of the BootstrapComboBox control. + */ +interface BootstrapClientComboBox extends ASPxClientComboBox { + /** + * Returns the combo box editor's selected item. + */ + GetSelectedItem(): BootstrapClientListBoxItem; + /** + * Sets the combo box editor's selected item. + * @param item + */ + SetSelectedItem(item: BootstrapClientListBoxItem): void; + /** + * Returns an item specified by its index within the combo box editor's item collection. + * @param index + */ + GetItem(index: number): BootstrapClientListBoxItem; + /** + * Returns a combo box item by its text. + * @param text + */ + FindItemByText(text: string): BootstrapClientListBoxItem; + /** + * Returns a combo box item by its value. + * @param value + */ + FindItemByValue(value: Object): BootstrapClientListBoxItem; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts + * @param value + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts + * @param value + * @param iconCssClass + */ + AddItem(texts: string[], value: Object, iconCssClass: string): number; + /** + * Adds a new item to the editor specifying the item's display text and returns the index of the added item. + * @param text + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor specifying the item's display text and associated value, and returns the index of the added item. + * @param text + * @param value + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text + * @param value + * @param iconCssClass + */ + AddItem(text: string, value: Object, iconCssClass: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + * @param value + * @param iconCssClass + */ + InsertItem(index: number, texts: string[], value: Object, iconCssClass: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + * @param value + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + */ + InsertItem(index: number, texts: string[]): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param text + * @param value + * @param iconCssClass + */ + InsertItem(index: number, text: string, value: Object, iconCssClass: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index + * @param text + * @param value + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index + * @param text + */ + InsertItem(index: number, text: string): void; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; +} +/** + * Represents a client-side equivalent of the BootstrapDateEdit control. + */ +interface BootstrapClientDateEdit extends ASPxClientDateEdit { +} +/** + * Represents a client-side equivalent of the BootstrapDropDownEdit control. + */ +interface BootstrapClientDropDownEdit extends ASPxClientDropDownEdit { +} +/** + * Represents a client-side equivalent of the BootstrapFormLayout control. + */ +interface BootstrapClientFormLayout extends ASPxClientFormLayout { +} +/** + * Represents a client-side equivalent of the BootstrapHyperLink control. + */ +interface BootstrapClientHyperLink extends ASPxClientHyperLink { +} +interface BootstrapClientImage extends ASPxClientImage { +} +/** + * Represents the client-side equivalent of the BootstrapListEditItem object. + */ +interface BootstrapClientListBoxItem extends ASPxClientListEditItem { + /** + * This member is not in effect for this class. It is overridden only for the purpose of preventing it from appearing in Microsoft Visual Studio designer tools. + */ + imageUrl: string; + iconCssClass: string; + /** + * + * @param columnIndex + */ + GetColumnText(columnIndex: number): string; + /** + * + * @param columnName + */ + GetColumnText(columnName: string): string; + /** + * + * @param fieldIndex + */ + GetFieldText(fieldIndex: number): string; + /** + * + * @param fieldName + */ + GetFieldText(fieldName: string): string; +} +/** + * Represents a client-side equivalent of the BootstrapListBox control. + */ +interface BootstrapClientListBox extends ASPxClientListBox { + /** + * Returns the list box editor's selected item. + */ + GetSelectedItem(): BootstrapClientListBoxItem; + /** + * Sets the list box editor's selected item. + * @param item + */ + SetSelectedItem(item: BootstrapClientListBoxItem): void; + /** + * Returns an item specified by its index within the list box editor's item collection. + * @param index + */ + GetItem(index: number): BootstrapClientListBoxItem; + /** + * Returns an array of the list editor's selected items. + */ + GetSelectedItems(): BootstrapClientListBoxItem[]; + /** + * Selects the specified items within a list box. + * @param items + */ + SelectItems(items: BootstrapClientListBoxItem[]): void; + /** + * Unselects an array of the specified list box items. + * @param items + */ + UnselectItems(items: BootstrapClientListBoxItem[]): void; + /** + * Returns a list box item by its text. + * @param text + */ + FindItemByText(text: string): BootstrapClientListBoxItem; + /** + * Returns a list box item by its value. + * @param value + */ + FindItemByValue(value: Object): BootstrapClientListBoxItem; + /** + * Adds a new item to the end of the editor's items collection, specifying the item's display text, and returns the index of the added item. + * @param texts + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts + * @param value + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts + * @param value + * @param iconCssClass + */ + AddItem(texts: string[], value: Object, iconCssClass: string): number; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param text + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor, specifying the item's display text and associated value, and returns the index of the added item. + * @param text + * @param value + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text + * @param value + * @param iconCssClass + */ + AddItem(text: string, value: Object, iconCssClass: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + * @param value + * @param iconCssClass + */ + InsertItem(index: number, texts: string[], value: Object, iconCssClass: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + * @param value + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + */ + InsertItem(index: number, texts: string[]): void; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index + * @param text + * @param value + * @param iconCssClass + */ + InsertItem(index: number, text: string, value: Object, iconCssClass: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index + * @param text + * @param value + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index + * @param text + */ + InsertItem(index: number, text: string): void; + /** + * Selects the specified items within a list box. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + SelectItems(items: ASPxClientListEditItem[]): void; + /** + * Unselects an array of the specified list box items. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + UnselectItems(items: ASPxClientListEditItem[]): void; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; +} +/** + * Represents a client-side equivalent of the BootstrapCheckBoxList control. + */ +interface BootstrapClientCheckBoxList extends ASPxClientCheckBoxList { +} +/** + * Represents a client-side equivalent of the BootstrapRadioButtonList control. + */ +interface BootstrapClientRadioButtonList extends ASPxClientRadioButtonList { +} +/** + * Represents a client-side equivalent of the BootstrapMenu control. + */ +interface BootstrapClientMenu extends ASPxClientMenu { +} +/** + * Represents a client-side equivalent of the BootstrapPager control. + */ +interface BootstrapClientPager extends ASPxClientPager { +} +/** + * Represents a client-side equivalent of the BootstrapPopupControl control. + */ +interface BootstrapClientPopupControl extends ASPxClientPopupControl { + /** + * + * @param selector + */ + SetPopupElementCssSelector(selector: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapPopupMenu control. + */ +interface BootstrapClientPopupMenu extends ASPxClientPopupMenu { + /** + * + * @param selector + */ + SetPopupElementCssSelector(selector: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapProgressBar control. + */ +interface BootstrapClientProgressBar extends ASPxClientProgressBar { +} +/** + * Represents a client-side equivalent of the BootstrapSpinEdit control. + */ +interface BootstrapClientSpinEdit extends ASPxClientSpinEdit { +} +/** + * Represents a client-side equivalent of the BootstrapTabControl control. + */ +interface BootstrapClientTabControl extends ASPxClientTabControl { +} +/** + * Represents a client-side equivalent of the BootstrapPageControl control. + */ +interface BootstrapClientPageControl extends ASPxClientPageControl { +} +/** + * Represents a client-side equivalent of the BootstrapTextBox control. + */ +interface BootstrapClientTextBox extends ASPxClientTextBox { +} +/** + * Represents a client-side equivalent of the BootstrapMemo control. + */ +interface BootstrapClientMemo extends ASPxClientMemo { +} +/** + * Represents a client-side equivalent of the BootstrapButtonEdit control. + */ +interface BootstrapClientButtonEdit extends ASPxClientButtonEdit { +} +/** + * Represents a client-side equivalent of the BootstrapTreeView control. + */ +interface BootstrapClientTreeView extends ASPxClientTreeView { +} +interface BootstrapUIWidgetBase extends ASPxClientControl { + Init: ASPxClientEvent>; + Drawn: ASPxClientEvent>; + Disposing: ASPxClientEvent>; + OptionChanged: ASPxClientEvent>; + Exporting: ASPxClientEvent>; + Exported: ASPxClientEvent>; + FileSaving: ASPxClientEvent>; + IncidentOccurred: ASPxClientEvent>; + GetInstance(): Object; + SetOptions(options: Object): void; + SetDataSource(dataSource: Object): void; + GetDataSource(): Object; + ExportTo(format: string, fileName: string): void; + Print(): void; +} +interface BootstrapUIWidgetInitializedEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapUIWidgetDrawnEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapUIWidgetDisposingEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapUIWidgetExportedEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapUIWidgetOptionChangedEventHandler { + (source: S, e: BootstrapUIWidgetOptionChangedEventArgs): void; +} +interface BootstrapUIWidgetOptionChangedEventArgs extends BootstrapUIWidgetEventArgsBase { + fullName: string; + name: string; + previousValue: Object; + value: Object; +} +interface BootstrapUIWidgetExportingEventHandler { + (source: S, e: BootstrapUIWidgetExportEventArgs): void; +} +interface BootstrapUIWidgetFileSavingEventHandler { + (source: S, e: BootstrapUIWidgetExportEventArgs): void; +} +interface BootstrapUIWidgetExportEventArgs extends BootstrapUIWidgetEventArgsBase { + cancel: boolean; + data: Object; + fileName: string; + format: string; +} +interface BootstrapUIWidgetErrorEventHandler { + (source: S, e: BootstrapUIWidgetErrorEventArgs): void; +} +interface BootstrapUIWidgetErrorEventArgs extends BootstrapUIWidgetEventArgsBase { + target: Object; +} +interface BootstrapUIWidgetElementActionEventArgs extends BootstrapUIWidgetEventArgsBase { + target: Object; +} +interface BootstrapUIWidgetElementClickEventArgs extends BootstrapUIWidgetElementActionEventArgs { + jQueryEvent: Object; +} +/** + * Represents a client-side equivalent of the BootstrapUploadControl. + */ +interface BootstrapClientUploadControl extends ASPxClientUploadControl { +} +interface BootstrapClientGridView extends ASPxClientGridView { +} /** * A client-side counterpart of the Calendar and CalendarFor extensions. */ @@ -15584,6 +19959,12 @@ interface MVCxClientCardView extends ASPxClientCardView { * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. */ PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; /** * Sends a callback to the server and generates the server-side CustomDataCallback event. * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. @@ -15796,6 +20177,12 @@ interface MVCxClientGridView extends ASPxClientGridView { * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. */ PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; /** * Sends a callback to the server and generates the server-side CustomDataCallback event. * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. @@ -16143,6 +20530,9 @@ interface MVCxClientRoundPanel extends ASPxClientRoundPanel { * A client-side counterpart of the Scheduler extension. */ interface MVCxClientScheduler extends ASPxClientScheduler { + /** + * Occurs on the client side when the tooltip is about to be displayed. + */ ToolTipDisplaying: ASPxClientEvent>; /** * Occurs when a callback for server-side processing is initiated. @@ -16169,6 +20559,10 @@ interface MVCxClientScheduler extends ASPxClientScheduler { * A template that is rendered to display a tooltip. */ interface MVCxClientSchedulerTemplateToolTip extends ASPxClientToolTipBase { + /** + * Gets the tooltip type. + * Value: A MVCxSchedulerToolTipType object that specifies the tooltip type. + */ type: MVCxSchedulerToolTipType; } /** @@ -16176,9 +20570,9 @@ interface MVCxClientSchedulerTemplateToolTip extends ASPxClientToolTipBase { */ interface MVCxClientSchedulerToolTipDisplayingEventHandler { /** - * - * @param source - * @param e + * A method that will handle the ToolTipDisplaying event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientSchedulerToolTipDisplayingEventArgs object that contains the related arguments. */ (source: S, e: MVCxClientSchedulerToolTipDisplayingEventArgs): void; } @@ -16186,7 +20580,15 @@ interface MVCxClientSchedulerToolTipDisplayingEventHandler { * Provides data for the ToolTipDisplaying event. */ interface MVCxClientSchedulerToolTipDisplayingEventArgs extends ASPxClientEventArgs { + /** + * Gets the tooltip related to the event. + * Value: A MVCxClientSchedulerTemplateToolTip object that specifies the tooltip. + */ toolTip: MVCxClientSchedulerTemplateToolTip; + /** + * Gets information about the tooltip related to the event. + * Value: A ASPxClientSchedulerToolTipData object that specifies information about the tooltip. + */ data: ASPxClientSchedulerToolTipData; } /** @@ -16429,6 +20831,12 @@ interface MVCxClientVerticalGrid extends ASPxClientVerticalGrid { * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. */ PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; /** * Sends a callback to the server and generates the server-side CustomDataCallback event. * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. @@ -16458,6 +20866,11 @@ interface ASPxClientControlBase { * Returns an HTML element that is the root of the control's hierarchy. */ GetMainElement(): Object; + /** + * Specifies the text that Assistive Technologies (screen readers or braille display, for example) will provide to a user. + * @param message A String value that specifies a text. + */ + SendMessageToAssistiveTechnology(message: string): void; /** * Returns a value specifying whether a control is displayed. */ @@ -16576,10 +20989,66 @@ interface ASPxClientCallbackCompleteEventArgs extends ASPxClientEventArgs { */ result: string; } +/** + * Serves as the base class for controls that implement panel functionality. + */ +interface ASPxClientPanelBase extends ASPxClientControl { + /** + * Returns the HTML code that is the content of the panel. + */ + GetContentHtml(): string; + /** + * Sets the HTML content for the panel. + * @param html A string value that is the HTML code defining the content of the panel. + */ + SetContentHtml(html: string): void; + /** + * Sets a value specifying whether the panel is enabled. + * @param enabled true to enable the panel; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value specifying whether a panel is enabled. + */ + GetEnabled(): boolean; +} +/** + * Represents a client-side equivalent of the ASPxPanel control. + */ +interface ASPxClientPanel extends ASPxClientPanelBase { + /** + * Occurs when the expanded panel is closed. + */ + Collapsed: ASPxClientEvent>; + /** + * Occurs when an end-user opens the expand panel. + */ + Expanded: ASPxClientEvent>; + /** + * Expands or collapses the client panel. + */ + Toggle(): void; + /** + * Returns a value specifying whether the panel can be expanded. + */ + IsExpandable(): boolean; + /** + * Returns a value specifying whether the panel is expanded. + */ + IsExpanded(): boolean; + /** + * Expands the collapsed panel. + */ + Expand(): void; + /** + * Collapses the expanded panel. + */ + Collapse(): void; +} /** * Represents a client-side equivalent of the ASPxCallbackPanel control. */ -interface ASPxClientCallbackPanel extends ASPxClientControl { +interface ASPxClientCallbackPanel extends ASPxClientPanel { /** * Occurs when a callback for server-side processing is initiated. */ @@ -16721,6 +21190,16 @@ interface ASPxClientProcessingModeCancelEventArgs extends ASPxClientProcessingMo */ cancel: boolean; } +/** + * Provides access to an observable boolean, that allows you to detect and respond to changes. + */ +interface KnockoutObservableBoolean { +} +/** + * Provides access to observable arrays that allow you to detect and respond to changes in a collection of things. + */ +interface KnockoutObservableArray { +} /** * Represents a JavaScript function which receives callback data obtained via a call to a specific client method (such as the PerformDataCallback). */ @@ -16986,17 +21465,23 @@ interface ASPxClientControlsInitializedEventArgs extends ASPxClientEventArgs { */ isCallback: boolean; } +/** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + */ interface ASPxClientControlPredicate { /** - * - * @param control + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + * @param control An object to compare against the criteria defined within the method. */ (control: Object): boolean; } +/** + * Represents a JavaScript function which receives the action to perform for a control when the client ForEachControl method is called. + */ interface ASPxClientControlAction { /** - * - * @param control + * Represents a JavaScript function which receives the action to perform for a control when the client ForEachControl method is called. + * @param control An object that specifies a control. */ (control: Object): void; } @@ -17585,7 +22070,7 @@ interface ASPxClientDockPanel extends ASPxClientPopupControlBase { */ MakeFloat(x: number, y: number): void; /** - * Gets or sets a value specifying the position of the current panel, amongst the visible panels within a zone. + * Gets a value specifying the position of the current panel, amongst the visible panels within a zone. */ GetVisibleIndex(): number; /** @@ -17855,6 +22340,10 @@ interface ASPxClientFileManager extends ASPxClientControl { * Occurs on the client side after upload of all selected files has been completed. */ FilesUploaded: ASPxClientEvent>; + /** + * Enables you to specify whether the selected file(s) are valid and provide an error text. + */ + FileUploadValidationErrorOccurred: ASPxClientEvent>; /** * Fires on the client side before a file download starts, and allows you to cancel the action. */ @@ -18892,6 +23381,234 @@ interface ASPxClientHiddenField extends ASPxClientControl { */ Contains(propertyName: string): boolean; } +/** + * Represents the client-side equivalent of the ASPxHint control. + */ +interface ASPxClientHint extends ASPxClientControl { + /** + * Occurs on the client side when a hint is about to be shown. + */ + Showing: ASPxClientEvent; + /** + * Occurs on the client side when a hint is about to be hidden. + */ + Hiding: ASPxClientEvent; + /** + * This method is not in effect for a ASPxClientHint object. + */ + GetMainElement(): Object; + /** + * Invokes a hint. + * @param targetElement A HTML DOM element near to which the hint is displayed in response to user interaction. + */ + Show(targetElement: Object): ASPxClientHintWindow; + /** + * Invokes a hint. + * @param targetSelector A string value that is the CSS selector used to specify for which UI elements on a web page a hint is displayed. + */ + Show(targetSelector: string): ASPxClientHintWindow; +} +/** + * Represents the client-side equivalent of the ASPxHint's window. + */ +interface ASPxClientHintWindow { + /** + * Forces the ASPxClientHint's window to recalculate its position. + */ + UpdatePosition(): void; +} +/** + * A method that will handle the Showing event. + */ +interface ASPxClientHintShowingEventHandler { + /** + * A method that will handle the Showing event. + * @param sender The event source. + * @param e A ASPxClientHintShowingEventArgs object that contains the required data. + */ + (sender: ASPxClientHintWindow, e: ASPxClientHintShowingEventArgs): void; +} +/** + * Provides data for the Showing event. + */ +interface ASPxClientHintShowingEventArgs extends ASPxClientEventArgs { + /** + * Gets the object that is the hint's target element. + * Value: An object representing the hint's target element related to the event. + */ + targetElement: Object; + /** + * Gets the object that is the hint. + * Value: An object representing the hint related to the event. + */ + hintElement: Object; + /** + * Gets the object that is the hint's content. + * Value: An object representing the hint's content element related to the event. + */ + contentElement: Object; + /** + * Gets the object that is the hint's title. + * Value: An object representing the hint's title element related to the event. + */ + titleElement: Object; + /** + * Gets or sets a value indicating whether the event should be canceled. + * Value: true, if the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the Hiding event. + */ +interface ASPxClientHintHidingEventHandler { + /** + * A method that will handle the Hiding event. + * @param sender The event source. + * @param e A ASPxClientHintHidingEventArgs object that contains the required data. + */ + (sender: ASPxClientHintWindow, e: ASPxClientHintHidingEventArgs): void; +} +/** + * Provides data for the Hiding event. + */ +interface ASPxClientHintHidingEventArgs extends ASPxClientEventArgs { + /** + * Gets the object that is the hint's target element. + * Value: An object representing the hint's target element. + */ + targetElement: Object; + /** + * Gets the object that is the hint element. + * Value: An object representing the hint related to the event. + */ + hintElement: Object; + /** + * Gets the object that is the hint's content. + * Value: An object representing the hint's content element related to the event. + */ + contentElement: Object; + /** + * Gets the object that is the hint's title. + * Value: An object representing the hint's title element related to the event. + */ + titleElement: Object; + /** + * Gets or sets a value indicating whether the event should be canceled. + * Value: true, if the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * The hint control's options. + */ +interface ASPxClientHintOptions { + /** + * Gets or sets which user action triggers a hint. + * Value: A string value that is a user action. + */ + triggerAction: string; + /** + * Gets or sets the delay in displaying the hint. + * Value: An integer value that specifies the time interval, in milliseconds, after which a hint is displayed. + */ + appearAfter: number; + /** + * Gets or sets the duration after which a hint disappears when the mouse pointer is no longer positioned over the target element. + * Value: The length of time (in milliseconds) a hint is displayed after the mouse pointer is no longer positioned over the target element. + */ + disappearAfter: number; + /** + * Gets or sets a value that specifies whether a hint is displayed in a callout box. + * Value: true, to display a hint in a callout box; otherwise, false. + */ + showCallout: boolean; + /** + * Gets or sets where a hint should be positioned. + * Value: A string value that specifies a hint position. + */ + position: string; + /** + * Gets or sets a custom CSS class name that will be assigned to the root ASPxHint element. + * Value: A string value that is the CSS class name. + */ + className: string; + /** + * Gets or sets the attribute name. + * Value: A string value that is the attribute name. + */ + contentAttribute: string; + /** + * Gets or sets the attribute name. + * Value: A string value that is the attribute name. + */ + titleAttribute: string; + /** + * Gets or sets the hint's content. + * Value: A string value that is the hint's content. + */ + content: string; + /** + * Gets or sets a value that is the hint's title. + * Value: A string value that is the title text. + */ + title: string; + /** + * Gets or sets a value that is the HTML DOM-element. + * Value: A string that is the DOM-element. + */ + container: string; + /** + * A handler for the Showing event. + * Value: An delegate method allowing you to implement custom processing. + */ + onShowing: ASPxClientHintShowingEventHandler; + /** + * A handler for the Hiding event. + * Value: An delegate method allowing you to implement custom processing. + */ + onHiding: ASPxClientHintHidingEventHandler; + /** + * Gets or sets a value that is the hint's width. + * Value: A string value that is the hint's width. + */ + width: string; + /** + * Gets or sets a value that is the hint's height. + * Value: A string value that is the hint's height. + */ + height: string; + /** + * Gets or sets the X coordinate. + * Value: An integer value that is the X coordinate. + */ + x: number; + /** + * Gets or sets the Y coordinate. + * Value: An integer value that is the Y coordinate. + */ + y: number; + /** + * Gets or sets a value that specifies whether to flip the hint to the opposite position relative to the target element. + * Value: true, to flip the hint; otherwise, false. + */ + allowFlip: boolean; + /** + * Gets or sets a value that specifies whether to shift a hint if its content and title are hidden outside of the client area. + * Value: true, to shift the hint; otherwise, false. + */ + allowShift: boolean; + /** + * Gets or sets whether it should use animation effects when a hint appears. + * Value: true if animation is enabled; otherwise false. + */ + animation: any; + /** + * Gets the offset of a hint. + * Value: An integer value. + */ + offset: number; +} /** * The client-side equivalent of the ASPxImageGallery control. */ @@ -19163,6 +23880,20 @@ interface ASPxClientLoadingPanel extends ASPxClientControl { */ Hide(): void; } +/** + * Represents the client-side equivalent of the area that is used within the Html Editor's media dialogs. + */ +interface ASPxClientMediaFileSelector extends ASPxClientControl { + /** + * Returns a URL text from the URL text box in Html Editor's media dialogs. + */ + GetUrl(): string; + /** + * Sets a URL text in the Html Editor's media dialogs. + * @param url A string value that is the Url text. + */ + SetUrl(url: string): void; +} /** * Serves as the base type for the ASPxClientPopupMenu objects. */ @@ -19839,60 +24570,9 @@ interface ASPxClientFlashScriptCommandEventArgs extends ASPxClientEventArgs { interface ASPxClientOfficeDocumentLinkType { } /** - * Serves as the base class for controls that implement panel functionality. + * Represents the client-side equivalent of the ASPxPager control. */ -interface ASPxClientPanelBase extends ASPxClientControl { - /** - * Returns the HTML code that is the content of the panel. - */ - GetContentHtml(): string; - /** - * Sets the HTML content for the panel. - * @param html A string value that is the HTML code defining the content of the panel. - */ - SetContentHtml(html: string): void; - /** - * Sets a value specifying whether the panel is enabled. - * @param enabled true to enable the panel; false to disable it. - */ - SetEnabled(enabled: boolean): void; - /** - * Returns a value specifying whether a panel is enabled. - */ - GetEnabled(): boolean; -} -/** - * Represents a client-side equivalent of the ASPxPanel control. - */ -interface ASPxClientPanel extends ASPxClientPanelBase { - /** - * Occurs when the expanded panel is closed. - */ - Collapsed: ASPxClientEvent>; - /** - * Occurs when an end-user opens the expand panel. - */ - Expanded: ASPxClientEvent>; - /** - * Expands or collapses the client panel. - */ - Toggle(): void; - /** - * Returns a value specifying whether the panel can be expanded. - */ - IsExpandable(): boolean; - /** - * Returns a value specifying whether the panel is expanded. - */ - IsExpanded(): boolean; - /** - * Expands the collapsed panel. - */ - Expand(): void; - /** - * Collapses the expanded panel. - */ - Collapse(): void; +interface ASPxClientPager extends ASPxClientControl { } /** * Represents a client-side equivalent of the ASPxPopupControl control. @@ -21728,6 +26408,10 @@ interface ASPxClientUploadControl extends ASPxClientControl { * Occurs on the client side when the file input elements count is changed. */ FileInputCountChanged: ASPxClientEvent>; + /** + * Enables you to specify whether the selected file(s) are valid and provide an error text. + */ + ValidationErrorOccurred: ASPxClientEvent>; /** * Fires when the mouse enters a drop zone or an external drop zone element while dragging a file. */ @@ -21736,6 +26420,10 @@ interface ASPxClientUploadControl extends ASPxClientControl { * Fires when the mouse leaves a drop zone or an external drop zone element while dragging a file. */ DropZoneLeave: ASPxClientEvent>; + /** + * Specifies whether the upload control's Advanced mode is enabled. + */ + IsAdvancedModeEnabled(): boolean; /** * Initiates uploading of the specified file to the web server's memory. */ @@ -21754,6 +26442,16 @@ interface ASPxClientUploadControl extends ASPxClientControl { * @param fileIndex An integer value that is the zero-based index of an item in the file list. */ RemoveFileFromSelection(fileIndex: number): void; + /** + * Removes the specified file from the list of files selected for uploading in the upload control. + * @param file An ASPxClientUploadControl object that is the file to be removed from the list of files. + */ + RemoveFileFromSelection(file: ASPxClientUploadControlFile): void; + /** + * Returns files selected for uploading within the specified file input. + * @param inputIndex An integer value that specifies the index of a file input. Default value is "0". + */ + GetSelectedFiles(inputIndex: number): ASPxClientUploadControlFile[]; /** * Gets the text displayed within the edit box of the specified file input element. * @param index An integer value that specifies the required file input element's index. @@ -21973,6 +26671,112 @@ interface ASPxClientUploadControlUploadingProgressChangedEventArgs extends ASPxC */ progress: number; } +/** + * A method that will handle the ValidationErrorOccurred client event. + */ +interface ASPxClientUploadControlValidationErrorOccurredEventHandler { + /** + * A method that will handle the ValidationErrorOccurred event. + * @param source The event source. + * @param e An ASPxClientUploadControlValidationErrorOccurredEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlValidationErrorOccurredEventArgs): void; +} +/** + * Provides data for the ValidationErrorOccurred event. + */ +interface ASPxClientUploadControlValidationErrorOccurredEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets the error text. + * Value: A string value that represents the error text. + */ + errorText: string; + /** + * Gets or sets a value specifying whether an alert message is displayed when the ValidationErrorOccurred event fires. + * Value: true, to display an alert message; otherwise, false. + */ + showAlert: boolean; + /** + * Gets the validation settings for the selected files. + * Value: An ASPxClientUploadControlValidationSettings object that provides validation settings. + */ + validationSettings: ASPxClientUploadControlValidationSettings; + /** + * Returns an array of invalid files. + * Value: An array of the ASPxClientUploadControlInvalidFileInfo objects. + */ + invalidFiles: ASPxClientUploadControlInvalidFileInfo[]; +} +/** + * Contains settings that relate to the ValidationErrorOccurred client event. + */ +interface ASPxClientUploadControlValidationSettings { + /** + * Gets the maximum file size. + * Value: An value that specifies the maximum file size, in bytes. + */ + maxFileSize: any; + /** + * Gets the maximum count of files that can be selected for uploading at once. + * Value: An integer value that specifies the maximum count of files. + */ + maxFileCount: number; + /** + * Gets the allowed file extensions. + * Value: An array of string values that contains file extensions that are allowed. + */ + allowedFileExtensions: string[]; + /** + * Gets which characters in a file name are not allowed. + * Value: An array of string values that contains characters that are not allowed. + */ + invalidFileNameCharacters: string[]; +} +/** + * Contains settings of the file that hasn't passed validation. + */ +interface ASPxClientUploadControlInvalidFileInfo { + /** + * Gets the name of the invalid file. + * Value: A string value that specifies the file name. + */ + fileName: string; + /** + * Gets the size of the invalid file. + * Value: An integer value that specifies the file size. + */ + fileSize: number; + /** + * Gets the error type. + * Value: An ASPxClientUploadControlValidationErrorTypeConsts object that provides possible types of errors. + */ + errorType: ASPxClientUploadControlValidationErrorTypeConsts; +} +/** + * Declares client constants containing codes of validation errors that can occur while selecting files for uploading. + */ +interface ASPxClientUploadControlValidationErrorTypeConsts { +} +/** + * Represents a client file that corresponds to a particular file selected for uploading in the upload control. + */ +interface ASPxClientUploadControlFile { + /** + * Gets the name of the file selected for uploading. + * Value: A string value that specifies the file's name. + */ + name: string; + /** + * Gets the size of the file selected for uploading. + * Value: An Int64 value specifying the file's size, in bytes. + */ + size: any; + /** + * Provides access to the file as a native Javascript object. + * Value: A JavaScript object that is the file selected for uploading. + */ + sourceFileObject: any; +} /** * A method that will handle the DropZoneEnter event. */ @@ -22919,6 +27723,12 @@ interface ASPxClientXYDiagram2D extends ASPxClientXYDiagramBase { * @param pane An ASPxClientXYDiagramPane object, representing the pane. */ DiagramToPoint(argument: Object, value: Object, axisX: ASPxClientAxis2D, axisY: ASPxClientAxis2D, pane: ASPxClientXYDiagramPane): ASPxClientControlCoordinates; + /** + * Shows the Crosshair Cursor at the point with the specified coordinates. + * @param screenX The horizontal coordinate that is related to the top-left angle of the chart. + * @param screenY The vertical coordinate that is related to the top-left angle of the chart. + */ + ShowCrosshair(screenX: number, screenY: number): void; } /** * Represents the client-side equivalent of the XYDiagram class. @@ -23941,6 +28751,16 @@ interface ASPxClientCrosshairOptions extends ASPxClientWebChartEmptyElement { * Value: A String, which represents the group header's pattern. */ groupHeaderPattern: string; + /** + * Gets a value that specifies whether the Crosshair cursor should show points that are out of visual range. + * Value: true if the out of visual range points should be shown in the Crosshair label; otherwise false. + */ + showOutOfRangePoints: boolean; + /** + * Gets the identifier specifying the behavior of the selection of points shown in the crosshair label. + * Value: The selection behavior identifier. + */ + valueSelectionMode: string; /** * Gets the color of a crosshair argument line. * Value: A String value, specifying the color of a crosshair argument line. @@ -24267,69 +29087,9 @@ interface ASPxClientQueryBuilderCustomizeToolbarActionsEventHandler { /** * A method that will handle the CustomizeToolbarActions event. * @param source The event sender. - * @param e An ASPxClientQueryBuilderCustomizeToolbarActionsEventArgs object that contains data related to the event. + * @param e An ASPxClientCustomizeMenuActionsEventArgs object that contains data related to the event. */ - (source: S, e: ASPxClientQueryBuilderCustomizeToolbarActionsEventArgs): void; -} -/** - * Provides settings to the actions listed in a Query Builder menu. - */ -interface ASPxClientQueryBuilderMenuAction { - /** - * Provides access to the text for the command. - * Value: A String value. - */ - text: string; - /** - * Provides access to the CSS class of the command's glyph. - * Value: A String value. - */ - imageClassName: string; - /** - * Provides access to the action performed when a Query Builder's button is clicked. - * Value: The specific action implementation. - */ - clickAction: Function; - /** - * Provides access to the value that specifies whether or not the command is disabled by default. - * Value: true, if the command is disabled by default; otherwise, false. - */ - disabled: boolean; - /** - * Provides access to the value that specifies whether or not the command is visible in the Query Builder user interface. - * Value: true if the command is visible; otherwise false. - */ - visible: boolean; - /** - * Provides access to the keyboard shortcut used to invoke the command. - * Value: A String value. - */ - hotKey: string; - /** - * Provides access to the value that specifies whether or not the command has a visual separator. - * Value: true, if the command has a visual separator; otherwise, false. - */ - hasSeparator: string; - /** - * Provides access to the location of the displayed command. - * Value: A String value. - */ - container: string; -} -/** - * Provides data for the CustomizeToolbarActions event. - */ -interface ASPxClientQueryBuilderCustomizeToolbarActionsEventArgs extends ASPxClientEventArgs { - /** - * Returns the collection of customized menu actions. - * Value: An ASPxClientQueryBuilderMenuAction array. - */ - Actions: ASPxClientQueryBuilderMenuAction[]; - /** - * Returns a menu action with the specified ID. - * @param actionId A String value, specifying the action ID. - */ - GetById(actionId: string): ASPxClientQueryBuilderMenuAction; + (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; } /** * The client-side equivalent of the Web Report Designer control. @@ -24352,7 +29112,7 @@ interface ASPxClientReportDesigner extends ASPxClientControl { */ SaveCommandExecute: ASPxClientEvent>; /** - * Enables you to customize the menu actions of a Web Report Designer. + * Enables you to customize the menu actions of the Web Report Designer. */ CustomizeMenuActions: ASPxClientEvent>; /** @@ -24367,6 +29127,78 @@ interface ASPxClientReportDesigner extends ASPxClientControl { * Occurs on the client side when the Report Designer is being closed. */ ExitDesigner: ASPxClientEvent>; + /** + * Occurs when a report is about to be saved in the Web Report Designer. + */ + ReportSaving: ASPxClientEvent>; + /** + * Occurs when a report has been saved in the Web Report Designer. + */ + ReportSaved: ASPxClientEvent>; + /** + * Occurs when a report is about to be opened in the Web Report Designer. + */ + ReportOpening: ASPxClientEvent>; + /** + * Occurs when a report has been opened in the Web Report Designer. + */ + ReportOpened: ASPxClientEvent>; + /** + * Occurs on the client each time a server-side error raises. + */ + OnServerError: ASPxClientEvent>; + /** + * Occurs after a component has been added to the report currently being edited in the Web Report Designer. + */ + ComponentAdded: ASPxClientEvent>; + /** + * Enables you to customize UI elements of the Web Report Designer. + */ + CustomizeElements: ASPxClientEvent>; + /** + * Enables you to customize the Save dialog of the Web Report Designer. + */ + CustomizeSaveDialog: ASPxClientEvent>; + /** + * Enables you to customize the Save Report dialog of the Web Report Designer. + */ + CustomizeSaveAsDialog: ASPxClientEvent>; + /** + * Enables you to customize the Open Report dialog of the Web Report Designer. + */ + CustomizeOpenDialog: ASPxClientEvent>; + /** + * Enables you to customize the Toolbox of the Web Report Designer. + */ + CustomizeToolbox: ASPxClientEvent>; + /** + * Occurs after a report has been switched to Print Preview. + */ + PreviewDocumentReady: ASPxClientEvent>; + /** + * Occurs each time a value of an editing field changes in Print Preview. + */ + PreviewEditingFieldChanged: ASPxClientEvent>; + /** + * Enables you to customize UI elements of a Document Viewer built into a Web Report Designer. + */ + PreviewCustomizeElements: ASPxClientEvent>; + /** + * Enables you to customize the actions of a Document Viewer built into a Web Report Designer. + */ + PreviewCustomizeMenuActions: ASPxClientEvent>; + /** + * Occurs when the left mouse button has been clicked over a report document in Print Preview. + */ + PreviewClick: ASPxClientEvent>; + /** + * Occurs after report parameter values have been reset to their default values in Print Preview. + */ + PreviewParametersReset: ASPxClientEvent>; + /** + * Occurs after report parameter values have been submitted in Print Preview. + */ + PreviewParametersSubmitted: ASPxClientEvent>; /** * Sends a callback to the server with the specified argument. * @param arg A String value, specifying the callback argument. @@ -24387,16 +29219,30 @@ interface ASPxClientReportDesigner extends ASPxClientControl { * Returns the object model of a Web Report Designer. */ GetDesignerModel(): Object; + /** + * Provides access to the preview model of the ASPxClientReportDesigner. + */ + GetPreviewModel(): Object; + /** + * Returns information about the specified property of the specified control. + * @param controlType A string that specifies the control type. + * @param path A string that specifies the path to the property. + */ + GetPropertyInfo(controlType: string, path: string): ASPxDesignerElementSerializationInfo; + /** + * Returns information about the specified properties of the specified control. + * @param controlType A string that specifies the control type. + * @param path An array of strings that specify paths to properties. + */ + GetPropertyInfo(controlType: string, path: string[]): ASPxDesignerElementSerializationInfo; + /** + * Returns actions performed by buttons available in the menu and toolbar of the Web Report Designer. + */ + GetButtonStorage(): Object; /** * Gets a client-side model of the currently opened report serialized to Json. */ GetJsonReportModel(): string; - /** - * Returns serialization information for the specific property of the specific control type. - * @param controlType A string that identifies the name of the control type for which serialization information is to be returned. - * @param propertyDisplayName A string that identifies the name of the property for which serialization information is to be returned. - */ - GetPropertyInfo(controlType: string, propertyDisplayName: string): ASPxDesignerElementSerializationInfo; /** * Indicates whether or not the current ASPxClientReportDesigner instance has been modified. */ @@ -24405,6 +29251,76 @@ interface ASPxClientReportDesigner extends ASPxClientControl { * Resets the value returned by the IsModified method. */ ResetIsModified(): void; + /** + * Adds a custom property to the Properties Panel. + * @param groupName A string that specifies the name of group to which a property should be added. + * @param property An object that provides information required to serialize a property. + */ + AddToPropertyGrid(groupName: string, property: ASPxDesignerElementSerializationInfo): void; + /** + * Adds a custom parameter type to the Web End-User Report Designer. + * @param parameterInfo An object that provides information about a parameter type to be added. + * @param editorOptions An object that provides information about an editor used to specify parameter values in design mode. + */ + AddParameterType(parameterInfo: ASPxDesignerParameterType, editorOptions: ASPxDesignerEditorOptions): void; + /** + * Removes the specified parameter type from the Web End-User Report Designer. + * @param parameterType A string that specifies a parameter type to be deleted. + */ + RemoveParameterType(parameterType: string): void; + /** + * Returns an object that contains information on the specified parameter type. + * @param parameterType A string that specifies a parameter type. + */ + GetParameterInfo(parameterType: string): ASPxDesignerParameterType; + /** + * Returns a value editor associated with the specified parameter type. + * @param parameterType A string that specifies a parameter type. + */ + GetParameterEditor(parameterType: string): ASPxDesignerEditorOptions; + /** + * Returns the report layout stored in a report storage under the specified URL. + * @param url A string that specifies the report URL. + */ + ReportStorageGetData(url: string): any; + /** + * Stores the specified report to a report storage using the specified URL. + * @param reportLayout A string that specifies the report layout to be saved. + * @param url A string that specifies the URL used to save a report. + */ + ReportStorageSetData(reportLayout: string, url: string): any; + /** + * Stores the specified report to a report storage using a new URL. + * @param reportLayout A string that specifies the report layout to be saved. + * @param url A string that specifies the default report URL. + */ + ReportStorageSetNewData(reportLayout: string, url: string): any; + /** + * Saves the current report. + */ + SaveReport(): any; + /** + * Closes the report tab currently being opened in the Web Report Designer. + */ + CloseCurrentTab(): void; + /** + * Saves the current report under a new name. + * @param reportName A string that specifies the report name. + */ + SaveNewReport(reportName: string): any; + /** + * Returns the report URLs and display names existing in a report storage. + */ + ReportStorageGetUrls(): any; + /** + * Opens the specified report on the client side of the Web Report Designer. + * @param url A string that specifies the URL of a report to be opened. + */ + OpenReport(url: string): void; + /** + * Switches the Web Report Designer to the preview mode. + */ + ShowPreview(): void; } /** * A method that will handle the SaveCommandExecute event. @@ -24427,6 +29343,114 @@ interface ASPxClientReportDesignerSaveCommandExecuteEventArgs extends ASPxClient */ handled: boolean; } +/** + * Provides data for the ExitDesigner event. + */ +interface ASPxClientReportDesignerExitDesignerEventArgs extends ASPxClientEventArgs { +} +/** + * Provides data for the events related to opening and saving reports in the Web Report Designer. + */ +interface ASPxClientReportDesignerDialogEventArgs extends ASPxClientEventArgs { + /** + * Specifies the URL of the report currently being processed. + * Value: A string that specifies the URL of the report currently being processed. + */ + Url: string; + /** + * Specifies the report currently being processed. + * Value: An object that specifies the report currently being processed. + */ + Report: Object; + /** + * Specifies whether or not the operation performed with a report should be canceled. + * Value: true, if the operation should be canceled; otherwise, false. + */ + Cancel: boolean; +} +/** + * Provides data for the OnServerError event. + */ +interface ASPxClientReportDesignerErrorEventArgs extends ASPxClientEventArgs { + /** + * Provides access to information about a server-side error. + * Value: An object that provides information about an error. + */ + Error: Object; +} +/** + * Provides data for the ComponentAdded event. + */ +interface ASPxClientReportDesignerComponentAddedEventArgs extends ASPxClientEventArgs { + /** + * Gets the model of a component that has been added to a report. + * Value: An object that specifies the component model. + */ + Model: Object; + /** + * Gets the parent of a component that has been added to a report. + * Value: An object that specifies the component parent. + */ + Parent: Object; +} +/** + * Provides data for the CustomizeSaveDialog event. + */ +interface ASPxClientReportDesignerCustomizeSaveDialogEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the Save dialog. + * Value: An object that specifies the Save dialog. + */ + Popup: ASPxDesignerSaveDialog; + /** + * Customizes the Save dialog based on the specified template and model. + * @param template A string that specifies the name of an HTML template for the dialog. + * @param model A model of the Save dialog. + */ + Customize(template: string, model: ASPxDesignerDialogModel): void; +} +/** + * Provides data for the CustomizeSaveAsDialog event. + */ +interface ASPxClientReportDesignerCustomizeSaveAsDialogEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the Save Report dialog. + * Value: An object that specifies the Save Report dialog. + */ + Popup: ASPxDesignerSaveAsDialog; + /** + * Customizes the Save Report dialog based on the specified template and model. + * @param template A string that specifies the name of an HTML template for the dialog. + * @param model A model of the Save Report dialog. + */ + Customize(template: string, model: ASPxDesignerDialogModel): void; +} +/** + * Provides data for the CustomizeOpenDialog event. + */ +interface ASPxClientReportDesignerCustomizeOpenDialogEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the Open Report dialog. + * Value: An object that specifies the Open Report dialog. + */ + Popup: ASPxDesignerOpenDialog; + /** + * Customizes the Open Report dialog based on the specified template and model. + * @param template A string that specifies the name of an HTML template for the dialog. + * @param model A model of the Open Report dialog. + */ + Customize(template: string, model: ASPxDesignerDialogModel): void; +} +/** + * Provides data for the CustomizeToolbox event. + */ +interface ASPxClientReportDesignerCustomizeToolboxEventArgs extends ASPxClientEventArgs { + /** + * Provides information about all controls available in the Toolbox. + * Value: An ASPxDesignerControlsFactory object that provides information about toolbox controls. + */ + ControlsFactory: ASPxDesignerControlsFactory; +} /** * A method that will handle the CustomizeMenuActions event. */ @@ -24434,76 +29458,19 @@ interface ASPxClientReportDesignerCustomizeMenuActionsEventHandler { /** * A method that will handle the CustomizeMenuActions event. * @param source The event sender. - * @param e An ASPxClientReportDesignerCustomizeMenuActionsEventArgs object that contains data related to the event. + * @param e An ASPxClientCustomizeMenuActionsEventArgs object that contains data related to the event. */ - (source: S, e: ASPxClientReportDesignerCustomizeMenuActionsEventArgs): void; + (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; } /** - * Provides settings to the actions listed in a Web Report Designer menu. + * A method that will handle the CustomizeParameterLookUpSource event. */ -interface ASPxClientReportDesignerMenuAction { - /** - * Provides access to the text for the command. - * Value: A String value. - */ - text: string; - /** - * Provides access to the CSS class of the command's glyph. - * Value: A String value. - */ - imageClassName: string; - /** - * Provides access to the action performed when a Web Report Designer's button is clicked. - * Value: The specific action implementation. - */ - clickAction: Function; - /** - * Provides access to the value that specifies whether or not the command is disabled by default. - * Value: true, if the command is disabled by default; otherwise, false. - */ - disabled: boolean; - /** - * Provides access to the value that specifies whether or not the command is visible in the designer user interface. - * Value: true if the command is visible; otherwise false. - */ - visible: boolean; - /** - * Provides access to the keyboard shortcut used to invoke the command. - * Value: A String value. - */ - hotKey: string; - /** - * Provides access to the value that specifies whether or not the command has a visual separator. - * Value: true, if the command has a visual separator; otherwise, false. - */ - hasSeparator: string; - /** - * Provides access to the location of the displayed command. - * Value: A String value. - */ - container: string; -} -/** - * Provides data for the CustomizeMenuActions event. - */ -interface ASPxClientReportDesignerCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { - /** - * Returns the collection of customized menu actions. - * Value: An ASPxClientReportDesignerMenuAction array. - */ - Actions: ASPxClientReportDesignerMenuAction[]; - /** - * Returns a menu action with the specified ID. - * @param actionId A String value, specifying the action ID. - */ - GetById(actionId: string): ASPxClientReportDesignerMenuAction; -} -/** - * Provides data for the ExitDesigner event. - */ -interface ASPxClientReportDesignerExitDesignerEventArgs extends ASPxClientEventArgs { -} interface ASPxClientReportDesignerCustomizeParameterLookUpSourceEventHandler { + /** + * A method that will handle the CustomizeParameterLookUpSource event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterLookUpSourceEventArgs object that contains data related to the event. + */ (source: S, e: ASPxClientCustomizeParameterLookUpSourceEventArgs): void; } /** @@ -24517,6 +29484,17 @@ interface ASPxClientReportDesignerCustomizeParameterEditorsEventHandler { */ (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; } +/** + * A method that will handle the CustomizeElements event. + */ +interface ASPxClientReportDesignerCustomizeElementsEventHandler { + /** + * A method that will handle the CustomizeElements event. + * @param source The event sender. + * @param e An ASPxClientCustomizeElementsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeElementsEventArgs): void; +} /** * A method that will handle the ExitDesigner event. */ @@ -24528,6 +29506,422 @@ interface ASPxClientReportDesignerExitDesignerEventHandler { */ (source: S, e: ASPxClientReportDesignerExitDesignerEventArgs): void; } +/** + * A method that will handle the ReportSaving event. + */ +interface ASPxClientReportDesignerReportSavingEventHandler { + /** + * A method that will handle the ReportSaving event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; +} +/** + * A method that will handle the ReportSaved event. + */ +interface ASPxClientReportDesignerReportSavedEventHandler { + /** + * A method that will handle the ReportSaved event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; +} +/** + * A method that will handle the ReportOpening event. + */ +interface ASPxClientReportDesignerReportOpeningEventHandler { + /** + * A method that will handle the ReportOpening event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; +} +/** + * A method that will handle the ReportOpened event. + */ +interface ASPxClientReportDesignerReportOpenedEventHandler { + /** + * A method that will handle the ReportOpened event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; +} +/** + * A method that will handle the OnServerError event. + */ +interface ASPxClientReportDesignerErrorEventHandler { + /** + * A method that will handle the OnServerError event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerErrorEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerErrorEventArgs): void; +} +/** + * A method that will handle the ComponentAdded event. + */ +interface ASPxClientReportDesignerComponentAddedEventHandler { + /** + * A method that will handle the ComponentAdded event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerComponentAddedEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerComponentAddedEventArgs): void; +} +/** + * A method that will handle the CustomizeSaveDialog event. + */ +interface ASPxClientReportDesignerCustomizeSaveDialogEventHandler { + /** + * A method that will handle the CustomizeSaveDialog event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerCustomizeSaveDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerCustomizeSaveDialogEventArgs): void; +} +/** + * A method that will handle the CustomizeSaveAsDialog event. + */ +interface ASPxClientReportDesignerCustomizeSaveAsDialogEventHandler { + /** + * A method that will handle the CustomizeSaveAsDialog event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerCustomizeSaveAsDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerCustomizeSaveAsDialogEventArgs): void; +} +/** + * A method that will handle the CustomizeOpenDialog event. + */ +interface ASPxClientReportDesignerCustomizeOpenDialogEventHandler { + /** + * A method that will handle the CustomizeOpenDialog event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerCustomizeOpenDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerCustomizeOpenDialogEventArgs): void; +} +/** + * A method that will handle the CustomizeToolbox event. + */ +interface ASPxClientReportDesignerCustomizeToolboxEventHandler { + /** + * A method that will handle the CustomizeToolbox event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerCustomizeToolboxEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerCustomizeToolboxEventArgs): void; +} +/** + * Provides information about a value editor used in the Property Grid. + */ +interface ASPxDesignerEditorOptions { + /** + * Provides access to the name of an HTML template specifying the editor and header of a complex object. + * Value: A string that specifies the HTML template. + */ + header: string; + /** + * Provides access to the name of an HTML template used by a complex object's editor. + * Value: A string that specifies the name of an HTML template. + */ + content: string; + /** + * Provides access to the type of the editor model. + * Value: An object that specifies the editor type. + */ + editorType: Object; +} +/** + * Provides functionality to an undo/redo engine in the Web Report Designer. + */ +interface ASPxDesignerUndoEngine { + /** + * Provides access to a value that specifies whether or not the redo action can currently be performed. + * Value: A knockout observable boolean object, whose value is true if the redo action can be performed, and false otherwise. + */ + redoEnabled: any; + /** + * Provides access to a value that specifies whether or not the undo action can currently be performed. + * Value: A knockout observable boolean object, whose value is true if the undo action can be performed, and false otherwise. + */ + undoEnabled: any; + /** + * Provides access to a value that specifies whether or not a report has been changed. + * Value: A knockout observable boolean object, whose value is true if the report has been modified, and false otherwise. + */ + isDirty: any; + /** + * Undoes all changes made to a report. + */ + undoAll(): void; + /** + * Clears information about edit operations made to a report, so they cannot not be undone. + */ + clearHistory(): void; + /** + * Undoes the last edit action in a report. + */ + undo(): void; + /** + * Reverses the results of the last undo action. + */ + redo(): void; +} +/** + * Provides functionality for a tab displayed a report in the Web Report Designer. + */ +interface ASPxDesignerNavigateTab { + /** + * Provides access to a value that specifies the display name of the current tab. + * Value: A knockout computed string that specifies the tab's display name. + */ + displayName: any; + /** + * Provides access to a value that specifies whether or not the report in the current tab has been changed. + * Value: A knockout computed boolean object, whose value is true if the report has been modified, and false otherwise. + */ + isDirty: any; + /** + * Provides access to a report opened in the current tab. + * Value: A knockout observable object that specifies a report opened in the current tab. + */ + report: any; + /** + * Provides access to an engine that manages undo and redo operations in the Web Report Designer. + * Value: An object that specifies an undo/redo engine. + */ + undoEngine: ASPxDesignerUndoEngine; + /** + * Provides access to the URL of a report opened in the current tab. + * Value: A knockout observable string that specifies the report URL. + */ + url: any; +} +/** + * A model of dialogs used to save and open reports in the Web Report Designer. + */ +interface ASPxDesignerDialogModel { + /** + * Provides access to the collection of buttons displayed in a dialog. + * Value: An array of objects that specify buttons displayed in a dialog. + */ + popupButtons: Object[]; + /** + * Specifies a function that gets the report URL. + */ + getUrl(): string; + /** + * Specifies a function that sets the report URL. + * @param url A string that specifies the report URL. + */ + setUrl(url: string): void; + /** + * Specifies a function to be executed when showing a dialog. + * @param tab An object that specifies the report tab for which a dialog is invoked. + */ + onShow(tab: ASPxDesignerNavigateTab): void; +} +/** + * Provides the base functionality for dialogs used to open and save reports on the client side of the Web Report Designer. + */ +interface ASPxDesignerReportDialogBase { + /** + * Provides access to a dialog's width. + * Value: A knockout observable object that specifies a dialog's width. + */ + width: any; + /** + * Provides access to a dialog's height. + * Value: A knockout observable object that specifies a dialog's height. + */ + height: any; + /** + * Provides access to the name of an HTML template used by a dialog. + * Value: A knockout observable string that specifies the name of the HTML template used by a dialog. + */ + template: any; + /** + * Provides access to buttons displayed in a dialog. + * Value: An array of objects that specify buttons displayed in the dialog. + */ + buttons: Object[]; + /** + * Provides access to a dialog's model. + * Value: A knockout observable object of the ASPxDesignerDialogModel type. + */ + model: any; + /** + * Provides access to a report tab for which a dialog appears. + * Value: A knockout observable object of the ASPxDesignerNavigateTab type. + */ + tab: any; + /** + * Provides access to a value that specifies a dialog's visibility state. + * Value: true, if the dialog is visible; otherwise, false; + */ + visible: any; + /** + * Provides access to a dialog's title. + * Value: A string that specifies a dialog's title. + */ + title: string; + /** + * Shows the dialog for the specified report tab. + * @param tab A report tab for which the dialog should be shown. + */ + show(tab: ASPxDesignerNavigateTab): void; + /** + * Customizes the dialog based on the specified template and model. + * @param template A string that specifies the name of an HTML template for the dialog. + * @param model An object that specifies the dialog model. + */ + customize(template: string, model: ASPxDesignerDialogModel): void; + /** + * Cancels the dialog. + */ + cancel(): void; +} +/** + * Provides functionality for the Save dialog on the client side of the Web Report Designer. + */ +interface ASPxDesignerSaveDialog extends ASPxDesignerReportDialogBase { + /** + * Provides access to the Save Report dialog that appears if a user selected to save changes in the Save dialog. + * Value: An object that specifies the Save As dialog. + */ + saveReportDialog: ASPxDesignerSaveAsDialog; + /** + * Saves the report with the specified URL. + * @param url A string that specifies an URL of the report to be saved. + */ + save(url: string): void; + /** + * Closes the dialog without saving the current report. + */ + notSave(): void; +} +/** + * Provides functionality for the Save Report dialog on the client side of the Web Report Designer. + */ +interface ASPxDesignerSaveAsDialog extends ASPxDesignerReportDialogBase { + /** + * Saves the report with the specified URL. + * @param url A string that specifies a URL of the report to be saved. + */ + save(url: string): void; +} +/** + * Provides functionality for the Open Report dialog on the client side of the Web Report Designer. + */ +interface ASPxDesignerOpenDialog extends ASPxDesignerReportDialogBase { + /** + * Opens the report with the specified URL. + * @param url A string that specifies an URL of the report to be opened. + */ + open(url: string): void; +} +/** + * Provides information about a toolbox control item. + */ +interface ASPxDesignerToolboxItem { + /** + * Provides access to information required to serialize a toolbox control. + * Value: An array of ASPxDesignerElementSerializationInfo objects that provide information required to serialize an element. + */ + info: ASPxDesignerElementSerializationInfo[]; + /** + * Provides access to a surface type of toolbox control. + * Value: A surface type of toolbox control. + */ + surfaceType: any; + /** + * Provides access to a toolbox control type. + * Value: A toolbox control type. + */ + type: any; + /** + * Provides access to a zero-based index of a control in the toolbox. + * Value: An integer value that specifies a control index in the toolbox. + */ + toolboxIndex: number; + /** + * Provides access to the default property values used for a toolbox control. + * Value: An object that specifies default propery values. + */ + defaultVal: Object; + /** + * Provides access to popular properties of a toolbox control. + * Value: An array of strings that specify names of popular properties. + */ + popularProperties: string[]; + /** + * Gets whether a control item is displayed in a toolbox. + * Value: true, if the control is available in the toolbox; otherwise, false. + */ + isToolboxItem: boolean; +} +/** + * Enables you to customize controls available in the Toolbox of the Web Report Designer. + */ +interface ASPxDesignerControlsFactory { + /** + * Returns information about the specified toolbox control. + * @param controlType A string that specifies the control type. + */ + getControlInfo(controlType: string): ASPxDesignerToolboxItem; + /** + * Returns a control type by the specified model. + * @param model An object that specifies the control model. + */ + getControlType(model: Object): string; + /** + * Registers the specified control in the Toolbox of the Web Report Designer. + * @param typeName A string that specifies the name of a custom control. + * @param metadata An ASPxDesignerToolboxItem object that provides information about a toolbox item. + */ + registerControl(typeName: string, metadata: ASPxDesignerToolboxItem): void; + /** + * Returns information about the specified property of the specified control. + * @param controlType A string that specifies the control type. + * @param propertyDisplayName A string that specifies the property display name. + */ + getPropertyInfo(controlType: string, propertyDisplayName: string): ASPxDesignerElementSerializationInfo; +} +/** + * Provides information about a report parameter type. + */ +interface ASPxDesignerParameterType { + /** + * Provides access to an actual parameter type. + * Value: A string that specifies the parameter type. + */ + value: string; + /** + * Provides access to a text displayed to end-users when creating parameters of the current type. + * Value: A string displayed to end-users. + */ + displayValue: string; + /** + * Provides access to the default value for parameters of the current type. + * Value: An object that specifies the default value. + */ + defaultVal: Object; + /** + * Provides access to the specifics of a current parameter type. + * Value: Parameter type specifics. + */ + specifics: string; + /** + * Converts the specified parameter value to the current parameter type. + * @param val An object that specifies the parameter value to be converted. + */ + valueConverter(val: Object): Object; +} /** * The client-side equivalent of the ASPxClientDocumentViewer control's Document Map. */ @@ -24562,8 +29956,19 @@ interface ASPxClientReportParametersPanel extends ASPxClientControl { */ GetEditorByParameterName(parameterName: string): ASPxClientControl; } +/** + * Provides information about a report parameter on the client side. + */ interface ASPxClientReportParameterInfo { + /** + * Specifies the parameter path, relative to its parent container (e.g., "subreport1.subreportParameter1" for a subreport's parameter, or "parameter1" for a report's parameter). + * Value: A String value, specifying the parameter path (e.g., "subreport1.subreportParameter1"). + */ Path: string; + /** + * Provides access to a parameter value on the client. + * Value: A Object value. + */ Value: Object; } /** @@ -24638,11 +30043,19 @@ interface ASPxClientReportViewer extends ASPxClientControl { */ IsSearchAllowed(): boolean; } +/** + * A method that will handle the PageLoad events. + */ interface ASPxClientReportViewerPageLoadEventHandler { + /** + * A method that will handle the PageLoad event. + * @param source The event sender. + * @param e An ASPxClientReportViewerPageLoadEventArgs object that contains data related to the event. + */ (source: S, e: ASPxClientReportViewerPageLoadEventArgs): void; } /** - * Provides data for a Report Viewer's PageLoad event on the client side. + * Provides data for the PageLoad events on the client side. */ interface ASPxClientReportViewerPageLoadEventArgs extends ASPxClientEventArgs { /** @@ -24679,11 +30092,116 @@ interface ASPxClientCustomizeParameterEditorsEventArgs extends ASPxClientEventAr */ info: ASPxDesignerElementSerializationInfo; } +/** + * Provides data for the CustomizeParameterLookUpSource events. + */ interface ASPxClientCustomizeParameterLookUpSourceEventArgs extends ASPxClientEventArgs { + /** + * Provides access to an object that stores information about a parameter. + * Value: An ASPxDesignerElementParameterDescriptor object that stores information about the parameter. + */ parameter: ASPxDesignerElementParameterDescriptor; + /** + * Provides access to the collection of look-up parameter values. + * Value: An array of ASPxDesignerElementEditorItem objects that store information about look-up parameter values. + */ items: ASPxDesignerElementEditorItem[]; + /** + * Specifies the data source that provides look-up values for the parameter editor. + * Value: An Object specifying the data source that provides look-up values to the parameter editor. + */ dataSource: Object; } +/** + * Provides information about a command available in the toolbar or menu. + */ +interface ASPxClientMenuAction { + /** + * Provides access to the text for the command. + * Value: A string that is the command text. + */ + text: string; + /** + * Provides access to the CSS class of the command's glyph. + * Value: A string that specifies the name of the CSS class. + */ + imageClassName: string; + /** + * Provides access to the action performed when a button is clicked. + * Value: The specific action implementation. + */ + clickAction: Function; + /** + * Provides access to the value that specifies whether or not the command is disabled by default. + * Value: true, if the command is disabled by default; otherwise, false. + */ + disabled: boolean; + /** + * Provides access to the value that specifies whether or not the command is visible in the user interface. + * Value: true if the command is visible; otherwise false. + */ + visible: boolean; + /** + * Provides access to the keyboard shortcut used to invoke the command. + * Value: An ASPxClientMenuActionHotKey object that specifies the keyboard shortcut. + */ + hotKey: ASPxClientMenuActionHotKey; + /** + * Provides access to the value that specifies whether or not the command has a visual separator. + * Value: true, if the command has a visual separator; otherwise, false. + */ + hasSeparator: string; + /** + * Provides access to a value that specifies the command location. + * Value: A string that specifies the command location. + */ + container: string; +} +/** + * Provides information about a hot key used to perform an action assigned to a menu item. + */ +interface ASPxClientMenuActionHotKey { + /** + * Provides access to a hot key code. + * Value: An integer value that specifies the hot key code. + */ + keyCode: number; + /** + * Provides access to a value that specifies whether the CTRL key is used in combination with a hot key. + * Value: true, if the CTRL key is included into the key combination; otherwise, false. + */ + ctrlKey: boolean; +} +/** + * Provides data for the CustomizeMenuActions. + */ +interface ASPxClientCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the collection of actions available in the toolbar and menu. + * Value: An array of ASPxClientMenuAction objects. + */ + Actions: ASPxClientMenuAction[]; + /** + * Returns a menu action with the specified ID. + * @param actionId A String value that specifies the action ID. + */ + GetById(actionId: string): ASPxClientMenuAction; +} +/** + * Provides data for the CustomizeElements events. + */ +interface ASPxClientCustomizeElementsEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the collection of UI elements. + * Value: An array of the ASPxReportUIElement objects. + */ + Elements: ASPxReportUIElement[]; + /** + * Returns UI elements with the specified ID. + * @param templateId A string that specifies the element ID. + */ + GetById(templateId: string): ASPxReportUIElement[]; +} /** * Provides general information about a report parameter. */ @@ -24793,6 +30311,11 @@ interface ASPxDesignerElementEditor { * Value: A String value. */ content: string; + /** + * Gets additional options for DevExtreme UI widgets. + * Value: An object that provides editor options. + */ + extendedOptions: Object; /** * Gets a nullable value, specifying the type of the editor's model. * Value: A Object value. @@ -24814,10 +30337,251 @@ interface ASPxDesignerElementEditorItem { */ displayValue: string; } +/** + * Provides information about a UI element of the Web Report Designer or Web Document Viewer. + */ +interface ASPxReportUIElement { + /** + * Provides access to an element model. + * Value: An object that specifies the element model. + */ + model: Object; + /** + * Provides access to the name of an HTML template used by an element. + * Value: A string that specifies the name of the HTML template. + */ + templateName: string; +} +/** + * Provides data for the PreviewDocumentReady events. + */ +interface ASPxClientWebDocumentViewerDocumentReadyEventArgs extends ASPxClientEventArgs { + /** + * Specifies the report ID. + */ + ReportId: string; + /** + * Specifies the report document ID. + */ + DocumentId: string; + /** + * Specifies the total number of pages in a report document. + */ + PageCount: number; +} +/** + * Provides data for the PreviewEditingFieldChanged events. + */ +interface ASPxClientWebDocumentViewerEditingFieldChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets an editing field whose value has been changed. + * Value: An object that specifies an editing field whose content has been changed. + */ + Field: ASPxClientWebDocumentViewerEditingField; + /** + * Provides access to a previous value of an editing field. + * Value: An object that specifies an editing field's previous value. + */ + OldValue: Object; + /** + * Provides access to a new value of an editing field. + * Value: An object that specifies an editing field's new value. + */ + NewValue: Object; +} +/** + * Provides functionality for a field whose content can be edited in the Web Document Viewer. + */ +interface ASPxClientWebDocumentViewerEditingField { + /** + * Provides access to a value that specifies whether or not an editing field's content can be customized in Print Preview. + * Returns: true, if a field cannot be edited in Print Preview; otherwise, false. + */ + readOnly: any; + /** + * Provides access to the current value of an editing field. + * Returns: An object that specifies the current field value. + */ + editValue: any; + /** + * Returns the unique identifier of an editing field. + */ + id(): string; + /** + * Returns the ID of a logical group to which an editing field for a check box belongs. + */ + groupID(): string; + /** + * Returns the name of an editor used to change a field value in Print Preview. + */ + editorName(): string; + /** + * Returns the index of the page on which an editing field is located. + */ + pageIndex(): number; +} +/** + * Provides data for the PreviewParametersSubmitted events. + */ +interface ASPxClientParametersSubmittedEventArgs extends ASPxClientEventArgs { + /** + * Provides access to a View Model for report parameters. + * Value: A View Model object. + */ + ParametersViewModel: Object; + /** + * Provides access to report parameters and their submitted values. + * Value: A dictionary containing the parameter names along with their values. + */ + Parameters: { [key: string]: Object; }; +} +/** + * Provides data for the PreviewParametersReset events. + */ +interface ASPxClientParametersResetEventArgs extends ASPxClientEventArgs { + /** + * Provides access to a View Model for report parameters. + * Value: A View Model object. + */ + ParametersViewModel: Object; + /** + * Provides access to report parameters whose values have been reset. + * Value: An ASPxClientWebDocumentViewerParameter array. + */ + Parameters: ASPxClientWebDocumentViewerParameter[]; +} +/** + * Provides general information about a report parameter on the client-side of the Web Document Viewer. + */ +interface ASPxClientWebDocumentViewerParameter { + /** + * Provides access to the current value of a report parameter. + * Value: An object that specifies the report parameter's current value. + */ + value: Object; + /** + * Provides access to a report parameter's value type. + * Value: An object that specifies the report parameter type. + */ + type: Object; + /** + * Provides access to a value that specifies whether or not a parameter can have multiple values. + * Value: true, if a parameter can have multiple values; otherwise, false. + */ + isMultiValue: boolean; + /** + * Returns an object that provides general information about a report parameter. + */ + getParameterDescriptor(): ASPxDesignerElementParameterDescriptor; +} +/** + * Provides data for the PreviewClick events. + */ +interface ASPxClientPreviewClickEventArgs extends ASPxClientEventArgs { + /** + * Gets a value specifying the zero-based index of the page that has been clicked. + * Value: An integer value that specifies a page index. + */ + PageIndex: number; + /** + * Provides information on a visual brick representing content of a report control that has been clicked. + * Value: An object that provides information on a visual brick. + */ + Brick: ASPxClientWebDocumentViewerBrick; + /** + * Specifies whether or not the event was handled and no default processing is required. + * Value: true, if the event is completely handled by custom code and no default processing is required; otherwise, false. + */ + Handled: boolean; + /** + * Specifies the default function used to handle the PreviewClick event. + */ + DefaultHandler(): void; + /** + * Returns the text displayed by the Brick. + */ + GetBrickText(): string; + /** + * Returns a string providing additional information on the Brick. + */ + GetBrickValue(): string; +} +/** + * Provides information about a visual brick used to render a report control to construct a document in the Web Document Viewer. + */ +interface ASPxClientWebDocumentViewerBrick { + /** + * Provides access to a brick's content. + * Value: A dictionary that stores content keys along with the corresponding contents. + */ + content: { [key: string]: string; }; + /** + * Provides access to navigation settings of the current brick. + * Value: An object that provides a brick's navigation settings. + */ + navigation: ASPxClientWebDocumentViewerBrickNavigation; + /** + * Provides access to a brick's top vertical coordinate. + * Value: An integer value that specifies the brick's top coordinate. + */ + top: number; + /** + * Provides access to a brick's left horizontal coordinate. + * Value: An integer value that specifies the brick's left coordinate. + */ + left: number; + /** + * Provides access to a brick's width. + * Value: An integer value that specifies the brick width. + */ + width: number; + /** + * Provides access to a brick's height. + * Value: An integer value that specifies the brick height. + */ + height: number; + /** + * Provides access to a value that specifies whether or not the right-to-left feature is enabled for a brick. + * Value: true, if the right-to-left feature is enabled; otherwise, false. + */ + rtl: boolean; +} +/** + * Provides navigation settings for a brick used to construct a document in the Web Document Viewer. + */ +interface ASPxClientWebDocumentViewerBrickNavigation { + /** + * Provides access to the URL to navigate to when a brick is a clicked. + * Value: A string that specifies the URL. + */ + url: string; + /** + * Provides access to a value that specifies the target window or frame in which to display the linked Web page's content when the brick is clicked. + * Value: A string that specifies the window or frame to which to target the URL's content. + */ + target: string; + /** + * Provides access to a drill-down key. + * Value: A string that specifies a drill-down key. + */ + drillDownKey: string; +} /** * A client-side equivalent of the ASPxWebDocumentViewer class. */ interface ASPxClientWebDocumentViewer extends ASPxClientControl { + /** + * Occurs after a report document has been loaded to the Web Document Viewer. + */ + DocumentReady: ASPxClientEvent>; + /** + * Occurs each time a value of an editing field changes. + */ + EditingFieldChanged: ASPxClientEvent>; + /** + * Enables you to customize UI elements of the Web Document Viewer. + */ + CustomizeElements: ASPxClientEvent>; /** * Enables you to customize the menu actions of a Web Document Viewer. */ @@ -24830,14 +30594,31 @@ interface ASPxClientWebDocumentViewer extends ASPxClientControl { * Occurs each time a look-up editor is created for a report parameter. */ CustomizeParameterLookUpSource: ASPxClientEvent>; + /** + * Occurs when the left mouse button has been clicked over a report document. + */ + PreviewClick: ASPxClientEvent>; + /** + * Occurs after report parameter values have been reset to their default values. + */ + ParametersReset: ASPxClientEvent>; + /** + * Occurs after report parameter values have been submitted. + */ + ParametersSubmitted: ASPxClientEvent>; /** * Provides access to the preview model of the ASPxClientWebDocumentViewer. */ GetPreviewModel(): Object; /** - * Opens the specified report in the HTML5 Document Viewer. + * Returns a model for a report parameter. */ - OpenReport(): Object; + GetParametersModel(): Object; + /** + * Opens the specified report on the client side of the Web Document Viewer. + * @param url A string that specifies the URL of a report to be opened. + */ + OpenReport(url: string): any; /** * Prints the current document. */ @@ -24853,9 +30634,36 @@ interface ASPxClientWebDocumentViewer extends ASPxClientControl { ExportTo(): void; /** * Exports the document to a specified file format. - * @param format A String value, specifying the export format. The following formats are currently supported: 'csv', 'html', 'image', 'mht', 'pdf', 'rtf', 'txt', 'xls', and 'xlsx'. + * @param format A String value, specifying the export format. The following formats are currently supported: 'csv', 'html', 'image', 'mht', 'pdf', 'rtf', 'docx', 'txt', 'xls', and 'xlsx'. */ ExportTo(format: string): void; + /** + * Exports the document to a specified file format. + * @param format A String value that specifies the export format. The following formats are currently supported: 'csv', 'html', 'image', 'mht', 'pdf', 'rtf', 'docx', 'txt', 'xls', and 'xlsx'. + * @param inlineResult true, to try opening the result file in a new browser tab without a download; otherwise, false. + */ + ExportTo(format: string, inlineResult: boolean): void; + /** + * Returns the zero-based index of the currently displayed page. + */ + GetCurrentPageIndex(): number; + /** + * Displays the report page with the specified page index. + * @param pageIndex A zero-based integer value that specifies the index of a page to be displayed. + */ + GoToPage(pageIndex: number): void; + /** + * Closes the document currently being opened in the Web Document Viewer. + */ + Close(): void; + /** + * Resets the values of report parameters to their default values. + */ + ResetParameters(): void; + /** + * Starts building a report document. + */ + StartBuild(): void; /** * Updates the localization settings of the ASPxClientWebDocumentViewer properties. * @param localization A dictionary containing the property names, along with their localized equivalents. @@ -24863,64 +30671,37 @@ interface ASPxClientWebDocumentViewer extends ASPxClientControl { UpdateLocalization(localization: { [key: string]: string; }): void; } /** - * Provides settings to the actions listed in a Web Document Viewer menu. + * A method that will handle the EditingFieldChanged event. */ -interface ASPxClientWebDocumentViewerMenuAction { +interface ASPxClientWebDocumentViewerEditingFieldChangedEventHandler { /** - * Provides access to the text for the command. - * Value: A String value. + * A method that will handle the PreviewEditingFieldChanged event. + * @param source The event sender. + * @param e An ASPxClientWebDocumentViewerEditingFieldChangedEventArgs object that contains data related to the event. */ - text: string; - /** - * Provides access to the CSS class of the command's glyph. - * Value: A String value. - */ - imageClassName: string; - /** - * Provides access to the action performed when a Document Viewer's button is clicked. - * Value: The specific action implementation. - */ - clickAction: Function; - /** - * Provides access to the value that specifies whether or not the command is disabled by default. - * Value: true, if the command is disabled by default; otherwise, false. - */ - disabled: boolean; - /** - * Provides access to the value that specifies whether or not the command is visible in the Document Viewer user interface. - * Value: true if the command is visible; otherwise false. - */ - visible: boolean; - /** - * Provides access to the keyboard shortcut used to invoke the command. - * Value: A String value. - */ - hotKey: string; - /** - * Provides access to the value that specifies whether or not the command has a visual separator. - * Value: true, if the command has a visual separator; otherwise, false. - */ - hasSeparator: string; - /** - * Provides access to the location of the displayed command. - * Value: A String value. - */ - container: string; + (source: S, e: ASPxClientWebDocumentViewerEditingFieldChangedEventArgs): void; } /** - * Provides data for the CustomizeMenuActions event. + * A method that will handle the DocumentReady event. */ -interface ASPxClientWebDocumentViewerCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { +interface ASPxClientWebDocumentViewerDocumentReadyEventHandler { /** - * Returns the collection of customized menu actions. - * Value: An ASPxClientWebDocumentViewerMenuAction array. + * A method that will handle the PreviewDocumentReady event. + * @param source The event sender. + * @param e An ASPxClientWebDocumentViewerDocumentReadyEventArgs object that contains data related to the event. */ - Actions: ASPxClientWebDocumentViewerMenuAction[]; + (source: S, e: ASPxClientWebDocumentViewerDocumentReadyEventArgs): void; +} +/** + * A method that will handle the CustomizeElements event. + */ +interface ASPxClientWebDocumentViewerCustomizeElementsEventHandler { /** - * Returns a menu action with the specified ID. - * @param actionId A String value, specifying the action ID. + * A method that will handle the PreviewCustomizeElements event. + * @param source The event sender. + * @param e An ASPxClientCustomizeElementsEventArgs object that contains data related to the event. */ - GetById(actionId: string): ASPxClientWebDocumentViewerMenuAction; + (source: S, e: ASPxClientCustomizeElementsEventArgs): void; } /** * A method that will handle the CustomizeMenuActions event. @@ -24929,9 +30710,9 @@ interface ASPxClientWebDocumentViewerCustomizeMenuActionsEventHandler { /** * A method that will handle the CustomizeMenuActions event. * @param source The event sender. - * @param e An ASPxClientWebDocumentViewerCustomizeMenuActionsEventArgs object that contains data related to the event. + * @param e An ASPxClientCustomizeMenuActionsEventArgs object that contains data related to the event. */ - (source: S, e: ASPxClientWebDocumentViewerCustomizeMenuActionsEventArgs): void; + (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; } /** * A method that will handle the CustomizeParameterEditors event. @@ -24944,8 +30725,49 @@ interface ASPxClientWebDocumentViewerCustomizeParameterEditorsEventHandler { */ (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; } +/** + * A method that will handle the CustomizeParameterLookUpSource event. + */ interface ASPxClientWebDocumentViewerCustomizeParameterLookUpSourceEventHandler { - (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; + /** + * A method that will handle the CustomizeParameterLookUpSource event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterLookUpSourceEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterLookUpSourceEventArgs): void; +} +/** + * A method that will handle the PreviewClick event. + */ +interface ASPxClientWebDocumentViewerPreviewClickEventHandler { + /** + * A method that will handle the PreviewClick event. + * @param source The event sender. + * @param e An ASPxClientPreviewClickEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientPreviewClickEventArgs): void; +} +/** + * A method that will handle the ParametersReset event. + */ +interface ASPxClientWebDocumentViewerParametersResetEventHandler { + /** + * A method that will handle the PreviewParametersReset event. + * @param source The event sender. + * @param e An ASPxClientParametersResetEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientParametersResetEventArgs): void; +} +/** + * A method that will handle the ParametersSubmitted event. + */ +interface ASPxClientWebDocumentViewerParametersSubmittedEventHandler { + /** + * A method that will handle the PreviewParametersSubmitted event. + * @param source The event sender. + * @param e An ASPxClientParametersSubmittedEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientParametersSubmittedEventArgs): void; } interface MVCxClientDashboardViewerStatic extends ASPxClientDashboardViewerStatic { @@ -25014,15 +30836,6 @@ interface DashboardSpecialValuesStatic { */ IsErrorValue(value: Object): boolean; } -interface ASPxClientDashboardDesignerStatic extends ASPxClientControlStatic { -} -interface ASPxClientDashboardViewerStatic extends ASPxClientControlStatic { - /** - * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. - * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. - */ - Cast(obj: Object): ASPxClientDashboardViewer; -} interface DashboardExportPageLayoutStatic { /** * The page orientation used to export a dashboard (dashboard item) is portrait. @@ -25091,6 +30904,26 @@ interface DashboardExportFilterStateStatic { */ SeparatePage: string; } +interface DashboardStateExportPositionStatic { + /** + * The dashboard state is placed below the exported dashboard/dashboard item. + */ + Below: string; + /** + * The dashboard state is placed on a separate page. + */ + SeparatePage: string; +} +interface DashboardStateExcelExportPositionStatic { + /** + * The dashboard state is placed below the exported data. + */ + Below: string; + /** + * The dashboard state is placed on a separate sheet. + */ + SeparateSheet: string; +} interface DashboardExportImageFormatStatic { /** * The PNG image format. @@ -25105,6 +30938,11 @@ interface DashboardExportImageFormatStatic { */ Jpg: string; } +interface ExcelExportFilterStateStatic { + none: string; + below: string; + separatePage: string; +} interface DashboardExportExcelFormatStatic { /** * The Excel 97 - Excel 2003 (XLS) file format. @@ -25143,6 +30981,16 @@ interface MapExportSizeModeStatic { */ Zoom: string; } +interface TreemapExportSizeModeStatic { + /** + * For internal use. + */ + none: string; + /** + * For internal use. + */ + zoom: string; +} interface RangeFilterExportSizeModeStatic { /** * A Range Filter dashboard item is exported in a size identical to that shown on the dashboard. @@ -25162,6 +31010,15 @@ interface DashboardSelectionModeStatic { Single: string; Multiple: string; } +interface ASPxClientDashboardStatic extends ASPxClientControlStatic { +} +interface ASPxClientDashboardViewerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDashboardViewer; +} interface ASPxClientEditBaseStatic extends ASPxClientControlStatic { } interface ASPxClientEditStatic extends ASPxClientEditBaseStatic { @@ -25605,6 +31462,10 @@ interface ASPxClientGridViewCallbackCommandStatic { * Default value: "APPLYSEARCHPANELFILTER" */ ApplySearchPanelFilter: string; + /** + * Default value: "APPLYCUSTOMIZATIONDIALOGCHANGES" + */ + ApplyCustomizationDialogChanges: string; /** * Default value: "FILTERROWMENU" */ @@ -25673,6 +31534,10 @@ interface ASPxClientGridViewCallbackCommandStatic { * Default value: "CONTEXTMENU" */ ContextMenu: string; + /** + * Default value: "TOOLBAR" + */ + Toolbar: string; /** * Default value: "CUSTOMVALUES" */ @@ -26284,9 +32149,9 @@ interface ASPxSchedulerDateTimeHelperStatic { */ ToDayTime(date: Date): any; /** - * - * @param date - * @param dayCount + * Adds the specified number of days to a DateTime object and returns the result. + * @param date A DateTime object to which to add days. + * @param dayCount The number of days to add. */ AddDays(date: Date, dayCount: number): Date; /** @@ -26340,6 +32205,16 @@ interface ASPxClientSpellCheckerStatic extends ASPxClientControlStatic { */ Cast(obj: Object): ASPxClientSpellChecker; } +interface ASPxClientSpellCheckerStopCheckingReasonStatic { + /** + * Spell checking is finished normally. + */ + Default: string; + /** + * The user stopped spell checking. + */ + User: string; +} interface ASPxClientSpreadsheetStatic extends ASPxClientControlStatic { /** * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. @@ -26354,6 +32229,76 @@ interface ASPxClientTreeListStatic extends ASPxClientControlStatic { */ Cast(obj: Object): ASPxClientTreeList; } +interface BootstrapClientAccordionStatic extends ASPxClientNavBarStatic { +} +interface BootstrapClientBinaryImageStatic extends ASPxClientHyperLinkStatic { +} +interface BootstrapClientButtonStatic extends ASPxClientButtonStatic { +} +interface BootstrapClientCalendarStatic extends ASPxClientCalendarStatic { +} +interface BootstrapClientCallbackPanelStatic extends ASPxClientControlStatic { +} +interface BootstrapClientChartBaseStatic extends ASPxClientControlStatic { +} +interface BootstrapClientChartStatic extends BootstrapClientChartBaseStatic { +} +interface BootstrapClientPolarChartStatic extends BootstrapClientChartBaseStatic { +} +interface BootstrapClientPieChartStatic extends BootstrapClientChartBaseStatic { +} +interface BootstrapClientCheckBoxStatic extends ASPxClientEditStatic { +} +interface BootstrapClientRadioButtonStatic extends BootstrapClientCheckBoxStatic { +} +interface BootstrapClientComboBoxStatic extends ASPxClientComboBoxStatic { +} +interface BootstrapClientDateEditStatic extends ASPxClientDateEditStatic { +} +interface BootstrapClientDropDownEditStatic extends ASPxClientDropDownEditStatic { +} +interface BootstrapClientFormLayoutStatic extends ASPxClientFormLayoutStatic { +} +interface BootstrapClientHyperLinkStatic extends ASPxClientHyperLinkStatic { +} +interface BootstrapClientImageStatic extends ASPxClientImageStatic { +} +interface BootstrapClientListBoxStatic extends ASPxClientListBoxStatic { +} +interface BootstrapClientCheckBoxListStatic extends ASPxClientCheckBoxListStatic { +} +interface BootstrapClientRadioButtonListStatic extends ASPxClientRadioButtonListStatic { +} +interface BootstrapClientMenuStatic extends ASPxClientMenuStatic { +} +interface BootstrapClientPagerStatic extends ASPxClientPagerStatic { +} +interface BootstrapClientPopupControlStatic extends ASPxClientPopupControlStatic { +} +interface BootstrapClientPopupMenuStatic extends ASPxClientPopupMenuStatic { +} +interface BootstrapClientProgressBarStatic extends ASPxClientProgressBarStatic { +} +interface BootstrapClientSpinEditStatic extends ASPxClientSpinEditStatic { +} +interface BootstrapClientTabControlStatic extends ASPxClientTabControlStatic { +} +interface BootstrapClientPageControlStatic extends ASPxClientPageControlStatic { +} +interface BootstrapClientTextBoxStatic extends ASPxClientTextBoxStatic { +} +interface BootstrapClientMemoStatic extends ASPxClientMemoStatic { +} +interface BootstrapClientButtonEditStatic extends ASPxClientButtonEditStatic { +} +interface BootstrapClientTreeViewStatic extends ASPxClientTreeViewStatic { +} +interface BootstrapUIWidgetBaseStatic extends ASPxClientControlStatic { +} +interface BootstrapClientUploadControlStatic extends ASPxClientUploadControlStatic { +} +interface BootstrapClientGridViewStatic extends ASPxClientGridViewStatic { +} interface MVCxClientCalendarStatic extends ASPxClientCalendarStatic { /** * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. @@ -26501,8 +32446,17 @@ interface MVCxClientSchedulerStatic extends ASPxClientSchedulerStatic { Cast(obj: Object): MVCxClientScheduler; } interface MVCxSchedulerToolTipTypeStatic { + /** + * The tooltip is displayed for a selected appointment. + */ Appointment: number; + /** + * The tooltip is displayed for a dragged appointment. + */ AppointmentDrag: number; + /** + * The tooltip is displayed for a selected time interval. + */ Selection: number; } interface MVCxClientSpreadsheetStatic extends ASPxClientSpreadsheetStatic { @@ -26629,7 +32583,21 @@ interface ASPxClientCallbackStatic extends ASPxClientControlStatic { */ Cast(obj: Object): ASPxClientCallback; } -interface ASPxClientCallbackPanelStatic extends ASPxClientControlStatic { +interface ASPxClientPanelBaseStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPanelBase; +} +interface ASPxClientPanelStatic extends ASPxClientPanelBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPanel; +} +interface ASPxClientCallbackPanelStatic extends ASPxClientPanelStatic { /** * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. @@ -26774,6 +32742,82 @@ interface ASPxClientHiddenFieldStatic extends ASPxClientControlStatic { */ Cast(obj: Object): ASPxClientHiddenField; } +interface ASPxClientHintStatic extends ASPxClientControlStatic { + /** + * Forces the hint to reselect target UI elements according to the specified CSS selector. + */ + Update(): void; + /** + * Forces the hint to recalculate its position. + */ + UpdatePosition(): void; + /** + * Forces the hint to recalculate its position. + * @param hintElementOrTargetElement An object that is the hint element or the target element. + */ + UpdatePosition(hintElementOrTargetElement: Object): void; + /** + * Registers a hint's functionality with the specified settings. + * @param targetSelector A string value that is the CSS selector. Specifies to which UI elements the hint is displayed. + * @param options An ASPxClientHintOptions object that is the hint's options. + */ + Register(targetSelector: string, options: ASPxClientHintOptions): ASPxClientHint; + /** + * Registers a hint's functionality with the specified settings. + * @param targetSelector A string value that is the CSS selector. Specifies to which UI elements the hint is displayed. + * @param contentAttribute A string value that is the attribute name. Specifies from which target element's attribute a hint obtains its content. + */ + Register(targetSelector: string, contentAttribute: string): ASPxClientHint; + /** + * Registers a hint's functionality with the specified settings. + * @param targetSelector A string value that is the CSS selector. Specifies for which UI elements the hint is displayed. + * @param onShowing An ASPxClientHintShowingEventHandler object that is a handler for the displayed event. + */ + Register(targetSelector: string, onShowing: ASPxClientHintShowingEventHandler): ASPxClientHint; + /** + * Invokes a hint. + * @param targetSelector A string value that is the CSS selector. + * @param options An ASPxClientHintOptions object that is the hint's options. + */ + Show(targetSelector: string, options: ASPxClientHintOptions): void; + /** + * Invokes a hint. + * @param targetSelector A string value that is the CSS selector used to specify for which UI elements on a web page a hint is displayed. + * @param content A string value that is the hint's content. + */ + Show(targetSelector: string, content: string): void; + /** + * Invokes a hint. + * @param targetElement An object that is the target element. + * @param options An ASPxClientHintOptions object that is the hint's options. + */ + Show(targetElement: Object, options: ASPxClientHintOptions): void; + /** + * Invokes a hint. + * @param targetElement A HTML DOM element near to which the hint is displayed in response to user interaction. + * @param content A string value that is the hint's content. + */ + Show(targetElement: Object, content: string): void; + /** + * Invokes a hint. + * @param options An ASPxClientHintOptions object that is the hint's options. + */ + Show(options: ASPxClientHintOptions): void; + /** + * Hides a hint window. + * @param targetSelector A string value that is the CSS selector. + */ + Hide(targetSelector: string): void; + /** + * Hides a hint window. + * @param targetElementOrHintElement An object that is the target element or hint element. + */ + Hide(targetElementOrHintElement: Object): void; + /** + * Hides all hints. + */ + HideAll(): void; +} interface ASPxClientImageGalleryStatic extends ASPxClientDataViewStatic { /** * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. @@ -26799,6 +32843,8 @@ interface ASPxClientLoadingPanelStatic extends ASPxClientControlStatic { */ Cast(obj: Object): ASPxClientLoadingPanel; } +interface ASPxClientMediaFileSelectorStatic extends ASPxClientControlStatic { +} interface ASPxClientMenuBaseStatic extends ASPxClientControlStatic { /** * Returns a collection of client menu objects. @@ -26857,19 +32903,7 @@ interface ASPxClientObjectContainerStatic extends ASPxClientControlStatic { */ Cast(obj: Object): ASPxClientObjectContainer; } -interface ASPxClientPanelBaseStatic extends ASPxClientControlStatic { - /** - * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. - * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. - */ - Cast(obj: Object): ASPxClientPanelBase; -} -interface ASPxClientPanelStatic extends ASPxClientPanelBaseStatic { - /** - * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. - * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. - */ - Cast(obj: Object): ASPxClientPanel; +interface ASPxClientPagerStatic extends ASPxClientControlStatic { } interface ASPxClientPopupControlStatic extends ASPxClientPopupControlBaseStatic { /** @@ -27019,6 +33053,24 @@ interface ASPxClientUploadControlStatic extends ASPxClientControlStatic { */ Cast(obj: Object): ASPxClientUploadControl; } +interface ASPxClientUploadControlValidationErrorTypeConstsStatic { + /** + * The allowed maximum file size is exceeded. Return Value: 1 + */ + MaxFileSizeExceeded: number; + /** + * The file's extension is not allowed. Return Value: 2 + */ + NotAllowedFileExtension: number; + /** + * The allowed maximum count of the files is exceeded. Return Value: 3 + */ + MaxFileCountExceeded: number; + /** + * A file name contains invalid character.Return Value: 4 + */ + FileNameContainsInvalidCharacter: number; +} interface ASPxClientUtilsStatic { /** * Gets the user-agent string, which identifies the client browser and provides certain system details of the client computer. @@ -27363,6 +33415,11 @@ interface ASPxClientUtilsStatic { * @param str A string value representing the string for trimming. */ TrimEnd(str: string): string; + /** + * Specifies the text that Assistive Technologies (screen readers or braille display, for example) will provide to a user. + * @param message A String value that specifies a text. + */ + SendMessageToAssistiveTechnology(message: string): void; } interface ASPxClientChartDesignerStatic extends ASPxClientControlStatic { /** @@ -27428,18 +33485,22 @@ interface ASPxClientWebDocumentViewerStatic extends ASPxClientControlStatic { declare var MVCxClientDashboardViewer: MVCxClientDashboardViewerStatic; declare var DashboardDataAxisNames: DashboardDataAxisNamesStatic; declare var DashboardSpecialValues: DashboardSpecialValuesStatic; -declare var ASPxClientDashboardDesigner: ASPxClientDashboardDesignerStatic; -declare var ASPxClientDashboardViewer: ASPxClientDashboardViewerStatic; declare var DashboardExportPageLayout: DashboardExportPageLayoutStatic; declare var DashboardExportPaperKind: DashboardExportPaperKindStatic; declare var DashboardExportScaleMode: DashboardExportScaleModeStatic; declare var DashboardExportFilterState: DashboardExportFilterStateStatic; +declare var DashboardStateExportPosition: DashboardStateExportPositionStatic; +declare var DashboardStateExcelExportPosition: DashboardStateExcelExportPositionStatic; declare var DashboardExportImageFormat: DashboardExportImageFormatStatic; +declare var ExcelExportFilterState: ExcelExportFilterStateStatic; declare var DashboardExportExcelFormat: DashboardExportExcelFormatStatic; declare var ChartExportSizeMode: ChartExportSizeModeStatic; declare var MapExportSizeMode: MapExportSizeModeStatic; +declare var TreemapExportSizeMode: TreemapExportSizeModeStatic; declare var RangeFilterExportSizeMode: RangeFilterExportSizeModeStatic; declare var DashboardSelectionMode: DashboardSelectionModeStatic; +declare var ASPxClientDashboard: ASPxClientDashboardStatic; +declare var ASPxClientDashboardViewer: ASPxClientDashboardViewerStatic; declare var ASPxClientEditBase: ASPxClientEditBaseStatic; declare var ASPxClientEdit: ASPxClientEditStatic; declare var ASPxClientBinaryImage: ASPxClientBinaryImageStatic; @@ -27503,8 +33564,44 @@ declare var ASPxClientRecurrenceTypeEdit: ASPxClientRecurrenceTypeEditStatic; declare var ASPxClientTimeInterval: ASPxClientTimeIntervalStatic; declare var ASPxClientScheduler: ASPxClientSchedulerStatic; declare var ASPxClientSpellChecker: ASPxClientSpellCheckerStatic; +declare var ASPxClientSpellCheckerStopCheckingReason: ASPxClientSpellCheckerStopCheckingReasonStatic; declare var ASPxClientSpreadsheet: ASPxClientSpreadsheetStatic; declare var ASPxClientTreeList: ASPxClientTreeListStatic; +declare var BootstrapClientAccordion: BootstrapClientAccordionStatic; +declare var BootstrapClientBinaryImage: BootstrapClientBinaryImageStatic; +declare var BootstrapClientButton: BootstrapClientButtonStatic; +declare var BootstrapClientCalendar: BootstrapClientCalendarStatic; +declare var BootstrapClientCallbackPanel: BootstrapClientCallbackPanelStatic; +declare var BootstrapClientChartBase: BootstrapClientChartBaseStatic; +declare var BootstrapClientChart: BootstrapClientChartStatic; +declare var BootstrapClientPolarChart: BootstrapClientPolarChartStatic; +declare var BootstrapClientPieChart: BootstrapClientPieChartStatic; +declare var BootstrapClientCheckBox: BootstrapClientCheckBoxStatic; +declare var BootstrapClientRadioButton: BootstrapClientRadioButtonStatic; +declare var BootstrapClientComboBox: BootstrapClientComboBoxStatic; +declare var BootstrapClientDateEdit: BootstrapClientDateEditStatic; +declare var BootstrapClientDropDownEdit: BootstrapClientDropDownEditStatic; +declare var BootstrapClientFormLayout: BootstrapClientFormLayoutStatic; +declare var BootstrapClientHyperLink: BootstrapClientHyperLinkStatic; +declare var BootstrapClientImage: BootstrapClientImageStatic; +declare var BootstrapClientListBox: BootstrapClientListBoxStatic; +declare var BootstrapClientCheckBoxList: BootstrapClientCheckBoxListStatic; +declare var BootstrapClientRadioButtonList: BootstrapClientRadioButtonListStatic; +declare var BootstrapClientMenu: BootstrapClientMenuStatic; +declare var BootstrapClientPager: BootstrapClientPagerStatic; +declare var BootstrapClientPopupControl: BootstrapClientPopupControlStatic; +declare var BootstrapClientPopupMenu: BootstrapClientPopupMenuStatic; +declare var BootstrapClientProgressBar: BootstrapClientProgressBarStatic; +declare var BootstrapClientSpinEdit: BootstrapClientSpinEditStatic; +declare var BootstrapClientTabControl: BootstrapClientTabControlStatic; +declare var BootstrapClientPageControl: BootstrapClientPageControlStatic; +declare var BootstrapClientTextBox: BootstrapClientTextBoxStatic; +declare var BootstrapClientMemo: BootstrapClientMemoStatic; +declare var BootstrapClientButtonEdit: BootstrapClientButtonEditStatic; +declare var BootstrapClientTreeView: BootstrapClientTreeViewStatic; +declare var BootstrapUIWidgetBase: BootstrapUIWidgetBaseStatic; +declare var BootstrapClientUploadControl: BootstrapClientUploadControlStatic; +declare var BootstrapClientGridView: BootstrapClientGridViewStatic; declare var MVCxClientCalendar: MVCxClientCalendarStatic; declare var MVCxClientCallbackPanel: MVCxClientCallbackPanelStatic; declare var MVCxClientCardView: MVCxClientCardViewStatic; @@ -27542,6 +33639,8 @@ declare var MVCxClientWebDocumentViewer: MVCxClientWebDocumentViewerStatic; declare var ASPxClientControlBase: ASPxClientControlBaseStatic; declare var ASPxClientControl: ASPxClientControlStatic; declare var ASPxClientCallback: ASPxClientCallbackStatic; +declare var ASPxClientPanelBase: ASPxClientPanelBaseStatic; +declare var ASPxClientPanel: ASPxClientPanelStatic; declare var ASPxClientCallbackPanel: ASPxClientCallbackPanelStatic; declare var ASPxClientCloudControl: ASPxClientCloudControlStatic; declare var ASPxClientDataView: ASPxClientDataViewStatic; @@ -27554,19 +33653,20 @@ declare var ASPxClientFileManagerCommandConsts: ASPxClientFileManagerCommandCons declare var ASPxClientFileManagerErrorConsts: ASPxClientFileManagerErrorConstsStatic; declare var ASPxClientFormLayout: ASPxClientFormLayoutStatic; declare var ASPxClientHiddenField: ASPxClientHiddenFieldStatic; +declare var ASPxClientHint: ASPxClientHintStatic; declare var ASPxClientImageGallery: ASPxClientImageGalleryStatic; declare var ASPxClientImageSlider: ASPxClientImageSliderStatic; declare var ASPxClientImageZoomNavigator: ASPxClientImageZoomNavigatorStatic; declare var ASPxClientImageZoom: ASPxClientImageZoomStatic; declare var ASPxClientLoadingPanel: ASPxClientLoadingPanelStatic; +declare var ASPxClientMediaFileSelector: ASPxClientMediaFileSelectorStatic; declare var ASPxClientMenuBase: ASPxClientMenuBaseStatic; declare var ASPxClientMenu: ASPxClientMenuStatic; declare var ASPxClientTouchUI: ASPxClientTouchUIStatic; declare var ASPxClientNavBar: ASPxClientNavBarStatic; declare var ASPxClientNewsControl: ASPxClientNewsControlStatic; declare var ASPxClientObjectContainer: ASPxClientObjectContainerStatic; -declare var ASPxClientPanelBase: ASPxClientPanelBaseStatic; -declare var ASPxClientPanel: ASPxClientPanelStatic; +declare var ASPxClientPager: ASPxClientPagerStatic; declare var ASPxClientPopupControl: ASPxClientPopupControlStatic; declare var ASPxClientPopupControlResizeState: ASPxClientPopupControlResizeStateStatic; declare var ASPxClientPopupControlCloseReason: ASPxClientPopupControlCloseReasonStatic; @@ -27583,6 +33683,7 @@ declare var ASPxClientTimer: ASPxClientTimerStatic; declare var ASPxClientTitleIndex: ASPxClientTitleIndexStatic; declare var ASPxClientTreeView: ASPxClientTreeViewStatic; declare var ASPxClientUploadControl: ASPxClientUploadControlStatic; +declare var ASPxClientUploadControlValidationErrorTypeConsts: ASPxClientUploadControlValidationErrorTypeConstsStatic; declare var ASPxClientUtils: ASPxClientUtilsStatic; declare var ASPxClientChartDesigner: ASPxClientChartDesignerStatic; declare var ASPxClientWebChartControl: ASPxClientWebChartControlStatic; diff --git a/types/devexpress-web/v161/devexpress-web-tests.ts b/types/devexpress-web/v161/devexpress-web-tests.ts new file mode 100644 index 0000000000..ef7eb8de37 --- /dev/null +++ b/types/devexpress-web/v161/devexpress-web-tests.ts @@ -0,0 +1,418 @@ +declare var hiddenField: ASPxClientHiddenField; +declare var mainCallbackPanel: ASPxClientCallbackPanel; +declare var loginPopup: ASPxClientPopupControl; +declare var searchButton: ASPxClientButton; +declare var searchComboBox: ASPxClientComboBox; +declare var roomsNumberSpinEdit: ASPxClientSpinEdit; +declare var adultsNumberSpinEdit: ASPxClientSpinEdit; +declare var childrenNumberSpinEdit: ASPxClientSpinEdit; +declare var checkInDateEdit: ASPxClientDateEdit; +declare var checkOutDateEdit: ASPxClientDateEdit; +declare var backSlider: ASPxClientImageSlider; +declare var locationComboBox: ASPxClientComboBox; +declare var nightyRateTrackBar: ASPxClientTrackBar; +declare var customerRatingTrackBar: ASPxClientTrackBar; +declare var ourRatingCheckBoxList: ASPxClientCheckBoxList; +declare var startFilterPopupControl: ASPxClientPopupControl; +declare var imagePopupControl: ASPxClientPopupControl; +declare var emailTextBox: ASPxClientTextBox; +declare var creditCardEmailTextBox: ASPxClientTextBox; +declare var accountEmailTextBox: ASPxClientTextBox; +declare var bookingPageControl: ASPxClientPageControl; +declare var paymentTypePageControl: ASPxClientPageControl; +declare var offerFormPopup: ASPxClientPopupControl; +declare var roomsSpinEdit: ASPxClientSpinEdit; +declare var adultsSpinEdit: ASPxClientSpinEdit; +declare var childrenSpinEdit: ASPxClientSpinEdit; +declare var hotelDetailsCallbackPanel: ASPxClientCallbackPanel; +declare var leftPanel: ASPxClientPanel; +declare var menuButton: ASPxClientButton; +declare var aboutWindow: ASPxClientPopupControl; +declare var offersZone: ASPxClientDockZone; + +module DXDemo { + function showPage(page: string, params: { [key: string]: any }, skipHistory?: boolean): void { + var queryString = getQueryString(params || {}); + hiddenField.Set("page", page); + hiddenField.Set("parameters", queryString); + hideMenu(); + var uri = queryString.length ? (page + "?" + queryString) : page; + try { + if (!skipHistory && window.history && window.history.pushState) + window.history.pushState(uri, "", uri || "Default.aspx"); + } catch (e) { } + mainCallbackPanel.PerformCallback(uri); + }; + + export function onMainMenuItemClick(s: ASPxClientMenu, e: ASPxClientMenuItemClickEventArgs): void { + switch (e.item.name) { + case "login": + hideMenu(); + setTimeout(function () { loginPopup.ShowAtElementByID("MainCallbackPanel_ContentPane"); }, 300); + break; + case "offers": + showPage("SpecialOffers", {}); + break; + default: + hideMenu(); + setTimeout(function () { showAboutWindow(); }, 300); + break; + } + }; + + export function onLoginButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + loginPopup.Hide(); + showAboutWindow(); + }; + + export function onSearchButtonClick(): void { + if (ASPxClientEdit.ValidateGroup("DateEditors")) { + showPage("ShowHotels", { + location: searchComboBox.GetValue(), + checkin: getFormattedDate(checkInDateEdit.GetValue()), + checkout: getFormattedDate(checkOutDateEdit.GetValue()), + rooms: roomsNumberSpinEdit.GetValue() || 1, + adults: adultsNumberSpinEdit.GetValue() || 1, + children: childrenNumberSpinEdit.GetValue() || 0 + }); + } + }; + + export function onSearchComboBoxIndexChanged(s: ASPxClientComboBox, e: ASPxClientProcessingModeEventArgs): void { + hideMenu(); + searchButton.AdjustControl(); + }; + + export function onIndexOfferCloseClick(index: number): void { + var panel = ASPxClientControl.GetControlCollection().GetByName("OfferDockPanel" + index); + var sibPanel = ASPxClientControl.GetControlCollection().GetByName("OfferDockPanel" + (index == 1 ? 2 : 1)); + panel.Hide(); + sibPanel.MakeFloat(); + sibPanel.SetWidth(offersZone.GetWidth()); + sibPanel.Dock(offersZone); + }; + + export function onLogoClick(): void { + showPage("", null, false); + }; + + export function onMenuNavButtonCheckedChanged(s: ASPxClientCheckBox, e: ASPxClientProcessingModeEventArgs): void { + var mainContainer = mainCallbackPanel.GetMainElement(); + if (s.GetChecked()) { + backSlider.Pause(); + showMenu(); + } + else { + hideMenu(); + backSlider.Play(); + } + }; + + export function onBackNavButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + var params = getCurrentQueryParams(); + switch (getCurrentPage()) { + case "PrintInvoice": + showPage("Booking", params, false); + break; + case "Booking": + if (bookingPageControl.GetActiveTabIndex() > 0) + bookingPageControl.SetActiveTabIndex(bookingPageControl.GetActiveTabIndex() - 1); + else + showPage("ShowRooms", params, false); + break; + case "ShowRooms": + showPage("ShowHotels", params, false); + break; + case "ShowDetails": + showPage("ShowHotels", params, false); + break; + case "ShowHotels": + case "SpecialOffers": + showPage("", null, false); + break; + } + }; + + export function updateSearchResults(): void { + var params = getCurrentQueryParams(); + params["location"] = locationComboBox.GetValue(); + params["minprice"] = nightyRateTrackBar.GetPositionStart(); + params["maxprice"] = nightyRateTrackBar.GetPositionEnd(); + params["custrating"] = customerRatingTrackBar.GetPosition(); + params["ourrating"] = ourRatingCheckBoxList.GetSelectedValues().join(","); + showPage("ShowHotels", params); + }; + + export function onBookHotelButtonClick(hotelID: string): void { + var queryParams = getCurrentQueryParams(); + queryParams["hotelID"] = hotelID; + showPage("ShowRooms", queryParams); + }; + + export function onDetailsHotelButtonClick(hotelID: string): void { + var queryParams = getCurrentQueryParams(); + queryParams["hotelID"] = hotelID; + showPage("ShowDetails", queryParams); + }; + + export function onShowStartFilterButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + startFilterPopupControl.ShowAtElementByID("MainCallbackPanel_ContentPane"); + }; + + export function onChangeStartFilterButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + if (ASPxClientEdit.ValidateGroup("DateEditors")) { + var params = getCurrentQueryParams(); + params["checkin"] = getFormattedDate(checkInDateEdit.GetValue()); + params["checkout"] = getFormattedDate(checkOutDateEdit.GetValue()); + params["rooms"] = roomsNumberSpinEdit.GetValue() || 1; + params["adults"] = adultsNumberSpinEdit.GetValue() || 1; + params["children"] = childrenNumberSpinEdit.GetValue() || 0; + startFilterPopupControl.Hide(); + showPage(hiddenField.Get("page").toString(), params); + } + }; + + export function onBookRoomButtonClick(roomID: string): void { + var params = getCurrentQueryParams(); + params["roomID"] = roomID; + showPage("Booking", params); + }; + + export function onShowRoomsButtonClick(): void { + var queryParams = getCurrentQueryParams(); + showPage("ShowRooms", queryParams); + }; + + export function onShowDetailsButtonClick(): void { + var queryParams = getCurrentQueryParams(); + showPage("ShowDetails", queryParams); + }; + + export function onRoomImageNavItemClick(roomID: string, pictureName: string): void { + setTimeout(function () { + imagePopupControl.PerformCallback(roomID + "|" + pictureName); + imagePopupControl.ShowAtElementByID("MainCallbackPanel_ContentPane"); + }, 500); + }; + + export function onRoomsNavBarExpandedChanged(s: ASPxClientNavBar, e: ASPxClientNavBarGroupEventArgs): void { + ASPxClientControl.AdjustControls(s.GetMainElement()); + }; + + export function onNextBookingStepButtonClick(step: number): void { + var valid = true; + var validationGroup = ""; + if (step == 1) + validationGroup = "Account"; + if (step == 2) + validationGroup = "RoomDetails"; + if (step == 3) + validationGroup = "PaymentDetails"; + + switch (step) { + case 1: + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "Account"); + if (valid) { + emailTextBox.SetValue(accountEmailTextBox.GetValue()); + creditCardEmailTextBox.SetValue(accountEmailTextBox.GetValue()); + showPage("Booking", getCurrentQueryParams()); + return; + } + break; + case 2: + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "RoomDetails"); + emailTextBox.SetValue(accountEmailTextBox.GetValue()); + break; + case 3: + var paymentType = paymentTypePageControl.GetActiveTabIndex(); + if (paymentType == 0) + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "CreditCard"); + else if (paymentType == 1) + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "Cash"); + else if (paymentType == 2) + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "PayPal"); + break; + } + if (valid) { + bookingPageControl.GetTab(step).SetEnabled(true); + bookingPageControl.SetActiveTabIndex(step); + } + }; + + export function onAccountCaptchaHiddenFieldInit(s: ASPxClientHiddenField, e: ASPxClientEventArgs): void { + if (s.Get("IsCaptchaValid")) { + bookingPageControl.GetTab(1).SetEnabled(true); + bookingPageControl.SetActiveTabIndex(1); + } + }; + + export function onFinishBookingStepButtonClick(): void { + showAboutWindow(); + }; + + export function OnPrintInvoiceButtonClick(): void { + showPage("PrintInvoice", getCurrentQueryParams()); + }; + + export function onOfferClick(offerID: string): void { + offerFormPopup.SetContentHtml(""); + offerFormPopup.PerformCallback(offerID); + var panel = ASPxClientControl.GetControlCollection().GetByName("DockPanel" + offerID); + var panelElement = panel.GetMainElement(); + if (panelElement.offsetWidth < 330 || panelElement.offsetHeight < 250) { + offerFormPopup.SetWidth(400); + offerFormPopup.SetHeight(280); + offerFormPopup.ShowAtElementByID("SpecialOffersContainer"); + } + else { + offerFormPopup.SetWidth(panelElement.offsetWidth); + offerFormPopup.SetHeight(panelElement.offsetHeight); + offerFormPopup.ShowAtElement(panelElement); + } + }; + + export function onSpecialOfferCheckButtonClick(hotelID: string, locationID: string): void { + if (ASPxClientEdit.ValidateGroup("DateEditors")) { + var queryParams: { [key: string]: any } = { + location: locationID, + hotelID: hotelID, + checkin: getFormattedDate(checkInDateEdit.GetValue()), + checkout: getFormattedDate(checkOutDateEdit.GetValue()), + rooms: roomsSpinEdit.GetValue() || 1, + adults: adultsSpinEdit.GetValue() || 1, + children: childrenSpinEdit.GetValue() || 0 + }; + showPage("ShowRooms", queryParams); + } + }; + + export function onIndexOfferClick(): void { + showPage("SpecialOffers", {}); + }; + + export function onControlsInit(): void { + ASPxClientUtils.AttachEventToElement(window, 'popstate', onHistoryPopState); + var pathParts = document.location.href.split("/"); + var url = pathParts[pathParts.length - 1]; + try { + if (window.history) + window.history.replaceState(url, ""); + } catch (e) { } + ASPxClientUtils.AttachEventToElement(window, "resize", onWindowResize); + if (ASPxClientUtils.iOSPlatform) { + // animate + } + }; + + export function updateRatingLabels(ratingControl: ASPxClientTrackBar) { + var start = ratingControl.GetPositionStart().toString(); + var end = ratingControl.GetPositionEnd().toString(); + document.getElementById("cpLeftLabelID").innerHTML = start + " " + end; + }; + + export function onRatingControlItemClick(s: ASPxClientRatingControl, e: ASPxClientRatingControlItemClickEventArgs): void { + hotelDetailsCallbackPanel.PerformCallback(s.GetValue().toString()); + }; + + export function onInputKeyDown(s: ASPxClientTextBox, e: ASPxClientEditKeyEventArgs): void { + var keyCode = ASPxClientUtils.GetKeyCode(e.htmlEvent); + if (keyCode == 13) + (s.GetInputElement()).blur(); + }; + + function getCurrentPage(): string { + var hfPage = hiddenField.Get("page"); + if (hfPage) + return hfPage; + var pathParts = document.location.pathname.split("/"); + return pathParts[pathParts.length - 1]; + }; + + function showAboutWindow(): void { + aboutWindow.ShowAtElementByID("MainCallbackPanel_ContentPane"); + }; + + function hideMenu(): void { + leftPanel.Collapse(); + if (menuButton.GetMainElement() && menuButton.GetChecked()) + menuButton.SetChecked(false); + }; + + function showMenu(): void { + leftPanel.Expand(); + }; + + var _resizeSpecialOffersTimeoutID = -1; + function onWindowResize(): void { + switch (hiddenField.Get("page")) { + case "SpecialOffers": + if (_resizeSpecialOffersTimeoutID == -1) + _resizeSpecialOffersTimeoutID = setTimeout(resizeSpecialOffers, 200); + break; + } + hidePopups("AboutWindow", "StartFilterPopupControl", "LoginPopup", "OfferFormPopup", "ImagePopupControl"); + }; + + function hidePopups(...names: string[]): void { + for (var i = 0; i < names.length; i++) { + var popupControl = ASPxClientControl.GetControlCollection().GetByName(names[i]); + popupControl.Hide(); + } + }; + + function resizeSpecialOffers(): void { + for (var i = 1; i <= 4; i++) { + var panel = ASPxClientControl.GetControlCollection().GetByName("DockPanel" + i); + if (panel && panel.IsVisible()) { + var zone = panel.GetOwnerZone(); + zone.SetWidth(((zone.GetMainElement()).parentNode).offsetWidth) + } + } + _resizeSpecialOffersTimeoutID = -1; + }; + + function getFormattedDate(date: Date): string { + return (date.getMonth() + 1) + "-" + date.getDate() + "-" + date.getFullYear(); + }; + + function getCurrentQueryParams(): { [key:string]: any } { + var hfParams = hiddenField.Get("parameters"); + if (hfParams) + return getParamsByQueryString(hfParams); + var query = document.location.search; + if (query[0] === "?") + query = query.substr(1); + return getParamsByQueryString(query); + }; + + function getQueryString(params: { [key:string]: any }): string { + var queryItems: any[] = []; + for (var key in params) { + if (!params.hasOwnProperty(key)) continue; + queryItems.push(key + "=" + params[key]); + } + if (queryItems.length > 0) + return queryItems.join("&"); + return ""; + }; + + function getParamsByQueryString(queryString: string): { [key: string]: string } { + var result: { [key: string]: any } = {}; + if (queryString) { + var queryStringArray = queryString.split("&"); + for (var i = 0; i < queryStringArray.length; i++) { + var part = queryStringArray[i].split('='); + if (part.length != 2) continue; + result[part[0]] = decodeURIComponent(part[1].replace(/\+/g, " ")); + } + } + return result; + }; + + function onHistoryPopState(evt: any): void { + if (evt.state !== null && evt.state !== undefined) { + var uriParts = evt.state.split("?"); + showPage(uriParts[0], getParamsByQueryString(uriParts[1]), true); + } + }; +} \ No newline at end of file diff --git a/types/devexpress-web/v161/index.d.ts b/types/devexpress-web/v161/index.d.ts new file mode 100644 index 0000000000..331718afb0 --- /dev/null +++ b/types/devexpress-web/v161/index.d.ts @@ -0,0 +1,27630 @@ +// Type definitions for DevExpress ASP.NET v161.12 +// Project: http://devexpress.com/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * A client-side counterpart of the DashboardViewer extension. + */ +interface MVCxClientDashboardViewer extends ASPxClientDashboardViewer { +} +/** + * Represents a list of records from the dashboard data source. + */ +interface ASPxClientDashboardItemUnderlyingData { + /** + * Gets the number of rows in the underlying data set. + */ + GetRowCount(): number; + /** + * Returns the value of the specified cell within the underlying data set. + * @param rowIndex An integer value that specifies the zero-based index of the required row. + * @param dataMember A String that specifies the required data member. + */ + GetRowValue(rowIndex: number, dataMember: string): Object; + /** + * Returns an array of data members available in a data source. + */ + GetDataMembers(): string[]; + /** + * Returns whether or not a request for underlying data was successful. + */ + IsDataReceived(): boolean; + /** + * Returns a callstack containing the error caused by an unsuccessful request for underlying data. + */ + GetRequestDataError(): string; +} +/** + * Contains parameters used to obtain the underlying data for the dashboard item. + */ +interface ASPxClientDashboardItemRequestUnderlyingDataParameters { + /** + * Gets or sets an array of data member identifiers used to obtain underlying data. + * Value: An array of String objects that specify data member identifiers. + */ + DataMembers: string[]; + /** + * Gets or sets axis points used to obtain the underlying data. + * Value: An array of ASPxClientDashboardItemDataAxisPoint objects that represent axis points. + */ + AxisPoints: ASPxClientDashboardItemDataAxisPoint[]; + /** + * Gets or sets the dimension value used to obtain the underlying data. + * Value: The dimension value. + */ + ValuesByAxisName: Object; + /** + * Gets or sets the unique dimension value used to obtain the underlying data. + * Value: The unique dimension value. + */ + UniqueValuesByAxisName: Object; +} +/** + * References a method executed after an asynchronous request is complete. + */ +interface ASPxClientDashboardItemRequestUnderlyingDataCompleted { + /** + * References a method executed after an asynchronous request is completed. + * @param data An ASPxClientDashboardItemUnderlyingData object that represents a list of records from the dashboard data source. + */ + (data: ASPxClientDashboardItemUnderlyingData): void; +} +/** + * References a method that will handle the ItemClick event. + */ +interface ASPxClientDashboardItemClickEventHandler { + /** + * References a method that will handle the ItemClick event. + * @param source The event source. + * @param e A ASPxClientDashboardItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemClickEventArgs): void; +} +/** + * Provides data for the ItemClick event. + */ +interface ASPxClientDashboardItemClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item for which the event has been raised. + * Value: A String that is the dashboard item name. + */ + ItemName: string; + /** + * Gets the dashboard item's client data. + */ + GetData(): ASPxClientDashboardItemData; + /** + * Returns the axis point corresponding to the clicked visual element. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetAxisPoint(axisName: string): ASPxClientDashboardItemDataAxisPoint; + /** + * Gets measures corresponding to the clicked visual element. + */ + GetMeasures(): ASPxClientDashboardItemDataMeasure[]; + /** + * Gets deltas corresponding to the clicked visual element. + */ + GetDeltas(): ASPxClientDashboardItemDataDelta[]; + /** + * Gets the dimensions used to create a hierarchy of axis points for the specified axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetDimensions(axisName: string): ASPxClientDashboardItemDataDimension[]; + /** + * Requests underlying data corresponding to the clicked visual element. + * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. + * @param dataMembers An array of String values that specify data members used to obtain underlying data. + */ + RequestUnderlyingData(onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted, dataMembers: string[]): void; +} +/** + * References a method that will handle the ItemVisualInteractivity event. + */ +interface ASPxClientDashboardItemVisualInteractivityEventHandler { + /** + * References a method that will handle the ItemVisualInteractivity event. + * @param source The event source. + * @param e A ASPxClientDashboardItemVisualInteractivityEventArgs object containing event data. + */ + (source: S, e: ASPxClientDashboardItemVisualInteractivityEventArgs): void; +} +/** + * Provides data for the ItemVisualInteractivity event. + */ +interface ASPxClientDashboardItemVisualInteractivityEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A String that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Gets the selection mode for dashboard item elements. + */ + GetSelectionMode(): string; + /** + * Sets the selection mode for dashboard item elements. + * @param selectionMode A String that specifies the selection mode. + */ + SetSelectionMode(selectionMode: string): void; + /** + * Returns whether or not highlighting is enabled for the current dashboard item. + */ + IsHighlightingEnabled(): boolean; + /** + * Enables highlighting for the current dashboard item. + * @param enableHighlighting true, to enable highlighting; otherwise, false. + */ + EnableHighlighting(enableHighlighting: boolean): void; + /** + * Gets data axes used to perform custom interactivity actions. + */ + GetTargetAxes(): string[]; + /** + * Sets data axes used to perform custom interactivity actions. + * @param targetAxes An array of String objects that specify names of data axes. + */ + SetTargetAxes(targetAxes: string[]): void; + /** + * Gets the default selection for the current dashboard item. + */ + GetDefaultSelection(): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Sets the default selection for the current dashboard item. + * @param values An array of ASPxClientDashboardItemDataAxisPointTuple objects specifying axis point tuples used to select default elements. + */ + SetDefaultSelection(values: ASPxClientDashboardItemDataAxisPointTuple[]): void; +} +/** + * References a method that will handle the ItemSelectionChanged event. + */ +interface ASPxClientDashboardItemSelectionChangedEventHandler { + /** + * References a method that will handle the ItemSelectionChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardItemSelectionChangedEventArgs object containing event data. + */ + (source: S, e: ASPxClientDashboardItemSelectionChangedEventArgs): void; +} +/** + * Provides data for the ItemSelectionChanged event. + */ +interface ASPxClientDashboardItemSelectionChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A String that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Gets currently selected elements. + */ + GetCurrentSelection(): ASPxClientDashboardItemDataAxisPointTuple[]; +} +/** + * References a method that will handle the ItemElementCustomColor event. + */ +interface ASPxClientDashboardItemElementCustomColorEventHandler { + /** + * References a method that will handle the ItemElementCustomColor event. + * @param source The event source. + * @param e An ASPxClientDashboardItemElementCustomColorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemElementCustomColorEventArgs): void; +} +/** + * Provides data for the ItemElementCustomColor event. + */ +interface ASPxClientDashboardItemElementCustomColorEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A String that is the component name of the dashboard item for which the event was raised. + */ + ItemName: string; + /** + * Gets the axis point tuple that corresponds to the current dashboard item element. + */ + GetTargetElement(): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Gets the color of the current dashboard item element. + */ + GetColor(): string; + /** + * Sets the color of the current dashboard item element. + * @param color A String that specifies the color of the current dashboard item element. + */ + SetColor(color: string): void; + /** + * Gets measures corresponding to the current dashboard item element. + */ + GetMeasures(): ASPxClientDashboardItemDataMeasure[]; +} +/** + * References a method that will handle the ItemWidgetCreated event. + */ +interface ASPxClientDashboardItemWidgetCreatedEventHandler { + /** + * References a method that will handle the ItemWidgetCreated event. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * References a method that will handle the ItemWidgetUpdating event. + */ +interface ASPxClientDashboardItemWidgetUpdatingEventHandler { + /** + * References a method that will handle the ItemWidgetUpdating event. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * References a method that will handle the ItemWidgetUpdated event. + */ +interface ASPxClientDashboardItemWidgetUpdatedEventHandler { + /** + * References a method that will handle the ItemWidgetUpdated event. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * References a method that will handle the ItemBeforeWidgetDisposed event. + */ +interface ASPxClientDashboardItemBeforeWidgetDisposedEventHandler { + /** + * References a method that will handle the ItemBeforeWidgetDisposed event. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * Provides data for events related to client widgets used to visualize data in dashboard items. + */ +interface ASPxClientDashboardItemWidgetEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A String that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Returns an underlying widget corresponding to the current dashboard item. + */ + GetWidget(): Object; +} +/** + * Represents multidimensional data visualized in the dashboard item. + */ +interface ASPxClientDashboardItemData { + /** + * Gets the names of the axes that constitute the current ASPxClientDashboardItemData. + */ + GetAxisNames(): string[]; + /** + * Returns the specified data axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetAxis(axisName: string): ASPxClientDashboardItemDataAxis; + /** + * Gets the dimensions used to create a hierarchy of axis points for the specified axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetDimensions(axisName: string): ASPxClientDashboardItemDataDimension[]; + /** + * Gets the measures for the current ASPxClientDashboardItemData object. + */ + GetMeasures(): ASPxClientDashboardItemDataMeasure[]; + /** + * Gets the deltas for the current ASPxClientDashboardItemData object. + */ + GetDeltas(): ASPxClientDashboardItemDataDelta[]; + /** + * Gets the slice of the current ASPxClientDashboardItemData object by the specified axis point tuple. + * @param tuple A ASPxClientDashboardItemDataAxisPointTuple object that is a tuple of axis points. + */ + GetSlice(tuple: ASPxClientDashboardItemDataAxisPointTuple): ASPxClientDashboardItemData; + /** + * Gets the slice of the current ASPxClientDashboardItemData object by the specified axis point. + * @param axisPoint An ASPxClientDashboardItemDataAxisPoint object that is the data point in a multidimensional space. + */ + GetSlice(axisPoint: ASPxClientDashboardItemDataAxisPoint): ASPxClientDashboardItemData; + /** + * Returns a total summary value for the specified measure. + * @param measureId A String that is the measure identifier. + */ + GetMeasureValue(measureId: string): ASPxClientDashboardItemDataMeasureValue; + /** + * Gets the summary value for the specified delta. + * @param deltaId A String that is the data item identifier. + */ + GetDeltaValue(deltaId: string): ASPxClientDashboardItemDataDeltaValue; + /** + * Returns an array of data members available in a data source. + */ + GetDataMembers(): string[]; + /** + * Creates a tuple based on the specified axes names and corresponding values. + * @param values An array of name-value pairs containing the axis name and corresponding values. + */ + CreateTuple(values: Object[]): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Creates a tuple based on the specified axis points. + * @param axisPoints An array of ASPxClientDashboardItemDataAxisPoint objects that specify axis points belonging to different data axes. + */ + CreateTuple(axisPoints: ASPxClientDashboardItemDataAxisPoint[]): ASPxClientDashboardItemDataAxisPointTuple; +} +/** + * An axis that contains data points corresponding to the specified value hierarchy. + */ +interface ASPxClientDashboardItemDataAxis { + /** + * Gets the dimensions used to create a hierarchy of axis points belonging to the current axis. + */ + GetDimensions(): ASPxClientDashboardItemDataDimension[]; + /** + * Gets the root axis point belonging to the current ASPxClientDashboardItemDataAxis. + */ + GetRootPoint(): ASPxClientDashboardItemDataAxisPoint; + /** + * Returns axis points corresponding to values of the last-level dimension. + */ + GetPoints(): ASPxClientDashboardItemDataAxisPoint[]; + /** + * Returns axis points corresponding to the specified dimension. + * @param dimensionId A String that is the dimension identifier. + */ + GetPointsByDimension(dimensionId: string): ASPxClientDashboardItemDataAxisPoint[]; + /** + * Returns the data point for the specified axis by unique values. + * @param uniqueValues A hierarchy of unique values identifying the required data point. + */ + GetPointByUniqueValues(uniqueValues: Object[]): ASPxClientDashboardItemDataAxisPoint; +} +/** + * Contains the dimension metadata. + */ +interface ASPxClientDashboardItemDataDimension { + /** + * Gets the dimension identifier. + * Value: A String that is the dimension identifier. + */ + Id: string; + /** + * Gets or sets the name of the dimension. + * Value: A String that is the name of the dimension. + */ + Name: string; + /** + * Gets the data member identifier for the current dimension. + * Value: A String value that identifies a data member. + */ + DataMember: string; + /** + * Gets the group interval for date-time values for the current dimension. + * Value: A String value that represents how date-time values are grouped. + */ + DateTimeGroupInterval: string; + /** + * Gets the group interval for string values. + * Value: A String value that specifies the group interval for string values. + */ + TextGroupInterval: string; + /** + * Formats the specified value using format settings of the current dimension. + * @param value A value to be formatted. + */ + Format(value: Object): string; +} +/** + * Contains the measure metadata. + */ +interface ASPxClientDashboardItemDataMeasure { + /** + * Gets the measure identifier. + * Value: A String that is the measure identifier. + */ + Id: string; + /** + * Gets the name of the measure. + * Value: A String that is the name of the measure. + */ + Name: string; + /** + * Gets the data member that identifies the data source list used to provide data for the current measure. + * Value: A String value that identifies the data source list used to provide data for the current measure. + */ + DataMember: string; + /** + * Gets the type of summary function calculated against the current measure. + * Value: A String value that identifies the type of summary function calculated against the current measure. + */ + SummaryType: string; + /** + * Formats the specified value using format settings of the current measure. + * @param value A value to be formatted. + */ + Format(value: Object): string; +} +/** + * Contains the delta metadata. + */ +interface ASPxClientDashboardItemDataDelta { + /** + * Gets the data item identifier. + * Value: A String that is the data item identifier. + */ + Id: string; + /** + * Gets the name of the data item container. + * Value: A String value that is the name of the data item container. + */ + Name: string; + /** + * Gets the identifier for the measure that provides actual values. + * Value: A String value that is the measure identifier. + */ + ActualMeasureId: string; + /** + * Gets the identifier for the measure that provides target values. + * Value: A String value that is the measure identifier. + */ + TargetMeasureId: string; +} +/** + * Provides dimension values at the specified axis point. + */ +interface ASPxClientDashboardItemDataDimensionValue { + /** + * Gets the current dimension value. + */ + GetValue(): Object; + /** + * Gets the unique value for the current dimension value. + */ + GetUniqueValue(): Object; + /** + * Gets the display text for the current dimension value. + */ + GetDisplayText(): string; +} +/** + * Provides the measure value and display text. + */ +interface ASPxClientDashboardItemDataMeasureValue { + /** + * Gets the measure value. + */ + GetValue(): Object; + /** + * Gets the measure display text. + */ + GetDisplayText(): string; +} +/** + * Provides delta element values. + */ +interface ASPxClientDashboardItemDataDeltaValue { + /** + * Provides access to the actual value displayed within the delta element. + */ + GetActualValue(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the target value. + */ + GetTargetValue(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the absolute difference between the actual and target values. + */ + GetAbsoluteVariation(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the percent of variation between the actual and target values. + */ + GetPercentVariation(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the percentage of the actual value in the target value. + */ + GetPercentOfTarget(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the main delta value. + */ + GetDisplayValue(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the first additional delta value. + */ + GetDisplaySubValue1(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the second additional delta value. + */ + GetDisplaySubValue2(): ASPxClientDashboardItemDataMeasureValue; + /** + * Gets the value specifying the condition for displaying the delta indication. + */ + GetIsGood(): ASPxClientDashboardItemDataMeasureValue; + /** + * Gets the type of delta indicator. + */ + GetIndicatorType(): ASPxClientDashboardItemDataMeasureValue; +} +/** + * A point on the data axis. + */ +interface ASPxClientDashboardItemDataAxisPoint { + /** + * Gets the name of the axis to which the current axis point belongs. + */ + GetAxisName(): string; + /** + * Gets the last level dimension corresponding to the current axis point. + */ + GetDimension(): ASPxClientDashboardItemDataDimension; + /** + * Gets the collection of dimensions used to create a hierarchy of axis points from the root point to the current axis point. + */ + GetDimensions(): ASPxClientDashboardItemDataDimension[]; + /** + * Gets the value corresponding to the current axis point. + */ + GetValue(): Object; + /** + * Gets the display text corresponding to the current axis point. + */ + GetDisplayText(): string; + /** + * Gets the unique value corresponding to the current axis point. + */ + GetUniqueValue(): Object; + /** + * Gets the dimension values at the specified axis point. + */ + GetDimensionValue(): ASPxClientDashboardItemDataDimensionValue; + /** + * Gets the dimension value at the current axis point. + * @param dimensionId A String value that specifies the dimension identifier. + */ + GetDimensionValue(dimensionId: string): ASPxClientDashboardItemDataDimensionValue; + /** + * Gets the child axis points for the current axis point. + */ + GetChildren(): ASPxClientDashboardItemDataAxisPoint[]; + /** + * Gets the parent axis point for the current axis point. + */ + GetParent(): ASPxClientDashboardItemDataAxisPoint; +} +/** + * Represents a tuple of axis points. + */ +interface ASPxClientDashboardItemDataAxisPointTuple { + /** + * Returns the axis point belonging to the default data axis. + */ + GetAxisPoint(): ASPxClientDashboardItemDataAxisPoint; + /** + * Returns the axis point belonging to the specified data axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetAxisPoint(axisName: string): ASPxClientDashboardItemDataAxisPoint; +} +/** + * A client-side equivalent of the ASPxDashboardDesigner control. + */ +interface ASPxClientDashboardDesigner extends ASPxClientControl { + /** + * Occurs after the state of the dashboard displayed in the ASPxClientDashboardDesigner is changed. + */ + DashboardStateChanged: ASPxClientEvent>; + /** + * Occurs after another dashboard is loaded to the ASPxClientDashboardDesigner. + */ + DashboardChanged: ASPxClientEvent>; + /** + * For internal use. + */ + CustomizeMenuItems: ASPxClientEvent>; + BeforeRender: ASPxClientEvent>; + /** + * Switches the ASPxClientDashboardDesigner to the viewer mode. + */ + SwitchToViewer(): void; + /** + * Switches the ASPxClientDashboardDesigner to the designer mode. + */ + SwitchToDesigner(): void; + /** + * Gets the current working mode of the Web Designer. + */ + GetWorkingMode(): string; + /** + * Gets the identifier of the dashboard that is displayed in the ASPxClientDashboardDesigner. + */ + GetDashboardId(): string; + /** + * Gets the name of the dashboard that is displayed in the ASPxClientDashboardDesigner. + */ + GetDashboardName(): string; + /** + * Gets the state of the dashboard (for instance, the master filtering state) displayed in the ASPxClientDashboardDesigner. + */ + GetDashboardState(): string; + /** + * Loads a dashboard with the specified identifier. + * @param dashboardId A String value that specifies the dashboard identifier. + */ + LoadDashboard(dashboardId: string): void; + /** + * Saves a dashboard to the dashboard storage. + */ + SaveDashboard(): void; +} +/** + * References a method that will handle the DashboardStateChanged event. + */ +interface ASPxClientDashboardStateChangedEventHandler { + /** + * References a method that will handle the DashboardStateChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardStateChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardStateChangedEventArgs): void; +} +/** + * Provides data for the DashboardStateChanged event. + */ +interface ASPxClientDashboardStateChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the current state of the dashboard. + * Value: A String that is the current state of the dashboard. + */ + DashboardState: string; +} +/** + * References a method that will handle the DashboardChanged event. + */ +interface ASPxClientDashboardChangedEventHandler { + /** + * References a method that will handle the DashboardChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardChangedEventArgs): void; +} +/** + * Provides data for the DashboardChanged event. + */ +interface ASPxClientDashboardChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the identifier of a newly opened dashboard. + * Value: A String values that is an identifier of newly opened dashboard. + */ + DashboardId: string; + /** + * Gets the name of a newly opened dashboard. + * Value: A String values that is the name of newly opened dashboard. + */ + DashboardName: string; +} +interface ASPxClientDashboardDesignerCustomizeMenuItemsEventHandler { + (source: S, e: ASPxClientDashboardDesignerCustomizeMenuItemsEventArgs): void; +} +interface ASPxClientDashboardDesignerMenuItem { + id: string; + title: string; + template: string; + selected: boolean; + disabled: boolean; + hasSeparator: boolean; + click: Function; + hotKey: number; +} +interface ASPxClientDashboardDesignerCustomizeMenuItemsEventArgs extends ASPxClientEventArgs { + Items: ASPxClientDashboardDesignerMenuItem[]; + FindById(itemId: string): ASPxClientDashboardDesignerMenuItem; +} +interface ASPxClientDashboardDesignerBeforeRenderEventHandler { + (source: S, e: ASPxClientEventArgs): void; +} +/** + * A client-side equivalent of the ASPxDashboardViewer control. + */ +interface ASPxClientDashboardViewer extends ASPxClientControl { + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after the available interactivity actions have changed. + */ + ActionAvailabilityChanged: ASPxClientEvent>; + /** + * Occurs when an end-user changes the state of the master filter. + */ + MasterFilterSet: ASPxClientEvent>; + /** + * Occurs when an end-user clears the selection in the master filter item. + */ + MasterFilterCleared: ASPxClientEvent>; + /** + * Provides the capability to handle data loading errors in the ASPxClientDashboardViewer. + */ + DataLoadingError: ASPxClientEvent>; + /** + * Occurs after a drill-down is performed. + */ + DrillDownPerformed: ASPxClientEvent>; + /** + * Occurs after a drill-up is performed. + */ + DrillUpPerformed: ASPxClientEvent>; + /** + * Occurs after the ASPxClientDashboardViewer is loaded. + */ + Loaded: ASPxClientEvent>; + /** + * Occurs when an end-user clicks a dashboard item. + */ + ItemClick: ASPxClientEvent>; + /** + * Allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting + */ + ItemVisualInteractivity: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetCreated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdating: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemBeforeWidgetDisposed: ASPxClientEvent>; + /** + * Occurs after the selection within the dashboard item is changed. + */ + ItemSelectionChanged: ASPxClientEvent>; + /** + * Allows you to color the required dashboard item elements using the specified colors. + */ + ItemElementCustomColor: ASPxClientEvent>; + /** + * Reloads data in the data sources. + */ + ReloadData(): void; + /** + * Reloads data in the data sources. + * @param parameters An array of ASPxClientDashboardParameter objects that specify dashboard parameters on the client side. + */ + ReloadData(parameters: ASPxClientDashboardParameter[]): void; + /** + * Returns dashboard parameter settings and metadata. + */ + GetParameters(): ASPxClientDashboardParameters; + /** + * Locks the EndUpdateParameters method call. + */ + BeginUpdateParameters(): void; + /** + * Unlocks the BeginUpdateParameters method and applies changes made to the parameter settings. + */ + EndUpdateParameters(): void; + /** + * Returns the currently selected range in the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Returns the visible range for the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetEntireRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Selects the required range in the specified Range Filter dashboard item. + * @param itemName A String that specifies the component name of the Range Filter dashboard item. + * @param range A String value that specifies the component name of the Range Filter dashboard item. + */ + SetRange(itemName: string, range: ASPxClientDashboardRangeFilterSelection): void; + /** + * Selects the specified range in the specified Range Filter dashboard item. + * @param itemName A String that specifies the component name of the Range Filter dashboard item. + * @param dateTimePeriodName A String that specifies the name of the predefined range used to perform a selection. + */ + SetRange(itemName: string, dateTimePeriodName: string): void; + /** + * Returns axis point tuples identifying elements that can be used to perform drill-down in the specified dashboard item. + * @param itemName A String that is the component name of the dashboard item. + */ + GetAvailableDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns the axis point tuple identifying the current drill-down state. + * @param itemName A String that is the component name of the dashboard item. + */ + GetCurrentDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Returns axis point tuples identifying elements that can be selected in the current state of the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetAvailableFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns axis point tuples identifying currently selected elements in the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetCurrentFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns currently selected elements in the master filter item. + * @param itemName A String that specifies a component name of the master filter item. + */ + GetCurrentSelection(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Requests underlying data for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + * @param args A ASPxClientDashboardItemRequestUnderlyingDataParameters object containing parameters used to obtain the underlying data. + * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. + */ + RequestUnderlyingData(itemName: string, args: ASPxClientDashboardItemRequestUnderlyingDataParameters, onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted): void; + /** + * Invokes the Dashboard Parameters dialog. + */ + ShowParametersDialog(): void; + /** + * Closes the Dashboard Parameters dialog. + */ + HideParametersDialog(): void; + /** + * Returns settings that specify parameters affecting how the dashboard is exported. + */ + GetExportOptions(): ASPxClientDashboardExportOptions; + /** + * Specifies settings that specify parameters affecting how the dashboard is exported. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + SetExportOptions(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to a PDF file and writes it to the Response. + */ + ExportToPdf(): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to an Image file and writes it to the Response. + */ + ExportToImage(): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToImage(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to a PDF file and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToPdf(itemName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Image file and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToImage(itemName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Excel file and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToExcel(itemName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Returns the dashboard width. + */ + GetWidth(): number; + /** + * Returns the dashboard height. + */ + GetHeight(): number; + /** + * Specifies the dashboard width. + * @param width An integer value that specifies the dashboard width. + */ + SetWidth(width: number): void; + /** + * Specifies the dashboard height. + * @param height An integer value that specifies the dashboard height. + */ + SetHeight(height: number): void; + /** + * Specifies the dashboard size. + * @param width An integer value that specifies the dashboard width. + * @param height An integer value that specifies the dashboard height. + */ + SetSize(width: number, height: number): void; + /** + * Selects required elements by their values in the specified master filter item. + * @param itemName A String that species the component name of the master filter item. + * @param values Values that will be used to select elements in the master filter item. + */ + SetMasterFilter(itemName: string, values: Object[][]): void; + /** + * Selects the required elements in the specified master filter item. + * @param itemName A String that specifies the component name of the master filter item. + * @param axisPointTuples An array of ASPxClientDashboardItemDataAxisPointTuple objects used to identify master filter elements. + */ + SetMasterFilter(itemName: string, axisPointTuples: ASPxClientDashboardItemDataAxisPointTuple[]): void; + /** + * Performs a drill-down for the required element by its value. + * @param itemName A String that species the component name of the dashboard item. + * @param value A value that will be used to perform a drill-down for the required element. + */ + PerformDrillDown(itemName: string, value: Object): void; + /** + * Performs a drill-down for the required element. + * @param itemName A String that specifies the component name of the dashboard item. + * @param axisPointTuple A ASPxClientDashboardItemDataAxisPointTuple object representing a set of axis points. + */ + PerformDrillDown(itemName: string, axisPointTuple: ASPxClientDashboardItemDataAxisPointTuple): void; + /** + * Clears the specified master filter item. + * @param itemName A String that specifies the component name of the master filter item. + */ + ClearMasterFilter(itemName: string): void; + /** + * Performs a drill-up for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + PerformDrillUp(itemName: string): void; + /** + * Returns whether or not the specified master filter item allows selecting one or more elements. + * @param itemName A String that specifies the component name of the master filter item. + */ + CanSetMasterFilter(itemName: string): boolean; + /** + * Returns whether or not the specified master filter can be cleared in the current state. + * @param itemName A String that specifies the component name of the master filter item. + */ + CanClearMasterFilter(itemName: string): boolean; + /** + * Returns whether or not drill down is possible in the current state of the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + CanPerformDrillDown(itemName: string): boolean; + /** + * Returns whether or not drill up is possible in the current state of the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + CanPerformDrillUp(itemName: string): boolean; + /** + * Returns the client data for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + GetItemData(itemName: string): ASPxClientDashboardItemData; +} +/** + * A range in the Range Filter dashboard item. + */ +interface ASPxClientDashboardRangeFilterSelection { + /** + * Gets or sets a maximum value in the range of the Range Filter dashboard item. + * Value: A maximum value in the range of the Range Filter dashboard item. + */ + Maximum: Object; + /** + * Gets or sets a minimum value in the range of the Range Filter dashboard item. + * Value: A minimum value in the range of the Range Filter dashboard item. + */ + Minimum: Object; +} +/** + * A collection of ASPxClientDashboardParameter objects. + */ +interface ASPxClientDashboardParameters { + /** + * Returns an array of dashboard parameters from the ASPxClientDashboardParameters collection. + */ + GetParameterList(): ASPxClientDashboardParameter[]; + /** + * Returns a dashboard parameter by its name. + * @param name A String object that specifies the parameter name. + */ + GetParameterByName(name: string): ASPxClientDashboardParameter; + /** + * Returns a dashboard parameter by its index in the ASPxClientDashboardParameters collection. + * @param index An integer value that specifies the parameter index. + */ + GetParameterByIndex(index: number): ASPxClientDashboardParameter; +} +/** + * A client-side dashboard parameter. + */ +interface ASPxClientDashboardParameter { + /** + * Gets the dashboard parameter name on the client side. + * Value: A String that is the dashboard parameter name on the client side. + */ + Name: string; + /** + * Gets the dashboard parameter value on the client side. + * Value: A String that specifies the dashboard parameter value on the client side. + */ + Value: Object; + /** + * Returns a parameter name. + */ + GetName(): string; + /** + * Returns a current parameter value. + */ + GetValue(): Object; + /** + * Specifies the current parameter value. + * @param value The current parameter value. + */ + SetValue(value: Object): void; + /** + * Returns a default parameter value. + */ + GetDefaultValue(): Object; + /** + * Returns the parameter's description displayed to an end-user. + */ + GetDescription(): string; + /** + * Returns a parameter type. + */ + GetType(): string; + /** + * Returns possible parameter values. + */ + GetValues(): ASPxClientDashboardParameterValue[]; +} +/** + * Provides access to the parameter value and display text. + */ +interface ASPxClientDashboardParameterValue { + /** + * Returns the parameter display text. + */ + GetDisplayText(): string; + /** + * Returns a parameter value. + */ + GetValue(): Object; +} +/** + * Contains settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. + */ +interface ImageFormatOptions { + /** + * Gets or sets an image format in which the dashboard (dashboard item) is exported. + * Value: A value returned by the DashboardExportImageFormat class that specifies an image format in which the dashboard (dashboard item) is exported. + */ + Format: string; + /** + * Gets or sets the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. + * Value: An integer value that specifies the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. + */ + Resolution: number; +} +/** + * Contains options which define how the dashboard item is exported to Excel format. + */ +interface ExcelFormatOptions { + /** + * Gets or sets the Excel format in which the dashboard item is exported. + * Value: A value returned by the DashboardExportExcelFormat class that specifies the Excel format in which the dashboard item is exported. + */ + Format: string; + /** + * Gets or sets a character used to separate values in a CSV document. + * Value: A String value that specifies the character used to separate values in a CSV document. + */ + CsvValueSeparator: string; +} +/** + * Contains settings that specify parameters affecting how the Grid dashboard item is exported. + */ +interface GridExportOptions { + /** + * Gets or sets whether the size of the Grid dashboard item is changed according to the width of the exported page. + * Value: true, to change the size of the Grid dashboard item according to the width of the exported page; otherwise, false. + */ + FitToPageWidth: boolean; + /** + * Gets or sets whether to print column headers of the Grid dashboard item on every page. + * Value: true, to print column headers on every page; otherwise, false. + */ + PrintHeadersOnEveryPage: boolean; +} +/** + * Contains settings that specify parameters affecting how the Pivot dashboard item is exported. + */ +interface PivotExportOptions { + /** + * Gets or sets whether to print the column headers of the pivot dashboard item on every page. + * Value: true, to print column headers on every page; otherwise, false. + */ + PrintHeadersOnEveryPage: boolean; +} +/** + * Contains settings that specify parameters affecting how the Pie dashboard item is exported. + */ +interface PieExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Gauge dashboard item is exported. + */ +interface GaugeExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Card dashboard item is exported. + */ +interface CardExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Range Filter dashboard item is exported. + */ +interface RangeFilterExportOptions { + /** + * Gets or sets whether the page orientation used to export a Range Filter dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a Range Filter dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Range Filter dashboard item. + * Value: A value returned by the RangeFilterExportSizeMode class that specifies the export size mode for the Range Filter dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how Chart dashboard items are exported. + */ +interface ChartExportOptions { + /** + * Gets or sets whether the page orientation used to export a Chart dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a Chart dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Chart dashboard item. + * Value: A value returned by the ChartExportSizeMode class that specifies the export size mode for the Chart dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how map dashboard items are exported. + */ +interface MapExportOptions { + /** + * Gets or sets whether the page orientation used to export a map dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a map dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the map dashboard item. + * Value: A value returned by the MapExportSizeMode class that specifies specifies the export size mode for the map dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how the dashboard (dashboard item) is exported. + */ +interface ASPxClientDashboardExportOptions { + /** + * Gets or sets the standard paper size. + * Value: A string value returned by the DashboardExportPaperKind class that specifies the standard paper size. + */ + PaperKind: string; + /** + * Gets or sets the page orientation used to export a dashboard (dashboard item). + * Value: A string value returned by the DashboardExportPageLayout class that specifies the page orientation used to export a dashboard (dashboard item). + */ + PageLayout: string; + /** + * Gets or sets the mode for scaling when exporting a dashboard (dashboard item). + * Value: A string value returned by the DashboardExportScaleMode class that specifies the mode for scaling when exporting a dashboard (dashboard item). + */ + ScaleMode: string; + /** + * Gets or sets the scale factor (in fractions of 1) by which a dashboard (dashboard item) is scaled. + * Value: A Single value that specifies the scale factor by which a dashboard (dashboard item) is scaled. + */ + ScaleFactor: number; + /** + * Gets or sets the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). + * Value: An integer value that specifies the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). + */ + AutoFitPageCount: number; + /** + * Gets or sets the title of the exported document. + * Value: A String value that specifies the title of the exported document. + */ + Title: string; + /** + * Gets or sets whether a dashboard title (or dashboard item's caption) is included as the exported document title. + * Value: A DefaultBoolean value that specifies whether a dashboard title (or dashboard item's caption) is included as the exported document title. + */ + ShowTitle: boolean; + /** + * Gets or sets the filter state's location on the exported document. + * Value: A string value returned by the DashboardExportFilterState class that specifies the filter state's location on the exported document. + */ + FilterState: string; + /** + * Provides access to options for exporting a dashboard or individual items in Image format. + * Value: An ImageFormatOptions object containing settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. + */ + ImageOptions: ImageFormatOptions; + /** + * Provides access to options for exporting individual dashboard items in Excel format. + * Value: An ExcelFormatOptions object containing settings that specify parameters affecting how the dashboard item is exported in Excel format. + */ + ExcelOptions: ExcelFormatOptions; + /** + * Provides access to options for exporting a Grid dashboard item. + * Value: A GridExportOptions object containing settings that specify parameters that affect how Grid dashboard items are exported. + */ + GridOptions: GridExportOptions; + /** + * Provides access to options for exporting a Pivot dashboard item. + * Value: A PivotExportOptions object containing settings that specify parameters that affect how Pivot dashboard items are exported. + */ + PivotOptions: PivotExportOptions; + /** + * Provides access to options for exporting a Pie dashboard item. + * Value: A PieExportOptions object containing settings that specify parameters that affect how Pie dashboard items are exported. + */ + PieOptions: PieExportOptions; + /** + * Provides access to options for exporting a Gauge dashboard item. + * Value: A GaugeExportOptions object containing settings that specify parameters that affect how Gauge dashboard items are exported. + */ + GaugeOptions: GaugeExportOptions; + /** + * Provides access to options for exporting a Card dashboard item. + * Value: A CardExportOptions object containing settings that specify parameters that affect how Card dashboard items are exported. + */ + CardOptions: CardExportOptions; + /** + * Provides access to options for exporting a Range Filter dashboard item. + * Value: A RangeFilterExportOptions object containing settings that specify parameters affecting how the Range Filter dashboard item is exported. + */ + RangeFilterOptions: RangeFilterExportOptions; + /** + * Provides access to options for exporting a Chart dashboard item. + * Value: A ChartExportOptions object containing settings that specify parameters that affect how Chart dashboard items are exported. + */ + ChartOptions: ChartExportOptions; + /** + * Provides access to options for exporting map dashboard items. + * Value: A MapExportOptions object containing settings that specify parameters that affect how map dashboard items are exported. + */ + MapOptions: MapExportOptions; +} +/** + * References a method that will handle the ActionAvailabilityChanged event. + */ +interface ASPxClientDashboardActionAvailabilityChangedEventHandler { + /** + * References a method that will handle the ActionAvailabilityChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardActionAvailabilityChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardActionAvailabilityChangedEventArgs): void; +} +/** + * Provides data for the ActionAvailabilityChanged event. + */ +interface ASPxClientDashboardActionAvailabilityChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets whether or not data reloading is available in the current state of dashboard item. + * Value: true, if data reloading is available in the current state of dashboard item; otherwise, false. + */ + IsReloadDataAvailable: boolean; + /** + * Gets interactivity actions currently available for the dashboard item. + * Value: An array of ASPxClientDashboardItemAction objects that represent interactivity actions currently available for the dashboard item. + */ + ItemActions: ASPxClientDashboardItemAction[]; +} +/** + * References a method that will handle the DataLoadingError event. + */ +interface ASPxClientDashboardDataLoadingErrorEventHandler { + /** + * References a method that will handle the DataLoadingError event. + * @param source The event source. + * @param e A ASPxClientDashboardDataLoadingErrorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardDataLoadingErrorEventArgs): void; +} +/** + * Provides data for the DataLoadingError event. + */ +interface ASPxClientDashboardDataLoadingErrorEventArgs extends ASPxClientEventArgs { + /** + * Allows you to determine whether or not the error message will be shown. + */ + IsErrorMessageShown(): boolean; + /** + * Allows you to specify whether to show the error message. + * @param value true, to show the error message; otherwise, false. + */ + ShowErrorMessage(value: boolean): void; + /** + * Allows you to obtain the displayed error message. + */ + GetError(): string; + /** + * Allows you to specify the displayed error message. + * @param value A string value that specifies the displayed error message. + */ + SetError(value: string): void; +} +/** + * Represents an interactivity action in the dashboard item. + */ +interface ASPxClientDashboardItemAction { + /** + * Gets the name of the dashboard item. + * Value: A String that specifies the name of the dashboard item. + */ + ItemName: string; + /** + * Gets interactivity actions performed on a dashboard item. + * Value: An array of ASPxClientDashboardAction values that specify interactivity actions performed on a dashboard item. + */ + Actions: any[]; +} +declare enum ASPxClientDashboardAction { + SetMasterFilter=0, + ClearMasterFilter=1, + DrillDown=2, + DrillUp=3 +} +/** + * References a method that will handle the MasterFilterSet event. + */ +interface ASPxClientDashboardMasterFilterSetEventHandler { + /** + * References a method that will handle the MasterFilterSet event. + * @param source The event source. + * @param e A ASPxClientDashboardMasterFilterSetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardMasterFilterSetEventArgs): void; +} +/** + * Provides data for the MasterFilterSet event. + */ +interface ASPxClientDashboardMasterFilterSetEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A String that specifies the name of the dashboard item. + */ + ItemName: string; + /** + * Gets values of currently selected elements in the master filter item. + * Value: Values of currently selected elements in the master filter item. + */ + Values: Object[][]; + /** + * Returns whether or not the specified value is NullValue. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is OthersValue. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; +} +/** + * References a method that will handle the MasterFilterCleared event. + */ +interface ASPxClientDashboardMasterFilterClearedEventHandler { + /** + * References a method that will handle the MasterFilterCleared event. + * @param source The event source. + * @param e A ASPxClientDashboardMasterFilterClearedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardMasterFilterClearedEventArgs): void; +} +/** + * Provides data for the MasterFilterCleared event. + */ +interface ASPxClientDashboardMasterFilterClearedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A String that is the name of the dashboard item. + */ + ItemName: string; +} +/** + * References a method that will handle the DrillDownPerformed event. + */ +interface ASPxClientDashboardDrillDownPerformedEventHandler { + /** + * References a method that will handle the DrillDownPerformed event. + * @param source The event source. + * @param e A ASPxClientDashboardDrillDownPerformedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardDrillDownPerformedEventArgs): void; +} +/** + * Provides data for the DrillDownPerformed event. + */ +interface ASPxClientDashboardDrillDownPerformedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A String that specifies the name of the dashboard item. + */ + ItemName: string; + /** + * Gets the bottommost value from the current drill-down hierarchy. + * Value: The bottommost value from the current drill-down hierarchy. + */ + Value: Object[]; + /** + * Returns whether or not the specified value is NullValue. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is OthersValue. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; +} +/** + * References a method that will handle the DrillUpPerformed event. + */ +interface ASPxClientDashboardDrillUpPerformedEventHandler { + /** + * References a method that will handle the DrillUpPerformed event. + * @param source The event source. + * @param e A ASPxClientDashboardDrillUpPerformedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardDrillUpPerformedEventArgs): void; +} +/** + * Provides data for the DrillUpPerformed event. + */ +interface ASPxClientDashboardDrillUpPerformedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A String that is the name of the dashboard item. + */ + ItemName: string; +} +/** + * Serves as the base object for all the editors included in the client-side object model. + */ +interface ASPxClientEditBase extends ASPxClientControl { + /** + * Returns the editor's value. + */ + GetValue(): Object; + /** + * Changes the editor's value. + * @param value An object representing the data to be assigned to the editor's edit value. + */ + SetValue(value: Object): void; + /** + * Returns a value indicating whether an editor is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether an editor is enabled. + * @param value true to enable the editor; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the text displayed in the editor caption. + */ + GetCaption(): string; + /** + * Specifies the text displayed in the editor caption. + * @param caption A string value specifying the editor caption. + */ + SetCaption(caption: string): void; +} +/** + * Serves as the base object for all the editors that support validation. + */ +interface ASPxClientEdit extends ASPxClientEditBase { + /** + * Fires on the client side when the editor receives input focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Fires on the client side when the editor loses input focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Allows you to specify whether the value entered into the editor is valid, and whether the editor is allowed to lose focus. + */ + Validation: ASPxClientEvent>; + /** + * Fires after the editor's value has been changed by end-user interactions. + */ + ValueChanged: ASPxClientEvent>; + /** + * Returns an HTML element that represents the control's input element. + */ + GetInputElement(): Object; + /** + * Sets input focus to the editor. + */ + Focus(): void; + /** + * Gets a value that indicates whether the editor's value passes validation. + */ + GetIsValid(): boolean; + /** + * Gets the error text to be displayed within the editor's error frame if the editor's validation fails. + */ + GetErrorText(): string; + /** + * Sets a value that specifies whether the editor's value is valid. + * @param isValid True if the editor's value is valid; otherwise, False. + */ + SetIsValid(isValid: boolean): void; + /** + * Sets the error text to be displayed within the editor's error frame if the editor's validation fails. + * @param errorText A string value representing the error text. + */ + SetErrorText(errorText: string): void; + /** + * Performs the editor's validation. + */ + Validate(): void; +} +/** + * Represents the client-side equivalent of the ASPxBinaryImage control. + */ +interface ASPxClientBinaryImage extends ASPxClientEdit { + /** + * Occurs on the client side after an image is clicked. + */ + Click: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client side if any server error occurs during server-side processing of a callback sent by the ASPxClientBinaryImage. + */ + CallbackError: ASPxClientEvent>; + /** + * Sets the size of the image editor. + * @param width An integer value that specifies the control's width. + * @param height An integer value that specifies the control's height. + */ + SetSize(width: number, height: number): void; + /** + * For internal use only. + */ + GetValue(): Object; + /** + * For internal use only. + * @param value + */ + SetValue(value: Object): void; + /** + * Removes an image from the editor content. + */ + Clear(): void; + /** + * Returns a name of the last uploaded file. + */ + GetUploadedFileName(): string; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * Represents the client-side equivalent of the ASPxButton control. + */ +interface ASPxClientButton extends ASPxClientControl { + /** + * Occurs on the client side when the button's checked state is changed. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Fires on the client side when the button receives input focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Fires on the client side when the button loses input focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Occurs on the client side after a button is clicked. + */ + Click: ASPxClientEvent>; + /** + * Simulates a mouse click action on the button control. + */ + DoClick(): void; + /** + * Returns a value indicating whether the button is checked. + */ + GetChecked(): boolean; + /** + * Sets a value that specifies the button's checked status. + * @param value true if the button is checked; otherwise, false. + */ + SetChecked(value: boolean): void; + /** + * Returns the text displayed within the button. + */ + GetText(): string; + /** + * Sets the text to be displayed within the button. + * @param value A string value specifying the text to be displayed within the button. + */ + SetText(value: string): void; + /** + * Returns the URL pointing to the image displayed within the button. + */ + GetImageUrl(): string; + /** + * Sets the URL pointing to the image displayed within the button. + * @param value A string value that is the URL to the image displayed within the button. + */ + SetImageUrl(value: string): void; + /** + * Sets a value specifying whether the button is enabled. + * @param value true to enable the button; false to disable it. + */ + SetEnabled(value: boolean): void; + /** + * Returns a value indicating whether the button is enabled. + */ + GetEnabled(): boolean; + /** + * Sets input focus to the button. + */ + Focus(): void; +} +/** + * A method that will handle the client Click event. + */ +interface ASPxClientButtonClickEventHandler { + /** + * A method that will handle the client Click event. + * @param source An object that is the event's source. + * @param e An ASPxClientButtonClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientButtonClickEventArgs): void; +} +/** + * Provides data for the Click event. + */ +interface ASPxClientButtonClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Specifies whether both the event's default action and the event's bubbling upon the hierarchy of event handlers should be canceled. + * Value: true to cancel the event's default action and the event's bubbling upon the hierarchy of event handlers; otherwise, false. + */ + cancelEventAndBubble: boolean; +} +/** + * Represents the client-side equivalent of the ASPxCalendar control. + */ +interface ASPxClientCalendar extends ASPxClientEdit { + /** + * Fires on the client side after the selected date has been changed within the calendar. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the month displayed within the calendar is changed. + */ + VisibleMonthChanged: ASPxClientEvent>; + /** + * Allows you to disable the calendar's days. + */ + CustomDisabledDate: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses a key while the editor has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses and releases a key while the editor has focus. + */ + KeyPress: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user releases a pressed key while the editor has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after the callback server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientCalendar. + */ + CallbackError: ASPxClientEvent>; + /** + * Tests whether the specified date is selected. + * @param date A date-time value that specifies the date to test. + */ + IsDateSelected(date: Date): boolean; + /** + * Sets the date that specifies the month and year to be displayed in the calendar. + * @param date The date that specifies calendar's visible month and year. + */ + SetVisibleDate(date: Date): void; + /** + * Sets the calendar's selected date. + * @param date A date object that specifies the calendar's selected date. + */ + SetSelectedDate(date: Date): void; + /** + * Returns the calendar's selected date. + */ + GetSelectedDate(): Date; + /** + * Gets the date that determines the month and year that are currently displayed in the calendar. + */ + GetVisibleDate(): Date; + /** + * Selects the specified date within the calendar. + * @param date A date-time value that specifies the selected date. + */ + SelectDate(date: Date): void; + /** + * Selects the specified range of dates within the calendar. + * @param start A date-time value that specifies the range's first date. + * @param end A date-time value that specifies the range's last date. + */ + SelectRange(start: Date, end: Date): void; + /** + * Deselects the specified date within the calendar. + * @param date A date-time value that specifies the date to deselect. + */ + DeselectDate(date: Date): void; + /** + * Deselects the specified range of dates within the calendar. + * @param start A date-time value that specifies the range's first date. + * @param end A date-time value that specifies the range's last date. + */ + DeselectRange(start: Date, end: Date): void; + /** + * Deselects all the selected dates within the calendar. + */ + ClearSelection(): void; + /** + * Returns a list of dates which are selected within the calendar. + */ + GetSelectedDates(): Date[]; + /** + * Gets the minimum date on the calendar. + */ + GetMinDate(): Date; + /** + * Sets the minimum date of the calendar. + * @param date A DateTime object representing the minimum date. + */ + SetMinDate(date: Date): void; + /** + * Gets the maximum date on the calendar. + */ + GetMaxDate(): Date; + /** + * Sets the maximum date of the calendar. + * @param date A DateTime object representing the maximum date. + */ + SetMaxDate(date: Date): void; +} +/** + * Provides data for the CustomDisabledDate event. + */ +interface ASPxClientCalendarCustomDisabledDateEventArgs extends ASPxClientEventArgs { + /** + * Gets the date processed in the calendar. + * Value: A DateTime value containing processed data. + */ + date: Date; + /** + * Gets or sets a value specifying whether selection of the processed calendar date is disabled. + * Value: true, if the date is disabled; otherwise, false. + */ + isDisabled: boolean; +} +/** + * A method that will handle the client CustomDisabledDate event. + */ +interface ASPxClientCalendarCustomDisabledDateEventHandler { + /** + * A method that will handle the client CustomDisabledDate event. + * @param source The event source. + * @param e An ASPxClientCalendarCustomDisabledDateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCalendarCustomDisabledDateEventArgs): void; +} +/** + * Represents the client-side equivalent of the ASPxCaptcha control. + */ +interface ASPxClientCaptcha extends ASPxClientControl { + /** + * Sets input focus to the control's text box. + */ + Focus(): void; + /** + * Refreshes the code displayed within the editor's challenge image. + */ + Refresh(): void; +} +/** + * Represents the client-side equivalent of the ASPxCheckBox control. + */ +interface ASPxClientCheckBox extends ASPxClientEdit { + /** + * Occurs on the client side when the editor's checked state is changed. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Returns a value indicating whether the check box editor is checked. + */ + GetChecked(): boolean; + /** + * Sets a value which specifies the checked status of the check box editor. + * @param isChecked true if the check box editor is checked; otherwise, false. + */ + SetChecked(isChecked: boolean): void; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Returns a value which specifies a check box checked state. + */ + GetCheckState(): string; + /** + * Sets a value specifying the state of a check box. + * @param checkState A string value matches one of the CheckState enumeration values. + */ + SetCheckState(checkState: string): void; + /** + * Sets the text to be displayed within the editor. + * @param text A string value specifying the text to be displayed within the editor. + */ + SetText(text: string): void; +} +/** + * Represents the client-side equivalent of the ASPxRadioButton control. + */ +interface ASPxClientRadioButton extends ASPxClientCheckBox { + /** + * Returns a value indicating whether the radio button is checked. + */ + GetChecked(): boolean; + /** + * Sets a value which specifies the radio button's checked status. + * @param isChecked true if the radio button is checked; otherwise, false. + */ + SetChecked(isChecked: boolean): void; +} +/** + * Represents a base for client-side objects which allow single-line text input. + */ +interface ASPxClientTextEdit extends ASPxClientEdit { + /** + * Occurs on the client-side when an end-user presses a key while the editor has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses and releases a key while the editor has focus. + */ + KeyPress: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user releases a pressed key while the editor has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Fires on the client side when the editor's text is changed and focus moves out of the editor by end-user interactions. + */ + TextChanged: ASPxClientEvent>; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Sets the text to be displayed within the editor. + * @param text A string value specifying the text to be displayed within the editor. + */ + SetText(text: string): void; + /** + * Selects all text in the text editor. + */ + SelectAll(): void; + /** + * Sets the caret position within the edited text. + * @param position An integer value that specifies the zero-based index of a text character that shall precede the caret. + */ + SetCaretPosition(position: number): void; + /** + * Selects the specified portion of the editor's text. + * @param startPos A zero-based integer value specifying the selection's starting position. + * @param endPos A zero-based integer value specifying the selection's ending position. + * @param scrollToSelection true to scroll the editor's contents to make the selection visible; otherwise, false. + */ + SetSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; +} +/** + * Represents a base for client-side editors which are capable of displaying and editing text data in their edit regions. + */ +interface ASPxClientTextBoxBase extends ASPxClientTextEdit { +} +/** + * Represents a base for client button editor objects. + */ +interface ASPxClientButtonEditBase extends ASPxClientTextBoxBase { + /** + * Occurs on the client side after an editor button is clicked. + */ + ButtonClick: ASPxClientEvent>; + /** + * Specifies whether the button is visible. + * @param number An integer value specifying the button's index within the Buttons collection. + * @param value true, to make the button visible; otherwise, false. + */ + SetButtonVisible(number: number, value: boolean): void; + /** + * Returns a value specifying whether a button is displayed. + * @param number An integer value specifying the button's index within the Buttons collection. + */ + GetButtonVisible(number: number): boolean; +} +/** + * Represents a base class for the editors that contain a drop down window. + */ +interface ASPxClientDropDownEditBase extends ASPxClientButtonEditBase { + /** + * Occurs on the client-side when the drop down window is opened. + */ + DropDown: ASPxClientEvent>; + /** + * Occurs on the client side when the drop down window is closed. + */ + CloseUp: ASPxClientEvent>; + /** + * Occurs on the client side before the drop down window is closed and allows you to cancel the operation. + */ + QueryCloseUp: ASPxClientEvent>; + /** + * Modifies the size of the drop down window in accordance with its content. + */ + AdjustDropDownWindow(): void; + /** + * Invokes the editor's drop down window. + */ + ShowDropDown(): void; + /** + * Closes the opened drop down window of the editor. + */ + HideDropDown(): void; +} +/** + * Represents the client-side equivalent of the ASPxColorEdit control. + */ +interface ASPxClientColorEdit extends ASPxClientDropDownEditBase { + /** + * Fires after the selected color has been changed within the color editor via end-user interaction. + */ + ColorChanged: ASPxClientEvent>; + /** + * This event is not in effect for the ASPxClientColorEdit. Use the ColorChanged event instead. + */ + TextChanged: ASPxClientEvent>; + /** + * Returns the color editor's value. + */ + GetColor(): string; + /** + * Specifies the color value for the color editor. + * @param value A string value specifying the editor color. + */ + SetColor(value: string): void; + /** + * Indicates whether the automatic color item is selected. + */ + IsAutomaticColorSelected(): boolean; +} +/** + * Represent the client-side equivalent of the ASPxComboBox control. + */ +interface ASPxClientComboBox extends ASPxClientDropDownEditBase { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientComboBox. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side after a different item in the list has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Specifies the text displayed within the editor's edit box. + * @param text A string value specifying the editor's text. + */ + SetText(text: string): void; + /** + * Adds a new item to the editor specifying the item's display text and returns the index of the added item. + * @param text A string value specifying the item's display text. + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor specifying the item's display text and associated value, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + AddItem(text: string, value: Object, imageUrl: string): number; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, text: string, value: Object, imageUrl: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + */ + InsertItem(index: number, text: string): void; + /** + * Removes an item specified by its index from the client list editor. + * @param index An integer value representing the index of the list item to be removed. + */ + RemoveItem(index: number): void; + /** + * Removes all items from the client combo box editor. + */ + ClearItems(): void; + /** + * Prevents the client combobox editor from being rendered until the EndUpdate method is called. + */ + BeginUpdate(): void; + /** + * Re-enables editor render operations after a call to the BeginUpdate method and forces an immediate re-rendering. + */ + EndUpdate(): void; + /** + * Scrolls the editor's item list, so that the specified item becomes visible. + * @param index An integer value that specifies the item's index within the editor's client item list. + */ + MakeItemVisible(index: number): void; + /** + * Returns an item specified by its index within the combo box editor's item collection. + * @param index An integer value specifying the zero-based index of the item to search for. + */ + GetItem(index: number): ASPxClientListEditItem; + /** + * Returns a combo box item by its text. + * @param text A string that specifies the item's text. + */ + FindItemByText(text: string): ASPxClientListEditItem; + /** + * Returns a combo box item by its value. + * @param value An object that specifies the item's value. + */ + FindItemByValue(value: Object): ASPxClientListEditItem; + /** + * Gets the number of items contained in the editor's item collection. + */ + GetItemCount(): number; + /** + * Returns the index of the selected item within the combo box editor. + */ + GetSelectedIndex(): number; + /** + * Sets the combobox editor's selected item specified by its index. + * @param index An integer value specifying the zero-based index of the item to select. + */ + SetSelectedIndex(index: number): void; + /** + * Returns the combo box editor's selected item. + */ + GetSelectedItem(): ASPxClientListEditItem; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; + /** + * Gets the text displayed in the editor's edit box. + */ + GetText(): string; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + AddItem(texts: string[], value: Object, imageUrl: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A String value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, texts: string[], value: Object, imageUrl: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + InsertItem(index: number, texts: string[]): void; + /** + * Determines whether the drop-down content is loaded; if not - loads the content. + * @param callbackFunction An object that is the JavaScript function that receives the callback data as a parameter. The function is performed after the combo box content is loaded. + */ + EnsureDropDownLoaded(callbackFunction: Object): void; +} +/** + * Represents the client-side equivalent of the ASPxDateEdit control. + */ +interface ASPxClientDateEdit extends ASPxClientDropDownEditBase { + /** + * Fires after the selected date has been changed within the date editor. + */ + DateChanged: ASPxClientEvent>; + /** + * Enables you to convert the value entered by an end user into the value that will be stored by the date editor. + */ + ParseDate: ASPxClientEvent>; + /** + * Allows you to disable the calendar's days. + */ + CalendarCustomDisabledDate: ASPxClientEvent>; + /** + * This event is not in effect for the ASPxClientDateEdit. Use the DateChanged event instead. + */ + TextChanged: ASPxClientEvent>; + /** + * Returns the calendar of the date editor. + */ + GetCalendar(): ASPxClientCalendar; + /** + * Returns the built-in time edit control. + */ + GetTimeEdit(): ASPxClientTimeEdit; + /** + * + * @param date + */ + SetDate(date: Date): void; + GetDate(): Date; + /** + * Returns the number of days in a range selected within a date edit. + */ + GetRangeDayCount(): number; + /** + * Gets the minimum date of the editor. + */ + GetMinDate(): Date; + /** + * Sets the minimum date of the editor. + * @param date A DateTime object representing the minimum date. + */ + SetMinDate(date: Date): void; + /** + * Gets the maximum date of the editor. + */ + GetMaxDate(): Date; + /** + * Sets the maximum date of the editor. + * @param date A DateTime object representing the maximum date. + */ + SetMaxDate(date: Date): void; +} +/** + * Provides data for the ParseDate client-side event that parses a string entered into a date editor. + */ +interface ASPxClientParseDateEventArgs extends ASPxClientEventArgs { + /** + * Gets the value entered into the date editor by an end user. + * Value: The string value entered into the date editor by an end user. + */ + value: string; + /** + * Gets or sets the edit value of the date editor. + * Value: A date/time value representing the edit value of the date editor. + */ + date: Date; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the client ParseDate event, that parses a date editor's value when entered. + */ +interface ASPxClientParseDateEventHandler { + /** + * A method that will handle the ParseDate event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientParseDateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientParseDateEventArgs): void; +} +/** + * Represents a base for client editor objects realizing the dropdown editor functionality. + */ +interface ASPxClientDropDownEdit extends ASPxClientDropDownEditBase { + /** + * Obtains the key value associated with the text displayed within the editor's edit box. + */ + GetKeyValue(): string; + /** + * Specifies the key value associated with the text displayed within the editor's edit box. + * @param keyValue A string specifying the key value associated with the editor's value (displayed text). + */ + SetKeyValue(keyValue: string): void; +} +/** + * A method that will handle the client events involving a keyboard key being pressed or released. + */ +interface ASPxClientEditKeyEventHandler { + /** + * A method that will handle the client events concerning a keyboard key being pressed. + * @param source The event source. This parameter identifies the editor which raised the event. + * @param e An ASPxClientEditKeyEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEditKeyEventArgs): void; +} +/** + * Provides data for the client events involved with a key being pressed or released. + */ +interface ASPxClientEditKeyEventArgs extends ASPxClientEventArgs { + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle client validation events. + */ +interface ASPxClientEditValidationEventHandler { + /** + * A method that will handle client validation events. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientEditValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEditValidationEventArgs): void; +} +/** + * Provides data for the client events that are related to data validation (see Validate). + */ +interface ASPxClientEditValidationEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets the error description. + * Value: A string representing the error description. + */ + errorText: string; + /** + * Gets or sets a value specifying whether the validated value is valid. + * Value: true if the value is valid; otherwise, false. + */ + isValid: boolean; + /** + * Gets or sets the editor's value being validated. + * Value: An object that represents the validated value. + */ + value: string; +} +/** + * Represents the client ASPxFilterControl. + */ +interface ASPxClientFilterControl extends ASPxClientControl { + /** + * Occurs after a new filter expression has been applied. + */ + Applied: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientFilterControl. + */ + CallbackError: ASPxClientEvent>; + /** + * Returns the filter expression. + */ + GetFilterExpression(): string; + /** + * Returns the applied filter expression. + */ + GetAppliedFilterExpression(): string; + /** + * Returns the editor used to edit operand values for the specified filter column. + * @param editorIndex An integer value that identifies the filter column by its index within the collection. + */ + GetEditor(editorIndex: number): ASPxClientEditBase; + /** + * Returns a value indicating whether the filter expression being currently composed on the client side is valid - all expression conditions are filled. + */ + IsFilterExpressionValid(): boolean; + /** + * Applies a filter constructed by an end-user. + */ + Apply(): void; + /** + * Resets the current filter expression to a previously applied filter expression. + */ + Reset(): void; +} +/** + * A method that will handle the Applied event. + */ +interface ASPxClientFilterAppliedEventHandler { + /** + * A method that will handle the Applied event. + * @param source The event source. + * @param e An ASPxClientFilterAppliedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFilterAppliedEventArgs): void; +} +/** + * Provides data for the Applied event. + */ +interface ASPxClientFilterAppliedEventArgs extends ASPxClientEventArgs { + /** + * Gets the filter expression currently being applied. + * Value: A string value that specifies the filter expression currently being applied. + */ + filterExpression: string; +} +/** + * Represents a base for client editor objects that display a list of items. + */ +interface ASPxClientListEdit extends ASPxClientEdit { + /** + * Occurs on the client side after a different item in the list has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Returns the list editor's selected item. + */ + GetSelectedItem(): ASPxClientListEditItem; + /** + * Returns the index of the selected item within the list editor. + */ + GetSelectedIndex(): number; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; + /** + * Sets the list editor's selected item specified by its index. + * @param index An integer value specifying the zero-based index of the item to select. + */ + SetSelectedIndex(index: number): void; +} +/** + * Represents the client-side equivalent of the ListEditItem object. + */ +interface ASPxClientListEditItem { + /** + * Gets a value that indicates whether a list edit item is selected. + * Value: true if a list edit item is selected; otherwise, false. + */ + selected: boolean; + /** + * Gets an editor to which the current item belongs. + * Value: An ASPxClientListEdit object that represents the item's owner editor. + */ + listEditBase: ASPxClientListEdit; + /** + * Gets the item's index. + * Value: An integer value that represents the item's index within the corresponding editor's item collection. + */ + index: number; + /** + * Gets the item's associated image. + * Value: A string value that represents the path to the image displayed by the item. + */ + imageUrl: string; + /** + * Gets the item's display text. + * Value: A string value that represents the item's display text. + */ + text: string; + /** + * Gets the item's associated value. + * Value: An object that represents the value associated with the item. + */ + value: Object; + /** + * Returns the list item's value that corresponds to a column specified by its index. + * @param columnIndex An integer value that specifies the column's index within the editor's Columns collection. + */ + GetColumnText(columnIndex: number): string; + /** + * Returns the list item's value that corresponds to a column specified by its field name. + * @param columnName A string value that specifies the column's field name defined via the FieldName property. + */ + GetColumnText(columnName: string): string; +} +/** + * Represents the client-side equivalent of the ASPxListBox control. + */ +interface ASPxClientListBox extends ASPxClientListEdit { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientListBox. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when an end-user presses a key while the editor has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs on the client side when an end-user presses and releases a key while the editor has focus. + */ + KeyPress: ASPxClientEvent>; + /** + * Occurs on the client side when an end-user releases a pressed key while the editor has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Occurs on the client side after a different item in the list box has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Occurs on the client when the editor's item is double clicked. + */ + ItemDoubleClick: ASPxClientEvent>; + /** + * Gets the number of items contained in the editor's item collection. + */ + GetItemCount(): number; + /** + * Returns an item specified by its index within the list box editor's item collection. + * @param index An integer value specifying the zero-based index of the item to search for. + */ + GetItem(index: number): ASPxClientListEditItem; + /** + * Returns an array of the list editor's selected items indices. + */ + GetSelectedIndices(): number[]; + /** + * Returns an array of the list editor's selected items values. + */ + GetSelectedValues(): Object[]; + /** + * Returns an array of the list editor's selected items. + */ + GetSelectedItems(): ASPxClientListEditItem[]; + /** + * Selects all list box items. + */ + SelectAll(): void; + /** + * Unselects all list box items. + */ + UnselectAll(): void; + /** + * Selects the items with the specified indices within a list box. + * @param indices An array of integer values that represent the items indices. + */ + SelectIndices(indices: number[]): void; + /** + * Unselects an array of the list box items with the specified indices. + * @param indices An array of integer values that represent the indices. + */ + UnselectIndices(indices: number[]): void; + /** + * Selects the specified items within a list box. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + SelectItems(items: ASPxClientListEditItem[]): void; + /** + * Unselects an array of the specified list box items. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + UnselectItems(items: ASPxClientListEditItem[]): void; + /** + * Select the items with the specified values within a list box. + * @param values An array of Object[] objects that represent the item's values. + */ + SelectValues(values: Object[]): void; + /** + * Unselects an array of the list box items with the specified values. + * @param values An array of Object[] objects that represent the values. + */ + UnselectValues(values: Object[]): void; + /** + * Scrolls the editor's item list, so that the specified item becomes visible. + * @param index An integer value that specifies the item's index within the editor's client item list. + */ + MakeItemVisible(index: number): void; + /** + * Initializes the ASPxClientListBox client object when its parent container becomes visible dynamically, on the client side. + */ + InitOnContainerMadeVisible(): void; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param text A string value specifying the item's display text. + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor, specifying the item's display text and associated value, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + AddItem(text: string, value: Object, imageUrl: string): number; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, text: string, value: Object, imageUrl: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + */ + InsertItem(index: number, text: string): void; + /** + * Prevents the client list box editor from being rendered until the EndUpdate method is called. + */ + BeginUpdate(): void; + /** + * Re-enables editor render operations after a call to the BeginUpdate method, and forces an immediate re-rendering. + */ + EndUpdate(): void; + /** + * Removes all items from the client list box editor. + */ + ClearItems(): void; + /** + * Removes an item specified by its index from the client list editor. + * @param index An integer value representing the index of the list item to be removed. + */ + RemoveItem(index: number): void; + /** + * Returns a list box item by its text. + * @param text A string that specifies the item's text. + */ + FindItemByText(text: string): ASPxClientListEditItem; + /** + * Returns a list box item by its value. + * @param value An object that specifies the item's value. + */ + FindItemByValue(value: Object): ASPxClientListEditItem; + /** + * Sends a callback to the server, and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Adds a new item to the end of the editor's items collection, specifying the item's display text, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the editor's items collection, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A String value specifying the path to the image displayed by the item. + */ + AddItem(texts: string[], value: Object, imageUrl: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A String value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, texts: string[], value: Object, imageUrl: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + InsertItem(index: number, texts: string[]): void; +} +/** + * Serves as the base type for the ASPxClientRadioButtonList objects. + */ +interface ASPxClientCheckListBase extends ASPxClientListEdit { + /** + * Gets the number of items contained in the editor's item collection. + */ + GetItemCount(): number; + /** + * Returns the editor's item specified by its index. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): ASPxClientListEditItem; +} +/** + * Represents the client-side equivalent of the ASPxRadioButtonList control. + */ +interface ASPxClientRadioButtonList extends ASPxClientCheckListBase { +} +/** + * A client-side equivalent of the ASPxCheckBoxList object. + */ +interface ASPxClientCheckBoxList extends ASPxClientCheckListBase { + /** + * Occurs on the client side after a different item in the check box list has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Returns an array of the check box list editor's selected items indices. + */ + GetSelectedIndices(): number[]; + /** + * Returns an array of the check box list editor's selected items values. + */ + GetSelectedValues(): Object[]; + /** + * Returns an array of the check box list editor's selected items. + */ + GetSelectedItems(): ASPxClientListEditItem[]; + /** + * Selects all check box list items. + */ + SelectAll(): void; + /** + * Unselects all check box list items. + */ + UnselectAll(): void; + /** + * Selects items with the specified indices within a check box list. + * @param indices An array of integer values that are the item indices. + */ + SelectIndices(indices: number[]): void; + /** + * Selects the specified items within a check box list. + * @param items An array of ASPxClientListEditItem objects that are the items. + */ + SelectItems(items: ASPxClientListEditItem[]): void; + /** + * Selects items with the specified values within a check box list. + * @param values An array of Object[] objects that are the item values. + */ + SelectValues(values: Object[]): void; + /** + * Unselects items with the specified indices within a check box list. + * @param indices An array of integer values that are the item indices. + */ + UnselectIndices(indices: number[]): void; + /** + * Unselects the specified items within a check box list. + * @param items An array of ASPxClientListEditItem objects that are the items. + */ + UnselectItems(items: ASPxClientListEditItem[]): void; + /** + * Unselects items with the specified values within a check box list. + * @param values An array of Object[] objects that are the item values. + */ + UnselectValues(values: Object[]): void; +} +/** + * A method that will handle the SelectedIndexChanged event. + */ +interface ASPxClientListEditItemSelectedChangedEventHandler { + /** + * A method that will handle the SelectedIndexChanged event. + * @param source The event source. + * @param e An ASPxClientListEditItemSelectedChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientListEditItemSelectedChangedEventArgs): void; +} +/** + * Provides data for the SelectedIndexChanged event. + */ +interface ASPxClientListEditItemSelectedChangedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An integer value that represents the item's index within the corresponding editor's item collection. + */ + index: number; + /** + * Gets whether the item has been selected. + * Value: true if the item is selected; otherwise, false. + */ + isSelected: boolean; +} +/** + * Represents a client-side equivalent of the ASPxProgressBar control. + */ +interface ASPxClientProgressBar extends ASPxClientEditBase { + /** + * Sets the position of the operation's progress. + * @param position An integer value specifying the progress position. + */ + SetPosition(position: number): void; + /** + * Gets the position of the operation's progress. + */ + GetPosition(): number; + /** + * Sets the pattern used to format the displayed text for the progress bar. + * @param text A value that is the format pattern. + */ + SetCustomDisplayFormat(text: string): void; + /** + * Returns the text displayed within the progress bar. + */ + GetDisplayText(): string; + /** + * Sets the percentage representation of the progress position. + */ + GetPercent(): number; + /** + * Sets the minimum range value of the progress bar. + * @param min An integer value specifying the minimum value of the progress bar range. + */ + SetMinimum(min: number): void; + /** + * Sets the maximum range value of the progress bar. + * @param max An integer value specifying the maximum value of the progress bar range. + */ + SetMaximum(max: number): void; + /** + * Gets the minimum range value of the progress bar. + */ + GetMinimum(): number; + /** + * Gets the maximum range value of the progress bar. + */ + GetMaximum(): number; + /** + * Sets the minimum and maximum range values of the progress bar. + * @param minValue An integer value specifying the minimum value of the progress bar range. + * @param maxValue An integer value specifying the maximum value of the progress bar range. + */ + SetMinMaxValues(minValue: number, maxValue: number): void; +} +/** + * Represents a base class for the ASPxClientSpinEdit object. + */ +interface ASPxClientSpinEditBase extends ASPxClientButtonEditBase { + /** + * This event is not in effect for the ASPxClientSpinEditBase. Use the ASPxClientTimeEdit. + */ + TextChanged: ASPxClientEvent>; +} +/** + * Represents the client-side equivalent of the ASPxSpinEdit control. + */ +interface ASPxClientSpinEdit extends ASPxClientSpinEditBase { + /** + * Occurs on the client side when the editor's value is altered in any way. + */ + NumberChanged: ASPxClientEvent>; + /** + * Specifies the value of the spin edit control on the client side. + * @param number A Decimal value specifying the control value. + */ + SetValue(number: number): void; + /** + * Sets the spin editor's value. + * @param number A decimal number specifying the value to assign to the spin editor. + */ + SetNumber(number: number): void; + /** + * Gets a number which represents the spin editor's value. + */ + GetNumber(): number; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Sets the minimum value of the editor. + * @param value A decimal value specifying the minimum value of the editor. + */ + SetMinValue(value: number): void; + /** + * Gets the minimum value of the editor. + */ + GetMinValue(): number; + /** + * Sets the maximum value of the editor. + * @param value A decimal value specifying the maximum value of the editor. + */ + SetMaxValue(value: number): void; + /** + * Gets the maximum value of the editor. + */ + GetMaxValue(): number; + /** + * Changes the editor's value. + * @param value An object representing the data to be assigned to the editor's edit value. + */ + SetValue(value: Object): void; +} +/** + * Represents the client-side equivalent of the ASPxTimeEdit control. + */ +interface ASPxClientTimeEdit extends ASPxClientSpinEditBase { + /** + * Fires after the selected date has been changed within the time editor. + */ + DateChanged: ASPxClientEvent>; + /** + * + * @param date + */ + SetDate(date: Date): void; + GetDate(): Date; +} +/** + * Represents a base for client-side static editors whose values cannot be visually changed by end users. + */ +interface ASPxClientStaticEdit extends ASPxClientEditBase { + /** + * Occurs on the client side after an end-user clicks within a static editor. + */ + Click: ASPxClientEvent>; +} +/** + * A method that will handle client-side events which concern clicking within editors. + */ +interface ASPxClientEditEventHandler { + /** + * A method that will handle client-side events which concern clicking within editors. + * @param source An object representing the event source. Identifies the editor that raised the event. + * @param e An ASPxClientEditClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEditClickEventArgs): void; +} +/** + * Provides data for the client-side events which concern clicking within editors. + */ +interface ASPxClientEditClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the HTML element related to the event. + * Value: An object that represents the clicked HTML element. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents the client-side equivalent of the ASPxHyperLink control. + */ +interface ASPxClientHyperLink extends ASPxClientStaticEdit { + /** + * Gets an URL which defines the navigation location for the editor's hyperlink. + */ + GetNavigateUrl(): string; + /** + * Specifies an URL which defines the navigation location for the editor's hyperlink. + * @param url A string value which specifies an URL to where the client web browser will navigate when a hyperlink in the editor is clicked. + */ + SetNavigateUrl(url: string): void; + /** + * Gets the text caption displayed for the hyperlink in the hyperlink editor. + */ + GetText(): string; + /** + * Specifies the text caption displayed for the hyperlink in the hyperlink editor. + * @param text A string value specifying the text caption for the hyperlink in the editor. + */ + SetText(text: string): void; +} +/** + * Represents a base for client-side editors which are capable of displaying images. + */ +interface ASPxClientImageBase extends ASPxClientStaticEdit { + /** + * Sets the size of the image displayed within the image editor. + * @param width An integer value that specifies the image's width. + * @param height An integer value that specifies the image's height. + */ + SetSize(width: number, height: number): void; +} +/** + * Represents the client-side equivalent of the ASPxImage control. + */ +interface ASPxClientImage extends ASPxClientImageBase { + /** + * Returns the URL pointing to the image displayed within the image editor. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the image editor. + * @param url A string value specifying the URL to the image displayed within the editor. + */ + SetImageUrl(url: string): void; +} +/** + * Represents the client-side equivalent of the ASPxLabel control. + */ +interface ASPxClientLabel extends ASPxClientStaticEdit { + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Sets the text to be displayed within the editor. + * @param text A string value specifying the text to be displayed within the editor. + */ + SetText(text: string): void; +} +/** + * Represents the client-side equivalent of the ASPxTextBox control. + */ +interface ASPxClientTextBox extends ASPxClientTextBoxBase { +} +/** + * Represents the client-side equivalent of the ASPxMemo control. + */ +interface ASPxClientMemo extends ASPxClientTextEdit { +} +/** + * Represents the client-side equivalent of the ASPxButtonEdit control. + */ +interface ASPxClientButtonEdit extends ASPxClientButtonEditBase { +} +/** + * A method that will handle the ButtonClick event. + */ +interface ASPxClientButtonEditClickEventHandler { + /** + * A method that will handle the ButtonClick event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientButtonEditClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientButtonEditClickEventArgs): void; +} +/** + * Provides data for the ButtonClick event. + */ +interface ASPxClientButtonEditClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the index of the clicked button. + * Value: An integer value representing the index of the clicked button within the editor's Buttons collection. + */ + buttonIndex: number; +} +/** + * A client-side equivalent of the ASPxTokenBox object. + */ +interface ASPxClientTokenBox extends ASPxClientComboBox { + /** + * Fires on the client side after the token collection has been changed. + */ + TokensChanged: ASPxClientEvent>; + /** + * Adds a new token with the specified text to the end of the control's token collection. + * @param text A string value specifying the token's text. + */ + AddToken(text: string): void; + /** + * Removes a token specified by its text from the client token box. + * @param text A string value that is the text of the token to be removed. + */ + RemoveTokenByText(text: string): void; + /** + * Removes a token specified by its index from the client token box. + * @param index An integer value that is the index of the token to be removed. + */ + RemoveToken(index: number): void; + /** + * Returns an HTML span element that corresponds to the specified token. + * @param index An integer value that is the token index. + */ + GetTokenHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified token's text. + * @param index An integer value that is the token index. + */ + GetTokenTextHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified token's remove button. + * @param index An integer value that is the token index. + */ + GetTokenRemoveButtonHtmlElement(index: number): Object; + /** + * Returns a collection of tokens. + */ + GetTokenCollection(): string[]; + /** + * Sets a collection of tokens. + * @param collection A object that is the collection of tokens. + */ + SetTokenCollection(collection: string[]): void; + /** + * Removes all tokens contained in the token box. + */ + ClearTokenCollection(): void; + /** + * Returns the index of a token specified by its text. + * @param text A string value that specifies the text of the token. + */ + GetTokenIndexByText(text: string): number; + /** + * Gets the token texts, separated with a sign, specified by the TextSeparator property. + */ + GetText(): string; + /** + * Sets the token texts, separated with a sign, specified by the TextSeparator property. + * @param text A string value that is the token texts separated with a text separator. + */ + SetText(text: string): void; + /** + * Gets the editor value. + */ + GetValue(): string; + /** + * Sets the editor value. + * @param value A string that is the editor value. + */ + SetValue(value: string): void; + /** + * Returns a value that indicates if the specified token (string) is a custom token. + * @param text A string value that is a token. + * @param caseSensitive true, if tokens are case sensitive; otherwise, false. + */ + IsCustomToken(text: string, caseSensitive: boolean): boolean; + /** + * Changes the editor's value. + * @param value An object representing the data to be assigned to the editor's edit value. + */ + SetValue(value: Object): void; +} +/** + * The client-side equivalent of the ASPxTrackBar control. + */ +interface ASPxClientTrackBar extends ASPxClientEdit { + /** + * Fires on the client side before a track bar position is changed and allows you to cancel the action. + */ + PositionChanging: ASPxClientEvent>; + /** + * Fires after the editor's position has been changed. + */ + PositionChanged: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user moves a cursor while the drag handle is held down. + */ + Track: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses a drag handle and moves it. + */ + TrackStart: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user releases a drag handle after moving it. + */ + TrackEnd: ASPxClientEvent>; + /** + * Returns a track bar item index by the item's value. + * @param value An object that specifies the item's value. + */ + GetItemIndexByValue(value: Object): number; + /** + * Returns a track bar item's associated value. + * @param index An integer value that specifies the required item's index. + */ + GetItemValue(index: number): Object; + /** + * Returns a track bar item text. + * @param index An integer value that specifies the required item's index. + */ + GetItemText(index: number): string; + /** + * Returns a track bar item's tooltip text. + * @param index An integer value that specifies the required item's index. + */ + GetItemToolTip(index: number): string; + /** + * Returns the number of the track bar items that are maintained by the item collection. + */ + GetItemCount(): number; + /** + * Specifies the secondary drag handle position. + * @param position A value that specifies the position. + */ + SetPositionEnd(position: number): void; + /** + * Specifies the main drag handle position. + * @param position A value that specifies the position. + */ + SetPositionStart(position: number): void; + /** + * Returns the secondary drag handle position. + */ + GetPositionEnd(): number; + /** + * Returns the main drag handle position. + */ + GetPositionStart(): number; + /** + * Gets a drag handle position. + */ + GetPosition(): number; + /** + * Specifies a drag handle position. + * @param position A value that specifies the position. + */ + SetPosition(position: number): void; +} +/** + * A method that will handle the client PositionChanging event. + */ +interface ASPxClientTrackBarPositionChangingEventHandler { + /** + * A method that will handle the PositionChanging event. + * @param source The event source. Identifies the ASPxTrackBar control that raised the event. + * @param e A ASPxClientTrackBarPositionChangingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTrackBarPositionChangingEventArgs): void; +} +/** + * Provides data for the PositionChanging event. + */ +interface ASPxClientTrackBarPositionChangingEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; + /** + * Gets the current drag handle position. + * Value: A value that is the drag handle position. + */ + currentPosition: number; + /** + * Gets the current secondary drag handle position. + * Value: A value that is the drag handle position. + */ + currentPositionEnd: number; + /** + * Gets the current main drag handle position. + * Value: A value that is the drag handle position. + */ + currentPositionStart: number; + /** + * Gets a position where the drag handle is being moved. + * Value: A value that is the drag handle position. + */ + newPosition: number; + /** + * Gets a position where the secondary drag handle is being moved. + * Value: A value that is the drag handle position. + */ + newPositionEnd: number; + /** + * Gets a position where the main drag handle is being moved. + * Value: A value that is the drag handle position. + */ + newPositionStart: number; +} +/** + * Represents the client-side equivalent of the ASPxValidationSummary control. + */ +interface ASPxClientValidationSummary extends ASPxClientControl { + /** + * Occurs on the client side when the validation summary's visibility is changed. + */ + VisibilityChanged: ASPxClientEvent>; +} +/** + * A method that will handle the VisibilityChanged event. + */ +interface ASPxClientValidationSummaryVisibilityChangedEventHandler { + /** + * A method that will handle the VisibilityChanged client event. + * @param source An object representing the event source. + * @param e A ASPxClientValidationSummaryVisibilityChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientValidationSummaryVisibilityChangedEventArgs): void; +} +/** + * Provides data for the VisibilityChanged event. + */ +interface ASPxClientValidationSummaryVisibilityChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether the editor is visible on the client. + * Value: true if the editor is visible; otherwise, false. + */ + visible: boolean; +} +/** + * Represents the client ASPxGaugeControl. + */ +interface ASPxClientGaugeControl extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires when errors have occurred during callback processing. + */ + CallbackError: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * Represents the client ASPxGridView. + */ +interface ASPxClientGridBase extends ASPxClientControl { +} +/** + * Serves as a base object implementing the client column functionality. + */ +interface ASPxClientGridColumnBase { +} +/** + * The client-side equivalent of the ASPxGridLookup control. + */ +interface ASPxClientGridLookup extends ASPxClientDropDownEditBase { + /** + * Fires on the client when a data row is clicked within the built-in dropdown grid. + */ + RowClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Returns a client object representing the built-in dropdown grid. + */ + GetGridView(): ASPxClientGridView; + /** + * Confirms the current selection made by an end-user within the editor's dropdown grid. + */ + ConfirmCurrentSelection(): void; + /** + * Cancels the current selection made by an end-user within the editor's dropdown grid and rolls back to the last confirmed selection. The selection can be confirmed by either pressing the Enter key or calling the ConfirmCurrentSelection method. + */ + RollbackToLastConfirmedSelection(): void; +} +/** + * Represents the client ASPxCardView. + */ +interface ASPxClientCardView extends ASPxClientGridBase { + /** + * Provides access to the batch editing client API. + * Value: A object that exposes the batch editing client API methods. + */ + batchEditApi: ASPxClientCardViewBatchEditApi; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Enables you to prevent columns from being sorted. + */ + ColumnSorting: ASPxClientEvent>; + /** + * Occurs when a grid switches to batch edit mode. + */ + BatchEditStartEditing: ASPxClientEvent>; + /** + * Occurs when a grid leaves batch edit mode. + */ + BatchEditEndEditing: ASPxClientEvent>; + /** + * Enables you to prevent a batch edit confirmation message from being displayed. + */ + BatchEditConfirmShowing: ASPxClientEvent>; + /** + * Enables you to provide navigation for editors contained in a templated cell in Batch Edit mode. + */ + BatchEditTemplateCellFocused: ASPxClientEvent>; + /** + * Enables you to specify whether card data is valid and provide an error text. + */ + BatchEditCardValidating: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are saved in batch edit mode. + */ + BatchEditChangesSaving: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are canceled in batch edit mode. + */ + BatchEditChangesCanceling: ASPxClientEvent>; + /** + * Occurs on the client side before a card is inserted in batch edit mode. + */ + BatchEditCardInserting: ASPxClientEvent>; + /** + * Occurs on the client side before a card is deleted in batch edit mode. + */ + BatchEditCardDeleting: ASPxClientEvent>; + /** + * Fires on the client when a card is clicked. + */ + CardClick: ASPxClientEvent>; + /** + * Fires on the client when a card is double clicked. + */ + CardDblClick: ASPxClientEvent>; + /** + * Fires in response to changing card focus. + */ + FocusedCardChanged: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientCardView. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after the customization window has been closed. + */ + CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Moves focus to the specified edit cell within the edited card. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + */ + FocusEditor(column: ASPxClientCardViewColumn): void; + /** + * Moves focus to the specified edit cell within the edited card. + * @param columnIndex An integer value that specifies the column's position within the columns collection. + */ + FocusEditor(columnIndex: number): void; + /** + * Moves focus to the specified edit cell within the edited card. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + FocusEditor(columnFieldNameOrId: string): void; + /** + * Sets the value of the specified edit cell. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(column: ASPxClientCardViewColumn, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnIndex: number, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnFieldNameOrId: string, value: string): void; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVerticalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Gets information about a focused cell. + */ + GetFocusedCell(): ASPxClientCardViewCellInfo; + /** + * Focuses the specified cell. + * @param cardVisibleIndex An value that specifies the visible index of the card. + * @param columnIndex A zero-based index that identifies the column in the column collection (the column's Index property value). + */ + SetFocusedCell(cardVisibleIndex: number, columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientCardViewColumn object that represents the data column. + */ + SortBy(column: ASPxClientCardViewColumn): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + SortBy(columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + SortBy(columnFieldNameOrId: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientCardViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(column: ASPxClientCardViewColumn, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnFieldNameOrId: string, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientCardViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(column: ASPxClientCardViewColumn, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param column An ASPxClientCardViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex + */ + SortBy(column: ASPxClientCardViewColumn, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Hides the specified column. + * @param column An ASPxClientCardViewColumn object that represents the column to hide. + */ + MoveColumn(column: ASPxClientCardViewColumn): void; + /** + * Hides the specified column. + * @param columnIndex An integer value that specifies the absolute index of the column to hide. + */ + MoveColumn(columnIndex: number): void; + /** + * Hides the specified column. + * @param columnFieldNameOrId A string value that identifies the column to be hidden by the name of the data source field to which the column is bound, or by the column's name. + */ + MoveColumn(columnFieldNameOrId: string): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param column An ASPxClientCardViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the ASPxCardView. + */ + MoveColumn(column: ASPxClientCardViewColumn, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the ASPxCardView. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param column An ASPxClientCardViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the CardView. + * @param moveBefore true, to move the column before the target column; otherwise, false. + */ + MoveColumn(column: ASPxClientCardViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Returns the key value of the specified card. + * @param visibleIndex An integer value that specifies the card's visible index. + */ + GetCardKey(visibleIndex: number): string; + /** + * Switches the CardView to edit mode. + * @param visibleIndex A zero-based integer that identifies a card to be edited. + */ + StartEditCard(visibleIndex: number): void; + /** + * Switches the ASPxCardView to edit mode. + * @param key An object that uniquely identifies a card to be edited. + */ + StartEditCardByKey(key: Object): void; + /** + * Indicates whether or not a new card is being edited. + */ + IsNewCardEditing(): boolean; + /** + * Adds a new record. + */ + AddNewCard(): void; + /** + * Deletes the specified card. + * @param visibleIndex An integer value that identifies the card. + */ + DeleteCard(visibleIndex: number): void; + /** + * Deletes a card with the specified key value. + * @param key An object that uniquely identifies the card. + */ + DeleteCardByKey(key: Object): void; + /** + * Returns the focused card's index. + */ + GetFocusedCardIndex(): number; + /** + * Moves focus to the specified card. + * @param visibleIndex An integer value that specifies the focused card's index. + */ + SetFocusedCardIndex(visibleIndex: number): void; + /** + * Selects all the unselected cards within the CardView. + */ + SelectCards(): void; + /** + * Selects the specified card displayed within the CardView. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + SelectCards(visibleIndex: number): void; + /** + * Selects the specified cards within the CardView. + * @param visibleIndices An array of zero-based indices that identify data cards within the grid. + */ + SelectCards(visibleIndices: number[]): void; + /** + * Selects or deselects the specified cards within the CardView. + * @param visibleIndices An array of zero-based indices that identify data cards within the grid. + * @param selected true to select the specified cards; false to deselect the cards. + */ + SelectCards(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified card within the GridView. + * @param visibleIndex An integer zero-based index that identifies the data card within the grid. + * @param selected true to select the specified card; false to deselect the card. + */ + SelectCards(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified cards displayed within the CardView. + * @param keys An array of objects that uniquely identify the cards. + * @param selected true to select the specified cards; false to deselect the cards. + */ + SelectCardsByKey(keys: Object[], selected?: boolean): void; + /** + * Selects or deselects the specified card displayed within the CardView. + * @param key An object that uniquely identifies the card. + * @param selected true to select the specified card; false to deselect the card. + */ + SelectCardsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified cards displayed within the CardView. + * @param keys An array of objects that uniquely identify the cards. + */ + SelectCardsByKey(keys: Object[]): void; + /** + * Selects a card displayed within the CardView by its key. + * @param key An object that uniquely identifies the card. + */ + SelectCardsByKey(key: Object): void; + /** + * Deselects the specified cards displayed within the ASPxCardView. + * @param keys An array of objects that uniquely identify the cards. + */ + UnselectCardsByKey(keys: Object[]): void; + /** + * Deselects the specified card displayed within the ASPxCardView. + * @param key An object that uniquely identifies the card. + */ + UnselectCardsByKey(key: Object): void; + /** + * Deselects all the selected cards within the ASPxCardView. + */ + UnselectCards(): void; + /** + * Deselects the specified cards (if selected) within the ASPxCardView. + * @param visibleIndices An array of zero-based indices that identify data cards within the grid. + */ + UnselectCards(visibleIndices: number[]): void; + /** + * Deselects the specified cards (if selected) within the ASPxCardView. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + UnselectCards(visibleIndex: number): void; + /** + * Deselects all grid cards that match the filter criteria currently applied to the CardView. + */ + UnselectFilteredCards(): void; + /** + * Selects the specified card displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + SelectCardOnPage(visibleIndex: number): void; + /** + * Selects or deselects the specified card displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + * @param selected true to select the specified card; false to deselect the card. + */ + SelectCardOnPage(visibleIndex: number, selected?: boolean): void; + /** + * Deselects the specified cards (if selected) displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + UnselectCardOnPage(visibleIndex: number): void; + /** + * Selects all unselected cards displayed on the current page. + */ + SelectAllCardsOnPage(): void; + /** + * Allows you to select or deselect all cards displayed on the current page based on the parameter passed. + * @param selected true to select all unselected cards displayed on the current page; false to deselect all selected cards on the page. + */ + SelectAllCardsOnPage(selected: boolean): void; + /** + * Deselects all selected cards displayed on the current page. + */ + UnselectAllCardsOnPage(): void; + /** + * Returns the number of selected cards. + */ + GetSelectedCardCount(): number; + /** + * Indicates whether or not the specified card is selected within the current page. + * @param visibleIndex An integer value that identifies the card by its visible index. + */ + IsCardSelectedOnPage(visibleIndex: number): boolean; + /** + * Applies the specified search panel filter criterion to grid data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Applies the specified filter expression to the grid. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client CardView. + */ + ClearFilter(): void; + /** + * Gets the Popup Edit Form. + */ + GetPopupEditForm(): ASPxClientPopupControl; + /** + * Sets input focus to the grid. + */ + Focus(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Selects the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the grid's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Returns the index of the first card displayed within the grid's active page. + */ + GetTopVisibleIndex(): number; + /** + * Indicates whether the grid is in edit mode. + */ + IsEditing(): boolean; + /** + * Saves all the changes made and switches the grid to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the CardView to browse mode. + */ + CancelEdit(): void; + /** + * Updates data displayed within the grid. + */ + Refresh(): void; + /** + * Indicates whether the customization window is displayed. + */ + IsCustomizationWindowVisible(): boolean; + /** + * Invokes the customization window. + */ + ShowCustomizationWindow(): void; + /** + * Invokes the customization window and displays it over the specified HTML element. + * @param showAtElement An object that specifies the HTML element relative to whose position the customization window is invoked. + */ + ShowCustomizationWindow(showAtElement?: Object): void; + /** + * Closes the customization window. + */ + HideCustomizationWindow(): void; + /** + * Returns the number of columns within the client grid. + */ + GetColumnCount(): number; + /** + * Returns the card values displayed within all selected cards. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the selected cards are returned. + * @param onCallback An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter. + */ + GetSelectedFieldValues(fieldNames: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns key values of selected cards displayed within the current page. + */ + GetSelectedKeysOnPage(): Object[]; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback An ASPxClientCardViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns the values of the specified data source fields within the specified card. + * @param visibleIndex An integer value that identifies the data card. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the specified card are returned. + * @param onCallback An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter. + */ + GetCardValues(visibleIndex: number, fieldNames: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns the card values displayed within the current page. + * @param fieldNames The names of data source fields whose values are returned. + * @param onCallback An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter. + */ + GetPageCardValues(fieldNames: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns the number of cards actually displayed within the active page. + */ + GetVisibleCardsOnPage(): number; + /** + * Returns the client column that resides at the specified position within the column collection. + * @param columnIndex A zero-based index that identifies the column within the column collection (the column's Index property value). + */ + GetColumn(columnIndex: number): ASPxClientCardViewColumn; + /** + * Returns the column with the specified unique identifier. + * @param columnId A string value that specifies the column's unique identifier (the column's Name property value). + */ + GetColumnById(columnId: string): ASPxClientCardViewColumn; + /** + * Returns the client column which is bound to the specified data source field. + * @param columnFieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). + */ + GetColumnByField(columnFieldName: string): ASPxClientCardViewColumn; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientCardViewColumn object that specifies the required column within the client grid. + */ + GetEditor(column: ASPxClientCardViewColumn): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GetEditor(columnIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditor(columnFieldNameOrId: string): ASPxClientEdit; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + */ + GetEditValue(column: ASPxClientCardViewColumn): string; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + */ + GetEditValue(columnIndex: number): string; + /** + * Returns the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditValue(columnFieldNameOrId: string): string; +} +/** + * Represents a client column. + */ +interface ASPxClientCardViewColumn extends ASPxClientGridColumnBase { + /** + * Gets the name that uniquely identifies the column. + * Value: A string value assigned to the column's Name property. + */ + name: string; + /** + * Gets the column's position within the collection. + * Value: An integer zero-bazed index that specifies the column's position within the collection. + */ + index: number; + /** + * Gets the name of the database field assigned to the current column. + * Value: A string value that specifies the name of a data field. + */ + fieldName: string; + /** + * Gets whether the column is visible. + * Value: true to display the column; otherwise, false. + */ + visible: boolean; +} +/** + * Represents a JavaScript function which receives the list of card values when the client GetSelectedFieldValues method is called. + */ +interface ASPxClientCardViewValuesCallback { + /** + * Represents a JavaScript function which receives the list of card values when the client GetSelectedFieldValues method is called. + * @param result An object that represents the list of card values received from the server. + */ + (result: Object): void; +} +/** + * A method that will handle the cancelable events of a client ASPxCardView column. + */ +interface ASPxClientCardViewColumnCancelEventHandler { + /** + * A method that will handle the cancelable events of a client ASPxCardView column. + * @param source The event source. This parameter identifies the ASPxClientCardView object that raised the event. + * @param e An ASPxClientCardViewColumnCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewColumnCancelEventArgs): void; +} +/** + * Provides data for the cancelable events of a client ASPxCardView column. + */ +interface ASPxClientCardViewColumnCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client column. + * Value: An ASPxClientCardViewColumn object that represents the processed column. + */ + column: ASPxClientCardViewColumn; +} +/** + * A method that will handle the CardClick event. + */ +interface ASPxClientCardViewCardClickEventHandler { + /** + * A method that will handle the CardClick event. + * @param source The event source. This parameter identifies the ASPxClientCardView object that raised the event. + * @param e An ASPxClientCardViewCardClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewCardClickEventArgs): void; +} +/** + * Provides data for the CardClick event. + */ +interface ASPxClientCardViewCardClickEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed card's visible index. + * Value: An integer zero-based index that identifies the processed record. + */ + visibleIndex: number; + /** + * Provides access to the parameters associated with the CardClick event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientCardViewCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. This parameter identifies the ASPxClientCardView object that raised the event. + * @param e An ASPxClientCardViewCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewCustomButtonEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientCardViewCustomButtonEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the value which identifies the card whose custom button has been clicked. + * Value: An integer value that identifies the card whose custom button has been clicked. + */ + visibleIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A string value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the SelectionChanged event. + */ +interface ASPxClientCardViewSelectionEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. + * @param e An ASPxClientCardViewSelectionEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewSelectionEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientCardViewSelectionEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the visible index of the card whose selected state has been changed. + * Value: An value that specifies the visible index of the card. + */ + visibleIndex: number; + /** + * Gets whether the card has been selected. + * Value: true if the card has been selected; otherwise, false. + */ + isSelected: boolean; + /** + * Gets whether all cards displayed within a page have been selected or unselected. + * Value: true if all cards displayed within a page have been selected or unselected; otherwise, false. + */ + isAllRecordsOnPage: boolean; + /** + * Gets whether a selection has been changed on the server. + * Value: true if a selection has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the client BatchEditStartEditing event. + */ +interface ASPxClientCardViewBatchEditStartEditingEventHandler { + /** + * A method that will handle the BatchEditStartEditing event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditStartEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditStartEditingEventArgs): void; +} +/** + * Provides data for the BatchEditStartEditing event. + */ +interface ASPxClientCardViewBatchEditStartEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the card whose cells are about to be edited. + * Value: An value that specifies the visible index of the card. + */ + visibleIndex: number; + /** + * Gets the CardView column that owns a cell that is about to be edited. + * Value: An object that is the focused CardView column. + */ + focusedColumn: ASPxClientCardViewColumn; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + cardValues: Object; +} +/** + * A method that will handle the client BatchEditEndEditing event. + */ +interface ASPxClientCardViewBatchEditEndEditingEventHandler { + /** + * A method that will handle the BatchEditEndEditing event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditEndEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditEndEditingEventArgs): void; +} +/** + * Provides data for the BatchEditEndEditing event. + */ +interface ASPxClientCardViewBatchEditEndEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the card whose cells have been edited. + * Value: An value that specifies the visible index of the card. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + cardValues: Object; +} +/** + * A method that will handle the client BatchEditCardValidating event. + */ +interface ASPxClientCardViewBatchEditCardValidatingEventHandler { + /** + * A method that will handle the BatchEditCardValidating event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditCardValidatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditCardValidatingEventArgs): void; +} +/** + * Provides data for the BatchEditCardValidating event. + */ +interface ASPxClientCardViewBatchEditCardValidatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed card's visible index. + * Value: An integer value that specifies the processed card's visible index. + */ + visibleIndex: number; + /** + * Provides validation information of a card currently being validated. + * Value: An object that is a hashtable containing validation information. + */ + validationInfo: Object; +} +/** + * Represents an object that will handle the client-side BatchEditConfirmShowing event. + */ +interface ASPxClientCardViewBatchEditConfirmShowingEventHandler { + /** + * A method that will handle the BatchEditConfirmShowing client event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditConfirmShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditConfirmShowingEventArgs): void; +} +/** + * Provides data for the BatchEditConfirmShowing event. + */ +interface ASPxClientCardViewBatchEditConfirmShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the client identifier of an object that initiates a send request. + * Value: A string value that specifies the object client identifier. + */ + requestTriggerID: string; +} +/** + * A method that will handle the client BatchEditTemplateCellFocused event. + */ +interface ASPxClientCardViewBatchEditTemplateCellFocusedEventHandler { + /** + * A method that will handle the BatchEditTemplateCellFocused event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientCardViewBatchEditTemplateCellFocusedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditTemplateCellFocusedEventArgs): void; +} +/** + * Provides data for the BatchEditTemplateCellFocused event. + */ +interface ASPxClientCardViewBatchEditTemplateCellFocusedEventArgs extends ASPxClientEventArgs { + /** + * Gets the currently processed column. + * Value: An object that is the client-side column object. + */ + column: ASPxClientCardViewColumn; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the BatchEditChangesSaving event. + */ +interface ASPxClientCardViewBatchEditChangesSavingEventHandler { + /** + * A method that will handle the BatchEditChangesSaving event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditChangesSavingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditChangesSavingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesSaving event. + */ +interface ASPxClientCardViewBatchEditChangesSavingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditChangesCanceling event. + */ +interface ASPxClientCardViewBatchEditChangesCancelingEventHandler { + /** + * A method that will handle the BatchEditChangesCanceling event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditChangesCancelingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditChangesCancelingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesCanceling event. + */ +interface ASPxClientCardViewBatchEditChangesCancelingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditCardInserting event. + */ +interface ASPxClientCardViewBatchEditCardInsertingEventHandler { + /** + * A method that will handle the BatchEditCardInserting event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditCardInsertingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditCardInsertingEventArgs): void; +} +/** + * Provides data for the BatchEditCardInserting event. + */ +interface ASPxClientCardViewBatchEditCardInsertingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed card visible index. + * Value: An integer value that specifies the processed card visible index. + */ + visibleIndex: number; +} +/** + * A method that will handle the BatchEditCardDeleting event. + */ +interface ASPxClientCardViewBatchEditCardDeletingEventHandler { + /** + * A method that will handle the BatchEditCardDeleting event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditCardDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditCardDeletingEventArgs): void; +} +/** + * Provides data for the BatchEditCardDeleting event. + */ +interface ASPxClientCardViewBatchEditCardDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed card visible index. + * Value: An integer value that specifies the processed card visible index. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + cardValues: Object; +} +/** + * Provides members related to Batch Edit Mode + */ +interface ASPxClientCardViewBatchEditApi { + /** + * Performs validation of CardView data contained in the cards when the CardView operates in Batch Edit mode. + * @param validateOnlyModified true, if only modified cards should be validated; otherwise, false. + */ + ValidateCards(validateOnlyModified?: boolean): boolean; + /** + * Performs validation of CardView data contained in the specified card when the CardView operates in Batch Edit mode. + * @param visibleIndex An integer value specifying the visible index of the validated card. + */ + ValidateCard(visibleIndex: number): boolean; + /** + * Returns an array of card visible indices. + * @param includeDeleted true, to include visible indices of deleted cards to the returned array; otherwise, false. + */ + GetCardVisibleIndices(includeDeleted: boolean): number[]; + /** + * Returns an array of the deleted card visible indices. + */ + GetDeletedCardIndices(): number[]; + /** + * Returns an array of the inserted card visible indices. + */ + GetInsertedCardIndices(): number[]; + /** + * Indicates if the card with the specified visible index is deleted. + * @param visibleIndex An integer value that identifies the card by its visible index. + */ + IsDeletedCard(visibleIndex: number): boolean; + /** + * Indicates if the card with the specified visible index is newly created. + * @param visibleIndex An integer value that identifies the card by its visible index. + */ + IsNewCard(visibleIndex: number): boolean; + /** + * Programmatically moves the focus to the previous cell in the card + */ + MoveFocusBackward(): boolean; + /** + * Programmatically moves the focus to the next cell in the card. + */ + MoveFocusForward(): boolean; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the card containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object): void; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the card containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + * @param displayText A string value that specifies the cell display text. + * @param cancelCellHighlighting true to cancel highlighting of the modified cell, false to highlight the modified cell. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object, displayText: string, cancelCellHighlighting?: boolean): void; + /** + * Gets the value of the specified cell. + * @param visibleIndex A zero-based integer value that specifies the visible index of a card containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). + */ + GetCellValue(visibleIndex: number, columnFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets information about the cell currently being edited. + */ + GetEditCellInfo(): ASPxClientCardViewCellInfo; + /** + * Returns a value that indicates whether the card view has changed data. + */ + HasChanges(): boolean; + /** + * Returns a value that indicates whether the specified card has changed data. + * @param visibleIndex An integer value that specifies the visible index of a card. + */ + HasChanges(visibleIndex: number): boolean; + /** + * Returns a value that indicates whether the specified cell's data has been changed. + * @param visibleIndex An integer value that specifies the visible index of a card. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + HasChanges(visibleIndex: number, columnFieldNameOrId: string): boolean; + /** + * Resets changes in the specified card. + * @param visibleIndex An integer value that specifies the visible index of a card. + */ + ResetChanges(visibleIndex: number): void; + /** + * Resets changes in the specified cell. + * @param visibleIndex An integer value that specifies the visible index of a card containing the processed cell. + * @param columnIndex A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + */ + ResetChanges(visibleIndex: number, columnIndex: number): void; + /** + * Switches the specified cell to edit mode. + * @param visibleIndex A zero-based integer value that specifies the visible index of a card containing the processed cell. + * @param columnIndex A zero-based integer value that identifies the column which contains the processed cell in the column collection. + */ + StartEdit(visibleIndex: number, columnIndex: number): void; + /** + * Ends cell or card editing. + */ + EndEdit(): void; +} +/** + * Contains information on a grid cell. + */ +interface ASPxClientCardViewCellInfo { + /** + * Gets the visible index of the card that contains the cell currently being processed. + * Value: An value that specifies the visible index of the card. + */ + cardVisibleIndex: number; + /** + * Gets the data column that contains the cell currently being processed. + * Value: An object that is the data column which contains the processed cell. + */ + column: ASPxClientCardViewColumn; +} +/** + * A client-side equivalent of the ASPxGridView object. + */ +interface ASPxClientGridView extends ASPxClientGridBase { + /** + * Provides access to the batch editing client API. + * Value: A object that exposes the batch editing client API methods. + */ + batchEditApi: ASPxClientGridViewBatchEditApi; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Enables you to prevent columns from being sorted. + */ + ColumnSorting: ASPxClientEvent>; + /** + * Fires in response to changing row focus. + */ + FocusedRowChanged: ASPxClientEvent>; + /** + * Enables you to cancel data grouping. + */ + ColumnGrouping: ASPxClientEvent>; + /** + * Fires when an end-user starts dragging the column's header and enables you to cancel this operation. + */ + ColumnStartDragging: ASPxClientEvent>; + /** + * Enables you to prevent columns from being resized. + */ + ColumnResizing: ASPxClientEvent>; + /** + * Occurs after a column's width has been changed by an end-user. + */ + ColumnResized: ASPxClientEvent>; + /** + * Enables you to control column movement. + */ + ColumnMoving: ASPxClientEvent>; + /** + * Fires before a group row is expanded. + */ + RowExpanding: ASPxClientEvent>; + /** + * Fires before a group row is collapsed. + */ + RowCollapsing: ASPxClientEvent>; + /** + * Fires before a detail row is expanded. + */ + DetailRowExpanding: ASPxClientEvent>; + /** + * Fires before a detail row is collapsed. + */ + DetailRowCollapsing: ASPxClientEvent>; + /** + * Fires on the client when a data row is clicked. + */ + RowClick: ASPxClientEvent>; + /** + * Fires on the client when a data row is double clicked. + */ + RowDblClick: ASPxClientEvent>; + /** + * Occurs after an end-user right clicks in the GridView, and enables you to provide a custom context menu. + */ + ContextMenu: ASPxClientEvent>; + /** + * Fires on the client side when a context menu item has been clicked. + */ + ContextMenuItemClick: ASPxClientEvent>; + /** + * Enables you to specify whether row data is valid and provide an error text. + */ + BatchEditRowValidating: ASPxClientEvent>; + /** + * Enables you to prevent a batch edit confirmation message from being displayed. + */ + BatchEditConfirmShowing: ASPxClientEvent>; + /** + * Occurs when a grid switches to batch edit mode. + */ + BatchEditStartEditing: ASPxClientEvent>; + /** + * Occurs when a grid leaves the batch edit mode. + */ + BatchEditEndEditing: ASPxClientEvent>; + /** + * Enables you to provide navigation for editors contained in a templated cell in Batch Edit mode. + */ + BatchEditTemplateCellFocused: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are saved in batch edit mode. + */ + BatchEditChangesSaving: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are canceled in batch edit mode. + */ + BatchEditChangesCanceling: ASPxClientEvent>; + /** + * Occurs on the client side before a data row is inserted in batch edit mode. + */ + BatchEditRowInserting: ASPxClientEvent>; + /** + * Occurs on the client side before a data row is deleted in batch edit mode. + */ + BatchEditRowDeleting: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientGridView. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after the Customization Window has been closed. + */ + CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Selects or deselects the specified row displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRowOnPage(visibleIndex: number, selected?: boolean): void; + /** + * Deselects the specified row (if selected) displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + UnselectRowOnPage(visibleIndex: number): void; + /** + * Selects all unselected rows displayed on the current page. + */ + SelectAllRowsOnPage(): void; + /** + * Allows you to select or deselect all rows displayed on the current page based on the parameter passed. + * @param selected true to select all unselected rows displayed on the current page; false to deselect all selected rows on the page. + */ + SelectAllRowsOnPage(selected: boolean): void; + /** + * Deselects all selected rows displayed on the current page. + */ + UnselectAllRowsOnPage(): void; + /** + * Returns the number of selected rows. + */ + GetSelectedRowCount(): number; + /** + * Indicates whether or not the specified row is selected within the current page. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsRowSelectedOnPage(visibleIndex: number): boolean; + /** + * Indicates whether the specified row is a group row. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsGroupRow(visibleIndex: number): boolean; + /** + * Indicates whether the specified row is a data row. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsDataRow(visibleIndex: number): boolean; + /** + * Indicates whether the specified group row is expanded. + * @param visibleIndex An integer value that identifies the group row by its visible index. + */ + IsGroupRowExpanded(visibleIndex: number): boolean; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVertScrollPos(): number; + /** + * Returns the current horizontal scroll position of the grid's content. + */ + GetHorzScrollPos(): number; + /** + * Returns the current horizontal scroll position of the grid's content. + */ + GetHorizontalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVertScrollPos(position: number): void; + /** + * Specifies the horizontal scroll position for the grid's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorzScrollPos(position: number): void; + /** + * Specifies the horizontal scroll position for the grid's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorizontalScrollPosition(position: number): void; + /** + * Applies a filter specified in the filter row to the GridView. + */ + ApplyOnClickRowFilter(): void; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param column An ASPxClientGridViewColumn object that represents the data colum within the ASPxGridView. + */ + GetAutoFilterEditor(column: ASPxClientGridViewColumn): Object; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param columnIndex An integer value that identifies the data column by its index. + */ + GetAutoFilterEditor(columnIndex: number): Object; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param columnFieldNameOrId A string value that specifies the column's name or its data base field name. + */ + GetAutoFilterEditor(columnFieldNameOrId: string): Object; + /** + * Applies a filter to the specified data column. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client GridView. + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(column: ASPxClientGridViewColumn, val: string): void; + /** + * Applies a filter to the specified data column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(columnIndex: number, val: string): void; + /** + * Applies a filter to the specified data column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(columnFieldNameOrId: string, val: string): void; + /** + * Applies the specified search panel filter criterion to grid data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Applies the specified filter expression to the GridView. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client GridView. + */ + ClearFilter(): void; + /** + * Gets the Popup Edit Form. + */ + GetPopupEditForm(): ASPxClientPopupControl; + /** + * Sets input focus to the grid. + */ + Focus(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Selects the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the grid's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Returns the index of the first data row displayed within the GridView's active page. + */ + GetTopVisibleIndex(): number; + /** + * Indicates whether the grid is in edit mode. + */ + IsEditing(): boolean; + /** + * Saves all the changes made and switches the grid to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the GridView to browse mode. + */ + CancelEdit(): void; + /** + * Updates data displayed within the grid. + */ + Refresh(): void; + /** + * Indicates whether the Customization Window is displayed. + */ + IsCustomizationWindowVisible(): boolean; + /** + * Invokes the Customization Window. + */ + ShowCustomizationWindow(): void; + /** + * Invokes the Customization Window and displays it over the specified HTML element. + * @param showAtElement An object that specifies the HTML element relative to whose position the customization window is invoked. + */ + ShowCustomizationWindow(showAtElement?: Object): void; + /** + * Closes the Customization Window. + */ + HideCustomizationWindow(): void; + /** + * Returns the number of columns within the client GridView. + */ + GetColumnsCount(): number; + /** + * Returns the number of columns within the client GridView. + */ + GetColumnCount(): number; + /** + * Returns the row values displayed within all selected rows. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the selected rows are returned. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetSelectedFieldValues(fieldNames: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns key values of selected rows displayed within the current page. + */ + GetSelectedKeysOnPage(): Object[]; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientGridViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns the values of the specified data source fields within the specified row. + * @param visibleIndex An integer value that identifies the data row. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the specified row are returned. + * @param onCallback An ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetRowValues(visibleIndex: number, fieldNames: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns the row values displayed within the current page. + * @param fieldNames The names of data source fields whose values are returned. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetPageRowValues(fieldNames: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns the number of rows actually displayed within the active page. + */ + GetVisibleRowsOnPage(): number; + /** + * Returns the client column that resides at the specified position within the column collection. + * @param columnIndex A zero-based index that identifies the column within the column collection (the column's Index property value). + */ + GetColumn(columnIndex: number): ASPxClientGridViewColumn; + /** + * Returns the column with the specified unique identifier. + * @param columnId A string value that specifies the column's unique identifier (the column's Name property value). + */ + GetColumnById(columnId: string): ASPxClientGridViewColumn; + /** + * Returns the client column which is bound to the specified data source field. + * @param columnFieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). + */ + GetColumnByField(columnFieldName: string): ASPxClientGridViewColumn; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientGridViewColumn object that specifies the required column within the client grid. + */ + GetEditor(column: ASPxClientGridViewColumn): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GetEditor(columnIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditor(columnFieldNameOrId: string): ASPxClientEdit; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client grid. + */ + GetEditValue(column: ASPxClientGridViewColumn): string; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + */ + GetEditValue(columnIndex: number): string; + /** + * Returns the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditValue(columnFieldNameOrId: string): string; + /** + * Moves focus to the specified edit cell within the edited row. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client grid. + */ + FocusEditor(column: ASPxClientGridViewColumn): void; + /** + * Moves focus to the specified edit cell within the edited row. + * @param columnIndex An integer value that specifies the column's position within the columns collection. + */ + FocusEditor(columnIndex: number): void; + /** + * Moves focus to the specified edit cell within the edited row. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + FocusEditor(columnFieldNameOrId: string): void; + /** + * Sets the value of the specified edit cell. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client grid. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(column: ASPxClientGridViewColumn, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnIndex: number, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnFieldNameOrId: string, value: string): void; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVerticalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Gets information about a focused cell. + */ + GetFocusedCell(): ASPxClientGridViewCellInfo; + /** + * Focuses the specified cell. + * @param rowVisibleIndex An integer value that specifies the visible index of the row. + * @param columnIndex A zero-based index that identifies the column in the column collection (the column's Index property value). + */ + SetFocusedCell(rowVisibleIndex: number, columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientGridViewColumn object that represents the data column. + */ + SortBy(column: ASPxClientGridViewColumn): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + SortBy(columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + SortBy(columnFieldNameOrId: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(column: ASPxClientGridViewColumn, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnFieldNameOrId: string, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(column: ASPxClientGridViewColumn, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param column An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(column: ASPxClientGridViewColumn, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Hides the specified column. + * @param column An ASPxClientGridViewColumn object that represents the column to hide. + */ + MoveColumn(column: ASPxClientGridViewColumn): void; + /** + * Hides the specified column. + * @param columnIndex An integer value that specifies the absolute index of the column to hide. + */ + MoveColumn(columnIndex: number): void; + /** + * Hides the specified column. + * @param columnFieldNameOrId A String value that identifies the column to be hidden by the name of the data source field to which the column is bound, or by the column's name. + */ + MoveColumn(columnFieldNameOrId: string): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnFieldNameOrId A String value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups the grid's data by this column. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups the grid's data by this column. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the ASPxGridView's data by the column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups the grid's data by this column. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Groups data by the values of the specified column. + * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. + */ + GroupBy(column: ASPxClientGridViewColumn): void; + /** + * Groups data by the values of the specified column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GroupBy(columnIndex: number): void; + /** + * Groups data by the values of the specified column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GroupBy(columnFieldNameOrId: string): void; + /** + * Groups data by the values of the specified data column. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + */ + GroupBy(column: ASPxClientGridViewColumn, groupIndex: number): void; + /** + * Groups data by the values of the specified data column. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + */ + GroupBy(columnIndex: number, groupIndex: number): void; + /** + * Groups data by the values of the specified data column. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + */ + GroupBy(columnFieldNameOrId: string, groupIndex: number): void; + /** + * Groups data by the values of the specified data column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + * @param sortOrder A string value that specifies the column's sort order. + */ + GroupBy(column: ASPxClientGridViewColumn, groupIndex: number, sortOrder: string): void; + /** + * Groups data by the values of the specified data column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + * @param sortOrder A string value that specifies the column's sort order. + */ + GroupBy(columnIndex: number, groupIndex: number, sortOrder: string): void; + /** + * Groups data by the values of the specified data column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + * @param sortOrder A string value that specifies the column's sort order. + */ + GroupBy(columnFieldNameOrId: string, groupIndex: number, sortOrder: string): void; + /** + * Ungroups data by the values of the specified column. + * @param column An ASPxClientGridViewColumn object that represents the data column within the ASPxGridView. + */ + UnGroup(column: ASPxClientGridViewColumn): void; + /** + * Ungroups data by the values of the specified column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + UnGroup(columnIndex: number): void; + /** + * Ungroups data by the values of the specified column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + UnGroup(columnFieldNameOrId: string): void; + /** + * Expands all group rows. + */ + ExpandAll(): void; + /** + * Collapses all group rows. + */ + CollapseAll(): void; + /** + * Expands all detail rows. + */ + ExpandAllDetailRows(): void; + /** + * Collapses all detail rows. + */ + CollapseAllDetailRows(): void; + /** + * Expands the specified group row preserving the collapsed state of any child group row. + * @param visibleIndex An integer value that identifies the group row. + */ + ExpandRow(visibleIndex: number): void; + /** + * Expands the specified group row and optionally child group rows at all nesting levels. + * @param visibleIndex An integer value that identifies the group row. + * @param recursive true to expand any child group rows at all nesting levels; false to preserve the collapsed state of any child group rows. + */ + ExpandRow(visibleIndex: number, recursive?: boolean): void; + /** + * Collapses the specified group row preserving the expanded state of child group rows. + * @param visibleIndex An integer value that identifies the group row by its visible index. + */ + CollapseRow(visibleIndex: number): void; + /** + * Collapses the specified group row and optionally child group rows at all nesting levels. + * @param visibleIndex An integer value that identifies the group row by its visible index. + * @param recursive true to collapse child group rows at all nesting levels; false to preserve the expanded state of any child group row. + */ + CollapseRow(visibleIndex: number, recursive?: boolean): void; + /** + * Scrolls the view to the specified row. + * @param visibleIndex An integer value that identifies a row by its visible index. + */ + MakeRowVisible(visibleIndex: number): void; + /** + * Expands the specified detail row. + * @param visibleIndex A zero-based integer index that identifies the detail row. + */ + ExpandDetailRow(visibleIndex: number): void; + /** + * Collapses the specified detail row. + * @param visibleIndex A zero-based integer index that identifies the detail row. + */ + CollapseDetailRow(visibleIndex: number): void; + /** + * Returns the key value of the specified data row. + * @param visibleIndex An integer value that specifies the row's visible index. + */ + GetRowKey(visibleIndex: number): string; + /** + * Switches the grid to edit mode. + * @param visibleIndex A zero-based integer that identifies a data row to be edited. + */ + StartEditRow(visibleIndex: number): void; + /** + * Switches the grid to edit mode. + * @param key An object that uniquely identifies a data row to be edited. + */ + StartEditRowByKey(key: Object): void; + /** + * Indicates whether or not a new row is being edited. + */ + IsNewRowEditing(): boolean; + /** + * Adds a new record. + */ + AddNewRow(): void; + /** + * Deletes the specified row. + * @param visibleIndex An integer value that identifies the row. + */ + DeleteRow(visibleIndex: number): void; + /** + * Deletes a row with the specified key value. + * @param key An object that uniquely identifies the row. + */ + DeleteRowByKey(key: Object): void; + /** + * Returns the focused row's index. + */ + GetFocusedRowIndex(): number; + /** + * Moves focus to the specified row. + * @param visibleIndex An integer value that specifies the focused row's index. + */ + SetFocusedRowIndex(visibleIndex: number): void; + /** + * Selects all the unselected rows within the grid. + */ + SelectRows(): void; + /** + * Selects the specified row displayed within the grid. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + SelectRows(visibleIndex: number): void; + /** + * Selects the specified rows within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + */ + SelectRows(visibleIndices: number[]): void; + /** + * Selects or deselects the specified rows within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + * @param selected true to select the specified rows; false to deselect the rows. + */ + SelectRows(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified row within the grid. + * @param visibleIndex An integer zero-based index that identifies the data row within the grid. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRows(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + * @param selected true to select the specified rows; false to deselect the rows. + */ + SelectRowsByKey(keys: Object[], selected?: boolean): void; + /** + * Selects or deselects the specified row displayed within the grid. + * @param key An object that uniquely identifies the row. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRowsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + */ + SelectRowsByKey(keys: Object[]): void; + /** + * Selects a grid row by its key. + * @param key An object that uniquely identifies the row. + */ + SelectRowsByKey(key: Object): void; + /** + * Deselects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + */ + UnselectRowsByKey(keys: Object[]): void; + /** + * Deselects the specified row displayed within the grid. + * @param key An object that uniquely identifies the row. + */ + UnselectRowsByKey(key: Object): void; + /** + * Deselects all the selected rows within the grid. + */ + UnselectRows(): void; + /** + * Deselects the specified rows (if selected) within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + */ + UnselectRows(visibleIndices: number[]): void; + /** + * Deselects the specified row (if selected) within the grid. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + UnselectRows(visibleIndex: number): void; + /** + * Deselects all grid rows that match the filter criteria currently applied to the grid. + */ + UnselectFilteredRows(): void; + /** + * Selects the specified row displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + SelectRowOnPage(visibleIndex: number): void; +} +/** + * A client grid column. + */ +interface ASPxClientGridViewColumn extends ASPxClientGridColumnBase { + /** + * Gets the column's unique identifier. + * Value: A string value that specifies the column's unique identifier. + */ + id: string; + /** + * Gets the name that uniquely identifies the column. + * Value: A string value assigned to the column's Name property. + */ + name: string; + /** + * Gets the column's position within the collection. + * Value: An integer zero-bazed index that specifies the column's position within the collection. + */ + index: number; + /** + * Gets the name of the database field assigned to the current column. + * Value: A string value that specifies the name of a data field. + */ + fieldName: string; + /** + * Gets whether the column is visible. + * Value: true to display the column; otherwise, false. + */ + visible: boolean; +} +/** + * Represents a JavaScript function which receives the list of row values when the client GetSelectedFieldValues method is called. + */ +interface ASPxClientGridViewValuesCallback { + /** + * Represents a JavaScript function which receives the list of row values when the client GetSelectedFieldValues method is called. + * @param result An object that represents the list of row values received from the server. + */ + (result: Object): void; +} +/** + * A method that will handle the cancelable events of a client ASPxGridView column. + */ +interface ASPxClientGridViewColumnCancelEventHandler { + /** + * A method that will handle the cancelable events of a client ASPxGridView column. + * @param source The event source. + * @param e An ASPxClientGridViewColumnCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewColumnCancelEventArgs): void; +} +/** + * Provides data for the cancelable events of a client ASPxGridView column. + */ +interface ASPxClientGridViewColumnCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client column. + * Value: An ASPxClientGridViewColumn object that represents the processed column. + */ + column: ASPxClientGridViewColumn; +} +/** + * A method that will handle the client events concerned with column processing. + */ +interface ASPxClientGridViewColumnProcessingModeEventHandler { + /** + * A method that will handle the client events concerned with column processing. + * @param source The event source. + * @param e A ASPxClientGridViewColumnProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewColumnProcessingModeEventArgs): void; +} +/** + * Provides data for the client events concerned with column processing, and that allow the event's processing to be passed to the server side. + */ +interface ASPxClientGridViewColumnProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets a grid column related to the event. + * Value: An ASPxClientGridViewColumn object representing the column related to the event. + */ + column: ASPxClientGridViewColumn; +} +/** + * A method that will handle the RowExpanding events. + */ +interface ASPxClientGridViewRowCancelEventHandler { + /** + * A method that will handle the RowExpanding events. + * @param source The event source. + * @param e An ASPxClientGridViewRowCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewRowCancelEventArgs): void; +} +/** + * Provides data for the RowExpanding events. + */ +interface ASPxClientGridViewRowCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer zero-based index that identifies the processed row. + */ + visibleIndex: number; +} +/** + * A method that will handle the SelectionChanged event. + */ +interface ASPxClientGridViewSelectionEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. + * @param e An ASPxClientGridViewSelectionEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewSelectionEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientGridViewSelectionEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the visible index of the row whose selected state has been changed. + * Value: An value that specifies the visible index of the row. + */ + visibleIndex: number; + /** + * Gets whether the row has been selected. + * Value: true if the row has been selected; otherwise, false. + */ + isSelected: boolean; + /** + * Gets whether all rows displayed within a page have been selected or unselected. + * Value: true if all rows displayed within a page have been selected or unselected; otherwise, false. + */ + isAllRecordsOnPage: boolean; + /** + * Gets whether a selection has been changed on the server. + * Value: true if a selection has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the RowClick events. + */ +interface ASPxClientGridViewRowClickEventHandler { + /** + * A method that will handle the RowClick event. + * @param source The event source. This parameter identifies the ASPxClientGridView object that raised the event. + * @param e An ASPxClientGridViewRowClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewRowClickEventArgs): void; +} +/** + * Provides data for the RowClick event. + */ +interface ASPxClientGridViewRowClickEventArgs extends ASPxClientGridViewRowCancelEventArgs { + /** + * Provides access to the parameters associated with the RowClick event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} +/** + * A method that will handle the ContextMenu event. + */ +interface ASPxClientGridViewContextMenuEventHandler { + /** + * A method that will handle the ContextMenu event. + * @param source The event source. + * @param e An ASPxClientGridViewContextMenuEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewContextMenuEventArgs): void; +} +/** + * Provides data for the ContextMenu event. + */ +interface ASPxClientGridViewContextMenuEventArgs extends ASPxClientEventArgs { + /** + * Gets which grid element has been right clicked by the user. + * Value: A String value that specifies grid element. + */ + objectType: string; + /** + * Identifies the grid element being right clicked by the user. + * Value: A zero-based integer index that identifies the grid element being clicked by the user. + */ + index: number; + /** + * Provides access to the parameters associated with the ContextMenu event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; + /** + * Gets the currently processed menu object. + * Value: An object that is the currently processed menu. + */ + menu: Object; + /** + * Specifies whether a browser context menu should be displayed. + * Value: true, to display a browser context menu; otherwise, false. The default is false. + */ + showBrowserMenu: boolean; +} +/** + * A method that will handle the client ContextMenuItemClick event. + */ +interface ASPxClientGridViewContextMenuItemClickEventHandler { + /** + * A method that will handle the ContextMenuItemClick event. + * @param source The event source. + * @param e An ASPxClientGridViewContextMenuItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewContextMenuItemClickEventArgs): void; +} +/** + * Provides data for the ContextMenuItemClick event. + */ +interface ASPxClientGridViewContextMenuItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the clicked context menu item. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; + /** + * Gets which grid element has been right clicked by the user. + * Value: A String value that specifies the grid element. + */ + objectType: string; + /** + * Returns the processed element index. + * Value: An integer value that specifies the processed element index. + */ + elementIndex: number; + /** + * Specifies whether a postback or a callback is used to finally process the event on the server side. + * Value: true to perform the round trip to the server side via postback; false to perform the round trip to the server side via callback. + */ + usePostBack: boolean; + /** + * Specifies whether default context menu item click is handled manually, so no default processing is required. + * Value: true if no default processing is required; otherwise false. + */ + handled: boolean; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientGridViewCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. This parameter identifies the ASPxClientGridView object that raised the event. + * @param e An ASPxClientGridViewCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewCustomButtonEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientGridViewCustomButtonEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the value which identifies the row whose custom button has been clicked. + * Value: An integer value that identifies the row whose custom button has been clicked. + */ + visibleIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A string value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the ColumnMoving event. + */ +interface ASPxClientGridViewColumnMovingEventHandler { + /** + * A method that will handle the ColumnMoving event. + * @param source The event source. + * @param e An ASPxClientGridViewColumnMovingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewColumnMovingEventArgs): void; +} +/** + * Provides data for the ColumnMoving event. + */ +interface ASPxClientGridViewColumnMovingEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether a column is allowed to be moved. + * Value: true to allow column moving; otherwise, false. + */ + allow: boolean; + /** + * Gets the column currently being dragged by an end-user. + * Value: An ASPxClientGridViewColumn object that represents the column currently being dragged by an end-user. + */ + sourceColumn: ASPxClientGridViewColumn; + /** + * Gets the target column, before or after which the source column will be inserted (if dropped). + * Value: An ASPxClientGridViewColumn object that represents the target column. null (Nothing in Visual Basic) if the source column isn't over the column header panel. + */ + destinationColumn: ASPxClientGridViewColumn; + /** + * Gets whether the source column will be inserted before the target column (if dropped). + * Value: true if the source column will be inserted before the target column (if dropped); otherwise, false. + */ + isDropBefore: boolean; + /** + * Gets whether the source column is currently over the Group Panel. + * Value: true if the source column is currently over the Group Panel; otherwise, false. + */ + isGroupPanel: boolean; +} +/** + * Represents an object that will handle the client-side BatchEditConfirmShowing event. + */ +interface ASPxClientGridViewBatchEditConfirmShowingEventHandler { + /** + * A method that will handle the BatchEditConfirmShowing client event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditConfirmShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditConfirmShowingEventArgs): void; +} +/** + * Provides data for the BatchEditConfirmShowing event. + */ +interface ASPxClientGridViewBatchEditConfirmShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the client identifier of an object that initiates a send request. + * Value: A string value that specifies the object client identifier. + */ + requestTriggerID: string; +} +/** + * A method that will handle the client BatchEditStartEditing event. + */ +interface ASPxClientGridViewBatchEditStartEditingEventHandler { + /** + * A method that will handle the BatchEditStartEditing event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditStartEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditStartEditingEventArgs): void; +} +/** + * Provides data for the BatchEditStartEditing event. + */ +interface ASPxClientGridViewBatchEditStartEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the row whose cells are about to be edited. + * Value: An value that specifies the visible index of the row. + */ + visibleIndex: number; + /** + * Gets the grid column that owns a cell that is about to be edited. + * Value: An object that is the focused grid column. + */ + focusedColumn: ASPxClientGridViewColumn; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + rowValues: Object; +} +/** + * A method that will handle the client BatchEditEndEditing event. + */ +interface ASPxClientGridViewBatchEditEndEditingEventHandler { + /** + * A method that will handle the BatchEditEndEditing event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditEndEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditEndEditingEventArgs): void; +} +/** + * Provides data for the BatchEditEndEditing event. + */ +interface ASPxClientGridViewBatchEditEndEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the row whose cells has been edited. + * Value: An value that specifies the visible index of the row. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + rowValues: Object; +} +/** + * A method that will handle the client BatchEditRowValidating event. + */ +interface ASPxClientGridViewBatchEditRowValidatingEventHandler { + /** + * A method that will handle the BatchEditRowValidating event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditRowValidatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditRowValidatingEventArgs): void; +} +/** + * Provides data for the BatchEditRowValidating event. + */ +interface ASPxClientGridViewBatchEditRowValidatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer value that specifies the processed row's visible index. + */ + visibleIndex: number; + /** + * Provides validation information of a row currently being validated. + * Value: An object that is a hashtable containing validation information. + */ + validationInfo: Object; +} +/** + * A method that will handle the client BatchEditTemplateCellFocused event. + */ +interface ASPxClientGridViewBatchEditTemplateCellFocusedEventHandler { + /** + * A method that will handle the BatchEditTemplateCellFocused event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientGridViewBatchEditTemplateCellFocusedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditTemplateCellFocusedEventArgs): void; +} +/** + * Provides data for the BatchEditTemplateCellFocused event. + */ +interface ASPxClientGridViewBatchEditTemplateCellFocusedEventArgs extends ASPxClientEventArgs { + /** + * Gets the currently processed column. + * Value: A object that is the client-side column object. + */ + column: ASPxClientGridViewColumn; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the BatchEditChangesSaving event. + */ +interface ASPxClientGridViewBatchEditChangesSavingEventHandler { + /** + * A method that will handle the BatchEditChangesSaving event. + * @param source The event source. This parameter identifies the grid view object which raised the event. + * @param e An ASPxClientGridViewBatchEditChangesSavingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditChangesSavingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesSaving event. + */ +interface ASPxClientGridViewBatchEditChangesSavingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditChangesCanceling event. + */ +interface ASPxClientGridViewBatchEditChangesCancelingEventHandler { + /** + * A method that will handle the BatchEditChangesCanceling event. + * @param source The event source. This parameter identifies the grid view object which raised the event. + * @param e An ASPxClientGridViewBatchEditChangesCancelingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditChangesCancelingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesCanceling event. + */ +interface ASPxClientGridViewBatchEditChangesCancelingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditRowInserting event. + */ +interface ASPxClientGridViewBatchEditRowInsertingEventHandler { + /** + * A method that will handle the BatchEditRowInserting event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientGridViewBatchEditRowInsertingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditRowInsertingEventArgs): void; +} +/** + * Provides data for the BatchEditRowInserting event. + */ +interface ASPxClientGridViewBatchEditRowInsertingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer value that specifies the processed row's visible index. + */ + visibleIndex: number; +} +/** + * A method that will handle the BatchEditRowDeleting event. + */ +interface ASPxClientGridViewBatchEditRowDeletingEventHandler { + /** + * A method that will handle the BatchEditRowDeleting event. + * @param source The event source. This parameter identifies the grid view object which raised the event. + * @param e An ASPxClientGridViewBatchEditRowDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditRowDeletingEventArgs): void; +} +/** + * Provides data for the BatchEditRowDeleting event. + */ +interface ASPxClientGridViewBatchEditRowDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer value that specifies the processed row's visible index. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + rowValues: Object; +} +/** + * Contains information on a grid cell. + */ +interface ASPxClientGridViewCellInfo { + /** + * Gets the visible index of the row that contains the cell currently being processed. + * Value: An value that specifies the visible index of the row. + */ + rowVisibleIndex: number; + /** + * Gets the data column that contains the cell currently being processed. + * Value: An object that is the data column which contains the processed cell. + */ + column: ASPxClientGridViewColumn; +} +/** + * Provides members related to Batch Edit Mode + */ +interface ASPxClientGridViewBatchEditApi { + /** + * Performs validation of grid data contained in all rows when the grid operates in Batch Edit mode. + * @param validateOnlyModified true, if only modified rows should be validated; otherwise, false. + */ + ValidateRows(validateOnlyModified?: boolean): boolean; + /** + * Performs validation of grid data contained in the specified row when the grid operates in Batch Edit mode. + * @param visibleIndex An integer value specifying the visible index of the validated row. + */ + ValidateRow(visibleIndex: number): boolean; + /** + * Returns an array of row visible indices. + * @param includeDeleted true, to include visible indices of deleted rows to the returned array; otherwise, false. + */ + GetRowVisibleIndices(includeDeleted: boolean): number[]; + /** + * Returns an array of the deleted row visible indices. + */ + GetDeletedRowIndices(): number[]; + /** + * Returns an array of the inserted row visible indices. + */ + GetInsertedRowIndices(): number[]; + /** + * Indicates if the row with specified visible index is deleted. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsDeletedRow(visibleIndex: number): boolean; + /** + * Indicates if the row with specified visible index is newly created. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsNewRow(visibleIndex: number): boolean; + /** + * Programmatically moves the focus to the previous cell in the row. + */ + MoveFocusBackward(): boolean; + /** + * Programmatically moves the focus to the next cell in the row. + */ + MoveFocusForward(): boolean; + /** + * Sets a value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the row containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object): void; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the row containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + * @param displayText A string value that specifies the cell display text. + * @param cancelCellHighlighting true to cancel highlighting of the modified cell, false to highlight the modified cell. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object, displayText: string, cancelCellHighlighting?: boolean): void; + /** + * Gets the value of the specified cell. + * @param visibleIndex A zero-based integer value that specifies a visible index of a row containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). + */ + GetCellValue(visibleIndex: number, columnFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets information about the cell currently being edited. + */ + GetEditCellInfo(): ASPxClientGridViewCellInfo; + /** + * Returns a value that indicates whether the grid has changed data. + */ + HasChanges(): boolean; + /** + * Returns a value that indicates whether the specified row has changed data. + * @param visibleIndex An integer value that specifies the visible index of a row. + */ + HasChanges(visibleIndex: number): boolean; + /** + * Returns a value that indicates whether the specified data cell's data has been changed. + * @param visibleIndex An integer value that specifies the visible index of a row. + * @param columnFieldNameOrId A string value that identifies the column by the name of the data source field to which the column is bound, or by the column's name. + */ + HasChanges(visibleIndex: number, columnFieldNameOrId: string): boolean; + /** + * Resets changes in the specified row. + * @param visibleIndex An integer value that specifies the visible index of a row. + */ + ResetChanges(visibleIndex: number): void; + /** + * Resets changes in the specified cell. + * @param visibleIndex An integer value that specifies the visible index of a row containing the processed cell. + * @param columnIndex A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + */ + ResetChanges(visibleIndex: number, columnIndex: number): void; + /** + * Switches the specified cell to edit mode. + * @param visibleIndex A zero-based integer value that specifies the visible index of a row containing the processed cell. + * @param columnIndex A zero-based integer value that identifies the column which contains the processed cell in the column collection. + */ + StartEdit(visibleIndex: number, columnIndex: number): void; + /** + * Ends cell or row editing. + */ + EndEdit(): void; +} +/** + * A client-side equivalent of the ASPxVerticalGrid object. + */ +interface ASPxClientVerticalGrid extends ASPxClientGridBase { + /** + * Provides access to the batch editing client API. + * Value: A object that exposes the batch editing client API methods. + */ + batchEditApi: ASPxClientVerticalGridBatchEditApi; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs when a grid switches to batch edit mode. + */ + BatchEditStartEditing: ASPxClientEvent>; + /** + * Occurs when a grid leaves the batch edit mode. + */ + BatchEditEndEditing: ASPxClientEvent>; + /** + * Enables you to prevent a batch edit confirmation message from being displayed. + */ + BatchEditConfirmShowing: ASPxClientEvent>; + /** + * Enables you to provide navigation for editors contained in a templated cell in Batch Edit mode. + */ + BatchEditTemplateCellFocused: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are saved in batch edit mode. + */ + BatchEditChangesSaving: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are canceled in batch edit mode. + */ + BatchEditChangesCanceling: ASPxClientEvent>; + /** + * Occurs on the client side before a record is inserted in batch edit mode. + */ + BatchEditRecordInserting: ASPxClientEvent>; + /** + * Occurs on the client side before a record is deleted in batch edit mode. + */ + BatchEditRecordDeleting: ASPxClientEvent>; + /** + * Enables you to specify whether record data is valid and provide an error text. + */ + BatchEditRecordValidating: ASPxClientEvent>; + /** + * Enables you to prevent rows from being sorted. + */ + RowSorting: ASPxClientEvent>; + /** + * Fires on the client side before the expansion state of a row is changed by end-user interaction. + */ + RowExpandedChanging: ASPxClientEvent>; + /** + * Fires on the client side after a row's expansion state has been changed by end-user interaction. + */ + RowExpandedChanged: ASPxClientEvent>; + /** + * Fires on the client when a record is clicked. + */ + RecordClick: ASPxClientEvent>; + /** + * Fires on the client when a record is double clicked. + */ + RecordDblClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientVerticalGrid. + */ + CallbackError: ASPxClientEvent>; + /** + * Sorts data by the specified data row's values. + * @param row An ASPxClientVerticalGridRow object that represents the data row. + */ + SortBy(row: ASPxClientVerticalGridRow): void; + /** + * Sorts data by the specified data row's values. + * @param rowIndex An integer value that specifies the row's position within the row collection. + */ + SortBy(rowIndex: number): void; + /** + * Sorts data by the specified data row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + */ + SortBy(rowFieldNameOrId: string): void; + /** + * Sorts data by the specified data row's values. + * @param row An ASPxClientVerticalGridRow object that represents the data row. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(row: ASPxClientVerticalGridRow, sortOrder: string): void; + /** + * Sorts data by the specified data row's values. + * @param rowIndex An integer value that specifies the row's position within the row collection. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(rowIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(rowFieldNameOrId: string, sortOrder: string): void; + /** + * Sorts data by the specified data row's values. + * @param row An ASPxClientVerticalGridRow object that represents the data row. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(row: ASPxClientVerticalGridRow, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data row's values. + * @param rowIndex An integer value that specifies the row's position within the row collection. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true, to clear any previous sorting; otherwise, false. + */ + SortBy(rowIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(rowFieldNameOrId: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data row's values, and places the row to the specified position among the sorted rows. + * @param row An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based row's index among the sorted rows. -1 if data is not sorted by this row. + */ + SortBy(row: ASPxClientVerticalGridRow, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data row's values, and places the row to the specified position among the sorted rows. + * @param rowIndex An integer value that specifies the row's position within the row collection. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex + */ + SortBy(rowIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data row's values, and places the row to the specified position among the sorted rows. + * @param rowFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based row's index among the sorted rows. -1 if data is not sorted by this row. + */ + SortBy(rowFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Returns the key value of the specified data row (record in the vertical grid). + * @param visibleIndex An integer value that specifies the record's visible index. + */ + GetRecordKey(visibleIndex: number): string; + /** + * Adds a new record. + */ + AddNewRecord(): void; + /** + * Deletes the specified record. + * @param visibleIndex An integer value that identifies the record. + */ + DeleteRecord(visibleIndex: number): void; + /** + * Deletes a record with the specified key value. + * @param key An object that uniquely identifies the record. + */ + DeleteRecordByKey(key: Object): void; + /** + * Selects all the unselected records within the grid. + */ + SelectRecords(): void; + /** + * Selects the specified record displayed within the grid. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + SelectRecords(visibleIndex: number): void; + /** + * Selects the specified rercords within the grid. + * @param visibleIndices An array of zero-based indices that identify records within the grid. + */ + SelectRecords(visibleIndices: number[]): void; + /** + * Selects or deselects the specified records within the grid. + * @param visibleIndices An array of zero-based indices that identify records within the grid. + * @param selected true to select the specified records; false to deselect the records. + */ + SelectRecords(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified record within the grid. + * @param visibleIndex An integer zero-based index that identifies the record within the grid. + * @param selected true to select the specified record; false to deselect the record. + */ + SelectRecords(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified records displayed within the grid. + * @param keys An array of objects that uniquely identify the records. + * @param selected true to select the specified records; false to deselect the records. + */ + SelectRecordsByKey(keys: Object[], selected?: boolean): void; + /** + * Selects or deselects the specified record displayed within the grid. + * @param key An object that uniquely identifies the record. + * @param selected true to select the specified record; false to deselect the record. + */ + SelectRecordsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified records displayed within the grid. + * @param keys An array of objects that uniquely identify the records. + */ + SelectRecordsByKey(keys: Object[]): void; + /** + * Selects a grid record by its key. + * @param key An object that uniquely identifies the record. + */ + SelectRecordsByKey(key: Object): void; + /** + * Deselects all the selected records within the grid. + */ + UnselectRecords(): void; + /** + * Deselects the specified records (if selected) within the grid. + * @param visibleIndices An array of zero-based indices that identify records within the grid. + */ + UnselectRecords(visibleIndices: number[]): void; + /** + * Deselects the specified record (if selected) within the grid. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + UnselectRecords(visibleIndex: number): void; + /** + * Deselects the specified records displayed within the grid. + * @param keys An array of objects that uniquely identify the records. + */ + UnselectRecordsByKey(keys: Object[]): void; + /** + * Deselects the specified record displayed within the grid. + * @param key An object that uniquely identifies the record. + */ + UnselectRecordsByKey(key: Object): void; + /** + * Deselects all grid records that match the filter criteria currently applied to the grid. + */ + UnselectFilteredRecords(): void; + /** + * Selects the specified record displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + SelectRecordOnPage(visibleIndex: number): void; + /** + * Selects or deselects the specified record displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + * @param selected true to select the specified record; false to deselect the record. + */ + SelectRecordOnPage(visibleIndex: number, selected?: boolean): void; + /** + * Deselects the specified record (if selected) displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + UnselectRecordOnPage(visibleIndex: number): void; + /** + * Selects all unselected records displayed on the current page. + */ + SelectAllRecordsOnPage(): void; + /** + * Allows you to select or deselect all records displayed on the current page based on the parameter passed. + * @param selected true to select all unselected records displayed on the current page; false to deselect all selected records on the page. + */ + SelectAllRecordsOnPage(selected: boolean): void; + /** + * Deselects all selected records displayed on the current page. + */ + UnselectAllRecordsOnPage(): void; + /** + * Returns the number of selected records. + */ + GetSelectedRecordCount(): number; + /** + * Indicates whether or not the specified record is selected within the current page. + * @param visibleIndex An integer value that identifies the record by its visible index. + */ + IsRecordSelectedOnPage(visibleIndex: number): boolean; + /** + * Returns the values of the specified data source fields within the specified record. + * @param visibleIndex An integer value that identifies the record. + * @param fieldNames The names of data source fields separated using a semicolon, whose values within the specified record are returned. + * @param onCallback An ASPxClientVerticalGridValuesCallback object that represents the JavaScript function which receives the list of record values as a parameter. + */ + GetRecordValues(visibleIndex: number, fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns the record values displayed within the current page. + * @param fieldNames The names of data source fields whose values are returned. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that represents the JavaScript function which receives the list of record values as a parameter. + */ + GetPageRecordValues(fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns the number of records actually displayed within the active page. + */ + GetVisibleRecordsOnPage(): number; + /** + * Returns the number of rows within the client vertical grid. + */ + GetRowCount(): number; + /** + * Applies the specified search panel filter criterion to grid data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Applies the specified filter expression to the ASPxVerticalGrid. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client vertical grid. + */ + ClearFilter(): void; + /** + * Sets input focus to the grid. + */ + Focus(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Selects the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the grid's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Returns the index of the first record displayed within the vertical grid's active page. + */ + GetTopVisibleIndex(): number; + /** + * Saves all the changes made and switches the grid to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the ASPxVerticalGrid to browse mode. + */ + CancelEdit(): void; + /** + * Updates data displayed within the grid. + */ + Refresh(): void; + /** + * Returns the record values displayed within all selected records. + * @param fieldNames The names of data source fields separated by a semicolon, whose values within the selected records are returned. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that represents the JavaScript function which receives the list of record values as a parameter. + */ + GetSelectedFieldValues(fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns key values of selected records displayed within the current page. + */ + GetSelectedKeysOnPage(): Object[]; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns the editor used to edit the specified row's values. + * @param row An ASPxClientVerticalGridRowobject that specifies the required row within the client grid. + */ + GetEditor(row: ASPxClientVerticalGridRow): ASPxClientEdit; + /** + * Returns the editor used to edit the specified row's values. + * @param rowIndex An integer value that specifies the row's position within the rows collection. + */ + GetEditor(rowIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + */ + GetEditor(rowFieldNameOrId: string): ASPxClientEdit; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Returns the client row that resides at the specified position within the row collection. + * @param rowIndex A zero-based index that identifies the row within the row collection (the row's Index property value). + */ + GetRow(rowIndex: number): ASPxClientVerticalGridRow; + /** + * Returns the row with the specified unique identifier. + * @param rowId A string value that specifies the row's unique identifier (the row's Name property value). + */ + GetRowById(rowId: string): ASPxClientVerticalGridRow; + /** + * Returns the client row which is bound to the specified data source field. + * @param rowFieldName A string value that specifies the name of the data source field to which the row is bound (the row's fieldName property value). + */ + GetRowByField(rowFieldName: string): ASPxClientVerticalGridRow; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVerticalScrollPosition(): number; + /** + * Returns the current horizontal scroll position of the grid's content. + */ + GetHorizontalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Specifies the horizontal scroll position for the grid's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorizontalScrollPosition(position: number): void; + /** + * Gets the value that specifies whether the required row is expanded. + * @param row An ASPxClientVerticalGridRowobject that specifies the row. + */ + GetRowExpanded(row: ASPxClientVerticalGridRow): boolean; + /** + * Gets the value that specifies whether the row with the specified index is expanded. + * @param rowIndex An integer value specifying the row's index. + */ + GetRowExpanded(rowIndex: number): boolean; + /** + * Gets the value that specifies whether the row with the specified field name or ID is expanded. + * @param rowFieldNameOrId A string value specifying the row's field name or ID. + */ + GetRowExpanded(rowFieldNameOrId: string): boolean; + /** + * Sets a value indicating whether the row is expanded. + * @param row An ASPxClientVerticalGridRowobject that specifies the required row within the client grid. + * @param value true, to expand the row; otherwise, false. + */ + SetRowExpanded(row: ASPxClientVerticalGridRow, value: boolean): void; + /** + * Sets a value indicating whether the row is expanded. + * @param rowIndex An integer value specifying the index of the row. + * @param value true, to expand the row; otherwise, false. + */ + SetRowExpanded(rowIndex: number, value: boolean): void; + /** + * Sets a value indicating whether the row is expanded. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + * @param value true, to expand the row; otherwise, false. + */ + SetRowExpanded(rowFieldNameOrId: string, value: boolean): void; +} +/** + * A client grid row. + */ +interface ASPxClientVerticalGridRow extends ASPxClientGridColumnBase { + /** + * Gets the name that uniquely identifies the row. + * Value: A string value assigned to the row's Name property. + */ + name: string; + /** + * Gets the row's position within the collection. + * Value: An integer zero-bazed index that specifies the row's position within the collection. + */ + index: number; + /** + * Gets the name of the database field assigned to the current row. + * Value: A string value that specifies the name of a data field. + */ + fieldName: string; + /** + * Gets whether the row is visible. + * Value: true, to display the row; otherwise, false. + */ + visible: boolean; +} +/** + * Represents a JavaScript function which receives the list of record values when the client GetSelectedFieldValues method is called. + */ +interface ASPxClientVerticalGridValuesCallback { + /** + * Represents a JavaScript function which receives the list of record values when the client GetSelectedFieldValues method is called. + * @param result An object that represents the list of record values received from the server. + */ + (result: Object): void; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientVerticalGridRowCancelEventHandler { + /** + * A method that will handle the cancelable events of a client ASPxVerticalGrid row. + * @param source The event source. + * @param e An ASPxClientVerticalGridRowCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRowCancelEventArgs): void; +} +/** + * Provides data for the cancelable events of a client ASPxVerticalGrid row. + */ +interface ASPxClientVerticalGridRowCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client row. + * Value: An ASPxClientVerticalGridRow object that represents the processed row. + */ + row: ASPxClientVerticalGridRow; +} +/** + * A method that will handle the RecordClick event. + */ +interface ASPxClientVerticalGridRecordClickEventHandler { + /** + * A method that will handle the RecordClick event. + * @param source The event source. This parameter identifies the ASPxClientVerticalGrid object that raised the event. + * @param e An ASPxClientVerticalGridRecordClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRecordClickEventArgs): void; +} +/** + * Provides data for the RecordClick event. + */ +interface ASPxClientVerticalGridRecordClickEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer zero-based index that identifies the processed record. + */ + visibleIndex: number; + /** + * Provides access to the parameters associated with the RecordClick event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientVerticalGridCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. This parameter identifies the ASPxClientVerticalGrid object that raised the event. + * @param e An ASPxClientVerticalGridCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridCustomButtonEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientVerticalGridCustomButtonEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the value which identifies the record whose custom button has been clicked. + * Value: An integer value that identifies the record whose custom button has been clicked. + */ + visibleIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A string value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the SelectionChanged event. + */ +interface ASPxClientVerticalGridSelectionEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. + * @param e An ASPxClientVerticalGridSelectionEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridSelectionEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientVerticalGridSelectionEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the visible index of the record whose selected state has been changed. + * Value: An value that specifies the visible index of the record. + */ + visibleIndex: number; + /** + * Gets whether the record has been selected. + * Value: true, if the record has been selected; otherwise, false. + */ + isSelected: boolean; + /** + * Gets whether all records displayed within a page have been selected or unselected. + * Value: true if all records displayed within a page have been selected or unselected; otherwise, false. + */ + isAllRecordsOnPage: boolean; + /** + * Gets whether a selection has been changed on the server. + * Value: true if a selection has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the RowExpandedChanged event. + */ +interface ASPxClientVerticalGridRowExpandedEventHandler { + /** + * A method that will handle the RowExpandedChanged event. + * @param source The event source. + * @param e An ASPxClientVerticalGridRowExpandedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRowExpandedEventArgs): void; +} +/** + * Provides data for the RowExpandedChanged event. + */ +interface ASPxClientVerticalGridRowExpandedEventArgs extends ASPxClientEventArgs { + /** + * Gets the expanded row. + * Value: An ASPxClientVerticalGridRow object that represents the expanded row. + */ + row: ASPxClientVerticalGridRow; +} +/** + * A method that will handle the RowExpandedChanging event. + */ +interface ASPxClientVerticalGridRowExpandingEventHandler { + /** + * A method that will handle the RowExpandedChanging event. + * @param source The event source. + * @param e An ASPxClientVerticalGridRowExpandedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRowExpandingEventArgs): void; +} +/** + * Provides data for the RowExpandedChanging event. + */ +interface ASPxClientVerticalGridRowExpandingEventArgs extends ASPxClientVerticalGridRowExpandedEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents an object that will handle the client-side BatchEditStartEditing event. + */ +interface ASPxClientVerticalGridBatchEditStartEditingEventHandler { + /** + * A method that will handle the BatchEditStartEditing event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditStartEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditStartEditingEventArgs): void; +} +/** + * Provides data for the BatchEditStartEditing event. + */ +interface ASPxClientVerticalGridBatchEditStartEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the record whose cells are about to be edited. + * Value: An value that specifies the visible index of the record. + */ + visibleIndex: number; + /** + * Gets the grid row that owns a cell that is about to be edited. + * Value: An object that is the focused grid row. + */ + focusedRow: ASPxClientVerticalGridRow; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + recordValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditEndEditing event. + */ +interface ASPxClientVerticalGridBatchEditEndEditingEventHandler { + /** + * A method that will handle the BatchEditEndEditing event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditEndEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditEndEditingEventArgs): void; +} +/** + * Provides data for the BatchEditEndEditing event. + */ +interface ASPxClientVerticalGridBatchEditEndEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the record whose cells have been edited. + * Value: An value that specifies the visible index of the record. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: Gets a hashtable that maintains information about editable cells. + */ + recordValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditRecordValidating event. + */ +interface ASPxClientVerticalGridBatchEditRecordValidatingEventHandler { + /** + * A method that will handle the BatchEditRecordValidating event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditRecordValidatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditRecordValidatingEventArgs): void; +} +/** + * Provides data for the BatchEditRecordValidating event. + */ +interface ASPxClientVerticalGridBatchEditRecordValidatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer value that specifies the processed record's visible index. + */ + visibleIndex: number; + /** + * Provides validation information on the record currently being validated. + * Value: An object that is a hashtable containing validation information. + */ + validationInfo: Object; +} +/** + * Represents an object that will handle the client-side BatchEditConfirmShowing event. + */ +interface ASPxClientVerticalGridBatchEditConfirmShowingEventHandler { + /** + * A method that will handle the BatchEditConfirmShowing client event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditConfirmShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditConfirmShowingEventArgs): void; +} +/** + * Provides data for the BatchEditConfirmShowing event. + */ +interface ASPxClientVerticalGridBatchEditConfirmShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the client identifier of an object that initiates a send request. + * Value: A string value that specifies the object client identifier. + */ + requestTriggerID: string; +} +/** + * Represents an object that will handle the client-side BatchEditTemplateCellFocused event. + */ +interface ASPxClientVerticalGridBatchEditTemplateCellFocusedEventHandler { + /** + * A method that will handle the BatchEditTemplateCellFocused event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientVerticalGridBatchEditTemplateCellFocusedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditTemplateCellFocusedEventArgs): void; +} +/** + * Provides data for the BatchEditTemplateCellFocused event. + */ +interface ASPxClientVerticalGridBatchEditTemplateCellFocusedEventArgs extends ASPxClientEventArgs { + /** + * Gets the currently processed row. + * Value: A object that is the client-side row object. + */ + row: ASPxClientVerticalGridRow; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * Represents an object that will handle the client-side BatchEditChangesSaving event. + */ +interface ASPxClientVerticalGridBatchEditChangesSavingEventHandler { + /** + * A method that will handle the BatchEditChangesSaving event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditChangesSavingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditChangesSavingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesSaving event. + */ +interface ASPxClientVerticalGridBatchEditChangesSavingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditChangesCanceling event. + */ +interface ASPxClientVerticalGridBatchEditChangesCancelingEventHandler { + /** + * A method that will handle the BatchEditChangesCanceling event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditChangesCancelingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditChangesCancelingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesCanceling event. + */ +interface ASPxClientVerticalGridBatchEditChangesCancelingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditRecordInserting event. + */ +interface ASPxClientVerticalGridBatchEditRecordInsertingEventHandler { + /** + * A method that will handle the BatchEditRecordInserting event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditRecordInsertingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditRecordInsertingEventArgs): void; +} +/** + * Provides data for the BatchEditRecordInserting event. + */ +interface ASPxClientVerticalGridBatchEditRecordInsertingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer value that specifies the processed record's visible index. + */ + visibleIndex: number; +} +/** + * Represents an object that will handle the client-side BatchEditRecordDeleting event. + */ +interface ASPxClientVerticalGridBatchEditRecordDeletingEventHandler { + /** + * A method that will handle the BatchEditRecordDeleting event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditRecordDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditRecordDeletingEventArgs): void; +} +/** + * Provides data for the BatchEditRecordDeleting event. + */ +interface ASPxClientVerticalGridBatchEditRecordDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer value that specifies the processed record's visible index. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + recordValues: Object; +} +/** + * Contains information on a cell that is being edited. + */ +interface ASPxClientVerticalGridCellInfo { + /** + * Gets the row that contains the cell currently being processed. + * Value: An object that is the row which contains the processed cell. + */ + row: ASPxClientVerticalGridRow; + /** + * Gets the visible index of the record that contains the cell currently being processed. + * Value: An value that specifies the visible index of the record. + */ + recordVisibleIndex: number; +} +/** + * Provides members related to Batch Edit Mode + */ +interface ASPxClientVerticalGridBatchEditApi { + /** + * Performs validation of grid data contained in all records when the grid operates in batch edit mode. + * @param validateOnlyModified true, if only modified records should be validated; otherwise, false. + */ + ValidateRecords(validateOnlyModified?: boolean): boolean; + /** + * Performs validation of grid data contained in the specified record when the grid operates in batch edit mode. + * @param visibleIndex An integer value specifying the visible index of the validated record. + */ + ValidateRecord(visibleIndex: number): boolean; + /** + * Returns an array of record visible indices. + * @param includeDeleted true, to include visible indices of deleted records to the returned array; otherwise, false. + */ + GetRecordVisibleIndices(includeDeleted: boolean): number[]; + /** + * Returns an array of the deleted record visible indices. + */ + GetDeletedRecordIndices(): number[]; + /** + * Returns an array of the inserted record visible indices. + */ + GetInsertedRecordIndices(): number[]; + /** + * Indicates if the record with the specified visible index is deleted. + * @param visibleIndex An integer value that identifies the record by its visible index. + */ + IsDeletedRecord(visibleIndex: number): boolean; + /** + * Indicates if the record with specified visible index is newly created. + * @param visibleIndex An integer value that identifies the record by its visible index. + */ + IsNewRecord(visibleIndex: number): boolean; + /** + * Programmatically moves the focus to the previous cell in the record. + */ + MoveFocusBackward(): boolean; + /** + * Programmatically moves the focus to the next cell in the record. + */ + MoveFocusForward(): boolean; + /** + * Sets a value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the record containing the processed cell. + * @param rowFieldNameOrId A string value that specifies the field name or unique identifier (the row's Name property value) of a row containing the processed cell. + * @param value An object that contains the new cell value. + */ + SetCellValue(visibleIndex: number, rowFieldNameOrId: string, value: Object): void; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the row containing the processed cell. + * @param rowFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + * @param displayText A string value that specifies the cell display text. + * @param cancelCellHighlighting true to cancel highlighting of the modified cell, false to highlight the modified cell. + */ + SetCellValue(visibleIndex: number, rowFieldNameOrId: string, value: Object, displayText: string, cancelCellHighlighting?: boolean): void; + /** + * Gets the value of the specified cell. + * @param visibleIndex A zero-based integer value that specifies a visible index of a record containing the processed cell. + * @param rowFieldNameOrId A string value that specifies the field name or unique identifier (the row's Name property value) of a row containing the processed cell. + * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). + */ + GetCellValue(visibleIndex: number, rowFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets information about the cell currently being edited. + */ + GetEditCellInfo(): ASPxClientVerticalGridCellInfo; + /** + * Returns a value that indicates whether the vertical grid has changed data. + */ + HasChanges(): boolean; + /** + * Returns a value that indicates whether the specified record has changed data. + * @param visibleIndex An integer value that specifies the visible index of a record. + */ + HasChanges(visibleIndex: number): boolean; + /** + * Returns a value that indicates whether the specified data cell's data has been changed. + * @param visibleIndex An integer value that specifies the visible index of a record. + * @param rowFieldNameOrId A string value that identifies the row by the name of the data source field to which the row is bound, or by the row's name. + */ + HasChanges(visibleIndex: number, rowFieldNameOrId: string): boolean; + /** + * Resets changes in the specified record. + * @param visibleIndex An integer value that specifies the visible index of a record. + */ + ResetChanges(visibleIndex: number): void; + /** + * Resets changes in the specified cell. + * @param visibleIndex An integer value that specifies the visible index of a record containing the processed cell. + * @param rowIndex A string value that specifies the field name or unique identifier (the row's Name property value) of a row containing the processed cell. + */ + ResetChanges(visibleIndex: number, rowIndex: number): void; + /** + * Switches the specified cell to batch edit mode. + * @param visibleIndex A zero-based integer value that specifies the visible index of a record containing the processed cell. + * @param rowIndex A zero-based integer value that identifies the row which contains the processed cell in the rows collection. + */ + StartEdit(visibleIndex: number, rowIndex: number): void; + /** + * Ends the cell(s) editing. + */ + EndEdit(): void; +} +/** + * Contains style settings related to media elements in ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorCommandStyleSettings { + /** + * Gets or sets a media element's CSS class name. + * Value: A string that specifies a class name. + */ + className: string; + /** + * Gets or sets an element's width. + * Value: A string that specifies an element's width in any correct format. + */ + width: string; + /** + * Gets or sets an element's height. + * Value: A string that specifies an element's height in any correct format. + */ + height: string; + /** + * Gets or sets a media element's border width. + * Value: A string that specifies a border width in any correct format. + */ + borderWidth: string; + /** + * Gets or sets a media element's border color. + * Value: A string that specifies a border color in any correct format. + */ + borderColor: string; + /** + * Gets or sets a media element's border style. + * Value: A string that specifies a border style in any correct format. + */ + borderStyle: string; + /** + * Gets or sets an element's top margin. + * Value: A string that specifies an element's top margin in any correct format. + */ + marginTop: string; + /** + * Gets or sets an element's right margin. + * Value: A string that specifies an element's right margin in any correct format. + */ + marginRight: string; + /** + * Gets or sets an element's bottom margin. + * Value: A string that specifies an element's bottom margin in any correct format. + */ + marginBottom: string; + /** + * Gets or sets an element's left margin. + * Value: A string that specifies an element's left margin in any correct format. + */ + marginLeft: string; +} +/** + * The base class for parameters used in the ASPxHtmlEditor's client-side commands. + */ +interface ASPxClientHtmlEditorCommandArguments { + /** + * Gets the currently selected element in the ASPxHtmlEditor. + * Value: An HTML object which is the currently selected element. + */ + selectedElement: Object; +} +/** + * Contains settings related to the INSERTIMAGE_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertImageCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Specifies the source of the target image. + * Value: A string specifying the source of the target image. + */ + src: string; + /** + * Creates an alternate text for the target image. + * Value: A string that specifies an alternate text for the target image. + */ + alt: string; + /** + * Determines if the target image is wrapped with text. + * Value: true, if the target image is wrapped with text; otherwise, false. + */ + useFloat: boolean; + /** + * Determines the position of the target image. + * Value: A string value defining the position of the target image. + */ + align: string; + /** + * Contains the style settings specifying the appearance of the target image. + * Value: An object that contains the style settings specifying the appearance of the target image. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +/** + * Contains settings related to the CHANGEIMAGE_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeImageCommandArguments extends ASPxClientHtmlEditorInsertImageCommandArguments { +} +/** + * Contains settings related to the INSERTLINK_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertLinkCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Specifies the url of the page the target link goes to. + * Value: A string value specifying the target link url. + */ + url: string; + /** + * Specifiies the text of the target link. + * Value: A string value specifying the text of the target link. + */ + text: string; + /** + * Determines where to open the target link. + * Value: A string that specifies where to open the target link in any correct format. + */ + target: string; + /** + * Defines the title of the target link. + * Value: A string value defining the title of the target link. + */ + title: string; +} +/** + * The base class for parameters related to inserting or changing media elements in the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorChangeMediaElementCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Defines the HTML "id" attribute of the target media element. + * Value: A string value which is a unique identifier for the element. + */ + id: string; + /** + * Defines the source of the target media element. + * Value: A string defining the source of the target media element. + */ + src: string; + /** + * Determines the position of the target media element. + * Value: A string value indicating the position of the target media element. + */ + align: string; + /** + * Contains the style settings defining the appearance of the target media element. + * Value: An object that contains the style settings defining the appearance of the target media element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; + /** + * Returns the name of the client-side command corresponding to the parameter. + */ + GetCommandName(): string; +} +/** + * The base class for parameters related to inserting or changing HTML5 media elements (Audio and Video) in the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorChangeHtml5MediaElementCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments { + /** + * Determines if a media file will start playing automatically. + * Value: true, if autoplay is enabled; otherwise, false. + */ + autoPlay: boolean; + /** + * Determines if a media file repeats indefinitely, or stops when it reaches the last frame. + * Value: true, to loop playback; otherwise, false. + */ + loop: boolean; + /** + * Determines if the media player controls should be displayed. + * Value: true, if media player controls are displayed; otherwise, false. + */ + showPlayerControls: boolean; + /** + * Determines how a media file should be loaded when the page loads. + * Value: One of the ASPxClientHtmlEditorMediaPreloadMode enumeration values. + */ + preloadMode: string; +} +/** + * Contains settings related to the INSERTAUDIO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertAudioCommandArguments extends ASPxClientHtmlEditorChangeHtml5MediaElementCommandArguments { +} +/** + * Contains settings related to the CHANGEAUDIO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeAudioCommandArguments extends ASPxClientHtmlEditorInsertAudioCommandArguments { +} +/** + * Contains settings related to the INSERTVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertVideoCommandArguments extends ASPxClientHtmlEditorChangeHtml5MediaElementCommandArguments { + /** + * Defines the URL of an image that is shown while the video file is downloading, or until an end-user clicks the play button. + * Value: A string value that specifies the poster image URL. + */ + posterUrl: string; +} +/** + * Contains settings related to the CHANGEVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeVideoCommandArguments extends ASPxClientHtmlEditorInsertVideoCommandArguments { +} +/** + * Contains settings related to the INSERTFLASH_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertFlashCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments { + /** + * Determines if the target flash element will start playing automatically. + * Value: true, if autoplay is enabled; otherwise, false. + */ + autoPlay: boolean; + /** + * Defines if the target flash element repeats indefinitely, or stops when it reaches the last frame. + * Value: true, to loop playback; otherwise, false. + */ + loop: boolean; + /** + * Determines if the flash related items are displayed in the context menu of the target flash element. + * Value: true, if the specific context menu items are displayed; otherwise, false + */ + enableFlashMenu: boolean; + /** + * Determines if the target flash element can be displayed in the fullscreen mode. + * Value: true, if the fullscreen mode is allowed; otherwise, false. + */ + allowFullscreen: boolean; + /** + * Defines the rendering quality level used for the target flash element. + * Value: A string value that specifies the target flash element rendering quality. + */ + quality: string; +} +/** + * Contains settings related to the CHANGEFLASH_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeFlashCommandArguments extends ASPxClientHtmlEditorInsertFlashCommandArguments { +} +/** + * Contains settings related to the INSERTYOUTUBEVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments { + /** + * Determines if suggested videos are shown after the target YouTube video finishes. + * Value: true, to show suggested videos; otherwise, false + */ + showRelatedVideos: boolean; + /** + * Determines if the target YouTube video title and player actions (Watch later, Share) are shown. + * Value: true, to display the title and player actions; otherwise, false. + */ + showVideoInfo: boolean; + /** + * Determines if the privacy-enhanced mode is enabled for the target YouTube video. + * Value: true, if the privace-enhanced mode is enabled; otherwise, false + */ + enablePrivacyEnhancedMode: boolean; + /** + * Determines if the player controls are displayed for the target YouTube video. + * Value: true, if the player controls are displayed; otherwise, false. + */ + showPlayerControls: boolean; +} +/** + * Contains settings related to the CHANGEYOUTUBEVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeYouTubeVideoCommandArguments extends ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments { +} +/** + * A method that will handle the DialogInitialized client event. + */ +interface ASPxClientHtmlEditorDialogInitializedEventHandler { + /** + * A method that will handle the client DialogInitialized event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorDialogInitializedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorDialogInitializedEventArgs): void; +} +/** + * Provides data for the DialogInitialized client event. + */ +interface ASPxClientHtmlEditorDialogInitializedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dialog that has been initialized. + * Value: A string value that is the name of the initialized dialog. + */ + dialogName: string; +} +/** + * A method that will handle the CommandExecuting event. + */ +interface ASPxClientHtmlEditorCommandExecutingEventHandler { + /** + * A method that will handle the client CommandExecuted event. + * @param source The event's source. + * @param e An ASPxClientHtmlEditorCommandExecutingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCommandExecutingEventArgs): void; +} +/** + * Provides data for the CommandExecuting event. + */ +interface ASPxClientHtmlEditorCommandExecutingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value specifying the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: An object containing additional information about the processed command. + */ + parameter: Object; +} +/** + * A method that will handle the client events related to command processing. + */ +interface ASPxClientHtmlEditorCommandEventHandler { + /** + * A method that will handle the corresponding client event. + * @param source The event source. This parameter identifies the editor which raised the event. + * @param e An ASPxClientHtmlEditorCommandEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCommandEventArgs): void; +} +/** + * Provides data for client events that relate to command processing (CustomCommand). + */ +interface ASPxClientHtmlEditorCommandEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: Object; +} +/** + * A method that will handle the client events that relate to custom dialog operations. + */ +interface ASPxClientHtmlEditorCustomDialogEventHandler { + /** + * A method that will handle the client CustomDialogOpened event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorCustomDialogEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCustomDialogEventArgs): void; +} +/** + * Provides data for client events that relate to custom dialog operations. + */ +interface ASPxClientHtmlEditorCustomDialogEventArgs extends ASPxClientEventArgs { + /** + * Gets the name that uniquely identifies the processed custom dialog. + * Value: A string value that represents the value assigned to the processed custom dialog's Name property. + */ + name: string; +} +/** + * Provides data for client events that relate to closing a custom dialog. + */ +interface ASPxClientHtmlEditorCustomDialogCloseEventArgsBase extends ASPxClientHtmlEditorCustomDialogEventArgs { + /** + * Gets the status of the closed custom dialog. + * Value: An object representing a custom dialog's closing status. By default, it's the "cancel" string if the dialog operation is canceled, or the "ok" string if a dialog is closed by submitting a file. You can also provide your custom status, if your dialog contains additional buttons. + */ + status: Object; +} +/** + * A method that will handle the CustomDialogClosing client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosingEventHandler { + /** + * A method that will handle the client CustomDialogClosing event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorCustomDialogClosingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCustomDialogClosingEventArgs): void; +} +/** + * Provides data for the CustomDialogClosing client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosingEventArgs extends ASPxClientHtmlEditorCustomDialogCloseEventArgsBase { + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the CustomDialogClosed client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosedEventHandler { + /** + * A method that will handle the client CustomDialogClosed event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorCustomDialogClosedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCustomDialogClosedEventArgs): void; +} +/** + * Provides data for the CustomDialogClosed client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosedEventArgs extends ASPxClientHtmlEditorCustomDialogCloseEventArgsBase { + /** + * Gets an object associated with the closed dialog. + * Value: An object containing custom data associated with dialog closing. + */ + data: Object; +} +/** + * A method that will handle the Validation client event. + */ +interface ASPxClientHtmlEditorValidationEventHandler { + /** + * A method that will handle the client Validation event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorValidationEventArgs): void; +} +/** + * Provides data for the Validation client event. + */ +interface ASPxClientHtmlEditorValidationEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets the HTML markup that is the ASPxHtmlEditor's content. + * Value: A string value that specifies the HTML content to validate. + */ + html: string; + /** + * Gets or sets a value specifying whether the validated value is valid. + * Value: true if the validation has been completed successfully; otherwise, false. + */ + isValid: boolean; + /** + * Gets or sets the error text to be displayed within the editor's error frame if the editor's validation fails. + * Value: A string value specifying the error description. + */ + errorText: string; +} +/** + * A method that will handle the ActiveTabChanged event. + */ +interface ASPxClientHtmlEditorTabEventHandler { + /** + * A method that will handle the client ActiveTabChanged event. + * @param source The event's source. + * @param e An ASPxClientHtmlEditorTabEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorTabEventArgs): void; +} +/** + * Provides data for the ActiveTabChanged event that concerns manipulations on tabs. + */ +interface ASPxClientHtmlEditorTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the name that uniquely identifies an editor tab. + * Value: A string value that is the tab name. + */ + name: string; +} +/** + * A method that will handle the ActiveTabChanging event. + */ +interface ASPxClientHtmlEditorTabCancelEventHandler { + /** + * A method that will handle the client ActiveTabChanging event. + * @param source The event's source. + * @param e An ASPxClientHtmlEditorTabCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorTabCancelEventArgs): void; +} +/** + * Provides data for the cancellable ActiveTabChanging event that concerns manipulations on tabs. + */ +interface ASPxClientHtmlEditorTabCancelEventArgs extends ASPxClientHtmlEditorTabEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event, should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the BeforePaste event. + */ +interface ASPxClientHtmlEditorBeforePasteEventHandler { + /** + * A method that will handle the BeforePaste event. + * @param source The event source. This parameter identifies the HTML editor object that raised the event. + * @param e An ASPxClientHtmlEditorBeforePasteEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorBeforePasteEventArgs): void; +} +/** + * Provides data for the BeforePaste event. + */ +interface ASPxClientHtmlEditorBeforePasteEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value identifying the command's name. + */ + commandName: string; + /** + * Gets or sets the HTML markup that is about to be pasted to the ASPxHtmlEditor's content. + * Value: A string value that specifies the HTML content to paste. + */ + html: string; +} +/** + * Represents a client-side equivalent of the ASPxHtmlEditor control. + */ +interface ASPxClientHtmlEditor extends ASPxClientControl { + /** + * Occurs on the client side after a dialog has been initialized. + */ + DialogInitialized: ASPxClientEvent>; + /** + * Occurs before a default or custom command has been executed and allows you to cancel the action. + */ + CommandExecuting: ASPxClientEvent>; + /** + * Enables you to implement a custom command's logic. + */ + CustomCommand: ASPxClientEvent>; + /** + * Occurs after a default or custom command has been executed on the client side. + */ + CommandExecuted: ASPxClientEvent>; + /** + * Fires on the client side when the editor's Design View Area receives input focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Fires on the client side when the editor's Design View Area loses input focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Occurs on the client when a selection is changed within the ASPxHtmlEditor. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the content of the editor changes. + */ + HtmlChanged: ASPxClientEvent>; + /** + * Occurs on the client side after a custom dialog is opened. + */ + CustomDialogOpened: ASPxClientEvent>; + /** + * Fires on the client side before a custom dialog is closed. + */ + CustomDialogClosing: ASPxClientEvent>; + /** + * Occurs on the client side after a custom dialog is closed. + */ + CustomDialogClosed: ASPxClientEvent>; + /** + * Allows you to specify whether the value entered into the ASPxHtmlEditor is valid. + */ + Validation: ASPxClientEvent>; + /** + * Occurs on the client side before a context menu is shown. + */ + ContextMenuShowing: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientHtmlEditor. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after a callback, sent by the CustomDataCallback event handler. + */ + CustomDataCallback: ASPxClientEvent>; + /** + * Occurs on the client side after the editor content is spell checked. + */ + SpellingChecked: ASPxClientEvent>; + /** + * Fires on the client side after the active tab has been changed within a control. + */ + ActiveTabChanged: ASPxClientEvent>; + /** + * Fires on the client side before the active tab is changed within a control. + */ + ActiveTabChanging: ASPxClientEvent>; + /** + * Occurs before an HTML code is pasted to editor content, and allows you to modify it. + */ + BeforePaste: ASPxClientEvent>; + /** + * Returns the document object generated by an iframe element within a design view area. + */ + GetDesignViewDocument(): Object; + /** + * Returns the document object generated by an iframe element within a preview area. + */ + GetPreviewDocument(): Object; + /** + * Returns a collection of client context menu objects. + */ + GetContextMenu(): ASPxClientPopupMenu; + /** + * Returns a value indicating whether an editor is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether an editor is enabled. + * @param value true to enable the editor; false to disable it. + */ + SetEnabled(value: boolean): void; + /** + * Sets input focus to the ASPxHtmlEditor's edit region. + */ + Focus(): void; + /** + * Gets the HTML markup that represents the editor's content. + */ + GetHtml(): string; + /** + * Specifies the HTML markup that represents the editor's content. + * @param html A string value that specifies the HTML markup. + */ + SetHtml(html: string): void; + /** + * Sets the HTML markup that represents the editor's content. + * @param html A string value that specifies the HTML markup. + * @param clearUndoHistory true to clear the undo stack; otherwise, false. + */ + SetHtml(html: string, clearUndoHistory: boolean): void; + /** + * Replaces placeholders with the specified values. + * @param html A string value that specifies the HTML code to process. + * @param placeholders An array of objects that specify the placeholders and values to replace them. + */ + ReplacePlaceholders(html: string, placeholders: Object[]): string; + /** + * Creates a parameter for ASPxHtmlEditor's client-side commands related to changing media elements. + * @param element An element that is being changed. + */ + CreateChangeMediaElementCommandArguments(element: Object): ASPxClientHtmlEditorChangeMediaElementCommandArguments; + /** + * Executes the specified command. + * @param commandName A string value that specifies the command to perform. + * @param parameter A string value specifying additional information about the command to perform. + * @param addToUndoHistory true, to add the specified command to the undo stack; otherwise, false. + */ + ExecuteCommand(commandName: string, parameter: Object, addToUndoHistory: boolean): boolean; + /** + * Adds the current editor state to the undo/redo history. + */ + SaveToUndoHistory(): void; + /** + * Returns the selection in the ASPxHtmlEditor. + */ + GetSelection(): ASPxClientHtmlEditorSelection; + /** + * Restores the selection within the ASPxHtmlEditor. + */ + RestoreSelection(): boolean; + /** + * Sets the value of the combo box within the HtmlEditor on the client side. + * @param commandName A string value that identifies the combo box's command name within the HtmlEditor's control collection. + * @param value A string value that specifies the combo box's new value. + */ + SetToolbarComboBoxValue(commandName: string, value: string): void; + /** + * Sets the value of the dropdown item picker in the HtmlEditor on the client side. + * @param commandName A string value that identifies the dropdown item picker by its command name. This value is contained in the CommandName property. + * @param value A string value that specifies the dropdown item picker's new value, i.e., the ToolbarItemPickerItem object. + */ + SetToolbarDropDownItemPickerValue(commandName: string, value: string): void; + /** + * Specifies the visibility of a ribbon context tab category specified by its name. + * @param categoryName A Name property value of the required category. + * @param active true to make a category visible; false to make it hidden. + */ + SetRibbonContextTabCategoryVisible(categoryName: string, active: string): void; + /** + * Provides access to an object implementing the HtmlEditor's ribbon UI. + */ + GetRibbon(): ASPxClientRibbon; + /** + * Gets a value that indicates whether the editor's value passes validation. + */ + GetIsValid(): boolean; + /** + * Gets the error text to be displayed within the editor's error frame if the editor's validation fails. + */ + GetErrorText(): string; + /** + * Sets a value that specifies whether the editor's value passes validation. + * @param isValid true if the editor's value passes validation; otherwise, false. + */ + SetIsValid(isValid: boolean): void; + /** + * Sets the error text to be displayed within the editor's error frame if the editor's validation fails. + * @param errorText A string value representing the error text. + */ + SetErrorText(errorText: string): void; + /** + * Performs validation of the editor's content. + */ + Validate(): void; + /** + * Set an active tab specified by its name. + * @param name A string value that is the name of the tab. + */ + SetActiveTabByName(name: string): void; + /** + * Returns the name of the active HTML editor tab. + */ + GetActiveTabName(): string; + /** + * Reconnect the control to an external ribbon. + */ + ReconnectToExternalRibbon(): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientDataCallback object that represents the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; +} +/** + * A selection in the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorSelection { + /** + * Returns a DOM element that relates to the current selection. + */ + GetSelectedElement(): Object; + /** + * Returns the HTML markup specifying the currently selected ASPxHtmlEditor content. + */ + GetHtml(): string; + /** + * Returns the text within the currently selected ASPxHtmlEditor content. + */ + GetText(): string; + /** + * Returns an array of the currently selected elements. + */ + GetElements(): Object[]; + /** + * Sets the new HTML markup in place of the currently selected within ASPxHtmlEditor content. + * @param html A string value specifying the new HTML markup. + * @param addToHistory true to add this operation to the history; otherwise, false. + */ + SetHtml(html: string, addToHistory: boolean): void; +} +/** + * A client-side equivalent of the ASPxPivotGrid control. + */ +interface ASPxClientPivotGrid extends ASPxClientControl { + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientPivotGrid. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after a callback that has been processed on the server returns back to the client. + */ + AfterCallback: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Fires before a callback is sent to the server for server-side processing. + */ + BeforeCallback: ASPxClientEvent>; + /** + * Fires on the client side after the customization form's visible state has been changed. + */ + CustomizationFieldsVisibleChanged: ASPxClientEvent>; + /** + * Occurs when a cell is clicked. + */ + CellClick: ASPxClientEvent>; + /** + * Occurs when a cell is double clicked. + */ + CellDblClick: ASPxClientEvent>; + /** + * Occurs when a custom menu item has been clicked. + */ + PopupMenuItemClick: ASPxClientEvent>; + /** + * Indicates whether the Defer Layout Update check box is enabled. + */ + IsDeferUpdatesChecked(): boolean; + /** + * Indicates whether the Filter Editor (Prefilter) is visible. + */ + IsPrefilterVisible(): boolean; + /** + * Shows the Filter Editor. + */ + ShowPrefilter(): void; + /** + * Hides the Filter Editor. + */ + HidePrefilter(): void; + /** + * Clears the filter expression applied using the Prefilter (Filter Editor). + */ + ClearPrefilter(): void; + /** + * Enables or disables the current filter applied by the Filter Editor (Prefilter). + */ + ChangePrefilterEnabled(): void; + /** + * Returns a value that specifies whether the customization form is visible. + */ + GetCustomizationFieldsVisibility(): boolean; + /** + * Specifies the visibility of the customization form. + * @param value true to display the customization form; false to hide the customization form. + */ + SetCustomizationFieldsVisibility(value: boolean): void; + /** + * Switches the customization form's visible state. + */ + ChangeCustomizationFieldsVisibility(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A method that will handle the CellDblClick event. + */ +interface ASPxClientClickEventHandler { + /** + * A method that will handle the CellDblClick event. + * @param source The event source. + * @param e An ASPxClientClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientClickEventArgs): void; +} +/** + * Provides data for the CellDblClick client events. + */ +interface ASPxClientClickEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the parameters associated with the CellDblClick events. + * Value: An object that contains parameters associated with the CellDblClick events. + */ + HtmlEvent: Object; + /** + * Gets the processed cell's value. + * Value: An object that represents the processed cell's value. + */ + Value: Object; + /** + * Gets the index of a column that owns the processed cell. + * Value: An integer value that identifies a column. + */ + ColumnIndex: number; + /** + * Gets the index of a row that owns the processed cell. + * Value: An integer value that identifies a row. + */ + RowIndex: number; + /** + * Gets a column field value. + * Value: An object that represents a column field value. + */ + ColumnValue: Object; + /** + * Gets a row field value. + * Value: An object that represents a row field value. + */ + RowValue: Object; + /** + * Gets a column field name. + * Value: A String value that represents a column field name. + */ + ColumnFieldName: string; + /** + * Gets a row field name. + * Value: A String value that represents a row field name. + */ + RowFieldName: string; + /** + * Gets a column value type. + * Value: A String value that represents a column value type. + */ + ColumnValueType: string; + /** + * Gets a row value type. + * Value: A String value that represents a row value type. + */ + RowValueType: string; + /** + * Gets the index of the data field which corresponds to the clicked summary value. + * Value: An integer value that identifies the data field. + */ + DataIndex: number; +} +/** + * A method that will handle the PopupMenuItemClick event. + */ +interface ASPxClientPivotMenuItemClickEventHandler { + /** + * A method that will handle the PopupMenuItemClick event. + * @param source The event source. + * @param e An ASPxClientPivotMenuItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPivotMenuItemClickEventArgs): void; +} +/** + * Provides data for the PopupMenuItemClick event. + */ +interface ASPxClientPivotMenuItemClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the context menu's type. + * Value: A PivotGridPopupMenuType enumeration value that identifies the context menu. + */ + MenuType: string; + /** + * Gets the name of the menu item currently being clicked. + * Value: A String value that identifies the clicked item by its name. + */ + MenuItemName: string; + /** + * Gets the field's unique indentifier. + * Value: A string which specifies the field's unique indentifier. + */ + FieldID: string; + /** + * Gets the index of the field value for which the popup menu has been invoked. + * Value: An integer value that identifies the field value. + */ + FieldValueIndex: number; +} +/** + * A client-side equivalent of the ASPxPivotCustomizationControl control. + */ +interface ASPxClientPivotCustomization extends ASPxClientControl { + /** + * Returns an HTML element that represents the root of the control's hierarchy. + */ + GetMainContainer(): Object; + /** + * Returns a client-side equivalent of the owner Pivot Grid Control. + */ + GetPivotGrid(): ASPxClientPivotGrid; + /** + * Specifies the Customization Control's height. + * @param value An integer value that specifies the Customization Control's height. + */ + SetHeight(value: number): void; + /** + * Specifies the Customization Control's width. + * @param value An integer value that specifies the Customization Control's width. + */ + SetWidth(value: number): void; + /** + * Recalculates the Customization Control height. + */ + UpdateHeight(): void; + /** + * Specifies the Customization Control's layout. + * @param layout A string that specifies the Customization Control's layout. + */ + SetLayout(layout: string): void; +} +/** + * A method that will handle the CustomCommandExecuted event. + */ +interface ASPxClientRichEditCustomCommandExecutedEventHandler { + /** + * A method that will handle the CustomCommandExecuted event. + * @param source An object representing the event source. Identifies the RichEdit that raised the event. + * @param e A ASPxClientRichEditCustomCommandExecutedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditCustomCommandExecutedEventArgs): void; +} +/** + * Provides data for the CustomCommandExecuted event. + */ +interface ASPxClientRichEditCustomCommandExecutedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: Object; +} +/** + * A method that will handle the HyperlinkClick event. + */ +interface ASPxClientRichEditHyperlinkClickEventHandler { + /** + * A method that will handle the HyperlinkClick event. + * @param source The event source. + * @param e An ASPxClientRichEditHyperlinkClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditHyperlinkClickEventArgs): void; +} +/** + * Provides data for the HyperlinkClick event. + */ +interface ASPxClientRichEditHyperlinkClickEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether the event is handled manually, so no default processing is required. + * Value: true if the event is handled and no default processing is required; otherwise false. + */ + handled: boolean; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; + /** + * Gets a value identifying the clicked hyperlink type. + * Value: One of the values. + */ + hyperlinkType: ASPxClientOfficeDocumentLinkType; + /** + * Gets the clicked link's URI. + * Value: A sting value specifying the link's URI. + */ + targetUri: string; +} +/** + * A client-side equivalent of the ASPxRichEdit object. + */ +interface ASPxClientRichEdit extends ASPxClientControl { + /** + * Provides access to document structural elements. + * Value: A object that lists RichEdit's document structural elements. + */ + document: RichEditDocument; + /** + * Provides access to RichEdit's client-side commands. + * Value: A object that lists RichEdit's client-side commands. + */ + commands: RichEditCommands; + /** + * Provides access to the client methods that changes the selection. + * Value: A object that lists methods to work with the selection. + */ + selection: RichEditSelection; + unitConverter: RichEditUnitConverter; + /** + * Occurs after a custom command has been executed on the client side. + */ + CustomCommandExecuted: ASPxClientEvent>; + /** + * Fires after a client change has been made to the document and the client-server synchronization starts to apply the change on the server. + */ + BeginSynchronization: ASPxClientEvent>; + /** + * Fires after a document change has been applied to the server and server and client document models have been synchronized. + */ + EndSynchronization: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the RichEdit. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires if any change is made to the RichEdit's document on the client. + */ + DocumentChanged: ASPxClientEvent>; + /** + * Occurs when a hyperlink is clicked within the document. + */ + HyperlinkClick: ASPxClientEvent>; + /** + * Occurs when the selection is changed within the document. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Enables you to switch the full-screen mode of the Rich Text Editor. + * @param fullscreen true to activate full-screen mode; false to deactivate full-screen mode. + */ + SetFullscreenMode(fullscreen: boolean): void; + /** + * Provides access to an object implementing the RichEdit's ribbon UI. + */ + GetRibbon(): ASPxClientRibbon; + /** + * Sets input focus to the RichEdit. + */ + Focus(): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Indicates whether any unsaved changes are contained in the current document. + */ + HasUnsavedChanges(): boolean; + /** + * Reconnects the RichEdit to an external ribbon. + */ + ReconnectToExternalRibbon(): void; +} +/** + * Contains a set of the available client commands. + */ +interface RichEditCommands { + /** + * Gets a command to create a new empty document. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileNew: FileNewCommand; + /** + * Gets a command to open the file, specifying its path. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileOpen: FileOpenCommand; + /** + * Gets a command to invoke the File Open dialog allowing one to select and load a document file into RichEdit. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileOpenDialog: FileOpenDialogCommand; + /** + * Gets a command to save the document to a file. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileSave: FileSaveCommand; + /** + * Gets a command to download the document file, specifying its extension. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileDownload: FileDownloadCommand; + /** + * Gets a command to invoke the Save As dialog that prompts for a file name and saves the current document in a file with the specified path. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileSaveAs: FileSaveAsCommand; + fileSaveAsDialog: FileSaveAsDialogCommand; + /** + * Gets a command to invoke a browser-specific Print dialog allowing one to print the current document. + * Value: A object that provides methods for executing the command and checking its state. + */ + filePrint: FilePrintCommand; + /** + * Gets a command to cancel changes caused by the previous command. + * Value: A object that provides methods for executing the command and checking its state. + */ + undo: UndoCommand; + /** + * Gets a command to reverse actions of the previous undo command. + * Value: A object that provides methods for executing the command and checking its state. + */ + redo: RedoCommand; + /** + * Gets a command to copy the selected text and place it to the clipboard. + * Value: A object that provides methods for executing the command and checking its state. + */ + copy: CopyCommand; + /** + * Gets a command to paste the text from the clipboard over the selection. + * Value: A object that provides methods for executing the command and checking its state. + */ + paste: PasteCommand; + /** + * Gets a command to cut the selected text and place it to the clipboard. + * Value: A object that provides methods for executing the command and checking its state. + */ + cut: CutCommand; + /** + * Gets a command to change the font name of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontName: ChangeFontNameCommand; + /** + * Gets a command to change the font size of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontSize: ChangeFontSizeCommand; + /** + * Gets a command to increase the font size of characters in a selected range to the closest larger predefined value. + * Value: A object that provides methods for executing the command and checking its state. + */ + increaseFontSize: IncreaseFontSizeCommand; + /** + * Gets a command to decrease the selected range's font size to the closest smaller predefined value. + * Value: A object that provides methods for executing the command and checking its state. + */ + decreaseFontSize: DecreaseFontSizeCommand; + /** + * Gets a command to convert selected text to upper case. + * Value: A object that provides methods for executing the command and checking its state. + */ + makeTextUpperCase: MakeTextUpperCaseCommand; + /** + * Gets a command to convert selected text to lower case. + * Value: A object that provides methods for executing the command and checking its state. + */ + makeTextLowerCase: MakeTextLowerCaseCommand; + /** + * Gets a command to capitalize each word in the selected sentence. + * Value: A object that provides methods for executing the command and checking its state. + */ + capitalizeEachWordTextCase: CapitalizeEachWordTextCaseCommand; + /** + * Gets a command to toggle case for each character - upper case becomes lower, lower case becomes upper. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTextCase: ToggleTextCaseCommand; + /** + * Gets a command to change the bold formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontBold: ChangeFontBoldCommand; + /** + * Gets a command to change the italic formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontItalic: ChangeFontItalicCommand; + /** + * Gets a command to change the underline formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontUnderline: ChangeFontUnderlineCommand; + /** + * Gets a command to change the strikeout formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontStrikeout: ChangeFontStrikeoutCommand; + /** + * Gets a command to change the superscript formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontSuperscript: ChangeFontSuperscriptCommand; + /** + * Gets a command to change the subscript formatting of characters in the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontSubscript: ChangeFontSubscriptCommand; + /** + * Gets a command to change the font color of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontForeColor: ChangeFontForeColorCommand; + /** + * Gets a command to change the background color of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontBackColor: ChangeFontBackColorCommand; + /** + * Gets a command to reset the selected text's formatting to default. + * Value: A object that provides methods for executing the command and checking its state. + */ + clearFormatting: ClearFormattingCommand; + /** + * Gets a command to change the selected range's style. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeStyle: ChangeStyleCommand; + /** + * Gets a command to toggle between the bulleted paragraph and normal text. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleBulletedList: ToggleBulletedListCommand; + /** + * Gets a command to toggle between the numbered paragraph and normal text. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleNumberingList: ToggleNumberingListCommand; + /** + * Gets a command to toggle between the multilevel list style and normal text. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleMultilevelList: ToggleMultilevelListCommand; + /** + * Gets a command to increment the indent level of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + increaseIndent: IncreaseIndentCommand; + /** + * Gets a command to decrement the indent level of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + decreaseIndent: DecreaseIndentCommand; + /** + * Gets a command to toggle hidden symbol visibility. + * Value: A object that provides methods for executing the command and checking its state. + */ + showHiddenSymbols: ShowHiddenSymbolsCommand; + /** + * Gets a command to toggle left paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentLeft: ToggleParagraphAlignmentLeftCommand; + /** + * Gets a command to toggle centered paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentCenter: ToggleParagraphAlignmentCenterCommand; + /** + * Gets a command to toggle right paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentRight: ToggleParagraphAlignmentRightCommand; + /** + * Gets a command to toggle justified paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentJustify: ToggleParagraphAlignmentJustifyCommand; + /** + * Gets a command to format a current paragraph with single line spacing. + * Value: A object that provides methods for executing the command and checking its state. + */ + setSingleParagraphSpacing: SetSingleParagraphSpacingCommand; + /** + * Gets a command to format a current paragraph with one and a half line spacing. + * Value: A object that provides methods for executing the command and checking its state. + */ + setSesquialteralParagraphSpacing: SetSesquialteralParagraphSpacingCommand; + /** + * Gets a command to format a selected paragraph with double line spacing. + * Value: A object that provides methods for executing the command and checking its state. + */ + setDoubleParagraphSpacing: SetDoubleParagraphSpacingCommand; + /** + * Gets a command to add spacing before a paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + addSpacingBeforeParagraph: AddSpacingBeforeParagraphCommand; + /** + * Gets a command to add spacing after a paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + addSpacingAfterParagraph: AddSpacingAfterParagraphCommand; + /** + * Gets a command to remove spacing before the selected paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeSpacingBeforeParagraph: RemoveSpacingBeforeParagraphCommand; + /** + * Gets a command to remove spacing after the selected paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeSpacingAfterParagraph: RemoveSpacingAfterParagraphCommand; + /** + * Gets a command to change the background color of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeParagraphBackColor: ChangeParagraphBackColorCommand; + /** + * Gets a command to invoke the Font dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openFontFormattingDialog: OpenFontFormattingDialogCommand; + /** + * Gets a command to change the font formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontFormatting: ChangeFontFormattingCommand; + /** + * Gets a command to invoke the Indents And Spacing tab of the Paragraph dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openParagraphFormattingDialog: OpenParagraphFormattingDialogCommand; + /** + * Gets a command to change the formatting of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeParagraphFormatting: ChangeParagraphFormattingCommand; + /** + * Gets a command to insert a page break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertPageBreak: InsertPageBreakCommand; + /** + * Gets a command to invoke the Insert Table dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertTableDialog: OpenInsertTableDialogCommand; + /** + * Gets a command to invoke the Insert Table dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTable: InsertTableCommand; + /** + * Gets a command to invoke the Insert Image dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertPictureDialog: OpenInsertPictureDialogCommand; + /** + * Gets a command to insert a picture from a file. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertPicture: InsertPictureCommand; + /** + * Gets a command to invoke the Bookmark dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertBookmarkDialog: OpenInsertBookmarkDialogCommand; + /** + * Gets a command to insert a new bookmark that references the current selection. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertBookmark: InsertBookmarkCommand; + /** + * A command to delete a specific bookmark. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteBookmark: DeleteBookmarkCommand; + goToBookmark: GoToBookmarkCommand; + /** + * Gets a command to invoke the Hyperlink dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertHyperlinkDialog: OpenInsertHyperlinkDialogCommand; + /** + * Gets a command to insert a hyperlink at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertHyperlink: InsertHyperlinkCommand; + /** + * Gets a command to delete the selected hyperlink. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteHyperlink: DeleteHyperlinkCommand; + /** + * Gets a command to delete all hyperlinks in the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteHyperlinks: DeleteHyperlinksCommand; + /** + * Gets a command to navigate to the document bookmark or URI (uniform resource identifier) specified for the hyperlink. + * Value: A object that provides methods for executing the command and checking its state. + */ + openHyperlink: OpenHyperlinkCommand; + /** + * Gets a command to invoke the Symbols dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertSymbolDialog: OpenInsertSymbolDialogCommand; + /** + * Gets a command to insert a character into a document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSymbol: InsertSymbolCommand; + /** + * Gets a command to change page margin settings. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageMargins: ChangePageMarginsCommand; + /** + * Gets a command to invoke the Margins tab of the Page Setup dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openPageMarginsDialog: OpenPageMarginsDialogCommand; + /** + * Gets a command to change the page orientation. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageOrientation: ChangePageOrientationCommand; + setPageSizeDialog: SetPageSizeDialogCommand; + /** + * Gets a command to invoke the Paper tab of the Page Setup dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openPagePaperSizeDialog: OpenPagePaperSizeDialogCommand; + /** + * Gets a command to change the page size. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageSize: ChangePageSizeCommand; + /** + * Gets a command to change the number of section columns having the same width. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeSectionEqualColumnCount: ChangeSectionEqualColumnCountCommand; + /** + * Gets a command to invoke the Columns dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openSectionColumnsDialog: OpenSectionColumnsDialogCommand; + /** + * Gets a command to change the settings of individual section columns. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeSectionColumns: ChangeSectionColumnsCommand; + /** + * Gets a command to insert a column break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertColumnBreak: InsertColumnBreakCommand; + /** + * Gets a command to insert a section break and starts a new section on the next page. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSectionBreakNextPage: InsertSectionBreakNextPageCommand; + /** + * Gets a command to insert a section break and starts a new section on the next even-numbered page. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSectionBreakEvenPage: InsertSectionBreakEvenPageCommand; + /** + * Gets a command to insert a section break and starts a new section on the next odd-numbered page. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSectionBreakOddPage: InsertSectionBreakOddPageCommand; + /** + * Gets a command to set the background color of the page. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageColor: ChangePageColorCommand; + /** + * Gets a command to toggle the horizontal ruler's visibility. + * Value: A object that provides methods for executing the command and checking its state. + */ + showHorizontalRuler: ShowHorizontalRulerCommand; + /** + * Gets a command to toggle the fullscreen mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + setFullscreen: SetFullscreenCommand; + /** + * Gets a command to invoke the Bulleted and Numbering dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openNumberingListDialog: OpenNumberingListDialogCommand; + /** + * Gets a command to insert a paragraph break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertParagraph: InsertParagraphCommand; + /** + * Gets a command to insert text at the current position in a document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertText: InsertTextCommand; + /** + * Gets a command to delete the text in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + delete: DeleteCommand; + /** + * Gets a command to move the cursor backwards and erase the character in that space. + * Value: A object that provides methods for executing the command and checking its state. + */ + backspace: BackspaceCommand; + /** + * Gets a command to insert the line break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertLineBreak: InsertLineBreakCommand; + /** + * Gets a command to scale pictures in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePictureScale: ChangePictureScaleCommand; + /** + * Gets a command to increment the left indentation of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + incrementParagraphLeftIndent: IncrementParagraphLeftIndentCommand; + /** + * Gets a command to decrement the paragraph's left indent position. + * Value: A object that provides methods for executing the command and checking its state. + */ + decrementParagraphLeftIndent: DecrementParagraphLeftIndentCommand; + /** + * Gets a command to move the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + moveContent: MoveContentCommand; + /** + * Gets a command to copy the selected text and place it to the specified position. + * Value: A object that provides methods for executing the command and checking its state. + */ + copyContent: CopyContentCommand; + /** + * Gets a command to insert a tab character at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTab: InsertTabCommand; + /** + * Gets a command to invoke the Tabs dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openTabsDialog: OpenTabsDialogCommand; + /** + * Gets a command to change paragraph tab stops. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTabs: ChangeTabsCommand; + /** + * Gets a command to invoke the Customize Numbered List dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openCustomNumberingListDialog: OpenCustomNumberingListDialogCommand; + /** + * Gets a command to customize the numbered list parameters. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeCustomNumberingList: ChangeCustomNumberingListCommand; + /** + * Gets a command to restart the numbering list. + * Value: A object that provides methods for executing the command and checking its state. + */ + restartNumberingList: RestartNumberingListCommand; + /** + * Gets a command to increment the indent level of paragraphs in a selected numbered list. + * Value: A object that provides methods for executing the command and checking its state. + */ + incrementNumberingIndent: IncrementNumberingIndentCommand; + /** + * Gets a command to decrement the indent level of paragraphs in a selected numbered list. + * Value: A object that provides methods for executing the command and checking its state. + */ + decrementNumberingIndent: DecrementNumberingIndentCommand; + /** + * Gets a command to create an empty field in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + createField: CreateFieldCommand; + /** + * Gets a command to update the field's result. + * Value: A object that provides methods for executing the command and checking its state. + */ + updateField: UpdateFieldCommand; + /** + * Gets a command to display the selected field's codes. + * Value: A object that provides methods for executing the command and checking its state. + */ + showFieldCodes: ShowFieldCodesCommand; + /** + * Get a command to display all field codes in place of the fields in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + showAllFieldCodes: ShowAllFieldCodesCommand; + /** + * Gets a command to continue the list's numbering. + * Value: A object that provides methods for executing the command and checking its state. + */ + continueNumberingList: ContinueNumberingListCommand; + /** + * Gets a command to insert numeration to a paragraph making it a numbering list item. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertNumeration: InsertNumerationCommand; + /** + * Gets a command to remove the selected numeration. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeNumeration: RemoveNumerationCommand; + /** + * Gets a command to update all fields in the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + updateAllFields: UpdateAllFieldsCommand; + /** + * Gets a command to insert a DATE field displaying the current date. + * Value: A object that provides methods for executing the command and checking its state. + */ + createDateField: CreateDateFieldCommand; + /** + * Gets a command to insert a TIME field displaying the current time. + * Value: A object that provides methods for executing the command and checking its state. + */ + createTimeField: CreateTimeFieldCommand; + /** + * A command to insert a PAGE field displaying the current page number. + * Value: A object that provides methods for executing the command and checking its state. + */ + createPageField: CreatePageFieldCommand; + /** + * Gets a command to convert the text of all selected sentences to sentence case. + * Value: A object that provides methods for executing the command and checking its state. + */ + makeTextSentenceCase: MakeTextSentenceCaseCommand; + /** + * Gets a command to switch the text case at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + switchTextCase: SwitchTextCaseCommand; + /** + * Gets a command to navigate to the first data record. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToFirstDataRecord: GoToFirstDataRecordCommand; + /** + * Gets a command to navigate to the previous data record of the bound data source. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToPreviousDataRecord: GoToPreviousDataRecordCommand; + /** + * Gets a command to navigate to the next data record of the bound data source. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToNextDataRecord: GoToNextDataRecordCommand; + /** + * Gets a command to navigate to the next data record. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToDataRecord: GoToDataRecordCommand; + /** + * Gets a command to navigate to the last data record of the bound data source. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToLastDataRecord: GoToLastDataRecordCommand; + /** + * Gets a command to display or hide actual data in MERGEFIELD fields. + * Value: A object that provides methods for executing the command and checking its state. + */ + showMergedData: ShowMergedDataCommand; + /** + * Gets a command to invoke the Insert Merge Field dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + mergeFieldDialog: MergeFieldDialogCommand; + /** + * Gets a command to insert a MERGEFIELD field (with a data source column name) at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + createMergeField: CreateMergeFieldCommand; + /** + * Gets a command to invoke the Export Range dialog window to start a mail merge. + * Value: A object that provides methods for executing the command and checking its state. + */ + mailMergeDialog: MailMergeDialogCommand; + /** + * Gets a command to perform a mail merge and download the merged document. + * Value: A object that provides methods for executing the command and checking its state. + */ + mailMergeAndDownload: MailMergeAndDownloadCommand; + /** + * Gets a command to perform a mail merge and save the merged document to the server. + * Value: A object that provides methods for executing the command and checking its state. + */ + mailMergeAndSaveAs: MailMergeAndSaveAsCommand; + /** + * Gets a command to activate the page header and begin editing. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertHeader: InsertHeaderCommand; + /** + * Gets a command to activate the page footer and begin editing. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertFooter: InsertFooterCommand; + /** + * Gets a command to link a header/footer to the previous section, so it has the same content. + * Value: A object that provides methods for executing the command and checking its state. + */ + linkHeaderFooterToPrevious: LinkHeaderFooterToPreviousCommand; + /** + * Gets a command to navigate to the page footer from the page header in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToFooter: GoToFooterCommand; + /** + * Gets a command to navigate to the page header from the page footer in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToHeader: GoToHeaderCommand; + /** + * Gets a command to navigate to the next page header or footer in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToNextHeaderFooter: GoToNextHeaderFooterCommand; + /** + * Gets a command to navigate to the previous page header or footer in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToPreviousHeaderFooter: GoToPreviousHeaderFooterCommand; + /** + * Gets a command to change the header/footer edit mode, so it allows creation of a different header or footer for the first page of a document or section. + * Value: A object that provides methods for executing the command and checking its state. + */ + setDifferentFirstPageHeaderFooter: SetDifferentFirstPageHeaderFooterCommand; + /** + * Gets a command to change the header/footer edit mode so it allows creation of a different header or footer for odd and even pages of a document or section. + * Value: A object that provides methods for executing the command and checking its state. + */ + setDifferentOddAndEvenPagesHeaderFooter: SetDifferentOddAndEvenPagesHeaderFooterCommand; + /** + * Gets a command to finish header/footer editing. + * Value: A object that provides methods for executing the command and checking its state. + */ + closeHeaderFooter: CloseHeaderFooterCommand; + /** + * Gets a command to insert a NUMPAGES field displaying the total number of pages. + * Value: A object that provides methods for executing the command and checking its state. + */ + createPageCountField: CreatePageCountFieldCommand; + /** + * Gets a command to invoke the Table tab of the Table Properties dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openTableFormattingDialog: OpenTableFormattingDialogCommand; + /** + * Gets a command to change the selected table's formatting. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableFormatting: ChangeTableFormattingCommand; + /** + * Gets a command to change the selected table rows' preferred height. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableRowPreferredHeight: ChangeTableRowPreferredHeightCommand; + /** + * Gets a command to change the preferred cell width of the selected table rows. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableCellPreferredWidth: ChangeTableCellPreferredWidthCommand; + toggleTableCellInsideBorders: ToggleTableCellInsideBordersCommand; + /** + * Gets a command to change the selected table columns' preferred width. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableColumnPreferredWidth: ChangeTableColumnPreferredWidthCommand; + /** + * Gets a command to change the cell formatting of the selected table elements. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableCellFormatting: ChangeTableCellFormattingCommand; + /** + * Gets a command to insert a table column to the left of the current position in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableColumnToTheLeft: InsertTableColumnToTheLeftCommand; + /** + * Gets a command to insert a table column to the right of the current position in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableColumnToTheRight: InsertTableColumnToTheRightCommand; + /** + * Gets a command to insert a row in the table below the selected row. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableRowBelow: InsertTableRowBelowCommand; + /** + * Gets a command to insert a row in the table above the selected row. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableRowAbove: InsertTableRowAboveCommand; + /** + * Gets a command to delete the selected rows in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableRows: DeleteTableRowsCommand; + /** + * Gets a command to delete the selected columns in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableColumns: DeleteTableColumnsCommand; + /** + * Gets a command to insert table cells with a horizontal shift into the selected table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableCellWithShiftToTheLeft: InsertTableCellWithShiftToTheLeftCommand; + /** + * Gets a command to delete the selected table cells with a horizontal shift. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableCellsWithShiftHorizontally: DeleteTableCellsWithShiftHorizontallyCommand; + /** + * Gets a command to delete the selected table cells with a vertical shift. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableCellsWithShiftVertically: DeleteTableCellsWithShiftVerticallyCommand; + /** + * Gets a command to delete the selected table. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTable: DeleteTableCommand; + /** + * Gets a command to invoke the Insert Cells dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableCellsDialog: InsertTableCellsDialogCommand; + /** + * Gets a command to invoke the Delete Cells dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableCellsDialog: DeleteTableCellsDialogCommand; + /** + * Gets a command to merge the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + mergeTableCells: MergeTableCellsCommand; + /** + * Gets a command to invoke the Split Cells dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + splitTableCellsDialog: SplitTableCellsDialogCommand; + /** + * Gets a command to split the selected table cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + splitTableCells: SplitTableCellsCommand; + /** + * Gets a command to insert table cells with a vertical shift into the selected table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableCellsWithShiftToTheVertically: InsertTableCellsWithShiftToTheVerticallyCommand; + /** + * Gets a command to invoke the Borders tab of the Borders and Shading dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openTableBordersAndShadingDialog: OpenTableBordersAndShadingDialogCommand; + /** + * Gets a command to change the selected table's borders and shading. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableBordersAndShading: ChangeTableBordersAndShadingCommand; + /** + * Gets a command to apply top-left alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignTopLeft: ToggleTableCellAlignTopLeftCommand; + /** + * Gets a command to apply top-center alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignTopCenter: ToggleTableCellAlignTopCenterCommand; + /** + * Gets a command to apply top-right alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignTopRight: ToggleTableCellAlignTopRightCommand; + /** + * Gets a command to apply middle-left alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignMiddleLeft: ToggleTableCellAlignMiddleLeftCommand; + /** + * Gets a command to apply middle-center alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignMiddleCenter: ToggleTableCellAlignMiddleCenterCommand; + /** + * Gets a command to apply middle-right alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignMiddleRight: ToggleTableCellAlignMiddleRightCommand; + /** + * Gets a command to apply bottom-left alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignBottomLeft: ToggleTableCellAlignBottomLeftCommand; + /** + * Gets a command to apply bottom-center alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignBottomCenter: ToggleTableCellAlignBottomCenterCommand; + /** + * Gets a command to apply bottom-right alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignBottomRight: ToggleTableCellAlignBottomRightCommand; + /** + * Gets a command to change the selected table's style. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableStyle: ChangeTableStyleCommand; + /** + * Gets a command to toggle top borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellTopBorder: ToggleTableCellTopBorderCommand; + /** + * Gets a command to toggle right borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellRightBorder: ToggleTableCellRightBorderCommand; + /** + * Gets a command to toggle bottom borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellBottomBorder: ToggleTableCellBottomBorderCommand; + /** + * Gets a command to toggle left borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellLeftBorder: ToggleTableCellLeftBorderCommand; + /** + * Gets a command to remove the borders of the selected table cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeTableCellBorders: RemoveTableCellBordersCommand; + /** + * Gets a command to toggle all borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAllBorders: ToggleTableCellAllBordersCommand; + /** + * Gets a command to toggle inner horizontal borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellInsideHorizontalBorders: ToggleTableCellInsideHorizontalBordersCommand; + /** + * Gets a command to toggle inner vertical borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellInsideVerticalBorders: ToggleTableCellInsideVerticalBordersCommand; + /** + * Gets a command to toggle outer borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellOutsideBorders: ToggleTableCellOutsideBordersCommand; + /** + * Gets a command to change the selected table's style options. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableLook: ChangeTableLookCommand; + /** + * Gets a command to change the repository item's table border style. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableBorderRepositoryItem: ChangeTableBorderRepositoryItemCommand; + /** + * Gets a command to change cell shading in the selected table elements. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableCellShading: ChangeTableCellShadingCommand; + /** + * Gets a command to toggle the display of grid lines for a table with no borders applied - on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + showTableGridLines: ShowTableGridLinesCommand; + /** + * Gets a command to invoke the Search Panel allowing end-users to search text and navigate through search results. + * Value: A object that provides methods for executing the command and checking its state. + */ + openFindPanel: OpenFindPanelCommand; + /** + * Gets a command to invoke the Find and Replace dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openFindAndReplaceDialog: OpenFindAndReplaceDialogCommand; + /** + * Gets a command to find all matches of the specified text in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + findAll: FindAllCommand; + /** + * Gets a command to hide the results of the search. + * Value: A object that provides methods for executing the command and checking its state. + */ + hideFindResults: HideFindResultsCommand; + /** + * Gets a command to search for a specific text and replace all matches in the document with the specified string. + * Value: A object that provides methods for executing the command and checking its state. + */ + replaceAll: ReplaceAllCommand; + /** + * Gets a command to search for a specific text and replace the next match in the document with the specified string. + * Value: A object that provides methods for executing the command and checking its state. + */ + replaceNext: ReplaceNextCommand; + /** + * Gets a command to invoke the Spelling dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openSpellingDialog: OpenSpellingDialogCommand; + assignShortcut: AssignShortcutCommand; +} +/** + * Serves as a base for objects that implement different client command functionalities. + */ +interface CommandBase { +} +/** + * Serves as a base for commands with a simple common command state. + */ +interface CommandWithSimpleStateBase extends CommandBase { + /** + * Gets information about the command state. + */ + getState(): SimpleCommandState; +} +/** + * Serves as a base for commands with the Boolean state. + */ +interface CommandWithBooleanStateBase extends CommandBase { + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Defines a simple state common to most of the client commands. + */ +interface SimpleCommandState { + /** + * Gets a value indicating whether the command's UI element is enabled. + * Value: true, if the command's related UI element is enabled; otherwise, false. + */ + enabled: boolean; + /** + * Gets a value indicating whether the command's UI element is visible. + * Value: true, if the command's related UI element is visible; otherwise, false. + */ + visible: boolean; +} +/** + * Defines the state of a command. + */ +interface CommandState extends SimpleCommandState { + /** + * Gets the command state value. + * Value: A T object specifying the command state value. + */ + value: T; +} +/** + * Contains a set properties providing the current information about certain document structural elements. + */ +interface RichEditDocument { + /** + * Provides the information about the active sub-document. + * Value: A object storing information about the essential document functionality. + */ + activeSubDocument: SubDocument; + /** + * Provides information about sections in the current document. + * Value: An array of Section objects storing information about sections. + */ + sectionsInfo: Section[]; + /** + * Provides information about paragraph styles in the current document. + * Value: An array of ParagraphStyle objects storing information about paragraph styles. + */ + paragraphStylesInfo: ParagraphStyle[]; + /** + * Provides information about character styles in the current document. + * Value: An array of CharacterStyle objects storing information about character styles. + */ + characterStylesInfo: CharacterStyle[]; + /** + * Provides information about numbered paragraphs in the document. + * Value: An array of AbstractNumberingList objects storing the information about numbered paragraphs. + */ + abstractNumberingListsInfo: AbstractNumberingList[]; + /** + * Provides information about table styles in the current document. + * Value: An array of TableStyle objects storing information about table styles. + */ + tableStylesInfo: TableStyle[]; + spellingInfo: SpellingInfo; +} +/** + * An abstract numbering list definition that defines the appearance and behavior of numbered paragraphs in a document. + */ +interface AbstractNumberingList { + deleted: boolean; +} +/** + * Defines a paragraph in the document. + */ +interface Paragraph { + /** + * Gets the paragraph's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + /** + * Gets the paragraph's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + interval: Interval; + /** + * Gets the name of the paragraph style applied to the current paragraph (see name). + * Value: A string value specifying the style name. + */ + styleName: string; + /** + * Gets the index of a list applied to the paragraph. + * Value: An integer that is the index of a list to which the paragraph belongs. + */ + listIndex: number; + /** + * Gets or sets the index of the list level applied to the current paragraph in the numbering list. + * Value: An integer that is the index of the list level of the current paragraph. + */ + listLevelIndex: number; +} +/** + * Defines a field in the document. + */ +interface Field { + /** + * Gets the field's start position in a document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the field length in a document. + * Value: An integer value specifying the field length. + */ + length: number; + codeInterval: Interval; + resultInterval: Interval; + interval: Interval; + /** + * Gets or sets a URI to navigate to when the hyperlink (represented by the current field) is activated. + * Value: A string representing an URI. + */ + hyperlinkUri: string; + /** + * Gets or sets the text for the tooltip displayed when the mouse hovers over a hyperlink field. + * Value: A string containing the tooltip text. + */ + hyperlinkTip: string; + /** + * Gets or sets the name of a bookmark (or a hyperlink) in the current document which shall be the target of the hyperlink field. + * Value: A string representing the bookmark's name. + */ + hyperlinkAnchor: string; + showCode: boolean; +} +/** + * Defines a bookmark in the document. + */ +interface Bookmark { + /** + * Gets the bookmark's start position in a document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the bookmark's length. + * Value: An integer value specifying the length of the bookmark. + */ + length: number; + interval: Interval; + /** + * Gets the name of a bookmark in the document. + * Value: A string that is the unique bookmark's name. + */ + name: string; +} +/** + * Defines a section in the document. + */ +interface Section { + /** + * Gets the section's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the section's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + interval: Interval; + /** + * Provides access to the section's headers. + * Value: An array of HeaderFooter objects storing information about the section's headers. + */ + headers: HeaderFooter[]; + /** + * Provides access to the section's footers. + * Value: An array of HeaderFooter objects storing information about the section's footers. + */ + footers: HeaderFooter[]; +} +/** + * Contains settings defining a header or footer in a document. + */ +interface HeaderFooter { + /** + * Gets the type of the header (footer). + * Value: One of the values. + */ + type: any; + /** + * Provides access to an object implementing the basic document functionality that is common to the header, footer and the main document body. + * Value: A object exposing the basic document functionality. + */ + subDocument: SubDocument; +} +interface InlinePictureInfo { + id: number; + position: number; + initialWidth: number; + initialHeight: number; + scaleX: number; + scaleY: number; + actualWidth: number; + actualHeight: number; +} +declare enum HeaderFooterType { + First=0, + Odd=1, + Primary=1, + Even=2 +} +interface RichEditFileInfo { + folderPath: string; + fileName: string; + documentFormat: any; +} +declare enum DocumentFormat { + Undefined=0, + PlainText=1, + Rtf=2, + Html=3, + OpenXml=4, + Mht=5, + WordML=6, + OpenDocument=7, + ePub=9, + Doc=10 +} +/** + * Contains a set of methods and properties to work with the document selection. + */ +interface RichEditSelection { + /** + * Gets or sets an array of document interval in the selection. + * Value: An array of Interval objects. + */ + intervals: Interval[]; + collapsed: boolean; + getIntervalMaxPosition(): number; + /** + * Moves the cursor to the next line. + */ + goToNextLine(): void; + /** + * Moves the cursor to the next line and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextLine(extendSelection: boolean): void; + /** + * Moves the cursor to the end of the line in which the cursor is located. + */ + goToLineEnd(): void; + /** + * Moves the cursor to the end of the line in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToLineEnd(extendSelection: boolean): void; + /** + * Moves the cursor to the start of the line in which the cursor is located. + */ + goToLineStart(): void; + /** + * Moves the cursor to the start of the line in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToLineStart(extendSelection: boolean): void; + /** + * Moves the cursor to the previous line. + */ + goToPreviousLine(): void; + /** + * Moves the cursor to the previous line and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPreviousLine(extendSelection: boolean): void; + /** + * Moves the cursor to the next character. + */ + goToNextCharacter(): void; + /** + * Moves the cursor to the next character and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextCharacter(extendSelection: boolean): void; + /** + * Moves the cursor to the previous character. + */ + goToPreviousCharacter(): void; + /** + * Moves the cursor to the previous character and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPreviousCharacter(extendSelection: boolean): void; + /** + * Selects the line in which the cursor is located. + */ + selectLine(): void; + /** + * Selects the line in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectLine(extendSelection: boolean): void; + /** + * Moves the cursor to the beginning of the next page. + */ + goToNextPage(): void; + /** + * Moves the cursor to the beginning of the next page and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextPage(extendSelection: boolean): void; + /** + * Moves the cursor to the beginning of the previous page. + */ + goToPreviousPage(): void; + /** + * Moves the cursor to the beginning of the previous page and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPreviousPage(extendSelection: boolean): void; + /** + * Moves the cursor to the start of the document. + */ + goToDocumentStart(): void; + /** + * Moves the cursor to the start of the document and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToDocumentStart(extendSelection: boolean): void; + /** + * Moves the cursor to the end of the document. + */ + goToDocumentEnd(): void; + /** + * Moves the cursor to the end of the document and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToDocumentEnd(extendSelection: boolean): void; + /** + * Moves the cursor to the next word. + */ + goToNextWord(): void; + /** + * Moves the cursor to the next word and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextWord(extendSelection: boolean): void; + /** + * Moves the cursor to the previous word. + */ + goToPrevWord(): void; + /** + * Moves the cursor to the previous word and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPrevWord(extendSelection: boolean): void; + /** + * Moves the cursor to the start of the paragraph in which the cursor is located. + */ + goToParagraphStart(): void; + /** + * Moves the cursor to the start of the paragraph in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToParagraphStart(extendSelection: boolean): void; + /** + * Moves the cursor to the end of the paragraph in which the cursor is located. + */ + goToParagraphEnd(): void; + /** + * Moves the cursor to the end of the paragraph in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToParagraphEnd(extendSelection: boolean): void; + /** + * Selects the paragraph in which the cursor is located. + */ + selectParagraph(): void; + /** + * Selects the table cell in which the cursor is located. + */ + selectTableCell(): void; + /** + * Selects the table cell in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectTableCell(extendSelection: boolean): void; + /** + * Selects the table row in which the cursor is located. + */ + selectTableRow(): void; + /** + * Selects the table row in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectTableRow(extendSelection: boolean): void; + /** + * Selects the entire table in which the cursor is located. + */ + selectTable(): void; + /** + * Selects the entire table in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectTable(extendSelection: boolean): void; + /** + * Selects the editor's entire content. + */ + selectAll(): void; + /** + * Moves the cursor to the main sub-document. + */ + setMainSubDocumentAsActive(): void; + /** + * Moves the cursor to the footer of the specified document page. + * @param pageIndex An integer value specifying the page index. + */ + setFooterSubDocumentAsActiveByPageIndex(pageIndex: number): void; + /** + * Moves the cursor to the header of the specified document page. + * @param pageIndex An integer value specifying the page index. + */ + setHeaderSubDocumentAsActiveByPageIndex(pageIndex: number): void; +} +/** + * Defines a document's interval. + */ +interface Interval { + /** + * Gets the interval's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the interval's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; +} +interface SpellingInfo { + spellCheckerState: any; + misspelledIntervals: MisspelledInterval[]; +} +declare enum SpellCheckerState { + Disabled=0, + InProgress=1, + Done=2 +} +interface MisspelledInterval { + start: number; + length: number; + interval: Interval; + errorType: any; + word: string; + suggestions: string[]; +} +declare enum SpellingErrorType { + Misspelling=0, + Repeating=1 +} +/** + * Serves as a base for objects implementing different element styles. + */ +interface StyleBase { + /** + * Gets or sets the name of the style. + * Value: A string specifying the style name. + */ + name: string; + /** + * Gets whether the specified style is marked as deleted. + * Value: true, if the style is deleted; otherwise, false. + */ + isDeleted: boolean; +} +/** + * Defines the paragraph style settings. + */ +interface ParagraphStyle extends StyleBase { + /** + * Gets or sets the linked style for the current style. + * Value: A object representing a character style linked to a current style. + */ + linkedStyle: CharacterStyle; + /** + * Gets or sets the default style for a paragraph that immediately follows the current paragraph. + * Value: A object specifying the style for the next paragraph. + */ + nextStyle: ParagraphStyle; + /** + * Gets the index of the list item associated with the paragraph formatted with the current style. + * Value: An integer value specifying the list item index. + */ + listIndex: number; + /** + * Gets the index of the list level applied to the paragraph formatted with the current style. + * Value: An integer that is the list level index. + */ + listLevelIndex: number; + /** + * Gets or sets the style from which the current style inherits. + * Value: A object representing the parent style. + */ + parent: ParagraphStyle; +} +/** + * Contains characteristics of a character style in a document. + */ +interface CharacterStyle extends StyleBase { + /** + * Gets or sets the linked style for the current style. + * Value: A object representing a paragraph style linked to a current style. + */ + linkedStyle: ParagraphStyle; + /** + * Gets the style form which the current style inherits. + * Value: A object representing the parent style. + */ + parent: CharacterStyle; +} +/** + * Defines the table style settings. + */ +interface TableStyle extends StyleBase { + /** + * Gets or sets the style from which the current style inherits. + * Value: A object that is the parent style. + */ + parent: TableStyle; +} +/** + * Exposes the settings providing the information about the essential document functionality. + */ +interface SubDocument { + id: number; + type: any; + /** + * Provides information about paragraphs contained in the document. + * Value: An array of Paragraph objects storing information about document paragraphs. + */ + paragraphsInfo: Paragraph[]; + /** + * Provides information about fields in the current document. + * Value: An array of Field objects storing information about document fields. + */ + fieldsInfo: Field[]; + /** + * Provides information about tables contained in the document. + * Value: An array of Table objects storing information about document tables. + */ + tablesInfo: Table[]; + /** + * Provides information about document bookmarks. + * Value: An array of Bookmark objects storing information about document bookmarks. + */ + bookmarksInfo: Bookmark[]; + inlinePicturesInfo: InlinePictureInfo[]; + /** + * Gets the document's textual representation. + * Value: A string value specifying the document's text. + */ + text: string; + /** + * Gets the character length of the document. + * Value: An integer that is the number of character positions in the document. + */ + length: number; +} +declare enum SubDocumentType { + Main=0, + Header=1, + Footer=2, + TextBox=3 +} +/** + * Defines a table in the document. + */ +interface Table { + /** + * Gets the table's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the table length in characters. + * Value: A integer value specifying the character length of the table. + */ + length: number; + interval: Interval; + /** + * Provides access to a collection of table rows. + * Value: An array of TableRow objects storing information about individual table rows. + */ + rows: TableRow[]; + /** + * Gets the name of the style applied to the table (see name). + * Value: A string value specifying the style name. + */ + styleName: string; +} +/** + * Defines a table row in the document. + */ +interface TableRow { + /** + * Gets the table row's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the table row's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + interval: Interval; + /** + * Provides information about the table row's cells. + * Value: An array of TableCell objects storing information about cells. + */ + cells: TableCell[]; +} +/** + * Defines a table cell in the document. + */ +interface TableCell { + /** + * Gets the table cell's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the table cell's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + interval: Interval; +} +interface RichEditUnitConverter { + pixelsToTwips(value: number): number; + inchesToTwips(value: number): number; + pointsToTwips(value: number): number; + centimetersToTwips(value: number): number; + twipsToCentimeters(value: number): number; + pixelsToCentimeters(value: number): number; + twipsToInches(value: number): number; + pixelsToInches(value: number): number; + pixelsToPoints(value: number): number; + twipsToPoints(value: number): number; +} +/** + * A command to invoke the Bookmark dialog. + */ +interface OpenInsertBookmarkDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertBookmarkDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a new bookmark that references the current selection. + */ +interface InsertBookmarkCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertBookmarkCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param name A string value specifying name of creating bookmark. + * @param start An integer value specifying the start position of bookmark's range. + * @param length An integer value specifying the length of bookmark's range. + */ + execute(name: string, start: number, length: number): boolean; +} +/** + * A command to delete a specific bookmark. + */ +interface DeleteBookmarkCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteBookmarkCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param name A string value specifying name of the deleted bookmark. + */ + execute(name: string): boolean; +} +/** + * Gets a command to navigate to the specified bookmark in the document. + */ +interface GoToBookmarkCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToBookmarkCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param name + */ + execute(name: string): boolean; +} +/** + * A command to paste the text from the clipboard over the selection. + */ +interface PasteCommand extends CommandWithSimpleStateBase { + /** + * Executes the PasteCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to copy the selected text and place it to the clipboard. + */ +interface CopyCommand extends CommandWithSimpleStateBase { + /** + * Executes the CopyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to cut the selected text and place it to the clipboard. + */ +interface CutCommand extends CommandWithSimpleStateBase { + /** + * Executes the CutCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert an empty document field at the current position in the document. + */ +interface CreateFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to update the field's result. + */ +interface UpdateFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the UpdateFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to display the selected field's field codes. + */ +interface ShowFieldCodesCommand extends CommandWithSimpleStateBase { + /** + * Executes the ShowFieldCodesCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param showFieldCodes true to display field codes, false to hide field codes. + */ + execute(showFieldCodes: boolean): boolean; + /** + * Executes the ShowFieldCodesCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to display all field codes in place of the fields in the document. + */ +interface ShowAllFieldCodesCommand extends CommandWithSimpleStateBase { + /** + * Executes the ShowAllFieldCodesCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param showFieldCodes true to display field codes, false to hide field codes. + */ + execute(showFieldCodes: boolean): boolean; + /** + * Executes the ShowAllFieldCodesCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to update all fields in the selected range. + */ +interface UpdateAllFieldsCommand extends CommandWithSimpleStateBase { + /** + * Executes the UpdateAllFieldsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a DATE field displaying the current date. + */ +interface CreateDateFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateDateFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a TIME field displaying the current time. + */ +interface CreateTimeFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateTimeFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a PAGE field displaying the current page number. + */ +interface CreatePageFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreatePageFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the next data record of the bound data source. + */ +interface GoToDataRecordCommand extends CommandBase { + /** + * Executes the GoToDataRecordCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param activeRecordIndex An integer value specifying index of the next data record. + */ + execute(activeRecordIndex: number): boolean; + getState(): any; +} +interface DataRecordOptions { + activeRecordIndex: number; + recordCount: number; +} +/** + * A command to navigate to the first data record of the bound data source. + */ +interface GoToFirstDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToFirstDataRecordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the previous data record of the bound data source. + */ +interface GoToPreviousDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToPreviousDataRecordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the next data record of the bound data source. + */ +interface GoToNextDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToNextDataRecordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the last data record of the bound data source. + */ +interface GoToLastDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToLastDataRecordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to display or hide actual data in MERGEFIELD fields. + */ +interface ShowMergedDataCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowMergedDataCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ShowMergedDataCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param showMergedData true to display merged data, false to hide merged data. + */ + execute(showMergedData: boolean): boolean; +} +/** + * A command to invoke the Insert Merge Field dialog. + */ +interface MergeFieldDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the MergeFieldDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a MERGEFIELD field (with a data source column name) at the current position in the document. + */ +interface CreateMergeFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateMergeFieldCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fieldName A string value specifying the name of the merge field. + */ + execute(fieldName: string): boolean; +} +/** + * Gets a command to invoke the Export Range dialog to start a mail merge. + */ +interface MailMergeDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the MailMergeDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to start the mail merge process and download the resulting document containing the merged information. + */ +interface MailMergeAndDownloadCommand extends CommandBase { + /** + * Executes the MailMergeAndDownloadCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fileExtension A string value specifying the file extension of the resulting document. + */ + execute(fileExtension: string): boolean; + /** + * + * @param documentFormat + */ + execute(documentFormat: any): boolean; + /** + * Executes the MailMergeAndDownloadCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fileExtension A string value specifying the file extension of the resulting document. + * @param settings A MailMergeSettings object containing settings to set up mail merge operations. + */ + execute(fileExtension: string, settings: MailMergeSettings): boolean; + /** + * + * @param documentFormat + * @param settings + */ + execute(documentFormat: any, settings: MailMergeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to start the mail merge process and save the resulting merged document to the server. + */ +interface MailMergeAndSaveAsCommand extends CommandBase { + /** + * Executes the MailMergeAndSaveAsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param filePath A string value specifying path to the saving file on the server. + */ + execute(filePath: string): boolean; + /** + * + * @param fileInfo + * @param settings + */ + execute(fileInfo: RichEditFileInfo, settings: MailMergeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to insert a NUMPAGES field displaying the total number of pages. + */ +interface CreatePageCountFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreatePageCountFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Contains settings to set up mail merge operations. + */ +interface MailMergeSettings { + /** + * Gets or sets a value specifying which data rows should be exported into a merged document. + * Value: One of the values. + */ + range: any; + /** + * Gets or sets the index of the row from which the exported range starts. + * Value: An integer value specifying the row index. + */ + exportFrom: number; + /** + * Gets or sets the number of data rows in the exported mail-merge range. + * Value: An integer value specifying the row count. + */ + exportRecordsCount: number; + /** + * Gets or sets the merge mode. + * Value: One of the values. + */ + mergeMode: any; +} +declare enum MergeMode { + NewParagraph=0, + NewSection=1, + JoinTables=2 +} +declare enum MailMergeExportRange { + AllRecords=0, + CurrentRecord=1, + Range=2 +} +/** + * A command to create a new empty document. + */ +interface FileNewCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileNewCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to open the file, specifying its path. + */ +interface FileOpenCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileOpenCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param path A string value specifying path to the opening file. + */ + execute(path: string): boolean; +} +/** + * A command to invoke the File Open dialog allowing one to select and load a document file into RichEdit. + */ +interface FileOpenDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileOpenDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to save the document to a file. + */ +interface FileSaveCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileSaveCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Save As dialog that prompts for a file name and saves the current document in a file with the specified path. + */ +interface FileSaveAsCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileSaveAsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param path A string value specifying path to the saving file. + */ + execute(path: string): boolean; + /** + * + * @param fileInfo + */ + execute(fileInfo: RichEditFileInfo): boolean; +} +interface FileSaveAsDialogCommand extends CommandWithSimpleStateBase { + execute(): boolean; +} +/** + * A command to download the document file, specifying its extension. + */ +interface FileDownloadCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileDownloadCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fileExtension A string value specifying the extension of the downloading file. + */ + execute(fileExtension: string): boolean; + /** + * + * @param documentFormat + */ + execute(documentFormat: any): boolean; +} +/** + * A command to invoke a browser-specific Print dialog allowing one to print the current document. + */ +interface FilePrintCommand extends CommandWithSimpleStateBase { + /** + * Executes the FilePrintCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Search Panel allowing end-users to search text and navigate through search results. + */ +interface OpenFindPanelCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenFindPanelCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Find and Replace dialog. + */ +interface OpenFindAndReplaceDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenFindAndReplaceDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to find all matches of the specified text in the document. + */ +interface FindAllCommand extends CommandWithSimpleStateBase { + /** + * Executes the FindAllCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying finding text. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + * @param highlightResults true, to highlight result of search; otherwise, false. + */ + execute(text: string, matchCase: boolean, highlightResults: boolean): boolean; + /** + * Executes the FindAllCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying text to find. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + * @param highlightResults true, to highlight result of search; otherwise, false. + * @param results An array of Interval objects containing the results of search. + */ + execute(text: string, matchCase: boolean, highlightResults: boolean, results: Interval[]): boolean; +} +/** + * A command to hide the search results. + */ +interface HideFindResultsCommand extends CommandWithSimpleStateBase { + /** + * Executes the HideFindResultsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to search for a specific text and replace all matches in the document with the specified string. + */ +interface ReplaceAllCommand extends CommandWithSimpleStateBase { + /** + * Executes the ReplaceAllCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying text to replace. + * @param replaceText A string value specifying replacing text. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + */ + execute(text: string, replaceText: string, matchCase: boolean): boolean; +} +/** + * A command to search for a specific text and replace the next match in the document with the specified string. + */ +interface ReplaceNextCommand extends CommandWithSimpleStateBase { + /** + * Executes the ReplaceNextCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying text to replace. + * @param replaceText A string value specifying replacing text. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + */ + execute(text: string, replaceText: string, matchCase: boolean): boolean; +} +/** + * A command to cancel changes caused by the previous command. + */ +interface UndoCommand extends CommandWithSimpleStateBase { + /** + * Executes the UndoCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to reverse actions of the previous undo command. + */ +interface RedoCommand extends CommandWithSimpleStateBase { + /** + * Executes the RedoCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Hyperlink dialog. + */ +interface OpenInsertHyperlinkDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertHyperlinkDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a hyperlink at the current position in the document. + */ +interface InsertHyperlinkCommand extends CommandBase { + /** + * Executes the InsertHyperlinkCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A HyperLinkSettings object specifying hyperlink settings. + */ + execute(settings: HyperlinkSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to delete the selected hyperlink. + */ +interface DeleteHyperlinkCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteHyperlinkCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete all hyperlinks in a selected range. + */ +interface DeleteHyperlinksCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteHyperlinksCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the document bookmark or URI (uniform resource identifier) specified for the hyperlink. + */ +interface OpenHyperlinkCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenHyperlinkCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Contains settings to define hyperlinks. + */ +interface HyperlinkSettings { + /** + * Gets or sets a text displayed for a hyperlink. + * Value: A string value specifying the hyperlink display text. + */ + text: string; + /** + * Gets or sets a text for the tooltip displayed when the mouse hovers over a hyperlink. + * Value: A string containing the tooltip text. + */ + tooltip: string; + /** + * Gets or sets the hyperlink destination. + * Value: A string value that specifies the destination to which a hyperlink refers. + */ + url: string; + /** + * Gets or sets the associated bookmak. + * Value: A string value specifying the bookmark name. + */ + bookmark: string; +} +/** + * A command to insert a page break at the current position in the document. + */ +interface InsertPageBreakCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertPageBreakCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a column break at the current position in the document. + */ +interface InsertColumnBreakCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertColumnBreakCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a section break and start a new section on the next page. + */ +interface InsertSectionBreakNextPageCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSectionBreakNextPageCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a section break and start a new section on the next even-numbered page. + */ +interface InsertSectionBreakEvenPageCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSectionBreakEvenPageCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a section break and start a new section on the next odd-numbered page. + */ +interface InsertSectionBreakOddPageCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSectionBreakOddPageCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert the line break at the current position in the document. + */ +interface InsertLineBreakCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertLineBreakCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle between the bulleted paragraph and normal text. + */ +interface ToggleBulletedListCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleBulletedListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle between the numbered paragraph and normal text. + */ +interface ToggleNumberingListCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleNumberingListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle between the multilevel list style and normal text. + */ +interface ToggleMultilevelListCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleMultilevelListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Bulleted and Numbering dialog. + */ +interface OpenNumberingListDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenNumberingListDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Customize Numbered List dialog. + */ +interface OpenCustomNumberingListDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenCustomNumberingListDialogCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param abstractNumberingListIndex An integer value specifying index of abstract numbering list. + */ + execute(abstractNumberingListIndex: number): boolean; +} +/** + * A command to customize the numbered list parameters. + */ +interface ChangeCustomNumberingListCommand extends CommandBase { + /** + * Executes the ChangeCustomNumberingListCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param abstractNumberingListIndex An integer value specifying the numbering list index. + * @param listLevelSettings An array of ListLevelSettings objects defining settings for list levels. + */ + execute(abstractNumberingListIndex: number, listLevelSettings: ListLevelSettings[]): boolean; + /** + * Gets information about the command state. + * @param abstractNumberingListIndex An integer value specifying the index of the abstract numbering list item whose state to return. + */ + getState(abstractNumberingListIndex: number): any; +} +/** + * A command to restart the numbering list. + */ +interface RestartNumberingListCommand extends CommandWithSimpleStateBase { + /** + * Executes the RestartNumberingListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to increment the indent level of paragraphs in a selected numbered list. + */ +interface IncrementNumberingIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncrementNumberingIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to decrement the indent level of paragraphs in a selected numbered list. + */ +interface DecrementNumberingIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecrementNumberingIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to continue the list's numbering. + */ +interface ContinueNumberingListCommand extends CommandWithSimpleStateBase { + /** + * Executes the ContinueNumberingListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert numeration to a paragraph making it a numbering list item. + */ +interface InsertNumerationCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertNumerationCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param abstractNumberingListIndex An integer value specifying index of abstract numbering list. + */ + execute(abstractNumberingListIndex: number): boolean; + /** + * Executes the InsertNumerationCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param numberingListIndex An integer value specifying index of numbering list. + * @param isAbstractNumberingList true, to insert an abstract numbering list; otherwise, false. + */ + execute(numberingListIndex: number, isAbstractNumberingList: boolean): boolean; +} +/** + * A command to remove the selected numeration. + */ +interface RemoveNumerationCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveNumerationCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Contains settings to define individual bulleted or numbered list levels. + */ +interface ListLevelSettings { + /** + * Gets or sets the pattern used to format the list level for display purposes. + * Value: A string value specifying the format pattern. + */ + displayFormatString: string; + /** + * Gets or sets the numbering format used for the current list level's paragraph. + * Value: One of the values. + */ + format: any; + /** + * Gets the list level item's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets or sets the paragraph text alignment within numbered list levels. + * Value: One of the values. + */ + alignment: any; + separator: string; + /** + * Gets or sets the left indent for text within the current list level's paragraph. + * Value: An integer value specifying the left indent. + */ + leftIndent: number; + /** + * Gets or sets a value specifying the indent of the first line of the current list level's paragraph. + * Value: An integer value specifying the indent. + */ + firstLineIndent: number; + /** + * Gets or sets a value specifying whether and how the first line of the current list level's paragraph is indented. + * Value: One of the values. + */ + firstLineIndentType: any; + /** + * Gets or sets the font name of the current list level's paragraph. + * Value: A string value specifying the font name. + */ + fontName: string; + /** + * Gets or sets the font color of the current list level's paragraph. + * Value: A string value specifying the font color. + */ + fontColor: string; + /** + * Gets or sets the font size of the current list level's paragraph. + * Value: An integer value specifying the font size. + */ + fontSize: number; + /** + * Gets or sets whether the font formatting of the current list level's paragraph is bold. + * Value: true, if the font formatting is bold; otherwise, false. + */ + fontBold: boolean; + /** + * Gets or sets whether the font formatting of the current list level's paragraph is italic. + * Value: true, if the font formatting is italic; otherwise, false. + */ + fontItalic: boolean; +} +declare enum ListLevelFormat { + Decimal=0, + AIUEOHiragana=1, + AIUEOFullWidthHiragana=2, + ArabicAbjad=3, + ArabicAlpha=4, + Bullet=5, + CardinalText=6, + Chicago=7, + ChineseCounting=8, + ChineseCountingThousand=9, + ChineseLegalSimplified=10, + Chosung=11, + DecimalEnclosedCircle=12, + DecimalEnclosedCircleChinese=13, + DecimalEnclosedFullstop=14, + DecimalEnclosedParentheses=15, + DecimalFullWidth=16, + DecimalFullWidth2=17, + DecimalHalfWidth=18, + DecimalZero=19, + Ganada=20, + Hebrew1=21, + Hebrew2=22, + Hex=23, + HindiConsonants=24, + HindiDescriptive=25, + HindiNumbers=26, + HindiVowels=27, + IdeographDigital=28, + IdeographEnclosedCircle=29, + IdeographLegalTraditional=30, + IdeographTraditional=31, + IdeographZodiac=32, + IdeographZodiacTraditional=33, + Iroha=34, + IrohaFullWidth=35, + JapaneseCounting=36, + JapaneseDigitalTenThousand=37, + JapaneseLegal=38, + KoreanCounting=39, + KoreanDigital=40, + KoreanDigital2=41, + KoreanLegal=42, + LowerLetter=43, + LowerRoman=44, + None=45, + NumberInDash=46, + Ordinal=47, + OrdinalText=48, + RussianLower=49, + RussianUpper=50, + TaiwaneseCounting=51, + TaiwaneseCountingThousand=52, + TaiwaneseDigital=53, + ThaiDescriptive=54, + ThaiLetters=55, + ThaiNumbers=56, + UpperLetter=57, + UpperRoman=58, + VietnameseDescriptive=59 +} +declare enum ListLevelNumberAlignment { + Left=0, + Center=1, + Right=2 +} +/** + * A command to invoke the Insert Image dialog. + */ +interface OpenInsertPictureDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertPictureDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a picture from a file. + */ +interface InsertPictureCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertPictureCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param imageUrl A string value specifying picture's Url. + */ + execute(imageUrl: string): boolean; +} +/** + * A command to invoke the Symbols dialog. + */ +interface OpenInsertSymbolDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertSymbolDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a character into the document. + */ +interface InsertSymbolCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSymbolCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param symbol A string value specifying symbols to insert. + * @param fontName A string value specifying font of symbols to insert. + */ + execute(symbol: string, fontName: string): boolean; +} +/** + * A command to insert a paragraph break at the current position in the document. + */ +interface InsertParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert text at the current position in the document. + */ +interface InsertTextCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTextCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying text to insert. + */ + execute(text: string): boolean; +} +/** + * A command to delete the text in a selected range. + */ +interface DeleteCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to move the cursor backwards and erase the character in that space. + */ +interface BackspaceCommand extends CommandWithSimpleStateBase { + /** + * Executes the BackspaceCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to scale pictures in a selected range. + */ +interface ChangePictureScaleCommand extends CommandBase { + /** + * Executes the ChangePictureScaleCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param scale A Scale object specifying scaling of the picture. + */ + execute(scale: Scale): boolean; + /** + * Executes the ChangePictureScaleCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param x An interger number specifying width of the picture + * @param y An interger number specifying height of the picture + */ + execute(x: number, y: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to move the selected range to a specific position in the document. + */ +interface MoveContentCommand extends CommandWithSimpleStateBase { + /** + * Executes the MoveContentCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param position An integer value specifying position to insert selected text. + */ + execute(position: number): boolean; +} +/** + * A command to copy the selected text and place it to the specified position. + */ +interface CopyContentCommand extends CommandWithSimpleStateBase { + /** + * Executes the CopyContentCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param position An integer number value specifying position for pasting selected text. + */ + execute(position: number): boolean; +} +/** + * A command to insert a tab character at the current position in the document. + */ +interface InsertTabCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTabCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Defines the scaling settings. + */ +interface Scale { + x: number; + y: number; +} +/** + * A command to change page margin settings. + */ +interface ChangePageMarginsCommand extends CommandBase { + /** + * Executes the ChangePageMarginsCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param left An integer number specifying left margin of the page. + * @param top An integer number specifying top margin of the page. + * @param right An integer number specifying right margin of the page. + * @param bottom An integer number specifying bottom margin of the page. + */ + execute(left: number, top: number, right: number, bottom: number): boolean; + /** + * Executes the ChangePageMarginsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param margins A Margins object specifying page margin settings. + */ + execute(margins: Margins): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Margins tab of the Page Setup dialog. + */ +interface OpenPageMarginsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenPageMarginsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the page orientation. + */ +interface ChangePageOrientationCommand extends CommandBase { + /** + * + * @param isPortrait + */ + execute(isPortrait: any): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Paper tab of the Page Setup dialog. + */ +interface OpenPagePaperSizeDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenPagePaperSizeDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to set the page size. + */ +interface SetPageSizeDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the SetPageSizeDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the page size. + */ +interface ChangePageSizeCommand extends CommandBase { + /** + * Executes the ChangePageSizeCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param width An integer number specifying width of the page. + * @param height An integer number specifying height of the page. + */ + execute(width: number, height: number): boolean; + /** + * Executes the ChangePageSizeCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param size A Size object specifying the page size settings. + */ + execute(size: Size): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the number of section columns having the same width. + */ +interface ChangeSectionEqualColumnCountCommand extends CommandBase { + /** + * Executes the ChangeSectionEqualColumnCountCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param columnCount An interger number specifying the number of section columns having the same width. + */ + execute(columnCount: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Columns dialog. + */ +interface OpenSectionColumnsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenSectionColumnsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the settings of individual section columns. + */ +interface ChangeSectionColumnsCommand extends CommandBase { + /** + * + * @param columns + */ + execute(columns: SectionColumn[]): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the background color of the page. + */ +interface ChangePageColorCommand extends CommandBase { + /** + * Executes the ChangePageColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying background color of the page. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to activate the page header and begin editing. + */ +interface InsertHeaderCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertHeaderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to activate the page footer and begin editing. + */ +interface InsertFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to link a header/footer to the previous section, so it has the same content. + */ +interface LinkHeaderFooterToPreviousCommand extends CommandWithSimpleStateBase { + /** + * Executes the LinkHeaderFooterToPreviousCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the page footer from the page header in the header/footer editing mode. + */ +interface GoToFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the page header from the page footer in the header/footer editing mode. + */ +interface GoToHeaderCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToHeaderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the next page header or footer in the header/footer editing mode. + */ +interface GoToNextHeaderFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToNextHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the previous page header or footer in the header/footer editing mode. + */ +interface GoToPreviousHeaderFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToPreviousHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the header/footer edit mode, so it allows creation of a different header or footer for the first page of a document or section. + */ +interface SetDifferentFirstPageHeaderFooterCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetDifferentFirstPageHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the SetDifferentFirstPageHeaderFooterCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param differentFirstPage true to apply different text for first page's header and footer, false to remove difference. + */ + execute(differentFirstPage: boolean): boolean; +} +/** + * A command to change the header/footer edit mode so it allows creation of a different header or footer for odd and even pages of a document or section. + */ +interface SetDifferentOddAndEvenPagesHeaderFooterCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetDifferentOddAndEvenPagesHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the SetDifferentOddAndEvenPagesHeaderFooterCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param differentOddAndEvenPages true to apply different text for odd and even pages' header and footer, false to remove difference. + */ + execute(differentOddAndEvenPages: boolean): boolean; +} +/** + * A command to finish header/footer editing. + */ +interface CloseHeaderFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the CloseHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Defines a section column in the document. + */ +interface SectionColumn { + /** + * Gets or sets the width of the section column. + * Value: An integer value specifying the section column width. + */ + width: number; + /** + * Gets or sets the amount of space between adjacent section columns. + * Value: An integer value specifying the spacing between section columns. + */ + spacing: number; +} +/** + * Defines the size settings. + */ +interface Size { + /** + * Gets or sets the width value. + * Value: An integer value specifying the width. + */ + width: number; + /** + * Gets or sets the height value. + * Value: An integer value specifying the height. + */ + height: number; +} +/** + * Defines the margin settings. + */ +interface Margins { + /** + * Gets or sets the left margin. + * Value: An integer value specifying the left margin. + */ + left: number; + /** + * Gets or sets the top margin. + * Value: An integer value specifying the top margin. + */ + top: number; + /** + * Gets or sets the right margin. + * Value: An integer value specifying the right margin. + */ + right: number; + /** + * Gets or sets the bottom margin. + * Value: An integer value specifying the bottom margin. + */ + bottom: number; +} +declare enum Orientation { + Landscape=0, + Portrait=1 +} +/** + * A command to increment the indent level of paragraphs in a selected range. + */ +interface IncreaseIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncreaseIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to decrement the indent level of paragraphs in a selected range. + */ +interface DecreaseIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecreaseIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle the visibility of hidden symbols. + */ +interface ShowHiddenSymbolsCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowHiddenSymbolsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ShowHiddenSymbolsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param show true to display hidden symbols; otherwise, false. + */ + execute(show: boolean): boolean; +} +/** + * A command to toggle left paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle centered paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentCenterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle right paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle justified paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentJustifyCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentJustifyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to format a current paragraph with single line spacing. + */ +interface SetSingleParagraphSpacingCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetSingleParagraphSpacingCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to format a current paragraph with one and a half line spacing. + */ +interface SetSesquialteralParagraphSpacingCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetSesquialteralParagraphSpacingCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to format a current paragraph with double line spacing. + */ +interface SetDoubleParagraphSpacingCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetDoubleParagraphSpacingCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to add spacing before a paragraph. + */ +interface AddSpacingBeforeParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the AddSpacingBeforeParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to add spacing after a paragraph. + */ +interface AddSpacingAfterParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the AddSpacingAfterParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to remove spacing before the selected paragraph. + */ +interface RemoveSpacingBeforeParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveSpacingBeforeParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to remove spacing after the selected paragraph. + */ +interface RemoveSpacingAfterParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveSpacingAfterParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the background color of paragraphs in a selected range. + */ +interface ChangeParagraphBackColorCommand extends CommandBase { + /** + * Executes the ChangeParagraphBackColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying highlighting color of the paragraphs in a selected range. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Paragraph dialog allowing end-users to set paragraph formatting. + */ +interface OpenParagraphFormattingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenParagraphFormattingDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the formatting of paragraphs in a selected range. + */ +interface ChangeParagraphFormattingCommand extends CommandBase { + /** + * Executes the ChangeParagraphFormattingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A ParagraphFormattingSettings object specifying paragraph formatting settings. + */ + execute(settings: ParagraphFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to increment the left indentation of paragraphs in a selected range. + */ +interface IncrementParagraphLeftIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncrementParagraphLeftIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to decrement the left indentation of paragraphs in a selected range. + */ +interface DecrementParagraphLeftIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecrementParagraphLeftIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Tabs paragraph dialog. + */ +interface OpenTabsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenTabsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change paragraph tab stops. + */ +interface ChangeTabsCommand extends CommandBase { + /** + * Executes the ChangeTabsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TabsSettings object maintaining the information about tab stops. + */ + execute(settings: TabsSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Contains the information about tab stops. + */ +interface TabsSettings { + /** + * Gets or sets the default tab stop value. + * Value: An integer value specifying the default tab stop. + */ + defaultTabStop: number; + /** + * Gets or sets a list of tab stops. + * Value: An array of TabSettings objects containing individual tab stop settings. + */ + tabs: TabSettings[]; +} +/** + * Contains settings of a tab stop. + */ +interface TabSettings { + /** + * Gets or sets the alignment type, specifying how any text after the tab will be lined up. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the tab leader style, i.e., the symbol used as a tab leader. + * Value: One of the values. + */ + leader: any; + /** + * Gets or sets the position of the tab stop. + * Value: A number representing the distance from the left edge of the text area. + */ + position: number; + /** + * Gets or sets whether the individual tab stop is in effect. + * Value: true to switch off this tab stop; otherwise, false. + */ + deleted: boolean; +} +declare enum TabAlign { + Left=0, + Center=1, + Right=2, + Decimal=3 +} +declare enum TabLeaderType { + None=0, + Dots=1, + MiddleDots=2, + Hyphens=3, + Underline=4, + ThickLine=5, + EqualSign=6 +} +/** + * Contains settings to define the paragraph formatting. + */ +interface ParagraphFormattingSettings { + /** + * Gets or sets the paragraph alignment. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the outline level of a paragraph. + * Value: An integer specifying the level number. + */ + outlineLevel: number; + /** + * Gets or sets the right indent value for the specified paragraph. + * Value: An integer value specifying the right indent. + */ + rightIndent: number; + /** + * Gets or sets the spacing before the current paragraph. + * Value: An integer value specifying the spacing before the paragraph. + */ + spacingBefore: number; + /** + * Gets or sets the spacing after the current paragraph. + * Value: An integer value specifying the spacing after the paragraph. + */ + spacingAfter: number; + /** + * Gets or sets a value which determines the spacing between lines in a paragraph. + * Value: One of the values. + */ + lineSpacingType: any; + /** + * Gets or sets a value specifying whether and how the first line of a paragraph is indented. + * Value: One of the values. + */ + firstLineIndentType: any; + /** + * Gets or sets a value specifying the indent of the first line of a paragraph. + * Value: An integer value specifying the indent of the first line. + */ + firstLineIndent: number; + /** + * Gets or sets whether to suppress addition of additional space (contextual spacing) between paragraphs of the same style. + * Value: true to remove extra spacing between paragraphs, false to add extra space. + */ + contextualSpacing: boolean; + /** + * Gets or sets whether to prevent all page breaks that interrupt a paragraph. + * Value: true, to keep paragraph lines together; otherwise, false. + */ + keepLinesTogether: boolean; + /** + * Gets or sets whether a page break is inserted automatically before a specified paragraph(s). + * Value: true, if a page break is inserted automatically before a paragraph(s); otherwise, false. + */ + pageBreakBefore: boolean; + /** + * Gets or sets the left indent for text within a paragraph. + * Value: An integer value specifying the left indent. + */ + leftIndent: number; + /** + * Gets or sets a line spacing value. + * Value: An integer value specifying the line spacing. + */ + lineSpacing: number; + /** + * Gets or sets the paragraph background color. + * Value: A string value specifying the background color. + */ + backColor: string; +} +declare enum ParagraphAlignment { + Left=0, + Right=1, + Center=2, + Justify=3 +} +declare enum ParagraphLineSpacingType { + Single=0, + Sesquialteral=1, + Double=2, + Multiple=3, + Exactly=4, + AtLeast=5 +} +declare enum ParagraphFirstLineIndent { + None=0, + Indented=1, + Hanging=2 +} +interface AssignShortcutCommand extends CommandWithSimpleStateBase { + execute(keyCode: number, callback: (arg1: string) => void): boolean; +} +interface OpenSpellingDialogCommand extends CommandWithSimpleStateBase { + execute(): boolean; +} +/** + * A command to invoke the Insert Table dialog. + */ +interface OpenInsertTableDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertTableDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Insert Table dialog. + */ +interface InsertTableCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param columnCount An integer value specifying number of columns in a generated table. + * @param rowCount An integer value specifying number of rows in a generated table. + */ + execute(columnCount: number, rowCount: number): boolean; +} +/** + * A command to invoke the Table Properties dialog. + */ +interface OpenTableFormattingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenTableFormattingDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the selected table's formatting. + */ +interface ChangeTableFormattingCommand extends CommandBase { + /** + * Executes the ChangeTableFormattingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableFormattingSettings object containing the settings to format a table. + */ + execute(settings: TableFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the selected table's preferred row height. + */ +interface ChangeTableRowPreferredHeightCommand extends CommandBase { + /** + * Executes the ChangeTableRowPreferredHeightCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param preferredHeight A TableHeightUnit object specifying preferred height of the selected table rows. + */ + execute(preferredHeight: TableHeightUnit): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the preferred cell width of the selected table rows. + */ +interface ChangeTableCellPreferredWidthCommand extends CommandBase { + /** + * Executes the ChangeTableCellPreferredWidthCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param preferredWidth A TableWidthUnit object specifying preferred width of the selected table rows. + */ + execute(preferredWidth: TableWidthUnit): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the selected table's preferred column width. + */ +interface ChangeTableColumnPreferredWidthCommand extends CommandBase { + /** + * Executes the ChangeTableColumnPreferredWidthCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param preferredWidth A TableWidthUnit object specifying preferred width of the selected table columns. + */ + execute(preferredWidth: TableWidthUnit): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the cell formatting of the selected table elements. + */ +interface ChangeTableCellFormattingCommand extends CommandBase { + /** + * Executes the ChangeTableCellFormattingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableFormattingSettings object specifying cell formatting of the selected table elements. + */ + execute(settings: TableCellFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to insert a table column to the left of the current position in the table. + */ +interface InsertTableColumnToTheLeftCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableColumnToTheLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a table column to the right of the current position in the table. + */ +interface InsertTableColumnToTheRightCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableColumnToTheRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a row in a table below the selected row. + */ +interface InsertTableRowBelowCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableRowBelowCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a row in a table above the selected row. + */ +interface InsertTableRowAboveCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableRowAboveCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table rows. + */ +interface DeleteTableRowsCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableRowsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table columns. + */ +interface DeleteTableColumnsCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableColumnsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert table cells with a horizontal shift into the selected table. + */ +interface InsertTableCellWithShiftToTheLeftCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCellWithShiftToTheLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table cells with a horizontal shift. + */ +interface DeleteTableCellsWithShiftHorizontallyCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCellsWithShiftHorizontallyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table cells with a vertical shift. + */ +interface DeleteTableCellsWithShiftVerticallyCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCellsWithShiftVerticallyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table. + */ +interface DeleteTableCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Insert Cells dialog. + */ +interface InsertTableCellsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCellsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Delete Cells dialog. + */ +interface DeleteTableCellsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCellsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to merge the selected table cells. + */ +interface MergeTableCellsCommand extends CommandWithSimpleStateBase { + /** + * Executes the MergeTableCellsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Split Cells dialog. + */ +interface SplitTableCellsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the SplitTableCellsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to split the selected table cells based on the specified options. + */ +interface SplitTableCellsCommand extends CommandWithSimpleStateBase { + /** + * Executes the SplitTableCellsCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param rowCount An integer value specifying number of rows in the splitted table cells. + * @param columnCount An integer value specifying number of columns in the splitted table cells. + * @param mergeBeforeSplit true to merge the selected cells before splitting; otherwise, false. + */ + execute(rowCount: number, columnCount: number, mergeBeforeSplit: boolean): boolean; +} +/** + * A command to insert table cells with a vertical shift into the selected table. + */ +interface InsertTableCellsWithShiftToTheVerticallyCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCellsWithShiftToTheVerticallyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Borders and Shading table dialog. + */ +interface OpenTableBordersAndShadingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenTableBordersAndShadingDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change borders and shading of the selected table elements. + */ +interface ChangeTableBordersAndShadingCommand extends CommandBase { + /** + * Executes the ChangeTableBordersAndShadingCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableBorderSettings object with settings specifying table borders. + * @param applyToWholeTable true to apply the border settings to the whole table, false to apply the border settings to the selected cells. + */ + execute(settings: TableBordersSettings, applyToWholeTable: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to apply top-left alignment for the selected table cells. + */ +interface ToggleTableCellAlignTopLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignTopLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply top-center alignment for the selected table cells. + */ +interface ToggleTableCellAlignTopCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignTopCenterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply top-right alignment for the selected table cells. + */ +interface ToggleTableCellAlignTopRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignTopRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply middle-left alignment for the selected table cells. + */ +interface ToggleTableCellAlignMiddleLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignMiddleLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply middle-center alignment for the selected table cells. + */ +interface ToggleTableCellAlignMiddleCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignMiddleCenterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply middle-right alignment for the selected table cells. + */ +interface ToggleTableCellAlignMiddleRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignMiddleRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply bottom-left alignment for the selected table cells. + */ +interface ToggleTableCellAlignBottomLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignBottomLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply bottom-center alignment for the selected table cells. + */ +interface ToggleTableCellAlignBottomCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignBottomCenterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply bottom-right alignment for the selected table cells. + */ +interface ToggleTableCellAlignBottomRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignBottomRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the selected table's style. + */ +interface ChangeTableStyleCommand extends CommandBase { + /** + * Executes the ChangeTableStyleCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param style A TableStyle object specifying the style applying to the table. + */ + execute(style: TableStyle): boolean; + /** + * Executes the ChangeTableStyleCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param styleName A string specifying the name of style applying to the table. + */ + execute(styleName: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to toggle top borders for selected cells on/off. + */ +interface ToggleTableCellTopBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellTopBorderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle right borders for selected cells on/off. + */ +interface ToggleTableCellRightBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellRightBorderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle bottom borders for selected cells on/off. + */ +interface ToggleTableCellBottomBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellBottomBorderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +interface ToggleTableCellLeftBorderCommand extends CommandWithBooleanStateBase { + execute(): boolean; +} +/** + * A command to remove the borders of the selected table cells. + */ +interface RemoveTableCellBordersCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveTableCellBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle all borders for selected cells on/off. + */ +interface ToggleTableCellAllBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAllBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle inner borders for selected cells on/off. + */ +interface ToggleTableCellInsideBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellInsideBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle inner horizontal borders for selected cells on/off. + */ +interface ToggleTableCellInsideHorizontalBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellInsideHorizontalBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle inner vertical borders for selected cells on/off. + */ +interface ToggleTableCellInsideVerticalBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellInsideVerticalBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle outer borders for selected cells on/off. + */ +interface ToggleTableCellOutsideBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellOutsideBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the selected table's style options. + */ +interface ChangeTableLookCommand extends CommandBase { + /** + * Executes the ChangeTableLookCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableLookSettings object containing the settings that modify the table appearance. + */ + execute(settings: TableLookSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the repository item's table border style. + */ +interface ChangeTableBorderRepositoryItemCommand extends CommandBase { + /** + * Executes the ChangeTableBorderRepositoryItemCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableBorderSettings object specifying the repository item's table border style. + */ + execute(settings: TableBorderSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change cell shading in the selected table elements. + */ +interface ChangeTableCellShadingCommand extends CommandBase { + /** + * Executes the ChangeTableCellShadingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying color of the selected cells' shading. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to toggle the display of grid lines for a table with no borders applied - on/off. + */ +interface ShowTableGridLinesCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowTableGridLinesCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ShowTableGridLinesCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param showTableGridLines true to display grid lines of the table, false to hide grid lines of the table. + */ + execute(showTableGridLines: boolean): boolean; +} +/** + * Contains the table style settings that modify the table appearance. + */ +interface TableLookSettings { + /** + * Gets or sets a value specifying whether special formatting is applied to the first row of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyFirstRow: boolean; + /** + * Gets or sets a value specifying whether special formatting is applied to the last row of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyLastRow: boolean; + /** + * Gets or sets a value specifying whether special formatting is applied to the first column of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyFirstColumn: boolean; + /** + * Gets or sets a value specifying whether special formatting is applied to the last column of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyLastColumn: boolean; + /** + * Gets or sets a value specifying whether row banding formatting is not applied to the table. + * Value: true, to apply the formatting; otherwise, false. + */ + doNotApplyRowBanding: boolean; + /** + * Gets or sets a value specifying whether column banding formatting is not applied to the table. + * Value: true, to apply the formatting; otherwise, false. + */ + doNotApplyColumnBanding: boolean; +} +/** + * Contains settings to define table borders. + */ +interface TableBordersSettings { + /** + * Gets or sets the top border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + top: TableBorderSettings; + /** + * Gets or sets the right border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + right: TableBorderSettings; + /** + * Gets or sets the bottom border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + bottom: TableBorderSettings; + /** + * Gets or sets the left border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + left: TableBorderSettings; + /** + * Gets or sets the inside horizontal border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + insideHorizontal: TableBorderSettings; + /** + * Gets or sets the inside vertical border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + insideVertical: TableBorderSettings; + /** + * Gets or sets the background color of table borders. + * Value: A string value specifying the background color. + */ + backgroundColor: string; +} +/** + * Contains settings to define a table border. + */ +interface TableBorderSettings { + /** + * Gets or sets the border color. + * Value: A string value specifying the border color. + */ + color: string; + /** + * Gets or sets the border line width. + * Value: An integer value defining the border line width. + */ + width: number; + /** + * Gets or sets the border line style. + * Value: A object defining the border line style. + */ + style: any; +} +declare enum BorderLineStyle { + None=0, + Single=1, + Thick=2, + Double=3, + Dotted=4, + Dashed=5, + DotDash=6, + DotDotDash=7, + Triple=8, + ThinThickSmallGap=9, + ThickThinSmallGap=10, + ThinThickThinSmallGap=11, + ThinThickMediumGap=12, + ThickThinMediumGap=13, + ThinThickThinMediumGap=14, + ThinThickLargeGap=15, + ThickThinLargeGap=16, + ThinThickThinLargeGap=17, + Wave=18, + DoubleWave=19, + DashSmallGap=20, + DashDotStroked=21, + ThreeDEmboss=22, + ThreeDEngrave=23, + Outset=24, + Inset=25, + Apples=26, + ArchedScallops=27, + BabyPacifier=28, + BabyRattle=29, + Balloons3Colors=30, + BalloonsHotAir=31, + BasicBlackDashes=32, + BasicBlackDots=33, + BasicBlackSquares=34, + BasicThinLines=35, + BasicWhiteDashes=36, + BasicWhiteDots=37, + BasicWhiteSquares=38, + BasicWideInline=39, + BasicWideMidline=40, + BasicWideOutline=41, + Bats=42, + Birds=43, + BirdsFlight=44, + Cabins=45, + CakeSlice=46, + CandyCorn=47, + CelticKnotwork=48, + CertificateBanner=49, + ChainLink=50, + ChampagneBottle=51, + CheckedBarBlack=52, + CheckedBarColor=53, + Checkered=54, + ChristmasTree=55, + CirclesLines=56, + CirclesRectangles=57, + ClassicalWave=58, + Clocks=59, + Compass=60, + Confetti=61, + ConfettiGrays=62, + ConfettiOutline=63, + ConfettiStreamers=64, + ConfettiWhite=65, + CornerTriangles=66, + CouponCutoutDashes=67, + CouponCutoutDots=68, + CrazyMaze=69, + CreaturesButterfly=70, + CreaturesFish=71, + CreaturesInsects=72, + CreaturesLadyBug=73, + CrossStitch=74, + Cup=75, + DecoArch=76, + DecoArchColor=77, + DecoBlocks=78, + DiamondsGray=79, + DoubleD=80, + DoubleDiamonds=81, + Earth1=82, + Earth2=83, + EclipsingSquares1=84, + EclipsingSquares2=85, + EggsBlack=86, + Fans=87, + Film=88, + Firecrackers=89, + FlowersBlockPrint=90, + FlowersDaisies=91, + FlowersModern1=92, + FlowersModern2=93, + FlowersPansy=94, + FlowersRedRose=95, + FlowersRoses=96, + FlowersTeacup=97, + FlowersTiny=98, + Gems=99, + GingerbreadMan=100, + Gradient=101, + Handmade1=102, + Handmade2=103, + HeartBalloon=104, + HeartGray=105, + Hearts=106, + HeebieJeebies=107, + Holly=108, + HouseFunky=109, + Hypnotic=110, + IceCreamCones=111, + LightBulb=112, + Lightning1=113, + Lightning2=114, + MapleLeaf=115, + MapleMuffins=116, + MapPins=117, + Marquee=118, + MarqueeToothed=119, + Moons=120, + Mosaic=121, + MusicNotes=122, + Northwest=123, + Ovals=124, + Packages=125, + PalmsBlack=126, + PalmsColor=127, + PaperClips=128, + Papyrus=129, + PartyFavor=130, + PartyGlass=131, + Pencils=132, + People=133, + PeopleHats=134, + PeopleWaving=135, + Poinsettias=136, + PostageStamp=137, + Pumpkin1=138, + PushPinNote1=139, + PushPinNote2=140, + Pyramids=141, + PyramidsAbove=142, + Quadrants=143, + Rings=144, + Safari=145, + Sawtooth=146, + SawtoothGray=147, + ScaredCat=148, + Seattle=149, + ShadowedSquares=150, + SharksTeeth=151, + ShorebirdTracks=152, + Skyrocket=153, + SnowflakeFancy=154, + Snowflakes=155, + Sombrero=156, + Southwest=157, + Stars=158, + Stars3d=159, + StarsBlack=160, + StarsShadowed=161, + StarsTop=162, + Sun=163, + Swirligig=164, + TornPaper=165, + TornPaperBlack=166, + Trees=167, + TriangleParty=168, + Triangles=169, + Tribal1=170, + Tribal2=171, + Tribal3=172, + Tribal4=173, + Tribal5=174, + Tribal6=175, + TwistedLines1=176, + TwistedLines2=177, + Vine=178, + Waveline=179, + WeavingAngles=180, + WeavingBraid=181, + WeavingRibbon=182, + WeavingStrips=183, + WhiteFlowers=184, + Woodwork=185, + XIllusions=186, + ZanyTriangles=187, + ZigZag=188, + ZigZagStitch=189, + Nil=-1 +} +/** + * Contains the settings to define the table cell formatting. + */ +interface TableCellFormattingSettings { + /** + * Gets or sets a table cell's preferred width. + * Value: A object specifying the preferred cell width. + */ + preferredWidth: TableWidthUnit; + /** + * Gets or sets the vertical alignment of a table cell's content. + * Value: One the values. + */ + verticalAlignment: any; + /** + * Gets or sets a value specifying whether text is wrapped in a table cell. + * Value: true if text is wrapped; false if text is not wrapped. + */ + noWrap: boolean; + /** + * Gets or sets a table cell's left margin. + * Value: An integer value specifying the left margin. + */ + marginLeft: number; + /** + * Gets or sets a table cell's right margin. + * Value: An integer value specifying the right margin. + */ + marginRight: number; + /** + * Gets or sets a table cell's top margin. + * Value: An integer value specifying the top margin. + */ + marginTop: number; + /** + * Gets or sets a table cell's bottom margin. + * Value: An integer value specifying the bottom margin. + */ + marginBottom: number; + /** + * Gets or sets a value specifying whether a table cell's margins are inherited from the table level settings. + * Value: true to inherit table level margins; false to use a table cell's own margin settings. + */ + marginsSameAsTable: boolean; +} +declare enum TableCellVerticalAlignment { + Top=0, + Both=1, + Center=2, + Bottom=3 +} +/** + * Contains the settings to format a table. + */ +interface TableFormattingSettings { + /** + * Gets or sets the preferred width of cells in the table. + * Value: A object specifying the width. + */ + preferredWidth: TableWidthUnit; + /** + * Gets or sets the alignment of table rows. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the table's left indent. + * Value: An integer value specifying the indent. + */ + indent: number; + /** + * Gets or sets the spacing between table cells. + * Value: An integer value specifying the spacing. + */ + spacingBetweenCells: number; + /** + * Gets or sets a value specifying whether spacing is allowed between table cells. + * Value: true, to allow spacing; otherwise, false. + */ + allowSpacingBetweenCells: boolean; + /** + * Gets or sets a value that specifying whether to allow automatic resizing of table cells to fit their contents. + * Value: true, to allow automatic resizing; otherwise, false. + */ + resizeToFitContent: boolean; + /** + * Gets or sets the default left margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginLeft: number; + /** + * Gets or sets the default right margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginRight: number; + /** + * Gets or sets the default top margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginTop: number; + /** + * Gets or sets the default bottom margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginBottom: number; +} +/** + * Contains settings defining the table width's measurement units and value. + */ +interface TableWidthUnit { + /** + * Gets or sets the table width value. + * Value: An integer value specifying the table width. + */ + value: number; + /** + * Gets or sets the unit type for the table width. + * Value: One of the values. + */ + type: any; +} +/** + * Contains settings defining the table height's measurement units and value. + */ +interface TableHeightUnit { + /** + * Gets or sets the table height value. + * Value: An integer value specifying the table height. + */ + value: number; + type: any; +} +declare enum TableHeightUnitType { + Minimum=0, + Auto=1, + Exact=2 +} +declare enum TableRowAlignment { + Both=0, + Center=1, + Distribute=2, + Left=3, + NumTab=4, + Right=5 +} +declare enum TableWidthUnitType { + Nil=0, + Auto=1, + FiftiethsOfPercent=2, + ModelUnits=3 +} +/** + * A command to change the font name of characters in a selected range. + */ +interface ChangeFontNameCommand extends CommandBase { + /** + * Executes the ChangeFontNameCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontName A string specifying font name. + */ + execute(fontName: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the font size of characters in a selected range. + */ +interface ChangeFontSizeCommand extends CommandBase { + /** + * Executes the ChangeFontSizeCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontSize An integer number specifying font size. + */ + execute(fontSize: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to increase the font size of characters in a selected range to the closest larger predefined value. + */ +interface IncreaseFontSizeCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncreaseFontSizeCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to decrease the font size of characters in a selected range to the closest smaller predefined value. + */ +interface DecreaseFontSizeCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecreaseFontSizeCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to convert the selected text to upper case. + */ +interface MakeTextUpperCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the MakeTextUpperCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to convert the selected text to lower case. + */ +interface MakeTextLowerCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the MakeTextLowerCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to capitalize each word in the selected sentence. + */ +interface CapitalizeEachWordTextCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the CapitalizeEachWordTextCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle the case for each character - upper case becomes lower, lower case becomes upper. + */ +interface ToggleTextCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the ToggleTextCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the bold formatting of characters in a selected range. + */ +interface ChangeFontBoldCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontBoldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontBoldCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontBold true to apply bold formatting to the text, false to remove bold formatting. + */ + execute(fontBold: boolean): boolean; +} +/** + * A command to change the italic formatting of characters in a selected range. + */ +interface ChangeFontItalicCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontItalicCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontItalicCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontItalic true to apply italic formatting to the text, false to remove italic formatting. + */ + execute(fontItalic: boolean): boolean; +} +/** + * A command to change the underline formatting of characters in a selected range. + */ +interface ChangeFontUnderlineCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontUnderlineCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontUnderlineCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontUnderline true to apply underline formatting to the text, false to remove underline formatting. + */ + execute(fontUnderline: boolean): boolean; +} +/** + * A command to change the strikeout formatting of characters in a selected range. + */ +interface ChangeFontStrikeoutCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontStrikeoutCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontStrikeoutCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontStrikeout true to apply strikeout formatting to the text, false to remove strikeout formatting. + */ + execute(fontStrikeout: boolean): boolean; +} +/** + * A command to change the superscript formatting of characters in a selected range. + */ +interface ChangeFontSuperscriptCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontSuperscriptCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontSuperscriptCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontSuperscript true to apply superscript formatting to the text, false to remove superscript formatting. + */ + execute(fontSuperscript: boolean): boolean; +} +/** + * A command to change the subscript formatting of characters in the selected range. + */ +interface ChangeFontSubscriptCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontSubscriptCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontSubscriptCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontSubscript true to apply subscript formatting to the text, false to remove subscript formatting. + */ + execute(fontSubscript: boolean): boolean; +} +/** + * A command to change the font color of characters in a selected range. + */ +interface ChangeFontForeColorCommand extends CommandBase { + /** + * Executes the ChangeFontForeColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying font color. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the background color of characters in a selected range. + */ +interface ChangeFontBackColorCommand extends CommandBase { + /** + * Executes the ChangeFontBackColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying highlighting color. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to reset the selected text's formatting to default. + */ +interface ClearFormattingCommand extends CommandWithSimpleStateBase { + /** + * Executes the ClearFormattingCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the selected range's style. + */ +interface ChangeStyleCommand extends CommandBase { + /** + * Executes the ChangeStyleCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param style A StyleBase object specifying the selected range's style. + */ + execute(style: StyleBase): boolean; + /** + * Executes the ChangeStyleCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param styleName A string specifying the name of applying style. + * @param isParagraphStyle true to apply style to paragraph, false to apply style to character. + */ + execute(styleName: string, isParagraphStyle: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Font dialog allowing end-users to change the font, size and style of the selected text. + */ +interface OpenFontFormattingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenFontFormattingDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to convert the text of all selected sentences to sentence case. + */ +interface MakeTextSentenceCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the MakeTextSentenceCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to switch the text case at the current position in the document. + */ +interface SwitchTextCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the SwitchTextCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the font formatting of characters in a selected range. + */ +interface ChangeFontFormattingCommand extends CommandBase { + /** + * Executes the ChangeFontFormattingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A FontFormattingSettings object specifying font formatting settings. + */ + execute(settings: FontFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Contains settings to define the font formatting. + */ +interface FontFormattingSettings { + /** + * Gets or sets the character(s) font name. + * Value: A string value specifying the font name. + */ + fontName: string; + /** + * Gets or sets the character(s) font size. + * Value: An integer value specifying the font size. + */ + size: number; + /** + * Gets or sets the foreground color of characters. + * Value: A string value specifying the foreground color. + */ + foreColor: string; + /** + * Gets or sets the character background color. + * Value: A string value specifying the background color. + */ + backColor: string; + /** + * Gets or sets the type of underline applied to the character(s). + * Value: true, if characters are underlined; otherwise, false. + */ + underline: boolean; + /** + * Gets or sets the color of the underline for the specified characters. + * Value: A string value specifying the underline color. + */ + underlineColor: string; + /** + * Gets or sets whether the character formatting is bold. + * Value: true, if characters are bold; otherwise, false. + */ + bold: boolean; + /** + * Gets or sets a value indicating whether a character(s) is italicized. + * Value: true, if characters are italicized; otherwise, false. + */ + italic: boolean; + strikeout: boolean; + /** + * Gets or sets whether only word characters are underlined. + * Value: true to underline only characters in words; false to underline all characters. + */ + underlineWordsOnly: boolean; + /** + * Gets or sets a value specifying character script formatting. + * Value: One of the values. + */ + script: any; + /** + * Gets or sets a value indicating whether all characters are capital letters. + * Value: true, if all characters are capitalized; otherwise, false. + */ + allCaps: boolean; + /** + * Gets or sets a value indicating whether a character(s) is hidden. + * Value: true, if characters are hidden; otherwise, false. + */ + hidden: boolean; +} +declare enum CharacterFormattingScript { + Normal=0, + Subscript=1, + Superscript=2 +} +/** + * A command to toggle the horizontal ruler's visibility. + */ +interface ShowHorizontalRulerCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowHorizontalRulerCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ShowHorizontalRulerCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param show true to display the horizontal ruler, false to hide the horizontal ruler. + */ + execute(show: boolean): boolean; +} +/** + * A command to toggle the fullscreen mode. + */ +interface SetFullscreenCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetFullscreenCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the SetFullscreenCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fullscreen true to apply fullscreen mode, false to remove fullscreen mode. + */ + execute(fullscreen: boolean): boolean; +} +/** + * Holds the information that determines what action types can be performed for appointments. + */ +interface ASPxClientAppointmentFlags { + /** + * Gets a value that specifies whether an end-user is allowed to delete appointments. + * Value: true if an end-user can delete appointments; otherwise, false. Default is true. + */ + allowDelete: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to edit appointments. + * Value: true if the end-user can edit appointments; otherwise, false. + */ + allowEdit: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to change the time boundaries of appointments. + * Value: true if appointment resizing is allowed; otherwise, false. Default is true. + */ + allowResize: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to copy appointments. + * Value: true if a user can copy appointments; otherwise, false. Default is true. + */ + allowCopy: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to drag and drop appointments to another time slot or date. + * Value: true if the user can drag and drop appointments; otherwise, false. + */ + allowDrag: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to drag and drop appointments between resources. + * Value: true if the end-user can drag appointment from one resource to another; otherwise, false. + */ + allowDragBetweenResources: boolean; + /** + * Gets a value that specifies whether an inplace editor can be activated for an appointment. + * Value: true if an inplace editor is activated; otherwise, false. Default is true. + */ + allowInplaceEditor: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to share the schedule time between two or more appointments. + * Value: true if appointments with the same schedule time are allowed; otherwise, false. Default is true. + */ + allowConflicts: boolean; +} +/** + * Represents a client-side equivalent of the Appointment class. + */ +interface ASPxClientAppointment { + /** + * Gets the time interval of the appointment for client-side scripting. + * Value: An ASPxClientTimeInterval object, representing the interval assigned to an appointment. + */ + interval: ASPxClientTimeInterval; + /** + * Gets the identifiers of resources associated with the appointment for client-side scripting. + * Value: An array of string representations for resource identifiers. + */ + resources: string[]; + /** + * Gets the ID of an appointment for use in client-side scripts. + * Value: A string representation of the appointment ID. + */ + appointmentId: string; + /** + * Gets the type of appointment for use in client-side scripts. + * Value: An ASPxAppointmentType enumeration member, representing the appointment's type. + */ + appointmentType: ASPxAppointmentType; + /** + * Gets the index of the availability status object associated with the appointment. + * Value: An integer value that specifies the index of the corresponding Statuses collection. + */ + statusIndex: number; + /** + * Gets the index of the label object associated with the appointment for client-side scripting. + * Value: An integer value that specifies the index of the corresponding Labels collection. + */ + labelIndex: number; + /** + * Gets the client appointment value that is equivalent in meaning to the Subject property. + * Value: A string representing the appointment subject. + */ + subject: string; + /** + * Gets the client appointment value that is equivalent in meaning to the Description property. + * Value: A string, representing the description for an appointment. + */ + description: string; + /** + * Gets the client appointment value that is equivalent in meaning to the Location property. + * Value: A string representing the appointment location. + */ + location: string; + /** + * Gets the client appointment value that is equivalent in meaning to the AllDay property. + * Value: true indicates the all-day appointment; otherwise, false. + */ + allDay: boolean; + /** + * Adds a resource to the collection of resources associated with the client appointment. + * @param resourceId An object, representing the resource id. + */ + AddResource(resourceId: Object): void; + /** + * Gets the resource associated with the client-side appointment by its index. + * @param index An integer, representing an index of a resource in a resource collection associated with the current appointment. + */ + GetResource(index: number): Object; + /** + * Sets the property value of the client appointment, corresponding to the Start appointment property. + * @param start A JavaScript Date object representing the appointment start. + */ + SetStart(start: Date): void; + /** + * Gets the property value of the client appointment corresponding to the Start appointment property. + */ + GetStart(): Date; + /** + * Sets the property value of the client appointment, corresponding to the End appointment property. + * @param end A JavaScript Date object representing the end of the appointment. + */ + SetEnd(end: Date): void; + /** + * Gets the property value of the client appointment corresponding to the End appointment property. + */ + GetEnd(): Date; + /** + * Sets the property value of the client appointment, corresponding to the Duration appointment property. + * @param duration A TimeSpan object representing the appointment duration. + */ + SetDuration(duration: any): void; + /** + * Gets the property value of the client appointment corresponding to the Duration appointment property. + */ + GetDuration(): number; + /** + * Sets the ID of the client appointment. + * @param id An object representing the appointment identifier. + */ + SetId(id: Object): void; + /** + * Gets the ID of the client appointment. + */ + GetId(): Object; + /** + * Specifies the type of the current client appointment. + * @param type An ASPxAppointmentType enumeration value indicating the appointment type. + */ + SetAppointmentType(type: ASPxAppointmentType): void; + /** + * Gets the type of the client appointment. + */ + GetAppointmentType(): ASPxAppointmentType; + /** + * Sets the property value of the client appointment, corresponding to the StatusId appointment property. + * @param statusId An integer representing the index in the AppointmentStatusCollection. + */ + SetStatusId(statusId: number): void; + /** + * Gets the property value of the client appointment corresponding to the StatusId appointment property. + */ + GetStatusId(): number; + /** + * Sets the property value of the client appointment, corresponding to the LabelId appointment property. + * @param statusId An integer representing the index of the label in the Labels label collection. + */ + SetLabelId(statusId: number): void; + /** + * Gets the property value of the client appointment corresponding to the LabelId appointment property. + */ + GetLabelId(): number; + /** + * Sets the property value of the client appointment, corresponding to the Subject appointment property. + * @param subject A string containing the appointment subject. + */ + SetSubject(subject: string): void; + /** + * Gets the property value of the client appointment corresponding to the Subject appointment property. + */ + GetSubject(): string; + /** + * Sets the property value of the client appointment, corresponding to the Description appointment property. + * @param description A string representing the appointment description. + */ + SetDescription(description: string): void; + /** + * Gets the property value of the client appointment corresponding to the Description appointment property. + */ + GetDescription(): string; + /** + * Sets the property value of the client appointment, corresponding to the Location appointment property. + * @param location A string representing the appointment location. + */ + SetLocation(location: string): void; + /** + * Gets the property value of the client appointment corresponding to the Location appointment property. + */ + GetLocation(): string; + /** + * Specifies the property value of the client appointment corresponding to the AllDay appointment property. + * @param allDay true to indicate the all-day appointment; otherwise, false. + */ + SetAllDay(allDay: boolean): void; + /** + * Gets the property value of the client appointment corresponding to the AllDay appointment property. + */ + GetAllDay(): boolean; + /** + * Gets the appointment that is the RecurrencePattern for the current appointment. + */ + GetRecurrencePattern(): ASPxClientAppointment; + /** + * Sets the property value of the client appointment, corresponding to the RecurrenceInfo appointment property. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object representing the recurrence information. + */ + SetRecurrenceInfo(recurrenceInfo: ASPxClientRecurrenceInfo): void; + /** + * Gets the property value of the client appointment corresponding to the RecurrenceInfo appointment property. + */ + GetRecurrenceInfo(): ASPxClientRecurrenceInfo; +} +/** + * A client point object. + */ +interface ASPxClientPoint { + /** + * Gets the point's X-coordinate. + */ + GetX(): number; + /** + * Gets the point's Y-coordinate. + */ + GetY(): number; +} +/** + * A client rectangle object. + */ +interface ASPxClientRect { + /** + * Gets the X-coordinate of the rectangle's left edge. + */ + GetLeft(): number; + /** + * Gets the X-coordinate of the rectangle's right edge. + */ + GetRight(): number; + /** + * Gets the Y-coordinate of the rectangle's top edge. + */ + GetTop(): number; + /** + * Gets the Y-coordinate of the rectangle's bottom edge. + */ + GetBottom(): number; + /** + * Gets the rectangle's width. + */ + GetWidth(): number; + /** + * Gets the rectangle's height. + */ + GetHeight(): number; +} +/** + * Contains information defining the occurrences of a recurring client appointment. + */ +interface ASPxClientRecurrenceInfo { + /** + * Sets the recurrence start date. + * @param start A JavaScript date object value that specifies the start date for the recurrence. + */ + SetStart(start: Date): void; + /** + * Gets the recurrence start date. + */ + GetStart(): Date; + /** + * Sets the recurrence end date. + * @param end A JavaScript Date object that specifies the end date for the recurrence. + */ + SetEnd(end: Date): void; + /** + * Gets the recurrence end date. + */ + GetEnd(): Date; + /** + * Sets the duration of the recurrence. + * @param duration A TimeSpan object representing the duration. + */ + SetDuration(duration: any): void; + /** + * Gets the duration of the recurrence. + */ + GetDuration(): number; + /** + * Sets the time base for the frequency of the corresponding appointment occurrences. + * @param type An ASPxClientRecurrenceType enumeration value that specifies the recurrence's frequency type. + */ + SetRecurrenceType(type: ASPxClientRecurrenceType): void; + /** + * Gets the time base for the frequency of the corresponding appointment reoccurrence. + */ + GetRecurrenceType(): ASPxClientRecurrenceType; + /** + * Sets the day/days in a week that the corresponding appointment recurs on. + * @param weekDays The ASPxClientWeekDays enumeration value specifying the day/days in a week. + */ + SetWeekDays(weekDays: ASPxClientWeekDays): void; + /** + * Gets the day/days in a week on which the corresponding appointment occurs. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Sets how many times the appointment occurs. + * @param occurrenceCount An integer value that specifies how many times the appointment occurs. + */ + SetOccurrenceCount(occurrenceCount: number): void; + /** + * Gets how many times the appointment occurs. + */ + GetOccurrenceCount(): number; + /** + * Sets the frequency with which the corresponding appointment occurs (dependent on the recurrence Type). + * @param periodicity An integer value that specifies the frequency with which the corresponding appointment occurs. + */ + SetPeriodicity(periodicity: number): void; + /** + * Gets the frequency with which the corresponding appointment reoccurs (dependent on the recurrence Type). + */ + GetPeriodicity(): number; + /** + * Sets the ordinal number of a day within a defined month. + * @param dayNumber A positive integer value that specifies the day number within a month. + */ + SetDayNumber(dayNumber: number): void; + /** + * Gets the ordinal number of a day within a defined month. + */ + GetDayNumber(): number; + /** + * Sets the occurrence number of the week in a month for the recurrence pattern. + * @param weekOfMonth A ASPxClientWeekOfMonth enumeration value that specifies a particular week in every month. + */ + SetWeekOfMonth(weekOfMonth: ASPxClientWeekOfMonth): void; + /** + * Gets the occurrence number of the week in a month for the recurrence pattern. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; + /** + * Sets the month (as a number) on which the corresponding appointment occurs. + * @param month A positive integer value that specifies the month's number. + */ + SetMonth(month: number): void; + /** + * Gets the month (as a number) on which the corresponding appointment recurs. + */ + GetMonth(): number; + /** + * Gets the type of the recurrence range. + */ + GetRange(): ASPxClientRecurrenceRange; + /** + * Sets the type of the recurrence range. + * @param range An ASPxClientRecurrenceRangeenumeration value that specifies the recurrence range type. + */ + SetRange(range: ASPxClientRecurrenceRange): void; +} +/** + * Contains types of the recurrence range. + */ +interface ASPxClientRecurrenceRange { + /** + * A recurring appointment will not have an end date, i.e. infinite recurrence + * Value: The "NoEndDate" string. + */ + NoEndDate: string; + /** + * A recurring appointment will end after its recurrence count exceeds the value specified by the SetOccurrenceCount method. + * Value: The "OccurrenceCount" string. + */ + OccurrenceCount: string; + /** + * A recurring appointment will end after the date specified by the SetEnd method. + * Value: The "EndByDate" string. + */ + EndByDate: string; +} +/** + * Contains recurrence types. + */ +interface ASPxClientRecurrenceType { + /** + * The recurring appointment occurs on a daily basis. + * Value: The "Daily" string. + */ + Daily: string; + /** + * The recurring appointment reoccurs on a weekly basis. + * Value: The "Weekly" string. + */ + Weekly: string; + /** + * The recurring appointment reoccurs on a monthly basis. + * Value: The "Monthly" string. + */ + Monthly: string; + /** + * The recurring appointment reoccurs on an yearly basis. + * Value: The "Yearly" string. + */ + Yearly: string; + /** + * The recurring appointment occurs on an hourly base. + * Value: The "Hourly" string. + */ + Hourly: string; +} +/** + * Contains days and groups of days for use in recurrence patterns. + */ +interface ASPxClientWeekDays { + /** + * Specifies Sunday. + * Value: The integer 1 value. + */ + Sunday: number; + /** + * Specifies Monday. + * Value: The integer 2 value. + */ + Monday: number; + /** + * Specifies Tuesday. + * Value: The integer 4 value. + */ + Tuesday: number; + /** + * Specifies Wednesday. + * Value: The integer 8 value. + */ + Wednesday: number; + /** + * Specifies Thursday. + * Value: The integer 16 value. + */ + Thursday: number; + /** + * Specifies Friday. + * Value: The integer 32 value. + */ + Friday: number; + /** + * Specifies Saturday. + * Value: The integer 64 value. + */ + Saturday: number; + /** + * Specifies Saturday and Sunday. + * Value: The integer 65 value. + */ + WeekendDays: number; + /** + * Specifies work days (Monday, Tuesday, Wednesday, Thursday and Friday). + * Value: The integer 62 value. + */ + WorkDays: number; + /** + * Specifies every day of the week. + * Value: The integer 127 value. + */ + EveryDay: number; +} +/** + * Contains number of weeks in a month in which the event occurs. + */ +interface ASPxClientWeekOfMonth { + /** + * There isn't any recurrence rule based on the weeks in a month. + * Value: The integer 0 value. + */ + None: number; + /** + * The recurring event will occur once a month, on the specified day or days of the first week in the month. + * Value: The integer 1 value. + */ + First: number; + /** + * The recurring event will occur once a month, on the specified day or days of the second week in the month. + * Value: The integer 2 value. + */ + Second: number; + /** + * The recurring event will occur once a month, on the specified day or days of the third week in the month. + * Value: The integer 3 value. + */ + Third: number; + /** + * The recurring event will occur once a month, on the specified day or days of the fourth week in the month. + * Value: The integer 4 value; + */ + Fourth: number; + /** + * The recurring event will occur once a month, on the specified day or days of the last week in the month. + * Value: The integer 5 value; + */ + Last: number; +} +/** + * Represents a client-side equivalent of the WeekDaysCheckEdit control. + */ +interface ASPxClientWeekDaysCheckEdit extends ASPxClientControl { + /** + * Gets the selection state of the week day check boxes. + */ + GetValue(): ASPxClientWeekDays; + /** + * Gets the selection state of the week day check boxes. + * @param value An ASPxClientWeekDays object specifying the selection state of the week day check boxes. + */ + SetValue(value: ASPxClientWeekDays): void; +} +/** + * Represents a client-side equivalent of the RecurrenceRangeControl. + */ +interface ASPxClientRecurrenceRangeControl extends ASPxClientControl { + /** + * Gets the type of the recurrence range. + */ + GetRange(): ASPxClientRecurrenceRange; + /** + * Gets how many times the appointment occurs. + */ + GetOccurrenceCount(): number; + /** + * Gets the recurrence end date. + */ + GetEndDate(): Date; + /** + * Sets the type of the recurrence range. + * @param range An ASPxClientRecurrenceRangeenumeration value that specifies the recurrence range type. + */ + SetRange(range: ASPxClientRecurrenceRange): void; + /** + * Sets how many times the appointment occurs. + * @param occurrenceCount An integer value that specifies how many times the appointment occurs. + */ + SetOccurrenceCount(occurrenceCount: number): void; + /** + * Sets the recurrence end date. + * @param date A JavaScript Date object that specifies the end date for the recurrence. + */ + SetEndDate(date: Date): void; +} +/** + * A base for client equivalents of recurrence controls available in the XtraScheduler library. + */ +interface ASPxClientRecurrenceControlBase extends ASPxClientControl { + /** + * Returns an object providing access to the ASPxClientRecurrenceControlBase control's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientRecurrenceControlBase control. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the DailyRecurrenceControl - a control for specifying the daily recurrence. + */ +interface ASPxClientDailyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientDailyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientDailyRecurrenceControl. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the WeeklyRecurrenceControl. + */ +interface ASPxClientWeeklyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientWeeklyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientWeeklyRecurrenceControl. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the MonthlyRecurrenceControl. + */ +interface ASPxClientMonthlyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientMonthlyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientMonthlyRecurrenceControll. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the YearlyRecurrenceControl. + */ +interface ASPxClientYearlyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientYearlyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientYearlyRecurrenceControl. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * An object providing access to an ASPxClientRecurrenceControlBase control's editor values. + */ +interface DefaultRecurrenceRuleValuesAccessor { + /** + * Get the frequency with which the appointment occurs with respect to the appointment's recurrence type. + */ + GetPeriodicity(): number; + /** + * Gets the number of the month's day in which the appointment is scheduled. + */ + GetDayNumber(): number; + /** + * Gets or sets the month's number. + */ + GetMonth(): number; + /** + * Gets the days of the week to which a weekly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Gets the number of the week in a month when an appointment is scheduled. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; +} +/** + * An object providing access to an ASPxClientDailyRecurrenceControl's editor values. + */ +interface DailyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the number of days between appointment occurrences. + */ + GetPeriodicity(): number; + /** + * Gets the days of the week to which a daily recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; +} +/** + * An object providing access to an ASPxClientWeeklyRecurrenceControl's editor values. + */ +interface WeeklyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the number of weeks between appointment occurrences. + */ + GetPeriodicity(): number; + /** + * Gets the days of the week to which a weekly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; +} +/** + * An object providing access to an ASPxClientMonthlyRecurrenceControl's editor values. + */ +interface MonthlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the number of the month's day in which the appointment is scheduled. + */ + GetDayNumber(): number; + /** + * Gets the number of months between appointment occurrences. + */ + GetPeriodicity(): number; + /** + * Gets the days of the week to which a monthly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Gets the number of the week in a month when an appointment is scheduled. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; +} +/** + * An object providing access to an ASPxClientYearlyRecurrenceControl's editor values. + */ +interface YearlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the number of the month's day in which the appointment is scheduled. + */ + GetDayNumber(): number; + /** + * Gets or sets the month's number. + */ + GetMonth(): number; + /** + * Gets the days of the week to which a yearly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Gets or sets the number of a week in a month when an appointment is scheduled. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; +} +/** + * Provides base functionality for ASPxClientScheduler's forms. + */ +interface ASPxClientFormBase { + /** + * Occurs when the form has been closed. + */ + FormClosed: ASPxClientEvent>; + /** + * Closes the form. + */ + Close(): void; + /** + * Sets the visibility state of the specified form element. + * @param element An object specifying the element whose visibility state should be changed. + * @param isVisible true to display the element; false to hide the element. + */ + SetVisibleCore(element: Object, isVisible: boolean): void; +} +/** + * Represents a client-side equivalent of the RecurrenceTypeEdit. + */ +interface ASPxClientRecurrenceTypeEdit extends ASPxClientRadioButtonList { + /** + * Gets the selected recurrence type. + */ + GetRecurrenceType(): ASPxClientRecurrenceType; + /** + * Sets the selected recurrence type. + * @param recurrenceType An ASPxClientRecurrenceType enumeration value. + */ + SetRecurrenceType(recurrenceType: ASPxClientRecurrenceType): void; +} +/** + * Contains lists of property names for different appointment types. + */ +interface AppointmentPropertyNames { + /** + * Gets the list of properties characteristic for appointments of the Normal type. + * Value: A string array which is composed of the appointment property names. + */ + Normal: string; + /** + * Gets the list of properties characteristic for appointments of the Pattern type. + * Value: A string array which is composed of the appointment property names. + */ + Pattern: string; +} +/** + * Represents the client-side equivalent of the TimeInterval class. + */ +interface ASPxClientTimeInterval { + /** + * Gets a value indicating if the time interval is All-Day. + */ + GetAllDay(): boolean; + /** + * Sets a value specifying if the time interval is All-Day. + * @param allDayValue true, if this is an all-day time interval; otherwise, false. + */ + SetAllDay(allDayValue: boolean): void; + /** + * Client-side function that returns the start time of the interval. + */ + GetStart(): Date; + /** + * Client-side function that returns the duration of the specified time interval. + */ + GetDuration(): number; + /** + * Client-side function that returns the end time of the interval. + */ + GetEnd(): Date; + /** + * Client-side function that sets the start time of the interval. + * @param value A DateTime value, representing the beginning of the interval. + */ + SetStart(value: Date): void; + /** + * Client-side function that returns the duration of the specified time interval. + * @param value A TimeSpan object, representing the duration of the time period. + */ + SetDuration(value: any): void; + /** + * Client-side function that sets the end time of the interval. + * @param value A DateTime value, representing the end of the interval. + */ + SetEnd(value: Date): void; + /** + * Determines whether the specified object is equal to the current ASPxClientTimeInterval instance. + * @param interval The object to compare with the current object. + */ + Equals(interval: ASPxClientTimeInterval): boolean; + /** + * Checks if the current time interval intersects with the specified time interval. + * @param interval A ASPxClientTimeInterval object which represents the time interval to be checked. + */ + IntersectsWith(interval: ASPxClientTimeInterval): boolean; + /** + * Checks if the current time interval intersects with the specified time interval. The boundaries of the time intervals are excluded from the check. + * @param interval A ASPxClientTimeInterval object which represents the time interval to be checked. + */ + IntersectsWithExcludingBounds(interval: ASPxClientTimeInterval): boolean; + /** + * Client-side function that determines whether the specified interval is contained within the current one. + * @param interval An ASPxClientTimeInterval object, representing the time interval to check. + */ + Contains(interval: ASPxClientTimeInterval): boolean; +} +/** + * Holds action types for the client-side Refresh method. + */ +interface ASPxClientSchedulerRefreshAction { + /** + * Gets the value of the action parameter which initiates a simple reload of the control. + * Value: An integer representing the action parameter value. + */ + None: number; + /** + * Gets the value of the action parameter which initiates reloading of the main ASPxScheduler control and its data-dependent satellites. + * Value: An integer representing the action parameter value. + */ + VisibleIntervalChanged: number; + /** + * Gets the value of the action parameter which initiates reloading of the main ASPxScheduler control and its satellite View controls. + * Value: An integer representing the action parameter value. + */ + ActiveViewTypeChanged: number; +} +/** + * Contains methods allowing you to perform or cancel an operation. + */ +interface ASPxClientAppointmentOperation { + /** + * Passes parameters to the corresponding callback function to accomplish the operation. + */ + Apply(): void; + /** + * Cancels the operation. + */ + Cancel(): void; +} +/** + * Represents the client-side equivalent of the ASPxScheduler control. + */ +interface ASPxClientScheduler extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientScheduler. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when the Scheduler control is about to change its active view. + */ + ActiveViewChanging: ASPxClientEvent>; + /** + * Client-side event. Occurs after the active view of the ASPxScheduler has been changed. + */ + ActiveViewChanged: ASPxClientEvent>; + /** + * Occurs when the end-user clicks an appointment. + */ + AppointmentClick: ASPxClientEvent>; + /** + * Occurs when the end-user double clicks on an appointment. + */ + AppointmentDoubleClick: ASPxClientEvent>; + /** + * Occurs on the client side when the user selects an appointment. + */ + AppointmentsSelectionChanged: ASPxClientEvent>; + /** + * Fires on the client side when the time cell selection is changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the time cell selection is about to change. + */ + SelectionChanging: ASPxClientEvent>; + /** + * Fires on the client side when the time interval of the scheduling area is changed. + */ + VisibleIntervalChanged: ASPxClientEvent>; + /** + * Occurs when one of More Buttons is clicked. + */ + MoreButtonClicked: ASPxClientEvent>; + /** + * Client-side event that occurs when a popup menu item is clicked. + */ + MenuItemClicked: ASPxClientEvent>; + /** + * Client-side event that occurs after an appointment has been dragged and dropped. + */ + AppointmentDrop: ASPxClientEvent>; + /** + * Client-side event that occurs when an appointment is resized. + */ + AppointmentResize: ASPxClientEvent>; + /** + * Client-side event that fires before an appointment is deleted. + */ + AppointmentDeleting: ASPxClientEvent>; + /** + * Client-side scripting method that gets the active View. + */ + GetActiveViewType(): ASPxSchedulerViewType; + /** + * Client-side scripting method to change the ASPxScheduler's active View. + * @param value A ASPxSchedulerViewType enumeration value, representing a view type to set. + */ + SetActiveViewType(value: ASPxSchedulerViewType): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Client-side scripting method which initiates a round trip to the server so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Client-side scripting method which initiates a round trip to the server, so that the control will be reloaded using the specified refresh action. + * @param refreshAction An ASPxClientSchedulerRefreshAction enumeration value, specifying the refresh action. + */ + Refresh(refreshAction: ASPxClientSchedulerRefreshAction): void; + /** + * Client-side function that returns the type of grouping applied to the appointments displayed in the scheduler. + */ + GetGroupType(): ASPxSchedulerGroupType; + /** + * Client-side scripting method which raises the callback command to set the GroupType. + * @param value An ASPxSchedulerGroupType enumeration value, which specifies how appointments are grouped. + */ + SetGroupType(value: ASPxSchedulerGroupType): void; + /** + * Client-side method that navigates the scheduler to the current system date. + */ + GotoToday(): void; + /** + * Client-side scripting method which raises the GotoDate callback command. + * @param date A DateTime value specifying the destination time. + */ + GotoDate(date: Date): void; + /** + * Client-side function which slides the visible interval one time span back. + */ + NavigateBackward(): void; + /** + * Client-side function which slides the visible interval one time span forward. + */ + NavigateForward(): void; + /** + * Client-side method which raises the callback command to change the ClientTimeZoneId of the scheduler. + * @param timeZoneId A string, a time zone identifier which is valid for the System.TimeZoneInfo.Id property. + */ + ChangeTimeZoneId(timeZoneId: string): void; + /** + * Displays a Selection ToolTip on a position given by the specified coordinates. + * @param x An integer representing the X-coordinate. + * @param y An integer representing the Y-coordinate. + */ + ShowSelectionToolTip(x: number, y: number): void; + /** + * Client-side function that returns the time interval, selected in the scheduler. + */ + GetSelectedInterval(): ASPxClientTimeInterval; + /** + * Client-side function that returns the ResourceId of selected time cell's resource. + */ + GetSelectedResource(): string; + /** + * Client-side function that returns an appointment with the specified ID. + * @param id An appointment's identifier. + */ + GetAppointmentById(id: Object): ASPxClientAppointment; + /** + * Client-side function that returns the id's of selected appointments. + */ + GetSelectedAppointmentIds(): string[]; + /** + * Client-side function that removes the appointment specified by its client ID from a collection of selected appointments. + * @param aptId An appointment's identifier. + */ + DeselectAppointmentById(aptId: Object): void; + /** + * Client-side function that selects an appointment with the specified ID. + * @param aptId An appointment's identifier. + */ + SelectAppointmentById(aptId: Object): void; + /** + * Enables obtaining appointment property values in a client-side script. Executes the callback command with the AppointmentData identifier. + * @param aptId An integer, representing the appointment ID. + * @param propertyNames An array of strings, representing the appointment properties to query. + * @param onCallBack A handler of a function which will receive and process the properties' values. + */ + GetAppointmentProperties(aptId: number, propertyNames: string[], onCallBack: Object): string[]; + /** + * Initiates a callback to retrieve and apply the values for the specified list of properties to the specified appointment, and transfer control to the specified function. + * @param clientAppointment An ASPxClientAppointment object that is the client appointment for which the data is retrieved. + * @param propertyNames An array of strings, that are the names of appointment properties to query. + * @param onCallBack A handler of a function executed after a callback. + */ + RefreshClientAppointmentProperties(clientAppointment: ASPxClientAppointment, propertyNames: string[], onCallBack: Object): void; + /** + * Client-side function that invokes the editing form for the appointment specified by its client ID. + * @param aptClientId A string, representing the appointment client identifier. + */ + ShowAppointmentFormByClientId(aptClientId: string): void; + /** + * Client-side function that invokes the editing form for the appointment specified by its storage identifier. + * @param aptServerId A string, representing the appointment identifier. + */ + ShowAppointmentFormByServerId(aptServerId: string): void; + /** + * Sets the time of the day corresponding to the start of the topmost displayed time cell row. + * @param duration An integer, representing the number of milliseconds passed since the start of the day. + * @param viewType An ASPxSchedulerViewType enumeration member, representing the scheduler's View. It can be either 'Day' or 'WorkWeek'. + */ + SetTopRowTime(duration: number, viewType: ASPxSchedulerViewType): void; + /** + * Sets the time of the day corresponding to the start of the topmost displayed time cell row. + * @param duration An integer, representing the number of milliseconds passed since the start of the day. + */ + SetTopRowTime(duration: number): void; + /** + * Gets the time of the day corresponding to the start of the topmost displayed time cell row. + * @param viewType An ASPxSchedulerViewType enumeration member, representing the scheduler's View. It can be either "Day" or "WorkWeek", otherwise the result is undefined. + */ + GetTopRowTime(viewType: ASPxSchedulerViewType): number; + /** + * Gets the time of day corresponding to the start of the topmost displayed time cell row. + */ + GetTopRowTime(): number; + /** + * Client-side scripting method which displays the Loading Panel. + */ + ShowLoadingPanel(): void; + /** + * Client-side scripting method which hides the Loading Panel from view. + */ + HideLoadingPanel(): void; + /** + * Client-side method that invokes the inplace editor form to create a new appointment. + * @param start A date object, representing the start of the new appointment. + * @param end A date object, representing the end of the new appointment. + */ + ShowInplaceEditor(start: Date, end: Date): void; + /** + * Client-side method that invokes the inplace editor form to create a new appointment. + * @param start A date object, representing the start of the new appointment. + * @param end A date object, representing the end of the new appointment. + * @param resourceId An object representing the identifier of a resource associated with the new appointment. + */ + ShowInplaceEditor(start: Date, end: Date, resourceId: string): void; + /** + * Client-side scripting method to insert the specified appointment. + * @param apt An ASPxClientAppointment object representing the client-side appointment. + */ + InsertAppointment(apt: ASPxClientAppointment): void; + /** + * Client-side scripting method to update the specified appointment. + * @param apt An ASPxClientAppointment object representing the client-side appointment. + */ + UpdateAppointment(apt: ASPxClientAppointment): void; + /** + * Client-side scripting method to delete the specified appointment. + * @param apt An ASPxClientAppointment object representing the client-side appointment. + */ + DeleteAppointment(apt: ASPxClientAppointment): void; + /** + * Client-side method that allows retrieving a collection of time intervals displayed by the ASPxScheduler. + */ + GetVisibleIntervals(): ASPxClientTimeInterval[]; + /** + * Changes the container that the ASPxScheduler tooltip belongs to. + * @param container An object that serves as the new container for the pop-up menu. + */ + ChangeToolTipContainer(container: Object): void; + /** + * Changes the container that the ASPxScheduler pop-up menu belongs to. + * @param container An object that serves as the new container for the pop-up menu. + */ + ChangePopupMenuContainer(container: Object): void; + /** + * Returns focus to the form if the ASPxScheduler control is not visible when the reminder fires. + * @param container A DIV object that is located in such a way that it is visible on the page in situations when the ASPxScheduler control is hidden. + */ + ChangeFormContainer(container: Object): void; + /** + * Client-side scripting method that saves appointment modifications and closes the form. + */ + AppointmentFormSave(): void; + /** + * Client-side scripting method that deletes the appointment being edited. + */ + AppointmentFormDelete(): void; + /** + * Client-side scripting method that cancels changes and closes the appointment editing form. + */ + AppointmentFormCancel(): void; + /** + * Client-side scripting method that navigates the scheduler to the date selected in the GotoDate form and closes the form. + */ + GoToDateFormApply(): void; + /** + * Client-side scripting method that cancels changes and closes the GotoDate form. + */ + GoToDateFormCancel(): void; + /** + * Client-side scripting method that cancels changes and closes the form. + */ + InplaceEditFormSave(): void; + /** + * Client-side scripting method that cancels changes and closes the form. + */ + InplaceEditFormCancel(): void; + /** + * Client-side scripting method that invokes the appointment editing form for the appointment being edited in the inplace editor. + */ + InplaceEditFormShowMore(): void; + /** + * Client-side scripting method that closes the Reminder form. + */ + ReminderFormCancel(): void; + /** + * Client-side scripting method that calls the Dismiss method for the selected reminder. + */ + ReminderFormDismiss(): void; + /** + * Client-side scripting method that dismisses all reminders shown in the Reminder form. + */ + ReminderFormDismissAll(): void; + /** + * Client-side scripting method that changes the alert time for the selected reminder to the specified interval. + */ + ReminderFormSnooze(): void; +} +/** + * Represents a client-side equivalent of the SchedulerViewType object. + */ +interface ASPxSchedulerViewType { + /** + * Gets a string representation equivalent of Day enumeration for use in client scripts. + * Value: A string "Day", indicating the DayView. + */ + Day: string; + /** + * Gets a string representation equivalent of WorkWeek enumeration for use in client scripts. + * Value: A string "WorkWeek", indicating the WorkWeekView. + */ + WorkWeek: string; + /** + * Gets a string representation equivalent of Week enumeration for use in client scripts. + * Value: A string "Week", indicating the WeekView. + */ + Week: string; + /** + * Gets a string representation equivalent of Month enumeration for use in client scripts. + * Value: A string "Month", indicating the MonthView. + */ + Month: string; + /** + * Gets a string representation equivalent of Timeline enumeration for use in client scripts. + * Value: A string "Timeline", indicating the TimelineView. + */ + Timeline: string; + /** + * Gets a string representation equivalent of FullWeek enumeration for use in client scripts. + * Value: A string "FullWeek", indicating the FullWeekView. + */ + FullWeek: string; +} +/** + * Represents a client-side equivalent of the SchedulerGroupType enumeration. + */ +interface ASPxSchedulerGroupType { + /** + * Gets a string representation equivalent of None enumeration for use in client scripts. + * Value: A "None" string value. + */ + None: string; + /** + * Gets a string representation equivalent of Date enumeration for use in client scripts. + * Value: A "Date" string value. + */ + Date: string; + /** + * Gets a string representation equivalent of Resource enumeration for use in client scripts. + * Value: A "Resource" string value. + */ + Resource: string; +} +/** + * Represents a client-side equivalent of the AppointmentType enumeration. + */ +interface ASPxAppointmentType { + /** + * Gets a string representation equivalent of Normal enumeration for use in client scripts. + * Value: A "Normal" string value. + */ + Normal: string; + /** + * Gets a string representation equivalent of Pattern enumeration for use in client scripts. + * Value: A "Pattern" string value. + */ + Pattern: string; + /** + * Gets a string representation equivalent of Occurrence enumeration for use in client scripts. + * Value: An "Occurrence" string value. + */ + Occurrence: string; + /** + * Gets a string representation equivalent of ChangedOccurrence enumeration for use in client scripts. + * Value: A "ChangedOccurrence" string value. + */ + ChangedOccurrence: string; + /** + * Gets a string representation equivalent of DeletedOccurrence enumeration for use in client scripts. + * Value: A "DeletedOccurrence" string value. + */ + DeletedOccurrence: string; +} +interface ASPxClientAppointmentDeletingEventHandler { + /** + * A method that will handle the AppointmentDeleting event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A ASPxClientAppointmentDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentDeletingEventArgs): void; +} +/** + * Provides data for the AppointmentDeleting event. + */ +interface ASPxClientAppointmentDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets client IDs of the appointments that are intended to be removed. + * Value: An array of client appointment identifiers, representing appointments passed for deletion. + */ + appointmentIds: Object[]; +} +interface AppointmentClickEventHandler { + /** + * A method that will handle the AppointmentClick event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A AppointmentClickEventArgs object that contains event data. + */ + (source: S, e: AppointmentClickEventArgs): void; +} +/** + * Provides data for the AppointmentDoubleClick events. + */ +interface AppointmentClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the client appointment ID for the appointment being clicked. + * Value: A string, representing the client ID of the appointment. + */ + appointmentId: string; + /** + * Gets the HTML element that the event was triggered on. + * Value: An object containing event data. + */ + htmlElement: Object; + /** + * Gets or sets whether an event is handled, and that default actions are not required. + * Value: true if no default processing is required; otherwise, false. + */ + handled: boolean; +} +/** + * A method that will handle the AppointmentsSelectionChanged event. + */ +interface AppointmentsSelectionEventHandler { + /** + * A method that will handle the AppointmentsSelectionChanged event. + * @param source The ASPxScheduler control which fires the event. + * @param e A AppointmentsSelectionEventArgs object that contains event data. + */ + (source: S, e: AppointmentsSelectionEventArgs): void; +} +/** + * Provides data for the AppointmentsSelectionChanged event. + */ +interface AppointmentsSelectionEventArgs extends ASPxClientEventArgs { + /** + * Gets identifiers of the selected appointments. + * Value: A comma separated list of string values, representing appointment IDs. + */ + appointmentIds: string[]; +} +/** + * A method that will handle the ActiveViewChanging event. + */ +interface ActiveViewChangingEventHandler { + /** + * A method that will handle the ActiveViewChanging event. + * @param source The ASPxClientScheduler control which fires the event. + * @param e An ActiveViewChangingEventArgs object that contains event data + */ + (source: S, e: ActiveViewChangingEventArgs): void; +} +/** + * Provides data for the client-side ActiveViewChanging event. + */ +interface ActiveViewChangingEventArgs extends ASPxClientEventArgs { + /** + * Gets the value of the ActiveView property before modification. + * Value: A SchedulerViewType enumeration. + */ + oldView: ASPxSchedulerViewType; + /** + * Gets the new value of the ActiveView property. + * Value: A string, which is the SchedulerViewType enumeration value. + */ + newView: ASPxSchedulerViewType; + /** + * Gets or sets whether the change of active view should be canceled. + * Value: true to cancel the operation; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the MoreButtonClicked event. + */ +interface MoreButtonClickedEventHandler { + /** + * A method that will handle MoreButtonClicked event. + * @param source The ASPxClientScheduler control which fires the event. + * @param e A MoreButtonClickedEventArgs object that contains event data. + */ + (source: S, e: MoreButtonClickedEventArgs): void; +} +/** + * Provides data for the MoreButtonClicked client-side event. + */ +interface MoreButtonClickedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the Start or End values of the target appointment. + * Value: A DateTime value representing the target appointment's boundary. + */ + targetDateTime: Date; + /** + * Gets the time interval of the cell where the button is located. + * Value: An ASPxClientTimeInterval object representing the time interval of the cell which holds the button. + */ + interval: ASPxClientTimeInterval; + /** + * Gets the resource identifier associated with the cell where the button is located. + * Value: A string, corresponding to ResourceId. + */ + resource: string; + /** + * Gets or sets whether an event is handled. If it is handled, default actions are not required. + * Value: true if no default processing is required; otherwise, false. + */ + handled: boolean; +} +/** + * A method that will handle the MenuItemClicked event. + */ +interface MenuItemClickedEventHandler { + /** + * A method that will handle the MenuItemClicked event. + * @param source The ASPxClientScheduler control which fires the event. + * @param e A MenuItemClickedEventArgs object that contains event data. + */ + (source: S, e: MenuItemClickedEventArgs): void; +} +/** + * Provides data for the MenuItemClicked event. + */ +interface MenuItemClickedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the menu item which is clicked. + * Value: A string, containing the menu item name. + */ + itemName: string; + /** + * Gets or sets whether an event is handled, and that default actions are not required. + * Value: true if no default processing is required; otherwise, false. + */ + handled: boolean; +} +interface AppointmentDropEventHandler { + /** + * A method that will handle the AppointmentDrop event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A ASPxClientAppointmentDragEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentDragEventArgs): void; +} +/** + * Provides data for the AppointmentDrop event. + */ +interface ASPxClientAppointmentDragEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether default event processing is required. + * Value: true to process an event using only custom code; otherwise, false. + */ + handled: boolean; + /** + * Provides access to an object that enables you to choose an operation to perform. + * Value: An ASPxClientAppointmentOperation object providing methods to perform the required operation. + */ + operation: ASPxClientAppointmentOperation; + /** + * Provides information about dragged appointments. + * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dragged appointments. + */ + dragInformation: ASPxClientAppointmentDragInfo[]; +} +interface AppointmentResizeEventHandler { + /** + * A method that will handle the AppointmentResize event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A ASPxClientAppointmentResizeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentResizeEventArgs): void; +} +/** + * Provides data for the AppointmentResize event. + */ +interface ASPxClientAppointmentResizeEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether default event processing is required. + * Value: true to process an event using only custom code; otherwise, false. + */ + handled: boolean; + /** + * Provides access to an object that enables you to choose an operation to perform. + * Value: An ASPxClientAppointmentOperation object providing methods to perform the required operation. + */ + operation: ASPxClientAppointmentOperation; + /** + * Gets the resized appointment's identifier. + * Value: A string containing an appointment identifier. + */ + appointmentId: string; + /** + * Gets the appointment's interval before resizing. + * Value: An object representing the interval assigned to the appointment. + */ + oldInterval: ASPxClientTimeInterval; + /** + * Gets the appointment's interval after resizing. + * Value: An object representing the interval assigned to the appointment. + */ + newInterval: ASPxClientTimeInterval; +} +/** + * Stores information about an appointment drag operation. + */ +interface ASPxClientAppointmentDragInfo { + /** + * Gets the dragged appointment's identifier. + * Value: A string containing an appointment identifier. + */ + appointmentId: string; + /** + * Gets the appointment's interval before the drag operation. + * Value: An object representing the interval assigned to the appointment. + */ + oldInterval: ASPxClientTimeInterval; + /** + * Gets resources that were associated with the appointment before the drag operation. + * Value: A array of strings containing resource identifiers. + */ + oldResources: string[]; + /** + * Gets the appointment's interval after the drag operation. + * Value: An object representing the interval assigned to the appointment. + */ + newInterval: ASPxClientTimeInterval; + /** + * Gets resources associated with the appointment after the drag operation. + * Value: An array of strings containing resource identifiers. + */ + newResources: string[]; +} +/** + * Contains information about a client tooltip. + */ +interface ASPxClientSchedulerToolTipData { + /** + * Returns the client appointment for which the tooltip is displayed. + */ + GetAppointment(): ASPxClientAppointment; + /** + * Returns the client time interval for which the tooltip is displayed. + */ + GetInterval(): ASPxClientTimeInterval; + /** + * Returns the resources associated with the appointment for which the tooltip is displayed. + */ + GetResources(): Object[]; +} +/** + * A client-side equivalent of the ASPxSchedulerToolTipBase control. + */ +interface ASPxClientToolTipBase { + /** + * Returns the value that indicates whether or not the tooltip can be displayed. + */ + CanShowToolTip(): boolean; + /** + * Ends updating the tooltip content. + * @param toolTipData An ASPxClientSchedulerToolTipData object providing data required to update the tooltip content. + */ + FinalizeUpdate(toolTipData: ASPxClientSchedulerToolTipData): void; + /** + * Updates the tooltip content. + * @param toolTipData An ASPxClientSchedulerToolTipData object providing data required to update the tooltip content. + */ + Update(toolTipData: ASPxClientSchedulerToolTipData): void; + /** + * Closes the tooltip. + */ + Close(): void; + /** + * + * @param bounds + */ + CalculatePosition(bounds: Object): ASPxClientPoint; + /** + * Displays the Appointment Menu in the position of the tooltip. + * @param eventObject An object containing information about the event on which the menu is displayed. + */ + ShowAppointmentMenu(eventObject: Object): void; + /** + * Displays the View Menu in the position of the tooltip. + * @param eventObject An object containing information about the event on which the menu is displayed. + */ + ShowViewMenu(eventObject: Object): void; + /** + * Returns the string representation of the specified interval. + * @param interval An ASPxClientTimeInterval object to convert. + */ + ConvertIntervalToString(interval: ASPxClientTimeInterval): string; +} +/** + * Represents the client-side equivalent of the ASPxSpellChecker class. + */ +interface ASPxClientSpellChecker extends ASPxClientControl { + /** + * Client-side event that occurs before the spell check starts. + */ + BeforeCheck: ASPxClientEvent>; + /** + * Client-side event that occurs before a message box informing about process completion is shown. + */ + CheckCompleteFormShowing: ASPxClientEvent>; + /** + * Client-side event that occurs when a spell check is finished. + */ + AfterCheck: ASPxClientEvent>; + /** + * Occurs after a word is changed in a checked text. + */ + WordChanged: ASPxClientEvent>; + /** + * Starts the spelling check of the text contained within the element specified by the CheckedElementID value. + */ + Check(): void; + /** + * Starts checking contents of the specified element. + * @param element An object representing the element being checked. + */ + CheckElement(element: Object): void; + /** + * Starts checking contents of the specified element. + * @param id A string representing the identifier of the element being checked. + */ + CheckElementById(id: string): void; + /** + * Starts checking the contents of controls in the specified container. + * @param containerElement An object representing a control which contains elements being checked. + */ + CheckElementsInContainer(containerElement: Object): void; + /** + * Starts checking the contents of controls in the specified container. + * @param containerId A string, specifying the control's identifier. + */ + CheckElementsInContainerById(containerId: string): void; +} +/** + * Represents an object that will handle the client-side BeforeCheck event. + */ +interface ASPxClientBeforeCheckEventHandler { + /** + * A method that will handle the BeforeCheck event. + * @param source The ASPxClientSpellChecker control which fires the event. + * @param e A ASPxClientSpellCheckerBeforeCheckEventArgs object that contains event data + */ + (source: S, e: ASPxClientSpellCheckerBeforeCheckEventArgs): void; +} +/** + * Provides data for an event that occurs before a spelling check is started. Represents the client-side equivalent of the BeforeCheckEventArgs class. + */ +interface ASPxClientSpellCheckerBeforeCheckEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the programmatic identifier assigned to the control which is going to be checked. + * Value: A string, containing the control's identifier. + */ + controlId: string; +} +/** + * Represents an object that will handle the client-side AfterCheck event. + */ +interface ASPxClientAfterCheckEventHandler { + /** + * A method that will handle the AfterCheck event. + * @param source The ASPxClientSpellChecker control which fires the event. + * @param e A ASPxClientSpellCheckerAfterCheckEventArgs object that contains event data + */ + (source: S, e: ASPxClientSpellCheckerAfterCheckEventArgs): void; +} +/** + * Provides data for the client event that occurs after a spelling check is complete. + */ +interface ASPxClientSpellCheckerAfterCheckEventArgs extends ASPxClientEventArgs { + /** + * Gets the programmatic identifier assigned to the control which has been checked. + * Value: A string, containing the control's identifier. + */ + controlId: string; + /** + * Gets the text that has been checked. + * Value: A string, containing checked text. + */ + checkedText: string; +} +/** + * Represents an object that will handle the client-side WordChanged event. + */ +interface ASPxClientWordChangedEventHandler { + /** + * A method that will handle the AfterCheck event. + * @param source The event source. + * @param e An ASPxClientSpellCheckerAfterCheckEventArgs object which contains event data. + */ + (source: S, e: ASPxClientSpellCheckerAfterCheckEventArgs): void; +} +/** + * A method that will handle the CustomCommandExecuted event. + */ +interface ASPxClientSpreadsheetCustomCommandExecutedEventHandler { + /** + * A method that will handle the CustomCommandExecuted event. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e A ASPxClientSpreadsheetCustomCommandExecutedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetCustomCommandExecutedEventArgs): void; +} +/** + * Provides data for the CustomCommandExecuted event. + */ +interface ASPxClientSpreadsheetCustomCommandExecutedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: string; + item: ASPxClientRibbonItem; +} +/** + * A method that will handle the DocumentChanged event. + */ +interface ASPxClientSpreadsheetDocumentChangedEventHandler { + /** + * A method that will handle the DocumentChanged event. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e A ASPxClientSpreadsheetDocumentChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetDocumentChangedEventArgs): void; +} +/** + * Provides data for the DocumentChanged event. + */ +interface ASPxClientSpreadsheetDocumentChangedEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the EndSynchronization events. + */ +interface ASPxClientSpreadsheetSynchronizationEventHandler { + /** + * A method that will handle the EndSynchronization events. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e A ASPxClientSpreadsheetSynchronizationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetSynchronizationEventArgs): void; +} +/** + * Provides data for the EndSynchronization events. + */ +interface ASPxClientSpreadsheetSynchronizationEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the HyperlinkClick event. + */ +interface ASPxClientSpreadsheetHyperlinkClickEventHandler { + /** + * A method that will handle the HyperlinkClick event. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e An ASPxClientSpreadsheetHyperlinkClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetHyperlinkClickEventArgs): void; +} +/** + * Provides data for the HyperlinkClick event. + */ +interface ASPxClientSpreadsheetHyperlinkClickEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value that specifies whether the event is handled, and the default processing is not required. + * Value: true, if if the event is completely handled by custom code and no default processing is required; otherwise, false. + */ + handled: boolean; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; + /** + * Gets a value identifying the clicked hyperlink type. + * Value: One of the values. + */ + hyperlinkType: ASPxClientOfficeDocumentLinkType; + /** + * Gets the clicked link's URI. + * Value: A sting value specifying the link's URI. + */ + targetUri: string; +} +/** + * A client-side equivalent of the ASPxSpreadsheet object. + */ +interface ASPxClientSpreadsheet extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientSpreadsheet. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client when a selection is changed in the ASPxSpreadsheet. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs after a custom command has been executed on the client side. + */ + CustomCommandExecuted: ASPxClientEvent>; + /** + * Fires if any change is made to the Spreadsheet's document on the client. + */ + DocumentChanged: ASPxClientEvent>; + /** + * Fires after a client change has been made to the document and the client-server synchronization starts to apply the change on the server. + */ + BeginSynchronization: ASPxClientEvent>; + /** + * Fires after a document change has been applied to the server and server and client document models have been synchronized. + */ + EndSynchronization: ASPxClientEvent>; + /** + * Occurs on the client side after a hyperlink is clicked within the Spreadsheet's document. + */ + HyperlinkClick: ASPxClientEvent>; + /** + * Sets input focus to the Spreadsheet. + */ + Focus(): void; + /** + * Gets access to the client ribbon object. + */ + GetRibbon(): ASPxClientRibbon; + /** + * Enables you to switch the full-screen mode of the Spreadsheet. + * @param fullscreen true to activate full-screen mode; false to deactivate full-screen mode. + */ + SetFullscreenMode(fullscreen: boolean): void; + /** + * Returns the current selection made in a Spreadsheet. + */ + GetSelection(): ASPxClientSpreadsheetSelection; + /** + * Indicates whether any unsaved changes are contained in the current document. + */ + HasUnsavedChanges(): boolean; + /** + * Gets the value of the specified cell. + * @param colModelIndex An integer value specifying the cell's column index. + * @param rowModelIndex An integer value specifying the cell's row index. + */ + GetCellValue(colModelIndex: number, rowModelIndex: number): Object; + /** + * Gets the value of the currently active cell. + */ + GetActiveCellValue(): Object; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side DocumentCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side DocumentCallback event. + */ + PerformDocumentCallback(parameter: string): void; + /** + * Reconnects the Spreadsheet to an external ribbon. + */ + ReconnectToExternalRibbon(): void; +} +/** + * A method that will handle the client SelectionChanged event. + */ +interface ASPxClientSpreadsheetSelectionChangedEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientSpreadsheetSelectionChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetSelectionChangedEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientSpreadsheetSelectionChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets an object that determines the currently selected region within the Spreadsheet. + * Value: A object defining the current selection. + */ + selection: ASPxClientSpreadsheetSelection; +} +/** + * Represents the selection in the Spreadsheet. + */ +interface ASPxClientSpreadsheetSelection { + /** + * Gets the column index of the active cell. + * Value: An integer value specifying the active cell column index. + */ + activeCellColumnIndex: number; + /** + * Gets the row index of the active cell. + * Value: An integer value specifying the active cell row index. + */ + activeCellRowIndex: number; + /** + * Gets the index of the selection's left column. + * Value: An integer value specifying the index of the left column within the selection. + */ + leftColumnIndex: number; + /** + * Gets the index of the selection's top row. + * Value: An integer value specifying the index of the top row within the selection. + */ + topRowIndex: number; + /** + * Gets the index of the selection's right column. + * Value: An integer value specifying the index of the right column within the selection. + */ + rightColumnIndex: number; + /** + * Gets the index of the selection's bottom row. + * Value: An integer value specifying the index of the bottom row within the selection. + */ + bottomRowIndex: number; +} +/** + * Represents the client ASPxTreeList. + */ +interface ASPxClientTreeList extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientTreeList. + */ + CallbackError: ASPxClientEvent>; + /** + * Enables you to display a context menu. + */ + ContextMenu: ASPxClientEvent>; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires before the focused node has been changed. + */ + NodeFocusing: ASPxClientEvent>; + /** + * Fires in response to changing node focus. + */ + FocusedNodeChanged: ASPxClientEvent>; + /** + * Fires after the selection has been changed via end-user interaction. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Fires after the Customization Window has been closed. + */ + CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Fires after the callback has been processed in the CustomDataCallback event handler. + */ + CustomDataCallback: ASPxClientEvent>; + /** + * Fires on the client when a node is clicked. + */ + NodeClick: ASPxClientEvent>; + /** + * Fires on the client when a node is double clicked. + */ + NodeDblClick: ASPxClientEvent>; + /** + * Fires before a node is expanded. + */ + NodeExpanding: ASPxClientEvent>; + /** + * Fires before a node is collapsed. + */ + NodeCollapsing: ASPxClientEvent>; + /** + * Occurs before a node is dragged by an end-user. + */ + StartDragNode: ASPxClientEvent>; + /** + * Occurs after a node drag and drop operation is completed. + */ + EndDragNode: ASPxClientEvent>; + /** + * Enables you to prevent columns from being resized. + */ + ColumnResizing: ASPxClientEvent>; + /** + * Occurs after a column's width has been changed by an end-user. + */ + ColumnResized: ASPxClientEvent>; + /** + * Sets input focus to the ASPxTreeList. + */ + Focus(): void; + /** + * Gets the Popup Edit Form. + */ + GetPopupEditForm(): ASPxClientPopupControl; + /** + * Returns the focused node's key value. + */ + GetFocusedNodeKey(): string; + /** + * Moves focus to the specified node. + * @param key A String value that uniquely identifies the node. + */ + SetFocusedNodeKey(key: string): void; + /** + * Indicates whether the specified node is selected. + * @param nodeKey A String value that identifies the node by its key value. + */ + IsNodeSelected(nodeKey: string): any; + /** + * Selects the specified node. + * @param nodeKey A string value that identifies the node. + */ + SelectNode(nodeKey: string): void; + /** + * Selects or deselects the specified node. + * @param nodeKey A string value that identifies the node. + * @param state true to select the node; otherwise, false. + */ + SelectNode(nodeKey: string, state: boolean): void; + /** + * Obtains key values of selected nodes that are displayed within the current page. + */ + GetVisibleSelectedNodeKeys(): string[]; + /** + * Indicates whether the Customization Window is displayed. + */ + IsCustomizationWindowVisible(): boolean; + /** + * Invokes the Customization Window. + */ + ShowCustomizationWindow(): void; + /** + * Invokes the Customization Window and displays it over the specified HTML element. + * @param htmlElement An object that specifies the HTML element relative to whose position the customization window is invoked. + */ + ShowCustomizationWindow(htmlElement: Object): void; + /** + * Closes the Customization Window. + */ + HideCustomizationWindow(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCustomCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + */ + PerformCustomDataCallback(arg: string): void; + /** + * Obtains specified data source field values within a specified node, and submits them to the specified JavaScript function. + * @param nodeKey A string value that identifies the node. + * @param fieldNames A string value that contains the names of data source fields whose values within the specified node are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetNodeValues(nodeKey: string, fieldNames: string, onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within a specified node, and submits them to the specified JavaScript function. + * @param nodeKey A string value that identifies the node. + * @param fieldNames The names of data source fields whose values within the specified node are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetNodeValues(nodeKey: string, fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within nodes that are displayed within the current page, and submits them to the specified JavaScript function. + * @param fieldNames A string value that contains the names of data source fields whose values within visible nodes are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetVisibleNodeValues(fieldNames: string, onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within nodes that are displayed within the current page, and submits them to the specified JavaScript function. + * @param fieldNames The names of data source fields whose values within visible nodes are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetVisibleNodeValues(fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames A string value that contains the names of data source fields whose values within selected nodes are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetSelectedNodeValues(fieldNames: string, onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames The names of data source fields whose values within selected nodes are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetSelectedNodeValues(fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames A string value that contains the names of data source fields whose values within selected nodes are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + * @param visibleOnly true to return values within selected nodes that are displayed within the current page; false to return values within all selected nodes. + */ + GetSelectedNodeValues(fieldNames: string, onCallback: ASPxClientTreeListValuesCallback, visibleOnly: boolean): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames The names of data source fields whose values within selected nodes are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + * @param visibleOnly true to return values within selected nodes that are displayed within the current page; false to return values within all selected nodes. + */ + GetSelectedNodeValues(fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback, visibleOnly: boolean): void; + /** + * Selects the specified page. + * @param index An integer value that specifies the active page's index. + */ + GoToPage(index: number): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the ASPxTreeList's data is divided. + */ + GetPageCount(): number; + /** + * Returns the specified node's state. + * @param nodeKey A String value that identifies the node. + */ + GetNodeState(nodeKey: string): string; + /** + * Expands all nodes. + */ + ExpandAll(): void; + /** + * Collapses all Node. + */ + CollapseAll(): void; + /** + * Expands the specified node preserving the collapsed state of child nodes. + * @param key A String value that uniquely identifies the node. + */ + ExpandNode(key: string): void; + /** + * Collapses the specified node preserving the expanded state of child nodes. + * @param key A String value that uniquely identifies the node. + */ + CollapseNode(key: string): void; + /** + * Obtains key values of nodes that are displayed within the current page. + */ + GetVisibleNodeKeys(): string[]; + /** + * Returns an HTML table row that represents the specified node. + * @param nodeKey A string value that identifies the node. + */ + GetNodeHtmlElement(nodeKey: string): Object; + /** + * Returns the number of visible columns within the client ASPxTreeList. + */ + GetVisibleColumnCount(): number; + /** + * Returns the number of columns within the client ASPxTreeList. + */ + GetColumnCount(): number; + /** + * Returns the column located at the specified position within the Columns collection. + * @param index An integer value that identifies the column within the collection (the column's Index property value). + */ + GetColumnByIndex(index: number): ASPxClientTreeListColumn; + /** + * Returns the column with the specified name. + * @param name A string value that specifies the column's name (the column's Name property value). + */ + GetColumnByName(name: string): ASPxClientTreeListColumn; + /** + * Returns the client column which is bound to the specified data source field. + * @param fieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). + */ + GetColumnByFieldName(fieldName: string): ASPxClientTreeListColumn; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + SortBy(columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + */ + SortBy(columnIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param nameOrFieldName A String value that specifies the column's name or field name. + */ + SortBy(nameOrFieldName: string): void; + /** + * Sorts data by the specified data column's values. + * @param nameOrFieldName A String value that specifies the column's name or field name. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + */ + SortBy(nameOrFieldName: string, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param nameOrFieldName A String value that specifies the column's name or field name. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(nameOrFieldName: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column. + */ + SortBy(column: ASPxClientTreeListColumn): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + */ + SortBy(column: ASPxClientTreeListColumn, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(column: ASPxClientTreeListColumn, sortOrder: string, reset: boolean): void; + /** + * Switches the ASPxTreeList to edit mode. + * @param nodeKey A string value that identifies the node by its key value. + */ + StartEdit(nodeKey: string): void; + /** + * Saves all the changes made and switches the ASPxTreeList to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the ASPxTreeList to browse mode. + */ + CancelEdit(): void; + /** + * Indicates whether the ASPxTreeList is in edit mode. + */ + IsEditing(): boolean; + /** + * Gets the key value of the node currently being edited. + */ + GetEditingNodeKey(): string; + /** + * Moves the specified node to a new position. + * @param nodeKey A string value that identifies the target node by its key value. + * @param parentNodeKey A string value that identifies the node to whose child collection the target node is moved. An empty string to display the target node within the root. + */ + MoveNode(nodeKey: string, parentNodeKey: string): void; + /** + * Deletes the specified node. + * @param nodeKey A string value that identifies the node. + */ + DeleteNode(nodeKey: string): void; + /** + * Switches the ASPxTreeList to edit mode and allows new root node values to be edited. + */ + StartEditNewNode(): void; + /** + * Switches the ASPxTreeList to edit mode and allows new node values to be edited. + * @param parentNodeKey A String value that identifies the parent node, which owns a new node. + */ + StartEditNewNode(parentNodeKey: string): void; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + */ + GetEditor(column: ASPxClientTreeListColumn): Object; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that identifies the column by its position within the column collection. + */ + GetEditor(columnIndex: number): Object; + /** + * Returns the editor used to edit the specified column's values. + * @param columnNameOrFieldName A String value that identifies the column by its name or field name. + */ + GetEditor(columnNameOrFieldName: string): Object; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + */ + GetEditValue(column: ASPxClientTreeListColumn): Object; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column by its index within the ASPxTreeList's column collection. + */ + GetEditValue(columnIndex: number): Object; + /** + * Returns the value of the specified edit cell. + * @param columnNameOrFieldName A String value that identifies the column by its name or field name. + */ + GetEditValue(columnNameOrFieldName: string): Object; + /** + * Sets the value of the specified edit cell. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + * @param value An object that specifies the edit cell's new value. + */ + SetEditValue(column: ASPxClientTreeListColumn, value: Object): void; + /** + * Sets the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column by its index within the ASPxTreeList's column collection. + * @param value An object that specifies the edit cell's new value. + */ + SetEditValue(columnIndex: number, value: Object): void; + /** + * Sets the value of the specified edit cell. + * @param columnNameOrFieldName A String value that identifies the column by its name or field name. + * @param value An object that specifies the edit cell's new value. + */ + SetEditValue(columnNameOrFieldName: string, value: Object): void; + /** + * Moves focus to the specified editor within the edited node. + * @param column A ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + */ + FocusEditor(column: ASPxClientTreeListColumn): void; + /** + * Moves focus to the specified editor within the edited node. + * @param columnIndex An integer value that identifies the data column. + */ + FocusEditor(columnIndex: number): void; + /** + * Moves focus to the specified editor within the edited node. + * @param columnNameOrFieldName A String value that specifies the column's name or field name. + */ + FocusEditor(columnNameOrFieldName: string): void; + /** + * Scrolls the tree list so that the specified node becomes visible. + * @param nodeKey An integer value that specifies the node index within the tree list's client item list. + */ + MakeNodeVisible(nodeKey: string): void; + /** + * Returns the current vertical scroll position of the tree list's content. + */ + GetVerticalScrollPosition(): number; + /** + * Returns the current horizontal scroll position of the tree list's content. + */ + GetHorizontalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the tree list's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Specifies the horizontal scroll position for the tree list's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorizontalScrollPosition(position: number): void; +} +/** + * Represents a client column. + */ +interface ASPxClientTreeListColumn { + /** + * Gets the column's position within the collection. + * Value: An integer zero-bazed index that specifies the column's position within the collection. + */ + index: number; + /** + * Gets the name that uniquely identifies the column. + * Value: A string value assigned to the column's Name property. + */ + name: string; + /** + * Gets the name of the database field assigned to the current column. + * Value: A String value that specifies the name of a data field. + */ + fieldName: string; +} +/** + * Provides data for the CustomDataCallback event. + */ +interface ASPxClientTreeListCustomDataCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets the information that has been collected on the client-side and sent to the server-side CustomDataCallback event. + * Value: A string value that represents the information that has been collected on the client-side and sent to the server-side CustomDataCallback event. + */ + arg: string; + /** + * Gets the information passed from the server-side CustomDataCallback event. + * Value: An object that represents the information passed from the server-side CustomDataCallback event. + */ + result: Object; +} +/** + * A method that will handle the CustomDataCallback event. + */ +interface ASPxClientTreeListCustomDataCallbackEventHandler { + /** + * A method that will handle the CustomDataCallback event. + * @param source The event source. + * @param e An ASPxClientTreeListCustomDataCallbackEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListCustomDataCallbackEventArgs): void; +} +/** + * Provides data for the NodeDblClick events. + */ +interface ASPxClientTreeListNodeEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed node's key value. + * Value: A String value that identifies the processed node. + */ + nodeKey: string; + /** + * Provides access to the parameters associated with the NodeDblClick events. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the NodeDblClick event. + */ +interface ASPxClientTreeListNodeEventHandler { + /** + * A method that will handle the NodeDblClick event. + * @param source The event source. + * @param e An ASPxClientTreeListNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListNodeEventArgs): void; +} +/** + * Provides data for the ContextMenu event. + */ +interface ASPxClientTreeListContextMenuEventArgs extends ASPxClientEventArgs { + /** + * Identifies which tree list element has been right-clicked. + * Value: A string value that identifies which tree list element ('Header' or 'Node') has been right-clicked. + */ + objectType: string; + /** + * Gets a value that identifies the right-clicked object. + * Value: The right-clicked object's identifier. + */ + objectKey: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that relates to the processed event. + */ + htmlEvent: Object; + /** + * Gets or sets whether to invoke the browser's context menu. + * Value: true to hide the browser's context menu; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the ContextMenu event. + */ +interface ASPxClientTreeListContextMenuEventHandler { + /** + * A method that will handle the ContextMenu event. + * @param source The event sender. + * @param e An ASPxClientTreeListContextMenuEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListContextMenuEventArgs): void; +} +/** + * Provides data for the StartDragNode event. + */ +interface ASPxClientTreeListStartDragNodeEventArgs extends ASPxClientTreeListNodeEventArgs { + /** + * Gets an array of targets where a node can be dragged. + * Value: An array of objects that represent targets for the dragged node. + */ + targets: Object[]; +} +/** + * A method that will handle the StartDragNode event. + */ +interface ASPxClientTreeListStartDragNodeEventHandler { + /** + * A method that will handle the StartDragNode event. + * @param source The event source. + * @param e An ASPxClientTreeListStartDragNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListStartDragNodeEventArgs): void; +} +/** + * Provides data for the EndDragNode event. + */ +interface ASPxClientTreeListEndDragNodeEventArgs extends ASPxClientTreeListNodeEventArgs { + /** + * Gets the target element. + * Value: An object that represents the target element to which the dragged node has been dropped. + */ + targetElement: Object; +} +/** + * A method that will handle the EndDragNode event. + */ +interface ASPxClientTreeListEndDragNodeEventHandler { + /** + * A method that will handle the EndDragNode event. + * @param source The event source. + * @param e An ASPxClientTreeListEndDragNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListEndDragNodeEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientTreeListCustomButtonEventArgs extends ASPxClientEventArgs { + /** + * Gets the key value of the node whose custom button has been clicked. + * Value: A string value that uniquely identifies the node whose custom button has been clicked. + */ + nodeKey: string; + /** + * Gets the button's index. + * Value: An integer value that specifies the button's position within the CustomButtons collection. + */ + buttonIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A String value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientTreeListCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. + * @param e An ASPxClientTreeListCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListCustomButtonEventArgs): void; +} +/** + * Represents a JavaScript function which receives the list of row values when a specific client method (such as the GetSelectedNodeValues) is called. + */ +interface ASPxClientTreeListValuesCallback { + /** + * A JavaScript function which receives the list of row values when a specific client method (such as the GetSelectedNodeValues) is called. + * @param result An object that represents the list of row values received from the server. + */ + (result: Object): void; +} +/** + * Provides data for the ColumnResizing event. + */ +interface ASPxClientTreeListColumnResizingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client column. + * Value: An object that is the processed column. + */ + column: ASPxClientTreeListColumn; +} +/** + * A method that will handle the client ColumnResizing event. + */ +interface ASPxClientTreeListColumnResizingEventHandler { + /** + * A method that will handle the ColumnResizing event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientTreeListColumnResizingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListColumnResizingEventArgs): void; +} +/** + * Provides data for the ColumnResized event. + */ +interface ASPxClientTreeListColumnResizedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the processed client column. + * Value: An object that is the processed column. + */ + column: ASPxClientTreeListColumn; +} +/** + * A method that will handle the client ColumnResized event. + */ +interface ASPxClientTreeListColumnResizedEventHandler { + /** + * A method that will handle the ColumnResized event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientTreeListColumnResizedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListColumnResizedEventArgs): void; +} +/** + * A client-side counterpart of the Calendar and CalendarFor extensions. + */ +interface MVCxClientCalendar extends ASPxClientCalendar { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * A client-side counterpart of the CallbackPanel extension. + */ +interface MVCxClientCallbackPanel extends ASPxClientCallbackPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the Callback Panel by processing the passed information on the server, in an Action specified by the Callback Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the Callback Panel by processing the passed information on the server, in an Action specified by the Callback Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the CardView extension. + */ +interface MVCxClientCardView extends ASPxClientCardView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the CardView by processing the passed information on the server, in an Action specified via the CardView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CardView's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the CardView by processing the passed information on the server, in an Action specified via the CardView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CardView's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the CardView's CustomDataActionRouteValues property, and then process the returned result in the specified client function. This method does not update the CardView. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback A ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(data: Object, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback An ASPxClientCardViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientCardViewValuesCallback): void; +} +/** + * A client-side counterpart of the Chart extension. + */ +interface MVCxClientChart extends ASPxClientWebChartControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update a Chart by processing the passed information on the server, in an Action specified via the Chart's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update a Chart by processing the passed information on the server, in an Action specified via the Chart's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the ComboBox and ComboBoxFor extensions. + */ +interface MVCxClientComboBox extends ASPxClientComboBox { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the ComboBox by processing the passed information on the server, in an Action specified by the ComboBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the ComboBox by processing the passed information on the server, in an Action specified by the ComboBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the DataView extension. + */ +interface MVCxClientDataView extends ASPxClientDataView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the DataView by processing the passed information on the server, in an Action specified via the DataView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the DataView by processing the passed information on the server, in an Action specified via the DataView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the DateEdit extension. + */ +interface MVCxClientDateEdit extends ASPxClientDateEdit { +} +/** + * A client-side counterpart of the DockManager extension. + */ +interface MVCxClientDockManager extends ASPxClientDockManager { + /** + * Sends a callback with a parameter to update the DockManager by processing the passed information on the server, in an Action specified by the DockManager's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the DockManager by processing the passed information on the server, in an Action specified by the DockManager's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the DockPanel extension. + */ +interface MVCxClientDockPanel extends ASPxClientDockPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the DockPanel by processing the passed information on the server, in an Action specified by the DockPanel's DockPanelSettings.CallbackRouteValues) property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the DockPanel by processing the passed information on the server, in an Action specified by the DockPanel's DockPanelSettings.CallbackRouteValues) property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side WindowCallback event, passing the specified argument to it. + * @param parameter A string value that is any information that needs to be sent to the server-side WindowCallback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the FileManager extension. + */ +interface MVCxClientFileManager extends ASPxClientFileManager { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the FileManager by processing the passed information on the server, in an Action specified via the extension's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the file manager's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param data A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the GridView extension. + */ +interface MVCxClientGridView extends ASPxClientGridView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the GridView by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the GridView by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the GridView's CustomDataActionRouteValues property, and then process the returned result in the specified client function. This method does not update the GridView. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(data: Object, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientGridViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientGridViewValuesCallback): void; +} +/** + * A client-side counterpart of the HtmlEditor extension. + */ +interface MVCxClientHtmlEditor extends ASPxClientHtmlEditor { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the HtmlEditor's CustomDataCallback event on the client. This method does not update the HtmlEditor. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + */ + PerformDataCallback(data: Object): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the HtmlEditor's CustomDataCallback event on the client. This method does not update the HtmlEditor. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback An ASPxClientDataCallback object that is the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(data: Object, onCallback: ASPxClientDataCallback): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientDataCallback object that represents the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; +} +/** + * A client-side counterpart of the ImageGallery extension. + */ +interface MVCxClientImageGallery extends ASPxClientImageGallery { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the ImageGallery by processing the passed information on the server, in an Action specified via the ImageGallery's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the ImageGallery by processing the passed information on the server, in an Action specified via the ImageGallery's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the ListBox and ListBoxFor extensions. + */ +interface MVCxClientListBox extends ASPxClientListBox { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the ListBox by processing the passed information on the server, in an Action specified by the ListBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the ListBox by processing the passed information on the server, in an Action specified by the ListBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server, and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the NavBar extension. + */ +interface MVCxClientNavBar extends ASPxClientNavBar { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * A client-side counterpart of the PivotGrid extension. + */ +interface MVCxClientPivotGrid extends ASPxClientPivotGrid { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the PivotGrid by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the PivotGrid by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Passes PivotGrid callback parameters to the specified object. + * @param obj An object that receives PivotGrid callback parameters. + */ + FillStateObject(obj: Object): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the PopupControl extension. + */ +interface MVCxClientPopupControl extends ASPxClientPopupControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the PopupControl by processing the passed information on the server, in an Action specified via the PopupControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the PopupControl by processing the passed information on the server, in an Action specified via the PopupControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameters to update the popup window by processing the related popup window and the passed information on the server, in an Action specified by the PopupControl's CallbackRouteValues property. + * @param window A ASPxClientPopupWindow object identifying the processed popup window. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformWindowCallback(window: ASPxClientPopupWindow, data: Object): void; + /** + * + * @param window + * @param parameter + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void; + /** + * Sends a callback with parameters to update the popup window by processing the related popup window and the passed information on the server. + * @param window A ASPxClientPopupWindow object identifying the processed popup window. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side WindowCallback event, passing the specified argument to it. + * @param parameter A string value that is any information that needs to be sent to the server-side WindowCallback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side equivalent of the MVCxDocumentViewer class. + */ +interface MVCxClientDocumentViewer extends ASPxClientDocumentViewer { + /** + * Occurs before performing a document export request. + */ + BeforeExportRequest: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * Obsolete. Use the MVCxClientDocumentViewer class instead. + */ +interface MVCxClientReportViewer extends ASPxClientReportViewer { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs before performing a document export request. + */ + BeforeExportRequest: ASPxClientEvent>; +} +/** + * A method that will handle the BeforeExportRequest event. + */ +interface MVCxClientBeforeExportRequestEventHandler { + /** + * A method that will handle the BeforeExportRequest event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientBeforeExportRequestEventArgs object that contains event data. + */ + (source: S, e: MVCxClientBeforeExportRequestEventArgs): void; +} +/** + * Provides data for client BeforeExportRequest events. + */ +interface MVCxClientBeforeExportRequestEventArgs extends ASPxClientEventArgs { + /** + * Gets an object containing specific information (if any, as name/value pairs) that should be passed as a request parameter from the client to the server side for further processing. + * Value: A hash table object containing named values to be passed from the client to the server side via request parameters. + */ + customArgs: Object; +} +/** + * A client-side equivalent of the MVCxReportDesigner class. + */ +interface MVCxClientReportDesigner extends ASPxClientReportDesigner { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after executing the Save command on the client. + */ + SaveCommandExecuted: ASPxClientEvent>; + /** + * Sends a callback to the server with the specified argument. + * @param arg A Object value, specifying the callback argument. + */ + PerformCallback(arg: Object): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server with the specified argument. + * @param arg A String value, specifying the callback argument. + */ + PerformCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; +} +/** + * A method that will handle the SaveCommandExecuted event. + */ +interface MVCxClientReportDesignerSaveCommandExecutedEventHandler { + /** + * A method that will handle the SaveCommandExecuted event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientBeforeExportRequestEventArgs object that contains event data. + */ + (source: S, e: MVCxClientReportDesignerSaveCommandExecutedEventArgs): void; +} +/** + * Provides data for the SaveCommandExecuted event. + */ +interface MVCxClientReportDesignerSaveCommandExecutedEventArgs extends ASPxClientEventArgs { + /** + * Returns the operation result. + * Value: A String value, specifying the operation result. + */ + Result: string; +} +/** + * A client-side counterpart of the RichEdit extension. + */ +interface MVCxClientRichEdit extends ASPxClientRichEdit { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the RichEdit by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the RichEdit by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the RoundPanel extension. + */ +interface MVCxClientRoundPanel extends ASPxClientRoundPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the Round Panel by processing the passed information on the server, in an Action specified by the Round Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the Round Panel by processing the passed information on the server, in an Action specified by the Round Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the Scheduler extension. + */ +interface MVCxClientScheduler extends ASPxClientScheduler { + ToolTipDisplaying: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the Scheduler by processing the passed information on the server, in an Action specified via the Scheduler's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the Scheduler by processing the passed information on the server, in an Action specified via the Scheduler's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A template that is rendered to display a tooltip. + */ +interface MVCxClientSchedulerTemplateToolTip extends ASPxClientToolTipBase { + type: MVCxSchedulerToolTipType; +} +/** + * A delegate method that enables you to adjust the tooltip content before displaying. + */ +interface MVCxClientSchedulerToolTipDisplayingEventHandler { + /** + * + * @param source + * @param e + */ + (source: S, e: MVCxClientSchedulerToolTipDisplayingEventArgs): void; +} +/** + * Provides data for the ToolTipDisplaying event. + */ +interface MVCxClientSchedulerToolTipDisplayingEventArgs extends ASPxClientEventArgs { + toolTip: MVCxClientSchedulerTemplateToolTip; + data: ASPxClientSchedulerToolTipData; +} +/** + * Lists available tooltip types. + */ +interface MVCxSchedulerToolTipType { +} +/** + * A client-side counterpart of the Spreadsheet extension. + */ +interface MVCxClientSpreadsheet extends ASPxClientSpreadsheet { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the Spreadsheet by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the Spreadsheet by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the PageControl extension. + */ +interface MVCxClientPageControl extends ASPxClientPageControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the PageControl by processing the passed information on the server, in an Action specified by the PageControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the PageControl by processing the passed information on the server, in an Action specified by the PageControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the TokenBox and TokenBoxFor extensions. + */ +interface MVCxClientTokenBox extends ASPxClientTokenBox { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the TokenBox by processing the passed information on the server, in an Action specified by the TokenBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the TokenBox by processing the passed information on the server, in an Action specified by the TokenBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the TreeList extension. + */ +interface MVCxClientTreeList extends ASPxClientTreeList { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the TreeList by processing the passed information on the server, in an Action specified via the TreeList's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the TreeList by processing the passed information on the server, in an Action specified via the TreeList's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the TreeList's CustomDataCallback event. This method does not update the TreeList. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + */ + PerformCustomDataCallback(data: Object): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + */ + PerformCustomDataCallback(arg: string): void; +} +/** + * A client-side counterpart of the TreeView extension. + */ +interface MVCxClientTreeView extends ASPxClientTreeView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * A client-side counterpart of the UploadControl extension. + */ +interface MVCxClientUploadControl extends ASPxClientUploadControl { +} +/** + * A method that will handle client BeginCallback events. + */ +interface MVCxClientBeginCallbackEventHandler { + /** + * A method that will handle client BeginCallback events. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientBeginCallbackEventArgs object that contains event data. + */ + (source: S, e: MVCxClientBeginCallbackEventArgs): void; +} +/** + * Provides data for client BeginCallback events. + */ +interface MVCxClientBeginCallbackEventArgs extends ASPxClientBeginCallbackEventArgs { + /** + * Gets an object containing specific information (if any, as name/value pairs) that should be passed as a request parameter from the client to the server side for further processing. + * Value: A hash table object containing named values to be passed from the client to the server side via request parameters. + */ + customArgs: Object; +} +/** + * A method that will handle the BeginCallback event. + */ +interface MVCxClientGlobalBeginCallbackEventHandler { + /** + * A method that will handle the BeginCallback event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientGlobalBeginCallbackEventArgs object that contains event data. + */ + (source: S, e: MVCxClientGlobalBeginCallbackEventArgs): void; +} +/** + * Provides data for the BeginCallback event. + */ +interface MVCxClientGlobalBeginCallbackEventArgs extends ASPxClientGlobalBeginCallbackEventArgs { + /** + * Gets an object containing specific information (if any, as name/value pairs) that should be passed as a request parameter from the client to the server side for further processing. + * Value: A hash table object containing named values to be passed from the client to the server side via request parameters. + */ + customArgs: Object; +} +/** + * An ASP.NET MVC equivalent of the client ASPxClientGlobalEvents component. + */ +interface MVCxClientGlobalEvents { + /** + * Occurs on the client side after client object models of all DevExpress MVC extensions contained within the page have been initialized. + */ + ControlsInitialized: ASPxClientEvent>; + /** + * Occurs on the client when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by a DevExpress MVC extension. + */ + CallbackError: ASPxClientEvent>; +} +/** + * A client-side counterpart of the VerticalGrid extension. + */ +interface MVCxClientVerticalGrid extends ASPxClientVerticalGrid { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the VerticalGrid by processing the passed information on the server in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the VerticalGrid by processing the passed information on the server in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the VerticalGrid's CustomDataActionRouteValues property, and then process the returned result in the specified client function. This method does not update the VerticalGrid. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(data: Object, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientVerticalGridValuesCallback): void; +} +/** + * A client-side equivalent of the MVCxWebDocumentViewer class. + */ +interface MVCxClientWebDocumentViewer extends ASPxClientWebDocumentViewer { +} +/** + * Serves as the base type for all the objects included in the client-side object model. + */ +interface ASPxClientControlBase { + /** + * Gets the unique, hierarchically-qualified identifier for the control. + * Value: The fully-qualified identifier for the control. + */ + name: string; + /** + * Occurs on the client side after the control has been initialized. + */ + Init: ASPxClientEvent>; + /** + * Returns an HTML element that is the root of the control's hierarchy. + */ + GetMainElement(): Object; + /** + * Returns a value specifying whether a control is displayed. + */ + GetClientVisible(): boolean; + /** + * Specifies whether a control is displayed. + * @param visible + */ + SetClientVisible(visible: boolean): void; + /** + * Returns a value specifying whether a control is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether a control is displayed. + * @param visible true to make a control visible; false to make it hidden. + */ + SetVisible(visible: boolean): void; + /** + * Returns a value that determines whether a callback request sent by a web control is being currently processed on the server side. + */ + InCallback(): boolean; +} +/** + * Serves as the base type for all the objects included in the client-side object model. + */ +interface ASPxClientControl extends ASPxClientControlBase { + /** + * Returns the control's width. + */ + GetWidth(): number; + /** + * Returns the control's height. + */ + GetHeight(): number; + /** + * Specifies the control's width. + * @param width An integer value that specifies the control's width. + */ + SetWidth(width: number): void; + /** + * Specifies the control's height. Note that this method is not in effect for some controls. + * @param height An integer value that specifies the control's height. + */ + SetHeight(height: number): void; + /** + * Modifies the control's size against the control's container. + */ + AdjustControl(): void; +} +/** + * Represents a client-side equivalent of the ASPxCallback control. + */ +interface ASPxClientCallback extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientCallback. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires on the client side when a callback initiated by the client Callback event's handler returns back to the client. + */ + CallbackComplete: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side Callback event passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + SendCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A method that will handle the client events related to completion of callback server-side processing. + */ +interface ASPxClientCallbackCompleteEventHandler { + /** + * A method that will handle the client events related to completion of callback server-side processing. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientCallbackCompleteEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCallbackCompleteEventArgs): void; +} +/** + * Serves as the base class for arguments of the web controls' client-side events. + */ +interface ASPxClientEventArgs { +} +/** + * Provides data for events concerning the final processing of a callback. + */ +interface ASPxClientCallbackCompleteEventArgs extends ASPxClientEventArgs { + /** + * Gets a string that contains specific information (if any) passed from the client side for server-side processing. + * Value: A string value representing specific information passed from the client to the server side. + */ + parameter: string; + /** + * Gets a string that contains specific information (if any) that has been passed from the server to the client side for further processing. + * Value: A string value representing specific information passed from the server back to the client side. + */ + result: string; +} +/** + * Represents a client-side equivalent of the ASPxCallbackPanel control. + */ +interface ASPxClientCallbackPanel extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientCallbackPanel. + */ + CallbackError: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Returns the text displayed within the control's loading panel. + */ + GetLoadingPanelText(): string; + /** + * Sets the text to be displayed within the control's loading panel. + * @param loadingPanelText A string value specifying the text to be displayed within the loading panel. + */ + SetLoadingPanelText(loadingPanelText: string): void; + /** + * Sets a value specifying whether the callback panel is enabled. + * @param enabled true, to enable the callback panel; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value specifying whether a callback panel is enabled. + */ + GetEnabled(): boolean; +} +/** + * Represents the event object used for client-side events. + */ +interface ASPxClientEvent { + /** + * Dynamically connects the event with an appropriate event handler function. + * @param handler An object representing the event handling function's content. + */ + AddHandler(handler: T): void; + /** + * Dynamically disconnects the event from the associated event handler function. + * @param handler An object representing the event handling function's content. + */ + RemoveHandler(handler: T): void; + /** + * Dynamically disconnects the event from all the associated event handler functions. + */ + ClearHandlers(): void; + /** + * For internal use only. + * @param source + * @param e + */ + FireEvent(source: Object, e: ASPxClientEventArgs): void; +} +/** + * A method that will handle the client-side events of a web control's client-side equivalent. + */ +interface ASPxClientEventHandler { + /** + * A method that will handle the client-side events of a web control's client-side equivalent. + * @param source An object representing the event source. Identifies the control that raised the event. + * @param e An ASPxClientEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEventArgs): void; +} +/** + * A method that will handle the cancelable events of a web control's client-side equivalent. + */ +interface ASPxClientCancelEventHandler { + /** + * A method that will handle the cancelable events of a web control's client-side equivalent. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCancelEventArgs): void; +} +/** + * Provides data for cancelable client events. + */ +interface ASPxClientCancelEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client events which can't be cancelled and allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeEventHandler { + /** + * A method that will handle the client events which can't be cancelled and allow the event's processing to be passed to the server side. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientProcessingModeEventArgs): void; +} +/** + * Provides data for the client events which can't be cancelled and allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value that specifies whether the event should be finally processed on the server side. + * Value: true to process the event on the server side; false to completely handle it on the client side. + */ + processOnServer: boolean; +} +/** + * A method that will handle the cancelable client-side events which allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeCancelEventHandler { + /** + * A method that will handle the cancelable client-side events which allow the event's processing to be passed to the server side. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientProcessingModeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientProcessingModeCancelEventArgs): void; +} +/** + * Provides data for the cancelable client-side events which allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeCancelEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents a JavaScript function which receives callback data obtained via a call to a specific client method (such as the PerformDataCallback). + */ +interface ASPxClientDataCallback { + /** + * A JavaScript function which receives a callback data obtained via a call to a specific client method (such as the PerformDataCallback). + * @param sender An object whose client method generated a callback. + * @param result A string value that represents the result of server-side callback processing. + */ + (sender: Object, result: string): void; +} +/** + * Represents a client-side equivalent of the ASPxCloudControl control. + */ +interface ASPxClientCloudControl extends ASPxClientControl { + /** + * Fires after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; +} +/** + * A method that will handle client events involving manipulations with the control's items. + */ +interface ASPxClientCloudControlItemEventHandler { + /** + * A method that will handle client events concerning manipulations with items. + * @param source The event source. This parameter identifies the cloud control object which raised the event. + * @param e An ASPxClientCloudControlItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCloudControlItemEventArgs): void; +} +/** + * Provides data for events which involve clicking on the control's items. + */ +interface ASPxClientCloudControlItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the name that uniquely identifies the processed item. + * Value: A string value that represents the value assigned to the item's Name property. + */ + name: Object; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the client events related to the begining of a callback processing round trip. + */ +interface ASPxClientBeginCallbackEventHandler { + /** + * A method that will handle client BeginCallback events. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientBeginCallbackEventArgs object that contains event data. + */ + (source: S, e: ASPxClientBeginCallbackEventArgs): void; +} +/** + * Provides data for client events related to the beginning of a callback processing round trip. + */ +interface ASPxClientBeginCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets a command name that identifies which client action forced a callback to be occurred. + * Value: A string value that represents the name of the command which initiated a callback. + */ + command: string; +} +/** + * A method that will handle the BeginCallback event. + */ +interface ASPxClientGlobalBeginCallbackEventHandler { + /** + * A method that will handle the BeginCallback event. + * @param source The event source. + * @param e An ASPxDataValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGlobalBeginCallbackEventArgs): void; +} +/** + * Provides data for the BeginCallback event. + */ +interface ASPxClientGlobalBeginCallbackEventArgs extends ASPxClientBeginCallbackEventArgs { + /** + * Gets an object that initiated a callback. + * Value: An class descendant object that is the control that initiated a callback. + */ + control: ASPxClientControl; +} +/** + * A method that will handle the client events related to the completion of a callback processing round trip. + */ +interface ASPxClientEndCallbackEventHandler { + /** + * A method that will handle client EndCallback events. + * @param source An object representing the event source. + * @param e A MenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEndCallbackEventArgs): void; +} +/** + * Provides data for client events related to the completion of a callback processing round trip. + */ +interface ASPxClientEndCallbackEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the EndCallback event. + */ +interface ASPxClientGlobalEndCallbackEventHandler { + /** + * A method that will handle the EndCallback event. + * @param source The event source. + * @param e An ASPxDataValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGlobalEndCallbackEventArgs): void; +} +/** + * Provides data for the EndCallback event. + */ +interface ASPxClientGlobalEndCallbackEventArgs extends ASPxClientEndCallbackEventArgs { + /** + * Gets an object that initiated a callback. + * Value: An class descendant object that is the control that initiated a callback. + */ + control: ASPxClientControl; +} +/** + * A method that will handle a CustomCallback client event exposed by some DevExpress web controls. + */ +interface ASPxClientCustomDataCallbackEventHandler { + /** + * A method that will handle the client CustomCallback event of some controls. + * @param source An object representing the event source. + * @param e An ASPxClientCustomDataCallbackEventHandler object that contains event data. + */ + (source: S, e: ASPxClientCustomDataCallbackEventArgs): void; +} +/** + * Provides data for the CustomCallback event. + */ +interface ASPxClientCustomDataCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets a string that contains specific information (if any) that has been passed from the server to the client side for further processing, related to the CustomCallback event. + * Value: A string value representing specific information passed from the server back to the client side. + */ + result: string; +} +/** + * A method that will handle client events related to server-side errors that occured during callback processing. + */ +interface ASPxClientCallbackErrorEventHandler { + /** + * A method that will handle client CallbackError events. + * @param source An object representing the event source. + * @param e A ASPxClientCallbackErrorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCallbackErrorEventArgs): void; +} +/** + * Provides data for client events related to server-side errors that occured during callback processing. + */ +interface ASPxClientCallbackErrorEventArgs extends ASPxClientEventArgs { + /** + * Gets the error message that describes the server error that occurred. + * Value: A string value that represents the error message. + */ + message: string; + /** + * Gets or sets whether the event is handled and the default error handling actions are not required. + * Value: true if the error is handled and no default processing is required; otherwise false. + */ + handled: boolean; +} +/** + * A method that will handle the CallbackError event. + */ +interface ASPxClientGlobalCallbackErrorEventHandler { + /** + * A method that will handle the CallbackError event. + * @param source The event source. + * @param e An ASPxDataValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGlobalCallbackErrorEventArgs): void; +} +/** + * Provides data for the CallbackError event. + */ +interface ASPxClientGlobalCallbackErrorEventArgs extends ASPxClientCallbackErrorEventArgs { + /** + * Gets an object that initiated a callback. + * Value: An class descendant object that is the control that initiated a callback. + */ + control: ASPxClientControl; +} +/** + * A method that will handle the ValidationCompleted client event. + */ +interface ASPxClientValidationCompletedEventHandler { + /** + * A method that will handle the ValidationCompleted event. + * @param source An object representing the event source. Identifies the ASPxClientGlobalEvents object that raised the event. + * @param e An ASPxClientValidationCompletedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientValidationCompletedEventArgs): void; +} +/** + * Provides data for the ValidationCompleted client event that allows you to centrally validate user input within all DevExpress web controls to which validation is applied. + */ +interface ASPxClientValidationCompletedEventArgs extends ASPxClientEventArgs { + /** + * Gets a container object that holds the validated control(s). + * Value: An object that represents a container of the validated control(s). + */ + container: Object; + /** + * Gets the name of the validation group name to which validation has been applied. + * Value: A string value that represents the name of the validation group that has been validated. + */ + validationGroup: string; + /** + * Gets a value that indicates whether validation has been applied to both visible and invisible controls. + * Value: true if validation has been applied to both visible and invisible controls; false if only visible controls have been validated. + */ + invisibleControlsValidated: boolean; + /** + * Gets a value specifying whether the validation has been completed successfully. + * Value: true if the validation has been completed successfully; otherwise, false. + */ + isValid: boolean; + /** + * Gets the first control (either visible or invisible) that hasn't passed the validation applied. + * Value: An ASPxClientControl object that represents the first invalid control. + */ + firstInvalidControl: ASPxClientControl; + /** + * Gets the first visible control that hasn't passed the validation applied. + * Value: An ASPxClientControl object that represents the first visible invalid control. + */ + firstVisibleInvalidControl: ASPxClientControl; +} +/** + * A method that will handle the client ControlsInitialized event. + */ +interface ASPxClientControlsInitializedEventHandler { + /** + * A method that will handle the client ControlsInitialized event. + * @param source An object representing the event source. + * @param e An ASPxClientControlsInitializedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientControlsInitializedEventArgs): void; +} +/** + * Provides data for the client ControlsInitialized event. + */ +interface ASPxClientControlsInitializedEventArgs extends ASPxClientEventArgs { + /** + * Gets a value that specifies whether a callback is sent during a controls initialization. + * Value: true if a callback is sent; otherwise, false. + */ + isCallback: boolean; +} +interface ASPxClientControlPredicate { + /** + * + * @param control + */ + (control: Object): boolean; +} +interface ASPxClientControlAction { + /** + * + * @param control + */ + (control: Object): void; +} +/** + * A collection object used on the client side to maintain particular client control objects + */ +interface ASPxClientControlCollection { + /** + * Occurs on the client side after client object models of all DevExpress web controls contained within the page have been initialized. + */ + ControlsInitialized: ASPxClientEvent>; + /** + * Occurs when the browser window is being resized. + */ + BrowserWindowResized: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated by any DevExpress control. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side, after server-side processing of a callback initiated by any DevExpress web control, has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by any DevExpress web control. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs after the validation initiated for a DevExpress web control (or a group of DevExpress web controls) has been completed. + */ + ValidationCompleted: ASPxClientEvent>; + /** + * Returns a collection item identified by its unique hierarchically-qualified identifier. + * @param name A string value representing the hierarchically-qualified identifier of the required control. + */ + Get(name: Object): Object; + /** + * Returns a DevExpress client control object identified by its unique hierarchically-qualified identifier (either ClientInstanceName or ClientID property value). + * @param name A string value that is the hierarchically-qualified identifier of the required DevExpress control. + */ + GetByName(name: string): Object; + /** + * Returns all controls in the collection that satisfy the specified predicate. + * @param predicate An ASPxClientControlPredicate object that is a predicate used to search for controls in the collection. + */ + GetControlsByPredicate(predicate: ASPxClientControlPredicate): Object[]; + /** + * Returns all controls of the specified type. + * @param type The object specifying the client control type. + */ + GetControlsByType(type: Object): Object[]; + /** + * Performs the specified action for each control in the collection. + * @param action An ASPxClientControlAction object specifying an action to perform. + */ + ForEachControl(action: ASPxClientControlAction): void; +} +/** + * Represents a client-side equivalent of the ASPxDataView object. + */ +interface ASPxClientDataView extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientDataView. + */ + CallbackError: ASPxClientEvent>; + /** + * Activates the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page that is currently active. + */ + GetPageIndex(): number; + /** + * Gets the size of a single ASPxDataView's page. + */ + GetPageSize(): number; + /** + * Sets the size of a single ASPxDataView's page. + * @param pageSize An integer value that specifies the page size. + */ + SetPageSize(pageSize: number): void; + /** + * Gets the number of pages into which the ASPxDataView's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Activates the first page. + */ + FirstPage(): void; + /** + * Activates the last page. + */ + LastPage(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + */ +interface ASPxClientDockingFilterPredicate { + /** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + * @param item An object to compare against the criteria defined within the method. + */ + (item: Object): boolean; +} +/** + * A client-side equivalent of the ASPxDockManager object. + */ +interface ASPxClientDockManager extends ASPxClientControl { + /** + * Fires on the client side before a panel is docked in a zone and allows you to cancel the action. + */ + BeforeDock: ASPxClientEvent>; + /** + * Fires on the client side after a panel is docked in a zone. + */ + AfterDock: ASPxClientEvent>; + /** + * Fires on the client side before a panel is made floating (undocked from a zone) and allows you to cancel the action. + */ + BeforeFloat: ASPxClientEvent>; + /** + * Fires on the client side after a panel is undocked from a zone. + */ + AfterFloat: ASPxClientEvent>; + /** + * Occurs when a panel dragging operation is started. + */ + StartPanelDragging: ASPxClientEvent>; + /** + * Occurs after a panel dragging operation is complete. + */ + EndPanelDragging: ASPxClientEvent>; + /** + * Occurs on the client side before a panel is closed, and allows you to cancel the action. + */ + PanelClosing: ASPxClientEvent>; + /** + * Occurs on the client side when a panel is closed. + */ + PanelCloseUp: ASPxClientEvent>; + /** + * Occurs on the client side when a panel pops up. + */ + PanelPopUp: ASPxClientEvent>; + /** + * Occurs on the client side after a panel has been invoked. + */ + PanelShown: ASPxClientEvent>; + /** + * Occurs on the client side after a panel has been resized. + */ + PanelResize: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Returns a zone specified by its unique identifier (zoneUID). + * @param zoneUID A string value specifying the unique identifier of the zone. + */ + GetZoneByUID(zoneUID: string): ASPxClientDockZone; + /** + * Returns a panel specified by its unique identifier (panelUID). + * @param panelUID A string value specifying the unique identifier of the panel. + */ + GetPanelByUID(panelUID: string): ASPxClientDockPanel; + /** + * Returns an array of panels contained in a page. + */ + GetPanels(): ASPxClientDockPanel[]; + /** + * Returns an array of panels that are contained in a page and meet a specified criteria. + * @param filterPredicate An ASPxClientDockingFilterPredicate delegate that defines a set of criteria and determines whether a panel meets those criteria. + */ + GetPanels(filterPredicate: ASPxClientDockingFilterPredicate): ASPxClientDockPanel[]; + /** + * Returns an array of zones contained in a page. + */ + GetZones(): ASPxClientDockZone[]; + /** + * Returns an array of zones that are contained in a page and meet a specified criteria. + * @param filterPredicate An ASPxClientDockingFilterPredicate delegate that defines a set of criteria and determines whether a zone meets those criteria. + */ + GetZones(filterPredicate: ASPxClientDockingFilterPredicate): ASPxClientDockZone[]; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockManagerProcessingModeCancelEventHandler { + /** + * A method that will handle the BeforeDock event. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerProcessingModeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerProcessingModeCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockManagerProcessingModeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A method that will handle the client AfterDock event. + */ +interface ASPxClientDockManagerProcessingModeEventHandler { + /** + * A method that will handle the AfterDock event. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerProcessingModeEventArgs): void; +} +/** + * Provides data for the AfterDock event. + */ +interface ASPxClientDockManagerProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A method that will handle client-side events concerning manipulations with panels. + */ +interface ASPxClientDockManagerEventHandler { + /** + * A method that will handle client-side events concerning manipulations with panels. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerEventArgs): void; +} +/** + * Provides data for events which concern manipulations on panels. + */ +interface ASPxClientDockManagerEventArgs extends ASPxClientEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockManagerCancelEventHandler { + /** + * A method that will handle the PanelClosing event. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockManagerCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * Serves as a base class for the ASPxClientPopupControl classes. + */ +interface ASPxClientPopupControlBase extends ASPxClientControl { + /** + * Occurs on the client side when window resizing initiates. + */ + BeforeResizing: ASPxClientEvent>; + /** + * Occurs on the client side when window resizing completes. + */ + AfterResizing: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the control. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when a control's window closes or hides. + */ + CloseUp: ASPxClientEvent>; + /** + * Enables you to cancel window closing on the client side. + */ + Closing: ASPxClientEvent>; + /** + * Occurs on the client side when a control's window is invoked. + */ + PopUp: ASPxClientEvent>; + /** + * Occurs on the client side after a window has been resized. + */ + Resize: ASPxClientEvent>; + /** + * Occurs on the client side after a control's window has been invoked. + */ + Shown: ASPxClientEvent>; + /** + * Occurs on the client side when the window pin state is changed. + */ + PinnedChanged: ASPxClientEvent>; + /** + * Modifies a control's window size in accordance with the content. + */ + AdjustSize(): void; + /** + * Brings the window to the front of the z-order. + */ + BringToFront(): void; + /** + * Returns a value indicating whether the window is collapsed. + */ + GetCollapsed(): boolean; + /** + * Returns the HTML code that specifies the contents of the control's window. + */ + GetContentHtml(): string; + /** + * Returns an iframe object containing a web page specified via the control's SetContentUrl client method). + */ + GetContentIFrame(): Object; + /** + * Returns an iframe object containing a web page specified via the control's SetContentUrl client method). + */ + GetContentIFrameWindow(): Object; + /** + * Returns the URL pointing to the web page displayed within the control's window. + */ + GetContentUrl(): string; + /** + * Returns the URL pointing to the image displayed within the window footer by default. + */ + GetFooterImageUrl(): string; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within a window's footer. + */ + GetFooterNavigateUrl(): string; + /** + * Returns the text displayed within a window's footer. + */ + GetFooterText(): string; + /** + * Returns the URL pointing to the image displayed within the window header. + */ + GetHeaderImageUrl(): string; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within a window's header. + */ + GetHeaderNavigateUrl(): string; + /** + * Returns the text displayed within a window's header. + */ + GetHeaderText(): string; + /** + * Gets the width of the default window's (for ASPxPopupControl) or panel's (for ASPxDockPanel) content region. + */ + GetContentWidth(): number; + /** + * Gets the height of the default window's (for ASPxPopupControl) or panel's (for ASPxDockPanel) content region. + */ + GetContentHeight(): number; + /** + * Returns a value indicating whether the window is maximized. + */ + GetMaximized(): boolean; + /** + * Returns a value indicating whether the window is pinned. + */ + GetPinned(): boolean; + /** + * Sends a callback to the server and generates the server-side WindowCallback event, passing the specified argument to it. + * @param parameter A string value that is any information that needs to be sent to the server-side WindowCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Refreshes the content of the web page displayed within the control's window. + */ + RefreshContentUrl(): void; + /** + * Sets a value indicating whether the window is collapsed. + * @param value true, to collapse the window; otherwise, false. + */ + SetCollapsed(value: boolean): void; + /** + * Sets the HTML markup specifying the contents of the control's window. + * @param html A string value that specifies the HTML markup. + */ + SetContentHtml(html: string): void; + /** + * Sets the URL to point to the web page that should be loaded into, and displayed within the control's window. + * @param url A string value specifying the URL to the web page displayed within the control's window. + */ + SetContentUrl(url: string): void; + /** + * Specifies the URL which points to the image displayed within the window footer by default. + * @param value A string value that is the URL for the image displayed within the window footer. + */ + SetFooterImageUrl(value: string): void; + /** + * Specifies the URL where the web browser will navigate when the text or image is clicked within a window's footer. + * @param value A string value which specifies the required navigation location. + */ + SetFooterNavigateUrl(value: string): void; + /** + * Specifies the text displayed within a window's footer. + * @param value A string value that specifies a window's footer text. + */ + SetFooterText(value: string): void; + /** + * Specifies the URL which points to the image displayed within the window header. + * @param value A string value that is the URL to the image displayed within the header. + */ + SetHeaderImageUrl(value: string): void; + /** + * Specifies the URL where the web browser will navigate when the text or image is clicked within a window's header. + * @param value A string value which specifies the required navigation location. + */ + SetHeaderNavigateUrl(value: string): void; + /** + * Specifies the text displayed within a window's header. + * @param value A string value that specifies a window's header text. + */ + SetHeaderText(value: string): void; + /** + * Sets a value indicating whether the window is maximized. + * @param value true. to maximize the window; otherwise, false. + */ + SetMaximized(value: boolean): void; + /** + * Sets a value indicating whether the window is pinned. + * @param value true, to pin the window; otherwise, false. + */ + SetPinned(value: boolean): void; + /** + * Invokes the control's window. + */ + Show(): void; + /** + * Invokes the control's window at the popup element with the specified index. + * @param popupElementIndex An integer value specifying the zero-based index of the popup element. + */ + Show(popupElementIndex: number): void; + /** + * Invokes the control's window and displays it over the specified HTML element. + * @param htmlElement An object specifying the HTML element relative to whose position the window is invoked. + */ + ShowAtElement(htmlElement: Object): void; + /** + * Invokes the control's window and displays it over an HTML element specified by its unique identifier. + * @param id A string value that specifies the hierarchically qualified identifier of an HTML element relative to whose position the window is invoked. + */ + ShowAtElementByID(id: string): void; + /** + * Invokes the control's window at the specified position. + * @param x A integer value specifying the x-coordinate of the window's display position. + * @param y A integer value specifying the y-coordinate of the window's display position. + */ + ShowAtPos(x: number, y: number): void; + /** + * Closes the control's window. + */ + Hide(): void; + /** + * Returns a value that specifies whether the control's window is displayed. + */ + IsVisible(): boolean; +} +/** + * A client-side equivalent of the ASPxDockPanel object. + */ +interface ASPxClientDockPanel extends ASPxClientPopupControlBase { + /** + * Gets or sets the unique identifier of a panel on a page. + * Value: A string that is the unique identifier of a panel. + */ + panelUID: string; + /** + * Fires on the client side before a panel is docked in a zone and allows you to cancel the action. + */ + BeforeDock: ASPxClientEvent>; + /** + * Fires on the client side after a panel is docked in a zone. + */ + AfterDock: ASPxClientEvent>; + /** + * Fires on the client side before a panel is made floating (undocked from a zone) and allows you to cancel the action. + */ + BeforeFloat: ASPxClientEvent>; + /** + * Fires on the client side after a panel is undocked from a zone. + */ + AfterFloat: ASPxClientEvent>; + /** + * Occurs when a panel dragging operation is started. + */ + StartDragging: ASPxClientEvent>; + /** + * Occurs after a panel dragging operation is complete. + */ + EndDragging: ASPxClientEvent>; + /** + * Retrieves a zone that owns the current panel. + */ + GetOwnerZone(): ASPxClientDockZone; + /** + * Docks the current panel in the specified zone. + * @param zone An ASPxClientDockZone object specifying the zone. + */ + Dock(zone: ASPxClientDockZone): void; + /** + * Docks the current panel in a zone at the specified position. + * @param zone An ASPxClientDockZone object specifying the zone, where the panel is docked + * @param visibleIndex An integer value specifying the visible index position. + */ + Dock(zone: ASPxClientDockZone, visibleIndex: number): void; + /** + * Undocks the current panel. + */ + MakeFloat(): void; + /** + * Undocks the current panel and place it at the specified position. + * @param x An integer value that specifies the X-coordinate of the panel's display position. + * @param y An integer value that specifies the Y-coordinate of the panel's display position. + */ + MakeFloat(x: number, y: number): void; + /** + * Gets or sets a value specifying the position of the current panel, amongst the visible panels within a zone. + */ + GetVisibleIndex(): number; + /** + * Sets a value specifying the position of the current panel, amongst the visible panels in a zone. + * @param visibleIndex An integer value specifying the zero-based index of the panel amongst visible panels in the zone. + */ + SetVisibleIndex(visibleIndex: number): void; + /** + * Returns a value indicating whether the panel is docked. + */ + IsDocked(): boolean; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockPanelProcessingModeCancelEventHandler { + /** + * A method that will handle the BeforeDock event. + * @param source A ASPxClientDockPanel object that raised the event. + * @param e A ASPxClientDockPanelProcessingModeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockPanelProcessingModeCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockPanelProcessingModeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockPanelProcessingModeEventHandler { + /** + * A method that will handle the AfterFloat event. + * @param source A ASPxClientDockPanel object that raised the event. + * @param e A ASPxClientDockPanelProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockPanelProcessingModeEventArgs): void; +} +/** + * Provides data for the AfterFloat event. + */ +interface ASPxClientDockPanelProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A client-side equivalent of the ASPxDockZone object. + */ +interface ASPxClientDockZone extends ASPxClientControl { + /** + * Gets or sets the unique identifier of a zone on a page. + * Value: A string that is the unique identifier of a zone. + */ + zoneUID: string; + /** + * Fires on the client side before a panel is docked in a zone and allows you to cancel the action. + */ + BeforeDock: ASPxClientEvent>; + /** + * Fires on the client side after a panel is docked in a zone. + */ + AfterDock: ASPxClientEvent>; + /** + * Returns a value that indicates the orientation in which panels are stacked in the current zone. + */ + IsVertical(): boolean; + /** + * Gets a value that indicates whether the zone can enlarge its size. + */ + GetAllowGrowing(): boolean; + /** + * Gets the number of panels contained in the zone. + */ + GetPanelCount(): number; + /** + * Returns a panel specified by its unique identifier (panelUID). + * @param panelUID A string value specifying the unique identifier of the panel. + */ + GetPanelByUID(panelUID: string): ASPxClientDockPanel; + /** + * Returns a panel specified by its visible index. + * @param visibleIndex An integer value specifying the panel's position among the visible panels within the current zone. + */ + GetPanelByVisibleIndex(visibleIndex: number): ASPxClientDockPanel; + /** + * Returns an array of panels docked in the current zone. + */ + GetPanels(): ASPxClientDockPanel[]; + /** + * Returns an array of panels that are docked in the current zone and meet a specified criteria. + * @param filterPredicate An ASPxClientDockingFilterPredicate delegate that defines a set of criteria and determines whether a panel meets those criteria. + */ + GetPanels(filterPredicate: ASPxClientDockingFilterPredicate): ASPxClientDockPanel[]; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockZoneCancelEventHandler { + /** + * A method that will handle the BeforeDock event. + * @param source The event source. This parameter identifies the zone object which raised the event. + * @param e A ASPxClientDockZoneCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockZoneCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockZoneCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * A method that will handle the client AfterDock event. + */ +interface ASPxClientDockZoneProcessingModeEventHandler { + /** + * A method that will handle the AfterDock event. + * @param source The event source. This parameter identifies the zone object which raised the event. + * @param e An ASPxClientDockZoneProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockZoneProcessingModeEventArgs): void; +} +/** + * Provides data for the AfterDock event. + */ +interface ASPxClientDockZoneProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * Represents the client-side equivalent of the ASPxFileManager control. + */ +interface ASPxClientFileManager extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientFileManager. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires on the client side after the selected file has been changed. + */ + SelectedFileChanged: ASPxClientEvent>; + /** + * Fires on the client side when an end-user opens a file by double-clicking it or pressing the Enter key. + */ + SelectedFileOpened: ASPxClientEvent>; + /** + * Fires after the focused item has been changed. + */ + FocusedItemChanged: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Fires on the client side after the current folder has been changed within a file manager. + */ + CurrentFolderChanged: ASPxClientEvent>; + /** + * Fires on the client side before the folder is created, and allows you to cancel the action. + */ + FolderCreating: ASPxClientEvent>; + /** + * Occurs on the client side after a folder has been created. + */ + FolderCreated: ASPxClientEvent>; + /** + * Fires on the client side before an item is renamed and allows you to cancel the action. + */ + ItemRenaming: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager's item has been renamed. + */ + ItemRenamed: ASPxClientEvent>; + /** + * Fires on the client side before an item is deleted and allows you to cancel the action. + */ + ItemDeleting: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager's item has been deleted. + */ + ItemDeleted: ASPxClientEvent>; + /** + * Occurs on the client side after all the selected items have been deleted. + */ + ItemsDeleted: ASPxClientEvent>; + /** + * Fires on the client side before an item is moved and allows you to cancel the action. + */ + ItemMoving: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager's item has been moved. + */ + ItemMoved: ASPxClientEvent>; + /** + * Occurs on the client side after all the selected items have been moved . + */ + ItemsMoved: ASPxClientEvent>; + /** + * Fires on the client side before an item is copied and allows you to cancel the action. + */ + ItemCopying: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager item has been copied. + */ + ItemCopied: ASPxClientEvent>; + /** + * Occurs on the client side after all the selected items have been copied. + */ + ItemsCopied: ASPxClientEvent>; + /** + * Fires on the client if any error occurs while editing an item. + */ + ErrorOccurred: ASPxClientEvent>; + /** + * Enables you to display the alert with the result error description. + */ + ErrorAlertDisplaying: ASPxClientEvent>; + /** + * Fires when a custom item is clicked, allowing you to perform custom actions. + */ + CustomCommand: ASPxClientEvent>; + /** + * Fires on the client side when the file manager updates the state of toolbar or context menu items. + */ + ToolbarUpdating: ASPxClientEvent>; + /** + * Enables you to highlight the search text, which is specified using the filter box, in templates. + */ + HighlightItemTemplate: ASPxClientEvent>; + /** + * Fires on the client side before a file upload starts, and allows you to cancel the action. + */ + FileUploading: ASPxClientEvent>; + /** + * Fires on the client side before the selected items are uploaded and allows you to cancel the action. + */ + FilesUploading: ASPxClientEvent>; + /** + * Occurs on the client side after a file has been uploaded. + */ + FileUploaded: ASPxClientEvent>; + /** + * Occurs on the client side after upload of all selected files has been completed. + */ + FilesUploaded: ASPxClientEvent>; + /** + * Fires on the client side before a file download starts, and allows you to cancel the action. + */ + FileDownloading: ASPxClientEvent>; + /** + * Gets the name of the currently active file manager area. + */ + GetActiveAreaName(): string; + /** + * Client-side scripting method which initiates a round trip to the server, so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Executes the specified command. + * @param commandName A string value that specifies the command to perform. + */ + ExecuteCommand(commandName: string): boolean; + /** + * Returns the selected file within the ASPxFileManager control's file container. + */ + GetSelectedFile(): ASPxClientFileManagerFile; + /** + * Returns an array of the file manager's selected items. + */ + GetSelectedItems(): ASPxClientFileManagerFile[]; + /** + * Returns a list of files that are loaded on the current page. + */ + GetItems(): ASPxClientFileManagerFile[]; + /** + * Sends a callback to the server and returns a list of files that are contained within the current folder. + * @param onCallback A object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetAllItems(onCallback: ASPxClientFileManagerAllItemsCallback): void; + /** + * Returns a toolbar item specified by its command name. + * @param commandName A string value specifying the command name of the item. + */ + GetToolbarItemByCommandName(commandName: string): ASPxClientFileManagerToolbarItem; + /** + * Returns a context menu item specified by its command name. + * @param commandName A string value specifying the command name of the item. + */ + GetContextMenuItemByCommandName(commandName: string): ASPxClientFileManagerToolbarItem; + /** + * Gets the current folder's path. + */ + GetCurrentFolderPath(): string; + /** + * Gets the current folder's path with the specified separator. + * @param separator A string value that specifies the separator between the folder's name within a path. + */ + GetCurrentFolderPath(separator: string): string; + /** + * Gets the current folder's path with the specified settings. + * @param separator A string value that specifies the separator between the folder's name within the path. + * @param skipRootFolder true to skip the root folder; otherwise, false. + */ + GetCurrentFolderPath(separator: string, skipRootFolder: boolean): string; + /** + * Sets the current folder's path. + * @param path A String value that is the relative path to the folder (without the root folder). + * @param onCallback A ASPxClientFileManagerCallback object that is the JavaScript function that receives the callback data as a parameter. + */ + SetCurrentFolderPath(path: string, onCallback: ASPxClientFileManagerCallback): void; + /** + * Gets the current folder's ID. + */ + GetCurrentFolderId(): string; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A JavaScript function which receives callback data obtained via a call to the client SetCurrentFolderPath method. + */ +interface ASPxClientFileManagerCallback { + /** + * A JavaScript function that receives callback data obtained via a call to the SetCurrentFolderPath method. + * @param result An object that contains a callback data. + */ + (result: Object): void; +} +/** + * A client-side equivalent of the file manager's FileManagerItem object and serves as a base class for client file and folder objects. + */ +interface ASPxClientFileManagerItem { + /** + * Gets the name of the current item. + * Value: A string value that is the item's name. + */ + name: string; + /** + * Gets the item's unique identifier. + * Value: A String value that specifies the item's unique identifier. + */ + id: string; + /** + * Gets a value that indicates if the current file manager item is a folder. + * Value: true if the current item is a folder or parent folder; false if the current item is a file. + */ + isFolder: boolean; + /** + * Specifies whether the file manager item is selected. + * @param selected true, to select the item; otherwise, false. + */ + SetSelected(selected: boolean): void; + /** + * Gets a value indicating whether the item is selected in the file manager. + */ + IsSelected(): boolean; + /** + * Gets the current item's full name. + */ + GetFullName(): string; + /** + * Gets the current item's full name with the specified separator. + * @param separator A string value that specifies the separator between the folder name inside the item's full name. + */ + GetFullName(separator: string): string; + /** + * Gets the current item's full name with the specified settings. + * @param separator A string value that specifies the separator between the folder name inside the item's full name. + * @param skipRootFolder true, to skip the root folder; otherwise, false. + */ + GetFullName(separator: string, skipRootFolder: boolean): string; +} +/** + * Represents the client-side equivalent of the FileManagerFile object. + */ +interface ASPxClientFileManagerFile extends ASPxClientFileManagerItem { + /** + * Downloads a file from a file manager. + */ + Download(): void; +} +/** + * A client-side equivalent of the FileManagerFolder object. + */ +interface ASPxClientFileManagerFolder extends ASPxClientFileManagerItem { + /** + * Gets a value specifying whether an item is a parent folder. + * Value: true if an item is a parent folder; false if an item is a file or folder. + */ + isParentFolder: boolean; +} +/** + * A JavaScript function which receives callback data obtained by a call to the client GetAllItems method. + */ +interface ASPxClientFileManagerAllItemsCallback { + /** + * A JavaScript function which receives callback data obtained by a call to the client GetAllItems method. + * @param items An array of ASPxClientFileManagerItem objects that are items contained in the current folder. + */ + (items: ASPxClientFileManagerItem[]): void; +} +/** + * A method that will handle the client SelectedFileOpened events. + */ +interface ASPxClientFileManagerFileEventHandler { + /** + * A method that will handle the SelectedFileOpened events. + * @param source An object representing the event's source. + * @param e An ASPxClientFileManagerFileEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileEventArgs): void; +} +/** + * Provides data for the SelectedFileOpened events. + */ +interface ASPxClientFileManagerFileEventArgs extends ASPxClientEventArgs { + /** + * Gets a file related to the event. + * Value: An ASPxClientFileManagerFile object that represents a file currently being processed. + */ + file: ASPxClientFileManagerFile; +} +/** + * A method that will handle the client SelectedFileOpened event. + */ +interface ASPxClientFileManagerFileOpenedEventHandler { + /** + * A method that will handle the SelectedFileOpened event. + * @param source The event source. This parameter identifies the file manager object which raised the event. + * @param e An ASPxClientFileManagerFileOpenedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileOpenedEventArgs): void; +} +/** + * Provides data for the SelectedFileOpened event. + */ +interface ASPxClientFileManagerFileOpenedEventArgs extends ASPxClientFileManagerFileEventArgs { + /** + * Gets or sets a value that specifies whether the event should be finally processed on the server side. + * Value: true to process the event on the server side; false to completely handle it on the client side. + */ + processOnServer: boolean; +} +/** + * Serves as a base for classes that are used as arguments for events generated on the client side. + */ +interface ASPxClientFileManagerActionEventArgsBase extends ASPxClientEventArgs { + /** + * Gets the full name of the item currently being processed. + * Value: A string value that is the item's full name. + */ + fullName: string; + /** + * Gets the name of the currently processed item. + * Value: A string value that specifies the item's name. + */ + name: string; + /** + * Gets a value specifying whether the current processed item is a folder. + * Value: true if the processed item is a folder; false if the processed item is a file. + */ + isFolder: boolean; +} +/** + * A method that will handle the client ItemRenaming events. + */ +interface ASPxClientFileManagerItemEditingEventHandler { + /** + * A method that will handle the ItemRenaming events. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemEditingEventArgs): void; +} +/** + * Provides data for the item editing event. + */ +interface ASPxClientFileManagerItemEditingEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client ItemRenamed event. + */ +interface ASPxClientFileManagerItemRenamedEventHandler { + /** + * A method that will handle the ItemRenamed event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemRenamedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemRenamedEventArgs): void; +} +/** + * Provides data for the ItemRenamed event. + */ +interface ASPxClientFileManagerItemRenamedEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets the previous name of the renamed item. + * Value: A string value that specifies the item name. + */ + oldName: string; +} +/** + * A method that will handle the client ItemDeleted event. + */ +interface ASPxClientFileManagerItemDeletedEventHandler { + /** + * A method that will handle the ItemDeleted event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemDeletedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemDeletedEventArgs): void; +} +/** + * Provides data for the ItemDeleted event. + */ +interface ASPxClientFileManagerItemDeletedEventArgs extends ASPxClientFileManagerActionEventArgsBase { +} +/** + * A method that will handle the client ItemsDeleted event. + */ +interface ASPxClientFileManagerItemsDeletedEventHandler { + /** + * A method that will handle the ItemsDeleted event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemsDeletedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemsDeletedEventArgs): void; +} +/** + * Provides data for the ItemsDeleted event. + */ +interface ASPxClientFileManagerItemsDeletedEventArgs extends ASPxClientEventArgs { + /** + * Gets an array of the currently processed items. + * Value: An array of ASPxClientFileManagerItem objects that are items currently being processed. + */ + items: ASPxClientFileManagerItem[]; +} +/** + * A method that will handle the client ItemMoved event. + */ +interface ASPxClientFileManagerItemMovedEventHandler { + /** + * A method that will handle the ItemMoved event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemMovedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemMovedEventArgs): void; +} +/** + * Provides data for the ItemMoved event. + */ +interface ASPxClientFileManagerItemMovedEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets the full name of the folder from which an item is moved. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client ItemsMoved event. + */ +interface ASPxClientFileManagerItemsMovedEventHandler { + /** + * A method that will handle the ItemsMoved event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemsMovedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemsMovedEventArgs): void; +} +/** + * Provides data for the ItemsMoved event. + */ +interface ASPxClientFileManagerItemsMovedEventArgs extends ASPxClientEventArgs { + /** + * Gets an array of the currently processed items. + * Value: An array of ASPxClientFileManagerItem objects that are items currently being processed. + */ + items: ASPxClientFileManagerItem[]; + /** + * Gets the full name of the folder from which items are moved. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client ItemCopied event. + */ +interface ASPxClientFileManagerItemCopiedEventHandler { + /** + * A method that will handle the ItemCopied event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemCopiedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemCopiedEventArgs): void; +} +/** + * Provides data for the ItemCopied event. + */ +interface ASPxClientFileManagerItemCopiedEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets the full name of the folder from which an item is copied. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client ItemsCopied event. + */ +interface ASPxClientFileManagerItemsCopiedEventHandler { + /** + * A method that will handle the ItemsCopied event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemsCopiedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemsCopiedEventArgs): void; +} +/** + * Provides data for the ItemsCopied event. + */ +interface ASPxClientFileManagerItemsCopiedEventArgs extends ASPxClientEventArgs { + /** + * Gets an array of the currently processed items. + * Value: An array of ASPxClientFileManagerItem objects that are items currently being processed. + */ + items: ASPxClientFileManagerItem[]; + /** + * Gets the full name of the folder from which items are copied. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client FolderCreated event. + */ +interface ASPxClientFileManagerItemCreatedEventHandler { + /** + * A method that will handle the FolderCreated event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemCreatedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemCreatedEventArgs): void; +} +/** + * Provides data for the FolderCreated event. + */ +interface ASPxClientFileManagerItemCreatedEventArgs extends ASPxClientFileManagerActionEventArgsBase { +} +/** + * A method that will handle the client ErrorOccurred event. + */ +interface ASPxClientFileManagerErrorEventHandler { + /** + * A method that will handle the client ErrorOccurred event. + * @param source An object representing the event's source. + * @param e An ASPxClientFileManagerErrorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerErrorEventArgs): void; +} +/** + * Provides data for the ErrorOccurred event. + */ +interface ASPxClientFileManagerErrorEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets or sets the error description. + * Value: A string value specifying the error description. + */ + errorText: string; + /** + * Gets or sets a value specifying whether an event error message is sent to the ErrorAlertDisplaying event. + * Value: true to sent an error message; otherwise, false. + */ + showAlert: boolean; + /** + * Gets a specifically generated code that uniquely identifies an error, which occurs while editing an item. + * Value: An integer value that specifies the code uniquely identifying an error. + */ + errorCode: number; +} +/** + * A method that will handle the client ErrorAlertDisplaying event. + */ +interface ASPxClientFileManagerErrorAlertDisplayingEventHandler { + /** + * A method that will handle the ErrorAlertDisplaying event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerErrorAlertDisplayingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerErrorAlertDisplayingEventArgs): void; +} +/** + * Provides data for the ErrorAlertDisplaying event. + */ +interface ASPxClientFileManagerErrorAlertDisplayingEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value that is the processed command's name. + */ + commandName: string; + /** + * Gets or sets the errors description. + * Value: A string that is the errors description. + */ + errorText: string; + /** + * Gets or sets a value specifying whether an alert message is displayed when the event fires. + * Value: true to display an alert message; otherwise, false. + */ + showAlert: boolean; +} +/** + * A method that will handle the client FileUploading event. + */ +interface ASPxClientFileManagerFileUploadingEventHandler { + /** + * A method that will handle the FileUploading event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFileUploadingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileUploadingEventArgs): void; +} +/** + * Provides data for the FileUploading event. + */ +interface ASPxClientFileManagerFileUploadingEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where a file is being uploaded. + * Value: A string value specifying the path where a file is being uploaded. + */ + folder: string; + /** + * Gets the name of a file selected for upload. + * Value: A string value that specifies the file name. + */ + fileName: string; + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client FilesUploading event. + */ +interface ASPxClientFileManagerFilesUploadingEventHandler { + /** + * A method that will handle the FilesUploading event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFilesUploadingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFilesUploadingEventArgs): void; +} +/** + * Provides data for the FilesUploading event. + */ +interface ASPxClientFileManagerFilesUploadingEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where files are being uploaded. + * Value: A string value specifying the folder path. + */ + folder: string; + /** + * Gets the names of files selected for upload. + * Value: An array of string values that are the file names. + */ + fileNames: string[]; + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client FileUploaded event. + */ +interface ASPxClientFileManagerFileUploadedEventHandler { + /** + * A method that will handle the FileUploaded event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFileUploadedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileUploadedEventArgs): void; +} +/** + * Provides data for the FileUploaded event. + */ +interface ASPxClientFileManagerFileUploadedEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where a file is uploaded. + * Value: A string value specifying the uploaded file path. + */ + folder: string; + /** + * Gets the name of the uploaded file. + * Value: A string value that specifies the file name. + */ + fileName: string; +} +/** + * A method that will handle the client FilesUploaded event. + */ +interface ASPxClientFileManagerFilesUploadedEventHandler { + /** + * A method that will handle the FilesUploaded event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFilesUploadedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFilesUploadedEventArgs): void; +} +/** + * Provides data for the FilesUploaded event. + */ +interface ASPxClientFileManagerFilesUploadedEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where files are uploaded. + * Value: A string value specifying the uploaded files path. + */ + folder: string; + /** + * Gets an array of uploaded file names. + * Value: An array of string values that are the file names. + */ + fileNames: string[]; +} +/** + * A method that will handle the client FileDownloading event. + */ +interface ASPxClientFileManagerFileDownloadingEventHandler { + /** + * A method that will handle the FileDownloading event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFileDownloadingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileDownloadingEventArgs): void; +} +/** + * Provides data for the FileDownloading event. + */ +interface ASPxClientFileManagerFileDownloadingEventArgs extends ASPxClientFileManagerFileEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event, should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client FocusedItemChanged event. + */ +interface ASPxClientFileManagerFocusedItemChangedEventHandler { + /** + * A method that will handle the FocusedItemChanged event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFocusedItemChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFocusedItemChangedEventArgs): void; +} +/** + * Provides data for the FocusedItemChanged event. + */ +interface ASPxClientFileManagerFocusedItemChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the file manager item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientFileManagerItem; + /** + * Gets the name of the focused item. + * Value: A string value that specifies the item's name. + */ + name: string; + /** + * Gets the full name of the item currently being processed. + * Value: A string value that is the item's full name. + */ + fullName: string; +} +/** + * A method that will handle the client CurrentFolderChanged event. + */ +interface ASPxClientFileManagerCurrentFolderChangedEventHandler { + /** + * A method that will handle the CurrentFolderChanged event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerCurrentFolderChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerCurrentFolderChangedEventArgs): void; +} +/** + * Provides data for the CurrentFolderChanged event. + */ +interface ASPxClientFileManagerCurrentFolderChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the currently processed folder. + * Value: A string value that specifies the folder's name. + */ + name: string; + /** + * Gets the full name of the folder currently being processed. + * Value: A string value that is the folder's full name. + */ + fullName: string; +} +/** + * A method that will handle the client SelectionChanged event. + */ +interface ASPxClientFileManagerSelectionChangedEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerSelectionChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerSelectionChangedEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientFileManagerSelectionChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the file manager item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientFileManagerItem; + /** + * Gets the name of the currently processed file. + * Value: A string value that specifies the file's name. + */ + name: string; + /** + * Gets the full name of the file currently being processed. + * Value: A string value that is the file's full name. + */ + fullName: string; + /** + * Gets whether the item has been selected. + * Value: true if the file has been selected; otherwise, false. + */ + isSelected: boolean; +} +/** + * A method that will handle the CustomCommand event. + */ +interface ASPxClientFileManagerCustomCommandEventHandler { + /** + * A method that will handle the CustomCommand event. + * @param source The event source. + * @param e An ASPxClientFileManagerCustomCommandEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerCustomCommandEventArgs): void; +} +/** + * Provides data for the CustomCommand event. + */ +interface ASPxClientFileManagerCustomCommandEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value that is the processed command's name. + */ + commandName: string; +} +/** + * A method that will handle the ToolbarUpdating event. + */ +interface ASPxClientFileManagerToolbarUpdatingEventHandler { + /** + * A method that will handle the ToolbarUpdating event. + * @param source The event source. + * @param e An ASPxClientFileManagerToolbarUpdatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerToolbarUpdatingEventArgs): void; +} +/** + * Provides data for the ToolbarUpdating event. + */ +interface ASPxClientFileManagerToolbarUpdatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the currently active file manager area. + * Value: A string value that identifies the active area. + */ + activeAreaName: string; +} +/** + * A method that will handle the client HighlightItemTemplate event. + */ +interface ASPxClientFileManagerHighlightItemTemplateEventHandler { + /** + * A method that will handle the HighlightItemTemplate event. + * @param source The event source. This parameter identifies the file manager object that raised the event. + * @param e An ASPxClientFileManagerHighlightItemTemplateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerHighlightItemTemplateEventArgs): void; +} +/** + * Provides data for the HighlightItemTemplate event. + */ +interface ASPxClientFileManagerHighlightItemTemplateEventArgs extends ASPxClientEventArgs { + /** + * Gets a string that is a filter value specified by the filter box. + * Value: A string that is a filter value. + */ + filterValue: string; + /** + * Gets the name of the item currently being processed. + * Value: A string that is the item name. + */ + itemName: string; + /** + * Gets an element containing the item template. + * Value: An object that is an element containing the item template. + */ + templateElement: string; + /** + * Get the name of the cascading style sheet (CSS) class associated with an item in the highlighted state. + * Value: A string that is the name of a CSS class. + */ + highlightCssClassName: string; +} +/** + * Represents a client-side equivalent of the menu's MenuItem object. + */ +interface ASPxClientMenuItem { + /** + * Gets the menu object to which the current item belongs. + * Value: An ASPxClientMenuBase object representing the menu to which the item belongs. + */ + menu: ASPxClientMenuBase; + /** + * Gets the immediate parent item to which the current item belongs. + * Value: An ASPxClientMenuItem object representing the item's immediate parent. + */ + parent: ASPxClientMenuItem; + /** + * Gets the item's index within the parent's collection of items. + * Value: An integer value representing the item's zero-based index within the Items collection of the parent object (a menu or item) to which the item belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the menu item. + * Value: A string value that represents the value assigned to the item's Name property. + */ + name: string; + /** + * For internal use only. + */ + indexPath: string; + /** + * Returns the number of the current menu item's immediate child items. + */ + GetItemCount(): number; + /** + * Returns the current menu item's immediate subitem specified by its index. + * @param index An integer value specifying the zero-based index of the submenu item to be retrieved. + */ + GetItem(index: number): ASPxClientMenuItem; + /** + * Returns the current menu item's subitem specified by its name. + * @param name A string value specifying the name of the menu item. + */ + GetItemByName(name: string): ASPxClientMenuItem; + /** + * Indicates whether the menu item is checked. + */ + GetChecked(): boolean; + /** + * Specifies whether the menu item is checked. + * @param value true if the menu item is checked; otherwise, false. + */ + SetChecked(value: boolean): void; + /** + * Returns a value specifying whether a menu item is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether the menu item is enabled. + * @param value true to enable the menu item; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL pointing to the image displayed within the menu item. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the menu item. + * @param value A string value specifying the URL to the image displayed within the menu item. + */ + SetImageUrl(value: string): void; + /** + * Gets a URL which defines the navigation location for the menu item. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the navigation location for the menu item. + * @param value A string value which specifies a URL to where the client web browser will navigate when the menu item is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Returns text displayed within the menu item. + */ + GetText(): string; + /** + * Sets the text to be displayed within the menu item. + * @param value A string value specifying the text to be displayed within the menu item. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether a menu item is displayed. + */ + GetVisible(): boolean; + /** + * Specifies the menu item's visibility. + * @param value true if the menu item is visible; otherwise, false. + */ + SetVisible(value: boolean): void; +} +/** + * A client-side equivalent of the file manager's FileManagerToolbarItemBase object. + */ +interface ASPxClientFileManagerToolbarItem extends ASPxClientMenuItem { + /** + * This property is not in effect for the ASPxClientFileManagerToolbarItem class. + */ + menu: ASPxClientMenuBase; + /** + * This property is not in effect for the ASPxClientFileManagerToolbarItem class. + */ + parent: ASPxClientMenuItem; + /** + * This property is not in effect for the ASPxClientFileManagerToolbarItem class. + */ + index: number; +} +/** + * A client-side equivalent of the ASPxFormLayout's LayoutItem object. + */ +interface ASPxClientLayoutItem { + /** + * Gets the form layout object to which the current item belongs. + * Value: An object representing the form layout to which the item belongs. + */ + formLayout: ASPxClientFormLayout; + /** + * Gets the name that uniquely identifies the layout item. + * Value: A string value that represents the value assigned to the layout item's Name property. + */ + name: string; + /** + * Gets the immediate parent layout item to which the current layout item belongs. + * Value: An object representing the item's immediate parent. + */ + parent: ASPxClientLayoutItem; + /** + * Returns the current layout item's subitem specified by its name. + * @param name A string value specifying the name of the layout item. + */ + GetItemByName(name: string): ASPxClientLayoutItem; + /** + * Returns a value specifying whether a layout item is displayed. + */ + GetVisible(): boolean; + /** + * Specifies the layout item's visibility. + * @param value true, if the layout item is visible; otherwise, false. + */ + SetVisible(value: boolean): void; + /** + * Specifies the text displayed in the layout item caption. + * @param caption A string value specifying the item caption. + */ + SetCaption(caption: string): void; + /** + * Returns the text displayed in the layout item caption. + */ + GetCaption(): string; +} +/** + * Represents a client-side equivalent of the ASPxFormLayout object. + */ +interface ASPxClientFormLayout extends ASPxClientControl { + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientLayoutItem; +} +/** + * Represents a client-side equivalent of the ASPxGlobalEvents component. + */ +interface ASPxClientGlobalEvents { + /** + * Occurs on the client side after client object models of all DevExpress web controls contained within the page have been initialized. + */ + ControlsInitialized: ASPxClientEvent>; + /** + * Occurs when the browser window is being resized. + */ + BrowserWindowResized: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated by any DevExpress control. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side, after server-side processing of a callback initiated by any DevExpress web control, has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by any of DevExpress web controls. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side after the validation initiated for a DevExpress web control (or a group of DevExpress web controls) has been completed. + */ + ValidationCompleted: ASPxClientEvent>; +} +/** + * Represents a client-side equivalent of the ASPxHiddenField control. + */ +interface ASPxClientHiddenField extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientHiddenField. + */ + CallbackError: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Adds a new value to the control's collection of property name/value pairs, on the client side. + * @param propertyName A string value that specifies the property name. It can contain letters, digits, underline characters, and dollar signs. It cannot begin with a digit character. + * @param propertyValue An object that represents the value of the specified property. + */ + Add(propertyName: string, propertyValue: Object): void; + /** + * Returns the value with the specified property name. + * @param propertyName A string value that specifies the property name. + */ + Get(propertyName: string): Object; + /** + * Adds a new value to the control's collection of property name/value pairs, on the client side. + * @param propertyName A string value that specifies the property name. It can contain letters, digits, underline characters, and dollar signs. It cannot begin with a digit character. + * @param propertyValue An object that represents the property value. + */ + Set(propertyName: string, propertyValue: Object): void; + /** + * Removes the specified value from the ASPxHiddenField collection. + * @param propertyName A string value representing the property name. + */ + Remove(propertyName: string): void; + /** + * Clears the ASPxHiddenField's value collection. + */ + Clear(): void; + /** + * Returns a value indicating whether the value with the specified property name is contained within the ASPxHiddenField control's value collection. + * @param propertyName A string value that specifies the property name. + */ + Contains(propertyName: string): boolean; +} +/** + * The client-side equivalent of the ASPxImageGallery control. + */ +interface ASPxClientImageGallery extends ASPxClientDataView { + /** + * Fires on the client side before the fullscreen viewer is shown and allows you to cancel the action. + */ + FullscreenViewerShowing: ASPxClientEvent>; + /** + * Occurs on the client side after an active item has been changed within the fullscreen viewer. + */ + FullscreenViewerActiveItemIndexChanged: ASPxClientEvent>; + /** + * Shows the fullscreen viewer with the specified active item. + * @param index An Int32 value that is an index of the active item. + */ + ShowFullscreenViewer(index: number): void; + /** + * Hides the fullscreen viewer. + */ + HideFullscreenViewer(): void; + /** + * Makes the specified item active within the fullscreen viewer on the client side. + * @param index An integer value specifying the index of the item to select. + * @param preventAnimation true to prevent the animation effect; false to change images using animation. + */ + SetFullscreenViewerActiveItemIndex(index: number, preventAnimation: boolean): void; + /** + * Gets the number of items contained in the control's item collection. + */ + GetFullscreenViewerItemCount(): number; + /** + * Returns the index of the active item within the fullscreen viewer. + */ + GetFullscreenViewerActiveItemIndex(): number; + /** + * Plays a slide show within a fullscreen viewer. + */ + PlaySlideShow(): void; + /** + * Pauses a slide show within a fullscreen viewer. + */ + PauseSlideShow(): void; +} +/** + * A method that will handle the client FullscreenViewerShowing event. + */ +interface ASPxClientImageGalleryCancelEventHandler { + /** + * A method that will handle the FullscreenViewerShowing event. + * @param source The event source. Identifies the ASPxImageGallery control that raised the event. + * @param e An ASPxClientImageGalleryCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientImageGalleryCancelEventArgs): void; +} +/** + * Provides data for the FullscreenViewerShowing event. + */ +interface ASPxClientImageGalleryCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An value that is the related item's index. + */ + index: number; + /** + * Gets the unique identifier name of the item related to the event. + * Value: A string value that specifies the item's unique identifier name. + */ + name: string; +} +/** + * A method that will handle the client FullscreenViewerActiveItemIndexChanged event. + */ +interface ASPxClientImageGalleryFullscreenViewerEventHandler { + /** + * A method that will handle the FullscreenViewerActiveItemIndexChanged event. + * @param source The event source. Identifies the ASPxImageGallery control that raised the event. + * @param e An ASPxClientImageGalleryFullscreenViewerEventArgs object that contains event data. + */ + (source: S, e: ASPxClientImageGalleryFullscreenViewerEventArgs): void; +} +/** + * Provides data for the FullscreenViewerActiveItemIndexChanged event. + */ +interface ASPxClientImageGalleryFullscreenViewerEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An value that is the related item's index. + */ + index: number; + /** + * Gets the unique identifier name of the item related to the event. + * Value: A string value that specifies the item's unique identifier name. + */ + name: string; +} +/** + * A client-side equivalent of the ASPxImageSlider object. + */ +interface ASPxClientImageSlider extends ASPxClientControl { + /** + * Occurs after the active image, displayed within the image area, is changed. + */ + ActiveItemChanged: ASPxClientEvent>; + /** + * Fires after an image item has been clicked within the image area. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when a thumbnail is clicked. + */ + ThumbnailItemClick: ASPxClientEvent>; + /** + * Returns an item specified by its index within the image slider's item collection. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): ASPxClientImageSliderItem; + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientImageSliderItem; + /** + * Returns the index of the active item within the image slider control. + */ + GetActiveItemIndex(): number; + /** + * Makes the specified item active within the image slider control on the client side. + * @param index An integer value specifying the index of the item to select. + * @param preventAnimation true to prevent the animation effect; false to change images using animation. + */ + SetActiveItemIndex(index: number, preventAnimation: boolean): void; + /** + * Returns the active item within the ASPxImageSlider control. + */ + GetActiveItem(): ASPxClientImageSliderItem; + /** + * Makes the specified item active within the image slider control on the client side. + * @param item An ASPxClientImageSliderItem object specifying the item to select. + * @param preventAnimation true to prevent animation effect; false to enable animation. + */ + SetActiveItem(item: ASPxClientImageSliderItem, preventAnimation: boolean): void; + /** + * Gets the number of items contained in the control's item collection. + */ + GetItemCount(): number; + /** + * Sets input focus to the ASPxImageSlider control. + */ + Focus(): void; + /** + * Plays a slide show within an image slider. + */ + Play(): void; + /** + * Pauses a slide show within image slider. + */ + Pause(): void; + /** + * Gets a value indicating whether the slide show is playing. + */ + IsSlideShowPlaying(): boolean; +} +/** + * A method that will handle the ItemClick events. + */ +interface ASPxClientImageSliderItemEventHandler { + /** + * A method that will handle the ItemClick events. + * @param source The event source. Identifies the ASPxImageSlider control that raised the event. + * @param e An ASPxClientImageSliderItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientImageSliderItemEventArgs): void; +} +/** + * Provides data for the ItemClick events. + */ +interface ASPxClientImageSliderItemEventArgs extends ASPxClientEventArgs { + /** + * Gets an item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientImageSliderItem; +} +/** + * A client-side equivalent of the image slider's ImageSliderItem object. + */ +interface ASPxClientImageSliderItem { + /** + * Gets an image slider to which the current item belongs. + * Value: An object that is the item's owner. + */ + imageSlider: ASPxClientImageSlider; + /** + * Gets the item's index within an items collection. + * Value: An integer value is the item's zero-based index within the Items collection. + */ + index: number; + /** + * Gets the name that uniquely identifies the image slider item. + * Value: A string value that is the value assigned to the item's Name property. + */ + name: string; + /** + * Gets or sets the path to the image displayed within the ASPxClientImageSliderItem. + * Value: A value specifying the path to the image. + */ + imageUrl: string; + /** + * Gets the item's display text. + * Value: A string value that is the item's display text. + */ + text: string; +} +/** + * The client-side equivalent of the ASPxImageZoomNavigator object. + */ +interface ASPxClientImageZoomNavigator extends ASPxClientImageSlider { +} +/** + * A client-side equivalent of the ASPxImageZoom object. + */ +interface ASPxClientImageZoom extends ASPxClientControl { + /** + * Sets the properties on an image displayed in the image zoom control. + * @param imageUrl A string value specifying the path to the preview image displayed in the preview image. + * @param largeImageUrl A string value specifying the path to the preview image displayed in the zoom window and the expand window. + * @param zoomWindowText A string value specifying the text displayed in the zoom window. + * @param expandWindowText A string value specifying the text displayed in the expand window. + * @param alternateText A string value that specifies the alternate text displayed instead of the image. + */ + SetImageProperties(imageUrl: string, largeImageUrl: string, zoomWindowText: string, expandWindowText: string, alternateText: string): void; +} +/** + * Represents a client-side equivalent of the ASPxLoadingPanel control. + */ +interface ASPxClientLoadingPanel extends ASPxClientControl { + /** + * Invokes the loading panel. + */ + Show(): void; + /** + * Invokes the loading panel, displaying it over the specified HTML element. + * @param htmlElement An object that specifies the required HTML element. + */ + ShowInElement(htmlElement: Object): void; + /** + * Invokes the loading panel, displaying it over the specified element. + * @param id A string that specifies the required element's identifier. + */ + ShowInElementByID(id: string): void; + /** + * Invokes the loading panel at the specified position. + * @param x An integer value specifying the x-coordinate of the loading panel's display position. + * @param y An integer value specifying the y-coordinate of the loaidng panel's display position. + */ + ShowAtPos(x: number, y: number): void; + /** + * Sets the text to be displayed within the ASPxLoadingPanel. + * @param text A string value specifying the text to be displayed within the ASPxLoadingPanel. + */ + SetText(text: string): void; + /** + * Gets the text displayed within the ASPxLoadingPanel. + */ + GetText(): string; + /** + * Hides the loading panel. + */ + Hide(): void; +} +/** + * Serves as the base type for the ASPxClientPopupMenu objects. + */ +interface ASPxClientMenuBase extends ASPxClientControl { + /** + * Fires after a menu item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor is moved into a menu item. + */ + ItemMouseOver: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor moves outside a menu item. + */ + ItemMouseOut: ASPxClientEvent>; + /** + * Occurs on the client side when a submenu pops up. + */ + PopUp: ASPxClientEvent>; + /** + * Occurs on the client side when a submenu closes. + */ + CloseUp: ASPxClientEvent>; + /** + * Returns the number of menu items at the root menu level. + */ + GetItemCount(): number; + /** + * Returns the menu's root menu item specified by its index. + * @param index An integer value specifying the zero-based index of the root menu item to be retrieved. + */ + GetItem(index: number): ASPxClientMenuItem; + /** + * Returns a menu item specified by its name. + * @param name A string value specifying the name of the menu item. + */ + GetItemByName(name: string): ASPxClientMenuItem; + /** + * Returns the selected item within the menu control. + */ + GetSelectedItem(): ASPxClientMenuItem; + /** + * Selects the specified menu item within a menu control on the client side. + * @param item An ASPxClientMenuItem object specifying the menu item to select. + */ + SetSelectedItem(item: ASPxClientMenuItem): void; + /** + * Returns a root menu item. + */ + GetRootItem(): ASPxClientMenuItem; +} +/** + * Represents a client collection that maintains client menu objects. + */ +interface ASPxClientMenuCollection extends ASPxClientControlCollection { + /** + * Recalculates the position of visible sub menus. + */ + RecalculateAll(): void; + /** + * Hides all menus maitained by the collection. + */ + HideAll(): void; +} +/** + * Represents a client-side equivalent of the ASPxMenu object. + */ +interface ASPxClientMenu extends ASPxClientMenuBase { + /** + * Gets a value specifying the menu orientation. + */ + GetOrientation(): string; + /** + * Sets the menu orientation. + * @param orientation 'Vertical' to orient the menu vertically; 'Horizontal' to orient the menu horizontally. + */ + SetOrientation(orientation: string): void; +} +/** + * A method that will handle the menu's client events concerning manipulations with an item. + */ +interface ASPxClientMenuItemEventHandler { + /** + * A method that will handle the menu's client events concerning manipulations with an item. + * @param source The event source. This parameter identifies the menu object which raised the event. + * @param e An ASPxClientMenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientMenuItemEventArgs): void; +} +/** + * Provides data for events which concern manipulations on menu items. + */ +interface ASPxClientMenuItemEventArgs extends ASPxClientEventArgs { + /** + * Gets the menu item object related to the event. + * Value: An ASPxClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; +} +/** + * A method that will handle client events which relate to mouse hovering (such as entering or leaving) over menu items. + */ +interface ASPxClientMenuItemMouseEventHandler { + /** + * A method that will handle the ItemMouseOver events. + * @param source An object representing the event source. + * @param e A MenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientMenuItemMouseEventArgs): void; +} +/** + * Provides data for client events which relate to mouse hovering (such as entering or leaving) over menu items. + */ +interface ASPxClientMenuItemMouseEventArgs extends ASPxClientMenuItemEventArgs { + /** + * Gets the HTML object that contains the processed item. + * Value: An HTML object representing a container for the item related to the event. + */ + htmlElement: Object; +} +/** + * A method that will handle client events concerning clicks on the control's items. + */ +interface ASPxClientMenuItemClickEventHandler { + /** + * A method that will handle client ItemClick events. + * @param source An object representing the event source. + * @param e A MenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientMenuItemClickEventArgs): void; +} +/** + * Provides data for events which concern clicking on the control's items. + */ +interface ASPxClientMenuItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the menu item object related to the event. + * Value: An ASPxClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Contains options affecting the touch scrolling functionality. + */ +interface ASPxClientTouchUIOptions { + /** + * Gets or sets a value that specifies whether or not the horizontal scroll bar should be displayed. + * Value: true to display the horizontal scroll bar; otherwise, false. The default value is true. + */ + showHorizontalScrollbar: boolean; + /** + * Gets or sets a value that specifies whether or not the vertical scroll bar should be displayed. + * Value: true to display the vertical scroll bar; otherwise, false. The default value is true. + */ + showVerticalScrollbar: boolean; + /** + * Gets or sets the name of the CSS class defining the vertical scroll bar's appearance. + * Value: A string value specifying the class name. + */ + vScrollClassName: string; + /** + * Gets or sets the name of the CSS class defining the horizontal scroll bar's appearance. + * Value: A string value specifying the class name. + */ + hScrollClassName: string; +} +/** + * Contains a method allowing you to apply the current scroll extender to a specific element. + */ +interface ScrollExtender { + /** + * Applies the current scroll extender to the element specified by the ID. + * @param id A string value specifying the element's ID. + */ + ChangeElement(id: string): void; + /** + * Applies the current scroll extender to the specified DOM element. + * @param element An object specifying the required DOM element. + */ + ChangeElement(element: Object): void; +} +/** + * Represents a client-side equivalent of the ASPxNavBar control. + */ +interface ASPxClientNavBar extends ASPxClientControl { + /** + * Fires after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Fires on the client side after a group's expansion state has been changed. + */ + ExpandedChanged: ASPxClientEvent>; + /** + * Fires on the client side before the expansion state of a group is changed. + */ + ExpandedChanging: ASPxClientEvent>; + /** + * Fires when a group header is clicked. + */ + HeaderClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientNavBar. + */ + CallbackError: ASPxClientEvent>; + /** + * Returns the number of groups in the navbar. + */ + GetGroupCount(): number; + /** + * Returns a group specified by its index. + * @param index An integer value specifying the zero-based index of the group object to retrieve. + */ + GetGroup(index: number): ASPxClientNavBarGroup; + /** + * Returns a group specified by its name. + * @param name A string value specifying the name of the group. + */ + GetGroupByName(name: string): ASPxClientNavBarGroup; + /** + * Returns the navbar's active group. + */ + GetActiveGroup(): ASPxClientNavBarGroup; + /** + * Makes the specified group active. + * @param group A ASPxClientNavBarGroup object that specifies the active group. + */ + SetActiveGroup(group: ASPxClientNavBarGroup): void; + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientNavBarItem; + /** + * Returns the selected item within the navbar control. + */ + GetSelectedItem(): ASPxClientNavBarItem; + /** + * Selects the specified item within the navbar control on the client side. + * @param item An ASPxClientNavBarItem object specifying the item to select. + */ + SetSelectedItem(item: ASPxClientNavBarItem): void; + /** + * Collapses all groups of the navbar. + */ + CollapseAll(): void; + /** + * Expands all groups of the navbar. + */ + ExpandAll(): void; +} +/** + * Represents a client-side equivalent of the navbar's NavBarGroup object. + */ +interface ASPxClientNavBarGroup { + /** + * Gets the navbar to which the current group belongs. + * Value: An ASPxClientNavBar object representing the navbar to which the group belongs. + */ + navBar: ASPxClientNavBar; + /** + * Gets the group's index within a collection of a navbar's groups. + * Value: An integer value representing the group's zero-based index within the Groups collection of the navbar to which the group belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the group. + * Value: A string value that represents the value assigned to the group's Name property. + */ + name: string; + /** + * Returns a value specifying whether a group is enabled. + */ + GetEnabled(): boolean; + /** + * Returns a value specifying whether the group is expanded. + */ + GetExpanded(): boolean; + /** + * Sets the group's expansion state. + * @param value true to expand the group; false to collapse the group. + */ + SetExpanded(value: boolean): void; + /** + * Returns a value specifying whether a group is displayed. + */ + GetVisible(): boolean; + /** + * Returns text displayed within a group. + */ + GetText(): string; + /** + * Specifies the text displayed within a group. + * @param text A string value that is the text displayed within the navbar group. + */ + SetText(text: string): void; + /** + * Specifies whether the group is visible. + * @param value true if the group is visible; otherwise, false. + */ + SetVisible(value: boolean): void; + /** + * Returns the number of items in the group. + */ + GetItemCount(): number; + /** + * Returns the group's item specified by its index. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): ASPxClientNavBarItem; + /** + * Returns a group item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientNavBarItem; +} +/** + * Represents a client-side equivalent of the navbar's NavBarItem object. + */ +interface ASPxClientNavBarItem { + /** + * Gets the navbar to which the current item belongs. + * Value: An ASPxClientNavBar object representing the navbar to which the item belongs. + */ + navBar: ASPxClientNavBar; + /** + * Gets the group to which the current item belongs. + * Value: An ASPxClientNavBarGroup object representing the group to which the item belongs. + */ + group: ASPxClientNavBarGroup; + /** + * Gets the item's index within a collection of a group's items. + * Value: An integer value representing the item's zero-based index within the Items collection of the group to which the item belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the item. + * Value: A string value that represents the value assigned to the item's Name property. + */ + name: string; + /** + * Returns a value indicating whether an item is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether the item is enabled. + * @param value true if the item is enabled; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL which points to the image displayed within the item. + */ + GetImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the item. + * @param value A string value that specifies the URL to the image displayed within the item. + */ + SetImageUrl(value: string): void; + /** + * Gets an URL which defines the item's navigation location. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the item's navigation location. + * @param value A string value which represents the URL to where the client web browser will navigate when the item is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Returns text displayed within the item. + */ + GetText(): string; + /** + * Specifies the text displayed within the item. + * @param value A string value that represents the text displayed within the item. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether an item is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether the item is visible. + * @param value true is the item is visible; otherwise, false. + */ + SetVisible(value: boolean): void; +} +/** + * A method that will handle the navbar's client events concerning manipulations with an item. + */ +interface ASPxClientNavBarItemEventHandler { + /** + * A method that will handle the navbar's client events concerning manipulations with an item. + * @param source An object representing the event's source. Identifies the navbar object that raised the event. + * @param e An ASPxClientNavBarItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarItemEventArgs): void; +} +/** + * Provides data for events which concern manipulations on items. + */ +interface ASPxClientNavBarItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the item object related to the event. + * Value: An ASPxClientNavBarItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientNavBarItem; + /** + * Gets the HTML object that contains the processed navbar item. + * Value: An object representing a container for the navbar item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the navbar's client events concerning manipulations with a group. + */ +interface ASPxClientNavBarGroupEventHandler { + /** + * A method that will handle the navbar's client events concerning manipulations with a group. + * @param source An object representing the event's source. Identifies the navbar object that raised the event. + * @param e An ASPxClientNavBarGroupEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarGroupEventArgs): void; +} +/** + * Provides data for events which concern manipulations on groups. + */ +interface ASPxClientNavBarGroupEventArgs extends ASPxClientEventArgs { + /** + * Gets the group object related to the event. + * Value: An ASPxClientNavBarGroup object, manipulations on which forced the event to be raised. + */ + group: ASPxClientNavBarGroup; +} +/** + * A method that will handle the navbar's cancelable client events concerning manipulations with a group. + */ +interface ASPxClientNavBarGroupCancelEventHandler { + /** + * A method that will handle the navbar's cancelable client events concerning manipulations with a group. + * @param source An object representing the event's source. Identifies the navbar object that raised the event. + * @param e An ASPxClientNavBarGroupCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarGroupCancelEventArgs): void; +} +/** + * Provides data for cancellable events which concern manipulations on groups. + */ +interface ASPxClientNavBarGroupCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the group object related to the event. + * Value: An ASPxClientNavBarGroup object representing the group manipulations on which forced the navbar to raise the event. + */ + group: ASPxClientNavBarGroup; +} +/** + * A method that will handle client events concerning clicks on the control's group headers. + */ +interface ASPxClientNavBarGroupClickEventHandler { + /** + * A method that will handle the navbar's client events concerning clicks on groups. + * @param source The event source. This parameter identifies the navbar object which raised the event. + * @param e An ASPxClientNavBarGroupClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarGroupClickEventArgs): void; +} +/** + * Provides data for events which concern clicking on the control's group headers. + */ +interface ASPxClientNavBarGroupClickEventArgs extends ASPxClientNavBarGroupCancelEventArgs { + /** + * Gets the HTML object that contains the processed group. + * Value: An object representing a container for the group related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxNewsControl object. + */ +interface ASPxClientNewsControl extends ASPxClientDataView { + /** + * Fires after an item's tail has been clicked. + */ + TailClick: ASPxClientEvent>; +} +/** + * A method that will handle client events concerning manipulations with an item. + */ +interface ASPxClientNewsControlItemEventHandler { + /** + * A method that will handle the news control's client events concerning manipulations with an item. + * @param source An object representing the event's source. Identifies the news control object that raised the event. + * @param e An ASPxClientNewsControlItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNewsControlItemEventArgs): void; +} +/** + * Provides data for events which concern tail clicking within the control's items. + */ +interface ASPxClientNewsControlItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the name that uniquely identifies the processed item. + * Value: A string value that represents the value assigned to the processed item's Name property. + */ + name: Object; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxObjectContainer control. + */ +interface ASPxClientObjectContainer extends ASPxClientControl { + /** + * Occurs on the client side when the FSCommand action is called within the associated flash object's action script. + */ + FlashScriptCommand: ASPxClientEvent>; + /** + * Play the Flash movie backwards. + */ + Back(): void; + /** + * Returns the value of the Flash variable specified. + * @param name A string value that specifies the Flash variable. + */ + GetVariable(name: string): string; + /** + * Play the Flash movie forwards. + */ + Forward(): void; + /** + * Activates the specified frame in the Flash movie. + * @param frameNumber An integer value that specifies the requested frame. + */ + GotoFrame(frameNumber: number): void; + /** + * Indicates whether the Flash movie is currently playing. + */ + IsPlaying(): boolean; + /** + * Loads the Flash movie to the specified layer. + * @param layerNumber An integer value that identifies a layer in which to load the movie. + * @param url A string value that specifies the movie's URL. + */ + LoadMovie(layerNumber: number, url: string): void; + /** + * Pans a zoomed-in Flash movie to the specified coordinates. + * @param x An integer value that specifies the X-coordinate. + * @param y An integer value that specifies the Y-coordinate. + * @param mode 0 the coordinates are pixels; 1 the coordinates are a percentage of the window. + */ + Pan(x: number, y: number, mode: number): void; + /** + * Returns the percent of the Flash Player movie that has streamed into the browser so far. + */ + PercentLoaded(): string; + /** + * Starts playing the Flash movie. + */ + Play(): void; + /** + * Rewinds the Flash movie to the first frame. + */ + Rewind(): void; + /** + * Sets the value of the specified Flash variable. + * @param name A string value that specifies the Flash variable. + * @param value A string value that represents a new value. + */ + SetVariable(name: string, value: string): void; + /** + * Zooms in on the specified rectangular area of the Flash movie. + * @param left An integer value that specifies the x-coordinate of the rectangle's left side, in twips. + * @param top An integer value that specifies the y-coordinate of the rectangle's top side, in twips. + * @param right An integer value that specifies the x-coordinate of the rectangle's right side, in twips. + * @param bottom An integer value that specifies the y-coordinate of the rectangle's bottom side, in twips. + */ + SetZoomRect(left: number, top: number, right: number, bottom: number): void; + /** + * Stops playing the Flash movie. + */ + StopPlay(): void; + /** + * Returns the total number of frames in the Flash movie. + */ + TotalFrames(): number; + /** + * Zooms the Flash view by a relative scale factor. + * @param percent An integer value that specifies the relative scale factor, as a percentage. + */ + Zoom(percent: number): void; + /** + * Starts playing a Quick Time movie. + */ + QTPlay(): void; + /** + * Stops playing a Quick Time movie. + */ + QTStopPlay(): void; + /** + * Rewinds a Quick Time movie to the first frame. + */ + QTRewind(): void; + /** + * Steps through a Quick Time video stream by a specified number of frames. + * @param count An integer value that specifies the number of frames to step. + */ + QTStep(count: number): void; +} +/** + * A method that will handle the FlashScriptCommand event. + */ +interface ASPxClientFlashScriptCommandEventHandler { + /** + * A method that will handle the FlashScriptCommand event. + * @param source The event source. + * @param e A ASPxClientFlashScriptCommandEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFlashScriptCommandEventArgs): void; +} +/** + * Provides data for the FlashScriptCommand client event. + */ +interface ASPxClientFlashScriptCommandEventArgs extends ASPxClientEventArgs { + /** + * Gets a command passed via the FSCommand action of the flash object. + * Value: A string that represents the value of the FSCommand action's command parameter. + */ + command: string; + /** + * Gets arguments passed via the FSCommand action of the flash object. + * Value: A string that represents the value of the FSCommand action's args parameter. + */ + args: string; +} +/** + * Lists the available link types within office documents. + */ +interface ASPxClientOfficeDocumentLinkType { +} +/** + * Serves as the base class for controls that implement panel functionality. + */ +interface ASPxClientPanelBase extends ASPxClientControl { + /** + * Returns the HTML code that is the content of the panel. + */ + GetContentHtml(): string; + /** + * Sets the HTML content for the panel. + * @param html A string value that is the HTML code defining the content of the panel. + */ + SetContentHtml(html: string): void; + /** + * Sets a value specifying whether the panel is enabled. + * @param enabled true to enable the panel; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value specifying whether a panel is enabled. + */ + GetEnabled(): boolean; +} +/** + * Represents a client-side equivalent of the ASPxPanel control. + */ +interface ASPxClientPanel extends ASPxClientPanelBase { + /** + * Occurs when the expanded panel is closed. + */ + Collapsed: ASPxClientEvent>; + /** + * Occurs when an end-user opens the expand panel. + */ + Expanded: ASPxClientEvent>; + /** + * Expands or collapses the client panel. + */ + Toggle(): void; + /** + * Returns a value specifying whether the panel can be expanded. + */ + IsExpandable(): boolean; + /** + * Returns a value specifying whether the panel is expanded. + */ + IsExpanded(): boolean; + /** + * Expands the collapsed panel. + */ + Expand(): void; + /** + * Collapses the expanded panel. + */ + Collapse(): void; +} +/** + * Represents a client-side equivalent of the ASPxPopupControl control. + */ +interface ASPxClientPopupControl extends ASPxClientPopupControlBase { + /** + * Occurs when a popup window's close button is clicked. + */ + CloseButtonClick: ASPxClientEvent>; + /** + * This method is not in effect for a ASPxClientPopupControl object. + */ + GetMainElement(): Object; + /** + * Returns an object containing the information about a mouse event that invoked a default popup window. + */ + GetPopUpReasonMouseEvent(): Object; + /** + * Returns an object containing the information about a mouse event that invoked the specified popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowPopUpReasonMouseEvent(window: ASPxClientPopupWindow): Object; + /** + * + * @param window + * @param parameter + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void; + /** + * Sends a callback with parameters to update the popup window by processing the related popup window and the passed information on the server. + * @param window A ASPxClientPopupWindow object identifying the processed popup window. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Specifies the default popup window's size. + * @param width An integer value that specifies the default popup window's width. + * @param height An integer value that specifies the default popup window's height. + */ + SetSize(width: number, height: number): void; + /** + * Gets the width of the specified popup window's content region. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowContentWidth(window: ASPxClientPopupWindow): number; + /** + * Gets the height of the specified popup window's content region. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowContentHeight(window: ASPxClientPopupWindow): number; + /** + * Returns the height of a specific popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowHeight(window: ASPxClientPopupWindow): number; + /** + * Returns the width of a specific popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowWidth(window: ASPxClientPopupWindow): number; + /** + * Specifies the size of a specific popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + * @param width An integer value that specifies the required popup window's width. + * @param height An integer value that specifies the required popup window's height. + */ + SetWindowSize(window: ASPxClientPopupWindow, width: number, height: number): void; + /** + * Returns the HTML code that is the content of the popup control's default popup window. + */ + GetContentHTML(): string; + /** + * Defines the HTML content for the popup control's default popup window. + * @param html A string value that is the HTML code defining the content of the popup window. + */ + SetContentHTML(html: string): void; + /** + * Sets the ID of a web control or HTML element (or a list of IDs) with which the current popup control's window is associated. + * @param window An ASPxClientPopupWindow object representing a popup control's window. + * @param popupElementId A string value specifying the ID (or a list of IDs) of the web control or HTML element with which the popup control's window is associated. + */ + SetWindowPopupElementID(window: ASPxClientPopupWindow, popupElementId: string): void; + /** + * Sets the ID of a web control or HTML element (or a list of IDs) with which the current popup control is associated. + * @param popupElementId A string value specifying the ID (or a list of IDs) of the web control or HTML element to which the popup control is associated. + */ + SetPopupElementID(popupElementId: string): void; + /** + * Returns an index of the object that invoked the default window within the PopupElementID list. + */ + GetCurrentPopupElementIndex(): number; + /** + * Returns an index of the object that invoked the specified popup window, within the window's PopupElementID list. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowCurrentPopupElementIndex(window: ASPxClientPopupWindow): number; + /** + * Returns an object that invoked the default window. + */ + GetCurrentPopupElement(): Object; + /** + * Returns an object that invoked the specified popup window. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowCurrentPopupElement(window: ASPxClientPopupWindow): Object; + /** + * Returns a value that specifies whether the popup control's specific window is displayed. + * @param window A ASPxClientPopupWindow object representing the popup window whose visibility is checked. + */ + IsWindowVisible(window: ASPxClientPopupWindow): boolean; + /** + * Returns a popup window specified by its index. + * @param index An integer value specifying the zero-based index of the popup window object to be retrieved. + */ + GetWindow(index: number): ASPxClientPopupWindow; + /** + * Returns a popup window specified by its name. + * @param name A string value specifying the name of the popup window. + */ + GetWindowByName(name: string): ASPxClientPopupWindow; + /** + * Returns the number of popup windows in the popup control. + */ + GetWindowCount(): number; + /** + * Invokes the popup control's specific window. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + */ + ShowWindow(window: ASPxClientPopupWindow): void; + /** + * Invokes the specified popup window at the popup element with the specified index. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + * @param popupElementIndex An integer value specifying the zero-based index of the popup element within the window's PopupElementID list. + */ + ShowWindow(window: ASPxClientPopupWindow, popupElementIndex: number): void; + /** + * Invokes the popup control's specific window and displays it over the specified HTML element. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + * @param htmlElement An object specifying the HTML element relative to whose position the default popup window is invoked. + */ + ShowWindowAtElement(window: ASPxClientPopupWindow, htmlElement: Object): void; + /** + * Invokes the popup control's specific window and displays it over an HTML element specified by its unique identifier. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + * @param id A string value that specifies the hierarchically qualified identifier of an HTML element relative to whose position the default popup window is invoked. + */ + ShowWindowAtElementByID(window: ASPxClientPopupWindow, id: string): void; + /** + * Invokes the popup control's specific popup window at the specified position. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + * @param x A integer value specifying the x-coordinate of the popup window's display position. + * @param y A integer value specifying the y-coordinate of the popup window's display position. + */ + ShowWindowAtPos(window: ASPxClientPopupWindow, x: number, y: number): void; + /** + * Brings the specified popup window to the front of the z-order. + * @param window A ASPxClientPopupWindow object representing the popup window. + */ + BringWindowToFront(window: ASPxClientPopupWindow): void; + /** + * Closes the popup control's specified window. + * @param window A ASPxClientPopupWindow object representing the popup window to close. + */ + HideWindow(window: ASPxClientPopupWindow): void; + /** + * Returns the HTML code that represents the contents of the specified popup window. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowContentHtml(window: ASPxClientPopupWindow): string; + /** + * Defines the HTML content for a specific popup window within the popup control. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + * @param html A string value that represents the HTML code defining the content of the specified popup window. + */ + SetWindowContentHtml(window: ASPxClientPopupWindow, html: string): void; + /** + * Returns an iframe object containing a web page specified via the specified popup window's SetWindowContentUrl client method). + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + GetWindowContentIFrame(window: ASPxClientPopupWindow): Object; + /** + * Returns the URL pointing to the web page displayed within the control's specific popup window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + GetWindowContentUrl(window: ASPxClientPopupWindow): string; + /** + * Sets the URL pointing to the web page that should be loaded into and displayed within the control's specific popup window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param url A string value specifying the URL to the web page to be displayed within the specified popup window. + */ + SetWindowContentUrl(window: ASPxClientPopupWindow, url: string): void; + /** + * Returns a value indicating whether the specified window is pinned. + * @param window An ASPxClientPopupWindow object specifying the popup window. + */ + GetWindowPinned(window: ASPxClientPopupWindow): boolean; + /** + * Sets a value indicating whether the specified window is pinned. + * @param window An ASPxClientPopupWindow object specifying the popup window. + * @param value true to pin the window; otherwise, false. + */ + SetWindowPinned(window: ASPxClientPopupWindow, value: boolean): void; + /** + * Returns a value indicating whether the specified window is maximized. + * @param window An ASPxClientPopupWindow object specifying the popup window. + */ + GetWindowMaximized(window: ASPxClientPopupWindow): boolean; + /** + * Sets a value indicating whether the specified window is maximized. + * @param window An ASPxClientPopupWindow object specifying the popup window. + * @param value true to maximize the window; otherwise, false. + */ + SetWindowMaximized(window: ASPxClientPopupWindow, value: boolean): void; + /** + * Returns a value indicating whether the specified window is collapsed. + * @param window An ASPxClientPopupWindow object specifying the popup window. + */ + GetWindowCollapsed(window: ASPxClientPopupWindow): boolean; + /** + * Sets a value indicating whether the specified window is collapsed. + * @param window An ASPxClientPopupWindow object specifying the popup window. + * @param value true to collapse the window; otherwise, false. + */ + SetWindowCollapsed(window: ASPxClientPopupWindow, value: boolean): void; + /** + * Refreshes the content of the web page displayed within the control's specific popup window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + RefreshWindowContentUrl(window: ASPxClientPopupWindow): void; + /** + * Updates the default popup window's position, to correctly align it at either the specified element, or the center of the browser's window. + */ + UpdatePosition(): void; + /** + * Updates the default popup window's position, to correctly align it at the specified HTML element. + * @param htmlElement An object specifying the HTML element to which the default popup window is aligned using the PopupVerticalAlign properties. + */ + UpdatePositionAtElement(htmlElement: Object): void; + /** + * Updates the specified popup window's position, to correctly align it at either the specified element, or the center of the browser's window. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + UpdateWindowPosition(window: ASPxClientPopupWindow): void; + /** + * Updates the specified popup window's position, to correctly align it at the specified HTML element. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + * @param htmlElement An object specifying the HTML element to which the specified popup window is aligned using the PopupVerticalAlign properties. + */ + UpdateWindowPositionAtElement(window: ASPxClientPopupWindow, htmlElement: Object): void; + /** + * Refreshes the connection between the ASPxPopupControl and the popup element. + */ + RefreshPopupElementConnection(): void; +} +/** + * Represents a client-side equivalent of a popup control's PopupWindow object. + */ +interface ASPxClientPopupWindow { + /** + * Gets the popup control to which the current popup window belongs. + * Value: An ASPxClientPopupControl object representing the popup control to which the window belongs. + */ + popupControl: ASPxClientPopupControl; + /** + * Gets the index of the current popup window within the popup control's Windows collection. + * Value: An integer value representing the zero-based index of the current popup window within the Windows collection of the popup control to which the window belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the current popup window. + * Value: A string value that represents a value assigned to the popup window's Name property. + */ + name: string; + /** + * Returns the URL pointing to the image displayed within the window header. + */ + GetHeaderImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the window header. + * @param value A string value that is the URL to the image displayed within the header. + */ + SetHeaderImageUrl(value: string): void; + /** + * Returns the URL pointing to the image displayed within the window footer. + */ + GetFooterImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the window footer. + * @param value A string value that is the URL to the image displayed within the window footer. + */ + SetFooterImageUrl(value: string): void; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within the popup window's header. + */ + GetHeaderNavigateUrl(): string; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within the popup window's header. + * @param value A string value which specifies the required navigation location. + */ + SetHeaderNavigateUrl(value: string): void; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within the popup window's footer. + */ + GetFooterNavigateUrl(): string; + /** + * Specifies the URL where the web browser will navigate when the text or image is clicked within the popup window's footer. + * @param value A string value which specifies the required navigation location. + */ + SetFooterNavigateUrl(value: string): void; + /** + * Returns the text displayed within the window's header. + */ + GetHeaderText(): string; + /** + * Specifies the text displayed within the window's header. + * @param value A string value that specifies the window's header text. + */ + SetHeaderText(value: string): void; + /** + * Returns the text displayed within the popup window's footer. + */ + GetFooterText(): string; + /** + * Specifies the text displayed within the window's footer. + * @param value A string value that specifies the window's footer text. + */ + SetFooterText(value: string): void; +} +/** + * A method that will handle the popup control's client events invoked in response to manipulating a popup window. + */ +interface ASPxClientPopupWindowEventHandler { + /** + * A method that will handle the popup control's client events when a popup window is manipulated. + * @param source An object representing the event's source. Identifies the popup control object (ASPxClientPopupControl) that raised the event. + * @param e An ASPxClientPopupWindowEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowEventArgs): void; +} +/** + * Provides data for events concerning client manipulations on popup windows. + */ +interface ASPxClientPopupWindowEventArgs extends ASPxClientEventArgs { + /** + * Gets the popup window object related to the event. + * Value: An ASPxClientPopupWindow object representing the popup window that was manipulated, causing the popup control to raise the event. + */ + window: ASPxClientPopupWindow; +} +/** + * A method that will handle the popup window's cancellable client events, such as the Closing. + */ +interface ASPxClientPopupWindowCancelEventHandler { + /** + * A method that will handle the popup window's cancelable client events. + * @param source An object representing the event's source. Identifies the popup window object that raised the event. + * @param e An ASPxClientPopupWindowCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowCancelEventArgs): void; +} +/** + * Provides data for the popup control's cancellable client events, such as the Closing. + */ +interface ASPxClientPopupWindowCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the popup window object related to the event. + * Value: An ASPxClientPopupWindow object representing the popup window that was manipulated, causing the popup control to raise the event. + */ + window: ASPxClientPopupWindow; + /** + * Gets the value that identifies the reason the popup window is about to close. + * Value: One of the ASPxClientPopupControlCloseReason enumeration values. + */ + closeReason: ASPxClientPopupControlCloseReason; +} +/** + * A method that will handle the CloseUp event. + */ +interface ASPxClientPopupWindowCloseUpEventHandler { + /** + * A method that will handle the CloseUp event. + * @param source The event source. + * @param e An ASPxClientPopupWindowCloseUpEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowCloseUpEventArgs): void; +} +/** + * Provides data for the CloseUp event. + */ +interface ASPxClientPopupWindowCloseUpEventArgs extends ASPxClientPopupWindowEventArgs { + /** + * Gets the value that identifies the reason the popup window closes. + * Value: One of the ASPxClientPopupControlCloseReason enumeration values. + */ + closeReason: ASPxClientPopupControlCloseReason; +} +/** + * A method that will handle the Resize event. + */ +interface ASPxClientPopupWindowResizeEventHandler { + /** + * A method that will handle the Resize event. + * @param source The event source. + * @param e A ASPxClientPopupWindowResizeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowResizeEventArgs): void; +} +/** + * Provides data for the Resize event. + */ +interface ASPxClientPopupWindowResizeEventArgs extends ASPxClientPopupWindowEventArgs { + /** + * Returns the value indicating the window state after resizing. + * Value: The integer value indicating the window resize state. + */ + resizeState: number; +} +/** + * A method that will handle the PinnedChanged event. + */ +interface ASPxClientPopupWindowPinnedChangedEventHandler { + /** + * A method that will handle the PinnedChanged event. + * @param source The event source. + * @param e A ASPxClientPopupWindowPinnedChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowPinnedChangedEventArgs): void; +} +/** + * Provides data for the PinnedChanged event. + */ +interface ASPxClientPopupWindowPinnedChangedEventArgs extends ASPxClientPopupWindowEventArgs { + /** + * Gets a value indicating whether the processed popup window has been pinned. + * Value: true, if the window has been pinned; otherwise, false. + */ + pinned: boolean; +} +/** + * Represents a client collection that maintains client popup control objects. + */ +interface ASPxClientPopupControlCollection extends ASPxClientControlCollection { + /** + * Hides all popup windows maintained by the collection. + */ + HideAllWindows(): void; +} +/** + * Declares client constants that identify the reason the popup window closes. + */ +interface ASPxClientPopupControlCloseReason { +} +/** + * Represents a client-side equivalent of the ASPxPopupMenu object. + */ +interface ASPxClientPopupMenu extends ASPxClientMenuBase { + /** + * Sets the ID of a web control or HTML element (or a list of IDs) with which the current popup menu is associated. + * @param popupElementId A string value specifying the ID (or a list of IDs) of the web control or HTML element with which the popup menu is associated. + */ + SetPopupElementID(popupElementId: string): void; + /** + * Returns an index of the object that invoked the popup menu within the PopupElementID list. + */ + GetCurrentPopupElementIndex(): number; + /** + * Returns an object that invoked the popup menu. + */ + GetCurrentPopupElement(): Object; + /** + * Refreshes the connection between the ASPxPopupMenu and the popup element. + */ + RefreshPopupElementConnection(): void; + /** + * Hides the popup menu. + */ + Hide(): void; + /** + * Invokes the popup menu. + */ + Show(): void; + /** + * Invokes the popup menu at the popup element with the specified index. + * @param popupElementIndex An integer value specifying the zero-based index of the popup element. + */ + Show(popupElementIndex: number): void; + /** + * Invokes the popup menu and displays it over the specified HTML element. + * @param htmlElement An object specifying the HTML element relative to which position the popup menu is invoked. + */ + ShowAtElement(htmlElement: Object): void; + /** + * Invokes the popup menu and displays it over an HTML element specified by its unique identifier. + * @param id A string value that specifies the hierarchically qualified identifier of an HTML element relative to which position the popup menu is invoked. + */ + ShowAtElementByID(id: string): void; + /** + * Invokes the popup menu at the specified position. + * @param x An integer value specifying the x-coordinate of the popup menu's display position. + * @param y An integer value specifying the y-coordinate of the popup menu's display position. + */ + ShowAtPos(x: number, y: number): void; +} +/** + * Represents the client-side equivalent of the ASPxRatingControl control. + */ +interface ASPxClientRatingControl extends ASPxClientControl { + /** + * Fires on the server after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor is moved into a rating control item. + */ + ItemMouseOver: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor moves outside a rating control item. + */ + ItemMouseOut: ASPxClientEvent>; + /** + * Gets the item tooltip title specified by the item index. + * @param index An integer value specifying the item index. + */ + GetTitle(index: number): string; + /** + * Returns a value indicating whether the control's status is read-only. + */ + GetReadOnly(): boolean; + /** + * Specifies whether the control's status is read-only. + * @param value true to make the control read-only; otherwise, false. + */ + SetReadOnly(value: boolean): void; + /** + * Returns the value of the ASPxRatingControl. + */ + GetValue(): number; + /** + * Modifies the value of the ASPxRatingControl on the client side. + * @param value A decimal value representing the value of the control. + */ + SetValue(value: number): void; +} +/** + * A method that will handle the client ItemClick event. + */ +interface ASPxClientRatingControlItemClickEventHandler { + /** + * A method that will handle the client ItemClick event. + * @param source An object representing the event source. + * @param e A ASPxClientRatingControlItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRatingControlItemClickEventArgs): void; +} +/** + * Provides data for the ItemClick event. + */ +interface ASPxClientRatingControlItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An integer value that represents the clicked item's index. + */ + index: number; +} +/** + * A method that will handle the rating control's ItemMouseOver and ItemMouseOut client events (such as ItemMouseOut). + */ +interface ASPxClientRatingControlItemMouseEventHandler { + /** + * A method that will handle the ItemMouseOver events. + * @param source The event source. + * @param e An ASPxClientRatingControlItemMouseEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRatingControlItemMouseEventArgs): void; +} +/** + * Provides data for the rating control's ItemMouseOver and ItemMouseOut client events (such as ItemMouseOut). + */ +interface ASPxClientRatingControlItemMouseEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An integer value that represents the related item's index. + */ + index: number; +} +/** + * Represents the client-side equivalent of the ASPxRibbon control. + */ +interface ASPxClientRibbon extends ASPxClientControl { + /** + * Occurs after an end-user executes an action on a ribbon item. + */ + CommandExecuted: ASPxClientEvent>; + /** + * Fires on the client side after the active tab has been changed within a ribbon control. + */ + ActiveTabChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the ribbon minimization state is changed by end-user actions. + */ + MinimizationStateChanged: ASPxClientEvent>; + /** + * Occurs when the file tab is clicked. + */ + FileTabClicked: ASPxClientEvent>; + /** + * Fires on the client side after a dialog box launcher has been clicked. + */ + DialogBoxLauncherClicked: ASPxClientEvent>; + /** + * Fires after key tips are closed by pressing Esc. + */ + KeyTipsClosedOnEscape: ASPxClientEvent>; + /** + * Specifies whether the ribbon control is enabled. + * @param enabled true to enable the ribbon; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value indicating whether the ribbon is enabled. + */ + GetEnabled(): boolean; + /** + * Returns a tab specified by its index. + * @param index An integer value specifying the zero-based index of the tab object to retrieve. + */ + GetTab(index: number): ASPxClientRibbonTab; + /** + * Returns a tab specified by its name. + * @param name A string value specifying the name of the tab. + */ + GetTabByName(name: string): ASPxClientRibbonTab; + /** + * Returns the number of tabs in the ribbon Tabs collection. + */ + GetTabCount(): number; + /** + * Returns the active tab within the ribbon control. + */ + GetActiveTab(): ASPxClientRibbonTab; + /** + * Makes the specified tab active in the ribbon control on the client side. + * @param tab A ASPxClientRibbonTab object specifying the tab selection. + */ + SetActiveTab(tab: ASPxClientRibbonTab): void; + /** + * Makes a tab active within the ribbon control, specifying the tab's index. + * @param index An integer value specifying the index of the tab to select. + */ + SetActiveTabIndex(index: number): void; + /** + * Returns a ribbon item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientRibbonItem; + /** + * Returns a value of item with the specified name. + * @param name A string value specifying the name of the item. + */ + GetItemValueByName(name: string): Object; + /** + * Sets the value of the item with the specified name. + * @param name A string value specifying the name of the item. + * @param value An object that is the new item value. + */ + SetItemValueByName(name: string, value: Object): void; + /** + * Specifies whether the ribbon is minimized. + * @param minimized true to set the ribbon state to minimized; false to set the ribbon state to normal. + */ + SetMinimized(minimized: boolean): void; + /** + * Gets a value specifying whether the ribbon is minimized. + */ + GetMinimized(): boolean; + /** + * Specifies the visibility of a context tab category specified by its name. + * @param categoryName A Name property value of the required category. + * @param visible true to make a category visible; false to make it hidden. + */ + SetContextTabCategoryVisible(categoryName: string, visible: boolean): void; + /** + * Shows ribbon key tips. + */ + ShowKeyTips(): void; +} +/** + * A client-side equivalent of the ribbon's RibbonTab object. + */ +interface ASPxClientRibbonTab { + /** + * Gets the client ribbon object to which the current tab belongs. + * Value: An object to which the tab belongs. + */ + ribbon: ASPxClientRibbon; + /** + * Gets or sets the tab's index within the collection. + * Value: An integer value that is the zero-based index of the tab within the collection. + */ + index: number; + /** + * Gets the name of the current ribbon tab. + * Value: A string value that is the tab's name. + */ + name: string; + /** + * Returns the text displayed in the tab. + */ + GetText(): string; + /** + * Sets a value specifying whether the tab is enabled. + * @param enabled true to enable the tab; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value indicating whether a ribbon tab is enabled. + */ + GetEnabled(): boolean; + /** + * Returns a value specifying whether a ribbon tab is displayed. + */ + GetVisible(): boolean; +} +/** + * A client-side equivalent of the ribbon's RibbonGroup object. + */ +interface ASPxClientRibbonGroup { + /** + * Gets the client ribbon object to which the current group belongs. + * Value: An object to which the group belongs. + */ + ribbon: ASPxClientRibbon; + /** + * Gets the client tab object to which the current group belongs. + * Value: An object to which the group belongs. + */ + tab: ASPxClientRibbonTab; + /** + * Gets or sets the group's index within the collection. + * Value: An integer value that is the zero-based index of the group within the collection. + */ + index: number; + /** + * Gets the name of the current ribbon group. + * Value: A string value that is the group's name. + */ + name: string; + /** + * Returns a value specifying whether a ribbon group is displayed. + */ + GetVisible(): boolean; +} +/** + * A client-side equivalent of the ribbon's RibbonItemBase object. + */ +interface ASPxClientRibbonItem { + /** + * Gets the client group object to which the current item belongs. + * Value: An object to which the item belongs. + */ + group: ASPxClientRibbonGroup; + /** + * Gets or sets the item's index within the collection. + * Value: An integer value that is the zero-based index of the item within the collection. + */ + index: number; + /** + * Gets the name of the current ribbon item. + * Value: A string value that is the item's name. + */ + name: string; + /** + * Gets the client ribbon object to which the current item belongs. + * Value: An object to which the item belongs. + */ + ribbon: ASPxClientRibbon; + /** + * Returns a value indicating whether a ribbon item is enabled. + */ + GetEnabled(): boolean; + /** + * Sets a value specifying whether the item is enabled. + * @param enabled true to enable the item; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns the item value. + */ + GetValue(): Object; + /** + * Sets the item value. + * @param value An that specifies the item value. + */ + SetValue(value: Object): void; + /** + * Returns a value specifying whether a ribbon item is displayed. + */ + GetVisible(): boolean; +} +/** + * A method that will handle the CommandExecuted event. + */ +interface ASPxClientRibbonCommandExecutedEventHandler { + /** + * A method that will handle the CommandExecuted event. + * @param source The event source. Identifies the ASPxRibbon control that raised the event. + * @param e An ASPxClientRibbonCommandExecutedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonCommandExecutedEventArgs): void; +} +/** + * Provides data for the CommandExecuted event. + */ +interface ASPxClientRibbonCommandExecutedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets an item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientRibbonItem; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: string; +} +/** + * A method that will handle the ActiveTabChanged event. + */ +interface ASPxClientRibbonTabEventHandler { + /** + * A method that will handle the ActiveTabChanged event. + * @param source The event source. Identifies the ASPxRibbon control that raised the event. + * @param e A ASPxClientRibbonTabEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonTabEventArgs): void; +} +/** + * Provides data for the ActiveTabChanged event. + */ +interface ASPxClientRibbonTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the tab object related to the event. + * Value: An object that is the tab, manipulations on which forced the ribbon control to raise the event. + */ + tab: ASPxClientRibbonTab; +} +/** + * A method that will handle the MinimizationStateChanged event. + */ +interface ASPxClientRibbonMinimizationStateEventHandler { + /** + * A method that will handle the MinimizationStateChanged event. + * @param source The event source. Identifies the ASPxRibbon control that raised the event. + * @param e An ASPxClientRibbonMinimizationStateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonMinimizationStateEventArgs): void; +} +/** + * Provides data for the MinimizationStateChanged event. + */ +interface ASPxClientRibbonMinimizationStateEventArgs extends ASPxClientEventArgs { + /** + * Returns the value indicating the new ribbon state. + * Value: The integer value indicating the ribbon minimization state. + */ + ribbonState: number; +} +/** + * A method that will handle the DialogBoxLauncherClicked event. + */ +interface ASPxClientRibbonDialogBoxLauncherClickedEventHandler { + /** + * A method that will handle the DialogBoxLauncherClicked event. + * @param source The event source. This parameter identifies the ribbon object which raised the event. + * @param e An ASPxClientRibbonDialogBoxLauncherClickedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonDialogBoxLauncherClickedEventArgs): void; +} +/** + * Provides data for the DialogBoxLauncherClicked event. + */ +interface ASPxClientRibbonDialogBoxLauncherClickedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the client group object to which the clicked dialog box launcher belongs. + * Value: An object to which the dialog box launcher belongs. + */ + group: ASPxClientRibbonGroup; +} +/** + * Represents a client-side equivalent of the ASPxRoundPanel control. + */ +interface ASPxClientRoundPanel extends ASPxClientPanelBase { + /** + * Fires on the client side after a panel has been expanded or collapsed via end-user interactions, i.e., by clicking a panel header or collapse button. + */ + CollapsedChanged: ASPxClientEvent>; + /** + * Fires on the client side before a panel is expanded or collapsed by end-user interactions, i.e., by clicking a panel header or collapse button. + */ + CollapsedChanging: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientRoundPanel. + */ + CallbackError: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Returns the text displayed within the panel's header. + */ + GetHeaderText(): string; + /** + * Specifies the text displayed in the panel's header. + * @param text A string value that specifies the panel header's text. + */ + SetHeaderText(text: string): void; + /** + * Returns a value indicating whether the panel is collapsed. + */ + GetCollapsed(): boolean; + /** + * Sets a value indicating whether the panel is collapsed. + * @param collapsed true, to collapse the panel; otherwise, false. + */ + SetCollapsed(collapsed: boolean): void; +} +/** + * Represents a client-side equivalent of the ASPxSplitter object. + */ +interface ASPxClientSplitter extends ASPxClientControl { + /** + * Fires before a pane is resized. + */ + PaneResizing: ASPxClientEvent>; + /** + * Fires after a pane has been resized. + */ + PaneResized: ASPxClientEvent>; + /** + * Fires before a pane is collapsed. + */ + PaneCollapsing: ASPxClientEvent>; + /** + * Fires after a pane has been collapsed. + */ + PaneCollapsed: ASPxClientEvent>; + /** + * Fires before a pane is expanded. + */ + PaneExpanding: ASPxClientEvent>; + /** + * Fires after a pane has been expanded. + */ + PaneExpanded: ASPxClientEvent>; + /** + * Occurs when a pane resize operation has been completed. + */ + PaneResizeCompleted: ASPxClientEvent>; + /** + * Fires after a specific web page has been loaded into a pane. + */ + PaneContentUrlLoaded: ASPxClientEvent>; + /** + * Returns the number of panes at the root level of a splitter. + */ + GetPaneCount(): number; + /** + * Returns the splitter's root pane specified by its index within the Panes collection. + * @param index An integer value specifying the zero-based index of the root pane to be retrieved. + */ + GetPane(index: number): ASPxClientSplitterPane; + /** + * Returns a pane specified by its name. + * @param name A string value specifying the name of the pane. + */ + GetPaneByName(name: string): ASPxClientSplitterPane; + /** + * Specifies whether the control's panes can be resized by end-users on the client side. + * @param allowResize true if pane resizing is allowed; otherwise, false. + */ + SetAllowResize(allowResize: boolean): void; + /** + * Returns a string value that represents the client state of splitter panes. + */ + GetLayoutData(): string; +} +/** + * Represents a client-side equivalent of the splitter's SplitterPane object. + */ +interface ASPxClientSplitterPane { + /** + * Gets the index of the current pane within the pane collection to which it belongs. + * Value: An integer value representing the zero-based index of the current pane within the SplitterPaneCollection collection. + */ + index: number; + /** + * Gets the name that uniquely identifies the current splitter pane. + * Value: A string value that represents the value assigned to the pane's Name property. + */ + name: string; + /** + * Returns a client splitter object that contains the current pane. + */ + GetSplitter(): ASPxClientSplitter; + /** + * Returns the immediate parent of the current pane. + */ + GetParentPane(): ASPxClientSplitterPane; + /** + * Returns the previous sibling pane of the current pane. + */ + GetPrevPane(): ASPxClientSplitterPane; + /** + * Returns the next sibling pane of the current pane. + */ + GetNextPane(): ASPxClientSplitterPane; + /** + * Determines whether the current pane is the first pane within the SplitterPaneCollection. + */ + IsFirstPane(): boolean; + /** + * Determines whether the current pane is the last pane within the SplitterPaneCollection. + */ + IsLastPane(): boolean; + /** + * Returns a value that indicates the orientation in which the current pane and its sibling panes are stacked. + */ + IsVertical(): boolean; + /** + * Returns the number of the current pane's immediate child panes. + */ + GetPaneCount(): number; + /** + * Returns the current pane's immediate child pane specified by its index. + * @param index An integer value specifying the zero-based index of the child pane to be retrieved. + */ + GetPane(index: number): ASPxClientSplitterPane; + /** + * Returns the current pane's child pane specified by its name. + * @param name A string value specifying the name of the pane. + */ + GetPaneByName(name: string): ASPxClientSplitterPane; + /** + * Gets the width of the pane's content area. + */ + GetClientWidth(): number; + /** + * Gets the height of the pane's content area. + */ + GetClientHeight(): number; + /** + * Collapses the current pane and occupies its space by maximizing the specified pane. + * @param maximizedPane A ASPxClientSplitterPane object specifying the pane to be maximized to occupy the freed space. + */ + Collapse(maximizedPane: ASPxClientSplitterPane): boolean; + /** + * Collapses the current pane in a forward direction and occupies its space by maximizing the previous adjacent pane. + */ + CollapseForward(): boolean; + /** + * Collapses the current pane in a backward direction, and occupies its space by maximizing the next adjacent pane. + */ + CollapseBackward(): boolean; + /** + * Expands the current pane object on the client side. + */ + Expand(): boolean; + /** + * Returns whether the pane is collapsed. + */ + IsCollapsed(): boolean; + /** + * Returns whether the pane's content is loaded from an external web page. + */ + IsContentUrlPane(): boolean; + /** + * Gets the URL of a web page displayed as a pane's content. + */ + GetContentUrl(): string; + /** + * Sets the URL to point to a web page that should be loaded into, and displayed within the current pane. + * @param url A string value specifying the URL to a web page displayed within the pane. + */ + SetContentUrl(url: string): void; + /** + * Sets the URL to point to a web page that should be loaded into, and displayed within the current pane, but should not be cached by a client browser. + * @param url A string value specifying the URL to a web page displayed within the pane. + * @param preventBrowserCaching true to prevent the browser to cache the loaded content; false to allow browser caching. + */ + SetContentUrl(url: string, preventBrowserCaching: boolean): void; + /** + * Refreshes the content of the web page displayed within the current pane. + */ + RefreshContentUrl(): void; + /** + * Returns an iframe object containing a web page specified via the pane's SetContentUrl client method). + */ + GetContentIFrame(): Object; + /** + * Specifies whether the current pane can be resized by end-users on the client side. + * @param allowResize true if pane resizing is allowed; otherwise, false. + */ + SetAllowResize(allowResize: boolean): void; + /** + * Forces the client PaneResized event to be generated. + */ + RaiseResizedEvent(): void; + /** + * Returns an HTML element representing a splitter pane object. + */ + GetElement(): Object; + /** + * Specifies the splitter pane's size in pixels. + * @param size An integer value that specifies the splitter pane's size. + */ + SetSize(size: number): void; + /** + * Specifies the splitter pane's size, in pixels or percents. + * @param size A string value that specifies the splitter pane's size, in pixels or percents. + */ + SetSize(size: string): void; + /** + * Returns the splitter pane's size, in pixels or percents. + */ + GetSize(): string; + /** + * Returns the distance between the top edge of the pane content and the topmost portion of the content currently visible in the pane. + */ + GetScrollTop(): number; + /** + * Specifies the distance between the top edge of the pane content and the topmost portion of the content currently visible in the pane. + * @param value An integer value that is the distance (in pixels). + */ + SetScrollTop(value: number): void; + /** + * Returns the distance between the left edge of the pane content and the leftmost portion of the content currently visible in the pane. + */ + GetScrollLeft(): number; + /** + * Specifies the distance between the left edge of the pane content and the leftmost portion of the content currently visible in the pane. + * @param value An integer value that is the distance (in pixels). + */ + SetScrollLeft(value: number): void; +} +/** + * A method that will handle the splitter's client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneEventHandler { + /** + * A method that will handle the splitter's client events concerning pane manipulations. + * @param source An object representing the event's source. Identifies the splitter object that raised the event. + * @param e An ASPxClientSplitterPaneEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSplitterPaneEventArgs): void; +} +/** + * A method that will handle the splitter's client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneEventArgs extends ASPxClientEventArgs { + /** + * Gets the pane object related to the event. + * Value: An ASPxClientSplitterPane object, manipulations on which forced the event to be raised. + */ + pane: ASPxClientSplitterPane; +} +/** + * A method that will handle a splitter control's cancelable client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneCancelEventHandler { + /** + * A method that will handle a splitter control's cancelable client events concerning pane manipulations. + * @param source An object representing the event's source. Identifies the splitter control object that raised the event. + * @param e An ASPxClientSplitterPaneCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSplitterPaneCancelEventArgs): void; +} +/** + * Provides data for a splitter control's cancelable client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneCancelEventArgs extends ASPxClientSplitterPaneEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents a base for the ASPxClientPageControl objects. + */ +interface ASPxClientTabControlBase extends ASPxClientControl { + /** + * Fires when a tab is clicked. + */ + TabClick: ASPxClientEvent>; + /** + * Fires on the client side after the active tab has been changed within a tab control. + */ + ActiveTabChanged: ASPxClientEvent>; + /** + * Fires on the client side before the active tab is changed within a tab control. + */ + ActiveTabChanging: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by a client tab control. + */ + CallbackError: ASPxClientEvent>; + /** + * Modifies a tab page's size in accordance with the content. + */ + AdjustSize(): void; + /** + * Returns the active tab within the tab control. + */ + GetActiveTab(): ASPxClientTab; + /** + * Makes the specified tab active within the tab control on the client side. + * @param tab An ASPxClientTab object specifying the tab to select. + */ + SetActiveTab(tab: ASPxClientTab): void; + /** + * Returns the index of the active tab within the tab control. + */ + GetActiveTabIndex(): number; + /** + * Makes a tab active within the tab control, specifying the tab's index. + * @param index An integer value specifying the index of the tab to select. + */ + SetActiveTabIndex(index: number): void; + /** + * Returns the number of tabs in the ASPxTabControl. + */ + GetTabCount(): number; + /** + * Returns a tab specified by its index. + * @param index An integer value specifying the zero-based index of the tab object to retrieve. + */ + GetTab(index: number): ASPxClientTab; + /** + * Returns a tab specified by its name. + * @param name A string value specifying the name of the tab. + */ + GetTabByName(name: string): ASPxClientTab; +} +/** + * Represents a client-side equivalent of the ASPxTabControl object. + */ +interface ASPxClientTabControl extends ASPxClientTabControlBase { +} +/** + * Represents a client-side equivalent of the ASPxPageControl object. + */ +interface ASPxClientPageControl extends ASPxClientTabControlBase { + /** + * Returns the HTML code that represents the contents of the specified page within the page control. + * @param tab An ASPxClientTab object that specifies the required page. + */ + GetTabContentHTML(tab: ASPxClientTab): string; + /** + * Defines the HTML content for a specific tab page within the page control. + * @param tab An ASPxClientTab object that specifies the required tab page. + * @param html A string value that represents the HTML code defining the content of the specified page. + */ + SetTabContentHTML(tab: ASPxClientTab, html: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * Represents a client-side equivalent of a tab control's TabPage object. + */ +interface ASPxClientTab { + /** + * Gets the tab control to which the current tab belongs. + * Value: An ASPxClientTabControlBase object representing the control to which the tab belongs. + */ + tabControl: ASPxClientTabControlBase; + /** + * Gets the index of the current tab (tabbed page) within the control's collection of tabs (tabbed pages). + * Value: An integer value representing the zero-based index of the current tab (tabbed page) within the TabPages) collection of the control to which the tab belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the current tab. + * Value: A string value that represents the value assigned to the tab's Name property. + */ + name: string; + /** + * Returns a value specifying whether a tab is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether the tab is enabled. + * @param value true to enable the tab; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL pointing to the image displayed within the tab. + */ + GetImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the tab. + * @param value A string value that is the URL to the image displayed within the tab. + */ + SetImageUrl(value: string): void; + /** + * Returns the URL pointing to the image displayed within the active tab. + */ + GetActiveImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the active tab. + * @param value A string value that is the URL to the image displayed within the active tab. + */ + SetActiveImageUrl(value: string): void; + /** + * Gets an URL which defines the navigation location for the tab. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the navigation location for the tab. + * @param value A string value which is a URL to where the client web browser will navigate when the tab is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Returns text displayed within the tab. + */ + GetText(): string; + /** + * Specifies the text displayed within the tab. + * @param value A string value that is the text displayed within the tab. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether a tab is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether the tab is visible. + * @param value true is the tab is visible; otherwise, false. + */ + SetVisible(value: boolean): void; +} +/** + * A method that will handle a tab control's client events concerning manipulations with a tab. + */ +interface ASPxClientTabControlTabEventHandler { + /** + * A method that will handle a tab control's client events concerning manipulations with a tab. + * @param source An object representing the event's source. Identifies the tab control object that raised the event. + * @param e An ASPxClientTabControlTabEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTabControlTabEventArgs): void; +} +/** + * Provides data for events which concern manipulations on tabs. + */ +interface ASPxClientTabControlTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the tab object related to the event. + * Value: An ASPxClientTab object, manipulations on which forced the event to be raised. + */ + tab: ASPxClientTab; +} +/** + * A method that will handle a tab control's cancelable client events concerning manipulations with a tab. + */ +interface ASPxClientTabControlTabCancelEventHandler { + /** + * A method that will handle a tab control's cancelable client events concerning manipulations with a tab. + * @param source An object representing the event's source. Identifies the tab control object that raised the event. + * @param e An ASPxClientTabControlTabCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTabControlTabCancelEventArgs): void; +} +/** + * Provides data for cancellable events which concern manipulations on tabs. + */ +interface ASPxClientTabControlTabCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the tab object related to the event. + * Value: An ASPxClientTab object representing the tab manipulations on which forced the tab control to raise the event. + */ + tab: ASPxClientTab; + /** + * Gets or sets a value specifying whether a callback should be sent to the server to reload the content of the page being activated. + * Value: true to reload the page's content; otherwise, false. + */ + reloadContentOnCallback: boolean; +} +/** + * A method that will handle client events concerning clicks on the control's tabs. + */ +interface ASPxClientTabControlTabClickEventHandler { + /** + * A method that will handle client events concerning clicks on tabs. + * @param source The event source. This parameter identifies the tab control object which raised the event. + * @param e An ASPxClientTabControlTabClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTabControlTabClickEventArgs): void; +} +/** + * Provides data for events which concern clicking on the control's tabs. + */ +interface ASPxClientTabControlTabClickEventArgs extends ASPxClientTabControlTabCancelEventArgs { + /** + * Gets the HTML object that contains the processed tab. + * Value: An object representing a container for the tab related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxTimer object. + */ +interface ASPxClientTimer extends ASPxClientControl { + /** + * Fires on the client side when the specified timer interval has elapsed, and the timer is enabled. + */ + Tick: ASPxClientEvent>; + /** + * Returns a value indicating whether the timer is enabled. + */ + GetEnabled(): boolean; + /** + * Enables the timer. + * @param enabled true to turn the timer on; false, to turn the timer off. + */ + SetEnabled(enabled: boolean): void; + /** + * Gets the time before the Tick event. + */ + GetInterval(): number; + /** + * Specifies the time before the Tick event. + * @param interval An integer value that specifies the number of milliseconds before the Tick event is raised relative to the last occurrence of the Tick event. The value cannot be less than one. + */ + SetInterval(interval: number): void; +} +/** + * Represents a client-side equivalent of the ASPxTitleIndex object. + */ +interface ASPxClientTitleIndex extends ASPxClientControl { + /** + * Fires after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientTitleIndex. + */ + CallbackError: ASPxClientEvent>; +} +/** + * A method that will handle client events concerning manipulations with an item. + */ +interface ASPxClientTitleIndexItemEventHandler { + /** + * A method that will handle the title index control's client events concerning manipulations with an item. + * @param source An object representing the event's source. Identifies the title index control object that raised the event. + * @param e An ASPxClientTitleIndexItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTitleIndexItemEventArgs): void; +} +/** + * Provides data for events which concern manipulations on the control's items. + */ +interface ASPxClientTitleIndexItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the name that uniquely identifies the processed item. + * Value: A string value that represents the value assigned to the processed item's Name property. + */ + name: Object; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxTreeView object. + */ +interface ASPxClientTreeView extends ASPxClientControl { + /** + * Fires on the client side after a node has been clicked. + */ + NodeClick: ASPxClientEvent>; + /** + * Fires on the client side after a node's expansion state has been changed by end-user interaction. + */ + ExpandedChanged: ASPxClientEvent>; + /** + * Fires on the client side before the expansion state of a node is changed via end-user interaction. + */ + ExpandedChanging: ASPxClientEvent>; + /** + * Occurs on the client side when the node's checked state is changed by clicking on a check box. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientTreeView. + */ + CallbackError: ASPxClientEvent>; + /** + * Returns a node specified by its index within the ASPxTreeView's node collection. + * @param index An integer value specifying the zero-based index of the node to be retrieved. + */ + GetNode(index: number): ASPxClientTreeViewNode; + /** + * Returns a node specified by its name. + * @param name A string value specifying the name of the node. + */ + GetNodeByName(name: string): ASPxClientTreeViewNode; + /** + * Returns a node specified by its text. + * @param text A string value specifying the text content of the node. + */ + GetNodeByText(text: string): ASPxClientTreeViewNode; + /** + * Returns the number of nodes at the ASPxTreeView's zero level. + */ + GetNodeCount(): number; + /** + * Returns the selected node within the ASPxTreeView control on the client side. + */ + GetSelectedNode(): ASPxClientTreeViewNode; + /** + * Selects the specified node within the ASPxTreeView control on the client side. + * @param node An ASPxClientTreeViewNode object specifying the node to select. + */ + SetSelectedNode(node: ASPxClientTreeViewNode): void; + /** + * Gets the root node of the ASPxTreeView object. + */ + GetRootNode(): ASPxClientTreeViewNode; + /** + * Collapses all nodes in the ASPxTreeView on the client side. + */ + CollapseAll(): void; + /** + * Expands all nodes in the ASPxTreeView on the client side. + */ + ExpandAll(): void; +} +/** + * Represents a client-side equivalent of the ASPxTreeView's TreeViewNode object. + */ +interface ASPxClientTreeViewNode { + /** + * Gets the client representation of the ASPxTreeView control to which the current node belongs. + * Value: An ASPxClientTreeView object representing the control to which the node belongs. + */ + treeView: ASPxClientTreeView; + /** + * Gets the current node's parent node. + * Value: An ASPxClientTreeViewNode object representing the node's immediate parent. + */ + parent: ASPxClientTreeViewNode; + /** + * Gets the node's index within the parent's collection of nodes. + * Value: An integer value representing the node's zero-based index within the Nodes collection of the node to which the node belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the node. + * Value: A string value that represents the value assigned to the node's Name property. + */ + name: string; + /** + * Returns the number of the current node's immediate child nodes. + */ + GetNodeCount(): number; + /** + * Returns the current node's immediate child node specified by its index. + * @param index An integer value specifying the zero-based index of the node to be retrieved. + */ + GetNode(index: number): ASPxClientTreeViewNode; + /** + * Returns the current node's child node specified by its name. + * @param name A string value specifying the name of the node. + */ + GetNodeByName(name: string): ASPxClientTreeViewNode; + /** + * Returns the current node's child node specified by its text. + * @param text A string value specifying the text content of the node. + */ + GetNodeByText(text: string): ASPxClientTreeViewNode; + /** + * Returns a value indicating whether the node is expanded. + */ + GetExpanded(): boolean; + /** + * Sets a value which specifies the node's expansion state. + * @param value true if the node is expanded; otherwise, false. + */ + SetExpanded(value: boolean): void; + /** + * Returns a value indicating whether the node is checked. + */ + GetChecked(): boolean; + /** + * Sets a value indicating whether the node is checked. + * @param value true if the node is checked; otherwise, false. + */ + SetChecked(value: boolean): void; + /** + * Returns a value which specifies the node's check state. + */ + GetCheckState(): string; + /** + * Returns a value specifying whether the node is enabled. + */ + GetEnabled(): boolean; + /** + * Sets a value specifying whether the node is enabled. + * @param value true to make the node enabled; false to disable it. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL pointing to the image displayed within the node. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the node. + * @param value A string value specifying the URL to the image displayed within the node. + */ + SetImageUrl(value: string): void; + /** + * Gets an URL which defines the navigation location for the node's hyperlink. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the node's navigate URL. + * @param value A string value which specifies a URL to where the client web browser will navigate when the node is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Gets the text, displayed within the node. + */ + GetText(): string; + /** + * Specifies the text, displayed within the node. + * @param value A string value that represents the text displayed within the node. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether a node is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether the node is visible. + * @param value true if the node is visible; otherwise, false. + */ + SetVisible(value: boolean): void; + /** + * Gets the HTML object that contains the current node. + */ + GetHtmlElement(): Object; +} +/** + * A method that will handle the client events concerned with node processing. + */ +interface ASPxClientTreeViewNodeProcessingModeEventHandler { + /** + * A method that will handle the client events concerned with node processing. + * @param source An object representing the event source. Identifies the ASPxClientTreeView control that raised the event. + * @param e An ASPxClientTreeViewNodeProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeProcessingModeEventArgs): void; +} +/** + * Provides data for the client events concerned with node processing, and that allow the event's processing to be passed to the server side. + */ +interface ASPxClientTreeViewNodeProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets a node object related to the event. + * Value: An ASPxClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: ASPxClientTreeViewNode; +} +/** + * A method that will handle the ASPxClientTreeView.ItemClick event. + */ +interface ASPxClientTreeViewNodeClickEventHandler { + /** + * A method that will handle the NodeClick event. + * @param source The ASPxClientTreeView control which fires the event. + * @param e An ASPxClientTreeViewNodeClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeClickEventArgs): void; +} +/** + * Provides data for the NodeClick event. + */ +interface ASPxClientTreeViewNodeClickEventArgs extends ASPxClientTreeViewNodeProcessingModeEventArgs { + /** + * Gets the HTML object that contains the processed node. + * Value: An object representing a container for the node related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the ASPxTreeView control's client events concerning manipulations with a node. + */ +interface ASPxClientTreeViewNodeEventHandler { + /** + * A method that will handle the ASPxTreeView control's client events, concerning manipulations with a node. + * @param source An object representing the event's source. Identifies the ASPxClientTreeView control object that raised the event. + * @param e An ASPxClientTreeViewNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeEventArgs): void; +} +/** + * Provides data for the ExpandedChanged events. + */ +interface ASPxClientTreeViewNodeEventArgs extends ASPxClientEventArgs { + /** + * Gets a node object related to the event. + * Value: An ASPxClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: ASPxClientTreeViewNode; +} +/** + * A method that will handle the ASPxTreeView's cancelable client events, concerning manipulations with nodes. + */ +interface ASPxClientTreeViewNodeCancelEventHandler { + /** + * A method that will handle the ASPxTreeView's cancelable client events, concerning manipulations with nodes. + * @param source An object representing the event's source. Identifies the ASPxClientTreeView object that raised the event. + * @param e An ASPxClientTreeViewNodeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeCancelEventArgs): void; +} +/** + * Provides data for the ExpandedChanging event. + */ +interface ASPxClientTreeViewNodeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets a node object related to the event. + * Value: An ASPxClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: ASPxClientTreeViewNode; +} +/** + * Represents a client-side equivalent of the ASPxUploadControl control. + */ +interface ASPxClientUploadControl extends ASPxClientControl { + /** + * Occurs on the client after a file has been uploaded. + */ + FileUploadComplete: ASPxClientEvent>; + /** + * Occurs on the client after upload of all selected files has been completed. + */ + FilesUploadComplete: ASPxClientEvent>; + /** + * Occurs on the client side before upload of the specified files starts. + */ + FileUploadStart: ASPxClientEvent>; + /** + * Occurs on the client side before file upload is started. + */ + FilesUploadStart: ASPxClientEvent>; + /** + * Fires on the client side when the text within the control's edit box is changed while the control has focus. + */ + TextChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the progress bar indicator position is changed. + */ + UploadingProgressChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the file input elements count is changed. + */ + FileInputCountChanged: ASPxClientEvent>; + /** + * Fires when the mouse enters a drop zone or an external drop zone element while dragging a file. + */ + DropZoneEnter: ASPxClientEvent>; + /** + * Fires when the mouse leaves a drop zone or an external drop zone element while dragging a file. + */ + DropZoneLeave: ASPxClientEvent>; + /** + * Initiates uploading of the specified file to the web server's memory. + */ + UploadFile(): void; + /** + * Adds a new file input element to the ASPxUploadControl. + */ + AddFileInput(): void; + /** + * Removes a file input element from the ASPxUploadControl. + * @param index An integer value that represents a file input element's index. + */ + RemoveFileInput(index: number): void; + /** + * Removes a file with the specified index from the selected file list. + * @param fileIndex An integer value that is the zero-based index of an item in the file list. + */ + RemoveFileFromSelection(fileIndex: number): void; + /** + * Gets the text displayed within the edit box of the specified file input element. + * @param index An integer value that specifies the required file input element's index. + */ + GetText(index: number): string; + /** + * Gets the number of file input elements contained within the ASPxUploadControl. + */ + GetFileInputCount(): number; + /** + * Specifies the count of the file input elements within the upload control. + * @param count An integer value that specifies the file input elements count. + */ + SetFileInputCount(count: number): void; + /** + * Specifies whether the upload control is enabled. + * @param enabled true, to enable the upload control; otherwise, false. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value indicating whether the upload control is enabled. + */ + GetEnabled(): boolean; + /** + * Initiates uploading of the specified file(s) to the web server's memory. + */ + Upload(): void; + /** + * Cancels the initiated file uploading process. + */ + Cancel(): void; + /** + * Clears the file selection in the upload control. + */ + ClearText(): void; + /** + * Sets the text to be displayed within the add button. + * @param text A string value specifying the text to be displayed within the button. + */ + SetAddButtonText(text: string): void; + /** + * Sets the text to be displayed within the upload button. + * @param text A string value specifying the text to be displayed within the button. + */ + SetUploadButtonText(text: string): void; + /** + * Returns the text displayed within the add button. + */ + GetAddButtonText(): string; + /** + * Returns the text displayed within the upload button. + */ + GetUploadButtonText(): string; + /** + * Sets the ID of a web control or HTML element (or a list of IDs), a click on which invokes file upload dialog. + * @param ids A string value specifying the ID or a list of IDs separated by the semicolon (;). + */ + SetDialogTriggerID(ids: string): void; +} +/** + * A method that will handle the client FilesUploadStart event. + */ +interface ASPxClientUploadControlFilesUploadStartEventHandler { + /** + * A method that will handle the FilesUploadStart event. + * @param source The event source. Identifies the ASPxUploadControl control that raised the event. + * @param e A ASPxClientUploadControlFilesUploadStartEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlFilesUploadStartEventArgs): void; +} +/** + * Provides data for the FilesUploadStart event. + */ +interface ASPxClientUploadControlFilesUploadStartEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that handles the FileUploadComplete client event. + */ +interface ASPxClientUploadControlFileUploadCompleteEventHandler { + /** + * A method that will handle the corresponding client event. + * @param source The event source. This parameter identifies the upload control which raised the event. + * @param e An ASPxClientUploadControlFileUploadCompleteEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlFileUploadCompleteEventArgs): void; +} +/** + * Provides data for the FileUploadComplete event. + */ +interface ASPxClientUploadControlFileUploadCompleteEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of a file input element within the ASPxUploadControl. + * Value: An integer value that specifies the file input element's index. + */ + inputIndex: number; + /** + * Gets or sets a value indicating whether the uploaded file passes validation. + * Value: true if the file is valid; otherwise, false. + */ + isValid: boolean; + /** + * Gets the error text to be displayed within the ASPxUploadControl's error frame. + * Value: A string value that represents the error text. + */ + errorText: string; + /** + * Gets a string that contains specific information (if any) passed from the server side for further client processing. + * Value: A string value representing callback data passed from the server. + */ + callbackData: string; +} +/** + * A method that will handle the FilesUploadComplete client event. + */ +interface ASPxClientUploadControlFilesUploadCompleteEventHandler { + /** + * A method that will handle the client FilesUploadComplete event. + * @param source The event source. This parameter identifies the upload control which raised the event. + * @param e A object that contains event data. + */ + (source: S, e: ASPxClientUploadControlFilesUploadCompleteEventArgs): void; +} +/** + * Provides data for the FilesUploadComplete client event, which enables you to perform specific actions after all selected files have been uploaded. + */ +interface ASPxClientUploadControlFilesUploadCompleteEventArgs extends ASPxClientEventArgs { + /** + * Gets the error text to be displayed within the upload control's error frame. + * Value: A string value that is the error text. + */ + errorText: string; + /** + * Gets a string that contains specific information (if any) passed from the server side for further client processing. + * Value: A string value that is the callback data passed from the server. + */ + callbackData: string; +} +/** + * A method that will handle the TextChanged client event. + */ +interface ASPxClientUploadControlTextChangedEventHandler { + /** + * A method that will handle the TextChanged client event. + * @param source The event source. This parameter identifies the upload control which raised the event. + * @param e An ASPxClientUploadControlTextChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlTextChangedEventArgs): void; +} +/** + * Provides data for the TextChanged client event that allows you to respond to an end-user changing an edit box's text. + */ +interface ASPxClientUploadControlTextChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of a file input element within the ASPxUploadControl. + * Value: An integer value that specifies the file input element's index. + */ + inputIndex: number; +} +/** + * A method that will handle the ASPxUploadControl's client event, concerned with changes in upload progress. + */ +interface ASPxClientUploadControlUploadingProgressChangedEventHandler { + /** + * A method that will handle the ASPxUploadControl's client event concerning the uploading process being changed. + * @param source An object representing the event's source. Identifies the ASPxUploadControl object that raised the event. + * @param e An ASPxClientUploadControlUploadingProgressChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlUploadingProgressChangedEventArgs): void; +} +/** + * Provides data for the UploadingProgressChanged event. + */ +interface ASPxClientUploadControlUploadingProgressChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the number of the files selected for upload. + * Value: An integer value that represents the total number of selected files. + */ + fileCount: number; + /** + * Gets the name of the file being currently uploaded. + * Value: A string value that represents the file name. + */ + currentFileName: string; + /** + * Gets the content length of the currently uploaded file. + * Value: An integer value specifying the content length. + */ + currentFileContentLength: number; + /** + * Gets the content length of the current file already uploaded to the server. + * Value: An integer value that is the content length. + */ + currentFileUploadedContentLength: number; + /** + * Gets the position of the current file upload progress. + * Value: An value specifying the upload progress position. + */ + currentFileProgress: number; + /** + * Gets the content length of the files selected for upload. + * Value: An integer value specifying the total content length of the selected files. + */ + totalContentLength: number; + /** + * Gets the content length of the files already uploaded to the server. + * Value: An integer value that represents the content length. + */ + uploadedContentLength: number; + /** + * Gets the current position of total upload progress. + * Value: An value specifying the total upload progress position. + */ + progress: number; +} +/** + * A method that will handle the DropZoneEnter event. + */ +interface ASPxClientUploadControlDropZoneEnterEventHandler { + /** + * A method that will handle the DropZoneEnter event. + * @param source The event source. This parameter identifies the upload control object which raised the event. + * @param e An ASPxClientUploadControlDropZoneEnterEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlDropZoneEnterEventArgs): void; +} +/** + * Provides data for the DropZoneEnter event. + */ +interface ASPxClientUploadControlDropZoneEnterEventArgs extends ASPxClientEventArgs { + /** + * Gets a drop zone object related to the processed event. + * Value: An object that is a drop zone related to the processed event. + */ + dropZone: Object; +} +/** + * A method that will handle the DropZoneLeave event. + */ +interface ASPxClientUploadControlDropZoneLeaveEventHandler { + /** + * A method that will handle the DropZoneLeave event. + * @param source The event source. Identifies the upload control object that raised the event. + * @param e A ASPxClientUploadControlDropZoneLeaveEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlDropZoneLeaveEventArgs): void; +} +/** + * Provides data for the DropZoneLeave event. + */ +interface ASPxClientUploadControlDropZoneLeaveEventArgs extends ASPxClientEventArgs { + /** + * Gets a drop zone object related to the processed event. + * Value: An object that is a drop zone related to the processed event. + */ + dropZone: Object; +} +/** + * The JavaScript equivalent of the ASPxChartDesigner class. + */ +interface ASPxClientChartDesigner extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientChartDesigner. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs when executing the Save command on the client. + */ + SaveCommandExecute: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of a Client Chart Designer. + */ + CustomizeMenuActions: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; + /** + * Updates the localization settings of the ASPxClientChartDesigner properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; + /** + * Returns the model of the Client Chart Designer. + */ + GetDesignerModel(): Object; + /** + * For internal use. + */ + GetJsonChartModel(): string; +} +/** + * A method that will handle the SaveCommandExecute event. + */ +interface ASPxClientChartDesignerSaveCommandExecuteEventHandler { + /** + * Represents a method that will handle the SaveCommandExecute event. + * @param source The event source. This parameter identifies the ASPxChartDesigner which raised the event. + * @param e A ASPxClientChartDesignerSaveCommandExecuteEventArgs object which contains event data. + */ + (source: S, e: ASPxClientChartDesignerSaveCommandExecuteEventArgs): void; +} +/** + * Provides data for a chart control's SaveCommandExecute event. + */ +interface ASPxClientChartDesignerSaveCommandExecuteEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value specifying whether an event has been handled. + * Value: true, if the event hasn't been handled by a control; otherwise, false. + */ + handled: boolean; +} +/** + * Represents a method that will handle the CustomizeMenuActions events. + */ +interface ASPxClientChartDesignerCustomizeMenuActionsEventHandler { + /** + * Represents a method that will handle the CustomizeMenuActions event. + * @param source The event source. This parameter identifies the ASPxChartDesigner which raised the event. + * @param e An ASPxClientChartDesignerCustomizeMenuActionsEventArgs object which contains event data. + */ + (source: S, e: ASPxClientChartDesignerCustomizeMenuActionsEventArgs): void; +} +/** + * An action of the Client Chart Designer's menu. + */ +interface ASPxClientChartDesignerMenuAction { + /** + * Provides access to the text for the command. + * Value: A String value. + */ + text: string; + /** + * Provides access to the CSS class of the command's glyph. + * Value: A String value. + */ + imageClassName: string; + /** + * Provides access to the action performed when the Client Chart Designer's button is clicked. + * Value: The specific action implementation. + */ + clickAction: Function; + /** + * Provides access to the value that specifies whether or not the command is disabled by default. + * Value: true, if the command is disabled by default; otherwise, false. + */ + disabled: boolean; + /** + * Provides access to the value that specifies whether or not the command is visible in the designer user interface. + * Value: true if the command is visible; otherwise false. + */ + visible: boolean; + /** + * Provides access to the keyboard shortcut used to invoke the command. + * Value: A String value. + */ + hotKey: string; + /** + * Provides access to the value that specifies whether or not the command has a visual separator. + * Value: true, if the command has a visual separator; otherwise, false. + */ + hasSeparator: string; + /** + * Provides access to the location of the displayed command. + * Value: A String value. + */ + container: string; +} +/** + * Provides data for a chart control's CustomizeMenuActions event on the client side. + */ +interface ASPxClientChartDesignerCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { + /** + * Returns an array of the Client Chart Designer's menu actions. + * Value: An array of the ASPxClientChartDesignerMenuAction objects. + */ + actions: ASPxClientChartDesignerMenuAction[]; +} +/** + * A class which provides access to the entire hierarchy of chart elements on the client side. + */ +interface ASPxClientWebChartControl extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientWebChartControl. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when any chart element is hot-tracked. + */ + ObjectHotTracked: ASPxClientEvent>; + /** + * Occurs before crosshair items are drawn when the chart's contents are being drawn. + */ + CustomDrawCrosshair: ASPxClientEvent>; + /** + * Occurs on the client side when any chart element is selected. + */ + ObjectSelected: ASPxClientEvent>; + /** + * Returns an ASPxClientWebChart object, which contains information about the hierarchy of a chart control, and provides access to the main properties of chart elements on the client side. + */ + GetChart(): ASPxClientWebChart; + /** + * Returns the printing options of the chart control. + */ + GetPrintOptions(): ASPxClientChartPrintOptions; + /** + * Changes the mouse pointer, which is shown when the mouse is over the chart control, to the pointer with the specified name. + * @param cursor A string value representing the name of the desired cursor. + */ + SetCursor(cursor: string): void; + /** + * Returns the specific chart element which is located under the test point. + * @param x An integer value that specifies the x coordinate of the test point. + * @param y An integer value that specifies the y coordinate of the test point. + */ + HitTest(x: number, y: number): ASPxClientHitObject[]; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Prints the current chart on the client side. + */ + Print(): void; + /** + * Loads a chart which should be customized from its object model. + * @param serializedChartObjectModel A String object representing the chart model. + */ + LoadFromObjectModel(serializedChartObjectModel: string): void; + /** + * Exports a chart to the file of the specified format, and saves it to the disk. + * @param format A string value specifying the format, to which a chart should be exported. + */ + SaveToDisk(format: string): void; + /** + * Exports a chart to a file in the specified format, and saves it to disk, using the specified file name. + * @param format A string value specifying the format, to which a chart should be exported. + * @param filename A string value specifying the file name, to which a chart should be exported. If this parameter is missing or set to an empty string, then the created file will be named using the client-side name of a chart. + */ + SaveToDisk(format: string, filename: string): void; + /** + * Exports a report to the file of the specified format, and shows it in a new Web Browser window. + * @param format A string value specifying a format in which a report should be exported. + */ + SaveToWindow(format: string): void; + /** + * Gets the main DOM (Document Object Model) element on a Web Page representing this ASPxClientWebChartControl object. + */ + GetMainDOMElement(): Object; +} +/** + * A method that will handle the CustomDrawCrosshair event. + */ +interface ASPxClientWebChartControlCustomDrawCrosshairEventHandler { + /** + * A method that will handle the CustomDrawCrosshair event. + * @param source The event source. This parameter identifies the chartControl which raised the event. + * @param e An ASPxClientWebChartControlCustomDrawCrosshairEventArgs object which contains event data. + */ + (source: S, e: ASPxClientWebChartControlCustomDrawCrosshairEventArgs): void; +} +/** + * Provides data for a chart control's CustomDrawCrosshair event. + */ +interface ASPxClientWebChartControlCustomDrawCrosshairEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets crosshair elements settings to custom draw a crosshair cursor. + * Value: An ASPxClientCrosshairElement object. + */ + crosshairElements: ASPxClientCrosshairElement; + /** + * Gets the settings of crosshair axis label elements to customize their appearance. + * Value: An ASPxClientCrosshairAxisLabelElement object. + */ + cursorCrosshairAxisLabelElements: ASPxClientCrosshairAxisLabelElement; + /** + * Gets crosshair line element settings that are used to custom draw a crosshair cursor. + * Value: An ASPxClientCrosshairLineElement object that contains crosshair line element settings. + */ + cursorCrosshairLineElement: ASPxClientCrosshairLineElement; + /** + * Gets the settings of crosshair group header elements to customize their appearance. + * Value: An ASPxClientCrosshairGroupHeaderElement object. + */ + crosshairGroupHeaderElements: ASPxClientCrosshairGroupHeaderElement; + /** + * Provides access to the settings of crosshair elements and crosshair group header elements to customize their appearance. + * Value: An ASPxClientCrosshairElementGroup object. + */ + crosshairElementGroups: ASPxClientCrosshairElementGroup; +} +/** + * Represents the client-side equivalent of the CrosshairElement class. + */ +interface ASPxClientCrosshairElement { + /** + * Gets a series that a crosshair element hovers over when implementing a custom draw. + * Value: An ASPxClientSeries object which represents the series currently being painted. + */ + Series: ASPxClientSeries; + /** + * Gets the series point that a crosshair element hovers over when implementing a custom draw. + * Value: An ASPxClientSeriesPoint object, representing the series point that a crosshair element hovers over. + */ + Point: ASPxClientSeriesPoint; + /** + * Gets or sets the crosshair line element to custom draw a crosshair cursor. + * Value: An ASPxClientCrosshairLineElement object, representing the crosshair line element. + */ + LineElement: ASPxClientCrosshairLineElement; + /** + * Provides access to the crosshair axis label element. + * Value: An ASPxClientCrosshairAxisLabelElement object, representing the crosshair axis label element. + */ + AxisLabelElement: ASPxClientCrosshairAxisLabelElement; + /** + * Gets the crosshair label element. + * Value: An ASPxClientCrosshairSeriesLabelElement object, representing the crosshair label element. + */ + LabelElement: ASPxClientCrosshairSeriesLabelElement; + /** + * Specifies whether the crosshair element is visible when implementing custom drawing in the crosshair cursor. + * Value: true, if the crosshair element is visible; otherwise, false. + */ + visible: boolean; +} +/** + * Represents the client-side equivalent of the CrosshairLineElement class. + */ +interface ASPxClientCrosshairLineElement { +} +/** + * Represents the client-side equivalent of the CrosshairAxisLabelElement class. + */ +interface ASPxClientCrosshairAxisLabelElement { +} +/** + * The client-side equivalent of the CrosshairGroupHeaderElement class. + */ +interface ASPxClientCrosshairGroupHeaderElement { +} +/** + * The client-side equivalent of the CrosshairLabelElement class. + */ +interface ASPxClientCrosshairSeriesLabelElement { +} +/** + * Represents the client-side equivalent of the CrosshairElementGroup class. + */ +interface ASPxClientCrosshairElementGroup { +} +/** + * Represents a method that will handle the ObjectSelected events. + */ +interface ASPxClientWebChartControlHotTrackEventHandler { + /** + * Represents a method that will handle the ObjectSelected events. + * @param source The event source. This parameter identifies the ASPxClientWebChartControl which raised the event. + * @param e An ASPxClientWebChartControlHotTrackEventArgs object which contains event data. + */ + (source: S, e: ASPxClientWebChartControlHotTrackEventArgs): void; +} +/** + * Provides data for a chart control's ObjectSelected events on the client side. + */ +interface ASPxClientWebChartControlHotTrackEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Provides access on the client side to the chart element, for which the event was raised. + * Value: An ASPxClientWebChartElement object, which represents the chart element for which the event was raised. + */ + hitObject: ASPxClientWebChartElement; + /** + * Provides access on the client side to the object, which is in some way related to the object being hit. The returned value depends on the hitObject type and hit point location. + * Value: An ASPxClientWebChartElement object representing an additional object that relates to the one being hit. + */ + additionalHitObject: ASPxClientWebChartElement; + /** + * Gets details on the chart elements located at the point where an end-user has clicked when hot-tracking or selecting a chart element on the client side. + * Value: An ASPxClientWebChartHitInfo object, which contains information about the chart elements located at the point where an end-user has clicked. + */ + hitInfo: ASPxClientWebChartHitInfo; + /** + * Provides access on the client side to the chart and all its elements. + * Value: An ASPxClientWebChart object, which provides access to chart properties. + */ + chart: ASPxClientWebChart; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets the X-coordinate of the hit test point, relative to the top left corner of the chart. + * Value: An integer value specifying X-coordinate of the hit test point (in pixels). + */ + x: number; + /** + * Gets the Y-coordinate of the hit test point, relative to the top left corner of the chart. + * Value: An integer value specifying Y-coordinate of the hit test point (in pixels). + */ + y: number; + /** + * Gets the X-coordinate of the hit test point, relative to the top left corner of the Web Page containing this chart. + * Value: An integer value specifying X-coordinate of the hit test point (in pixels). + */ + absoluteX: number; + /** + * Gets the Y-coordinate of the hit test point, relative to the top left corner of the Web Page containing this chart. + * Value: An integer value specifying Y-coordinate of the hit test point (in pixels). + */ + absoluteY: number; + /** + * Gets a value indicating whether the hot-tracking or object selection should be canceled. + * Value: true to cancel the hot-tracking or selection of an object; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents an object under the hit test point within a chart control, on the client side. + */ +interface ASPxClientHitObject { + /** + * Gets the chart element for which the event was raised. + * Value: An ASPxClientWebChartElement object, representing the chart element for which the event was raised. + */ + Object: ASPxClientWebChartElement; + /** + * Provides access to an object, which is in some way related to the object being hit. The returned value depends on the Object type and hit point location. + * Value: An ASPxClientWebChartElement object that represents an additional object related to the one being hit. + */ + AdditionalObject: ASPxClientWebChartElement; +} +/** + * Contains information about a specific test point within a chart control, on the client side. + */ +interface ASPxClientWebChartHitInfo { + /** + * Gets a value indicating whether the test point is within the chart. + * Value: true if the test point is within a chart; otherwise, false. + */ + inChart: boolean; + /** + * Gets a value indicating whether the test point is within the chart title. + * Value: true if the test point is within a chart title; otherwise, false. + */ + inChartTitle: boolean; + /** + * Gets a value indicating whether the test point is within the axis. + * Value: true if the test point is within an axis; otherwise, false. + */ + inAxis: boolean; + /** + * Gets a value indicating whether the test point is within the axis label item. + * Value: true if the test point is within an axis label item; otherwise, false. + */ + inAxisLabelItem: boolean; + /** + * Gets a value indicating whether the test point is within the axis title. + * Value: true if the test point is within an axis title; otherwise, false. + */ + inAxisTitle: boolean; + /** + * Gets a value indicating whether the test point is within the constant line. + * Value: true if the test point is within a constant line; otherwise, false. + */ + inConstantLine: boolean; + /** + * Gets a value indicating whether the test point is within the diagram. + * Value: true if the test point is within a diagram; otherwise, false. + */ + inDiagram: boolean; + /** + * Gets a value indicating whether the test point is within the non-default pane. + * Value: true if the test point is within a non-default pane; otherwise, false. + */ + inNonDefaultPane: boolean; + /** + * Gets a value indicating whether the test point is within the legend. + * Value: true if the test point is within a legend; otherwise, false. + */ + inLegend: boolean; + /** + * Gets the value indicating whether or not the test point is within a custom legend item. + * Value: true if the test point is within a custom legend item; otherwise, false. + */ + inCustomLegendItem: boolean; + /** + * Gets a value indicating whether the test point is within the series. + * Value: true if the test point is within a series; otherwise, false. + */ + inSeries: boolean; + /** + * Gets a value indicating whether the test point is within the series label. + * Value: true if the test point is within a series label; otherwise, false. + */ + inSeriesLabel: boolean; + /** + * Gets a value indicating whether the test point is within the series point. + * Value: true if the test point is within a series point; otherwise, false. + */ + inSeriesPoint: boolean; + /** + * Gets a value indicating whether the test point is within the series title. + * Value: true if the test point is within a series title; otherwise, false. + */ + inSeriesTitle: boolean; + /** + * Gets a value indicating whether the test point is within the trendline. + * Value: true if the test point is within a trendline; otherwise, false. + */ + inTrendLine: boolean; + /** + * Gets a value indicating whether the test point is within the Fibonacci Indicator. + * Value: true if the test point is within a Fibonacci Indicator; otherwise, false. + */ + inFibonacciIndicator: boolean; + /** + * Gets a value indicating whether the test point is within the regression line. + * Value: true if the test point is within a regression line; otherwise, false. + */ + inRegressionLine: boolean; + /** + * Gets a value specifying whether the test point is within an indicator. + * Value: true if the test point is within an indicator; otherwise, false. + */ + inIndicator: boolean; + /** + * Gets a value indicating whether the test point is within an annotation. + * Value: true if the test point is within an annotation; otherwise, false. + */ + inAnnotation: boolean; + /** + * Gets a value indicating whether the test point is within a hyperlink. + * Value: true, if the test point is within a hyperlink; otherwise, false. + */ + inHyperlink: boolean; + /** + * Gets the client-side chart instance from under the test point. + * Value: An ASPxClientWebChart object. + */ + chart: ASPxClientWebChart; + /** + * Gets the client-side chart title instance from under the test point. + * Value: An ASPxClientChartTitle object. + */ + chartTitle: ASPxClientChartTitle; + /** + * Gets the client-side axis instance from under the test point. + * Value: An ASPxClientAxisBase descendant. + */ + axis: ASPxClientAxisBase; + /** + * Gets the client-side constant line instance from under the test point. + * Value: An ASPxClientConstantLine object. + */ + constantLine: ASPxClientConstantLine; + /** + * Gets the client-side diagram instance from under the test point. + * Value: An ASPxClientXYDiagramBase descendant. + */ + diagram: ASPxClientXYDiagramBase; + /** + * Gets the client-side non-default pane instance from under the test point. + * Value: An ASPxClientXYDiagramPane object. + */ + nonDefaultPane: ASPxClientXYDiagramPane; + /** + * Gets the client-side legend instance from under the test point. + * Value: An ASPxClientLegend object. + */ + legend: ASPxClientLegend; + /** + * Gets a custom legend item which is located under the test point. + * Value: An ASPxClientCustomLegendItem object which represents the item located under the test point. + */ + customLegendItem: ASPxClientCustomLegendItem; + /** + * Gets the client-side series instance from under the test point. + * Value: An ASPxClientSeries object. + */ + series: ASPxClientSeries; + /** + * Gets the client-side series label instance from under the test point. + * Value: An ASPxClientSeriesLabel object. + */ + seriesLabel: ASPxClientSeriesLabel; + /** + * Gets the client-side series title instance from under the test point. + * Value: An ASPxClientSeriesTitle object. + */ + seriesTitle: ASPxClientSeriesTitle; + /** + * Gets the client-side trendline instance from under the test point. + * Value: An ASPxClientTrendLine object. + */ + trendLine: ASPxClientTrendLine; + /** + * Gets the client-side Fibonacci indicator instance from under the test point. + * Value: An ASPxClientFibonacciIndicator object. + */ + fibonacciIndicator: ASPxClientFibonacciIndicator; + /** + * Gets the client-side regression line instance from under the test point. + * Value: An ASPxClientRegressionLine object. + */ + regressionLine: ASPxClientRegressionLine; + /** + * Gets the client-side indicator instance from under the test point. + * Value: An ASPxClientIndicator descendant. + */ + indicator: ASPxClientIndicator; + /** + * Gets the client-side annotation instance from under the test point. + * Value: An ASPxClientAnnotation object. + */ + annotation: ASPxClientAnnotation; + /** + * Gets the client-side series point instance from under the test point. + * Value: An ASPxClientSeriesPoint object. + */ + seriesPoint: ASPxClientSeriesPoint; + /** + * Gets the client-side axis label item instance from under the test point. + * Value: An ASPxClientAxisLabelItem object. + */ + axisLabelItem: ASPxClientAxisLabelItem; + /** + * Gets the client-side axis title instance from under the test point. + * Value: An ASPxClientAxisTitle object. + */ + axisTitle: ASPxClientAxisTitle; + /** + * Returns a hyperlink which is located under the test point. + * Value: A String object representing a hyperlink. + */ + hyperlink: string; +} +/** + * Represents the client-side equivalent of the DiagramCoordinates class. + */ +interface ASPxClientDiagramCoordinates { + /** + * Gets the type of the argument scale. + * Value: A string object which contains the current scale type. + */ + argumentScaleType: string; + /** + * Gets the type of the value scale. + * Value: A string object which contains the current scale type. + */ + valueScaleType: string; + /** + * Gets the argument of the data point as a text string. + * Value: A string object, representing a data point's argument. + */ + qualitativeArgument: string; + /** + * Gets the numerical representation of the data point's argument. + * Value: A Double value, representing the data point's argument. + */ + numericalArgument: number; + /** + * Gets the date-time representation of the data point's argument. + * Value: A date object, representing the point's argument. + */ + dateTimeArgument: Date; + /** + * Gets the numerical representation of the data point's value. + * Value: A Double value, representing the data point's value. + */ + numericalValue: number; + /** + * Gets the date-time representation of the data point's value. + * Value: A date object, representing the point's value. + */ + dateTimeValue: Date; + /** + * Gets the X-axis of the diagram point. + * Value: An ASPxClientAxisBase descendant, representing the axis of arguments (X-axis). + */ + axisX: ASPxClientAxisBase; + /** + * Gets the Y-axis of the diagram point. + * Value: An ASPxClientAxisBase descendant, representing the axis of values (Y-axis). + */ + axisY: ASPxClientAxisBase; + /** + * Gets the pane of the diagram point. + * Value: An ASPxClientXYDiagramPane descendant, representing the pane. + */ + pane: ASPxClientXYDiagramPane; + /** + * Checks whether the current object represents a point outside the diagram area. + */ + IsEmpty(): boolean; + /** + * Gets the value of the client-side axis instance. + * @param axis An ASPxClientAxisBase class descendant, representing the axis that contains the requested value. + */ + GetAxisValue(axis: ASPxClientAxisBase): ASPxClientAxisValue; +} +/** + * Contains the information about an axis value. + */ +interface ASPxClientAxisValue { + /** + * Gets the axis scale type. + * Value: A String value, specifying the axis scale type. + */ + scaleType: string; + /** + * Gets the axis value, if the axis scale type is qualitative. + * Value: A String value, specifying the axis value. + */ + qualitativeValue: string; + /** + * Gets the axis value, if the axis scale type is numerical. + * Value: A Double value, specifying the axis value. + */ + numericalValue: number; + /** + * Gets the axis value, if the axis scale type is date-time. + * Value: A DateTime value, specifying the axis value. + */ + dateTimeValue: Date; +} +/** + * Represents the client-side equivalent of the ControlCoordinates class. + */ +interface ASPxClientControlCoordinates { + /** + * Gets the point's pane. + * Value: An ASPxClientXYDiagramPane object. + */ + pane: ASPxClientXYDiagramPane; + /** + * Gets the point's X-coordinate, in pixels. + * Value: An integer value, specifying the X-coordinate (in pixels). + */ + x: number; + /** + * Gets the point's Y-coordinate, in pixels. + * Value: An integer value, specifying the Y-coordinate (in pixels). + */ + y: number; + /** + * Gets the point's visibility state. + * Value: "Visible", "Hidden", or "Undefined". + */ + visibility: string; +} +/** + * Represents the client-side equivalent of the ChartElement class. + */ +interface ASPxClientWebChartElement { + /** + * Gets the chart that owns the current chart element. + * Value: An ASPxClientWebChart object, to which the chart element belongs. + */ + chart: ASPxClientWebChart; +} +/** + * Represents a base class for chart elements, which are not necessarily required to be present on the client side. + */ +interface ASPxClientWebChartEmptyElement extends ASPxClientWebChartElement { +} +/** + * Represents a base class for chart elements, which are required to be present on the client side. + */ +interface ASPxClientWebChartRequiredElement extends ASPxClientWebChartElement { +} +/** + * Represents the client-side equivalent of the ChartElementNamed class. + */ +interface ASPxClientWebChartElementNamed extends ASPxClientWebChartRequiredElement { + /** + * Gets the name of the chart element. + * Value: A string object representing the name of the chart element. + */ + name: string; +} +/** + * Represents the client-side equivalent of the WebChartControl control. + */ +interface ASPxClientWebChart extends ASPxClientWebChartRequiredElement { + /** + * Gets the client-side Chart Control that owns the current chart. + * Value: An ASPxClientWebChartControl object, to which the chart belongs. + */ + chartControl: ASPxClientWebChartControl; + /** + * Gets the chart's diagram and provides access to its settings. + * Value: An ASPxClientRadarDiagram), that represents the chart's diagram. + */ + diagram: ASPxClientWebChartElement; + /** + * Provides access to the chart's collection of series. + * Value: An array of ASPxClientSeries objects that represent the collection of series. + */ + series: ASPxClientSeries[]; + /** + * Provides access to the collection of chart titles. + * Value: An array of ASPxClientChartTitle objects, that represent the collection of chart titles. + */ + titles: ASPxClientChartTitle[]; + /** + * Provides access to the chart's collection of annotations. + * Value: An array of ASPxClientAnnotation objects, representing the collection of annotations. + */ + annotations: ASPxClientAnnotation[]; + /** + * Gets the chart's legend and provides access to its settings. + * Value: An ASPxClientLegend object that represents the chart's legend. + */ + legend: ASPxClientLegend; + /** + * Returns the collection of legends. + * Value: An array of ASPxClientLegend objects. + */ + legends: ASPxClientLegend[]; + /** + * Gets the name of the appearance, which is currently used to draw the chart's elements. + * Value: A string value that represents the appearance name. + */ + appearanceName: string; + /** + * Gets the name of the palette currently used to draw the chart's series. + * Value: A string value that represents the palette name. + */ + paletteName: string; + /** + * Gets a value indicating whether series tooltips should be shown. + * Value: true to show tooltips for series; otherwise, false. + */ + showSeriesToolTip: boolean; + /** + * Gets a value indicating whether point tooltips should be shown. + * Value: true to show tooltips for series points; otherwise, false. + */ + showPointToolTip: boolean; + /** + * Gets a value indicating whether a crosshair cursor should be shown. + * Value: true to show a crosshair cursor; otherwise, false. + */ + showCrosshair: boolean; + /** + * Gets a value that contains information on how the tooltip position is defined, for example, relative to a mouse pointer or chart element. + * Value: An ASPxClientToolTipPosition class descendant that defines the tooltip position type. + */ + toolTipPosition: ASPxClientToolTipPosition; + /** + * Returns the tooltip controller that shows tooltips for chart elements. + * Value: An ASPxClientToolTipController object. + */ + toolTipController: ASPxClientToolTipController; + /** + * Gets the settings for a crosshair cursor concerning its position and appearance on a diagram. + * Value: An ASPxClientCrosshairOptions object descendant which provides access to crosshair cursor options on a diagram. + */ + crosshairOptions: ASPxClientCrosshairOptions; + /** + * Gets a css postfix for a chart. + * Value: A string value. + */ + cssPostfix: string; + /** + * Gets or sets a value which specifies how the chart elements are selected. + * Value: A String object representing the name of the selection mode. + */ + selectionMode: string; +} +/** + * Represents the client-side equivalent of the SimpleDiagram class. + */ +interface ASPxClientSimpleDiagram extends ASPxClientWebChartEmptyElement { +} +/** + * Represents the base class for all diagram classes, which have X and Y axes. + */ +interface ASPxClientXYDiagramBase extends ASPxClientWebChartRequiredElement { + /** + * Gets the X-axis. + * Value: An ASPxClientAxisBase object which represents the X-axis. + */ + axisX: ASPxClientAxisBase; + /** + * Gets the Y-axis. + * Value: An ASPxClientAxisBase object which represents the Y-axis. + */ + axisY: ASPxClientAxisBase; +} +/** + * Represents the client-side equivalent of the XYDiagram2D class. + */ +interface ASPxClientXYDiagram2D extends ASPxClientXYDiagramBase { + /** + * Provides access to a collection of secondary X-axes for a given 2D XY-diagram. + * Value: An array of ASPxClientAxis objects, that is a collection of secondary X-axes. + */ + secondaryAxesX: ASPxClientAxis[]; + /** + * Provides access to a collection of secondary Y-axes for a given 2D XY-diagram. + * Value: An array of ASPxClientAxis objects, that is a collection of secondary X-axes. + */ + secondaryAxesY: ASPxClientAxis[]; + /** + * Provides access to a default pane object. + * Value: An ASPxClientXYDiagramPane object which represents the default pane of a chart. + */ + defaultPane: ASPxClientXYDiagramPane; + /** + * Provides access to an array of a diagram's panes. + * Value: An array of ASPxClientXYDiagramPane objects. + */ + panes: ASPxClientXYDiagramPane[]; + /** + * Converts the display coordinates into a diagram coordinates object. + * @param x An integer value, representing the X-coordinate of a point (measured in pixels relative to the top left corner of a chart). + * @param y An integer value, representing the Y-coordinate of a point (measured in pixels relative to the top left corner of a chart). + */ + PointToDiagram(x: number, y: number): ASPxClientDiagramCoordinates; + /** + * Converts the diagram coordinates of a point into screen coordinates. + * @param argument An object, representing the point's argument. + * @param value An object, representing the point's value. + * @param axisX An ASPxClientAxis2D descendant, representing the X-axis. + * @param axisY An ASPxClientAxis2D descendant, representing the Y-axis. + * @param pane An ASPxClientXYDiagramPane object, representing the pane. + */ + DiagramToPoint(argument: Object, value: Object, axisX: ASPxClientAxis2D, axisY: ASPxClientAxis2D, pane: ASPxClientXYDiagramPane): ASPxClientControlCoordinates; +} +/** + * Represents the client-side equivalent of the XYDiagram class. + */ +interface ASPxClientXYDiagram extends ASPxClientXYDiagram2D { + /** + * Gets a value indicating whether the diagram is rotated. + * Value: true if the diagram is rotated; otherwise, false. + */ + rotated: boolean; +} +/** + * Represents the client-side equivalent of the SwiftPlotDiagram class. + */ +interface ASPxClientSwiftPlotDiagram extends ASPxClientXYDiagram2D { +} +/** + * Represents the client-side equivalent of the XYDiagramPane class. + */ +interface ASPxClientXYDiagramPane extends ASPxClientWebChartElementNamed { + /** + * Gets the diagram that owns the current pane object. + * Value: An ASPxClientXYDiagram object, to which the pane belongs. + */ + diagram: ASPxClientXYDiagram; +} +/** + * Represents the client-side equivalent of the XYDiagram3D class. + */ +interface ASPxClientXYDiagram3D extends ASPxClientXYDiagramBase { +} +/** + * Represents the client-side equivalent of the RadarDiagram class. + */ +interface ASPxClientRadarDiagram extends ASPxClientXYDiagramBase { + /** + * Converts the display coordinates into a diagram coordinates object. + * @param x An integer value, representing the X-coordinate of a point (measured in pixels relative to the top left corner of a chart). + * @param y An integer value, representing the Y-coordinate of a point (measured in pixels relative to the top left corner of a chart). + */ + PointToDiagram(x: number, y: number): ASPxClientDiagramCoordinates; + /** + * Converts the diagram coordinates of a point into screen coordinates. + * @param argument An object, representing the point's argument. + * @param value An object, representing the point's value. + */ + DiagramToPoint(argument: Object, value: Object): ASPxClientControlCoordinates; +} +/** + * Represents the client-side equivalent of the AxisBase class. + */ +interface ASPxClientAxisBase extends ASPxClientWebChartElementNamed { + /** + * Provides access to the XY-diagram which contains the current axis. + * Value: An ASPxClientXYDiagramBase class descendant. + */ + diagram: ASPxClientXYDiagramBase; + /** + * Provides acess to the range of the axis coordinates. + * Value: An ASPxClientAxisRange object, which contains the common range settings of the axis coordinates. + */ + range: ASPxClientAxisRange; +} +/** + * Represents the client-side equivalent of the Axis2D class. + */ +interface ASPxClientAxis2D extends ASPxClientAxisBase { + /** + * Provides access to an axis title object. + * Value: An ASPxClientAxisTitle object which represents the axis title. + */ + axisTitle: ASPxClientAxisTitle; + /** + * Provides access to the axis strips collection. + * Value: An array of ASPxClientStrip objects. + */ + strips: ASPxClientStrip[]; + /** + * Provides access to the collection of the axis constant lines. + * Value: An array of ASPxClientConstantLine objects which represent constant lines that belong to this axis. + */ + constantLines: ASPxClientConstantLine[]; +} +/** + * Represents the client-side equivalent of the Axis class. + */ +interface ASPxClientAxis extends ASPxClientAxis2D { + /** + * Gets a value indicating whether the axis is reversed. + * Value: true if the axis is reversed; otherwise, false. + */ + reverse: boolean; +} +/** + * Represents the client-side equivalent of the SwiftPlotDiagramAxis class. + */ +interface ASPxClientSwiftPlotDiagramAxis extends ASPxClientAxis2D { +} +/** + * Represents the client-side equivalent of the Axis3D class. + */ +interface ASPxClientAxis3D extends ASPxClientAxisBase { +} +/** + * Represents the client-side equivalent of the RadarAxis class. + */ +interface ASPxClientRadarAxis extends ASPxClientAxisBase { +} +/** + * Represents the client-side equivalent of the AxisTitle class. + */ +interface ASPxClientAxisTitle extends ASPxClientWebChartRequiredElement { + /** + * Gets the axis to which the axis title belongs. + * Value: An ASPxClientAxisBase descendant, which identifies the axis. + */ + axis: ASPxClientAxisBase; + /** + * Gets the text of the axis title. + * Value: A string object which contains the axis title's text. + */ + text: string; +} +/** + * Represents the client-side equivalent of the AxisLabelItem class. + */ +interface ASPxClientAxisLabelItem extends ASPxClientWebChartRequiredElement { + /** + * Gets the axis to which an axis label item belongs. + * Value: An ASPxClientAxisBase descendant, which identifies the axis. + */ + axis: ASPxClientAxisBase; + /** + * Gets the text of an axis label item. + * Value: A string object which contains the axis label item's text. + */ + text: string; + /** + * Gets the axis value to which an axis label item corresponds. + * Value: An object that specifies the axis value. + */ + axisValue: Object; + /** + * Gets the internal representation of the axis value to which an axis label item corresponds. + * Value: A Double value which specifies the internal representation of the axis value. + */ + axisValueInternal: number; +} +/** + * Represents the client-side equivalent of the AxisRange class. + */ +interface ASPxClientAxisRange extends ASPxClientWebChartRequiredElement { + /** + * Gets the axis that owns the current axis range object. + * Value: An ASPxClientAxisBase object, to which the axis range belongs. + */ + axis: ASPxClientAxisBase; + /** + * Gets the minimum value to display on an axis. + * Value: An object representing the minimum value of the axis range. + */ + minValue: Object; + /** + * Gets the maximum value to display on an axis. + * Value: An object representing the maximum value of the axis range. + */ + maxValue: Object; + /** + * Gets the internal float representation of the range minimum value. + * Value: A Double value which specifies the internal representation of the range minimum value. + */ + minValueInternal: number; + /** + * Gets the internal float representation of the range maximum value. + * Value: A Double value which specifies the internal representation of the range maximum value. + */ + maxValueInternal: number; +} +/** + * Represents the client-side equivalent of the Strip class. + */ +interface ASPxClientStrip extends ASPxClientWebChartElementNamed { + /** + * Gets the axis that owns the current strip object. + * Value: An ASPxClientAxis object, to which the strip belongs. + */ + axis: ASPxClientAxis; + /** + * Gets the minimum value of the strip's range. + * Value: An object that represents the minimum value of the strip's range. + */ + minValue: Object; + /** + * Gets the maximum value of the strip's range. + * Value: An object that represents the maximum value of the strip's range. + */ + maxValue: Object; +} +/** + * Represents the client-side equivalent of the ConstantLine class. + */ +interface ASPxClientConstantLine extends ASPxClientWebChartElementNamed { + /** + * Gets the axis that owns the current constant line object. + * Value: An ASPxClientAxis object, to which the constant line belongs. + */ + axis: ASPxClientAxis; + /** + * Gets the constant line's position along the axis. + * Value: An object that specifies the constant line's position. + */ + value: Object; + /** + * Gets the constant line title. + * Value: A string object, representing the title's text. + */ + title: string; +} +/** + * Represents the client-side equivalent of the Series class. + */ +interface ASPxClientSeries extends ASPxClientWebChartElementNamed { + /** + * Gets a value that specifies the view type of the series. + * Value: A string object which contains the current view type. + */ + viewType: string; + /** + * Gets a value that specifies the scale type for the argument data of the series' data points. + * Value: A string object which contains the current scale type. + */ + argumentScaleType: string; + /** + * Gets a value that specifies the scale type for the value data of the series' data points. + * Value: A string object which contains the current scale type. + */ + valueScaleType: string; + /** + * Gets the X-Axis that is used to plot the current series on the XY-diagram. + * Value: A string object, which represents the X-axis name. + */ + axisX: string; + /** + * Gets the Y-Axis that is used to plot the current series on the XY-diagram. + * Value: A string object, which represents the Y-axis name. + */ + axisY: string; + /** + * Gets the pane that is used to plot the current series on the XY-diagram. + * Value: A string object, which represents the pane's name. + */ + pane: string; + /** + * Gets a value indicating whether the series is visible. + * Value: true if the series is visible; otherwise, false. + */ + visible: boolean; + /** + * Gets a value that specifies whether or not a tooltip is enabled for a chart. + * Value: true - a tooltip is enabled for a chart; false - a tooltip is disabled. + */ + toolTipEnabled: boolean; + /** + * Gets the text to be displayed within series tooltips. + * Value: A string value. + */ + toolTipText: string; + /** + * Gets an image to be displayed within series tooltips. + * Value: A string value. + */ + toolTipImage: string; + /** + * Gets the settings of series labels. + * Value: An ASPxClientSeriesLabel object, which provides the series label settings. + */ + label: ASPxClientSeriesLabel; + /** + * Gets the series' collection of data points. + * Value: An array of ASPxClientSeriesPoint objects, that represent the series' data points. + */ + points: ASPxClientSeriesPoint[]; + /** + * Provides access to the collection of series titles. + * Value: An array of ASPxClientSeriesTitle objects, that represent the collection of series titles. + */ + titles: ASPxClientSeriesTitle[]; + /** + * Gets the series' collection of indicators. + * Value: An array of ASPxClientIndicator objects, that belong to the series. + */ + indicators: ASPxClientIndicator[]; + /** + * Provides access to the collection of regression lines. + * Value: An array of ASPxClientRegressionLine objects which represent regression lines available for the series. + */ + regressionLines: ASPxClientRegressionLine[]; + /** + * Provides access to the collection of trendlines. + * Value: An array of ASPxClientTrendLine objects, that represent the collection of trendlines. + */ + trendLines: ASPxClientTrendLine[]; + /** + * Provides access to the collection of Fibonacci Indicators. + * Value: An array of ASPxClientFibonacciIndicator objects, that represent the collection of Fibonacci Indicators. + */ + fibonacciIndicators: ASPxClientFibonacciIndicator[]; + /** + * Gets the color of a series. + * Value: A string value. + */ + color: string; + /** + * Gets a value that defines a group for stacked series. + * Value: A string value. + */ + stackedGroup: string; + /** + * Gets a string which represents the pattern specifying the text to be displayed within a crosshair label for the current Series type. + * Value: A Empty. + */ + crosshairLabelPattern: string; + /** + * This property is intended for internal use only. + * Value: A String value. + */ + groupedElementsPattern: string; + /** + * Returns a collection of crosshair value items. + * Value: An array of ASPxClientCrosshairValueItem objects. + */ + crosshairValueItems: ASPxClientCrosshairValueItem[]; + /** + * Gets a value indicating whether a crosshair cursor is enabled. + * Value: true if a crosshair cursor is enabled; otherwise, false. + */ + actualCrosshairEnabled: boolean; + /** + * Gets a value indicating whether a crosshair label should be shown for this series. + * Value: true if crosshair labels are visible; otherwise, false. + */ + actualCrosshairLabelVisibility: boolean; +} +/** + * Represents the client-side equivalent of the SeriesLabelBase class. + */ +interface ASPxClientSeriesLabel extends ASPxClientWebChartElement { + /** + * Gets the series that owns the current series label object. + * Value: An ASPxClientSeries object, to which the series label belongs. + */ + series: ASPxClientSeries; + /** + * Gets the common text for all series point labels. + * Value: Returns an empty string object. + */ + text: string; +} +/** + * Represents the client-side equivalent of the SeriesPoint class. + */ +interface ASPxClientSeriesPoint extends ASPxClientWebChartRequiredElement { + /** + * Gets the series that owns the current series point object. + * Value: An ASPxClientSeries object, to which the series point belongs. + */ + series: ASPxClientSeries; + /** + * Gets the data point's argument. + * Value: An object that specifies the data point's argument. + */ + argument: Object; + /** + * Gets the point's data value(s). + * Value: An array of objects that represent the data value(s) of the series data point. + */ + values: Object[]; + /** + * Gets the text to be displayed within series points tooltips. + * Value: A string value. + */ + toolTipText: string; + /** + * Gets the color of a series point. + * Value: A string value. + */ + color: string; + /** + * Gets the percent value of a series point. + * Value: A float value. + */ + percentValue: number; + /** + * Gets a hint that is shown in series points tooltips. + * Value: A string value. + */ + toolTipHint: string; +} +/** + * Represents the client-side equivalent of the Legend class. + */ +interface ASPxClientLegend extends ASPxClientWebChartEmptyElement { + /** + * Returns a value which determines whether to use checkboxes instead of markers on a chart legend for all legend items. + * Value: true, if legend checkboxes are shown instead of markers for all legend items; otherwise, false. + */ + useCheckBoxes: boolean; + /** + * Returns a collection of custom legend items of the legend. + * Value: A collection of ASPxClientCustomLegendItem objects. + */ + customItems: ASPxClientCustomLegendItem[]; + /** + * Returns the name of the legend. + * Value: The string value representing the name of the legend. + */ + name: string; +} +/** + * Represents the base for ASPxClientSeriesTitle classes. + */ +interface ASPxClientTitleBase extends ASPxClientWebChartRequiredElement { + /** + * Gets the lines of text within a title. + * Value: An array of string values containing the text of a title. + */ + lines: string[]; + /** + * Gets the alignment of the title. + * Value: A string value containing the text, which specifies the alignment of a title. + */ + alignment: string; + /** + * Gets a value that specifies to which edges of a parent element the title should be docked. + * Value: A string value. + */ + dock: string; +} +/** + * Represents the client-side equivalent of the ChartTitle class. + */ +interface ASPxClientChartTitle extends ASPxClientTitleBase { +} +/** + * Represents the client-side equivalent of the SeriesTitle class. + */ +interface ASPxClientSeriesTitle extends ASPxClientTitleBase { + /** + * Gets the series that owns the current title object. + * Value: An ASPxClientSeries object, to which the series title belongs. + */ + series: ASPxClientSeries; +} +/** + * Represents the client-side equivalent of the Indicator class. + */ +interface ASPxClientIndicator extends ASPxClientWebChartElementNamed { + /** + * Gets the indicator's associated series. + * Value: An ASPxClientSeries object. + */ + series: ASPxClientSeries; +} +/** + * Represents the client-side equivalent of the FinancialIndicator class. + */ +interface ASPxClientFinancialIndicator extends ASPxClientIndicator { + /** + * Gets the first point of the financial indicator. + * Value: An ASPxClientFinancialIndicatorPoint object, which represents a financial indicator's first point. + */ + point1: ASPxClientFinancialIndicatorPoint; + /** + * Gets the second point of the financial indicator. + * Value: An ASPxClientFinancialIndicatorPoint object, which represents a financial indicator's second point. + */ + point2: ASPxClientFinancialIndicatorPoint; +} +/** + * Represents the client-side equivalent of the TrendLine class. + */ +interface ASPxClientTrendLine extends ASPxClientFinancialIndicator { +} +/** + * Represents the client-side equivalent of the FibonacciIndicator class. + */ +interface ASPxClientFibonacciIndicator extends ASPxClientFinancialIndicator { +} +/** + * Represents the client-side equivalent of the FinancialIndicatorPoint class. + */ +interface ASPxClientFinancialIndicatorPoint extends ASPxClientWebChartRequiredElement { + /** + * Gets the financial indicator that owns the current financial indicator point. + * Value: An ASPxClientFinancialIndicator object, to which the point belongs. + */ + financialIndicator: ASPxClientFinancialIndicator; + /** + * Gets the argument of the financial indicator's point. + * Value: An object that specifies the point argument. + */ + argument: Object; + /** + * Gets a value, indicating how the value of a financial indicator's point is obtained. + * Value: A string value, which indicates how to obtain a financial indicator point's value. + */ + valueLevel: string; +} +/** + * The client-side equivalent of the SingleLevelIndicator class. + */ +interface ASPxClientSingleLevelIndicator extends ASPxClientIndicator { + /** + * Gets a value specifying the value level to which the single-level indicator corresponds. + * Value: A string value. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the RegressionLine class. + */ +interface ASPxClientRegressionLine extends ASPxClientSingleLevelIndicator { +} +/** + * The client-side equivalent of the MovingAverage class. + */ +interface ASPxClientMovingAverage extends ASPxClientSingleLevelIndicator { + /** + * Gets the number of data points used to calculate the moving average. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value specifying whether to display a Moving Average, Envelope, or both. + * Value: A string value. + */ + kind: string; + /** + * Gets a value specifying the Envelope percent. + * Value: A double value which specifies the Envelope percent. + */ + envelopePercent: number; +} +/** + * The client-side equivalent of the SimpleMovingAverage class. + */ +interface ASPxClientSimpleMovingAverage extends ASPxClientMovingAverage { +} +/** + * The client-side equivalent of the ExponentialMovingAverage class. + */ +interface ASPxClientExponentialMovingAverage extends ASPxClientMovingAverage { +} +/** + * The client-side equivalent of the WeightedMovingAverage class. + */ +interface ASPxClientWeightedMovingAverage extends ASPxClientMovingAverage { +} +/** + * The client-side equivalent of the TriangularMovingAverage class. + */ +interface ASPxClientTriangularMovingAverage extends ASPxClientMovingAverage { +} +/** + * Represents the client-side equivalent of the TripleExponentialMovingAverageTema class. + */ +interface ASPxClientTripleExponentialMovingAverageTema extends ASPxClientMovingAverage { +} +/** + * Represents the client-side equivalent of the BollingerBands class. + */ +interface ASPxClientBollingerBands extends ASPxClientIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the MedianPrice class. + */ +interface ASPxClientMedianPrice extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the TypicalPrice class. + */ +interface ASPxClientTypicalPrice extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the WeightedClose class. + */ +interface ASPxClientWeightedClose extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the SeparatePaneIndicator class. + */ +interface ASPxSeparatePaneIndicator extends ASPxClientIndicator { + /** + * Returns the name of the Y-axis that is used to plot the current indicator on a ASPxClientXYDiagram. + * Value: A string value specifying the Y-axis name. + */ + axisY: string; + /** + * Returns the name of a pane, used to plot the separate pane indicator on an XYDiagram. + * Value: A string that is the name of a pane. + */ + pane: string; +} +/** + * Represents the client-side equivalent of the AverageTrueRange class. + */ +interface ASPxClientAverageTrueRange extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the ChaikinsVolatility class. + */ +interface ASPxClientChaikinsVolatility extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the CommodityChannelIndex class. + */ +interface ASPxClientCommodityChannelIndex extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the DetrendedPriceOscillator class. + */ +interface ASPxClientDetrendedPriceOscillator extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the MassIndex class. + */ +interface ASPxClientMassIndex extends ASPxSeparatePaneIndicator { + /** + * Returns the count of points used to calculate the exponential moving average (EMA). + * Value: An integer value, specifying the count of points used to calculate EMA. + */ + movingAveragePointsCount: number; + /** + * Returns the count of summable values. + * Value: An integer value specifying the count of summable ratios. + */ + sumPointsCount: number; +} +/** + * Represents the client-side equivalent of the MovingAverageConvergenceDivergence class. + */ +interface ASPxClientMovingAverageConvergenceDivergence extends ASPxSeparatePaneIndicator { + /** + * Returns the short period value required to calculate the indicator. + * Value: An integer value specifying the short period value. + */ + shortPeriod: number; + /** + * Returns the long period value required to calculate the indicator. + * Value: An integer value specifying the long period. + */ + longPeriod: number; + /** + * Returns the smoothing period value required to calculate the indicator. + * Value: An integer value specifying the smoothing period value. + */ + signalSmoothingPeriod: number; +} +/** + * Represents the client-side equivalent of the RateOfChange class. + */ +interface ASPxClientRateOfChange extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the RelativeStrengthIndex class. + */ +interface ASPxClientRelativeStrengthIndex extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the StandardDeviation class. + */ +interface ASPxClientStandardDeviation extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the TripleExponentialMovingAverageTrix class. + */ +interface ASPxClientTripleExponentialMovingAverageTrix extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the WilliamsR class. + */ +interface ASPxClientWilliamsR extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the FixedValueErrorBars class. + */ +interface ASPxClientFixedValueErrorBars extends ASPxClientIndicator { + /** + * Gets or sets the fixed positive error value. + * Value: A double value specifying the positive error value. + */ + positiveError: number; + /** + * Returns the fixed negative error value. + * Value: A double value specifying the negative error value. + */ + negativeError: number; +} +/** + * Represents the client-side equivalent of the PercentageErrorBars class. + */ +interface ASPxClientPercentageErrorBars extends ASPxClientIndicator { + /** + * Returns the value specifying the percentage of error values of series point values. + * Value: A double value specifying the percentage. Values less than or equal to 0 are not allowed. + */ + percent: number; +} +/** + * Represents the client-side equivalent of the StandardDeviationErrorBars class. + */ +interface ASPxClientStandardDeviationErrorBars extends ASPxClientIndicator { + /** + * Returns the multiplier on which the standard deviation value is multiplied before display. + * Value: A double value specifying the multiplier. Values less than 0 are not allowed. + */ + multiplier: number; +} +/** + * Represents the client-side equivalent of the StandardErrorBars class. + */ +interface ASPxClientStandardErrorBars extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the DataSourceBasedErrorBars class. + */ +interface ASPxClientDataSourceBasedErrorBars extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the Annotation class. + */ +interface ASPxClientAnnotation extends ASPxClientWebChartElementNamed { +} +/** + * Represents the client-side equivalent of the TextAnnotation class. + */ +interface ASPxClientTextAnnotation extends ASPxClientAnnotation { + /** + * Gets the lines of text within an annotation. + * Value: An array of string values containing the text of a title. + */ + lines: string[]; +} +/** + * Represents the client-side equivalent of the ImageAnnotation class. + */ +interface ASPxClientImageAnnotation extends ASPxClientAnnotation { +} +/** + * The client-side equivalent of the CrosshairValueItem class. + */ +interface ASPxClientCrosshairValueItem { + /** + * Gets the value that is displayed in a crosshair label. + * Value: A float value. + */ + value: number; + /** + * Gets an index of a point for which this crosshair value item is displayed. + * Value: An integer value. + */ + pointIndex: number; +} +/** + * The client-side equivalent of the ChartToolTipController class. + */ +interface ASPxClientToolTipController extends ASPxClientWebChartEmptyElement { + /** + * Gets a value indicating whether an image should be shown in tooltips. + * Value: true to show an image in tooltips; otherwise, false. + */ + showImage: boolean; + /** + * Gets a value indicating whether it is necessary to show text in tooltips. + * Value: true to show text in tooltips; otherwise, false. + */ + showText: boolean; + /** + * Gets a value that defines the position of an image within a tooltip. + * Value: A string value. + */ + imagePosition: string; + /** + * Gets a value that defines when tooltips should be invoked. + * Value: A string value. + */ + openMode: string; +} +/** + * The client-side equivalent of the ToolTipPosition class. + */ +interface ASPxClientToolTipPosition { +} +/** + * The client-side equivalent of the ToolTipRelativePosition class. + */ +interface ASPxClientToolTipRelativePosition extends ASPxClientToolTipPosition { + /** + * Gets the horizontal offset of a tooltip. + * Value: An integer value. + */ + offsetX: number; + /** + * Gets the vertical offset of a tooltip. + * Value: An integer value. + */ + offsetY: number; +} +/** + * The client-side equivalent of the ToolTipFreePosition class. + */ +interface ASPxClientToolTipFreePosition extends ASPxClientToolTipPosition { + /** + * Gets the horizontal offset of a tooltip. + * Value: An integer value. + */ + offsetX: number; + /** + * Gets the vertical offset of a tooltip. + * Value: An integer value. + */ + offsetY: number; + /** + * Gets the ID of a pane. + * Value: An integer value. + */ + paneID: number; + /** + * Gets an object containing settings that define how a tooltip should be docked. + * Value: A string value. + */ + dockPosition: string; +} +/** + * The client-side equivalent of the CrosshairLabelPosition class. + */ +interface ASPxClientCrosshairPosition { + /** + * Gets the horizontal offset of a crosshair cursor. + * Value: An integer value that is the X-offset. + */ + offsetX: number; + /** + * Gets the vertical offset of a crosshair cursor. + * Value: An integer value that is the Y-offset. + */ + offsetY: number; +} +/** + * The client-side equivalent of the CrosshairMousePosition class. + */ +interface ASPxClientCrosshairMousePosition extends ASPxClientCrosshairPosition { +} +/** + * The client-side equivalent of the CrosshairFreePosition class. + */ +interface ASPxClientCrosshairFreePosition extends ASPxClientCrosshairPosition { + /** + * Gets a Pane's ID when the crosshair cursor is in the free position mode. + * Value: An integer value that is the pane's ID. + */ + paneID: number; + /** + * Gets a string containing information on a crosshair label's dock position when the crosshair cursor is in the free position mode. + * Value: A string value containing information on a crosshair label's dock position. + */ + dockPosition: string; +} +/** + * Defines line style settings. + */ +interface ASPxClientLineStyle extends ASPxClientWebChartElement { + /** + * Gets the dash style used to paint the line. + * Value: A string value that contains information about the style used to paint the line. + */ + dashStyle: string; + /** + * Gets the thickness that corresponds to the value of the current ASPxClientLineStyle object. + * Value: An integer value which specifies the thickness, in pixels. + */ + thickness: number; + /** + * Returns the join style for the ends of consecutive lines. + * Value: A string representing the name of the line join type. + */ + lineJoin: string; +} +/** + * The client-side equivalent of the CrosshairOptions class. + */ +interface ASPxClientCrosshairOptions extends ASPxClientWebChartEmptyElement { + /** + * Gets a value indicating whether it is necessary to show a crosshair label for the X-axis. + * Value: true to show a crosshair label for the X-axis; otherwise, false. + */ + showAxisXLabels: boolean; + /** + * Gets a value indicating whether it is necessary to show a crosshair label for the Y-axis. + * Value: true to show the crosshair label for the Y-axis; otherwise, false. + */ + showAxisYLabels: boolean; + /** + * Gets a value that defines whether a crosshair label of a series point indicated by a crosshair cursor is shown on a diagram. + * Value: true if a crosshair label indicated by a crosshair cursor is shown on a diagram; otherwise, false. + */ + showCrosshairLabels: boolean; + /** + * Gets a value that indicates whether a crosshair cursor argument line is shown for a series point on a diagram. + * Value: true if a crosshair cursor argument line is displayed on a diagram; otherwise, false. + */ + showArgumentLine: boolean; + /** + * Specifies whether to show a value line of a series point indicated by a crosshair cursor on a diagram. + * Value: true to display a value line indicated by a crosshair cursor on a diagram; otherwise, false. + */ + showValueLine: boolean; + /** + * Gets a value that specifies whether to show a crosshair cursor in a focused pane only. + * Value: true to display a crosshair cursor in a focused pane; otherwise, false. + */ + showOnlyInFocusedPane: boolean; + /** + * Specifies the current snap mode of a crosshair cursor. + * Value: A string value. + */ + snapMode: string; + /** + * Specifies the way in which the crosshair label is shown for a series on a diagram. + * Value: A string value that specifies how the crosshair label is shown for a series. + */ + crosshairLabelMode: string; + /** + * Gets a value that indicates whether to show a header for each series group in crosshair cursor labels. + * Value: true, to show a group header in crosshair cursor labels; otherwise, false. + */ + showGroupHeaders: boolean; + /** + * Gets a string which represents the pattern specifying the group header text to be displayed within the crosshair label. + * Value: A String, which represents the group header's pattern. + */ + groupHeaderPattern: string; + /** + * Gets the color of a crosshair argument line. + * Value: A String value, specifying the color of a crosshair argument line. + */ + argumentLineColor: string; + /** + * Gets the color of a crosshair value line. + * Value: A String value, specifying the color of a crosshair value line. + */ + valueLineColor: string; +} +/** + * The chart print options storage. + */ +interface ASPxClientChartPrintOptions { + /** + * Gets the size mode used to print a chart. + */ + GetSizeMode(): string; + /** + * Sets the size mode used to print a chart. + * @param sizeMode A System.String object, specifying the name of the size mode. + */ + SetSizeMode(sizeMode: string): void; + /** + * Gets a value indicating that the landscape orientation will be used to print a chart. + */ + GetLandscape(): boolean; + /** + * Sets a value indicating that the landscape orientation will be used to print a chart. + * @param landscape A Boolean value, specifying that the landscape orientation will be used to print a chart. + */ + SetLandscape(landscape: boolean): void; + /** + * Gets the left margin which will be used to print a chart. + */ + GetMarginLeft(): number; + /** + * Sets the left margin which will be used to print a chart. + * @param marginLeft A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginLeft(marginLeft: number): void; + /** + * Gets the top margin which will be used to print a chart. + */ + GetMarginTop(): number; + /** + * Sets the top margin which will be used to print a chart. + * @param marginTop A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginTop(marginTop: number): void; + /** + * Gets the right margin which will be used to print a chart. + */ + GetMarginRight(): number; + /** + * Sets the right margin which will be used to print a chart. + * @param marginRight A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginRight(marginRight: number): void; + /** + * Gets the bottom margin which will be used to print a chart. + */ + GetMarginBottom(): number; + /** + * Sets the bottom margin which will be used to print a chart. + * @param marginBottom A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginBottom(marginBottom: number): void; + /** + * Gets the predefined size ratio of the paper which will be used to print a chart. + */ + GetPaperKind(): string; + /** + * Sets the predefined size ratio of the paper which will be used to print a chart. + * @param paperKind A System.String object, specifying the name of a size ratio. + */ + SetPaperKind(paperKind: string): void; + /** + * Gets the custom paper width which will be used to print a chart. + */ + GetCustomPaperWidth(): number; + /** + * Sets the custom paper width which will be used to print a chart. + * @param customPaperWidth A System.Int32 object, specifying the width in hundredths of an inch. + */ + SetCustomPaperWidth(customPaperWidth: number): void; + /** + * Gets the custom paper height which will be used to print a chart. + */ + GetCustomPaperHeight(): number; + /** + * Sets the custom paper height which will be used to print a chart. + * @param customPaperHeight A System.Int32 object, specifying the height in hundredths of an inch. + */ + SetCustomPaperHeight(customPaperHeight: number): void; + /** + * Gets the name of the custom paper width-height ratio used to print the chart. + */ + GetCustomPaperName(): string; + /** + * Sets the name of the custom paper width-height ratio used to print a chart. + * @param customPaperName A String object, specifying the name of the custom paper width-height ratio. + */ + SetCustomPaperName(customPaperName: string): void; +} +/** + * Represents the client-side equivalent of the CustomLegendItem class. + */ +interface ASPxClientCustomLegendItem extends ASPxClientWebChartElementNamed { + /** + * Returns the text displayed by the custom legend item. + * Value: A string value that specifies legend item text. + */ + text: string; +} +/** + * The client-side equivalent of the ASPxDocumentViewer control. + */ +interface ASPxClientDocumentViewer extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientDocumentViewer. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs when the value of an item within the Document Viewer's report toolbar is changed. + */ + ToolbarItemValueChanged: ASPxClientEvent>; + /** + * Occurs when an item within the Document Viewer's report toolbar is clicked. + */ + ToolbarItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when a report page is loaded into this ASPxClientDocumentViewer instance. + */ + PageLoad: ASPxClientEvent>; + /** + * Provides access to the Splitter of the ASPxClientDocumentViewer. + */ + GetSplitter(): ASPxClientSplitter; + /** + * Provides access to the ASPxClientDocumentViewer's preview that exposes methods to print and export the document. + */ + GetViewer(): ASPxClientReportViewer; + /** + * Provides access to the Document Viewer toolbar on the client. + */ + GetToolbar(): ASPxClientReportToolbar; + /** + * Provides access to the Ribbon of the ASPxClientDocumentViewer. + */ + GetRibbonToolbar(): ASPxClientRibbon; + /** + * Provides access to the parameters panel of the ASPxClientDocumentViewer. + */ + GetParametersPanel(): ASPxClientReportParametersPanel; + /** + * Provides access to the document of the ASPxClientDocumentViewer. + */ + GetDocumentMap(): ASPxClientReportDocumentMap; + /** + * Sets focus on the report control specified by its bookmark. + * @param pageIndex An integer value, specifying the page index. + * @param bookmarkPath A String value, specifying the path to the bookmark. + */ + GotoBookmark(pageIndex: number, bookmarkPath: string): void; + /** + * Initiates a round trip to the server so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Prints the current document. + */ + Print(): void; + /** + * Prints the document's page with the specified page index. + * @param pageIndex A Int32 representing the index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Displays the specified report page. + * @param pageIndex An integer value, identifying the report page. + */ + GotoPage(pageIndex: number): void; + /** + * Invokes the Search dialog, which allows end-users to search for specific text in a report. + */ + Search(): void; + /** + * Gets a value indicating whether or not searching text across a report is permitted in the web browser. + */ + IsSearchAllowed(): boolean; + /** + * Exports a report to a file of the specified format, and shows it in a new Web Browser window. + * @param format A string specifying the format to which a report should be exported. + */ + SaveToWindow(format: string): void; + /** + * Exports a report to a file of the specified format, and saves it to the disk. + * @param format A string specifying the format to which a report should be exported. + */ + SaveToDisk(format: string): void; +} +/** + * A method that will handle the ItemValueChanged event. + */ +interface ASPxClientToolbarItemValueChangedEventHandler { + /** + * A method that will handle the ToolbarItemValueChanged event. + * @param source A Object that is the event source. + * @param e An ASPxClientToolbarItemValueChangedEventArgs object, containing the event arguments. + */ + (source: S, e: ASPxClientToolbarItemValueChangedEventArgs): void; +} +/** + * Provides data for the ItemValueChanged event. + */ +interface ASPxClientToolbarItemValueChangedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the menu item object related to the event. + * Value: An ASPxClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; + /** + * Provides access to the toolbar's value editor on the client. + * Value: An ASPxClientControl descendant. + */ + editor: ASPxClientControl; +} +/** + * The client-side equivalent of the ASPxQueryBuilder control. + */ +interface ASPxClientQueryBuilder extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientQueryBuilder. + */ + CallbackError: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of a Query Builder. + */ + CustomizeToolbarActions: ASPxClientEvent>; + /** + * Occurs when executing the Save command on the client. + */ + SaveCommandExecute: ASPxClientEvent>; + /** + * Sends a callback to the server with the specified argument. + * @param arg A String value, specifying the callback argument. + */ + PerformCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; + /** + * Updates the localization settings of the ASPxClientQueryBuilder properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; + /** + * Returns the object model of a Query Builder. + */ + GetDesignerModel(): Object; + /** + * Gets a client-side model of the currently opened query serialized to Json. + */ + GetJsonQueryModel(): string; + /** + * Saves the current query. + */ + Save(): void; + /** + * Invokes a Data Preview for the current query. + */ + ShowPreview(): void; + /** + * Specifies whether or not the current query is a valid SQL string. + */ + IsQueryValid(): boolean; +} +/** + * A method that will handle the SaveCommandExecute event. + */ +interface ASPxClientQueryBuilderSaveCommandExecuteEventHandler { + /** + * A method that will handle the SaveCommandExecute event. + * @param source The event sender. + * @param e An ASPxClientQueryBuilderSaveCommandExecuteEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientQueryBuilderSaveCommandExecuteEventArgs): void; +} +/** + * Provides data for the SaveCommandExecute event. + */ +interface ASPxClientQueryBuilderSaveCommandExecuteEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the CustomizeToolbarActions event. + */ +interface ASPxClientQueryBuilderCustomizeToolbarActionsEventHandler { + /** + * A method that will handle the CustomizeToolbarActions event. + * @param source The event sender. + * @param e An ASPxClientQueryBuilderCustomizeToolbarActionsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientQueryBuilderCustomizeToolbarActionsEventArgs): void; +} +/** + * Provides settings to the actions listed in a Query Builder menu. + */ +interface ASPxClientQueryBuilderMenuAction { + /** + * Provides access to the text for the command. + * Value: A String value. + */ + text: string; + /** + * Provides access to the CSS class of the command's glyph. + * Value: A String value. + */ + imageClassName: string; + /** + * Provides access to the action performed when a Query Builder's button is clicked. + * Value: The specific action implementation. + */ + clickAction: Function; + /** + * Provides access to the value that specifies whether or not the command is disabled by default. + * Value: true, if the command is disabled by default; otherwise, false. + */ + disabled: boolean; + /** + * Provides access to the value that specifies whether or not the command is visible in the Query Builder user interface. + * Value: true if the command is visible; otherwise false. + */ + visible: boolean; + /** + * Provides access to the keyboard shortcut used to invoke the command. + * Value: A String value. + */ + hotKey: string; + /** + * Provides access to the value that specifies whether or not the command has a visual separator. + * Value: true, if the command has a visual separator; otherwise, false. + */ + hasSeparator: string; + /** + * Provides access to the location of the displayed command. + * Value: A String value. + */ + container: string; +} +/** + * Provides data for the CustomizeToolbarActions event. + */ +interface ASPxClientQueryBuilderCustomizeToolbarActionsEventArgs extends ASPxClientEventArgs { + /** + * Returns the collection of customized menu actions. + * Value: An ASPxClientQueryBuilderMenuAction array. + */ + Actions: ASPxClientQueryBuilderMenuAction[]; + /** + * Returns a menu action with the specified ID. + * @param actionId A String value, specifying the action ID. + */ + GetById(actionId: string): ASPxClientQueryBuilderMenuAction; +} +/** + * The client-side equivalent of the Web Report Designer control. + */ +interface ASPxClientReportDesigner extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientReportDesigner. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs when executing the Save command on the client. + */ + SaveCommandExecute: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of a Web Report Designer. + */ + CustomizeMenuActions: ASPxClientEvent>; + /** + * Occurs each time a standard editor is created for a report parameter based on a parameter type. + */ + CustomizeParameterEditors: ASPxClientEvent>; + /** + * Occurs each time a look-up editor is created for a report parameter. + */ + CustomizeParameterLookUpSource: ASPxClientEvent>; + /** + * Occurs on the client side when the Report Designer is being closed. + */ + ExitDesigner: ASPxClientEvent>; + /** + * Sends a callback to the server with the specified argument. + * @param arg A String value, specifying the callback argument. + */ + PerformCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; + /** + * Updates the localization settings of the ASPxClientReportDesigner properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; + /** + * Returns the object model of a Web Report Designer. + */ + GetDesignerModel(): Object; + /** + * Gets a client-side model of the currently opened report serialized to Json. + */ + GetJsonReportModel(): string; + /** + * Returns serialization information for the specific property of the specific control type. + * @param controlType A string that identifies the name of the control type for which serialization information is to be returned. + * @param propertyDisplayName A string that identifies the name of the property for which serialization information is to be returned. + */ + GetPropertyInfo(controlType: string, propertyDisplayName: string): ASPxDesignerElementSerializationInfo; + /** + * Indicates whether or not the current ASPxClientReportDesigner instance has been modified. + */ + IsModified(): boolean; + /** + * Resets the value returned by the IsModified method. + */ + ResetIsModified(): void; +} +/** + * A method that will handle the SaveCommandExecute event. + */ +interface ASPxClientReportDesignerSaveCommandExecuteEventHandler { + /** + * A method that will handle the SaveCommandExecute event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerSaveCommandExecuteEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerSaveCommandExecuteEventArgs): void; +} +/** + * Provides data for the SaveCommandExecute event. + */ +interface ASPxClientReportDesignerSaveCommandExecuteEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the CustomizeMenuActions event. + */ +interface ASPxClientReportDesignerCustomizeMenuActionsEventHandler { + /** + * A method that will handle the CustomizeMenuActions event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerCustomizeMenuActionsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerCustomizeMenuActionsEventArgs): void; +} +/** + * Provides settings to the actions listed in a Web Report Designer menu. + */ +interface ASPxClientReportDesignerMenuAction { + /** + * Provides access to the text for the command. + * Value: A String value. + */ + text: string; + /** + * Provides access to the CSS class of the command's glyph. + * Value: A String value. + */ + imageClassName: string; + /** + * Provides access to the action performed when a Web Report Designer's button is clicked. + * Value: The specific action implementation. + */ + clickAction: Function; + /** + * Provides access to the value that specifies whether or not the command is disabled by default. + * Value: true, if the command is disabled by default; otherwise, false. + */ + disabled: boolean; + /** + * Provides access to the value that specifies whether or not the command is visible in the designer user interface. + * Value: true if the command is visible; otherwise false. + */ + visible: boolean; + /** + * Provides access to the keyboard shortcut used to invoke the command. + * Value: A String value. + */ + hotKey: string; + /** + * Provides access to the value that specifies whether or not the command has a visual separator. + * Value: true, if the command has a visual separator; otherwise, false. + */ + hasSeparator: string; + /** + * Provides access to the location of the displayed command. + * Value: A String value. + */ + container: string; +} +/** + * Provides data for the CustomizeMenuActions event. + */ +interface ASPxClientReportDesignerCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { + /** + * Returns the collection of customized menu actions. + * Value: An ASPxClientReportDesignerMenuAction array. + */ + Actions: ASPxClientReportDesignerMenuAction[]; + /** + * Returns a menu action with the specified ID. + * @param actionId A String value, specifying the action ID. + */ + GetById(actionId: string): ASPxClientReportDesignerMenuAction; +} +/** + * Provides data for the ExitDesigner event. + */ +interface ASPxClientReportDesignerExitDesignerEventArgs extends ASPxClientEventArgs { +} +interface ASPxClientReportDesignerCustomizeParameterLookUpSourceEventHandler { + (source: S, e: ASPxClientCustomizeParameterLookUpSourceEventArgs): void; +} +/** + * A method that will handle the CustomizeParameterEditors event. + */ +interface ASPxClientReportDesignerCustomizeParameterEditorsEventHandler { + /** + * A method that will handle the CustomizeParameterEditors event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterEditorsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; +} +/** + * A method that will handle the ExitDesigner event. + */ +interface ASPxClientReportDesignerExitDesignerEventHandler { + /** + * A method that will handle the ExitDesigner event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerExitDesignerEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerExitDesignerEventArgs): void; +} +/** + * The client-side equivalent of the ASPxClientDocumentViewer control's Document Map. + */ +interface ASPxClientReportDocumentMap extends ASPxClientControl { + /** + * Occurs after the content of the Document Viewer's document map is updated. + */ + ContentChanged: ASPxClientEvent>; +} +/** + * The client-side equivalent of the ASPxClientDocumentViewer control's Parameters Panel. + */ +interface ASPxClientReportParametersPanel extends ASPxClientControl { + /** + * Assigns a value to a parameter of the report displayed in the document viewer. + * @param parametersInfo An array of ASPxClientReportParameterInfo values specifying parameters and values to assign. + */ + AssignParameters(parametersInfo: ASPxClientReportParameterInfo[]): void; + /** + * Assigns a value to a parameter of the report displayed in the document viewer. + * @param path A System.String specifying the parameter's path. + * @param value An object specifying the parameter value. + */ + AssignParameter(path: string, value: Object): void; + /** + * Returns an array storing the names of parameters available in a report. + */ + GetParameterNames(): string[]; + /** + * Returns a value editor that is associated with a parameter with the specified name. + * @param parameterName A String value, specifying the parameter name. + */ + GetEditorByParameterName(parameterName: string): ASPxClientControl; +} +interface ASPxClientReportParameterInfo { + Path: string; + Value: Object; +} +/** + * The client-side equivalent of the ASPxClientDocumentViewer control's toolbar. + */ +interface ASPxClientReportToolbar extends ASPxClientControl { + /** + * Provides access to the control template assigned for the specified menu item. + * @param name A String value, specifying the menu item name. + */ + GetItemTemplateControl(name: string): ASPxClientControl; +} +/** + * The client-side equivalent of the ReportViewer. + */ +interface ASPxClientReportViewer extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientReportViewer. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when another report page is loaded into this ASPxClientReportViewer instance. + */ + PageLoad: ASPxClientEvent>; + /** + * Submits the values of the specified parameters. + * @param parameters A dictionary containing the parameter names, along with their Object values. + */ + SubmitParameters(parameters: { [key: string]: Object; }): void; + /** + * Prints a report shown in the ReportViewer. + */ + Print(): void; + /** + * Prints a report page with the specified page index. + * @param pageIndex An integer value which specifies an index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Displays a report page with the specified page index in the ReportViewer. + * @param pageIndex An integer value which specifies the index of a page to be displayed. + */ + GotoPage(pageIndex: number): void; + /** + * Initiates a round trip to the server so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Invokes the Search dialog, which allows end-users to search for specific text in a report. + */ + Search(): void; + /** + * Exports a report to a file of the specified format, and shows it in a new Web Browser window. + * @param format A string specifying the format, to which a report should be exported. + */ + SaveToWindow(format: string): void; + /** + * Exports a report to a file of the specified format, and saves it to the disk. + * @param format A string specifying the format, to which a report should be exported. + */ + SaveToDisk(format: string): void; + /** + * Gets a value indicating whether or not searching text across a report is permitted in the web browser. + */ + IsSearchAllowed(): boolean; +} +interface ASPxClientReportViewerPageLoadEventHandler { + (source: S, e: ASPxClientReportViewerPageLoadEventArgs): void; +} +/** + * Provides data for a Report Viewer's PageLoad event on the client side. + */ +interface ASPxClientReportViewerPageLoadEventArgs extends ASPxClientEventArgs { + /** + * Gets a value specifying a zero-based index of a page to be displayed in a report viewer. + * Returns: $ + */ + PageIndex: number; + /** + * Gets a value specifying the total number of pages displayed in a report viewer. + * Returns: $ + */ + PageCount: number; + /** + * Gets a value indicating whether a report page, which is currently loaded into the ASPxClientReportViewer, is the first page of a report. + */ + IsFirstPage(): boolean; + /** + * Gets a value indicating whether a report page, which is currently loaded into the ASPxClientReportViewer, is the last page of a report. + */ + IsLastPage(): boolean; +} +/** + * Provides data for the CustomizeParameterEditors events. + */ +interface ASPxClientCustomizeParameterEditorsEventArgs extends ASPxClientEventArgs { + /** + * Provides access to an object that stores information about a parameter. + * Value: An ASPxDesignerElementParameterDescriptor object. + */ + parameter: ASPxDesignerElementParameterDescriptor; + /** + * Provides access to an object that stores information required to serialize a parameter editor. + * Value: An ASPxDesignerElementSerializationInfo object. + */ + info: ASPxDesignerElementSerializationInfo; +} +interface ASPxClientCustomizeParameterLookUpSourceEventArgs extends ASPxClientEventArgs { + parameter: ASPxDesignerElementParameterDescriptor; + items: ASPxDesignerElementEditorItem[]; + dataSource: Object; +} +/** + * Provides general information about a report parameter. + */ +interface ASPxDesignerElementParameterDescriptor { + /** + * Provides access to the parameter description. + * Value: A String value, specifying the parameter description. + */ + description: string; + /** + * Provides access to the parameter name. + * Value: A String value, specifying the parameter name. + */ + name: string; + /** + * Provides access to the parameter type. + * Value: A String value, specifying the parameter type. + */ + type: string; + /** + * Provides access to the parameter value. + * Value: A Object, specifying the parameter value. + */ + value: Object; + /** + * Provides access to the parameter visibility state. + * Value: true if the parameter is visible; otherwise false. + */ + visible: boolean; +} +/** + * Provides information required to serialize an element. + */ +interface ASPxDesignerElementSerializationInfo { + /** + * Gets the property name that will be used in the model to store the property value. + * Value: A String value. + */ + propertyName: string; + /** + * Gets the property name in the model that is displayed in the Property grid. + * Value: A String value. + */ + displayName: string; + /** + * Gets the property name that will be used during serialization to store the property value. + * Value: A String value. + */ + modelName: string; + /** + * Gets the default property value used for serialization. + * Value: A Object value. + */ + defaultVal: Object; + /** + * Gets the information about a complex object's content. + * Value: An array of ASPxDesignerElementSerializationInfo objects. + */ + info: ASPxDesignerElementSerializationInfo[]; + /** + * Gets a value indicating whether or not the property returns an array. + * Value: true if the property returns an array; otherwise false. + */ + array: boolean; + /** + * Gets a value indicating whether an object should be serialized to the ComponentStorage property. + * Value: true to serialize an object to the ObjectStorage; otherwise false. + */ + link: boolean; + /** + * Gets a value specifying the type of value editor for the Property Grid. + * Value: An ASPxDesignerElementEditor object. + */ + editor: ASPxDesignerElementEditor; + /** + * Gets the collection of values displayed in the Property grid. + * Value: An array of ASPxDesignerElementEditorItem objects. + */ + valuesArray: ASPxDesignerElementEditorItem[]; + /** + * Gets the rules for validating the property value entered into its editor. + * Value: An array of Object values. + */ + validationRules: Object[]; + /** + * Gets the visibility state of the value editor in the Property Grid. + * Value: A Object value. + */ + visible: Object; + /** + * Gets a value, indicating whether or not the property value can be edited. + * Value: true to disable the property editing; otherwise false. + */ + disabled: Object; +} +/** + * Provides information about a serialized property's value editor used in the Property Grid. + */ +interface ASPxDesignerElementEditor { + /** + * Gets the name of an HTML template specifying the editor and header of a complex object (i.e., an object having its content properties specified). + * Value: A String value. + */ + header: string; + /** + * Gets a nullable value, specifying the name of an HTML template used by a complex object's editor. + * Value: A String value. + */ + content: string; + /** + * Gets a nullable value, specifying the type of the editor's model. + * Value: A Object value. + */ + editorType: Object; +} +/** + * Provides information about property values. + */ +interface ASPxDesignerElementEditorItem { + /** + * Gets an actual property value. + * Value: A Object value. + */ + value: Object; + /** + * Gets a value displayed by a property editor. + * Value: A String value. + */ + displayValue: string; +} +/** + * A client-side equivalent of the ASPxWebDocumentViewer class. + */ +interface ASPxClientWebDocumentViewer extends ASPxClientControl { + /** + * Enables you to customize the menu actions of a Web Document Viewer. + */ + CustomizeMenuActions: ASPxClientEvent>; + /** + * Occurs each time a standard editor is created for a report parameter based on a parameter type. + */ + CustomizeParameterEditors: ASPxClientEvent>; + /** + * Occurs each time a look-up editor is created for a report parameter. + */ + CustomizeParameterLookUpSource: ASPxClientEvent>; + /** + * Provides access to the preview model of the ASPxClientWebDocumentViewer. + */ + GetPreviewModel(): Object; + /** + * Opens the specified report in the HTML5 Document Viewer. + */ + OpenReport(): Object; + /** + * Prints the current document. + */ + Print(): void; + /** + * Prints the document's page with the specified index. + * @param pageIndex An index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Exports the document to a PDF file. + */ + ExportTo(): void; + /** + * Exports the document to a specified file format. + * @param format A String value, specifying the export format. The following formats are currently supported: 'csv', 'html', 'image', 'mht', 'pdf', 'rtf', 'txt', 'xls', and 'xlsx'. + */ + ExportTo(format: string): void; + /** + * Updates the localization settings of the ASPxClientWebDocumentViewer properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; +} +/** + * Provides settings to the actions listed in a Web Document Viewer menu. + */ +interface ASPxClientWebDocumentViewerMenuAction { + /** + * Provides access to the text for the command. + * Value: A String value. + */ + text: string; + /** + * Provides access to the CSS class of the command's glyph. + * Value: A String value. + */ + imageClassName: string; + /** + * Provides access to the action performed when a Document Viewer's button is clicked. + * Value: The specific action implementation. + */ + clickAction: Function; + /** + * Provides access to the value that specifies whether or not the command is disabled by default. + * Value: true, if the command is disabled by default; otherwise, false. + */ + disabled: boolean; + /** + * Provides access to the value that specifies whether or not the command is visible in the Document Viewer user interface. + * Value: true if the command is visible; otherwise false. + */ + visible: boolean; + /** + * Provides access to the keyboard shortcut used to invoke the command. + * Value: A String value. + */ + hotKey: string; + /** + * Provides access to the value that specifies whether or not the command has a visual separator. + * Value: true, if the command has a visual separator; otherwise, false. + */ + hasSeparator: string; + /** + * Provides access to the location of the displayed command. + * Value: A String value. + */ + container: string; +} +/** + * Provides data for the CustomizeMenuActions event. + */ +interface ASPxClientWebDocumentViewerCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { + /** + * Returns the collection of customized menu actions. + * Value: An ASPxClientWebDocumentViewerMenuAction array. + */ + Actions: ASPxClientWebDocumentViewerMenuAction[]; + /** + * Returns a menu action with the specified ID. + * @param actionId A String value, specifying the action ID. + */ + GetById(actionId: string): ASPxClientWebDocumentViewerMenuAction; +} +/** + * A method that will handle the CustomizeMenuActions event. + */ +interface ASPxClientWebDocumentViewerCustomizeMenuActionsEventHandler { + /** + * A method that will handle the CustomizeMenuActions event. + * @param source The event sender. + * @param e An ASPxClientWebDocumentViewerCustomizeMenuActionsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientWebDocumentViewerCustomizeMenuActionsEventArgs): void; +} +/** + * A method that will handle the CustomizeParameterEditors event. + */ +interface ASPxClientWebDocumentViewerCustomizeParameterEditorsEventHandler { + /** + * A method that will handle the CustomizeParameterEditors event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterEditorsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; +} +interface ASPxClientWebDocumentViewerCustomizeParameterLookUpSourceEventHandler { + (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; +} + +interface MVCxClientDashboardViewerStatic extends ASPxClientDashboardViewerStatic { +} +interface DashboardDataAxisNamesStatic { + /** + * Identifies a default axis in all data-bound dashboard items. + */ + DefaultAxis: string; + /** + * Identifies a series axis in a chart and pie. + */ + ChartSeriesAxis: string; + /** + * Identifies an argument axis in a chart, scatter chart and pie. + */ + ChartArgumentAxis: string; + /** + * Identifies a sparkline axis in a grid and cards. + */ + SparklineAxis: string; + /** + * Identifies a pivot column axis. + */ + PivotColumnAxis: string; + /** + * Identifies a pivot row axis. + */ + PivotRowAxis: string; +} +interface DashboardSpecialValuesStatic { + /** + * Represents a null value. + */ + NullValue: string; + /** + * Represents a null value in OLAP mode. + */ + OlapNullValue: string; + /** + * Represents an Others value. + */ + OthersValue: string; + /** + * Represents an error value for calculated fields. + */ + ErrorValue: string; + /** + * Returns whether or not the specified value is an NullValue. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is an OlapNullValue. + * @param value The specified value. + */ + IsOlapNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is an OthersValue. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; + /** + * Returns whether or not the specified value is an ErrorValue. + * @param value The specified value. + */ + IsErrorValue(value: Object): boolean; +} +interface ASPxClientDashboardDesignerStatic extends ASPxClientControlStatic { +} +interface ASPxClientDashboardViewerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDashboardViewer; +} +interface DashboardExportPageLayoutStatic { + /** + * The page orientation used to export a dashboard (dashboard item) is portrait. + */ + Portrait: string; + /** + * The page orientation used to export a dashboard (dashboard item) is landscape. + */ + Landscape: string; +} +interface DashboardExportPaperKindStatic { + /** + * Letter paper (8.5 in. by 11 in.). + */ + Letter: string; + /** + * Legal paper (8.5 in. by 14 in.). + */ + Legal: string; + /** + * Executive paper (7.25 in. by 10.5 in.). + */ + Executive: string; + /** + * A5 paper (148 mm by 210 mm). + */ + A5: string; + /** + * A4 paper (210 mm by 297 mm). + */ + A4: string; + /** + * A3 paper (297 mm by 420 mm). + */ + A3: string; +} +interface DashboardExportScaleModeStatic { + /** + * The dashboard (dashboard item) on the exported page retains its original size. + */ + None: string; + /** + * The size of the dashboard (dashboard item) on the exported page is changed according to the scale factor value. + */ + UseScaleFactor: string; + /** + * The size of the dashboard (dashboard item) is changed according to the width of the exported page. + */ + AutoFitToPageWidth: string; + /** + * The size of the dashboard (dashboard item) is changed to fit its content on a single page. + */ + AutoFitWithinOnePage: string; +} +interface DashboardExportFilterStateStatic { + /** + * The filter state is not included in the exported document. + */ + None: string; + /** + * The filter state is placed below the dashboard (dashboard item) in the exported document. + */ + Below: string; + /** + * The filter state is placed on a separate page in the exported document. + */ + SeparatePage: string; +} +interface DashboardExportImageFormatStatic { + /** + * The PNG image format. + */ + Png: string; + /** + * The GIF image format. + */ + Gif: string; + /** + * The JPG image format. + */ + Jpg: string; +} +interface DashboardExportExcelFormatStatic { + /** + * The Excel 97 - Excel 2003 (XLS) file format. + */ + Xls: string; + /** + * The Office Excel 2007 XML-based (XLSX) file format. + */ + Xlsx: string; + /** + * A comma-separated values (CSV) file format. + */ + Csv: string; +} +interface ChartExportSizeModeStatic { + /** + * A chart dashboard item is exported in a size identical to that shown on the dashboard. + */ + None: string; + /** + * A chart dashboard item is stretched or shrunk to fit the page to which it is exported. + */ + Stretch: string; + /** + * A chart dashboard item is resized proportionally to best fit the exported page. + */ + Zoom: string; +} +interface MapExportSizeModeStatic { + /** + * A map dashboard item is exported in a size identical to that shown on the dashboard + */ + None: string; + /** + * A map dashboard item is resized proportionally to best fit the exported page. + */ + Zoom: string; +} +interface RangeFilterExportSizeModeStatic { + /** + * A Range Filter dashboard item is exported in a size identical to that shown on the dashboard. + */ + None: string; + /** + * A Range Filter dashboard item is stretched or shrunk to fit the page to which it is exported. + */ + Stretch: string; + /** + * A Range Filter dashboard item is resized proportionally to best fit the printed page. + */ + Zoom: string; +} +interface DashboardSelectionModeStatic { + None: string; + Single: string; + Multiple: string; +} +interface ASPxClientEditBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientEditStatic extends ASPxClientEditBaseStatic { + /** + * Assigns a null value to all editors in a specified visibility state, which are located within a specified container and belong to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value specifying the validation group's name. + * @param clearInvisibleEditors true to clear both visible and invisible editors that belong to the specified container and group; false to clear only visible editors. + */ + ClearEditorsInContainer(container: Object, validationGroup: string, clearInvisibleEditors: boolean): void; + /** + * Assigns a null value to all visible editors located within a specified container, and belonging to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value specifying the validation group's name. + */ + ClearEditorsInContainer(container: Object, validationGroup: string): void; + /** + * Assigns a null value to all visible editors located within a specified container. + * @param container An HTML element specifying the container of editors to be validated. + */ + ClearEditorsInContainer(container: Object): void; + /** + * Assigns a null value to all editors which are located within the specified container object, and belonging to a specific validation group, dependent on the visibility state specified. + * @param containerId A string value specifying the editor container's identifier. + * @param validationGroup A string value specifying the validatiion group's name. + * @param clearInvisibleEditors true to clear both visible and invisible editors that belong to the specified container and group; false to clear only visible editors. + */ + ClearEditorsInContainerById(containerId: string, validationGroup: string, clearInvisibleEditors: boolean): void; + /** + * Assigns a null value to all visible editors that are located within the specified container object, and belonging to a specific validation group. + * @param containerId A string value specifying the editor container's identifier. + * @param validationGroup A string value specifying the validatiion group's name. + */ + ClearEditorsInContainerById(containerId: string, validationGroup: string): void; + /** + * Assigns a null value to all visible editors that are located within the specified container object. + * @param containerId A string value specifying the editor container's identifier. + */ + ClearEditorsInContainerById(containerId: string): void; + /** + * Assigns a null value to all editors which belong to a specific validation group, dependent on the visibility state specified. + * @param validationGroup A string value specifying the validation group's name. + * @param clearInvisibleEditors true to clear both visible and invisible editors that belong to the specified validation group; false to clear only visible editors. + */ + ClearGroup(validationGroup: string, clearInvisibleEditors: boolean): void; + /** + * Assigns a null value to all visible editors which belong to a specific validation group. + * @param validationGroup A string value specifying the validation group's name. + */ + ClearGroup(validationGroup: string): void; + /** + * Performs validation of all editors in a specified visibility state, which are located within a specified container and belong to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + * @param validateInvisibleEditors true to validate both visible and invisible editors that belong to the specified container and group; false to validate only visible editors. + */ + ValidateEditorsInContainer(container: Object, validationGroup: string, validateInvisibleEditors: boolean): boolean; + /** + * Performs validation of visible editors that are located within the specified container and belong to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + */ + ValidateEditorsInContainer(container: Object, validationGroup: string): boolean; + /** + * Performs validation of visible editors that are located within the specified container. + * @param container An HTML element specifying the container of editors to be validated. + */ + ValidateEditorsInContainer(container: Object): boolean; + /** + * Performs validation of the editors which are located within the specified container and belong to a specific validation group, dependent on the visibility state specified. + * @param containerId A string value specifying the editor container's identifier. + * @param validationGroup A string value that specifies the validation group's name. + * @param validateInvisibleEditors true to validate both visible and invisible editors that belong to the specified container and group; false to validate only visible editors. + */ + ValidateEditorsInContainerById(containerId: string, validationGroup: string, validateInvisibleEditors: boolean): boolean; + /** + * Performs validation of visible editors that are located within the specified container and belong to a specific validation group. + * @param containerId A string value that specifies the container's unique identifier. + * @param validationGroup A string value that specifies the validation group's name. + */ + ValidateEditorsInContainerById(containerId: string, validationGroup: string): boolean; + /** + * Performs validation of visible editors which are located within the specified container. + * @param containerId A string value that specifies the container's unique identifier. + */ + ValidateEditorsInContainerById(containerId: string): boolean; + /** + * Performs validation of editors contained within the specified validation group, dependent on the editor visibility state specified. + * @param validationGroup A string value specifying the validation group's name. + * @param validateInvisibleEditors true to validate both visible and invisible editors that belong to the specified validation group; false to validate only visible editors. + */ + ValidateGroup(validationGroup: string, validateInvisibleEditors: boolean): boolean; + /** + * Performs validation of visible editors contained within the specified validation group. + * @param validationGroup A string value specifying the validation group's name. + */ + ValidateGroup(validationGroup: string): boolean; + /** + * Verifies whether the editors in a specified visibility state, which are located within a specified container and belong to a specific validation group, are valid. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + * @param checkInvisibleEditors true to check both visible and invisible editors that belong to the specified container; false to check only visible editors. + */ + AreEditorsValid(container: Object, validationGroup: string, checkInvisibleEditors: boolean): boolean; + /** + * Verifies whether visible editors, which are located within a specified container and belong to a specific validation group, are valid. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + */ + AreEditorsValid(container: Object, validationGroup: string): boolean; + /** + * Verifies whether visible editors located in a specified container are valid. + * @param container An HTML element specifying the container of editors to be validated. + */ + AreEditorsValid(container: Object): boolean; + /** + * Verifies whether the editors with the specified settings are valid. + * @param containerId A string value that specifies the container's unique identifier. + * @param validationGroup A string value that specifies the validation group's name. + * @param checkInvisibleEditors true to check both visible and invisible editors that belong to the specified container; false to check only visible editors. + */ + AreEditorsValid(containerId: string, validationGroup: string, checkInvisibleEditors: boolean): boolean; + /** + * Verifies whether visible editors with the specified settings are valid. + * @param containerId A string value that specifies the container's unique identifier. + * @param validationGroup A string value that specifies the validation group's name. + */ + AreEditorsValid(containerId: string, validationGroup: string): boolean; + /** + * Verifies whether visible editors with the specified settings are valid. + * @param containerId A string value that specifies the container's unique identifier. + */ + AreEditorsValid(containerId: string): boolean; + /** + * Verifies whether visible editors on a page are valid. + */ + AreEditorsValid(): boolean; +} +interface ASPxClientBinaryImageStatic extends ASPxClientEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientBinaryImage; +} +interface ASPxClientButtonStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientButton; +} +interface ASPxClientCalendarStatic extends ASPxClientEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCalendar; +} +interface ASPxClientCaptchaStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCaptcha; +} +interface ASPxClientCheckBoxStatic extends ASPxClientEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCheckBox; +} +interface ASPxClientRadioButtonStatic extends ASPxClientCheckBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRadioButton; +} +interface ASPxClientTextEditStatic extends ASPxClientEditStatic { +} +interface ASPxClientTextBoxBaseStatic extends ASPxClientTextEditStatic { +} +interface ASPxClientButtonEditBaseStatic extends ASPxClientTextBoxBaseStatic { +} +interface ASPxClientDropDownEditBaseStatic extends ASPxClientButtonEditBaseStatic { +} +interface ASPxClientColorEditStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientColorEdit; +} +interface ASPxClientComboBoxStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientComboBox; +} +interface ASPxClientDateEditStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDateEdit; +} +interface ASPxClientDropDownEditStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDropDownEdit; +} +interface ASPxClientFilterControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientFilterControl; +} +interface ASPxClientListEditStatic extends ASPxClientEditStatic { +} +interface ASPxClientListBoxStatic extends ASPxClientListEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientListBox; +} +interface ASPxClientCheckListBaseStatic extends ASPxClientListEditStatic { +} +interface ASPxClientRadioButtonListStatic extends ASPxClientCheckListBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRadioButtonList; +} +interface ASPxClientCheckBoxListStatic extends ASPxClientCheckListBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCheckBoxList; +} +interface ASPxClientProgressBarStatic extends ASPxClientEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientProgressBar; +} +interface ASPxClientSpinEditBaseStatic extends ASPxClientButtonEditBaseStatic { +} +interface ASPxClientSpinEditStatic extends ASPxClientSpinEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientSpinEdit; +} +interface ASPxClientTimeEditStatic extends ASPxClientSpinEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTimeEdit; +} +interface ASPxClientStaticEditStatic extends ASPxClientEditBaseStatic { +} +interface ASPxClientHyperLinkStatic extends ASPxClientStaticEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientHyperLink; +} +interface ASPxClientImageBaseStatic extends ASPxClientStaticEditStatic { +} +interface ASPxClientImageStatic extends ASPxClientImageBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientImage; +} +interface ASPxClientLabelStatic extends ASPxClientStaticEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientLabel; +} +interface ASPxClientTextBoxStatic extends ASPxClientTextBoxBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTextBox; +} +interface ASPxClientMemoStatic extends ASPxClientTextEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientMemo; +} +interface ASPxClientButtonEditStatic extends ASPxClientButtonEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientButtonEdit; +} +interface ASPxClientTokenBoxStatic extends ASPxClientComboBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTokenBox; +} +interface ASPxClientTrackBarStatic extends ASPxClientEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTrackBar; +} +interface ASPxClientValidationSummaryStatic extends ASPxClientControlStatic { +} +interface ASPxClientGaugeControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientGaugeControl; +} +interface ASPxClientGridBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientGridViewCallbackCommandStatic { + /** + * Default value: "NEXTPAGE" + */ + NextPage: string; + /** + * Default value: "PREVPAGE" + */ + PreviousPage: string; + /** + * Default value: "GOTOPAGE" + */ + GotoPage: string; + /** + * Default value: "SELECTROWS" + */ + SelectRows: string; + /** + * Default value: "SELECTROWSKEY" + */ + SelectRowsKey: string; + /** + * Default value: "SELECTION" + */ + Selection: string; + /** + * Default value: "FOCUSEDROW" + */ + FocusedRow: string; + /** + * Default value: "GROUP" + */ + Group: string; + /** + * Default value: "UNGROUP" + */ + UnGroup: string; + /** + * Default value: "SORT" + */ + Sort: string; + /** + * Default value: "COLUMNMOVE" + */ + ColumnMove: string; + /** + * Default value: "COLLAPSEALL" + */ + CollapseAll: string; + /** + * Default value: "EXPANDALL" + */ + ExpandAll: string; + /** + * Default value: "EXPANDROW" + */ + ExpandRow: string; + /** + * Default value: "COLLAPSEROW" + */ + CollapseRow: string; + /** + * Default value: "HIDEALLDETAIL" + */ + HideAllDetail: string; + /** + * Default value: "SHOWALLDETAIL" + */ + ShowAllDetail: string; + /** + * Default value: "SHOWDETAILROW" + */ + ShowDetailRow: string; + /** + * Default value: "HIDEDETAILROW" + */ + HideDetailRow: string; + /** + * Default value: "PAGERONCLICK" + */ + PagerOnClick: string; + /** + * Default value: "APPLYFILTER" + */ + ApplyFilter: string; + /** + * Default value: "APPLYCOLUMNFILTER" + */ + ApplyColumnFilter: string; + /** + * Default value: "APPLYMULTICOLUMNFILTER" + */ + ApplyMultiColumnFilter: string; + /** + * Default value: "APPLYHEADERCOLUMNFILTER" + */ + ApplyHeaderColumnFilter: string; + /** + * Default value: "APPLYSEARCHPANELFILTER" + */ + ApplySearchPanelFilter: string; + /** + * Default value: "FILTERROWMENU" + */ + FilterRowMenu: string; + /** + * Default value: "STARTEDIT" + */ + StartEdit: string; + /** + * Default value: "CANCELEDIT" + */ + CancelEdit: string; + /** + * Default value: "UPDATEEDIT" + */ + UpdateEdit: string; + /** + * Default value: "ADDNEWROW" + */ + AddNewRow: string; + /** + * Default value: "DELETEROW" + */ + DeleteRow: string; + /** + * Default value: "CUSTOMBUTTON" + */ + CustomButton: string; + /** + * Default value: "CUSTOMCALLBACK" + */ + CustomCallback: string; + /** + * Default value: "SHOWFILTERCONTROL" + */ + ShowFilterControl: string; + /** + * Default value: "CLOSEFILTERCONTROL" + */ + CloseFilterControl: string; + /** + * Default value: "SETFILTERENABLED" + */ + SetFilterEnabled: string; + /** + * Default value: "REFRESH" + */ + Refresh: string; + /** + * Default value: "SELFIELDVALUES" + */ + SelFieldValues: string; + /** + * Default value: "ROWVALUES" + */ + RowValues: string; + /** + * Default value: "PAGEROWVALUES" + */ + PageRowValues: string; + /** + * Default value: "FILTERPOPUP" + */ + FilterPopup: string; + /** + * Default value: "CONTEXTMENU" + */ + ContextMenu: string; + /** + * Default value: "CUSTOMVALUES" + */ + CustomValues: string; +} +interface ASPxClientGridLookupStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientGridLookup; +} +interface ASPxClientCardViewStatic extends ASPxClientGridBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCardView; +} +interface ASPxClientGridViewStatic extends ASPxClientGridBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientGridView; +} +interface ASPxClientVerticalGridStatic extends ASPxClientGridBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientVerticalGrid; +} +interface ASPxClientVerticalGridCallbackCommandStatic { + /** + * Default value: "EXPANDROW" + */ + ExpandRow: string; +} +interface ASPxClientCommandConstsStatic { + /** + * Identifies a command that shows a search panel. + * Value: "showsearchpanel" + */ + SHOWSEARCHPANEL_COMMAND: string; + /** + * Identifies a command that invokes the Find and Replace dialog. + * Value: "findandreplacedialog" + */ + FINDANDREPLACE_DIALOG_COMMAND: string; + /** + * Identifies a command that applies the bold text formatting to the selected text. If it's already applied, cancels it. + * Value: "bold" + */ + BOLD_COMMAND: string; + /** + * Identifies a command that makes the selected text italic or regular type depending on the current state. + * Value: "italic" + */ + ITALIC_COMMAND: string; + /** + * Identifies a command that applies the underline text formatting to the selected text. If it's already applied, cancels it. + * Value: "underline" + */ + UNDERLINE_COMMAND: string; + /** + * Identifies a command that applies the strike through text formatting to the selected text. If it's already applied, cancels it. + * Value: "strikethrough" + */ + STRIKETHROUGH_COMMAND: string; + /** + * Identifies a command that applies the superscript text formatting to the selected text. If it's already applied, cancels it. + * Value: "superscript" + */ + SUPERSCRIPT_COMMAND: string; + /** + * Identifies a command that applies the subscript text formatting to the selected text. If it's already applied, cancels it. + * Value: "subscript" + */ + SUBSCRIPT_COMMAND: string; + /** + * Identifies a command that centers the content of the currently focused paragraph. + * Value: "justifycenter" + */ + JUSTIFYCENTER_COMMAND: string; + /** + * Identifies a command that left justifies the content of the currently focused paragraph. + * Value: "justifyleft" + */ + JUSTIFYLEFT_COMMAND: string; + /** + * Identifies a command that creates an indent for the selected paragarph. + * Value: "indent" + */ + INDENT_COMMAND: string; + /** + * Identifies a command that creates an outdent for the focused paragarph. + * Value: "outdent" + */ + OUTDENT_COMMAND: string; + /** + * Identifies a command that right justifies the content of the currently focused paragraph. + * Value: "justifyright" + */ + JUSTIFYRIGHT_COMMAND: string; + /** + * Identifies a command that fully justifies the content of the currently focused paragraph (aligned with both the left and right margines). + * Value: "justifyfull" + */ + JUSTIFYFULL_COMMAND: string; + /** + * Identifies a command that changes the size of the selected text. + * Value: "fontsize" + */ + FONTSIZE_COMMAND: string; + /** + * Identifies a command that changes the font of the selected text. + * Value: "fontname" + */ + FONTNAME_COMMAND: string; + /** + * Identifies a command that changes the color of a fore color pickers and sets the selected text fore color. + * Value: "forecolor" + */ + FONTCOLOR_COMMAND: string; + /** + * Identifies a command that changes the color of a back color pickers and sets the selected text back color. + * Value: "backcolor" + */ + BACKCOLOR_COMMAND: string; + /** + * Identifies a command that wraps the selected paragraph in the specified html tag. + * Value: "formatblock" + */ + FORMATBLOCK_COMMAND: string; + /** + * Identifies a command that wraps the currently selected text content in a specific html tag with a css class assigned to it. + * Value: "applycss" + */ + APPLYCSS_COMMAND: string; + /** + * Identifies a command that removes all formatting from the selected content. + * Value: "removeformat" + */ + REMOVEFORMAT_COMMAND: string; + /** + * Identifies a command that cancels the last action. + * Value: "undo" + */ + UNDO_COMMAND: string; + /** + * Identifies a command that returns a previously canceled action. + * Value: "redo" + */ + REDO_COMMAND: string; + /** + * Identifies a command that copies the selected content. + * Value: "copy" + */ + COPY_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard at the current cursor position. + * Value: "paste" + */ + PASTE_COMMAND: string; + /** + * Identifies a command that pastes a specified content taking into account that it was copied from Word. + * Value: "pastefromword" + */ + PASTEFROMWORD_COMMAND: string; + /** + * Identifies a command that invokes the Paste from Word dialog. + * Value: "pastefromworddialog" + */ + PASTEFROMWORDDIALOG_COMMAND: string; + /** + * Identifies a command that cuts the selected content. + * Value: "cut" + */ + CUT_COMMAND: string; + /** + * Identifies a command that selects all content inside the html editor. + * Value: "selectall" + */ + SELECT_ALL: string; + /** + * Identifies a command that deletes the selected content. + * Value: "delete" + */ + DELETE_COMMAND: string; + /** + * Identifies a command that can be used to correctly insert HTML code into the editor. + * Value: "pastehtml" + */ + PASTEHTML_COMMAND: string; + /** + * Identifies a command that inserts a new ordered list. + * Value: "insertorderedlist" + */ + INSERTORDEREDLIST_COMMAND: string; + /** + * Identifies a command that inserts a new unordered list. + * Value: "insertunorderedlist" + */ + INSERTUNORDEREDLIST_COMMAND: string; + /** + * Identifies a command that restarts the current ordered list. + * Value: "restartorderedlist" + */ + RESTARTORDEREDLIST_COMMAND: string; + /** + * Identifies a command that continues a disrupted ordered list. + * Value: "continueorderedlist" + */ + CONTINUEORDEREDLIST_COMMAND: string; + /** + * Identifies a command that removes a hyperlink from the selected text or image. + * Value: "unlink" + */ + UNLINK_COMMAND: string; + /** + * Identifies a command that inserts a new hyperlink. + * Value: "insertlink" + */ + INSERTLINK_COMMAND: string; + /** + * Identifies a command that inserts a new image. + * Value: "insertimage" + */ + INSERTIMAGE_COMMAND: string; + /** + * Identifies a command that changes the selected image. + * Value: "changeimage" + */ + CHANGEIMAGE_COMMAND: string; + /** + * Identifies a command that initiates spell checking. + * Value: "checkspelling" + */ + CHECKSPELLING_COMMAND: string; + /** + * Identifies a command that invokes the Insert Image dialog. + * Value: "insertimagedialog" + */ + INSERTIMAGE_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Image dialog. + * Value: "changeimagedialog" + */ + CHANGEIMAGE_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Link dialog. + * Value: "insertlinkdialog" + */ + INSERTLINK_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Link dialog. + * Value: "changelinkdialog" + */ + CHANGELINK_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Table dialog. + * Value: "inserttabledialog" + */ + INSERTTABLE_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Table Properties dialog. + * Value: "tablepropertiesdialog" + */ + TABLEPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Cell Properties dialog. + * Value: "tablecellpropertiesdialog" + */ + TABLECELLPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Column Properties dialog. + * Value: "tablecolumnpropertiesdialog" + */ + TABLECOLUMNPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Row Properties dialog. + * Value: "tablerowpropertiesdialog" + */ + TABLEROWPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes a default browser Print dialog, allowing an end-user to print the content of the html editor. + * Value: "print" + */ + PRINT_COMMAND: string; + /** + * Identifies a command that toggles the full-screen mode. + * Value: "fullscreen" + */ + FULLSCREEN_COMMAND: string; + /** + * Identifies a command that inserts a new table. + * Value: "inserttable" + */ + INSERTTABLE_COMMAND: string; + /** + * Identifies a command that changes the selected table. + * Value: "changetable" + */ + CHANGETABLE_COMMAND: string; + /** + * Identifies a command that changes the selected table cell. + * Value: "changetablecell" + */ + CHANGETABLECELL_COMMAND: string; + /** + * Identifies a command that changes the selected table row. + * Value: "changetablerow" + */ + CHANGETABLEROW_COMMAND: string; + /** + * Identifies a command that changes the selected table column. + * Value: "changetablecolumn" + */ + CHANGETABLECOLUMN_COMMAND: string; + /** + * Identifies a command that deletes the currently selected table. + * Value: "deletetable" + */ + DELETETABLE_COMMAND: string; + /** + * Identifies a command that deletes the currently selected table row. + * Value: "deletetablerow" + */ + DELETETABLEROW_COMMAND: string; + /** + * Identifies a command that deletes the currently selected table column. + * Value: "deletetablecolumn" + */ + DELETETABLECOLUMN_COMMAND: string; + /** + * Identifies a command that inserts a new column to the left from the currently focused one. + * Value: "inserttablecolumntoleft" + */ + INSERTTABLECOLUMNTOLEFT_COMMAND: string; + /** + * Identifies a command that inserts a new column to the right from the currently focused one. + * Value: "inserttablecolumntoright" + */ + INSERTTABLECOLUMNTORIGHT_COMMAND: string; + /** + * Identifies a command that inserts a new row below the currently focused one. + * Value: "inserttablerowbelow" + */ + INSERTTABLEROWBELOW_COMMAND: string; + /** + * Identifies a command that inserts a new row above the currently focused one. + * Value: "inserttablerowabove" + */ + INSERTTABLEROWABOVE_COMMAND: string; + /** + * Identifies a command that splits the current table cell horizontally. + * Value: "splittablecellhorizontally" + */ + SPLITTABLECELLHORIZONTALLY_COMMAND: string; + /** + * Identifies a command that splits the current table cell vertically. + * Value: "splittablecellvertically" + */ + SPLITTABLECELLVERTICALLY_COMMAND: string; + /** + * Identifies a command that merges the focused table cell with the one to the right. + * Value: "mergetablecellright" + */ + MERGETABLECELLRIGHT_COMMAND: string; + /** + * Identifies a command that merges the focused table cell with the one below. + * Value: "mergetablecelldown" + */ + MERGETABLECELLDOWN_COMMAND: string; + /** + * Identifies a command that invokes a custom dialog. + * Value: "customdialog" + */ + CUSTOMDIALOG_COMMAND: string; + /** + * Identifies a command that exports the html editor content. + * Value: "export" + */ + EXPORT_COMMAND: string; + /** + * Identifies a command that inserts a new audio element. + * Value: "insertaudio" + */ + INSERTAUDIO_COMMAND: string; + /** + * Identifies a command that inserts a new video. + * Value: "insertvideo" + */ + INSERTVIDEO_COMMAND: string; + /** + * Identifies a command that inserts a new flash element. + * Value: "insertflash" + */ + INSERTFLASH_COMMAND: string; + /** + * Identifies a command that inserts a new YouTube video. + * Value: "insertyoutubevideo" + */ + INSERTYOUTUBEVIDEO_COMMAND: string; + /** + * Identifies a command that changes the selected audio element. + * Value: "changeaudio" + */ + CHANGEAUDIO_COMMAND: string; + /** + * Identifies a command that changes the selected video element. + * Value: "changevideo" + */ + CHANGEVIDEO_COMMAND: string; + /** + * Identifies a command that changes the selected flash element. + * Value: "changeflash" + */ + CHANGEFLASH_COMMAND: string; + /** + * Identifies a command that changes the selected YouTube video element. + * Value: "changeyoutubevideo" + */ + CHANGEYOUTUBEVIDEO_COMMAND: string; + /** + * Identifies a command that invokes the Insert Audio dialog. + * Value: "insertaudiodialog" + */ + INSERTAUDIO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Video dialog. + * Value: "insertvideodialog" + */ + INSERTVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Flash dialog. + * Value: "insertflashdialog" + */ + INSERTFLASH_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert YouTube Video dialog. + * Value: "insertyoutubevideodialog" + */ + INSERTYOUTUBEVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Audio dialog. + * Value: "changeaudiodialog" + */ + CHANGEAUDIO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Video dialog. + * Value: "changevideodialog" + */ + CHANGEVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Flash dialog. + * Value: "changeflash" + */ + CHANGEFLASH_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change YouTube Video dialog. + * Value: "changeyoutubevideodialog" + */ + CHANGEYOUTUBEVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard to the current cursor position, taking into account that the PasteMode property is set to SourceFormatting. + * Value: "pastehtmlsourceformatting" + */ + PASTEHTMLSOURCEFORMATTING_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard to the current cursor position, taking into account that the PasteMode property is set to PlainText. + * Value: "pastehtmlplaintext" + */ + PASTEHTMLPLAINTEXT_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard to the current cursor position, taking into account that the PasteMode property is set to MergeFormatting. + * Value: "pastehtmlmergeformatting" + */ + PASTEHTMLMERGEFORMATTING_COMMAND: string; + /** + * Identifies a command that inserts a new placeholder. + * Value: "insertplaceholder" + */ + INSERTPLACEHOLDER_COMMAND: string; + /** + * Identifies a command that changes the selected placeholder. + * Value: "changeplaceholder" + */ + CHANGEPLACEHOLDER_COMMAND: string; + /** + * Identifies a command that invokes the Insert Placeholder dialog. + * Value: "insertplaceholderdialog" + */ + INSERTPLACEHOLDER_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Placeholder dialog. + * Value: "changeplaceholderdialog" + */ + CHANGEPLACEHOLDER_DIALOG_COMMAND: string; + /** + * Identifies a command that updates the editor content. + * Value: "updatedocument" + */ + UPDATEDOCUMENT_COMMAND: string; + /** + * Identifies a command that changes properties of the element selected in the tag inspector. + * Value: "changeelementproperties" + */ + CHANGEELEMENTPROPERTIES_COMMAND: string; + /** + * Identifies a command that invokes the Change Element Properties dialog. + * Value: "changeelementpropertiesdialog" + */ + CHANGEELEMENTPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that comments the selected HTML code. If no code is selected, it comments the focused tag. + * Value: "comment" + */ + COMMENT_COMMAND: string; + /** + * Identifies a command that uncomments the selected HTML code. If no code is selected, the command uncomments the currently focused tag. + * Value: "uncomment" + */ + UNCOMMENTHTML_COMMAND: string; + /** + * Identifies a command that formats the current HTML document. + * Value: "formatdocument" + */ + FORMATDOCUMENT_COMMAND: string; + /** + * Identifies a command that applies the indent formatting to the selected content. + * Value: "indent" + */ + INDENTLINE_COMMAND: string; + /** + * Identifies a command that applies the outdent formatting to the focused content. + * Value: "outdent" + */ + OUTDENTLINE_COMMAND: string; + /** + * Identifies a command that collapses the selected HTML tag. + * Value: "collapsetag" + */ + COLLAPSETAG_COMMAND: string; + /** + * Identifies a command that expands the selected HTML tag. + * Value: "expandtag" + */ + EXPANDTAG_COMMAND: string; + /** + * Identifies a command that shows intellisense for the HTML code editor. + * Value: "showintellisense" + */ + SHOWINTELLISENSE_COMMAND: string; +} +interface ASPxClientHtmlEditorStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientHtmlEditor; + /** + * Programmatically closes a custom dialog, supplying it with specific parameters. + * @param status An object representing a custom dialog's closing status. + * @param data An object representing custom data associated with a custom dialog. + */ + CustomDialogComplete(status: Object, data: Object): void; +} +interface ASPxClientHtmlEditorMediaPreloadModeStatic { + /** + * The browser does not load a media file when the page loads. + */ + None: string; + /** + * The browser loads the entire video when the page loads. + */ + Auto: string; + /** + * The browser loads only metadata when the page loads. + */ + Metadata: string; +} +interface ASPxClientPivotGridStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPivotGrid; +} +interface ASPxClientPivotCustomizationStatic extends ASPxClientControlStatic { +} +interface ASPxClientRichEditStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRichEdit; +} +interface ASPxSchedulerDateTimeHelperStatic { + /** + * Returns the date part of the specified DateTime value. + * @param date A DateTime object from which to extract the date. + */ + TruncToDate(date: Date): Date; + /** + * Returns the day time part of the specified DateTime value. + * @param date A DateTime object from which to extract the day time. + */ + ToDayTime(date: Date): any; + /** + * + * @param date + * @param dayCount + */ + AddDays(date: Date, dayCount: number): Date; + /** + * Adds the specified timespan to a DateTime object and returns the result. + * @param date A DateTime object to which to add a timespan. + * @param timeSpan A TimeSpan object specifying the timespan to add. + */ + AddTimeSpan(date: Date, timeSpan: any): Date; + /** + * Rounds a DateTime value up to the nearest interval. + * @param date A DateTime object containing a value to round. + * @param spanInMs A TimeSpan object specifying an interval to which to round. + */ + CeilDateTime(date: Date, spanInMs: any): Date; +} +interface ASPxClientWeekDaysCheckEditStatic extends ASPxClientControlStatic { +} +interface ASPxClientRecurrenceRangeControlStatic extends ASPxClientControlStatic { +} +interface ASPxClientRecurrenceControlBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientDailyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientWeeklyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientMonthlyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientYearlyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientRecurrenceTypeEditStatic extends ASPxClientRadioButtonListStatic { +} +interface ASPxClientTimeIntervalStatic { + /** + * Gets the duration of a time interval between two points in time. + * @param start A DateTime object specifying the starting point of the time interval. + * @param end A DateTime object specifying the ending point of the time interval. + */ + CalculateDuration(start: Date, end: Date): number; +} +interface ASPxClientSchedulerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientScheduler; +} +interface ASPxClientSpellCheckerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientSpellChecker; +} +interface ASPxClientSpreadsheetStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientSpreadsheet; +} +interface ASPxClientTreeListStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTreeList; +} +interface MVCxClientCalendarStatic extends ASPxClientCalendarStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientCalendar; +} +interface MVCxClientCallbackPanelStatic extends ASPxClientCallbackPanelStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientCallbackPanel; +} +interface MVCxClientCardViewStatic extends ASPxClientCardViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientCardView; +} +interface MVCxClientChartStatic extends ASPxClientWebChartControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientChart; +} +interface MVCxClientComboBoxStatic extends ASPxClientComboBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientComboBox; +} +interface MVCxClientDataViewStatic extends ASPxClientDataViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientDataView; +} +interface MVCxClientDateEditStatic extends ASPxClientDateEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientDateEdit; +} +interface MVCxClientDockManagerStatic extends ASPxClientDockManagerStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientDockManager; +} +interface MVCxClientDockPanelStatic extends ASPxClientDockPanelStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientDockPanel; +} +interface MVCxClientFileManagerStatic extends ASPxClientFileManagerStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientFileManager; +} +interface MVCxClientGridViewStatic extends ASPxClientGridViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientGridView; +} +interface MVCxClientHtmlEditorStatic extends ASPxClientHtmlEditorStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientHtmlEditor; +} +interface MVCxClientImageGalleryStatic extends ASPxClientImageGalleryStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientImageGallery; +} +interface MVCxClientListBoxStatic extends ASPxClientListBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientListBox; +} +interface MVCxClientNavBarStatic extends ASPxClientNavBarStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientNavBar; +} +interface MVCxClientPivotGridStatic extends ASPxClientPivotGridStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientPivotGrid; +} +interface MVCxClientPopupControlStatic extends ASPxClientPopupControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientPopupControl; +} +interface MVCxClientDocumentViewerStatic extends ASPxClientDocumentViewerStatic { +} +interface MVCxClientReportViewerStatic extends ASPxClientReportViewerStatic { +} +interface MVCxClientReportDesignerStatic extends ASPxClientReportDesignerStatic { +} +interface MVCxClientRichEditStatic extends ASPxClientRichEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientRichEdit; +} +interface MVCxClientRoundPanelStatic extends ASPxClientRoundPanelStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientRoundPanel; +} +interface MVCxClientSchedulerStatic extends ASPxClientSchedulerStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientScheduler; +} +interface MVCxSchedulerToolTipTypeStatic { + Appointment: number; + AppointmentDrag: number; + Selection: number; +} +interface MVCxClientSpreadsheetStatic extends ASPxClientSpreadsheetStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientSpreadsheet; +} +interface MVCxClientPageControlStatic extends ASPxClientPageControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientPageControl; +} +interface MVCxClientTokenBoxStatic extends ASPxClientTokenBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientTokenBox; +} +interface MVCxClientTreeListStatic extends ASPxClientTreeListStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientTreeList; +} +interface MVCxClientTreeViewStatic extends ASPxClientTreeViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientTreeView; +} +interface MVCxClientUploadControlStatic extends ASPxClientUploadControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientUploadControl; +} +interface MVCxClientUtilsStatic { + /** + * Loads service resources (such as scripts, CSS files, etc.) required for DevExpress functionality to work properly after a non DevExpress callback has been processed on the server and returned back to the client. + */ + FinalizeCallback(): void; + /** + * Returns values of editors placed in the specified container. + * @param containerOrId A container of editors, or its ID. + */ + GetSerializedEditorValuesInContainer(containerOrId: Object): Object; + /** + * Returns values of editors placed in the specified container. + * @param containerOrId A container of editors, or its ID. + * @param processInvisibleEditors true to process both visible and invisible editors that belong to the specified container; false to process only visible editors. + */ + GetSerializedEditorValuesInContainer(containerOrId: Object, processInvisibleEditors: boolean): Object; +} +interface MVCxClientGlobalEventsStatic { + /** + * Dynamically connects the ControlsInitialized client event with an appropriate event handler function. + * @param handler A object representing the event handling function's content. + */ + AddControlsInitializedEventHandler(handler: ASPxClientControlsInitializedEventHandler): void; + /** + * Dynamically connects the BeginCallback client event with an appropriate event handler function. + * @param handler A object containing the event handling function's content. + */ + AddBeginCallbackEventHandler(handler: MVCxClientBeginCallbackEventHandler): void; + /** + * Dynamically connects the EndCallback client event with an appropriate event handler function. + * @param handler A object containing the event handling function's content. + */ + AddEndCallbackEventHandler(handler: ASPxClientEndCallbackEventHandler): void; + /** + * Dynamically connects the CallbackError client event with an appropriate event handler function. + * @param handler A object containing the event handling function's content. + */ + AddCallbackErrorHandler(handler: ASPxClientCallbackErrorEventHandler): void; +} +interface MVCxClientVerticalGridStatic extends ASPxClientVerticalGridStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientVerticalGrid; +} +interface MVCxClientWebDocumentViewerStatic extends ASPxClientWebDocumentViewerStatic { +} +interface ASPxClientControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientControlBase; +} +interface ASPxClientControlStatic extends ASPxClientControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientControl; + /** + * Modifies the controls size on the page. + */ + AdjustControls(): void; + /** + * Modifies the controls size within the specified container. + * @param container An HTML element that is the container of the controls. + */ + AdjustControls(container: Object): void; + /** + * Returns a collection of client web control objects. + */ + GetControlCollection(): ASPxClientControlCollection; +} +interface ASPxClientCallbackStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCallback; +} +interface ASPxClientCallbackPanelStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCallbackPanel; +} +interface ASPxClientCloudControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCloudControl; +} +interface ASPxClientDataViewStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDataView; +} +interface ASPxClientDockManagerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDockManager; +} +interface ASPxClientPopupControlBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientDockPanelStatic extends ASPxClientPopupControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDockPanel; +} +interface ASPxClientDockZoneStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDockZone; +} +interface ASPxClientFileManagerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientFileManager; +} +interface ASPxClientFileManagerCommandConstsStatic { + /** + * The name of a command that is executed when an end-user renames an item. + */ + Rename: string; + /** + * The name of a command that is executed when an end-user moves an item. + */ + Move: string; + /** + * The name of a command that is executed when an end-user deletes an item. + */ + Delete: string; + /** + * The name of a command that is executed when an end-user creates a folder. + */ + Create: string; + /** + * The name of a command that is executed when an end-user uploads a file. + */ + Upload: string; + /** + * The name of a command that is executed when an end-user downloads an item. + */ + Download: string; + /** + * The name of a command that is executed when an end-user copies an item. + */ + Copy: string; + /** + * The name of a command that is executed when an end-user opens an item. + */ + Open: string; +} +interface ASPxClientFileManagerErrorConstsStatic { + /** + * The specified file is not found. Return Value: 0 + */ + FileNotFound: number; + /** + * The specified folder is not found. Return Value: 1 + */ + FolderNotFound: number; + /** + * Access is denied. Return Value: 2 + */ + AccessDenied: number; + /** + * Unspecified IO error occurs. Return Value: 3 + */ + UnspecifiedIO: number; + /** + * Unspecified error occurs. Return Value: 4 + */ + Unspecified: number; + /** + * The file/folder name is empty. Return Value: 5 + */ + EmptyName: number; + /** + * The operation was canceled. Return Value: 6 + */ + CanceledOperation: number; + /** + * The specified name contains invalid characters. Return Value: 7 + */ + InvalidSymbols: number; + /** + * The specified file extension is not allowed. Return Value: 8 + */ + WrongExtension: number; + /** + * The file/folder is being used by another process. Return Value: 9 + */ + UsedByAnotherProcess: number; + /** + * The specified file/folder already exists. Return Value: 10 + */ + AlreadyExists: number; +} +interface ASPxClientFormLayoutStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientFormLayout; +} +interface ASPxClientHiddenFieldStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientHiddenField; +} +interface ASPxClientImageGalleryStatic extends ASPxClientDataViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientImageGallery; +} +interface ASPxClientImageSliderStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientImageSlider; +} +interface ASPxClientImageZoomNavigatorStatic extends ASPxClientImageSliderStatic { +} +interface ASPxClientImageZoomStatic extends ASPxClientControlStatic { +} +interface ASPxClientLoadingPanelStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientLoadingPanel; +} +interface ASPxClientMenuBaseStatic extends ASPxClientControlStatic { + /** + * Returns a collection of client menu objects. + */ + GetMenuCollection(): ASPxClientMenuCollection; +} +interface ASPxClientMenuStatic extends ASPxClientMenuBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientMenu; +} +interface ASPxClientTouchUIStatic { + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and the ability to display vertical and horizontal scroll bars. + * @param id A string value specifying the element's ID. + */ + MakeScrollable(id: string): ScrollExtender; + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and the ability to display vertical and horizontal scroll bars. + * @param element An object that specifies the required DOM element. + */ + MakeScrollable(element: Object): ScrollExtender; + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and customized scrollbar-related options. + * @param id A string value specifying the name of a DOM element that should be extended with the touch scrolling functionality. + * @param options An ASPxClientTouchUIOptions object that provides options affecting the touch scrolling functionality. + */ + MakeScrollable(id: string, options: ASPxClientTouchUIOptions): ScrollExtender; + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and customized scrollbar-related options. + * @param element An object specifying the DOM element to extend with the touch scrolling functionality. + * @param options An ASPxClientTouchUIOptions object that provides options affecting the touch scrolling functionality. + */ + MakeScrollable(element: Object, options: ASPxClientTouchUIOptions): ScrollExtender; +} +interface ASPxClientNavBarStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientNavBar; +} +interface ASPxClientNewsControlStatic extends ASPxClientDataViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientNewsControl; +} +interface ASPxClientObjectContainerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientObjectContainer; +} +interface ASPxClientPanelBaseStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPanelBase; +} +interface ASPxClientPanelStatic extends ASPxClientPanelBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPanel; +} +interface ASPxClientPopupControlStatic extends ASPxClientPopupControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPopupControl; + /** + * Returns a collection of client popup control objects. + */ + GetPopupControlCollection(): ASPxClientPopupControlCollection; +} +interface ASPxClientPopupControlResizeStateStatic { + /** + * A window has been resized. Returns 0. + */ + Resized: number; + /** + * A window has been collapsed. Returns 1. + */ + Collapsed: number; + /** + * A window has been expanded. Returns 2. + */ + Expanded: number; + /** + * A window has been maximized. Returns 3. + */ + Maximized: number; + /** + * A window has been restored after maximizing. Returns 4. + */ + RestoredAfterMaximized: number; +} +interface ASPxClientPopupControlCloseReasonStatic { + /** + * The window has been closed by an API. + */ + API: string; + /** + * An end-user clicks the close header button. + */ + CloseButton: string; + /** + * An end-user clicks outside the window's region + */ + OuterMouseClick: string; + /** + * An end-user moves the mouse pointer out of the window region. + */ + MouseOut: string; + /** + * An end-user presses the ESC key. + */ + Escape: string; +} +interface ASPxClientPopupMenuStatic extends ASPxClientMenuBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPopupMenu; +} +interface ASPxClientRatingControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRatingControl; +} +interface ASPxClientRibbonStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRibbon; +} +interface ASPxClientRibbonStateStatic { + /** + * A ribbon is in the normal state. Returns 0 + */ + Normal: number; + /** + * A ribbon is minimized. Returns 1 + */ + Minimized: number; + /** + * A ribbon is temporarily shown. Returns 2 + */ + TemporaryShown: number; +} +interface ASPxClientRoundPanelStatic extends ASPxClientPanelBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRoundPanel; +} +interface ASPxClientSplitterStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientSplitter; +} +interface ASPxClientTabControlBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientTabControlStatic extends ASPxClientTabControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTabControl; +} +interface ASPxClientPageControlStatic extends ASPxClientTabControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPageControl; +} +interface ASPxClientTimerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTimer; +} +interface ASPxClientTitleIndexStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTitleIndex; +} +interface ASPxClientTreeViewStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTreeView; +} +interface ASPxClientUploadControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientUploadControl; +} +interface ASPxClientUtilsStatic { + /** + * Gets the user-agent string, which identifies the client browser and provides certain system details of the client computer. + * Value: A string value representing the browser's user-agent string. + */ + agent: string; + /** + * Gets a value that specifies whether the client browser is Opera. + * Value: true if the client browser is Opera; otherwise, false. + */ + opera: boolean; + /** + * Gets a value that specifies whether the client browser is Opera version 9. + * Value: true if the client browser is Opera version 9; otherwise, false. + */ + opera9: boolean; + /** + * Gets a value that specifies whether the client browser is Safari. + * Value: true if the client browser is Safari; otherwise, false. + */ + safari: boolean; + /** + * Gets a value that specifies whether the client browser is Safari version 3. + * Value: true if the client browser is Safari version 3; otherwise, false. + */ + safari3: boolean; + /** + * Gets a value that specifies whether the client browser is Safari, running under a MacOS operating system. + * Value: true if the client browser is Safari, running under a MacOS operating system; otherwise, false. + */ + safariMacOS: boolean; + /** + * Gets a value that specifies whether the client browser is Google Chrome. + * Value: true if the client browser is Google Chrome; otherwise, false. + */ + chrome: boolean; + /** + * Gets a value that specifies whether the client browser is Internet Explorer. + * Value: true if the client browser is Intenet Explorer; otherwise, false. + */ + ie: boolean; + /** + * Gets a value that specifies whether the client browser is Internet Explorer version 7. + * Value: true if the client browser is Intenet Explorer version 7; otherwise, false. + */ + ie7: boolean; + /** + * Gets a value that specifies whether the client browser is Firefox. + * Value: true if the client browser is Firefox; otherwise, false. + */ + firefox: boolean; + /** + * Gets a value that specifies whether the client browser is Firefox version 3. + * Value: true if the client browser is Firefox version 3; otherwise, false. + */ + firefox3: boolean; + /** + * Gets a value that specifies whether the client browser is Mozilla. + * Value: true if the client browser is Mozilla; otherwise, false. + */ + mozilla: boolean; + /** + * Gets a value that specifies whether the client browser is Netscape. + * Value: true if the client browser is Netscape; otherwise, false. + */ + netscape: boolean; + /** + * Gets a value that specifies a client browser's full version. + * Value: A double precision floating-point value that specifies a client browser's version. + */ + browserVersion: number; + /** + * Gets a value that specifies a client browser's major version. + * Value: An integer value that specifies a client browser's major version. + */ + browserMajorVersion: number; + /** + * Gets a value that specifies whether the application is run under a MacOS platform. + * Value: true if the application is run under the MacOS platform; otherwise, false. + */ + macOSPlatform: boolean; + /** + * Gets a value that specifies whether the application is run under the Windows platform. + * Value: true if the application is run under the Windows platform; otherwise, false. + */ + windowsPlatform: boolean; + /** + * Gets a value that specifies whether a client browser is based on WebKit. + * Value: true if the client browser is based on WebKit; otherwise, false. + */ + webKitFamily: boolean; + /** + * Gets a value that specifies whether a client browser is based on Netscape. + * Value: true if client browser is based on Netscape; otherwise, false. + */ + netscapeFamily: boolean; + /** + * Gets a value that specifies whether the client browser supports touch. + * Value: true if the client browser supports touch; otherwise, false. + */ + touchUI: boolean; + /** + * Gets a value that specifies whether the client browser supports the WebKit touch user interface. + * Value: true if the client browser supports the WebKit touch user interface; otherwise, false. + */ + webKitTouchUI: boolean; + /** + * Gets a value that specifies whether the client browser supports the Microsoft touch user interface. + * Value: true if the client browser supports the Microsoft touch user interface; otherwise, false. + */ + msTouchUI: boolean; + /** + * Gets a value that specifies whether the application is run under an iOS platform. + * Value: true if the application is run under the iOS platform; otherwise, false. + */ + iOSPlatform: boolean; + /** + * Gets a value that specifies whether the application is run under the Android platform. + * Value: true if the application is run under the Android platform; otherwise, false. + */ + androidPlatform: boolean; + /** + * Inserts the specified item into the specified array object. + * @param array An object that specifies the array to manipulate. + * @param element An object that specifies the array item to insert. + */ + ArrayInsert(array: Object[], element: Object): void; + /** + * Removes the specified item from the specified array object. + * @param array An object that specifies the array to manipulate. + * @param element An object that specifies the array item to remove. + */ + ArrayRemove(array: Object[], element: Object): void; + /** + * Removes an item at the specified index location from the specified array object. + * @param array An object that specifies the array to manipulate. + * @param index The zero-based index location of the array item to remove. + */ + ArrayRemoveAt(array: Object[], index: number): void; + /** + * Removes all items from the specified array object. + * @param array An object that specifies the array to manipulate. + */ + ArrayClear(array: Object[]): void; + /** + * Searches for the specified array item and returns the zero-based index of its first occurrence within the specified array object. + * @param array An object that specifies the array to manipulate. + * @param element An object that specifies the array item to locate. + */ + ArrayIndexOf(array: Object[], element: Object): number; + /** + * Binds the specified function to a specific element's event, so that the function gets called whenever the event fires on the element. + * @param element An object specifying the required element. + * @param eventName A string value that specifies the required event name without the "on" prefix. + * @param method An object that specifies the event's handling function. + */ + AttachEventToElement(element: Object, eventName: string, method: Object): void; + /** + * Unbinds the specified function from a specific element's event, so that the function stops receiving notifications when the event fires. + * @param element An object specifying the required element. + * @param eventName A string value that specifies the required event name. + * @param method An object that specifies the event's handling function. + */ + DetachEventFromElement(element: Object, eventName: string, method: Object): void; + /** + * Returns the object that fired the event. + * @param htmlEvent An object that represents the current event. + */ + GetEventSource(htmlEvent: Object): Object; + /** + * Gets the x-coordinate of the event-related mouse pointer position relative to an end-user's screen. + * @param htmlEvent An object specifying the required HTML event. + */ + GetEventX(htmlEvent: Object): number; + /** + * Gets the y-coordinate of the event-related mouse pointer position relative to an end-user's screen. + * @param htmlEvent An object specifying the required HTML event. + */ + GetEventY(htmlEvent: Object): number; + /** + * Gets the keyboard code for the specified event. + * @param htmlEvent An object specifying the required HTML event. + */ + GetKeyCode(htmlEvent: Object): number; + /** + * Cancels the default action of the specified event. + * @param htmlEvent An object that specifies the required HTML event. + */ + PreventEvent(htmlEvent: Object): boolean; + /** + * Cancels both the specified event's default action and the event's bubbling upon the hierarchy of event handlers. + * @param htmlEvent An object that specifies the required HTML event. + */ + PreventEventAndBubble(htmlEvent: Object): boolean; + /** + * Removes mouse capture from the specified event's source object. + * @param htmlEvent An object that specifies the required HTML event. + */ + PreventDragStart(htmlEvent: Object): boolean; + /** + * Clears any text selection made within the window's client region. + */ + ClearSelection(): void; + /** + * Gets a value that indicates whether the specified object exists on the client side. + * @param obj The object to test. + */ + IsExists(obj: Object): boolean; + /** + * Gets a value that indicates whether the specified object is a function. + * @param obj The object to test. + */ + IsFunction(obj: Object): boolean; + /** + * Gets the x-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be obtained. + */ + GetAbsoluteX(element: Object): number; + /** + * Gets the y-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be obtained. + */ + GetAbsoluteY(element: Object): number; + /** + * Sets the x-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be defined. + * @param x An integer value specifying the required element's x-coordinate, in pixels. + */ + SetAbsoluteX(element: Object, x: number): void; + /** + * Sets the y-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be defined. + * @param y An integer value specifying the required element's y-coordinate, in pixels. + */ + SetAbsoluteY(element: Object, y: number): void; + /** + * Returns the distance between the top edge of the document and the topmost portion of the content currently visible in the window. + */ + GetDocumentScrollTop(): number; + /** + * Returns the distance between the left edge of the document and the leftmost portion of the content currently visible in the window. + */ + GetDocumentScrollLeft(): number; + /** + * Gets the width of the window's client region. + */ + GetDocumentClientWidth(): number; + /** + * Gets the height of the window's client region. + */ + GetDocumentClientHeight(): number; + /** + * Gets a value indicating whether the object passed via the parentElement parameter is a parent of the object passed via the element parameter. + * @param parentElement An object specifying the parent HTML element. + * @param element An object specifying the child HTML element. + */ + GetIsParent(parentElement: Object, element: Object): boolean; + /** + * Returns a reference to the specified HTML element's first parent object which has an ID that matches the specified value. + * @param element An object specifying the child HTML element whose parent elements are searched. + * @param id A string specifying the required parent's ID. + */ + GetParentById(element: Object, id: string): Object; + /** + * Returns a reference to the specified HTML element's first parent object whose element name matches the specified value. + * @param element An object specifying the child HTML element whose parent elements are searched. + * @param tagName A string value specifying the element name (tag name) of the desired HTML element. + */ + GetParentByTagName(element: Object, tagName: string): Object; + /** + * Returns a reference to the specified HTML element's first parent object whose class name matches the specified value. + * @param element An object specifying the child HTML element whose parent elements are searched. + * @param className A string value specifying the class name of the desired HTML element. + */ + GetParentByClassName(element: Object, className: string): Object; + /** + * Returns a reference to the first element that has the specified ID in the parent HTML element specified. + * @param element An object identifying the parent HTML element to search. + * @param id A string specifying the ID attribute value of the desired child element. + */ + GetChildById(element: Object, id: string): Object; + /** + * Returns a reference to the particular element that has the specified element name and is contained within the specified parent HTML element. + * @param element An object specifying the parent HTML element to search. + * @param tagName A string value specifying the element name (tag name) of the desired HTML element. + * @param index An integer value specifying the zero-based index of the desired element amongst all the matching elements found. + */ + GetChildByTagName(element: Object, tagName: string, index: number): Object; + /** + * Creates or updates the HTTP cookie for the response. + * @param name A string value that represents the name of a cookie. + * @param value A string representing the cookie value. + */ + SetCookie(name: string, value: string): void; + /** + * Creates or updates the HTTP cookie for the response. + * @param name A string value that represents the name of a cookie. + * @param value A string representing the cookie value. + * @param expirationDate A date-time object that represents the expiration date and time for the cookie. + */ + SetCookie(name: string, value: string, expirationDate: Date): void; + /** + * Retrieves a cookie with the specified name. + * @param name A string value that represents the name of a cookie. + */ + GetCookie(name: string): string; + /** + * Deletes a cookie with the specified name. + * @param name A string value that represents the name of a cookie. + */ + DeleteCookie(name: string): void; + /** + * Returns a specifically generated code that uniquely identifies the combination of keys specified via the parameters. + * @param keyCode An integer value that specifies the code of the key. + * @param isCtrlKey true if the CTRL key should be included into the key combination; otherwise, false. + * @param isShiftKey true if the SHIFT key should be included into the key combination; otherwise, false. + * @param isAltKey true if the ALT key should be included into the key combination; otherwise, false. + */ + GetShortcutCode(keyCode: number, isCtrlKey: boolean, isShiftKey: boolean, isAltKey: boolean): number; + /** + * Returns a specifically generated code that uniquely identifies the pressed key combination, which is specified by the related HTML event. + * @param htmlEvent A DHTML event object that relates to a key combination being pressed. + */ + GetShortcutCodeByEvent(htmlEvent: Object): number; + /** + * Returns a specifically generated code that uniquely identifies the combination of keys specified via the parameter. + * @param shortcutString A string value that specifies the key combination. + */ + StringToShortcutCode(shortcutString: string): number; + /** + * Trims all leading and trailing whitespaces from the string. + * @param str A string value representing the string for trimming. + */ + Trim(str: string): string; + /** + * Trims all leading whitespaces from the string. + * @param str A string value representing the string for trimming. + */ + TrimStart(str: string): string; + /** + * Trims all trailing whitespaces from the string. + * @param str A string value representing the string for trimming. + */ + TrimEnd(str: string): string; +} +interface ASPxClientChartDesignerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientChartDesigner; +} +interface ASPxClientWebChartControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientWebChartControl; +} +interface ASPxClientDocumentViewerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDocumentViewer; +} +interface ASPxClientQueryBuilderStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientQueryBuilder; +} +interface ASPxClientReportDesignerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientReportDesigner; +} +interface ASPxClientReportDocumentMapStatic extends ASPxClientControlStatic { +} +interface ASPxClientReportParametersPanelStatic extends ASPxClientControlStatic { +} +interface ASPxClientReportToolbarStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientReportToolbar; +} +interface ASPxClientReportViewerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientReportViewer; +} +interface ASPxClientWebDocumentViewerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientWebDocumentViewer; +} + +declare var MVCxClientDashboardViewer: MVCxClientDashboardViewerStatic; +declare var DashboardDataAxisNames: DashboardDataAxisNamesStatic; +declare var DashboardSpecialValues: DashboardSpecialValuesStatic; +declare var ASPxClientDashboardDesigner: ASPxClientDashboardDesignerStatic; +declare var ASPxClientDashboardViewer: ASPxClientDashboardViewerStatic; +declare var DashboardExportPageLayout: DashboardExportPageLayoutStatic; +declare var DashboardExportPaperKind: DashboardExportPaperKindStatic; +declare var DashboardExportScaleMode: DashboardExportScaleModeStatic; +declare var DashboardExportFilterState: DashboardExportFilterStateStatic; +declare var DashboardExportImageFormat: DashboardExportImageFormatStatic; +declare var DashboardExportExcelFormat: DashboardExportExcelFormatStatic; +declare var ChartExportSizeMode: ChartExportSizeModeStatic; +declare var MapExportSizeMode: MapExportSizeModeStatic; +declare var RangeFilterExportSizeMode: RangeFilterExportSizeModeStatic; +declare var DashboardSelectionMode: DashboardSelectionModeStatic; +declare var ASPxClientEditBase: ASPxClientEditBaseStatic; +declare var ASPxClientEdit: ASPxClientEditStatic; +declare var ASPxClientBinaryImage: ASPxClientBinaryImageStatic; +declare var ASPxClientButton: ASPxClientButtonStatic; +declare var ASPxClientCalendar: ASPxClientCalendarStatic; +declare var ASPxClientCaptcha: ASPxClientCaptchaStatic; +declare var ASPxClientCheckBox: ASPxClientCheckBoxStatic; +declare var ASPxClientRadioButton: ASPxClientRadioButtonStatic; +declare var ASPxClientTextEdit: ASPxClientTextEditStatic; +declare var ASPxClientTextBoxBase: ASPxClientTextBoxBaseStatic; +declare var ASPxClientButtonEditBase: ASPxClientButtonEditBaseStatic; +declare var ASPxClientDropDownEditBase: ASPxClientDropDownEditBaseStatic; +declare var ASPxClientColorEdit: ASPxClientColorEditStatic; +declare var ASPxClientComboBox: ASPxClientComboBoxStatic; +declare var ASPxClientDateEdit: ASPxClientDateEditStatic; +declare var ASPxClientDropDownEdit: ASPxClientDropDownEditStatic; +declare var ASPxClientFilterControl: ASPxClientFilterControlStatic; +declare var ASPxClientListEdit: ASPxClientListEditStatic; +declare var ASPxClientListBox: ASPxClientListBoxStatic; +declare var ASPxClientCheckListBase: ASPxClientCheckListBaseStatic; +declare var ASPxClientRadioButtonList: ASPxClientRadioButtonListStatic; +declare var ASPxClientCheckBoxList: ASPxClientCheckBoxListStatic; +declare var ASPxClientProgressBar: ASPxClientProgressBarStatic; +declare var ASPxClientSpinEditBase: ASPxClientSpinEditBaseStatic; +declare var ASPxClientSpinEdit: ASPxClientSpinEditStatic; +declare var ASPxClientTimeEdit: ASPxClientTimeEditStatic; +declare var ASPxClientStaticEdit: ASPxClientStaticEditStatic; +declare var ASPxClientHyperLink: ASPxClientHyperLinkStatic; +declare var ASPxClientImageBase: ASPxClientImageBaseStatic; +declare var ASPxClientImage: ASPxClientImageStatic; +declare var ASPxClientLabel: ASPxClientLabelStatic; +declare var ASPxClientTextBox: ASPxClientTextBoxStatic; +declare var ASPxClientMemo: ASPxClientMemoStatic; +declare var ASPxClientButtonEdit: ASPxClientButtonEditStatic; +declare var ASPxClientTokenBox: ASPxClientTokenBoxStatic; +declare var ASPxClientTrackBar: ASPxClientTrackBarStatic; +declare var ASPxClientValidationSummary: ASPxClientValidationSummaryStatic; +declare var ASPxClientGaugeControl: ASPxClientGaugeControlStatic; +declare var ASPxClientGridBase: ASPxClientGridBaseStatic; +declare var ASPxClientGridViewCallbackCommand: ASPxClientGridViewCallbackCommandStatic; +declare var ASPxClientGridLookup: ASPxClientGridLookupStatic; +declare var ASPxClientCardView: ASPxClientCardViewStatic; +declare var ASPxClientGridView: ASPxClientGridViewStatic; +declare var ASPxClientVerticalGrid: ASPxClientVerticalGridStatic; +declare var ASPxClientVerticalGridCallbackCommand: ASPxClientVerticalGridCallbackCommandStatic; +declare var ASPxClientCommandConsts: ASPxClientCommandConstsStatic; +declare var ASPxClientHtmlEditor: ASPxClientHtmlEditorStatic; +declare var ASPxClientHtmlEditorMediaPreloadMode: ASPxClientHtmlEditorMediaPreloadModeStatic; +declare var ASPxClientPivotGrid: ASPxClientPivotGridStatic; +declare var ASPxClientPivotCustomization: ASPxClientPivotCustomizationStatic; +declare var ASPxClientRichEdit: ASPxClientRichEditStatic; +declare var ASPxSchedulerDateTimeHelper: ASPxSchedulerDateTimeHelperStatic; +declare var ASPxClientWeekDaysCheckEdit: ASPxClientWeekDaysCheckEditStatic; +declare var ASPxClientRecurrenceRangeControl: ASPxClientRecurrenceRangeControlStatic; +declare var ASPxClientRecurrenceControlBase: ASPxClientRecurrenceControlBaseStatic; +declare var ASPxClientDailyRecurrenceControl: ASPxClientDailyRecurrenceControlStatic; +declare var ASPxClientWeeklyRecurrenceControl: ASPxClientWeeklyRecurrenceControlStatic; +declare var ASPxClientMonthlyRecurrenceControl: ASPxClientMonthlyRecurrenceControlStatic; +declare var ASPxClientYearlyRecurrenceControl: ASPxClientYearlyRecurrenceControlStatic; +declare var ASPxClientRecurrenceTypeEdit: ASPxClientRecurrenceTypeEditStatic; +declare var ASPxClientTimeInterval: ASPxClientTimeIntervalStatic; +declare var ASPxClientScheduler: ASPxClientSchedulerStatic; +declare var ASPxClientSpellChecker: ASPxClientSpellCheckerStatic; +declare var ASPxClientSpreadsheet: ASPxClientSpreadsheetStatic; +declare var ASPxClientTreeList: ASPxClientTreeListStatic; +declare var MVCxClientCalendar: MVCxClientCalendarStatic; +declare var MVCxClientCallbackPanel: MVCxClientCallbackPanelStatic; +declare var MVCxClientCardView: MVCxClientCardViewStatic; +declare var MVCxClientChart: MVCxClientChartStatic; +declare var MVCxClientComboBox: MVCxClientComboBoxStatic; +declare var MVCxClientDataView: MVCxClientDataViewStatic; +declare var MVCxClientDateEdit: MVCxClientDateEditStatic; +declare var MVCxClientDockManager: MVCxClientDockManagerStatic; +declare var MVCxClientDockPanel: MVCxClientDockPanelStatic; +declare var MVCxClientFileManager: MVCxClientFileManagerStatic; +declare var MVCxClientGridView: MVCxClientGridViewStatic; +declare var MVCxClientHtmlEditor: MVCxClientHtmlEditorStatic; +declare var MVCxClientImageGallery: MVCxClientImageGalleryStatic; +declare var MVCxClientListBox: MVCxClientListBoxStatic; +declare var MVCxClientNavBar: MVCxClientNavBarStatic; +declare var MVCxClientPivotGrid: MVCxClientPivotGridStatic; +declare var MVCxClientPopupControl: MVCxClientPopupControlStatic; +declare var MVCxClientDocumentViewer: MVCxClientDocumentViewerStatic; +declare var MVCxClientReportViewer: MVCxClientReportViewerStatic; +declare var MVCxClientReportDesigner: MVCxClientReportDesignerStatic; +declare var MVCxClientRichEdit: MVCxClientRichEditStatic; +declare var MVCxClientRoundPanel: MVCxClientRoundPanelStatic; +declare var MVCxClientScheduler: MVCxClientSchedulerStatic; +declare var MVCxSchedulerToolTipType: MVCxSchedulerToolTipTypeStatic; +declare var MVCxClientSpreadsheet: MVCxClientSpreadsheetStatic; +declare var MVCxClientPageControl: MVCxClientPageControlStatic; +declare var MVCxClientTokenBox: MVCxClientTokenBoxStatic; +declare var MVCxClientTreeList: MVCxClientTreeListStatic; +declare var MVCxClientTreeView: MVCxClientTreeViewStatic; +declare var MVCxClientUploadControl: MVCxClientUploadControlStatic; +declare var MVCxClientUtils: MVCxClientUtilsStatic; +declare var MVCxClientGlobalEvents: MVCxClientGlobalEventsStatic; +declare var MVCxClientVerticalGrid: MVCxClientVerticalGridStatic; +declare var MVCxClientWebDocumentViewer: MVCxClientWebDocumentViewerStatic; +declare var ASPxClientControlBase: ASPxClientControlBaseStatic; +declare var ASPxClientControl: ASPxClientControlStatic; +declare var ASPxClientCallback: ASPxClientCallbackStatic; +declare var ASPxClientCallbackPanel: ASPxClientCallbackPanelStatic; +declare var ASPxClientCloudControl: ASPxClientCloudControlStatic; +declare var ASPxClientDataView: ASPxClientDataViewStatic; +declare var ASPxClientDockManager: ASPxClientDockManagerStatic; +declare var ASPxClientPopupControlBase: ASPxClientPopupControlBaseStatic; +declare var ASPxClientDockPanel: ASPxClientDockPanelStatic; +declare var ASPxClientDockZone: ASPxClientDockZoneStatic; +declare var ASPxClientFileManager: ASPxClientFileManagerStatic; +declare var ASPxClientFileManagerCommandConsts: ASPxClientFileManagerCommandConstsStatic; +declare var ASPxClientFileManagerErrorConsts: ASPxClientFileManagerErrorConstsStatic; +declare var ASPxClientFormLayout: ASPxClientFormLayoutStatic; +declare var ASPxClientHiddenField: ASPxClientHiddenFieldStatic; +declare var ASPxClientImageGallery: ASPxClientImageGalleryStatic; +declare var ASPxClientImageSlider: ASPxClientImageSliderStatic; +declare var ASPxClientImageZoomNavigator: ASPxClientImageZoomNavigatorStatic; +declare var ASPxClientImageZoom: ASPxClientImageZoomStatic; +declare var ASPxClientLoadingPanel: ASPxClientLoadingPanelStatic; +declare var ASPxClientMenuBase: ASPxClientMenuBaseStatic; +declare var ASPxClientMenu: ASPxClientMenuStatic; +declare var ASPxClientTouchUI: ASPxClientTouchUIStatic; +declare var ASPxClientNavBar: ASPxClientNavBarStatic; +declare var ASPxClientNewsControl: ASPxClientNewsControlStatic; +declare var ASPxClientObjectContainer: ASPxClientObjectContainerStatic; +declare var ASPxClientPanelBase: ASPxClientPanelBaseStatic; +declare var ASPxClientPanel: ASPxClientPanelStatic; +declare var ASPxClientPopupControl: ASPxClientPopupControlStatic; +declare var ASPxClientPopupControlResizeState: ASPxClientPopupControlResizeStateStatic; +declare var ASPxClientPopupControlCloseReason: ASPxClientPopupControlCloseReasonStatic; +declare var ASPxClientPopupMenu: ASPxClientPopupMenuStatic; +declare var ASPxClientRatingControl: ASPxClientRatingControlStatic; +declare var ASPxClientRibbon: ASPxClientRibbonStatic; +declare var ASPxClientRibbonState: ASPxClientRibbonStateStatic; +declare var ASPxClientRoundPanel: ASPxClientRoundPanelStatic; +declare var ASPxClientSplitter: ASPxClientSplitterStatic; +declare var ASPxClientTabControlBase: ASPxClientTabControlBaseStatic; +declare var ASPxClientTabControl: ASPxClientTabControlStatic; +declare var ASPxClientPageControl: ASPxClientPageControlStatic; +declare var ASPxClientTimer: ASPxClientTimerStatic; +declare var ASPxClientTitleIndex: ASPxClientTitleIndexStatic; +declare var ASPxClientTreeView: ASPxClientTreeViewStatic; +declare var ASPxClientUploadControl: ASPxClientUploadControlStatic; +declare var ASPxClientUtils: ASPxClientUtilsStatic; +declare var ASPxClientChartDesigner: ASPxClientChartDesignerStatic; +declare var ASPxClientWebChartControl: ASPxClientWebChartControlStatic; +declare var ASPxClientDocumentViewer: ASPxClientDocumentViewerStatic; +declare var ASPxClientQueryBuilder: ASPxClientQueryBuilderStatic; +declare var ASPxClientReportDesigner: ASPxClientReportDesignerStatic; +declare var ASPxClientReportDocumentMap: ASPxClientReportDocumentMapStatic; +declare var ASPxClientReportParametersPanel: ASPxClientReportParametersPanelStatic; +declare var ASPxClientReportToolbar: ASPxClientReportToolbarStatic; +declare var ASPxClientReportViewer: ASPxClientReportViewerStatic; +declare var ASPxClientWebDocumentViewer: ASPxClientWebDocumentViewerStatic; + diff --git a/types/devexpress-web/v161/tsconfig.json b/types/devexpress-web/v161/tsconfig.json new file mode 100644 index 0000000000..a64418f9b0 --- /dev/null +++ b/types/devexpress-web/v161/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "devexpress-web": ["devexpress-web/v161"], + "devexpress-web/*": ["devexpress-web/v161/*"] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "devexpress-web-tests.ts" + ] +} \ No newline at end of file diff --git a/types/devexpress-web/v162/devexpress-web-tests.ts b/types/devexpress-web/v162/devexpress-web-tests.ts new file mode 100644 index 0000000000..ef7eb8de37 --- /dev/null +++ b/types/devexpress-web/v162/devexpress-web-tests.ts @@ -0,0 +1,418 @@ +declare var hiddenField: ASPxClientHiddenField; +declare var mainCallbackPanel: ASPxClientCallbackPanel; +declare var loginPopup: ASPxClientPopupControl; +declare var searchButton: ASPxClientButton; +declare var searchComboBox: ASPxClientComboBox; +declare var roomsNumberSpinEdit: ASPxClientSpinEdit; +declare var adultsNumberSpinEdit: ASPxClientSpinEdit; +declare var childrenNumberSpinEdit: ASPxClientSpinEdit; +declare var checkInDateEdit: ASPxClientDateEdit; +declare var checkOutDateEdit: ASPxClientDateEdit; +declare var backSlider: ASPxClientImageSlider; +declare var locationComboBox: ASPxClientComboBox; +declare var nightyRateTrackBar: ASPxClientTrackBar; +declare var customerRatingTrackBar: ASPxClientTrackBar; +declare var ourRatingCheckBoxList: ASPxClientCheckBoxList; +declare var startFilterPopupControl: ASPxClientPopupControl; +declare var imagePopupControl: ASPxClientPopupControl; +declare var emailTextBox: ASPxClientTextBox; +declare var creditCardEmailTextBox: ASPxClientTextBox; +declare var accountEmailTextBox: ASPxClientTextBox; +declare var bookingPageControl: ASPxClientPageControl; +declare var paymentTypePageControl: ASPxClientPageControl; +declare var offerFormPopup: ASPxClientPopupControl; +declare var roomsSpinEdit: ASPxClientSpinEdit; +declare var adultsSpinEdit: ASPxClientSpinEdit; +declare var childrenSpinEdit: ASPxClientSpinEdit; +declare var hotelDetailsCallbackPanel: ASPxClientCallbackPanel; +declare var leftPanel: ASPxClientPanel; +declare var menuButton: ASPxClientButton; +declare var aboutWindow: ASPxClientPopupControl; +declare var offersZone: ASPxClientDockZone; + +module DXDemo { + function showPage(page: string, params: { [key: string]: any }, skipHistory?: boolean): void { + var queryString = getQueryString(params || {}); + hiddenField.Set("page", page); + hiddenField.Set("parameters", queryString); + hideMenu(); + var uri = queryString.length ? (page + "?" + queryString) : page; + try { + if (!skipHistory && window.history && window.history.pushState) + window.history.pushState(uri, "", uri || "Default.aspx"); + } catch (e) { } + mainCallbackPanel.PerformCallback(uri); + }; + + export function onMainMenuItemClick(s: ASPxClientMenu, e: ASPxClientMenuItemClickEventArgs): void { + switch (e.item.name) { + case "login": + hideMenu(); + setTimeout(function () { loginPopup.ShowAtElementByID("MainCallbackPanel_ContentPane"); }, 300); + break; + case "offers": + showPage("SpecialOffers", {}); + break; + default: + hideMenu(); + setTimeout(function () { showAboutWindow(); }, 300); + break; + } + }; + + export function onLoginButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + loginPopup.Hide(); + showAboutWindow(); + }; + + export function onSearchButtonClick(): void { + if (ASPxClientEdit.ValidateGroup("DateEditors")) { + showPage("ShowHotels", { + location: searchComboBox.GetValue(), + checkin: getFormattedDate(checkInDateEdit.GetValue()), + checkout: getFormattedDate(checkOutDateEdit.GetValue()), + rooms: roomsNumberSpinEdit.GetValue() || 1, + adults: adultsNumberSpinEdit.GetValue() || 1, + children: childrenNumberSpinEdit.GetValue() || 0 + }); + } + }; + + export function onSearchComboBoxIndexChanged(s: ASPxClientComboBox, e: ASPxClientProcessingModeEventArgs): void { + hideMenu(); + searchButton.AdjustControl(); + }; + + export function onIndexOfferCloseClick(index: number): void { + var panel = ASPxClientControl.GetControlCollection().GetByName("OfferDockPanel" + index); + var sibPanel = ASPxClientControl.GetControlCollection().GetByName("OfferDockPanel" + (index == 1 ? 2 : 1)); + panel.Hide(); + sibPanel.MakeFloat(); + sibPanel.SetWidth(offersZone.GetWidth()); + sibPanel.Dock(offersZone); + }; + + export function onLogoClick(): void { + showPage("", null, false); + }; + + export function onMenuNavButtonCheckedChanged(s: ASPxClientCheckBox, e: ASPxClientProcessingModeEventArgs): void { + var mainContainer = mainCallbackPanel.GetMainElement(); + if (s.GetChecked()) { + backSlider.Pause(); + showMenu(); + } + else { + hideMenu(); + backSlider.Play(); + } + }; + + export function onBackNavButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + var params = getCurrentQueryParams(); + switch (getCurrentPage()) { + case "PrintInvoice": + showPage("Booking", params, false); + break; + case "Booking": + if (bookingPageControl.GetActiveTabIndex() > 0) + bookingPageControl.SetActiveTabIndex(bookingPageControl.GetActiveTabIndex() - 1); + else + showPage("ShowRooms", params, false); + break; + case "ShowRooms": + showPage("ShowHotels", params, false); + break; + case "ShowDetails": + showPage("ShowHotels", params, false); + break; + case "ShowHotels": + case "SpecialOffers": + showPage("", null, false); + break; + } + }; + + export function updateSearchResults(): void { + var params = getCurrentQueryParams(); + params["location"] = locationComboBox.GetValue(); + params["minprice"] = nightyRateTrackBar.GetPositionStart(); + params["maxprice"] = nightyRateTrackBar.GetPositionEnd(); + params["custrating"] = customerRatingTrackBar.GetPosition(); + params["ourrating"] = ourRatingCheckBoxList.GetSelectedValues().join(","); + showPage("ShowHotels", params); + }; + + export function onBookHotelButtonClick(hotelID: string): void { + var queryParams = getCurrentQueryParams(); + queryParams["hotelID"] = hotelID; + showPage("ShowRooms", queryParams); + }; + + export function onDetailsHotelButtonClick(hotelID: string): void { + var queryParams = getCurrentQueryParams(); + queryParams["hotelID"] = hotelID; + showPage("ShowDetails", queryParams); + }; + + export function onShowStartFilterButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + startFilterPopupControl.ShowAtElementByID("MainCallbackPanel_ContentPane"); + }; + + export function onChangeStartFilterButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + if (ASPxClientEdit.ValidateGroup("DateEditors")) { + var params = getCurrentQueryParams(); + params["checkin"] = getFormattedDate(checkInDateEdit.GetValue()); + params["checkout"] = getFormattedDate(checkOutDateEdit.GetValue()); + params["rooms"] = roomsNumberSpinEdit.GetValue() || 1; + params["adults"] = adultsNumberSpinEdit.GetValue() || 1; + params["children"] = childrenNumberSpinEdit.GetValue() || 0; + startFilterPopupControl.Hide(); + showPage(hiddenField.Get("page").toString(), params); + } + }; + + export function onBookRoomButtonClick(roomID: string): void { + var params = getCurrentQueryParams(); + params["roomID"] = roomID; + showPage("Booking", params); + }; + + export function onShowRoomsButtonClick(): void { + var queryParams = getCurrentQueryParams(); + showPage("ShowRooms", queryParams); + }; + + export function onShowDetailsButtonClick(): void { + var queryParams = getCurrentQueryParams(); + showPage("ShowDetails", queryParams); + }; + + export function onRoomImageNavItemClick(roomID: string, pictureName: string): void { + setTimeout(function () { + imagePopupControl.PerformCallback(roomID + "|" + pictureName); + imagePopupControl.ShowAtElementByID("MainCallbackPanel_ContentPane"); + }, 500); + }; + + export function onRoomsNavBarExpandedChanged(s: ASPxClientNavBar, e: ASPxClientNavBarGroupEventArgs): void { + ASPxClientControl.AdjustControls(s.GetMainElement()); + }; + + export function onNextBookingStepButtonClick(step: number): void { + var valid = true; + var validationGroup = ""; + if (step == 1) + validationGroup = "Account"; + if (step == 2) + validationGroup = "RoomDetails"; + if (step == 3) + validationGroup = "PaymentDetails"; + + switch (step) { + case 1: + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "Account"); + if (valid) { + emailTextBox.SetValue(accountEmailTextBox.GetValue()); + creditCardEmailTextBox.SetValue(accountEmailTextBox.GetValue()); + showPage("Booking", getCurrentQueryParams()); + return; + } + break; + case 2: + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "RoomDetails"); + emailTextBox.SetValue(accountEmailTextBox.GetValue()); + break; + case 3: + var paymentType = paymentTypePageControl.GetActiveTabIndex(); + if (paymentType == 0) + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "CreditCard"); + else if (paymentType == 1) + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "Cash"); + else if (paymentType == 2) + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "PayPal"); + break; + } + if (valid) { + bookingPageControl.GetTab(step).SetEnabled(true); + bookingPageControl.SetActiveTabIndex(step); + } + }; + + export function onAccountCaptchaHiddenFieldInit(s: ASPxClientHiddenField, e: ASPxClientEventArgs): void { + if (s.Get("IsCaptchaValid")) { + bookingPageControl.GetTab(1).SetEnabled(true); + bookingPageControl.SetActiveTabIndex(1); + } + }; + + export function onFinishBookingStepButtonClick(): void { + showAboutWindow(); + }; + + export function OnPrintInvoiceButtonClick(): void { + showPage("PrintInvoice", getCurrentQueryParams()); + }; + + export function onOfferClick(offerID: string): void { + offerFormPopup.SetContentHtml(""); + offerFormPopup.PerformCallback(offerID); + var panel = ASPxClientControl.GetControlCollection().GetByName("DockPanel" + offerID); + var panelElement = panel.GetMainElement(); + if (panelElement.offsetWidth < 330 || panelElement.offsetHeight < 250) { + offerFormPopup.SetWidth(400); + offerFormPopup.SetHeight(280); + offerFormPopup.ShowAtElementByID("SpecialOffersContainer"); + } + else { + offerFormPopup.SetWidth(panelElement.offsetWidth); + offerFormPopup.SetHeight(panelElement.offsetHeight); + offerFormPopup.ShowAtElement(panelElement); + } + }; + + export function onSpecialOfferCheckButtonClick(hotelID: string, locationID: string): void { + if (ASPxClientEdit.ValidateGroup("DateEditors")) { + var queryParams: { [key: string]: any } = { + location: locationID, + hotelID: hotelID, + checkin: getFormattedDate(checkInDateEdit.GetValue()), + checkout: getFormattedDate(checkOutDateEdit.GetValue()), + rooms: roomsSpinEdit.GetValue() || 1, + adults: adultsSpinEdit.GetValue() || 1, + children: childrenSpinEdit.GetValue() || 0 + }; + showPage("ShowRooms", queryParams); + } + }; + + export function onIndexOfferClick(): void { + showPage("SpecialOffers", {}); + }; + + export function onControlsInit(): void { + ASPxClientUtils.AttachEventToElement(window, 'popstate', onHistoryPopState); + var pathParts = document.location.href.split("/"); + var url = pathParts[pathParts.length - 1]; + try { + if (window.history) + window.history.replaceState(url, ""); + } catch (e) { } + ASPxClientUtils.AttachEventToElement(window, "resize", onWindowResize); + if (ASPxClientUtils.iOSPlatform) { + // animate + } + }; + + export function updateRatingLabels(ratingControl: ASPxClientTrackBar) { + var start = ratingControl.GetPositionStart().toString(); + var end = ratingControl.GetPositionEnd().toString(); + document.getElementById("cpLeftLabelID").innerHTML = start + " " + end; + }; + + export function onRatingControlItemClick(s: ASPxClientRatingControl, e: ASPxClientRatingControlItemClickEventArgs): void { + hotelDetailsCallbackPanel.PerformCallback(s.GetValue().toString()); + }; + + export function onInputKeyDown(s: ASPxClientTextBox, e: ASPxClientEditKeyEventArgs): void { + var keyCode = ASPxClientUtils.GetKeyCode(e.htmlEvent); + if (keyCode == 13) + (s.GetInputElement()).blur(); + }; + + function getCurrentPage(): string { + var hfPage = hiddenField.Get("page"); + if (hfPage) + return hfPage; + var pathParts = document.location.pathname.split("/"); + return pathParts[pathParts.length - 1]; + }; + + function showAboutWindow(): void { + aboutWindow.ShowAtElementByID("MainCallbackPanel_ContentPane"); + }; + + function hideMenu(): void { + leftPanel.Collapse(); + if (menuButton.GetMainElement() && menuButton.GetChecked()) + menuButton.SetChecked(false); + }; + + function showMenu(): void { + leftPanel.Expand(); + }; + + var _resizeSpecialOffersTimeoutID = -1; + function onWindowResize(): void { + switch (hiddenField.Get("page")) { + case "SpecialOffers": + if (_resizeSpecialOffersTimeoutID == -1) + _resizeSpecialOffersTimeoutID = setTimeout(resizeSpecialOffers, 200); + break; + } + hidePopups("AboutWindow", "StartFilterPopupControl", "LoginPopup", "OfferFormPopup", "ImagePopupControl"); + }; + + function hidePopups(...names: string[]): void { + for (var i = 0; i < names.length; i++) { + var popupControl = ASPxClientControl.GetControlCollection().GetByName(names[i]); + popupControl.Hide(); + } + }; + + function resizeSpecialOffers(): void { + for (var i = 1; i <= 4; i++) { + var panel = ASPxClientControl.GetControlCollection().GetByName("DockPanel" + i); + if (panel && panel.IsVisible()) { + var zone = panel.GetOwnerZone(); + zone.SetWidth(((zone.GetMainElement()).parentNode).offsetWidth) + } + } + _resizeSpecialOffersTimeoutID = -1; + }; + + function getFormattedDate(date: Date): string { + return (date.getMonth() + 1) + "-" + date.getDate() + "-" + date.getFullYear(); + }; + + function getCurrentQueryParams(): { [key:string]: any } { + var hfParams = hiddenField.Get("parameters"); + if (hfParams) + return getParamsByQueryString(hfParams); + var query = document.location.search; + if (query[0] === "?") + query = query.substr(1); + return getParamsByQueryString(query); + }; + + function getQueryString(params: { [key:string]: any }): string { + var queryItems: any[] = []; + for (var key in params) { + if (!params.hasOwnProperty(key)) continue; + queryItems.push(key + "=" + params[key]); + } + if (queryItems.length > 0) + return queryItems.join("&"); + return ""; + }; + + function getParamsByQueryString(queryString: string): { [key: string]: string } { + var result: { [key: string]: any } = {}; + if (queryString) { + var queryStringArray = queryString.split("&"); + for (var i = 0; i < queryStringArray.length; i++) { + var part = queryStringArray[i].split('='); + if (part.length != 2) continue; + result[part[0]] = decodeURIComponent(part[1].replace(/\+/g, " ")); + } + } + return result; + }; + + function onHistoryPopState(evt: any): void { + if (evt.state !== null && evt.state !== undefined) { + var uriParts = evt.state.split("?"); + showPage(uriParts[0], getParamsByQueryString(uriParts[1]), true); + } + }; +} \ No newline at end of file diff --git a/types/devexpress-web/v162/index.d.ts b/types/devexpress-web/v162/index.d.ts new file mode 100644 index 0000000000..e345c2e13b --- /dev/null +++ b/types/devexpress-web/v162/index.d.ts @@ -0,0 +1,28655 @@ +// Type definitions for DevExpress ASP.NET v162.8 +// Project: http://devexpress.com/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * A client-side counterpart of the DashboardViewer extension. + */ +interface MVCxClientDashboardViewer extends ASPxClientDashboardViewer { +} +/** + * Represents a list of records from the dashboard data source. + */ +interface ASPxClientDashboardItemUnderlyingData { + /** + * Gets the number of rows in the underlying data set. + */ + GetRowCount(): number; + /** + * Returns the value of the specified cell within the underlying data set. + * @param rowIndex An integer value that specifies the zero-based index of the required row. + * @param dataMember A String that specifies the required data member. + */ + GetRowValue(rowIndex: number, dataMember: string): Object; + /** + * Returns an array of data members available in a data source. + */ + GetDataMembers(): string[]; + /** + * Returns whether or not a request for underlying data was successful. + */ + IsDataReceived(): boolean; + /** + * Returns a callstack containing the error caused by an unsuccessful request for underlying data. + */ + GetRequestDataError(): string; +} +/** + * Contains parameters used to obtain the underlying data for the dashboard item. + */ +interface ASPxClientDashboardItemRequestUnderlyingDataParameters { + /** + * Gets or sets an array of data member identifiers used to obtain underlying data. + * Value: An array of String objects that specify data member identifiers. + */ + DataMembers: string[]; + /** + * Gets or sets axis points used to obtain the underlying data. + * Value: An array of ASPxClientDashboardItemDataAxisPoint objects that represent axis points. + */ + AxisPoints: ASPxClientDashboardItemDataAxisPoint[]; + /** + * Gets or sets the dimension value used to obtain the underlying data. + * Value: The dimension value. + */ + ValuesByAxisName: Object; + /** + * Gets or sets the unique dimension value used to obtain the underlying data. + * Value: The unique dimension value. + */ + UniqueValuesByAxisName: Object; +} +/** + * References a method executed after an asynchronous request is complete. + */ +interface ASPxClientDashboardItemRequestUnderlyingDataCompleted { + /** + * References a method executed after an asynchronous request is completed. + * @param data An ASPxClientDashboardItemUnderlyingData object that represents a list of records from the dashboard data source. + */ + (data: ASPxClientDashboardItemUnderlyingData): void; +} +/** + * References a method that will handle the ItemClick events. + */ +interface ASPxClientDashboardItemClickEventHandler { + /** + * References a method that will handle the ItemClick events. + * @param source The event source. + * @param e A ASPxClientDashboardItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemClickEventArgs): void; +} +/** + * Provides data for the ItemClick events. + */ +interface ASPxClientDashboardItemClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item for which the event has been raised. + * Value: A String that is the dashboard item name. + */ + ItemName: string; + /** + * Gets the dashboard item's client data. + */ + GetData(): ASPxClientDashboardItemData; + /** + * Returns the axis point corresponding to the clicked visual element. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetAxisPoint(axisName: string): ASPxClientDashboardItemDataAxisPoint; + /** + * Gets measures corresponding to the clicked visual element. + */ + GetMeasures(): ASPxClientDashboardItemDataMeasure[]; + /** + * Gets deltas corresponding to the clicked visual element. + */ + GetDeltas(): ASPxClientDashboardItemDataDelta[]; + /** + * Gets the dimensions used to create a hierarchy of axis points for the specified axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetDimensions(axisName: string): ASPxClientDashboardItemDataDimension[]; + /** + * Requests underlying data corresponding to the clicked visual element. + * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. + * @param dataMembers An array of String values that specify data members used to obtain underlying data. + */ + RequestUnderlyingData(onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted, dataMembers: string[]): void; +} +/** + * References a method that will handle the ItemVisualInteractivity events. + */ +interface ASPxClientDashboardItemVisualInteractivityEventHandler { + /** + * References a method that will handle the ItemVisualInteractivity events. + * @param source The event source. + * @param e A ASPxClientDashboardItemVisualInteractivityEventArgs object containing event data. + */ + (source: S, e: ASPxClientDashboardItemVisualInteractivityEventArgs): void; +} +/** + * Provides data for the ItemVisualInteractivity events. + */ +interface ASPxClientDashboardItemVisualInteractivityEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A String that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Gets the selection mode for dashboard item elements. + */ + GetSelectionMode(): string; + /** + * Sets the selection mode for dashboard item elements. + * @param selectionMode A String that specifies the selection mode. + */ + SetSelectionMode(selectionMode: string): void; + /** + * Returns whether or not highlighting is enabled for the current dashboard item. + */ + IsHighlightingEnabled(): boolean; + /** + * Enables highlighting for the current dashboard item. + * @param enableHighlighting true, to enable highlighting; otherwise, false. + */ + EnableHighlighting(enableHighlighting: boolean): void; + /** + * Gets data axes used to perform custom interactivity actions. + */ + GetTargetAxes(): string[]; + /** + * Sets data axes used to perform custom interactivity actions. + * @param targetAxes An array of String objects that specify names of data axes. + */ + SetTargetAxes(targetAxes: string[]): void; + /** + * Gets the default selection for the current dashboard item. + */ + GetDefaultSelection(): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Sets the default selection for the current dashboard item. + * @param values An array of ASPxClientDashboardItemDataAxisPointTuple objects specifying axis point tuples used to select default elements. + */ + SetDefaultSelection(values: ASPxClientDashboardItemDataAxisPointTuple[]): void; +} +/** + * References a method that will handle the ItemSelectionChanged events. + */ +interface ASPxClientDashboardItemSelectionChangedEventHandler { + /** + * References a method that will handle the ItemSelectionChanged events. + * @param source The event source. + * @param e A ASPxClientDashboardItemSelectionChangedEventArgs object containing event data. + */ + (source: S, e: ASPxClientDashboardItemSelectionChangedEventArgs): void; +} +/** + * Provides data for the ItemSelectionChanged events. + */ +interface ASPxClientDashboardItemSelectionChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A String that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Gets currently selected elements. + */ + GetCurrentSelection(): ASPxClientDashboardItemDataAxisPointTuple[]; +} +/** + * References a method that will handle the ItemElementCustomColor event. + */ +interface ASPxClientDashboardItemElementCustomColorEventHandler { + /** + * References a method that will handle the ItemElementCustomColor events. + * @param source The event source. + * @param e An ASPxClientDashboardItemElementCustomColorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemElementCustomColorEventArgs): void; +} +/** + * Provides data for the ItemElementCustomColor events. + */ +interface ASPxClientDashboardItemElementCustomColorEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A String that is the component name of the dashboard item for which the event was raised. + */ + ItemName: string; + /** + * Gets the axis point tuple that corresponds to the current dashboard item element. + */ + GetTargetElement(): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Gets the color of the current dashboard item element. + */ + GetColor(): string; + /** + * Sets the color of the current dashboard item element. + * @param color A String that specifies the color of the current dashboard item element. + */ + SetColor(color: string): void; + /** + * Gets measures corresponding to the current dashboard item element. + */ + GetMeasures(): ASPxClientDashboardItemDataMeasure[]; +} +/** + * References a method that will handle the ItemWidgetCreated events. + */ +interface ASPxClientDashboardItemWidgetCreatedEventHandler { + /** + * References a method that will handle the ItemWidgetCreated events. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * References a method that will handle the ItemWidgetUpdating event. + */ +interface ASPxClientDashboardItemWidgetUpdatingEventHandler { + /** + * References a method that will handle the ItemWidgetUpdating event. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * References a method that will handle the ItemWidgetUpdated event. + */ +interface ASPxClientDashboardItemWidgetUpdatedEventHandler { + /** + * References a method that will handle the ItemWidgetUpdated event. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * References a method that will handle the ItemBeforeWidgetDisposed events. + */ +interface ASPxClientDashboardItemBeforeWidgetDisposedEventHandler { + /** + * References a method that will handle the ItemBeforeWidgetDisposed events. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * Provides data for events related to client widgets used to visualize data in dashboard items. + */ +interface ASPxClientDashboardItemWidgetEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A String that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Returns an underlying widget corresponding to the current dashboard item. + */ + GetWidget(): Object; +} +/** + * Represents multidimensional data visualized in the dashboard item. + */ +interface ASPxClientDashboardItemData { + /** + * Gets the names of the axes that constitute the current ASPxClientDashboardItemData. + */ + GetAxisNames(): string[]; + /** + * Returns the specified data axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetAxis(axisName: string): ASPxClientDashboardItemDataAxis; + /** + * Gets the dimensions used to create a hierarchy of axis points for the specified axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetDimensions(axisName: string): ASPxClientDashboardItemDataDimension[]; + /** + * Gets the measures for the current ASPxClientDashboardItemData object. + */ + GetMeasures(): ASPxClientDashboardItemDataMeasure[]; + /** + * Gets the deltas for the current ASPxClientDashboardItemData object. + */ + GetDeltas(): ASPxClientDashboardItemDataDelta[]; + /** + * Gets the slice of the current ASPxClientDashboardItemData object by the specified axis point tuple. + * @param tuple A ASPxClientDashboardItemDataAxisPointTuple object that is a tuple of axis points. + */ + GetSlice(tuple: ASPxClientDashboardItemDataAxisPointTuple): ASPxClientDashboardItemData; + /** + * Gets the slice of the current ASPxClientDashboardItemData object by the specified axis point. + * @param axisPoint An ASPxClientDashboardItemDataAxisPoint object that is the data point in a multidimensional space. + */ + GetSlice(axisPoint: ASPxClientDashboardItemDataAxisPoint): ASPxClientDashboardItemData; + /** + * Returns a total summary value for the specified measure. + * @param measureId A String that is the measure identifier. + */ + GetMeasureValue(measureId: string): ASPxClientDashboardItemDataMeasureValue; + /** + * Gets the summary value for the specified delta. + * @param deltaId A String that is the data item identifier. + */ + GetDeltaValue(deltaId: string): ASPxClientDashboardItemDataDeltaValue; + /** + * Returns an array of data members available in a data source. + */ + GetDataMembers(): string[]; + /** + * Creates a tuple based on the specified axes names and corresponding values. + * @param values An array of name-value pairs containing the axis name and corresponding values. + */ + CreateTuple(values: Object[]): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Creates a tuple based on the specified axis points. + * @param axisPoints An array of ASPxClientDashboardItemDataAxisPoint objects that specify axis points belonging to different data axes. + */ + CreateTuple(axisPoints: ASPxClientDashboardItemDataAxisPoint[]): ASPxClientDashboardItemDataAxisPointTuple; +} +/** + * An axis that contains data points corresponding to the specified value hierarchy. + */ +interface ASPxClientDashboardItemDataAxis { + /** + * Gets the dimensions used to create a hierarchy of axis points belonging to the current axis. + */ + GetDimensions(): ASPxClientDashboardItemDataDimension[]; + /** + * Gets the root axis point belonging to the current ASPxClientDashboardItemDataAxis. + */ + GetRootPoint(): ASPxClientDashboardItemDataAxisPoint; + /** + * Returns axis points corresponding to values of the last-level dimension. + */ + GetPoints(): ASPxClientDashboardItemDataAxisPoint[]; + /** + * Returns axis points corresponding to the specified dimension. + * @param dimensionId A String that is the dimension identifier. + */ + GetPointsByDimension(dimensionId: string): ASPxClientDashboardItemDataAxisPoint[]; + /** + * Returns the data point for the specified axis by unique values. + * @param uniqueValues A hierarchy of unique values identifying the required data point. + */ + GetPointByUniqueValues(uniqueValues: Object[]): ASPxClientDashboardItemDataAxisPoint; +} +/** + * Contains the dimension metadata. + */ +interface ASPxClientDashboardItemDataDimension { + /** + * Gets the dimension identifier. + * Value: A String that is the dimension identifier. + */ + Id: string; + /** + * Gets or sets the name of the dimension. + * Value: A String that is the name of the dimension. + */ + Name: string; + /** + * Gets the data member identifier for the current dimension. + * Value: A String value that identifies a data member. + */ + DataMember: string; + /** + * Gets the group interval for date-time values for the current dimension. + * Value: A String value that represents how date-time values are grouped. + */ + DateTimeGroupInterval: string; + /** + * Gets the group interval for string values. + * Value: A String value that specifies the group interval for string values. + */ + TextGroupInterval: string; + /** + * Formats the specified value using format settings of the current dimension. + * @param value A value to be formatted. + */ + Format(value: Object): string; +} +/** + * Contains the measure metadata. + */ +interface ASPxClientDashboardItemDataMeasure { + /** + * Gets the measure identifier. + * Value: A String that is the measure identifier. + */ + Id: string; + /** + * Gets the name of the measure. + * Value: A String that is the name of the measure. + */ + Name: string; + /** + * Gets the data member that identifies the data source list used to provide data for the current measure. + * Value: A String value that identifies the data source list used to provide data for the current measure. + */ + DataMember: string; + /** + * Gets the type of summary function calculated against the current measure. + * Value: A String value that identifies the type of summary function calculated against the current measure. + */ + SummaryType: string; + /** + * Formats the specified value using format settings of the current measure. + * @param value A value to be formatted. + */ + Format(value: Object): string; +} +/** + * Contains the delta metadata. + */ +interface ASPxClientDashboardItemDataDelta { + /** + * Gets the data item identifier. + * Value: A String that is the data item identifier. + */ + Id: string; + /** + * Gets the name of the data item container. + * Value: A String value that is the name of the data item container. + */ + Name: string; + /** + * Gets the identifier for the measure that provides actual values. + * Value: A String value that is the measure identifier. + */ + ActualMeasureId: string; + /** + * Gets the identifier for the measure that provides target values. + * Value: A String value that is the measure identifier. + */ + TargetMeasureId: string; +} +/** + * Provides dimension values at the specified axis point. + */ +interface ASPxClientDashboardItemDataDimensionValue { + /** + * Gets the current dimension value. + */ + GetValue(): Object; + /** + * Gets the unique value for the current dimension value. + */ + GetUniqueValue(): Object; + /** + * Gets the display text for the current dimension value. + */ + GetDisplayText(): string; +} +/** + * Provides the measure value and display text. + */ +interface ASPxClientDashboardItemDataMeasureValue { + /** + * Gets the measure value. + */ + GetValue(): Object; + /** + * Gets the measure display text. + */ + GetDisplayText(): string; +} +/** + * Provides delta element values. + */ +interface ASPxClientDashboardItemDataDeltaValue { + /** + * Provides access to the actual value displayed within the delta element. + */ + GetActualValue(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the target value. + */ + GetTargetValue(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the absolute difference between the actual and target values. + */ + GetAbsoluteVariation(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the percent of variation between the actual and target values. + */ + GetPercentVariation(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the percentage of the actual value in the target value. + */ + GetPercentOfTarget(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the main delta value. + */ + GetDisplayValue(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the first additional delta value. + */ + GetDisplaySubValue1(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the second additional delta value. + */ + GetDisplaySubValue2(): ASPxClientDashboardItemDataMeasureValue; + /** + * Gets the value specifying the condition for displaying the delta indication. + */ + GetIsGood(): ASPxClientDashboardItemDataMeasureValue; + /** + * Gets the type of delta indicator. + */ + GetIndicatorType(): ASPxClientDashboardItemDataMeasureValue; +} +/** + * A point on the data axis. + */ +interface ASPxClientDashboardItemDataAxisPoint { + /** + * Gets the name of the axis to which the current axis point belongs. + */ + GetAxisName(): string; + /** + * Gets the last level dimension corresponding to the current axis point. + */ + GetDimension(): ASPxClientDashboardItemDataDimension; + /** + * Gets the collection of dimensions used to create a hierarchy of axis points from the root point to the current axis point. + */ + GetDimensions(): ASPxClientDashboardItemDataDimension[]; + /** + * Gets the value corresponding to the current axis point. + */ + GetValue(): Object; + /** + * Gets the display text corresponding to the current axis point. + */ + GetDisplayText(): string; + /** + * Gets the unique value corresponding to the current axis point. + */ + GetUniqueValue(): Object; + /** + * Gets the dimension values at the specified axis point. + */ + GetDimensionValue(): ASPxClientDashboardItemDataDimensionValue; + /** + * Gets the dimension value at the current axis point. + * @param dimensionId A String value that specifies the dimension identifier. + */ + GetDimensionValue(dimensionId: string): ASPxClientDashboardItemDataDimensionValue; + /** + * Gets the child axis points for the current axis point. + */ + GetChildren(): ASPxClientDashboardItemDataAxisPoint[]; + /** + * Gets the parent axis point for the current axis point. + */ + GetParent(): ASPxClientDashboardItemDataAxisPoint; +} +/** + * Represents a tuple of axis points. + */ +interface ASPxClientDashboardItemDataAxisPointTuple { + /** + * Returns the axis point belonging to the default data axis. + */ + GetAxisPoint(): ASPxClientDashboardItemDataAxisPoint; + /** + * Returns the axis point belonging to the specified data axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetAxisPoint(axisName: string): ASPxClientDashboardItemDataAxisPoint; +} +/** + * A range in the Range Filter dashboard item. + */ +interface ASPxClientDashboardRangeFilterSelection { + /** + * Gets or sets a maximum value in the range of the Range Filter dashboard item. + * Value: A maximum value in the range of the Range Filter dashboard item. + */ + Maximum: Object; + /** + * Gets or sets a minimum value in the range of the Range Filter dashboard item. + * Value: A minimum value in the range of the Range Filter dashboard item. + */ + Minimum: Object; +} +/** + * A collection of ASPxClientDashboardParameter objects. + */ +interface ASPxClientDashboardParameters { + /** + * Returns an array of dashboard parameters from the ASPxClientDashboardParameters collection. + */ + GetParameterList(): ASPxClientDashboardParameter[]; + /** + * Returns a dashboard parameter by its name. + * @param name A String object that specifies the parameter name. + */ + GetParameterByName(name: string): ASPxClientDashboardParameter; + /** + * Returns a dashboard parameter by its index in the ASPxClientDashboardParameters collection. + * @param index An integer value that specifies the parameter index. + */ + GetParameterByIndex(index: number): ASPxClientDashboardParameter; +} +/** + * A client-side dashboard parameter. + */ +interface ASPxClientDashboardParameter { + /** + * Gets the dashboard parameter name on the client side. + * Value: A String that is the dashboard parameter name on the client side. + */ + Name: string; + /** + * Gets the dashboard parameter value on the client side. + * Value: A String that specifies the dashboard parameter value on the client side. + */ + Value: Object; + /** + * Returns a parameter name. + */ + GetName(): string; + /** + * Returns a current parameter value(s). + */ + GetValue(): Object; + /** + * Specifies the current parameter value(s). + * @param value The current parameter value(s). + */ + SetValue(value: Object): void; + /** + * Returns a default parameter value. + */ + GetDefaultValue(): Object; + /** + * Returns the parameter's description displayed to an end-user. + */ + GetDescription(): string; + /** + * Returns a parameter type. + */ + GetType(): string; + /** + * Returns possible parameter values. + */ + GetValues(): ASPxClientDashboardParameterValue[]; +} +/** + * Provides access to the parameter value and display text. + */ +interface ASPxClientDashboardParameterValue { + /** + * Returns the parameter display text. + */ + GetDisplayText(): string; + /** + * Returns a parameter value. + */ + GetValue(): Object; +} +/** + * Contains settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. + */ +interface ImageFormatOptions { + /** + * Gets or sets an image format in which the dashboard (dashboard item) is exported. + * Value: A value returned by the DashboardExportImageFormat class that specifies an image format in which the dashboard (dashboard item) is exported. + */ + Format: string; + /** + * Gets or sets the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. + * Value: An integer value that specifies the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. + */ + Resolution: number; +} +/** + * Contains options which define how the dashboard item is exported to Excel format. + */ +interface ExcelFormatOptions { + /** + * Gets or sets the Excel format in which the dashboard item is exported. + * Value: A value returned by the DashboardExportExcelFormat class that specifies the Excel format in which the dashboard item is exported. + */ + Format: string; + /** + * Gets or sets a character used to separate values in a CSV document. + * Value: A String value that specifies the character used to separate values in a CSV document. + */ + CsvValueSeparator: string; +} +/** + * Contains settings that specify parameters affecting how the Grid dashboard item is exported. + */ +interface GridExportOptions { + /** + * Gets or sets whether the size of the Grid dashboard item is changed according to the width of the exported page. + * Value: true, to change the size of the Grid dashboard item according to the width of the exported page; otherwise, false. + */ + FitToPageWidth: boolean; + /** + * Gets or sets whether to print column headers of the Grid dashboard item on every page. + * Value: true, to print column headers on every page; otherwise, false. + */ + PrintHeadersOnEveryPage: boolean; +} +/** + * Contains settings that specify parameters affecting how the Pivot dashboard item is exported. + */ +interface PivotExportOptions { + /** + * Gets or sets whether to print the column headers of the Pivot dashboard item on every page. + * Value: true, to print column headers on every page; otherwise, false. + */ + PrintHeadersOnEveryPage: boolean; +} +/** + * Contains settings that specify parameters affecting how the Pie dashboard item is exported. + */ +interface PieExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Gauge dashboard item is exported. + */ +interface GaugeExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Card dashboard item is exported. + */ +interface CardExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Range Filter dashboard item is exported. + */ +interface RangeFilterExportOptions { + /** + * Gets or sets whether the page orientation used to export a Range Filter dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a Range Filter dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Range Filter dashboard item. + * Value: A value returned by the RangeFilterExportSizeMode class that specifies the export size mode for the Range Filter dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how Chart dashboard items are exported. + */ +interface ChartExportOptions { + /** + * Gets or sets whether the page orientation used to export a Chart dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a Chart dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Chart dashboard item. + * Value: A value returned by the ChartExportSizeMode class that specifies the export size mode for the Chart dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how Map dashboard items are exported. + */ +interface MapExportOptions { + /** + * Gets or sets whether the page orientation used to export a map dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a map dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the map dashboard item. + * Value: A value returned by the MapExportSizeMode class that specifies specifies the export size mode for the map dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how the dashboard (dashboard item) is exported. + */ +interface ASPxClientDashboardExportOptions { + /** + * Gets or sets the standard paper size. + * Value: A string value returned by the DashboardExportPaperKind class that specifies the standard paper size. + */ + PaperKind: string; + /** + * Gets or sets the page orientation used to export a dashboard (dashboard item). + * Value: A string value returned by the DashboardExportPageLayout class that specifies the page orientation used to export a dashboard (dashboard item). + */ + PageLayout: string; + /** + * Gets or sets the mode for scaling when exporting a dashboard (dashboard item). + * Value: A string value returned by the DashboardExportScaleMode class that specifies the mode for scaling when exporting a dashboard (dashboard item). + */ + ScaleMode: string; + /** + * Gets or sets the scale factor (in fractions of 1) by which a dashboard (dashboard item) is scaled. + * Value: A Single value that specifies the scale factor by which a dashboard (dashboard item) is scaled. + */ + ScaleFactor: number; + /** + * Gets or sets the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). + * Value: An integer value that specifies the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). + */ + AutoFitPageCount: number; + /** + * Gets or sets the title of the exported document. + * Value: A String value that specifies the title of the exported document. + */ + Title: string; + /** + * Gets or sets whether a dashboard title (or dashboard item's caption) is included as the exported document title. + * Value: A DefaultBoolean value that specifies whether a dashboard title (or dashboard item's caption) is included as the exported document title. + */ + ShowTitle: boolean; + /** + * Gets or sets the filter state's location on the exported document. + * Value: A string value returned by the DashboardExportFilterState class that specifies the filter state's location on the exported document. + */ + FilterState: string; + /** + * Provides access to options for exporting a dashboard or individual items in Image format. + * Value: An ImageFormatOptions object containing settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. + */ + ImageOptions: ImageFormatOptions; + /** + * Provides access to options for exporting individual dashboard items in Excel format. + * Value: An ExcelFormatOptions object containing settings that specify parameters affecting how the dashboard item is exported in Excel format. + */ + ExcelOptions: ExcelFormatOptions; + /** + * Provides access to options for exporting a Grid dashboard item. + * Value: A GridExportOptions object containing settings that specify parameters that affect how Grid dashboard items are exported. + */ + GridOptions: GridExportOptions; + /** + * Provides access to options for exporting a Pivot dashboard item. + * Value: A PivotExportOptions object containing settings that specify parameters that affect how Pivot dashboard items are exported. + */ + PivotOptions: PivotExportOptions; + /** + * Provides access to options for exporting a Pie dashboard item. + * Value: A PieExportOptions object containing settings that specify parameters that affect how Pie dashboard items are exported. + */ + PieOptions: PieExportOptions; + /** + * Provides access to options for exporting a Gauge dashboard item. + * Value: A GaugeExportOptions object containing settings that specify parameters that affect how Gauge dashboard items are exported. + */ + GaugeOptions: GaugeExportOptions; + /** + * Provides access to options for exporting a Card dashboard item. + * Value: A CardExportOptions object containing settings that specify parameters that affect how Card dashboard items are exported. + */ + CardOptions: CardExportOptions; + /** + * Provides access to options for exporting a Range Filter dashboard item. + * Value: A RangeFilterExportOptions object containing settings that specify parameters affecting how the Range Filter dashboard item is exported. + */ + RangeFilterOptions: RangeFilterExportOptions; + /** + * Provides access to options for exporting a Chart dashboard item. + * Value: A ChartExportOptions object containing settings that specify parameters that affect how Chart dashboard items are exported. + */ + ChartOptions: ChartExportOptions; + /** + * Provides access to options for exporting map dashboard items. + * Value: A MapExportOptions object containing settings that specify parameters that affect how map dashboard items are exported. + */ + MapOptions: MapExportOptions; +} +/** + * A client-side equivalent of the ASPxDashboard control. + */ +interface ASPxClientDashboard extends ASPxClientControl { + /** + * Fires when a round trip to the server has been initiated by a call to the client PerformDataCallback method. + */ + CustomDataCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after the state of the dashboard displayed in the ASPxClientDashboard is changed. + */ + DashboardStateChanged: ASPxClientEvent>; + /** + * Occurs after a new dashboard is displayed in the ASPxClientDashboard. + */ + DashboardChanged: ASPxClientEvent>; + /** + * For internal use. + */ + CustomizeMenuItems: ASPxClientEvent>; + /** + * For internal use. + */ + BeforeRender: ASPxClientEvent>; + /** + * Occurs when an end-user clicks a dashboard item. + */ + ItemClick: ASPxClientEvent>; + /** + * Allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting + */ + ItemVisualInteractivity: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetCreated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdating: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemBeforeWidgetDisposed: ASPxClientEvent>; + /** + * Occurs after the selection within the dashboard item is changed. + */ + ItemSelectionChanged: ASPxClientEvent>; + /** + * Allows you to color the required dashboard item elements using the specified colors. + */ + ItemElementCustomColor: ASPxClientEvent>; + /** + * Occurs when a master filter state is changed. + */ + ItemMasterFilterStateChanged: ASPxClientEvent>; + /** + * Occurs when a drill-down/drill-up is performed. + */ + ItemDrillDownStateChanged: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientDataCallback object that represents the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; + /** + * Switches the ASPxClientDashboard to the viewer mode. + */ + SwitchToViewer(): void; + /** + * Switches the ASPxClientDashboard to the designer mode. + */ + SwitchToDesigner(): void; + /** + * Gets the current working mode of the Web Dashboard. + */ + GetWorkingMode(): string; + /** + * Gets the identifier of the dashboard that is displayed in the ASPxClientDashboard. + */ + GetDashboardId(): string; + /** + * Gets the name of the dashboard that is displayed in the ASPxClientDashboard. + */ + GetDashboardName(): string; + /** + * Gets the state of the dashboard displayed in the ASPxClientDashboard. + */ + GetDashboardState(): string; + /** + * Loads a dashboard with the specified identifier. + * @param dashboardId A String value that specifies the dashboard identifier. + */ + LoadDashboard(dashboardId: string): void; + /** + * Saves a current dashboard to the dashboard storage. + */ + SaveDashboard(): void; + /** + * Invokes the Dashboard Parameters dialog. + */ + ShowParametersDialog(): void; + /** + * Closes the Dashboard Parameters dialog. + */ + HideParametersDialog(): void; + /** + * Returns dashboard parameter settings and metadata. + */ + GetParameters(): ASPxClientDashboardParameters; + /** + * Invokes the dialog that allows end-users to export the entire dashboard to the specified format. + * @param format A string value that specifies the format. For instance, you can use 'PDF' or 'Image'. + */ + ShowExportDashboardDialog(format: string): void; + /** + * Invokes the dialog that allows end-users to export the dashboard item to the specified format. + * @param itemComponentName A string value that specifies the component name of the dashboard item to export. + * @param format A string value that specifies the format. For instance, you can use 'PDF, 'Image' or 'Excel'. + */ + ShowExportDashboardItemDialog(itemComponentName: string, format: string): void; + /** + * Hides the dialog that allows end-users to export the dashboard/dashboard item. + */ + HideExportDialog(): void; + /** + * Returns settings that specify parameters affecting how the dashboard is exported. + */ + GetExportOptions(): ASPxClientDashboardExportOptions; + /** + * Specifies settings that specify parameters affecting how the dashboard is exported. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + SetExportOptions(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to a PDF file and writes it to the Response. + */ + ExportToPdf(): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard to an Image file and writes it to the Response. + */ + ExportToImage(): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToImage(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to a PDF file and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToPdf(itemName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Image file and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToImage(itemName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Excel file and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToExcel(itemName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Returns whether or not master filtering can be applied in the current state of the specified master filter item. + * @param itemName A string that specifies the component name of the master filter item. + */ + CanSetMasterFilter(itemName: string): boolean; + /** + * Returns whether or not the specified master filter can be cleared in the current state. + * @param itemName A string that specifies the component name of the master filter item. + */ + CanClearMasterFilter(itemName: string): boolean; + /** + * Returns whether or not drill down is possible in the current state of the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + */ + CanPerformDrillDown(itemName: string): boolean; + /** + * Returns whether or not drill up is possible in the current state of the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + */ + CanPerformDrillUp(itemName: string): boolean; + /** + * Selects required elements by their values in the specified master filter item. + * @param itemName A String that specifies the component name of the master filter item. + * @param values Values that will be used to select elements in the master filter item. + */ + SetMasterFilter(itemName: string, values: Object[][]): void; + /** + * Selects the required elements in the specified master filter item. + * @param itemName A String that species the component name of the master filter item. + * @param axisPointTuples An array of ASPxClientDashboardItemDataAxisPointTuple objects used to identify master filter elements. + */ + SetMasterFilter(itemName: string, axisPointTuples: ASPxClientDashboardItemDataAxisPointTuple[]): void; + /** + * Performs a drill-down into the required element by its value. + * @param itemName A String that species the component name of the dashboard item. + * @param value A value that will be used to perform a drill-down for the required element. + */ + PerformDrillDown(itemName: string, value: Object): void; + /** + * Performs a drill-down into the required element. + * @param itemName A String that specifies the component name of the dashboard item. + * @param axisPointTuple A ASPxClientDashboardItemDataAxisPointTuple object representing a set of axis points. + */ + PerformDrillDown(itemName: string, axisPointTuple: ASPxClientDashboardItemDataAxisPointTuple): void; + /** + * Clears the specified master filter item. + * @param itemName A string that specifies the component name of the master filter item. + */ + ClearMasterFilter(itemName: string): void; + /** + * Performs a drill-up for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + PerformDrillUp(itemName: string): void; + /** + * Returns axis point tuples identifying elements that can be used to perform drill-down in the specified dashboard item. + * @param itemName A String that is the component name of the dashboard item. + */ + GetAvailableDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns the axis point tuple identifying the current drill-down state. + * @param itemName A String that is the component name of the dashboard item. + */ + GetCurrentDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Returns axis point tuples identifying elements that can be selected in the current state of the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetAvailableFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns axis point tuples identifying currently selected elements in the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetCurrentFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns currently selected elements in the master filter item. + * @param itemName A String that specifies a component name of the master filter item. + */ + GetCurrentSelection(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns the client data for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + GetItemData(itemName: string): ASPxClientDashboardItemData; + /** + * Refreshes an entire dashboard displayed in the Web Dashboard control. + */ + Refresh(): void; + /** + * Refreshes the specific item from the dashboard displayed in the Web Dashboard control. + * @param itemName A string value that specifies the component name of the dashboard item to be refreshed. + */ + Refresh(itemName: string): void; + /** + * Refreshes specific items from the dashboard displayed in the Web Dashboard control. + * @param itemName An array of string values that specify the component names of the dashboard items to be refreshed. + */ + Refresh(itemName: string[]): void; + /** + * Requests underlying data for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + * @param args A ASPxClientDashboardItemRequestUnderlyingDataParameters object containing parameters used to obtain the underlying data. + * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. + */ + RequestUnderlyingData(itemName: string, args: ASPxClientDashboardItemRequestUnderlyingDataParameters, onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted): void; + /** + * Returns the currently selected range in the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Returns the visible range for the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetEntireRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Selects the required range in the specified Range Filter dashboard item. + * @param itemName A String that specifies the component name of the Range Filter dashboard item. + * @param range A String value that specifies the component name of the Range Filter dashboard item. + */ + SetRange(itemName: string, range: ASPxClientDashboardRangeFilterSelection): void; + /** + * Selects a predefined range in the Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter. + * @param dateTimePeriodName A String value that specifies the predefined range name. + */ + SetPredefinedRange(itemName: string, dateTimePeriodName: string): void; +} +/** + * References a method that will handle the DashboardStateChanged event. + */ +interface ASPxClientDashboardStateChangedEventHandler { + /** + * References a method that will handle the DashboardStateChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardStateChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardStateChangedEventArgs): void; +} +/** + * Provides data for the DashboardStateChanged event. + */ +interface ASPxClientDashboardStateChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the current state of the dashboard. + * Value: A String that is the current state of the dashboard. + */ + DashboardState: string; +} +/** + * References a method that will handle the DashboardChanged event. + */ +interface ASPxClientDashboardChangedEventHandler { + /** + * References a method that will handle the DashboardChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardChangedEventArgs): void; +} +/** + * Provides data for the DashboardChanged event. + */ +interface ASPxClientDashboardChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the identifier of a newly opened dashboard. + * Value: A String values that is an identifier of newly opened dashboard. + */ + DashboardId: string; + /** + * Gets the name of a newly opened dashboard. + * Value: A string value that is the name of newly opened dashboard. + */ + DashboardName: string; +} +interface ASPxClientDashboardCustomizeMenuItemsEventHandler { + (source: S, e: ASPxClientDashboardCustomizeMenuItemsEventArgs): void; +} +interface ASPxClientDashboardMenuItem { + id: string; + title: string; + template: string; + selected: boolean; + disabled: boolean; + hasSeparator: boolean; + click: Function; + hotKey: number; +} +interface ASPxClientDashboardCustomizeMenuItemsEventArgs extends ASPxClientEventArgs { + Items: ASPxClientDashboardMenuItem[]; + FindById(itemId: string): ASPxClientDashboardMenuItem; +} +interface ASPxClientDashboardBeforeRenderEventHandler { + (source: S, e: ASPxClientEventArgs): void; +} +/** + * Serves as the base class for classes that provide data for client-side events related to dashboard items. + */ +interface ASPxClientDashboardItemEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Returns whether or not the specified value is null. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is 'others'. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; +} +/** + * References a method that will handle the ItemMasterFilterStateChanged event. + */ +interface ASPxClientDashboardItemMasterFilterStateChangedEventHandler { + /** + * References a method that will handle the ItemMasterFilterStateChanged event. + * @param source The event source. + * @param e An ASPxClientDashboardItemMasterFilterStateChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemMasterFilterStateChangedEventArgs): void; +} +/** + * Provides data for the ItemMasterFilterStateChanged event. + */ +interface ASPxClientDashboardItemMasterFilterStateChangedEventArgs extends ASPxClientDashboardItemEventArgs { + /** + * Gets the currently selected values. + * Value: An array of objects that are the currently selected values. + */ + Values: Object[][]; +} +/** + * References a method that will handle the ItemDrillDownStateChanged event. + */ +interface ASPxClientDashboardItemDrillDownStateChangedEventHandler { + /** + * References a method that will handle the ItemDrillDownStateChanged event. + * @param source The event source. + * @param e An ASPxClientDashboardItemDrillDownStateChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemDrillDownStateChangedEventArgs): void; +} +/** + * Provides data for the ItemDrillDownStateChanged event. + */ +interface ASPxClientDashboardItemDrillDownStateChangedEventArgs extends ASPxClientDashboardItemEventArgs { + /** + * Gets the drill-down action performed in the dashboard item. + * Value: A string value that is the drill-down action performed in the dashboard item. + */ + Action: string; + /** + * Gets values from the current drill-down hierarchy. + * Value: An array of values from the current drill-down hierarchy. + */ + Values: Object[]; +} +/** + * A client-side equivalent of the ASPxDashboardViewer control. + */ +interface ASPxClientDashboardViewer extends ASPxClientControl { + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after the available interactivity actions have changed. + */ + ActionAvailabilityChanged: ASPxClientEvent>; + /** + * Occurs when an end-user changes the state of the master filter. + */ + MasterFilterSet: ASPxClientEvent>; + /** + * Occurs when an end-user clears the selection in the master filter item. + */ + MasterFilterCleared: ASPxClientEvent>; + /** + * Provides the capability to handle data loading errors in the ASPxClientDashboardViewer. + */ + DataLoadingError: ASPxClientEvent>; + /** + * Occurs after a drill-down is performed. + */ + DrillDownPerformed: ASPxClientEvent>; + /** + * Occurs after a drill-up is performed. + */ + DrillUpPerformed: ASPxClientEvent>; + /** + * Occurs after the ASPxClientDashboardViewer is loaded. + */ + Loaded: ASPxClientEvent>; + /** + * Occurs when an end-user clicks a dashboard item. + */ + ItemClick: ASPxClientEvent>; + /** + * Allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting + */ + ItemVisualInteractivity: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetCreated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdating: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemBeforeWidgetDisposed: ASPxClientEvent>; + /** + * Occurs after the selection within the dashboard item is changed. + */ + ItemSelectionChanged: ASPxClientEvent>; + /** + * Allows you to color the required dashboard item elements using the specified colors. + */ + ItemElementCustomColor: ASPxClientEvent>; + /** + * Reloads data in the data sources. + */ + ReloadData(): void; + /** + * Reloads data in the data sources. + * @param parameters An array of ASPxClientDashboardParameter objects that specify dashboard parameters on the client side. + */ + ReloadData(parameters: ASPxClientDashboardParameter[]): void; + /** + * Returns dashboard parameter settings and metadata. + */ + GetParameters(): ASPxClientDashboardParameters; + /** + * Locks the EndUpdateParameters method call. + */ + BeginUpdateParameters(): void; + /** + * Unlocks the BeginUpdateParameters method and applies changes made to the parameter settings. + */ + EndUpdateParameters(): void; + /** + * Returns the currently selected range in the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Returns the visible range for the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetEntireRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Selects the required range in the specified Range Filter dashboard item. + * @param itemName A String that specifies the component name of the Range Filter dashboard item. + * @param range A String value that specifies the component name of the Range Filter dashboard item. + */ + SetRange(itemName: string, range: ASPxClientDashboardRangeFilterSelection): void; + /** + * Selects a predefined range in the Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter. + * @param dateTimePeriodName A String value that specifies the predefined range name. + */ + SetPredefinedRange(itemName: string, dateTimePeriodName: string): void; + /** + * Returns axis point tuples identifying elements that can be used to perform drill-down in the specified dashboard item. + * @param itemName A String that is the component name of the dashboard item. + */ + GetAvailableDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns the axis point tuple identifying the current drill-down state. + * @param itemName A String that is the component name of the dashboard item. + */ + GetCurrentDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Returns axis point tuples identifying elements that can be selected in the current state of the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetAvailableFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns axis point tuples identifying currently selected elements in the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetCurrentFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns currently selected elements in the master filter item. + * @param itemName A String that specifies a component name of the master filter item. + */ + GetCurrentSelection(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Requests underlying data for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + * @param args A ASPxClientDashboardItemRequestUnderlyingDataParameters object containing parameters used to obtain the underlying data. + * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. + */ + RequestUnderlyingData(itemName: string, args: ASPxClientDashboardItemRequestUnderlyingDataParameters, onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted): void; + /** + * Invokes the Dashboard Parameters dialog. + */ + ShowParametersDialog(): void; + /** + * Closes the Dashboard Parameters dialog. + */ + HideParametersDialog(): void; + /** + * Returns settings that specify parameters affecting how the dashboard is exported. + */ + GetExportOptions(): ASPxClientDashboardExportOptions; + /** + * Specifies settings that specify parameters affecting how the dashboard is exported. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + SetExportOptions(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to a PDF file and writes it to the Response. + */ + ExportToPdf(): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard to an Image file and writes it to the Response. + */ + ExportToImage(): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToImage(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to a PDF file and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToPdf(itemName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Image file and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToImage(itemName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Excel file and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToExcel(itemName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Returns the dashboard width. + */ + GetWidth(): number; + /** + * Returns the dashboard height. + */ + GetHeight(): number; + /** + * Specifies the dashboard width. + * @param width An integer value that specifies the dashboard width. + */ + SetWidth(width: number): void; + /** + * Specifies the dashboard height. + * @param height An integer value that specifies the dashboard height. + */ + SetHeight(height: number): void; + /** + * Specifies the dashboard size. + * @param width An integer value that specifies the dashboard width. + * @param height An integer value that specifies the dashboard height. + */ + SetSize(width: number, height: number): void; + /** + * Selects required elements by their values in the specified master filter item. + * @param itemName A String that species the component name of the master filter item. + * @param values Values that will be used to select elements in the master filter item. + */ + SetMasterFilter(itemName: string, values: Object[][]): void; + /** + * Selects the required elements in the specified master filter item. + * @param itemName A String that specifies the component name of the master filter item. + * @param axisPointTuples An array of ASPxClientDashboardItemDataAxisPointTuple objects used to identify master filter elements. + */ + SetMasterFilter(itemName: string, axisPointTuples: ASPxClientDashboardItemDataAxisPointTuple[]): void; + /** + * Performs a drill-down for the required element by its value. + * @param itemName A String that species the component name of the dashboard item. + * @param value A value that will be used to perform a drill-down for the required element. + */ + PerformDrillDown(itemName: string, value: Object): void; + /** + * Performs a drill-down for the required element. + * @param itemName A String that specifies the component name of the dashboard item. + * @param axisPointTuple A ASPxClientDashboardItemDataAxisPointTuple object representing a set of axis points. + */ + PerformDrillDown(itemName: string, axisPointTuple: ASPxClientDashboardItemDataAxisPointTuple): void; + /** + * Clears the specified master filter item. + * @param itemName A String that specifies the component name of the master filter item. + */ + ClearMasterFilter(itemName: string): void; + /** + * Performs a drill-up for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + PerformDrillUp(itemName: string): void; + /** + * Returns whether or not the specified master filter item allows selecting one or more elements. + * @param itemName A String that specifies the component name of the master filter item. + */ + CanSetMasterFilter(itemName: string): boolean; + /** + * Returns whether or not the specified master filter can be cleared in the current state. + * @param itemName A String that specifies the component name of the master filter item. + */ + CanClearMasterFilter(itemName: string): boolean; + /** + * Returns whether or not drill down is possible in the current state of the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + CanPerformDrillDown(itemName: string): boolean; + /** + * Returns whether or not drill up is possible in the current state of the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + CanPerformDrillUp(itemName: string): boolean; + /** + * Returns the client data for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + GetItemData(itemName: string): ASPxClientDashboardItemData; +} +/** + * References a method that will handle the ActionAvailabilityChanged event. + */ +interface ASPxClientDashboardActionAvailabilityChangedEventHandler { + /** + * References a method that will handle the ActionAvailabilityChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardActionAvailabilityChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardActionAvailabilityChangedEventArgs): void; +} +/** + * Provides data for the ActionAvailabilityChanged event. + */ +interface ASPxClientDashboardActionAvailabilityChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets whether or not data reloading is available in the current state of dashboard item. + * Value: true, if data reloading is available in the current state of dashboard item; otherwise, false. + */ + IsReloadDataAvailable: boolean; + /** + * Gets interactivity actions currently available for the dashboard item. + * Value: An array of ASPxClientDashboardItemAction objects that represent interactivity actions currently available for the dashboard item. + */ + ItemActions: ASPxClientDashboardItemAction[]; +} +/** + * References a method that will handle the DataLoadingError event. + */ +interface ASPxClientDashboardDataLoadingErrorEventHandler { + /** + * References a method that will handle the DataLoadingError event. + * @param source The event source. + * @param e A ASPxClientDashboardDataLoadingErrorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardDataLoadingErrorEventArgs): void; +} +/** + * Provides data for the DataLoadingError event. + */ +interface ASPxClientDashboardDataLoadingErrorEventArgs extends ASPxClientEventArgs { + /** + * Allows you to determine whether or not the error message will be shown. + */ + IsErrorMessageShown(): boolean; + /** + * Allows you to specify whether to show the error message. + * @param value true, to show the error message; otherwise, false. + */ + ShowErrorMessage(value: boolean): void; + /** + * Allows you to obtain the displayed error message. + */ + GetError(): string; + /** + * Allows you to specify the displayed error message. + * @param value A string value that specifies the displayed error message. + */ + SetError(value: string): void; +} +/** + * Represents an interactivity action in the dashboard item. + */ +interface ASPxClientDashboardItemAction { + /** + * Gets the name of the dashboard item. + * Value: A string that specifies the name of the dashboard item. + */ + ItemName: string; + /** + * Gets interactivity actions performed on a dashboard item. + * Value: An array of ASPxClientDashboardAction values that specify interactivity actions performed on a dashboard item. + */ + Actions: any[]; +} +declare enum ASPxClientDashboardAction { + SetMasterFilter=0, + ClearMasterFilter=1, + DrillDown=2, + DrillUp=3 +} +/** + * References a method that will handle the MasterFilterSet event. + */ +interface ASPxClientDashboardMasterFilterSetEventHandler { + /** + * References a method that will handle the MasterFilterSet event. + * @param source The event source. + * @param e A ASPxClientDashboardMasterFilterSetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardMasterFilterSetEventArgs): void; +} +/** + * Provides data for the MasterFilterSet event. + */ +interface ASPxClientDashboardMasterFilterSetEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A String that specifies the name of the dashboard item. + */ + ItemName: string; + /** + * Gets values of currently selected elements in the master filter item. + * Value: Values of currently selected elements in the master filter item. + */ + Values: Object[][]; + /** + * Returns whether or not the specified value is NullValue. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is OthersValue. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; +} +/** + * References a method that will handle the MasterFilterCleared event. + */ +interface ASPxClientDashboardMasterFilterClearedEventHandler { + /** + * References a method that will handle the MasterFilterCleared event. + * @param source The event source. + * @param e A ASPxClientDashboardMasterFilterClearedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardMasterFilterClearedEventArgs): void; +} +/** + * Provides data for the MasterFilterCleared event. + */ +interface ASPxClientDashboardMasterFilterClearedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A String that is the name of the dashboard item. + */ + ItemName: string; +} +/** + * References a method that will handle the DrillDownPerformed event. + */ +interface ASPxClientDashboardDrillDownPerformedEventHandler { + /** + * References a method that will handle the DrillDownPerformed event. + * @param source The event source. + * @param e A ASPxClientDashboardDrillDownPerformedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardDrillDownPerformedEventArgs): void; +} +/** + * Provides data for the DrillDownPerformed event. + */ +interface ASPxClientDashboardDrillDownPerformedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A string that specifies the name of the dashboard item. + */ + ItemName: string; + /** + * Gets values from the current drill-down hierarchy. + * Value: An array of values from the current drill-down hierarchy. + */ + Values: Object[]; + /** + * Returns whether or not the specified value is NullValue. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is OthersValue. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; +} +/** + * References a method that will handle the DrillUpPerformed event. + */ +interface ASPxClientDashboardDrillUpPerformedEventHandler { + /** + * References a method that will handle the DrillUpPerformed event. + * @param source The event source. + * @param e A ASPxClientDashboardDrillUpPerformedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardDrillUpPerformedEventArgs): void; +} +/** + * Provides data for the DrillUpPerformed event. + */ +interface ASPxClientDashboardDrillUpPerformedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A string that is the name of the dashboard item. + */ + ItemName: string; +} +/** + * Serves as the base object for all the editors included in the client-side object model. + */ +interface ASPxClientEditBase extends ASPxClientControl { + /** + * Returns the editor's value. + */ + GetValue(): Object; + /** + * Changes the editor's value. + * @param value An object representing the data to be assigned to the editor's edit value. + */ + SetValue(value: Object): void; + /** + * Returns a value indicating whether an editor is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether an editor is enabled. + * @param value true to enable the editor; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the text displayed in the editor caption. + */ + GetCaption(): string; + /** + * Specifies the text displayed in the editor caption. + * @param caption A string value specifying the editor caption. + */ + SetCaption(caption: string): void; +} +/** + * Serves as the base object for all the editors that support validation. + */ +interface ASPxClientEdit extends ASPxClientEditBase { + /** + * Fires on the client side when the editor receives input focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Fires on the client side when the editor loses input focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Allows you to specify whether the value entered into the editor is valid, and whether the editor is allowed to lose focus. + */ + Validation: ASPxClientEvent>; + /** + * Fires after the editor's value has been changed by end-user interactions. + */ + ValueChanged: ASPxClientEvent>; + /** + * Returns an HTML element that represents the control's input element. + */ + GetInputElement(): Object; + /** + * Sets input focus to the editor. + */ + Focus(): void; + /** + * Gets a value that indicates whether the editor's value passes validation. + */ + GetIsValid(): boolean; + /** + * Gets the error text to be displayed within the editor's error frame if the editor's validation fails. + */ + GetErrorText(): string; + /** + * Sets a value that specifies whether the editor's value is valid. + * @param isValid True if the editor's value is valid; otherwise, False. + */ + SetIsValid(isValid: boolean): void; + /** + * Sets the error text to be displayed within the editor's error frame if the editor's validation fails. + * @param errorText A string value representing the error text. + */ + SetErrorText(errorText: string): void; + /** + * Performs the editor's validation. + */ + Validate(): void; +} +/** + * Represents the client-side equivalent of the ASPxBinaryImage control. + */ +interface ASPxClientBinaryImage extends ASPxClientEdit { + /** + * Occurs on the client side after an image is clicked. + */ + Click: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client side if any server error occurs during server-side processing of a callback sent by the ASPxClientBinaryImage. + */ + CallbackError: ASPxClientEvent>; + /** + * Sets the size of the image editor. + * @param width An integer value that specifies the control's width. + * @param height An integer value that specifies the control's height. + */ + SetSize(width: number, height: number): void; + /** + * For internal use only. + */ + GetValue(): Object; + /** + * For internal use only. + * @param value + */ + SetValue(value: Object): void; + /** + * Removes an image from the editor content. + */ + Clear(): void; + /** + * Returns a name of the last uploaded file. + */ + GetUploadedFileName(): string; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * Represents the client-side equivalent of the ASPxButton control. + */ +interface ASPxClientButton extends ASPxClientControl { + /** + * Occurs on the client side when the button's checked state is changed. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Fires on the client side when the button receives input focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Fires on the client side when the button loses input focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Occurs on the client side after a button is clicked. + */ + Click: ASPxClientEvent>; + /** + * Simulates a mouse click action on the button control. + */ + DoClick(): void; + /** + * Returns a value indicating whether the button is checked. + */ + GetChecked(): boolean; + /** + * Sets a value that specifies the button's checked status. + * @param value true if the button is checked; otherwise, false. + */ + SetChecked(value: boolean): void; + /** + * Returns the text displayed within the button. + */ + GetText(): string; + /** + * Sets the text to be displayed within the button. + * @param value A string value specifying the text to be displayed within the button. + */ + SetText(value: string): void; + /** + * Returns the URL pointing to the image displayed within the button. + */ + GetImageUrl(): string; + /** + * Sets the URL pointing to the image displayed within the button. + * @param value A string value that is the URL to the image displayed within the button. + */ + SetImageUrl(value: string): void; + /** + * Sets a value specifying whether the button is enabled. + * @param value true to enable the button; false to disable it. + */ + SetEnabled(value: boolean): void; + /** + * Returns a value indicating whether the button is enabled. + */ + GetEnabled(): boolean; + /** + * Sets input focus to the button. + */ + Focus(): void; +} +/** + * A method that will handle the client Click event. + */ +interface ASPxClientButtonClickEventHandler { + /** + * A method that will handle the client Click event. + * @param source An object that is the event's source. + * @param e An ASPxClientButtonClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientButtonClickEventArgs): void; +} +/** + * Provides data for the Click event. + */ +interface ASPxClientButtonClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Specifies whether both the event's default action and the event's bubbling upon the hierarchy of event handlers should be canceled. + * Value: true to cancel the event's default action and the event's bubbling upon the hierarchy of event handlers; otherwise, false. + */ + cancelEventAndBubble: boolean; +} +/** + * Represents the client-side equivalent of the ASPxCalendar control. + */ +interface ASPxClientCalendar extends ASPxClientEdit { + /** + * Fires on the client side after the selected date has been changed within the calendar. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the month displayed within the calendar is changed. + */ + VisibleMonthChanged: ASPxClientEvent>; + /** + * Allows you to disable the calendar's days. + */ + CustomDisabledDate: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses a key while the editor has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses and releases a key while the editor has focus. + */ + KeyPress: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user releases a pressed key while the editor has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after the callback server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientCalendar. + */ + CallbackError: ASPxClientEvent>; + /** + * Tests whether the specified date is selected. + * @param date A date-time value that specifies the date to test. + */ + IsDateSelected(date: Date): boolean; + /** + * Sets the date that specifies the month and year to be displayed in the calendar. + * @param date The date that specifies calendar's visible month and year. + */ + SetVisibleDate(date: Date): void; + /** + * Sets the calendar's selected date. + * @param date A date object that specifies the calendar's selected date. + */ + SetSelectedDate(date: Date): void; + /** + * Returns the calendar's selected date. + */ + GetSelectedDate(): Date; + /** + * Gets the date that determines the month and year that are currently displayed in the calendar. + */ + GetVisibleDate(): Date; + /** + * Selects the specified date within the calendar. + * @param date A date-time value that specifies the selected date. + */ + SelectDate(date: Date): void; + /** + * Selects the specified range of dates within the calendar. + * @param start A date-time value that specifies the range's first date. + * @param end A date-time value that specifies the range's last date. + */ + SelectRange(start: Date, end: Date): void; + /** + * Deselects the specified date within the calendar. + * @param date A date-time value that specifies the date to deselect. + */ + DeselectDate(date: Date): void; + /** + * Deselects the specified range of dates within the calendar. + * @param start A date-time value that specifies the range's first date. + * @param end A date-time value that specifies the range's last date. + */ + DeselectRange(start: Date, end: Date): void; + /** + * Deselects all the selected dates within the calendar. + */ + ClearSelection(): void; + /** + * Returns a list of dates which are selected within the calendar. + */ + GetSelectedDates(): Date[]; + /** + * Gets the minimum date on the calendar. + */ + GetMinDate(): Date; + /** + * Sets the minimum date of the calendar. + * @param date A DateTime object representing the minimum date. + */ + SetMinDate(date: Date): void; + /** + * Gets the maximum date on the calendar. + */ + GetMaxDate(): Date; + /** + * Sets the maximum date of the calendar. + * @param date A DateTime object representing the maximum date. + */ + SetMaxDate(date: Date): void; +} +/** + * Provides data for the CustomDisabledDate event. + */ +interface ASPxClientCalendarCustomDisabledDateEventArgs extends ASPxClientEventArgs { + /** + * Gets the date processed in the calendar. + * Value: A DateTime value containing processed data. + */ + date: Date; + /** + * Gets or sets a value specifying whether selection of the processed calendar date is disabled. + * Value: true, if the date is disabled; otherwise, false. + */ + isDisabled: boolean; +} +/** + * A method that will handle the client CustomDisabledDate event. + */ +interface ASPxClientCalendarCustomDisabledDateEventHandler { + /** + * A method that will handle the client CustomDisabledDate event. + * @param source The event source. + * @param e An ASPxClientCalendarCustomDisabledDateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCalendarCustomDisabledDateEventArgs): void; +} +/** + * Represents the client-side equivalent of the ASPxCaptcha control. + */ +interface ASPxClientCaptcha extends ASPxClientControl { + /** + * Sets input focus to the control's text box. + */ + Focus(): void; + /** + * Refreshes the code displayed within the editor's challenge image. + */ + Refresh(): void; +} +/** + * Represents the client-side equivalent of the ASPxCheckBox control. + */ +interface ASPxClientCheckBox extends ASPxClientEdit { + /** + * Occurs on the client side when the editor's checked state is changed. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Returns a value indicating whether the check box editor is checked. + */ + GetChecked(): boolean; + /** + * Sets a value which specifies the checked status of the check box editor. + * @param isChecked true if the check box editor is checked; otherwise, false. + */ + SetChecked(isChecked: boolean): void; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Returns a value which specifies a check box checked state. + */ + GetCheckState(): string; + /** + * Sets a value specifying the state of a check box. + * @param checkState A string value matches one of the CheckState enumeration values. + */ + SetCheckState(checkState: string): void; + /** + * Sets the text to be displayed within the editor. + * @param text A string value specifying the text to be displayed within the editor. + */ + SetText(text: string): void; +} +/** + * Represents the client-side equivalent of the ASPxRadioButton control. + */ +interface ASPxClientRadioButton extends ASPxClientCheckBox { + /** + * Returns a value indicating whether the radio button is checked. + */ + GetChecked(): boolean; + /** + * Sets a value which specifies the radio button's checked status. + * @param isChecked true if the radio button is checked; otherwise, false. + */ + SetChecked(isChecked: boolean): void; +} +/** + * Represents a base for client-side objects which allow single-line text input. + */ +interface ASPxClientTextEdit extends ASPxClientEdit { + /** + * Occurs on the client-side when an end-user presses a key while the editor has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses and releases a key while the editor has focus. + */ + KeyPress: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user releases a pressed key while the editor has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Fires on the client side when the editor's text is changed and focus moves out of the editor by end-user interactions. + */ + TextChanged: ASPxClientEvent>; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Sets the text to be displayed within the editor. + * @param text A string value specifying the text to be displayed within the editor. + */ + SetText(text: string): void; + /** + * Selects all text in the text editor. + */ + SelectAll(): void; + /** + * Sets the caret position within the edited text. + * @param position An integer value that specifies the zero-based index of a text character that shall precede the caret. + */ + SetCaretPosition(position: number): void; + /** + * Obtains the caret position within the edited text. + */ + GetCaretPosition(): number; + /** + * Selects the specified portion of the editor's text. + * @param startPos A zero-based integer value specifying the selection's starting position. + * @param endPos A zero-based integer value specifying the selection's ending position. + * @param scrollToSelection true to scroll the editor's contents to make the selection visible; otherwise, false. + */ + SetSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; +} +/** + * Represents a base for client-side editors which are capable of displaying and editing text data in their edit regions. + */ +interface ASPxClientTextBoxBase extends ASPxClientTextEdit { +} +/** + * Represents a base for client button editor objects. + */ +interface ASPxClientButtonEditBase extends ASPxClientTextBoxBase { + /** + * Occurs on the client side after an editor button is clicked. + */ + ButtonClick: ASPxClientEvent>; + /** + * Specifies whether the button is visible. + * @param number An integer value specifying the button's index within the Buttons collection. + * @param value true, to make the button visible; otherwise, false. + */ + SetButtonVisible(number: number, value: boolean): void; + /** + * Returns a value specifying whether a button is displayed. + * @param number An integer value specifying the button's index within the Buttons collection. + */ + GetButtonVisible(number: number): boolean; +} +/** + * Represents a base class for the editors that contain a drop down window. + */ +interface ASPxClientDropDownEditBase extends ASPxClientButtonEditBase { + /** + * Occurs on the client-side when the drop down window is opened. + */ + DropDown: ASPxClientEvent>; + /** + * Occurs on the client side when the drop down window is closed. + */ + CloseUp: ASPxClientEvent>; + /** + * Occurs on the client side before the drop down window is closed and allows you to cancel the operation. + */ + QueryCloseUp: ASPxClientEvent>; + /** + * Modifies the size of the drop down window in accordance with its content. + */ + AdjustDropDownWindow(): void; + /** + * Invokes the editor's drop down window. + */ + ShowDropDown(): void; + /** + * Closes the opened drop down window of the editor. + */ + HideDropDown(): void; +} +/** + * Represents the client-side equivalent of the ASPxColorEdit control. + */ +interface ASPxClientColorEdit extends ASPxClientDropDownEditBase { + /** + * Fires after the selected color has been changed within the color editor via end-user interaction. + */ + ColorChanged: ASPxClientEvent>; + /** + * This event is not in effect for the ASPxClientColorEdit. Use the ColorChanged event instead. + */ + TextChanged: ASPxClientEvent>; + /** + * Returns the color editor's value. + */ + GetColor(): string; + /** + * Specifies the color value for the color editor. + * @param value A string value specifying the editor color. + */ + SetColor(value: string): void; + /** + * Indicates whether the automatic color item is selected. + */ + IsAutomaticColorSelected(): boolean; +} +/** + * Represent the client-side equivalent of the ASPxComboBox control. + */ +interface ASPxClientComboBox extends ASPxClientDropDownEditBase { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientComboBox. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side after a different item in the list has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Specifies the text displayed within the editor's edit box. + * @param text A string value specifying the editor's text. + */ + SetText(text: string): void; + /** + * Adds a new item to the editor specifying the item's display text and returns the index of the added item. + * @param text A string value specifying the item's display text. + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor specifying the item's display text and associated value, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + AddItem(text: string, value: Object, imageUrl: string): number; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, text: string, value: Object, imageUrl: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + */ + InsertItem(index: number, text: string): void; + /** + * Removes an item specified by its index from the client list editor. + * @param index An integer value representing the index of the list item to be removed. + */ + RemoveItem(index: number): void; + /** + * Removes all items from the client combo box editor. + */ + ClearItems(): void; + /** + * Prevents the client combobox editor from being rendered until the EndUpdate method is called. + */ + BeginUpdate(): void; + /** + * Re-enables editor render operations after a call to the BeginUpdate method and forces an immediate re-rendering. + */ + EndUpdate(): void; + /** + * Scrolls the editor's item list, so that the specified item becomes visible. + * @param index An integer value that specifies the item's index within the editor's client item list. + */ + MakeItemVisible(index: number): void; + /** + * Returns an item specified by its index within the combo box editor's item collection. + * @param index An integer value specifying the zero-based index of the item to search for. + */ + GetItem(index: number): ASPxClientListEditItem; + /** + * Returns a combo box item by its text. + * @param text A string that specifies the item's text. + */ + FindItemByText(text: string): ASPxClientListEditItem; + /** + * Returns a combo box item by its value. + * @param value An object that specifies the item's value. + */ + FindItemByValue(value: Object): ASPxClientListEditItem; + /** + * Gets the number of items contained in the editor's item collection. + */ + GetItemCount(): number; + /** + * Returns the index of the selected item within the combo box editor. + */ + GetSelectedIndex(): number; + /** + * Sets the combobox editor's selected item specified by its index. + * @param index An integer value specifying the zero-based index of the item to select. + */ + SetSelectedIndex(index: number): void; + /** + * Returns the combo box editor's selected item. + */ + GetSelectedItem(): ASPxClientListEditItem; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; + /** + * Gets the text displayed in the editor's edit box. + */ + GetText(): string; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + AddItem(texts: string[], value: Object, imageUrl: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A String value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, texts: string[], value: Object, imageUrl: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + InsertItem(index: number, texts: string[]): void; + /** + * Determines whether the drop-down content is loaded; if not - loads the content. + * @param callbackFunction An object that is the JavaScript function that receives the callback data as a parameter. The function is performed after the combo box content is loaded. + */ + EnsureDropDownLoaded(callbackFunction: Object): void; + /** + * Defines the HTML content for the specified combo box item. + * @param index An integer value specifying the zero-based index of the item. + * @param html A string value that is the HTML code defining the content of the combo box item. + */ + SetItemHtml(index: number, html: string): void; + /** + * Sets the tooltip text for the combo box editor's item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTooltip(index: number, tooltip: string): void; + /** + * Sets the CSS class for a combo box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + AddItemCssClass(index: number, className: string): void; + /** + * Removes the CSS class from a combo box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + RemoveItemCssClass(index: number, className: string): void; + /** + * Defines the HTML content for the specified combo box item's text cell. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param html A string value that is the HTML code defining the content of the combo box item. + */ + SetItemTextCellHtml(itemIndex: number, textCellIndex: number, html: string): void; + /** + * Sets the tooltip text for the text cell of the editor's item specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTextCellTooltip(itemIndex: number, textCellIndex: number, tooltip: string): void; + /** + * Sets the CSS class for a combo box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + AddItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + /** + * Removes the CSS class from a combo box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + RemoveItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; +} +/** + * Represents the client-side equivalent of the ASPxDateEdit control. + */ +interface ASPxClientDateEdit extends ASPxClientDropDownEditBase { + /** + * Fires after the selected date has been changed within the date editor. + */ + DateChanged: ASPxClientEvent>; + /** + * Enables you to convert the value entered by an end user into the value that will be stored by the date editor. + */ + ParseDate: ASPxClientEvent>; + /** + * Allows you to disable the calendar's days. + */ + CalendarCustomDisabledDate: ASPxClientEvent>; + /** + * This event is not in effect for the ASPxClientDateEdit. Use the DateChanged event instead. + */ + TextChanged: ASPxClientEvent>; + /** + * Returns the calendar of the date editor. + */ + GetCalendar(): ASPxClientCalendar; + /** + * Returns the built-in time edit control. + */ + GetTimeEdit(): ASPxClientTimeEdit; + /** + * Specifies the date for the editor. + * @param date A DateTime object that is the date. + */ + SetDate(date: Date): void; + /** + * Gets the date that is the editor's value. + */ + GetDate(): Date; + /** + * Returns the number of days in a range selected within a date edit. + */ + GetRangeDayCount(): number; + /** + * Gets the minimum date of the editor. + */ + GetMinDate(): Date; + /** + * Sets the minimum date of the editor. + * @param date A DateTime object representing the minimum date. + */ + SetMinDate(date: Date): void; + /** + * Gets the maximum date of the editor. + */ + GetMaxDate(): Date; + /** + * Sets the maximum date of the editor. + * @param date A DateTime object representing the maximum date. + */ + SetMaxDate(date: Date): void; +} +/** + * Provides data for the ParseDate client-side event that parses a string entered into a date editor. + */ +interface ASPxClientParseDateEventArgs extends ASPxClientEventArgs { + /** + * Gets the value entered into the date editor by an end user. + * Value: The string value entered into the date editor by an end user. + */ + value: string; + /** + * Gets or sets the edit value of the date editor. + * Value: A date/time value representing the edit value of the date editor. + */ + date: Date; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the client ParseDate event, that parses a date editor's value when entered. + */ +interface ASPxClientParseDateEventHandler { + /** + * A method that will handle the ParseDate event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientParseDateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientParseDateEventArgs): void; +} +/** + * Represents a base for client editor objects realizing the dropdown editor functionality. + */ +interface ASPxClientDropDownEdit extends ASPxClientDropDownEditBase { + /** + * Obtains the key value associated with the text displayed within the editor's edit box. + */ + GetKeyValue(): string; + /** + * Specifies the key value associated with the text displayed within the editor's edit box. + * @param keyValue A string specifying the key value associated with the editor's value (displayed text). + */ + SetKeyValue(keyValue: string): void; +} +/** + * A method that will handle the client events involving a keyboard key being pressed or released. + */ +interface ASPxClientEditKeyEventHandler { + /** + * A method that will handle the client events concerning a keyboard key being pressed. + * @param source The event source. This parameter identifies the editor which raised the event. + * @param e An ASPxClientEditKeyEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEditKeyEventArgs): void; +} +/** + * Provides data for the client events involved with a key being pressed or released. + */ +interface ASPxClientEditKeyEventArgs extends ASPxClientEventArgs { + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle client validation events. + */ +interface ASPxClientEditValidationEventHandler { + /** + * A method that will handle client validation events. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientEditValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEditValidationEventArgs): void; +} +/** + * Provides data for the client events that are related to data validation (see Validate). + */ +interface ASPxClientEditValidationEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets the error description. + * Value: A string representing the error description. + */ + errorText: string; + /** + * Gets or sets a value specifying whether the validated value is valid. + * Value: true if the value is valid; otherwise, false. + */ + isValid: boolean; + /** + * Gets or sets the editor's value being validated. + * Value: An object that represents the validated value. + */ + value: string; +} +/** + * Represents the client ASPxFilterControl. + */ +interface ASPxClientFilterControl extends ASPxClientControl { + /** + * Occurs after a new filter expression has been applied. + */ + Applied: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientFilterControl. + */ + CallbackError: ASPxClientEvent>; + /** + * Returns the filter expression. + */ + GetFilterExpression(): string; + /** + * Returns the applied filter expression. + */ + GetAppliedFilterExpression(): string; + /** + * Returns the editor used to edit operand values for the specified filter column. + * @param editorIndex An integer value that identifies the filter column by its index within the collection. + */ + GetEditor(editorIndex: number): ASPxClientEditBase; + /** + * Returns a value indicating whether the filter expression being currently composed on the client side is valid - all expression conditions are filled. + */ + IsFilterExpressionValid(): boolean; + /** + * Applies a filter constructed by an end-user. + */ + Apply(): void; + /** + * Resets the current filter expression to a previously applied filter expression. + */ + Reset(): void; +} +/** + * A method that will handle the Applied event. + */ +interface ASPxClientFilterAppliedEventHandler { + /** + * A method that will handle the Applied event. + * @param source The event source. + * @param e An ASPxClientFilterAppliedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFilterAppliedEventArgs): void; +} +/** + * Provides data for the Applied event. + */ +interface ASPxClientFilterAppliedEventArgs extends ASPxClientEventArgs { + /** + * Gets the filter expression currently being applied. + * Value: A string value that specifies the filter expression currently being applied. + */ + filterExpression: string; +} +/** + * Represents a base for client editor objects that display a list of items. + */ +interface ASPxClientListEdit extends ASPxClientEdit { + /** + * Occurs on the client side after a different item in the list has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Returns the list editor's selected item. + */ + GetSelectedItem(): ASPxClientListEditItem; + /** + * Returns the index of the selected item within the list editor. + */ + GetSelectedIndex(): number; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; + /** + * Sets the list editor's selected item specified by its index. + * @param index An integer value specifying the zero-based index of the item to select. + */ + SetSelectedIndex(index: number): void; +} +/** + * Represents the client-side equivalent of the ListEditItem object. + */ +interface ASPxClientListEditItem { + /** + * Gets a value that indicates whether a list edit item is selected. + * Value: true if a list edit item is selected; otherwise, false. + */ + selected: boolean; + /** + * Gets an editor to which the current item belongs. + * Value: An ASPxClientListEdit object that represents the item's owner editor. + */ + listEditBase: ASPxClientListEdit; + /** + * Gets the item's index. + * Value: An integer value that represents the item's index within the corresponding editor's item collection. + */ + index: number; + /** + * Gets the item's associated image. + * Value: A string value that represents the path to the image displayed by the item. + */ + imageUrl: string; + /** + * Gets the item's display text. + * Value: A string value that represents the item's display text. + */ + text: string; + /** + * Gets the item's associated value. + * Value: An object that represents the value associated with the item. + */ + value: Object; + /** + * Returns the list item's value that corresponds to a column specified by its index. + * @param columnIndex An integer value that specifies the column's index within the editor's Columns collection. + */ + GetColumnText(columnIndex: number): string; + /** + * Returns the list item's value that corresponds to a column specified by its field name. + * @param columnName A string value that specifies the column's field name defined via the FieldName property. + */ + GetColumnText(columnName: string): string; +} +/** + * Represents the client-side equivalent of the ASPxListBox control. + */ +interface ASPxClientListBox extends ASPxClientListEdit { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientListBox. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when an end-user presses a key while the editor has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs on the client side when an end-user presses and releases a key while the editor has focus. + */ + KeyPress: ASPxClientEvent>; + /** + * Occurs on the client side when an end-user releases a pressed key while the editor has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Occurs on the client side after a different item in the list box has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Occurs on the client when the editor's item is double clicked. + */ + ItemDoubleClick: ASPxClientEvent>; + /** + * Gets the number of items contained in the editor's item collection. + */ + GetItemCount(): number; + /** + * Returns an item specified by its index within the list box editor's item collection. + * @param index An integer value specifying the zero-based index of the item to search for. + */ + GetItem(index: number): ASPxClientListEditItem; + /** + * Returns an array of the list editor's selected items indices. + */ + GetSelectedIndices(): number[]; + /** + * Returns an array of the list editor's selected items values. + */ + GetSelectedValues(): Object[]; + /** + * Returns an array of the list editor's selected items. + */ + GetSelectedItems(): ASPxClientListEditItem[]; + /** + * Selects all list box items. + */ + SelectAll(): void; + /** + * Unselects all list box items. + */ + UnselectAll(): void; + /** + * Selects the items with the specified indices within a list box. + * @param indices An array of integer values that represent the items indices. + */ + SelectIndices(indices: number[]): void; + /** + * Unselects an array of the list box items with the specified indices. + * @param indices An array of integer values that represent the indices. + */ + UnselectIndices(indices: number[]): void; + /** + * Selects the specified items within a list box. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + SelectItems(items: ASPxClientListEditItem[]): void; + /** + * Unselects an array of the specified list box items. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + UnselectItems(items: ASPxClientListEditItem[]): void; + /** + * Select the items with the specified values within a list box. + * @param values An array of Object[] objects that represent the item's values. + */ + SelectValues(values: Object[]): void; + /** + * Unselects an array of the list box items with the specified values. + * @param values An array of Object[] objects that represent the values. + */ + UnselectValues(values: Object[]): void; + /** + * Scrolls the editor's item list, so that the specified item becomes visible. + * @param index An integer value that specifies the item's index within the editor's client item list. + */ + MakeItemVisible(index: number): void; + /** + * Initializes the ASPxClientListBox client object when its parent container becomes visible dynamically, on the client side. + */ + InitOnContainerMadeVisible(): void; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param text A string value specifying the item's display text. + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor, specifying the item's display text and associated value, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + AddItem(text: string, value: Object, imageUrl: string): number; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, text: string, value: Object, imageUrl: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + */ + InsertItem(index: number, text: string): void; + /** + * Prevents the client list box editor from being rendered until the EndUpdate method is called. + */ + BeginUpdate(): void; + /** + * Re-enables editor render operations after a call to the BeginUpdate method, and forces an immediate re-rendering. + */ + EndUpdate(): void; + /** + * Removes all items from the client list box editor. + */ + ClearItems(): void; + /** + * Removes an item specified by its index from the client list editor. + * @param index An integer value representing the index of the list item to be removed. + */ + RemoveItem(index: number): void; + /** + * Returns a list box item by its text. + * @param text A string that specifies the item's text. + */ + FindItemByText(text: string): ASPxClientListEditItem; + /** + * Returns a list box item by its value. + * @param value An object that specifies the item's value. + */ + FindItemByValue(value: Object): ASPxClientListEditItem; + /** + * Sends a callback to the server, and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Adds a new item to the end of the editor's items collection, specifying the item's display text, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the editor's items collection, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A String value specifying the path to the image displayed by the item. + */ + AddItem(texts: string[], value: Object, imageUrl: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A String value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, texts: string[], value: Object, imageUrl: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + InsertItem(index: number, texts: string[]): void; + /** + * Defines the HTML content for the specified list box item. + * @param index An integer value specifying the zero-based index of the item. + * @param html A string value that is the HTML code defining the content of the list box item. + */ + SetItemHtml(index: number, html: string): void; + /** + * Sets the tooltip text for the list box editor's item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTooltip(index: number, tooltip: string): void; + /** + * Sets the CSS class for a list box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + AddItemCssClass(index: number, className: string): void; + /** + * Removes the CSS class from a list box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + RemoveItemCssClass(index: number, className: string): void; + /** + * Defines the HTML content for the specified list box item's text cell. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param html A string value that is the HTML code defining the content of the list box item. + */ + SetItemTextCellHtml(itemIndex: number, textCellIndex: number, html: string): void; + /** + * Sets the tooltip text for the text cell of the editor's item specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTextCellTooltip(itemIndex: number, textCellIndex: number, tooltip: string): void; + /** + * Sets the CSS class for a list box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + AddItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + /** + * Removes the CSS class from a list box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + RemoveItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; +} +/** + * Serves as the base type for the ASPxClientRadioButtonList objects. + */ +interface ASPxClientCheckListBase extends ASPxClientListEdit { + /** + * Gets the number of items contained in the editor's item collection. + */ + GetItemCount(): number; + /** + * Returns the editor's item specified by its index. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): ASPxClientListEditItem; +} +/** + * Represents the client-side equivalent of the ASPxRadioButtonList control. + */ +interface ASPxClientRadioButtonList extends ASPxClientCheckListBase { +} +/** + * A client-side equivalent of the ASPxCheckBoxList object. + */ +interface ASPxClientCheckBoxList extends ASPxClientCheckListBase { + /** + * Occurs on the client side after a different item in the check box list has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Returns an array of the check box list editor's selected items indices. + */ + GetSelectedIndices(): number[]; + /** + * Returns an array of the check box list editor's selected items values. + */ + GetSelectedValues(): Object[]; + /** + * Returns an array of the check box list editor's selected items. + */ + GetSelectedItems(): ASPxClientListEditItem[]; + /** + * Selects all check box list items. + */ + SelectAll(): void; + /** + * Unselects all check box list items. + */ + UnselectAll(): void; + /** + * Selects items with the specified indices within a check box list. + * @param indices An array of integer values that are the item indices. + */ + SelectIndices(indices: number[]): void; + /** + * Selects the specified items within a check box list. + * @param items An array of ASPxClientListEditItem objects that are the items. + */ + SelectItems(items: ASPxClientListEditItem[]): void; + /** + * Selects items with the specified values within a check box list. + * @param values An array of Object[] objects that are the item values. + */ + SelectValues(values: Object[]): void; + /** + * Unselects items with the specified indices within a check box list. + * @param indices An array of integer values that are the item indices. + */ + UnselectIndices(indices: number[]): void; + /** + * Unselects the specified items within a check box list. + * @param items An array of ASPxClientListEditItem objects that are the items. + */ + UnselectItems(items: ASPxClientListEditItem[]): void; + /** + * Unselects items with the specified values within a check box list. + * @param values An array of Object[] objects that are the item values. + */ + UnselectValues(values: Object[]): void; +} +/** + * A method that will handle the SelectedIndexChanged event. + */ +interface ASPxClientListEditItemSelectedChangedEventHandler { + /** + * A method that will handle the SelectedIndexChanged event. + * @param source The event source. + * @param e An ASPxClientListEditItemSelectedChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientListEditItemSelectedChangedEventArgs): void; +} +/** + * Provides data for the SelectedIndexChanged event. + */ +interface ASPxClientListEditItemSelectedChangedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An integer value that represents the item's index within the corresponding editor's item collection. + */ + index: number; + /** + * Gets whether the item has been selected. + * Value: true if the item is selected; otherwise, false. + */ + isSelected: boolean; +} +/** + * Represents a client-side equivalent of the ASPxProgressBar control. + */ +interface ASPxClientProgressBar extends ASPxClientEditBase { + /** + * Sets the position of the operation's progress. + * @param position An integer value specifying the progress position. + */ + SetPosition(position: number): void; + /** + * Gets the position of the operation's progress. + */ + GetPosition(): number; + /** + * Sets the pattern used to format the displayed text for the progress bar. + * @param text A value that is the format pattern. + */ + SetCustomDisplayFormat(text: string): void; + /** + * Returns the text displayed within the progress bar. + */ + GetDisplayText(): string; + /** + * Sets the percentage representation of the progress position. + */ + GetPercent(): number; + /** + * Sets the minimum range value of the progress bar. + * @param min An integer value specifying the minimum value of the progress bar range. + */ + SetMinimum(min: number): void; + /** + * Sets the maximum range value of the progress bar. + * @param max An integer value specifying the maximum value of the progress bar range. + */ + SetMaximum(max: number): void; + /** + * Gets the minimum range value of the progress bar. + */ + GetMinimum(): number; + /** + * Gets the maximum range value of the progress bar. + */ + GetMaximum(): number; + /** + * Sets the minimum and maximum range values of the progress bar. + * @param minValue An integer value specifying the minimum value of the progress bar range. + * @param maxValue An integer value specifying the maximum value of the progress bar range. + */ + SetMinMaxValues(minValue: number, maxValue: number): void; +} +/** + * Represents a base class for the ASPxClientSpinEdit object. + */ +interface ASPxClientSpinEditBase extends ASPxClientButtonEditBase { + /** + * This event is not in effect for the ASPxClientSpinEditBase. Use the ASPxClientTimeEdit. + */ + TextChanged: ASPxClientEvent>; +} +/** + * Represents the client-side equivalent of the ASPxSpinEdit control. + */ +interface ASPxClientSpinEdit extends ASPxClientSpinEditBase { + /** + * Occurs on the client side when the editor's value is altered in any way. + */ + NumberChanged: ASPxClientEvent>; + /** + * Specifies the value of the spin edit control on the client side. + * @param number A Decimal value specifying the control value. + */ + SetValue(number: number): void; + /** + * Sets the spin editor's value. + * @param number A decimal number specifying the value to assign to the spin editor. + */ + SetNumber(number: number): void; + /** + * Gets a number which represents the spin editor's value. + */ + GetNumber(): number; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Sets the minimum value of the editor. + * @param value A decimal value specifying the minimum value of the editor. + */ + SetMinValue(value: number): void; + /** + * Gets the minimum value of the editor. + */ + GetMinValue(): number; + /** + * Sets the maximum value of the editor. + * @param value A decimal value specifying the maximum value of the editor. + */ + SetMaxValue(value: number): void; + /** + * Gets the maximum value of the editor. + */ + GetMaxValue(): number; + /** + * Changes the editor's value. + * @param value An object representing the data to be assigned to the editor's edit value. + */ + SetValue(value: Object): void; +} +/** + * Represents the client-side equivalent of the ASPxTimeEdit control. + */ +interface ASPxClientTimeEdit extends ASPxClientSpinEditBase { + /** + * Fires after the selected date has been changed within the time editor. + */ + DateChanged: ASPxClientEvent>; + /** + * Specifies the date for the editor. + * @param date A DateTime object that is the date. + */ + SetDate(date: Date): void; + /** + * Gets the date that is the editor's value. + */ + GetDate(): Date; +} +/** + * Represents a base for client-side static editors whose values cannot be visually changed by end users. + */ +interface ASPxClientStaticEdit extends ASPxClientEditBase { + /** + * Occurs on the client side after an end-user clicks within a static editor. + */ + Click: ASPxClientEvent>; +} +/** + * A method that will handle client-side events which concern clicking within editors. + */ +interface ASPxClientEditEventHandler { + /** + * A method that will handle client-side events which concern clicking within editors. + * @param source An object representing the event source. Identifies the editor that raised the event. + * @param e An ASPxClientEditClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEditClickEventArgs): void; +} +/** + * Provides data for the client-side events which concern clicking within editors. + */ +interface ASPxClientEditClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the HTML element related to the event. + * Value: An object that represents the clicked HTML element. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents the client-side equivalent of the ASPxHyperLink control. + */ +interface ASPxClientHyperLink extends ASPxClientStaticEdit { + /** + * Gets an URL which defines the navigation location for the editor's hyperlink. + */ + GetNavigateUrl(): string; + /** + * Specifies an URL which defines the navigation location for the editor's hyperlink. + * @param url A string value which specifies an URL to where the client web browser will navigate when a hyperlink in the editor is clicked. + */ + SetNavigateUrl(url: string): void; + /** + * Gets the text caption displayed for the hyperlink in the hyperlink editor. + */ + GetText(): string; + /** + * Specifies the text caption displayed for the hyperlink in the hyperlink editor. + * @param text A string value specifying the text caption for the hyperlink in the editor. + */ + SetText(text: string): void; +} +/** + * Represents a base for client-side editors which are capable of displaying images. + */ +interface ASPxClientImageBase extends ASPxClientStaticEdit { + /** + * Sets the size of the image displayed within the image editor. + * @param width An integer value that specifies the image's width. + * @param height An integer value that specifies the image's height. + */ + SetSize(width: number, height: number): void; +} +/** + * Represents the client-side equivalent of the ASPxImage control. + */ +interface ASPxClientImage extends ASPxClientImageBase { + /** + * Returns the URL pointing to the image displayed within the image editor. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the image editor. + * @param url A string value specifying the URL to the image displayed within the editor. + */ + SetImageUrl(url: string): void; +} +/** + * Represents the client-side equivalent of the ASPxLabel control. + */ +interface ASPxClientLabel extends ASPxClientStaticEdit { + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Sets the text to be displayed within the editor. + * @param text A string value specifying the text to be displayed within the editor. + */ + SetText(text: string): void; +} +/** + * Represents the client-side equivalent of the ASPxTextBox control. + */ +interface ASPxClientTextBox extends ASPxClientTextBoxBase { +} +/** + * Represents the client-side equivalent of the ASPxMemo control. + */ +interface ASPxClientMemo extends ASPxClientTextEdit { +} +/** + * Represents the client-side equivalent of the ASPxButtonEdit control. + */ +interface ASPxClientButtonEdit extends ASPxClientButtonEditBase { +} +/** + * A method that will handle the ButtonClick event. + */ +interface ASPxClientButtonEditClickEventHandler { + /** + * A method that will handle the ButtonClick event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientButtonEditClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientButtonEditClickEventArgs): void; +} +/** + * Provides data for the ButtonClick event. + */ +interface ASPxClientButtonEditClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the index of the clicked button. + * Value: An integer value representing the index of the clicked button within the editor's Buttons collection. + */ + buttonIndex: number; +} +/** + * A client-side equivalent of the ASPxTokenBox object. + */ +interface ASPxClientTokenBox extends ASPxClientComboBox { + /** + * Fires on the client side after the token collection has been changed. + */ + TokensChanged: ASPxClientEvent>; + /** + * Adds a new token with the specified text to the end of the control's token collection. + * @param text A string value specifying the token's text. + */ + AddToken(text: string): void; + /** + * Removes a token specified by its text from the client token box. + * @param text A string value that is the text of the token to be removed. + */ + RemoveTokenByText(text: string): void; + /** + * Removes a token specified by its index from the client token box. + * @param index An integer value that is the index of the token to be removed. + */ + RemoveToken(index: number): void; + /** + * Returns an HTML span element that corresponds to the specified token. + * @param index An integer value that is the token index. + */ + GetTokenHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified token's text. + * @param index An integer value that is the token index. + */ + GetTokenTextHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified token's remove button. + * @param index An integer value that is the token index. + */ + GetTokenRemoveButtonHtmlElement(index: number): Object; + /** + * Returns a collection of tokens. + */ + GetTokenCollection(): string[]; + /** + * Sets a collection of tokens. + * @param collection A object that is the collection of tokens. + */ + SetTokenCollection(collection: string[]): void; + /** + * Removes all tokens contained in the token box. + */ + ClearTokenCollection(): void; + /** + * Returns the index of a token specified by its text. + * @param text A string value that specifies the text of the token. + */ + GetTokenIndexByText(text: string): number; + /** + * Gets the token texts, separated with a sign, specified by the TextSeparator property. + */ + GetText(): string; + /** + * Sets the token texts, separated with a sign, specified by the TextSeparator property. + * @param text A string value that is the token texts separated with a text separator. + */ + SetText(text: string): void; + /** + * Gets the editor value. + */ + GetValue(): string; + /** + * Sets the editor value. + * @param value A string that is the editor value. + */ + SetValue(value: string): void; + /** + * Returns a value that indicates if the specified token (string) is a custom token. + * @param text A string value that is a token. + * @param caseSensitive true, if tokens are case sensitive; otherwise, false. + */ + IsCustomToken(text: string, caseSensitive: boolean): boolean; + /** + * Changes the editor's value. + * @param value An object representing the data to be assigned to the editor's edit value. + */ + SetValue(value: Object): void; +} +/** + * The client-side equivalent of the ASPxTrackBar control. + */ +interface ASPxClientTrackBar extends ASPxClientEdit { + /** + * Fires on the client side before a track bar position is changed and allows you to cancel the action. + */ + PositionChanging: ASPxClientEvent>; + /** + * Fires after the editor's position has been changed. + */ + PositionChanged: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user moves a cursor while the drag handle is held down. + */ + Track: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses a drag handle and moves it. + */ + TrackStart: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user releases a drag handle after moving it. + */ + TrackEnd: ASPxClientEvent>; + /** + * Returns a track bar item index by the item's value. + * @param value An object that specifies the item's value. + */ + GetItemIndexByValue(value: Object): number; + /** + * Returns a track bar item's associated value. + * @param index An integer value that specifies the required item's index. + */ + GetItemValue(index: number): Object; + /** + * Returns a track bar item text. + * @param index An integer value that specifies the required item's index. + */ + GetItemText(index: number): string; + /** + * Returns a track bar item's tooltip text. + * @param index An integer value that specifies the required item's index. + */ + GetItemToolTip(index: number): string; + /** + * Returns the number of the track bar items that are maintained by the item collection. + */ + GetItemCount(): number; + /** + * Specifies the secondary drag handle position. + * @param position A value that specifies the position. + */ + SetPositionEnd(position: number): void; + /** + * Specifies the main drag handle position. + * @param position A value that specifies the position. + */ + SetPositionStart(position: number): void; + /** + * Returns the secondary drag handle position. + */ + GetPositionEnd(): number; + /** + * Returns the main drag handle position. + */ + GetPositionStart(): number; + /** + * Gets a drag handle position. + */ + GetPosition(): number; + /** + * Specifies a drag handle position. + * @param position A value that specifies the position. + */ + SetPosition(position: number): void; +} +/** + * A method that will handle the client PositionChanging event. + */ +interface ASPxClientTrackBarPositionChangingEventHandler { + /** + * A method that will handle the PositionChanging event. + * @param source The event source. Identifies the ASPxTrackBar control that raised the event. + * @param e A ASPxClientTrackBarPositionChangingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTrackBarPositionChangingEventArgs): void; +} +/** + * Provides data for the PositionChanging event. + */ +interface ASPxClientTrackBarPositionChangingEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; + /** + * Gets the current drag handle position. + * Value: A value that is the drag handle position. + */ + currentPosition: number; + /** + * Gets the current secondary drag handle position. + * Value: A value that is the drag handle position. + */ + currentPositionEnd: number; + /** + * Gets the current main drag handle position. + * Value: A value that is the drag handle position. + */ + currentPositionStart: number; + /** + * Gets a position where the drag handle is being moved. + * Value: A value that is the drag handle position. + */ + newPosition: number; + /** + * Gets a position where the secondary drag handle is being moved. + * Value: A value that is the drag handle position. + */ + newPositionEnd: number; + /** + * Gets a position where the main drag handle is being moved. + * Value: A value that is the drag handle position. + */ + newPositionStart: number; +} +/** + * Represents the client-side equivalent of the ASPxValidationSummary control. + */ +interface ASPxClientValidationSummary extends ASPxClientControl { + /** + * Occurs on the client side when the validation summary's visibility is changed. + */ + VisibilityChanged: ASPxClientEvent>; +} +/** + * A method that will handle the VisibilityChanged event. + */ +interface ASPxClientValidationSummaryVisibilityChangedEventHandler { + /** + * A method that will handle the VisibilityChanged client event. + * @param source An object representing the event source. + * @param e A ASPxClientValidationSummaryVisibilityChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientValidationSummaryVisibilityChangedEventArgs): void; +} +/** + * Provides data for the VisibilityChanged event. + */ +interface ASPxClientValidationSummaryVisibilityChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether the editor is visible on the client. + * Value: true if the editor is visible; otherwise, false. + */ + visible: boolean; +} +/** + * Represents the client ASPxGaugeControl. + */ +interface ASPxClientGaugeControl extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires when errors have occurred during callback processing. + */ + CallbackError: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * Lists values that specify the position relative to the target column in which a moved column should be placed. + */ +interface ASPxClientGridColumnMovingTargetPosition { + /** + * A moved column should be placed to the right of the target column. + */ + Right: number; + /** + * A moved column should be placed to the left of the target column. + */ + Left: number; + /** + * A moved column should be placed at the top of the target column. + */ + Top: number; + /** + * A moved column should be placed at the bottom of the target column. + */ + Bottom: number; +} +/** + * Represents the client ASPxGridView. + */ +interface ASPxClientGridBase extends ASPxClientControl { +} +/** + * Serves as a base object implementing the client column functionality. + */ +interface ASPxClientGridColumnBase { +} +/** + * The client-side equivalent of the ASPxGridLookup control. + */ +interface ASPxClientGridLookup extends ASPxClientDropDownEditBase { + /** + * Fires on the client when a data row is clicked within the built-in dropdown grid. + */ + RowClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Returns a client object representing the built-in dropdown grid. + */ + GetGridView(): ASPxClientGridView; + /** + * Confirms the current selection made by an end-user within the editor's dropdown grid. + */ + ConfirmCurrentSelection(): void; + /** + * Cancels the current selection made by an end-user within the editor's dropdown grid and rolls back to the last confirmed selection. The selection can be confirmed by either pressing the Enter key or calling the ConfirmCurrentSelection method. + */ + RollbackToLastConfirmedSelection(): void; +} +/** + * Represents the client ASPxCardView. + */ +interface ASPxClientCardView extends ASPxClientGridBase { + /** + * Provides access to the batch editing client API. + * Value: A object that exposes the batch editing client API methods. + */ + batchEditApi: ASPxClientCardViewBatchEditApi; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Enables you to prevent columns from being sorted. + */ + ColumnSorting: ASPxClientEvent>; + /** + * Occurs when a grid switches to batch edit mode. + */ + BatchEditStartEditing: ASPxClientEvent>; + /** + * Occurs when a grid leaves batch edit mode. + */ + BatchEditEndEditing: ASPxClientEvent>; + /** + * Enables you to prevent a batch edit confirmation message from being displayed. + */ + BatchEditConfirmShowing: ASPxClientEvent>; + /** + * Enables you to provide navigation for editors contained in a templated cell in Batch Edit mode. + */ + BatchEditTemplateCellFocused: ASPxClientEvent>; + /** + * Enables you to specify whether card data is valid and provide an error text. + */ + BatchEditCardValidating: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are saved in batch edit mode. + */ + BatchEditChangesSaving: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are canceled in batch edit mode. + */ + BatchEditChangesCanceling: ASPxClientEvent>; + /** + * Occurs on the client side before a card is inserted in batch edit mode. + */ + BatchEditCardInserting: ASPxClientEvent>; + /** + * Occurs on the client side before a card is deleted in batch edit mode. + */ + BatchEditCardDeleting: ASPxClientEvent>; + /** + * Fires on the client when a card is clicked. + */ + CardClick: ASPxClientEvent>; + /** + * Fires on the client when a card is double clicked. + */ + CardDblClick: ASPxClientEvent>; + /** + * Fires in response to changing card focus. + */ + FocusedCardChanged: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientCardView. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after the customization window has been closed. + */ + CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Returns the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditValue(columnFieldNameOrId: string): string; + /** + * Moves focus to the specified edit cell within the edited card. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + */ + FocusEditor(column: ASPxClientCardViewColumn): void; + /** + * Moves focus to the specified edit cell within the edited card. + * @param columnIndex An integer value that specifies the column's position within the columns collection. + */ + FocusEditor(columnIndex: number): void; + /** + * Moves focus to the specified edit cell within the edited card. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + FocusEditor(columnFieldNameOrId: string): void; + /** + * Sets the value of the specified edit cell. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(column: ASPxClientCardViewColumn, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnIndex: number, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnFieldNameOrId: string, value: string): void; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVerticalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Gets information about a focused cell. + */ + GetFocusedCell(): ASPxClientCardViewCellInfo; + /** + * Focuses the specified cell. + * @param cardVisibleIndex An value that specifies the visible index of the card. + * @param columnIndex A zero-based index that identifies the column in the column collection (the column's Index property value). + */ + SetFocusedCell(cardVisibleIndex: number, columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientCardViewColumn object that represents the data column. + */ + SortBy(column: ASPxClientCardViewColumn): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + SortBy(columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + SortBy(columnFieldNameOrId: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientCardViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(column: ASPxClientCardViewColumn, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnFieldNameOrId: string, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientCardViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(column: ASPxClientCardViewColumn, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param column An ASPxClientCardViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex + */ + SortBy(column: ASPxClientCardViewColumn, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Hides the specified column. + * @param column An ASPxClientCardViewColumn object that represents the column to hide. + */ + MoveColumn(column: ASPxClientCardViewColumn): void; + /** + * Hides the specified column. + * @param columnIndex An integer value that specifies the absolute index of the column to hide. + */ + MoveColumn(columnIndex: number): void; + /** + * Hides the specified column. + * @param columnFieldNameOrId A string value that identifies the column to be hidden by the name of the data source field to which the column is bound, or by the column's name. + */ + MoveColumn(columnFieldNameOrId: string): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param column An ASPxClientCardViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the ASPxCardView. + */ + MoveColumn(column: ASPxClientCardViewColumn, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the ASPxCardView. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param column An ASPxClientCardViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the CardView. + * @param moveBefore true, to move the column before the target column; otherwise, false. + */ + MoveColumn(column: ASPxClientCardViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Returns the key value of the specified card. + * @param visibleIndex An integer value that specifies the card's visible index. + */ + GetCardKey(visibleIndex: number): string; + /** + * Switches the CardView to edit mode. + * @param visibleIndex A zero-based integer that identifies a card to be edited. + */ + StartEditCard(visibleIndex: number): void; + /** + * Switches the ASPxCardView to edit mode. + * @param key An object that uniquely identifies a card to be edited. + */ + StartEditCardByKey(key: Object): void; + /** + * Indicates whether or not a new card is being edited. + */ + IsNewCardEditing(): boolean; + /** + * Adds a new record. + */ + AddNewCard(): void; + /** + * Deletes the specified card. + * @param visibleIndex An integer value that identifies the card. + */ + DeleteCard(visibleIndex: number): void; + /** + * Deletes a card with the specified key value. + * @param key An object that uniquely identifies the card. + */ + DeleteCardByKey(key: Object): void; + /** + * Returns the focused card's index. + */ + GetFocusedCardIndex(): number; + /** + * Moves focus to the specified card. + * @param visibleIndex An integer value that specifies the focused card's index. + */ + SetFocusedCardIndex(visibleIndex: number): void; + /** + * Selects all the unselected cards within the CardView. + */ + SelectCards(): void; + /** + * Selects the specified card displayed within the CardView. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + SelectCards(visibleIndex: number): void; + /** + * Selects the specified cards within the CardView. + * @param visibleIndices An array of zero-based indices that identify data cards within the grid. + */ + SelectCards(visibleIndices: number[]): void; + /** + * Selects or deselects the specified cards within the CardView. + * @param visibleIndices An array of zero-based indices that identify data cards within the grid. + * @param selected true to select the specified cards; false to deselect the cards. + */ + SelectCards(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified card within the GridView. + * @param visibleIndex An integer zero-based index that identifies the data card within the grid. + * @param selected true to select the specified card; false to deselect the card. + */ + SelectCards(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified cards displayed within the CardView. + * @param keys An array of objects that uniquely identify the cards. + * @param selected true to select the specified cards; false to deselect the cards. + */ + SelectCardsByKey(keys: Object[], selected?: boolean): void; + /** + * Selects or deselects the specified card displayed within the CardView. + * @param key An object that uniquely identifies the card. + * @param selected true to select the specified card; false to deselect the card. + */ + SelectCardsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified cards displayed within the CardView. + * @param keys An array of objects that uniquely identify the cards. + */ + SelectCardsByKey(keys: Object[]): void; + /** + * Selects a card displayed within the CardView by its key. + * @param key An object that uniquely identifies the card. + */ + SelectCardsByKey(key: Object): void; + /** + * Deselects the specified cards displayed within the ASPxCardView. + * @param keys An array of objects that uniquely identify the cards. + */ + UnselectCardsByKey(keys: Object[]): void; + /** + * Deselects the specified card displayed within the ASPxCardView. + * @param key An object that uniquely identifies the card. + */ + UnselectCardsByKey(key: Object): void; + /** + * Deselects all the selected cards within the ASPxCardView. + */ + UnselectCards(): void; + /** + * Deselects the specified cards (if selected) within the ASPxCardView. + * @param visibleIndices An array of zero-based indices that identify data cards within the grid. + */ + UnselectCards(visibleIndices: number[]): void; + /** + * Deselects the specified cards (if selected) within the ASPxCardView. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + UnselectCards(visibleIndex: number): void; + /** + * Deselects all grid cards that match the filter criteria currently applied to the CardView. + */ + UnselectFilteredCards(): void; + /** + * Selects the specified card displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + SelectCardOnPage(visibleIndex: number): void; + /** + * Selects or deselects the specified card displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + * @param selected true to select the specified card; false to deselect the card. + */ + SelectCardOnPage(visibleIndex: number, selected?: boolean): void; + /** + * Deselects the specified cards (if selected) displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + UnselectCardOnPage(visibleIndex: number): void; + /** + * Selects all unselected cards displayed on the current page. + */ + SelectAllCardsOnPage(): void; + /** + * Allows you to select or deselect all cards displayed on the current page based on the parameter passed. + * @param selected true to select all unselected cards displayed on the current page; false to deselect all selected cards on the page. + */ + SelectAllCardsOnPage(selected: boolean): void; + /** + * Deselects all selected cards displayed on the current page. + */ + UnselectAllCardsOnPage(): void; + /** + * Returns the number of selected cards. + */ + GetSelectedCardCount(): number; + /** + * Indicates whether or not the specified card is selected within the current page. + * @param visibleIndex An integer value that identifies the card by its visible index. + */ + IsCardSelectedOnPage(visibleIndex: number): boolean; + /** + * Applies the specified search panel filter criterion to grid data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Applies the specified filter expression to the grid. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client CardView. + */ + ClearFilter(): void; + /** + * Gets the Popup Edit Form. + */ + GetPopupEditForm(): ASPxClientPopupControl; + /** + * Sets input focus to the grid. + */ + Focus(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * + * @param args + * @param onSuccess + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Selects the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the grid's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Returns the index of the first card displayed within the grid's active page. + */ + GetTopVisibleIndex(): number; + /** + * Indicates whether the grid is in edit mode. + */ + IsEditing(): boolean; + /** + * Saves all the changes made and switches the grid to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the CardView to browse mode. + */ + CancelEdit(): void; + /** + * Updates data displayed within the grid. + */ + Refresh(): void; + /** + * Indicates whether the customization window is displayed. + */ + IsCustomizationWindowVisible(): boolean; + /** + * Invokes the customization window. + */ + ShowCustomizationWindow(): void; + /** + * Invokes the customization window and displays it over the specified HTML element. + * @param showAtElement An object that specifies the HTML element relative to whose position the customization window is invoked. + */ + ShowCustomizationWindow(showAtElement?: Object): void; + /** + * Closes the customization window. + */ + HideCustomizationWindow(): void; + /** + * Returns the number of columns within the client grid. + */ + GetColumnCount(): number; + /** + * Returns the card values displayed within all selected cards. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the selected cards are returned. + * @param onCallback An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter. + */ + GetSelectedFieldValues(fieldNames: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns key values of selected cards displayed within the current page. + */ + GetSelectedKeysOnPage(): Object[]; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback An ASPxClientCardViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns the values of the specified data source fields within the specified card. + * @param visibleIndex An integer value that identifies the data card. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the specified card are returned. + * @param onCallback An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter. + */ + GetCardValues(visibleIndex: number, fieldNames: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns the card values displayed within the current page. + * @param fieldNames The names of data source fields whose values are returned. + * @param onCallback An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter. + */ + GetPageCardValues(fieldNames: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns the number of cards actually displayed within the active page. + */ + GetVisibleCardsOnPage(): number; + /** + * Returns the client column that resides at the specified position within the column collection. + * @param columnIndex A zero-based index that identifies the column within the column collection (the column's Index property value). + */ + GetColumn(columnIndex: number): ASPxClientCardViewColumn; + /** + * Returns the column with the specified unique identifier. + * @param columnId A string value that specifies the column's unique identifier (the column's Name property value). + */ + GetColumnById(columnId: string): ASPxClientCardViewColumn; + /** + * Returns the client column which is bound to the specified data source field. + * @param columnFieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). + */ + GetColumnByField(columnFieldName: string): ASPxClientCardViewColumn; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientCardViewColumn object that specifies the required column within the client grid. + */ + GetEditor(column: ASPxClientCardViewColumn): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GetEditor(columnIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditor(columnFieldNameOrId: string): ASPxClientEdit; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + */ + GetEditValue(column: ASPxClientCardViewColumn): string; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + */ + GetEditValue(columnIndex: number): string; +} +/** + * Represents a client column. + */ +interface ASPxClientCardViewColumn extends ASPxClientGridColumnBase { + /** + * Gets the name that uniquely identifies the column. + * Value: A string value assigned to the column's Name property. + */ + name: string; + /** + * Gets the column's position within the collection. + * Value: An integer zero-bazed index that specifies the column's position within the collection. + */ + index: number; + /** + * Gets the name of the database field assigned to the current column. + * Value: A string value that specifies the name of a data field. + */ + fieldName: string; + /** + * Gets whether the column is visible. + * Value: true to display the column; otherwise, false. + */ + visible: boolean; +} +/** + * Represents a JavaScript function which receives the list of card values when the client GetSelectedFieldValues method is called. + */ +interface ASPxClientCardViewValuesCallback { + /** + * Represents a JavaScript function which receives the list of card values when the client GetSelectedFieldValues method is called. + * @param result An object that represents the list of card values received from the server. + */ + (result: Object): void; +} +/** + * A method that will handle the cancelable events of a client ASPxCardView column. + */ +interface ASPxClientCardViewColumnCancelEventHandler { + /** + * A method that will handle the cancelable events of a client ASPxCardView column. + * @param source The event source. This parameter identifies the ASPxClientCardView object that raised the event. + * @param e An ASPxClientCardViewColumnCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewColumnCancelEventArgs): void; +} +/** + * Provides data for the cancelable events of a client ASPxCardView column. + */ +interface ASPxClientCardViewColumnCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client column. + * Value: An ASPxClientCardViewColumn object that represents the processed column. + */ + column: ASPxClientCardViewColumn; +} +/** + * A method that will handle the CardClick event. + */ +interface ASPxClientCardViewCardClickEventHandler { + /** + * A method that will handle the CardClick event. + * @param source The event source. This parameter identifies the ASPxClientCardView object that raised the event. + * @param e An ASPxClientCardViewCardClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewCardClickEventArgs): void; +} +/** + * Provides data for the CardClick event. + */ +interface ASPxClientCardViewCardClickEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed card's visible index. + * Value: An integer zero-based index that identifies the processed record. + */ + visibleIndex: number; + /** + * Provides access to the parameters associated with the CardClick event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientCardViewCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. This parameter identifies the ASPxClientCardView object that raised the event. + * @param e An ASPxClientCardViewCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewCustomButtonEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientCardViewCustomButtonEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the value which identifies the card whose custom button has been clicked. + * Value: An integer value that identifies the card whose custom button has been clicked. + */ + visibleIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A string value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the SelectionChanged event. + */ +interface ASPxClientCardViewSelectionEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. + * @param e An ASPxClientCardViewSelectionEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewSelectionEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientCardViewSelectionEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the visible index of the card whose selected state has been changed. + * Value: An value that specifies the visible index of the card. + */ + visibleIndex: number; + /** + * Gets whether the card has been selected. + * Value: true if the card has been selected; otherwise, false. + */ + isSelected: boolean; + /** + * Gets whether all cards displayed within a page have been selected or unselected. + * Value: true if all cards displayed within a page have been selected or unselected; otherwise, false. + */ + isAllRecordsOnPage: boolean; + /** + * Gets whether a selection has been changed on the server. + * Value: true if a selection has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the client BatchEditStartEditing event. + */ +interface ASPxClientCardViewBatchEditStartEditingEventHandler { + /** + * A method that will handle the BatchEditStartEditing event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditStartEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditStartEditingEventArgs): void; +} +/** + * Provides data for the BatchEditStartEditing event. + */ +interface ASPxClientCardViewBatchEditStartEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the card whose cells are about to be edited. + * Value: An value that specifies the visible index of the card. + */ + visibleIndex: number; + /** + * Gets the CardView column that owns a cell that is about to be edited. + * Value: An object that is the focused CardView column. + */ + focusedColumn: ASPxClientCardViewColumn; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + cardValues: Object; +} +/** + * A method that will handle the client BatchEditEndEditing event. + */ +interface ASPxClientCardViewBatchEditEndEditingEventHandler { + /** + * A method that will handle the BatchEditEndEditing event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditEndEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditEndEditingEventArgs): void; +} +/** + * Provides data for the BatchEditEndEditing event. + */ +interface ASPxClientCardViewBatchEditEndEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the card whose cells have been edited. + * Value: An value that specifies the visible index of the card. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + cardValues: Object; +} +/** + * A method that will handle the client BatchEditCardValidating event. + */ +interface ASPxClientCardViewBatchEditCardValidatingEventHandler { + /** + * A method that will handle the BatchEditCardValidating event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditCardValidatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditCardValidatingEventArgs): void; +} +/** + * Provides data for the BatchEditCardValidating event. + */ +interface ASPxClientCardViewBatchEditCardValidatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed card's visible index. + * Value: An integer value that specifies the processed card's visible index. + */ + visibleIndex: number; + /** + * Provides validation information of a card currently being validated. + * Value: An object that is a hashtable containing validation information. + */ + validationInfo: Object; +} +/** + * Represents an object that will handle the client-side BatchEditConfirmShowing event. + */ +interface ASPxClientCardViewBatchEditConfirmShowingEventHandler { + /** + * A method that will handle the BatchEditConfirmShowing client event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditConfirmShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditConfirmShowingEventArgs): void; +} +/** + * Provides data for the BatchEditConfirmShowing event. + */ +interface ASPxClientCardViewBatchEditConfirmShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the client identifier of an object that initiates a send request. + * Value: A string value that specifies the object client identifier. + */ + requestTriggerID: string; +} +/** + * A method that will handle the client BatchEditTemplateCellFocused event. + */ +interface ASPxClientCardViewBatchEditTemplateCellFocusedEventHandler { + /** + * A method that will handle the BatchEditTemplateCellFocused event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientCardViewBatchEditTemplateCellFocusedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditTemplateCellFocusedEventArgs): void; +} +/** + * Provides data for the BatchEditTemplateCellFocused event. + */ +interface ASPxClientCardViewBatchEditTemplateCellFocusedEventArgs extends ASPxClientEventArgs { + /** + * Gets the currently processed column. + * Value: An object that is the client-side column object. + */ + column: ASPxClientCardViewColumn; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the BatchEditChangesSaving event. + */ +interface ASPxClientCardViewBatchEditChangesSavingEventHandler { + /** + * A method that will handle the BatchEditChangesSaving event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditChangesSavingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditChangesSavingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesSaving event. + */ +interface ASPxClientCardViewBatchEditChangesSavingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditChangesCanceling event. + */ +interface ASPxClientCardViewBatchEditChangesCancelingEventHandler { + /** + * A method that will handle the BatchEditChangesCanceling event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditChangesCancelingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditChangesCancelingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesCanceling event. + */ +interface ASPxClientCardViewBatchEditChangesCancelingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditCardInserting event. + */ +interface ASPxClientCardViewBatchEditCardInsertingEventHandler { + /** + * A method that will handle the BatchEditCardInserting event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditCardInsertingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditCardInsertingEventArgs): void; +} +/** + * Provides data for the BatchEditCardInserting event. + */ +interface ASPxClientCardViewBatchEditCardInsertingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed card visible index. + * Value: An integer value that specifies the processed card visible index. + */ + visibleIndex: number; +} +/** + * A method that will handle the BatchEditCardDeleting event. + */ +interface ASPxClientCardViewBatchEditCardDeletingEventHandler { + /** + * A method that will handle the BatchEditCardDeleting event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditCardDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditCardDeletingEventArgs): void; +} +/** + * Provides data for the BatchEditCardDeleting event. + */ +interface ASPxClientCardViewBatchEditCardDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed card visible index. + * Value: An integer value that specifies the processed card visible index. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + cardValues: Object; +} +/** + * Provides members related to Batch Edit Mode + */ +interface ASPxClientCardViewBatchEditApi { + /** + * Performs validation of CardView data contained in the cards when the CardView operates in Batch Edit mode. + * @param validateOnlyModified true, if only modified cards should be validated; otherwise, false. + */ + ValidateCards(validateOnlyModified?: boolean): boolean; + /** + * Performs validation of CardView data contained in the specified card when the CardView operates in Batch Edit mode. + * @param visibleIndex An integer value specifying the visible index of the validated card. + */ + ValidateCard(visibleIndex: number): boolean; + /** + * Returns an array of card visible indices. + * @param includeDeleted true, to include visible indices of deleted cards to the returned array; otherwise, false. + */ + GetCardVisibleIndices(includeDeleted: boolean): number[]; + /** + * Returns an array of the deleted card visible indices. + */ + GetDeletedCardIndices(): number[]; + /** + * Returns an array of the inserted card visible indices. + */ + GetInsertedCardIndices(): number[]; + /** + * Indicates if the card with the specified visible index is deleted. + * @param visibleIndex An integer value that identifies the card by its visible index. + */ + IsDeletedCard(visibleIndex: number): boolean; + /** + * Indicates if the card with the specified visible index is newly created. + * @param visibleIndex An integer value that identifies the card by its visible index. + */ + IsNewCard(visibleIndex: number): boolean; + /** + * Programmatically moves the focus to the previous cell in the card + */ + MoveFocusBackward(): boolean; + /** + * Programmatically moves the focus to the next cell in the card. + */ + MoveFocusForward(): boolean; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the card containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object): void; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the card containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + * @param displayText A string value that specifies the cell display text. + * @param cancelCellHighlighting true to cancel highlighting of the modified cell, false to highlight the modified cell. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object, displayText: string, cancelCellHighlighting?: boolean): void; + /** + * Gets the value of the specified cell. + * @param visibleIndex A zero-based integer value that specifies the visible index of a card containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). + */ + GetCellValue(visibleIndex: number, columnFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets information about the cell currently being edited. + */ + GetEditCellInfo(): ASPxClientCardViewCellInfo; + /** + * Returns a value that indicates whether the card view has changed data. + */ + HasChanges(): boolean; + /** + * Returns a value that indicates whether the specified card has changed data. + * @param visibleIndex An integer value that specifies the visible index of a card. + */ + HasChanges(visibleIndex: number): boolean; + /** + * Returns a value that indicates whether the specified cell's data has been changed. + * @param visibleIndex An integer value that specifies the visible index of a card. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + HasChanges(visibleIndex: number, columnFieldNameOrId: string): boolean; + /** + * Resets changes in the specified card. + * @param visibleIndex An integer value that specifies the visible index of a card. + */ + ResetChanges(visibleIndex: number): void; + /** + * Resets changes in the specified cell. + * @param visibleIndex An integer value that specifies the visible index of a card containing the processed cell. + * @param columnIndex A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + */ + ResetChanges(visibleIndex: number, columnIndex: number): void; + /** + * Switches the specified cell to edit mode. + * @param visibleIndex A zero-based integer value that specifies the visible index of a card containing the processed cell. + * @param columnIndex A zero-based integer value that identifies the column which contains the processed cell in the column collection. + */ + StartEdit(visibleIndex: number, columnIndex: number): void; + /** + * Ends cell or card editing. + */ + EndEdit(): void; +} +/** + * Contains information on a grid cell. + */ +interface ASPxClientCardViewCellInfo { + /** + * Gets the visible index of the card that contains the cell currently being processed. + * Value: An value that specifies the visible index of the card. + */ + cardVisibleIndex: number; + /** + * Gets the data column that contains the cell currently being processed. + * Value: An object that is the data column which contains the processed cell. + */ + column: ASPxClientCardViewColumn; +} +/** + * A client-side equivalent of the ASPxGridView object. + */ +interface ASPxClientGridView extends ASPxClientGridBase { + /** + * Provides access to the batch editing client API. + * Value: A object that exposes the batch editing client API methods. + */ + batchEditApi: ASPxClientGridViewBatchEditApi; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Enables you to prevent columns from being sorted. + */ + ColumnSorting: ASPxClientEvent>; + /** + * Fires in response to changing row focus. + */ + FocusedRowChanged: ASPxClientEvent>; + /** + * Enables you to cancel data grouping. + */ + ColumnGrouping: ASPxClientEvent>; + /** + * Fires when an end-user starts dragging the column's header and enables you to cancel this operation. + */ + ColumnStartDragging: ASPxClientEvent>; + /** + * Enables you to prevent columns from being resized. + */ + ColumnResizing: ASPxClientEvent>; + /** + * Occurs after a column's width has been changed by an end-user. + */ + ColumnResized: ASPxClientEvent>; + /** + * Enables you to control column movement. + */ + ColumnMoving: ASPxClientEvent>; + /** + * Fires before a group row is expanded. + */ + RowExpanding: ASPxClientEvent>; + /** + * Fires before a group row is collapsed. + */ + RowCollapsing: ASPxClientEvent>; + /** + * Fires before a detail row is expanded. + */ + DetailRowExpanding: ASPxClientEvent>; + /** + * Fires before a detail row is collapsed. + */ + DetailRowCollapsing: ASPxClientEvent>; + /** + * Fires on the client when a data row is clicked. + */ + RowClick: ASPxClientEvent>; + /** + * Fires on the client when a data row is double clicked. + */ + RowDblClick: ASPxClientEvent>; + /** + * Occurs after an end-user right clicks in the GridView, and enables you to provide a custom context menu. + */ + ContextMenu: ASPxClientEvent>; + /** + * Fires on the client side when a context menu item has been clicked. + */ + ContextMenuItemClick: ASPxClientEvent>; + /** + * Enables you to specify whether row data is valid and provide an error text. + */ + BatchEditRowValidating: ASPxClientEvent>; + /** + * Enables you to prevent a batch edit confirmation message from being displayed. + */ + BatchEditConfirmShowing: ASPxClientEvent>; + /** + * Occurs when a grid switches to batch edit mode. + */ + BatchEditStartEditing: ASPxClientEvent>; + /** + * Occurs when a grid leaves the batch edit mode. + */ + BatchEditEndEditing: ASPxClientEvent>; + /** + * Enables you to provide navigation for editors contained in a templated cell in Batch Edit mode. + */ + BatchEditTemplateCellFocused: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are saved in batch edit mode. + */ + BatchEditChangesSaving: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are canceled in batch edit mode. + */ + BatchEditChangesCanceling: ASPxClientEvent>; + /** + * Occurs on the client side before a data row is inserted in batch edit mode. + */ + BatchEditRowInserting: ASPxClientEvent>; + /** + * Occurs on the client side before a data row is deleted in batch edit mode. + */ + BatchEditRowDeleting: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientGridView. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after the Customization Window has been closed. + */ + CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Deselects the specified rows (if selected) within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + */ + UnselectRows(visibleIndices: number[]): void; + /** + * Deselects the specified row (if selected) within the grid. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + UnselectRows(visibleIndex: number): void; + /** + * Deselects all grid rows that match the filter criteria currently applied to the grid. + */ + UnselectFilteredRows(): void; + /** + * Selects the specified row displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + SelectRowOnPage(visibleIndex: number): void; + /** + * Selects or deselects the specified row displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRowOnPage(visibleIndex: number, selected?: boolean): void; + /** + * Deselects the specified row (if selected) displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + UnselectRowOnPage(visibleIndex: number): void; + /** + * Selects all unselected rows displayed on the current page. + */ + SelectAllRowsOnPage(): void; + /** + * Allows you to select or deselect all rows displayed on the current page based on the parameter passed. + * @param selected true to select all unselected rows displayed on the current page; false to deselect all selected rows on the page. + */ + SelectAllRowsOnPage(selected: boolean): void; + /** + * Deselects all selected rows displayed on the current page. + */ + UnselectAllRowsOnPage(): void; + /** + * Returns the number of selected rows. + */ + GetSelectedRowCount(): number; + /** + * Indicates whether or not the specified row is selected within the current page. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsRowSelectedOnPage(visibleIndex: number): boolean; + /** + * Indicates whether the specified row is a group row. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsGroupRow(visibleIndex: number): boolean; + /** + * Indicates whether the specified row is a data row. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsDataRow(visibleIndex: number): boolean; + /** + * Indicates whether the specified group row is expanded. + * @param visibleIndex An integer value that identifies the group row by its visible index. + */ + IsGroupRowExpanded(visibleIndex: number): boolean; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVertScrollPos(): number; + /** + * Returns the current horizontal scroll position of the grid's content. + */ + GetHorzScrollPos(): number; + /** + * Returns the current horizontal scroll position of the grid's content. + */ + GetHorizontalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVertScrollPos(position: number): void; + /** + * Specifies the horizontal scroll position for the grid's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorzScrollPos(position: number): void; + /** + * Specifies the horizontal scroll position for the grid's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorizontalScrollPosition(position: number): void; + /** + * Sets the scrollability of various types of grid rows when the grid displays fixed columns. + * @param scrollableRowSettings An object specifying which types of grid rows should or should not be scrollable. + */ + SetFixedColumnScrollableRows(scrollableRowSettings: Object): void; + /** + * Applies a filter specified in the filter row to the GridView. + */ + ApplyOnClickRowFilter(): void; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param column An ASPxClientGridViewColumn object that represents the data colum within the ASPxGridView. + */ + GetAutoFilterEditor(column: ASPxClientGridViewColumn): Object; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param columnIndex An integer value that identifies the data column by its index. + */ + GetAutoFilterEditor(columnIndex: number): Object; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param columnFieldNameOrId A string value that specifies the column's name or its data base field name. + */ + GetAutoFilterEditor(columnFieldNameOrId: string): Object; + /** + * Applies a filter to the specified data column. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client GridView. + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(column: ASPxClientGridViewColumn, val: string): void; + /** + * Applies a filter to the specified data column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(columnIndex: number, val: string): void; + /** + * Applies a filter to the specified data column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(columnFieldNameOrId: string, val: string): void; + /** + * Applies the specified search panel filter criterion to grid data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Applies the specified filter expression to the GridView. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client GridView. + */ + ClearFilter(): void; + /** + * Gets the Popup Edit Form. + */ + GetPopupEditForm(): ASPxClientPopupControl; + /** + * Sets input focus to the grid. + */ + Focus(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * + * @param args + * @param onSuccess + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Selects the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the grid's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Returns the index of the first data row displayed within the GridView's active page. + */ + GetTopVisibleIndex(): number; + /** + * Indicates whether the grid is in edit mode. + */ + IsEditing(): boolean; + /** + * Saves all the changes made and switches the grid to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the GridView to browse mode. + */ + CancelEdit(): void; + /** + * Updates data displayed within the grid. + */ + Refresh(): void; + /** + * Indicates whether the Customization Window is displayed. + */ + IsCustomizationWindowVisible(): boolean; + /** + * Invokes the Customization Window. + */ + ShowCustomizationWindow(): void; + /** + * Invokes the Customization Window and displays it over the specified HTML element. + * @param showAtElement An object that specifies the HTML element relative to whose position the customization window is invoked. + */ + ShowCustomizationWindow(showAtElement?: Object): void; + /** + * Closes the Customization Window. + */ + HideCustomizationWindow(): void; + /** + * Returns the number of columns within the client GridView. + */ + GetColumnsCount(): number; + /** + * Returns the number of columns within the client GridView. + */ + GetColumnCount(): number; + /** + * Returns the row values displayed within all selected rows. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the selected rows are returned. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetSelectedFieldValues(fieldNames: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns key values of selected rows displayed within the current page. + */ + GetSelectedKeysOnPage(): Object[]; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientGridViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns the values of the specified data source fields within the specified row. + * @param visibleIndex An integer value that identifies the data row. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the specified row are returned. + * @param onCallback An ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetRowValues(visibleIndex: number, fieldNames: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns the row values displayed within the current page. + * @param fieldNames The names of data source fields whose values are returned. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetPageRowValues(fieldNames: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns the number of rows actually displayed within the active page. + */ + GetVisibleRowsOnPage(): number; + /** + * Returns the client column that resides at the specified position within the column collection. + * @param columnIndex A zero-based index that identifies the column within the column collection (the column's Index property value). + */ + GetColumn(columnIndex: number): ASPxClientGridViewColumn; + /** + * Returns the column with the specified unique identifier. + * @param columnId A string value that specifies the column's unique identifier (the column's Name property value). + */ + GetColumnById(columnId: string): ASPxClientGridViewColumn; + /** + * Returns the client column which is bound to the specified data source field. + * @param columnFieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). + */ + GetColumnByField(columnFieldName: string): ASPxClientGridViewColumn; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientGridViewColumn object that specifies the required column within the client grid. + */ + GetEditor(column: ASPxClientGridViewColumn): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GetEditor(columnIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditor(columnFieldNameOrId: string): ASPxClientEdit; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client grid. + */ + GetEditValue(column: ASPxClientGridViewColumn): string; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + */ + GetEditValue(columnIndex: number): string; + /** + * Returns the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditValue(columnFieldNameOrId: string): string; + /** + * Moves focus to the specified edit cell within the edited row. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client grid. + */ + FocusEditor(column: ASPxClientGridViewColumn): void; + /** + * Moves focus to the specified edit cell within the edited row. + * @param columnIndex An integer value that specifies the column's position within the columns collection. + */ + FocusEditor(columnIndex: number): void; + /** + * Moves focus to the specified edit cell within the edited row. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + FocusEditor(columnFieldNameOrId: string): void; + /** + * Sets the value of the specified edit cell. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client grid. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(column: ASPxClientGridViewColumn, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnIndex: number, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnFieldNameOrId: string, value: string): void; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVerticalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Gets information about a focused cell. + */ + GetFocusedCell(): ASPxClientGridViewCellInfo; + /** + * Focuses the specified cell. + * @param rowVisibleIndex An integer value that specifies the visible index of the row. + * @param columnIndex A zero-based index that identifies the column in the column collection (the column's Index property value). + */ + SetFocusedCell(rowVisibleIndex: number, columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientGridViewColumn object that represents the data column. + */ + SortBy(column: ASPxClientGridViewColumn): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + SortBy(columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + SortBy(columnFieldNameOrId: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(column: ASPxClientGridViewColumn, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnFieldNameOrId: string, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(column: ASPxClientGridViewColumn, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param column An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(column: ASPxClientGridViewColumn, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Hides the specified column. + * @param column An ASPxClientGridViewColumn object that represents the column to hide. + */ + MoveColumn(column: ASPxClientGridViewColumn): void; + /** + * Hides the specified column. + * @param columnIndex An integer value that specifies the absolute index of the column to hide. + */ + MoveColumn(columnIndex: number): void; + /** + * Hides the specified column. + * @param columnFieldNameOrId A String value that identifies the column to be hidden by the name of the data source field to which the column is bound, or by the column's name. + */ + MoveColumn(columnFieldNameOrId: string): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnFieldNameOrId A String value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups the grid's data by this column. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups the grid's data by this column. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the ASPxGridView's data by the column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups the grid's data by this column. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnFieldNameOrId A String value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + * @param moveToGroup true, to group the ASPxGridView's data by the column; otherwise, false. + * @param moveFromGroup true, to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + * @param moveToGroup true, to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true, to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Groups data by the values of the specified column. + * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. + */ + GroupBy(column: ASPxClientGridViewColumn): void; + /** + * Groups data by the values of the specified column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GroupBy(columnIndex: number): void; + /** + * Groups data by the values of the specified column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GroupBy(columnFieldNameOrId: string): void; + /** + * Groups data by the values of the specified data column. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + */ + GroupBy(column: ASPxClientGridViewColumn, groupIndex: number): void; + /** + * Groups data by the values of the specified data column. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + */ + GroupBy(columnIndex: number, groupIndex: number): void; + /** + * Groups data by the values of the specified data column. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + */ + GroupBy(columnFieldNameOrId: string, groupIndex: number): void; + /** + * Groups data by the values of the specified data column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + * @param sortOrder A string value that specifies the column's sort order. + */ + GroupBy(column: ASPxClientGridViewColumn, groupIndex: number, sortOrder: string): void; + /** + * Groups data by the values of the specified data column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + * @param sortOrder A string value that specifies the column's sort order. + */ + GroupBy(columnIndex: number, groupIndex: number, sortOrder: string): void; + /** + * Groups data by the values of the specified data column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + * @param sortOrder A string value that specifies the column's sort order. + */ + GroupBy(columnFieldNameOrId: string, groupIndex: number, sortOrder: string): void; + /** + * Ungroups data by the values of the specified column. + * @param column An ASPxClientGridViewColumn object that represents the data column within the ASPxGridView. + */ + UnGroup(column: ASPxClientGridViewColumn): void; + /** + * Ungroups data by the values of the specified column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + UnGroup(columnIndex: number): void; + /** + * Ungroups data by the values of the specified column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + UnGroup(columnFieldNameOrId: string): void; + /** + * Expands all group rows. + */ + ExpandAll(): void; + /** + * Collapses all group rows. + */ + CollapseAll(): void; + /** + * Expands all detail rows. + */ + ExpandAllDetailRows(): void; + /** + * Collapses all detail rows. + */ + CollapseAllDetailRows(): void; + /** + * Expands the specified group row preserving the collapsed state of any child group row. + * @param visibleIndex An integer value that identifies the group row. + */ + ExpandRow(visibleIndex: number): void; + /** + * Expands the specified group row and optionally child group rows at all nesting levels. + * @param visibleIndex An integer value that identifies the group row. + * @param recursive true to expand any child group rows at all nesting levels; false to preserve the collapsed state of any child group rows. + */ + ExpandRow(visibleIndex: number, recursive?: boolean): void; + /** + * Collapses the specified group row preserving the expanded state of child group rows. + * @param visibleIndex An integer value that identifies the group row by its visible index. + */ + CollapseRow(visibleIndex: number): void; + /** + * Collapses the specified group row and optionally child group rows at all nesting levels. + * @param visibleIndex An integer value that identifies the group row by its visible index. + * @param recursive true to collapse child group rows at all nesting levels; false to preserve the expanded state of any child group row. + */ + CollapseRow(visibleIndex: number, recursive?: boolean): void; + /** + * Scrolls the view to the specified row. + * @param visibleIndex An integer value that identifies a row by its visible index. + */ + MakeRowVisible(visibleIndex: number): void; + /** + * Expands the specified detail row. + * @param visibleIndex A zero-based integer index that identifies the detail row. + */ + ExpandDetailRow(visibleIndex: number): void; + /** + * Collapses the specified detail row. + * @param visibleIndex A zero-based integer index that identifies the detail row. + */ + CollapseDetailRow(visibleIndex: number): void; + /** + * Returns the key value of the specified data row. + * @param visibleIndex An integer value that specifies the row's visible index. + */ + GetRowKey(visibleIndex: number): string; + /** + * Switches the grid to edit mode. + * @param visibleIndex A zero-based integer that identifies a data row to be edited. + */ + StartEditRow(visibleIndex: number): void; + /** + * Switches the grid to edit mode. + * @param key An object that uniquely identifies a data row to be edited. + */ + StartEditRowByKey(key: Object): void; + /** + * Indicates whether or not a new row is being edited. + */ + IsNewRowEditing(): boolean; + /** + * Adds a new record. + */ + AddNewRow(): void; + /** + * Deletes the specified row. + * @param visibleIndex An integer value that identifies the row. + */ + DeleteRow(visibleIndex: number): void; + /** + * Deletes a row with the specified key value. + * @param key An object that uniquely identifies the row. + */ + DeleteRowByKey(key: Object): void; + /** + * Returns the focused row's index. + */ + GetFocusedRowIndex(): number; + /** + * Moves focus to the specified row. + * @param visibleIndex An integer value that specifies the focused row's index. + */ + SetFocusedRowIndex(visibleIndex: number): void; + /** + * Selects all the unselected rows within the grid. + */ + SelectRows(): void; + /** + * Selects the specified row displayed within the grid. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + SelectRows(visibleIndex: number): void; + /** + * Selects the specified rows within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + */ + SelectRows(visibleIndices: number[]): void; + /** + * Selects or deselects the specified rows within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + * @param selected true to select the specified rows; false to deselect the rows. + */ + SelectRows(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified row within the grid. + * @param visibleIndex An integer zero-based index that identifies the data row within the grid. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRows(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + * @param selected true to select the specified rows; false to deselect the rows. + */ + SelectRowsByKey(keys: Object[], selected?: boolean): void; + /** + * Selects or deselects the specified row displayed within the grid. + * @param key An object that uniquely identifies the row. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRowsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + */ + SelectRowsByKey(keys: Object[]): void; + /** + * Selects a grid row by its key. + * @param key An object that uniquely identifies the row. + */ + SelectRowsByKey(key: Object): void; + /** + * Deselects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + */ + UnselectRowsByKey(keys: Object[]): void; + /** + * Deselects the specified row displayed within the grid. + * @param key An object that uniquely identifies the row. + */ + UnselectRowsByKey(key: Object): void; + /** + * Deselects all the selected rows within the grid. + */ + UnselectRows(): void; +} +/** + * A client grid column. + */ +interface ASPxClientGridViewColumn extends ASPxClientGridColumnBase { + /** + * Gets the column's unique identifier. + * Value: A string value that specifies the column's unique identifier. + */ + id: string; + /** + * Gets the name that uniquely identifies the column. + * Value: A string value assigned to the column's Name property. + */ + name: string; + /** + * Gets the column's position within the collection. + * Value: An integer zero-bazed index that specifies the column's position within the collection. + */ + index: number; + /** + * Gets the name of the database field assigned to the current column. + * Value: A string value that specifies the name of a data field. + */ + fieldName: string; + /** + * Gets whether the column is visible. + * Value: true to display the column; otherwise, false. + */ + visible: boolean; +} +/** + * Represents a JavaScript function which receives the list of row values when the client GetSelectedFieldValues method is called. + */ +interface ASPxClientGridViewValuesCallback { + /** + * Represents a JavaScript function which receives the list of row values when the client GetSelectedFieldValues method is called. + * @param result An object that represents the list of row values received from the server. + */ + (result: Object): void; +} +/** + * A method that will handle the cancelable events of a client ASPxGridView column. + */ +interface ASPxClientGridViewColumnCancelEventHandler { + /** + * A method that will handle the cancelable events of a client ASPxGridView column. + * @param source The event source. + * @param e An ASPxClientGridViewColumnCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewColumnCancelEventArgs): void; +} +/** + * Provides data for the cancelable events of a client ASPxGridView column. + */ +interface ASPxClientGridViewColumnCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client column. + * Value: An ASPxClientGridViewColumn object that represents the processed column. + */ + column: ASPxClientGridViewColumn; +} +/** + * A method that will handle the client events concerned with column processing. + */ +interface ASPxClientGridViewColumnProcessingModeEventHandler { + /** + * A method that will handle the client events concerned with column processing. + * @param source The event source. + * @param e A ASPxClientGridViewColumnProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewColumnProcessingModeEventArgs): void; +} +/** + * Provides data for the client events concerned with column processing, and that allow the event's processing to be passed to the server side. + */ +interface ASPxClientGridViewColumnProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets a grid column related to the event. + * Value: An ASPxClientGridViewColumn object representing the column related to the event. + */ + column: ASPxClientGridViewColumn; +} +/** + * A method that will handle the RowExpanding events. + */ +interface ASPxClientGridViewRowCancelEventHandler { + /** + * A method that will handle the RowExpanding events. + * @param source The event source. + * @param e An ASPxClientGridViewRowCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewRowCancelEventArgs): void; +} +/** + * Provides data for the RowExpanding events. + */ +interface ASPxClientGridViewRowCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer zero-based index that identifies the processed row. + */ + visibleIndex: number; +} +/** + * A method that will handle the SelectionChanged event. + */ +interface ASPxClientGridViewSelectionEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. + * @param e An ASPxClientGridViewSelectionEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewSelectionEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientGridViewSelectionEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the visible index of the row whose selected state has been changed. + * Value: An value that specifies the visible index of the row. + */ + visibleIndex: number; + /** + * Gets whether the row has been selected. + * Value: true if the row has been selected; otherwise, false. + */ + isSelected: boolean; + /** + * Gets whether all rows displayed within a page have been selected or unselected. + * Value: true if all rows displayed within a page have been selected or unselected; otherwise, false. + */ + isAllRecordsOnPage: boolean; + /** + * Gets whether a selection has been changed on the server. + * Value: true if a selection has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the RowClick events. + */ +interface ASPxClientGridViewRowClickEventHandler { + /** + * A method that will handle the RowClick event. + * @param source The event source. This parameter identifies the ASPxClientGridView object that raised the event. + * @param e An ASPxClientGridViewRowClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewRowClickEventArgs): void; +} +/** + * Provides data for the RowClick event. + */ +interface ASPxClientGridViewRowClickEventArgs extends ASPxClientGridViewRowCancelEventArgs { + /** + * Provides access to the parameters associated with the RowClick event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} +/** + * A method that will handle the ContextMenu event. + */ +interface ASPxClientGridViewContextMenuEventHandler { + /** + * A method that will handle the ContextMenu event. + * @param source The event source. + * @param e An ASPxClientGridViewContextMenuEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewContextMenuEventArgs): void; +} +/** + * Provides data for the ContextMenu event. + */ +interface ASPxClientGridViewContextMenuEventArgs extends ASPxClientEventArgs { + /** + * Gets which grid element has been right clicked by the user. + * Value: A String value that specifies grid element. + */ + objectType: string; + /** + * Identifies the grid element being right clicked by the user. + * Value: A zero-based integer index that identifies the grid element being clicked by the user. + */ + index: number; + /** + * Provides access to the parameters associated with the ContextMenu event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; + /** + * Gets the currently processed menu object. + * Value: An object that is the currently processed menu. + */ + menu: Object; + /** + * Specifies whether a browser context menu should be displayed. + * Value: true, to display a browser context menu; otherwise, false. The default is false. + */ + showBrowserMenu: boolean; +} +/** + * A method that will handle the client ContextMenuItemClick event. + */ +interface ASPxClientGridViewContextMenuItemClickEventHandler { + /** + * A method that will handle the ContextMenuItemClick event. + * @param source The event source. + * @param e An ASPxClientGridViewContextMenuItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewContextMenuItemClickEventArgs): void; +} +/** + * Provides data for the ContextMenuItemClick event. + */ +interface ASPxClientGridViewContextMenuItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the clicked context menu item. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; + /** + * Gets which grid element has been right clicked by the user. + * Value: A String value that specifies the grid element. + */ + objectType: string; + /** + * Returns the processed element index. + * Value: An integer value that specifies the processed element index. + */ + elementIndex: number; + /** + * Specifies whether a postback or a callback is used to finally process the event on the server side. + * Value: true to perform the round trip to the server side via postback; false to perform the round trip to the server side via callback. + */ + usePostBack: boolean; + /** + * Specifies whether default context menu item click is handled manually, so no default processing is required. + * Value: true if no default processing is required; otherwise false. + */ + handled: boolean; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientGridViewCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. This parameter identifies the ASPxClientGridView object that raised the event. + * @param e An ASPxClientGridViewCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewCustomButtonEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientGridViewCustomButtonEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the value which identifies the row whose custom button has been clicked. + * Value: An integer value that identifies the row whose custom button has been clicked. + */ + visibleIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A string value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the ColumnMoving event. + */ +interface ASPxClientGridViewColumnMovingEventHandler { + /** + * A method that will handle the ColumnMoving event. + * @param source The event source. + * @param e An ASPxClientGridViewColumnMovingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewColumnMovingEventArgs): void; +} +/** + * Provides data for the ColumnMoving event. + */ +interface ASPxClientGridViewColumnMovingEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether a column is allowed to be moved. + * Value: true to allow column moving; otherwise, false. + */ + allow: boolean; + /** + * Gets the column currently being dragged by an end-user. + * Value: An ASPxClientGridViewColumn object that represents the column currently being dragged by an end-user. + */ + sourceColumn: ASPxClientGridViewColumn; + /** + * Gets the target column, before or after which the source column will be inserted (if dropped). + * Value: An ASPxClientGridViewColumn object that represents the target column. null (Nothing in Visual Basic) if the source column isn't over the column header panel. + */ + destinationColumn: ASPxClientGridViewColumn; + /** + * Gets whether the source column will be inserted before the target column (if dropped). + * Value: true if the source column will be inserted before the target column (if dropped); otherwise, false. + */ + isDropBefore: boolean; + /** + * Gets whether the source column is currently over the Group Panel. + * Value: true if the source column is currently over the Group Panel; otherwise, false. + */ + isGroupPanel: boolean; +} +/** + * Represents an object that will handle the client-side BatchEditConfirmShowing event. + */ +interface ASPxClientGridViewBatchEditConfirmShowingEventHandler { + /** + * A method that will handle the BatchEditConfirmShowing client event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditConfirmShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditConfirmShowingEventArgs): void; +} +/** + * Provides data for the BatchEditConfirmShowing event. + */ +interface ASPxClientGridViewBatchEditConfirmShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the client identifier of an object that initiates a send request. + * Value: A string value that specifies the object client identifier. + */ + requestTriggerID: string; +} +/** + * A method that will handle the client BatchEditStartEditing event. + */ +interface ASPxClientGridViewBatchEditStartEditingEventHandler { + /** + * A method that will handle the BatchEditStartEditing event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditStartEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditStartEditingEventArgs): void; +} +/** + * Provides data for the BatchEditStartEditing event. + */ +interface ASPxClientGridViewBatchEditStartEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the row whose cells are about to be edited. + * Value: An value that specifies the visible index of the row. + */ + visibleIndex: number; + /** + * Gets the grid column that owns a cell that is about to be edited. + * Value: An object that is the focused grid column. + */ + focusedColumn: ASPxClientGridViewColumn; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + rowValues: Object; +} +/** + * A method that will handle the client BatchEditEndEditing event. + */ +interface ASPxClientGridViewBatchEditEndEditingEventHandler { + /** + * A method that will handle the BatchEditEndEditing event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditEndEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditEndEditingEventArgs): void; +} +/** + * Provides data for the BatchEditEndEditing event. + */ +interface ASPxClientGridViewBatchEditEndEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the row whose cells has been edited. + * Value: An value that specifies the visible index of the row. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + rowValues: Object; +} +/** + * A method that will handle the client BatchEditRowValidating event. + */ +interface ASPxClientGridViewBatchEditRowValidatingEventHandler { + /** + * A method that will handle the BatchEditRowValidating event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditRowValidatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditRowValidatingEventArgs): void; +} +/** + * Provides data for the BatchEditRowValidating event. + */ +interface ASPxClientGridViewBatchEditRowValidatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer value that specifies the processed row's visible index. + */ + visibleIndex: number; + /** + * Provides validation information of a row currently being validated. + * Value: An object that is a hashtable containing validation information. + */ + validationInfo: Object; +} +/** + * A method that will handle the client BatchEditTemplateCellFocused event. + */ +interface ASPxClientGridViewBatchEditTemplateCellFocusedEventHandler { + /** + * A method that will handle the BatchEditTemplateCellFocused event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientGridViewBatchEditTemplateCellFocusedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditTemplateCellFocusedEventArgs): void; +} +/** + * Provides data for the BatchEditTemplateCellFocused event. + */ +interface ASPxClientGridViewBatchEditTemplateCellFocusedEventArgs extends ASPxClientEventArgs { + /** + * Gets the currently processed column. + * Value: A object that is the client-side column object. + */ + column: ASPxClientGridViewColumn; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the BatchEditChangesSaving event. + */ +interface ASPxClientGridViewBatchEditChangesSavingEventHandler { + /** + * A method that will handle the BatchEditChangesSaving event. + * @param source The event source. This parameter identifies the grid view object which raised the event. + * @param e An ASPxClientGridViewBatchEditChangesSavingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditChangesSavingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesSaving event. + */ +interface ASPxClientGridViewBatchEditChangesSavingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditChangesCanceling event. + */ +interface ASPxClientGridViewBatchEditChangesCancelingEventHandler { + /** + * A method that will handle the BatchEditChangesCanceling event. + * @param source The event source. This parameter identifies the grid view object which raised the event. + * @param e An ASPxClientGridViewBatchEditChangesCancelingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditChangesCancelingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesCanceling event. + */ +interface ASPxClientGridViewBatchEditChangesCancelingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditRowInserting event. + */ +interface ASPxClientGridViewBatchEditRowInsertingEventHandler { + /** + * A method that will handle the BatchEditRowInserting event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientGridViewBatchEditRowInsertingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditRowInsertingEventArgs): void; +} +/** + * Provides data for the BatchEditRowInserting event. + */ +interface ASPxClientGridViewBatchEditRowInsertingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer value that specifies the processed row's visible index. + */ + visibleIndex: number; +} +/** + * A method that will handle the BatchEditRowDeleting event. + */ +interface ASPxClientGridViewBatchEditRowDeletingEventHandler { + /** + * A method that will handle the BatchEditRowDeleting event. + * @param source The event source. This parameter identifies the grid view object which raised the event. + * @param e An ASPxClientGridViewBatchEditRowDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditRowDeletingEventArgs): void; +} +/** + * Provides data for the BatchEditRowDeleting event. + */ +interface ASPxClientGridViewBatchEditRowDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer value that specifies the processed row's visible index. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + rowValues: Object; +} +/** + * Contains information on a grid cell. + */ +interface ASPxClientGridViewCellInfo { + /** + * Gets the visible index of the row that contains the cell currently being processed. + * Value: An value that specifies the visible index of the row. + */ + rowVisibleIndex: number; + /** + * Gets the data column that contains the cell currently being processed. + * Value: An object that is the data column which contains the processed cell. + */ + column: ASPxClientGridViewColumn; +} +/** + * Provides members related to Batch Edit Mode + */ +interface ASPxClientGridViewBatchEditApi { + /** + * Performs validation of grid data contained in all rows when the grid operates in Batch Edit mode. + * @param validateOnlyModified true, if only modified rows should be validated; otherwise, false. + */ + ValidateRows(validateOnlyModified?: boolean): boolean; + /** + * Performs validation of grid data contained in the specified row when the grid operates in Batch Edit mode. + * @param visibleIndex An integer value specifying the visible index of the validated row. + */ + ValidateRow(visibleIndex: number): boolean; + /** + * Returns an array of row visible indices. + * @param includeDeleted true, to include visible indices of deleted rows to the returned array; otherwise, false. + */ + GetRowVisibleIndices(includeDeleted: boolean): number[]; + /** + * Returns an array of the deleted row visible indices. + */ + GetDeletedRowIndices(): number[]; + /** + * Returns an array of the inserted row visible indices. + */ + GetInsertedRowIndices(): number[]; + /** + * Indicates if the row with specified visible index is deleted. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsDeletedRow(visibleIndex: number): boolean; + /** + * Indicates if the row with specified visible index is newly created. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsNewRow(visibleIndex: number): boolean; + /** + * Programmatically moves the focus to the previous cell in the row. + */ + MoveFocusBackward(): boolean; + /** + * Programmatically moves the focus to the next cell in the row. + */ + MoveFocusForward(): boolean; + /** + * Sets a value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the row containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object): void; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the row containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + * @param displayText A string value that specifies the cell display text. + * @param cancelCellHighlighting true to cancel highlighting of the modified cell, false to highlight the modified cell. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object, displayText: string, cancelCellHighlighting?: boolean): void; + /** + * Gets the value of the specified cell. + * @param visibleIndex A zero-based integer value that specifies a visible index of a row containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). + */ + GetCellValue(visibleIndex: number, columnFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets information about the cell currently being edited. + */ + GetEditCellInfo(): ASPxClientGridViewCellInfo; + /** + * Returns a value that indicates whether the grid has changed data. + */ + HasChanges(): boolean; + /** + * Returns a value that indicates whether the specified row has changed data. + * @param visibleIndex An integer value that specifies the visible index of a row. + */ + HasChanges(visibleIndex: number): boolean; + /** + * Returns a value that indicates whether the specified data cell's data has been changed. + * @param visibleIndex An integer value that specifies the visible index of a row. + * @param columnFieldNameOrId A string value that identifies the column by the name of the data source field to which the column is bound, or by the column's name. + */ + HasChanges(visibleIndex: number, columnFieldNameOrId: string): boolean; + /** + * Resets changes in the specified row. + * @param visibleIndex An integer value that specifies the visible index of a row. + */ + ResetChanges(visibleIndex: number): void; + /** + * Resets changes in the specified cell. + * @param visibleIndex An integer value that specifies the visible index of a row containing the processed cell. + * @param columnIndex A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + */ + ResetChanges(visibleIndex: number, columnIndex: number): void; + /** + * Switches the specified cell to edit mode. + * @param visibleIndex A zero-based integer value that specifies the visible index of a row containing the processed cell. + * @param columnIndex A zero-based integer value that identifies the column which contains the processed cell in the column collection. + */ + StartEdit(visibleIndex: number, columnIndex: number): void; + /** + * Ends cell or row editing. + */ + EndEdit(): void; +} +/** + * A client-side equivalent of the ASPxVerticalGrid object. + */ +interface ASPxClientVerticalGrid extends ASPxClientGridBase { + /** + * Provides access to the batch editing client API. + * Value: A object that exposes the batch editing client API methods. + */ + batchEditApi: ASPxClientVerticalGridBatchEditApi; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs when a grid switches to batch edit mode. + */ + BatchEditStartEditing: ASPxClientEvent>; + /** + * Occurs when a grid leaves the batch edit mode. + */ + BatchEditEndEditing: ASPxClientEvent>; + /** + * Enables you to prevent a batch edit confirmation message from being displayed. + */ + BatchEditConfirmShowing: ASPxClientEvent>; + /** + * Enables you to provide navigation for editors contained in a templated cell in Batch Edit mode. + */ + BatchEditTemplateCellFocused: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are saved in batch edit mode. + */ + BatchEditChangesSaving: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are canceled in batch edit mode. + */ + BatchEditChangesCanceling: ASPxClientEvent>; + /** + * Occurs on the client side before a record is inserted in batch edit mode. + */ + BatchEditRecordInserting: ASPxClientEvent>; + /** + * Occurs on the client side before a record is deleted in batch edit mode. + */ + BatchEditRecordDeleting: ASPxClientEvent>; + /** + * Enables you to specify whether record data is valid and provide an error text. + */ + BatchEditRecordValidating: ASPxClientEvent>; + /** + * Enables you to prevent rows from being sorted. + */ + RowSorting: ASPxClientEvent>; + /** + * Fires on the client side before the expansion state of a row is changed by end-user interaction. + */ + RowExpandedChanging: ASPxClientEvent>; + /** + * Fires on the client side after a row's expansion state has been changed by end-user interaction. + */ + RowExpandedChanged: ASPxClientEvent>; + /** + * Fires on the client when a record is clicked. + */ + RecordClick: ASPxClientEvent>; + /** + * Fires on the client when a record is double clicked. + */ + RecordDblClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientVerticalGrid. + */ + CallbackError: ASPxClientEvent>; + /** + * Sorts data by the specified data row's values. + * @param row An ASPxClientVerticalGridRow object that represents the data row. + */ + SortBy(row: ASPxClientVerticalGridRow): void; + /** + * Sorts data by the specified data row's values. + * @param rowIndex An integer value that specifies the row's position within the row collection. + */ + SortBy(rowIndex: number): void; + /** + * Sorts data by the specified data row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + */ + SortBy(rowFieldNameOrId: string): void; + /** + * Sorts data by the specified data row's values. + * @param row An ASPxClientVerticalGridRow object that represents the data row. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(row: ASPxClientVerticalGridRow, sortOrder: string): void; + /** + * Sorts data by the specified data row's values. + * @param rowIndex An integer value that specifies the row's position within the row collection. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(rowIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(rowFieldNameOrId: string, sortOrder: string): void; + /** + * Sorts data by the specified data row's values. + * @param row An ASPxClientVerticalGridRow object that represents the data row. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(row: ASPxClientVerticalGridRow, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data row's values. + * @param rowIndex An integer value that specifies the row's position within the row collection. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true, to clear any previous sorting; otherwise, false. + */ + SortBy(rowIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(rowFieldNameOrId: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data row's values, and places the row to the specified position among the sorted rows. + * @param row An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based row's index among the sorted rows. -1 if data is not sorted by this row. + */ + SortBy(row: ASPxClientVerticalGridRow, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data row's values, and places the row to the specified position among the sorted rows. + * @param rowIndex An integer value that specifies the row's position within the row collection. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex + */ + SortBy(rowIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data row's values, and places the row to the specified position among the sorted rows. + * @param rowFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based row's index among the sorted rows. -1 if data is not sorted by this row. + */ + SortBy(rowFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Returns the key value of the specified data row (record in the vertical grid). + * @param visibleIndex An integer value that specifies the record's visible index. + */ + GetRecordKey(visibleIndex: number): string; + /** + * Adds a new record. + */ + AddNewRecord(): void; + /** + * Deletes the specified record. + * @param visibleIndex An integer value that identifies the record. + */ + DeleteRecord(visibleIndex: number): void; + /** + * Deletes a record with the specified key value. + * @param key An object that uniquely identifies the record. + */ + DeleteRecordByKey(key: Object): void; + /** + * Selects all the unselected records within the grid. + */ + SelectRecords(): void; + /** + * Selects the specified record displayed within the grid. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + SelectRecords(visibleIndex: number): void; + /** + * Selects the specified rercords within the grid. + * @param visibleIndices An array of zero-based indices that identify records within the grid. + */ + SelectRecords(visibleIndices: number[]): void; + /** + * Selects or deselects the specified records within the grid. + * @param visibleIndices An array of zero-based indices that identify records within the grid. + * @param selected true to select the specified records; false to deselect the records. + */ + SelectRecords(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified record within the grid. + * @param visibleIndex An integer zero-based index that identifies the record within the grid. + * @param selected true to select the specified record; false to deselect the record. + */ + SelectRecords(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified records displayed within the grid. + * @param keys An array of objects that uniquely identify the records. + * @param selected true to select the specified records; false to deselect the records. + */ + SelectRecordsByKey(keys: Object[], selected?: boolean): void; + /** + * Selects or deselects the specified record displayed within the grid. + * @param key An object that uniquely identifies the record. + * @param selected true to select the specified record; false to deselect the record. + */ + SelectRecordsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified records displayed within the grid. + * @param keys An array of objects that uniquely identify the records. + */ + SelectRecordsByKey(keys: Object[]): void; + /** + * Selects a grid record by its key. + * @param key An object that uniquely identifies the record. + */ + SelectRecordsByKey(key: Object): void; + /** + * Deselects all the selected records within the grid. + */ + UnselectRecords(): void; + /** + * Deselects the specified records (if selected) within the grid. + * @param visibleIndices An array of zero-based indices that identify records within the grid. + */ + UnselectRecords(visibleIndices: number[]): void; + /** + * Deselects the specified record (if selected) within the grid. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + UnselectRecords(visibleIndex: number): void; + /** + * Deselects the specified records displayed within the grid. + * @param keys An array of objects that uniquely identify the records. + */ + UnselectRecordsByKey(keys: Object[]): void; + /** + * Deselects the specified record displayed within the grid. + * @param key An object that uniquely identifies the record. + */ + UnselectRecordsByKey(key: Object): void; + /** + * Deselects all grid records that match the filter criteria currently applied to the grid. + */ + UnselectFilteredRecords(): void; + /** + * Selects the specified record displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + SelectRecordOnPage(visibleIndex: number): void; + /** + * Selects or deselects the specified record displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + * @param selected true to select the specified record; false to deselect the record. + */ + SelectRecordOnPage(visibleIndex: number, selected?: boolean): void; + /** + * Deselects the specified record (if selected) displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + UnselectRecordOnPage(visibleIndex: number): void; + /** + * Selects all unselected records displayed on the current page. + */ + SelectAllRecordsOnPage(): void; + /** + * Allows you to select or deselect all records displayed on the current page based on the parameter passed. + * @param selected true to select all unselected records displayed on the current page; false to deselect all selected records on the page. + */ + SelectAllRecordsOnPage(selected: boolean): void; + /** + * Deselects all selected records displayed on the current page. + */ + UnselectAllRecordsOnPage(): void; + /** + * Returns the number of selected records. + */ + GetSelectedRecordCount(): number; + /** + * Indicates whether or not the specified record is selected within the current page. + * @param visibleIndex An integer value that identifies the record by its visible index. + */ + IsRecordSelectedOnPage(visibleIndex: number): boolean; + /** + * Returns the values of the specified data source fields within the specified record. + * @param visibleIndex An integer value that identifies the record. + * @param fieldNames The names of data source fields separated using a semicolon, whose values within the specified record are returned. + * @param onCallback An ASPxClientVerticalGridValuesCallback object that represents the JavaScript function which receives the list of record values as a parameter. + */ + GetRecordValues(visibleIndex: number, fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns the record values displayed within the current page. + * @param fieldNames The names of data source fields whose values are returned. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that represents the JavaScript function which receives the list of record values as a parameter. + */ + GetPageRecordValues(fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns the number of records actually displayed within the active page. + */ + GetVisibleRecordsOnPage(): number; + /** + * Returns the number of rows within the client vertical grid. + */ + GetRowCount(): number; + /** + * Applies the specified search panel filter criterion to grid data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Applies the specified filter expression to the ASPxVerticalGrid. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client vertical grid. + */ + ClearFilter(): void; + /** + * Sets input focus to the grid. + */ + Focus(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * + * @param args + * @param onSuccess + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Selects the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the grid's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Returns the index of the first record displayed within the vertical grid's active page. + */ + GetTopVisibleIndex(): number; + /** + * Saves all the changes made and switches the grid to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the ASPxVerticalGrid to browse mode. + */ + CancelEdit(): void; + /** + * Updates data displayed within the grid. + */ + Refresh(): void; + /** + * Returns the record values displayed within all selected records. + * @param fieldNames The names of data source fields separated by a semicolon, whose values within the selected records are returned. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that represents the JavaScript function which receives the list of record values as a parameter. + */ + GetSelectedFieldValues(fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns key values of selected records displayed within the current page. + */ + GetSelectedKeysOnPage(): Object[]; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns the editor used to edit the specified row's values. + * @param row An ASPxClientVerticalGridRowobject that specifies the required row within the client grid. + */ + GetEditor(row: ASPxClientVerticalGridRow): ASPxClientEdit; + /** + * Returns the editor used to edit the specified row's values. + * @param rowIndex An integer value that specifies the row's position within the rows collection. + */ + GetEditor(rowIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + */ + GetEditor(rowFieldNameOrId: string): ASPxClientEdit; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Returns the client row that resides at the specified position within the row collection. + * @param rowIndex A zero-based index that identifies the row within the row collection (the row's Index property value). + */ + GetRow(rowIndex: number): ASPxClientVerticalGridRow; + /** + * Returns the row with the specified unique identifier. + * @param rowId A string value that specifies the row's unique identifier (the row's Name property value). + */ + GetRowById(rowId: string): ASPxClientVerticalGridRow; + /** + * Returns the client row which is bound to the specified data source field. + * @param rowFieldName A string value that specifies the name of the data source field to which the row is bound (the row's fieldName property value). + */ + GetRowByField(rowFieldName: string): ASPxClientVerticalGridRow; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVerticalScrollPosition(): number; + /** + * Returns the current horizontal scroll position of the grid's content. + */ + GetHorizontalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Specifies the horizontal scroll position for the grid's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorizontalScrollPosition(position: number): void; + /** + * Gets the value that specifies whether the required row is expanded. + * @param row An ASPxClientVerticalGridRowobject that specifies the row. + */ + GetRowExpanded(row: ASPxClientVerticalGridRow): boolean; + /** + * Gets the value that specifies whether the row with the specified index is expanded. + * @param rowIndex An integer value specifying the row's index. + */ + GetRowExpanded(rowIndex: number): boolean; + /** + * Gets the value that specifies whether the row with the specified field name or ID is expanded. + * @param rowFieldNameOrId A string value specifying the row's field name or ID. + */ + GetRowExpanded(rowFieldNameOrId: string): boolean; + /** + * Sets a value indicating whether the row is expanded. + * @param row An ASPxClientVerticalGridRowobject that specifies the required row within the client grid. + * @param value true, to expand the row; otherwise, false. + */ + SetRowExpanded(row: ASPxClientVerticalGridRow, value: boolean): void; + /** + * Sets a value indicating whether the row is expanded. + * @param rowIndex An integer value specifying the index of the row. + * @param value true, to expand the row; otherwise, false. + */ + SetRowExpanded(rowIndex: number, value: boolean): void; + /** + * Sets a value indicating whether the row is expanded. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + * @param value true, to expand the row; otherwise, false. + */ + SetRowExpanded(rowFieldNameOrId: string, value: boolean): void; +} +/** + * A client grid row. + */ +interface ASPxClientVerticalGridRow extends ASPxClientGridColumnBase { + /** + * Gets the name that uniquely identifies the row. + * Value: A string value assigned to the row's Name property. + */ + name: string; + /** + * Gets the row's position within the collection. + * Value: An integer zero-bazed index that specifies the row's position within the collection. + */ + index: number; + /** + * Gets the name of the database field assigned to the current row. + * Value: A string value that specifies the name of a data field. + */ + fieldName: string; + /** + * Gets whether the row is visible. + * Value: true, to display the row; otherwise, false. + */ + visible: boolean; +} +/** + * Represents a JavaScript function which receives the list of record values when the client GetSelectedFieldValues method is called. + */ +interface ASPxClientVerticalGridValuesCallback { + /** + * Represents a JavaScript function which receives the list of record values when the client GetSelectedFieldValues method is called. + * @param result An object that represents the list of record values received from the server. + */ + (result: Object): void; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientVerticalGridRowCancelEventHandler { + /** + * A method that will handle the cancelable events of a client ASPxVerticalGrid row. + * @param source The event source. + * @param e An ASPxClientVerticalGridRowCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRowCancelEventArgs): void; +} +/** + * Provides data for the cancelable events of a client ASPxVerticalGrid row. + */ +interface ASPxClientVerticalGridRowCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client row. + * Value: An ASPxClientVerticalGridRow object that represents the processed row. + */ + row: ASPxClientVerticalGridRow; +} +/** + * A method that will handle the RecordClick event. + */ +interface ASPxClientVerticalGridRecordClickEventHandler { + /** + * A method that will handle the RecordClick event. + * @param source The event source. This parameter identifies the ASPxClientVerticalGrid object that raised the event. + * @param e An ASPxClientVerticalGridRecordClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRecordClickEventArgs): void; +} +/** + * Provides data for the RecordClick event. + */ +interface ASPxClientVerticalGridRecordClickEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer zero-based index that identifies the processed record. + */ + visibleIndex: number; + /** + * Provides access to the parameters associated with the RecordClick event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientVerticalGridCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. This parameter identifies the ASPxClientVerticalGrid object that raised the event. + * @param e An ASPxClientVerticalGridCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridCustomButtonEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientVerticalGridCustomButtonEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the value which identifies the record whose custom button has been clicked. + * Value: An integer value that identifies the record whose custom button has been clicked. + */ + visibleIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A string value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the SelectionChanged event. + */ +interface ASPxClientVerticalGridSelectionEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. + * @param e An ASPxClientVerticalGridSelectionEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridSelectionEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientVerticalGridSelectionEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the visible index of the record whose selected state has been changed. + * Value: An value that specifies the visible index of the record. + */ + visibleIndex: number; + /** + * Gets whether the record has been selected. + * Value: true, if the record has been selected; otherwise, false. + */ + isSelected: boolean; + /** + * Gets whether all records displayed within a page have been selected or unselected. + * Value: true if all records displayed within a page have been selected or unselected; otherwise, false. + */ + isAllRecordsOnPage: boolean; + /** + * Gets whether a selection has been changed on the server. + * Value: true if a selection has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the RowExpandedChanged event. + */ +interface ASPxClientVerticalGridRowExpandedEventHandler { + /** + * A method that will handle the RowExpandedChanged event. + * @param source The event source. + * @param e An ASPxClientVerticalGridRowExpandedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRowExpandedEventArgs): void; +} +/** + * Provides data for the RowExpandedChanged event. + */ +interface ASPxClientVerticalGridRowExpandedEventArgs extends ASPxClientEventArgs { + /** + * Gets the expanded row. + * Value: An ASPxClientVerticalGridRow object that represents the expanded row. + */ + row: ASPxClientVerticalGridRow; +} +/** + * A method that will handle the RowExpandedChanging event. + */ +interface ASPxClientVerticalGridRowExpandingEventHandler { + /** + * A method that will handle the RowExpandedChanging event. + * @param source The event source. + * @param e An ASPxClientVerticalGridRowExpandedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRowExpandingEventArgs): void; +} +/** + * Provides data for the RowExpandedChanging event. + */ +interface ASPxClientVerticalGridRowExpandingEventArgs extends ASPxClientVerticalGridRowExpandedEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents an object that will handle the client-side BatchEditStartEditing event. + */ +interface ASPxClientVerticalGridBatchEditStartEditingEventHandler { + /** + * A method that will handle the BatchEditStartEditing event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditStartEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditStartEditingEventArgs): void; +} +/** + * Provides data for the BatchEditStartEditing event. + */ +interface ASPxClientVerticalGridBatchEditStartEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the record whose cells are about to be edited. + * Value: An value that specifies the visible index of the record. + */ + visibleIndex: number; + /** + * Gets the grid row that owns a cell that is about to be edited. + * Value: An object that is the focused grid row. + */ + focusedRow: ASPxClientVerticalGridRow; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + recordValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditEndEditing event. + */ +interface ASPxClientVerticalGridBatchEditEndEditingEventHandler { + /** + * A method that will handle the BatchEditEndEditing event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditEndEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditEndEditingEventArgs): void; +} +/** + * Provides data for the BatchEditEndEditing event. + */ +interface ASPxClientVerticalGridBatchEditEndEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the record whose cells have been edited. + * Value: An value that specifies the visible index of the record. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: Gets a hashtable that maintains information about editable cells. + */ + recordValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditRecordValidating event. + */ +interface ASPxClientVerticalGridBatchEditRecordValidatingEventHandler { + /** + * A method that will handle the BatchEditRecordValidating event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditRecordValidatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditRecordValidatingEventArgs): void; +} +/** + * Provides data for the BatchEditRecordValidating event. + */ +interface ASPxClientVerticalGridBatchEditRecordValidatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer value that specifies the processed record's visible index. + */ + visibleIndex: number; + /** + * Provides validation information on the record currently being validated. + * Value: An object that is a hashtable containing validation information. + */ + validationInfo: Object; +} +/** + * Represents an object that will handle the client-side BatchEditConfirmShowing event. + */ +interface ASPxClientVerticalGridBatchEditConfirmShowingEventHandler { + /** + * A method that will handle the BatchEditConfirmShowing client event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditConfirmShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditConfirmShowingEventArgs): void; +} +/** + * Provides data for the BatchEditConfirmShowing event. + */ +interface ASPxClientVerticalGridBatchEditConfirmShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the client identifier of an object that initiates a send request. + * Value: A string value that specifies the object client identifier. + */ + requestTriggerID: string; +} +/** + * Represents an object that will handle the client-side BatchEditTemplateCellFocused event. + */ +interface ASPxClientVerticalGridBatchEditTemplateCellFocusedEventHandler { + /** + * A method that will handle the BatchEditTemplateCellFocused event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientVerticalGridBatchEditTemplateCellFocusedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditTemplateCellFocusedEventArgs): void; +} +/** + * Provides data for the BatchEditTemplateCellFocused event. + */ +interface ASPxClientVerticalGridBatchEditTemplateCellFocusedEventArgs extends ASPxClientEventArgs { + /** + * Gets the currently processed row. + * Value: A object that is the client-side row object. + */ + row: ASPxClientVerticalGridRow; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * Represents an object that will handle the client-side BatchEditChangesSaving event. + */ +interface ASPxClientVerticalGridBatchEditChangesSavingEventHandler { + /** + * A method that will handle the BatchEditChangesSaving event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditChangesSavingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditChangesSavingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesSaving event. + */ +interface ASPxClientVerticalGridBatchEditChangesSavingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditChangesCanceling event. + */ +interface ASPxClientVerticalGridBatchEditChangesCancelingEventHandler { + /** + * A method that will handle the BatchEditChangesCanceling event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditChangesCancelingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditChangesCancelingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesCanceling event. + */ +interface ASPxClientVerticalGridBatchEditChangesCancelingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditRecordInserting event. + */ +interface ASPxClientVerticalGridBatchEditRecordInsertingEventHandler { + /** + * A method that will handle the BatchEditRecordInserting event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditRecordInsertingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditRecordInsertingEventArgs): void; +} +/** + * Provides data for the BatchEditRecordInserting event. + */ +interface ASPxClientVerticalGridBatchEditRecordInsertingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer value that specifies the processed record's visible index. + */ + visibleIndex: number; +} +/** + * Represents an object that will handle the client-side BatchEditRecordDeleting event. + */ +interface ASPxClientVerticalGridBatchEditRecordDeletingEventHandler { + /** + * A method that will handle the BatchEditRecordDeleting event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditRecordDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditRecordDeletingEventArgs): void; +} +/** + * Provides data for the BatchEditRecordDeleting event. + */ +interface ASPxClientVerticalGridBatchEditRecordDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer value that specifies the processed record's visible index. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + recordValues: Object; +} +/** + * Contains information on a cell that is being edited. + */ +interface ASPxClientVerticalGridCellInfo { + /** + * Gets the row that contains the cell currently being processed. + * Value: An object that is the row which contains the processed cell. + */ + row: ASPxClientVerticalGridRow; + /** + * Gets the visible index of the record that contains the cell currently being processed. + * Value: An value that specifies the visible index of the record. + */ + recordVisibleIndex: number; +} +/** + * Provides members related to Batch Edit Mode + */ +interface ASPxClientVerticalGridBatchEditApi { + /** + * Performs validation of grid data contained in all records when the grid operates in batch edit mode. + * @param validateOnlyModified true, if only modified records should be validated; otherwise, false. + */ + ValidateRecords(validateOnlyModified?: boolean): boolean; + /** + * Performs validation of grid data contained in the specified record when the grid operates in batch edit mode. + * @param visibleIndex An integer value specifying the visible index of the validated record. + */ + ValidateRecord(visibleIndex: number): boolean; + /** + * Returns an array of record visible indices. + * @param includeDeleted true, to include visible indices of deleted records to the returned array; otherwise, false. + */ + GetRecordVisibleIndices(includeDeleted: boolean): number[]; + /** + * Returns an array of the deleted record visible indices. + */ + GetDeletedRecordIndices(): number[]; + /** + * Returns an array of the inserted record visible indices. + */ + GetInsertedRecordIndices(): number[]; + /** + * Indicates if the record with the specified visible index is deleted. + * @param visibleIndex An integer value that identifies the record by its visible index. + */ + IsDeletedRecord(visibleIndex: number): boolean; + /** + * Indicates if the record with specified visible index is newly created. + * @param visibleIndex An integer value that identifies the record by its visible index. + */ + IsNewRecord(visibleIndex: number): boolean; + /** + * Programmatically moves the focus to the previous cell in the record. + */ + MoveFocusBackward(): boolean; + /** + * Programmatically moves the focus to the next cell in the record. + */ + MoveFocusForward(): boolean; + /** + * Sets a value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the record containing the processed cell. + * @param rowFieldNameOrId A string value that specifies the field name or unique identifier (the row's Name property value) of a row containing the processed cell. + * @param value An object that contains the new cell value. + */ + SetCellValue(visibleIndex: number, rowFieldNameOrId: string, value: Object): void; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the row containing the processed cell. + * @param rowFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + * @param displayText A string value that specifies the cell display text. + * @param cancelCellHighlighting true to cancel highlighting of the modified cell, false to highlight the modified cell. + */ + SetCellValue(visibleIndex: number, rowFieldNameOrId: string, value: Object, displayText: string, cancelCellHighlighting?: boolean): void; + /** + * Gets the value of the specified cell. + * @param visibleIndex A zero-based integer value that specifies a visible index of a record containing the processed cell. + * @param rowFieldNameOrId A string value that specifies the field name or unique identifier (the row's Name property value) of a row containing the processed cell. + * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). + */ + GetCellValue(visibleIndex: number, rowFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets information about the cell currently being edited. + */ + GetEditCellInfo(): ASPxClientVerticalGridCellInfo; + /** + * Returns a value that indicates whether the vertical grid has changed data. + */ + HasChanges(): boolean; + /** + * Returns a value that indicates whether the specified record has changed data. + * @param visibleIndex An integer value that specifies the visible index of a record. + */ + HasChanges(visibleIndex: number): boolean; + /** + * Returns a value that indicates whether the specified data cell's data has been changed. + * @param visibleIndex An integer value that specifies the visible index of a record. + * @param rowFieldNameOrId A string value that identifies the row by the name of the data source field to which the row is bound, or by the row's name. + */ + HasChanges(visibleIndex: number, rowFieldNameOrId: string): boolean; + /** + * Resets changes in the specified record. + * @param visibleIndex An integer value that specifies the visible index of a record. + */ + ResetChanges(visibleIndex: number): void; + /** + * Resets changes in the specified cell. + * @param visibleIndex An integer value that specifies the visible index of a record containing the processed cell. + * @param rowIndex A string value that specifies the field name or unique identifier (the row's Name property value) of a row containing the processed cell. + */ + ResetChanges(visibleIndex: number, rowIndex: number): void; + /** + * Switches the specified cell to batch edit mode. + * @param visibleIndex A zero-based integer value that specifies the visible index of a record containing the processed cell. + * @param rowIndex A zero-based integer value that identifies the row which contains the processed cell in the rows collection. + */ + StartEdit(visibleIndex: number, rowIndex: number): void; + /** + * Ends the cell(s) editing. + */ + EndEdit(): void; +} +/** + * Contains style settings related to media elements in ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorCommandStyleSettings { + /** + * Gets or sets a media element's CSS class name. + * Value: A string that specifies a class name. + */ + className: string; + /** + * Gets or sets an element's width. + * Value: A string that specifies an element's width in any correct format. + */ + width: string; + /** + * Gets or sets an element's height. + * Value: A string that specifies an element's height in any correct format. + */ + height: string; + /** + * Gets or sets a media element's border width. + * Value: A string that specifies a border width in any correct format. + */ + borderWidth: string; + /** + * Gets or sets a media element's border color. + * Value: A string that specifies a border color in any correct format. + */ + borderColor: string; + /** + * Gets or sets a media element's border style. + * Value: A string that specifies a border style in any correct format. + */ + borderStyle: string; + /** + * Gets or sets an element's top margin. + * Value: A string that specifies an element's top margin in any correct format. + */ + marginTop: string; + /** + * Gets or sets an element's right margin. + * Value: A string that specifies an element's right margin in any correct format. + */ + marginRight: string; + /** + * Gets or sets an element's bottom margin. + * Value: A string that specifies an element's bottom margin in any correct format. + */ + marginBottom: string; + /** + * Gets or sets an element's left margin. + * Value: A string that specifies an element's left margin in any correct format. + */ + marginLeft: string; + /** + * Gets or sets a media element's background color. + * Value: A string that specifies a background color in any correct format. + */ + backgroundColor: string; + /** + * Gets or sets the element's text alignment. + * Value: A string value that specifies the element's text alignment in any correct format. + */ + textAlign: string; + /** + * Gets or sets the element's vertical alignment. + * Value: A string value that specifies the element's vertical alignment in any correct format. + */ + verticalAlign: string; +} +/** + * The base class for parameters used in the ASPxHtmlEditor's client-side commands. + */ +interface ASPxClientHtmlEditorCommandArguments { + /** + * Gets the currently selected element in the ASPxHtmlEditor. + * Value: An HTML object which is the currently selected element. + */ + selectedElement: Object; +} +/** + * Contains settings related to the INSERTIMAGE_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertImageCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Specifies the source of the target image. + * Value: A string specifying the source of the target image. + */ + src: string; + /** + * Creates an alternate text for the target image. + * Value: A string that specifies an alternate text for the target image. + */ + alt: string; + /** + * Determines if the target image is wrapped with text. + * Value: true, if the target image is wrapped with text; otherwise, false. + */ + useFloat: boolean; + /** + * Determines the position of the target image. + * Value: A string value defining the position of the target image. + */ + align: string; + /** + * Contains the style settings specifying the appearance of the target image. + * Value: An object that contains the style settings specifying the appearance of the target image. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +/** + * Contains settings related to the CHANGEIMAGE_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeImageCommandArguments extends ASPxClientHtmlEditorInsertImageCommandArguments { +} +/** + * Contains settings related to the INSERTLINK_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertLinkCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Specifies the url of the page the target link goes to. + * Value: A string value specifying the target link url. + */ + url: string; + /** + * Specifiies the text of the target link. + * Value: A string value specifying the text of the target link. + */ + text: string; + /** + * Determines where to open the target link. + * Value: A string that specifies where to open the target link in any correct format. + */ + target: string; + /** + * Defines the title of the target link. + * Value: A string value defining the title of the target link. + */ + title: string; + /** + * Contains the style settings defining the appearance of the target link element. + * Value: An object that contains the style settings defining the appearance of the target link element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +/** + * The base class for parameters related to inserting or changing media elements in the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorChangeMediaElementCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Defines the HTML "id" attribute of the target media element. + * Value: A string value which is a unique identifier for the element. + */ + id: string; + /** + * Defines the source of the target media element. + * Value: A string defining the source of the target media element. + */ + src: string; + /** + * Determines the position of the target media element. + * Value: A string value indicating the position of the target media element. + */ + align: string; + /** + * Contains the style settings defining the appearance of the target media element. + * Value: An object that contains the style settings defining the appearance of the target media element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; + /** + * Returns the name of the client-side command corresponding to the parameter. + */ + GetCommandName(): string; +} +/** + * The base class for parameters related to inserting or changing HTML5 media elements (Audio and Video) in the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorChangeHtml5MediaElementCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments { + /** + * Determines if a media file will start playing automatically. + * Value: true, if autoplay is enabled; otherwise, false. + */ + autoPlay: boolean; + /** + * Determines if a media file repeats indefinitely, or stops when it reaches the last frame. + * Value: true, to loop playback; otherwise, false. + */ + loop: boolean; + /** + * Determines if the media player controls should be displayed. + * Value: true, if media player controls are displayed; otherwise, false. + */ + showPlayerControls: boolean; + /** + * Determines how a media file should be loaded when the page loads. + * Value: One of the ASPxClientHtmlEditorMediaPreloadMode enumeration values. + */ + preloadMode: string; +} +/** + * Contains settings related to the INSERTAUDIO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertAudioCommandArguments extends ASPxClientHtmlEditorChangeHtml5MediaElementCommandArguments { +} +/** + * Contains settings related to the CHANGEAUDIO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeAudioCommandArguments extends ASPxClientHtmlEditorInsertAudioCommandArguments { +} +/** + * Contains settings related to the INSERTVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertVideoCommandArguments extends ASPxClientHtmlEditorChangeHtml5MediaElementCommandArguments { + /** + * Defines the URL of an image that is shown while the video file is downloading, or until an end-user clicks the play button. + * Value: A string value that specifies the poster image URL. + */ + posterUrl: string; +} +/** + * Contains settings related to the CHANGEVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeVideoCommandArguments extends ASPxClientHtmlEditorInsertVideoCommandArguments { +} +/** + * Contains settings related to the INSERTFLASH_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertFlashCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments { + /** + * Determines if the target flash element will start playing automatically. + * Value: true, if autoplay is enabled; otherwise, false. + */ + autoPlay: boolean; + /** + * Defines if the target flash element repeats indefinitely, or stops when it reaches the last frame. + * Value: true, to loop playback; otherwise, false. + */ + loop: boolean; + /** + * Determines if the flash related items are displayed in the context menu of the target flash element. + * Value: true, if the specific context menu items are displayed; otherwise, false + */ + enableFlashMenu: boolean; + /** + * Determines if the target flash element can be displayed in the fullscreen mode. + * Value: true, if the fullscreen mode is allowed; otherwise, false. + */ + allowFullscreen: boolean; + /** + * Defines the rendering quality level used for the target flash element. + * Value: A string value that specifies the target flash element rendering quality. + */ + quality: string; +} +/** + * Contains settings related to the CHANGEFLASH_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeFlashCommandArguments extends ASPxClientHtmlEditorInsertFlashCommandArguments { +} +/** + * Contains settings related to the INSERTYOUTUBEVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments { + /** + * Determines if suggested videos are shown after the target YouTube video finishes. + * Value: true, to show suggested videos; otherwise, false + */ + showRelatedVideos: boolean; + /** + * Determines if the target YouTube video title and player actions (Watch later, Share) are shown. + * Value: true, to display the title and player actions; otherwise, false. + */ + showVideoInfo: boolean; + /** + * Determines if the privacy-enhanced mode is enabled for the target YouTube video. + * Value: true, if the privace-enhanced mode is enabled; otherwise, false + */ + enablePrivacyEnhancedMode: boolean; + /** + * Determines if the player controls are displayed for the target YouTube video. + * Value: true, if the player controls are displayed; otherwise, false. + */ + showPlayerControls: boolean; +} +/** + * Contains settings related to the CHANGEYOUTUBEVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeYouTubeVideoCommandArguments extends ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments { +} +interface ASPxClientHtmlEditorTablePropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; + align: string; + cellPadding: number; + cellSpacing: number; + caption: string; + headers: string; + summary: string; +} +interface ASPxClientHtmlEditorInsertTableCommandArguments extends ASPxClientHtmlEditorTablePropertiesCommandArguments { + columns: number; + rows: number; + isEqualColumnWidth: boolean; +} +interface ASPxClientHtmlEditorTableCellPropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; + applyForAll: boolean; +} +interface ASPxClientHtmlEditorTableRowPropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +interface ASPxClientHtmlEditorTableColumnPropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +/** + * A method that will handle the DialogInitialized client event. + */ +interface ASPxClientHtmlEditorDialogInitializedEventHandler { + /** + * A method that will handle the client DialogInitialized event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorDialogInitializedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorDialogInitializedEventArgs): void; +} +/** + * Provides data for the DialogInitialized client event. + */ +interface ASPxClientHtmlEditorDialogInitializedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dialog that has been initialized. + * Value: A string value that is the name of the initialized dialog. + */ + dialogName: string; +} +/** + * A method that will handle the CommandExecuting event. + */ +interface ASPxClientHtmlEditorCommandExecutingEventHandler { + /** + * A method that will handle the client CommandExecuted event. + * @param source The event's source. + * @param e An ASPxClientHtmlEditorCommandExecutingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCommandExecutingEventArgs): void; +} +/** + * Provides data for the CommandExecuting event. + */ +interface ASPxClientHtmlEditorCommandExecutingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value specifying the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: An object containing additional information about the processed command. + */ + parameter: Object; +} +/** + * A method that will handle the client events related to command processing. + */ +interface ASPxClientHtmlEditorCommandEventHandler { + /** + * A method that will handle the corresponding client event. + * @param source The event source. This parameter identifies the editor which raised the event. + * @param e An ASPxClientHtmlEditorCommandEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCommandEventArgs): void; +} +/** + * Provides data for client events that relate to command processing (CustomCommand). + */ +interface ASPxClientHtmlEditorCommandEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: Object; +} +/** + * A method that will handle the client events that relate to custom dialog operations. + */ +interface ASPxClientHtmlEditorCustomDialogEventHandler { + /** + * A method that will handle the client CustomDialogOpened event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorCustomDialogEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCustomDialogEventArgs): void; +} +/** + * Provides data for client events that relate to custom dialog operations. + */ +interface ASPxClientHtmlEditorCustomDialogEventArgs extends ASPxClientEventArgs { + /** + * Gets the name that uniquely identifies the processed custom dialog. + * Value: A string value that represents the value assigned to the processed custom dialog's Name property. + */ + name: string; +} +/** + * Provides data for client events that relate to closing a custom dialog. + */ +interface ASPxClientHtmlEditorCustomDialogCloseEventArgsBase extends ASPxClientHtmlEditorCustomDialogEventArgs { + /** + * Gets the status of the closed custom dialog. + * Value: An object representing a custom dialog's closing status. By default, it's the "cancel" string if the dialog operation is canceled, or the "ok" string if a dialog is closed by submitting a file. You can also provide your custom status, if your dialog contains additional buttons. + */ + status: Object; +} +/** + * A method that will handle the CustomDialogClosing client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosingEventHandler { + /** + * A method that will handle the client CustomDialogClosing event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorCustomDialogClosingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCustomDialogClosingEventArgs): void; +} +/** + * Provides data for the CustomDialogClosing client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosingEventArgs extends ASPxClientHtmlEditorCustomDialogCloseEventArgsBase { + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the CustomDialogClosed client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosedEventHandler { + /** + * A method that will handle the client CustomDialogClosed event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorCustomDialogClosedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCustomDialogClosedEventArgs): void; +} +/** + * Provides data for the CustomDialogClosed client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosedEventArgs extends ASPxClientHtmlEditorCustomDialogCloseEventArgsBase { + /** + * Gets an object associated with the closed dialog. + * Value: An object containing custom data associated with dialog closing. + */ + data: Object; +} +/** + * A method that will handle the Validation client event. + */ +interface ASPxClientHtmlEditorValidationEventHandler { + /** + * A method that will handle the client Validation event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorValidationEventArgs): void; +} +/** + * Provides data for the Validation client event. + */ +interface ASPxClientHtmlEditorValidationEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets the HTML markup that is the ASPxHtmlEditor's content. + * Value: A string value that specifies the HTML content to validate. + */ + html: string; + /** + * Gets or sets a value specifying whether the validated value is valid. + * Value: true if the validation has been completed successfully; otherwise, false. + */ + isValid: boolean; + /** + * Gets or sets the error text to be displayed within the editor's error frame if the editor's validation fails. + * Value: A string value specifying the error description. + */ + errorText: string; +} +/** + * A method that will handle the ActiveTabChanged event. + */ +interface ASPxClientHtmlEditorTabEventHandler { + /** + * A method that will handle the client ActiveTabChanged event. + * @param source The event's source. + * @param e An ASPxClientHtmlEditorTabEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorTabEventArgs): void; +} +/** + * Provides data for the ActiveTabChanged event that concerns manipulations on tabs. + */ +interface ASPxClientHtmlEditorTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the name that uniquely identifies an editor tab. + * Value: A string value that is the tab name. + */ + name: string; +} +/** + * A method that will handle the ActiveTabChanging event. + */ +interface ASPxClientHtmlEditorTabCancelEventHandler { + /** + * A method that will handle the client ActiveTabChanging event. + * @param source The event's source. + * @param e An ASPxClientHtmlEditorTabCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorTabCancelEventArgs): void; +} +/** + * Provides data for the cancellable ActiveTabChanging event that concerns manipulations on tabs. + */ +interface ASPxClientHtmlEditorTabCancelEventArgs extends ASPxClientHtmlEditorTabEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event, should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the BeforePaste event. + */ +interface ASPxClientHtmlEditorBeforePasteEventHandler { + /** + * A method that will handle the BeforePaste event. + * @param source The event source. This parameter identifies the HTML editor object that raised the event. + * @param e An ASPxClientHtmlEditorBeforePasteEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorBeforePasteEventArgs): void; +} +/** + * Provides data for the BeforePaste event. + */ +interface ASPxClientHtmlEditorBeforePasteEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value identifying the command's name. + */ + commandName: string; + /** + * Gets or sets the HTML markup that is about to be pasted to the ASPxHtmlEditor's content. + * Value: A string value that specifies the HTML content to paste. + */ + html: string; +} +/** + * Represents a client-side equivalent of the ASPxHtmlEditor control. + */ +interface ASPxClientHtmlEditor extends ASPxClientControl { + /** + * Occurs on the client side after a dialog has been initialized. + */ + DialogInitialized: ASPxClientEvent>; + /** + * Occurs before a default or custom command has been executed and allows you to cancel the action. + */ + CommandExecuting: ASPxClientEvent>; + /** + * Enables you to implement a custom command's logic. + */ + CustomCommand: ASPxClientEvent>; + /** + * Occurs after a default or custom command has been executed on the client side. + */ + CommandExecuted: ASPxClientEvent>; + /** + * Fires on the client side when the editor's Design View Area receives input focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Fires on the client side when the editor's Design View Area loses input focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Occurs on the client when a selection is changed within the ASPxHtmlEditor. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the content of the editor changes. + */ + HtmlChanged: ASPxClientEvent>; + /** + * Occurs on the client side after a custom dialog is opened. + */ + CustomDialogOpened: ASPxClientEvent>; + /** + * Fires on the client side before a custom dialog is closed. + */ + CustomDialogClosing: ASPxClientEvent>; + /** + * Occurs on the client side after a custom dialog is closed. + */ + CustomDialogClosed: ASPxClientEvent>; + /** + * Allows you to specify whether the value entered into the ASPxHtmlEditor is valid. + */ + Validation: ASPxClientEvent>; + /** + * Occurs on the client side before a context menu is shown. + */ + ContextMenuShowing: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientHtmlEditor. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after a callback, sent by the CustomDataCallback event handler. + */ + CustomDataCallback: ASPxClientEvent>; + /** + * Occurs on the client side after the editor content is spell checked. + */ + SpellingChecked: ASPxClientEvent>; + /** + * Fires on the client side after the active tab has been changed within a control. + */ + ActiveTabChanged: ASPxClientEvent>; + /** + * Fires on the client side before the active tab is changed within a control. + */ + ActiveTabChanging: ASPxClientEvent>; + /** + * Occurs before an HTML code is pasted to editor content, and allows you to modify it. + */ + BeforePaste: ASPxClientEvent>; + /** + * Returns the document object generated by an iframe element within a design view area. + */ + GetDesignViewDocument(): Object; + /** + * Returns the document object generated by an iframe element within a preview area. + */ + GetPreviewDocument(): Object; + /** + * Returns a collection of client context menu objects. + */ + GetContextMenu(): ASPxClientPopupMenu; + /** + * Returns a value indicating whether an editor is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether an editor is enabled. + * @param value true to enable the editor; false to disable it. + */ + SetEnabled(value: boolean): void; + /** + * Sets input focus to the ASPxHtmlEditor's edit region. + */ + Focus(): void; + /** + * Gets the HTML markup that represents the editor's content. + */ + GetHtml(): string; + /** + * Specifies the HTML markup that represents the editor's content. + * @param html A string value that specifies the HTML markup. + */ + SetHtml(html: string): void; + /** + * Sets the HTML markup that represents the editor's content. + * @param html A string value that specifies the HTML markup. + * @param clearUndoHistory true to clear the undo stack; otherwise, false. + */ + SetHtml(html: string, clearUndoHistory: boolean): void; + /** + * Replaces placeholders with the specified values. + * @param html A string value that specifies the HTML code to process. + * @param placeholders An array of objects that specify the placeholders and values to replace them. + */ + ReplacePlaceholders(html: string, placeholders: Object[]): string; + /** + * Creates a parameter for ASPxHtmlEditor's client-side commands related to changing media elements. + * @param element An element that is being changed. + */ + CreateChangeMediaElementCommandArguments(element: Object): ASPxClientHtmlEditorChangeMediaElementCommandArguments; + /** + * Executes the specified command. + * @param commandName A string value that specifies the command to perform. + * @param parameter A string value specifying additional information about the command to perform. + * @param addToUndoHistory true, to add the specified command to the undo stack; otherwise, false. + */ + ExecuteCommand(commandName: string, parameter: Object, addToUndoHistory: boolean): boolean; + /** + * Adds the current editor state to the undo/redo history. + */ + SaveToUndoHistory(): void; + /** + * Returns the selection in the ASPxHtmlEditor. + */ + GetSelection(): ASPxClientHtmlEditorSelection; + /** + * Restores the selection within the ASPxHtmlEditor. + */ + RestoreSelection(): boolean; + /** + * Sets the value of the combo box within the HtmlEditor on the client side. + * @param commandName A string value that identifies the combo box's command name within the HtmlEditor's control collection. + * @param value A string value that specifies the combo box's new value. + */ + SetToolbarComboBoxValue(commandName: string, value: string): void; + /** + * Sets the value of the dropdown item picker in the HtmlEditor on the client side. + * @param commandName A string value that identifies the dropdown item picker by its command name. This value is contained in the CommandName property. + * @param value A string value that specifies the dropdown item picker's new value, i.e., the ToolbarItemPickerItem object. + */ + SetToolbarDropDownItemPickerValue(commandName: string, value: string): void; + /** + * Specifies the visibility of a ribbon context tab category specified by its name. + * @param categoryName A Name property value of the required category. + * @param active true to make a category visible; false to make it hidden. + */ + SetRibbonContextTabCategoryVisible(categoryName: string, active: string): void; + /** + * Provides access to an object implementing the HtmlEditor's ribbon UI. + */ + GetRibbon(): ASPxClientRibbon; + /** + * Gets a value that indicates whether the editor's value passes validation. + */ + GetIsValid(): boolean; + /** + * Gets the error text to be displayed within the editor's error frame if the editor's validation fails. + */ + GetErrorText(): string; + /** + * Sets a value that specifies whether the editor's value passes validation. + * @param isValid true if the editor's value passes validation; otherwise, false. + */ + SetIsValid(isValid: boolean): void; + /** + * Sets the error text to be displayed within the editor's error frame if the editor's validation fails. + * @param errorText A string value representing the error text. + */ + SetErrorText(errorText: string): void; + /** + * Performs validation of the editor's content. + */ + Validate(): void; + /** + * Set an active tab specified by its name. + * @param name A string value that is the name of the tab. + */ + SetActiveTabByName(name: string): void; + /** + * Returns the name of the active HTML editor tab. + */ + GetActiveTabName(): string; + /** + * Reconnect the control to an external ribbon. + */ + ReconnectToExternalRibbon(): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientDataCallback object that represents the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; +} +/** + * A selection in the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorSelection { + /** + * Returns a DOM element that relates to the current selection. + */ + GetSelectedElement(): Object; + /** + * Returns the HTML markup specifying the currently selected ASPxHtmlEditor content. + */ + GetHtml(): string; + /** + * Returns the text within the currently selected ASPxHtmlEditor content. + */ + GetText(): string; + /** + * Returns an array of the currently selected elements. + */ + GetElements(): Object[]; + /** + * Sets the new HTML markup in place of the currently selected within ASPxHtmlEditor content. + * @param html A string value specifying the new HTML markup. + * @param addToHistory true to add this operation to the history; otherwise, false. + */ + SetHtml(html: string, addToHistory: boolean): void; +} +/** + * The client-side equivalent of the ASPxPivotGrid control. + */ +interface ASPxClientPivotGrid extends ASPxClientControl { + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientPivotGrid. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after a callback that has been processed on the server returns back to the client. + */ + AfterCallback: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Fires before a callback is sent to the server for server-side processing. + */ + BeforeCallback: ASPxClientEvent>; + /** + * Fires on the client side after the customization form's visible state has been changed. + */ + CustomizationFieldsVisibleChanged: ASPxClientEvent>; + /** + * Occurs when a cell is clicked. + */ + CellClick: ASPxClientEvent>; + /** + * Occurs when a cell is double clicked. + */ + CellDblClick: ASPxClientEvent>; + /** + * Occurs when a custom menu item has been clicked. + */ + PopupMenuItemClick: ASPxClientEvent>; + /** + * Indicates whether the Defer Layout Update check box is enabled. + */ + IsDeferUpdatesChecked(): boolean; + /** + * Indicates whether the Filter Editor (Prefilter) is visible. + */ + IsPrefilterVisible(): boolean; + /** + * Shows the Filter Editor. + */ + ShowPrefilter(): void; + /** + * Hides the Filter Editor. + */ + HidePrefilter(): void; + /** + * Clears the filter expression applied using the Prefilter (Filter Editor). + */ + ClearPrefilter(): void; + /** + * Enables or disables the current filter applied by the Filter Editor (Prefilter). + */ + ChangePrefilterEnabled(): void; + /** + * Returns a value that specifies whether the customization form is visible. + */ + GetCustomizationFieldsVisibility(): boolean; + /** + * Specifies the visibility of the customization form. + * @param value true to display the customization form; false to hide the customization form. + */ + SetCustomizationFieldsVisibility(value: boolean): void; + /** + * Switches the customization form's visible state. + */ + ChangeCustomizationFieldsVisibility(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A method that will handle the CellDblClick event. + */ +interface ASPxClientClickEventHandler { + /** + * A method that will handle the CellDblClick event. + * @param source The event source. + * @param e An ASPxClientClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientClickEventArgs): void; +} +/** + * Provides data for the CellDblClick client events. + */ +interface ASPxClientClickEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the parameters associated with the CellDblClick events. + * Value: An object that contains parameters associated with the CellDblClick events. + */ + HtmlEvent: Object; + /** + * Gets the processed cell's value. + * Value: An object that represents the processed cell's value. + */ + Value: Object; + /** + * Gets the index of a column that owns the processed cell. + * Value: An integer value that identifies a column. + */ + ColumnIndex: number; + /** + * Gets the index of a row that owns the processed cell. + * Value: An integer value that identifies a row. + */ + RowIndex: number; + /** + * Gets a column field value. + * Value: An object that represents a column field value. + */ + ColumnValue: Object; + /** + * Gets a row field value. + * Value: An object that represents a row field value. + */ + RowValue: Object; + /** + * Gets a column field name. + * Value: A String value that represents a column field name. + */ + ColumnFieldName: string; + /** + * Gets a row field name. + * Value: A String value that represents a row field name. + */ + RowFieldName: string; + /** + * Gets a column value type. + * Value: A String value that represents a column value type. + */ + ColumnValueType: string; + /** + * Gets a row value type. + * Value: A String value that represents a row value type. + */ + RowValueType: string; + /** + * Gets the index of the data field which corresponds to the clicked summary value. + * Value: An integer value that identifies the data field. + */ + DataIndex: number; +} +/** + * A method that will handle the PopupMenuItemClick event. + */ +interface ASPxClientPivotMenuItemClickEventHandler { + /** + * A method that will handle the PopupMenuItemClick event. + * @param source The event source. + * @param e An ASPxClientPivotMenuItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPivotMenuItemClickEventArgs): void; +} +/** + * Provides data for the PopupMenuItemClick event. + */ +interface ASPxClientPivotMenuItemClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the context menu's type. + * Value: A PivotGridPopupMenuType enumeration value that identifies the context menu. + */ + MenuType: string; + /** + * Gets the name of the menu item currently being clicked. + * Value: A String value that identifies the clicked item by its name. + */ + MenuItemName: string; + /** + * Gets the field's unique indentifier. + * Value: A string which specifies the field's unique indentifier. + */ + FieldID: string; + /** + * Gets the index of the field value for which the popup menu has been invoked. + * Value: An integer value that identifies the field value. + */ + FieldValueIndex: number; +} +/** + * A client-side equivalent of the ASPxPivotCustomizationControl control. + */ +interface ASPxClientPivotCustomization extends ASPxClientControl { + /** + * Returns an HTML element that represents the root of the control's hierarchy. + */ + GetMainContainer(): Object; + /** + * Returns a client-side equivalent of the owner Pivot Grid Control. + */ + GetPivotGrid(): ASPxClientPivotGrid; + /** + * Specifies the Customization Control's height. + * @param value An integer value that specifies the Customization Control's height. + */ + SetHeight(value: number): void; + /** + * Specifies the Customization Control's width. + * @param value An integer value that specifies the Customization Control's width. + */ + SetWidth(value: number): void; + /** + * Recalculates the Customization Control height. + */ + UpdateHeight(): void; + /** + * Specifies the Customization Control's layout. + * @param layout A string that specifies the Customization Control's layout. + */ + SetLayout(layout: string): void; +} +/** + * A method that will handle the CustomCommandExecuted event. + */ +interface ASPxClientRichEditCustomCommandExecutedEventHandler { + /** + * A method that will handle the CustomCommandExecuted event. + * @param source An object representing the event source. Identifies the RichEdit that raised the event. + * @param e A ASPxClientRichEditCustomCommandExecutedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditCustomCommandExecutedEventArgs): void; +} +/** + * Provides data for the CustomCommandExecuted event. + */ +interface ASPxClientRichEditCustomCommandExecutedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: Object; +} +/** + * A method that will handle the HyperlinkClick event. + */ +interface ASPxClientRichEditHyperlinkClickEventHandler { + /** + * A method that will handle the HyperlinkClick event. + * @param source The event source. + * @param e An ASPxClientRichEditHyperlinkClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditHyperlinkClickEventArgs): void; +} +/** + * Provides data for the HyperlinkClick event. + */ +interface ASPxClientRichEditHyperlinkClickEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether the event is handled manually, so no default processing is required. + * Value: true if the event is handled and no default processing is required; otherwise false. + */ + handled: boolean; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; + /** + * Gets a value identifying the clicked hyperlink type. + * Value: One of the values. + */ + hyperlinkType: ASPxClientOfficeDocumentLinkType; + /** + * Gets the clicked link's URI. + * Value: A sting value specifying the link's URI. + */ + targetUri: string; +} +/** + * A client-side equivalent of the ASPxRichEdit object. + */ +interface ASPxClientRichEdit extends ASPxClientControl { + /** + * Provides access to document structural elements. + * Value: A object that lists RichEdit's document structural elements. + */ + document: RichEditDocument; + /** + * Provides access to RichEdit's client-side commands. + * Value: A object that lists RichEdit's client-side commands. + */ + commands: RichEditCommands; + /** + * Provides access to the client methods that changes the selection. + * Value: A object that lists methods to work with the selection. + */ + selection: RichEditSelection; + unitConverter: RichEditUnitConverter; + /** + * Occurs after a custom command has been executed on the client side. + */ + CustomCommandExecuted: ASPxClientEvent>; + /** + * Fires after a client change has been made to the document and the client-server synchronization starts to apply the change on the server. + */ + BeginSynchronization: ASPxClientEvent>; + /** + * Fires after a document change has been applied to the server and server and client document models have been synchronized. + */ + EndSynchronization: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the RichEdit. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires if any change is made to the RichEdit's document on the client. + */ + DocumentChanged: ASPxClientEvent>; + /** + * Occurs when a hyperlink is clicked within the document. + */ + HyperlinkClick: ASPxClientEvent>; + /** + * Occurs when the selection is changed within the document. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Enables you to switch the full-screen mode of the Rich Text Editor. + * @param fullscreen true to activate full-screen mode; false to deactivate full-screen mode. + */ + SetFullscreenMode(fullscreen: boolean): void; + /** + * Provides access to an object implementing the RichEdit's ribbon UI. + */ + GetRibbon(): ASPxClientRibbon; + /** + * Sets input focus to the RichEdit. + */ + Focus(): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Indicates whether any unsaved changes are contained in the current document. + */ + HasUnsavedChanges(): boolean; + /** + * Reconnects the RichEdit to an external ribbon. + */ + ReconnectToExternalRibbon(): void; +} +/** + * Contains a set of the available client commands. + */ +interface RichEditCommands { + /** + * Gets a command to create a new empty document. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileNew: FileNewCommand; + /** + * Gets a command to open the file, specifying its path. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileOpen: FileOpenCommand; + /** + * Gets a command to invoke the File Open dialog allowing one to select and load a document file into RichEdit. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileOpenDialog: FileOpenDialogCommand; + /** + * Gets a command to save the document to a file. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileSave: FileSaveCommand; + /** + * Gets a command to download the document file, specifying its extension. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileDownload: FileDownloadCommand; + /** + * Gets a command to invoke the Save As dialog that prompts for a file name and saves the current document in a file with the specified path. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileSaveAs: FileSaveAsCommand; + fileSaveAsDialog: FileSaveAsDialogCommand; + /** + * Gets a command to invoke a browser-specific Print dialog allowing one to print the current document. + * Value: A object that provides methods for executing the command and checking its state. + */ + filePrint: FilePrintCommand; + /** + * Gets a command to cancel changes caused by the previous command. + * Value: A object that provides methods for executing the command and checking its state. + */ + undo: UndoCommand; + /** + * Gets a command to reverse actions of the previous undo command. + * Value: A object that provides methods for executing the command and checking its state. + */ + redo: RedoCommand; + /** + * Gets a command to copy the selected text and place it to the clipboard. + * Value: A object that provides methods for executing the command and checking its state. + */ + copy: CopyCommand; + /** + * Gets a command to paste the text from the clipboard over the selection. + * Value: A object that provides methods for executing the command and checking its state. + */ + paste: PasteCommand; + /** + * Gets a command to cut the selected text and place it to the clipboard. + * Value: A object that provides methods for executing the command and checking its state. + */ + cut: CutCommand; + /** + * Gets a command to change the font name of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontName: ChangeFontNameCommand; + /** + * Gets a command to change the font size of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontSize: ChangeFontSizeCommand; + /** + * Gets a command to increase the font size of characters in a selected range to the closest larger predefined value. + * Value: A object that provides methods for executing the command and checking its state. + */ + increaseFontSize: IncreaseFontSizeCommand; + /** + * Gets a command to decrease the selected range's font size to the closest smaller predefined value. + * Value: A object that provides methods for executing the command and checking its state. + */ + decreaseFontSize: DecreaseFontSizeCommand; + /** + * Gets a command to convert selected text to upper case. + * Value: A object that provides methods for executing the command and checking its state. + */ + makeTextUpperCase: MakeTextUpperCaseCommand; + /** + * Gets a command to convert selected text to lower case. + * Value: A object that provides methods for executing the command and checking its state. + */ + makeTextLowerCase: MakeTextLowerCaseCommand; + /** + * Gets a command to capitalize each word in the selected sentence. + * Value: A object that provides methods for executing the command and checking its state. + */ + capitalizeEachWordTextCase: CapitalizeEachWordTextCaseCommand; + /** + * Gets a command to toggle case for each character - upper case becomes lower, lower case becomes upper. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTextCase: ToggleTextCaseCommand; + /** + * Gets a command to change the bold formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontBold: ChangeFontBoldCommand; + /** + * Gets a command to change the italic formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontItalic: ChangeFontItalicCommand; + /** + * Gets a command to change the underline formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontUnderline: ChangeFontUnderlineCommand; + /** + * Gets a command to change the strikeout formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontStrikeout: ChangeFontStrikeoutCommand; + /** + * Gets a command to change the superscript formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontSuperscript: ChangeFontSuperscriptCommand; + /** + * Gets a command to change the subscript formatting of characters in the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontSubscript: ChangeFontSubscriptCommand; + /** + * Gets a command to change the font color of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontForeColor: ChangeFontForeColorCommand; + /** + * Gets a command to change the background color of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontBackColor: ChangeFontBackColorCommand; + /** + * Gets a command to reset the selected text's formatting to default. + * Value: A object that provides methods for executing the command and checking its state. + */ + clearFormatting: ClearFormattingCommand; + /** + * Gets a command to change the selected range's style. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeStyle: ChangeStyleCommand; + /** + * Gets a command to toggle between the bulleted paragraph and normal text. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleBulletedList: ToggleBulletedListCommand; + /** + * Gets a command to toggle between the numbered paragraph and normal text. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleNumberingList: ToggleNumberingListCommand; + /** + * Gets a command to toggle between the multilevel list style and normal text. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleMultilevelList: ToggleMultilevelListCommand; + /** + * Gets a command to increment the indent level of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + increaseIndent: IncreaseIndentCommand; + /** + * Gets a command to decrement the indent level of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + decreaseIndent: DecreaseIndentCommand; + /** + * Gets a command to toggle hidden symbol visibility. + * Value: A object that provides methods for executing the command and checking its state. + */ + showHiddenSymbols: ShowHiddenSymbolsCommand; + /** + * Gets a command to toggle left paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentLeft: ToggleParagraphAlignmentLeftCommand; + /** + * Gets a command to toggle centered paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentCenter: ToggleParagraphAlignmentCenterCommand; + /** + * Gets a command to toggle right paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentRight: ToggleParagraphAlignmentRightCommand; + /** + * Gets a command to toggle justified paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentJustify: ToggleParagraphAlignmentJustifyCommand; + /** + * Gets a command to format a current paragraph with single line spacing. + * Value: A object that provides methods for executing the command and checking its state. + */ + setSingleParagraphSpacing: SetSingleParagraphSpacingCommand; + /** + * Gets a command to format a current paragraph with one and a half line spacing. + * Value: A object that provides methods for executing the command and checking its state. + */ + setSesquialteralParagraphSpacing: SetSesquialteralParagraphSpacingCommand; + /** + * Gets a command to format a selected paragraph with double line spacing. + * Value: A object that provides methods for executing the command and checking its state. + */ + setDoubleParagraphSpacing: SetDoubleParagraphSpacingCommand; + /** + * Gets a command to add spacing before a paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + addSpacingBeforeParagraph: AddSpacingBeforeParagraphCommand; + /** + * Gets a command to add spacing after a paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + addSpacingAfterParagraph: AddSpacingAfterParagraphCommand; + /** + * Gets a command to remove spacing before the selected paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeSpacingBeforeParagraph: RemoveSpacingBeforeParagraphCommand; + /** + * Gets a command to remove spacing after the selected paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeSpacingAfterParagraph: RemoveSpacingAfterParagraphCommand; + /** + * Gets a command to change the background color of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeParagraphBackColor: ChangeParagraphBackColorCommand; + /** + * Gets a command to invoke the Font dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openFontFormattingDialog: OpenFontFormattingDialogCommand; + /** + * Gets a command to change the font formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontFormatting: ChangeFontFormattingCommand; + /** + * Gets a command to invoke the Indents And Spacing tab of the Paragraph dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openParagraphFormattingDialog: OpenParagraphFormattingDialogCommand; + /** + * Gets a command to change the formatting of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeParagraphFormatting: ChangeParagraphFormattingCommand; + /** + * Gets a command to insert a page break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertPageBreak: InsertPageBreakCommand; + /** + * Gets a command to invoke the Insert Table dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertTableDialog: OpenInsertTableDialogCommand; + /** + * Gets a command to invoke the Insert Table dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTable: InsertTableCommand; + /** + * Gets a command to invoke the Insert Image dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertPictureDialog: OpenInsertPictureDialogCommand; + /** + * Gets a command to insert a picture from a file. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertPicture: InsertPictureCommand; + /** + * Gets a command to invoke the Bookmark dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertBookmarkDialog: OpenInsertBookmarkDialogCommand; + /** + * Gets a command to insert a new bookmark that references the current selection. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertBookmark: InsertBookmarkCommand; + /** + * A command to delete a specific bookmark. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteBookmark: DeleteBookmarkCommand; + /** + * Gets a command to navigate to the specified bookmark. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToBookmark: GoToBookmarkCommand; + /** + * Gets a command to invoke the Hyperlink dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertHyperlinkDialog: OpenInsertHyperlinkDialogCommand; + /** + * Gets a command to insert a hyperlink at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertHyperlink: InsertHyperlinkCommand; + /** + * Gets a command to delete the selected hyperlink. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteHyperlink: DeleteHyperlinkCommand; + /** + * Gets a command to delete all hyperlinks in the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteHyperlinks: DeleteHyperlinksCommand; + /** + * Gets a command to navigate to the document bookmark or URI (uniform resource identifier) specified for the hyperlink. + * Value: A object that provides methods for executing the command and checking its state. + */ + openHyperlink: OpenHyperlinkCommand; + /** + * Gets a command to invoke the Symbols dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertSymbolDialog: OpenInsertSymbolDialogCommand; + /** + * Gets a command to insert a character into a document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSymbol: InsertSymbolCommand; + /** + * Gets a command to change page margin settings. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageMargins: ChangePageMarginsCommand; + /** + * Gets a command to invoke the Margins tab of the Page Setup dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openPageMarginsDialog: OpenPageMarginsDialogCommand; + /** + * Gets a command to change the page orientation. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageOrientation: ChangePageOrientationCommand; + /** + * Gets a command to define the page size dialog's settings. + * Value: A object that provides methods for executing the command and checking its state. + */ + setPageSizeDialog: SetPageSizeDialogCommand; + /** + * Gets a command to invoke the Paper tab of the Page Setup dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openPagePaperSizeDialog: OpenPagePaperSizeDialogCommand; + /** + * Gets a command to change the page size. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageSize: ChangePageSizeCommand; + /** + * Gets a command to change the number of section columns having the same width. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeSectionEqualColumnCount: ChangeSectionEqualColumnCountCommand; + /** + * Gets a command to invoke the Columns dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openSectionColumnsDialog: OpenSectionColumnsDialogCommand; + /** + * Gets a command to change the settings of individual section columns. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeSectionColumns: ChangeSectionColumnsCommand; + /** + * Gets a command to insert a column break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertColumnBreak: InsertColumnBreakCommand; + /** + * Gets a command to insert a section break and starts a new section on the next page. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSectionBreakNextPage: InsertSectionBreakNextPageCommand; + /** + * Gets a command to insert a section break and starts a new section on the next even-numbered page. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSectionBreakEvenPage: InsertSectionBreakEvenPageCommand; + /** + * Gets a command to insert a section break and starts a new section on the next odd-numbered page. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSectionBreakOddPage: InsertSectionBreakOddPageCommand; + /** + * Gets a command to set the background color of the page. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageColor: ChangePageColorCommand; + /** + * Gets a command to toggle the horizontal ruler's visibility. + * Value: A object that provides methods for executing the command and checking its state. + */ + showHorizontalRuler: ShowHorizontalRulerCommand; + /** + * Gets a command to toggle the fullscreen mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + setFullscreen: SetFullscreenCommand; + /** + * Gets a command to invoke the Bulleted and Numbering dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openNumberingListDialog: OpenNumberingListDialogCommand; + /** + * Gets a command to insert a paragraph break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertParagraph: InsertParagraphCommand; + /** + * Gets a command to insert text at the current position in a document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertText: InsertTextCommand; + /** + * Gets a command to delete the text in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + delete: DeleteCommand; + /** + * Gets a command to remove the previous word. + * Value: A object that provides methods for executing the command and checking its state. + */ + removePrevWord: RemovePrevWordCommand; + /** + * Gets a command to remove the next word. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeNextWord: RemoveNextWordCommand; + /** + * Gets a command to move the cursor backwards and erase the character in that space. + * Value: A object that provides methods for executing the command and checking its state. + */ + backspace: BackspaceCommand; + /** + * Gets a command to insert the line break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertLineBreak: InsertLineBreakCommand; + /** + * Gets a command to scale pictures in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePictureScale: ChangePictureScaleCommand; + /** + * Gets a command to increment the left indentation of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + incrementParagraphLeftIndent: IncrementParagraphLeftIndentCommand; + /** + * Gets a command to decrement the paragraph's left indent position. + * Value: A object that provides methods for executing the command and checking its state. + */ + decrementParagraphLeftIndent: DecrementParagraphLeftIndentCommand; + /** + * Gets a command to move the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + moveContent: MoveContentCommand; + /** + * Gets a command to copy the selected text and place it to the specified position. + * Value: A object that provides methods for executing the command and checking its state. + */ + copyContent: CopyContentCommand; + /** + * Gets a command to insert a tab character at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTab: InsertTabCommand; + /** + * Gets a command to invoke the Tabs dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openTabsDialog: OpenTabsDialogCommand; + /** + * Gets a command to change paragraph tab stops. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTabs: ChangeTabsCommand; + /** + * Gets a command to invoke the Customize Numbered List dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openCustomNumberingListDialog: OpenCustomNumberingListDialogCommand; + /** + * Gets a command to customize the numbered list parameters. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeCustomNumberingList: ChangeCustomNumberingListCommand; + /** + * Gets a command to restart the numbering list. + * Value: A object that provides methods for executing the command and checking its state. + */ + restartNumberingList: RestartNumberingListCommand; + /** + * Gets a command to increment the indent level of paragraphs in a selected numbered list. + * Value: A object that provides methods for executing the command and checking its state. + */ + incrementNumberingIndent: IncrementNumberingIndentCommand; + /** + * Gets a command to decrement the indent level of paragraphs in a selected numbered list. + * Value: A object that provides methods for executing the command and checking its state. + */ + decrementNumberingIndent: DecrementNumberingIndentCommand; + /** + * Gets a command to create an empty field in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + createField: CreateFieldCommand; + /** + * Gets a command to update the field's result. + * Value: A object that provides methods for executing the command and checking its state. + */ + updateField: UpdateFieldCommand; + /** + * Gets a command to display the selected field's codes. + * Value: A object that provides methods for executing the command and checking its state. + */ + showFieldCodes: ShowFieldCodesCommand; + /** + * Get a command to display all field codes in place of the fields in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + showAllFieldCodes: ShowAllFieldCodesCommand; + /** + * Gets a command to continue the list's numbering. + * Value: A object that provides methods for executing the command and checking its state. + */ + continueNumberingList: ContinueNumberingListCommand; + /** + * Gets a command to insert numeration to a paragraph making it a numbering list item. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertNumeration: InsertNumerationCommand; + /** + * Gets a command to remove the selected numeration. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeNumeration: RemoveNumerationCommand; + /** + * Gets a command to update all fields in the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + updateAllFields: UpdateAllFieldsCommand; + /** + * Gets a command to insert a DATE field displaying the current date. + * Value: A object that provides methods for executing the command and checking its state. + */ + createDateField: CreateDateFieldCommand; + /** + * Gets a command to insert a TIME field displaying the current time. + * Value: A object that provides methods for executing the command and checking its state. + */ + createTimeField: CreateTimeFieldCommand; + /** + * A command to insert a PAGE field displaying the current page number. + * Value: A object that provides methods for executing the command and checking its state. + */ + createPageField: CreatePageFieldCommand; + /** + * Gets a command to convert the text of all selected sentences to sentence case. + * Value: A object that provides methods for executing the command and checking its state. + */ + makeTextSentenceCase: MakeTextSentenceCaseCommand; + /** + * Gets a command to switch the text case at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + switchTextCase: SwitchTextCaseCommand; + /** + * Gets a command to navigate to the first data record. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToFirstDataRecord: GoToFirstDataRecordCommand; + /** + * Gets a command to navigate to the previous data record of the bound data source. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToPreviousDataRecord: GoToPreviousDataRecordCommand; + /** + * Gets a command to navigate to the next data record of the bound data source. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToNextDataRecord: GoToNextDataRecordCommand; + /** + * Gets a command to navigate to the next data record. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToDataRecord: GoToDataRecordCommand; + /** + * Gets a command to navigate to the last data record of the bound data source. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToLastDataRecord: GoToLastDataRecordCommand; + /** + * Gets a command to display or hide actual data in MERGEFIELD fields. + * Value: A object that provides methods for executing the command and checking its state. + */ + showMergedData: ShowMergedDataCommand; + /** + * Gets a command to invoke the Insert Merge Field dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + mergeFieldDialog: MergeFieldDialogCommand; + /** + * Gets a command to insert a MERGEFIELD field (with a data source column name) at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + createMergeField: CreateMergeFieldCommand; + /** + * Gets a command to invoke the Export Range dialog window to start a mail merge. + * Value: A object that provides methods for executing the command and checking its state. + */ + mailMergeDialog: MailMergeDialogCommand; + /** + * Gets a command to perform a mail merge and download the merged document. + * Value: A object that provides methods for executing the command and checking its state. + */ + mailMergeAndDownload: MailMergeAndDownloadCommand; + /** + * Gets a command to perform a mail merge and save the merged document to the server. + * Value: A object that provides methods for executing the command and checking its state. + */ + mailMergeAndSaveAs: MailMergeAndSaveAsCommand; + /** + * Gets a command to activate the page header and begin editing. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertHeader: InsertHeaderCommand; + /** + * Gets a command to activate the page footer and begin editing. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertFooter: InsertFooterCommand; + /** + * Gets a command to link a header/footer to the previous section, so it has the same content. + * Value: A object that provides methods for executing the command and checking its state. + */ + linkHeaderFooterToPrevious: LinkHeaderFooterToPreviousCommand; + /** + * Gets a command to navigate to the page footer from the page header in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToFooter: GoToFooterCommand; + /** + * Gets a command to navigate to the page header from the page footer in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToHeader: GoToHeaderCommand; + /** + * Gets a command to navigate to the next page header or footer in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToNextHeaderFooter: GoToNextHeaderFooterCommand; + /** + * Gets a command to navigate to the previous page header or footer in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToPreviousHeaderFooter: GoToPreviousHeaderFooterCommand; + /** + * Gets a command to change the header/footer edit mode, so it allows creation of a different header or footer for the first page of a document or section. + * Value: A object that provides methods for executing the command and checking its state. + */ + setDifferentFirstPageHeaderFooter: SetDifferentFirstPageHeaderFooterCommand; + /** + * Gets a command to change the header/footer edit mode so it allows creation of a different header or footer for odd and even pages of a document or section. + * Value: A object that provides methods for executing the command and checking its state. + */ + setDifferentOddAndEvenPagesHeaderFooter: SetDifferentOddAndEvenPagesHeaderFooterCommand; + /** + * Gets a command to finish header/footer editing. + * Value: A object that provides methods for executing the command and checking its state. + */ + closeHeaderFooter: CloseHeaderFooterCommand; + /** + * Gets a command to insert a NUMPAGES field displaying the total number of pages. + * Value: A object that provides methods for executing the command and checking its state. + */ + createPageCountField: CreatePageCountFieldCommand; + /** + * Gets a command to invoke the Table tab of the Table Properties dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openTableFormattingDialog: OpenTableFormattingDialogCommand; + /** + * Gets a command to change the selected table's formatting. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableFormatting: ChangeTableFormattingCommand; + /** + * Gets a command to change the selected table rows' preferred height. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableRowPreferredHeight: ChangeTableRowPreferredHeightCommand; + /** + * Gets a command to change the preferred cell width of the selected table rows. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableCellPreferredWidth: ChangeTableCellPreferredWidthCommand; + /** + * Gets a command to toggle inside borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellInsideBorders: ToggleTableCellInsideBordersCommand; + /** + * Gets a command to change the selected table columns' preferred width. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableColumnPreferredWidth: ChangeTableColumnPreferredWidthCommand; + /** + * Gets a command to change the cell formatting of the selected table elements. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableCellFormatting: ChangeTableCellFormattingCommand; + /** + * Gets a command to insert a table column to the left of the current position in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableColumnToTheLeft: InsertTableColumnToTheLeftCommand; + /** + * Gets a command to insert a table column to the right of the current position in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableColumnToTheRight: InsertTableColumnToTheRightCommand; + /** + * Gets a command to insert a row in the table below the selected row. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableRowBelow: InsertTableRowBelowCommand; + /** + * Gets a command to insert a row in the table above the selected row. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableRowAbove: InsertTableRowAboveCommand; + /** + * Gets a command to delete the selected rows in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableRows: DeleteTableRowsCommand; + /** + * Gets a command to delete the selected columns in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableColumns: DeleteTableColumnsCommand; + /** + * Gets a command to insert table cells with a horizontal shift into the selected table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableCellWithShiftToTheLeft: InsertTableCellWithShiftToTheLeftCommand; + /** + * Gets a command to delete the selected table cells with a horizontal shift. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableCellsWithShiftHorizontally: DeleteTableCellsWithShiftHorizontallyCommand; + /** + * Gets a command to delete the selected table cells with a vertical shift. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableCellsWithShiftVertically: DeleteTableCellsWithShiftVerticallyCommand; + /** + * Gets a command to delete the selected table. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTable: DeleteTableCommand; + /** + * Gets a command to invoke the Insert Cells dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableCellsDialog: InsertTableCellsDialogCommand; + /** + * Gets a command to invoke the Delete Cells dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableCellsDialog: DeleteTableCellsDialogCommand; + /** + * Gets a command to merge the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + mergeTableCells: MergeTableCellsCommand; + /** + * Gets a command to invoke the Split Cells dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + splitTableCellsDialog: SplitTableCellsDialogCommand; + /** + * Gets a command to split the selected table cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + splitTableCells: SplitTableCellsCommand; + /** + * Gets a command to insert table cells with a vertical shift into the selected table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableCellsWithShiftToTheVertically: InsertTableCellsWithShiftToTheVerticallyCommand; + /** + * Gets a command to invoke the Borders tab of the Borders and Shading dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openTableBordersAndShadingDialog: OpenTableBordersAndShadingDialogCommand; + /** + * Gets a command to change the selected table's borders and shading. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableBordersAndShading: ChangeTableBordersAndShadingCommand; + /** + * Gets a command to apply top-left alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignTopLeft: ToggleTableCellAlignTopLeftCommand; + /** + * Gets a command to apply top-center alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignTopCenter: ToggleTableCellAlignTopCenterCommand; + /** + * Gets a command to apply top-right alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignTopRight: ToggleTableCellAlignTopRightCommand; + /** + * Gets a command to apply middle-left alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignMiddleLeft: ToggleTableCellAlignMiddleLeftCommand; + /** + * Gets a command to apply middle-center alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignMiddleCenter: ToggleTableCellAlignMiddleCenterCommand; + /** + * Gets a command to apply middle-right alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignMiddleRight: ToggleTableCellAlignMiddleRightCommand; + /** + * Gets a command to apply bottom-left alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignBottomLeft: ToggleTableCellAlignBottomLeftCommand; + /** + * Gets a command to apply bottom-center alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignBottomCenter: ToggleTableCellAlignBottomCenterCommand; + /** + * Gets a command to apply bottom-right alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignBottomRight: ToggleTableCellAlignBottomRightCommand; + /** + * Gets a command to change the selected table's style. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableStyle: ChangeTableStyleCommand; + /** + * Gets a command to toggle top borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellTopBorder: ToggleTableCellTopBorderCommand; + /** + * Gets a command to toggle right borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellRightBorder: ToggleTableCellRightBorderCommand; + /** + * Gets a command to toggle bottom borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellBottomBorder: ToggleTableCellBottomBorderCommand; + /** + * Gets a command to toggle left borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellLeftBorder: ToggleTableCellLeftBorderCommand; + /** + * Gets a command to remove the borders of the selected table cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeTableCellBorders: RemoveTableCellBordersCommand; + /** + * Gets a command to toggle all borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAllBorders: ToggleTableCellAllBordersCommand; + /** + * Gets a command to toggle inner horizontal borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellInsideHorizontalBorders: ToggleTableCellInsideHorizontalBordersCommand; + /** + * Gets a command to toggle inner vertical borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellInsideVerticalBorders: ToggleTableCellInsideVerticalBordersCommand; + /** + * Gets a command to toggle outer borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellOutsideBorders: ToggleTableCellOutsideBordersCommand; + /** + * Gets a command to change the selected table's style options. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableLook: ChangeTableLookCommand; + /** + * Gets a command to change the repository item's table border style. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableBorderRepositoryItem: ChangeTableBorderRepositoryItemCommand; + /** + * Gets a command to change cell shading in the selected table elements. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableCellShading: ChangeTableCellShadingCommand; + /** + * Gets a command to toggle the display of grid lines for a table with no borders applied - on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + showTableGridLines: ShowTableGridLinesCommand; + /** + * Gets a command to invoke the Search Panel allowing end-users to search text and navigate through search results. + * Value: A object that provides methods for executing the command and checking its state. + */ + openFindPanel: OpenFindPanelCommand; + /** + * Gets a command to invoke the Find and Replace dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openFindAndReplaceDialog: OpenFindAndReplaceDialogCommand; + /** + * Gets a command to find all matches of the specified text in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + findAll: FindAllCommand; + /** + * Gets a command to hide the results of the search. + * Value: A object that provides methods for executing the command and checking its state. + */ + hideFindResults: HideFindResultsCommand; + /** + * Gets a command to search for a specific text and replace all matches in the document with the specified string. + * Value: A object that provides methods for executing the command and checking its state. + */ + replaceAll: ReplaceAllCommand; + /** + * Gets a command to search for a specific text and replace the next match in the document with the specified string. + * Value: A object that provides methods for executing the command and checking its state. + */ + replaceNext: ReplaceNextCommand; + /** + * Gets a command to invoke the Spelling dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openSpellingDialog: OpenSpellingDialogCommand; + /** + * Gets a command to assign a shortcut to the specified client command. + * Value: A object that provides methods for executing the command and checking its state. + */ + assignShortcut: AssignShortcutCommand; +} +/** + * Serves as a base for objects that implement different client command functionalities. + */ +interface CommandBase { +} +/** + * Serves as a base for commands with a simple common command state. + */ +interface CommandWithSimpleStateBase extends CommandBase { + /** + * Gets information about the command state. + */ + getState(): SimpleCommandState; +} +/** + * Serves as a base for commands with the Boolean state. + */ +interface CommandWithBooleanStateBase extends CommandBase { + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Defines a simple state common to most of the client commands. + */ +interface SimpleCommandState { + /** + * Gets a value indicating whether the command's UI element is enabled (within the ribbon and context menu). + * Value: true, if the command's related UI element is enabled; otherwise, false. + */ + enabled: boolean; + /** + * Gets a value indicating whether the command's UI element is visible. + * Value: true, if the command's related UI element is visible; otherwise, false. + */ + visible: boolean; +} +/** + * Defines the state of a command. + */ +interface CommandState extends SimpleCommandState { + /** + * Gets the command state value. + * Value: A T object specifying the command state value. + */ + value: T; +} +/** + * Contains a set properties providing the current information about certain document structural elements. + */ +interface RichEditDocument { + /** + * Provides the information about the active sub-document. + * Value: A object storing information about the essential document functionality. + */ + activeSubDocument: SubDocument; + /** + * Provides information about sections in the current document. + * Value: An array of Section objects storing information about sections. + */ + sectionsInfo: Section[]; + /** + * Provides information about paragraph styles in the current document. + * Value: An array of ParagraphStyle objects storing information about paragraph styles. + */ + paragraphStylesInfo: ParagraphStyle[]; + /** + * Provides information about character styles in the current document. + * Value: An array of CharacterStyle objects storing information about character styles. + */ + characterStylesInfo: CharacterStyle[]; + /** + * Provides information about numbered paragraphs in the document. + * Value: An array of AbstractNumberingList objects storing the information about numbered paragraphs. + */ + abstractNumberingListsInfo: AbstractNumberingList[]; + /** + * Provides information about table styles in the current document. + * Value: An array of TableStyle objects storing information about table styles. + */ + tableStylesInfo: TableStyle[]; + /** + * Provides information about spell checking in the current document. + * Value: A object. + */ + spellingInfo: SpellingInfo; +} +/** + * An abstract numbering list definition that defines the appearance and behavior of numbered paragraphs in a document. + */ +interface AbstractNumberingList { + deleted: boolean; +} +/** + * Defines a paragraph in the document. + */ +interface Paragraph { + /** + * Gets the paragraph's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + /** + * Gets the paragraph's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + interval: Interval; + /** + * Gets the name of the paragraph style applied to the current paragraph (see name). + * Value: A string value specifying the style name. + */ + styleName: string; + /** + * Gets the index of a list applied to the paragraph. + * Value: An integer that is the index of a list to which the paragraph belongs. + */ + listIndex: number; + /** + * Gets the index of the list level applied to the current paragraph in the numbering list. + * Value: An integer that is the index of the list level of the current paragraph. + */ + listLevelIndex: number; +} +/** + * Defines a field in the document. + */ +interface Field { + /** + * Gets the field's start position in a document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the field length in a document. + * Value: An integer value specifying the field length. + */ + length: number; + codeInterval: Interval; + resultInterval: Interval; + interval: Interval; + /** + * Gets or sets a URI to navigate to when the hyperlink (represented by the current field) is activated. + * Value: A string representing an URI. + */ + hyperlinkUri: string; + /** + * Gets or sets the text for the tooltip displayed when the mouse hovers over a hyperlink field. + * Value: A string containing the tooltip text. + */ + hyperlinkTip: string; + /** + * Gets or sets the name of a bookmark (or a hyperlink) in the current document which shall be the target of the hyperlink field. + * Value: A string representing the bookmark's name. + */ + hyperlinkAnchor: string; + /** + * Gets a value specifying whether a field's code or result is dispalyed. + * Value: true, if the field code is displayed; false, if the field result is displayed. + */ + showCode: boolean; +} +/** + * Defines a bookmark in the document. + */ +interface Bookmark { + /** + * Gets the bookmark's start position in a document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the bookmark's length. + * Value: An integer value specifying the length of the bookmark. + */ + length: number; + interval: Interval; + /** + * Gets the name of a bookmark in the document. + * Value: A string that is the unique bookmark's name. + */ + name: string; +} +/** + * Defines a section in the document. + */ +interface Section { + /** + * Gets the section's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the section's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + interval: Interval; + /** + * Provides access to the section's headers. + * Value: An array of HeaderFooter objects storing information about the section's headers. + */ + headers: HeaderFooter[]; + /** + * Provides access to the section's footers. + * Value: An array of HeaderFooter objects storing information about the section's footers. + */ + footers: HeaderFooter[]; +} +/** + * Contains settings defining a header or footer in a document. + */ +interface HeaderFooter { + /** + * Gets the type of the header (footer). + * Value: One of the values. + */ + type: any; + /** + * Provides access to an object implementing the basic document functionality that is common to the header, footer and the main document body. + * Value: A object exposing the basic document functionality. + */ + subDocument: SubDocument; +} +interface InlinePictureInfo { + id: number; + position: number; + initialWidth: number; + initialHeight: number; + scaleX: number; + scaleY: number; + /** + * Gets the actual image width. + */ + actualWidth: number; + /** + * Gets the actual image height. + */ + actualHeight: number; +} +declare enum HeaderFooterType { + First=0, + Odd=1, + Primary=1, + Even=2 +} +interface RichEditFileInfo { + folderPath: string; + fileName: string; + documentFormat: any; +} +declare enum DocumentFormat { + Undefined=0, + PlainText=1, + Rtf=2, + Html=3, + OpenXml=4, + Mht=5, + WordML=6, + OpenDocument=7, + ePub=9, + Doc=10 +} +/** + * Contains a set of methods and properties to work with the document selection. + */ +interface RichEditSelection { + /** + * Gets or sets an array of document interval in the selection. + * Value: An array of Interval objects. + */ + intervals: Interval[]; + /** + * Gets or sets a value specifying whether the current selection is collapsed (and represents the cursor position). + * Value: true, if the selection is collapsed; otherwise, false. + */ + collapsed: boolean; + getIntervalMaxPosition(): number; + /** + * Moves the cursor to the next line. + */ + goToNextLine(): void; + /** + * Moves the cursor to the next line and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextLine(extendSelection: boolean): void; + /** + * Moves the cursor to the end of the line in which the cursor is located. + */ + goToLineEnd(): void; + /** + * Moves the cursor to the end of the line in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToLineEnd(extendSelection: boolean): void; + /** + * Moves the cursor to the start of the line in which the cursor is located. + */ + goToLineStart(): void; + /** + * Moves the cursor to the start of the line in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToLineStart(extendSelection: boolean): void; + /** + * Moves the cursor to the previous line. + */ + goToPreviousLine(): void; + /** + * Moves the cursor to the previous line and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPreviousLine(extendSelection: boolean): void; + /** + * Moves the cursor to the next character. + */ + goToNextCharacter(): void; + /** + * Moves the cursor to the next character and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextCharacter(extendSelection: boolean): void; + /** + * Moves the cursor to the previous character. + */ + goToPreviousCharacter(): void; + /** + * Moves the cursor to the previous character and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPreviousCharacter(extendSelection: boolean): void; + /** + * Selects the line in which the cursor is located. + */ + selectLine(): void; + /** + * Selects the line in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectLine(extendSelection: boolean): void; + /** + * Moves the cursor to the beginning of the next page. + */ + goToNextPage(): void; + /** + * Moves the cursor to the beginning of the next page and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextPage(extendSelection: boolean): void; + /** + * Moves the cursor to the beginning of the previous page. + */ + goToPreviousPage(): void; + /** + * Moves the cursor to the beginning of the previous page and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPreviousPage(extendSelection: boolean): void; + /** + * Moves the cursor to the start of the document. + */ + goToDocumentStart(): void; + /** + * Moves the cursor to the start of the document and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToDocumentStart(extendSelection: boolean): void; + /** + * Moves the cursor to the end of the document. + */ + goToDocumentEnd(): void; + /** + * Moves the cursor to the end of the document and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToDocumentEnd(extendSelection: boolean): void; + /** + * Moves the cursor to the next word. + */ + goToNextWord(): void; + /** + * Moves the cursor to the next word and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextWord(extendSelection: boolean): void; + /** + * Moves the cursor to the previous word. + */ + goToPrevWord(): void; + /** + * Moves the cursor to the previous word and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPrevWord(extendSelection: boolean): void; + /** + * Moves the cursor to the start of the paragraph in which the cursor is located. + */ + goToParagraphStart(): void; + /** + * Moves the cursor to the start of the paragraph in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToParagraphStart(extendSelection: boolean): void; + /** + * Moves the cursor to the end of the paragraph in which the cursor is located. + */ + goToParagraphEnd(): void; + /** + * Moves the cursor to the end of the paragraph in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToParagraphEnd(extendSelection: boolean): void; + /** + * Selects the paragraph in which the cursor is located. + */ + selectParagraph(): void; + /** + * Moves the cursor to the next page break mark. + */ + goToStartNextPageCommand(): void; + /** + * Moves the cursor to the next page break mark and extends the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToStartNextPageCommand(extendSelection: boolean): void; + /** + * Moves the cursor to the previous page break mark. + */ + goToStartPrevPageCommand(): void; + /** + * Moves the cursor to the previous page break mark and extends the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToStartPrevPageCommand(extendSelection: boolean): void; + /** + * Selects the table cell in which the cursor is located. + */ + selectTableCell(): void; + /** + * Selects the table cell in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectTableCell(extendSelection: boolean): void; + /** + * Selects the table row in which the cursor is located. + */ + selectTableRow(): void; + /** + * Selects the table row in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectTableRow(extendSelection: boolean): void; + /** + * Selects the entire table in which the cursor is located. + */ + selectTable(): void; + /** + * Selects the entire table in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectTable(extendSelection: boolean): void; + /** + * Selects the editor's entire content. + */ + selectAll(): void; + /** + * Makes the main sub-document active and moves the cursor to its beginning. + */ + setMainSubDocumentAsActive(): void; + /** + * Creates a footer sub-document (if it was not created before) and sets the footer as the active sub-document. Moves the cursor to the footer's start position. + * @param pageIndex An integer value specifying the active page's index. + */ + setFooterSubDocumentAsActiveByPageIndex(pageIndex: number): void; + /** + * Creates a header sub-document (if it was not created before) and sets the header as the active sub-document. Moves the cursor to the header's start position. + * @param pageIndex An integer value specifying the active page's index. + */ + setHeaderSubDocumentAsActiveByPageIndex(pageIndex: number): void; +} +/** + * Defines a document's interval. + */ +interface Interval { + /** + * Gets the interval's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the interval's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; +} +interface SpellingInfo { + spellCheckerState: any; + misspelledIntervals: MisspelledInterval[]; +} +declare enum SpellCheckerState { + Disabled=0, + InProgress=1, + Done=2 +} +interface MisspelledInterval { + start: number; + length: number; + interval: Interval; + errorType: any; + word: string; + suggestions: string[]; +} +declare enum SpellingErrorType { + Misspelling=0, + Repeating=1 +} +/** + * Serves as a base for objects implementing different element styles. + */ +interface StyleBase { + /** + * Gets or sets the name of the style. + * Value: A string specifying the style name. + */ + name: string; + /** + * Gets whether the specified style is marked as deleted. + * Value: true, if the style is deleted; otherwise, false. + */ + isDeleted: boolean; +} +/** + * Defines the paragraph style settings. + */ +interface ParagraphStyle extends StyleBase { + /** + * Gets or sets the linked style for the current style. + * Value: A object representing a character style linked to a current style. + */ + linkedStyle: CharacterStyle; + /** + * Gets or sets the default style for a paragraph that immediately follows the current paragraph. + * Value: A object specifying the style for the next paragraph. + */ + nextStyle: ParagraphStyle; + /** + * Gets the index of the list item associated with the paragraph formatted with the current style. + * Value: An integer value specifying the list item index. + */ + listIndex: number; + /** + * Gets the index of the list level applied to the paragraph formatted with the current style. + * Value: An integer that is the list level index. + */ + listLevelIndex: number; + /** + * Gets or sets the style from which the current style inherits. + * Value: A object representing the parent style. + */ + parent: ParagraphStyle; +} +/** + * Contains characteristics of a character style in a document. + */ +interface CharacterStyle extends StyleBase { + /** + * Gets or sets the linked style for the current style. + * Value: A object representing a paragraph style linked to a current style. + */ + linkedStyle: ParagraphStyle; + /** + * Gets the style form which the current style inherits. + * Value: A object representing the parent style. + */ + parent: CharacterStyle; +} +/** + * Defines the table style settings. + */ +interface TableStyle extends StyleBase { + /** + * Gets or sets the style from which the current style inherits. + * Value: A object that is the parent style. + */ + parent: TableStyle; +} +/** + * Exposes the settings providing the information about the essential document functionality. + */ +interface SubDocument { + id: number; + type: any; + /** + * Provides information about paragraphs contained in the document. + * Value: An array of Paragraph objects storing information about document paragraphs. + */ + paragraphsInfo: Paragraph[]; + /** + * Provides information about fields in the current document. + * Value: An array of Field objects storing information about document fields. + */ + fieldsInfo: Field[]; + /** + * Provides information about tables contained in the document. + * Value: An array of Table objects storing information about document tables. + */ + tablesInfo: Table[]; + /** + * Provides information about document bookmarks. + * Value: An array of Bookmark objects storing information about document bookmarks. + */ + bookmarksInfo: Bookmark[]; + inlinePicturesInfo: InlinePictureInfo[]; + /** + * Gets the document's textual representation. + * Value: A string value specifying the document's text. + */ + text: string; + /** + * Gets the character length of the document. + * Value: An integer that is the number of character positions in the document. + */ + length: number; +} +declare enum SubDocumentType { + Main=0, + Header=1, + Footer=2, + TextBox=3 +} +/** + * Defines a table in the document. + */ +interface Table { + /** + * Gets the table's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the table length in characters. + * Value: A integer value specifying the character length of the table. + */ + length: number; + interval: Interval; + /** + * Provides access to a collection of table rows. + * Value: An array of TableRow objects storing information about individual table rows. + */ + rows: TableRow[]; + /** + * Gets the name of the style applied to the table (see name). + * Value: A string value specifying the style name. + */ + styleName: string; +} +/** + * Defines a table row in the document. + */ +interface TableRow { + /** + * Gets the table row's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the table row's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + interval: Interval; + /** + * Provides information about the table row's cells. + * Value: An array of TableCell objects storing information about cells. + */ + cells: TableCell[]; +} +/** + * Defines a table cell in the document. + */ +interface TableCell { + /** + * Gets the table cell's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the table cell's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + interval: Interval; +} +interface RichEditUnitConverter { + /** + * + * @param value + */ + pixelsToTwips(value: number): number; + /** + * + * @param value + */ + inchesToTwips(value: number): number; + /** + * + * @param value + */ + pointsToTwips(value: number): number; + /** + * Converts a value on centimeters to twips. + * @param value + */ + centimetersToTwips(value: number): number; + /** + * + * @param value + */ + twipsToCentimeters(value: number): number; + /** + * + * @param value + */ + pixelsToCentimeters(value: number): number; + /** + * + * @param value + */ + twipsToInches(value: number): number; + /** + * + * @param value + */ + pixelsToInches(value: number): number; + /** + * + * @param value + */ + pixelsToPoints(value: number): number; + /** + * + * @param value + */ + twipsToPoints(value: number): number; +} +/** + * A command to invoke the Bookmark dialog. + */ +interface OpenInsertBookmarkDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertBookmarkDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a new bookmark that references the current selection. + */ +interface InsertBookmarkCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertBookmarkCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param name A string value specifying name of creating bookmark. + * @param start An integer value specifying the start position of bookmark's range. + * @param length An integer value specifying the length of bookmark's range. + */ + execute(name: string, start: number, length: number): boolean; +} +/** + * A command to delete a specific bookmark. + */ +interface DeleteBookmarkCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteBookmarkCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param name A string value specifying name of the deleted bookmark. + */ + execute(name: string): boolean; +} +/** + * Gets a command to navigate to the specified bookmark in the document. + */ +interface GoToBookmarkCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToBookmarkCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param name + */ + execute(name: string): boolean; +} +/** + * A command to paste the text from the clipboard over the selection. + */ +interface PasteCommand extends CommandWithSimpleStateBase { + /** + * Executes the PasteCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to copy the selected text and place it to the clipboard. + */ +interface CopyCommand extends CommandWithSimpleStateBase { + /** + * Executes the CopyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to cut the selected text and place it to the clipboard. + */ +interface CutCommand extends CommandWithSimpleStateBase { + /** + * Executes the CutCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert an empty document field at the current position in the document. + */ +interface CreateFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to update the field's result. + */ +interface UpdateFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the UpdateFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to display the selected field's field codes. + */ +interface ShowFieldCodesCommand extends CommandWithSimpleStateBase { + /** + * Executes the ShowFieldCodesCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param showFieldCodes true to display field codes, false to hide field codes. + */ + execute(showFieldCodes: boolean): boolean; + /** + * Executes the ShowFieldCodesCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to display all field codes in place of the fields in the document. + */ +interface ShowAllFieldCodesCommand extends CommandWithSimpleStateBase { + /** + * Executes the ShowAllFieldCodesCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param showFieldCodes true to display field codes, false to hide field codes. + */ + execute(showFieldCodes: boolean): boolean; + /** + * Executes the ShowAllFieldCodesCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to update all fields in the selected range. + */ +interface UpdateAllFieldsCommand extends CommandWithSimpleStateBase { + /** + * Executes the UpdateAllFieldsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a DATE field displaying the current date. + */ +interface CreateDateFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateDateFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a TIME field displaying the current time. + */ +interface CreateTimeFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateTimeFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a PAGE field displaying the current page number. + */ +interface CreatePageFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreatePageFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the next data record of the bound data source. + */ +interface GoToDataRecordCommand extends CommandBase { + /** + * Executes the GoToDataRecordCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param activeRecordIndex An integer value specifying index of the next data record. + */ + execute(activeRecordIndex: number): boolean; + getState(): any; +} +interface DataRecordOptions { + /** + * Gets or sets the index of the active data record. + */ + activeRecordIndex: number; + recordCount: number; +} +/** + * A command to navigate to the first data record of the bound data source. + */ +interface GoToFirstDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToFirstDataRecordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the previous data record of the bound data source. + */ +interface GoToPreviousDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToPreviousDataRecordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the next data record of the bound data source. + */ +interface GoToNextDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToNextDataRecordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the last data record of the bound data source. + */ +interface GoToLastDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToLastDataRecordCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to display or hide actual data in MERGEFIELD fields. + */ +interface ShowMergedDataCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowMergedDataCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ShowMergedDataCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param showMergedData true to display merged data, false to hide merged data. + */ + execute(showMergedData: boolean): boolean; +} +/** + * A command to invoke the Insert Merge Field dialog. + */ +interface MergeFieldDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the MergeFieldDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a MERGEFIELD field (with a data source column name) at the current position in the document. + */ +interface CreateMergeFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateMergeFieldCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fieldName A string value specifying the name of the merge field. + */ + execute(fieldName: string): boolean; +} +/** + * Gets a command to invoke the Export Range dialog to start a mail merge. + */ +interface MailMergeDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the MailMergeDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to start the mail merge process and download the resulting document containing the merged information. + */ +interface MailMergeAndDownloadCommand extends CommandBase { + /** + * Executes the MailMergeAndDownloadCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fileExtension A string value specifying the file extension of the resulting document. + */ + execute(fileExtension: string): boolean; + /** + * + * @param documentFormat + */ + execute(documentFormat: any): boolean; + /** + * Executes the MailMergeAndDownloadCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fileExtension A string value specifying the file extension of the resulting document. + * @param settings A MailMergeSettings object containing settings to set up mail merge operations. + */ + execute(fileExtension: string, settings: MailMergeSettings): boolean; + /** + * + * @param documentFormat + * @param settings + */ + execute(documentFormat: any, settings: MailMergeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to start the mail merge process and save the resulting merged document to the server. + */ +interface MailMergeAndSaveAsCommand extends CommandBase { + /** + * Executes the MailMergeAndSaveAsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param filePath A string value specifying path to the saving file on the server. + */ + execute(filePath: string): boolean; + /** + * + * @param fileInfo + * @param settings + */ + execute(fileInfo: RichEditFileInfo, settings: MailMergeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to insert a NUMPAGES field displaying the total number of pages. + */ +interface CreatePageCountFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreatePageCountFieldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Contains settings to set up mail merge operations. + */ +interface MailMergeSettings { + /** + * Gets or sets a value specifying which data rows should be exported into a merged document. + * Value: One of the values. + */ + range: any; + /** + * Gets or sets the index of the row from which the exported range starts. + * Value: An integer value specifying the row index. + */ + exportFrom: number; + /** + * Gets or sets the number of data rows in the exported mail-merge range. + * Value: An integer value specifying the row count. + */ + exportRecordsCount: number; + /** + * Gets or sets the merge mode. + * Value: One of the values. + */ + mergeMode: any; +} +declare enum MergeMode { + NewParagraph=0, + NewSection=1, + JoinTables=2 +} +declare enum MailMergeExportRange { + AllRecords=0, + CurrentRecord=1, + Range=2 +} +/** + * A command to create a new empty document. + */ +interface FileNewCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileNewCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to open the file, specifying its path. + */ +interface FileOpenCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileOpenCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param path A string value specifying path to the opening file. + */ + execute(path: string): boolean; +} +/** + * A command to invoke the File Open dialog allowing one to select and load a document file into RichEdit. + */ +interface FileOpenDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileOpenDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to save the document to a file. + */ +interface FileSaveCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileSaveCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Save As dialog that prompts for a file name and saves the current document in a file with the specified path. + */ +interface FileSaveAsCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileSaveAsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param path A string value specifying path to the saving file. + */ + execute(path: string): boolean; + /** + * + * @param fileInfo + */ + execute(fileInfo: RichEditFileInfo): boolean; +} +interface FileSaveAsDialogCommand extends CommandWithSimpleStateBase { + execute(): boolean; +} +/** + * A command to download the document file, specifying its extension. + */ +interface FileDownloadCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileDownloadCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fileExtension A string value specifying the extension of the downloading file. + */ + execute(fileExtension: string): boolean; + /** + * + * @param documentFormat + */ + execute(documentFormat: any): boolean; +} +/** + * A command to invoke a browser-specific Print dialog allowing one to print the current document. + */ +interface FilePrintCommand extends CommandWithSimpleStateBase { + /** + * Executes the FilePrintCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Search Panel allowing end-users to search text and navigate through search results. + */ +interface OpenFindPanelCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenFindPanelCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Find and Replace dialog. + */ +interface OpenFindAndReplaceDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenFindAndReplaceDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to find all matches of the specified text in the document. + */ +interface FindAllCommand extends CommandWithSimpleStateBase { + /** + * Executes the FindAllCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying finding text. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + * @param highlightResults true, to highlight result of search; otherwise, false. + */ + execute(text: string, matchCase: boolean, highlightResults: boolean): boolean; + /** + * Executes the FindAllCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying text to find. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + * @param highlightResults true, to highlight result of search; otherwise, false. + * @param results An array of Interval objects containing the results of search. + */ + execute(text: string, matchCase: boolean, highlightResults: boolean, results: Interval[]): boolean; +} +/** + * A command to hide the search results. + */ +interface HideFindResultsCommand extends CommandWithSimpleStateBase { + /** + * Executes the HideFindResultsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to search for a specific text and replace all matches in the document with the specified string. + */ +interface ReplaceAllCommand extends CommandWithSimpleStateBase { + /** + * Executes the ReplaceAllCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying text to replace. + * @param replaceText A string value specifying replacing text. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + */ + execute(text: string, replaceText: string, matchCase: boolean): boolean; +} +/** + * A command to search for a specific text and replace the next match in the document with the specified string. + */ +interface ReplaceNextCommand extends CommandWithSimpleStateBase { + /** + * Executes the ReplaceNextCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying text to replace. + * @param replaceText A string value specifying replacing text. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + */ + execute(text: string, replaceText: string, matchCase: boolean): boolean; +} +/** + * A command to cancel changes caused by the previous command. + */ +interface UndoCommand extends CommandWithSimpleStateBase { + /** + * Executes the UndoCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to reverse actions of the previous undo command. + */ +interface RedoCommand extends CommandWithSimpleStateBase { + /** + * Executes the RedoCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Hyperlink dialog. + */ +interface OpenInsertHyperlinkDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertHyperlinkDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a hyperlink at the current position in the document. + */ +interface InsertHyperlinkCommand extends CommandBase { + /** + * Executes the InsertHyperlinkCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A HyperLinkSettings object specifying hyperlink settings. + */ + execute(settings: HyperlinkSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to delete the selected hyperlink. + */ +interface DeleteHyperlinkCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteHyperlinkCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete all hyperlinks in a selected range. + */ +interface DeleteHyperlinksCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteHyperlinksCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the document bookmark or URI (uniform resource identifier) specified for the hyperlink. + */ +interface OpenHyperlinkCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenHyperlinkCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Contains settings to define hyperlinks. + */ +interface HyperlinkSettings { + /** + * Gets or sets a text displayed for a hyperlink. + * Value: A string value specifying the hyperlink display text. + */ + text: string; + /** + * Gets or sets a text for the tooltip displayed when the mouse hovers over a hyperlink. + * Value: A string containing the tooltip text. + */ + tooltip: string; + /** + * Gets or sets the hyperlink destination. + * Value: A string value that specifies the destination to which a hyperlink refers. + */ + url: string; + /** + * Gets or sets the associated bookmak. + * Value: A string value specifying the bookmark name. + */ + bookmark: string; +} +/** + * A command to insert a page break at the current position in the document. + */ +interface InsertPageBreakCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertPageBreakCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a column break at the current position in the document. + */ +interface InsertColumnBreakCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertColumnBreakCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a section break and start a new section on the next page. + */ +interface InsertSectionBreakNextPageCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSectionBreakNextPageCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a section break and start a new section on the next even-numbered page. + */ +interface InsertSectionBreakEvenPageCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSectionBreakEvenPageCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a section break and start a new section on the next odd-numbered page. + */ +interface InsertSectionBreakOddPageCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSectionBreakOddPageCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert the line break at the current position in the document. + */ +interface InsertLineBreakCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertLineBreakCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle between the bulleted paragraph and normal text. + */ +interface ToggleBulletedListCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleBulletedListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle between the numbered paragraph and normal text. + */ +interface ToggleNumberingListCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleNumberingListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle between the multilevel list style and normal text. + */ +interface ToggleMultilevelListCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleMultilevelListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Bulleted and Numbering dialog. + */ +interface OpenNumberingListDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenNumberingListDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Customize Numbered List dialog. + */ +interface OpenCustomNumberingListDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenCustomNumberingListDialogCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param abstractNumberingListIndex An integer value specifying index of abstract numbering list. + */ + execute(abstractNumberingListIndex: number): boolean; +} +/** + * A command to customize the numbered list parameters. + */ +interface ChangeCustomNumberingListCommand extends CommandBase { + /** + * Executes the ChangeCustomNumberingListCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param abstractNumberingListIndex An integer value specifying the numbering list index. + * @param listLevelSettings An array of ListLevelSettings objects defining settings for list levels. + */ + execute(abstractNumberingListIndex: number, listLevelSettings: ListLevelSettings[]): boolean; + /** + * Gets information about the command state. + * @param abstractNumberingListIndex An integer value specifying the index of the abstract numbering list item whose state to return. + */ + getState(abstractNumberingListIndex: number): any; +} +/** + * A command to restart the numbering list. + */ +interface RestartNumberingListCommand extends CommandWithSimpleStateBase { + /** + * Executes the RestartNumberingListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to increment the indent level of paragraphs in a selected numbered list. + */ +interface IncrementNumberingIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncrementNumberingIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to decrement the indent level of paragraphs in a selected numbered list. + */ +interface DecrementNumberingIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecrementNumberingIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to continue the list's numbering. + */ +interface ContinueNumberingListCommand extends CommandWithSimpleStateBase { + /** + * Executes the ContinueNumberingListCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert numeration to a paragraph making it a numbering list item. + */ +interface InsertNumerationCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertNumerationCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param abstractNumberingListIndex An integer value specifying index of abstract numbering list. + */ + execute(abstractNumberingListIndex: number): boolean; + /** + * Executes the InsertNumerationCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param numberingListIndex An integer value specifying index of numbering list. + * @param isAbstractNumberingList true, to insert an abstract numbering list; otherwise, false. + */ + execute(numberingListIndex: number, isAbstractNumberingList: boolean): boolean; +} +/** + * A command to remove the selected numeration. + */ +interface RemoveNumerationCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveNumerationCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Contains settings to define individual bulleted or numbered list levels. + */ +interface ListLevelSettings { + /** + * Gets or sets the pattern used to format the list level for display purposes. + * Value: A string value specifying the format pattern. + */ + displayFormatString: string; + /** + * Gets or sets the numbering format used for the current list level's paragraph. + * Value: One of the values. + */ + format: any; + /** + * Gets the list level item's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets or sets the paragraph text alignment within numbered list levels. + * Value: One of the values. + */ + alignment: any; + separator: string; + /** + * Gets or sets the left indent for text within the current list level's paragraph. + * Value: An integer value specifying the left indent. + */ + leftIndent: number; + /** + * Gets or sets a value specifying the indent of the first line of the current list level's paragraph. + * Value: An integer value specifying the indent. + */ + firstLineIndent: number; + /** + * Gets or sets a value specifying whether and how the first line of the current list level's paragraph is indented. + * Value: One of the values. + */ + firstLineIndentType: any; + /** + * Gets or sets the font name of the current list level's paragraph. + * Value: A string value specifying the font name. + */ + fontName: string; + /** + * Gets or sets the font color of the current list level's paragraph. + * Value: A string value specifying the font color. + */ + fontColor: string; + /** + * Gets or sets the font size of the current list level's paragraph. + * Value: An integer value specifying the font size. + */ + fontSize: number; + /** + * Gets or sets whether the font formatting of the current list level's paragraph is bold. + * Value: true, if the font formatting is bold; otherwise, false. + */ + fontBold: boolean; + /** + * Gets or sets whether the font formatting of the current list level's paragraph is italic. + * Value: true, if the font formatting is italic; otherwise, false. + */ + fontItalic: boolean; +} +declare enum ListLevelFormat { + Decimal=0, + AIUEOHiragana=1, + AIUEOFullWidthHiragana=2, + ArabicAbjad=3, + ArabicAlpha=4, + Bullet=5, + CardinalText=6, + Chicago=7, + ChineseCounting=8, + ChineseCountingThousand=9, + ChineseLegalSimplified=10, + Chosung=11, + DecimalEnclosedCircle=12, + DecimalEnclosedCircleChinese=13, + DecimalEnclosedFullstop=14, + DecimalEnclosedParentheses=15, + DecimalFullWidth=16, + DecimalFullWidth2=17, + DecimalHalfWidth=18, + DecimalZero=19, + Ganada=20, + Hebrew1=21, + Hebrew2=22, + Hex=23, + HindiConsonants=24, + HindiDescriptive=25, + HindiNumbers=26, + HindiVowels=27, + IdeographDigital=28, + IdeographEnclosedCircle=29, + IdeographLegalTraditional=30, + IdeographTraditional=31, + IdeographZodiac=32, + IdeographZodiacTraditional=33, + Iroha=34, + IrohaFullWidth=35, + JapaneseCounting=36, + JapaneseDigitalTenThousand=37, + JapaneseLegal=38, + KoreanCounting=39, + KoreanDigital=40, + KoreanDigital2=41, + KoreanLegal=42, + LowerLetter=43, + LowerRoman=44, + None=45, + NumberInDash=46, + Ordinal=47, + OrdinalText=48, + RussianLower=49, + RussianUpper=50, + TaiwaneseCounting=51, + TaiwaneseCountingThousand=52, + TaiwaneseDigital=53, + ThaiDescriptive=54, + ThaiLetters=55, + ThaiNumbers=56, + UpperLetter=57, + UpperRoman=58, + VietnameseDescriptive=59 +} +declare enum ListLevelNumberAlignment { + Left=0, + Center=1, + Right=2 +} +/** + * A command to invoke the Insert Image dialog. + */ +interface OpenInsertPictureDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertPictureDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a picture from a file. + */ +interface InsertPictureCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertPictureCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param imageUrl A string value specifying picture's Url. + */ + execute(imageUrl: string): boolean; +} +/** + * A command to invoke the Symbols dialog. + */ +interface OpenInsertSymbolDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertSymbolDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a character into the document. + */ +interface InsertSymbolCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSymbolCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param symbol A string value specifying symbols to insert. + * @param fontName A string value specifying font of symbols to insert. + */ + execute(symbol: string, fontName: string): boolean; +} +/** + * A command to insert a paragraph break at the current position in the document. + */ +interface InsertParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert text at the current position in the document. + */ +interface InsertTextCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTextCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param text A string value specifying text to insert. + */ + execute(text: string): boolean; +} +/** + * A command to delete the text in a selected range. + */ +interface DeleteCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +interface RemovePrevWordCommand extends CommandWithSimpleStateBase { + execute(): boolean; +} +interface RemoveNextWordCommand extends CommandWithSimpleStateBase { + execute(): boolean; +} +/** + * A command to move the cursor backwards and erase the character in that space. + */ +interface BackspaceCommand extends CommandWithSimpleStateBase { + /** + * Executes the BackspaceCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to scale pictures in a selected range. + */ +interface ChangePictureScaleCommand extends CommandBase { + /** + * Executes the ChangePictureScaleCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param scale A Scale object specifying scaling of the picture. + */ + execute(scale: Scale): boolean; + /** + * Executes the ChangePictureScaleCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param x An interger number specifying width of the picture + * @param y An interger number specifying height of the picture + */ + execute(x: number, y: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to move the selected range to a specific position in the document. + */ +interface MoveContentCommand extends CommandWithSimpleStateBase { + /** + * Executes the MoveContentCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param position An integer value specifying position to insert selected text. + */ + execute(position: number): boolean; +} +/** + * A command to copy the selected text and place it to the specified position. + */ +interface CopyContentCommand extends CommandWithSimpleStateBase { + /** + * Executes the CopyContentCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param position An integer number value specifying position for pasting selected text. + */ + execute(position: number): boolean; +} +/** + * A command to insert a tab character at the current position in the document. + */ +interface InsertTabCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTabCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Defines the scaling settings. + */ +interface Scale { + x: number; + y: number; +} +/** + * A command to change page margin settings. + */ +interface ChangePageMarginsCommand extends CommandBase { + /** + * Executes the ChangePageMarginsCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param left An integer number specifying left margin of the page. + * @param top An integer number specifying top margin of the page. + * @param right An integer number specifying right margin of the page. + * @param bottom An integer number specifying bottom margin of the page. + */ + execute(left: number, top: number, right: number, bottom: number): boolean; + /** + * Executes the ChangePageMarginsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param margins A Margins object specifying page margin settings. + */ + execute(margins: Margins): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Margins tab of the Page Setup dialog. + */ +interface OpenPageMarginsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenPageMarginsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the page orientation. + */ +interface ChangePageOrientationCommand extends CommandBase { + /** + * + * @param isPortrait + */ + execute(isPortrait: any): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Paper tab of the Page Setup dialog. + */ +interface OpenPagePaperSizeDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenPagePaperSizeDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to set the page size. + */ +interface SetPageSizeDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the SetPageSizeDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the page size. + */ +interface ChangePageSizeCommand extends CommandBase { + /** + * Executes the ChangePageSizeCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param width An integer number specifying width of the page. + * @param height An integer number specifying height of the page. + */ + execute(width: number, height: number): boolean; + /** + * Executes the ChangePageSizeCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param size A Size object specifying the page size settings. + */ + execute(size: Size): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the number of section columns having the same width. + */ +interface ChangeSectionEqualColumnCountCommand extends CommandBase { + /** + * Executes the ChangeSectionEqualColumnCountCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param columnCount An interger number specifying the number of section columns having the same width. + */ + execute(columnCount: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Columns dialog. + */ +interface OpenSectionColumnsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenSectionColumnsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the settings of individual section columns. + */ +interface ChangeSectionColumnsCommand extends CommandBase { + /** + * + * @param columns + */ + execute(columns: SectionColumn[]): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the background color of the page. + */ +interface ChangePageColorCommand extends CommandBase { + /** + * Executes the ChangePageColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying background color of the page. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to activate the page header and begin editing. + */ +interface InsertHeaderCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertHeaderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to activate the page footer and begin editing. + */ +interface InsertFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to link a header/footer to the previous section, so it has the same content. + */ +interface LinkHeaderFooterToPreviousCommand extends CommandWithSimpleStateBase { + /** + * Executes the LinkHeaderFooterToPreviousCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the page footer from the page header in the header/footer editing mode. + */ +interface GoToFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the page header from the page footer in the header/footer editing mode. + */ +interface GoToHeaderCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToHeaderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the next page header or footer in the header/footer editing mode. + */ +interface GoToNextHeaderFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToNextHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to navigate to the previous page header or footer in the header/footer editing mode. + */ +interface GoToPreviousHeaderFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToPreviousHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the header/footer edit mode, so it allows creation of a different header or footer for the first page of a document or section. + */ +interface SetDifferentFirstPageHeaderFooterCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetDifferentFirstPageHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the SetDifferentFirstPageHeaderFooterCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param differentFirstPage true to apply different text for first page's header and footer, false to remove difference. + */ + execute(differentFirstPage: boolean): boolean; +} +/** + * A command to change the header/footer edit mode so it allows creation of a different header or footer for odd and even pages of a document or section. + */ +interface SetDifferentOddAndEvenPagesHeaderFooterCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetDifferentOddAndEvenPagesHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the SetDifferentOddAndEvenPagesHeaderFooterCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param differentOddAndEvenPages true to apply different text for odd and even pages' header and footer, false to remove difference. + */ + execute(differentOddAndEvenPages: boolean): boolean; +} +/** + * A command to finish header/footer editing. + */ +interface CloseHeaderFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the CloseHeaderFooterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * Defines a section column in the document. + */ +interface SectionColumn { + /** + * Gets or sets the width of the section column. + * Value: An integer value specifying the section column width. + */ + width: number; + /** + * Gets or sets the amount of space between adjacent section columns. + * Value: An integer value specifying the spacing between section columns. + */ + spacing: number; +} +/** + * Defines the size settings. + */ +interface Size { + /** + * Gets or sets the width value. + * Value: An integer value specifying the width. + */ + width: number; + /** + * Gets or sets the height value. + * Value: An integer value specifying the height. + */ + height: number; +} +/** + * Defines the margin settings. + */ +interface Margins { + /** + * Gets or sets the left margin. + * Value: An integer value specifying the left margin. + */ + left: number; + /** + * Gets or sets the top margin. + * Value: An integer value specifying the top margin. + */ + top: number; + /** + * Gets or sets the right margin. + * Value: An integer value specifying the right margin. + */ + right: number; + /** + * Gets or sets the bottom margin. + * Value: An integer value specifying the bottom margin. + */ + bottom: number; +} +declare enum Orientation { + Landscape=0, + Portrait=1 +} +/** + * A command to increment the indent level of paragraphs in a selected range. + */ +interface IncreaseIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncreaseIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to decrement the indent level of paragraphs in a selected range. + */ +interface DecreaseIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecreaseIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle the visibility of hidden symbols. + */ +interface ShowHiddenSymbolsCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowHiddenSymbolsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ShowHiddenSymbolsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param show true to display hidden symbols; otherwise, false. + */ + execute(show: boolean): boolean; +} +/** + * A command to toggle left paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle centered paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentCenterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle right paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle justified paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentJustifyCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentJustifyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to format a current paragraph with single line spacing. + */ +interface SetSingleParagraphSpacingCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetSingleParagraphSpacingCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to format a current paragraph with one and a half line spacing. + */ +interface SetSesquialteralParagraphSpacingCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetSesquialteralParagraphSpacingCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to format a current paragraph with double line spacing. + */ +interface SetDoubleParagraphSpacingCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetDoubleParagraphSpacingCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to add spacing before a paragraph. + */ +interface AddSpacingBeforeParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the AddSpacingBeforeParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to add spacing after a paragraph. + */ +interface AddSpacingAfterParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the AddSpacingAfterParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to remove spacing before the selected paragraph. + */ +interface RemoveSpacingBeforeParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveSpacingBeforeParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to remove spacing after the selected paragraph. + */ +interface RemoveSpacingAfterParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveSpacingAfterParagraphCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the background color of paragraphs in a selected range. + */ +interface ChangeParagraphBackColorCommand extends CommandBase { + /** + * Executes the ChangeParagraphBackColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying highlighting color of the paragraphs in a selected range. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Paragraph dialog allowing end-users to set paragraph formatting. + */ +interface OpenParagraphFormattingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenParagraphFormattingDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the formatting of paragraphs in a selected range. + */ +interface ChangeParagraphFormattingCommand extends CommandBase { + /** + * Executes the ChangeParagraphFormattingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A ParagraphFormattingSettings object specifying paragraph formatting settings. + */ + execute(settings: ParagraphFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to increment the left indentation of paragraphs in a selected range. + */ +interface IncrementParagraphLeftIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncrementParagraphLeftIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to decrement the left indentation of paragraphs in a selected range. + */ +interface DecrementParagraphLeftIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecrementParagraphLeftIndentCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Tabs paragraph dialog. + */ +interface OpenTabsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenTabsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change paragraph tab stops. + */ +interface ChangeTabsCommand extends CommandBase { + /** + * Executes the ChangeTabsCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TabsSettings object maintaining the information about tab stops. + */ + execute(settings: TabsSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Contains the information about tab stops. + */ +interface TabsSettings { + /** + * Gets or sets the default tab stop value. + * Value: An integer value specifying the default tab stop. + */ + defaultTabStop: number; + /** + * Gets or sets a list of tab stops. + * Value: An array of TabSettings objects containing individual tab stop settings. + */ + tabs: TabSettings[]; +} +/** + * Contains settings of a tab stop. + */ +interface TabSettings { + /** + * Gets or sets the alignment type, specifying how any text after the tab will be lined up. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the tab leader style, i.e., the symbol used as a tab leader. + * Value: One of the values. + */ + leader: any; + /** + * Gets or sets the position of the tab stop. + * Value: A number representing the distance from the left edge of the text area. + */ + position: number; + /** + * Gets or sets whether the individual tab stop is in effect. + * Value: true to switch off this tab stop; otherwise, false. + */ + deleted: boolean; +} +declare enum TabAlign { + Left=0, + Center=1, + Right=2, + Decimal=3 +} +declare enum TabLeaderType { + None=0, + Dots=1, + MiddleDots=2, + Hyphens=3, + Underline=4, + ThickLine=5, + EqualSign=6 +} +/** + * Contains settings to define the paragraph formatting. + */ +interface ParagraphFormattingSettings { + /** + * Gets or sets the paragraph alignment. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the outline level of a paragraph. + * Value: An integer specifying the level number. + */ + outlineLevel: number; + /** + * Gets or sets the right indent value for the specified paragraph. + * Value: An integer value specifying the right indent. + */ + rightIndent: number; + /** + * Gets or sets the spacing before the current paragraph. + * Value: An integer value specifying the spacing before the paragraph. + */ + spacingBefore: number; + /** + * Gets or sets the spacing after the current paragraph. + * Value: An integer value specifying the spacing after the paragraph. + */ + spacingAfter: number; + /** + * Gets or sets a value which determines the spacing between lines in a paragraph. + * Value: One of the values. + */ + lineSpacingType: any; + /** + * Gets or sets a value specifying whether and how the first line of a paragraph is indented. + * Value: One of the values. + */ + firstLineIndentType: any; + /** + * Gets or sets a value specifying the indent of the first line of a paragraph. + * Value: An integer value specifying the indent of the first line. + */ + firstLineIndent: number; + /** + * Gets or sets whether to suppress addition of additional space (contextual spacing) between paragraphs of the same style. + * Value: true to remove extra spacing between paragraphs, false to add extra space. + */ + contextualSpacing: boolean; + /** + * Gets or sets whether to prevent all page breaks that interrupt a paragraph. + * Value: true, to keep paragraph lines together; otherwise, false. + */ + keepLinesTogether: boolean; + /** + * Gets or sets whether a page break is inserted automatically before a specified paragraph(s). + * Value: true, if a page break is inserted automatically before a paragraph(s); otherwise, false. + */ + pageBreakBefore: boolean; + /** + * Gets or sets the left indent for text within a paragraph. + * Value: An integer value specifying the left indent. + */ + leftIndent: number; + /** + * Gets or sets a line spacing value. + * Value: An integer value specifying the line spacing. + */ + lineSpacing: number; + /** + * Gets or sets the paragraph background color. + * Value: A string value specifying the background color. + */ + backColor: string; +} +declare enum ParagraphAlignment { + Left=0, + Right=1, + Center=2, + Justify=3 +} +declare enum ParagraphLineSpacingType { + Single=0, + Sesquialteral=1, + Double=2, + Multiple=3, + Exactly=4, + AtLeast=5 +} +declare enum ParagraphFirstLineIndent { + None=0, + Indented=1, + Hanging=2 +} +interface AssignShortcutCommand extends CommandWithSimpleStateBase { + /** + * + * @param keyCode + * @param callback + */ + execute(keyCode: number, callback: (arg1: string) => void): boolean; +} +interface OpenSpellingDialogCommand extends CommandWithSimpleStateBase { + execute(): boolean; +} +/** + * A command to invoke the Insert Table dialog. + */ +interface OpenInsertTableDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertTableDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Insert Table dialog. + */ +interface InsertTableCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param columnCount An integer value specifying number of columns in a generated table. + * @param rowCount An integer value specifying number of rows in a generated table. + */ + execute(columnCount: number, rowCount: number): boolean; +} +/** + * A command to invoke the Table Properties dialog. + */ +interface OpenTableFormattingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenTableFormattingDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the selected table's formatting. + */ +interface ChangeTableFormattingCommand extends CommandBase { + /** + * Executes the ChangeTableFormattingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableFormattingSettings object containing the settings to format a table. + */ + execute(settings: TableFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the selected table's preferred row height. + */ +interface ChangeTableRowPreferredHeightCommand extends CommandBase { + /** + * Executes the ChangeTableRowPreferredHeightCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param preferredHeight A TableHeightUnit object specifying preferred height of the selected table rows. + */ + execute(preferredHeight: TableHeightUnit): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the preferred cell width of the selected table rows. + */ +interface ChangeTableCellPreferredWidthCommand extends CommandBase { + /** + * Executes the ChangeTableCellPreferredWidthCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param preferredWidth A TableWidthUnit object specifying preferred width of the selected table rows. + */ + execute(preferredWidth: TableWidthUnit): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the selected table's preferred column width. + */ +interface ChangeTableColumnPreferredWidthCommand extends CommandBase { + /** + * Executes the ChangeTableColumnPreferredWidthCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param preferredWidth A TableWidthUnit object specifying preferred width of the selected table columns. + */ + execute(preferredWidth: TableWidthUnit): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the cell formatting of the selected table elements. + */ +interface ChangeTableCellFormattingCommand extends CommandBase { + /** + * Executes the ChangeTableCellFormattingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableFormattingSettings object specifying cell formatting of the selected table elements. + */ + execute(settings: TableCellFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to insert a table column to the left of the current position in the table. + */ +interface InsertTableColumnToTheLeftCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableColumnToTheLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a table column to the right of the current position in the table. + */ +interface InsertTableColumnToTheRightCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableColumnToTheRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a row in a table below the selected row. + */ +interface InsertTableRowBelowCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableRowBelowCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert a row in a table above the selected row. + */ +interface InsertTableRowAboveCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableRowAboveCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table rows. + */ +interface DeleteTableRowsCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableRowsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table columns. + */ +interface DeleteTableColumnsCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableColumnsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to insert table cells with a horizontal shift into the selected table. + */ +interface InsertTableCellWithShiftToTheLeftCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCellWithShiftToTheLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table cells with a horizontal shift. + */ +interface DeleteTableCellsWithShiftHorizontallyCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCellsWithShiftHorizontallyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table cells with a vertical shift. + */ +interface DeleteTableCellsWithShiftVerticallyCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCellsWithShiftVerticallyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to delete the selected table. + */ +interface DeleteTableCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Insert Cells dialog. + */ +interface InsertTableCellsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCellsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Delete Cells dialog. + */ +interface DeleteTableCellsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCellsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to merge the selected table cells. + */ +interface MergeTableCellsCommand extends CommandWithSimpleStateBase { + /** + * Executes the MergeTableCellsCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Split Cells dialog. + */ +interface SplitTableCellsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the SplitTableCellsDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to split the selected table cells based on the specified options. + */ +interface SplitTableCellsCommand extends CommandWithSimpleStateBase { + /** + * Executes the SplitTableCellsCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param rowCount An integer value specifying number of rows in the splitted table cells. + * @param columnCount An integer value specifying number of columns in the splitted table cells. + * @param mergeBeforeSplit true to merge the selected cells before splitting; otherwise, false. + */ + execute(rowCount: number, columnCount: number, mergeBeforeSplit: boolean): boolean; +} +/** + * A command to insert table cells with a vertical shift into the selected table. + */ +interface InsertTableCellsWithShiftToTheVerticallyCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCellsWithShiftToTheVerticallyCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to invoke the Borders and Shading table dialog. + */ +interface OpenTableBordersAndShadingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenTableBordersAndShadingDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change borders and shading of the selected table elements. + */ +interface ChangeTableBordersAndShadingCommand extends CommandBase { + /** + * Executes the ChangeTableBordersAndShadingCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableBorderSettings object with settings specifying table borders. + * @param applyToWholeTable true to apply the border settings to the whole table, false to apply the border settings to the selected cells. + */ + execute(settings: TableBordersSettings, applyToWholeTable: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to apply top-left alignment for the selected table cells. + */ +interface ToggleTableCellAlignTopLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignTopLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply top-center alignment for the selected table cells. + */ +interface ToggleTableCellAlignTopCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignTopCenterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply top-right alignment for the selected table cells. + */ +interface ToggleTableCellAlignTopRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignTopRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply middle-left alignment for the selected table cells. + */ +interface ToggleTableCellAlignMiddleLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignMiddleLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply middle-center alignment for the selected table cells. + */ +interface ToggleTableCellAlignMiddleCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignMiddleCenterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply middle-right alignment for the selected table cells. + */ +interface ToggleTableCellAlignMiddleRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignMiddleRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply bottom-left alignment for the selected table cells. + */ +interface ToggleTableCellAlignBottomLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignBottomLeftCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply bottom-center alignment for the selected table cells. + */ +interface ToggleTableCellAlignBottomCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignBottomCenterCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to apply bottom-right alignment for the selected table cells. + */ +interface ToggleTableCellAlignBottomRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignBottomRightCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the selected table's style. + */ +interface ChangeTableStyleCommand extends CommandBase { + /** + * Executes the ChangeTableStyleCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param style A TableStyle object specifying the style applying to the table. + */ + execute(style: TableStyle): boolean; + /** + * Executes the ChangeTableStyleCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param styleName A string specifying the name of style applying to the table. + */ + execute(styleName: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to toggle top borders for selected cells on/off. + */ +interface ToggleTableCellTopBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellTopBorderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle right borders for selected cells on/off. + */ +interface ToggleTableCellRightBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellRightBorderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle bottom borders for selected cells on/off. + */ +interface ToggleTableCellBottomBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellBottomBorderCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +interface ToggleTableCellLeftBorderCommand extends CommandWithBooleanStateBase { + execute(): boolean; +} +/** + * A command to remove the borders of the selected table cells. + */ +interface RemoveTableCellBordersCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveTableCellBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle all borders for selected cells on/off. + */ +interface ToggleTableCellAllBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAllBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle inner borders for selected cells on/off. + */ +interface ToggleTableCellInsideBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellInsideBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle inner horizontal borders for selected cells on/off. + */ +interface ToggleTableCellInsideHorizontalBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellInsideHorizontalBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle inner vertical borders for selected cells on/off. + */ +interface ToggleTableCellInsideVerticalBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellInsideVerticalBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle outer borders for selected cells on/off. + */ +interface ToggleTableCellOutsideBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellOutsideBordersCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the selected table's style options. + */ +interface ChangeTableLookCommand extends CommandBase { + /** + * Executes the ChangeTableLookCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableLookSettings object containing the settings that modify the table appearance. + */ + execute(settings: TableLookSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the repository item's table border style. + */ +interface ChangeTableBorderRepositoryItemCommand extends CommandBase { + /** + * Executes the ChangeTableBorderRepositoryItemCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A TableBorderSettings object specifying the repository item's table border style. + */ + execute(settings: TableBorderSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change cell shading in the selected table elements. + */ +interface ChangeTableCellShadingCommand extends CommandBase { + /** + * Executes the ChangeTableCellShadingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying color of the selected cells' shading. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to toggle the display of grid lines for a table with no borders applied - on/off. + */ +interface ShowTableGridLinesCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowTableGridLinesCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ShowTableGridLinesCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param showTableGridLines true to display grid lines of the table, false to hide grid lines of the table. + */ + execute(showTableGridLines: boolean): boolean; +} +/** + * Contains the table style settings that modify the table appearance. + */ +interface TableLookSettings { + /** + * Gets or sets a value specifying whether special formatting is applied to the first row of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyFirstRow: boolean; + /** + * Gets or sets a value specifying whether special formatting is applied to the last row of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyLastRow: boolean; + /** + * Gets or sets a value specifying whether special formatting is applied to the first column of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyFirstColumn: boolean; + /** + * Gets or sets a value specifying whether special formatting is applied to the last column of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyLastColumn: boolean; + /** + * Gets or sets a value specifying whether row banding formatting is not applied to the table. + * Value: true, to apply the formatting; otherwise, false. + */ + doNotApplyRowBanding: boolean; + /** + * Gets or sets a value specifying whether column banding formatting is not applied to the table. + * Value: true, to apply the formatting; otherwise, false. + */ + doNotApplyColumnBanding: boolean; +} +/** + * Contains settings to define table borders. + */ +interface TableBordersSettings { + /** + * Gets or sets the top border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + top: TableBorderSettings; + /** + * Gets or sets the right border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + right: TableBorderSettings; + /** + * Gets or sets the bottom border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + bottom: TableBorderSettings; + /** + * Gets or sets the left border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + left: TableBorderSettings; + /** + * Gets or sets the inside horizontal border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + insideHorizontal: TableBorderSettings; + /** + * Gets or sets the inside vertical border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + insideVertical: TableBorderSettings; + /** + * Gets or sets the background color of table borders. + * Value: A string value specifying the background color. + */ + backgroundColor: string; +} +/** + * Contains settings to define a table border. + */ +interface TableBorderSettings { + /** + * Gets or sets the border color. + * Value: A string value specifying the border color. + */ + color: string; + /** + * Gets or sets the border line width. + * Value: An integer value defining the border line width. + */ + width: number; + /** + * Gets or sets the border line style. + * Value: A object defining the border line style. + */ + style: any; +} +declare enum BorderLineStyle { + None=0, + Single=1, + Thick=2, + Double=3, + Dotted=4, + Dashed=5, + DotDash=6, + DotDotDash=7, + Triple=8, + ThinThickSmallGap=9, + ThickThinSmallGap=10, + ThinThickThinSmallGap=11, + ThinThickMediumGap=12, + ThickThinMediumGap=13, + ThinThickThinMediumGap=14, + ThinThickLargeGap=15, + ThickThinLargeGap=16, + ThinThickThinLargeGap=17, + Wave=18, + DoubleWave=19, + DashSmallGap=20, + DashDotStroked=21, + ThreeDEmboss=22, + ThreeDEngrave=23, + Outset=24, + Inset=25, + Apples=26, + ArchedScallops=27, + BabyPacifier=28, + BabyRattle=29, + Balloons3Colors=30, + BalloonsHotAir=31, + BasicBlackDashes=32, + BasicBlackDots=33, + BasicBlackSquares=34, + BasicThinLines=35, + BasicWhiteDashes=36, + BasicWhiteDots=37, + BasicWhiteSquares=38, + BasicWideInline=39, + BasicWideMidline=40, + BasicWideOutline=41, + Bats=42, + Birds=43, + BirdsFlight=44, + Cabins=45, + CakeSlice=46, + CandyCorn=47, + CelticKnotwork=48, + CertificateBanner=49, + ChainLink=50, + ChampagneBottle=51, + CheckedBarBlack=52, + CheckedBarColor=53, + Checkered=54, + ChristmasTree=55, + CirclesLines=56, + CirclesRectangles=57, + ClassicalWave=58, + Clocks=59, + Compass=60, + Confetti=61, + ConfettiGrays=62, + ConfettiOutline=63, + ConfettiStreamers=64, + ConfettiWhite=65, + CornerTriangles=66, + CouponCutoutDashes=67, + CouponCutoutDots=68, + CrazyMaze=69, + CreaturesButterfly=70, + CreaturesFish=71, + CreaturesInsects=72, + CreaturesLadyBug=73, + CrossStitch=74, + Cup=75, + DecoArch=76, + DecoArchColor=77, + DecoBlocks=78, + DiamondsGray=79, + DoubleD=80, + DoubleDiamonds=81, + Earth1=82, + Earth2=83, + EclipsingSquares1=84, + EclipsingSquares2=85, + EggsBlack=86, + Fans=87, + Film=88, + Firecrackers=89, + FlowersBlockPrint=90, + FlowersDaisies=91, + FlowersModern1=92, + FlowersModern2=93, + FlowersPansy=94, + FlowersRedRose=95, + FlowersRoses=96, + FlowersTeacup=97, + FlowersTiny=98, + Gems=99, + GingerbreadMan=100, + Gradient=101, + Handmade1=102, + Handmade2=103, + HeartBalloon=104, + HeartGray=105, + Hearts=106, + HeebieJeebies=107, + Holly=108, + HouseFunky=109, + Hypnotic=110, + IceCreamCones=111, + LightBulb=112, + Lightning1=113, + Lightning2=114, + MapleLeaf=115, + MapleMuffins=116, + MapPins=117, + Marquee=118, + MarqueeToothed=119, + Moons=120, + Mosaic=121, + MusicNotes=122, + Northwest=123, + Ovals=124, + Packages=125, + PalmsBlack=126, + PalmsColor=127, + PaperClips=128, + Papyrus=129, + PartyFavor=130, + PartyGlass=131, + Pencils=132, + People=133, + PeopleHats=134, + PeopleWaving=135, + Poinsettias=136, + PostageStamp=137, + Pumpkin1=138, + PushPinNote1=139, + PushPinNote2=140, + Pyramids=141, + PyramidsAbove=142, + Quadrants=143, + Rings=144, + Safari=145, + Sawtooth=146, + SawtoothGray=147, + ScaredCat=148, + Seattle=149, + ShadowedSquares=150, + SharksTeeth=151, + ShorebirdTracks=152, + Skyrocket=153, + SnowflakeFancy=154, + Snowflakes=155, + Sombrero=156, + Southwest=157, + Stars=158, + Stars3d=159, + StarsBlack=160, + StarsShadowed=161, + StarsTop=162, + Sun=163, + Swirligig=164, + TornPaper=165, + TornPaperBlack=166, + Trees=167, + TriangleParty=168, + Triangles=169, + Tribal1=170, + Tribal2=171, + Tribal3=172, + Tribal4=173, + Tribal5=174, + Tribal6=175, + TwistedLines1=176, + TwistedLines2=177, + Vine=178, + Waveline=179, + WeavingAngles=180, + WeavingBraid=181, + WeavingRibbon=182, + WeavingStrips=183, + WhiteFlowers=184, + Woodwork=185, + XIllusions=186, + ZanyTriangles=187, + ZigZag=188, + ZigZagStitch=189, + Nil=-1 +} +/** + * Contains the settings to define the table cell formatting. + */ +interface TableCellFormattingSettings { + /** + * Gets or sets a table cell's preferred width. + * Value: A object specifying the preferred cell width. + */ + preferredWidth: TableWidthUnit; + /** + * Gets or sets the vertical alignment of a table cell's content. + * Value: One the values. + */ + verticalAlignment: any; + /** + * Gets or sets a value specifying whether text is wrapped in a table cell. + * Value: true if text is wrapped; false if text is not wrapped. + */ + noWrap: boolean; + /** + * Gets or sets a table cell's left margin. + * Value: An integer value specifying the left margin. + */ + marginLeft: number; + /** + * Gets or sets a table cell's right margin. + * Value: An integer value specifying the right margin. + */ + marginRight: number; + /** + * Gets or sets a table cell's top margin. + * Value: An integer value specifying the top margin. + */ + marginTop: number; + /** + * Gets or sets a table cell's bottom margin. + * Value: An integer value specifying the bottom margin. + */ + marginBottom: number; + /** + * Gets or sets a value specifying whether a table cell's margins are inherited from the table level settings. + * Value: true to inherit table level margins; false to use a table cell's own margin settings. + */ + marginsSameAsTable: boolean; +} +declare enum TableCellVerticalAlignment { + Top=0, + Both=1, + Center=2, + Bottom=3 +} +/** + * Contains the settings to format a table. + */ +interface TableFormattingSettings { + /** + * Gets or sets the preferred width of cells in the table. + * Value: A object specifying the width. + */ + preferredWidth: TableWidthUnit; + /** + * Gets or sets the alignment of table rows. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the table's left indent. + * Value: An integer value specifying the indent. + */ + indent: number; + /** + * Gets or sets the spacing between table cells. + * Value: An integer value specifying the spacing. + */ + spacingBetweenCells: number; + /** + * Gets or sets a value specifying whether spacing is allowed between table cells. + * Value: true, to allow spacing; otherwise, false. + */ + allowSpacingBetweenCells: boolean; + /** + * Gets or sets a value that specifying whether to allow automatic resizing of table cells to fit their contents. + * Value: true, to allow automatic resizing; otherwise, false. + */ + resizeToFitContent: boolean; + /** + * Gets or sets the default left margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginLeft: number; + /** + * Gets or sets the default right margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginRight: number; + /** + * Gets or sets the default top margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginTop: number; + /** + * Gets or sets the default bottom margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginBottom: number; +} +/** + * Contains settings defining the table width's measurement units and value. + */ +interface TableWidthUnit { + /** + * Gets or sets the table width value. + * Value: An integer value specifying the table width. + */ + value: number; + /** + * Gets or sets the unit type for the table width. + * Value: One of the values. + */ + type: any; +} +/** + * Contains settings defining the table height's measurement units and value. + */ +interface TableHeightUnit { + /** + * Gets or sets the table height value. + * Value: An integer value specifying the table height. + */ + value: number; + type: any; +} +declare enum TableHeightUnitType { + Minimum=0, + Auto=1, + Exact=2 +} +declare enum TableRowAlignment { + Both=0, + Center=1, + Distribute=2, + Left=3, + NumTab=4, + Right=5 +} +declare enum TableWidthUnitType { + Nil=0, + Auto=1, + FiftiethsOfPercent=2, + ModelUnits=3 +} +/** + * A command to change the font name of characters in a selected range. + */ +interface ChangeFontNameCommand extends CommandBase { + /** + * Executes the ChangeFontNameCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontName A string specifying font name. + */ + execute(fontName: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the font size of characters in a selected range. + */ +interface ChangeFontSizeCommand extends CommandBase { + /** + * Executes the ChangeFontSizeCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontSize An integer number specifying font size. + */ + execute(fontSize: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to increase the font size of characters in a selected range to the closest larger predefined value. + */ +interface IncreaseFontSizeCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncreaseFontSizeCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to decrease the font size of characters in a selected range to the closest smaller predefined value. + */ +interface DecreaseFontSizeCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecreaseFontSizeCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to convert the selected text to upper case. + */ +interface MakeTextUpperCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the MakeTextUpperCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to convert the selected text to lower case. + */ +interface MakeTextLowerCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the MakeTextLowerCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to capitalize each word in the selected sentence. + */ +interface CapitalizeEachWordTextCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the CapitalizeEachWordTextCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to toggle the case for each character - upper case becomes lower, lower case becomes upper. + */ +interface ToggleTextCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the ToggleTextCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the bold formatting of characters in a selected range. + */ +interface ChangeFontBoldCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontBoldCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontBoldCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontBold true to apply bold formatting to the text, false to remove bold formatting. + */ + execute(fontBold: boolean): boolean; +} +/** + * A command to change the italic formatting of characters in a selected range. + */ +interface ChangeFontItalicCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontItalicCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontItalicCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontItalic true to apply italic formatting to the text, false to remove italic formatting. + */ + execute(fontItalic: boolean): boolean; +} +/** + * A command to change the underline formatting of characters in a selected range. + */ +interface ChangeFontUnderlineCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontUnderlineCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontUnderlineCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontUnderline true to apply underline formatting to the text, false to remove underline formatting. + */ + execute(fontUnderline: boolean): boolean; +} +/** + * A command to change the strikeout formatting of characters in a selected range. + */ +interface ChangeFontStrikeoutCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontStrikeoutCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontStrikeoutCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontStrikeout true to apply strikeout formatting to the text, false to remove strikeout formatting. + */ + execute(fontStrikeout: boolean): boolean; +} +/** + * A command to change the superscript formatting of characters in a selected range. + */ +interface ChangeFontSuperscriptCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontSuperscriptCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontSuperscriptCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontSuperscript true to apply superscript formatting to the text, false to remove superscript formatting. + */ + execute(fontSuperscript: boolean): boolean; +} +/** + * A command to change the subscript formatting of characters in the selected range. + */ +interface ChangeFontSubscriptCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontSubscriptCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ChangeFontSubscriptCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fontSubscript true to apply subscript formatting to the text, false to remove subscript formatting. + */ + execute(fontSubscript: boolean): boolean; +} +/** + * A command to change the font color of characters in a selected range. + */ +interface ChangeFontForeColorCommand extends CommandBase { + /** + * Executes the ChangeFontForeColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying font color. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the background color of characters in a selected range. + */ +interface ChangeFontBackColorCommand extends CommandBase { + /** + * Executes the ChangeFontBackColorCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param color A string specifying highlighting color. May be specified as color name or hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to reset the selected text's formatting to default. + */ +interface ClearFormattingCommand extends CommandWithSimpleStateBase { + /** + * Executes the ClearFormattingCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the selected range's style. + */ +interface ChangeStyleCommand extends CommandBase { + /** + * Executes the ChangeStyleCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param style A StyleBase object specifying the selected range's style. + */ + execute(style: StyleBase): boolean; + /** + * Executes the ChangeStyleCommand command by applying the specified settings. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param styleName A string specifying the name of applying style. + * @param isParagraphStyle true to apply style to paragraph, false to apply style to character. + */ + execute(styleName: string, isParagraphStyle: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Font dialog allowing end-users to change the font, size and style of the selected text. + */ +interface OpenFontFormattingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenFontFormattingDialogCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to convert the text of all selected sentences to sentence case. + */ +interface MakeTextSentenceCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the MakeTextSentenceCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to switch the text case at the current position in the document. + */ +interface SwitchTextCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the SwitchTextCaseCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; +} +/** + * A command to change the font formatting of characters in a selected range. + */ +interface ChangeFontFormattingCommand extends CommandBase { + /** + * Executes the ChangeFontFormattingCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param settings A FontFormattingSettings object specifying font formatting settings. + */ + execute(settings: FontFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Contains settings to define the font formatting. + */ +interface FontFormattingSettings { + /** + * Gets or sets the character(s) font name. + * Value: A string value specifying the font name. + */ + fontName: string; + /** + * Gets or sets the character(s) font size. + * Value: An integer value specifying the font size. + */ + size: number; + /** + * Gets or sets the foreground color of characters. + * Value: A string value specifying the foreground color. + */ + foreColor: string; + /** + * Gets or sets the character background color. + * Value: A string value specifying the background color. + */ + backColor: string; + /** + * Gets or sets the type of underline applied to the character(s). + * Value: true, if characters are underlined; otherwise, false. + */ + underline: boolean; + /** + * Gets or sets the color of the underline for the specified characters. + * Value: A string value specifying the underline color. + */ + underlineColor: string; + /** + * Gets or sets whether the character formatting is bold. + * Value: true, if characters are bold; otherwise, false. + */ + bold: boolean; + /** + * Gets or sets a value indicating whether a character(s) is italicized. + * Value: true, if characters are italicized; otherwise, false. + */ + italic: boolean; + strikeout: boolean; + /** + * Gets or sets whether only word characters are underlined. + * Value: true to underline only characters in words; false to underline all characters. + */ + underlineWordsOnly: boolean; + /** + * Gets or sets a value specifying character script formatting. + * Value: One of the values. + */ + script: any; + /** + * Gets or sets a value indicating whether all characters are capital letters. + * Value: true, if all characters are capitalized; otherwise, false. + */ + allCaps: boolean; + /** + * Gets or sets a value indicating whether a character(s) is hidden. + * Value: true, if characters are hidden; otherwise, false. + */ + hidden: boolean; +} +declare enum CharacterFormattingScript { + Normal=0, + Subscript=1, + Superscript=2 +} +/** + * A command to toggle the horizontal ruler's visibility. + */ +interface ShowHorizontalRulerCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowHorizontalRulerCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the ShowHorizontalRulerCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param show true to display the horizontal ruler, false to hide the horizontal ruler. + */ + execute(show: boolean): boolean; +} +/** + * A command to toggle the fullscreen mode. + */ +interface SetFullscreenCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetFullscreenCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + */ + execute(): boolean; + /** + * Executes the SetFullscreenCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. + * @param fullscreen true to apply fullscreen mode, false to remove fullscreen mode. + */ + execute(fullscreen: boolean): boolean; +} +/** + * Holds the information that determines what action types can be performed for appointments. + */ +interface ASPxClientAppointmentFlags { + /** + * Gets a value that specifies whether an end-user is allowed to delete appointments. + * Value: true if an end-user can delete appointments; otherwise, false. Default is true. + */ + allowDelete: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to edit appointments. + * Value: true if the end-user can edit appointments; otherwise, false. + */ + allowEdit: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to change the time boundaries of appointments. + * Value: true if appointment resizing is allowed; otherwise, false. Default is true. + */ + allowResize: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to copy appointments. + * Value: true if a user can copy appointments; otherwise, false. Default is true. + */ + allowCopy: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to drag and drop appointments to another time slot or date. + * Value: true if the user can drag and drop appointments; otherwise, false. + */ + allowDrag: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to drag and drop appointments between resources. + * Value: true if the end-user can drag appointment from one resource to another; otherwise, false. + */ + allowDragBetweenResources: boolean; + /** + * Gets a value that specifies whether an inplace editor can be activated for an appointment. + * Value: true if an inplace editor is activated; otherwise, false. Default is true. + */ + allowInplaceEditor: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to share the schedule time between two or more appointments. + * Value: true if appointments with the same schedule time are allowed; otherwise, false. Default is true. + */ + allowConflicts: boolean; +} +/** + * Represents a client-side equivalent of the Appointment class. + */ +interface ASPxClientAppointment { + /** + * Gets the time interval of the appointment for client-side scripting. + * Value: An ASPxClientTimeInterval object, representing the interval assigned to an appointment. + */ + interval: ASPxClientTimeInterval; + /** + * Gets the identifiers of resources associated with the appointment for client-side scripting. + * Value: An array of string representations for resource identifiers. + */ + resources: string[]; + /** + * Gets the ID of an appointment for use in client-side scripts. + * Value: A string representation of the appointment ID. + */ + appointmentId: string; + /** + * Gets the type of appointment for use in client-side scripts. + * Value: An ASPxAppointmentType enumeration member, representing the appointment's type. + */ + appointmentType: ASPxAppointmentType; + /** + * Gets the index of the availability status object associated with the appointment. + * Value: An integer value that specifies the index of the corresponding Statuses collection. + */ + statusIndex: number; + /** + * Gets the index of the label object associated with the appointment for client-side scripting. + * Value: An integer value that specifies the index of the corresponding Labels collection. + */ + labelIndex: number; + /** + * Gets the client appointment value that is equivalent in meaning to the Subject property. + * Value: A string representing the appointment subject. + */ + subject: string; + /** + * Gets the client appointment value that is equivalent in meaning to the Description property. + * Value: A string, representing the description for an appointment. + */ + description: string; + /** + * Gets the client appointment value that is equivalent in meaning to the Location property. + * Value: A string representing the appointment location. + */ + location: string; + /** + * Gets the client appointment value that is equivalent in meaning to the AllDay property. + * Value: true indicates the all-day appointment; otherwise, false. + */ + allDay: boolean; + /** + * Adds a resource to the collection of resources associated with the client appointment. + * @param resourceId An object, representing the resource id. + */ + AddResource(resourceId: Object): void; + /** + * Gets the resource associated with the client-side appointment by its index. + * @param index An integer, representing an index of a resource in a resource collection associated with the current appointment. + */ + GetResource(index: number): Object; + /** + * Sets the property value of the client appointment, corresponding to the Start appointment property. + * @param start A JavaScript Date object representing the appointment start. + */ + SetStart(start: Date): void; + /** + * Gets the property value of the client appointment corresponding to the Start appointment property. + */ + GetStart(): Date; + /** + * Sets the property value of the client appointment, corresponding to the End appointment property. + * @param end A JavaScript Date object representing the end of the appointment. + */ + SetEnd(end: Date): void; + /** + * Gets the property value of the client appointment corresponding to the End appointment property. + */ + GetEnd(): Date; + /** + * Sets the property value of the client appointment, corresponding to the Duration appointment property. + * @param duration A TimeSpan object representing the appointment duration. + */ + SetDuration(duration: any): void; + /** + * Gets the property value of the client appointment corresponding to the Duration appointment property. + */ + GetDuration(): number; + /** + * Sets the ID of the client appointment. + * @param id An object representing the appointment identifier. + */ + SetId(id: Object): void; + /** + * Gets the ID of the client appointment. + */ + GetId(): Object; + /** + * Specifies the type of the current client appointment. + * @param type An ASPxAppointmentType enumeration value indicating the appointment type. + */ + SetAppointmentType(type: ASPxAppointmentType): void; + /** + * Gets the type of the client appointment. + */ + GetAppointmentType(): ASPxAppointmentType; + /** + * Sets the property value of the client appointment, corresponding to the StatusId appointment property. + * @param statusId An integer representing the index in the AppointmentStatusCollection. + */ + SetStatusId(statusId: number): void; + /** + * Gets the property value of the client appointment corresponding to the StatusId appointment property. + */ + GetStatusId(): number; + /** + * Sets the property value of the client appointment, corresponding to the LabelId appointment property. + * @param statusId An integer representing the index of the label in the Labels label collection. + */ + SetLabelId(statusId: number): void; + /** + * Gets the property value of the client appointment corresponding to the LabelId appointment property. + */ + GetLabelId(): number; + /** + * Sets the property value of the client appointment, corresponding to the Subject appointment property. + * @param subject A string containing the appointment subject. + */ + SetSubject(subject: string): void; + /** + * Gets the property value of the client appointment corresponding to the Subject appointment property. + */ + GetSubject(): string; + /** + * Sets the property value of the client appointment, corresponding to the Description appointment property. + * @param description A string representing the appointment description. + */ + SetDescription(description: string): void; + /** + * Gets the property value of the client appointment corresponding to the Description appointment property. + */ + GetDescription(): string; + /** + * Sets the property value of the client appointment, corresponding to the Location appointment property. + * @param location A string representing the appointment location. + */ + SetLocation(location: string): void; + /** + * Gets the property value of the client appointment corresponding to the Location appointment property. + */ + GetLocation(): string; + /** + * Specifies the property value of the client appointment corresponding to the AllDay appointment property. + * @param allDay true to indicate the all-day appointment; otherwise, false. + */ + SetAllDay(allDay: boolean): void; + /** + * Gets the property value of the client appointment corresponding to the AllDay appointment property. + */ + GetAllDay(): boolean; + /** + * Gets the appointment that is the RecurrencePattern for the current appointment. + */ + GetRecurrencePattern(): ASPxClientAppointment; + /** + * Sets the property value of the client appointment, corresponding to the RecurrenceInfo appointment property. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object representing the recurrence information. + */ + SetRecurrenceInfo(recurrenceInfo: ASPxClientRecurrenceInfo): void; + /** + * Gets the property value of the client appointment corresponding to the RecurrenceInfo appointment property. + */ + GetRecurrenceInfo(): ASPxClientRecurrenceInfo; +} +/** + * A client point object. + */ +interface ASPxClientPoint { + /** + * Gets the point's X-coordinate. + */ + GetX(): number; + /** + * Gets the point's Y-coordinate. + */ + GetY(): number; +} +/** + * A client rectangle object. + */ +interface ASPxClientRect { + /** + * Gets the X-coordinate of the rectangle's left edge. + */ + GetLeft(): number; + /** + * Gets the X-coordinate of the rectangle's right edge. + */ + GetRight(): number; + /** + * Gets the Y-coordinate of the rectangle's top edge. + */ + GetTop(): number; + /** + * Gets the Y-coordinate of the rectangle's bottom edge. + */ + GetBottom(): number; + /** + * Gets the rectangle's width. + */ + GetWidth(): number; + /** + * Gets the rectangle's height. + */ + GetHeight(): number; +} +/** + * Contains information defining the occurrences of a recurring client appointment. + */ +interface ASPxClientRecurrenceInfo { + /** + * Sets the recurrence start date. + * @param start A JavaScript date object value that specifies the start date for the recurrence. + */ + SetStart(start: Date): void; + /** + * Gets the recurrence start date. + */ + GetStart(): Date; + /** + * Sets the recurrence end date. + * @param end A JavaScript Date object that specifies the end date for the recurrence. + */ + SetEnd(end: Date): void; + /** + * Gets the recurrence end date. + */ + GetEnd(): Date; + /** + * Sets the duration of the recurrence. + * @param duration A TimeSpan object representing the duration. + */ + SetDuration(duration: any): void; + /** + * Gets the duration of the recurrence. + */ + GetDuration(): number; + /** + * Sets the time base for the frequency of the corresponding appointment occurrences. + * @param type An ASPxClientRecurrenceType enumeration value that specifies the recurrence's frequency type. + */ + SetRecurrenceType(type: ASPxClientRecurrenceType): void; + /** + * Gets the time base for the frequency of the corresponding appointment reoccurrence. + */ + GetRecurrenceType(): ASPxClientRecurrenceType; + /** + * Sets the day/days in a week that the corresponding appointment recurs on. + * @param weekDays The ASPxClientWeekDays enumeration value specifying the day/days in a week. + */ + SetWeekDays(weekDays: ASPxClientWeekDays): void; + /** + * Gets the day/days in a week on which the corresponding appointment occurs. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Sets how many times the appointment occurs. + * @param occurrenceCount An integer value that specifies how many times the appointment occurs. + */ + SetOccurrenceCount(occurrenceCount: number): void; + /** + * Gets how many times the appointment occurs. + */ + GetOccurrenceCount(): number; + /** + * Sets the frequency with which the corresponding appointment occurs (dependent on the recurrence Type). + * @param periodicity An integer value that specifies the frequency with which the corresponding appointment occurs. + */ + SetPeriodicity(periodicity: number): void; + /** + * Gets the frequency with which the corresponding appointment reoccurs (dependent on the recurrence Type). + */ + GetPeriodicity(): number; + /** + * Sets the ordinal number of a day within a defined month. + * @param dayNumber A positive integer value that specifies the day number within a month. + */ + SetDayNumber(dayNumber: number): void; + /** + * Gets the ordinal number of a day within a defined month. + */ + GetDayNumber(): number; + /** + * Sets the occurrence number of the week in a month for the recurrence pattern. + * @param weekOfMonth A ASPxClientWeekOfMonth enumeration value that specifies a particular week in every month. + */ + SetWeekOfMonth(weekOfMonth: ASPxClientWeekOfMonth): void; + /** + * Gets the occurrence number of the week in a month for the recurrence pattern. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; + /** + * Sets the month (as a number) on which the corresponding appointment occurs. + * @param month A positive integer value that specifies the month's number. + */ + SetMonth(month: number): void; + /** + * Gets the month (as a number) on which the corresponding appointment recurs. + */ + GetMonth(): number; + /** + * Gets the type of the recurrence range. + */ + GetRange(): ASPxClientRecurrenceRange; + /** + * Sets the type of the recurrence range. + * @param range An ASPxClientRecurrenceRangeenumeration value that specifies the recurrence range type. + */ + SetRange(range: ASPxClientRecurrenceRange): void; +} +/** + * Contains types of the recurrence range. + */ +interface ASPxClientRecurrenceRange { + /** + * A recurring appointment will not have an end date, i.e. infinite recurrence + * Value: The "NoEndDate" string. + */ + NoEndDate: string; + /** + * A recurring appointment will end after its recurrence count exceeds the value specified by the SetOccurrenceCount method. + * Value: The "OccurrenceCount" string. + */ + OccurrenceCount: string; + /** + * A recurring appointment will end after the date specified by the SetEnd method. + * Value: The "EndByDate" string. + */ + EndByDate: string; +} +/** + * Contains recurrence types. + */ +interface ASPxClientRecurrenceType { + /** + * The recurring appointment occurs on a daily basis. + * Value: The "Daily" string. + */ + Daily: string; + /** + * The recurring appointment reoccurs on a weekly basis. + * Value: The "Weekly" string. + */ + Weekly: string; + /** + * The recurring appointment reoccurs on a monthly basis. + * Value: The "Monthly" string. + */ + Monthly: string; + /** + * The recurring appointment reoccurs on an yearly basis. + * Value: The "Yearly" string. + */ + Yearly: string; + /** + * The recurring appointment occurs on an hourly base. + * Value: The "Hourly" string. + */ + Hourly: string; +} +/** + * Contains days and groups of days for use in recurrence patterns. + */ +interface ASPxClientWeekDays { + /** + * Specifies Sunday. + * Value: The integer 1 value. + */ + Sunday: number; + /** + * Specifies Monday. + * Value: The integer 2 value. + */ + Monday: number; + /** + * Specifies Tuesday. + * Value: The integer 4 value. + */ + Tuesday: number; + /** + * Specifies Wednesday. + * Value: The integer 8 value. + */ + Wednesday: number; + /** + * Specifies Thursday. + * Value: The integer 16 value. + */ + Thursday: number; + /** + * Specifies Friday. + * Value: The integer 32 value. + */ + Friday: number; + /** + * Specifies Saturday. + * Value: The integer 64 value. + */ + Saturday: number; + /** + * Specifies Saturday and Sunday. + * Value: The integer 65 value. + */ + WeekendDays: number; + /** + * Specifies work days (Monday, Tuesday, Wednesday, Thursday and Friday). + * Value: The integer 62 value. + */ + WorkDays: number; + /** + * Specifies every day of the week. + * Value: The integer 127 value. + */ + EveryDay: number; +} +/** + * Contains number of weeks in a month in which the event occurs. + */ +interface ASPxClientWeekOfMonth { + /** + * There isn't any recurrence rule based on the weeks in a month. + * Value: The integer 0 value. + */ + None: number; + /** + * The recurring event will occur once a month, on the specified day or days of the first week in the month. + * Value: The integer 1 value. + */ + First: number; + /** + * The recurring event will occur once a month, on the specified day or days of the second week in the month. + * Value: The integer 2 value. + */ + Second: number; + /** + * The recurring event will occur once a month, on the specified day or days of the third week in the month. + * Value: The integer 3 value. + */ + Third: number; + /** + * The recurring event will occur once a month, on the specified day or days of the fourth week in the month. + * Value: The integer 4 value; + */ + Fourth: number; + /** + * The recurring event will occur once a month, on the specified day or days of the last week in the month. + * Value: The integer 5 value; + */ + Last: number; +} +/** + * Represents a client-side equivalent of the WeekDaysCheckEdit control. + */ +interface ASPxClientWeekDaysCheckEdit extends ASPxClientControl { + /** + * Gets the selection state of the week day check boxes. + */ + GetValue(): ASPxClientWeekDays; + /** + * Gets the selection state of the week day check boxes. + * @param value An ASPxClientWeekDays object specifying the selection state of the week day check boxes. + */ + SetValue(value: ASPxClientWeekDays): void; +} +/** + * Represents a client-side equivalent of the RecurrenceRangeControl. + */ +interface ASPxClientRecurrenceRangeControl extends ASPxClientControl { + /** + * Gets the type of the recurrence range. + */ + GetRange(): ASPxClientRecurrenceRange; + /** + * Gets how many times the appointment occurs. + */ + GetOccurrenceCount(): number; + /** + * Gets the recurrence end date. + */ + GetEndDate(): Date; + /** + * Sets the type of the recurrence range. + * @param range An ASPxClientRecurrenceRangeenumeration value that specifies the recurrence range type. + */ + SetRange(range: ASPxClientRecurrenceRange): void; + /** + * Sets how many times the appointment occurs. + * @param occurrenceCount An integer value that specifies how many times the appointment occurs. + */ + SetOccurrenceCount(occurrenceCount: number): void; + /** + * Sets the recurrence end date. + * @param date A JavaScript Date object that specifies the end date for the recurrence. + */ + SetEndDate(date: Date): void; +} +/** + * A base for client equivalents of recurrence controls available in the XtraScheduler library. + */ +interface ASPxClientRecurrenceControlBase extends ASPxClientControl { + /** + * Returns an object providing access to the ASPxClientRecurrenceControlBase control's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientRecurrenceControlBase control. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the DailyRecurrenceControl - a control for specifying the daily recurrence. + */ +interface ASPxClientDailyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientDailyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientDailyRecurrenceControl. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the WeeklyRecurrenceControl. + */ +interface ASPxClientWeeklyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientWeeklyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientWeeklyRecurrenceControl. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the MonthlyRecurrenceControl. + */ +interface ASPxClientMonthlyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientMonthlyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientMonthlyRecurrenceControll. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the YearlyRecurrenceControl. + */ +interface ASPxClientYearlyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientYearlyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientYearlyRecurrenceControl. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * An object providing access to an ASPxClientRecurrenceControlBase control's editor values. + */ +interface DefaultRecurrenceRuleValuesAccessor { + /** + * Get the frequency with which the appointment occurs with respect to the appointment's recurrence type. + */ + GetPeriodicity(): number; + /** + * Gets the number of the month's day in which the appointment is scheduled. + */ + GetDayNumber(): number; + /** + * Gets or sets the month's number. + */ + GetMonth(): number; + /** + * Gets the days of the week on which a weekly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Gets the number of the week in a month when an appointment is scheduled. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; +} +/** + * An object providing access to an ASPxClientDailyRecurrenceControl's editor values. + */ +interface DailyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the number of days between appointment occurrences. + */ + GetPeriodicity(): number; + /** + * Gets the days of the week to which a daily recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; +} +/** + * An object providing access to an ASPxClientWeeklyRecurrenceControl's editor values. + */ +interface WeeklyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the number of weeks between appointment occurrences. + */ + GetPeriodicity(): number; + /** + * Gets the days of the week on which a weekly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; +} +/** + * An object providing access to an ASPxClientMonthlyRecurrenceControl's editor values. + */ +interface MonthlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the day of the month on which the appointment is scheduled. + */ + GetDayNumber(): number; + /** + * Gets the number of months between appointment occurrences. + */ + GetPeriodicity(): number; + /** + * Gets the days of the week on which a monthly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Gets the number of the week in a month when an appointment is scheduled. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; +} +/** + * An object providing access to an ASPxClientYearlyRecurrenceControl's editor values. + */ +interface YearlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the day of the month on which the appointment is scheduled. + */ + GetDayNumber(): number; + /** + * Gets or sets the month's number. + */ + GetMonth(): number; + /** + * Gets the days of the week on which a yearly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Gets or sets the number of a week in a month when an appointment is scheduled. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; +} +/** + * Provides base functionality for ASPxClientScheduler's forms. + */ +interface ASPxClientFormBase { + /** + * Occurs when the form has been closed. + */ + FormClosed: ASPxClientEvent>; + /** + * Closes the form. + */ + Close(): void; + /** + * Sets the visibility state of the specified form element. + * @param element An object specifying the element whose visibility state should be changed. + * @param isVisible true to display the element; false to hide the element. + */ + SetVisibleCore(element: Object, isVisible: boolean): void; +} +/** + * Represents a client-side equivalent of the RecurrenceTypeEdit. + */ +interface ASPxClientRecurrenceTypeEdit extends ASPxClientRadioButtonList { + /** + * Gets the selected recurrence type. + */ + GetRecurrenceType(): ASPxClientRecurrenceType; + /** + * Sets the selected recurrence type. + * @param recurrenceType An ASPxClientRecurrenceType enumeration value. + */ + SetRecurrenceType(recurrenceType: ASPxClientRecurrenceType): void; +} +/** + * Contains lists of property names for different appointment types. + */ +interface AppointmentPropertyNames { + /** + * Gets the list of properties characteristic for appointments of the Normal type. + * Value: A string array which is composed of the appointment property names. + */ + Normal: string; + /** + * Gets the list of properties characteristic for appointments of the Pattern type. + * Value: A string array which is composed of the appointment property names. + */ + Pattern: string; +} +/** + * Represents the client-side equivalent of the TimeInterval class. + */ +interface ASPxClientTimeInterval { + /** + * Gets a value indicating if the time interval is All-Day. + */ + GetAllDay(): boolean; + /** + * Sets a value specifying if the time interval is All-Day. + * @param allDayValue true, if this is an all-day time interval; otherwise, false. + */ + SetAllDay(allDayValue: boolean): void; + /** + * Client-side function that returns the start time of the interval. + */ + GetStart(): Date; + /** + * Client-side function that returns the duration of the specified time interval. + */ + GetDuration(): number; + /** + * Client-side function that returns the end time of the interval. + */ + GetEnd(): Date; + /** + * Client-side function that sets the start time of the interval. + * @param value A DateTime value, representing the beginning of the interval. + */ + SetStart(value: Date): void; + /** + * Client-side function that returns the duration of the specified time interval. + * @param value A TimeSpan object, representing the duration of the time period. + */ + SetDuration(value: any): void; + /** + * Client-side function that sets the end time of the interval. + * @param value A DateTime value, representing the end of the interval. + */ + SetEnd(value: Date): void; + /** + * Determines whether the specified object is equal to the current ASPxClientTimeInterval instance. + * @param interval The object to compare with the current object. + */ + Equals(interval: ASPxClientTimeInterval): boolean; + /** + * Checks if the current time interval intersects with the specified time interval. + * @param interval A ASPxClientTimeInterval object which represents the time interval to be checked. + */ + IntersectsWith(interval: ASPxClientTimeInterval): boolean; + /** + * Checks if the current time interval intersects with the specified time interval. The boundaries of the time intervals are excluded from the check. + * @param interval A ASPxClientTimeInterval object which represents the time interval to be checked. + */ + IntersectsWithExcludingBounds(interval: ASPxClientTimeInterval): boolean; + /** + * Client-side function that determines whether the specified interval is contained within the current one. + * @param interval An ASPxClientTimeInterval object, representing the time interval to check. + */ + Contains(interval: ASPxClientTimeInterval): boolean; +} +/** + * Holds action types for the client-side Refresh method. + */ +interface ASPxClientSchedulerRefreshAction { + /** + * Gets the value of the action parameter which initiates a simple reload of the control. + * Value: An integer representing the action parameter value. + */ + None: number; + /** + * Gets the value of the action parameter which initiates reloading of the main ASPxScheduler control and its data-dependent satellites. + * Value: An integer representing the action parameter value. + */ + VisibleIntervalChanged: number; + /** + * Gets the value of the action parameter which initiates reloading of the main ASPxScheduler control and its satellite View controls. + * Value: An integer representing the action parameter value. + */ + ActiveViewTypeChanged: number; +} +/** + * Contains methods allowing you to perform or cancel an operation. + */ +interface ASPxClientAppointmentOperation { + /** + * Passes parameters to the corresponding callback function to accomplish the operation. + */ + Apply(): void; + /** + * Cancels the operation. + */ + Cancel(): void; +} +/** + * Represents the client-side equivalent of the ASPxScheduler control. + */ +interface ASPxClientScheduler extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientScheduler. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when the Scheduler control is about to change its active view. + */ + ActiveViewChanging: ASPxClientEvent>; + /** + * Client-side event. Occurs after the active view of the ASPxScheduler has been changed. + */ + ActiveViewChanged: ASPxClientEvent>; + /** + * Occurs when the end-user clicks an appointment. + */ + AppointmentClick: ASPxClientEvent>; + /** + * Occurs when the end-user double clicks on an appointment. + */ + AppointmentDoubleClick: ASPxClientEvent>; + /** + * Occurs on the client side when the user selects an appointment. + */ + AppointmentsSelectionChanged: ASPxClientEvent>; + /** + * Fires on the client side when the time cell selection is changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the time cell selection is about to change. + */ + SelectionChanging: ASPxClientEvent>; + /** + * Fires on the client side when the time interval of the scheduling area is changed. + */ + VisibleIntervalChanged: ASPxClientEvent>; + /** + * Occurs when one of More Buttons is clicked. + */ + MoreButtonClicked: ASPxClientEvent>; + /** + * Client-side event that occurs when a popup menu item is clicked. + */ + MenuItemClicked: ASPxClientEvent>; + /** + * Client-side event that occurs after an appointment has been dragged and dropped. + */ + AppointmentDrop: ASPxClientEvent>; + /** + * A client-side event that occurs when an appointment is being dragged. + */ + AppointmentDrag: ASPxClientEvent>; + /** + * A client-side event that occurs when an appointment is being resized. + */ + AppointmentResizing: ASPxClientEvent>; + /** + * Client-side event that occurs when an appointment is resized. + */ + AppointmentResize: ASPxClientEvent>; + /** + * Client-side event that fires before an appointment is deleted. + */ + AppointmentDeleting: ASPxClientEvent>; + /** + * Client-side scripting method that gets the active View. + */ + GetActiveViewType(): ASPxSchedulerViewType; + /** + * Client-side scripting method to change the ASPxScheduler's active View. + * @param value A ASPxSchedulerViewType enumeration value, representing a view type to set. + */ + SetActiveViewType(value: ASPxSchedulerViewType): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Client-side scripting method which initiates a round trip to the server so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Client-side scripting method which initiates a round trip to the server, so that the control will be reloaded using the specified refresh action. + * @param refreshAction An ASPxClientSchedulerRefreshAction enumeration value, specifying the refresh action. + */ + Refresh(refreshAction: ASPxClientSchedulerRefreshAction): void; + /** + * Client-side function that returns the type of grouping applied to the appointments displayed in the scheduler. + */ + GetGroupType(): ASPxSchedulerGroupType; + /** + * Client-side scripting method which raises the callback command to set the GroupType. + * @param value An ASPxSchedulerGroupType enumeration value, which specifies how appointments are grouped. + */ + SetGroupType(value: ASPxSchedulerGroupType): void; + /** + * Client-side method that navigates the scheduler to the current system date. + */ + GotoToday(): void; + /** + * Client-side scripting method which raises the GotoDate callback command. + * @param date A DateTime value specifying the destination time. + */ + GotoDate(date: Date): void; + /** + * Client-side function which slides the visible interval one time span back. + */ + NavigateBackward(): void; + /** + * Client-side function which slides the visible interval one time span forward. + */ + NavigateForward(): void; + /** + * Client-side method which raises the callback command to change the ClientTimeZoneId of the scheduler. + * @param timeZoneId A string, a time zone identifier which is valid for the System.TimeZoneInfo.Id property. + */ + ChangeTimeZoneId(timeZoneId: string): void; + /** + * Displays a Selection ToolTip on a position given by the specified coordinates. + * @param x An integer representing the X-coordinate. + * @param y An integer representing the Y-coordinate. + */ + ShowSelectionToolTip(x: number, y: number): void; + /** + * Client-side function that returns the time interval, selected in the scheduler. + */ + GetSelectedInterval(): ASPxClientTimeInterval; + /** + * Client-side function that returns the ResourceId of selected time cell's resource. + */ + GetSelectedResource(): string; + /** + * Client-side function that returns an appointment with the specified ID. + * @param id An appointment's identifier. + */ + GetAppointmentById(id: Object): ASPxClientAppointment; + /** + * Client-side function that returns the id's of selected appointments. + */ + GetSelectedAppointmentIds(): string[]; + /** + * Client-side function that removes the appointment specified by its client ID from a collection of selected appointments. + * @param aptId An appointment's identifier. + */ + DeselectAppointmentById(aptId: Object): void; + /** + * Client-side function that selects an appointment with the specified ID. + * @param aptId An appointment's identifier. + */ + SelectAppointmentById(aptId: Object): void; + /** + * Enables obtaining appointment property values in a client-side script. Executes the callback command with the AppointmentData identifier. + * @param aptId An integer, representing the appointment ID. + * @param propertyNames An array of strings, representing the appointment properties to query. + * @param onCallBack A handler of a function which will receive and process the properties' values. + */ + GetAppointmentProperties(aptId: number, propertyNames: string[], onCallBack: Object): string[]; + /** + * Initiates a callback to retrieve and apply the values for the specified list of properties to the specified appointment, and transfer control to the specified function. + * @param clientAppointment An ASPxClientAppointment object that is the client appointment for which the data is retrieved. + * @param propertyNames An array of strings, that are the names of appointment properties to query. + * @param onCallBack A handler of a function executed after a callback. + */ + RefreshClientAppointmentProperties(clientAppointment: ASPxClientAppointment, propertyNames: string[], onCallBack: Object): void; + /** + * Client-side function that invokes the editing form for the appointment specified by its client ID. + * @param aptClientId A string, representing the appointment client identifier. + */ + ShowAppointmentFormByClientId(aptClientId: string): void; + /** + * Client-side function that invokes the editing form for the appointment specified by its storage identifier. + * @param aptServerId A string, representing the appointment identifier. + */ + ShowAppointmentFormByServerId(aptServerId: string): void; + /** + * Sets the time of the day corresponding to the start of the topmost displayed time cell row. + * @param duration An integer, representing the number of milliseconds passed since the start of the day. + * @param viewType An ASPxSchedulerViewType enumeration member, representing the scheduler's View. It can be either 'Day' or 'WorkWeek'. + */ + SetTopRowTime(duration: number, viewType: ASPxSchedulerViewType): void; + /** + * Sets the time of the day corresponding to the start of the topmost displayed time cell row. + * @param duration An integer, representing the number of milliseconds passed since the start of the day. + */ + SetTopRowTime(duration: number): void; + /** + * Gets the time of the day corresponding to the start of the topmost displayed time cell row. + * @param viewType An ASPxSchedulerViewType enumeration member, representing the scheduler's View. It can be either "Day" or "WorkWeek", otherwise the result is undefined. + */ + GetTopRowTime(viewType: ASPxSchedulerViewType): number; + /** + * Gets the time of day corresponding to the start of the topmost displayed time cell row. + */ + GetTopRowTime(): number; + /** + * Client-side scripting method which displays the Loading Panel. + */ + ShowLoadingPanel(): void; + /** + * Client-side scripting method which hides the Loading Panel from view. + */ + HideLoadingPanel(): void; + /** + * Client-side method that invokes the inplace editor form to create a new appointment. + * @param start A date object, representing the start of the new appointment. + * @param end A date object, representing the end of the new appointment. + */ + ShowInplaceEditor(start: Date, end: Date): void; + /** + * Client-side method that invokes the inplace editor form to create a new appointment. + * @param start A date object, representing the start of the new appointment. + * @param end A date object, representing the end of the new appointment. + * @param resourceId An object representing the identifier of a resource associated with the new appointment. + */ + ShowInplaceEditor(start: Date, end: Date, resourceId: string): void; + /** + * Client-side scripting method to insert the specified appointment. + * @param apt An ASPxClientAppointment object representing the client-side appointment. + */ + InsertAppointment(apt: ASPxClientAppointment): void; + /** + * Client-side scripting method to update the specified appointment. + * @param apt An ASPxClientAppointment object representing the client-side appointment. + */ + UpdateAppointment(apt: ASPxClientAppointment): void; + /** + * Client-side scripting method to delete the specified appointment. + * @param apt An ASPxClientAppointment object representing the client-side appointment. + */ + DeleteAppointment(apt: ASPxClientAppointment): void; + /** + * Client-side method that allows retrieving a collection of time intervals displayed by the ASPxScheduler. + */ + GetVisibleIntervals(): ASPxClientTimeInterval[]; + /** + * Changes the container that the ASPxScheduler tooltip belongs to. + * @param container An object that serves as the new container for the pop-up menu. + */ + ChangeToolTipContainer(container: Object): void; + /** + * Changes the container that the ASPxScheduler pop-up menu belongs to. + * @param container An object that serves as the new container for the pop-up menu. + */ + ChangePopupMenuContainer(container: Object): void; + /** + * Returns focus to the form if the ASPxScheduler control is not visible when the reminder fires. + * @param container A DIV object that is located in such a way that it is visible on the page in situations when the ASPxScheduler control is hidden. + */ + ChangeFormContainer(container: Object): void; + /** + * Client-side scripting method that saves appointment modifications and closes the form. + */ + AppointmentFormSave(): void; + /** + * Client-side scripting method that deletes the appointment being edited. + */ + AppointmentFormDelete(): void; + /** + * Client-side scripting method that cancels changes and closes the appointment editing form. + */ + AppointmentFormCancel(): void; + /** + * Client-side scripting method that navigates the scheduler to the date selected in the GotoDate form and closes the form. + */ + GoToDateFormApply(): void; + /** + * Client-side scripting method that cancels changes and closes the GotoDate form. + */ + GoToDateFormCancel(): void; + /** + * Client-side scripting method that cancels changes and closes the form. + */ + InplaceEditFormSave(): void; + /** + * Client-side scripting method that cancels changes and closes the form. + */ + InplaceEditFormCancel(): void; + /** + * Client-side scripting method that invokes the appointment editing form for the appointment being edited in the inplace editor. + */ + InplaceEditFormShowMore(): void; + /** + * Client-side scripting method that closes the Reminder form. + */ + ReminderFormCancel(): void; + /** + * Client-side scripting method that calls the Dismiss method for the selected reminder. + */ + ReminderFormDismiss(): void; + /** + * Client-side scripting method that dismisses all reminders shown in the Reminder form. + */ + ReminderFormDismissAll(): void; + /** + * Client-side scripting method that changes the alert time for the selected reminder to the specified interval. + */ + ReminderFormSnooze(): void; +} +/** + * Represents a client-side equivalent of the SchedulerViewType object. + */ +interface ASPxSchedulerViewType { + /** + * Gets a string representation equivalent of Day enumeration for use in client scripts. + * Value: A string "Day", indicating the DayView. + */ + Day: string; + /** + * Gets a string representation equivalent of WorkWeek enumeration for use in client scripts. + * Value: A string "WorkWeek", indicating the WorkWeekView. + */ + WorkWeek: string; + /** + * Gets a string representation equivalent of Week enumeration for use in client scripts. + * Value: A string "Week", indicating the WeekView. + */ + Week: string; + /** + * Gets a string representation equivalent of Month enumeration for use in client scripts. + * Value: A string "Month", indicating the MonthView. + */ + Month: string; + /** + * Gets a string representation equivalent of Timeline enumeration for use in client scripts. + * Value: A string "Timeline", indicating the TimelineView. + */ + Timeline: string; + /** + * Gets a string representation equivalent of FullWeek enumeration for use in client scripts. + * Value: A string "FullWeek", indicating the FullWeekView. + */ + FullWeek: string; +} +/** + * Represents a client-side equivalent of the SchedulerGroupType enumeration. + */ +interface ASPxSchedulerGroupType { + /** + * Gets a string representation equivalent of None enumeration for use in client scripts. + * Value: A "None" string value. + */ + None: string; + /** + * Gets a string representation equivalent of Date enumeration for use in client scripts. + * Value: A "Date" string value. + */ + Date: string; + /** + * Gets a string representation equivalent of Resource enumeration for use in client scripts. + * Value: A "Resource" string value. + */ + Resource: string; +} +/** + * Represents a client-side equivalent of the AppointmentType enumeration. + */ +interface ASPxAppointmentType { + /** + * Gets a string representation equivalent of Normal enumeration for use in client scripts. + * Value: A "Normal" string value. + */ + Normal: string; + /** + * Gets a string representation equivalent of Pattern enumeration for use in client scripts. + * Value: A "Pattern" string value. + */ + Pattern: string; + /** + * Gets a string representation equivalent of Occurrence enumeration for use in client scripts. + * Value: An "Occurrence" string value. + */ + Occurrence: string; + /** + * Gets a string representation equivalent of ChangedOccurrence enumeration for use in client scripts. + * Value: A "ChangedOccurrence" string value. + */ + ChangedOccurrence: string; + /** + * Gets a string representation equivalent of DeletedOccurrence enumeration for use in client scripts. + * Value: A "DeletedOccurrence" string value. + */ + DeletedOccurrence: string; +} +interface ASPxClientAppointmentDeletingEventHandler { + /** + * A method that will handle the AppointmentDeleting event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A ASPxClientAppointmentDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentDeletingEventArgs): void; +} +/** + * Provides data for the AppointmentDeleting event. + */ +interface ASPxClientAppointmentDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets client IDs of the appointments that are intended to be removed. + * Value: An array of client appointment identifiers, representing appointments passed for deletion. + */ + appointmentIds: Object[]; +} +interface AppointmentClickEventHandler { + /** + * A method that will handle the AppointmentClick event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A AppointmentClickEventArgs object that contains event data. + */ + (source: S, e: AppointmentClickEventArgs): void; +} +/** + * Provides data for the AppointmentDoubleClick events. + */ +interface AppointmentClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the client appointment ID for the appointment being clicked. + * Value: A string, representing the client ID of the appointment. + */ + appointmentId: string; + /** + * Gets the HTML element that the event was triggered on. + * Value: An object containing event data. + */ + htmlElement: Object; + /** + * Gets or sets whether an event is handled, and that default actions are not required. + * Value: true if no default processing is required; otherwise, false. + */ + handled: boolean; +} +/** + * A method that will handle the AppointmentsSelectionChanged event. + */ +interface AppointmentsSelectionEventHandler { + /** + * A method that will handle the AppointmentsSelectionChanged event. + * @param source The ASPxScheduler control which fires the event. + * @param e A AppointmentsSelectionEventArgs object that contains event data. + */ + (source: S, e: AppointmentsSelectionEventArgs): void; +} +/** + * Provides data for the AppointmentsSelectionChanged event. + */ +interface AppointmentsSelectionEventArgs extends ASPxClientEventArgs { + /** + * Gets identifiers of the selected appointments. + * Value: A comma separated list of string values, representing appointment IDs. + */ + appointmentIds: string[]; +} +/** + * A method that will handle the ActiveViewChanging event. + */ +interface ActiveViewChangingEventHandler { + /** + * A method that will handle the ActiveViewChanging event. + * @param source The ASPxClientScheduler control which fires the event. + * @param e An ActiveViewChangingEventArgs object that contains event data + */ + (source: S, e: ActiveViewChangingEventArgs): void; +} +/** + * Provides data for the client-side ActiveViewChanging event. + */ +interface ActiveViewChangingEventArgs extends ASPxClientEventArgs { + /** + * Gets the value of the ActiveView property before modification. + * Value: A SchedulerViewType enumeration. + */ + oldView: ASPxSchedulerViewType; + /** + * Gets the new value of the ActiveView property. + * Value: A string, which is the SchedulerViewType enumeration value. + */ + newView: ASPxSchedulerViewType; + /** + * Gets or sets whether the change of active view should be canceled. + * Value: true to cancel the operation; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the MoreButtonClicked event. + */ +interface MoreButtonClickedEventHandler { + /** + * A method that will handle MoreButtonClicked event. + * @param source The ASPxClientScheduler control which fires the event. + * @param e A MoreButtonClickedEventArgs object that contains event data. + */ + (source: S, e: MoreButtonClickedEventArgs): void; +} +/** + * Provides data for the MoreButtonClicked client-side event. + */ +interface MoreButtonClickedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the Start or End values of the target appointment. + * Value: A DateTime value representing the target appointment's boundary. + */ + targetDateTime: Date; + /** + * Gets the time interval of the cell where the button is located. + * Value: An ASPxClientTimeInterval object representing the time interval of the cell which holds the button. + */ + interval: ASPxClientTimeInterval; + /** + * Gets the resource identifier associated with the cell where the button is located. + * Value: A string, corresponding to ResourceId. + */ + resource: string; + /** + * Gets or sets whether an event is handled. If it is handled, default actions are not required. + * Value: true if no default processing is required; otherwise, false. + */ + handled: boolean; +} +/** + * A method that will handle the MenuItemClicked event. + */ +interface MenuItemClickedEventHandler { + /** + * A method that will handle the MenuItemClicked event. + * @param source The ASPxClientScheduler control which fires the event. + * @param e A MenuItemClickedEventArgs object that contains event data. + */ + (source: S, e: MenuItemClickedEventArgs): void; +} +/** + * Provides data for the MenuItemClicked event. + */ +interface MenuItemClickedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the menu item which is clicked. + * Value: A string, containing the menu item name. + */ + itemName: string; + /** + * Gets or sets whether an event is handled, and that default actions are not required. + * Value: true if no default processing is required; otherwise, false. + */ + handled: boolean; +} +interface AppointmentDragEventHandler { + /** + * + * @param source + * @param e + */ + (source: S, e: ASPxClientAppointmentDragEventArgs): void; +} +/** + * Provides data for the AppointmentDrag event. + */ +interface ASPxClientAppointmentDragEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not appointments can be dropped into the intervals over which they are currently dragged. + * Value: true to allow dropping appointments; otherwise, false. + */ + allow: boolean; + /** + * Gets a mouse event object related to the current drag operation. + * Value: An object providing event properties specific to mouse events. + */ + mouseEvent: Object; + /** + * Provides information about dragged appointments. + * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dragged appointments. + */ + dragInformation: ASPxClientAppointmentDragInfo[]; +} +interface AppointmentDropEventHandler { + /** + * + * @param source + * @param e + */ + (source: S, e: ASPxClientAppointmentDropEventArgs): void; +} +/** + * Provides data for the AppointmentDrop event. + */ +interface ASPxClientAppointmentDropEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value that specifies whether the event is handled, and the default processing is not required. + * Value: true, if if the event is completely handled by custom code and no default processing is required; otherwise, false. + */ + handled: boolean; + /** + * Provides access to an object that enables you to choose an operation to perform. + * Value: An ASPxClientAppointmentOperation object providing methods to perform the required operation. + */ + operation: ASPxClientAppointmentOperation; + /** + * Provides information about dropped appointments. + * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dropped appointments. + */ + dragInformation: ASPxClientAppointmentDragInfo[]; +} +interface AppointmentResizeEventHandler { + /** + * A method that will handle the AppointmentResize event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A ASPxClientAppointmentResizeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentResizeEventArgs): void; +} +/** + * Provides data for the AppointmentResize event. + */ +interface ASPxClientAppointmentResizeEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether default event processing is required. + * Value: true to process an event using only custom code; otherwise, false. + */ + handled: boolean; + /** + * Provides access to an object that enables you to choose an operation to perform. + * Value: An ASPxClientAppointmentOperation object providing methods to perform the required operation. + */ + operation: ASPxClientAppointmentOperation; + /** + * Gets the resized appointment's identifier. + * Value: A string containing an appointment identifier. + */ + appointmentId: string; + /** + * Gets the appointment's interval before resizing. + * Value: An object representing the interval assigned to the appointment. + */ + oldInterval: ASPxClientTimeInterval; + /** + * Gets the appointment's interval after resizing. + * Value: An object representing the interval assigned to the appointment. + */ + newInterval: ASPxClientTimeInterval; +} +interface AppointmentResizingEventHandler { + /** + * + * @param source + * @param e + */ + (source: S, e: ASPxClientAppointmentResizingEventArgs): void; +} +/** + * Provides data for the AppointmentResizing event. + */ +interface ASPxClientAppointmentResizingEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not an appointment can be resized to the new time interval. + * Value: true to allow resizing the appointment; otherwise, false. + */ + allow: boolean; + /** + * Gets a mouse event object related to the current appointment resizing operation. + * Value: An object providing event properties specific to mouse events. + */ + mouseEvent: Object; + /** + * Gets the resized appointment's identifier. + * Value: A string containing an appointment identifier. + */ + appointmentId: string; + /** + * Gets the appointment's interval before resizing. + * Value: An object representing the interval assigned to the appointment. + */ + oldInterval: ASPxClientTimeInterval; + /** + * Gets the appointment's interval after resizing. + * Value: An object representing the interval assigned to the appointment. + */ + newInterval: ASPxClientTimeInterval; +} +/** + * Stores information about an appointment drag operation. + */ +interface ASPxClientAppointmentDragInfo { + /** + * Gets the dragged appointment's identifier. + * Value: A string containing an appointment identifier. + */ + appointmentId: string; + /** + * Gets the appointment's interval before the drag operation. + * Value: An object representing the interval assigned to the appointment. + */ + oldInterval: ASPxClientTimeInterval; + /** + * Gets resources that were associated with the appointment before the drag operation. + * Value: A array of strings containing resource identifiers. + */ + oldResources: string[]; + /** + * Gets the appointment's interval after the drag operation. + * Value: An object representing the interval assigned to the appointment. + */ + newInterval: ASPxClientTimeInterval; + /** + * Gets resources associated with the appointment after the drag operation. + * Value: An array of strings containing resource identifiers. + */ + newResources: string[]; +} +/** + * Contains information about a client tooltip. + */ +interface ASPxClientSchedulerToolTipData { + /** + * Returns the client appointment for which the tooltip is displayed. + */ + GetAppointment(): ASPxClientAppointment; + /** + * Returns the client time interval for which the tooltip is displayed. + */ + GetInterval(): ASPxClientTimeInterval; + /** + * Returns the resources associated with the appointment for which the tooltip is displayed. + */ + GetResources(): Object[]; +} +/** + * A client-side equivalent of the ASPxSchedulerToolTipBase control. + */ +interface ASPxClientToolTipBase { + /** + * Returns the value that indicates whether or not the tooltip can be displayed. + */ + CanShowToolTip(): boolean; + /** + * Ends updating the tooltip content. + * @param toolTipData An ASPxClientSchedulerToolTipData object providing data required to update the tooltip content. + */ + FinalizeUpdate(toolTipData: ASPxClientSchedulerToolTipData): void; + /** + * Updates the tooltip content. + * @param toolTipData An ASPxClientSchedulerToolTipData object providing data required to update the tooltip content. + */ + Update(toolTipData: ASPxClientSchedulerToolTipData): void; + /** + * Closes the tooltip. + */ + Close(): void; + /** + * + * @param bounds + */ + CalculatePosition(bounds: Object): ASPxClientPoint; + /** + * Displays the Appointment Menu in the position of the tooltip. + * @param eventObject An object containing information about the event on which the menu is displayed. + */ + ShowAppointmentMenu(eventObject: Object): void; + /** + * Displays the View Menu in the position of the tooltip. + * @param eventObject An object containing information about the event on which the menu is displayed. + */ + ShowViewMenu(eventObject: Object): void; + /** + * Returns the string representation of the specified interval. + * @param interval An ASPxClientTimeInterval object to convert. + */ + ConvertIntervalToString(interval: ASPxClientTimeInterval): string; +} +/** + * Represents the client-side equivalent of the ASPxSpellChecker class. + */ +interface ASPxClientSpellChecker extends ASPxClientControl { + /** + * Client-side event that occurs before the spell check starts. + */ + BeforeCheck: ASPxClientEvent>; + /** + * Client-side event that occurs before a message box informing about process completion is shown. + */ + CheckCompleteFormShowing: ASPxClientEvent>; + /** + * Client-side event that occurs when a spell check is finished. + */ + AfterCheck: ASPxClientEvent>; + /** + * Occurs after a word is changed in a checked text. + */ + WordChanged: ASPxClientEvent>; + /** + * Starts the spelling check of the text contained within the element specified by the CheckedElementID value. + */ + Check(): void; + /** + * Starts checking contents of the specified element. + * @param element An object representing the element being checked. + */ + CheckElement(element: Object): void; + /** + * Starts checking contents of the specified element. + * @param id A string representing the identifier of the element being checked. + */ + CheckElementById(id: string): void; + /** + * Starts checking the contents of controls in the specified container. + * @param containerElement An object representing a control which contains elements being checked. + */ + CheckElementsInContainer(containerElement: Object): void; + /** + * Starts checking the contents of controls in the specified container. + * @param containerId A string, specifying the control's identifier. + */ + CheckElementsInContainerById(containerId: string): void; +} +/** + * Represents an object that will handle the client-side BeforeCheck event. + */ +interface ASPxClientBeforeCheckEventHandler { + /** + * A method that will handle the BeforeCheck event. + * @param source The ASPxClientSpellChecker control which fires the event. + * @param e A ASPxClientSpellCheckerBeforeCheckEventArgs object that contains event data + */ + (source: S, e: ASPxClientSpellCheckerBeforeCheckEventArgs): void; +} +/** + * Provides data for an event that occurs before a spelling check is started. Represents the client-side equivalent of the BeforeCheckEventArgs class. + */ +interface ASPxClientSpellCheckerBeforeCheckEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the programmatic identifier assigned to the control which is going to be checked. + * Value: A string, containing the control's identifier. + */ + controlId: string; +} +/** + * Represents an object that will handle the client-side AfterCheck event. + */ +interface ASPxClientAfterCheckEventHandler { + /** + * A method that will handle the AfterCheck event. + * @param source The ASPxClientSpellChecker control which fires the event. + * @param e A ASPxClientSpellCheckerAfterCheckEventArgs object that contains event data + */ + (source: S, e: ASPxClientSpellCheckerAfterCheckEventArgs): void; +} +/** + * Provides data for the client event that occurs after a spelling check is complete. + */ +interface ASPxClientSpellCheckerAfterCheckEventArgs extends ASPxClientEventArgs { + /** + * Gets the programmatic identifier assigned to the control which has been checked. + * Value: A string, containing the control's identifier. + */ + controlId: string; + /** + * Gets the text that has been checked. + * Value: A string, containing checked text. + */ + checkedText: string; + reason: string; +} +/** + * Represents an object that will handle the client-side WordChanged event. + */ +interface ASPxClientWordChangedEventHandler { + /** + * A method that will handle the AfterCheck event. + * @param source The event source. + * @param e An ASPxClientSpellCheckerAfterCheckEventArgs object which contains event data. + */ + (source: S, e: ASPxClientSpellCheckerAfterCheckEventArgs): void; +} +/** + * A method that will handle the CustomCommandExecuted event. + */ +interface ASPxClientSpreadsheetCustomCommandExecutedEventHandler { + /** + * A method that will handle the CustomCommandExecuted event. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e A ASPxClientSpreadsheetCustomCommandExecutedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetCustomCommandExecutedEventArgs): void; +} +/** + * Provides data for the CustomCommandExecuted event. + */ +interface ASPxClientSpreadsheetCustomCommandExecutedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: string; + item: ASPxClientRibbonItem; +} +/** + * A method that will handle the DocumentChanged event. + */ +interface ASPxClientSpreadsheetDocumentChangedEventHandler { + /** + * A method that will handle the DocumentChanged event. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e A ASPxClientSpreadsheetDocumentChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetDocumentChangedEventArgs): void; +} +/** + * Provides data for the DocumentChanged event. + */ +interface ASPxClientSpreadsheetDocumentChangedEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the EndSynchronization events. + */ +interface ASPxClientSpreadsheetSynchronizationEventHandler { + /** + * A method that will handle the EndSynchronization events. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e A ASPxClientSpreadsheetSynchronizationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetSynchronizationEventArgs): void; +} +/** + * Provides data for the EndSynchronization events. + */ +interface ASPxClientSpreadsheetSynchronizationEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the HyperlinkClick event. + */ +interface ASPxClientSpreadsheetHyperlinkClickEventHandler { + /** + * A method that will handle the HyperlinkClick event. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e An ASPxClientSpreadsheetHyperlinkClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetHyperlinkClickEventArgs): void; +} +/** + * Provides data for the HyperlinkClick event. + */ +interface ASPxClientSpreadsheetHyperlinkClickEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value that specifies whether the event is handled, and the default processing is not required. + * Value: true, if if the event is completely handled by custom code and no default processing is required; otherwise, false. + */ + handled: boolean; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; + /** + * Gets a value identifying the clicked hyperlink type. + * Value: One of the values. + */ + hyperlinkType: ASPxClientOfficeDocumentLinkType; + /** + * Gets the clicked link's URI. + * Value: A sting value specifying the link's URI. + */ + targetUri: string; +} +/** + * A client-side equivalent of the ASPxSpreadsheet object. + */ +interface ASPxClientSpreadsheet extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientSpreadsheet. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client when a selection is changed in the ASPxSpreadsheet. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs after a custom command has been executed on the client side. + */ + CustomCommandExecuted: ASPxClientEvent>; + /** + * Fires if any change is made to the Spreadsheet's document on the client. + */ + DocumentChanged: ASPxClientEvent>; + /** + * Fires after a client change has been made to the document and the client-server synchronization starts to apply the change on the server. + */ + BeginSynchronization: ASPxClientEvent>; + /** + * Fires after a document change has been applied to the server and server and client document models have been synchronized. + */ + EndSynchronization: ASPxClientEvent>; + /** + * Occurs on the client side after a hyperlink is clicked within the Spreadsheet's document. + */ + HyperlinkClick: ASPxClientEvent>; + /** + * Sets input focus to the Spreadsheet. + */ + Focus(): void; + /** + * Gets access to the client ribbon object. + */ + GetRibbon(): ASPxClientRibbon; + /** + * Enables you to switch the full-screen mode of the Spreadsheet. + * @param fullscreen true to activate full-screen mode; false to deactivate full-screen mode. + */ + SetFullscreenMode(fullscreen: boolean): void; + /** + * Returns the current selection made in a Spreadsheet. + */ + GetSelection(): ASPxClientSpreadsheetSelection; + /** + * Indicates whether any unsaved changes are contained in the current document. + */ + HasUnsavedChanges(): boolean; + /** + * Gets the value of the specified cell. + * @param colModelIndex An integer value specifying the cell's column index. + * @param rowModelIndex An integer value specifying the cell's row index. + */ + GetCellValue(colModelIndex: number, rowModelIndex: number): Object; + /** + * Gets the value of the currently active cell. + */ + GetActiveCellValue(): Object; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side DocumentCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side DocumentCallback event. + */ + PerformDocumentCallback(parameter: string): void; + /** + * Reconnects the Spreadsheet to an external ribbon. + */ + ReconnectToExternalRibbon(): void; +} +/** + * A method that will handle the client SelectionChanged event. + */ +interface ASPxClientSpreadsheetSelectionChangedEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientSpreadsheetSelectionChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetSelectionChangedEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientSpreadsheetSelectionChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets an object that determines the currently selected region within the Spreadsheet. + * Value: A object defining the current selection. + */ + selection: ASPxClientSpreadsheetSelection; +} +/** + * Represents the selection in the Spreadsheet. + */ +interface ASPxClientSpreadsheetSelection { + /** + * Gets the column index of the active cell. + * Value: An integer value specifying the active cell column index. + */ + activeCellColumnIndex: number; + /** + * Gets the row index of the active cell. + * Value: An integer value specifying the active cell row index. + */ + activeCellRowIndex: number; + /** + * Gets the index of the selection's left column. + * Value: An integer value specifying the index of the left column within the selection. + */ + leftColumnIndex: number; + /** + * Gets the index of the selection's top row. + * Value: An integer value specifying the index of the top row within the selection. + */ + topRowIndex: number; + /** + * Gets the index of the selection's right column. + * Value: An integer value specifying the index of the right column within the selection. + */ + rightColumnIndex: number; + /** + * Gets the index of the selection's bottom row. + * Value: An integer value specifying the index of the bottom row within the selection. + */ + bottomRowIndex: number; +} +/** + * Represents the client ASPxTreeList. + */ +interface ASPxClientTreeList extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientTreeList. + */ + CallbackError: ASPxClientEvent>; + /** + * Enables you to display a context menu. + */ + ContextMenu: ASPxClientEvent>; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires before the focused node has been changed. + */ + NodeFocusing: ASPxClientEvent>; + /** + * Fires in response to changing node focus. + */ + FocusedNodeChanged: ASPxClientEvent>; + /** + * Fires after the selection has been changed via end-user interaction. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Fires after the Customization Window has been closed. + */ + CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Fires after the callback has been processed in the CustomDataCallback event handler. + */ + CustomDataCallback: ASPxClientEvent>; + /** + * Fires on the client when a node is clicked. + */ + NodeClick: ASPxClientEvent>; + /** + * Fires on the client when a node is double clicked. + */ + NodeDblClick: ASPxClientEvent>; + /** + * Fires before a node is expanded. + */ + NodeExpanding: ASPxClientEvent>; + /** + * Fires before a node is collapsed. + */ + NodeCollapsing: ASPxClientEvent>; + /** + * Occurs before a node is dragged by an end-user. + */ + StartDragNode: ASPxClientEvent>; + /** + * Occurs after a node drag and drop operation is completed. + */ + EndDragNode: ASPxClientEvent>; + /** + * Enables you to prevent columns from being resized. + */ + ColumnResizing: ASPxClientEvent>; + /** + * Occurs after a column's width has been changed by an end-user. + */ + ColumnResized: ASPxClientEvent>; + /** + * Sets input focus to the ASPxTreeList. + */ + Focus(): void; + /** + * Gets the Popup Edit Form. + */ + GetPopupEditForm(): ASPxClientPopupControl; + /** + * Returns the focused node's key value. + */ + GetFocusedNodeKey(): string; + /** + * Moves focus to the specified node. + * @param key A String value that uniquely identifies the node. + */ + SetFocusedNodeKey(key: string): void; + /** + * Indicates whether the specified node is selected. + * @param nodeKey A String value that identifies the node by its key value. + */ + IsNodeSelected(nodeKey: string): any; + /** + * Selects the specified node. + * @param nodeKey A string value that identifies the node. + */ + SelectNode(nodeKey: string): void; + /** + * Selects or deselects the specified node. + * @param nodeKey A string value that identifies the node. + * @param state true to select the node; otherwise, false. + */ + SelectNode(nodeKey: string, state: boolean): void; + /** + * Obtains key values of selected nodes that are displayed within the current page. + */ + GetVisibleSelectedNodeKeys(): string[]; + /** + * Indicates whether the Customization Window is displayed. + */ + IsCustomizationWindowVisible(): boolean; + /** + * Invokes the Customization Window. + */ + ShowCustomizationWindow(): void; + /** + * Invokes the Customization Window and displays it over the specified HTML element. + * @param htmlElement An object that specifies the HTML element relative to whose position the customization window is invoked. + */ + ShowCustomizationWindow(htmlElement: Object): void; + /** + * Closes the Customization Window. + */ + HideCustomizationWindow(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCustomCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + */ + PerformCustomDataCallback(arg: string): void; + /** + * Obtains specified data source field values within a specified node, and submits them to the specified JavaScript function. + * @param nodeKey A string value that identifies the node. + * @param fieldNames A string value that contains the names of data source fields whose values within the specified node are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetNodeValues(nodeKey: string, fieldNames: string, onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within a specified node, and submits them to the specified JavaScript function. + * @param nodeKey A string value that identifies the node. + * @param fieldNames The names of data source fields whose values within the specified node are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetNodeValues(nodeKey: string, fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within nodes that are displayed within the current page, and submits them to the specified JavaScript function. + * @param fieldNames A string value that contains the names of data source fields whose values within visible nodes are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetVisibleNodeValues(fieldNames: string, onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within nodes that are displayed within the current page, and submits them to the specified JavaScript function. + * @param fieldNames The names of data source fields whose values within visible nodes are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetVisibleNodeValues(fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames A string value that contains the names of data source fields whose values within selected nodes are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetSelectedNodeValues(fieldNames: string, onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames The names of data source fields whose values within selected nodes are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetSelectedNodeValues(fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames A string value that contains the names of data source fields whose values within selected nodes are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + * @param visibleOnly true to return values within selected nodes that are displayed within the current page; false to return values within all selected nodes. + */ + GetSelectedNodeValues(fieldNames: string, onCallback: ASPxClientTreeListValuesCallback, visibleOnly: boolean): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames The names of data source fields whose values within selected nodes are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + * @param visibleOnly true to return values within selected nodes that are displayed within the current page; false to return values within all selected nodes. + */ + GetSelectedNodeValues(fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback, visibleOnly: boolean): void; + /** + * Selects the specified page. + * @param index An integer value that specifies the active page's index. + */ + GoToPage(index: number): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the ASPxTreeList's data is divided. + */ + GetPageCount(): number; + /** + * Returns the specified node's state. + * @param nodeKey A String value that identifies the node. + */ + GetNodeState(nodeKey: string): string; + /** + * Expands all nodes. + */ + ExpandAll(): void; + /** + * Collapses all Node. + */ + CollapseAll(): void; + /** + * Expands the specified node preserving the collapsed state of child nodes. + * @param key A String value that uniquely identifies the node. + */ + ExpandNode(key: string): void; + /** + * Collapses the specified node preserving the expanded state of child nodes. + * @param key A String value that uniquely identifies the node. + */ + CollapseNode(key: string): void; + /** + * Obtains key values of nodes that are displayed within the current page. + */ + GetVisibleNodeKeys(): string[]; + /** + * Returns an HTML table row that represents the specified node. + * @param nodeKey A string value that identifies the node. + */ + GetNodeHtmlElement(nodeKey: string): Object; + /** + * Returns the number of visible columns within the client ASPxTreeList. + */ + GetVisibleColumnCount(): number; + /** + * Returns the number of columns within the client ASPxTreeList. + */ + GetColumnCount(): number; + /** + * Returns the column located at the specified position within the Columns collection. + * @param index An integer value that identifies the column within the collection (the column's Index property value). + */ + GetColumnByIndex(index: number): ASPxClientTreeListColumn; + /** + * Returns the column with the specified name. + * @param name A string value that specifies the column's name (the column's Name property value). + */ + GetColumnByName(name: string): ASPxClientTreeListColumn; + /** + * Returns the client column which is bound to the specified data source field. + * @param fieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). + */ + GetColumnByFieldName(fieldName: string): ASPxClientTreeListColumn; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + SortBy(columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + */ + SortBy(columnIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param nameOrFieldName A String value that specifies the column's name or field name. + */ + SortBy(nameOrFieldName: string): void; + /** + * Sorts data by the specified data column's values. + * @param nameOrFieldName A String value that specifies the column's name or field name. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + */ + SortBy(nameOrFieldName: string, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param nameOrFieldName A String value that specifies the column's name or field name. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(nameOrFieldName: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column. + */ + SortBy(column: ASPxClientTreeListColumn): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + */ + SortBy(column: ASPxClientTreeListColumn, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(column: ASPxClientTreeListColumn, sortOrder: string, reset: boolean): void; + /** + * Switches the ASPxTreeList to edit mode. + * @param nodeKey A string value that identifies the node by its key value. + */ + StartEdit(nodeKey: string): void; + /** + * Saves all the changes made and switches the ASPxTreeList to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the ASPxTreeList to browse mode. + */ + CancelEdit(): void; + /** + * Indicates whether the ASPxTreeList is in edit mode. + */ + IsEditing(): boolean; + /** + * Gets the key value of the node currently being edited. + */ + GetEditingNodeKey(): string; + /** + * Moves the specified node to a new position. + * @param nodeKey A string value that identifies the target node by its key value. + * @param parentNodeKey A string value that identifies the node to whose child collection the target node is moved. An empty string to display the target node within the root. + */ + MoveNode(nodeKey: string, parentNodeKey: string): void; + /** + * Deletes the specified node. + * @param nodeKey A string value that identifies the node. + */ + DeleteNode(nodeKey: string): void; + /** + * Switches the ASPxTreeList to edit mode and allows new root node values to be edited. + */ + StartEditNewNode(): void; + /** + * Switches the ASPxTreeList to edit mode and allows new node values to be edited. + * @param parentNodeKey A String value that identifies the parent node, which owns a new node. + */ + StartEditNewNode(parentNodeKey: string): void; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + */ + GetEditor(column: ASPxClientTreeListColumn): Object; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that identifies the column by its position within the column collection. + */ + GetEditor(columnIndex: number): Object; + /** + * Returns the editor used to edit the specified column's values. + * @param columnNameOrFieldName A String value that identifies the column by its name or field name. + */ + GetEditor(columnNameOrFieldName: string): Object; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + */ + GetEditValue(column: ASPxClientTreeListColumn): Object; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column by its index within the ASPxTreeList's column collection. + */ + GetEditValue(columnIndex: number): Object; + /** + * Returns the value of the specified edit cell. + * @param columnNameOrFieldName A String value that identifies the column by its name or field name. + */ + GetEditValue(columnNameOrFieldName: string): Object; + /** + * Sets the value of the specified edit cell. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + * @param value An object that specifies the edit cell's new value. + */ + SetEditValue(column: ASPxClientTreeListColumn, value: Object): void; + /** + * Sets the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column by its index within the ASPxTreeList's column collection. + * @param value An object that specifies the edit cell's new value. + */ + SetEditValue(columnIndex: number, value: Object): void; + /** + * Sets the value of the specified edit cell. + * @param columnNameOrFieldName A String value that identifies the column by its name or field name. + * @param value An object that specifies the edit cell's new value. + */ + SetEditValue(columnNameOrFieldName: string, value: Object): void; + /** + * Moves focus to the specified editor within the edited node. + * @param column A ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + */ + FocusEditor(column: ASPxClientTreeListColumn): void; + /** + * Moves focus to the specified editor within the edited node. + * @param columnIndex An integer value that identifies the data column. + */ + FocusEditor(columnIndex: number): void; + /** + * Moves focus to the specified editor within the edited node. + * @param columnNameOrFieldName A String value that specifies the column's name or field name. + */ + FocusEditor(columnNameOrFieldName: string): void; + /** + * Scrolls the tree list so that the specified node becomes visible. + * @param nodeKey An integer value that specifies the node index within the tree list's client item list. + */ + MakeNodeVisible(nodeKey: string): void; + /** + * Returns the current vertical scroll position of the tree list's content. + */ + GetVerticalScrollPosition(): number; + /** + * Returns the current horizontal scroll position of the tree list's content. + */ + GetHorizontalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the tree list's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Specifies the horizontal scroll position for the tree list's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorizontalScrollPosition(position: number): void; +} +/** + * Represents a client column. + */ +interface ASPxClientTreeListColumn { + /** + * Gets the column's position within the collection. + * Value: An integer zero-bazed index that specifies the column's position within the collection. + */ + index: number; + /** + * Gets the name that uniquely identifies the column. + * Value: A string value assigned to the column's Name property. + */ + name: string; + /** + * Gets the name of the database field assigned to the current column. + * Value: A String value that specifies the name of a data field. + */ + fieldName: string; +} +/** + * Provides data for the CustomDataCallback event. + */ +interface ASPxClientTreeListCustomDataCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets the information that has been collected on the client-side and sent to the server-side CustomDataCallback event. + * Value: A string value that represents the information that has been collected on the client-side and sent to the server-side CustomDataCallback event. + */ + arg: string; + /** + * Gets the information passed from the server-side CustomDataCallback event. + * Value: An object that represents the information passed from the server-side CustomDataCallback event. + */ + result: Object; +} +/** + * A method that will handle the CustomDataCallback event. + */ +interface ASPxClientTreeListCustomDataCallbackEventHandler { + /** + * A method that will handle the CustomDataCallback event. + * @param source The event source. + * @param e An ASPxClientTreeListCustomDataCallbackEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListCustomDataCallbackEventArgs): void; +} +/** + * Provides data for the NodeDblClick events. + */ +interface ASPxClientTreeListNodeEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed node's key value. + * Value: A String value that identifies the processed node. + */ + nodeKey: string; + /** + * Provides access to the parameters associated with the NodeDblClick events. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the NodeDblClick event. + */ +interface ASPxClientTreeListNodeEventHandler { + /** + * A method that will handle the NodeDblClick event. + * @param source The event source. + * @param e An ASPxClientTreeListNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListNodeEventArgs): void; +} +/** + * Provides data for the ContextMenu event. + */ +interface ASPxClientTreeListContextMenuEventArgs extends ASPxClientEventArgs { + /** + * Identifies which tree list element has been right-clicked. + * Value: A string value that identifies which tree list element ('Header' or 'Node') has been right-clicked. + */ + objectType: string; + /** + * Gets a value that identifies the right-clicked object. + * Value: The right-clicked object's identifier. + */ + objectKey: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that relates to the processed event. + */ + htmlEvent: Object; + /** + * Gets or sets whether to invoke the browser's context menu. + * Value: true to hide the browser's context menu; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the ContextMenu event. + */ +interface ASPxClientTreeListContextMenuEventHandler { + /** + * A method that will handle the ContextMenu event. + * @param source The event sender. + * @param e An ASPxClientTreeListContextMenuEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListContextMenuEventArgs): void; +} +/** + * Provides data for the StartDragNode event. + */ +interface ASPxClientTreeListStartDragNodeEventArgs extends ASPxClientTreeListNodeEventArgs { + /** + * Gets an array of targets where a node can be dragged. + * Value: An array of objects that represent targets for the dragged node. + */ + targets: Object[]; +} +/** + * A method that will handle the StartDragNode event. + */ +interface ASPxClientTreeListStartDragNodeEventHandler { + /** + * A method that will handle the StartDragNode event. + * @param source The event source. + * @param e An ASPxClientTreeListStartDragNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListStartDragNodeEventArgs): void; +} +/** + * Provides data for the EndDragNode event. + */ +interface ASPxClientTreeListEndDragNodeEventArgs extends ASPxClientTreeListNodeEventArgs { + /** + * Gets the target element. + * Value: An object that represents the target element to which the dragged node has been dropped. + */ + targetElement: Object; +} +/** + * A method that will handle the EndDragNode event. + */ +interface ASPxClientTreeListEndDragNodeEventHandler { + /** + * A method that will handle the EndDragNode event. + * @param source The event source. + * @param e An ASPxClientTreeListEndDragNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListEndDragNodeEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientTreeListCustomButtonEventArgs extends ASPxClientEventArgs { + /** + * Gets the key value of the node whose custom button has been clicked. + * Value: A string value that uniquely identifies the node whose custom button has been clicked. + */ + nodeKey: string; + /** + * Gets the button's index. + * Value: An integer value that specifies the button's position within the CustomButtons collection. + */ + buttonIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A String value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientTreeListCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. + * @param e An ASPxClientTreeListCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListCustomButtonEventArgs): void; +} +/** + * Represents a JavaScript function which receives the list of row values when a specific client method (such as the GetSelectedNodeValues) is called. + */ +interface ASPxClientTreeListValuesCallback { + /** + * A JavaScript function which receives the list of row values when a specific client method (such as the GetSelectedNodeValues) is called. + * @param result An object that represents the list of row values received from the server. + */ + (result: Object): void; +} +/** + * Provides data for the ColumnResizing event. + */ +interface ASPxClientTreeListColumnResizingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client column. + * Value: An object that is the processed column. + */ + column: ASPxClientTreeListColumn; +} +/** + * A method that will handle the client ColumnResizing event. + */ +interface ASPxClientTreeListColumnResizingEventHandler { + /** + * A method that will handle the ColumnResizing event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientTreeListColumnResizingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListColumnResizingEventArgs): void; +} +/** + * Provides data for the ColumnResized event. + */ +interface ASPxClientTreeListColumnResizedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the processed client column. + * Value: An object that is the processed column. + */ + column: ASPxClientTreeListColumn; +} +/** + * A method that will handle the client ColumnResized event. + */ +interface ASPxClientTreeListColumnResizedEventHandler { + /** + * A method that will handle the ColumnResized event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientTreeListColumnResizedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListColumnResizedEventArgs): void; +} +/** + * Represents a client-side equivalent of the BootstrapAccordion control. + */ +interface BootstrapClientAccordion extends ASPxClientNavBar { +} +/** + * Represents a client-side equivalent of the BootstrapButton control. + */ +interface BootstrapClientButton extends ASPxClientButton { + /** + * Returns the text displayed within the button. + */ + GetText(): string; + /** + * Sets the text to be displayed within the button. + * @param value A string value specifying the text to be displayed within the button. + */ + SetText(value: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapCalendar control. + */ +interface BootstrapClientCalendar extends ASPxClientCalendar { +} +/** + * Represents a client-side equivalent of the BootstrapCheckBox control. + */ +interface BootstrapClientCheckBox extends ASPxClientEdit { + /** + * Occurs on the client side when the editor's checked state is changed. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Returns a value indicating whether the check box editor is checked. + */ + GetChecked(): boolean; + /** + * Sets a value which specifies the checked status of the check box editor. + * @param isChecked + */ + SetChecked(isChecked: boolean): void; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Returns a value which specifies a check box checked state. + */ + GetCheckState(): string; + /** + * Sets a value specifying the state of a check box. + * @param checkState + */ + SetCheckState(checkState: string): void; + /** + * Sets the text to be displayed within the editor. + * @param text + */ + SetText(text: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapRadioButton control. + */ +interface BootstrapClientRadioButton extends BootstrapClientCheckBox { +} +/** + * Represents a client-side equivalent of the BootstrapComboBox control. + */ +interface BootstrapClientComboBox extends ASPxClientComboBox { +} +/** + * Represents a client-side equivalent of the BootstrapDateEdit control. + */ +interface BootstrapClientDateEdit extends ASPxClientDateEdit { +} +/** + * Represents a client-side equivalent of the BootstrapDropDownEdit control. + */ +interface BootstrapClientDropDownEdit extends ASPxClientDropDownEdit { +} +/** + * Represents a client-side equivalent of the BootstrapFormLayout control. + */ +interface BootstrapClientFormLayout extends ASPxClientFormLayout { +} +/** + * Represents a client-side equivalent of the BootstrapGridView control. + */ +interface BootstrapClientGridView extends ASPxClientGridView { +} +/** + * Represents a client-side equivalent of the BootstrapHyperLink control. + */ +interface BootstrapClientHyperLink extends ASPxClientHyperLink { +} +/** + * Represents a client-side equivalent of the BootstrapListBox control. + */ +interface BootstrapClientListBox extends ASPxClientListBox { +} +interface BootstrapClientCheckBoxList extends ASPxClientCheckBoxList { +} +interface BootstrapClientRadioButtonList extends ASPxClientRadioButtonList { +} +/** + * Represents a client-side equivalent of the BootstrapMenu control. + */ +interface BootstrapClientMenu extends ASPxClientMenu { +} +/** + * Represents a client-side equivalent of the BootstrapPopupControl control. + */ +interface BootstrapClientPopupControl extends ASPxClientPopupControl { +} +/** + * Represents a client-side equivalent of the BootstrapPopupMenu control. + */ +interface BootstrapClientPopupMenu extends ASPxClientPopupMenu { +} +/** + * Represents a client-side equivalent of the BootstrapProgressBar control. + */ +interface BootstrapClientProgressBar extends ASPxClientProgressBar { +} +/** + * Represents a client-side equivalent of the BootstrapSpinEdit control. + */ +interface BootstrapClientSpinEdit extends ASPxClientSpinEdit { +} +/** + * Represents a client-side equivalent of the BootstrapTabControl control. + */ +interface BootstrapClientTabControl extends ASPxClientTabControl { +} +/** + * Represents a client-side equivalent of the BootstrapPageControl control. + */ +interface BootstrapClientPageControl extends ASPxClientPageControl { +} +/** + * Represents a client-side equivalent of the BootstrapTextBox control. + */ +interface BootstrapClientTextBox extends ASPxClientTextBox { +} +/** + * Represents a client-side equivalent of the BootstrapMemo control. + */ +interface BootstrapClientMemo extends ASPxClientMemo { +} +/** + * Represents a client-side equivalent of the BootstrapButtonEdit control. + */ +interface BootstrapClientButtonEdit extends ASPxClientButtonEdit { +} +/** + * Represents a client-side equivalent of the BootstrapTreeView control. + */ +interface BootstrapClientTreeView extends ASPxClientTreeView { +} +/** + * A client-side counterpart of the Calendar and CalendarFor extensions. + */ +interface MVCxClientCalendar extends ASPxClientCalendar { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * A client-side counterpart of the CallbackPanel extension. + */ +interface MVCxClientCallbackPanel extends ASPxClientCallbackPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the Callback Panel by processing the passed information on the server, in an Action specified by the Callback Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the Callback Panel by processing the passed information on the server, in an Action specified by the Callback Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the CardView extension. + */ +interface MVCxClientCardView extends ASPxClientCardView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the CardView by processing the passed information on the server, in an Action specified via the CardView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CardView's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the CardView by processing the passed information on the server, in an Action specified via the CardView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CardView's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the CardView's CustomDataActionRouteValues property, and then process the returned result in the specified client function. This method does not update the CardView. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback A ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(data: Object, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * + * @param args + * @param onSuccess + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback An ASPxClientCardViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientCardViewValuesCallback): void; +} +/** + * A client-side counterpart of the Chart extension. + */ +interface MVCxClientChart extends ASPxClientWebChartControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update a Chart by processing the passed information on the server, in an Action specified via the Chart's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update a Chart by processing the passed information on the server, in an Action specified via the Chart's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the ComboBox and ComboBoxFor extensions. + */ +interface MVCxClientComboBox extends ASPxClientComboBox { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the ComboBox by processing the passed information on the server, in an Action specified by the ComboBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the ComboBox by processing the passed information on the server, in an Action specified by the ComboBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the DataView extension. + */ +interface MVCxClientDataView extends ASPxClientDataView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the DataView by processing the passed information on the server, in an Action specified via the DataView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the DataView by processing the passed information on the server, in an Action specified via the DataView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the DateEdit extension. + */ +interface MVCxClientDateEdit extends ASPxClientDateEdit { +} +/** + * A client-side counterpart of the DockManager extension. + */ +interface MVCxClientDockManager extends ASPxClientDockManager { + /** + * Sends a callback with a parameter to update the DockManager by processing the passed information on the server, in an Action specified by the DockManager's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the DockManager by processing the passed information on the server, in an Action specified by the DockManager's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the DockPanel extension. + */ +interface MVCxClientDockPanel extends ASPxClientDockPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the DockPanel by processing the passed information on the server, in an Action specified by the DockPanel's DockPanelSettings.CallbackRouteValues) property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the DockPanel by processing the passed information on the server, in an Action specified by the DockPanel's DockPanelSettings.CallbackRouteValues) property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side WindowCallback event, passing the specified argument to it. + * @param parameter A string value that is any information that needs to be sent to the server-side WindowCallback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the FileManager extension. + */ +interface MVCxClientFileManager extends ASPxClientFileManager { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the FileManager by processing the passed information on the server, in an Action specified via the extension's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the file manager's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param data A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the GridView extension. + */ +interface MVCxClientGridView extends ASPxClientGridView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the GridView by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the GridView by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the GridView's CustomDataActionRouteValues property, and then process the returned result in the specified client function. This method does not update the GridView. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(data: Object, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * + * @param args + * @param onSuccess + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientGridViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientGridViewValuesCallback): void; +} +/** + * A client-side counterpart of the HtmlEditor extension. + */ +interface MVCxClientHtmlEditor extends ASPxClientHtmlEditor { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the HtmlEditor's CustomDataCallback event on the client. This method does not update the HtmlEditor. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + */ + PerformDataCallback(data: Object): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the HtmlEditor's CustomDataCallback event on the client. This method does not update the HtmlEditor. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback An ASPxClientDataCallback object that is the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(data: Object, onCallback: ASPxClientDataCallback): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientDataCallback object that represents the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; +} +/** + * A client-side counterpart of the ImageGallery extension. + */ +interface MVCxClientImageGallery extends ASPxClientImageGallery { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the ImageGallery by processing the passed information on the server, in an Action specified via the ImageGallery's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the ImageGallery by processing the passed information on the server, in an Action specified via the ImageGallery's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the ListBox and ListBoxFor extensions. + */ +interface MVCxClientListBox extends ASPxClientListBox { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the ListBox by processing the passed information on the server, in an Action specified by the ListBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the ListBox by processing the passed information on the server, in an Action specified by the ListBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server, and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the NavBar extension. + */ +interface MVCxClientNavBar extends ASPxClientNavBar { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * A client-side counterpart of the PivotGrid extension. + */ +interface MVCxClientPivotGrid extends ASPxClientPivotGrid { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the PivotGrid by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the PivotGrid by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Passes PivotGrid callback parameters to the specified object. + * @param obj An object that receives PivotGrid callback parameters. + */ + FillStateObject(obj: Object): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the PopupControl extension. + */ +interface MVCxClientPopupControl extends ASPxClientPopupControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the PopupControl by processing the passed information on the server, in an Action specified via the PopupControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the PopupControl by processing the passed information on the server, in an Action specified via the PopupControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameters to update the popup window by processing the related popup window and the passed information on the server, in an Action specified by the PopupControl's CallbackRouteValues property. + * @param window A ASPxClientPopupWindow object identifying the processed popup window. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformWindowCallback(window: ASPxClientPopupWindow, data: Object): void; + /** + * + * @param window + * @param parameter + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void; + /** + * Sends a callback with parameters to update the popup window by processing the related popup window and the passed information on the server. + * @param window A ASPxClientPopupWindow object identifying the processed popup window. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side WindowCallback event, passing the specified argument to it. + * @param parameter A string value that is any information that needs to be sent to the server-side WindowCallback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side equivalent of the MVCxDocumentViewer class. + */ +interface MVCxClientDocumentViewer extends ASPxClientDocumentViewer { + /** + * Occurs before performing a document export request. + */ + BeforeExportRequest: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * Obsolete. Use the MVCxClientDocumentViewer class instead. + */ +interface MVCxClientReportViewer extends ASPxClientReportViewer { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs before performing a document export request. + */ + BeforeExportRequest: ASPxClientEvent>; +} +/** + * A method that will handle the BeforeExportRequest event. + */ +interface MVCxClientBeforeExportRequestEventHandler { + /** + * A method that will handle the BeforeExportRequest event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientBeforeExportRequestEventArgs object that contains event data. + */ + (source: S, e: MVCxClientBeforeExportRequestEventArgs): void; +} +/** + * Provides data for client BeforeExportRequest events. + */ +interface MVCxClientBeforeExportRequestEventArgs extends ASPxClientEventArgs { + /** + * Gets an object containing specific information (if any, as name/value pairs) that should be passed as a request parameter from the client to the server side for further processing. + * Value: A hash table object containing named values to be passed from the client to the server side via request parameters. + */ + customArgs: Object; +} +/** + * A client-side equivalent of the MVCxReportDesigner class. + */ +interface MVCxClientReportDesigner extends ASPxClientReportDesigner { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after executing the Save command on the client. + */ + SaveCommandExecuted: ASPxClientEvent>; + /** + * Sends a callback to the server with the specified argument. + * @param arg A Object value, specifying the callback argument. + */ + PerformCallback(arg: Object): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server with the specified argument. + * @param arg A String value, specifying the callback argument. + */ + PerformCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; +} +/** + * A method that will handle the SaveCommandExecuted event. + */ +interface MVCxClientReportDesignerSaveCommandExecutedEventHandler { + /** + * A method that will handle the SaveCommandExecuted event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientBeforeExportRequestEventArgs object that contains event data. + */ + (source: S, e: MVCxClientReportDesignerSaveCommandExecutedEventArgs): void; +} +/** + * Provides data for the SaveCommandExecuted event. + */ +interface MVCxClientReportDesignerSaveCommandExecutedEventArgs extends ASPxClientEventArgs { + /** + * Returns the operation result. + * Value: A String value, specifying the operation result. + */ + Result: string; +} +/** + * A client-side counterpart of the RichEdit extension. + */ +interface MVCxClientRichEdit extends ASPxClientRichEdit { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the RichEdit by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the RichEdit by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the RoundPanel extension. + */ +interface MVCxClientRoundPanel extends ASPxClientRoundPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the Round Panel by processing the passed information on the server, in an Action specified by the Round Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the Round Panel by processing the passed information on the server, in an Action specified by the Round Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the Scheduler extension. + */ +interface MVCxClientScheduler extends ASPxClientScheduler { + ToolTipDisplaying: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the Scheduler by processing the passed information on the server, in an Action specified via the Scheduler's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the Scheduler by processing the passed information on the server, in an Action specified via the Scheduler's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A template that is rendered to display a tooltip. + */ +interface MVCxClientSchedulerTemplateToolTip extends ASPxClientToolTipBase { + type: MVCxSchedulerToolTipType; +} +/** + * A delegate method that enables you to adjust the tooltip content before displaying. + */ +interface MVCxClientSchedulerToolTipDisplayingEventHandler { + /** + * A method that will handle the ToolTipDisplaying event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientSchedulerToolTipDisplayingEventArgs object that contains the related arguments. + */ + (source: S, e: MVCxClientSchedulerToolTipDisplayingEventArgs): void; +} +/** + * Provides data for the ToolTipDisplaying event. + */ +interface MVCxClientSchedulerToolTipDisplayingEventArgs extends ASPxClientEventArgs { + toolTip: MVCxClientSchedulerTemplateToolTip; + data: ASPxClientSchedulerToolTipData; +} +/** + * Lists available tooltip types. + */ +interface MVCxSchedulerToolTipType { +} +/** + * A client-side counterpart of the Spreadsheet extension. + */ +interface MVCxClientSpreadsheet extends ASPxClientSpreadsheet { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the Spreadsheet by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the Spreadsheet by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the PageControl extension. + */ +interface MVCxClientPageControl extends ASPxClientPageControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the PageControl by processing the passed information on the server, in an Action specified by the PageControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the PageControl by processing the passed information on the server, in an Action specified by the PageControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A client-side counterpart of the TokenBox and TokenBoxFor extensions. + */ +interface MVCxClientTokenBox extends ASPxClientTokenBox { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the TokenBox by processing the passed information on the server, in an Action specified by the TokenBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the TokenBox by processing the passed information on the server, in an Action specified by the TokenBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the TreeList extension. + */ +interface MVCxClientTreeList extends ASPxClientTreeList { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the TreeList by processing the passed information on the server, in an Action specified via the TreeList's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the TreeList by processing the passed information on the server, in an Action specified via the TreeList's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the TreeList's CustomDataCallback event. This method does not update the TreeList. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + */ + PerformCustomDataCallback(data: Object): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + */ + PerformCustomDataCallback(arg: string): void; +} +/** + * A client-side counterpart of the TreeView extension. + */ +interface MVCxClientTreeView extends ASPxClientTreeView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * A client-side counterpart of the UploadControl extension. + */ +interface MVCxClientUploadControl extends ASPxClientUploadControl { +} +/** + * A method that will handle client BeginCallback events. + */ +interface MVCxClientBeginCallbackEventHandler { + /** + * A method that will handle client BeginCallback events. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientBeginCallbackEventArgs object that contains event data. + */ + (source: S, e: MVCxClientBeginCallbackEventArgs): void; +} +/** + * Provides data for client BeginCallback events. + */ +interface MVCxClientBeginCallbackEventArgs extends ASPxClientBeginCallbackEventArgs { + /** + * Gets an object containing specific information (if any, as name/value pairs) that should be passed as a request parameter from the client to the server side for further processing. + * Value: A hash table object containing named values to be passed from the client to the server side via request parameters. + */ + customArgs: Object; +} +/** + * A method that will handle the BeginCallback event. + */ +interface MVCxClientGlobalBeginCallbackEventHandler { + /** + * A method that will handle the BeginCallback event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientGlobalBeginCallbackEventArgs object that contains event data. + */ + (source: S, e: MVCxClientGlobalBeginCallbackEventArgs): void; +} +/** + * Provides data for the BeginCallback event. + */ +interface MVCxClientGlobalBeginCallbackEventArgs extends ASPxClientGlobalBeginCallbackEventArgs { + /** + * Gets an object containing specific information (if any, as name/value pairs) that should be passed as a request parameter from the client to the server side for further processing. + * Value: A hash table object containing named values to be passed from the client to the server side via request parameters. + */ + customArgs: Object; +} +/** + * An ASP.NET MVC equivalent of the client ASPxClientGlobalEvents component. + */ +interface MVCxClientGlobalEvents { + /** + * Occurs on the client side after client object models of all DevExpress MVC extensions contained within the page have been initialized. + */ + ControlsInitialized: ASPxClientEvent>; + /** + * Occurs on the client when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by a DevExpress MVC extension. + */ + CallbackError: ASPxClientEvent>; +} +/** + * A client-side counterpart of the VerticalGrid extension. + */ +interface MVCxClientVerticalGrid extends ASPxClientVerticalGrid { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the VerticalGrid by processing the passed information on the server in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * Sends a callback with a parameter to update the VerticalGrid by processing the passed information on the server in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the VerticalGrid's CustomDataActionRouteValues property, and then process the returned result in the specified client function. This method does not update the VerticalGrid. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(data: Object, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * + * @param args + * @param onSuccess + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientVerticalGridValuesCallback): void; +} +/** + * A client-side equivalent of the MVCxWebDocumentViewer class. + */ +interface MVCxClientWebDocumentViewer extends ASPxClientWebDocumentViewer { +} +/** + * Serves as the base type for all the objects included in the client-side object model. + */ +interface ASPxClientControlBase { + /** + * Gets the unique, hierarchically-qualified identifier for the control. + * Value: The fully-qualified identifier for the control. + */ + name: string; + /** + * Occurs on the client side after the control has been initialized. + */ + Init: ASPxClientEvent>; + /** + * Returns an HTML element that is the root of the control's hierarchy. + */ + GetMainElement(): Object; + /** + * Specifies the text that Assistive Technologies (screen readers or braille display, for example) will provide to a user. + * @param message A String value that specifies a text. + */ + SendMessageToAssistiveTechnology(message: string): void; + /** + * Returns a value specifying whether a control is displayed. + */ + GetClientVisible(): boolean; + /** + * Specifies whether a control is displayed. + * @param visible + */ + SetClientVisible(visible: boolean): void; + /** + * Returns a value specifying whether a control is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether a control is displayed. + * @param visible true to make a control visible; false to make it hidden. + */ + SetVisible(visible: boolean): void; + /** + * Returns a value that determines whether a callback request sent by a web control is being currently processed on the server side. + */ + InCallback(): boolean; +} +/** + * Serves as the base type for all the objects included in the client-side object model. + */ +interface ASPxClientControl extends ASPxClientControlBase { + /** + * Returns the control's width. + */ + GetWidth(): number; + /** + * Returns the control's height. + */ + GetHeight(): number; + /** + * Specifies the control's width. + * @param width An integer value that specifies the control's width. + */ + SetWidth(width: number): void; + /** + * Specifies the control's height. Note that this method is not in effect for some controls. + * @param height An integer value that specifies the control's height. + */ + SetHeight(height: number): void; + /** + * Modifies the control's size against the control's container. + */ + AdjustControl(): void; +} +/** + * Represents a client-side equivalent of the ASPxCallback control. + */ +interface ASPxClientCallback extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientCallback. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires on the client side when a callback initiated by the client Callback event's handler returns back to the client. + */ + CallbackComplete: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side Callback event passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + SendCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A method that will handle the client events related to completion of callback server-side processing. + */ +interface ASPxClientCallbackCompleteEventHandler { + /** + * A method that will handle the client events related to completion of callback server-side processing. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientCallbackCompleteEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCallbackCompleteEventArgs): void; +} +/** + * Serves as the base class for arguments of the web controls' client-side events. + */ +interface ASPxClientEventArgs { +} +/** + * Provides data for events concerning the final processing of a callback. + */ +interface ASPxClientCallbackCompleteEventArgs extends ASPxClientEventArgs { + /** + * Gets a string that contains specific information (if any) passed from the client side for server-side processing. + * Value: A string value representing specific information passed from the client to the server side. + */ + parameter: string; + /** + * Gets a string that contains specific information (if any) that has been passed from the server to the client side for further processing. + * Value: A string value representing specific information passed from the server back to the client side. + */ + result: string; +} +/** + * Serves as the base class for controls that implement panel functionality. + */ +interface ASPxClientPanelBase extends ASPxClientControl { + /** + * Returns the HTML code that is the content of the panel. + */ + GetContentHtml(): string; + /** + * Sets the HTML content for the panel. + * @param html A string value that is the HTML code defining the content of the panel. + */ + SetContentHtml(html: string): void; + /** + * Sets a value specifying whether the panel is enabled. + * @param enabled true to enable the panel; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value specifying whether a panel is enabled. + */ + GetEnabled(): boolean; +} +/** + * Represents a client-side equivalent of the ASPxPanel control. + */ +interface ASPxClientPanel extends ASPxClientPanelBase { + /** + * Occurs when the expanded panel is closed. + */ + Collapsed: ASPxClientEvent>; + /** + * Occurs when an end-user opens the expand panel. + */ + Expanded: ASPxClientEvent>; + /** + * Expands or collapses the client panel. + */ + Toggle(): void; + /** + * Returns a value specifying whether the panel can be expanded. + */ + IsExpandable(): boolean; + /** + * Returns a value specifying whether the panel is expanded. + */ + IsExpanded(): boolean; + /** + * Expands the collapsed panel. + */ + Expand(): void; + /** + * Collapses the expanded panel. + */ + Collapse(): void; +} +/** + * Represents a client-side equivalent of the ASPxCallbackPanel control. + */ +interface ASPxClientCallbackPanel extends ASPxClientPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientCallbackPanel. + */ + CallbackError: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Returns the text displayed within the control's loading panel. + */ + GetLoadingPanelText(): string; + /** + * Sets the text to be displayed within the control's loading panel. + * @param loadingPanelText A string value specifying the text to be displayed within the loading panel. + */ + SetLoadingPanelText(loadingPanelText: string): void; + /** + * Sets a value specifying whether the callback panel is enabled. + * @param enabled true, to enable the callback panel; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value specifying whether a callback panel is enabled. + */ + GetEnabled(): boolean; +} +/** + * Represents the event object used for client-side events. + */ +interface ASPxClientEvent { + /** + * Dynamically connects the event with an appropriate event handler function. + * @param handler An object representing the event handling function's content. + */ + AddHandler(handler: T): void; + /** + * Dynamically disconnects the event from the associated event handler function. + * @param handler An object representing the event handling function's content. + */ + RemoveHandler(handler: T): void; + /** + * Dynamically disconnects the event from all the associated event handler functions. + */ + ClearHandlers(): void; + /** + * For internal use only. + * @param source + * @param e + */ + FireEvent(source: Object, e: ASPxClientEventArgs): void; +} +/** + * A method that will handle the client-side events of a web control's client-side equivalent. + */ +interface ASPxClientEventHandler { + /** + * A method that will handle the client-side events of a web control's client-side equivalent. + * @param source An object representing the event source. Identifies the control that raised the event. + * @param e An ASPxClientEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEventArgs): void; +} +/** + * A method that will handle the cancelable events of a web control's client-side equivalent. + */ +interface ASPxClientCancelEventHandler { + /** + * A method that will handle the cancelable events of a web control's client-side equivalent. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCancelEventArgs): void; +} +/** + * Provides data for cancelable client events. + */ +interface ASPxClientCancelEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client events which can't be cancelled and allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeEventHandler { + /** + * A method that will handle the client events which can't be cancelled and allow the event's processing to be passed to the server side. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientProcessingModeEventArgs): void; +} +/** + * Provides data for the client events which can't be cancelled and allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value that specifies whether the event should be finally processed on the server side. + * Value: true to process the event on the server side; false to completely handle it on the client side. + */ + processOnServer: boolean; +} +/** + * A method that will handle the cancelable client-side events which allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeCancelEventHandler { + /** + * A method that will handle the cancelable client-side events which allow the event's processing to be passed to the server side. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientProcessingModeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientProcessingModeCancelEventArgs): void; +} +/** + * Provides data for the cancelable client-side events which allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeCancelEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents a JavaScript function which receives callback data obtained via a call to a specific client method (such as the PerformDataCallback). + */ +interface ASPxClientDataCallback { + /** + * A JavaScript function which receives a callback data obtained via a call to a specific client method (such as the PerformDataCallback). + * @param sender An object whose client method generated a callback. + * @param result A string value that represents the result of server-side callback processing. + */ + (sender: Object, result: string): void; +} +/** + * Represents a client-side equivalent of the ASPxCloudControl control. + */ +interface ASPxClientCloudControl extends ASPxClientControl { + /** + * Fires after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; +} +/** + * A method that will handle client events involving manipulations with the control's items. + */ +interface ASPxClientCloudControlItemEventHandler { + /** + * A method that will handle client events concerning manipulations with items. + * @param source The event source. This parameter identifies the cloud control object which raised the event. + * @param e An ASPxClientCloudControlItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCloudControlItemEventArgs): void; +} +/** + * Provides data for events which involve clicking on the control's items. + */ +interface ASPxClientCloudControlItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the name that uniquely identifies the processed item. + * Value: A string value that represents the value assigned to the item's Name property. + */ + name: Object; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the client events related to the begining of a callback processing round trip. + */ +interface ASPxClientBeginCallbackEventHandler { + /** + * A method that will handle client BeginCallback events. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientBeginCallbackEventArgs object that contains event data. + */ + (source: S, e: ASPxClientBeginCallbackEventArgs): void; +} +/** + * Provides data for client events related to the beginning of a callback processing round trip. + */ +interface ASPxClientBeginCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets a command name that identifies which client action forced a callback to be occurred. + * Value: A string value that represents the name of the command which initiated a callback. + */ + command: string; +} +/** + * A method that will handle the BeginCallback event. + */ +interface ASPxClientGlobalBeginCallbackEventHandler { + /** + * A method that will handle the BeginCallback event. + * @param source The event source. + * @param e An ASPxDataValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGlobalBeginCallbackEventArgs): void; +} +/** + * Provides data for the BeginCallback event. + */ +interface ASPxClientGlobalBeginCallbackEventArgs extends ASPxClientBeginCallbackEventArgs { + /** + * Gets an object that initiated a callback. + * Value: An class descendant object that is the control that initiated a callback. + */ + control: ASPxClientControl; +} +/** + * A method that will handle the client events related to the completion of a callback processing round trip. + */ +interface ASPxClientEndCallbackEventHandler { + /** + * A method that will handle client EndCallback events. + * @param source An object representing the event source. + * @param e A MenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEndCallbackEventArgs): void; +} +/** + * Provides data for client events related to the completion of a callback processing round trip. + */ +interface ASPxClientEndCallbackEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the EndCallback event. + */ +interface ASPxClientGlobalEndCallbackEventHandler { + /** + * A method that will handle the EndCallback event. + * @param source The event source. + * @param e An ASPxDataValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGlobalEndCallbackEventArgs): void; +} +/** + * Provides data for the EndCallback event. + */ +interface ASPxClientGlobalEndCallbackEventArgs extends ASPxClientEndCallbackEventArgs { + /** + * Gets an object that initiated a callback. + * Value: An class descendant object that is the control that initiated a callback. + */ + control: ASPxClientControl; +} +/** + * A method that will handle a CustomCallback client event exposed by some DevExpress web controls. + */ +interface ASPxClientCustomDataCallbackEventHandler { + /** + * A method that will handle the client CustomCallback event of some controls. + * @param source An object representing the event source. + * @param e An ASPxClientCustomDataCallbackEventHandler object that contains event data. + */ + (source: S, e: ASPxClientCustomDataCallbackEventArgs): void; +} +/** + * Provides data for the CustomCallback event. + */ +interface ASPxClientCustomDataCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets a string that contains specific information (if any) that has been passed from the server to the client side for further processing, related to the CustomCallback event. + * Value: A string value representing specific information passed from the server back to the client side. + */ + result: string; +} +/** + * A method that will handle client events related to server-side errors that occured during callback processing. + */ +interface ASPxClientCallbackErrorEventHandler { + /** + * A method that will handle client CallbackError events. + * @param source An object representing the event source. + * @param e A ASPxClientCallbackErrorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCallbackErrorEventArgs): void; +} +/** + * Provides data for client events related to server-side errors that occured during callback processing. + */ +interface ASPxClientCallbackErrorEventArgs extends ASPxClientEventArgs { + /** + * Gets the error message that describes the server error that occurred. + * Value: A string value that represents the error message. + */ + message: string; + /** + * Gets or sets whether the event is handled and the default error handling actions are not required. + * Value: true if the error is handled and no default processing is required; otherwise false. + */ + handled: boolean; +} +/** + * A method that will handle the CallbackError event. + */ +interface ASPxClientGlobalCallbackErrorEventHandler { + /** + * A method that will handle the CallbackError event. + * @param source The event source. + * @param e An ASPxDataValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGlobalCallbackErrorEventArgs): void; +} +/** + * Provides data for the CallbackError event. + */ +interface ASPxClientGlobalCallbackErrorEventArgs extends ASPxClientCallbackErrorEventArgs { + /** + * Gets an object that initiated a callback. + * Value: An class descendant object that is the control that initiated a callback. + */ + control: ASPxClientControl; +} +/** + * A method that will handle the ValidationCompleted client event. + */ +interface ASPxClientValidationCompletedEventHandler { + /** + * A method that will handle the ValidationCompleted event. + * @param source An object representing the event source. Identifies the ASPxClientGlobalEvents object that raised the event. + * @param e An ASPxClientValidationCompletedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientValidationCompletedEventArgs): void; +} +/** + * Provides data for the ValidationCompleted client event that allows you to centrally validate user input within all DevExpress web controls to which validation is applied. + */ +interface ASPxClientValidationCompletedEventArgs extends ASPxClientEventArgs { + /** + * Gets a container object that holds the validated control(s). + * Value: An object that represents a container of the validated control(s). + */ + container: Object; + /** + * Gets the name of the validation group name to which validation has been applied. + * Value: A string value that represents the name of the validation group that has been validated. + */ + validationGroup: string; + /** + * Gets a value that indicates whether validation has been applied to both visible and invisible controls. + * Value: true if validation has been applied to both visible and invisible controls; false if only visible controls have been validated. + */ + invisibleControlsValidated: boolean; + /** + * Gets a value specifying whether the validation has been completed successfully. + * Value: true if the validation has been completed successfully; otherwise, false. + */ + isValid: boolean; + /** + * Gets the first control (either visible or invisible) that hasn't passed the validation applied. + * Value: An ASPxClientControl object that represents the first invalid control. + */ + firstInvalidControl: ASPxClientControl; + /** + * Gets the first visible control that hasn't passed the validation applied. + * Value: An ASPxClientControl object that represents the first visible invalid control. + */ + firstVisibleInvalidControl: ASPxClientControl; +} +/** + * A method that will handle the client ControlsInitialized event. + */ +interface ASPxClientControlsInitializedEventHandler { + /** + * A method that will handle the client ControlsInitialized event. + * @param source An object representing the event source. + * @param e An ASPxClientControlsInitializedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientControlsInitializedEventArgs): void; +} +/** + * Provides data for the client ControlsInitialized event. + */ +interface ASPxClientControlsInitializedEventArgs extends ASPxClientEventArgs { + /** + * Gets a value that specifies whether a callback is sent during a controls initialization. + * Value: true if a callback is sent; otherwise, false. + */ + isCallback: boolean; +} +/** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + */ +interface ASPxClientControlPredicate { + /** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + * @param control An object to compare against the criteria defined within the method. + */ + (control: Object): boolean; +} +/** + * Represents a JavaScript function which receives the action to perform for a control when the client ForEachControl method is called. + */ +interface ASPxClientControlAction { + /** + * Represents a JavaScript function which receives the action to perform for a control when the client ForEachControl method is called. + * @param control An object that specifies a control. + */ + (control: Object): void; +} +/** + * A collection object used on the client side to maintain particular client control objects + */ +interface ASPxClientControlCollection { + /** + * Occurs on the client side after client object models of all DevExpress web controls contained within the page have been initialized. + */ + ControlsInitialized: ASPxClientEvent>; + /** + * Occurs when the browser window is being resized. + */ + BrowserWindowResized: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated by any DevExpress control. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side, after server-side processing of a callback initiated by any DevExpress web control, has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by any DevExpress web control. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs after the validation initiated for a DevExpress web control (or a group of DevExpress web controls) has been completed. + */ + ValidationCompleted: ASPxClientEvent>; + /** + * Returns a collection item identified by its unique hierarchically-qualified identifier. + * @param name A string value representing the hierarchically-qualified identifier of the required control. + */ + Get(name: Object): Object; + /** + * Returns a DevExpress client control object identified by its unique hierarchically-qualified identifier (either ClientInstanceName or ClientID property value). + * @param name A string value that is the hierarchically-qualified identifier of the required DevExpress control. + */ + GetByName(name: string): Object; + /** + * Returns all controls in the collection that satisfy the specified predicate. + * @param predicate An ASPxClientControlPredicate object that is a predicate used to search for controls in the collection. + */ + GetControlsByPredicate(predicate: ASPxClientControlPredicate): Object[]; + /** + * Returns all controls of the specified type. + * @param type The object specifying the client control type. + */ + GetControlsByType(type: Object): Object[]; + /** + * Performs the specified action for each control in the collection. + * @param action An ASPxClientControlAction object specifying an action to perform. + */ + ForEachControl(action: ASPxClientControlAction): void; +} +/** + * Represents a client-side equivalent of the ASPxDataView object. + */ +interface ASPxClientDataView extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientDataView. + */ + CallbackError: ASPxClientEvent>; + /** + * Activates the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page that is currently active. + */ + GetPageIndex(): number; + /** + * Gets the size of a single ASPxDataView's page. + */ + GetPageSize(): number; + /** + * Sets the size of a single ASPxDataView's page. + * @param pageSize An integer value that specifies the page size. + */ + SetPageSize(pageSize: number): void; + /** + * Gets the number of pages into which the ASPxDataView's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Activates the first page. + */ + FirstPage(): void; + /** + * Activates the last page. + */ + LastPage(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + */ +interface ASPxClientDockingFilterPredicate { + /** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + * @param item An object to compare against the criteria defined within the method. + */ + (item: Object): boolean; +} +/** + * A client-side equivalent of the ASPxDockManager object. + */ +interface ASPxClientDockManager extends ASPxClientControl { + /** + * Fires on the client side before a panel is docked in a zone and allows you to cancel the action. + */ + BeforeDock: ASPxClientEvent>; + /** + * Fires on the client side after a panel is docked in a zone. + */ + AfterDock: ASPxClientEvent>; + /** + * Fires on the client side before a panel is made floating (undocked from a zone) and allows you to cancel the action. + */ + BeforeFloat: ASPxClientEvent>; + /** + * Fires on the client side after a panel is undocked from a zone. + */ + AfterFloat: ASPxClientEvent>; + /** + * Occurs when a panel dragging operation is started. + */ + StartPanelDragging: ASPxClientEvent>; + /** + * Occurs after a panel dragging operation is complete. + */ + EndPanelDragging: ASPxClientEvent>; + /** + * Occurs on the client side before a panel is closed, and allows you to cancel the action. + */ + PanelClosing: ASPxClientEvent>; + /** + * Occurs on the client side when a panel is closed. + */ + PanelCloseUp: ASPxClientEvent>; + /** + * Occurs on the client side when a panel pops up. + */ + PanelPopUp: ASPxClientEvent>; + /** + * Occurs on the client side after a panel has been invoked. + */ + PanelShown: ASPxClientEvent>; + /** + * Occurs on the client side after a panel has been resized. + */ + PanelResize: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Returns a zone specified by its unique identifier (zoneUID). + * @param zoneUID A string value specifying the unique identifier of the zone. + */ + GetZoneByUID(zoneUID: string): ASPxClientDockZone; + /** + * Returns a panel specified by its unique identifier (panelUID). + * @param panelUID A string value specifying the unique identifier of the panel. + */ + GetPanelByUID(panelUID: string): ASPxClientDockPanel; + /** + * Returns an array of panels contained in a page. + */ + GetPanels(): ASPxClientDockPanel[]; + /** + * Returns an array of panels that are contained in a page and meet a specified criteria. + * @param filterPredicate An ASPxClientDockingFilterPredicate delegate that defines a set of criteria and determines whether a panel meets those criteria. + */ + GetPanels(filterPredicate: ASPxClientDockingFilterPredicate): ASPxClientDockPanel[]; + /** + * Returns an array of zones contained in a page. + */ + GetZones(): ASPxClientDockZone[]; + /** + * Returns an array of zones that are contained in a page and meet a specified criteria. + * @param filterPredicate An ASPxClientDockingFilterPredicate delegate that defines a set of criteria and determines whether a zone meets those criteria. + */ + GetZones(filterPredicate: ASPxClientDockingFilterPredicate): ASPxClientDockZone[]; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockManagerProcessingModeCancelEventHandler { + /** + * A method that will handle the BeforeDock event. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerProcessingModeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerProcessingModeCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockManagerProcessingModeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A method that will handle the client AfterDock event. + */ +interface ASPxClientDockManagerProcessingModeEventHandler { + /** + * A method that will handle the AfterDock event. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerProcessingModeEventArgs): void; +} +/** + * Provides data for the AfterDock event. + */ +interface ASPxClientDockManagerProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A method that will handle client-side events concerning manipulations with panels. + */ +interface ASPxClientDockManagerEventHandler { + /** + * A method that will handle client-side events concerning manipulations with panels. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerEventArgs): void; +} +/** + * Provides data for events which concern manipulations on panels. + */ +interface ASPxClientDockManagerEventArgs extends ASPxClientEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockManagerCancelEventHandler { + /** + * A method that will handle the PanelClosing event. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockManagerCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * Serves as a base class for the ASPxClientPopupControl classes. + */ +interface ASPxClientPopupControlBase extends ASPxClientControl { + /** + * Occurs on the client side when window resizing initiates. + */ + BeforeResizing: ASPxClientEvent>; + /** + * Occurs on the client side when window resizing completes. + */ + AfterResizing: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the control. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when a control's window closes or hides. + */ + CloseUp: ASPxClientEvent>; + /** + * Enables you to cancel window closing on the client side. + */ + Closing: ASPxClientEvent>; + /** + * Occurs on the client side when a control's window is invoked. + */ + PopUp: ASPxClientEvent>; + /** + * Occurs on the client side after a window has been resized. + */ + Resize: ASPxClientEvent>; + /** + * Occurs on the client side after a control's window has been invoked. + */ + Shown: ASPxClientEvent>; + /** + * Occurs on the client side when the window pin state is changed. + */ + PinnedChanged: ASPxClientEvent>; + /** + * Modifies a control's window size in accordance with the content. + */ + AdjustSize(): void; + /** + * Brings the window to the front of the z-order. + */ + BringToFront(): void; + /** + * Returns a value indicating whether the window is collapsed. + */ + GetCollapsed(): boolean; + /** + * Returns the HTML code that specifies the contents of the control's window. + */ + GetContentHtml(): string; + /** + * Returns an iframe object containing a web page specified via the control's SetContentUrl client method). + */ + GetContentIFrame(): Object; + /** + * Returns an iframe object containing a web page specified via the control's SetContentUrl client method). + */ + GetContentIFrameWindow(): Object; + /** + * Returns the URL pointing to the web page displayed within the control's window. + */ + GetContentUrl(): string; + /** + * Returns the URL pointing to the image displayed within the window footer by default. + */ + GetFooterImageUrl(): string; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within a window's footer. + */ + GetFooterNavigateUrl(): string; + /** + * Returns the text displayed within a window's footer. + */ + GetFooterText(): string; + /** + * Returns the URL pointing to the image displayed within the window header. + */ + GetHeaderImageUrl(): string; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within a window's header. + */ + GetHeaderNavigateUrl(): string; + /** + * Returns the text displayed within a window's header. + */ + GetHeaderText(): string; + /** + * Gets the width of the default window's (for ASPxPopupControl) or panel's (for ASPxDockPanel) content region. + */ + GetContentWidth(): number; + /** + * Gets the height of the default window's (for ASPxPopupControl) or panel's (for ASPxDockPanel) content region. + */ + GetContentHeight(): number; + /** + * Returns a value indicating whether the window is maximized. + */ + GetMaximized(): boolean; + /** + * Returns a value indicating whether the window is pinned. + */ + GetPinned(): boolean; + /** + * Sends a callback to the server and generates the server-side WindowCallback event, passing the specified argument to it. + * @param parameter A string value that is any information that needs to be sent to the server-side WindowCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Refreshes the content of the web page displayed within the control's window. + */ + RefreshContentUrl(): void; + /** + * Sets a value indicating whether the window is collapsed. + * @param value true, to collapse the window; otherwise, false. + */ + SetCollapsed(value: boolean): void; + /** + * Sets the HTML markup specifying the contents of the control's window. + * @param html A string value that specifies the HTML markup. + */ + SetContentHtml(html: string): void; + /** + * Sets the URL to point to the web page that should be loaded into, and displayed within the control's window. + * @param url A string value specifying the URL to the web page displayed within the control's window. + */ + SetContentUrl(url: string): void; + /** + * Specifies the URL which points to the image displayed within the window footer by default. + * @param value A string value that is the URL for the image displayed within the window footer. + */ + SetFooterImageUrl(value: string): void; + /** + * Specifies the URL where the web browser will navigate when the text or image is clicked within a window's footer. + * @param value A string value which specifies the required navigation location. + */ + SetFooterNavigateUrl(value: string): void; + /** + * Specifies the text displayed within a window's footer. + * @param value A string value that specifies a window's footer text. + */ + SetFooterText(value: string): void; + /** + * Specifies the URL which points to the image displayed within the window header. + * @param value A string value that is the URL to the image displayed within the header. + */ + SetHeaderImageUrl(value: string): void; + /** + * Specifies the URL where the web browser will navigate when the text or image is clicked within a window's header. + * @param value A string value which specifies the required navigation location. + */ + SetHeaderNavigateUrl(value: string): void; + /** + * Specifies the text displayed within a window's header. + * @param value A string value that specifies a window's header text. + */ + SetHeaderText(value: string): void; + /** + * Sets a value indicating whether the window is maximized. + * @param value true. to maximize the window; otherwise, false. + */ + SetMaximized(value: boolean): void; + /** + * Sets a value indicating whether the window is pinned. + * @param value true, to pin the window; otherwise, false. + */ + SetPinned(value: boolean): void; + /** + * Invokes the control's window. + */ + Show(): void; + /** + * Invokes the control's window at the popup element with the specified index. + * @param popupElementIndex An integer value specifying the zero-based index of the popup element. + */ + Show(popupElementIndex: number): void; + /** + * Invokes the control's window and displays it over the specified HTML element. + * @param htmlElement An object specifying the HTML element relative to whose position the window is invoked. + */ + ShowAtElement(htmlElement: Object): void; + /** + * Invokes the control's window and displays it over an HTML element specified by its unique identifier. + * @param id A string value that specifies the hierarchically qualified identifier of an HTML element relative to whose position the window is invoked. + */ + ShowAtElementByID(id: string): void; + /** + * Invokes the control's window at the specified position. + * @param x A integer value specifying the x-coordinate of the window's display position. + * @param y A integer value specifying the y-coordinate of the window's display position. + */ + ShowAtPos(x: number, y: number): void; + /** + * Closes the control's window. + */ + Hide(): void; + /** + * Returns a value that specifies whether the control's window is displayed. + */ + IsVisible(): boolean; +} +/** + * A client-side equivalent of the ASPxDockPanel object. + */ +interface ASPxClientDockPanel extends ASPxClientPopupControlBase { + /** + * Gets or sets the unique identifier of a panel on a page. + * Value: A string that is the unique identifier of a panel. + */ + panelUID: string; + /** + * Fires on the client side before a panel is docked in a zone and allows you to cancel the action. + */ + BeforeDock: ASPxClientEvent>; + /** + * Fires on the client side after a panel is docked in a zone. + */ + AfterDock: ASPxClientEvent>; + /** + * Fires on the client side before a panel is made floating (undocked from a zone) and allows you to cancel the action. + */ + BeforeFloat: ASPxClientEvent>; + /** + * Fires on the client side after a panel is undocked from a zone. + */ + AfterFloat: ASPxClientEvent>; + /** + * Occurs when a panel dragging operation is started. + */ + StartDragging: ASPxClientEvent>; + /** + * Occurs after a panel dragging operation is complete. + */ + EndDragging: ASPxClientEvent>; + /** + * Retrieves a zone that owns the current panel. + */ + GetOwnerZone(): ASPxClientDockZone; + /** + * Docks the current panel in the specified zone. + * @param zone An ASPxClientDockZone object specifying the zone. + */ + Dock(zone: ASPxClientDockZone): void; + /** + * Docks the current panel in a zone at the specified position. + * @param zone An ASPxClientDockZone object specifying the zone, where the panel is docked + * @param visibleIndex An integer value specifying the visible index position. + */ + Dock(zone: ASPxClientDockZone, visibleIndex: number): void; + /** + * Undocks the current panel. + */ + MakeFloat(): void; + /** + * Undocks the current panel and place it at the specified position. + * @param x An integer value that specifies the X-coordinate of the panel's display position. + * @param y An integer value that specifies the Y-coordinate of the panel's display position. + */ + MakeFloat(x: number, y: number): void; + /** + * Gets or sets a value specifying the position of the current panel, amongst the visible panels within a zone. + */ + GetVisibleIndex(): number; + /** + * Sets a value specifying the position of the current panel, amongst the visible panels in a zone. + * @param visibleIndex An integer value specifying the zero-based index of the panel amongst visible panels in the zone. + */ + SetVisibleIndex(visibleIndex: number): void; + /** + * Returns a value indicating whether the panel is docked. + */ + IsDocked(): boolean; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockPanelProcessingModeCancelEventHandler { + /** + * A method that will handle the BeforeDock event. + * @param source A ASPxClientDockPanel object that raised the event. + * @param e A ASPxClientDockPanelProcessingModeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockPanelProcessingModeCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockPanelProcessingModeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockPanelProcessingModeEventHandler { + /** + * A method that will handle the AfterFloat event. + * @param source A ASPxClientDockPanel object that raised the event. + * @param e A ASPxClientDockPanelProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockPanelProcessingModeEventArgs): void; +} +/** + * Provides data for the AfterFloat event. + */ +interface ASPxClientDockPanelProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A client-side equivalent of the ASPxDockZone object. + */ +interface ASPxClientDockZone extends ASPxClientControl { + /** + * Gets or sets the unique identifier of a zone on a page. + * Value: A string that is the unique identifier of a zone. + */ + zoneUID: string; + /** + * Fires on the client side before a panel is docked in a zone and allows you to cancel the action. + */ + BeforeDock: ASPxClientEvent>; + /** + * Fires on the client side after a panel is docked in a zone. + */ + AfterDock: ASPxClientEvent>; + /** + * Returns a value that indicates the orientation in which panels are stacked in the current zone. + */ + IsVertical(): boolean; + /** + * Gets a value that indicates whether the zone can enlarge its size. + */ + GetAllowGrowing(): boolean; + /** + * Gets the number of panels contained in the zone. + */ + GetPanelCount(): number; + /** + * Returns a panel specified by its unique identifier (panelUID). + * @param panelUID A string value specifying the unique identifier of the panel. + */ + GetPanelByUID(panelUID: string): ASPxClientDockPanel; + /** + * Returns a panel specified by its visible index. + * @param visibleIndex An integer value specifying the panel's position among the visible panels within the current zone. + */ + GetPanelByVisibleIndex(visibleIndex: number): ASPxClientDockPanel; + /** + * Returns an array of panels docked in the current zone. + */ + GetPanels(): ASPxClientDockPanel[]; + /** + * Returns an array of panels that are docked in the current zone and meet a specified criteria. + * @param filterPredicate An ASPxClientDockingFilterPredicate delegate that defines a set of criteria and determines whether a panel meets those criteria. + */ + GetPanels(filterPredicate: ASPxClientDockingFilterPredicate): ASPxClientDockPanel[]; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockZoneCancelEventHandler { + /** + * A method that will handle the BeforeDock event. + * @param source The event source. This parameter identifies the zone object which raised the event. + * @param e A ASPxClientDockZoneCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockZoneCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockZoneCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * A method that will handle the client AfterDock event. + */ +interface ASPxClientDockZoneProcessingModeEventHandler { + /** + * A method that will handle the AfterDock event. + * @param source The event source. This parameter identifies the zone object which raised the event. + * @param e An ASPxClientDockZoneProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockZoneProcessingModeEventArgs): void; +} +/** + * Provides data for the AfterDock event. + */ +interface ASPxClientDockZoneProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * Represents the client-side equivalent of the ASPxFileManager control. + */ +interface ASPxClientFileManager extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientFileManager. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires on the client side after the selected file has been changed. + */ + SelectedFileChanged: ASPxClientEvent>; + /** + * Fires on the client side when an end-user opens a file by double-clicking it or pressing the Enter key. + */ + SelectedFileOpened: ASPxClientEvent>; + /** + * Fires after the focused item has been changed. + */ + FocusedItemChanged: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Fires on the client side after the current folder has been changed within a file manager. + */ + CurrentFolderChanged: ASPxClientEvent>; + /** + * Fires on the client side before the folder is created, and allows you to cancel the action. + */ + FolderCreating: ASPxClientEvent>; + /** + * Occurs on the client side after a folder has been created. + */ + FolderCreated: ASPxClientEvent>; + /** + * Fires on the client side before an item is renamed and allows you to cancel the action. + */ + ItemRenaming: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager's item has been renamed. + */ + ItemRenamed: ASPxClientEvent>; + /** + * Fires on the client side before an item is deleted and allows you to cancel the action. + */ + ItemDeleting: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager's item has been deleted. + */ + ItemDeleted: ASPxClientEvent>; + /** + * Occurs on the client side after all the selected items have been deleted. + */ + ItemsDeleted: ASPxClientEvent>; + /** + * Fires on the client side before an item is moved and allows you to cancel the action. + */ + ItemMoving: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager's item has been moved. + */ + ItemMoved: ASPxClientEvent>; + /** + * Occurs on the client side after all the selected items have been moved . + */ + ItemsMoved: ASPxClientEvent>; + /** + * Fires on the client side before an item is copied and allows you to cancel the action. + */ + ItemCopying: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager item has been copied. + */ + ItemCopied: ASPxClientEvent>; + /** + * Occurs on the client side after all the selected items have been copied. + */ + ItemsCopied: ASPxClientEvent>; + /** + * Fires on the client if any error occurs while editing an item. + */ + ErrorOccurred: ASPxClientEvent>; + /** + * Enables you to display the alert with the result error description. + */ + ErrorAlertDisplaying: ASPxClientEvent>; + /** + * Fires when a custom item is clicked, allowing you to perform custom actions. + */ + CustomCommand: ASPxClientEvent>; + /** + * Fires on the client side when the file manager updates the state of toolbar or context menu items. + */ + ToolbarUpdating: ASPxClientEvent>; + /** + * Enables you to highlight the search text, which is specified using the filter box, in templates. + */ + HighlightItemTemplate: ASPxClientEvent>; + /** + * Fires on the client side before a file upload starts, and allows you to cancel the action. + */ + FileUploading: ASPxClientEvent>; + /** + * Fires on the client side before the selected items are uploaded and allows you to cancel the action. + */ + FilesUploading: ASPxClientEvent>; + /** + * Occurs on the client side after a file has been uploaded. + */ + FileUploaded: ASPxClientEvent>; + /** + * Occurs on the client side after upload of all selected files has been completed. + */ + FilesUploaded: ASPxClientEvent>; + /** + * Fires on the client side before a file download starts, and allows you to cancel the action. + */ + FileDownloading: ASPxClientEvent>; + /** + * Gets the name of the currently active file manager area. + */ + GetActiveAreaName(): string; + /** + * Client-side scripting method which initiates a round trip to the server, so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Executes the specified command. + * @param commandName A string value that specifies the command to perform. + */ + ExecuteCommand(commandName: string): boolean; + /** + * Returns the selected file within the ASPxFileManager control's file container. + */ + GetSelectedFile(): ASPxClientFileManagerFile; + /** + * Returns an array of the file manager's selected items. + */ + GetSelectedItems(): ASPxClientFileManagerFile[]; + /** + * Returns a list of files that are loaded on the current page. + */ + GetItems(): ASPxClientFileManagerFile[]; + /** + * Sends a callback to the server and returns a list of files that are contained within the current folder. + * @param onCallback A object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetAllItems(onCallback: ASPxClientFileManagerAllItemsCallback): void; + /** + * Returns a toolbar item specified by its command name. + * @param commandName A string value specifying the command name of the item. + */ + GetToolbarItemByCommandName(commandName: string): ASPxClientFileManagerToolbarItem; + /** + * Returns a context menu item specified by its command name. + * @param commandName A string value specifying the command name of the item. + */ + GetContextMenuItemByCommandName(commandName: string): ASPxClientFileManagerToolbarItem; + /** + * Gets the current folder's path. + */ + GetCurrentFolderPath(): string; + /** + * Gets the current folder's path with the specified separator. + * @param separator A string value that specifies the separator between the folder's name within a path. + */ + GetCurrentFolderPath(separator: string): string; + /** + * Gets the current folder's path with the specified settings. + * @param separator A string value that specifies the separator between the folder's name within the path. + * @param skipRootFolder true to skip the root folder; otherwise, false. + */ + GetCurrentFolderPath(separator: string, skipRootFolder: boolean): string; + /** + * Sets the current folder's path. + * @param path A String value that is the relative path to the folder (without the root folder). + * @param onCallback A ASPxClientFileManagerCallback object that is the JavaScript function that receives the callback data as a parameter. + */ + SetCurrentFolderPath(path: string, onCallback: ASPxClientFileManagerCallback): void; + /** + * Gets the current folder's ID. + */ + GetCurrentFolderId(): string; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; +} +/** + * A JavaScript function which receives callback data obtained via a call to the client SetCurrentFolderPath method. + */ +interface ASPxClientFileManagerCallback { + /** + * A JavaScript function that receives callback data obtained via a call to the SetCurrentFolderPath method. + * @param result An object that contains a callback data. + */ + (result: Object): void; +} +/** + * A client-side equivalent of the file manager's FileManagerItem object and serves as a base class for client file and folder objects. + */ +interface ASPxClientFileManagerItem { + /** + * Gets the name of the current item. + * Value: A string value that is the item's name. + */ + name: string; + /** + * Gets the item's unique identifier. + * Value: A String value that specifies the item's unique identifier. + */ + id: string; + /** + * Gets a value that indicates if the current file manager item is a folder. + * Value: true if the current item is a folder or parent folder; false if the current item is a file. + */ + isFolder: boolean; + /** + * Specifies whether the file manager item is selected. + * @param selected true, to select the item; otherwise, false. + */ + SetSelected(selected: boolean): void; + /** + * Gets a value indicating whether the item is selected in the file manager. + */ + IsSelected(): boolean; + /** + * Gets the current item's full name. + */ + GetFullName(): string; + /** + * Gets the current item's full name with the specified separator. + * @param separator A string value that specifies the separator between the folder name inside the item's full name. + */ + GetFullName(separator: string): string; + /** + * Gets the current item's full name with the specified settings. + * @param separator A string value that specifies the separator between the folder name inside the item's full name. + * @param skipRootFolder true, to skip the root folder; otherwise, false. + */ + GetFullName(separator: string, skipRootFolder: boolean): string; +} +/** + * Represents the client-side equivalent of the FileManagerFile object. + */ +interface ASPxClientFileManagerFile extends ASPxClientFileManagerItem { + /** + * Downloads a file from a file manager. + */ + Download(): void; +} +/** + * A client-side equivalent of the FileManagerFolder object. + */ +interface ASPxClientFileManagerFolder extends ASPxClientFileManagerItem { + /** + * Gets a value specifying whether an item is a parent folder. + * Value: true if an item is a parent folder; false if an item is a file or folder. + */ + isParentFolder: boolean; +} +/** + * A JavaScript function which receives callback data obtained by a call to the client GetAllItems method. + */ +interface ASPxClientFileManagerAllItemsCallback { + /** + * A JavaScript function which receives callback data obtained by a call to the client GetAllItems method. + * @param items An array of ASPxClientFileManagerItem objects that are items contained in the current folder. + */ + (items: ASPxClientFileManagerItem[]): void; +} +/** + * A method that will handle the client SelectedFileOpened events. + */ +interface ASPxClientFileManagerFileEventHandler { + /** + * A method that will handle the SelectedFileOpened events. + * @param source An object representing the event's source. + * @param e An ASPxClientFileManagerFileEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileEventArgs): void; +} +/** + * Provides data for the SelectedFileOpened events. + */ +interface ASPxClientFileManagerFileEventArgs extends ASPxClientEventArgs { + /** + * Gets a file related to the event. + * Value: An ASPxClientFileManagerFile object that represents a file currently being processed. + */ + file: ASPxClientFileManagerFile; +} +/** + * A method that will handle the client SelectedFileOpened event. + */ +interface ASPxClientFileManagerFileOpenedEventHandler { + /** + * A method that will handle the SelectedFileOpened event. + * @param source The event source. This parameter identifies the file manager object which raised the event. + * @param e An ASPxClientFileManagerFileOpenedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileOpenedEventArgs): void; +} +/** + * Provides data for the SelectedFileOpened event. + */ +interface ASPxClientFileManagerFileOpenedEventArgs extends ASPxClientFileManagerFileEventArgs { + /** + * Gets or sets a value that specifies whether the event should be finally processed on the server side. + * Value: true to process the event on the server side; false to completely handle it on the client side. + */ + processOnServer: boolean; +} +/** + * Serves as a base for classes that are used as arguments for events generated on the client side. + */ +interface ASPxClientFileManagerActionEventArgsBase extends ASPxClientEventArgs { + /** + * Gets the full name of the item currently being processed. + * Value: A string value that is the item's full name. + */ + fullName: string; + /** + * Gets the name of the currently processed item. + * Value: A string value that specifies the item's name. + */ + name: string; + /** + * Gets a value specifying whether the current processed item is a folder. + * Value: true if the processed item is a folder; false if the processed item is a file. + */ + isFolder: boolean; +} +/** + * A method that will handle the client ItemRenaming events. + */ +interface ASPxClientFileManagerItemEditingEventHandler { + /** + * A method that will handle the ItemRenaming events. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemEditingEventArgs): void; +} +/** + * Provides data for the item editing event. + */ +interface ASPxClientFileManagerItemEditingEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client ItemRenamed event. + */ +interface ASPxClientFileManagerItemRenamedEventHandler { + /** + * A method that will handle the ItemRenamed event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemRenamedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemRenamedEventArgs): void; +} +/** + * Provides data for the ItemRenamed event. + */ +interface ASPxClientFileManagerItemRenamedEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets the previous name of the renamed item. + * Value: A string value that specifies the item name. + */ + oldName: string; +} +/** + * A method that will handle the client ItemDeleted event. + */ +interface ASPxClientFileManagerItemDeletedEventHandler { + /** + * A method that will handle the ItemDeleted event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemDeletedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemDeletedEventArgs): void; +} +/** + * Provides data for the ItemDeleted event. + */ +interface ASPxClientFileManagerItemDeletedEventArgs extends ASPxClientFileManagerActionEventArgsBase { +} +/** + * A method that will handle the client ItemsDeleted event. + */ +interface ASPxClientFileManagerItemsDeletedEventHandler { + /** + * A method that will handle the ItemsDeleted event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemsDeletedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemsDeletedEventArgs): void; +} +/** + * Provides data for the ItemsDeleted event. + */ +interface ASPxClientFileManagerItemsDeletedEventArgs extends ASPxClientEventArgs { + /** + * Gets an array of the currently processed items. + * Value: An array of ASPxClientFileManagerItem objects that are items currently being processed. + */ + items: ASPxClientFileManagerItem[]; +} +/** + * A method that will handle the client ItemMoved event. + */ +interface ASPxClientFileManagerItemMovedEventHandler { + /** + * A method that will handle the ItemMoved event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemMovedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemMovedEventArgs): void; +} +/** + * Provides data for the ItemMoved event. + */ +interface ASPxClientFileManagerItemMovedEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets the full name of the folder from which an item is moved. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client ItemsMoved event. + */ +interface ASPxClientFileManagerItemsMovedEventHandler { + /** + * A method that will handle the ItemsMoved event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemsMovedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemsMovedEventArgs): void; +} +/** + * Provides data for the ItemsMoved event. + */ +interface ASPxClientFileManagerItemsMovedEventArgs extends ASPxClientEventArgs { + /** + * Gets an array of the currently processed items. + * Value: An array of ASPxClientFileManagerItem objects that are items currently being processed. + */ + items: ASPxClientFileManagerItem[]; + /** + * Gets the full name of the folder from which items are moved. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client ItemCopied event. + */ +interface ASPxClientFileManagerItemCopiedEventHandler { + /** + * A method that will handle the ItemCopied event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemCopiedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemCopiedEventArgs): void; +} +/** + * Provides data for the ItemCopied event. + */ +interface ASPxClientFileManagerItemCopiedEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets the full name of the folder from which an item is copied. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client ItemsCopied event. + */ +interface ASPxClientFileManagerItemsCopiedEventHandler { + /** + * A method that will handle the ItemsCopied event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemsCopiedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemsCopiedEventArgs): void; +} +/** + * Provides data for the ItemsCopied event. + */ +interface ASPxClientFileManagerItemsCopiedEventArgs extends ASPxClientEventArgs { + /** + * Gets an array of the currently processed items. + * Value: An array of ASPxClientFileManagerItem objects that are items currently being processed. + */ + items: ASPxClientFileManagerItem[]; + /** + * Gets the full name of the folder from which items are copied. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client FolderCreated event. + */ +interface ASPxClientFileManagerItemCreatedEventHandler { + /** + * A method that will handle the FolderCreated event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemCreatedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemCreatedEventArgs): void; +} +/** + * Provides data for the FolderCreated event. + */ +interface ASPxClientFileManagerItemCreatedEventArgs extends ASPxClientFileManagerActionEventArgsBase { +} +/** + * A method that will handle the client ErrorOccurred event. + */ +interface ASPxClientFileManagerErrorEventHandler { + /** + * A method that will handle the client ErrorOccurred event. + * @param source An object representing the event's source. + * @param e An ASPxClientFileManagerErrorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerErrorEventArgs): void; +} +/** + * Provides data for the ErrorOccurred event. + */ +interface ASPxClientFileManagerErrorEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets or sets the error description. + * Value: A string value specifying the error description. + */ + errorText: string; + /** + * Gets or sets a value specifying whether an event error message is sent to the ErrorAlertDisplaying event. + * Value: true to sent an error message; otherwise, false. + */ + showAlert: boolean; + /** + * Gets a specifically generated code that uniquely identifies an error, which occurs while editing an item. + * Value: An integer value that specifies the code uniquely identifying an error. + */ + errorCode: number; +} +/** + * A method that will handle the client ErrorAlertDisplaying event. + */ +interface ASPxClientFileManagerErrorAlertDisplayingEventHandler { + /** + * A method that will handle the ErrorAlertDisplaying event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerErrorAlertDisplayingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerErrorAlertDisplayingEventArgs): void; +} +/** + * Provides data for the ErrorAlertDisplaying event. + */ +interface ASPxClientFileManagerErrorAlertDisplayingEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value that is the processed command's name. + */ + commandName: string; + /** + * Gets or sets the errors description. + * Value: A string that is the errors description. + */ + errorText: string; + /** + * Gets or sets a value specifying whether an alert message is displayed when the event fires. + * Value: true to display an alert message; otherwise, false. + */ + showAlert: boolean; +} +/** + * A method that will handle the client FileUploading event. + */ +interface ASPxClientFileManagerFileUploadingEventHandler { + /** + * A method that will handle the FileUploading event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFileUploadingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileUploadingEventArgs): void; +} +/** + * Provides data for the FileUploading event. + */ +interface ASPxClientFileManagerFileUploadingEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where a file is being uploaded. + * Value: A string value specifying the path where a file is being uploaded. + */ + folder: string; + /** + * Gets the name of a file selected for upload. + * Value: A string value that specifies the file name. + */ + fileName: string; + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client FilesUploading event. + */ +interface ASPxClientFileManagerFilesUploadingEventHandler { + /** + * A method that will handle the FilesUploading event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFilesUploadingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFilesUploadingEventArgs): void; +} +/** + * Provides data for the FilesUploading event. + */ +interface ASPxClientFileManagerFilesUploadingEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where files are being uploaded. + * Value: A string value specifying the folder path. + */ + folder: string; + /** + * Gets the names of files selected for upload. + * Value: An array of string values that are the file names. + */ + fileNames: string[]; + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client FileUploaded event. + */ +interface ASPxClientFileManagerFileUploadedEventHandler { + /** + * A method that will handle the FileUploaded event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFileUploadedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileUploadedEventArgs): void; +} +/** + * Provides data for the FileUploaded event. + */ +interface ASPxClientFileManagerFileUploadedEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where a file is uploaded. + * Value: A string value specifying the uploaded file path. + */ + folder: string; + /** + * Gets the name of the uploaded file. + * Value: A string value that specifies the file name. + */ + fileName: string; +} +/** + * A method that will handle the client FilesUploaded event. + */ +interface ASPxClientFileManagerFilesUploadedEventHandler { + /** + * A method that will handle the FilesUploaded event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFilesUploadedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFilesUploadedEventArgs): void; +} +/** + * Provides data for the FilesUploaded event. + */ +interface ASPxClientFileManagerFilesUploadedEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where files are uploaded. + * Value: A string value specifying the uploaded files path. + */ + folder: string; + /** + * Gets an array of uploaded file names. + * Value: An array of string values that are the file names. + */ + fileNames: string[]; +} +/** + * A method that will handle the client FileDownloading event. + */ +interface ASPxClientFileManagerFileDownloadingEventHandler { + /** + * A method that will handle the FileDownloading event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFileDownloadingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileDownloadingEventArgs): void; +} +/** + * Provides data for the FileDownloading event. + */ +interface ASPxClientFileManagerFileDownloadingEventArgs extends ASPxClientFileManagerFileEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event, should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client FocusedItemChanged event. + */ +interface ASPxClientFileManagerFocusedItemChangedEventHandler { + /** + * A method that will handle the FocusedItemChanged event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFocusedItemChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFocusedItemChangedEventArgs): void; +} +/** + * Provides data for the FocusedItemChanged event. + */ +interface ASPxClientFileManagerFocusedItemChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the file manager item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientFileManagerItem; + /** + * Gets the name of the focused item. + * Value: A string value that specifies the item's name. + */ + name: string; + /** + * Gets the full name of the item currently being processed. + * Value: A string value that is the item's full name. + */ + fullName: string; +} +/** + * A method that will handle the client CurrentFolderChanged event. + */ +interface ASPxClientFileManagerCurrentFolderChangedEventHandler { + /** + * A method that will handle the CurrentFolderChanged event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerCurrentFolderChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerCurrentFolderChangedEventArgs): void; +} +/** + * Provides data for the CurrentFolderChanged event. + */ +interface ASPxClientFileManagerCurrentFolderChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the currently processed folder. + * Value: A string value that specifies the folder's name. + */ + name: string; + /** + * Gets the full name of the folder currently being processed. + * Value: A string value that is the folder's full name. + */ + fullName: string; +} +/** + * A method that will handle the client SelectionChanged event. + */ +interface ASPxClientFileManagerSelectionChangedEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerSelectionChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerSelectionChangedEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientFileManagerSelectionChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the file manager item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientFileManagerItem; + /** + * Gets the name of the currently processed file. + * Value: A string value that specifies the file's name. + */ + name: string; + /** + * Gets the full name of the file currently being processed. + * Value: A string value that is the file's full name. + */ + fullName: string; + /** + * Gets whether the item has been selected. + * Value: true if the file has been selected; otherwise, false. + */ + isSelected: boolean; +} +/** + * A method that will handle the CustomCommand event. + */ +interface ASPxClientFileManagerCustomCommandEventHandler { + /** + * A method that will handle the CustomCommand event. + * @param source The event source. + * @param e An ASPxClientFileManagerCustomCommandEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerCustomCommandEventArgs): void; +} +/** + * Provides data for the CustomCommand event. + */ +interface ASPxClientFileManagerCustomCommandEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value that is the processed command's name. + */ + commandName: string; +} +/** + * A method that will handle the ToolbarUpdating event. + */ +interface ASPxClientFileManagerToolbarUpdatingEventHandler { + /** + * A method that will handle the ToolbarUpdating event. + * @param source The event source. + * @param e An ASPxClientFileManagerToolbarUpdatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerToolbarUpdatingEventArgs): void; +} +/** + * Provides data for the ToolbarUpdating event. + */ +interface ASPxClientFileManagerToolbarUpdatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the currently active file manager area. + * Value: A string value that identifies the active area. + */ + activeAreaName: string; +} +/** + * A method that will handle the client HighlightItemTemplate event. + */ +interface ASPxClientFileManagerHighlightItemTemplateEventHandler { + /** + * A method that will handle the HighlightItemTemplate event. + * @param source The event source. This parameter identifies the file manager object that raised the event. + * @param e An ASPxClientFileManagerHighlightItemTemplateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerHighlightItemTemplateEventArgs): void; +} +/** + * Provides data for the HighlightItemTemplate event. + */ +interface ASPxClientFileManagerHighlightItemTemplateEventArgs extends ASPxClientEventArgs { + /** + * Gets a string that is a filter value specified by the filter box. + * Value: A string that is a filter value. + */ + filterValue: string; + /** + * Gets the name of the item currently being processed. + * Value: A string that is the item name. + */ + itemName: string; + /** + * Gets an element containing the item template. + * Value: An object that is an element containing the item template. + */ + templateElement: string; + /** + * Get the name of the cascading style sheet (CSS) class associated with an item in the highlighted state. + * Value: A string that is the name of a CSS class. + */ + highlightCssClassName: string; +} +/** + * Represents a client-side equivalent of the menu's MenuItem object. + */ +interface ASPxClientMenuItem { + /** + * Gets the menu object to which the current item belongs. + * Value: An ASPxClientMenuBase object representing the menu to which the item belongs. + */ + menu: ASPxClientMenuBase; + /** + * Gets the immediate parent item to which the current item belongs. + * Value: An ASPxClientMenuItem object representing the item's immediate parent. + */ + parent: ASPxClientMenuItem; + /** + * Gets the item's index within the parent's collection of items. + * Value: An integer value representing the item's zero-based index within the Items collection of the parent object (a menu or item) to which the item belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the menu item. + * Value: A string value that represents the value assigned to the item's Name property. + */ + name: string; + /** + * For internal use only. + */ + indexPath: string; + /** + * Returns the number of the current menu item's immediate child items. + */ + GetItemCount(): number; + /** + * Returns the current menu item's immediate subitem specified by its index. + * @param index An integer value specifying the zero-based index of the submenu item to be retrieved. + */ + GetItem(index: number): ASPxClientMenuItem; + /** + * Returns the current menu item's subitem specified by its name. + * @param name A string value specifying the name of the menu item. + */ + GetItemByName(name: string): ASPxClientMenuItem; + /** + * Indicates whether the menu item is checked. + */ + GetChecked(): boolean; + /** + * Specifies whether the menu item is checked. + * @param value true if the menu item is checked; otherwise, false. + */ + SetChecked(value: boolean): void; + /** + * Returns a value specifying whether a menu item is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether the menu item is enabled. + * @param value true to enable the menu item; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL pointing to the image displayed within the menu item. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the menu item. + * @param value A string value specifying the URL to the image displayed within the menu item. + */ + SetImageUrl(value: string): void; + /** + * Gets a URL which defines the navigation location for the menu item. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the navigation location for the menu item. + * @param value A string value which specifies a URL to where the client web browser will navigate when the menu item is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Returns text displayed within the menu item. + */ + GetText(): string; + /** + * Sets the text to be displayed within the menu item. + * @param value A string value specifying the text to be displayed within the menu item. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether a menu item is displayed. + */ + GetVisible(): boolean; + /** + * Specifies the menu item's visibility. + * @param value true if the menu item is visible; otherwise, false. + */ + SetVisible(value: boolean): void; +} +/** + * A client-side equivalent of the file manager's FileManagerToolbarItemBase object. + */ +interface ASPxClientFileManagerToolbarItem extends ASPxClientMenuItem { + /** + * This property is not in effect for the ASPxClientFileManagerToolbarItem class. + */ + menu: ASPxClientMenuBase; + /** + * This property is not in effect for the ASPxClientFileManagerToolbarItem class. + */ + parent: ASPxClientMenuItem; + /** + * This property is not in effect for the ASPxClientFileManagerToolbarItem class. + */ + index: number; +} +/** + * A client-side equivalent of the ASPxFormLayout's LayoutItem object. + */ +interface ASPxClientLayoutItem { + /** + * Gets the form layout object to which the current item belongs. + * Value: An object representing the form layout to which the item belongs. + */ + formLayout: ASPxClientFormLayout; + /** + * Gets the name that uniquely identifies the layout item. + * Value: A string value that represents the value assigned to the layout item's Name property. + */ + name: string; + /** + * Gets the immediate parent layout item to which the current layout item belongs. + * Value: An object representing the item's immediate parent. + */ + parent: ASPxClientLayoutItem; + /** + * Returns the current layout item's subitem specified by its name. + * @param name A string value specifying the name of the layout item. + */ + GetItemByName(name: string): ASPxClientLayoutItem; + /** + * Returns a value specifying whether a layout item is displayed. + */ + GetVisible(): boolean; + /** + * Specifies the layout item's visibility. + * @param value true, if the layout item is visible; otherwise, false. + */ + SetVisible(value: boolean): void; + /** + * Specifies the text displayed in the layout item caption. + * @param caption A string value specifying the item caption. + */ + SetCaption(caption: string): void; + /** + * Returns the text displayed in the layout item caption. + */ + GetCaption(): string; +} +/** + * Represents a client-side equivalent of the ASPxFormLayout object. + */ +interface ASPxClientFormLayout extends ASPxClientControl { + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientLayoutItem; +} +/** + * Represents a client-side equivalent of the ASPxGlobalEvents component. + */ +interface ASPxClientGlobalEvents { + /** + * Occurs on the client side after client object models of all DevExpress web controls contained within the page have been initialized. + */ + ControlsInitialized: ASPxClientEvent>; + /** + * Occurs when the browser window is being resized. + */ + BrowserWindowResized: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated by any DevExpress control. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side, after server-side processing of a callback initiated by any DevExpress web control, has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by any of DevExpress web controls. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side after the validation initiated for a DevExpress web control (or a group of DevExpress web controls) has been completed. + */ + ValidationCompleted: ASPxClientEvent>; +} +/** + * Represents a client-side equivalent of the ASPxHiddenField control. + */ +interface ASPxClientHiddenField extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientHiddenField. + */ + CallbackError: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Adds a new value to the control's collection of property name/value pairs, on the client side. + * @param propertyName A string value that specifies the property name. It can contain letters, digits, underline characters, and dollar signs. It cannot begin with a digit character. + * @param propertyValue An object that represents the value of the specified property. + */ + Add(propertyName: string, propertyValue: Object): void; + /** + * Returns the value with the specified property name. + * @param propertyName A string value that specifies the property name. + */ + Get(propertyName: string): Object; + /** + * Adds a new value to the control's collection of property name/value pairs, on the client side. + * @param propertyName A string value that specifies the property name. It can contain letters, digits, underline characters, and dollar signs. It cannot begin with a digit character. + * @param propertyValue An object that represents the property value. + */ + Set(propertyName: string, propertyValue: Object): void; + /** + * Removes the specified value from the ASPxHiddenField collection. + * @param propertyName A string value representing the property name. + */ + Remove(propertyName: string): void; + /** + * Clears the ASPxHiddenField's value collection. + */ + Clear(): void; + /** + * Returns a value indicating whether the value with the specified property name is contained within the ASPxHiddenField control's value collection. + * @param propertyName A string value that specifies the property name. + */ + Contains(propertyName: string): boolean; +} +/** + * The client-side equivalent of the ASPxImageGallery control. + */ +interface ASPxClientImageGallery extends ASPxClientDataView { + /** + * Fires on the client side before the fullscreen viewer is shown and allows you to cancel the action. + */ + FullscreenViewerShowing: ASPxClientEvent>; + /** + * Occurs on the client side after an active item has been changed within the fullscreen viewer. + */ + FullscreenViewerActiveItemIndexChanged: ASPxClientEvent>; + /** + * Shows the fullscreen viewer with the specified active item. + * @param index An Int32 value that is an index of the active item. + */ + ShowFullscreenViewer(index: number): void; + /** + * Hides the fullscreen viewer. + */ + HideFullscreenViewer(): void; + /** + * Makes the specified item active within the fullscreen viewer on the client side. + * @param index An integer value specifying the index of the item to select. + * @param preventAnimation true to prevent the animation effect; false to change images using animation. + */ + SetFullscreenViewerActiveItemIndex(index: number, preventAnimation: boolean): void; + /** + * Gets the number of items contained in the control's item collection. + */ + GetFullscreenViewerItemCount(): number; + /** + * Returns the index of the active item within the fullscreen viewer. + */ + GetFullscreenViewerActiveItemIndex(): number; + /** + * Plays a slide show within a fullscreen viewer. + */ + PlaySlideShow(): void; + /** + * Pauses a slide show within a fullscreen viewer. + */ + PauseSlideShow(): void; +} +/** + * A method that will handle the client FullscreenViewerShowing event. + */ +interface ASPxClientImageGalleryCancelEventHandler { + /** + * A method that will handle the FullscreenViewerShowing event. + * @param source The event source. Identifies the ASPxImageGallery control that raised the event. + * @param e An ASPxClientImageGalleryCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientImageGalleryCancelEventArgs): void; +} +/** + * Provides data for the FullscreenViewerShowing event. + */ +interface ASPxClientImageGalleryCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An value that is the related item's index. + */ + index: number; + /** + * Gets the unique identifier name of the item related to the event. + * Value: A string value that specifies the item's unique identifier name. + */ + name: string; +} +/** + * A method that will handle the client FullscreenViewerActiveItemIndexChanged event. + */ +interface ASPxClientImageGalleryFullscreenViewerEventHandler { + /** + * A method that will handle the FullscreenViewerActiveItemIndexChanged event. + * @param source The event source. Identifies the ASPxImageGallery control that raised the event. + * @param e An ASPxClientImageGalleryFullscreenViewerEventArgs object that contains event data. + */ + (source: S, e: ASPxClientImageGalleryFullscreenViewerEventArgs): void; +} +/** + * Provides data for the FullscreenViewerActiveItemIndexChanged event. + */ +interface ASPxClientImageGalleryFullscreenViewerEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An value that is the related item's index. + */ + index: number; + /** + * Gets the unique identifier name of the item related to the event. + * Value: A string value that specifies the item's unique identifier name. + */ + name: string; +} +/** + * A client-side equivalent of the ASPxImageSlider object. + */ +interface ASPxClientImageSlider extends ASPxClientControl { + /** + * Occurs after the active image, displayed within the image area, is changed. + */ + ActiveItemChanged: ASPxClientEvent>; + /** + * Fires after an image item has been clicked within the image area. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when a thumbnail is clicked. + */ + ThumbnailItemClick: ASPxClientEvent>; + /** + * Returns an item specified by its index within the image slider's item collection. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): ASPxClientImageSliderItem; + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientImageSliderItem; + /** + * Returns the index of the active item within the image slider control. + */ + GetActiveItemIndex(): number; + /** + * Makes the specified item active within the image slider control on the client side. + * @param index An integer value specifying the index of the item to select. + * @param preventAnimation true to prevent the animation effect; false to change images using animation. + */ + SetActiveItemIndex(index: number, preventAnimation: boolean): void; + /** + * Returns the active item within the ASPxImageSlider control. + */ + GetActiveItem(): ASPxClientImageSliderItem; + /** + * Makes the specified item active within the image slider control on the client side. + * @param item An ASPxClientImageSliderItem object specifying the item to select. + * @param preventAnimation true to prevent animation effect; false to enable animation. + */ + SetActiveItem(item: ASPxClientImageSliderItem, preventAnimation: boolean): void; + /** + * Gets the number of items contained in the control's item collection. + */ + GetItemCount(): number; + /** + * Sets input focus to the ASPxImageSlider control. + */ + Focus(): void; + /** + * Plays a slide show within an image slider. + */ + Play(): void; + /** + * Pauses a slide show within image slider. + */ + Pause(): void; + /** + * Gets a value indicating whether the slide show is playing. + */ + IsSlideShowPlaying(): boolean; +} +/** + * A method that will handle the ItemClick events. + */ +interface ASPxClientImageSliderItemEventHandler { + /** + * A method that will handle the ItemClick events. + * @param source The event source. Identifies the ASPxImageSlider control that raised the event. + * @param e An ASPxClientImageSliderItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientImageSliderItemEventArgs): void; +} +/** + * Provides data for the ItemClick events. + */ +interface ASPxClientImageSliderItemEventArgs extends ASPxClientEventArgs { + /** + * Gets an item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientImageSliderItem; +} +/** + * A client-side equivalent of the image slider's ImageSliderItem object. + */ +interface ASPxClientImageSliderItem { + /** + * Gets an image slider to which the current item belongs. + * Value: An object that is the item's owner. + */ + imageSlider: ASPxClientImageSlider; + /** + * Gets the item's index within an items collection. + * Value: An integer value is the item's zero-based index within the Items collection. + */ + index: number; + /** + * Gets the name that uniquely identifies the image slider item. + * Value: A string value that is the value assigned to the item's Name property. + */ + name: string; + /** + * Gets or sets the path to the image displayed within the ASPxClientImageSliderItem. + * Value: A value specifying the path to the image. + */ + imageUrl: string; + /** + * Gets the item's display text. + * Value: A string value that is the item's display text. + */ + text: string; +} +/** + * The client-side equivalent of the ASPxImageZoomNavigator object. + */ +interface ASPxClientImageZoomNavigator extends ASPxClientImageSlider { +} +/** + * A client-side equivalent of the ASPxImageZoom object. + */ +interface ASPxClientImageZoom extends ASPxClientControl { + /** + * Sets the properties on an image displayed in the image zoom control. + * @param imageUrl A string value specifying the path to the preview image displayed in the preview image. + * @param largeImageUrl A string value specifying the path to the preview image displayed in the zoom window and the expand window. + * @param zoomWindowText A string value specifying the text displayed in the zoom window. + * @param expandWindowText A string value specifying the text displayed in the expand window. + * @param alternateText A string value that specifies the alternate text displayed instead of the image. + */ + SetImageProperties(imageUrl: string, largeImageUrl: string, zoomWindowText: string, expandWindowText: string, alternateText: string): void; +} +/** + * Represents a client-side equivalent of the ASPxLoadingPanel control. + */ +interface ASPxClientLoadingPanel extends ASPxClientControl { + /** + * Invokes the loading panel. + */ + Show(): void; + /** + * Invokes the loading panel, displaying it over the specified HTML element. + * @param htmlElement An object that specifies the required HTML element. + */ + ShowInElement(htmlElement: Object): void; + /** + * Invokes the loading panel, displaying it over the specified element. + * @param id A string that specifies the required element's identifier. + */ + ShowInElementByID(id: string): void; + /** + * Invokes the loading panel at the specified position. + * @param x An integer value specifying the x-coordinate of the loading panel's display position. + * @param y An integer value specifying the y-coordinate of the loaidng panel's display position. + */ + ShowAtPos(x: number, y: number): void; + /** + * Sets the text to be displayed within the ASPxLoadingPanel. + * @param text A string value specifying the text to be displayed within the ASPxLoadingPanel. + */ + SetText(text: string): void; + /** + * Gets the text displayed within the ASPxLoadingPanel. + */ + GetText(): string; + /** + * Hides the loading panel. + */ + Hide(): void; +} +/** + * Serves as the base type for the ASPxClientPopupMenu objects. + */ +interface ASPxClientMenuBase extends ASPxClientControl { + /** + * Fires after a menu item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor is moved into a menu item. + */ + ItemMouseOver: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor moves outside a menu item. + */ + ItemMouseOut: ASPxClientEvent>; + /** + * Occurs on the client side when a submenu pops up. + */ + PopUp: ASPxClientEvent>; + /** + * Occurs on the client side when a submenu closes. + */ + CloseUp: ASPxClientEvent>; + /** + * Returns the number of menu items at the root menu level. + */ + GetItemCount(): number; + /** + * Returns the menu's root menu item specified by its index. + * @param index An integer value specifying the zero-based index of the root menu item to be retrieved. + */ + GetItem(index: number): ASPxClientMenuItem; + /** + * Returns a menu item specified by its name. + * @param name A string value specifying the name of the menu item. + */ + GetItemByName(name: string): ASPxClientMenuItem; + /** + * Returns the selected item within the menu control. + */ + GetSelectedItem(): ASPxClientMenuItem; + /** + * Selects the specified menu item within a menu control on the client side. + * @param item An ASPxClientMenuItem object specifying the menu item to select. + */ + SetSelectedItem(item: ASPxClientMenuItem): void; + /** + * Returns a root menu item. + */ + GetRootItem(): ASPxClientMenuItem; +} +/** + * Represents a client collection that maintains client menu objects. + */ +interface ASPxClientMenuCollection extends ASPxClientControlCollection { + /** + * Recalculates the position of visible sub menus. + */ + RecalculateAll(): void; + /** + * Hides all menus maitained by the collection. + */ + HideAll(): void; +} +/** + * Represents a client-side equivalent of the ASPxMenu object. + */ +interface ASPxClientMenu extends ASPxClientMenuBase { + /** + * Gets a value specifying the menu orientation. + */ + GetOrientation(): string; + /** + * Sets the menu orientation. + * @param orientation 'Vertical' to orient the menu vertically; 'Horizontal' to orient the menu horizontally. + */ + SetOrientation(orientation: string): void; +} +/** + * A method that will handle the menu's client events concerning manipulations with an item. + */ +interface ASPxClientMenuItemEventHandler { + /** + * A method that will handle the menu's client events concerning manipulations with an item. + * @param source The event source. This parameter identifies the menu object which raised the event. + * @param e An ASPxClientMenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientMenuItemEventArgs): void; +} +/** + * Provides data for events which concern manipulations on menu items. + */ +interface ASPxClientMenuItemEventArgs extends ASPxClientEventArgs { + /** + * Gets the menu item object related to the event. + * Value: An ASPxClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; +} +/** + * A method that will handle client events which relate to mouse hovering (such as entering or leaving) over menu items. + */ +interface ASPxClientMenuItemMouseEventHandler { + /** + * A method that will handle the ItemMouseOver events. + * @param source An object representing the event source. + * @param e A MenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientMenuItemMouseEventArgs): void; +} +/** + * Provides data for client events which relate to mouse hovering (such as entering or leaving) over menu items. + */ +interface ASPxClientMenuItemMouseEventArgs extends ASPxClientMenuItemEventArgs { + /** + * Gets the HTML object that contains the processed item. + * Value: An HTML object representing a container for the item related to the event. + */ + htmlElement: Object; +} +/** + * A method that will handle client events concerning clicks on the control's items. + */ +interface ASPxClientMenuItemClickEventHandler { + /** + * A method that will handle client ItemClick events. + * @param source An object representing the event source. + * @param e A MenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientMenuItemClickEventArgs): void; +} +/** + * Provides data for events which concern clicking on the control's items. + */ +interface ASPxClientMenuItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the menu item object related to the event. + * Value: An ASPxClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Contains options affecting the touch scrolling functionality. + */ +interface ASPxClientTouchUIOptions { + /** + * Gets or sets a value that specifies whether or not the horizontal scroll bar should be displayed. + * Value: true to display the horizontal scroll bar; otherwise, false. The default value is true. + */ + showHorizontalScrollbar: boolean; + /** + * Gets or sets a value that specifies whether or not the vertical scroll bar should be displayed. + * Value: true to display the vertical scroll bar; otherwise, false. The default value is true. + */ + showVerticalScrollbar: boolean; + /** + * Gets or sets the name of the CSS class defining the vertical scroll bar's appearance. + * Value: A string value specifying the class name. + */ + vScrollClassName: string; + /** + * Gets or sets the name of the CSS class defining the horizontal scroll bar's appearance. + * Value: A string value specifying the class name. + */ + hScrollClassName: string; +} +/** + * Contains a method allowing you to apply the current scroll extender to a specific element. + */ +interface ScrollExtender { + /** + * Applies the current scroll extender to the element specified by the ID. + * @param id A string value specifying the element's ID. + */ + ChangeElement(id: string): void; + /** + * Applies the current scroll extender to the specified DOM element. + * @param element An object specifying the required DOM element. + */ + ChangeElement(element: Object): void; +} +/** + * Represents a client-side equivalent of the ASPxNavBar control. + */ +interface ASPxClientNavBar extends ASPxClientControl { + /** + * Fires after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Fires on the client side after a group's expansion state has been changed. + */ + ExpandedChanged: ASPxClientEvent>; + /** + * Fires on the client side before the expansion state of a group is changed. + */ + ExpandedChanging: ASPxClientEvent>; + /** + * Fires when a group header is clicked. + */ + HeaderClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientNavBar. + */ + CallbackError: ASPxClientEvent>; + /** + * Returns the number of groups in the navbar. + */ + GetGroupCount(): number; + /** + * Returns a group specified by its index. + * @param index An integer value specifying the zero-based index of the group object to retrieve. + */ + GetGroup(index: number): ASPxClientNavBarGroup; + /** + * Returns a group specified by its name. + * @param name A string value specifying the name of the group. + */ + GetGroupByName(name: string): ASPxClientNavBarGroup; + /** + * Returns the navbar's active group. + */ + GetActiveGroup(): ASPxClientNavBarGroup; + /** + * Makes the specified group active. + * @param group A ASPxClientNavBarGroup object that specifies the active group. + */ + SetActiveGroup(group: ASPxClientNavBarGroup): void; + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientNavBarItem; + /** + * Returns the selected item within the navbar control. + */ + GetSelectedItem(): ASPxClientNavBarItem; + /** + * Selects the specified item within the navbar control on the client side. + * @param item An ASPxClientNavBarItem object specifying the item to select. + */ + SetSelectedItem(item: ASPxClientNavBarItem): void; + /** + * Collapses all groups of the navbar. + */ + CollapseAll(): void; + /** + * Expands all groups of the navbar. + */ + ExpandAll(): void; +} +/** + * Represents a client-side equivalent of the navbar's NavBarGroup object. + */ +interface ASPxClientNavBarGroup { + /** + * Gets the navbar to which the current group belongs. + * Value: An ASPxClientNavBar object representing the navbar to which the group belongs. + */ + navBar: ASPxClientNavBar; + /** + * Gets the group's index within a collection of a navbar's groups. + * Value: An integer value representing the group's zero-based index within the Groups collection of the navbar to which the group belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the group. + * Value: A string value that represents the value assigned to the group's Name property. + */ + name: string; + /** + * Returns a value specifying whether a group is enabled. + */ + GetEnabled(): boolean; + /** + * Returns a value specifying whether the group is expanded. + */ + GetExpanded(): boolean; + /** + * Sets the group's expansion state. + * @param value true to expand the group; false to collapse the group. + */ + SetExpanded(value: boolean): void; + /** + * Returns a value specifying whether a group is displayed. + */ + GetVisible(): boolean; + /** + * Returns text displayed within a group. + */ + GetText(): string; + /** + * Specifies the text displayed within a group. + * @param text A string value that is the text displayed within the navbar group. + */ + SetText(text: string): void; + /** + * Specifies whether the group is visible. + * @param value true if the group is visible; otherwise, false. + */ + SetVisible(value: boolean): void; + /** + * Returns the number of items in the group. + */ + GetItemCount(): number; + /** + * Returns the group's item specified by its index. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): ASPxClientNavBarItem; + /** + * Returns a group item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientNavBarItem; +} +/** + * Represents a client-side equivalent of the navbar's NavBarItem object. + */ +interface ASPxClientNavBarItem { + /** + * Gets the navbar to which the current item belongs. + * Value: An ASPxClientNavBar object representing the navbar to which the item belongs. + */ + navBar: ASPxClientNavBar; + /** + * Gets the group to which the current item belongs. + * Value: An ASPxClientNavBarGroup object representing the group to which the item belongs. + */ + group: ASPxClientNavBarGroup; + /** + * Gets the item's index within a collection of a group's items. + * Value: An integer value representing the item's zero-based index within the Items collection of the group to which the item belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the item. + * Value: A string value that represents the value assigned to the item's Name property. + */ + name: string; + /** + * Returns a value indicating whether an item is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether the item is enabled. + * @param value true if the item is enabled; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL which points to the image displayed within the item. + */ + GetImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the item. + * @param value A string value that specifies the URL to the image displayed within the item. + */ + SetImageUrl(value: string): void; + /** + * Gets an URL which defines the item's navigation location. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the item's navigation location. + * @param value A string value which represents the URL to where the client web browser will navigate when the item is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Returns text displayed within the item. + */ + GetText(): string; + /** + * Specifies the text displayed within the item. + * @param value A string value that represents the text displayed within the item. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether an item is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether the item is visible. + * @param value true is the item is visible; otherwise, false. + */ + SetVisible(value: boolean): void; +} +/** + * A method that will handle the navbar's client events concerning manipulations with an item. + */ +interface ASPxClientNavBarItemEventHandler { + /** + * A method that will handle the navbar's client events concerning manipulations with an item. + * @param source An object representing the event's source. Identifies the navbar object that raised the event. + * @param e An ASPxClientNavBarItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarItemEventArgs): void; +} +/** + * Provides data for events which concern manipulations on items. + */ +interface ASPxClientNavBarItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the item object related to the event. + * Value: An ASPxClientNavBarItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientNavBarItem; + /** + * Gets the HTML object that contains the processed navbar item. + * Value: An object representing a container for the navbar item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the navbar's client events concerning manipulations with a group. + */ +interface ASPxClientNavBarGroupEventHandler { + /** + * A method that will handle the navbar's client events concerning manipulations with a group. + * @param source An object representing the event's source. Identifies the navbar object that raised the event. + * @param e An ASPxClientNavBarGroupEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarGroupEventArgs): void; +} +/** + * Provides data for events which concern manipulations on groups. + */ +interface ASPxClientNavBarGroupEventArgs extends ASPxClientEventArgs { + /** + * Gets the group object related to the event. + * Value: An ASPxClientNavBarGroup object, manipulations on which forced the event to be raised. + */ + group: ASPxClientNavBarGroup; +} +/** + * A method that will handle the navbar's cancelable client events concerning manipulations with a group. + */ +interface ASPxClientNavBarGroupCancelEventHandler { + /** + * A method that will handle the navbar's cancelable client events concerning manipulations with a group. + * @param source An object representing the event's source. Identifies the navbar object that raised the event. + * @param e An ASPxClientNavBarGroupCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarGroupCancelEventArgs): void; +} +/** + * Provides data for cancellable events which concern manipulations on groups. + */ +interface ASPxClientNavBarGroupCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the group object related to the event. + * Value: An ASPxClientNavBarGroup object representing the group manipulations on which forced the navbar to raise the event. + */ + group: ASPxClientNavBarGroup; +} +/** + * A method that will handle client events concerning clicks on the control's group headers. + */ +interface ASPxClientNavBarGroupClickEventHandler { + /** + * A method that will handle the navbar's client events concerning clicks on groups. + * @param source The event source. This parameter identifies the navbar object which raised the event. + * @param e An ASPxClientNavBarGroupClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarGroupClickEventArgs): void; +} +/** + * Provides data for events which concern clicking on the control's group headers. + */ +interface ASPxClientNavBarGroupClickEventArgs extends ASPxClientNavBarGroupCancelEventArgs { + /** + * Gets the HTML object that contains the processed group. + * Value: An object representing a container for the group related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxNewsControl object. + */ +interface ASPxClientNewsControl extends ASPxClientDataView { + /** + * Fires after an item's tail has been clicked. + */ + TailClick: ASPxClientEvent>; +} +/** + * A method that will handle client events concerning manipulations with an item. + */ +interface ASPxClientNewsControlItemEventHandler { + /** + * A method that will handle the news control's client events concerning manipulations with an item. + * @param source An object representing the event's source. Identifies the news control object that raised the event. + * @param e An ASPxClientNewsControlItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNewsControlItemEventArgs): void; +} +/** + * Provides data for events which concern tail clicking within the control's items. + */ +interface ASPxClientNewsControlItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the name that uniquely identifies the processed item. + * Value: A string value that represents the value assigned to the processed item's Name property. + */ + name: Object; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxObjectContainer control. + */ +interface ASPxClientObjectContainer extends ASPxClientControl { + /** + * Occurs on the client side when the FSCommand action is called within the associated flash object's action script. + */ + FlashScriptCommand: ASPxClientEvent>; + /** + * Play the Flash movie backwards. + */ + Back(): void; + /** + * Returns the value of the Flash variable specified. + * @param name A string value that specifies the Flash variable. + */ + GetVariable(name: string): string; + /** + * Play the Flash movie forwards. + */ + Forward(): void; + /** + * Activates the specified frame in the Flash movie. + * @param frameNumber An integer value that specifies the requested frame. + */ + GotoFrame(frameNumber: number): void; + /** + * Indicates whether the Flash movie is currently playing. + */ + IsPlaying(): boolean; + /** + * Loads the Flash movie to the specified layer. + * @param layerNumber An integer value that identifies a layer in which to load the movie. + * @param url A string value that specifies the movie's URL. + */ + LoadMovie(layerNumber: number, url: string): void; + /** + * Pans a zoomed-in Flash movie to the specified coordinates. + * @param x An integer value that specifies the X-coordinate. + * @param y An integer value that specifies the Y-coordinate. + * @param mode 0 the coordinates are pixels; 1 the coordinates are a percentage of the window. + */ + Pan(x: number, y: number, mode: number): void; + /** + * Returns the percent of the Flash Player movie that has streamed into the browser so far. + */ + PercentLoaded(): string; + /** + * Starts playing the Flash movie. + */ + Play(): void; + /** + * Rewinds the Flash movie to the first frame. + */ + Rewind(): void; + /** + * Sets the value of the specified Flash variable. + * @param name A string value that specifies the Flash variable. + * @param value A string value that represents a new value. + */ + SetVariable(name: string, value: string): void; + /** + * Zooms in on the specified rectangular area of the Flash movie. + * @param left An integer value that specifies the x-coordinate of the rectangle's left side, in twips. + * @param top An integer value that specifies the y-coordinate of the rectangle's top side, in twips. + * @param right An integer value that specifies the x-coordinate of the rectangle's right side, in twips. + * @param bottom An integer value that specifies the y-coordinate of the rectangle's bottom side, in twips. + */ + SetZoomRect(left: number, top: number, right: number, bottom: number): void; + /** + * Stops playing the Flash movie. + */ + StopPlay(): void; + /** + * Returns the total number of frames in the Flash movie. + */ + TotalFrames(): number; + /** + * Zooms the Flash view by a relative scale factor. + * @param percent An integer value that specifies the relative scale factor, as a percentage. + */ + Zoom(percent: number): void; + /** + * Starts playing a Quick Time movie. + */ + QTPlay(): void; + /** + * Stops playing a Quick Time movie. + */ + QTStopPlay(): void; + /** + * Rewinds a Quick Time movie to the first frame. + */ + QTRewind(): void; + /** + * Steps through a Quick Time video stream by a specified number of frames. + * @param count An integer value that specifies the number of frames to step. + */ + QTStep(count: number): void; +} +/** + * A method that will handle the FlashScriptCommand event. + */ +interface ASPxClientFlashScriptCommandEventHandler { + /** + * A method that will handle the FlashScriptCommand event. + * @param source The event source. + * @param e A ASPxClientFlashScriptCommandEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFlashScriptCommandEventArgs): void; +} +/** + * Provides data for the FlashScriptCommand client event. + */ +interface ASPxClientFlashScriptCommandEventArgs extends ASPxClientEventArgs { + /** + * Gets a command passed via the FSCommand action of the flash object. + * Value: A string that represents the value of the FSCommand action's command parameter. + */ + command: string; + /** + * Gets arguments passed via the FSCommand action of the flash object. + * Value: A string that represents the value of the FSCommand action's args parameter. + */ + args: string; +} +/** + * Lists the available link types within office documents. + */ +interface ASPxClientOfficeDocumentLinkType { +} +interface ASPxClientPager extends ASPxClientControl { +} +/** + * Represents a client-side equivalent of the ASPxPopupControl control. + */ +interface ASPxClientPopupControl extends ASPxClientPopupControlBase { + /** + * Occurs when a popup window's close button is clicked. + */ + CloseButtonClick: ASPxClientEvent>; + /** + * This method is not in effect for a ASPxClientPopupControl object. + */ + GetMainElement(): Object; + /** + * Returns an object containing the information about a mouse event that invoked a default popup window. + */ + GetPopUpReasonMouseEvent(): Object; + /** + * Returns an object containing the information about a mouse event that invoked the specified popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowPopUpReasonMouseEvent(window: ASPxClientPopupWindow): Object; + /** + * + * @param window + * @param parameter + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void; + /** + * Sends a callback with parameters to update the popup window by processing the related popup window and the passed information on the server. + * @param window A ASPxClientPopupWindow object identifying the processed popup window. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Specifies the default popup window's size. + * @param width An integer value that specifies the default popup window's width. + * @param height An integer value that specifies the default popup window's height. + */ + SetSize(width: number, height: number): void; + /** + * Gets the width of the specified popup window's content region. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowContentWidth(window: ASPxClientPopupWindow): number; + /** + * Gets the height of the specified popup window's content region. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowContentHeight(window: ASPxClientPopupWindow): number; + /** + * Returns the height of a specific popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowHeight(window: ASPxClientPopupWindow): number; + /** + * Returns the width of a specific popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowWidth(window: ASPxClientPopupWindow): number; + /** + * Specifies the size of a specific popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + * @param width An integer value that specifies the required popup window's width. + * @param height An integer value that specifies the required popup window's height. + */ + SetWindowSize(window: ASPxClientPopupWindow, width: number, height: number): void; + /** + * Returns the HTML code that is the content of the popup control's default popup window. + */ + GetContentHTML(): string; + /** + * Defines the HTML content for the popup control's default popup window. + * @param html A string value that is the HTML code defining the content of the popup window. + */ + SetContentHTML(html: string): void; + /** + * Sets the ID of a web control or HTML element (or a list of IDs) with which the current popup control's window is associated. + * @param window An ASPxClientPopupWindow object representing a popup control's window. + * @param popupElementId A string value specifying the ID (or a list of IDs) of the web control or HTML element with which the popup control's window is associated. + */ + SetWindowPopupElementID(window: ASPxClientPopupWindow, popupElementId: string): void; + /** + * Sets the ID of a web control or HTML element (or a list of IDs) with which the current popup control is associated. + * @param popupElementId A string value specifying the ID (or a list of IDs) of the web control or HTML element to which the popup control is associated. + */ + SetPopupElementID(popupElementId: string): void; + /** + * Returns an index of the object that invoked the default window within the PopupElementID list. + */ + GetCurrentPopupElementIndex(): number; + /** + * Returns an index of the object that invoked the specified popup window, within the window's PopupElementID list. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowCurrentPopupElementIndex(window: ASPxClientPopupWindow): number; + /** + * Returns an object that invoked the default window. + */ + GetCurrentPopupElement(): Object; + /** + * Returns an object that invoked the specified popup window. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowCurrentPopupElement(window: ASPxClientPopupWindow): Object; + /** + * Returns a value that specifies whether the popup control's specific window is displayed. + * @param window A ASPxClientPopupWindow object representing the popup window whose visibility is checked. + */ + IsWindowVisible(window: ASPxClientPopupWindow): boolean; + /** + * Returns a popup window specified by its index. + * @param index An integer value specifying the zero-based index of the popup window object to be retrieved. + */ + GetWindow(index: number): ASPxClientPopupWindow; + /** + * Returns a popup window specified by its name. + * @param name A string value specifying the name of the popup window. + */ + GetWindowByName(name: string): ASPxClientPopupWindow; + /** + * Returns the number of popup windows in the popup control. + */ + GetWindowCount(): number; + /** + * Invokes the popup control's specific window. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + */ + ShowWindow(window: ASPxClientPopupWindow): void; + /** + * Invokes the specified popup window at the popup element with the specified index. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + * @param popupElementIndex An integer value specifying the zero-based index of the popup element within the window's PopupElementID list. + */ + ShowWindow(window: ASPxClientPopupWindow, popupElementIndex: number): void; + /** + * Invokes the popup control's specific window and displays it over the specified HTML element. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + * @param htmlElement An object specifying the HTML element relative to whose position the default popup window is invoked. + */ + ShowWindowAtElement(window: ASPxClientPopupWindow, htmlElement: Object): void; + /** + * Invokes the popup control's specific window and displays it over an HTML element specified by its unique identifier. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + * @param id A string value that specifies the hierarchically qualified identifier of an HTML element relative to whose position the default popup window is invoked. + */ + ShowWindowAtElementByID(window: ASPxClientPopupWindow, id: string): void; + /** + * Invokes the popup control's specific popup window at the specified position. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + * @param x A integer value specifying the x-coordinate of the popup window's display position. + * @param y A integer value specifying the y-coordinate of the popup window's display position. + */ + ShowWindowAtPos(window: ASPxClientPopupWindow, x: number, y: number): void; + /** + * Brings the specified popup window to the front of the z-order. + * @param window A ASPxClientPopupWindow object representing the popup window. + */ + BringWindowToFront(window: ASPxClientPopupWindow): void; + /** + * Closes the popup control's specified window. + * @param window A ASPxClientPopupWindow object representing the popup window to close. + */ + HideWindow(window: ASPxClientPopupWindow): void; + /** + * Returns the HTML code that represents the contents of the specified popup window. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowContentHtml(window: ASPxClientPopupWindow): string; + /** + * Defines the HTML content for a specific popup window within the popup control. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + * @param html A string value that represents the HTML code defining the content of the specified popup window. + */ + SetWindowContentHtml(window: ASPxClientPopupWindow, html: string): void; + /** + * Returns an iframe object containing a web page specified via the specified popup window's SetWindowContentUrl client method). + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + GetWindowContentIFrame(window: ASPxClientPopupWindow): Object; + /** + * Returns the URL pointing to the web page displayed within the control's specific popup window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + GetWindowContentUrl(window: ASPxClientPopupWindow): string; + /** + * Sets the URL pointing to the web page that should be loaded into and displayed within the control's specific popup window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param url A string value specifying the URL to the web page to be displayed within the specified popup window. + */ + SetWindowContentUrl(window: ASPxClientPopupWindow, url: string): void; + /** + * Returns a value indicating whether the specified window is pinned. + * @param window An ASPxClientPopupWindow object specifying the popup window. + */ + GetWindowPinned(window: ASPxClientPopupWindow): boolean; + /** + * Sets a value indicating whether the specified window is pinned. + * @param window An ASPxClientPopupWindow object specifying the popup window. + * @param value true to pin the window; otherwise, false. + */ + SetWindowPinned(window: ASPxClientPopupWindow, value: boolean): void; + /** + * Returns a value indicating whether the specified window is maximized. + * @param window An ASPxClientPopupWindow object specifying the popup window. + */ + GetWindowMaximized(window: ASPxClientPopupWindow): boolean; + /** + * Sets a value indicating whether the specified window is maximized. + * @param window An ASPxClientPopupWindow object specifying the popup window. + * @param value true to maximize the window; otherwise, false. + */ + SetWindowMaximized(window: ASPxClientPopupWindow, value: boolean): void; + /** + * Returns a value indicating whether the specified window is collapsed. + * @param window An ASPxClientPopupWindow object specifying the popup window. + */ + GetWindowCollapsed(window: ASPxClientPopupWindow): boolean; + /** + * Sets a value indicating whether the specified window is collapsed. + * @param window An ASPxClientPopupWindow object specifying the popup window. + * @param value true to collapse the window; otherwise, false. + */ + SetWindowCollapsed(window: ASPxClientPopupWindow, value: boolean): void; + /** + * Refreshes the content of the web page displayed within the control's specific popup window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + RefreshWindowContentUrl(window: ASPxClientPopupWindow): void; + /** + * Updates the default popup window's position, to correctly align it at either the specified element, or the center of the browser's window. + */ + UpdatePosition(): void; + /** + * Updates the default popup window's position, to correctly align it at the specified HTML element. + * @param htmlElement An object specifying the HTML element to which the default popup window is aligned using the PopupVerticalAlign properties. + */ + UpdatePositionAtElement(htmlElement: Object): void; + /** + * Updates the specified popup window's position, to correctly align it at either the specified element, or the center of the browser's window. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + UpdateWindowPosition(window: ASPxClientPopupWindow): void; + /** + * Updates the specified popup window's position, to correctly align it at the specified HTML element. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + * @param htmlElement An object specifying the HTML element to which the specified popup window is aligned using the PopupVerticalAlign properties. + */ + UpdateWindowPositionAtElement(window: ASPxClientPopupWindow, htmlElement: Object): void; + /** + * Refreshes the connection between the ASPxPopupControl and the popup element. + */ + RefreshPopupElementConnection(): void; +} +/** + * Represents a client-side equivalent of a popup control's PopupWindow object. + */ +interface ASPxClientPopupWindow { + /** + * Gets the popup control to which the current popup window belongs. + * Value: An ASPxClientPopupControl object representing the popup control to which the window belongs. + */ + popupControl: ASPxClientPopupControl; + /** + * Gets the index of the current popup window within the popup control's Windows collection. + * Value: An integer value representing the zero-based index of the current popup window within the Windows collection of the popup control to which the window belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the current popup window. + * Value: A string value that represents a value assigned to the popup window's Name property. + */ + name: string; + /** + * Returns the URL pointing to the image displayed within the window header. + */ + GetHeaderImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the window header. + * @param value A string value that is the URL to the image displayed within the header. + */ + SetHeaderImageUrl(value: string): void; + /** + * Returns the URL pointing to the image displayed within the window footer. + */ + GetFooterImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the window footer. + * @param value A string value that is the URL to the image displayed within the window footer. + */ + SetFooterImageUrl(value: string): void; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within the popup window's header. + */ + GetHeaderNavigateUrl(): string; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within the popup window's header. + * @param value A string value which specifies the required navigation location. + */ + SetHeaderNavigateUrl(value: string): void; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within the popup window's footer. + */ + GetFooterNavigateUrl(): string; + /** + * Specifies the URL where the web browser will navigate when the text or image is clicked within the popup window's footer. + * @param value A string value which specifies the required navigation location. + */ + SetFooterNavigateUrl(value: string): void; + /** + * Returns the text displayed within the window's header. + */ + GetHeaderText(): string; + /** + * Specifies the text displayed within the window's header. + * @param value A string value that specifies the window's header text. + */ + SetHeaderText(value: string): void; + /** + * Returns the text displayed within the popup window's footer. + */ + GetFooterText(): string; + /** + * Specifies the text displayed within the window's footer. + * @param value A string value that specifies the window's footer text. + */ + SetFooterText(value: string): void; +} +/** + * A method that will handle the popup control's client events invoked in response to manipulating a popup window. + */ +interface ASPxClientPopupWindowEventHandler { + /** + * A method that will handle the popup control's client events when a popup window is manipulated. + * @param source An object representing the event's source. Identifies the popup control object (ASPxClientPopupControl) that raised the event. + * @param e An ASPxClientPopupWindowEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowEventArgs): void; +} +/** + * Provides data for events concerning client manipulations on popup windows. + */ +interface ASPxClientPopupWindowEventArgs extends ASPxClientEventArgs { + /** + * Gets the popup window object related to the event. + * Value: An ASPxClientPopupWindow object representing the popup window that was manipulated, causing the popup control to raise the event. + */ + window: ASPxClientPopupWindow; +} +/** + * A method that will handle the popup window's cancellable client events, such as the Closing. + */ +interface ASPxClientPopupWindowCancelEventHandler { + /** + * A method that will handle the popup window's cancelable client events. + * @param source An object representing the event's source. Identifies the popup window object that raised the event. + * @param e An ASPxClientPopupWindowCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowCancelEventArgs): void; +} +/** + * Provides data for the popup control's cancellable client events, such as the Closing. + */ +interface ASPxClientPopupWindowCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the popup window object related to the event. + * Value: An ASPxClientPopupWindow object representing the popup window that was manipulated, causing the popup control to raise the event. + */ + window: ASPxClientPopupWindow; + /** + * Gets the value that identifies the reason the popup window is about to close. + * Value: One of the ASPxClientPopupControlCloseReason enumeration values. + */ + closeReason: ASPxClientPopupControlCloseReason; +} +/** + * A method that will handle the CloseUp event. + */ +interface ASPxClientPopupWindowCloseUpEventHandler { + /** + * A method that will handle the CloseUp event. + * @param source The event source. + * @param e An ASPxClientPopupWindowCloseUpEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowCloseUpEventArgs): void; +} +/** + * Provides data for the CloseUp event. + */ +interface ASPxClientPopupWindowCloseUpEventArgs extends ASPxClientPopupWindowEventArgs { + /** + * Gets the value that identifies the reason the popup window closes. + * Value: One of the ASPxClientPopupControlCloseReason enumeration values. + */ + closeReason: ASPxClientPopupControlCloseReason; +} +/** + * A method that will handle the Resize event. + */ +interface ASPxClientPopupWindowResizeEventHandler { + /** + * A method that will handle the Resize event. + * @param source The event source. + * @param e A ASPxClientPopupWindowResizeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowResizeEventArgs): void; +} +/** + * Provides data for the Resize event. + */ +interface ASPxClientPopupWindowResizeEventArgs extends ASPxClientPopupWindowEventArgs { + /** + * Returns the value indicating the window state after resizing. + * Value: The integer value indicating the window resize state. + */ + resizeState: number; +} +/** + * A method that will handle the PinnedChanged event. + */ +interface ASPxClientPopupWindowPinnedChangedEventHandler { + /** + * A method that will handle the PinnedChanged event. + * @param source The event source. + * @param e A ASPxClientPopupWindowPinnedChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowPinnedChangedEventArgs): void; +} +/** + * Provides data for the PinnedChanged event. + */ +interface ASPxClientPopupWindowPinnedChangedEventArgs extends ASPxClientPopupWindowEventArgs { + /** + * Gets a value indicating whether the processed popup window has been pinned. + * Value: true, if the window has been pinned; otherwise, false. + */ + pinned: boolean; +} +/** + * Represents a client collection that maintains client popup control objects. + */ +interface ASPxClientPopupControlCollection extends ASPxClientControlCollection { + /** + * Hides all popup windows maintained by the collection. + */ + HideAllWindows(): void; +} +/** + * Declares client constants that identify the reason the popup window closes. + */ +interface ASPxClientPopupControlCloseReason { +} +/** + * Represents a client-side equivalent of the ASPxPopupMenu object. + */ +interface ASPxClientPopupMenu extends ASPxClientMenuBase { + /** + * Sets the ID of a web control or HTML element (or a list of IDs) with which the current popup menu is associated. + * @param popupElementId A string value specifying the ID (or a list of IDs) of the web control or HTML element with which the popup menu is associated. + */ + SetPopupElementID(popupElementId: string): void; + /** + * Returns an index of the object that invoked the popup menu within the PopupElementID list. + */ + GetCurrentPopupElementIndex(): number; + /** + * Returns an object that invoked the popup menu. + */ + GetCurrentPopupElement(): Object; + /** + * Refreshes the connection between the ASPxPopupMenu and the popup element. + */ + RefreshPopupElementConnection(): void; + /** + * Hides the popup menu. + */ + Hide(): void; + /** + * Invokes the popup menu. + */ + Show(): void; + /** + * Invokes the popup menu at the popup element with the specified index. + * @param popupElementIndex An integer value specifying the zero-based index of the popup element. + */ + Show(popupElementIndex: number): void; + /** + * Invokes the popup menu and displays it over the specified HTML element. + * @param htmlElement An object specifying the HTML element relative to which position the popup menu is invoked. + */ + ShowAtElement(htmlElement: Object): void; + /** + * Invokes the popup menu and displays it over an HTML element specified by its unique identifier. + * @param id A string value that specifies the hierarchically qualified identifier of an HTML element relative to which position the popup menu is invoked. + */ + ShowAtElementByID(id: string): void; + /** + * Invokes the popup menu at the specified position. + * @param x An integer value specifying the x-coordinate of the popup menu's display position. + * @param y An integer value specifying the y-coordinate of the popup menu's display position. + */ + ShowAtPos(x: number, y: number): void; +} +/** + * Represents the client-side equivalent of the ASPxRatingControl control. + */ +interface ASPxClientRatingControl extends ASPxClientControl { + /** + * Fires on the server after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor is moved into a rating control item. + */ + ItemMouseOver: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor moves outside a rating control item. + */ + ItemMouseOut: ASPxClientEvent>; + /** + * Gets the item tooltip title specified by the item index. + * @param index An integer value specifying the item index. + */ + GetTitle(index: number): string; + /** + * Returns a value indicating whether the control's status is read-only. + */ + GetReadOnly(): boolean; + /** + * Specifies whether the control's status is read-only. + * @param value true to make the control read-only; otherwise, false. + */ + SetReadOnly(value: boolean): void; + /** + * Returns the value of the ASPxRatingControl. + */ + GetValue(): number; + /** + * Modifies the value of the ASPxRatingControl on the client side. + * @param value A decimal value representing the value of the control. + */ + SetValue(value: number): void; +} +/** + * A method that will handle the client ItemClick event. + */ +interface ASPxClientRatingControlItemClickEventHandler { + /** + * A method that will handle the client ItemClick event. + * @param source An object representing the event source. + * @param e A ASPxClientRatingControlItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRatingControlItemClickEventArgs): void; +} +/** + * Provides data for the ItemClick event. + */ +interface ASPxClientRatingControlItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An integer value that represents the clicked item's index. + */ + index: number; +} +/** + * A method that will handle the rating control's ItemMouseOver and ItemMouseOut client events (such as ItemMouseOut). + */ +interface ASPxClientRatingControlItemMouseEventHandler { + /** + * A method that will handle the ItemMouseOver events. + * @param source The event source. + * @param e An ASPxClientRatingControlItemMouseEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRatingControlItemMouseEventArgs): void; +} +/** + * Provides data for the rating control's ItemMouseOver and ItemMouseOut client events (such as ItemMouseOut). + */ +interface ASPxClientRatingControlItemMouseEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An integer value that represents the related item's index. + */ + index: number; +} +/** + * Represents the client-side equivalent of the ASPxRibbon control. + */ +interface ASPxClientRibbon extends ASPxClientControl { + /** + * Occurs after an end-user executes an action on a ribbon item. + */ + CommandExecuted: ASPxClientEvent>; + /** + * Fires on the client side after the active tab has been changed within a ribbon control. + */ + ActiveTabChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the ribbon minimization state is changed by end-user actions. + */ + MinimizationStateChanged: ASPxClientEvent>; + /** + * Occurs when the file tab is clicked. + */ + FileTabClicked: ASPxClientEvent>; + /** + * Fires on the client side after a dialog box launcher has been clicked. + */ + DialogBoxLauncherClicked: ASPxClientEvent>; + /** + * Fires after key tips are closed by pressing Esc. + */ + KeyTipsClosedOnEscape: ASPxClientEvent>; + /** + * Specifies whether the ribbon control is enabled. + * @param enabled true to enable the ribbon; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value indicating whether the ribbon is enabled. + */ + GetEnabled(): boolean; + /** + * Returns a tab specified by its index. + * @param index An integer value specifying the zero-based index of the tab object to retrieve. + */ + GetTab(index: number): ASPxClientRibbonTab; + /** + * Returns a tab specified by its name. + * @param name A string value specifying the name of the tab. + */ + GetTabByName(name: string): ASPxClientRibbonTab; + /** + * Returns the number of tabs in the ribbon Tabs collection. + */ + GetTabCount(): number; + /** + * Returns the active tab within the ribbon control. + */ + GetActiveTab(): ASPxClientRibbonTab; + /** + * Makes the specified tab active in the ribbon control on the client side. + * @param tab A ASPxClientRibbonTab object specifying the tab selection. + */ + SetActiveTab(tab: ASPxClientRibbonTab): void; + /** + * Makes a tab active within the ribbon control, specifying the tab's index. + * @param index An integer value specifying the index of the tab to select. + */ + SetActiveTabIndex(index: number): void; + /** + * Returns a ribbon item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientRibbonItem; + /** + * Returns a value of item with the specified name. + * @param name A string value specifying the name of the item. + */ + GetItemValueByName(name: string): Object; + /** + * Sets the value of the item with the specified name. + * @param name A string value specifying the name of the item. + * @param value An object that is the new item value. + */ + SetItemValueByName(name: string, value: Object): void; + /** + * Specifies whether the ribbon is minimized. + * @param minimized true to set the ribbon state to minimized; false to set the ribbon state to normal. + */ + SetMinimized(minimized: boolean): void; + /** + * Gets a value specifying whether the ribbon is minimized. + */ + GetMinimized(): boolean; + /** + * Specifies the visibility of a context tab category specified by its name. + * @param categoryName A Name property value of the required category. + * @param visible true to make a category visible; false to make it hidden. + */ + SetContextTabCategoryVisible(categoryName: string, visible: boolean): void; + /** + * Shows ribbon key tips. + */ + ShowKeyTips(): void; +} +/** + * A client-side equivalent of the ribbon's RibbonTab object. + */ +interface ASPxClientRibbonTab { + /** + * Gets the client ribbon object to which the current tab belongs. + * Value: An object to which the tab belongs. + */ + ribbon: ASPxClientRibbon; + /** + * Gets or sets the tab's index within the collection. + * Value: An integer value that is the zero-based index of the tab within the collection. + */ + index: number; + /** + * Gets the name of the current ribbon tab. + * Value: A string value that is the tab's name. + */ + name: string; + /** + * Returns the text displayed in the tab. + */ + GetText(): string; + /** + * Sets a value specifying whether the tab is enabled. + * @param enabled true to enable the tab; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value indicating whether a ribbon tab is enabled. + */ + GetEnabled(): boolean; + /** + * Returns a value specifying whether a ribbon tab is displayed. + */ + GetVisible(): boolean; +} +/** + * A client-side equivalent of the ribbon's RibbonGroup object. + */ +interface ASPxClientRibbonGroup { + /** + * Gets the client ribbon object to which the current group belongs. + * Value: An object to which the group belongs. + */ + ribbon: ASPxClientRibbon; + /** + * Gets the client tab object to which the current group belongs. + * Value: An object to which the group belongs. + */ + tab: ASPxClientRibbonTab; + /** + * Gets or sets the group's index within the collection. + * Value: An integer value that is the zero-based index of the group within the collection. + */ + index: number; + /** + * Gets the name of the current ribbon group. + * Value: A string value that is the group's name. + */ + name: string; + /** + * Returns a value specifying whether a ribbon group is displayed. + */ + GetVisible(): boolean; +} +/** + * A client-side equivalent of the ribbon's RibbonItemBase object. + */ +interface ASPxClientRibbonItem { + /** + * Gets the client group object to which the current item belongs. + * Value: An object to which the item belongs. + */ + group: ASPxClientRibbonGroup; + /** + * Gets or sets the item's index within the collection. + * Value: An integer value that is the zero-based index of the item within the collection. + */ + index: number; + /** + * Gets the name of the current ribbon item. + * Value: A string value that is the item's name. + */ + name: string; + /** + * Gets the client ribbon object to which the current item belongs. + * Value: An object to which the item belongs. + */ + ribbon: ASPxClientRibbon; + /** + * Returns a value indicating whether a ribbon item is enabled. + */ + GetEnabled(): boolean; + /** + * Sets a value specifying whether the item is enabled. + * @param enabled true to enable the item; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns the item value. + */ + GetValue(): Object; + /** + * Sets the item value. + * @param value An that specifies the item value. + */ + SetValue(value: Object): void; + /** + * Returns a value specifying whether a ribbon item is displayed. + */ + GetVisible(): boolean; +} +/** + * A method that will handle the CommandExecuted event. + */ +interface ASPxClientRibbonCommandExecutedEventHandler { + /** + * A method that will handle the CommandExecuted event. + * @param source The event source. Identifies the ASPxRibbon control that raised the event. + * @param e An ASPxClientRibbonCommandExecutedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonCommandExecutedEventArgs): void; +} +/** + * Provides data for the CommandExecuted event. + */ +interface ASPxClientRibbonCommandExecutedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets an item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientRibbonItem; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: string; +} +/** + * A method that will handle the ActiveTabChanged event. + */ +interface ASPxClientRibbonTabEventHandler { + /** + * A method that will handle the ActiveTabChanged event. + * @param source The event source. Identifies the ASPxRibbon control that raised the event. + * @param e A ASPxClientRibbonTabEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonTabEventArgs): void; +} +/** + * Provides data for the ActiveTabChanged event. + */ +interface ASPxClientRibbonTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the tab object related to the event. + * Value: An object that is the tab, manipulations on which forced the ribbon control to raise the event. + */ + tab: ASPxClientRibbonTab; +} +/** + * A method that will handle the MinimizationStateChanged event. + */ +interface ASPxClientRibbonMinimizationStateEventHandler { + /** + * A method that will handle the MinimizationStateChanged event. + * @param source The event source. Identifies the ASPxRibbon control that raised the event. + * @param e An ASPxClientRibbonMinimizationStateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonMinimizationStateEventArgs): void; +} +/** + * Provides data for the MinimizationStateChanged event. + */ +interface ASPxClientRibbonMinimizationStateEventArgs extends ASPxClientEventArgs { + /** + * Returns the value indicating the new ribbon state. + * Value: The integer value indicating the ribbon minimization state. + */ + ribbonState: number; +} +/** + * A method that will handle the DialogBoxLauncherClicked event. + */ +interface ASPxClientRibbonDialogBoxLauncherClickedEventHandler { + /** + * A method that will handle the DialogBoxLauncherClicked event. + * @param source The event source. This parameter identifies the ribbon object which raised the event. + * @param e An ASPxClientRibbonDialogBoxLauncherClickedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonDialogBoxLauncherClickedEventArgs): void; +} +/** + * Provides data for the DialogBoxLauncherClicked event. + */ +interface ASPxClientRibbonDialogBoxLauncherClickedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the client group object to which the clicked dialog box launcher belongs. + * Value: An object to which the dialog box launcher belongs. + */ + group: ASPxClientRibbonGroup; +} +/** + * Represents a client-side equivalent of the ASPxRoundPanel control. + */ +interface ASPxClientRoundPanel extends ASPxClientPanelBase { + /** + * Fires on the client side after a panel has been expanded or collapsed via end-user interactions, i.e., by clicking a panel header or collapse button. + */ + CollapsedChanged: ASPxClientEvent>; + /** + * Fires on the client side before a panel is expanded or collapsed by end-user interactions, i.e., by clicking a panel header or collapse button. + */ + CollapsedChanging: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientRoundPanel. + */ + CallbackError: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; + /** + * Returns the text displayed within the panel's header. + */ + GetHeaderText(): string; + /** + * Specifies the text displayed in the panel's header. + * @param text A string value that specifies the panel header's text. + */ + SetHeaderText(text: string): void; + /** + * Returns a value indicating whether the panel is collapsed. + */ + GetCollapsed(): boolean; + /** + * Sets a value indicating whether the panel is collapsed. + * @param collapsed true, to collapse the panel; otherwise, false. + */ + SetCollapsed(collapsed: boolean): void; +} +/** + * Represents a client-side equivalent of the ASPxSplitter object. + */ +interface ASPxClientSplitter extends ASPxClientControl { + /** + * Fires before a pane is resized. + */ + PaneResizing: ASPxClientEvent>; + /** + * Fires after a pane has been resized. + */ + PaneResized: ASPxClientEvent>; + /** + * Fires before a pane is collapsed. + */ + PaneCollapsing: ASPxClientEvent>; + /** + * Fires after a pane has been collapsed. + */ + PaneCollapsed: ASPxClientEvent>; + /** + * Fires before a pane is expanded. + */ + PaneExpanding: ASPxClientEvent>; + /** + * Fires after a pane has been expanded. + */ + PaneExpanded: ASPxClientEvent>; + /** + * Occurs when a pane resize operation has been completed. + */ + PaneResizeCompleted: ASPxClientEvent>; + /** + * Fires after a specific web page has been loaded into a pane. + */ + PaneContentUrlLoaded: ASPxClientEvent>; + /** + * Returns the number of panes at the root level of a splitter. + */ + GetPaneCount(): number; + /** + * Returns the splitter's root pane specified by its index within the Panes collection. + * @param index An integer value specifying the zero-based index of the root pane to be retrieved. + */ + GetPane(index: number): ASPxClientSplitterPane; + /** + * Returns a pane specified by its name. + * @param name A string value specifying the name of the pane. + */ + GetPaneByName(name: string): ASPxClientSplitterPane; + /** + * Specifies whether the control's panes can be resized by end-users on the client side. + * @param allowResize true if pane resizing is allowed; otherwise, false. + */ + SetAllowResize(allowResize: boolean): void; + /** + * Returns a string value that represents the client state of splitter panes. + */ + GetLayoutData(): string; +} +/** + * Represents a client-side equivalent of the splitter's SplitterPane object. + */ +interface ASPxClientSplitterPane { + /** + * Gets the index of the current pane within the pane collection to which it belongs. + * Value: An integer value representing the zero-based index of the current pane within the SplitterPaneCollection collection. + */ + index: number; + /** + * Gets the name that uniquely identifies the current splitter pane. + * Value: A string value that represents the value assigned to the pane's Name property. + */ + name: string; + /** + * Returns a client splitter object that contains the current pane. + */ + GetSplitter(): ASPxClientSplitter; + /** + * Returns the immediate parent of the current pane. + */ + GetParentPane(): ASPxClientSplitterPane; + /** + * Returns the previous sibling pane of the current pane. + */ + GetPrevPane(): ASPxClientSplitterPane; + /** + * Returns the next sibling pane of the current pane. + */ + GetNextPane(): ASPxClientSplitterPane; + /** + * Determines whether the current pane is the first pane within the SplitterPaneCollection. + */ + IsFirstPane(): boolean; + /** + * Determines whether the current pane is the last pane within the SplitterPaneCollection. + */ + IsLastPane(): boolean; + /** + * Returns a value that indicates the orientation in which the current pane and its sibling panes are stacked. + */ + IsVertical(): boolean; + /** + * Returns the number of the current pane's immediate child panes. + */ + GetPaneCount(): number; + /** + * Returns the current pane's immediate child pane specified by its index. + * @param index An integer value specifying the zero-based index of the child pane to be retrieved. + */ + GetPane(index: number): ASPxClientSplitterPane; + /** + * Returns the current pane's child pane specified by its name. + * @param name A string value specifying the name of the pane. + */ + GetPaneByName(name: string): ASPxClientSplitterPane; + /** + * Gets the width of the pane's content area. + */ + GetClientWidth(): number; + /** + * Gets the height of the pane's content area. + */ + GetClientHeight(): number; + /** + * Collapses the current pane and occupies its space by maximizing the specified pane. + * @param maximizedPane A ASPxClientSplitterPane object specifying the pane to be maximized to occupy the freed space. + */ + Collapse(maximizedPane: ASPxClientSplitterPane): boolean; + /** + * Collapses the current pane in a forward direction and occupies its space by maximizing the previous adjacent pane. + */ + CollapseForward(): boolean; + /** + * Collapses the current pane in a backward direction, and occupies its space by maximizing the next adjacent pane. + */ + CollapseBackward(): boolean; + /** + * Expands the current pane object on the client side. + */ + Expand(): boolean; + /** + * Returns whether the pane is collapsed. + */ + IsCollapsed(): boolean; + /** + * Returns whether the pane's content is loaded from an external web page. + */ + IsContentUrlPane(): boolean; + /** + * Gets the URL of a web page displayed as a pane's content. + */ + GetContentUrl(): string; + /** + * Sets the URL to point to a web page that should be loaded into, and displayed within the current pane. + * @param url A string value specifying the URL to a web page displayed within the pane. + */ + SetContentUrl(url: string): void; + /** + * Sets the URL to point to a web page that should be loaded into, and displayed within the current pane, but should not be cached by a client browser. + * @param url A string value specifying the URL to a web page displayed within the pane. + * @param preventBrowserCaching true to prevent the browser to cache the loaded content; false to allow browser caching. + */ + SetContentUrl(url: string, preventBrowserCaching: boolean): void; + /** + * Refreshes the content of the web page displayed within the current pane. + */ + RefreshContentUrl(): void; + /** + * Returns an iframe object containing a web page specified via the pane's SetContentUrl client method). + */ + GetContentIFrame(): Object; + /** + * Specifies whether the current pane can be resized by end-users on the client side. + * @param allowResize true if pane resizing is allowed; otherwise, false. + */ + SetAllowResize(allowResize: boolean): void; + /** + * Forces the client PaneResized event to be generated. + */ + RaiseResizedEvent(): void; + /** + * Returns an HTML element representing a splitter pane object. + */ + GetElement(): Object; + /** + * Specifies the splitter pane's size in pixels. + * @param size An integer value that specifies the splitter pane's size. + */ + SetSize(size: number): void; + /** + * Specifies the splitter pane's size, in pixels or percents. + * @param size A string value that specifies the splitter pane's size, in pixels or percents. + */ + SetSize(size: string): void; + /** + * Returns the splitter pane's size, in pixels or percents. + */ + GetSize(): string; + /** + * Returns the distance between the top edge of the pane content and the topmost portion of the content currently visible in the pane. + */ + GetScrollTop(): number; + /** + * Specifies the distance between the top edge of the pane content and the topmost portion of the content currently visible in the pane. + * @param value An integer value that is the distance (in pixels). + */ + SetScrollTop(value: number): void; + /** + * Returns the distance between the left edge of the pane content and the leftmost portion of the content currently visible in the pane. + */ + GetScrollLeft(): number; + /** + * Specifies the distance between the left edge of the pane content and the leftmost portion of the content currently visible in the pane. + * @param value An integer value that is the distance (in pixels). + */ + SetScrollLeft(value: number): void; +} +/** + * A method that will handle the splitter's client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneEventHandler { + /** + * A method that will handle the splitter's client events concerning pane manipulations. + * @param source An object representing the event's source. Identifies the splitter object that raised the event. + * @param e An ASPxClientSplitterPaneEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSplitterPaneEventArgs): void; +} +/** + * A method that will handle the splitter's client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneEventArgs extends ASPxClientEventArgs { + /** + * Gets the pane object related to the event. + * Value: An ASPxClientSplitterPane object, manipulations on which forced the event to be raised. + */ + pane: ASPxClientSplitterPane; +} +/** + * A method that will handle a splitter control's cancelable client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneCancelEventHandler { + /** + * A method that will handle a splitter control's cancelable client events concerning pane manipulations. + * @param source An object representing the event's source. Identifies the splitter control object that raised the event. + * @param e An ASPxClientSplitterPaneCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSplitterPaneCancelEventArgs): void; +} +/** + * Provides data for a splitter control's cancelable client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneCancelEventArgs extends ASPxClientSplitterPaneEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents a base for the ASPxClientPageControl objects. + */ +interface ASPxClientTabControlBase extends ASPxClientControl { + /** + * Fires when a tab is clicked. + */ + TabClick: ASPxClientEvent>; + /** + * Fires on the client side after the active tab has been changed within a tab control. + */ + ActiveTabChanged: ASPxClientEvent>; + /** + * Fires on the client side before the active tab is changed within a tab control. + */ + ActiveTabChanging: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by a client tab control. + */ + CallbackError: ASPxClientEvent>; + /** + * Modifies a tab page's size in accordance with the content. + */ + AdjustSize(): void; + /** + * Returns the active tab within the tab control. + */ + GetActiveTab(): ASPxClientTab; + /** + * Makes the specified tab active within the tab control on the client side. + * @param tab An ASPxClientTab object specifying the tab to select. + */ + SetActiveTab(tab: ASPxClientTab): void; + /** + * Returns the index of the active tab within the tab control. + */ + GetActiveTabIndex(): number; + /** + * Makes a tab active within the tab control, specifying the tab's index. + * @param index An integer value specifying the index of the tab to select. + */ + SetActiveTabIndex(index: number): void; + /** + * Returns the number of tabs in the ASPxTabControl. + */ + GetTabCount(): number; + /** + * Returns a tab specified by its index. + * @param index An integer value specifying the zero-based index of the tab object to retrieve. + */ + GetTab(index: number): ASPxClientTab; + /** + * Returns a tab specified by its name. + * @param name A string value specifying the name of the tab. + */ + GetTabByName(name: string): ASPxClientTab; +} +/** + * Represents a client-side equivalent of the ASPxTabControl object. + */ +interface ASPxClientTabControl extends ASPxClientTabControlBase { +} +/** + * Represents a client-side equivalent of the ASPxPageControl object. + */ +interface ASPxClientPageControl extends ASPxClientTabControlBase { + /** + * Returns the HTML code that represents the contents of the specified page within the page control. + * @param tab An ASPxClientTab object that specifies the required page. + */ + GetTabContentHTML(tab: ASPxClientTab): string; + /** + * Defines the HTML content for a specific tab page within the page control. + * @param tab An ASPxClientTab object that specifies the required tab page. + * @param html A string value that represents the HTML code defining the content of the specified page. + */ + SetTabContentHTML(tab: ASPxClientTab, html: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + */ + PerformCallback(parameter: string): void; + /** + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; +} +/** + * Represents a client-side equivalent of a tab control's TabPage object. + */ +interface ASPxClientTab { + /** + * Gets the tab control to which the current tab belongs. + * Value: An ASPxClientTabControlBase object representing the control to which the tab belongs. + */ + tabControl: ASPxClientTabControlBase; + /** + * Gets the index of the current tab (tabbed page) within the control's collection of tabs (tabbed pages). + * Value: An integer value representing the zero-based index of the current tab (tabbed page) within the TabPages) collection of the control to which the tab belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the current tab. + * Value: A string value that represents the value assigned to the tab's Name property. + */ + name: string; + /** + * Returns a value specifying whether a tab is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether the tab is enabled. + * @param value true to enable the tab; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL pointing to the image displayed within the tab. + */ + GetImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the tab. + * @param value A string value that is the URL to the image displayed within the tab. + */ + SetImageUrl(value: string): void; + /** + * Returns the URL pointing to the image displayed within the active tab. + */ + GetActiveImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the active tab. + * @param value A string value that is the URL to the image displayed within the active tab. + */ + SetActiveImageUrl(value: string): void; + /** + * Gets an URL which defines the navigation location for the tab. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the navigation location for the tab. + * @param value A string value which is a URL to where the client web browser will navigate when the tab is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Returns text displayed within the tab. + */ + GetText(): string; + /** + * Specifies the text displayed within the tab. + * @param value A string value that is the text displayed within the tab. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether a tab is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether the tab is visible. + * @param value true is the tab is visible; otherwise, false. + */ + SetVisible(value: boolean): void; +} +/** + * A method that will handle a tab control's client events concerning manipulations with a tab. + */ +interface ASPxClientTabControlTabEventHandler { + /** + * A method that will handle a tab control's client events concerning manipulations with a tab. + * @param source An object representing the event's source. Identifies the tab control object that raised the event. + * @param e An ASPxClientTabControlTabEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTabControlTabEventArgs): void; +} +/** + * Provides data for events which concern manipulations on tabs. + */ +interface ASPxClientTabControlTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the tab object related to the event. + * Value: An ASPxClientTab object, manipulations on which forced the event to be raised. + */ + tab: ASPxClientTab; +} +/** + * A method that will handle a tab control's cancelable client events concerning manipulations with a tab. + */ +interface ASPxClientTabControlTabCancelEventHandler { + /** + * A method that will handle a tab control's cancelable client events concerning manipulations with a tab. + * @param source An object representing the event's source. Identifies the tab control object that raised the event. + * @param e An ASPxClientTabControlTabCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTabControlTabCancelEventArgs): void; +} +/** + * Provides data for cancellable events which concern manipulations on tabs. + */ +interface ASPxClientTabControlTabCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the tab object related to the event. + * Value: An ASPxClientTab object representing the tab manipulations on which forced the tab control to raise the event. + */ + tab: ASPxClientTab; + /** + * Gets or sets a value specifying whether a callback should be sent to the server to reload the content of the page being activated. + * Value: true to reload the page's content; otherwise, false. + */ + reloadContentOnCallback: boolean; +} +/** + * A method that will handle client events concerning clicks on the control's tabs. + */ +interface ASPxClientTabControlTabClickEventHandler { + /** + * A method that will handle client events concerning clicks on tabs. + * @param source The event source. This parameter identifies the tab control object which raised the event. + * @param e An ASPxClientTabControlTabClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTabControlTabClickEventArgs): void; +} +/** + * Provides data for events which concern clicking on the control's tabs. + */ +interface ASPxClientTabControlTabClickEventArgs extends ASPxClientTabControlTabCancelEventArgs { + /** + * Gets the HTML object that contains the processed tab. + * Value: An object representing a container for the tab related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxTimer object. + */ +interface ASPxClientTimer extends ASPxClientControl { + /** + * Fires on the client side when the specified timer interval has elapsed, and the timer is enabled. + */ + Tick: ASPxClientEvent>; + /** + * Returns a value indicating whether the timer is enabled. + */ + GetEnabled(): boolean; + /** + * Enables the timer. + * @param enabled true to turn the timer on; false, to turn the timer off. + */ + SetEnabled(enabled: boolean): void; + /** + * Gets the time before the Tick event. + */ + GetInterval(): number; + /** + * Specifies the time before the Tick event. + * @param interval An integer value that specifies the number of milliseconds before the Tick event is raised relative to the last occurrence of the Tick event. The value cannot be less than one. + */ + SetInterval(interval: number): void; +} +/** + * Represents a client-side equivalent of the ASPxTitleIndex object. + */ +interface ASPxClientTitleIndex extends ASPxClientControl { + /** + * Fires after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientTitleIndex. + */ + CallbackError: ASPxClientEvent>; +} +/** + * A method that will handle client events concerning manipulations with an item. + */ +interface ASPxClientTitleIndexItemEventHandler { + /** + * A method that will handle the title index control's client events concerning manipulations with an item. + * @param source An object representing the event's source. Identifies the title index control object that raised the event. + * @param e An ASPxClientTitleIndexItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTitleIndexItemEventArgs): void; +} +/** + * Provides data for events which concern manipulations on the control's items. + */ +interface ASPxClientTitleIndexItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the name that uniquely identifies the processed item. + * Value: A string value that represents the value assigned to the processed item's Name property. + */ + name: Object; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxTreeView object. + */ +interface ASPxClientTreeView extends ASPxClientControl { + /** + * Fires on the client side after a node has been clicked. + */ + NodeClick: ASPxClientEvent>; + /** + * Fires on the client side after a node's expansion state has been changed by end-user interaction. + */ + ExpandedChanged: ASPxClientEvent>; + /** + * Fires on the client side before the expansion state of a node is changed via end-user interaction. + */ + ExpandedChanging: ASPxClientEvent>; + /** + * Occurs on the client side when the node's checked state is changed by clicking on a check box. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientTreeView. + */ + CallbackError: ASPxClientEvent>; + /** + * Returns a node specified by its index within the ASPxTreeView's node collection. + * @param index An integer value specifying the zero-based index of the node to be retrieved. + */ + GetNode(index: number): ASPxClientTreeViewNode; + /** + * Returns a node specified by its name. + * @param name A string value specifying the name of the node. + */ + GetNodeByName(name: string): ASPxClientTreeViewNode; + /** + * Returns a node specified by its text. + * @param text A string value specifying the text content of the node. + */ + GetNodeByText(text: string): ASPxClientTreeViewNode; + /** + * Returns the number of nodes at the ASPxTreeView's zero level. + */ + GetNodeCount(): number; + /** + * Returns the selected node within the ASPxTreeView control on the client side. + */ + GetSelectedNode(): ASPxClientTreeViewNode; + /** + * Selects the specified node within the ASPxTreeView control on the client side. + * @param node An ASPxClientTreeViewNode object specifying the node to select. + */ + SetSelectedNode(node: ASPxClientTreeViewNode): void; + /** + * Gets the root node of the ASPxTreeView object. + */ + GetRootNode(): ASPxClientTreeViewNode; + /** + * Collapses all nodes in the ASPxTreeView on the client side. + */ + CollapseAll(): void; + /** + * Expands all nodes in the ASPxTreeView on the client side. + */ + ExpandAll(): void; +} +/** + * Represents a client-side equivalent of the ASPxTreeView's TreeViewNode object. + */ +interface ASPxClientTreeViewNode { + /** + * Gets the client representation of the ASPxTreeView control to which the current node belongs. + * Value: An ASPxClientTreeView object representing the control to which the node belongs. + */ + treeView: ASPxClientTreeView; + /** + * Gets the current node's parent node. + * Value: An ASPxClientTreeViewNode object representing the node's immediate parent. + */ + parent: ASPxClientTreeViewNode; + /** + * Gets the node's index within the parent's collection of nodes. + * Value: An integer value representing the node's zero-based index within the Nodes collection of the node to which the node belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the node. + * Value: A string value that represents the value assigned to the node's Name property. + */ + name: string; + /** + * Returns the number of the current node's immediate child nodes. + */ + GetNodeCount(): number; + /** + * Returns the current node's immediate child node specified by its index. + * @param index An integer value specifying the zero-based index of the node to be retrieved. + */ + GetNode(index: number): ASPxClientTreeViewNode; + /** + * Returns the current node's child node specified by its name. + * @param name A string value specifying the name of the node. + */ + GetNodeByName(name: string): ASPxClientTreeViewNode; + /** + * Returns the current node's child node specified by its text. + * @param text A string value specifying the text content of the node. + */ + GetNodeByText(text: string): ASPxClientTreeViewNode; + /** + * Returns a value indicating whether the node is expanded. + */ + GetExpanded(): boolean; + /** + * Sets a value which specifies the node's expansion state. + * @param value true if the node is expanded; otherwise, false. + */ + SetExpanded(value: boolean): void; + /** + * Returns a value indicating whether the node is checked. + */ + GetChecked(): boolean; + /** + * Sets a value indicating whether the node is checked. + * @param value true if the node is checked; otherwise, false. + */ + SetChecked(value: boolean): void; + /** + * Returns a value which specifies the node's check state. + */ + GetCheckState(): string; + /** + * Returns a value specifying whether the node is enabled. + */ + GetEnabled(): boolean; + /** + * Sets a value specifying whether the node is enabled. + * @param value true to make the node enabled; false to disable it. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL pointing to the image displayed within the node. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the node. + * @param value A string value specifying the URL to the image displayed within the node. + */ + SetImageUrl(value: string): void; + /** + * Gets an URL which defines the navigation location for the node's hyperlink. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the node's navigate URL. + * @param value A string value which specifies a URL to where the client web browser will navigate when the node is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Gets the text, displayed within the node. + */ + GetText(): string; + /** + * Specifies the text, displayed within the node. + * @param value A string value that represents the text displayed within the node. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether a node is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether the node is visible. + * @param value true if the node is visible; otherwise, false. + */ + SetVisible(value: boolean): void; + /** + * Gets the HTML object that contains the current node. + */ + GetHtmlElement(): Object; +} +/** + * A method that will handle the client events concerned with node processing. + */ +interface ASPxClientTreeViewNodeProcessingModeEventHandler { + /** + * A method that will handle the client events concerned with node processing. + * @param source An object representing the event source. Identifies the ASPxClientTreeView control that raised the event. + * @param e An ASPxClientTreeViewNodeProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeProcessingModeEventArgs): void; +} +/** + * Provides data for the client events concerned with node processing, and that allow the event's processing to be passed to the server side. + */ +interface ASPxClientTreeViewNodeProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets a node object related to the event. + * Value: An ASPxClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: ASPxClientTreeViewNode; +} +/** + * A method that will handle the ASPxClientTreeView.ItemClick event. + */ +interface ASPxClientTreeViewNodeClickEventHandler { + /** + * A method that will handle the NodeClick event. + * @param source The ASPxClientTreeView control which fires the event. + * @param e An ASPxClientTreeViewNodeClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeClickEventArgs): void; +} +/** + * Provides data for the NodeClick event. + */ +interface ASPxClientTreeViewNodeClickEventArgs extends ASPxClientTreeViewNodeProcessingModeEventArgs { + /** + * Gets the HTML object that contains the processed node. + * Value: An object representing a container for the node related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the ASPxTreeView control's client events concerning manipulations with a node. + */ +interface ASPxClientTreeViewNodeEventHandler { + /** + * A method that will handle the ASPxTreeView control's client events, concerning manipulations with a node. + * @param source An object representing the event's source. Identifies the ASPxClientTreeView control object that raised the event. + * @param e An ASPxClientTreeViewNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeEventArgs): void; +} +/** + * Provides data for the ExpandedChanged events. + */ +interface ASPxClientTreeViewNodeEventArgs extends ASPxClientEventArgs { + /** + * Gets a node object related to the event. + * Value: An ASPxClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: ASPxClientTreeViewNode; +} +/** + * A method that will handle the ASPxTreeView's cancelable client events, concerning manipulations with nodes. + */ +interface ASPxClientTreeViewNodeCancelEventHandler { + /** + * A method that will handle the ASPxTreeView's cancelable client events, concerning manipulations with nodes. + * @param source An object representing the event's source. Identifies the ASPxClientTreeView object that raised the event. + * @param e An ASPxClientTreeViewNodeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeCancelEventArgs): void; +} +/** + * Provides data for the ExpandedChanging event. + */ +interface ASPxClientTreeViewNodeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets a node object related to the event. + * Value: An ASPxClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: ASPxClientTreeViewNode; +} +/** + * Represents a client-side equivalent of the ASPxUploadControl control. + */ +interface ASPxClientUploadControl extends ASPxClientControl { + /** + * Occurs on the client after a file has been uploaded. + */ + FileUploadComplete: ASPxClientEvent>; + /** + * Occurs on the client after upload of all selected files has been completed. + */ + FilesUploadComplete: ASPxClientEvent>; + /** + * Occurs on the client side before upload of the specified files starts. + */ + FileUploadStart: ASPxClientEvent>; + /** + * Occurs on the client side before file upload is started. + */ + FilesUploadStart: ASPxClientEvent>; + /** + * Fires on the client side when the text within the control's edit box is changed while the control has focus. + */ + TextChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the progress bar indicator position is changed. + */ + UploadingProgressChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the file input elements count is changed. + */ + FileInputCountChanged: ASPxClientEvent>; + /** + * Fires when the mouse enters a drop zone or an external drop zone element while dragging a file. + */ + DropZoneEnter: ASPxClientEvent>; + /** + * Fires when the mouse leaves a drop zone or an external drop zone element while dragging a file. + */ + DropZoneLeave: ASPxClientEvent>; + /** + * Initiates uploading of the specified file to the web server's memory. + */ + UploadFile(): void; + /** + * Adds a new file input element to the ASPxUploadControl. + */ + AddFileInput(): void; + /** + * Removes a file input element from the ASPxUploadControl. + * @param index An integer value that represents a file input element's index. + */ + RemoveFileInput(index: number): void; + /** + * Removes a file with the specified index from the selected file list. + * @param fileIndex An integer value that is the zero-based index of an item in the file list. + */ + RemoveFileFromSelection(fileIndex: number): void; + /** + * Gets the text displayed within the edit box of the specified file input element. + * @param index An integer value that specifies the required file input element's index. + */ + GetText(index: number): string; + /** + * Gets the number of file input elements contained within the ASPxUploadControl. + */ + GetFileInputCount(): number; + /** + * Specifies the count of the file input elements within the upload control. + * @param count An integer value that specifies the file input elements count. + */ + SetFileInputCount(count: number): void; + /** + * Specifies whether the upload control is enabled. + * @param enabled true, to enable the upload control; otherwise, false. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value indicating whether the upload control is enabled. + */ + GetEnabled(): boolean; + /** + * Initiates uploading of the specified file(s) to the web server's memory. + */ + Upload(): void; + /** + * Cancels the initiated file uploading process. + */ + Cancel(): void; + /** + * Clears the file selection in the upload control. + */ + ClearText(): void; + /** + * Sets the text to be displayed within the add button. + * @param text A string value specifying the text to be displayed within the button. + */ + SetAddButtonText(text: string): void; + /** + * Sets the text to be displayed within the upload button. + * @param text A string value specifying the text to be displayed within the button. + */ + SetUploadButtonText(text: string): void; + /** + * Returns the text displayed within the add button. + */ + GetAddButtonText(): string; + /** + * Returns the text displayed within the upload button. + */ + GetUploadButtonText(): string; + /** + * Sets the ID of a web control or HTML element (or a list of IDs), a click on which invokes file upload dialog. + * @param ids A string value specifying the ID or a list of IDs separated by the semicolon (;). + */ + SetDialogTriggerID(ids: string): void; +} +/** + * A method that will handle the client FilesUploadStart event. + */ +interface ASPxClientUploadControlFilesUploadStartEventHandler { + /** + * A method that will handle the FilesUploadStart event. + * @param source The event source. Identifies the ASPxUploadControl control that raised the event. + * @param e A ASPxClientUploadControlFilesUploadStartEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlFilesUploadStartEventArgs): void; +} +/** + * Provides data for the FilesUploadStart event. + */ +interface ASPxClientUploadControlFilesUploadStartEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that handles the FileUploadComplete client event. + */ +interface ASPxClientUploadControlFileUploadCompleteEventHandler { + /** + * A method that will handle the corresponding client event. + * @param source The event source. This parameter identifies the upload control which raised the event. + * @param e An ASPxClientUploadControlFileUploadCompleteEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlFileUploadCompleteEventArgs): void; +} +/** + * Provides data for the FileUploadComplete event. + */ +interface ASPxClientUploadControlFileUploadCompleteEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of a file input element within the ASPxUploadControl. + * Value: An integer value that specifies the file input element's index. + */ + inputIndex: number; + /** + * Gets or sets a value indicating whether the uploaded file passes validation. + * Value: true if the file is valid; otherwise, false. + */ + isValid: boolean; + /** + * Gets the error text to be displayed within the ASPxUploadControl's error frame. + * Value: A string value that represents the error text. + */ + errorText: string; + /** + * Gets a string that contains specific information (if any) passed from the server side for further client processing. + * Value: A string value representing callback data passed from the server. + */ + callbackData: string; +} +/** + * A method that will handle the FilesUploadComplete client event. + */ +interface ASPxClientUploadControlFilesUploadCompleteEventHandler { + /** + * A method that will handle the client FilesUploadComplete event. + * @param source The event source. This parameter identifies the upload control which raised the event. + * @param e A object that contains event data. + */ + (source: S, e: ASPxClientUploadControlFilesUploadCompleteEventArgs): void; +} +/** + * Provides data for the FilesUploadComplete client event, which enables you to perform specific actions after all selected files have been uploaded. + */ +interface ASPxClientUploadControlFilesUploadCompleteEventArgs extends ASPxClientEventArgs { + /** + * Gets the error text to be displayed within the upload control's error frame. + * Value: A string value that is the error text. + */ + errorText: string; + /** + * Gets a string that contains specific information (if any) passed from the server side for further client processing. + * Value: A string value that is the callback data passed from the server. + */ + callbackData: string; +} +/** + * A method that will handle the TextChanged client event. + */ +interface ASPxClientUploadControlTextChangedEventHandler { + /** + * A method that will handle the TextChanged client event. + * @param source The event source. This parameter identifies the upload control which raised the event. + * @param e An ASPxClientUploadControlTextChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlTextChangedEventArgs): void; +} +/** + * Provides data for the TextChanged client event that allows you to respond to an end-user changing an edit box's text. + */ +interface ASPxClientUploadControlTextChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of a file input element within the ASPxUploadControl. + * Value: An integer value that specifies the file input element's index. + */ + inputIndex: number; +} +/** + * A method that will handle the ASPxUploadControl's client event, concerned with changes in upload progress. + */ +interface ASPxClientUploadControlUploadingProgressChangedEventHandler { + /** + * A method that will handle the ASPxUploadControl's client event concerning the uploading process being changed. + * @param source An object representing the event's source. Identifies the ASPxUploadControl object that raised the event. + * @param e An ASPxClientUploadControlUploadingProgressChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlUploadingProgressChangedEventArgs): void; +} +/** + * Provides data for the UploadingProgressChanged event. + */ +interface ASPxClientUploadControlUploadingProgressChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the number of the files selected for upload. + * Value: An integer value that represents the total number of selected files. + */ + fileCount: number; + /** + * Gets the name of the file being currently uploaded. + * Value: A string value that represents the file name. + */ + currentFileName: string; + /** + * Gets the content length of the currently uploaded file. + * Value: An integer value specifying the content length. + */ + currentFileContentLength: number; + /** + * Gets the content length of the current file already uploaded to the server. + * Value: An integer value that is the content length. + */ + currentFileUploadedContentLength: number; + /** + * Gets the position of the current file upload progress. + * Value: An value specifying the upload progress position. + */ + currentFileProgress: number; + /** + * Gets the content length of the files selected for upload. + * Value: An integer value specifying the total content length of the selected files. + */ + totalContentLength: number; + /** + * Gets the content length of the files already uploaded to the server. + * Value: An integer value that represents the content length. + */ + uploadedContentLength: number; + /** + * Gets the current position of total upload progress. + * Value: An value specifying the total upload progress position. + */ + progress: number; +} +/** + * A method that will handle the DropZoneEnter event. + */ +interface ASPxClientUploadControlDropZoneEnterEventHandler { + /** + * A method that will handle the DropZoneEnter event. + * @param source The event source. This parameter identifies the upload control object which raised the event. + * @param e An ASPxClientUploadControlDropZoneEnterEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlDropZoneEnterEventArgs): void; +} +/** + * Provides data for the DropZoneEnter event. + */ +interface ASPxClientUploadControlDropZoneEnterEventArgs extends ASPxClientEventArgs { + /** + * Gets a drop zone object related to the processed event. + * Value: An object that is a drop zone related to the processed event. + */ + dropZone: Object; +} +/** + * A method that will handle the DropZoneLeave event. + */ +interface ASPxClientUploadControlDropZoneLeaveEventHandler { + /** + * A method that will handle the DropZoneLeave event. + * @param source The event source. Identifies the upload control object that raised the event. + * @param e A ASPxClientUploadControlDropZoneLeaveEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlDropZoneLeaveEventArgs): void; +} +/** + * Provides data for the DropZoneLeave event. + */ +interface ASPxClientUploadControlDropZoneLeaveEventArgs extends ASPxClientEventArgs { + /** + * Gets a drop zone object related to the processed event. + * Value: An object that is a drop zone related to the processed event. + */ + dropZone: Object; +} +/** + * The JavaScript equivalent of the ASPxChartDesigner class. + */ +interface ASPxClientChartDesigner extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientChartDesigner. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs when executing the Save command on the client. + */ + SaveCommandExecute: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of a Client Chart Designer. + */ + CustomizeMenuActions: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; + /** + * Updates the localization settings of the ASPxClientChartDesigner properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; + /** + * Returns the model of the Client Chart Designer. + */ + GetDesignerModel(): Object; + /** + * For internal use. + */ + GetJsonChartModel(): string; +} +/** + * A method that will handle the SaveCommandExecute event. + */ +interface ASPxClientChartDesignerSaveCommandExecuteEventHandler { + /** + * Represents a method that will handle the SaveCommandExecute event. + * @param source The event source. This parameter identifies the ASPxChartDesigner which raised the event. + * @param e A ASPxClientChartDesignerSaveCommandExecuteEventArgs object which contains event data. + */ + (source: S, e: ASPxClientChartDesignerSaveCommandExecuteEventArgs): void; +} +/** + * Provides data for a chart control's SaveCommandExecute event. + */ +interface ASPxClientChartDesignerSaveCommandExecuteEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value specifying whether an event has been handled. + * Value: true, if the event hasn't been handled by a control; otherwise, false. + */ + handled: boolean; +} +/** + * Represents a method that will handle the CustomizeMenuActions events. + */ +interface ASPxClientChartDesignerCustomizeMenuActionsEventHandler { + /** + * Represents a method that will handle the CustomizeMenuActions event. + * @param source The event source. This parameter identifies the ASPxChartDesigner which raised the event. + * @param e An ASPxClientChartDesignerCustomizeMenuActionsEventArgs object which contains event data. + */ + (source: S, e: ASPxClientChartDesignerCustomizeMenuActionsEventArgs): void; +} +/** + * An action of the Client Chart Designer's menu. + */ +interface ASPxClientChartDesignerMenuAction { + /** + * Provides access to the text for the command. + * Value: A String value. + */ + text: string; + /** + * Provides access to the CSS class of the command's glyph. + * Value: A String value. + */ + imageClassName: string; + /** + * Provides access to the action performed when the Client Chart Designer's button is clicked. + * Value: The specific action implementation. + */ + clickAction: Function; + /** + * Provides access to the value that specifies whether or not the command is disabled by default. + * Value: true, if the command is disabled by default; otherwise, false. + */ + disabled: boolean; + /** + * Provides access to the value that specifies whether or not the command is visible in the designer user interface. + * Value: true if the command is visible; otherwise false. + */ + visible: boolean; + /** + * Provides access to the keyboard shortcut used to invoke the command. + * Value: A String value. + */ + hotKey: string; + /** + * Provides access to the value that specifies whether or not the command has a visual separator. + * Value: true, if the command has a visual separator; otherwise, false. + */ + hasSeparator: string; + /** + * Provides access to the location of the displayed command. + * Value: A String value. + */ + container: string; +} +/** + * Provides data for a chart control's CustomizeMenuActions event on the client side. + */ +interface ASPxClientChartDesignerCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { + /** + * Returns an array of the Client Chart Designer's menu actions. + * Value: An array of the ASPxClientChartDesignerMenuAction objects. + */ + actions: ASPxClientChartDesignerMenuAction[]; +} +/** + * A class which provides access to the entire hierarchy of chart elements on the client side. + */ +interface ASPxClientWebChartControl extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientWebChartControl. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when any chart element is hot-tracked. + */ + ObjectHotTracked: ASPxClientEvent>; + /** + * Occurs before crosshair items are drawn when the chart's contents are being drawn. + */ + CustomDrawCrosshair: ASPxClientEvent>; + /** + * Occurs on the client side when any chart element is selected. + */ + ObjectSelected: ASPxClientEvent>; + /** + * Returns an ASPxClientWebChart object, which contains information about the hierarchy of a chart control, and provides access to the main properties of chart elements on the client side. + */ + GetChart(): ASPxClientWebChart; + /** + * Returns the printing options of the chart control. + */ + GetPrintOptions(): ASPxClientChartPrintOptions; + /** + * Changes the mouse pointer, which is shown when the mouse is over the chart control, to the pointer with the specified name. + * @param cursor A string value representing the name of the desired cursor. + */ + SetCursor(cursor: string): void; + /** + * Returns the specific chart element which is located under the test point. + * @param x An integer value that specifies the x coordinate of the test point. + * @param y An integer value that specifies the y coordinate of the test point. + */ + HitTest(x: number, y: number): ASPxClientHitObject[]; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(args: string, onSuccess: (arg1: string) => void): void; + /** + * Prints the current chart on the client side. + */ + Print(): void; + /** + * Loads a chart which should be customized from its object model. + * @param serializedChartObjectModel A String object representing the chart model. + */ + LoadFromObjectModel(serializedChartObjectModel: string): void; + /** + * Exports a chart to the file of the specified format, and saves it to the disk. + * @param format A string value specifying the format, to which a chart should be exported. + */ + SaveToDisk(format: string): void; + /** + * Exports a chart to a file in the specified format, and saves it to disk, using the specified file name. + * @param format A string value specifying the format, to which a chart should be exported. + * @param filename A string value specifying the file name, to which a chart should be exported. If this parameter is missing or set to an empty string, then the created file will be named using the client-side name of a chart. + */ + SaveToDisk(format: string, filename: string): void; + /** + * Exports a report to the file of the specified format, and shows it in a new Web Browser window. + * @param format A string value specifying a format in which a report should be exported. + */ + SaveToWindow(format: string): void; + /** + * Gets the main DOM (Document Object Model) element on a Web Page representing this ASPxClientWebChartControl object. + */ + GetMainDOMElement(): Object; +} +/** + * A method that will handle the CustomDrawCrosshair event. + */ +interface ASPxClientWebChartControlCustomDrawCrosshairEventHandler { + /** + * A method that will handle the CustomDrawCrosshair event. + * @param source The event source. This parameter identifies the chartControl which raised the event. + * @param e An ASPxClientWebChartControlCustomDrawCrosshairEventArgs object which contains event data. + */ + (source: S, e: ASPxClientWebChartControlCustomDrawCrosshairEventArgs): void; +} +/** + * Provides data for a chart control's CustomDrawCrosshair event. + */ +interface ASPxClientWebChartControlCustomDrawCrosshairEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets crosshair elements settings to custom draw a crosshair cursor. + * Value: An ASPxClientCrosshairElement object. + */ + crosshairElements: ASPxClientCrosshairElement; + /** + * Gets the settings of crosshair axis label elements to customize their appearance. + * Value: An ASPxClientCrosshairAxisLabelElement object. + */ + cursorCrosshairAxisLabelElements: ASPxClientCrosshairAxisLabelElement; + /** + * Gets crosshair line element settings that are used to custom draw a crosshair cursor. + * Value: An ASPxClientCrosshairLineElement object that contains crosshair line element settings. + */ + cursorCrosshairLineElement: ASPxClientCrosshairLineElement; + /** + * Gets the settings of crosshair group header elements to customize their appearance. + * Value: An ASPxClientCrosshairGroupHeaderElement object. + */ + crosshairGroupHeaderElements: ASPxClientCrosshairGroupHeaderElement; + /** + * Provides access to the settings of crosshair elements and crosshair group header elements to customize their appearance. + * Value: An ASPxClientCrosshairElementGroup object. + */ + crosshairElementGroups: ASPxClientCrosshairElementGroup; +} +/** + * Represents the client-side equivalent of the CrosshairElement class. + */ +interface ASPxClientCrosshairElement { + /** + * Gets a series that a crosshair element hovers over when implementing a custom draw. + * Value: An ASPxClientSeries object which represents the series currently being painted. + */ + Series: ASPxClientSeries; + /** + * Gets the series point that a crosshair element hovers over when implementing a custom draw. + * Value: An ASPxClientSeriesPoint object, representing the series point that a crosshair element hovers over. + */ + Point: ASPxClientSeriesPoint; + /** + * Gets or sets the crosshair line element to custom draw a crosshair cursor. + * Value: An ASPxClientCrosshairLineElement object, representing the crosshair line element. + */ + LineElement: ASPxClientCrosshairLineElement; + /** + * Provides access to the crosshair axis label element. + * Value: An ASPxClientCrosshairAxisLabelElement object, representing the crosshair axis label element. + */ + AxisLabelElement: ASPxClientCrosshairAxisLabelElement; + /** + * Gets the crosshair label element. + * Value: An ASPxClientCrosshairSeriesLabelElement object, representing the crosshair label element. + */ + LabelElement: ASPxClientCrosshairSeriesLabelElement; + /** + * Specifies whether the crosshair element is visible when implementing custom drawing in the crosshair cursor. + * Value: true, if the crosshair element is visible; otherwise, false. + */ + visible: boolean; +} +/** + * Represents the client-side equivalent of the CrosshairLineElement class. + */ +interface ASPxClientCrosshairLineElement { +} +/** + * Represents the client-side equivalent of the CrosshairAxisLabelElement class. + */ +interface ASPxClientCrosshairAxisLabelElement { +} +/** + * The client-side equivalent of the CrosshairGroupHeaderElement class. + */ +interface ASPxClientCrosshairGroupHeaderElement { +} +/** + * The client-side equivalent of the CrosshairLabelElement class. + */ +interface ASPxClientCrosshairSeriesLabelElement { +} +/** + * Represents the client-side equivalent of the CrosshairElementGroup class. + */ +interface ASPxClientCrosshairElementGroup { +} +/** + * Represents a method that will handle the ObjectSelected events. + */ +interface ASPxClientWebChartControlHotTrackEventHandler { + /** + * Represents a method that will handle the ObjectSelected events. + * @param source The event source. This parameter identifies the ASPxClientWebChartControl which raised the event. + * @param e An ASPxClientWebChartControlHotTrackEventArgs object which contains event data. + */ + (source: S, e: ASPxClientWebChartControlHotTrackEventArgs): void; +} +/** + * Provides data for a chart control's ObjectSelected events on the client side. + */ +interface ASPxClientWebChartControlHotTrackEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Provides access on the client side to the chart element, for which the event was raised. + * Value: An ASPxClientWebChartElement object, which represents the chart element for which the event was raised. + */ + hitObject: ASPxClientWebChartElement; + /** + * Provides access on the client side to the object, which is in some way related to the object being hit. The returned value depends on the hitObject type and hit point location. + * Value: An ASPxClientWebChartElement object representing an additional object that relates to the one being hit. + */ + additionalHitObject: ASPxClientWebChartElement; + /** + * Gets details on the chart elements located at the point where an end-user has clicked when hot-tracking or selecting a chart element on the client side. + * Value: An ASPxClientWebChartHitInfo object, which contains information about the chart elements located at the point where an end-user has clicked. + */ + hitInfo: ASPxClientWebChartHitInfo; + /** + * Provides access on the client side to the chart and all its elements. + * Value: An ASPxClientWebChart object, which provides access to chart properties. + */ + chart: ASPxClientWebChart; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets the X-coordinate of the hit test point, relative to the top left corner of the chart. + * Value: An integer value specifying X-coordinate of the hit test point (in pixels). + */ + x: number; + /** + * Gets the Y-coordinate of the hit test point, relative to the top left corner of the chart. + * Value: An integer value specifying Y-coordinate of the hit test point (in pixels). + */ + y: number; + /** + * Gets the X-coordinate of the hit test point, relative to the top left corner of the Web Page containing this chart. + * Value: An integer value specifying X-coordinate of the hit test point (in pixels). + */ + absoluteX: number; + /** + * Gets the Y-coordinate of the hit test point, relative to the top left corner of the Web Page containing this chart. + * Value: An integer value specifying Y-coordinate of the hit test point (in pixels). + */ + absoluteY: number; + /** + * Gets a value indicating whether the hot-tracking or object selection should be canceled. + * Value: true to cancel the hot-tracking or selection of an object; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents an object under the hit test point within a chart control, on the client side. + */ +interface ASPxClientHitObject { + /** + * Gets the chart element for which the event was raised. + * Value: An ASPxClientWebChartElement object, representing the chart element for which the event was raised. + */ + Object: ASPxClientWebChartElement; + /** + * Provides access to an object, which is in some way related to the object being hit. The returned value depends on the Object type and hit point location. + * Value: An ASPxClientWebChartElement object that represents an additional object related to the one being hit. + */ + AdditionalObject: ASPxClientWebChartElement; +} +/** + * Contains information about a specific test point within a chart control, on the client side. + */ +interface ASPxClientWebChartHitInfo { + /** + * Gets a value indicating whether the test point is within the chart. + * Value: true if the test point is within a chart; otherwise, false. + */ + inChart: boolean; + /** + * Gets a value indicating whether the test point is within the chart title. + * Value: true if the test point is within a chart title; otherwise, false. + */ + inChartTitle: boolean; + /** + * Gets a value indicating whether the test point is within the axis. + * Value: true if the test point is within an axis; otherwise, false. + */ + inAxis: boolean; + /** + * Gets a value indicating whether the test point is within the axis label item. + * Value: true if the test point is within an axis label item; otherwise, false. + */ + inAxisLabelItem: boolean; + /** + * Gets a value indicating whether the test point is within the axis title. + * Value: true if the test point is within an axis title; otherwise, false. + */ + inAxisTitle: boolean; + /** + * Gets a value indicating whether the test point is within the constant line. + * Value: true if the test point is within a constant line; otherwise, false. + */ + inConstantLine: boolean; + /** + * Gets a value indicating whether the test point is within the diagram. + * Value: true if the test point is within a diagram; otherwise, false. + */ + inDiagram: boolean; + /** + * Gets a value indicating whether the test point is within the non-default pane. + * Value: true if the test point is within a non-default pane; otherwise, false. + */ + inNonDefaultPane: boolean; + /** + * Gets a value indicating whether the test point is within the legend. + * Value: true if the test point is within a legend; otherwise, false. + */ + inLegend: boolean; + /** + * Gets the value indicating whether or not the test point is within a custom legend item. + * Value: true if the test point is within a custom legend item; otherwise, false. + */ + inCustomLegendItem: boolean; + /** + * Gets a value indicating whether the test point is within the series. + * Value: true if the test point is within a series; otherwise, false. + */ + inSeries: boolean; + /** + * Gets a value indicating whether the test point is within the series label. + * Value: true if the test point is within a series label; otherwise, false. + */ + inSeriesLabel: boolean; + /** + * Gets a value indicating whether the test point is within the series point. + * Value: true if the test point is within a series point; otherwise, false. + */ + inSeriesPoint: boolean; + /** + * Gets a value indicating whether the test point is within the series title. + * Value: true if the test point is within a series title; otherwise, false. + */ + inSeriesTitle: boolean; + /** + * Gets a value indicating whether the test point is within the trendline. + * Value: true if the test point is within a trendline; otherwise, false. + */ + inTrendLine: boolean; + /** + * Gets a value indicating whether the test point is within the Fibonacci Indicator. + * Value: true if the test point is within a Fibonacci Indicator; otherwise, false. + */ + inFibonacciIndicator: boolean; + /** + * Gets a value indicating whether the test point is within the regression line. + * Value: true if the test point is within a regression line; otherwise, false. + */ + inRegressionLine: boolean; + /** + * Gets a value specifying whether the test point is within an indicator. + * Value: true if the test point is within an indicator; otherwise, false. + */ + inIndicator: boolean; + /** + * Gets a value indicating whether the test point is within an annotation. + * Value: true if the test point is within an annotation; otherwise, false. + */ + inAnnotation: boolean; + /** + * Gets a value indicating whether the test point is within a hyperlink. + * Value: true, if the test point is within a hyperlink; otherwise, false. + */ + inHyperlink: boolean; + /** + * Gets the client-side chart instance from under the test point. + * Value: An ASPxClientWebChart object. + */ + chart: ASPxClientWebChart; + /** + * Gets the client-side chart title instance from under the test point. + * Value: An ASPxClientChartTitle object. + */ + chartTitle: ASPxClientChartTitle; + /** + * Gets the client-side axis instance from under the test point. + * Value: An ASPxClientAxisBase descendant. + */ + axis: ASPxClientAxisBase; + /** + * Gets the client-side constant line instance from under the test point. + * Value: An ASPxClientConstantLine object. + */ + constantLine: ASPxClientConstantLine; + /** + * Gets the client-side diagram instance from under the test point. + * Value: An ASPxClientXYDiagramBase descendant. + */ + diagram: ASPxClientXYDiagramBase; + /** + * Gets the client-side non-default pane instance from under the test point. + * Value: An ASPxClientXYDiagramPane object. + */ + nonDefaultPane: ASPxClientXYDiagramPane; + /** + * Gets the client-side legend instance from under the test point. + * Value: An ASPxClientLegend object. + */ + legend: ASPxClientLegend; + /** + * Gets a custom legend item which is located under the test point. + * Value: An ASPxClientCustomLegendItem object which represents the item located under the test point. + */ + customLegendItem: ASPxClientCustomLegendItem; + /** + * Gets the client-side series instance from under the test point. + * Value: An ASPxClientSeries object. + */ + series: ASPxClientSeries; + /** + * Gets the client-side series label instance from under the test point. + * Value: An ASPxClientSeriesLabel object. + */ + seriesLabel: ASPxClientSeriesLabel; + /** + * Gets the client-side series title instance from under the test point. + * Value: An ASPxClientSeriesTitle object. + */ + seriesTitle: ASPxClientSeriesTitle; + /** + * Gets the client-side trendline instance from under the test point. + * Value: An ASPxClientTrendLine object. + */ + trendLine: ASPxClientTrendLine; + /** + * Gets the client-side Fibonacci indicator instance from under the test point. + * Value: An ASPxClientFibonacciIndicator object. + */ + fibonacciIndicator: ASPxClientFibonacciIndicator; + /** + * Gets the client-side regression line instance from under the test point. + * Value: An ASPxClientRegressionLine object. + */ + regressionLine: ASPxClientRegressionLine; + /** + * Gets the client-side indicator instance from under the test point. + * Value: An ASPxClientIndicator descendant. + */ + indicator: ASPxClientIndicator; + /** + * Gets the client-side annotation instance from under the test point. + * Value: An ASPxClientAnnotation object. + */ + annotation: ASPxClientAnnotation; + /** + * Gets the client-side series point instance from under the test point. + * Value: An ASPxClientSeriesPoint object. + */ + seriesPoint: ASPxClientSeriesPoint; + /** + * Gets the client-side axis label item instance from under the test point. + * Value: An ASPxClientAxisLabelItem object. + */ + axisLabelItem: ASPxClientAxisLabelItem; + /** + * Gets the client-side axis title instance from under the test point. + * Value: An ASPxClientAxisTitle object. + */ + axisTitle: ASPxClientAxisTitle; + /** + * Returns a hyperlink which is located under the test point. + * Value: A String object representing a hyperlink. + */ + hyperlink: string; +} +/** + * Represents the client-side equivalent of the DiagramCoordinates class. + */ +interface ASPxClientDiagramCoordinates { + /** + * Gets the type of the argument scale. + * Value: A string object which contains the current scale type. + */ + argumentScaleType: string; + /** + * Gets the type of the value scale. + * Value: A string object which contains the current scale type. + */ + valueScaleType: string; + /** + * Gets the argument of the data point as a text string. + * Value: A string object, representing a data point's argument. + */ + qualitativeArgument: string; + /** + * Gets the numerical representation of the data point's argument. + * Value: A Double value, representing the data point's argument. + */ + numericalArgument: number; + /** + * Gets the date-time representation of the data point's argument. + * Value: A date object, representing the point's argument. + */ + dateTimeArgument: Date; + /** + * Gets the numerical representation of the data point's value. + * Value: A Double value, representing the data point's value. + */ + numericalValue: number; + /** + * Gets the date-time representation of the data point's value. + * Value: A date object, representing the point's value. + */ + dateTimeValue: Date; + /** + * Gets the X-axis of the diagram point. + * Value: An ASPxClientAxisBase descendant, representing the axis of arguments (X-axis). + */ + axisX: ASPxClientAxisBase; + /** + * Gets the Y-axis of the diagram point. + * Value: An ASPxClientAxisBase descendant, representing the axis of values (Y-axis). + */ + axisY: ASPxClientAxisBase; + /** + * Gets the pane of the diagram point. + * Value: An ASPxClientXYDiagramPane descendant, representing the pane. + */ + pane: ASPxClientXYDiagramPane; + /** + * Checks whether the current object represents a point outside the diagram area. + */ + IsEmpty(): boolean; + /** + * Gets the value of the client-side axis instance. + * @param axis An ASPxClientAxisBase class descendant, representing the axis that contains the requested value. + */ + GetAxisValue(axis: ASPxClientAxisBase): ASPxClientAxisValue; +} +/** + * Contains the information about an axis value. + */ +interface ASPxClientAxisValue { + /** + * Gets the axis scale type. + * Value: A String value, specifying the axis scale type. + */ + scaleType: string; + /** + * Gets the axis value, if the axis scale type is qualitative. + * Value: A String value, specifying the axis value. + */ + qualitativeValue: string; + /** + * Gets the axis value, if the axis scale type is numerical. + * Value: A Double value, specifying the axis value. + */ + numericalValue: number; + /** + * Gets the axis value, if the axis scale type is date-time. + * Value: A DateTime value, specifying the axis value. + */ + dateTimeValue: Date; +} +/** + * Represents the client-side equivalent of the ControlCoordinates class. + */ +interface ASPxClientControlCoordinates { + /** + * Gets the point's pane. + * Value: An ASPxClientXYDiagramPane object. + */ + pane: ASPxClientXYDiagramPane; + /** + * Gets the point's X-coordinate, in pixels. + * Value: An integer value, specifying the X-coordinate (in pixels). + */ + x: number; + /** + * Gets the point's Y-coordinate, in pixels. + * Value: An integer value, specifying the Y-coordinate (in pixels). + */ + y: number; + /** + * Gets the point's visibility state. + * Value: "Visible", "Hidden", or "Undefined". + */ + visibility: string; +} +/** + * Represents the client-side equivalent of the ChartElement class. + */ +interface ASPxClientWebChartElement { + /** + * Gets the chart that owns the current chart element. + * Value: An ASPxClientWebChart object, to which the chart element belongs. + */ + chart: ASPxClientWebChart; +} +/** + * Represents a base class for chart elements, which are not necessarily required to be present on the client side. + */ +interface ASPxClientWebChartEmptyElement extends ASPxClientWebChartElement { +} +/** + * Represents a base class for chart elements, which are required to be present on the client side. + */ +interface ASPxClientWebChartRequiredElement extends ASPxClientWebChartElement { +} +/** + * Represents the client-side equivalent of the ChartElementNamed class. + */ +interface ASPxClientWebChartElementNamed extends ASPxClientWebChartRequiredElement { + /** + * Gets the name of the chart element. + * Value: A string object representing the name of the chart element. + */ + name: string; +} +/** + * Represents the client-side equivalent of the WebChartControl control. + */ +interface ASPxClientWebChart extends ASPxClientWebChartRequiredElement { + /** + * Gets the client-side Chart Control that owns the current chart. + * Value: An ASPxClientWebChartControl object, to which the chart belongs. + */ + chartControl: ASPxClientWebChartControl; + /** + * Gets the chart's diagram and provides access to its settings. + * Value: An ASPxClientRadarDiagram), that represents the chart's diagram. + */ + diagram: ASPxClientWebChartElement; + /** + * Provides access to the chart's collection of series. + * Value: An array of ASPxClientSeries objects that represent the collection of series. + */ + series: ASPxClientSeries[]; + /** + * Provides access to the collection of chart titles. + * Value: An array of ASPxClientChartTitle objects, that represent the collection of chart titles. + */ + titles: ASPxClientChartTitle[]; + /** + * Provides access to the chart's collection of annotations. + * Value: An array of ASPxClientAnnotation objects, representing the collection of annotations. + */ + annotations: ASPxClientAnnotation[]; + /** + * Gets the chart's legend and provides access to its settings. + * Value: An ASPxClientLegend object that represents the chart's legend. + */ + legend: ASPxClientLegend; + /** + * Returns the collection of legends. + * Value: An array of ASPxClientLegend objects. + */ + legends: ASPxClientLegend[]; + /** + * Gets the name of the appearance, which is currently used to draw the chart's elements. + * Value: A string value that represents the appearance name. + */ + appearanceName: string; + /** + * Gets the name of the palette currently used to draw the chart's series. + * Value: A string value that represents the palette name. + */ + paletteName: string; + /** + * Gets a value indicating whether series tooltips should be shown. + * Value: true to show tooltips for series; otherwise, false. + */ + showSeriesToolTip: boolean; + /** + * Gets a value indicating whether point tooltips should be shown. + * Value: true to show tooltips for series points; otherwise, false. + */ + showPointToolTip: boolean; + /** + * Gets a value indicating whether a crosshair cursor should be shown. + * Value: true to show a crosshair cursor; otherwise, false. + */ + showCrosshair: boolean; + /** + * Gets a value that contains information on how the tooltip position is defined, for example, relative to a mouse pointer or chart element. + * Value: An ASPxClientToolTipPosition class descendant that defines the tooltip position type. + */ + toolTipPosition: ASPxClientToolTipPosition; + /** + * Returns the tooltip controller that shows tooltips for chart elements. + * Value: An ASPxClientToolTipController object. + */ + toolTipController: ASPxClientToolTipController; + /** + * Gets the settings for a crosshair cursor concerning its position and appearance on a diagram. + * Value: An ASPxClientCrosshairOptions object descendant which provides access to crosshair cursor options on a diagram. + */ + crosshairOptions: ASPxClientCrosshairOptions; + /** + * Gets a css postfix for a chart. + * Value: A string value. + */ + cssPostfix: string; + /** + * Gets or sets a value which specifies how the chart elements are selected. + * Value: A String object representing the name of the selection mode. + */ + selectionMode: string; +} +/** + * Represents the client-side equivalent of the SimpleDiagram class. + */ +interface ASPxClientSimpleDiagram extends ASPxClientWebChartEmptyElement { +} +/** + * Represents the base class for all diagram classes, which have X and Y axes. + */ +interface ASPxClientXYDiagramBase extends ASPxClientWebChartRequiredElement { + /** + * Gets the X-axis. + * Value: An ASPxClientAxisBase object which represents the X-axis. + */ + axisX: ASPxClientAxisBase; + /** + * Gets the Y-axis. + * Value: An ASPxClientAxisBase object which represents the Y-axis. + */ + axisY: ASPxClientAxisBase; +} +/** + * Represents the client-side equivalent of the XYDiagram2D class. + */ +interface ASPxClientXYDiagram2D extends ASPxClientXYDiagramBase { + /** + * Provides access to a collection of secondary X-axes for a given 2D XY-diagram. + * Value: An array of ASPxClientAxis objects, that is a collection of secondary X-axes. + */ + secondaryAxesX: ASPxClientAxis[]; + /** + * Provides access to a collection of secondary Y-axes for a given 2D XY-diagram. + * Value: An array of ASPxClientAxis objects, that is a collection of secondary X-axes. + */ + secondaryAxesY: ASPxClientAxis[]; + /** + * Provides access to a default pane object. + * Value: An ASPxClientXYDiagramPane object which represents the default pane of a chart. + */ + defaultPane: ASPxClientXYDiagramPane; + /** + * Provides access to an array of a diagram's panes. + * Value: An array of ASPxClientXYDiagramPane objects. + */ + panes: ASPxClientXYDiagramPane[]; + /** + * Converts the display coordinates into a diagram coordinates object. + * @param x An integer value, representing the X-coordinate of a point (measured in pixels relative to the top left corner of a chart). + * @param y An integer value, representing the Y-coordinate of a point (measured in pixels relative to the top left corner of a chart). + */ + PointToDiagram(x: number, y: number): ASPxClientDiagramCoordinates; + /** + * Converts the diagram coordinates of a point into screen coordinates. + * @param argument An object, representing the point's argument. + * @param value An object, representing the point's value. + * @param axisX An ASPxClientAxis2D descendant, representing the X-axis. + * @param axisY An ASPxClientAxis2D descendant, representing the Y-axis. + * @param pane An ASPxClientXYDiagramPane object, representing the pane. + */ + DiagramToPoint(argument: Object, value: Object, axisX: ASPxClientAxis2D, axisY: ASPxClientAxis2D, pane: ASPxClientXYDiagramPane): ASPxClientControlCoordinates; + /** + * Shows the Crosshair Cursor at the point with the specified coordinates. + * @param screenX The horizontal coordinate that is related to the top-left angle of the chart. + * @param screenY The vertical coordinate that is related to the top-left angle of the chart. + */ + ShowCrosshair(screenX: number, screenY: number): void; +} +/** + * Represents the client-side equivalent of the XYDiagram class. + */ +interface ASPxClientXYDiagram extends ASPxClientXYDiagram2D { + /** + * Gets a value indicating whether the diagram is rotated. + * Value: true if the diagram is rotated; otherwise, false. + */ + rotated: boolean; +} +/** + * Represents the client-side equivalent of the SwiftPlotDiagram class. + */ +interface ASPxClientSwiftPlotDiagram extends ASPxClientXYDiagram2D { +} +/** + * Represents the client-side equivalent of the XYDiagramPane class. + */ +interface ASPxClientXYDiagramPane extends ASPxClientWebChartElementNamed { + /** + * Gets the diagram that owns the current pane object. + * Value: An ASPxClientXYDiagram object, to which the pane belongs. + */ + diagram: ASPxClientXYDiagram; +} +/** + * Represents the client-side equivalent of the XYDiagram3D class. + */ +interface ASPxClientXYDiagram3D extends ASPxClientXYDiagramBase { +} +/** + * Represents the client-side equivalent of the RadarDiagram class. + */ +interface ASPxClientRadarDiagram extends ASPxClientXYDiagramBase { + /** + * Converts the display coordinates into a diagram coordinates object. + * @param x An integer value, representing the X-coordinate of a point (measured in pixels relative to the top left corner of a chart). + * @param y An integer value, representing the Y-coordinate of a point (measured in pixels relative to the top left corner of a chart). + */ + PointToDiagram(x: number, y: number): ASPxClientDiagramCoordinates; + /** + * Converts the diagram coordinates of a point into screen coordinates. + * @param argument An object, representing the point's argument. + * @param value An object, representing the point's value. + */ + DiagramToPoint(argument: Object, value: Object): ASPxClientControlCoordinates; +} +/** + * Represents the client-side equivalent of the AxisBase class. + */ +interface ASPxClientAxisBase extends ASPxClientWebChartElementNamed { + /** + * Provides access to the XY-diagram which contains the current axis. + * Value: An ASPxClientXYDiagramBase class descendant. + */ + diagram: ASPxClientXYDiagramBase; + /** + * Provides acess to the range of the axis coordinates. + * Value: An ASPxClientAxisRange object, which contains the common range settings of the axis coordinates. + */ + range: ASPxClientAxisRange; +} +/** + * Represents the client-side equivalent of the Axis2D class. + */ +interface ASPxClientAxis2D extends ASPxClientAxisBase { + /** + * Provides access to an axis title object. + * Value: An ASPxClientAxisTitle object which represents the axis title. + */ + axisTitle: ASPxClientAxisTitle; + /** + * Provides access to the axis strips collection. + * Value: An array of ASPxClientStrip objects. + */ + strips: ASPxClientStrip[]; + /** + * Provides access to the collection of the axis constant lines. + * Value: An array of ASPxClientConstantLine objects which represent constant lines that belong to this axis. + */ + constantLines: ASPxClientConstantLine[]; +} +/** + * Represents the client-side equivalent of the Axis class. + */ +interface ASPxClientAxis extends ASPxClientAxis2D { + /** + * Gets a value indicating whether the axis is reversed. + * Value: true if the axis is reversed; otherwise, false. + */ + reverse: boolean; +} +/** + * Represents the client-side equivalent of the SwiftPlotDiagramAxis class. + */ +interface ASPxClientSwiftPlotDiagramAxis extends ASPxClientAxis2D { +} +/** + * Represents the client-side equivalent of the Axis3D class. + */ +interface ASPxClientAxis3D extends ASPxClientAxisBase { +} +/** + * Represents the client-side equivalent of the RadarAxis class. + */ +interface ASPxClientRadarAxis extends ASPxClientAxisBase { +} +/** + * Represents the client-side equivalent of the AxisTitle class. + */ +interface ASPxClientAxisTitle extends ASPxClientWebChartRequiredElement { + /** + * Gets the axis to which the axis title belongs. + * Value: An ASPxClientAxisBase descendant, which identifies the axis. + */ + axis: ASPxClientAxisBase; + /** + * Gets the text of the axis title. + * Value: A string object which contains the axis title's text. + */ + text: string; +} +/** + * Represents the client-side equivalent of the AxisLabelItem class. + */ +interface ASPxClientAxisLabelItem extends ASPxClientWebChartRequiredElement { + /** + * Gets the axis to which an axis label item belongs. + * Value: An ASPxClientAxisBase descendant, which identifies the axis. + */ + axis: ASPxClientAxisBase; + /** + * Gets the text of an axis label item. + * Value: A string object which contains the axis label item's text. + */ + text: string; + /** + * Gets the axis value to which an axis label item corresponds. + * Value: An object that specifies the axis value. + */ + axisValue: Object; + /** + * Gets the internal representation of the axis value to which an axis label item corresponds. + * Value: A Double value which specifies the internal representation of the axis value. + */ + axisValueInternal: number; +} +/** + * Represents the client-side equivalent of the AxisRange class. + */ +interface ASPxClientAxisRange extends ASPxClientWebChartRequiredElement { + /** + * Gets the axis that owns the current axis range object. + * Value: An ASPxClientAxisBase object, to which the axis range belongs. + */ + axis: ASPxClientAxisBase; + /** + * Gets the minimum value to display on an axis. + * Value: An object representing the minimum value of the axis range. + */ + minValue: Object; + /** + * Gets the maximum value to display on an axis. + * Value: An object representing the maximum value of the axis range. + */ + maxValue: Object; + /** + * Gets the internal float representation of the range minimum value. + * Value: A Double value which specifies the internal representation of the range minimum value. + */ + minValueInternal: number; + /** + * Gets the internal float representation of the range maximum value. + * Value: A Double value which specifies the internal representation of the range maximum value. + */ + maxValueInternal: number; +} +/** + * Represents the client-side equivalent of the Strip class. + */ +interface ASPxClientStrip extends ASPxClientWebChartElementNamed { + /** + * Gets the axis that owns the current strip object. + * Value: An ASPxClientAxis object, to which the strip belongs. + */ + axis: ASPxClientAxis; + /** + * Gets the minimum value of the strip's range. + * Value: An object that represents the minimum value of the strip's range. + */ + minValue: Object; + /** + * Gets the maximum value of the strip's range. + * Value: An object that represents the maximum value of the strip's range. + */ + maxValue: Object; +} +/** + * Represents the client-side equivalent of the ConstantLine class. + */ +interface ASPxClientConstantLine extends ASPxClientWebChartElementNamed { + /** + * Gets the axis that owns the current constant line object. + * Value: An ASPxClientAxis object, to which the constant line belongs. + */ + axis: ASPxClientAxis; + /** + * Gets the constant line's position along the axis. + * Value: An object that specifies the constant line's position. + */ + value: Object; + /** + * Gets the constant line title. + * Value: A string object, representing the title's text. + */ + title: string; +} +/** + * Represents the client-side equivalent of the Series class. + */ +interface ASPxClientSeries extends ASPxClientWebChartElementNamed { + /** + * Gets a value that specifies the view type of the series. + * Value: A string object which contains the current view type. + */ + viewType: string; + /** + * Gets a value that specifies the scale type for the argument data of the series' data points. + * Value: A string object which contains the current scale type. + */ + argumentScaleType: string; + /** + * Gets a value that specifies the scale type for the value data of the series' data points. + * Value: A string object which contains the current scale type. + */ + valueScaleType: string; + /** + * Gets the X-Axis that is used to plot the current series on the XY-diagram. + * Value: A string object, which represents the X-axis name. + */ + axisX: string; + /** + * Gets the Y-Axis that is used to plot the current series on the XY-diagram. + * Value: A string object, which represents the Y-axis name. + */ + axisY: string; + /** + * Gets the pane that is used to plot the current series on the XY-diagram. + * Value: A string object, which represents the pane's name. + */ + pane: string; + /** + * Gets a value indicating whether the series is visible. + * Value: true if the series is visible; otherwise, false. + */ + visible: boolean; + /** + * Gets a value that specifies whether or not a tooltip is enabled for a chart. + * Value: true - a tooltip is enabled for a chart; false - a tooltip is disabled. + */ + toolTipEnabled: boolean; + /** + * Gets the text to be displayed within series tooltips. + * Value: A string value. + */ + toolTipText: string; + /** + * Gets an image to be displayed within series tooltips. + * Value: A string value. + */ + toolTipImage: string; + /** + * Gets the settings of series labels. + * Value: An ASPxClientSeriesLabel object, which provides the series label settings. + */ + label: ASPxClientSeriesLabel; + /** + * Gets the series' collection of data points. + * Value: An array of ASPxClientSeriesPoint objects, that represent the series' data points. + */ + points: ASPxClientSeriesPoint[]; + /** + * Provides access to the collection of series titles. + * Value: An array of ASPxClientSeriesTitle objects, that represent the collection of series titles. + */ + titles: ASPxClientSeriesTitle[]; + /** + * Gets the series' collection of indicators. + * Value: An array of ASPxClientIndicator objects, that belong to the series. + */ + indicators: ASPxClientIndicator[]; + /** + * Provides access to the collection of regression lines. + * Value: An array of ASPxClientRegressionLine objects which represent regression lines available for the series. + */ + regressionLines: ASPxClientRegressionLine[]; + /** + * Provides access to the collection of trendlines. + * Value: An array of ASPxClientTrendLine objects, that represent the collection of trendlines. + */ + trendLines: ASPxClientTrendLine[]; + /** + * Provides access to the collection of Fibonacci Indicators. + * Value: An array of ASPxClientFibonacciIndicator objects, that represent the collection of Fibonacci Indicators. + */ + fibonacciIndicators: ASPxClientFibonacciIndicator[]; + /** + * Gets the color of a series. + * Value: A string value. + */ + color: string; + /** + * Gets a value that defines a group for stacked series. + * Value: A string value. + */ + stackedGroup: string; + /** + * Gets a string which represents the pattern specifying the text to be displayed within a crosshair label for the current Series type. + * Value: A Empty. + */ + crosshairLabelPattern: string; + /** + * This property is intended for internal use only. + * Value: A String value. + */ + groupedElementsPattern: string; + /** + * Returns a collection of crosshair value items. + * Value: An array of ASPxClientCrosshairValueItem objects. + */ + crosshairValueItems: ASPxClientCrosshairValueItem[]; + /** + * Gets a value indicating whether a crosshair cursor is enabled. + * Value: true if a crosshair cursor is enabled; otherwise, false. + */ + actualCrosshairEnabled: boolean; + /** + * Gets a value indicating whether a crosshair label should be shown for this series. + * Value: true if crosshair labels are visible; otherwise, false. + */ + actualCrosshairLabelVisibility: boolean; +} +/** + * Represents the client-side equivalent of the SeriesLabelBase class. + */ +interface ASPxClientSeriesLabel extends ASPxClientWebChartElement { + /** + * Gets the series that owns the current series label object. + * Value: An ASPxClientSeries object, to which the series label belongs. + */ + series: ASPxClientSeries; + /** + * Gets the common text for all series point labels. + * Value: Returns an empty string object. + */ + text: string; +} +/** + * Represents the client-side equivalent of the SeriesPoint class. + */ +interface ASPxClientSeriesPoint extends ASPxClientWebChartRequiredElement { + /** + * Gets the series that owns the current series point object. + * Value: An ASPxClientSeries object, to which the series point belongs. + */ + series: ASPxClientSeries; + /** + * Gets the data point's argument. + * Value: An object that specifies the data point's argument. + */ + argument: Object; + /** + * Gets the point's data value(s). + * Value: An array of objects that represent the data value(s) of the series data point. + */ + values: Object[]; + /** + * Gets the text to be displayed within series points tooltips. + * Value: A string value. + */ + toolTipText: string; + /** + * Gets the color of a series point. + * Value: A string value. + */ + color: string; + /** + * Gets the percent value of a series point. + * Value: A float value. + */ + percentValue: number; + /** + * Gets a hint that is shown in series points tooltips. + * Value: A string value. + */ + toolTipHint: string; +} +/** + * Represents the client-side equivalent of the Legend class. + */ +interface ASPxClientLegend extends ASPxClientWebChartEmptyElement { + /** + * Returns a value which determines whether to use checkboxes instead of markers on a chart legend for all legend items. + * Value: true, if legend checkboxes are shown instead of markers for all legend items; otherwise, false. + */ + useCheckBoxes: boolean; + /** + * Returns a collection of custom legend items of the legend. + * Value: A collection of ASPxClientCustomLegendItem objects. + */ + customItems: ASPxClientCustomLegendItem[]; + /** + * Returns the name of the legend. + * Value: The string value representing the name of the legend. + */ + name: string; +} +/** + * Represents the base for ASPxClientSeriesTitle classes. + */ +interface ASPxClientTitleBase extends ASPxClientWebChartRequiredElement { + /** + * Gets the lines of text within a title. + * Value: An array of string values containing the text of a title. + */ + lines: string[]; + /** + * Gets the alignment of the title. + * Value: A string value containing the text, which specifies the alignment of a title. + */ + alignment: string; + /** + * Gets a value that specifies to which edges of a parent element the title should be docked. + * Value: A string value. + */ + dock: string; +} +/** + * Represents the client-side equivalent of the ChartTitle class. + */ +interface ASPxClientChartTitle extends ASPxClientTitleBase { +} +/** + * Represents the client-side equivalent of the SeriesTitle class. + */ +interface ASPxClientSeriesTitle extends ASPxClientTitleBase { + /** + * Gets the series that owns the current title object. + * Value: An ASPxClientSeries object, to which the series title belongs. + */ + series: ASPxClientSeries; +} +/** + * Represents the client-side equivalent of the Indicator class. + */ +interface ASPxClientIndicator extends ASPxClientWebChartElementNamed { + /** + * Gets the indicator's associated series. + * Value: An ASPxClientSeries object. + */ + series: ASPxClientSeries; +} +/** + * Represents the client-side equivalent of the FinancialIndicator class. + */ +interface ASPxClientFinancialIndicator extends ASPxClientIndicator { + /** + * Gets the first point of the financial indicator. + * Value: An ASPxClientFinancialIndicatorPoint object, which represents a financial indicator's first point. + */ + point1: ASPxClientFinancialIndicatorPoint; + /** + * Gets the second point of the financial indicator. + * Value: An ASPxClientFinancialIndicatorPoint object, which represents a financial indicator's second point. + */ + point2: ASPxClientFinancialIndicatorPoint; +} +/** + * Represents the client-side equivalent of the TrendLine class. + */ +interface ASPxClientTrendLine extends ASPxClientFinancialIndicator { +} +/** + * Represents the client-side equivalent of the FibonacciIndicator class. + */ +interface ASPxClientFibonacciIndicator extends ASPxClientFinancialIndicator { +} +/** + * Represents the client-side equivalent of the FinancialIndicatorPoint class. + */ +interface ASPxClientFinancialIndicatorPoint extends ASPxClientWebChartRequiredElement { + /** + * Gets the financial indicator that owns the current financial indicator point. + * Value: An ASPxClientFinancialIndicator object, to which the point belongs. + */ + financialIndicator: ASPxClientFinancialIndicator; + /** + * Gets the argument of the financial indicator's point. + * Value: An object that specifies the point argument. + */ + argument: Object; + /** + * Gets a value, indicating how the value of a financial indicator's point is obtained. + * Value: A string value, which indicates how to obtain a financial indicator point's value. + */ + valueLevel: string; +} +/** + * The client-side equivalent of the SingleLevelIndicator class. + */ +interface ASPxClientSingleLevelIndicator extends ASPxClientIndicator { + /** + * Gets a value specifying the value level to which the single-level indicator corresponds. + * Value: A string value. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the RegressionLine class. + */ +interface ASPxClientRegressionLine extends ASPxClientSingleLevelIndicator { +} +/** + * The client-side equivalent of the MovingAverage class. + */ +interface ASPxClientMovingAverage extends ASPxClientSingleLevelIndicator { + /** + * Gets the number of data points used to calculate the moving average. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value specifying whether to display a Moving Average, Envelope, or both. + * Value: A string value. + */ + kind: string; + /** + * Gets a value specifying the Envelope percent. + * Value: A double value which specifies the Envelope percent. + */ + envelopePercent: number; +} +/** + * The client-side equivalent of the SimpleMovingAverage class. + */ +interface ASPxClientSimpleMovingAverage extends ASPxClientMovingAverage { +} +/** + * The client-side equivalent of the ExponentialMovingAverage class. + */ +interface ASPxClientExponentialMovingAverage extends ASPxClientMovingAverage { +} +/** + * The client-side equivalent of the WeightedMovingAverage class. + */ +interface ASPxClientWeightedMovingAverage extends ASPxClientMovingAverage { +} +/** + * The client-side equivalent of the TriangularMovingAverage class. + */ +interface ASPxClientTriangularMovingAverage extends ASPxClientMovingAverage { +} +/** + * Represents the client-side equivalent of the TripleExponentialMovingAverageTema class. + */ +interface ASPxClientTripleExponentialMovingAverageTema extends ASPxClientMovingAverage { +} +/** + * Represents the client-side equivalent of the BollingerBands class. + */ +interface ASPxClientBollingerBands extends ASPxClientIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the MedianPrice class. + */ +interface ASPxClientMedianPrice extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the TypicalPrice class. + */ +interface ASPxClientTypicalPrice extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the WeightedClose class. + */ +interface ASPxClientWeightedClose extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the SeparatePaneIndicator class. + */ +interface ASPxSeparatePaneIndicator extends ASPxClientIndicator { + /** + * Returns the name of the Y-axis that is used to plot the current indicator on a ASPxClientXYDiagram. + * Value: A string value specifying the Y-axis name. + */ + axisY: string; + /** + * Returns the name of a pane, used to plot the separate pane indicator on an XYDiagram. + * Value: A string that is the name of a pane. + */ + pane: string; +} +/** + * Represents the client-side equivalent of the AverageTrueRange class. + */ +interface ASPxClientAverageTrueRange extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the ChaikinsVolatility class. + */ +interface ASPxClientChaikinsVolatility extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the CommodityChannelIndex class. + */ +interface ASPxClientCommodityChannelIndex extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the DetrendedPriceOscillator class. + */ +interface ASPxClientDetrendedPriceOscillator extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the MassIndex class. + */ +interface ASPxClientMassIndex extends ASPxSeparatePaneIndicator { + /** + * Returns the count of points used to calculate the exponential moving average (EMA). + * Value: An integer value, specifying the count of points used to calculate EMA. + */ + movingAveragePointsCount: number; + /** + * Returns the count of summable values. + * Value: An integer value specifying the count of summable ratios. + */ + sumPointsCount: number; +} +/** + * Represents the client-side equivalent of the MovingAverageConvergenceDivergence class. + */ +interface ASPxClientMovingAverageConvergenceDivergence extends ASPxSeparatePaneIndicator { + /** + * Returns the short period value required to calculate the indicator. + * Value: An integer value specifying the short period value. + */ + shortPeriod: number; + /** + * Returns the long period value required to calculate the indicator. + * Value: An integer value specifying the long period. + */ + longPeriod: number; + /** + * Returns the smoothing period value required to calculate the indicator. + * Value: An integer value specifying the smoothing period value. + */ + signalSmoothingPeriod: number; +} +/** + * Represents the client-side equivalent of the RateOfChange class. + */ +interface ASPxClientRateOfChange extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the RelativeStrengthIndex class. + */ +interface ASPxClientRelativeStrengthIndex extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the StandardDeviation class. + */ +interface ASPxClientStandardDeviation extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the TripleExponentialMovingAverageTrix class. + */ +interface ASPxClientTripleExponentialMovingAverageTrix extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the WilliamsR class. + */ +interface ASPxClientWilliamsR extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the FixedValueErrorBars class. + */ +interface ASPxClientFixedValueErrorBars extends ASPxClientIndicator { + /** + * Gets or sets the fixed positive error value. + * Value: A double value specifying the positive error value. + */ + positiveError: number; + /** + * Returns the fixed negative error value. + * Value: A double value specifying the negative error value. + */ + negativeError: number; +} +/** + * Represents the client-side equivalent of the PercentageErrorBars class. + */ +interface ASPxClientPercentageErrorBars extends ASPxClientIndicator { + /** + * Returns the value specifying the percentage of error values of series point values. + * Value: A double value specifying the percentage. Values less than or equal to 0 are not allowed. + */ + percent: number; +} +/** + * Represents the client-side equivalent of the StandardDeviationErrorBars class. + */ +interface ASPxClientStandardDeviationErrorBars extends ASPxClientIndicator { + /** + * Returns the multiplier on which the standard deviation value is multiplied before display. + * Value: A double value specifying the multiplier. Values less than 0 are not allowed. + */ + multiplier: number; +} +/** + * Represents the client-side equivalent of the StandardErrorBars class. + */ +interface ASPxClientStandardErrorBars extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the DataSourceBasedErrorBars class. + */ +interface ASPxClientDataSourceBasedErrorBars extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the Annotation class. + */ +interface ASPxClientAnnotation extends ASPxClientWebChartElementNamed { +} +/** + * Represents the client-side equivalent of the TextAnnotation class. + */ +interface ASPxClientTextAnnotation extends ASPxClientAnnotation { + /** + * Gets the lines of text within an annotation. + * Value: An array of string values containing the text of a title. + */ + lines: string[]; +} +/** + * Represents the client-side equivalent of the ImageAnnotation class. + */ +interface ASPxClientImageAnnotation extends ASPxClientAnnotation { +} +/** + * The client-side equivalent of the CrosshairValueItem class. + */ +interface ASPxClientCrosshairValueItem { + /** + * Gets the value that is displayed in a crosshair label. + * Value: A float value. + */ + value: number; + /** + * Gets an index of a point for which this crosshair value item is displayed. + * Value: An integer value. + */ + pointIndex: number; +} +/** + * The client-side equivalent of the ChartToolTipController class. + */ +interface ASPxClientToolTipController extends ASPxClientWebChartEmptyElement { + /** + * Gets a value indicating whether an image should be shown in tooltips. + * Value: true to show an image in tooltips; otherwise, false. + */ + showImage: boolean; + /** + * Gets a value indicating whether it is necessary to show text in tooltips. + * Value: true to show text in tooltips; otherwise, false. + */ + showText: boolean; + /** + * Gets a value that defines the position of an image within a tooltip. + * Value: A string value. + */ + imagePosition: string; + /** + * Gets a value that defines when tooltips should be invoked. + * Value: A string value. + */ + openMode: string; +} +/** + * The client-side equivalent of the ToolTipPosition class. + */ +interface ASPxClientToolTipPosition { +} +/** + * The client-side equivalent of the ToolTipRelativePosition class. + */ +interface ASPxClientToolTipRelativePosition extends ASPxClientToolTipPosition { + /** + * Gets the horizontal offset of a tooltip. + * Value: An integer value. + */ + offsetX: number; + /** + * Gets the vertical offset of a tooltip. + * Value: An integer value. + */ + offsetY: number; +} +/** + * The client-side equivalent of the ToolTipFreePosition class. + */ +interface ASPxClientToolTipFreePosition extends ASPxClientToolTipPosition { + /** + * Gets the horizontal offset of a tooltip. + * Value: An integer value. + */ + offsetX: number; + /** + * Gets the vertical offset of a tooltip. + * Value: An integer value. + */ + offsetY: number; + /** + * Gets the ID of a pane. + * Value: An integer value. + */ + paneID: number; + /** + * Gets an object containing settings that define how a tooltip should be docked. + * Value: A string value. + */ + dockPosition: string; +} +/** + * The client-side equivalent of the CrosshairLabelPosition class. + */ +interface ASPxClientCrosshairPosition { + /** + * Gets the horizontal offset of a crosshair cursor. + * Value: An integer value that is the X-offset. + */ + offsetX: number; + /** + * Gets the vertical offset of a crosshair cursor. + * Value: An integer value that is the Y-offset. + */ + offsetY: number; +} +/** + * The client-side equivalent of the CrosshairMousePosition class. + */ +interface ASPxClientCrosshairMousePosition extends ASPxClientCrosshairPosition { +} +/** + * The client-side equivalent of the CrosshairFreePosition class. + */ +interface ASPxClientCrosshairFreePosition extends ASPxClientCrosshairPosition { + /** + * Gets a Pane's ID when the crosshair cursor is in the free position mode. + * Value: An integer value that is the pane's ID. + */ + paneID: number; + /** + * Gets a string containing information on a crosshair label's dock position when the crosshair cursor is in the free position mode. + * Value: A string value containing information on a crosshair label's dock position. + */ + dockPosition: string; +} +/** + * Defines line style settings. + */ +interface ASPxClientLineStyle extends ASPxClientWebChartElement { + /** + * Gets the dash style used to paint the line. + * Value: A string value that contains information about the style used to paint the line. + */ + dashStyle: string; + /** + * Gets the thickness that corresponds to the value of the current ASPxClientLineStyle object. + * Value: An integer value which specifies the thickness, in pixels. + */ + thickness: number; + /** + * Returns the join style for the ends of consecutive lines. + * Value: A string representing the name of the line join type. + */ + lineJoin: string; +} +/** + * The client-side equivalent of the CrosshairOptions class. + */ +interface ASPxClientCrosshairOptions extends ASPxClientWebChartEmptyElement { + /** + * Gets a value indicating whether it is necessary to show a crosshair label for the X-axis. + * Value: true to show a crosshair label for the X-axis; otherwise, false. + */ + showAxisXLabels: boolean; + /** + * Gets a value indicating whether it is necessary to show a crosshair label for the Y-axis. + * Value: true to show the crosshair label for the Y-axis; otherwise, false. + */ + showAxisYLabels: boolean; + /** + * Gets a value that defines whether a crosshair label of a series point indicated by a crosshair cursor is shown on a diagram. + * Value: true if a crosshair label indicated by a crosshair cursor is shown on a diagram; otherwise, false. + */ + showCrosshairLabels: boolean; + /** + * Gets a value that indicates whether a crosshair cursor argument line is shown for a series point on a diagram. + * Value: true if a crosshair cursor argument line is displayed on a diagram; otherwise, false. + */ + showArgumentLine: boolean; + /** + * Specifies whether to show a value line of a series point indicated by a crosshair cursor on a diagram. + * Value: true to display a value line indicated by a crosshair cursor on a diagram; otherwise, false. + */ + showValueLine: boolean; + /** + * Gets a value that specifies whether to show a crosshair cursor in a focused pane only. + * Value: true to display a crosshair cursor in a focused pane; otherwise, false. + */ + showOnlyInFocusedPane: boolean; + /** + * Specifies the current snap mode of a crosshair cursor. + * Value: A string value. + */ + snapMode: string; + /** + * Specifies the way in which the crosshair label is shown for a series on a diagram. + * Value: A string value that specifies how the crosshair label is shown for a series. + */ + crosshairLabelMode: string; + /** + * Gets a value that indicates whether to show a header for each series group in crosshair cursor labels. + * Value: true, to show a group header in crosshair cursor labels; otherwise, false. + */ + showGroupHeaders: boolean; + /** + * Gets a string which represents the pattern specifying the group header text to be displayed within the crosshair label. + * Value: A String, which represents the group header's pattern. + */ + groupHeaderPattern: string; + /** + * Gets a value that specifies whether the Crosshair cursor should show points that are out of visual range. + * Value: true if the out of visual range points should be shown in the Crosshair label; otherwise false. + */ + showOutOfRangePoints: boolean; + /** + * Gets the identifier specifying the behavior of the selection of points shown in the crosshair label. + * Value: The selection behavior identifier. + */ + valueSelectionMode: string; + /** + * Gets the color of a crosshair argument line. + * Value: A String value, specifying the color of a crosshair argument line. + */ + argumentLineColor: string; + /** + * Gets the color of a crosshair value line. + * Value: A String value, specifying the color of a crosshair value line. + */ + valueLineColor: string; +} +/** + * The chart print options storage. + */ +interface ASPxClientChartPrintOptions { + /** + * Gets the size mode used to print a chart. + */ + GetSizeMode(): string; + /** + * Sets the size mode used to print a chart. + * @param sizeMode A System.String object, specifying the name of the size mode. + */ + SetSizeMode(sizeMode: string): void; + /** + * Gets a value indicating that the landscape orientation will be used to print a chart. + */ + GetLandscape(): boolean; + /** + * Sets a value indicating that the landscape orientation will be used to print a chart. + * @param landscape A Boolean value, specifying that the landscape orientation will be used to print a chart. + */ + SetLandscape(landscape: boolean): void; + /** + * Gets the left margin which will be used to print a chart. + */ + GetMarginLeft(): number; + /** + * Sets the left margin which will be used to print a chart. + * @param marginLeft A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginLeft(marginLeft: number): void; + /** + * Gets the top margin which will be used to print a chart. + */ + GetMarginTop(): number; + /** + * Sets the top margin which will be used to print a chart. + * @param marginTop A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginTop(marginTop: number): void; + /** + * Gets the right margin which will be used to print a chart. + */ + GetMarginRight(): number; + /** + * Sets the right margin which will be used to print a chart. + * @param marginRight A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginRight(marginRight: number): void; + /** + * Gets the bottom margin which will be used to print a chart. + */ + GetMarginBottom(): number; + /** + * Sets the bottom margin which will be used to print a chart. + * @param marginBottom A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginBottom(marginBottom: number): void; + /** + * Gets the predefined size ratio of the paper which will be used to print a chart. + */ + GetPaperKind(): string; + /** + * Sets the predefined size ratio of the paper which will be used to print a chart. + * @param paperKind A System.String object, specifying the name of a size ratio. + */ + SetPaperKind(paperKind: string): void; + /** + * Gets the custom paper width which will be used to print a chart. + */ + GetCustomPaperWidth(): number; + /** + * Sets the custom paper width which will be used to print a chart. + * @param customPaperWidth A System.Int32 object, specifying the width in hundredths of an inch. + */ + SetCustomPaperWidth(customPaperWidth: number): void; + /** + * Gets the custom paper height which will be used to print a chart. + */ + GetCustomPaperHeight(): number; + /** + * Sets the custom paper height which will be used to print a chart. + * @param customPaperHeight A System.Int32 object, specifying the height in hundredths of an inch. + */ + SetCustomPaperHeight(customPaperHeight: number): void; + /** + * Gets the name of the custom paper width-height ratio used to print the chart. + */ + GetCustomPaperName(): string; + /** + * Sets the name of the custom paper width-height ratio used to print a chart. + * @param customPaperName A String object, specifying the name of the custom paper width-height ratio. + */ + SetCustomPaperName(customPaperName: string): void; +} +/** + * Represents the client-side equivalent of the CustomLegendItem class. + */ +interface ASPxClientCustomLegendItem extends ASPxClientWebChartElementNamed { + /** + * Returns the text displayed by the custom legend item. + * Value: A string value that specifies legend item text. + */ + text: string; +} +/** + * The client-side equivalent of the ASPxDocumentViewer control. + */ +interface ASPxClientDocumentViewer extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientDocumentViewer. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs when the value of an item within the Document Viewer's report toolbar is changed. + */ + ToolbarItemValueChanged: ASPxClientEvent>; + /** + * Occurs when an item within the Document Viewer's report toolbar is clicked. + */ + ToolbarItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when a report page is loaded into this ASPxClientDocumentViewer instance. + */ + PageLoad: ASPxClientEvent>; + /** + * Provides access to the Splitter of the ASPxClientDocumentViewer. + */ + GetSplitter(): ASPxClientSplitter; + /** + * Provides access to the ASPxClientDocumentViewer's preview that exposes methods to print and export the document. + */ + GetViewer(): ASPxClientReportViewer; + /** + * Provides access to the Document Viewer toolbar on the client. + */ + GetToolbar(): ASPxClientReportToolbar; + /** + * Provides access to the Ribbon of the ASPxClientDocumentViewer. + */ + GetRibbonToolbar(): ASPxClientRibbon; + /** + * Provides access to the parameters panel of the ASPxClientDocumentViewer. + */ + GetParametersPanel(): ASPxClientReportParametersPanel; + /** + * Provides access to the document of the ASPxClientDocumentViewer. + */ + GetDocumentMap(): ASPxClientReportDocumentMap; + /** + * Sets focus on the report control specified by its bookmark. + * @param pageIndex An integer value, specifying the page index. + * @param bookmarkPath A String value, specifying the path to the bookmark. + */ + GotoBookmark(pageIndex: number, bookmarkPath: string): void; + /** + * Initiates a round trip to the server so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Prints the current document. + */ + Print(): void; + /** + * Prints the document's page with the specified page index. + * @param pageIndex A Int32 representing the index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Displays the specified report page. + * @param pageIndex An integer value, identifying the report page. + */ + GotoPage(pageIndex: number): void; + /** + * Invokes the Search dialog, which allows end-users to search for specific text in a report. + */ + Search(): void; + /** + * Gets a value indicating whether or not searching text across a report is permitted in the web browser. + */ + IsSearchAllowed(): boolean; + /** + * Exports a report to a file of the specified format, and shows it in a new Web Browser window. + * @param format A string specifying the format to which a report should be exported. + */ + SaveToWindow(format: string): void; + /** + * Exports a report to a file of the specified format, and saves it to the disk. + * @param format A string specifying the format to which a report should be exported. + */ + SaveToDisk(format: string): void; +} +/** + * A method that will handle the ItemValueChanged event. + */ +interface ASPxClientToolbarItemValueChangedEventHandler { + /** + * A method that will handle the ToolbarItemValueChanged event. + * @param source A Object that is the event source. + * @param e An ASPxClientToolbarItemValueChangedEventArgs object, containing the event arguments. + */ + (source: S, e: ASPxClientToolbarItemValueChangedEventArgs): void; +} +/** + * Provides data for the ItemValueChanged event. + */ +interface ASPxClientToolbarItemValueChangedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the menu item object related to the event. + * Value: An ASPxClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; + /** + * Provides access to the toolbar's value editor on the client. + * Value: An ASPxClientControl descendant. + */ + editor: ASPxClientControl; +} +/** + * The client-side equivalent of the ASPxQueryBuilder control. + */ +interface ASPxClientQueryBuilder extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientQueryBuilder. + */ + CallbackError: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of a Query Builder. + */ + CustomizeToolbarActions: ASPxClientEvent>; + /** + * Occurs when executing the Save command on the client. + */ + SaveCommandExecute: ASPxClientEvent>; + /** + * Sends a callback to the server with the specified argument. + * @param arg A String value, specifying the callback argument. + */ + PerformCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; + /** + * Updates the localization settings of the ASPxClientQueryBuilder properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; + /** + * Returns the object model of a Query Builder. + */ + GetDesignerModel(): Object; + /** + * Gets a client-side model of the currently opened query serialized to Json. + */ + GetJsonQueryModel(): string; + /** + * Saves the current query. + */ + Save(): void; + /** + * Invokes a Data Preview for the current query. + */ + ShowPreview(): void; + /** + * Specifies whether or not the current query is a valid SQL string. + */ + IsQueryValid(): boolean; +} +/** + * A method that will handle the SaveCommandExecute event. + */ +interface ASPxClientQueryBuilderSaveCommandExecuteEventHandler { + /** + * A method that will handle the SaveCommandExecute event. + * @param source The event sender. + * @param e An ASPxClientQueryBuilderSaveCommandExecuteEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientQueryBuilderSaveCommandExecuteEventArgs): void; +} +/** + * Provides data for the SaveCommandExecute event. + */ +interface ASPxClientQueryBuilderSaveCommandExecuteEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the CustomizeToolbarActions event. + */ +interface ASPxClientQueryBuilderCustomizeToolbarActionsEventHandler { + /** + * + * @param source + * @param e + */ + (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; +} +/** + * The client-side equivalent of the Web Report Designer control. + */ +interface ASPxClientReportDesigner extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientReportDesigner. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs when executing the Save command on the client. + */ + SaveCommandExecute: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of a Web Report Designer. + */ + CustomizeMenuActions: ASPxClientEvent>; + /** + * Occurs each time a standard editor is created for a report parameter based on a parameter type. + */ + CustomizeParameterEditors: ASPxClientEvent>; + /** + * Occurs each time a look-up editor is created for a report parameter. + */ + CustomizeParameterLookUpSource: ASPxClientEvent>; + /** + * Occurs on the client side when the Report Designer is being closed. + */ + ExitDesigner: ASPxClientEvent>; + /** + * Sends a callback to the server with the specified argument. + * @param arg A String value, specifying the callback argument. + */ + PerformCallback(arg: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. + */ + PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; + /** + * Updates the localization settings of the ASPxClientReportDesigner properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; + /** + * Returns the object model of a Web Report Designer. + */ + GetDesignerModel(): Object; + /** + * Gets a client-side model of the currently opened report serialized to Json. + */ + GetJsonReportModel(): string; + /** + * Returns serialization information for the specific property of the specific control type. + * @param controlType A string that identifies the name of the control type for which serialization information is to be returned. + * @param propertyDisplayName A string that identifies the name of the property for which serialization information is to be returned. + */ + GetPropertyInfo(controlType: string, propertyDisplayName: string): ASPxDesignerElementSerializationInfo; + /** + * Indicates whether or not the current ASPxClientReportDesigner instance has been modified. + */ + IsModified(): boolean; + /** + * Resets the value returned by the IsModified method. + */ + ResetIsModified(): void; +} +/** + * A method that will handle the SaveCommandExecute event. + */ +interface ASPxClientReportDesignerSaveCommandExecuteEventHandler { + /** + * A method that will handle the SaveCommandExecute event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerSaveCommandExecuteEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerSaveCommandExecuteEventArgs): void; +} +/** + * Provides data for the SaveCommandExecute event. + */ +interface ASPxClientReportDesignerSaveCommandExecuteEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the CustomizeMenuActions event. + */ +interface ASPxClientReportDesignerCustomizeMenuActionsEventHandler { + /** + * + * @param source + * @param e + */ + (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; +} +/** + * Provides data for the ExitDesigner event. + */ +interface ASPxClientReportDesignerExitDesignerEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the CustomizeParameterLookUpSource event. + */ +interface ASPxClientReportDesignerCustomizeParameterLookUpSourceEventHandler { + /** + * A method that will handle the CustomizeParameterLookUpSource event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterLookUpSourceEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterLookUpSourceEventArgs): void; +} +/** + * A method that will handle the CustomizeParameterEditors event. + */ +interface ASPxClientReportDesignerCustomizeParameterEditorsEventHandler { + /** + * A method that will handle the CustomizeParameterEditors event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterEditorsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; +} +/** + * A method that will handle the ExitDesigner event. + */ +interface ASPxClientReportDesignerExitDesignerEventHandler { + /** + * A method that will handle the ExitDesigner event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerExitDesignerEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerExitDesignerEventArgs): void; +} +/** + * The client-side equivalent of the ASPxClientDocumentViewer control's Document Map. + */ +interface ASPxClientReportDocumentMap extends ASPxClientControl { + /** + * Occurs after the content of the Document Viewer's document map is updated. + */ + ContentChanged: ASPxClientEvent>; +} +/** + * The client-side equivalent of the ASPxClientDocumentViewer control's Parameters Panel. + */ +interface ASPxClientReportParametersPanel extends ASPxClientControl { + /** + * Assigns a value to a parameter of the report displayed in the document viewer. + * @param parametersInfo An array of ASPxClientReportParameterInfo values specifying parameters and values to assign. + */ + AssignParameters(parametersInfo: ASPxClientReportParameterInfo[]): void; + /** + * Assigns a value to a parameter of the report displayed in the document viewer. + * @param path A System.String specifying the parameter's path. + * @param value An object specifying the parameter value. + */ + AssignParameter(path: string, value: Object): void; + /** + * Returns an array storing the names of parameters available in a report. + */ + GetParameterNames(): string[]; + /** + * Returns a value editor that is associated with a parameter with the specified name. + * @param parameterName A String value, specifying the parameter name. + */ + GetEditorByParameterName(parameterName: string): ASPxClientControl; +} +/** + * Provides information about a report parameter on the client side. + */ +interface ASPxClientReportParameterInfo { + /** + * Specifies the parameter path, relative to its parent container (e.g., "subreport1.subreportParameter1" for a subreport's parameter, or "parameter1" for a report's parameter). + * Value: A String value, specifying the parameter path (e.g., "subreport1.subreportParameter1"). + */ + Path: string; + /** + * Provides access to a parameter value on the client. + * Value: A Object value. + */ + Value: Object; +} +/** + * The client-side equivalent of the ASPxClientDocumentViewer control's toolbar. + */ +interface ASPxClientReportToolbar extends ASPxClientControl { + /** + * Provides access to the control template assigned for the specified menu item. + * @param name A String value, specifying the menu item name. + */ + GetItemTemplateControl(name: string): ASPxClientControl; +} +/** + * The client-side equivalent of the ReportViewer. + */ +interface ASPxClientReportViewer extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientReportViewer. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when another report page is loaded into this ASPxClientReportViewer instance. + */ + PageLoad: ASPxClientEvent>; + /** + * Submits the values of the specified parameters. + * @param parameters A dictionary containing the parameter names, along with their Object values. + */ + SubmitParameters(parameters: { [key: string]: Object; }): void; + /** + * Prints a report shown in the ReportViewer. + */ + Print(): void; + /** + * Prints a report page with the specified page index. + * @param pageIndex An integer value which specifies an index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Displays a report page with the specified page index in the ReportViewer. + * @param pageIndex An integer value which specifies the index of a page to be displayed. + */ + GotoPage(pageIndex: number): void; + /** + * Initiates a round trip to the server so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Invokes the Search dialog, which allows end-users to search for specific text in a report. + */ + Search(): void; + /** + * Exports a report to a file of the specified format, and shows it in a new Web Browser window. + * @param format A string specifying the format, to which a report should be exported. + */ + SaveToWindow(format: string): void; + /** + * Exports a report to a file of the specified format, and saves it to the disk. + * @param format A string specifying the format, to which a report should be exported. + */ + SaveToDisk(format: string): void; + /** + * Gets a value indicating whether or not searching text across a report is permitted in the web browser. + */ + IsSearchAllowed(): boolean; +} +/** + * A method that will handle the PageLoad events. + */ +interface ASPxClientReportViewerPageLoadEventHandler { + /** + * A method that will handle the PageLoad event. + * @param source The event sender. + * @param e An ASPxClientReportViewerPageLoadEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportViewerPageLoadEventArgs): void; +} +/** + * Provides data for the PageLoad events on the client side. + */ +interface ASPxClientReportViewerPageLoadEventArgs extends ASPxClientEventArgs { + /** + * Gets a value specifying a zero-based index of a page to be displayed in a report viewer. + * Returns: $ + */ + PageIndex: number; + /** + * Gets a value specifying the total number of pages displayed in a report viewer. + * Returns: $ + */ + PageCount: number; + /** + * Gets a value indicating whether a report page, which is currently loaded into the ASPxClientReportViewer, is the first page of a report. + */ + IsFirstPage(): boolean; + /** + * Gets a value indicating whether a report page, which is currently loaded into the ASPxClientReportViewer, is the last page of a report. + */ + IsLastPage(): boolean; +} +/** + * Provides data for the CustomizeParameterEditors events. + */ +interface ASPxClientCustomizeParameterEditorsEventArgs extends ASPxClientEventArgs { + /** + * Provides access to an object that stores information about a parameter. + * Value: An ASPxDesignerElementParameterDescriptor object. + */ + parameter: ASPxDesignerElementParameterDescriptor; + /** + * Provides access to an object that stores information required to serialize a parameter editor. + * Value: An ASPxDesignerElementSerializationInfo object. + */ + info: ASPxDesignerElementSerializationInfo; +} +/** + * Provides data for the CustomizeParameterLookUpSource events. + */ +interface ASPxClientCustomizeParameterLookUpSourceEventArgs extends ASPxClientEventArgs { + /** + * Provides access to an object that stores information about a parameter. + * Value: An ASPxDesignerElementParameterDescriptor object that stores information about the parameter. + */ + parameter: ASPxDesignerElementParameterDescriptor; + /** + * Provides access to the collection of look-up parameter values. + * Value: An array of ASPxDesignerElementEditorItem objects that store information about look-up parameter values. + */ + items: ASPxDesignerElementEditorItem[]; + /** + * Specifies the data source that provides look-up values for the parameter editor. + * Value: An Object specifying the data source that provides look-up values to the parameter editor. + */ + dataSource: Object; +} +interface ASPxClientCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { + Actions: ASPxClientMenuAction[]; + GetById(actionId: string): ASPxClientMenuAction; +} +interface ASPxClientMenuAction { + text: string; + imageClassName: string; + clickAction: Function; + disabled: boolean; + visible: boolean; + hotKey: ASPxClientMenuActionHotKey; + hasSeparator: string; + container: string; +} +interface ASPxClientMenuActionHotKey { + keyCode: number; + ctrlKey: boolean; +} +/** + * Provides general information about a report parameter. + */ +interface ASPxDesignerElementParameterDescriptor { + /** + * Provides access to the parameter description. + * Value: A String value, specifying the parameter description. + */ + description: string; + /** + * Provides access to the parameter name. + * Value: A String value, specifying the parameter name. + */ + name: string; + /** + * Provides access to the parameter type. + * Value: A String value, specifying the parameter type. + */ + type: string; + /** + * Provides access to the parameter value. + * Value: A Object, specifying the parameter value. + */ + value: Object; + /** + * Provides access to the parameter visibility state. + * Value: true if the parameter is visible; otherwise false. + */ + visible: boolean; +} +/** + * Provides information required to serialize an element. + */ +interface ASPxDesignerElementSerializationInfo { + /** + * Gets the property name that will be used in the model to store the property value. + * Value: A String value. + */ + propertyName: string; + /** + * Gets the property name in the model that is displayed in the Property grid. + * Value: A String value. + */ + displayName: string; + /** + * Gets the property name that will be used during serialization to store the property value. + * Value: A String value. + */ + modelName: string; + /** + * Gets the default property value used for serialization. + * Value: A Object value. + */ + defaultVal: Object; + /** + * Gets the information about a complex object's content. + * Value: An array of ASPxDesignerElementSerializationInfo objects. + */ + info: ASPxDesignerElementSerializationInfo[]; + /** + * Gets a value indicating whether or not the property returns an array. + * Value: true if the property returns an array; otherwise false. + */ + array: boolean; + /** + * Gets a value indicating whether an object should be serialized to the ComponentStorage property. + * Value: true to serialize an object to the ObjectStorage; otherwise false. + */ + link: boolean; + /** + * Gets a value specifying the type of value editor for the Property Grid. + * Value: An ASPxDesignerElementEditor object. + */ + editor: ASPxDesignerElementEditor; + /** + * Gets the collection of values displayed in the Property grid. + * Value: An array of ASPxDesignerElementEditorItem objects. + */ + valuesArray: ASPxDesignerElementEditorItem[]; + /** + * Gets the rules for validating the property value entered into its editor. + * Value: An array of Object values. + */ + validationRules: Object[]; + /** + * Gets the visibility state of the value editor in the Property Grid. + * Value: A Object value. + */ + visible: Object; + /** + * Gets a value, indicating whether or not the property value can be edited. + * Value: true to disable the property editing; otherwise false. + */ + disabled: Object; +} +/** + * Provides information about a serialized property's value editor used in the Property Grid. + */ +interface ASPxDesignerElementEditor { + /** + * Gets the name of an HTML template specifying the editor and header of a complex object (i.e., an object having its content properties specified). + * Value: A String value. + */ + header: string; + /** + * Gets a nullable value, specifying the name of an HTML template used by a complex object's editor. + * Value: A String value. + */ + content: string; + extendedOptions: Object; + /** + * Gets a nullable value, specifying the type of the editor's model. + * Value: A Object value. + */ + editorType: Object; +} +/** + * Provides information about property values. + */ +interface ASPxDesignerElementEditorItem { + /** + * Gets an actual property value. + * Value: A Object value. + */ + value: Object; + /** + * Gets a value displayed by a property editor. + * Value: A String value. + */ + displayValue: string; +} +/** + * A client-side equivalent of the ASPxWebDocumentViewer class. + */ +interface ASPxClientWebDocumentViewer extends ASPxClientControl { + /** + * Enables you to customize the menu actions of a Web Document Viewer. + */ + CustomizeMenuActions: ASPxClientEvent>; + /** + * Occurs each time a standard editor is created for a report parameter based on a parameter type. + */ + CustomizeParameterEditors: ASPxClientEvent>; + /** + * Occurs each time a look-up editor is created for a report parameter. + */ + CustomizeParameterLookUpSource: ASPxClientEvent>; + /** + * Provides access to the preview model of the ASPxClientWebDocumentViewer. + */ + GetPreviewModel(): Object; + /** + * Opens the specified report in the HTML5 Document Viewer. + */ + OpenReport(): Object; + /** + * Prints the current document. + */ + Print(): void; + /** + * Prints the document's page with the specified index. + * @param pageIndex An index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Exports the document to a PDF file. + */ + ExportTo(): void; + /** + * Exports the document to a specified file format. + * @param format A String value, specifying the export format. The following formats are currently supported: 'csv', 'html', 'image', 'mht', 'pdf', 'rtf', 'txt', 'xls', and 'xlsx'. + */ + ExportTo(format: string): void; + /** + * Updates the localization settings of the ASPxClientWebDocumentViewer properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; +} +/** + * A method that will handle the CustomizeMenuActions event. + */ +interface ASPxClientWebDocumentViewerCustomizeMenuActionsEventHandler { + /** + * + * @param source + * @param e + */ + (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; +} +/** + * A method that will handle the CustomizeParameterEditors event. + */ +interface ASPxClientWebDocumentViewerCustomizeParameterEditorsEventHandler { + /** + * A method that will handle the CustomizeParameterEditors event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterEditorsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; +} +/** + * A method that will handle the CustomizeParameterLookUpSource event. + */ +interface ASPxClientWebDocumentViewerCustomizeParameterLookUpSourceEventHandler { + /** + * A method that will handle the CustomizeParameterLookUpSource event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterLookUpSourceEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterLookUpSourceEventArgs): void; +} + +interface MVCxClientDashboardViewerStatic extends ASPxClientDashboardViewerStatic { +} +interface DashboardDataAxisNamesStatic { + /** + * Identifies a default axis in all data-bound dashboard items. + */ + DefaultAxis: string; + /** + * Identifies a series axis in a chart and pie. + */ + ChartSeriesAxis: string; + /** + * Identifies an argument axis in a chart, scatter chart and pie. + */ + ChartArgumentAxis: string; + /** + * Identifies a sparkline axis in a grid and cards. + */ + SparklineAxis: string; + /** + * Identifies a pivot column axis. + */ + PivotColumnAxis: string; + /** + * Identifies a pivot row axis. + */ + PivotRowAxis: string; +} +interface DashboardSpecialValuesStatic { + /** + * Represents a null value. + */ + NullValue: string; + /** + * Represents a null value in OLAP mode. + */ + OlapNullValue: string; + /** + * Represents an Others value. + */ + OthersValue: string; + /** + * Represents an error value for calculated fields. + */ + ErrorValue: string; + /** + * Returns whether or not the specified value is an NullValue. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is an OlapNullValue. + * @param value The specified value. + */ + IsOlapNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is an OthersValue. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; + /** + * Returns whether or not the specified value is an ErrorValue. + * @param value The specified value. + */ + IsErrorValue(value: Object): boolean; +} +interface DashboardExportPageLayoutStatic { + /** + * The page orientation used to export a dashboard (dashboard item) is portrait. + */ + Portrait: string; + /** + * The page orientation used to export a dashboard (dashboard item) is landscape. + */ + Landscape: string; +} +interface DashboardExportPaperKindStatic { + /** + * Letter paper (8.5 in. by 11 in.). + */ + Letter: string; + /** + * Legal paper (8.5 in. by 14 in.). + */ + Legal: string; + /** + * Executive paper (7.25 in. by 10.5 in.). + */ + Executive: string; + /** + * A5 paper (148 mm by 210 mm). + */ + A5: string; + /** + * A4 paper (210 mm by 297 mm). + */ + A4: string; + /** + * A3 paper (297 mm by 420 mm). + */ + A3: string; +} +interface DashboardExportScaleModeStatic { + /** + * The dashboard (dashboard item) on the exported page retains its original size. + */ + None: string; + /** + * The size of the dashboard (dashboard item) on the exported page is changed according to the scale factor value. + */ + UseScaleFactor: string; + /** + * The size of the dashboard (dashboard item) is changed according to the width of the exported page. + */ + AutoFitToPageWidth: string; + /** + * The size of the dashboard (dashboard item) is changed to fit its content on a single page. + */ + AutoFitWithinOnePage: string; +} +interface DashboardExportFilterStateStatic { + /** + * The filter state is not included in the exported document. + */ + None: string; + /** + * The filter state is placed below the dashboard (dashboard item) in the exported document. + */ + Below: string; + /** + * The filter state is placed on a separate page in the exported document. + */ + SeparatePage: string; +} +interface DashboardExportImageFormatStatic { + /** + * The PNG image format. + */ + Png: string; + /** + * The GIF image format. + */ + Gif: string; + /** + * The JPG image format. + */ + Jpg: string; +} +interface DashboardExportExcelFormatStatic { + /** + * The Excel 97 - Excel 2003 (XLS) file format. + */ + Xls: string; + /** + * The Office Excel 2007 XML-based (XLSX) file format. + */ + Xlsx: string; + /** + * A comma-separated values (CSV) file format. + */ + Csv: string; +} +interface ChartExportSizeModeStatic { + /** + * A chart dashboard item is exported in a size identical to that shown on the dashboard. + */ + None: string; + /** + * A chart dashboard item is stretched or shrunk to fit the page to which it is exported. + */ + Stretch: string; + /** + * A chart dashboard item is resized proportionally to best fit the exported page. + */ + Zoom: string; +} +interface MapExportSizeModeStatic { + /** + * A map dashboard item is exported in a size identical to that shown on the dashboard + */ + None: string; + /** + * A map dashboard item is resized proportionally to best fit the exported page. + */ + Zoom: string; +} +interface RangeFilterExportSizeModeStatic { + /** + * A Range Filter dashboard item is exported in a size identical to that shown on the dashboard. + */ + None: string; + /** + * A Range Filter dashboard item is stretched or shrunk to fit the page to which it is exported. + */ + Stretch: string; + /** + * A Range Filter dashboard item is resized proportionally to best fit the printed page. + */ + Zoom: string; +} +interface DashboardSelectionModeStatic { + None: string; + Single: string; + Multiple: string; +} +interface ASPxClientDashboardStatic extends ASPxClientControlStatic { +} +interface ASPxClientDashboardViewerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDashboardViewer; +} +interface ASPxClientEditBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientEditStatic extends ASPxClientEditBaseStatic { + /** + * Assigns a null value to all editors in a specified visibility state, which are located within a specified container and belong to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value specifying the validation group's name. + * @param clearInvisibleEditors true to clear both visible and invisible editors that belong to the specified container and group; false to clear only visible editors. + */ + ClearEditorsInContainer(container: Object, validationGroup: string, clearInvisibleEditors: boolean): void; + /** + * Assigns a null value to all visible editors located within a specified container, and belonging to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value specifying the validation group's name. + */ + ClearEditorsInContainer(container: Object, validationGroup: string): void; + /** + * Assigns a null value to all visible editors located within a specified container. + * @param container An HTML element specifying the container of editors to be validated. + */ + ClearEditorsInContainer(container: Object): void; + /** + * Assigns a null value to all editors which are located within the specified container object, and belonging to a specific validation group, dependent on the visibility state specified. + * @param containerId A string value specifying the editor container's identifier. + * @param validationGroup A string value specifying the validatiion group's name. + * @param clearInvisibleEditors true to clear both visible and invisible editors that belong to the specified container and group; false to clear only visible editors. + */ + ClearEditorsInContainerById(containerId: string, validationGroup: string, clearInvisibleEditors: boolean): void; + /** + * Assigns a null value to all visible editors that are located within the specified container object, and belonging to a specific validation group. + * @param containerId A string value specifying the editor container's identifier. + * @param validationGroup A string value specifying the validatiion group's name. + */ + ClearEditorsInContainerById(containerId: string, validationGroup: string): void; + /** + * Assigns a null value to all visible editors that are located within the specified container object. + * @param containerId A string value specifying the editor container's identifier. + */ + ClearEditorsInContainerById(containerId: string): void; + /** + * Assigns a null value to all editors which belong to a specific validation group, dependent on the visibility state specified. + * @param validationGroup A string value specifying the validation group's name. + * @param clearInvisibleEditors true to clear both visible and invisible editors that belong to the specified validation group; false to clear only visible editors. + */ + ClearGroup(validationGroup: string, clearInvisibleEditors: boolean): void; + /** + * Assigns a null value to all visible editors which belong to a specific validation group. + * @param validationGroup A string value specifying the validation group's name. + */ + ClearGroup(validationGroup: string): void; + /** + * Performs validation of all editors in a specified visibility state, which are located within a specified container and belong to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + * @param validateInvisibleEditors true to validate both visible and invisible editors that belong to the specified container and group; false to validate only visible editors. + */ + ValidateEditorsInContainer(container: Object, validationGroup: string, validateInvisibleEditors: boolean): boolean; + /** + * Performs validation of visible editors that are located within the specified container and belong to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + */ + ValidateEditorsInContainer(container: Object, validationGroup: string): boolean; + /** + * Performs validation of visible editors that are located within the specified container. + * @param container An HTML element specifying the container of editors to be validated. + */ + ValidateEditorsInContainer(container: Object): boolean; + /** + * Performs validation of the editors which are located within the specified container and belong to a specific validation group, dependent on the visibility state specified. + * @param containerId A string value specifying the editor container's identifier. + * @param validationGroup A string value that specifies the validation group's name. + * @param validateInvisibleEditors true to validate both visible and invisible editors that belong to the specified container and group; false to validate only visible editors. + */ + ValidateEditorsInContainerById(containerId: string, validationGroup: string, validateInvisibleEditors: boolean): boolean; + /** + * Performs validation of visible editors that are located within the specified container and belong to a specific validation group. + * @param containerId A string value that specifies the container's unique identifier. + * @param validationGroup A string value that specifies the validation group's name. + */ + ValidateEditorsInContainerById(containerId: string, validationGroup: string): boolean; + /** + * Performs validation of visible editors which are located within the specified container. + * @param containerId A string value that specifies the container's unique identifier. + */ + ValidateEditorsInContainerById(containerId: string): boolean; + /** + * Performs validation of editors contained within the specified validation group, dependent on the editor visibility state specified. + * @param validationGroup A string value specifying the validation group's name. + * @param validateInvisibleEditors true to validate both visible and invisible editors that belong to the specified validation group; false to validate only visible editors. + */ + ValidateGroup(validationGroup: string, validateInvisibleEditors: boolean): boolean; + /** + * Performs validation of visible editors contained within the specified validation group. + * @param validationGroup A string value specifying the validation group's name. + */ + ValidateGroup(validationGroup: string): boolean; + /** + * Verifies whether the editors in a specified visibility state, which are located within a specified container and belong to a specific validation group, are valid. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + * @param checkInvisibleEditors true to check both visible and invisible editors that belong to the specified container; false to check only visible editors. + */ + AreEditorsValid(container: Object, validationGroup: string, checkInvisibleEditors: boolean): boolean; + /** + * Verifies whether visible editors, which are located within a specified container and belong to a specific validation group, are valid. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + */ + AreEditorsValid(container: Object, validationGroup: string): boolean; + /** + * Verifies whether visible editors located in a specified container are valid. + * @param container An HTML element specifying the container of editors to be validated. + */ + AreEditorsValid(container: Object): boolean; + /** + * Verifies whether the editors with the specified settings are valid. + * @param containerId A string value that specifies the container's unique identifier. + * @param validationGroup A string value that specifies the validation group's name. + * @param checkInvisibleEditors true to check both visible and invisible editors that belong to the specified container; false to check only visible editors. + */ + AreEditorsValid(containerId: string, validationGroup: string, checkInvisibleEditors: boolean): boolean; + /** + * Verifies whether visible editors with the specified settings are valid. + * @param containerId A string value that specifies the container's unique identifier. + * @param validationGroup A string value that specifies the validation group's name. + */ + AreEditorsValid(containerId: string, validationGroup: string): boolean; + /** + * Verifies whether visible editors with the specified settings are valid. + * @param containerId A string value that specifies the container's unique identifier. + */ + AreEditorsValid(containerId: string): boolean; + /** + * Verifies whether visible editors on a page are valid. + */ + AreEditorsValid(): boolean; +} +interface ASPxClientBinaryImageStatic extends ASPxClientEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientBinaryImage; +} +interface ASPxClientButtonStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientButton; +} +interface ASPxClientCalendarStatic extends ASPxClientEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCalendar; +} +interface ASPxClientCaptchaStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCaptcha; +} +interface ASPxClientCheckBoxStatic extends ASPxClientEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCheckBox; +} +interface ASPxClientRadioButtonStatic extends ASPxClientCheckBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRadioButton; +} +interface ASPxClientTextEditStatic extends ASPxClientEditStatic { +} +interface ASPxClientTextBoxBaseStatic extends ASPxClientTextEditStatic { +} +interface ASPxClientButtonEditBaseStatic extends ASPxClientTextBoxBaseStatic { +} +interface ASPxClientDropDownEditBaseStatic extends ASPxClientButtonEditBaseStatic { +} +interface ASPxClientColorEditStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientColorEdit; +} +interface ASPxClientComboBoxStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientComboBox; +} +interface ASPxClientDateEditStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDateEdit; +} +interface ASPxClientDropDownEditStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDropDownEdit; +} +interface ASPxClientFilterControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientFilterControl; +} +interface ASPxClientListEditStatic extends ASPxClientEditStatic { +} +interface ASPxClientListBoxStatic extends ASPxClientListEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientListBox; +} +interface ASPxClientCheckListBaseStatic extends ASPxClientListEditStatic { +} +interface ASPxClientRadioButtonListStatic extends ASPxClientCheckListBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRadioButtonList; +} +interface ASPxClientCheckBoxListStatic extends ASPxClientCheckListBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCheckBoxList; +} +interface ASPxClientProgressBarStatic extends ASPxClientEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientProgressBar; +} +interface ASPxClientSpinEditBaseStatic extends ASPxClientButtonEditBaseStatic { +} +interface ASPxClientSpinEditStatic extends ASPxClientSpinEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientSpinEdit; +} +interface ASPxClientTimeEditStatic extends ASPxClientSpinEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTimeEdit; +} +interface ASPxClientStaticEditStatic extends ASPxClientEditBaseStatic { +} +interface ASPxClientHyperLinkStatic extends ASPxClientStaticEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientHyperLink; +} +interface ASPxClientImageBaseStatic extends ASPxClientStaticEditStatic { +} +interface ASPxClientImageStatic extends ASPxClientImageBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientImage; +} +interface ASPxClientLabelStatic extends ASPxClientStaticEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientLabel; +} +interface ASPxClientTextBoxStatic extends ASPxClientTextBoxBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTextBox; +} +interface ASPxClientMemoStatic extends ASPxClientTextEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientMemo; +} +interface ASPxClientButtonEditStatic extends ASPxClientButtonEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientButtonEdit; +} +interface ASPxClientTokenBoxStatic extends ASPxClientComboBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTokenBox; +} +interface ASPxClientTrackBarStatic extends ASPxClientEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTrackBar; +} +interface ASPxClientValidationSummaryStatic extends ASPxClientControlStatic { +} +interface ASPxClientGaugeControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientGaugeControl; +} +interface ASPxClientGridBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientGridViewCallbackCommandStatic { + /** + * Default value: "NEXTPAGE" + */ + NextPage: string; + /** + * Default value: "PREVPAGE" + */ + PreviousPage: string; + /** + * Default value: "GOTOPAGE" + */ + GotoPage: string; + /** + * Default value: "SELECTROWS" + */ + SelectRows: string; + /** + * Default value: "SELECTROWSKEY" + */ + SelectRowsKey: string; + /** + * Default value: "SELECTION" + */ + Selection: string; + /** + * Default value: "FOCUSEDROW" + */ + FocusedRow: string; + /** + * Default value: "GROUP" + */ + Group: string; + /** + * Default value: "UNGROUP" + */ + UnGroup: string; + /** + * Default value: "SORT" + */ + Sort: string; + /** + * Default value: "COLUMNMOVE" + */ + ColumnMove: string; + /** + * Default value: "COLLAPSEALL" + */ + CollapseAll: string; + /** + * Default value: "EXPANDALL" + */ + ExpandAll: string; + /** + * Default value: "EXPANDROW" + */ + ExpandRow: string; + /** + * Default value: "COLLAPSEROW" + */ + CollapseRow: string; + /** + * Default value: "HIDEALLDETAIL" + */ + HideAllDetail: string; + /** + * Default value: "SHOWALLDETAIL" + */ + ShowAllDetail: string; + /** + * Default value: "SHOWDETAILROW" + */ + ShowDetailRow: string; + /** + * Default value: "HIDEDETAILROW" + */ + HideDetailRow: string; + /** + * Default value: "PAGERONCLICK" + */ + PagerOnClick: string; + /** + * Default value: "APPLYFILTER" + */ + ApplyFilter: string; + /** + * Default value: "APPLYCOLUMNFILTER" + */ + ApplyColumnFilter: string; + /** + * Default value: "APPLYMULTICOLUMNFILTER" + */ + ApplyMultiColumnFilter: string; + /** + * Default value: "APPLYHEADERCOLUMNFILTER" + */ + ApplyHeaderColumnFilter: string; + /** + * Default value: "APPLYSEARCHPANELFILTER" + */ + ApplySearchPanelFilter: string; + /** + * Default value: "FILTERROWMENU" + */ + FilterRowMenu: string; + /** + * Default value: "STARTEDIT" + */ + StartEdit: string; + /** + * Default value: "CANCELEDIT" + */ + CancelEdit: string; + /** + * Default value: "UPDATEEDIT" + */ + UpdateEdit: string; + /** + * Default value: "ADDNEWROW" + */ + AddNewRow: string; + /** + * Default value: "DELETEROW" + */ + DeleteRow: string; + /** + * Default value: "CUSTOMBUTTON" + */ + CustomButton: string; + /** + * Default value: "CUSTOMCALLBACK" + */ + CustomCallback: string; + /** + * Default value: "SHOWFILTERCONTROL" + */ + ShowFilterControl: string; + /** + * Default value: "CLOSEFILTERCONTROL" + */ + CloseFilterControl: string; + /** + * Default value: "SETFILTERENABLED" + */ + SetFilterEnabled: string; + /** + * Default value: "REFRESH" + */ + Refresh: string; + /** + * Default value: "SELFIELDVALUES" + */ + SelFieldValues: string; + /** + * Default value: "ROWVALUES" + */ + RowValues: string; + /** + * Default value: "PAGEROWVALUES" + */ + PageRowValues: string; + /** + * Default value: "FILTERPOPUP" + */ + FilterPopup: string; + /** + * Default value: "CONTEXTMENU" + */ + ContextMenu: string; + /** + * Default value: "CUSTOMVALUES" + */ + CustomValues: string; +} +interface ASPxClientGridLookupStatic extends ASPxClientDropDownEditBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientGridLookup; +} +interface ASPxClientCardViewStatic extends ASPxClientGridBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCardView; +} +interface ASPxClientGridViewStatic extends ASPxClientGridBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientGridView; +} +interface ASPxClientVerticalGridStatic extends ASPxClientGridBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientVerticalGrid; +} +interface ASPxClientVerticalGridCallbackCommandStatic { + /** + * Default value: "EXPANDROW" + */ + ExpandRow: string; +} +interface ASPxClientCommandConstsStatic { + /** + * Identifies a command that shows a search panel. + * Value: "showsearchpanel" + */ + SHOWSEARCHPANEL_COMMAND: string; + /** + * Identifies a command that invokes the Find and Replace dialog. + * Value: "findandreplacedialog" + */ + FINDANDREPLACE_DIALOG_COMMAND: string; + /** + * Identifies a command that applies the bold text formatting to the selected text. If it's already applied, cancels it. + * Value: "bold" + */ + BOLD_COMMAND: string; + /** + * Identifies a command that makes the selected text italic or regular type depending on the current state. + * Value: "italic" + */ + ITALIC_COMMAND: string; + /** + * Identifies a command that applies the underline text formatting to the selected text. If it's already applied, cancels it. + * Value: "underline" + */ + UNDERLINE_COMMAND: string; + /** + * Identifies a command that applies the strike through text formatting to the selected text. If it's already applied, cancels it. + * Value: "strikethrough" + */ + STRIKETHROUGH_COMMAND: string; + /** + * Identifies a command that applies the superscript text formatting to the selected text. If it's already applied, cancels it. + * Value: "superscript" + */ + SUPERSCRIPT_COMMAND: string; + /** + * Identifies a command that applies the subscript text formatting to the selected text. If it's already applied, cancels it. + * Value: "subscript" + */ + SUBSCRIPT_COMMAND: string; + /** + * Identifies a command that centers the content of the currently focused paragraph. + * Value: "justifycenter" + */ + JUSTIFYCENTER_COMMAND: string; + /** + * Identifies a command that left justifies the content of the currently focused paragraph. + * Value: "justifyleft" + */ + JUSTIFYLEFT_COMMAND: string; + /** + * Identifies a command that creates an indent for the selected paragarph. + * Value: "indent" + */ + INDENT_COMMAND: string; + /** + * Identifies a command that creates an outdent for the focused paragarph. + * Value: "outdent" + */ + OUTDENT_COMMAND: string; + /** + * Identifies a command that right justifies the content of the currently focused paragraph. + * Value: "justifyright" + */ + JUSTIFYRIGHT_COMMAND: string; + /** + * Identifies a command that fully justifies the content of the currently focused paragraph (aligned with both the left and right margines). + * Value: "justifyfull" + */ + JUSTIFYFULL_COMMAND: string; + /** + * Identifies a command that changes the size of the selected text. + * Value: "fontsize" + */ + FONTSIZE_COMMAND: string; + /** + * Identifies a command that changes the font of the selected text. + * Value: "fontname" + */ + FONTNAME_COMMAND: string; + /** + * Identifies a command that changes the color of a fore color pickers and sets the selected text fore color. + * Value: "forecolor" + */ + FONTCOLOR_COMMAND: string; + /** + * Identifies a command that changes the color of a back color pickers and sets the selected text back color. + * Value: "backcolor" + */ + BACKCOLOR_COMMAND: string; + /** + * Identifies a command that wraps the selected paragraph in the specified html tag. + * Value: "formatblock" + */ + FORMATBLOCK_COMMAND: string; + /** + * Identifies a command that wraps the currently selected text content in a specific html tag with a css class assigned to it. + * Value: "applycss" + */ + APPLYCSS_COMMAND: string; + /** + * Identifies a command that removes all formatting from the selected content. + * Value: "removeformat" + */ + REMOVEFORMAT_COMMAND: string; + /** + * Identifies a command that cancels the last action. + * Value: "undo" + */ + UNDO_COMMAND: string; + /** + * Identifies a command that returns a previously canceled action. + * Value: "redo" + */ + REDO_COMMAND: string; + /** + * Identifies a command that copies the selected content. + * Value: "copy" + */ + COPY_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard at the current cursor position. + * Value: "paste" + */ + PASTE_COMMAND: string; + /** + * Identifies a command that pastes a specified content taking into account that it was copied from Word. + * Value: "pastefromword" + */ + PASTEFROMWORD_COMMAND: string; + /** + * Identifies a command that invokes the Paste from Word dialog. + * Value: "pastefromworddialog" + */ + PASTEFROMWORDDIALOG_COMMAND: string; + /** + * Identifies a command that cuts the selected content. + * Value: "cut" + */ + CUT_COMMAND: string; + /** + * Identifies a command that selects all content inside the html editor. + * Value: "selectall" + */ + SELECT_ALL: string; + /** + * Identifies a command that deletes the selected content. + * Value: "delete" + */ + DELETE_COMMAND: string; + /** + * Identifies a command that can be used to correctly insert HTML code into the editor. + * Value: "pastehtml" + */ + PASTEHTML_COMMAND: string; + /** + * Identifies a command that inserts a new ordered list. + * Value: "insertorderedlist" + */ + INSERTORDEREDLIST_COMMAND: string; + /** + * Identifies a command that inserts a new unordered list. + * Value: "insertunorderedlist" + */ + INSERTUNORDEREDLIST_COMMAND: string; + /** + * Identifies a command that restarts the current ordered list. + * Value: "restartorderedlist" + */ + RESTARTORDEREDLIST_COMMAND: string; + /** + * Identifies a command that continues a disrupted ordered list. + * Value: "continueorderedlist" + */ + CONTINUEORDEREDLIST_COMMAND: string; + /** + * Identifies a command that removes a hyperlink from the selected text or image. + * Value: "unlink" + */ + UNLINK_COMMAND: string; + /** + * Identifies a command that inserts a new hyperlink. + * Value: "insertlink" + */ + INSERTLINK_COMMAND: string; + /** + * Identifies a command that inserts a new image. + * Value: "insertimage" + */ + INSERTIMAGE_COMMAND: string; + /** + * Identifies a command that changes the selected image. + * Value: "changeimage" + */ + CHANGEIMAGE_COMMAND: string; + /** + * Identifies a command that initiates spell checking. + * Value: "checkspelling" + */ + CHECKSPELLING_COMMAND: string; + /** + * Identifies a command that invokes the Insert Image dialog. + * Value: "insertimagedialog" + */ + INSERTIMAGE_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Image dialog. + * Value: "changeimagedialog" + */ + CHANGEIMAGE_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Link dialog. + * Value: "insertlinkdialog" + */ + INSERTLINK_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Link dialog. + * Value: "changelinkdialog" + */ + CHANGELINK_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Table dialog. + * Value: "inserttabledialog" + */ + INSERTTABLE_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Table Properties dialog. + * Value: "tablepropertiesdialog" + */ + TABLEPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Cell Properties dialog. + * Value: "tablecellpropertiesdialog" + */ + TABLECELLPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Column Properties dialog. + * Value: "tablecolumnpropertiesdialog" + */ + TABLECOLUMNPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Row Properties dialog. + * Value: "tablerowpropertiesdialog" + */ + TABLEROWPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes a default browser Print dialog, allowing an end-user to print the content of the html editor. + * Value: "print" + */ + PRINT_COMMAND: string; + /** + * Identifies a command that toggles the full-screen mode. + * Value: "fullscreen" + */ + FULLSCREEN_COMMAND: string; + /** + * Identifies a command that inserts a new table. + * Value: "inserttable" + */ + INSERTTABLE_COMMAND: string; + /** + * Identifies a command that changes the selected table. + * Value: "changetable" + */ + CHANGETABLE_COMMAND: string; + /** + * Identifies a command that changes the selected table cell. + * Value: "changetablecell" + */ + CHANGETABLECELL_COMMAND: string; + /** + * Identifies a command that changes the selected table row. + * Value: "changetablerow" + */ + CHANGETABLEROW_COMMAND: string; + /** + * Identifies a command that changes the selected table column. + * Value: "changetablecolumn" + */ + CHANGETABLECOLUMN_COMMAND: string; + /** + * Identifies a command that deletes the currently selected table. + * Value: "deletetable" + */ + DELETETABLE_COMMAND: string; + /** + * Identifies a command that deletes the currently selected table row. + * Value: "deletetablerow" + */ + DELETETABLEROW_COMMAND: string; + /** + * Identifies a command that deletes the currently selected table column. + * Value: "deletetablecolumn" + */ + DELETETABLECOLUMN_COMMAND: string; + /** + * Identifies a command that inserts a new column to the left from the currently focused one. + * Value: "inserttablecolumntoleft" + */ + INSERTTABLECOLUMNTOLEFT_COMMAND: string; + /** + * Identifies a command that inserts a new column to the right from the currently focused one. + * Value: "inserttablecolumntoright" + */ + INSERTTABLECOLUMNTORIGHT_COMMAND: string; + /** + * Identifies a command that inserts a new row below the currently focused one. + * Value: "inserttablerowbelow" + */ + INSERTTABLEROWBELOW_COMMAND: string; + /** + * Identifies a command that inserts a new row above the currently focused one. + * Value: "inserttablerowabove" + */ + INSERTTABLEROWABOVE_COMMAND: string; + /** + * Identifies a command that splits the current table cell horizontally. + * Value: "splittablecellhorizontally" + */ + SPLITTABLECELLHORIZONTALLY_COMMAND: string; + /** + * Identifies a command that splits the current table cell vertically. + * Value: "splittablecellvertically" + */ + SPLITTABLECELLVERTICALLY_COMMAND: string; + /** + * Identifies a command that merges the focused table cell with the one to the right. + * Value: "mergetablecellright" + */ + MERGETABLECELLRIGHT_COMMAND: string; + /** + * Identifies a command that merges the focused table cell with the one below. + * Value: "mergetablecelldown" + */ + MERGETABLECELLDOWN_COMMAND: string; + /** + * Identifies a command that invokes a custom dialog. + * Value: "customdialog" + */ + CUSTOMDIALOG_COMMAND: string; + /** + * Identifies a command that exports the html editor content. + * Value: "export" + */ + EXPORT_COMMAND: string; + /** + * Identifies a command that inserts a new audio element. + * Value: "insertaudio" + */ + INSERTAUDIO_COMMAND: string; + /** + * Identifies a command that inserts a new video. + * Value: "insertvideo" + */ + INSERTVIDEO_COMMAND: string; + /** + * Identifies a command that inserts a new flash element. + * Value: "insertflash" + */ + INSERTFLASH_COMMAND: string; + /** + * Identifies a command that inserts a new YouTube video. + * Value: "insertyoutubevideo" + */ + INSERTYOUTUBEVIDEO_COMMAND: string; + /** + * Identifies a command that changes the selected audio element. + * Value: "changeaudio" + */ + CHANGEAUDIO_COMMAND: string; + /** + * Identifies a command that changes the selected video element. + * Value: "changevideo" + */ + CHANGEVIDEO_COMMAND: string; + /** + * Identifies a command that changes the selected flash element. + * Value: "changeflash" + */ + CHANGEFLASH_COMMAND: string; + /** + * Identifies a command that changes the selected YouTube video element. + * Value: "changeyoutubevideo" + */ + CHANGEYOUTUBEVIDEO_COMMAND: string; + /** + * Identifies a command that invokes the Insert Audio dialog. + * Value: "insertaudiodialog" + */ + INSERTAUDIO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Video dialog. + * Value: "insertvideodialog" + */ + INSERTVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Flash dialog. + * Value: "insertflashdialog" + */ + INSERTFLASH_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert YouTube Video dialog. + * Value: "insertyoutubevideodialog" + */ + INSERTYOUTUBEVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Audio dialog. + * Value: "changeaudiodialog" + */ + CHANGEAUDIO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Video dialog. + * Value: "changevideodialog" + */ + CHANGEVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Flash dialog. + * Value: "changeflash" + */ + CHANGEFLASH_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change YouTube Video dialog. + * Value: "changeyoutubevideodialog" + */ + CHANGEYOUTUBEVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard to the current cursor position, taking into account that the PasteMode property is set to SourceFormatting. + * Value: "pastehtmlsourceformatting" + */ + PASTEHTMLSOURCEFORMATTING_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard to the current cursor position, taking into account that the PasteMode property is set to PlainText. + * Value: "pastehtmlplaintext" + */ + PASTEHTMLPLAINTEXT_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard to the current cursor position, taking into account that the PasteMode property is set to MergeFormatting. + * Value: "pastehtmlmergeformatting" + */ + PASTEHTMLMERGEFORMATTING_COMMAND: string; + /** + * Identifies a command that inserts a new placeholder. + * Value: "insertplaceholder" + */ + INSERTPLACEHOLDER_COMMAND: string; + /** + * Identifies a command that changes the selected placeholder. + * Value: "changeplaceholder" + */ + CHANGEPLACEHOLDER_COMMAND: string; + /** + * Identifies a command that invokes the Insert Placeholder dialog. + * Value: "insertplaceholderdialog" + */ + INSERTPLACEHOLDER_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Placeholder dialog. + * Value: "changeplaceholderdialog" + */ + CHANGEPLACEHOLDER_DIALOG_COMMAND: string; + /** + * Identifies a command that updates the editor content. + * Value: "updatedocument" + */ + UPDATEDOCUMENT_COMMAND: string; + /** + * Identifies a command that changes properties of the element selected in the tag inspector. + * Value: "changeelementproperties" + */ + CHANGEELEMENTPROPERTIES_COMMAND: string; + /** + * Identifies a command that invokes the Change Element Properties dialog. + * Value: "changeelementpropertiesdialog" + */ + CHANGEELEMENTPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that comments the selected HTML code. If no code is selected, it comments the focused tag. + * Value: "comment" + */ + COMMENT_COMMAND: string; + /** + * Identifies a command that uncomments the selected HTML code. If no code is selected, the command uncomments the currently focused tag. + * Value: "uncomment" + */ + UNCOMMENTHTML_COMMAND: string; + /** + * Identifies a command that formats the current HTML document. + * Value: "formatdocument" + */ + FORMATDOCUMENT_COMMAND: string; + /** + * Identifies a command that applies the indent formatting to the selected content. + * Value: "indent" + */ + INDENTLINE_COMMAND: string; + /** + * Identifies a command that applies the outdent formatting to the focused content. + * Value: "outdent" + */ + OUTDENTLINE_COMMAND: string; + /** + * Identifies a command that collapses the selected HTML tag. + * Value: "collapsetag" + */ + COLLAPSETAG_COMMAND: string; + /** + * Identifies a command that expands the selected HTML tag. + * Value: "expandtag" + */ + EXPANDTAG_COMMAND: string; + /** + * Identifies a command that shows intellisense for the HTML code editor. + * Value: "showintellisense" + */ + SHOWINTELLISENSE_COMMAND: string; +} +interface ASPxClientHtmlEditorStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientHtmlEditor; + /** + * Programmatically closes a custom dialog, supplying it with specific parameters. + * @param status An object representing a custom dialog's closing status. + * @param data An object representing custom data associated with a custom dialog. + */ + CustomDialogComplete(status: Object, data: Object): void; +} +interface ASPxClientHtmlEditorMediaPreloadModeStatic { + /** + * The browser does not load a media file when the page loads. + */ + None: string; + /** + * The browser loads the entire video when the page loads. + */ + Auto: string; + /** + * The browser loads only metadata when the page loads. + */ + Metadata: string; +} +interface ASPxClientPivotGridStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPivotGrid; +} +interface ASPxClientPivotCustomizationStatic extends ASPxClientControlStatic { +} +interface ASPxClientRichEditStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRichEdit; +} +interface ASPxSchedulerDateTimeHelperStatic { + /** + * Returns the date part of the specified DateTime value. + * @param date A DateTime object from which to extract the date. + */ + TruncToDate(date: Date): Date; + /** + * Returns the day time part of the specified DateTime value. + * @param date A DateTime object from which to extract the day time. + */ + ToDayTime(date: Date): any; + /** + * Adds the specified number of days to a DateTime object and returns the result. + * @param date A DateTime object to which to add days. + * @param dayCount The number of days to add. + */ + AddDays(date: Date, dayCount: number): Date; + /** + * Adds the specified timespan to a DateTime object and returns the result. + * @param date A DateTime object to which to add a timespan. + * @param timeSpan A TimeSpan object specifying the timespan to add. + */ + AddTimeSpan(date: Date, timeSpan: any): Date; + /** + * Rounds a DateTime value up to the nearest interval. + * @param date A DateTime object containing a value to round. + * @param spanInMs A TimeSpan object specifying an interval to which to round. + */ + CeilDateTime(date: Date, spanInMs: any): Date; +} +interface ASPxClientWeekDaysCheckEditStatic extends ASPxClientControlStatic { +} +interface ASPxClientRecurrenceRangeControlStatic extends ASPxClientControlStatic { +} +interface ASPxClientRecurrenceControlBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientDailyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientWeeklyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientMonthlyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientYearlyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientRecurrenceTypeEditStatic extends ASPxClientRadioButtonListStatic { +} +interface ASPxClientTimeIntervalStatic { + /** + * Gets the duration of a time interval between two points in time. + * @param start A DateTime object specifying the starting point of the time interval. + * @param end A DateTime object specifying the ending point of the time interval. + */ + CalculateDuration(start: Date, end: Date): number; +} +interface ASPxClientSchedulerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientScheduler; +} +interface ASPxClientSpellCheckerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientSpellChecker; +} +interface ASPxClientSpellCheckerStopCheckingReasonStatic { + Default: string; + User: string; +} +interface ASPxClientSpreadsheetStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientSpreadsheet; +} +interface ASPxClientTreeListStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTreeList; +} +interface BootstrapClientAccordionStatic extends ASPxClientNavBarStatic { +} +interface BootstrapClientButtonStatic extends ASPxClientButtonStatic { +} +interface BootstrapClientCalendarStatic extends ASPxClientCalendarStatic { +} +interface BootstrapClientCheckBoxStatic extends ASPxClientEditStatic { +} +interface BootstrapClientRadioButtonStatic extends BootstrapClientCheckBoxStatic { +} +interface BootstrapClientComboBoxStatic extends ASPxClientComboBoxStatic { +} +interface BootstrapClientDateEditStatic extends ASPxClientDateEditStatic { +} +interface BootstrapClientDropDownEditStatic extends ASPxClientDropDownEditStatic { +} +interface BootstrapClientFormLayoutStatic extends ASPxClientFormLayoutStatic { +} +interface BootstrapClientGridViewStatic extends ASPxClientGridViewStatic { +} +interface BootstrapClientHyperLinkStatic extends ASPxClientHyperLinkStatic { +} +interface BootstrapClientListBoxStatic extends ASPxClientListBoxStatic { +} +interface BootstrapClientCheckBoxListStatic extends ASPxClientCheckBoxListStatic { +} +interface BootstrapClientRadioButtonListStatic extends ASPxClientRadioButtonListStatic { +} +interface BootstrapClientMenuStatic extends ASPxClientMenuStatic { +} +interface BootstrapClientPopupControlStatic extends ASPxClientPopupControlStatic { +} +interface BootstrapClientPopupMenuStatic extends ASPxClientPopupMenuStatic { +} +interface BootstrapClientProgressBarStatic extends ASPxClientProgressBarStatic { +} +interface BootstrapClientSpinEditStatic extends ASPxClientSpinEditStatic { +} +interface BootstrapClientTabControlStatic extends ASPxClientTabControlStatic { +} +interface BootstrapClientPageControlStatic extends ASPxClientPageControlStatic { +} +interface BootstrapClientTextBoxStatic extends ASPxClientTextBoxStatic { +} +interface BootstrapClientMemoStatic extends ASPxClientMemoStatic { +} +interface BootstrapClientButtonEditStatic extends ASPxClientButtonEditStatic { +} +interface BootstrapClientTreeViewStatic extends ASPxClientTreeViewStatic { +} +interface MVCxClientCalendarStatic extends ASPxClientCalendarStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientCalendar; +} +interface MVCxClientCallbackPanelStatic extends ASPxClientCallbackPanelStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientCallbackPanel; +} +interface MVCxClientCardViewStatic extends ASPxClientCardViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientCardView; +} +interface MVCxClientChartStatic extends ASPxClientWebChartControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientChart; +} +interface MVCxClientComboBoxStatic extends ASPxClientComboBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientComboBox; +} +interface MVCxClientDataViewStatic extends ASPxClientDataViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientDataView; +} +interface MVCxClientDateEditStatic extends ASPxClientDateEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientDateEdit; +} +interface MVCxClientDockManagerStatic extends ASPxClientDockManagerStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientDockManager; +} +interface MVCxClientDockPanelStatic extends ASPxClientDockPanelStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientDockPanel; +} +interface MVCxClientFileManagerStatic extends ASPxClientFileManagerStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientFileManager; +} +interface MVCxClientGridViewStatic extends ASPxClientGridViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientGridView; +} +interface MVCxClientHtmlEditorStatic extends ASPxClientHtmlEditorStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientHtmlEditor; +} +interface MVCxClientImageGalleryStatic extends ASPxClientImageGalleryStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientImageGallery; +} +interface MVCxClientListBoxStatic extends ASPxClientListBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientListBox; +} +interface MVCxClientNavBarStatic extends ASPxClientNavBarStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientNavBar; +} +interface MVCxClientPivotGridStatic extends ASPxClientPivotGridStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientPivotGrid; +} +interface MVCxClientPopupControlStatic extends ASPxClientPopupControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientPopupControl; +} +interface MVCxClientDocumentViewerStatic extends ASPxClientDocumentViewerStatic { +} +interface MVCxClientReportViewerStatic extends ASPxClientReportViewerStatic { +} +interface MVCxClientReportDesignerStatic extends ASPxClientReportDesignerStatic { +} +interface MVCxClientRichEditStatic extends ASPxClientRichEditStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientRichEdit; +} +interface MVCxClientRoundPanelStatic extends ASPxClientRoundPanelStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientRoundPanel; +} +interface MVCxClientSchedulerStatic extends ASPxClientSchedulerStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientScheduler; +} +interface MVCxSchedulerToolTipTypeStatic { + /** + * The tooltip is displayed for a selected appointment. + */ + Appointment: number; + /** + * The tooltip is displayed for a dragged appointment. + */ + AppointmentDrag: number; + /** + * The tooltip is displayed for a selected time interval. + */ + Selection: number; +} +interface MVCxClientSpreadsheetStatic extends ASPxClientSpreadsheetStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientSpreadsheet; +} +interface MVCxClientPageControlStatic extends ASPxClientPageControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientPageControl; +} +interface MVCxClientTokenBoxStatic extends ASPxClientTokenBoxStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientTokenBox; +} +interface MVCxClientTreeListStatic extends ASPxClientTreeListStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientTreeList; +} +interface MVCxClientTreeViewStatic extends ASPxClientTreeViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientTreeView; +} +interface MVCxClientUploadControlStatic extends ASPxClientUploadControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientUploadControl; +} +interface MVCxClientUtilsStatic { + /** + * Loads service resources (such as scripts, CSS files, etc.) required for DevExpress functionality to work properly after a non DevExpress callback has been processed on the server and returned back to the client. + */ + FinalizeCallback(): void; + /** + * Returns values of editors placed in the specified container. + * @param containerOrId A container of editors, or its ID. + */ + GetSerializedEditorValuesInContainer(containerOrId: Object): Object; + /** + * Returns values of editors placed in the specified container. + * @param containerOrId A container of editors, or its ID. + * @param processInvisibleEditors true to process both visible and invisible editors that belong to the specified container; false to process only visible editors. + */ + GetSerializedEditorValuesInContainer(containerOrId: Object, processInvisibleEditors: boolean): Object; +} +interface MVCxClientGlobalEventsStatic { + /** + * Dynamically connects the ControlsInitialized client event with an appropriate event handler function. + * @param handler A object representing the event handling function's content. + */ + AddControlsInitializedEventHandler(handler: ASPxClientControlsInitializedEventHandler): void; + /** + * Dynamically connects the BeginCallback client event with an appropriate event handler function. + * @param handler A object containing the event handling function's content. + */ + AddBeginCallbackEventHandler(handler: MVCxClientBeginCallbackEventHandler): void; + /** + * Dynamically connects the EndCallback client event with an appropriate event handler function. + * @param handler A object containing the event handling function's content. + */ + AddEndCallbackEventHandler(handler: ASPxClientEndCallbackEventHandler): void; + /** + * Dynamically connects the CallbackError client event with an appropriate event handler function. + * @param handler A object containing the event handling function's content. + */ + AddCallbackErrorHandler(handler: ASPxClientCallbackErrorEventHandler): void; +} +interface MVCxClientVerticalGridStatic extends ASPxClientVerticalGridStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): MVCxClientVerticalGrid; +} +interface MVCxClientWebDocumentViewerStatic extends ASPxClientWebDocumentViewerStatic { +} +interface ASPxClientControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientControlBase; +} +interface ASPxClientControlStatic extends ASPxClientControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientControl; + /** + * Modifies the controls size on the page. + */ + AdjustControls(): void; + /** + * Modifies the controls size within the specified container. + * @param container An HTML element that is the container of the controls. + */ + AdjustControls(container: Object): void; + /** + * Returns a collection of client web control objects. + */ + GetControlCollection(): ASPxClientControlCollection; +} +interface ASPxClientCallbackStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCallback; +} +interface ASPxClientPanelBaseStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPanelBase; +} +interface ASPxClientPanelStatic extends ASPxClientPanelBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPanel; +} +interface ASPxClientCallbackPanelStatic extends ASPxClientPanelStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCallbackPanel; +} +interface ASPxClientCloudControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientCloudControl; +} +interface ASPxClientDataViewStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDataView; +} +interface ASPxClientDockManagerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDockManager; +} +interface ASPxClientPopupControlBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientDockPanelStatic extends ASPxClientPopupControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDockPanel; +} +interface ASPxClientDockZoneStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDockZone; +} +interface ASPxClientFileManagerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientFileManager; +} +interface ASPxClientFileManagerCommandConstsStatic { + /** + * The name of a command that is executed when an end-user renames an item. + */ + Rename: string; + /** + * The name of a command that is executed when an end-user moves an item. + */ + Move: string; + /** + * The name of a command that is executed when an end-user deletes an item. + */ + Delete: string; + /** + * The name of a command that is executed when an end-user creates a folder. + */ + Create: string; + /** + * The name of a command that is executed when an end-user uploads a file. + */ + Upload: string; + /** + * The name of a command that is executed when an end-user downloads an item. + */ + Download: string; + /** + * The name of a command that is executed when an end-user copies an item. + */ + Copy: string; + /** + * The name of a command that is executed when an end-user opens an item. + */ + Open: string; +} +interface ASPxClientFileManagerErrorConstsStatic { + /** + * The specified file is not found. Return Value: 0 + */ + FileNotFound: number; + /** + * The specified folder is not found. Return Value: 1 + */ + FolderNotFound: number; + /** + * Access is denied. Return Value: 2 + */ + AccessDenied: number; + /** + * Unspecified IO error occurs. Return Value: 3 + */ + UnspecifiedIO: number; + /** + * Unspecified error occurs. Return Value: 4 + */ + Unspecified: number; + /** + * The file/folder name is empty. Return Value: 5 + */ + EmptyName: number; + /** + * The operation was canceled. Return Value: 6 + */ + CanceledOperation: number; + /** + * The specified name contains invalid characters. Return Value: 7 + */ + InvalidSymbols: number; + /** + * The specified file extension is not allowed. Return Value: 8 + */ + WrongExtension: number; + /** + * The file/folder is being used by another process. Return Value: 9 + */ + UsedByAnotherProcess: number; + /** + * The specified file/folder already exists. Return Value: 10 + */ + AlreadyExists: number; +} +interface ASPxClientFormLayoutStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientFormLayout; +} +interface ASPxClientHiddenFieldStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientHiddenField; +} +interface ASPxClientImageGalleryStatic extends ASPxClientDataViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientImageGallery; +} +interface ASPxClientImageSliderStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientImageSlider; +} +interface ASPxClientImageZoomNavigatorStatic extends ASPxClientImageSliderStatic { +} +interface ASPxClientImageZoomStatic extends ASPxClientControlStatic { +} +interface ASPxClientLoadingPanelStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientLoadingPanel; +} +interface ASPxClientMenuBaseStatic extends ASPxClientControlStatic { + /** + * Returns a collection of client menu objects. + */ + GetMenuCollection(): ASPxClientMenuCollection; +} +interface ASPxClientMenuStatic extends ASPxClientMenuBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientMenu; +} +interface ASPxClientTouchUIStatic { + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and the ability to display vertical and horizontal scroll bars. + * @param id A string value specifying the element's ID. + */ + MakeScrollable(id: string): ScrollExtender; + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and the ability to display vertical and horizontal scroll bars. + * @param element An object that specifies the required DOM element. + */ + MakeScrollable(element: Object): ScrollExtender; + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and customized scrollbar-related options. + * @param id A string value specifying the name of a DOM element that should be extended with the touch scrolling functionality. + * @param options An ASPxClientTouchUIOptions object that provides options affecting the touch scrolling functionality. + */ + MakeScrollable(id: string, options: ASPxClientTouchUIOptions): ScrollExtender; + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and customized scrollbar-related options. + * @param element An object specifying the DOM element to extend with the touch scrolling functionality. + * @param options An ASPxClientTouchUIOptions object that provides options affecting the touch scrolling functionality. + */ + MakeScrollable(element: Object, options: ASPxClientTouchUIOptions): ScrollExtender; +} +interface ASPxClientNavBarStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientNavBar; +} +interface ASPxClientNewsControlStatic extends ASPxClientDataViewStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientNewsControl; +} +interface ASPxClientObjectContainerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientObjectContainer; +} +interface ASPxClientPagerStatic extends ASPxClientControlStatic { +} +interface ASPxClientPopupControlStatic extends ASPxClientPopupControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPopupControl; + /** + * Returns a collection of client popup control objects. + */ + GetPopupControlCollection(): ASPxClientPopupControlCollection; +} +interface ASPxClientPopupControlResizeStateStatic { + /** + * A window has been resized. Returns 0. + */ + Resized: number; + /** + * A window has been collapsed. Returns 1. + */ + Collapsed: number; + /** + * A window has been expanded. Returns 2. + */ + Expanded: number; + /** + * A window has been maximized. Returns 3. + */ + Maximized: number; + /** + * A window has been restored after maximizing. Returns 4. + */ + RestoredAfterMaximized: number; +} +interface ASPxClientPopupControlCloseReasonStatic { + /** + * The window has been closed by an API. + */ + API: string; + /** + * An end-user clicks the close header button. + */ + CloseButton: string; + /** + * An end-user clicks outside the window's region + */ + OuterMouseClick: string; + /** + * An end-user moves the mouse pointer out of the window region. + */ + MouseOut: string; + /** + * An end-user presses the ESC key. + */ + Escape: string; +} +interface ASPxClientPopupMenuStatic extends ASPxClientMenuBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPopupMenu; +} +interface ASPxClientRatingControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRatingControl; +} +interface ASPxClientRibbonStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRibbon; +} +interface ASPxClientRibbonStateStatic { + /** + * A ribbon is in the normal state. Returns 0 + */ + Normal: number; + /** + * A ribbon is minimized. Returns 1 + */ + Minimized: number; + /** + * A ribbon is temporarily shown. Returns 2 + */ + TemporaryShown: number; +} +interface ASPxClientRoundPanelStatic extends ASPxClientPanelBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientRoundPanel; +} +interface ASPxClientSplitterStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientSplitter; +} +interface ASPxClientTabControlBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientTabControlStatic extends ASPxClientTabControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTabControl; +} +interface ASPxClientPageControlStatic extends ASPxClientTabControlBaseStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientPageControl; +} +interface ASPxClientTimerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTimer; +} +interface ASPxClientTitleIndexStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTitleIndex; +} +interface ASPxClientTreeViewStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientTreeView; +} +interface ASPxClientUploadControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientUploadControl; +} +interface ASPxClientUtilsStatic { + /** + * Gets the user-agent string, which identifies the client browser and provides certain system details of the client computer. + * Value: A string value representing the browser's user-agent string. + */ + agent: string; + /** + * Gets a value that specifies whether the client browser is Opera. + * Value: true if the client browser is Opera; otherwise, false. + */ + opera: boolean; + /** + * Gets a value that specifies whether the client browser is Opera version 9. + * Value: true if the client browser is Opera version 9; otherwise, false. + */ + opera9: boolean; + /** + * Gets a value that specifies whether the client browser is Safari. + * Value: true if the client browser is Safari; otherwise, false. + */ + safari: boolean; + /** + * Gets a value that specifies whether the client browser is Safari version 3. + * Value: true if the client browser is Safari version 3; otherwise, false. + */ + safari3: boolean; + /** + * Gets a value that specifies whether the client browser is Safari, running under a MacOS operating system. + * Value: true if the client browser is Safari, running under a MacOS operating system; otherwise, false. + */ + safariMacOS: boolean; + /** + * Gets a value that specifies whether the client browser is Google Chrome. + * Value: true if the client browser is Google Chrome; otherwise, false. + */ + chrome: boolean; + /** + * Gets a value that specifies whether the client browser is Internet Explorer. + * Value: true if the client browser is Intenet Explorer; otherwise, false. + */ + ie: boolean; + /** + * Gets a value that specifies whether the client browser is Internet Explorer version 7. + * Value: true if the client browser is Intenet Explorer version 7; otherwise, false. + */ + ie7: boolean; + /** + * Gets a value that specifies whether the client browser is Firefox. + * Value: true if the client browser is Firefox; otherwise, false. + */ + firefox: boolean; + /** + * Gets a value that specifies whether the client browser is Firefox version 3. + * Value: true if the client browser is Firefox version 3; otherwise, false. + */ + firefox3: boolean; + /** + * Gets a value that specifies whether the client browser is Mozilla. + * Value: true if the client browser is Mozilla; otherwise, false. + */ + mozilla: boolean; + /** + * Gets a value that specifies whether the client browser is Netscape. + * Value: true if the client browser is Netscape; otherwise, false. + */ + netscape: boolean; + /** + * Gets a value that specifies a client browser's full version. + * Value: A double precision floating-point value that specifies a client browser's version. + */ + browserVersion: number; + /** + * Gets a value that specifies a client browser's major version. + * Value: An integer value that specifies a client browser's major version. + */ + browserMajorVersion: number; + /** + * Gets a value that specifies whether the application is run under a MacOS platform. + * Value: true if the application is run under the MacOS platform; otherwise, false. + */ + macOSPlatform: boolean; + /** + * Gets a value that specifies whether the application is run under the Windows platform. + * Value: true if the application is run under the Windows platform; otherwise, false. + */ + windowsPlatform: boolean; + /** + * Gets a value that specifies whether a client browser is based on WebKit. + * Value: true if the client browser is based on WebKit; otherwise, false. + */ + webKitFamily: boolean; + /** + * Gets a value that specifies whether a client browser is based on Netscape. + * Value: true if client browser is based on Netscape; otherwise, false. + */ + netscapeFamily: boolean; + /** + * Gets a value that specifies whether the client browser supports touch. + * Value: true if the client browser supports touch; otherwise, false. + */ + touchUI: boolean; + /** + * Gets a value that specifies whether the client browser supports the WebKit touch user interface. + * Value: true if the client browser supports the WebKit touch user interface; otherwise, false. + */ + webKitTouchUI: boolean; + /** + * Gets a value that specifies whether the client browser supports the Microsoft touch user interface. + * Value: true if the client browser supports the Microsoft touch user interface; otherwise, false. + */ + msTouchUI: boolean; + /** + * Gets a value that specifies whether the application is run under an iOS platform. + * Value: true if the application is run under the iOS platform; otherwise, false. + */ + iOSPlatform: boolean; + /** + * Gets a value that specifies whether the application is run under the Android platform. + * Value: true if the application is run under the Android platform; otherwise, false. + */ + androidPlatform: boolean; + /** + * Inserts the specified item into the specified array object. + * @param array An object that specifies the array to manipulate. + * @param element An object that specifies the array item to insert. + */ + ArrayInsert(array: Object[], element: Object): void; + /** + * Removes the specified item from the specified array object. + * @param array An object that specifies the array to manipulate. + * @param element An object that specifies the array item to remove. + */ + ArrayRemove(array: Object[], element: Object): void; + /** + * Removes an item at the specified index location from the specified array object. + * @param array An object that specifies the array to manipulate. + * @param index The zero-based index location of the array item to remove. + */ + ArrayRemoveAt(array: Object[], index: number): void; + /** + * Removes all items from the specified array object. + * @param array An object that specifies the array to manipulate. + */ + ArrayClear(array: Object[]): void; + /** + * Searches for the specified array item and returns the zero-based index of its first occurrence within the specified array object. + * @param array An object that specifies the array to manipulate. + * @param element An object that specifies the array item to locate. + */ + ArrayIndexOf(array: Object[], element: Object): number; + /** + * Binds the specified function to a specific element's event, so that the function gets called whenever the event fires on the element. + * @param element An object specifying the required element. + * @param eventName A string value that specifies the required event name without the "on" prefix. + * @param method An object that specifies the event's handling function. + */ + AttachEventToElement(element: Object, eventName: string, method: Object): void; + /** + * Unbinds the specified function from a specific element's event, so that the function stops receiving notifications when the event fires. + * @param element An object specifying the required element. + * @param eventName A string value that specifies the required event name. + * @param method An object that specifies the event's handling function. + */ + DetachEventFromElement(element: Object, eventName: string, method: Object): void; + /** + * Returns the object that fired the event. + * @param htmlEvent An object that represents the current event. + */ + GetEventSource(htmlEvent: Object): Object; + /** + * Gets the x-coordinate of the event-related mouse pointer position relative to an end-user's screen. + * @param htmlEvent An object specifying the required HTML event. + */ + GetEventX(htmlEvent: Object): number; + /** + * Gets the y-coordinate of the event-related mouse pointer position relative to an end-user's screen. + * @param htmlEvent An object specifying the required HTML event. + */ + GetEventY(htmlEvent: Object): number; + /** + * Gets the keyboard code for the specified event. + * @param htmlEvent An object specifying the required HTML event. + */ + GetKeyCode(htmlEvent: Object): number; + /** + * Cancels the default action of the specified event. + * @param htmlEvent An object that specifies the required HTML event. + */ + PreventEvent(htmlEvent: Object): boolean; + /** + * Cancels both the specified event's default action and the event's bubbling upon the hierarchy of event handlers. + * @param htmlEvent An object that specifies the required HTML event. + */ + PreventEventAndBubble(htmlEvent: Object): boolean; + /** + * Removes mouse capture from the specified event's source object. + * @param htmlEvent An object that specifies the required HTML event. + */ + PreventDragStart(htmlEvent: Object): boolean; + /** + * Clears any text selection made within the window's client region. + */ + ClearSelection(): void; + /** + * Gets a value that indicates whether the specified object exists on the client side. + * @param obj The object to test. + */ + IsExists(obj: Object): boolean; + /** + * Gets a value that indicates whether the specified object is a function. + * @param obj The object to test. + */ + IsFunction(obj: Object): boolean; + /** + * Gets the x-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be obtained. + */ + GetAbsoluteX(element: Object): number; + /** + * Gets the y-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be obtained. + */ + GetAbsoluteY(element: Object): number; + /** + * Sets the x-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be defined. + * @param x An integer value specifying the required element's x-coordinate, in pixels. + */ + SetAbsoluteX(element: Object, x: number): void; + /** + * Sets the y-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be defined. + * @param y An integer value specifying the required element's y-coordinate, in pixels. + */ + SetAbsoluteY(element: Object, y: number): void; + /** + * Returns the distance between the top edge of the document and the topmost portion of the content currently visible in the window. + */ + GetDocumentScrollTop(): number; + /** + * Returns the distance between the left edge of the document and the leftmost portion of the content currently visible in the window. + */ + GetDocumentScrollLeft(): number; + /** + * Gets the width of the window's client region. + */ + GetDocumentClientWidth(): number; + /** + * Gets the height of the window's client region. + */ + GetDocumentClientHeight(): number; + /** + * Gets a value indicating whether the object passed via the parentElement parameter is a parent of the object passed via the element parameter. + * @param parentElement An object specifying the parent HTML element. + * @param element An object specifying the child HTML element. + */ + GetIsParent(parentElement: Object, element: Object): boolean; + /** + * Returns a reference to the specified HTML element's first parent object which has an ID that matches the specified value. + * @param element An object specifying the child HTML element whose parent elements are searched. + * @param id A string specifying the required parent's ID. + */ + GetParentById(element: Object, id: string): Object; + /** + * Returns a reference to the specified HTML element's first parent object whose element name matches the specified value. + * @param element An object specifying the child HTML element whose parent elements are searched. + * @param tagName A string value specifying the element name (tag name) of the desired HTML element. + */ + GetParentByTagName(element: Object, tagName: string): Object; + /** + * Returns a reference to the specified HTML element's first parent object whose class name matches the specified value. + * @param element An object specifying the child HTML element whose parent elements are searched. + * @param className A string value specifying the class name of the desired HTML element. + */ + GetParentByClassName(element: Object, className: string): Object; + /** + * Returns a reference to the first element that has the specified ID in the parent HTML element specified. + * @param element An object identifying the parent HTML element to search. + * @param id A string specifying the ID attribute value of the desired child element. + */ + GetChildById(element: Object, id: string): Object; + /** + * Returns a reference to the particular element that has the specified element name and is contained within the specified parent HTML element. + * @param element An object specifying the parent HTML element to search. + * @param tagName A string value specifying the element name (tag name) of the desired HTML element. + * @param index An integer value specifying the zero-based index of the desired element amongst all the matching elements found. + */ + GetChildByTagName(element: Object, tagName: string, index: number): Object; + /** + * Creates or updates the HTTP cookie for the response. + * @param name A string value that represents the name of a cookie. + * @param value A string representing the cookie value. + */ + SetCookie(name: string, value: string): void; + /** + * Creates or updates the HTTP cookie for the response. + * @param name A string value that represents the name of a cookie. + * @param value A string representing the cookie value. + * @param expirationDate A date-time object that represents the expiration date and time for the cookie. + */ + SetCookie(name: string, value: string, expirationDate: Date): void; + /** + * Retrieves a cookie with the specified name. + * @param name A string value that represents the name of a cookie. + */ + GetCookie(name: string): string; + /** + * Deletes a cookie with the specified name. + * @param name A string value that represents the name of a cookie. + */ + DeleteCookie(name: string): void; + /** + * Returns a specifically generated code that uniquely identifies the combination of keys specified via the parameters. + * @param keyCode An integer value that specifies the code of the key. + * @param isCtrlKey true if the CTRL key should be included into the key combination; otherwise, false. + * @param isShiftKey true if the SHIFT key should be included into the key combination; otherwise, false. + * @param isAltKey true if the ALT key should be included into the key combination; otherwise, false. + */ + GetShortcutCode(keyCode: number, isCtrlKey: boolean, isShiftKey: boolean, isAltKey: boolean): number; + /** + * Returns a specifically generated code that uniquely identifies the pressed key combination, which is specified by the related HTML event. + * @param htmlEvent A DHTML event object that relates to a key combination being pressed. + */ + GetShortcutCodeByEvent(htmlEvent: Object): number; + /** + * Returns a specifically generated code that uniquely identifies the combination of keys specified via the parameter. + * @param shortcutString A string value that specifies the key combination. + */ + StringToShortcutCode(shortcutString: string): number; + /** + * Trims all leading and trailing whitespaces from the string. + * @param str A string value representing the string for trimming. + */ + Trim(str: string): string; + /** + * Trims all leading whitespaces from the string. + * @param str A string value representing the string for trimming. + */ + TrimStart(str: string): string; + /** + * Trims all trailing whitespaces from the string. + * @param str A string value representing the string for trimming. + */ + TrimEnd(str: string): string; + /** + * Specifies the text that Assistive Technologies (screen readers or braille display, for example) will provide to a user. + * @param message A String value that specifies a text. + */ + SendMessageToAssistiveTechnology(message: string): void; +} +interface ASPxClientChartDesignerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientChartDesigner; +} +interface ASPxClientWebChartControlStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientWebChartControl; +} +interface ASPxClientDocumentViewerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientDocumentViewer; +} +interface ASPxClientQueryBuilderStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientQueryBuilder; +} +interface ASPxClientReportDesignerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientReportDesigner; +} +interface ASPxClientReportDocumentMapStatic extends ASPxClientControlStatic { +} +interface ASPxClientReportParametersPanelStatic extends ASPxClientControlStatic { +} +interface ASPxClientReportToolbarStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientReportToolbar; +} +interface ASPxClientReportViewerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientReportViewer; +} +interface ASPxClientWebDocumentViewerStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientWebDocumentViewer; +} + +declare var MVCxClientDashboardViewer: MVCxClientDashboardViewerStatic; +declare var DashboardDataAxisNames: DashboardDataAxisNamesStatic; +declare var DashboardSpecialValues: DashboardSpecialValuesStatic; +declare var DashboardExportPageLayout: DashboardExportPageLayoutStatic; +declare var DashboardExportPaperKind: DashboardExportPaperKindStatic; +declare var DashboardExportScaleMode: DashboardExportScaleModeStatic; +declare var DashboardExportFilterState: DashboardExportFilterStateStatic; +declare var DashboardExportImageFormat: DashboardExportImageFormatStatic; +declare var DashboardExportExcelFormat: DashboardExportExcelFormatStatic; +declare var ChartExportSizeMode: ChartExportSizeModeStatic; +declare var MapExportSizeMode: MapExportSizeModeStatic; +declare var RangeFilterExportSizeMode: RangeFilterExportSizeModeStatic; +declare var DashboardSelectionMode: DashboardSelectionModeStatic; +declare var ASPxClientDashboard: ASPxClientDashboardStatic; +declare var ASPxClientDashboardViewer: ASPxClientDashboardViewerStatic; +declare var ASPxClientEditBase: ASPxClientEditBaseStatic; +declare var ASPxClientEdit: ASPxClientEditStatic; +declare var ASPxClientBinaryImage: ASPxClientBinaryImageStatic; +declare var ASPxClientButton: ASPxClientButtonStatic; +declare var ASPxClientCalendar: ASPxClientCalendarStatic; +declare var ASPxClientCaptcha: ASPxClientCaptchaStatic; +declare var ASPxClientCheckBox: ASPxClientCheckBoxStatic; +declare var ASPxClientRadioButton: ASPxClientRadioButtonStatic; +declare var ASPxClientTextEdit: ASPxClientTextEditStatic; +declare var ASPxClientTextBoxBase: ASPxClientTextBoxBaseStatic; +declare var ASPxClientButtonEditBase: ASPxClientButtonEditBaseStatic; +declare var ASPxClientDropDownEditBase: ASPxClientDropDownEditBaseStatic; +declare var ASPxClientColorEdit: ASPxClientColorEditStatic; +declare var ASPxClientComboBox: ASPxClientComboBoxStatic; +declare var ASPxClientDateEdit: ASPxClientDateEditStatic; +declare var ASPxClientDropDownEdit: ASPxClientDropDownEditStatic; +declare var ASPxClientFilterControl: ASPxClientFilterControlStatic; +declare var ASPxClientListEdit: ASPxClientListEditStatic; +declare var ASPxClientListBox: ASPxClientListBoxStatic; +declare var ASPxClientCheckListBase: ASPxClientCheckListBaseStatic; +declare var ASPxClientRadioButtonList: ASPxClientRadioButtonListStatic; +declare var ASPxClientCheckBoxList: ASPxClientCheckBoxListStatic; +declare var ASPxClientProgressBar: ASPxClientProgressBarStatic; +declare var ASPxClientSpinEditBase: ASPxClientSpinEditBaseStatic; +declare var ASPxClientSpinEdit: ASPxClientSpinEditStatic; +declare var ASPxClientTimeEdit: ASPxClientTimeEditStatic; +declare var ASPxClientStaticEdit: ASPxClientStaticEditStatic; +declare var ASPxClientHyperLink: ASPxClientHyperLinkStatic; +declare var ASPxClientImageBase: ASPxClientImageBaseStatic; +declare var ASPxClientImage: ASPxClientImageStatic; +declare var ASPxClientLabel: ASPxClientLabelStatic; +declare var ASPxClientTextBox: ASPxClientTextBoxStatic; +declare var ASPxClientMemo: ASPxClientMemoStatic; +declare var ASPxClientButtonEdit: ASPxClientButtonEditStatic; +declare var ASPxClientTokenBox: ASPxClientTokenBoxStatic; +declare var ASPxClientTrackBar: ASPxClientTrackBarStatic; +declare var ASPxClientValidationSummary: ASPxClientValidationSummaryStatic; +declare var ASPxClientGaugeControl: ASPxClientGaugeControlStatic; +declare var ASPxClientGridBase: ASPxClientGridBaseStatic; +declare var ASPxClientGridViewCallbackCommand: ASPxClientGridViewCallbackCommandStatic; +declare var ASPxClientGridLookup: ASPxClientGridLookupStatic; +declare var ASPxClientCardView: ASPxClientCardViewStatic; +declare var ASPxClientGridView: ASPxClientGridViewStatic; +declare var ASPxClientVerticalGrid: ASPxClientVerticalGridStatic; +declare var ASPxClientVerticalGridCallbackCommand: ASPxClientVerticalGridCallbackCommandStatic; +declare var ASPxClientCommandConsts: ASPxClientCommandConstsStatic; +declare var ASPxClientHtmlEditor: ASPxClientHtmlEditorStatic; +declare var ASPxClientHtmlEditorMediaPreloadMode: ASPxClientHtmlEditorMediaPreloadModeStatic; +declare var ASPxClientPivotGrid: ASPxClientPivotGridStatic; +declare var ASPxClientPivotCustomization: ASPxClientPivotCustomizationStatic; +declare var ASPxClientRichEdit: ASPxClientRichEditStatic; +declare var ASPxSchedulerDateTimeHelper: ASPxSchedulerDateTimeHelperStatic; +declare var ASPxClientWeekDaysCheckEdit: ASPxClientWeekDaysCheckEditStatic; +declare var ASPxClientRecurrenceRangeControl: ASPxClientRecurrenceRangeControlStatic; +declare var ASPxClientRecurrenceControlBase: ASPxClientRecurrenceControlBaseStatic; +declare var ASPxClientDailyRecurrenceControl: ASPxClientDailyRecurrenceControlStatic; +declare var ASPxClientWeeklyRecurrenceControl: ASPxClientWeeklyRecurrenceControlStatic; +declare var ASPxClientMonthlyRecurrenceControl: ASPxClientMonthlyRecurrenceControlStatic; +declare var ASPxClientYearlyRecurrenceControl: ASPxClientYearlyRecurrenceControlStatic; +declare var ASPxClientRecurrenceTypeEdit: ASPxClientRecurrenceTypeEditStatic; +declare var ASPxClientTimeInterval: ASPxClientTimeIntervalStatic; +declare var ASPxClientScheduler: ASPxClientSchedulerStatic; +declare var ASPxClientSpellChecker: ASPxClientSpellCheckerStatic; +declare var ASPxClientSpellCheckerStopCheckingReason: ASPxClientSpellCheckerStopCheckingReasonStatic; +declare var ASPxClientSpreadsheet: ASPxClientSpreadsheetStatic; +declare var ASPxClientTreeList: ASPxClientTreeListStatic; +declare var BootstrapClientAccordion: BootstrapClientAccordionStatic; +declare var BootstrapClientButton: BootstrapClientButtonStatic; +declare var BootstrapClientCalendar: BootstrapClientCalendarStatic; +declare var BootstrapClientCheckBox: BootstrapClientCheckBoxStatic; +declare var BootstrapClientRadioButton: BootstrapClientRadioButtonStatic; +declare var BootstrapClientComboBox: BootstrapClientComboBoxStatic; +declare var BootstrapClientDateEdit: BootstrapClientDateEditStatic; +declare var BootstrapClientDropDownEdit: BootstrapClientDropDownEditStatic; +declare var BootstrapClientFormLayout: BootstrapClientFormLayoutStatic; +declare var BootstrapClientGridView: BootstrapClientGridViewStatic; +declare var BootstrapClientHyperLink: BootstrapClientHyperLinkStatic; +declare var BootstrapClientListBox: BootstrapClientListBoxStatic; +declare var BootstrapClientCheckBoxList: BootstrapClientCheckBoxListStatic; +declare var BootstrapClientRadioButtonList: BootstrapClientRadioButtonListStatic; +declare var BootstrapClientMenu: BootstrapClientMenuStatic; +declare var BootstrapClientPopupControl: BootstrapClientPopupControlStatic; +declare var BootstrapClientPopupMenu: BootstrapClientPopupMenuStatic; +declare var BootstrapClientProgressBar: BootstrapClientProgressBarStatic; +declare var BootstrapClientSpinEdit: BootstrapClientSpinEditStatic; +declare var BootstrapClientTabControl: BootstrapClientTabControlStatic; +declare var BootstrapClientPageControl: BootstrapClientPageControlStatic; +declare var BootstrapClientTextBox: BootstrapClientTextBoxStatic; +declare var BootstrapClientMemo: BootstrapClientMemoStatic; +declare var BootstrapClientButtonEdit: BootstrapClientButtonEditStatic; +declare var BootstrapClientTreeView: BootstrapClientTreeViewStatic; +declare var MVCxClientCalendar: MVCxClientCalendarStatic; +declare var MVCxClientCallbackPanel: MVCxClientCallbackPanelStatic; +declare var MVCxClientCardView: MVCxClientCardViewStatic; +declare var MVCxClientChart: MVCxClientChartStatic; +declare var MVCxClientComboBox: MVCxClientComboBoxStatic; +declare var MVCxClientDataView: MVCxClientDataViewStatic; +declare var MVCxClientDateEdit: MVCxClientDateEditStatic; +declare var MVCxClientDockManager: MVCxClientDockManagerStatic; +declare var MVCxClientDockPanel: MVCxClientDockPanelStatic; +declare var MVCxClientFileManager: MVCxClientFileManagerStatic; +declare var MVCxClientGridView: MVCxClientGridViewStatic; +declare var MVCxClientHtmlEditor: MVCxClientHtmlEditorStatic; +declare var MVCxClientImageGallery: MVCxClientImageGalleryStatic; +declare var MVCxClientListBox: MVCxClientListBoxStatic; +declare var MVCxClientNavBar: MVCxClientNavBarStatic; +declare var MVCxClientPivotGrid: MVCxClientPivotGridStatic; +declare var MVCxClientPopupControl: MVCxClientPopupControlStatic; +declare var MVCxClientDocumentViewer: MVCxClientDocumentViewerStatic; +declare var MVCxClientReportViewer: MVCxClientReportViewerStatic; +declare var MVCxClientReportDesigner: MVCxClientReportDesignerStatic; +declare var MVCxClientRichEdit: MVCxClientRichEditStatic; +declare var MVCxClientRoundPanel: MVCxClientRoundPanelStatic; +declare var MVCxClientScheduler: MVCxClientSchedulerStatic; +declare var MVCxSchedulerToolTipType: MVCxSchedulerToolTipTypeStatic; +declare var MVCxClientSpreadsheet: MVCxClientSpreadsheetStatic; +declare var MVCxClientPageControl: MVCxClientPageControlStatic; +declare var MVCxClientTokenBox: MVCxClientTokenBoxStatic; +declare var MVCxClientTreeList: MVCxClientTreeListStatic; +declare var MVCxClientTreeView: MVCxClientTreeViewStatic; +declare var MVCxClientUploadControl: MVCxClientUploadControlStatic; +declare var MVCxClientUtils: MVCxClientUtilsStatic; +declare var MVCxClientGlobalEvents: MVCxClientGlobalEventsStatic; +declare var MVCxClientVerticalGrid: MVCxClientVerticalGridStatic; +declare var MVCxClientWebDocumentViewer: MVCxClientWebDocumentViewerStatic; +declare var ASPxClientControlBase: ASPxClientControlBaseStatic; +declare var ASPxClientControl: ASPxClientControlStatic; +declare var ASPxClientCallback: ASPxClientCallbackStatic; +declare var ASPxClientPanelBase: ASPxClientPanelBaseStatic; +declare var ASPxClientPanel: ASPxClientPanelStatic; +declare var ASPxClientCallbackPanel: ASPxClientCallbackPanelStatic; +declare var ASPxClientCloudControl: ASPxClientCloudControlStatic; +declare var ASPxClientDataView: ASPxClientDataViewStatic; +declare var ASPxClientDockManager: ASPxClientDockManagerStatic; +declare var ASPxClientPopupControlBase: ASPxClientPopupControlBaseStatic; +declare var ASPxClientDockPanel: ASPxClientDockPanelStatic; +declare var ASPxClientDockZone: ASPxClientDockZoneStatic; +declare var ASPxClientFileManager: ASPxClientFileManagerStatic; +declare var ASPxClientFileManagerCommandConsts: ASPxClientFileManagerCommandConstsStatic; +declare var ASPxClientFileManagerErrorConsts: ASPxClientFileManagerErrorConstsStatic; +declare var ASPxClientFormLayout: ASPxClientFormLayoutStatic; +declare var ASPxClientHiddenField: ASPxClientHiddenFieldStatic; +declare var ASPxClientImageGallery: ASPxClientImageGalleryStatic; +declare var ASPxClientImageSlider: ASPxClientImageSliderStatic; +declare var ASPxClientImageZoomNavigator: ASPxClientImageZoomNavigatorStatic; +declare var ASPxClientImageZoom: ASPxClientImageZoomStatic; +declare var ASPxClientLoadingPanel: ASPxClientLoadingPanelStatic; +declare var ASPxClientMenuBase: ASPxClientMenuBaseStatic; +declare var ASPxClientMenu: ASPxClientMenuStatic; +declare var ASPxClientTouchUI: ASPxClientTouchUIStatic; +declare var ASPxClientNavBar: ASPxClientNavBarStatic; +declare var ASPxClientNewsControl: ASPxClientNewsControlStatic; +declare var ASPxClientObjectContainer: ASPxClientObjectContainerStatic; +declare var ASPxClientPager: ASPxClientPagerStatic; +declare var ASPxClientPopupControl: ASPxClientPopupControlStatic; +declare var ASPxClientPopupControlResizeState: ASPxClientPopupControlResizeStateStatic; +declare var ASPxClientPopupControlCloseReason: ASPxClientPopupControlCloseReasonStatic; +declare var ASPxClientPopupMenu: ASPxClientPopupMenuStatic; +declare var ASPxClientRatingControl: ASPxClientRatingControlStatic; +declare var ASPxClientRibbon: ASPxClientRibbonStatic; +declare var ASPxClientRibbonState: ASPxClientRibbonStateStatic; +declare var ASPxClientRoundPanel: ASPxClientRoundPanelStatic; +declare var ASPxClientSplitter: ASPxClientSplitterStatic; +declare var ASPxClientTabControlBase: ASPxClientTabControlBaseStatic; +declare var ASPxClientTabControl: ASPxClientTabControlStatic; +declare var ASPxClientPageControl: ASPxClientPageControlStatic; +declare var ASPxClientTimer: ASPxClientTimerStatic; +declare var ASPxClientTitleIndex: ASPxClientTitleIndexStatic; +declare var ASPxClientTreeView: ASPxClientTreeViewStatic; +declare var ASPxClientUploadControl: ASPxClientUploadControlStatic; +declare var ASPxClientUtils: ASPxClientUtilsStatic; +declare var ASPxClientChartDesigner: ASPxClientChartDesignerStatic; +declare var ASPxClientWebChartControl: ASPxClientWebChartControlStatic; +declare var ASPxClientDocumentViewer: ASPxClientDocumentViewerStatic; +declare var ASPxClientQueryBuilder: ASPxClientQueryBuilderStatic; +declare var ASPxClientReportDesigner: ASPxClientReportDesignerStatic; +declare var ASPxClientReportDocumentMap: ASPxClientReportDocumentMapStatic; +declare var ASPxClientReportParametersPanel: ASPxClientReportParametersPanelStatic; +declare var ASPxClientReportToolbar: ASPxClientReportToolbarStatic; +declare var ASPxClientReportViewer: ASPxClientReportViewerStatic; +declare var ASPxClientWebDocumentViewer: ASPxClientWebDocumentViewerStatic; + diff --git a/types/devexpress-web/v162/tsconfig.json b/types/devexpress-web/v162/tsconfig.json new file mode 100644 index 0000000000..7014b0435c --- /dev/null +++ b/types/devexpress-web/v162/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "devexpress-web": ["devexpress-web/v162"], + "devexpress-web/*": ["devexpress-web/v162/*"] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "devexpress-web-tests.ts" + ] +} \ No newline at end of file diff --git a/types/df-visible/index.d.ts b/types/df-visible/index.d.ts index f7303a46ae..5b26722151 100644 --- a/types/df-visible/index.d.ts +++ b/types/df-visible/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/customd/jquery-visible // Definitions by: Andrey Lipatkin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/dockerode/dockerode-tests.ts b/types/dockerode/dockerode-tests.ts index 8dd9a380de..ef2ed924d1 100644 --- a/types/dockerode/dockerode-tests.ts +++ b/types/dockerode/dockerode-tests.ts @@ -145,3 +145,36 @@ secret.remove((err, response) => { secret.update((err, response) => { // NOOP }); + +const node = docker.getNode('nodeName'); +node.inspect((err, reponse) => { + // NOOP +}); + +node.inspect().then(response => { + // NOOP +}); + +node.update({}, (err, response) => { + // NOOP +}); + +node.update((err, response) => { + // NOOP +}); + +node.update({}).then(response => { + // NOOP; +}); + +node.remove({}, (err, response) => { + // NOOP +}); + +node.remove((err, response) => { + // NOOP +}); + +node.remove({}).then(response => { + // NOOP; +}); diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index a4a1144872..1b456e8f45 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/apocas/dockerode // Definitions by: Carl Winkler , Nicolas Laplante // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// @@ -169,6 +170,14 @@ declare namespace Dockerode { inspect(callback: Callback): void; inspect(): Promise; + update(options: {}, callback: Callback): void; + update(callback: Callback): void; + update(options?: {}): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + modem: any; id?: string; } @@ -637,7 +646,7 @@ declare namespace Dockerode { interface DockerOptions { socketPath?: string; host?: string; - port?: number; + port?: number | string; ca?: string; cert?: string; key?: string; diff --git a/types/docopt/docopt-tests.ts b/types/docopt/docopt-tests.ts index e4850d4ea1..8d68355b27 100644 --- a/types/docopt/docopt-tests.ts +++ b/types/docopt/docopt-tests.ts @@ -1,5 +1,4 @@ - -/// +import docopt = require("docopt"); var doc = ` Usage: @@ -7,5 +6,4 @@ Usage: quick_example.coffee serial [--baud=9600] [--timeout=] quick_example.coffee -h | --help | --version `; -var {docopt} = require('docopt'); -console.log(docopt(doc, { version: '0.1.1rc' })); +docopt(doc, { version: '0.1.1rc' }); diff --git a/types/dom-inputevent/dom-inputevent-tests.ts b/types/dom-inputevent/dom-inputevent-tests.ts new file mode 100644 index 0000000000..91c427d701 --- /dev/null +++ b/types/dom-inputevent/dom-inputevent-tests.ts @@ -0,0 +1,10 @@ +const input = document.createElement('input'); +input.addEventListener('input', (event: InputEvent) => { + return event.data === 'foo' && event.isComposing === true; +}); + +const foo = new InputEvent('input'); +const bar = new InputEvent('beforeinput', { + data: 'bar', + isComposing: true, +}); diff --git a/types/dom-inputevent/index.d.ts b/types/dom-inputevent/index.d.ts new file mode 100644 index 0000000000..df1cce5ec4 --- /dev/null +++ b/types/dom-inputevent/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for UI Events W3C Working Draft — Input Events — Interface InputEvent 1.0 +// Project: https://w3c.github.io/uievents/#interface-inputevent +// Definitions by: Steven Sinatra +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface InputEventInit extends UIEventInit { + data?: string; + isComposing: boolean; +} +interface InputEvent extends UIEvent { + readonly data: string; + readonly isComposing: boolean; +} + +declare class InputEvent { + constructor(typeArg: 'input' | 'beforeinput', inputEventInit?: InputEventInit); +} diff --git a/types/dom-inputevent/tsconfig.json b/types/dom-inputevent/tsconfig.json new file mode 100644 index 0000000000..1577efb197 --- /dev/null +++ b/types/dom-inputevent/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dom-inputevent-tests.ts" + ] +} diff --git a/types/dom-inputevent/tslint.json b/types/dom-inputevent/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/dom-inputevent/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/dot/dot-tests.ts b/types/dot/dot-tests.ts index 507f63e81d..43ff610d91 100644 --- a/types/dot/dot-tests.ts +++ b/types/dot/dot-tests.ts @@ -23,6 +23,8 @@ const data = { name: "My name" }; +doT.templateSettings.varname = 'test'; + let pagefn = doT.template(pagetmpl, undefined, def); const content = pagefn(data); diff --git a/types/dot/index.d.ts b/types/dot/index.d.ts index 9ecd61b7ab..3594381fff 100644 --- a/types/dot/index.d.ts +++ b/types/dot/index.d.ts @@ -8,8 +8,8 @@ export as namespace doT; /** Version number */ export const version: string; -/** Default template settings */ -export const templateSettings: TemplateSettings; +/** Template settings */ +export let templateSettings: TemplateSettings; export type RenderFunction = (...args: any[]) => string; diff --git a/types/dotdotdot/index.d.ts b/types/dotdotdot/index.d.ts index 3ab0f52945..f8b4b4b5f4 100644 --- a/types/dotdotdot/index.d.ts +++ b/types/dotdotdot/index.d.ts @@ -2,6 +2,7 @@ // Project: http://dotdotdot.frebsite.nl/ // Definitions by: Milan Jaros // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 interface JQuery { /** diff --git a/types/dottie/dottie-tests.ts b/types/dottie/dottie-tests.ts index 366d2e32d9..35b02946eb 100644 --- a/types/dottie/dottie-tests.ts +++ b/types/dottie/dottie-tests.ts @@ -12,6 +12,7 @@ const nestedObject = { dottie.exists(nestedObject, 'some.nested'); dottie.default(nestedObject, 'some.nested.value', 'b'); +dottie.get(nestedObject, 'some.nested.value'); dottie.get(nestedObject, 'some.nested.value', 'b'); dottie.set(nestedObject, 'some.nested.value', 'b'); dottie.transform({ 'foo.bar': 'baz' }); diff --git a/types/dottie/index.d.ts b/types/dottie/index.d.ts index 66fb81df5f..1c9f601380 100644 --- a/types/dottie/index.d.ts +++ b/types/dottie/index.d.ts @@ -76,7 +76,7 @@ declare namespace dottie { * dottie.get(values, 'some.undefined.key', 'defaultval'); // 'defaultval' * dottie.get(values, ['some.dot.included', 'key']); // 'barfoo' */ - get(obj: object, path: DottiePath, defaultValue: T): T; + get(obj: object, path: DottiePath, defaultValue?: T): T; /** * Sets nested value, creates nested structure if needed diff --git a/types/draft-js/draft-js-tests.tsx b/types/draft-js/draft-js-tests.tsx index 1ac3c622a0..4315611765 100644 --- a/types/draft-js/draft-js-tests.tsx +++ b/types/draft-js/draft-js-tests.tsx @@ -2,24 +2,85 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import {Map} from "immutable"; -import {Editor, EditorState, RichUtils, DefaultDraftBlockRenderMap, ContentBlock} from 'draft-js'; +import { + ContentBlock, + DefaultDraftBlockRenderMap, + Editor, + EditorState, + Modifier, + RichUtils, + SelectionState, + getDefaultKeyBinding, + ContentState, + convertFromHTML +} from 'draft-js'; + +const SPLIT_HEADER_BLOCK = 'split-header-block'; + +export type KeyName = + 'ENTER'; + +export type KeyCode = number; + +export const KEYCODES: Record = { + ENTER: 13, +}; + +type SyntheticKeyboardEvent = React.KeyboardEvent<{}>; class RichEditorExample extends React.Component<{}, { editorState: EditorState }> { constructor() { super(); - this.state = { editorState: EditorState.createEmpty() }; - } + const sampleMarkup = + 'Bold text, Italic text

    ' + + 'Example link

    ' + + ''; + const blocksFromHTML = convertFromHTML(sampleMarkup); + const state = ContentState.createFromBlockArray( + blocksFromHTML.contentBlocks, + blocksFromHTML.entityMap, + ); + + this.state = { editorState: EditorState.createWithContent(state) }; + } onChange: (editorState: EditorState) => void = (editorState: EditorState) => this.setState({ editorState }); + keyBindingFn(e: SyntheticKeyboardEvent): string { + if (e.keyCode === KEYCODES.ENTER) { + const { editorState } = this.state; + const contentState = editorState.getCurrentContent(); + const selectionState = editorState.getSelection(); + + // only split headers into header and unstyled if we press 'Enter' + // at the end of a header (without text selected) + if (selectionState.isCollapsed()) { + const endKey = selectionState.getEndKey(); + const endOffset = selectionState.getEndOffset(); + const endBlock = contentState.getBlockForKey(endKey); + if (isHeaderBlock(endBlock) && endOffset === endBlock.getText().length) { + return SPLIT_HEADER_BLOCK; + } + } + } + + return getDefaultKeyBinding(e); + } + handleKeyCommand = (command: string) => { + if (command === SPLIT_HEADER_BLOCK) { + this.onChange(this.splitHeaderToNewBlock()); + return 'handled'; + } + const {editorState} = this.state; const newState = RichUtils.handleKeyCommand(editorState, command); + if (newState) { this.onChange(newState); return "handled"; - } + } return "not-handled"; } @@ -32,6 +93,40 @@ class RichEditorExample extends React.Component<{}, { editorState: EditorState } this.onChange(RichUtils.toggleInlineStyle(this.state.editorState, inlineStyle)); } + splitHeaderToNewBlock(): EditorState { + const { editorState } = this.state; + const selection = editorState.getSelection(); + + // Add a new block after the cursor + const contentWithBlock = Modifier.splitBlock( + editorState.getCurrentContent(), + selection, + ); + + // Change the new block type to be normal 'unstyled' text, + const newBlock = contentWithBlock.getBlockAfter(selection.getEndKey()); + const contentWithUnstyledBlock = Modifier.setBlockType( + contentWithBlock, + SelectionState.createEmpty(newBlock.getKey()), + 'unstyled', + ); + + // push the new state with 'insert-characters' to preserve the undo/redo stack + const stateWithNewline = EditorState.push( + editorState, + contentWithUnstyledBlock, + 'insert-characters' + ); + + // manually move the cursor to the next line (as expected) + const nextState = EditorState.forceSelection( + stateWithNewline, + SelectionState.createEmpty(newBlock.getKey()), + ); + + return nextState; + } + render(): React.ReactElement<{}> { // If the user changes block type before entering any text, we can // either style the placeholder or hide it. Let's just hide it now. @@ -58,6 +153,7 @@ class RichEditorExample extends React.Component<{}, { editorState: EditorState } blockStyleFn={getBlockStyle} customStyleMap={styleMap} editorState={this.state.editorState} + keyBindingFn={this.keyBindingFn} handleKeyCommand={this.handleKeyCommand} onChange={this.onChange} placeholder="Tell a story..." @@ -87,7 +183,7 @@ function getBlockStyle(block: ContentBlock) { } } -class StyleButton extends React.Component<{key: string, active: boolean, label: string, onToggle: (blockType: string) => void, style: string}, {}> { +class StyleButton extends React.Component<{key: string, active: boolean, label: string, onToggle: (blockType: string) => void, style: string}> { constructor() { super(); } @@ -125,6 +221,20 @@ const BLOCK_TYPES = [ { label: 'Code Block', style: 'code-block' }, ]; +const isHeaderBlock = (block: ContentBlock): boolean => { + switch (block.getType()) { + case 'header-one': + case 'header-two': + case 'header-three': + case 'header-four': + case 'header-five': + case 'header-six': { + return true; + } + default: return false; + } +} + const BlockStyleControls = (props: {editorState: EditorState, onToggle: (blockType: string) => void}) => { const {editorState} = props; const selection = editorState.getSelection(); diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index c0086319a3..f7f389ea33 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -1,8 +1,11 @@ // Type definitions for Draft.js v0.10.0 // Project: https://facebook.github.io/draft-js/ -// Definitions by: Dmitry Rogozhny , Eelco Lempsink +// Definitions by: Dmitry Rogozhny +// Eelco Lempsink +// Yale Cason +// Ryan Schwers // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 import * as React from 'react'; import * as Immutable from 'immutable'; @@ -27,12 +30,14 @@ declare namespace Draft { type DraftBlockRenderMap = Immutable.Map; + type EditorCommand = DraftEditorCommand | string; + /** * `DraftEditor` is the root editor component. It composes a `contentEditable` * div, and provides a wide variety of useful function props for managing the * state of the editor. See `DraftEditorProps` for details. */ - class DraftEditor extends React.Component { + class DraftEditor extends React.Component { // Force focus back onto the editor node. focus(): void; // Remove focus from the editor node. @@ -49,7 +54,7 @@ declare namespace Draft { * These props are analagous to `value` and `onChange` in controlled React * text inputs. */ - interface DraftEditorProps { + export interface DraftEditorProps { editorState: EditorState; onChange(editorState: EditorState): void; @@ -78,8 +83,7 @@ declare namespace Draft { // A function that accepts a synthetic key event and returns // the matching DraftEditorCommand constant, or null if no command should // be invoked. - keyBindingFn?(e: SyntheticKeyboardEvent): DraftEditorCommand; - keyBindingFn?(e: SyntheticKeyboardEvent): string; + keyBindingFn?(e: SyntheticKeyboardEvent): EditorCommand | null; // Set whether the `DraftEditor` component should be editable. Useful for // temporarily disabling edit behavior or allowing `DraftEditor` rendering @@ -118,9 +122,7 @@ declare namespace Draft { // Map a key command string provided by your key binding function to a // specified behavior. - handleKeyCommand?(command: DraftEditorCommand): DraftHandleValue, - handleKeyCommand?(command: string): DraftHandleValue, - + handleKeyCommand?(command: EditorCommand): 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 @@ -160,7 +162,7 @@ declare namespace Draft { } namespace Components { - class DraftEditorBlock extends React.Component { + class DraftEditorBlock extends React.Component { } } @@ -201,8 +203,7 @@ declare namespace Draft { /** * Retrieve a bound key command for the given event. */ - function getDefaultKeyBinding(e: SyntheticKeyboardEvent): DraftEditorCommand; - function getDefaultKeyBinding(e: SyntheticKeyboardEvent): string; + function getDefaultKeyBinding(e: SyntheticKeyboardEvent): DraftEditorCommand | null; } } @@ -458,7 +459,7 @@ declare namespace Draft { entityMap: { [key: string]: RawDraftEntity }; } - function convertFromHTMLtoContentBlocks(html: string, DOMBuilder?: Function, blockRenderMap?: DraftBlockRenderMap): Array; + function convertFromHTMLtoContentBlocks(html: string, DOMBuilder?: Function, blockRenderMap?: DraftBlockRenderMap): { contentBlocks: Array, entityMap: any }; function convertFromRawToDraftState(rawState: RawDraftContentState): ContentState; function convertFromDraftStateToRaw(contentState: ContentState): RawDraftContentState; } @@ -701,7 +702,7 @@ declare namespace Draft { } class ContentState extends Record { - static createFromBlockArray(blocks: Array): ContentState; + static createFromBlockArray(blocks: Array, entityMap: any): ContentState; static createFromText(text: string, delimiter?: string): ContentState; createEntity(type: DraftEntityType, mutability: DraftEntityMutability, data?: Object): ContentState; diff --git a/types/draggabilly/draggabilly-tests.ts b/types/draggabilly/draggabilly-tests.ts new file mode 100644 index 0000000000..6ab38e6c13 --- /dev/null +++ b/types/draggabilly/draggabilly-tests.ts @@ -0,0 +1,46 @@ +import Draggabilly from 'draggabilly'; + +const elem = document.querySelector('.draggable') as Element; + +const draggieA = new Draggabilly('.test'); +const draggieB = new Draggabilly(elem); + +const draggie = new Draggabilly(elem, { + axis: 'x', + containment: true, + grid: [20, 20], + handle: '.handle' +}); + +const draggiePosX: number = draggie.position.x; +const draggiePosY: number = draggie.position.y; + +draggie.on( 'dragMove', (event, pointer, moveVector) => { + const pointerPageX: number = pointer.pageX; + const pointePageY: number = pointer.pageY; + + const moveVectorX: number = moveVector.x; + const moveVectorY: number = moveVector.y; +}); + +draggie.on( 'dragStart', (event, pointer) => {}); + +draggie.on( 'dragEnd', (event, pointer) => {}); + +draggie.on( 'pointerDown', (event, pointer) => {}); + +draggie.on( 'pointerMove', (event, pointer, moveVector) => {}); + +draggie.on( 'pointerUp', (event, pointer) => {}); + +draggie.on( 'staticClick', (event, pointer) => {}); + +draggie.off('dragMove', (event, pointer, moveVector) => {}); + +draggie.once('dragMove', (event, pointer, moveVector) => {}); + +draggie.enable(); + +draggie.disable(); + +draggie.destroy(); diff --git a/types/draggabilly/index.d.ts b/types/draggabilly/index.d.ts new file mode 100644 index 0000000000..6307c424ab --- /dev/null +++ b/types/draggabilly/index.d.ts @@ -0,0 +1,45 @@ +// Type definitions for draggabilly 2.1 +// Project: http://draggabilly.desandro.com/ +// Definitions by: Jason Wu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +export interface Position { + x: number; + y: number; +} + +export interface DraggabillyOptions { + axis?: 'x' | 'y'; + containment?: Element | string | boolean; + grid?: [number, number]; + handle?: string; +} + +export type DraggabillyClickEventName = 'dragStart' | 'dragEnd' | 'pointerDown' | 'pointerUp' | 'staticClick'; + +export type DraggabillyMoveEventName = 'dragMove' | 'pointerMove'; + +export default class Draggabilly { + position: Position; + + constructor(element: Element | string, options?: DraggabillyOptions); + + on(eventName: DraggabillyClickEventName, listener: (event: Event, pointer: MouseEvent | Touch) => void): Draggabilly; + + on(eventName: DraggabillyMoveEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; + + off(eventName: DraggabillyClickEventName, listener: (event: Event, pointer: MouseEvent | Touch) => void): Draggabilly; + + off(eventName: DraggabillyMoveEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; + + once(eventName: DraggabillyClickEventName, listener: (event: Event, pointer: MouseEvent | Touch) => void): Draggabilly; + + once(eventName: DraggabillyMoveEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; + + enable(): void; + + disable(): void; + + destroy(): void; +} diff --git a/types/draggabilly/tsconfig.json b/types/draggabilly/tsconfig.json new file mode 100644 index 0000000000..32cc6ee235 --- /dev/null +++ b/types/draggabilly/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "draggabilly-tests.ts" + ] +} diff --git a/types/draggabilly/tslint.json b/types/draggabilly/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/draggabilly/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/dropzone/index.d.ts b/types/dropzone/index.d.ts index 905fa53ab9..703172072f 100644 --- a/types/dropzone/index.d.ts +++ b/types/dropzone/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.dropzonejs.com/ // Definitions by: Natan Vivo , Andy Hawkins , Vasya Aksyonov , Simon Huber , Sebastiaan de Rooij // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/dts-bundle/dts-bundle-tests.ts b/types/dts-bundle/dts-bundle-tests.ts index ef8fae6044..29ce2e359c 100644 --- a/types/dts-bundle/dts-bundle-tests.ts +++ b/types/dts-bundle/dts-bundle-tests.ts @@ -1,9 +1,6 @@ -/// import dts = require("dts-bundle"); -import os = require("os"); var opts = { - // Required // name of module likein package.json @@ -34,7 +31,7 @@ var opts = { // - default: false removeSource: false, // newline to use in output file - newline: os.EOL, + newline: "\n", // indentation to use in output file // - default 4 spaces indent: ' ', diff --git a/types/durandal/index.d.ts b/types/durandal/index.d.ts index b95bcb1271..85dbb86e93 100644 --- a/types/durandal/index.d.ts +++ b/types/durandal/index.d.ts @@ -2,6 +2,7 @@ // Project: http://durandaljs.com // Definitions by: Blue Spire // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /** * Durandal 2.1.0 Copyright (c) 2012 Blue Spire Consulting, Inc. All Rights Reserved. diff --git a/types/durandal/v1/index.d.ts b/types/durandal/v1/index.d.ts index 92896b61b5..2b8ae5db1f 100644 --- a/types/durandal/v1/index.d.ts +++ b/types/durandal/v1/index.d.ts @@ -2,6 +2,7 @@ // Project: http://durandaljs.com // Definitions by: Evan Larsen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/dw-bxslider-4/index.d.ts b/types/dw-bxslider-4/index.d.ts index eb33295767..c7003dcf46 100644 --- a/types/dw-bxslider-4/index.d.ts +++ b/types/dw-bxslider-4/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/stevenwanderski/bxslider-4 // Definitions by: Piotr Sałkowski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -620,4 +621,4 @@ interface JQuery { * @param options */ bxSlider(options?:bxSliderOptions): bxSlider; -} \ No newline at end of file +} diff --git a/types/dygraphs/index.d.ts b/types/dygraphs/index.d.ts index 6d2cedf9d2..fb6f4b997d 100644 --- a/types/dygraphs/index.d.ts +++ b/types/dygraphs/index.d.ts @@ -1266,5 +1266,5 @@ declare class Dygraph { } declare module "dygraphs" { - export = Dygraph; -} \ No newline at end of file + export default Dygraph; +} diff --git a/types/dynatable/index.d.ts b/types/dynatable/index.d.ts index 774b617674..b9e1be607f 100644 --- a/types/dynatable/index.d.ts +++ b/types/dynatable/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.dynatable.com/ // Definitions by: François Massart // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/each/each-tests.ts b/types/each/each-tests.ts index 89f5e81ccb..55f257925a 100644 --- a/types/each/each-tests.ts +++ b/types/each/each-tests.ts @@ -1,5 +1,4 @@ - -/// +import EachReq = require("each"); function testEach() { var EachStaticClass: EachStatic = function (array: any[]) { @@ -36,6 +35,5 @@ function testEach() { var each: Each = EachStaticClass([1, 2, 3]); - var EachReq: EachStatic = require("each"); var each: Each = EachReq([4, 5, 6]); } diff --git a/types/easy-jsend/easy-jsend-tests.ts b/types/easy-jsend/easy-jsend-tests.ts index 705fe5b7e1..0ea41f4418 100644 --- a/types/easy-jsend/easy-jsend-tests.ts +++ b/types/easy-jsend/easy-jsend-tests.ts @@ -1,14 +1,15 @@ -import mongoose = require('mongoose'); +// import mongoose = require('mongoose'); import express = require('express'); import jSend = require('easy-jsend'); -var schema = new mongoose.Schema({ - name: {type: String} -}); +// var schema = new mongoose.Schema({ +// name: {type: String} +// }); -var Model = mongoose.model('model', schema); +// var Model = mongoose.model('model', schema); +var Model = {}; jSend.init({partial: true}); diff --git a/types/ej.web.all/ej.web.all-tests.ts b/types/ej.web.all/ej.web.all-tests.ts index cae7001218..ae504eb752 100644 --- a/types/ej.web.all/ej.web.all-tests.ts +++ b/types/ej.web.all/ej.web.all-tests.ts @@ -596,7 +596,7 @@ module GridComponent { -var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fløtemysost"] +var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fløtemysost"] var itemSource: any[] = []; for (var i = 0; i < columns.length; i++) { for (var j = 0; j < 6; j++) { @@ -760,7 +760,7 @@ var world_map= { "type": "Feature", "properties": { "admin": "Switzerland", "name": "Switzerland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.594226108446346, 47.525058091820256], [9.632931756232974, 47.347601223329974], [9.479969516649019, 47.102809963563367], [9.932448357796657, 46.920728054382948], [10.442701450246627, 46.893546250997424], [10.36337812667861, 46.483571275409851], [9.922836541390378, 46.314899400409182], [9.182881707403054, 46.440214748716976], [8.966305779667804, 46.036931871111186], [8.489952426801322, 46.005150865251672], [8.316629672894377, 46.163642483090847], [7.755992058959832, 45.824490057959302], [7.273850945676655, 45.776947740250769], [6.843592970414504, 45.991146552100595], [6.500099724970424, 46.429672756529428], [6.022609490593537, 46.272989813820466], [6.037388950229, 46.725778713561859], [6.768713820023605, 47.287708238303686], [6.736571079138058, 47.541801255882838], [7.192202182655505, 47.449765529971003], [7.466759067422228, 47.620581976911794], [8.31730146651415, 47.613579820336255], [8.522611932009765, 47.830827541691285], [9.594226108446346, 47.525058091820256]]] } }, { "type": "Feature", "properties": { "admin": "Chile", "name": "Chile", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-68.634010227583147, -52.636370458874353], [-68.633349999999879, -54.8695], [-67.56244, -54.87001], [-66.95992, -54.89681], [-67.291029999999878, -55.30124], [-68.148629999999841, -55.61183], [-68.639990810811796, -55.580017999086877], [-69.2321, -55.49906], [-69.95809, -55.19843], [-71.00568, -55.05383], [-72.2639, -54.49514], [-73.2852, -53.957519999999874], [-74.66253, -52.83749], [-73.8381, -53.04743], [-72.43418, -53.7154], [-71.10773, -54.07433], [-70.591779999999787, -53.61583], [-70.26748, -52.93123], [-69.345649999999878, -52.5183], [-68.634010227583147, -52.636370458874353]]], [[[-68.219913092711224, -21.49434661223183], [-67.828179897722634, -22.872918796482178], [-67.106673550063604, -22.735924574476392], [-66.985233934177629, -22.986348565362825], [-67.328442959244128, -24.025303236590908], [-68.417652960876111, -24.518554782816874], [-68.386001146097342, -26.185016371365229], [-68.594799770772667, -26.50690886811126], [-68.295541551370391, -26.899339694935787], [-69.001234910748266, -27.521213881136127], [-69.656130337183143, -28.459141127233686], [-70.013550381129861, -29.367922865518544], [-69.919008348251921, -30.336339206668306], [-70.535068935819439, -31.365010267870279], [-70.074399380153622, -33.09120981214803], [-69.814776984319209, -33.273886000299839], [-69.817309129501453, -34.193571465798279], [-70.388049485949082, -35.169687595359441], [-70.364769253201658, -36.005088799789931], [-71.121880662709771, -36.65812387466233], [-71.118625047475419, -37.576827487947192], [-70.814664272734703, -38.552995293940732], [-71.413516608349042, -38.916022230791107], [-71.680761277946445, -39.808164157878061], [-71.915734015577542, -40.832339369470716], [-71.746803758415453, -42.051386407235988], [-72.148898078078517, -42.254888197601375], [-71.915423956983901, -43.408564548517404], [-71.464056159130493, -43.787611179378324], [-71.793622606071935, -44.207172133156099], [-71.329800788036195, -44.407521661151677], [-71.222778896759721, -44.784242852559409], [-71.659315558545316, -44.973688653341434], [-71.552009446891233, -45.560732924177117], [-71.917258470330196, -46.884838148791786], [-72.44735531278026, -47.738532810253517], [-72.331160854771937, -48.244238376661819], [-72.648247443314929, -48.878618259476774], [-73.415435757120022, -49.318436374712952], [-73.328050910114456, -50.378785088909865], [-72.975746832964617, -50.741450290734299], [-72.309973517532342, -50.677009779666342], [-72.329403856074023, -51.425956312872394], [-71.914803839796321, -52.009022305865912], [-69.498362189396076, -52.142760912637236], [-68.571545376241332, -52.299443855346247], [-69.461284349226617, -52.291950772663924], [-69.94277950710611, -52.537930590373243], [-70.8451016913545, -52.899200528525711], [-71.006332160105217, -53.833252042201345], [-71.429794684520928, -53.856454760300373], [-72.557942877884855, -53.531410001184447], [-73.702756720662862, -52.835069268607249], [-73.702756720662862, -52.835070076051487], [-74.946763475225154, -52.262753588419017], [-75.260026007778507, -51.62935475037321], [-74.976632453089806, -51.043395684615675], [-75.47975419788348, -50.378371677451547], [-75.608015102831942, -48.673772881871784], [-75.182769741502128, -47.711919447623153], [-74.126580980104677, -46.939253431995084], [-75.644395311165439, -46.647643324572016], [-74.69215369332305, -45.76397633238097], [-74.351709357384252, -44.10304412208788], [-73.240356004515192, -44.454960625995611], [-72.717803921179765, -42.383355808278985], [-73.388899909138232, -42.117532240569567], [-73.701335618774834, -43.365776462579738], [-74.33194312203257, -43.224958184584395], [-74.017957119427152, -41.794812920906828], [-73.677099372029943, -39.942212823243111], [-73.217592536090663, -39.258688653318508], [-73.505559455037044, -38.282882582351064], [-73.588060879191076, -37.156284681956016], [-73.166717088499283, -37.123780206044351], [-72.553136969681717, -35.508840020491022], [-71.861732143832555, -33.909092706031522], [-71.438450486929895, -32.418899428030819], [-71.668720669222424, -30.920644626592516], [-71.370082567007714, -30.095682061484997], [-71.48989437527645, -28.861442152625909], [-70.905123867461569, -27.640379734001193], [-70.724953986275963, -25.705924167587209], [-70.403965827095035, -23.628996677344542], [-70.091245897080668, -21.393319187101223], [-70.164419725205974, -19.756468194256183], [-70.372572394477714, -18.347975355708879], [-69.858443569605797, -18.092693780187027], [-69.590423753523979, -17.580011895419286], [-69.100246955019401, -18.260125420812653], [-68.966818406841824, -18.981683444904089], [-68.442225104430918, -19.405068454671419], [-68.757167121033703, -20.37265797290447], [-68.219913092711224, -21.49434661223183]]]] } }, { "type": "Feature", "properties": { "admin": "China", "name": "China", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[110.339187860151526, 18.678395087147603], [109.475209588663702, 18.19770091396861], [108.655207961056135, 18.507681993071397], [108.626217482540426, 19.367887885001974], [109.119055617308007, 19.821038519769385], [110.211598748822837, 20.101253973872073], [110.786550734502228, 20.077534491450077], [111.01005130416462, 19.695929877190732], [110.570646600386794, 19.255879218009305], [110.339187860151526, 18.678395087147603]]], [[[127.657407261262378, 49.760270494172929], [129.397817824420429, 49.440600084015429], [130.58229332898236, 48.729687404976112], [130.987281528853828, 47.790132351261391], [132.506671991099495, 47.788969631534876], [133.373595819228001, 48.183441677434914], [135.026311476786702, 48.478229885443902], [134.500813836810607, 47.578439846377833], [134.112362095272601, 47.212467352886719], [133.76964399631288, 46.116926988299056], [133.097126906466428, 45.14406647397216], [131.883454217659562, 45.32116160743643], [131.025212030156069, 44.967953192721573], [131.288555129115537, 44.111519680348252], [131.144687941614848, 42.929989732426932], [130.633866408409801, 42.903014634770543], [130.640015903852429, 42.39500946712527], [129.994267205933227, 42.985386867843793], [129.596668735879462, 42.424981797854592], [128.05221520397231, 41.994284572917984], [128.208433058790717, 41.466771552082534], [127.343782993683021, 41.503151760415953], [126.869083286649854, 41.816569322266155], [126.18204511932943, 41.107336127276362], [125.079941847840587, 40.569823716792449], [124.265624627785314, 39.928493353834135], [122.86757042856101, 39.637787583976255], [122.131387974130917, 39.170451768544623], [121.054554478032856, 38.89747101496291], [121.585994907722466, 39.360853583324136], [121.376757033372641, 39.750261338859524], [122.168595005381007, 40.422442531896046], [121.640358514493528, 40.946389878903304], [120.768628778161954, 40.593388169917596], [119.639602085449056, 39.898055935214209], [119.023463983233015, 39.252333075511096], [118.042748651197897, 39.204273993479674], [117.532702264477052, 38.73763580988409], [118.05969852098967, 38.061475531561051], [118.878149855628351, 37.897325344385898], [118.911636183753501, 37.448463853498723], [119.702802362142037, 37.156388658185072], [120.823457472823648, 37.870427761377968], [121.711258579597938, 37.481123358707165], [122.357937453298462, 37.454484157860684], [122.519994744965814, 36.930614325501828], [121.104163853033029, 36.651329047180432], [120.63700890511457, 36.111439520811125], [119.66456180224607, 35.609790554337728], [119.151208123858567, 34.909859117160458], [120.227524855633717, 34.360331936168613], [120.620369093916565, 33.37672272392512], [121.229014113450219, 32.460318711877186], [121.908145786630044, 31.692174384074683], [121.891919386890336, 30.949351508095098], [121.264257440273298, 30.676267401648712], [121.503519321784722, 30.14291494396425], [122.092113885589086, 29.832520453403156], [121.93842817595305, 29.018022365834803], [121.684438511238469, 28.225512600206677], [121.125661248866436, 28.135673122667178], [120.395473260582307, 27.053206895449385], [119.585496860839555, 25.740780544532605], [118.656871372554519, 24.547390855400234], [117.281606479970833, 23.624501451099714], [115.890735304835118, 22.782873236578094], [114.763827345846209, 22.668074042241663], [114.152546828265656, 22.223760077396204], [113.806779819800752, 22.548339748621423], [113.241077915501592, 22.051367499270462], [111.843592157032447, 21.550493679281512], [110.78546552942413, 21.39714386645533], [110.444039341271662, 20.34103261970639], [109.88986128137357, 20.282457383703441], [109.627655063924635, 21.008227037026725], [109.864488153118316, 21.395050970947516], [108.522812941524421, 21.715212307211821], [108.050180291782979, 21.552379869060101], [107.043420037872636, 21.8118989120299], [106.567273390735352, 22.21820486092474], [106.725403273548466, 22.794267889898375], [105.811247186305209, 22.976892401617899], [105.329209425886631, 23.352063300056976], [104.476858351664475, 22.819150092046918], [103.504514601660503, 22.703756618739217], [102.706992222100155, 22.708795070887696], [102.170435825613552, 22.464753119389336], [101.652017856861576, 22.318198757409554], [101.803119744882906, 21.174366766845051], [101.27002566936001, 21.201651923095167], [101.180005324307558, 21.436572984294052], [101.150032993578236, 21.849984442629015], [100.416537713627349, 21.558839423096654], [99.983489211021549, 21.742936713136451], [99.240898878987196, 22.118314317304559], [99.53199222208741, 22.949038804612591], [98.898749220782804, 23.142722072842581], [98.66026248575578, 24.063286037690002], [97.604719679762027, 23.897404690033049], [97.724609002679131, 25.083637193293036], [98.671838006589212, 25.91870250091349], [98.712093947344556, 26.743535874940243], [98.682690057370507, 27.508812160750658], [98.246230910233351, 27.747221381129172], [97.91198774616943, 28.335945136014367], [97.327113885490007, 28.261582749946339], [96.248833449287829, 28.411030992134467], [96.586590610747521, 28.830979519154361], [96.117678664131006, 29.452802028922513], [95.404802280664626, 29.031716620392157], [94.565990431702929, 29.27743805593996], [93.413347609432662, 28.640629380807233], [92.503118931043616, 27.896876329046442], [91.696656528696693, 27.771741848251615], [91.258853794319876, 28.040614325466343], [90.730513950567797, 28.064953925075738], [90.015828891971182, 28.296438503527177], [89.475810174521158, 28.042758897406365], [88.814248488320573, 27.299315904239389], [88.730325962278528, 28.086864732367552], [88.120440708369941, 27.876541652939572], [86.954517043000635, 27.974261786403524], [85.823319940131526, 28.203575954698742], [85.011638218123053, 28.642773952747369], [84.23457970575015, 28.839893703724691], [83.89899295444674, 29.320226141877633], [83.337115106137176, 29.463731594352193], [82.327512648450877, 30.115268052688204], [81.525804477874786, 30.422716986608659], [81.111256138029276, 30.183480943313402], [79.721366815107118, 30.882714748654728], [78.738894484374001, 31.515906073527045], [78.458446486326025, 32.61816437431272], [79.176128777995544, 32.483779812137747], [79.208891636068543, 32.994394639613738], [78.811086460285722, 33.506198025032397], [78.912268914713209, 34.321936346975768], [77.83745079947461, 35.494009507787794], [76.192848341785705, 35.89840342868785], [75.896897414050173, 36.666806138651872], [75.158027785140987, 37.133030910789152], [74.980002475895404, 37.419990139305888], [74.829985792952144, 37.990007025701445], [74.864815708316783, 38.378846340481587], [74.25751427602269, 38.606506862943476], [73.928852166646394, 38.505815334622717], [73.675379266254836, 39.431236884105566], [73.960013055318427, 39.660008449861714], [73.822243686828315, 39.893973497063136], [74.776862420556043, 40.366425279291619], [75.467827996730719, 40.56207225194867], [76.526368035797432, 40.427946071935132], [76.90448449087711, 41.066485907549648], [78.187196893226044, 41.185315863604799], [78.543660923175253, 41.582242540038713], [80.119430373051401, 42.12394074153822], [80.259990268885318, 42.34999929459908], [80.180150180994374, 42.920067857426844], [80.866206496101213, 43.180362046881008], [79.966106398441426, 44.917516994804622], [81.947070753918084, 45.317027492853143], [82.458925815769035, 45.539649563166499], [83.180483839860543, 47.330031236350735], [85.164290399113213, 47.000955715516099], [85.720483839870667, 47.452969468773077], [85.76823286330837, 48.455750637396896], [86.59877648310335, 48.549181626980605], [87.359970330762692, 49.214980780629148], [87.751264276076668, 49.297197984405464], [88.013832228551678, 48.599462795600594], [88.854297723346747, 48.069081732773007], [90.280825636763893, 47.693549099307901], [90.970809360724957, 46.88814606382293], [90.585768263718307, 45.719716091487491], [90.945539585334316, 45.286073309910243], [92.133890822318222, 45.115075995456429], [93.480733677141316, 44.97547211362], [94.688928664125356, 44.352331854828456], [95.306875441471504, 44.241330878265458], [95.762454868556688, 43.319449164394619], [96.349395786527808, 42.725635280928643], [97.451757440177971, 42.74888967546007], [99.515817498779995, 42.524691473961688], [100.845865513108279, 42.663804429691417], [101.833040399179936, 42.51487295182627], [103.312278273534787, 41.907468166667613], [104.522281935649005, 41.90834666601662], [104.964993931093431, 41.597409572916334], [106.129315627061658, 42.134327704428891], [107.744772576937976, 42.481515814781908], [109.243595819131428, 42.519446316084149], [110.412103306115299, 42.871233628911014], [111.129682244920218, 43.406834011400171], [111.82958784388137, 43.743118394539486], [111.667737257943202, 44.073175767587706], [111.348376906379428, 44.457441718110047], [111.87330610560025, 45.102079372735112], [112.436062453258842, 45.01164561622425], [113.463906691544196, 44.808893134127111], [114.46033165899604, 45.339816799493875], [115.985096470200133, 45.727235012386004], [116.717868280098855, 46.38820241961524], [117.421701287914246, 46.67273285581421], [118.874325799638711, 46.805412095723646], [119.663269891438745, 46.692679958678944], [119.772823927897562, 47.048058783550132], [118.866574334794947, 47.747060044946195], [118.064142694166719, 48.06673045510373], [117.295507440257438, 47.697709052107385], [116.308952671373234, 47.853410142602812], [115.742837355615734, 47.726544501326273], [115.485282017073018, 48.135382595403442], [116.191802199367601, 49.134598090199056], [116.67880089728618, 49.888531399121398], [117.879244419426371, 49.510983384796944], [119.288460728025839, 50.142882798862033], [119.279365675942358, 50.582907619827282], [120.182049595216924, 51.64356639261802], [120.738191359541972, 51.964115302124547], [120.725789015791975, 52.516226304730814], [120.177088657716865, 52.753886216841195], [121.003084751470226, 53.251401068731226], [122.245747918792858, 53.431725979213681], [123.571506789240843, 53.458804429734627], [125.068211297710434, 53.161044826868832], [125.946348911646169, 52.792798570356936], [126.564399041856959, 51.784255479532689], [126.939156528837657, 51.353894151405896], [127.287455682484904, 50.739797268265434], [127.657407261262378, 49.760270494172929]]]] } }, - { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Côte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, + { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Côte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, { "type": "Feature", "properties": { "admin": "Cameroon", "name": "Cameroon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[13.07582238124675, 2.267097072759014], [12.951333855855605, 2.321615708826939], [12.359380323952218, 2.19281220133945], [11.751665480199787, 2.326757513839993], [11.276449008843711, 2.261050930180871], [9.649158155972627, 2.283866075037735], [9.795195753629455, 3.073404445809117], [9.404366896205998, 3.734526882335202], [8.948115675501068, 3.904128933117135], [8.744923943729416, 4.352215277519959], [8.488815545290889, 4.495617377129917], [8.500287713259693, 4.771982937026847], [8.757532993208626, 5.47966583904791], [9.233162876023043, 6.444490668153334], [9.522705926154398, 6.453482367372116], [10.118276808318255, 7.038769639509879], [10.497375115611417, 7.055357774275562], [11.058787876030349, 6.644426784690593], [11.745774366918509, 6.981382961449753], [11.839308709366801, 7.397042344589434], [12.063946160539556, 7.799808457872301], [12.218872104550597, 8.305824082874322], [12.753671502339214, 8.717762762888993], [12.955467970438971, 9.417771714714702], [13.1675997249971, 9.64062632897341], [13.308676385153914, 10.160362046748926], [13.572949659894558, 10.798565985553564], [14.415378859116682, 11.572368882692071], [14.468192172918974, 11.90475169519341], [14.57717776862253, 12.085360826053501], [14.181336297266792, 12.483656927943112], [14.213530714584634, 12.802035427293344], [14.495787387762842, 12.859396267137326], [14.893385857816522, 12.219047756392582], [14.960151808337598, 11.555574042197222], [14.923564894274955, 10.891325181517471], [15.467872755605269, 9.982336737503429], [14.909353875394713, 9.99212942142273], [14.627200555081057, 9.920919297724536], [14.171466098699025, 10.021378282099928], [13.954218377344002, 9.549494940626685], [14.544466586981766, 8.965861314322266], [14.979995558337688, 8.796104234243471], [15.120865512765331, 8.382150173369423], [15.436091749745765, 7.692812404811971], [15.279460483469107, 7.421924546737968], [14.776545444404572, 6.408498033062044], [14.536560092841111, 6.22695872642069], [14.459407179429345, 5.451760565610299], [14.558935988023501, 5.03059764243153], [14.478372430080466, 4.732605495620446], [14.950953403389658, 4.21038930909492], [15.036219516671249, 3.851367295747123], [15.405395948964379, 3.335300604664339], [15.862732374747479, 3.013537298998982], [15.907380812247649, 2.557389431158612], [16.01285241055535, 2.267639675298084], [15.940918816805061, 1.727672634280295], [15.14634199388524, 1.964014797367184], [14.337812534246577, 2.22787466064949], [13.07582238124675, 2.267097072759014]]] } }, { "type": "Feature", "properties": { "admin": "Democratic Republic of the Congo", "name": "Dem. Rep. Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.833859897593801, 3.50916596111034], [30.773346795380036, 2.339883327642127], [31.174149204235807, 2.204465236821263], [30.852670118948048, 1.849396470543809], [30.468507521290292, 1.58380544677972], [30.086153598762703, 1.062312730306288], [29.875778842902488, 0.597379868976304], [29.819503208136634, -0.205310153813372], [29.587837762172164, -0.58740569417948], [29.579466180140876, -1.341313164885626], [29.29188683443661, -1.620055840667987], [29.254834832483336, -2.215109958508911], [29.117478875451546, -2.292211195488384], [29.02492638521678, -2.839257907730157], [29.276383904749046, -3.293907159034063], [29.339997592900342, -4.499983412294092], [29.519986606572925, -5.419978936386313], [29.41999271008816, -5.939998874539432], [29.620032179490003, -6.520015150583424], [30.199996779101692, -7.079980970898161], [30.740015496551781, -8.340007419470913], [30.34608605319081, -8.238256524288216], [29.002912225060467, -8.40703175215347], [28.734866570762495, -8.526559340044576], [28.449871046672818, -9.164918308146083], [28.673681674928922, -9.605924981324931], [28.496069777141763, -10.789883721564044], [28.372253045370421, -11.793646742401389], [28.642417433392346, -11.971568698782312], [29.341547885869087, -12.36074391037241], [29.616001417771223, -12.178894545137307], [29.699613885219485, -13.257226657771827], [28.934285922976834, -13.248958428605132], [28.52356163912102, -12.698604424696679], [28.15510867687998, -12.272480564017894], [27.38879886242378, -12.132747491100663], [27.164419793412456, -11.608748467661071], [26.55308759939961, -11.924439792532125], [25.752309604604726, -11.784965101776356], [25.418118116973197, -11.330935967659958], [24.783169793402948, -11.238693536018962], [24.314516228947948, -11.262826429899269], [24.257155389103982, -10.951992689663655], [23.912215203555714, -10.926826267137512], [23.456790805767433, -10.867863457892481], [22.837345411884733, -11.017621758674329], [22.402798292742371, -10.99307545333569], [22.155268182064304, -11.084801120653768], [22.208753289486388, -9.894796237836507], [21.87518191904234, -9.523707777548564], [21.801801385187897, -8.908706556842978], [21.949130893652036, -8.305900974158275], [21.746455926203303, -7.920084730667147], [21.728110792739695, -7.2908724910813], [20.514748162526498, -7.299605808138629], [20.601822950938292, -6.93931772219968], [20.091621534920645, -6.943090101756993], [20.037723016040214, -7.116361179231644], [19.417502475673157, -7.155428562044297], [19.166613396896107, -7.738183688999753], [19.016751743249664, -7.988245944860132], [18.464175652752683, -7.847014255406442], [18.134221632569048, -7.98767750410492], [17.472970004962232, -8.068551120641699], [17.089995965247166, -7.545688978712525], [16.860190870845198, -7.222297865429984], [16.573179965896141, -6.622644545115087], [16.326528354567042, -5.877470391466267], [13.375597364971892, -5.864241224799548], [13.02486941900696, -5.984388929878157], [12.735171339578695, -5.965682061388497], [12.322431674863507, -6.100092461779658], [12.182336866920249, -5.789930515163837], [12.436688266660866, -5.684303887559245], [12.468004184629734, -5.248361504745003], [12.631611769265788, -4.991271254092935], [12.995517205465173, -4.781103203961883], [13.258240187237044, -4.882957452009165], [13.600234816144676, -4.500138441590969], [14.144956088933295, -4.510008640158715], [14.209034864975219, -4.793092136253597], [14.582603794013179, -4.970238946150139], [15.170991652088441, -4.3435071753143], [15.753540073314749, -3.855164890156096], [16.006289503654298, -3.535132744972528], [15.972803175529149, -2.712392266453612], [16.407091912510051, -1.740927015798682], [16.86530683764212, -1.225816338713287], [17.523716261472853, -0.743830254726987], [17.638644646889983, -0.424831638189246], [17.663552687254676, -0.058083998213817], [17.826540154703245, 0.288923244626105], [17.774191928791563, 0.855658677571085], [17.89883548347958, 1.741831976728278], [18.09427575040743, 2.365721543788055], [18.39379235197114, 2.90044342692822], [18.453065219809925, 3.504385891123348], [18.542982211997778, 4.201785183118317], [18.932312452884755, 4.709506130385973], [19.467783644293146, 5.031527818212779], [20.290679152108932, 4.691677761245287], [20.927591180106273, 4.322785549329736], [21.659122755630019, 4.224341945813719], [22.405123732195531, 4.02916006104732], [22.704123569436284, 4.633050848810156], [22.841479526468103, 4.710126247573483], [23.297213982850135, 4.609693101414221], [24.41053104014625, 5.108784084489129], [24.805028924262409, 4.897246608902349], [25.128833449003274, 4.927244777847789], [25.278798455514302, 5.170408229997191], [25.650455356557465, 5.256087754737123], [26.402760857862535, 5.150874538590869], [27.044065382604703, 5.127852688004835], [27.374226108517483, 5.233944403500059], [27.979977247842807, 4.408413397637373], [28.428993768026906, 4.287154649264493], [28.696677687298795, 4.455077215996936], [29.159078403446497, 4.38926727947323], [29.715995314256013, 4.600804755060024], [29.953500197069467, 4.173699042167683], [30.833859897593801, 3.50916596111034]]] } }, { "type": "Feature", "properties": { "admin": "Republic of Congo", "name": "Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[12.995517205465173, -4.781103203961883], [12.620759718484491, -4.438023369976135], [12.318607618873923, -4.606230157086187], [11.914963006242086, -5.037986748884789], [11.093772820691923, -3.978826592630546], [11.855121697648114, -3.42687061932105], [11.478038771214299, -2.765618991714241], [11.820963575903189, -2.514161472181982], [12.495702752338159, -2.391688327650242], [12.575284458067639, -1.948511244315134], [13.109618767965626, -2.428740329603513], [13.992407260807706, -2.470804945489099], [14.299210239324564, -1.998275648612213], [14.425455763413593, -1.333406670744971], [14.316418491277741, -0.552627455247048], [13.843320753645653, 0.038757635901149], [14.276265903386953, 1.196929836426619], [14.026668735417214, 1.395677395021153], [13.282631463278816, 1.31418366129688], [13.003113641012074, 1.830896307783319], [13.07582238124675, 2.267097072759014], [14.337812534246577, 2.22787466064949], [15.14634199388524, 1.964014797367184], [15.940918816805061, 1.727672634280295], [16.01285241055535, 2.267639675298084], [16.537058139724135, 3.198254706226278], [17.133042433346297, 3.728196519379451], [17.809900343505259, 3.560196437998569], [18.453065219809925, 3.504385891123348], [18.39379235197114, 2.90044342692822], [18.09427575040743, 2.365721543788055], [17.89883548347958, 1.741831976728278], [17.774191928791563, 0.855658677571085], [17.826540154703245, 0.288923244626105], [17.663552687254676, -0.058083998213817], [17.638644646889983, -0.424831638189246], [17.523716261472853, -0.743830254726987], [16.86530683764212, -1.225816338713287], [16.407091912510051, -1.740927015798682], [15.972803175529149, -2.712392266453612], [16.006289503654298, -3.535132744972528], [15.753540073314749, -3.855164890156096], [15.170991652088441, -4.3435071753143], [14.582603794013179, -4.970238946150139], [14.209034864975219, -4.793092136253597], [14.144956088933295, -4.510008640158715], [13.600234816144676, -4.500138441590969], [13.258240187237044, -4.882957452009165], [12.995517205465173, -4.781103203961883]]] } }, diff --git a/types/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts index e304a73863..035c98d1f0 100644 --- a/types/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -2,12 +2,13 @@ // Project: http://help.syncfusion.com/js/typescript // Definitions by: Syncfusion // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /*! * filename: ej.web.all.d.ts -* version : 15.2.0.40 +* version : 15.2.0.46 * Copyright Syncfusion Inc. 2001 - 2017. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing @@ -15,65428 +16,69561 @@ * applicable laws. */ declare namespace ej { - const dataUtil: dataUtil; - function isMobile(): boolean; - function isIOS(): boolean; - function isAndroid(): boolean; - function isFlat(): boolean; - function isWindows(): boolean; - function isCssCalc(): boolean; - function getCurrentPage(): JQuery; - function isLowerResolution(): boolean; - function browserInfo(): browserInfoOptions; - function isTouchDevice(): boolean; - function addPrefix(style: string): string; - function animationEndEvent(): string; - function blockDefaultActions(e: any): void; - function buildTag(tag: string, innerHtml?: string, styles?: any, attrs?: any): JQuery; - function cancelEvent(): string; - function copyObject(): string; - function createObject(nameSpace: string, value: any, initIn: any): JQuery; - function createObject(element: any, eventEmitter: any, model: any): any; - function setCulture(culture: string): void; - function getObject(element: string, model: any): T; - function getObject(nameSpace: string, fromdata?: any): any; - function defineClass(className: string, constructor: any, proto: any, replace: boolean): any; - function destroyWidgets(element: any): void; - function endEvent(): string; - function event(type: string, data: any, eventProp: any): any; - function getAndroidVersion(): any; - function getAttrVal(ele: any, val: string, option: any): any; - function getBooleanVal(ele: any, val: string, option: any): any; - function getClearString(): string; - function getDimension(element: any, method: string): any; - function getFontString(fontObj: any): string; - function getFontStyle(style: string): string; - function getMaxZindex(): number; - function getNameSpace(className: string): string; - function getOffset(ele: string): any; - function getRenderMode(): string; - function getScrollableParents(element: any): void; - function getTheme(): string; - function getZindexPartial(element: any, popupEle: string): number; - function hasRenderMode(element: string): void; - function hasStyle(prop: string): boolean; - function hasTheme(element: string): string; - function hexFromRGB(color: string): string; - function ieClearRemover(element: string): void; - function isAndroidWebView(): string; - function isDevice(): boolean; - function isIOS7(): boolean; - function isIOSWebView(): boolean; - function isLowerAndroid(): boolean; - function isNullOrUndefined(value: any): boolean; - function isPlainObject(): JQuery; - function isPortrait(): any; - function isTablet(): boolean; - function isWindowsWebView(): string; - function listenEvents(selectors: any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; - function listenTouchEvent(selectors: any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; - function logBase(val: string, base: string): number; - function measureText(text: string, maxwidth: number, font: string): string; - function moveEvent(): string; - function print(element: string, printWindow: any): void; - function proxy(fn: any, context?: string, arg?: string): any; - function round(value: string, div: string, up: string): any; - function sendAjaxRequest(ajaxOptions: any): void; - function setCaretToPos(nput: string, pos1: string, pos2: string): void; - function setRenderMode(element: string): void; - function setTheme(): any; - function startEvent(): string; - function tapEvent(): string; - function tapHoldEvent(): string; - function throwError(): any; - function transitionEndEvent(): any; - function userAgent(): boolean; - function widget(pluginName: string, className: string, proto: any): any; - function avg(json: any, filedName: string): any; - function getGuid(prefix: string): number; - function group(jsonArray: any, field: string, agg: string, level: number, groupDs: string): any; - function isJson(jsonData: string): string; - function max(jsonArray: any, fieldName?: string, comparer?: string): any; - function min(jsonArray: any, fieldName: string, comparer: string): any; - function merge(first: string, second: string): any; - function mergeshort(jsonArray: any, fieldName: string, comparer: string): any; - function parseJson(jsonText: string): string; - function parseTable(table: number, headerOption: string, headerRowIndex: string): any; - function select(jsonArray: any, fields: string): any; - function setTransition(): boolean; - function sum(json: string, fieldName: string): string; - function swap(array: any, x: string, y: string): any; - const cssUA: string; - const serverTimezoneOffset: number; - const transform: string; - const transformOrigin: string; - const transformStyle: string; - const transition: string; - const transitionDelay: string; - const transitionDuration: string; - const transitionProperty: string; - const transitionTimingFunction: string; - const template: any; - const util: { - valueFunction(val: string): any; - }; - export namespace device { - function isAndroid(): boolean; - function isIOS(): boolean; - function isFlat(): boolean; - function isIOS7(): boolean; - function isWindows(): boolean; - } - export namespace widget { - const autoInit: boolean; - const registeredInstances: any[]; - const registeredWidgets: any[]; - function register(pluginName: string, className: string, prototype: any): void; - function destroyAll(elements: Element): void; - function init(element: Element): void; - function registerInstance(element: Element, pluginName: string, className: string, prototype: any): void; - } - interface browserInfoOptions { - name: string; - version: string; - culture: any; - isMSPointerEnabled: boolean; - } - class WidgetBase { - destroy(): void; - element: JQuery; - setModel(options: any, forceSet?: boolean): any; - option(prop?: any, value?: any, forceSet?: boolean): any; - _trigger(eventName?: string, eventProp?: any): any; - _on(element: JQuery, eventType?: string, handler?: (eventObject: JQueryEventObject) => any): any; - _on(element: JQuery, eventType?: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): any; - _off(element: JQuery, eventName: string, handler?: (eventObject: JQueryEventObject) => any): any; - _off(element: JQuery, eventType?: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): any; - persistState(): void; - restoreState(silent: boolean): void; - } - - class Widget extends WidgetBase { - constructor(pluginName: string, className: string, proto: any); - static fn: Widget; - static extend(widget: Widget): any; - register(pluginName: string, className: string, prototype: any): void; - destroyAll(elements: Element): void; - model: any; - } - - - interface BaseEvent { - cancel: boolean; - type: string; - } - class DataManager { - constructor(dataSource?: any, query?: ej.Query, adaptor?: any); - setDefaultQuery(query: ej.Query): void; - executeQuery(query?: ej.Query, done?: any, fail?: any, always?: any): JQueryPromise; - executeLocal(query?: ej.Query): ej.DataManager; - saveChanges(changes?: Changes, key?: string, tableName?: string): JQueryDeferred; - insert(data: any, tableName?: string): JQueryPromise; - remove(keyField: string, value: any, tableName?: string): any; - update(keyField: string, value: any, tableName?: string): any; - } - - class Query { - constructor(); - static fn: Query; - static extend(prototype: any): Query; - key(field: string): ej.Query; - using(dataManager: ej.DataManager): ej.Query; - execute(dataManager: ej.DataManager, done: any, fail?: string, always?: string): any; - executeLocal(dataManager: ej.DataManager): ej.DataManager; - clone(): ej.Query; - from(tableName: any): ej.Query; - addParams(key: string, value: string): ej.Query; - expand(tables: any): ej.Query; - where(fieldName: string, operator: ej.FilterOperators, value: any, ignoreCase?: boolean): ej.Query; - where(predicate: ej.Predicate): ej.Query; - search(searchKey: any, fieldNames?: any, operator?: string, ignoreCase?: boolean): ej.Query; - sortBy(fieldName: string, comparer?: ej.SortOrder, isFromGroup?: boolean): ej.Query; - sortByDesc(fieldName: string): ej.Query; - group(fieldName: string): ej.Query; - page(pageIndex: number, pageSize: number): ej.Query; - take(nos: number): ej.Query; - skip(nos: number): ej.Query; - select(fieldNames: any): ej.Query; - hierarchy(query: ej.Query, selectorFn: any): ej.Query; - foreignKey(key: string): ej.Query; - requiresCount(): ej.Query; - range(start: number, end: number): ej.Query; - } - - class Adaptor { - constructor(ds: any); - pvt: any; - type: ej.Adaptor; - options: AdaptorOptions; - extend(overrides: any): ej.Adaptor; - processQuery(dm: ej.DataManager, query: ej.Query): any; - processResponse(data: any, ds: any, query: ej.Query, xhr: JQueryXHR, request?: any, changes?: Changes): any; - convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; - } - - interface AdaptorOptions { - from?: string; - requestType?: string; - sortBy?: string; - select?: string; - skip?: string; - group?: string; - take?: string; - search?: string; - count?: string; - where?: string; - aggregates?: string; - } - - class UrlAdaptor extends ej.Adaptor { - constructor(); - processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: any): { - type: string; url: string; ejPvtData: any; contentType?: string; data?: any; - }; - convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; - processResponse(data: any, ds: any, query: ej.Query, xhr: JQueryXHR, request?: any, changes?: Changes): any; - onGroup(e: any): void; - batchRequest(dm: ej.DataManager, changes: Changes, e: any): void; - beforeSend(dm: ej.DataManager, request: any, settings?: any): void; - insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; - remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; - update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; - getFiltersFrom(data: any, query: ej.Query): ej.Predicate; - } - - class WebMethodAdaptor extends ej.UrlAdaptor { - constructor(); - processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: any): { - type: string; url: string; ejPvtData: any; contentType?: string; data?: any; - }; - } - - class CacheAdaptor extends ej.UrlAdaptor { - constructor(); - init(adaptor: any, timeStamp: number, pageSize: number): void; - generateKey(url: string, query: ej.Query): string; - processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: any): any; - processResponse(data: any, ds: any, query: ej.Query, xhr: JQueryXHR, request?: any, changes?: Changes): any; - insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; - remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; - update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; - batchRequest(dm: ej.DataManager, changes: Changes, e: any): { url: string; type: string; data: any; contentType: string }; - - } - - class ODataAdaptor extends ej.UrlAdaptor { - constructor(); - options: UrlAdaptorOptions; - onEachWhere(filter: any, requiresCast: boolean): any; - onPredicate(pred: ej.Predicate, query: ej.Query, requiresCast: boolean): string; - onComplexPredicate(pred: ej.Predicate, requiresCast: boolean): string; - onWhere(filters: string[]): string; - onEachSearch(e: any): void; - onSearch(e: any): string; - onEachSort(e: any): string; - onSortBy(e: any): string; - onGroup(e: any): string; - onSelect(e: any): string; - onCount(e: any): string; - beforeSend(dm: ej.DataManager, request: any, settings?: any): void; - processResponse(data: any, ds: any, query: ej.Query, xhr: any, request: any, changes: Changes): { - result: any; count: number - }; - convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; - insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any; }; - remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; }; - update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; data: any; accept: string; }; - batchRequest(dm: ej.DataManager, changes: Changes, e: any): { url: string; type: string; data: any; contentType: string; }; - generateDeleteRequest(arr: any[], e: any): string; - generateInsertRequest(arr: any[], e: any): string; - generateUpdateRequest(arr: any[], e: any): string; - } - interface UrlAdaptorOptions { - requestType?: string; - accept?: string; - multipartAccept?: string; - sortBy?: string; - select?: string; - skip?: string; - take?: string; - count?: string; - where?: string; - expand?: string; - batch?: string; - changeSet?: string; - batchPre?: string; - contentId?: string; - batchContent?: string; - changeSetContent?: string; - batchChangeSetContentType?: string; - } - class WebApiAdaptor extends ej.ODataAdaptor { - constructor(); - insert(dm: ej.DataManager, data: any, tableName?: string): { url: string; type: string; data: any; }; - remove(dm: ej.DataManager, value: any, keyField?: string, tableName?: string): { url: string; type: string; data: any; }; - update(dm: ej.DataManager, value: any, keyField?: string, tableName?: string): { url: string; type: string; data: any; accept: string; }; - processResponse(data: any, ds: any, query: ej.Query, xhr: any, request: any, changes: Changes): { - result: any; count: number - }; - } - class ODataV4Adaptor extends ej.ODataAdaptor { - constructor(); - options: ODataAdaptorOptions; - onCount(e: any): string; - onEachSearch(e: any): void; - onSearch(e: any): string; - beforeSend(dm: ej.DataManager, request: any, settings?: any): void; - processResponse(data: any, ds: any, query: ej.Query, xhr: any, request: any, changes: Changes): { - result: any; count: number - }; - } - interface ODataAdaptorOptions { - requestType?: string; - accept?: string; - multipartAccept?: string; - sortBy?: string; - select?: string; - skip?: string; - take?: string; - count?: string; - search?: string; - where?: string; - expand?: string; - batch?: string; - changeSet?: string; - batchPre?: string; - contentId?: string; - batchContent?: string; - changeSetContent?: string; - batchChangeSetContentType?: string; - } - - class JsonAdaptor extends ej.Adaptor { - constructor(); - processQuery(ds: any, query: ej.Query): string; - batchRequest(dm: ej.DataManager, changes: Changes, e: any): Changes; - onWhere(ds: any, e: any): any; - onSearch(ds: any, e: any): any; - onSortBy(ds: any, e: any, query: ej.Query): any; - onGroup(ds: any, e: any, query: ej.Query): any; - onPage(ds: any, e: any, query: ej.Query): any; - onRange(ds: any, e: any): any; - onTake(ds: any, e: any): any; - onSkip(ds: any, e: any): any; - onSelect(ds: any, e: any): any; - insert(dm: ej.DataManager, data: any): any; - remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): any; - update(dm: ej.DataManager, keyField: string, value: any, tableName: string): any; - } - class remoteSaveAdaptor extends ej.UrlAdaptor { - constructor(); - batchRequest(dm: ej.DataManager, changes: Changes, e: any): void; - beforeSend(dm: ej.DataManager, request: any, settings?: any): void; - insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; - remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; - update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; - } - class TableModel { - constructor(name: string, jsonArray: any[], dataManager: ej.DataManager, modelComputed: any); - on(eventName: string, handler: any): void; - off(eventName: string, handler: any): void; - setDataManager(dataManager: DataManager): void; - saveChanges(): void; - rejectChanges(): void; - insert(json: any): void; - update(value: any): void; - remove(key: string): void; - isDirty(): boolean; - getChanges(): Changes; - toArray(): any[]; - setDirty(dirty: any, model: any): void; - get(index: number): void; - length(): number; - bindTo(element: any): void; - } - class Model { - constructor(json: any, table: string, name: string); - formElements: string[]; - computes(value: any): void; - on(eventName: string, handler: any): void; - off(eventName: string, handler: any): void; - set(field: string, value: any): void; - get(field: string): any; - revert(suspendEvent: any): void; - save(dm: ej.DataManager, key: string): void; - markCommit(): void; - markDelete(): void; - changeState(state: boolean, args: any): void; - properties(): any; - bindTo(element: any): void; - unbind(element: any): void; - } - interface Changes { - changed?: any[]; - added?: any[]; - deleted?: any[]; - } - class Predicate { - constructor(); - constructor(field: string, operator: ej.FilterOperators, value: any, ignoreCase: boolean); - and(field: string, operator: any, value: any, ignoreCase: boolean): ej.Predicate; - or(field: string, operator: any, value: any, ignoreCase: boolean): ej.Predicate; - or(predicate: any[]): any; - validate(record: any): boolean; - toJSON(): { - isComplex: boolean; - field: string; - operator: string; - value: any; - ignoreCase: boolean; - condition: string; - predicates: any; - }; - } - interface dataUtil { - swap(array: any[], x: number, y: number): void; - mergeSort(jsonArray: any[], fieldName?: string, comparer?: any): any[]; - max(jsonArray: any[], fieldName?: string, comparer?: string): any[]; - min(jsonArray: any[], fieldName: string, comparer: string): any[]; - distinct(jsonArray: any[], fieldName?: string, requiresCompleteRecord?: any): any[]; - sum(json: any, fieldName: string): number; - avg(json: any, fieldName: string): number; - select(jsonArray: any[], fieldName: string, fields: string): any[]; - group(jsonArray: any[], field: string, /* internal */ level: number): any[]; - parseTable(table: string, headerOption: ej.headerOption, headerRowIndex: number): any; - } - interface AjaxSettings { - type?: string; - cache: boolean; - data?: any; - dataType?: string; - contentType?: any; - async?: boolean; - } - enum FilterOperators { - contains, - endsWith, - equal, - greaterThan, - greaterThanOrEqual, - lessThan, - lessThanOrEqual, - notEqual, - startsWith - } - - enum MatrixDefaults { - m11, - m12, - m21, - m22, - offsetX, - offsetY, - type - } - enum MatrixTypes { - Identity, - Scaling, - Translation, - Unknown - } - - enum Orientation { - Horizontal, - Vertical - } - - enum SliderType { - Default, - MinRange, - Range - } - - enum eventType { - click, - mouseDown, - mouseLeave, - mouseMove, - mouseUp - } - enum headerOption { - row, - tHead - } - enum filterType { - StartsWith, - Contains, - EndsWith, - LessThan, - GreaterThan, - LessThanOrEqual, - GreaterThanOrEqual, - Equal, - NotEqual - } - enum Animation { - Fade, - None, - Slide - } - enum Type { - Overlay, - Slide - } - enum SortOrder { - Ascending, - Descending - } - class Draggable extends ej.Widget { - static fn: Draggable; - constructor(element: JQuery | Element, options?: Draggable.Model); - static Locale: any; - model: Draggable.Model; - defaults: Draggable.Model; - - /** destroy in the draggable. - * @returns {void} - */ - _destroy(): void; - } - export namespace Draggable { - - export interface Model { - - /** If clone is specified. - * @Default {false} - */ - clone?: boolean; - - /** Sets the offset of the dragging helper relative to the mouse cursor. - * @Default {{ top: -1, left: -2 }} - */ - cursorAt?: any; - - /** Distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element. - * @Default {1} - */ - distance?: number; - - /** The drag area is used to restrict the dragging element bounds. - * @Default {false} - */ - dragArea?: boolean; - - /** If specified, restricts drag start click to the specified element(s). - * @Default {null} - */ - handle?: string; - - /** Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable. - * @Default {'default'} - */ - scope?: string; - - /** This event is triggered when dragging element is destroyed. */ - destroy?(e: DestroyEventArgs): void; - - /** This event is triggered when the mouse is moved during the dragging. */ - drag?(e: DragEventArgs): void; - - /** Supply a callback function to handle the drag start event as an init option. */ - dragStart?(e: DragStartEventArgs): void; - - /** This event is triggered when the mouse is moved during the dragging. */ - dragStop?(e: DragStopEventArgs): void; - - /** This event is triggered when dragged. */ - helper?(e: HelperEventArgs): void; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the autocomplete model - */ - model?: ej.Draggable.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface DragEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the draggable model - */ - model?: ej.Draggable.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the event model values - */ - event?: any; - - /** returns the exact mouse down target element - */ - target?: any; - } - - export interface DragStartEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /* tslint:disable:no-empty-interface */ + const dataUtil: dataUtil; + function isMobile(): boolean; + function isIOS(): boolean; + function isAndroid(): boolean; + function isFlat(): boolean; + function isWindows(): boolean; + function isCssCalc(): boolean; + function getCurrentPage(): JQuery; + function isLowerResolution(): boolean; + function browserInfo(): browserInfoOptions; + function isTouchDevice(): boolean; + function addPrefix(style: string): string; + function animationEndEvent(): string; + function blockDefaultActions(e: any): void; + function buildTag(tag: string, innerHtml?: string, styles?: any, attrs?: any): JQuery; + function cancelEvent(): string; + function copyObject(): string; + function createObject(nameSpace: string, value: any, initIn: any): JQuery; + function createObject(element: any, eventEmitter: any, model: any): any; + function setCulture(culture: string): void; + function getObject(element: string, model: any): T; + function getObject(nameSpace: string, fromdata?: any): any; + function defineClass(className: string, constructor: any, proto: any, replace: boolean): any; + function destroyWidgets(element: any): void; + function endEvent(): string; + function event(type: string, data: any, eventProp: any): any; + function getAndroidVersion(): any; + function getAttrVal(ele: any, val: string, option: any): any; + function getBooleanVal(ele: any, val: string, option: any): any; + function getClearString(): string; + function getDimension(element: any, method: string): any; + function getFontString(fontObj: any): string; + function getFontStyle(style: string): string; + function getMaxZindex(): number; + function getNameSpace(className: string): string; + function getOffset(ele: string): any; + function getRenderMode(): string; + function getScrollableParents(element: any): void; + function getTheme(): string; + function getZindexPartial(element: any, popupEle: string): number; + function hasRenderMode(element: string): void; + function hasStyle(prop: string): boolean; + function hasTheme(element: string): string; + function hexFromRGB(color: string): string; + function ieClearRemover(element: string): void; + function isAndroidWebView(): string; + function isDevice(): boolean; + function isIOS7(): boolean; + function isIOSWebView(): boolean; + function isLowerAndroid(): boolean; + function isNullOrUndefined(value: any): boolean; + function isPlainObject(): JQuery; + function isPortrait(): any; + function isTablet(): boolean; + function isWindowsWebView(): string; + function listenEvents(selectors: any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function listenTouchEvent(selectors: any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function logBase(val: string, base: string): number; + function measureText(text: string, maxwidth: number, font: string): string; + function moveEvent(): string; + function print(element: string, printWindow: any): void; + function proxy(fn: any, context?: string, arg?: string): any; + function round(value: string, div: string, up: string): any; + function sendAjaxRequest(ajaxOptions: any): void; + function setCaretToPos(nput: string, pos1: string, pos2: string): void; + function setRenderMode(element: string): void; + function setTheme(): any; + function startEvent(): string; + function tapEvent(): string; + function tapHoldEvent(): string; + function throwError(): any; + function transitionEndEvent(): any; + function userAgent(): boolean; + function widget(pluginName: string, className: string, proto: any): any; + function avg(json: any, filedName: string): any; + function getGuid(prefix: string): number; + function group(jsonArray: any, field: string, agg: string, level: number, groupDs: string): any; + function isJson(jsonData: string): string; + function max(jsonArray: any, fieldName?: string, comparer?: string): any; + function min(jsonArray: any, fieldName: string, comparer: string): any; + function merge(first: string, second: string): any; + function mergeshort(jsonArray: any, fieldName: string, comparer: string): any; + function parseJson(jsonText: string): string; + function parseTable(table: number, headerOption: string, headerRowIndex: string): any; + function select(jsonArray: any, fields: string): any; + function setTransition(): boolean; + function sum(json: string, fieldName: string): string; + function swap(array: any, x: string, y: string): any; + const cssUA: string; + const serverTimezoneOffset: number; + const transform: string; + const transformOrigin: string; + const transformStyle: string; + const transition: string; + const transitionDelay: string; + const transitionDuration: string; + const transitionProperty: string; + const transitionTimingFunction: string; + const template: any; + const util: { + valueFunction(val: string): any; + }; + export namespace device { + function isAndroid(): boolean; + function isIOS(): boolean; + function isFlat(): boolean; + function isIOS7(): boolean; + function isWindows(): boolean; + } + export namespace widget { + const autoInit: boolean; + const registeredInstances: any[]; + const registeredWidgets: any[]; + function register(pluginName: string, className: string, prototype: any): void; + function destroyAll(elements: Element): void; + function init(element: Element): void; + function registerInstance(element: Element, pluginName: string, className: string, prototype: any): void; + } + + interface browserInfoOptions { + name: string; + version: string; + culture: any; + isMSPointerEnabled: boolean; + } + class WidgetBase { + destroy(): void; + element: JQuery; + setModel(options: any, forceSet?: boolean): any; + option(prop?: any, value?: any, forceSet?: boolean): any; + _trigger(eventName?: string, eventProp?: any): any; + _on(element: JQuery, eventType?: string, handler?: (eventObject: JQueryEventObject) => any): any; + _on(element: JQuery, eventType?: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): any; + _off(element: JQuery, eventName: string, handler?: (eventObject: JQueryEventObject) => any): any; + _off(element: JQuery, eventType?: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): any; + persistState(): void; + restoreState(silent: boolean): void; + } + + class Widget extends WidgetBase { + constructor(pluginName: string, className: string, proto: any); + static fn: Widget; + static extend(widget: Widget): any; + register(pluginName: string, className: string, prototype: any): void; + destroyAll(elements: Element): void; + model: any; + } + + + interface BaseEvent { + cancel: boolean; + type: string; + } + class DataManager { + constructor(dataSource?: any, query?: ej.Query, adaptor?: any); + setDefaultQuery(query: ej.Query): void; + executeQuery(query?: ej.Query, done?: any, fail?: any, always?: any): JQueryPromise; + executeLocal(query?: ej.Query): ej.DataManager; + saveChanges(changes?: Changes, key?: string, tableName?: string): JQueryDeferred; + insert(data: any, tableName?: string): JQueryPromise; + remove(keyField: string, value: any, tableName?: string): any; + update(keyField: string, value: any, tableName?: string): any; + } + + class Query { + constructor(); + static fn: Query; + static extend(prototype: any): Query; + key(field: string): ej.Query; + using(dataManager: ej.DataManager): ej.Query; + execute(dataManager: ej.DataManager, done: any, fail?: string, always?: string): any; + executeLocal(dataManager: ej.DataManager): ej.DataManager; + clone(): ej.Query; + from(tableName: any): ej.Query; + addParams(key: string, value: string): ej.Query; + expand(tables: any): ej.Query; + where(fieldName: string, operator: ej.FilterOperators, value: any, ignoreCase?: boolean): ej.Query; + where(predicate: ej.Predicate): ej.Query; + search(searchKey: any, fieldNames?: any, operator?: string, ignoreCase?: boolean): ej.Query; + sortBy(fieldName: string, comparer?: ej.SortOrder, isFromGroup?: boolean): ej.Query; + sortByDesc(fieldName: string): ej.Query; + group(fieldName: string): ej.Query; + page(pageIndex: number, pageSize: number): ej.Query; + take(nos: number): ej.Query; + skip(nos: number): ej.Query; + select(fieldNames: any): ej.Query; + hierarchy(query: ej.Query, selectorFn: any): ej.Query; + foreignKey(key: string): ej.Query; + requiresCount(): ej.Query; + range(start: number, end: number): ej.Query; + } + + class Adaptor { + constructor(ds: any); + pvt: any; + type: ej.Adaptor; + options: AdaptorOptions; + extend(overrides: any): ej.Adaptor; + processQuery(dm: ej.DataManager, query: ej.Query): any; + processResponse(data: any, ds: any, query: ej.Query, xhr: JQueryXHR, request?: any, changes?: Changes): any; + convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; + } + + interface AdaptorOptions { + from?: string; + requestType?: string; + sortBy?: string; + select?: string; + skip?: string; + group?: string; + take?: string; + search?: string; + count?: string; + where?: string; + aggregates?: string; + } + + class UrlAdaptor extends ej.Adaptor { + constructor(); + processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: any): { + type: string; url: string; ejPvtData: any; contentType?: string; data?: any; + }; + convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; + processResponse(data: any, ds: any, query: ej.Query, xhr: JQueryXHR, request?: any, changes?: Changes): any; + onGroup(e: any): void; + onAggregates(e: any): void; + batchRequest(dm: ej.DataManager, changes: Changes, e: any): void; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; + getFiltersFrom(data: any, query: ej.Query): ej.Predicate; + } + class WebMethodAdaptor extends ej.UrlAdaptor { + constructor(); + processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: any): { + type: string; url: string; ejPvtData: any; contentType?: string; data?: any; + }; + } + class CacheAdaptor extends ej.UrlAdaptor { + constructor(); + init(adaptor: any, timeStamp: number, pageSize: number): void; + generateKey(url: string, query: ej.Query): string; + processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: any): any; + processResponse(data: any, ds: any, query: ej.Query, xhr: JQueryXHR, request?: any, changes?: Changes): any; + insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; + batchRequest(dm: ej.DataManager, changes: Changes, e: any): { url: string; type: string; data: any; contentType: string }; + } + class ODataAdaptor extends ej.UrlAdaptor { + constructor(); + options: UrlAdaptorOptions; + onEachWhere(filter: any, requiresCast: boolean): any; + onPredicate(pred: ej.Predicate, query: ej.Query, requiresCast: boolean): string; + onComplexPredicate(pred: ej.Predicate, requiresCast: boolean): string; + onWhere(filters: string[]): string; + onEachSearch(e: any): void; + onSearch(e: any): string; + onEachSort(e: any): string; + onSortBy(e: any): string; + onGroup(e: any): string; + onSelect(e: any): string; + onAggregates(e: any): string; + onCount(e: any): string; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + processResponse(data: any, ds: any, query: ej.Query, xhr: any, request: any, changes: Changes): { + result: any; count: number + }; + convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; + insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any; }; + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; }; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; data: any; accept: string; }; + batchRequest(dm: ej.DataManager, changes: Changes, e: any): { url: string; type: string; data: any; contentType: string; }; + generateDeleteRequest(arr: any[], e: any): string; + generateInsertRequest(arr: any[], e: any): string; + generateUpdateRequest(arr: any[], e: any): string; + } + interface UrlAdaptorOptions { + requestType?: string; + accept?: string; + multipartAccept?: string; + sortBy?: string; + select?: string; + skip?: string; + take?: string; + count?: string; + where?: string; + expand?: string; + batch?: string; + changeSet?: string; + batchPre?: string; + contentId?: string; + batchContent?: string; + changeSetContent?: string; + batchChangeSetContentType?: string; + } + + class WebApiAdaptor extends ej.ODataAdaptor { + constructor(); + insert(dm: ej.DataManager, data: any, tableName?: string): { url: string; type: string; data: any; }; + remove(dm: ej.DataManager, value: any, keyField?: string, tableName?: string): { url: string; type: string; data: any; }; + update(dm: ej.DataManager, value: any, keyField?: string, tableName?: string): { url: string; type: string; data: any; accept: string; }; + processResponse(data: any, ds: any, query: ej.Query, xhr: any, request: any, changes: Changes): { + result: any; count: number + }; + } + + class ODataV4Adaptor extends ej.ODataAdaptor { + constructor(); + options: ODataAdaptorOptions; + onCount(e: any): string; + onEachSearch(e: any): void; + onSearch(e: any): string; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + processQuery(ds: any, query: ej.Query): { + type: string; url: string; ejPvtData: any; contentType?: string; data?: any; + }; + processResponse(data: any, ds: any, query: ej.Query, xhr: any, request: any, changes: Changes): { + result: any; count: number + }; + } + interface ODataAdaptorOptions { + requestType?: string; + accept?: string; + multipartAccept?: string; + sortBy?: string; + select?: string; + skip?: string; + take?: string; + count?: string; + search?: string; + where?: string; + expand?: string; + batch?: string; + changeSet?: string; + batchPre?: string; + contentId?: string; + batchContent?: string; + changeSetContent?: string; + batchChangeSetContentType?: string; + } + + class JsonAdaptor extends ej.Adaptor { + constructor(); + processQuery(ds: any, query: ej.Query): string; + batchRequest(dm: ej.DataManager, changes: Changes, e: any): Changes; + onWhere(ds: any, e: any): any; + onAggregates(ds: any, e: any): any; + onSearch(ds: any, e: any): any; + onSortBy(ds: any, e: any, query: ej.Query): any; + onGroup(ds: any, e: any, query: ej.Query): any; + onPage(ds: any, e: any, query: ej.Query): any; + onRange(ds: any, e: any): any; + onTake(ds: any, e: any): any; + onSkip(ds: any, e: any): any; + onSelect(ds: any, e: any): any; + insert(dm: ej.DataManager, data: any, tableName?: string): any; + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): any; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): any; + } + class ForeignKeyAdaptor extends ej.JsonAdaptor { + constructor(); + processQuery(ds: any, query: ej.Query): any; + insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; data: any }; + } + class remoteSaveAdaptor extends ej.UrlAdaptor { + constructor(); + batchRequest(dm: ej.DataManager, changes: Changes, e: any): void; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; + } + class TableModel { + constructor(name: string, jsonArray: any[], dataManager: ej.DataManager, modelComputed: any); + on(eventName: string, handler: any): void; + off(eventName: string, handler: any): void; + setDataManager(dataManager: DataManager): void; + saveChanges(): void; + rejectChanges(): void; + insert(json: any): void; + update(value: any): void; + remove(key: string): void; + isDirty(): boolean; + getChanges(): Changes; + toArray(): any[]; + setDirty(dirty: any, model: any): void; + get(index: number): void; + length(): number; + bindTo(element: any): void; + } + class Model { + constructor(json: any, table: string, name: string); + formElements: string[]; + computes(value: any): void; + on(eventName: string, handler: any): void; + off(eventName: string, handler: any): void; + set(field: string, value: any): void; + get(field: string): any; + revert(suspendEvent: any): void; + save(dm: ej.DataManager, key: string): void; + markCommit(): void; + markDelete(): void; + changeState(state: boolean, args: any): void; + properties(): any; + bindTo(element: any): void; + unbind(element: any): void; + } + interface Changes { + changed?: any[]; + added?: any[]; + deleted?: any[]; + } + class Predicate { + constructor(); + constructor(field: string, operator: ej.FilterOperators, value: any, ignoreCase: boolean); + and(field: string, operator: any, value: any, ignoreCase: boolean): ej.Predicate; + or(field: string, operator: any, value: any, ignoreCase: boolean): ej.Predicate; + or(predicate: any[]): any; + validate(record: any): boolean; + toJSON(): { + isComplex: boolean; + field: string; + operator: string; + value: any; + ignoreCase: boolean; + condition: string; + predicates: any; + }; + } + interface dataUtil { + swap(array: any[], x: number, y: number): void; + mergeSort(jsonArray: any[], fieldName?: string, comparer?: any): any[]; + max(jsonArray: any[], fieldName?: string, comparer?: string): any[]; + min(jsonArray: any[], fieldName: string, comparer: string): any[]; + distinct(jsonArray: any[], fieldName?: string, requiresCompleteRecord?: any): any[]; + sum(json: any, fieldName: string): number; + avg(json: any, fieldName: string): number; + select(jsonArray: any[], fieldName: string, fields: string): any[]; + group(jsonArray: any[], field: string, /* internal */ level: number): any[]; + parseTable(table: string, headerOption: ej.headerOption, headerRowIndex: number): any; + } + interface AjaxSettings { + type?: string; + cache: boolean; + data?: any; + dataType?: string; + contentType?: any; + async?: boolean; + } + enum FilterOperators { + contains, + endsWith, + equal, + greaterThan, + greaterThanOrEqual, + lessThan, + lessThanOrEqual, + notEqual, + startsWith + } + + enum MatrixDefaults { + m11, + m12, + m21, + m22, + offsetX, + offsetY, + type + } + enum MatrixTypes { + Identity, + Scaling, + Translation, + Unknown + } + + enum Orientation { + Horizontal, + Vertical + } + + enum SliderType { + Default, + MinRange, + Range + } + + enum eventType { + click, + mouseDown, + mouseLeave, + mouseMove, + mouseUp + } + enum headerOption { + row, + tHead + } + + enum filterType { + StartsWith, + Contains, + EndsWith, + LessThan, + GreaterThan, + LessThanOrEqual, + GreaterThanOrEqual, + Equal, + NotEqual + } + enum Animation { + Fade, + None, + Slide + } + enum Type { + Overlay, + Slide + } + enum SortOrder { + Ascending, + Descending + } + class Draggable extends ej.Widget { + static fn: Draggable; + constructor(element: JQuery | Element, options?: Draggable.Model); + static Locale: any; + model: Draggable.Model; + defaults: Draggable.Model; + + /** destroy in the draggable. + * @returns {void} + */ + _destroy(): void; + } + export namespace Draggable { + + export interface Model { + + /** If clone is specified. + * @Default {false} + */ + clone?: boolean; + + /** Sets the offset of the dragging helper relative to the mouse cursor. + * @Default {{ top: -1, left: -2 }} + */ + cursorAt?: any; + + /** Distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element. + * @Default {1} + */ + distance?: number; + + /** The drag area is used to restrict the dragging element bounds.Specify the id of the container within which the element should be dragged. + * @Default {null} + */ + dragArea?: boolean; + + /** If specified, restricts drag start click to the specified element(s). + * @Default {null} + */ + handle?: string; + + /** Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the + * droppable. + * @Default {'default'} + */ + scope?: string; + + /** This event is triggered when dragging element is destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** This event is triggered when the mouse is moved during the dragging. + */ + drag?(e: DragEventArgs): void; + + /** Supply a callback function to handle the drag start event as an init option. + */ + dragStart?(e: DragStartEventArgs): void; + + /** This event is triggered when the mouse is moved during the dragging. + */ + dragStop?(e: DragStopEventArgs): void; + + /** This event is triggered when dragged. + */ + helper?(e: HelperEventArgs): void; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Draggable.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DragEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the draggable model + */ + model?: ej.Draggable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event model values + */ + event?: any; + + /** returns the exact mouse down target element + */ + target?: any; + } + + export interface DragStartEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the draggable model + */ + model?: ej.Draggable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event model values + */ + event?: any; + + /** returns the exact mouse down target element + */ + target?: any; + } + + export interface DragStopEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the draggable model + */ + model?: ej.Draggable.Model; + + /** returns the name of the event + */ + type?: string; - /** returns the draggable model - */ - model?: ej.Draggable.Model; + /** returns the event model values + */ + event?: any; - /** returns the name of the event - */ - type?: string; + /** returns the exact mouse down target element + */ + target?: any; + } - /** returns the event model values - */ - event?: any; + export interface HelperEventArgs { - /** returns the exact mouse down target element - */ - target?: any; - } + /** returns the draggable element object + */ + element?: any; - export interface DragStopEventArgs { + /** returns the event model values + */ + sender?: any; + } + } + + class Droppable extends ej.Widget { + static fn: Droppable; + constructor(element: JQuery | Element, options?: Droppable.Model); + static Locale: any; + model: Droppable.Model; + defaults: Droppable.Model; + + /** destroy in the Droppable. + * @returns {void} + */ + _destroy(): void; + } + export namespace Droppable { + + export interface Model { + + /** Used to accept the specified draggable items. + * @Default {null} + */ + accept?: any; + + /** Used to group sets of droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable. + * @Default {'default'} + */ + scope?: string; + + /** This event is triggered when the mouse up is moved during the dragging. + */ + drop?(e: DropEventArgs): void; + + /** This event is triggered when the mouse is moved out. + */ + out?(e: OutEventArgs): void; + + /** This event is triggered when the mouse is moved over. + */ + over?(e: OverEventArgs): void; + } + + export interface DropEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Droppable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the element which accepts the droppable element. + */ + target?: any; + } + + export interface OutEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Droppable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mouse out over the element + */ + target?: any; + } + + export interface OverEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Droppable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mouse over the element + */ + target?: any; + } + } + + class Resizable extends ej.Widget { + static fn: Resizable; + constructor(element: JQuery | Element, options?: Resizable.Model); + static Locale: any; + model: Resizable.Model; + defaults: Resizable.Model; + + /** destroy in the Resizable. + * @returns {void} + */ + _destroy(): void; + } + export namespace Resizable { + + export interface Model { + + /** Sets the offset of the resizing helper relative to the mouse cursor. + * @Default {{ top: -1, left: -2 }} + */ + cursorAt?: any; + + /** Distance in pixels after mousedown the mouse must move before resizing should start. This option can be used to prevent unwanted drags when clicking on an element. + * @Default {1} + */ + distance?: number; + + /** If specified, restricts resize start click to the specified element(s). + * @Default {null} + */ + handle?: string; + + /** Sets the max height for resizing + * @Default {null} + */ + maxHeight?: number; + + /** Sets the max width for resizing + * @Default {null} + */ + maxWidth?: number; + + /** Sets the min Height for resizing + * @Default {10} + */ + minHeight?: number; + + /** Sets the min Width for resizing + * @Default {10} + */ + minWidth?: number; + + /** Used to group sets of resizable items. + * @Default {'default'} + */ + scope?: string; + + /** This event is triggered when the widget destroys. + */ + destroy?(e: DestroyEventArgs): void; + + /** This event is triggered when resized. + */ + helper?(e: HelperEventArgs): void; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Resizable.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface HelperEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Resizable.Model; + + /** returns the name of the event + */ + type?: string; + } + } + + const globalize: globalize; + const cultures: culture; + function addCulture(name: string, culture?: any): void; + function preferredCulture(culture?: string): culture; + function format(value: any, format: string, culture?: string): string; + function parseInt(value: string, radix?: any, culture?: string): number; + function parseFloat(value: string, radix?: any, culture?: string): number; + function parseDate(value: string, format: string, culture?: string): Date; + function getLocalizedConstants(controlName: string, culture?: string): any; + + interface globalize { + addCulture(name: string, culture?: any): void; + preferredCulture(culture?: string): culture; + format(value: any, format: string, culture?: string): string; + parseInt(value: string, radix?: any, culture?: string): number; + parseFloat(value: string, radix?: any, culture?: string): number; + parseDate(value: string, format: string, culture?: string): Date; + getLocalizedConstants(controlName: string, culture?: string): any; + } + interface culture { + name?: string; + englishName?: string; + namtiveName?: string; + language?: string; + isRTL: boolean; + numberFormat?: formatSettings; + calendars?: calendarsSettings; + } + interface formatSettings { + pattern: string[]; + decimals: number; + groupSizes: number[]; + percent: percentSettings; + currency: currencySettings; + } + interface percentSettings { + pattern: string[]; + decimals: number; + groupSizes: number[]; + symbol: string; + } + interface currencySettings { + pattern: string[]; + decimals: number; + groupSizes: number[]; + symbol: string; + } + interface calendarsSettings { + standard: standardSettings; + } + interface standardSettings { + firstDay: number; + days: daySettings; + months: monthSettings; + AM: string[]; + PM: string[]; + twoDigitYearMax: number; + patterns: patternSettings; + } + interface daySettings { + names: string[]; + namesAbbr: string[]; + namesShort: string[]; + } + interface monthSettings { + names: string[]; + namesAbbr: string[]; + } + interface patternSettings { + d: string; + D: string; + t: string; + T: string; + f: string; + F: string; + M: string; + Y: string; + S: string; + } + class Scroller extends ej.Widget { + static fn: Scroller; + constructor(element: JQuery | Element, options?: Scroller.Model); + static Locale: any; + model: Scroller.Model; + defaults: Scroller.Model; + + /** destroy the Scroller control, unbind the all ej control related events automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** User disables the Scroller control at any time. + * @returns {void} + */ + disable(): void; + + /** User enables the Scroller control at any time. + * @returns {void} + */ + enable(): void; + + /** Returns true if horizontal scrollbar is shown, else return false. + * @returns {boolean} + */ + isHScroll(): boolean; + + /** Returns true if vertical scrollbar is shown, else return false. + * @returns {boolean} + */ + isVScroll(): boolean; + + /** User refreshes the Scroller control at any time. + * @returns {void} + */ + refresh(): void; + + /** Horizontal scroller moves to given pixel from its origin position. We can also specify the animation speed,in which the scroller has to move while re-positioning it. + * @param {number|string} Horizontal scroller moves to the specified pixel. + * @param {boolean} Specifies to enable/disable the animation. + * @param {number} Specifies the animation speed when scrolling, if animation is enabled. + * @returns {void} + */ + scrollX(pixel: number|string, disableAnimation: boolean, animationSpeed: number): void; + + /** Vertical scroller moves to given pixel from its origin position. We can also specify the animation speed,in which the scroller has to move while re-positioning it. + * @param {number|string} Vertical scroller moves to the specified pixel. + * @param {boolean} Specifies to enable/disable the animation. + * @param {number} Specifies the animation speed when scrolling, if animation is enabled. + * @returns {void} + */ + scrollY(pixel: number|string, disableAnimation: boolean, animationSpeed: number): void; + } + export namespace Scroller { + + export interface Model { + + /** Specifies the swipe scrolling speed(in millisecond). + * @Default {600} + */ + animationSpeed?: number; + + /** Set true to hides the scrollbar, when mouseout the content area. + * @Default {false} + */ + autoHide?: boolean; + + /** Specifies the height and width of button in the scrollbar. + * @Default {18} + */ + buttonSize?: number; + + /** Specifies to enable or disable the scroller + * @Default {true} + */ + enabled?: boolean; + + /** Save current model value to browser cookies for state maintenance. While refresh the page Rating control values are retained. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Indicates the Right to Left direction to scroller + * @Default {undefined} + */ + enableRTL?: boolean; + + /** Enables or Disable the touch Scroll + * @Default {true} + */ + enableTouchScroll?: boolean; + + /** Specifies the height of Scroll panel and scrollbars. + * @Default {250} + */ + height?: number|string; + + /** If the scrollbar has vertical it set as width, else it will set as height of the handler. + * @Default {18} + */ + scrollerSize?: number; + + /** The Scroller content and scrollbars move left with given value. + * @Default {0} + */ + scrollLeft?: number; + + /** While press on the arrow key the scrollbar position added to the given pixel value. + * @Default {57} + */ + scrollOneStepBy?: number; + + /** The Scroller content and scrollbars move to top position with specified value. + * @Default {0} + */ + scrollTop?: number; + + /** Indicates the target area to which scroller have to appear. + * @Default {null} + */ + targetPane?: string; + + /** Specifies the width of Scroll panel and scrollbars. + * @Default {0} + */ + width?: number|string; + + /** Fires when Scroller control is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires when Scroller control is destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when a thumb point is moved along the touch surface. + */ + thumbMove?(e: ThumbMoveEventArgs): void; + + /** Fires when a thumb point is placed on the touch surface. + */ + thumbStart?(e: ThumbStartEventArgs): void; + + /** Fires when a thumb point is removed from the touch surface. + */ + thumbEnd?(e: ThumbEndEventArgs): void; + + /** It fires whenever the mouse wheel is rotated either in upwards or downwards. + */ + wheelMove?(e: WheelMoveEventArgs): void; + + /** It will fire when mouse trackball has been start to wheel. + */ + wheelStart?(e: WheelStartEventArgs): void; + + /** It will fire when mouse trackball has been stop to wheel. + */ + wheelStop?(e: WheelStopEventArgs): void; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the scroller model + */ + model?: ej.Scroller.Model; + + /** returns the name of the event. + */ + type?: string; + } + + export interface DestroyEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the scroller model + */ + model?: ej.Scroller.Model; - /** returns the draggable model - */ - model?: ej.Draggable.Model; + /** returns the name of the event. + */ + type?: string; + } - /** returns the name of the event - */ - type?: string; + export interface ThumbMoveEventArgs { - /** returns the event model values - */ - event?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the exact mouse down target element - */ - target?: any; - } + /** returns the scroller model + */ + model?: ej.Scroller.Model; - export interface HelperEventArgs { + /** returns the original event name and its event properties of the current event. + */ + originalEvent?: any; - /** returns the draggable element object - */ - element?: any; + /** returns the current data related to the event. + */ + scrollData?: any; - /** returns the event model values - */ - sender?: any; - } - } + /** returns the name of the event. + */ + type?: string; + } - class Droppable extends ej.Widget { - static fn: Droppable; - constructor(element: JQuery | Element, options?: Droppable.Model); - static Locale: any; - model: Droppable.Model; - defaults: Droppable.Model; - - /** destroy in the Droppable. - * @returns {void} - */ - _destroy(): void; - } - export namespace Droppable { - - export interface Model { - - /** Used to accept the specified draggable items. - * @Default {null} - */ - accept?: any; - - /** Used to group sets of droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable. - * @Default {'default'} - */ - scope?: string; - - /** This event is triggered when the mouse up is moved during the dragging. */ - drop?(e: DropEventArgs): void; - - /** This event is triggered when the mouse is moved out. */ - out?(e: OutEventArgs): void; - - /** This event is triggered when the mouse is moved over. */ - over?(e: OverEventArgs): void; - } - - export interface DropEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the autocomplete model - */ - model?: ej.Droppable.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the element which accepts the droppable element. - */ - targetElement?: any; - } - - export interface OutEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the autocomplete model - */ - model?: ej.Droppable.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the mouse out over the element - */ - targetElement?: any; - } - - export interface OverEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the autocomplete model - */ - model?: ej.Droppable.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the mouse over the element - */ - targetElement?: any; - } - } - - class Resizable extends ej.Widget { - static fn: Resizable; - constructor(element: JQuery | Element, options?: Resizable.Model); - static Locale: any; - model: Resizable.Model; - defaults: Resizable.Model; - - /** destroy in the Resizable. - * @returns {void} - */ - _destroy(): void; - } - export namespace Resizable { - - export interface Model { - - /** Sets the offset of the resizing helper relative to the mouse cursor. - * @Default {{ top: -1, left: -2 }} - */ - cursorAt?: any; - - /** Distance in pixels after mousedown the mouse must move before resizing should start. This option can be used to prevent unwanted drags when clicking on an element. - * @Default {1} - */ - distance?: number; - - /** If specified, restricts resize start click to the specified element(s). - * @Default {null} - */ - handle?: string; - - /** Sets the max height for resizing - * @Default {null} - */ - maxHeight?: number; - - /** Sets the max width for resizing - * @Default {null} - */ - maxWidth?: number; - - /** Sets the min Height for resizing - * @Default {10} - */ - minHeight?: number; - - /** Sets the min Width for resizing - * @Default {10} - */ - minWidth?: number; - - /** Used to group sets of resizable items. - * @Default {'default'} - */ - scope?: string; - - /** This event is triggered when the widget destroys. */ - destroy?(e: DestroyEventArgs): void; - - /** This event is triggered when resized. */ - helper?(e: HelperEventArgs): void; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the autocomplete model - */ - model?: ej.Resizable.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface HelperEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the autocomplete model - */ - model?: ej.Resizable.Model; - - /** returns the name of the event - */ - type?: string; - } - } - - - const globalize: globalize; - const cultures: culture; - function addCulture(name: string, culture?: any): void; - function preferredCulture(culture?: string): culture; - function format(value: any, format: string, culture?: string): string; - function parseInt(value: string, radix?: any, culture?: string): number; - function parseFloat(value: string, radix?: any, culture?: string): number; - function parseDate(value: string, format: string, culture?: string): Date; - function getLocalizedConstants(controlName: string, culture?: string): any; - - interface globalize { - addCulture(name: string, culture?: any): void; - preferredCulture(culture?: string): culture; - format(value: any, format: string, culture?: string): string; - parseInt(value: string, radix?: any, culture?: string): number; - parseFloat(value: string, radix?: any, culture?: string): number; - parseDate(value: string, format: string, culture?: string): Date; - getLocalizedConstants(controlName: string, culture?: string): any; - } - interface culture { - name?: string; - englishName?: string; - namtiveName?: string; - language?: string; - isRTL: boolean; - numberFormat?: formatSettings; - calendars?: calendarsSettings; - } - interface formatSettings { - pattern: string[]; - decimals: number; - groupSizes: number[]; - percent: percentSettings; - currency: currencySettings; - } - interface percentSettings { - pattern: string[]; - decimals: number; - groupSizes: number[]; - symbol: string; - } - interface currencySettings { - pattern: string[]; - decimals: number; - groupSizes: number[]; - symbol: string; - } - interface calendarsSettings { - standard: standardSettings; - } - interface standardSettings { - firstDay: number; - days: daySettings; - months: monthSettings; - AM: string[]; - PM: string[]; - twoDigitYearMax: number; - patterns: patternSettings; - } - interface daySettings { - names: string[]; - namesAbbr: string[]; - namesShort: string[]; - } - interface monthSettings { - names: string[]; - namesAbbr: string[]; - } - interface patternSettings { - d: string; - D: string; - t: string; - T: string; - f: string; - F: string; - M: string; - Y: string; - S: string; - } - class Scroller extends ej.Widget { - static fn: Scroller; - constructor(element: JQuery | Element, options?: Scroller.Model); - static Locale: any; - model: Scroller.Model; - defaults: Scroller.Model; - - /** destroy the Scroller control, unbind the all ej control related events automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** User disables the Scroller control at any time. - * @returns {void} - */ - disable(): void; - - /** User enables the Scroller control at any time. - * @returns {void} - */ - enable(): void; - - /** Returns true if horizontal scrollbar is shown, else return false. - * @returns {boolean} - */ - isHScroll(): boolean; - - /** Returns true if vertical scrollbar is shown, else return false. - * @returns {boolean} - */ - isVScroll(): boolean; - - /** User refreshes the Scroller control at any time. - * @returns {void} - */ - refresh(): void; - - /** Horizontal scroller moves to given pixel from its origin position. We can also specify the animation speed,in which the scroller has to move while re-positioning it. - * @param {number|string} Horizontal scroller moves to the specified pixel. - * @param {boolean} Specifies to enable/disable the animation. - * @param {number} Specifies the animation speed when scrolling, if animation is enabled. - * @returns {void} - */ - scrollX(pixel: number | string, disableAnimation: boolean, animationSpeed: number): void; - - /** Vertical scroller moves to given pixel from its origin position. We can also specify the animation speed,in which the scroller has to move while re-positioning it. - * @param {number|string} Vertical scroller moves to the specified pixel. - * @param {boolean} Specifies to enable/disable the animation. - * @param {number} Specifies the animation speed when scrolling, if animation is enabled. - * @returns {void} - */ - scrollY(pixel: number | string, disableAnimation: boolean, animationSpeed: number): void; - } - export namespace Scroller { - - export interface Model { - - /** Specifies the swipe scrolling speed(in millisecond). - * @Default {600} - */ - animationSpeed?: number; - - /** Set true to hides the scrollbar, when mouseout the content area. - * @Default {false} - */ - autoHide?: boolean; - - /** Specifies the height and width of button in the scrollbar. - * @Default {18} - */ - buttonSize?: number; - - /** Specifies to enable or disable the scroller - * @Default {true} - */ - enabled?: boolean; - - /** Save current model value to browser cookies for state maintenance. While refresh the page Rating control values are retained. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Indicates the Right to Left direction to scroller - * @Default {undefined} - */ - enableRTL?: boolean; - - /** Enables or Disable the touch Scroll - * @Default {true} - */ - enableTouchScroll?: boolean; - - /** Specifies the height of Scroll panel and scrollbars. - * @Default {250} - */ - height?: number | string; - - /** If the scrollbar has vertical it set as width, else it will set as height of the handler. - * @Default {18} - */ - scrollerSize?: number; - - /** The Scroller content and scrollbars move left with given value. - * @Default {0} - */ - scrollLeft?: number; - - /** While press on the arrow key the scrollbar position added to the given pixel value. - * @Default {57} - */ - scrollOneStepBy?: number; - - /** The Scroller content and scrollbars move to top position with specified value. - * @Default {0} - */ - scrollTop?: number; - - /** Indicates the target area to which scroller have to appear. - * @Default {null} - */ - targetPane?: string; - - /** Specifies the width of Scroll panel and scrollbars. - * @Default {0} - */ - width?: number | string; - - /** Fires when Scroller control is created. */ - create?(e: CreateEventArgs): void; - - /** Fires when Scroller control is destroyed. */ - destroy?(e: DestroyEventArgs): void; - - /** Fires when a thumb point is moved along the touch surface. */ - thumbMove?(e: ThumbMoveEventArgs): void; - - /** Fires when a thumb point is placed on the touch surface. */ - thumbStart?(e: ThumbStartEventArgs): void; - - /** Fires when a thumb point is removed from the touch surface. */ - thumbEnd?(e: ThumbEndEventArgs): void; - - /** It fires whenever the mouse wheel is rotated either in upwards or downwards. */ - wheelMove?(e: WheelMoveEventArgs): void; - - /** It will fire when mouse trackball has been start to wheel. */ - wheelStart?(e: WheelStartEventArgs): void; - - /** It will fire when mouse trackball has been stop to wheel. */ - wheelStop?(e: WheelStopEventArgs): void; - } + export interface ThumbStartEventArgs { - export interface CreateEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the scroller model + */ + model?: ej.Scroller.Model; - /** returns the scroller model - */ - model?: ej.Scroller.Model; + /** returns the original event name and its event properties of the current event. + */ + originalEvent?: any; - /** returns the name of the event. - */ - type?: string; - } + /** returns the current data related to the event. + */ + scrollData?: any; - export interface DestroyEventArgs { + /** returns the name of the event. + */ + type?: string; + } + + export interface ThumbEndEventArgs { - /** returns the scroller model - */ - model?: ej.Scroller.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the scroller model + */ + model?: ej.Scroller.Model; + + /** returns the original event name and its event properties of the current event. + */ + originalEvent?: any; + + /** returns the current data related to the event. + */ + scrollData?: any; + + /** returns the name of the event. + */ + type?: string; + } + + export interface WheelMoveEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the scroller model + */ + model?: ej.Scroller.Model; + + /** returns the original event name and its event properties of the current event. + */ + originalEvent?: any; + } + + export interface WheelStartEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the scroller model + */ + model?: ej.Scroller.Model; + + /** returns the original event name and its event properties of the current event. + */ + originalEvent?: any; + + /** returns the current data related to the event. + */ + scrollData?: any; + + /** returns the name of the event. + */ + type?: string; + } + + export interface WheelStopEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the scroller model + */ + model?: ej.Scroller.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the original event name and its event properties of the current event. + */ + originalEvent?: any; + } + } + + class Accordion extends ej.Widget { + static fn: Accordion; + constructor(element: JQuery | Element, options?: Accordion.Model); + static Locale: any; + model: Accordion.Model; + defaults: Accordion.Model; + + /** AddItem method is used to add the panel in dynamically. It receives the following parameters + * @param {string} specify the name of the header + * @param {string} content of the new panel + * @param {number} insertion place of the new panel + * @param {boolean} Enable or disable the AJAX request to the added panel + * @returns {void} + */ + addItem(header_name: string, content: string, index: number, isAjaxReq: boolean): void; + + /** This method used to collapse the all the expanded items in accordion at a time. + * @returns {void} + */ + collapseAll(): void; + + /** This method used to Collapses the specified items in accordion at a time. + * @returns {void} + */ + collapsePanel(): void; + + /** destroy the Accordion widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Disables the accordion widget includes all the headers and content panels. + * @returns {void} + */ + disable(): void; + + /** Disable the accordion widget item based on specified header index. + * @param {any[]} index values to disable the panels + * @returns {void} + */ + disableItems(index: any[]): void; + + /** Enable the accordion widget includes all the headers and content panels. + * @returns {void} + */ + enable(): void; + + /** Enable the accordion widget item based on specified header index. + * @param {any[]} index values to enable the panels + * @returns {void} + */ + enableItems(index: any[]): void; + + /** To expand all the accordion widget items. + * @returns {void} + */ + expandAll(): void; + + /** This method used to Expand the specified items in accordion at a time. + * @returns {void} + */ + expandPanel(): void; + + /** Returns the total number of panels in the control. + * @returns {number} + */ + getItemsCount(): number; + + /** Hides the visible Accordion control. + * @returns {void} + */ + hide(): void; + + /** The refresh method is used to adjust the control size based on the parent element dimension. + * @returns {void} + */ + refresh(): void; + + /** RemoveItem method is used to remove the specified index panel.It receives the parameter as number. + * @param {number} specify the index value for remove the accordion panel. + * @returns {void} + */ + removeItem(index: number): void; + + /** Shows the hidden Accordion control. + * @returns {void} + */ + show(): void; + } + export namespace Accordion { + + export interface Model { + + /** Specifies the ajaxSettings option to load the content to the accordion control. + * @Default {null} + */ + ajaxSettings?: AjaxSettings; + + /** Accordion headers can be expanded and collapsed on keyboard action. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** To set the Accordion headers Collapse Speed. + * @Default {300} + */ + collapseSpeed?: number; + + /** Specifies the collapsible state of accordion control. + * @Default {false} + */ + collapsible?: boolean; + + /** Sets the root CSS class for Accordion theme, which is used customize. + */ + cssClass?: string; + + /** Allows you to set the custom header Icon. It accepts two key values “header”, ”selectedHeader”. + * @Default {{ header: e-collapse, selectedHeader: e-expand }} + */ + customIcon?: CustomIcon; + + /** Disables the specified indexed items in accordion. + * @Default {[]} + */ + disabledItems?: number[]; + + /** Specifies the animation behavior in accordion. + * @Default {true} + */ + enableAnimation?: boolean; + + /** With this enabled property, you can enable or disable the Accordion. + * @Default {true} + */ + enabled?: boolean; + + /** Used to enable the disabled items in accordion. + * @Default {[]} + */ + enabledItems?: number[]; + + /** Multiple content panels to activate at a time. + * @Default {false} + */ + enableMultipleOpen?: boolean; + + /** Save current model value to browser cookies for maintaining states. When refreshing the accordion control page, the model value is applied from browser cookies or HTML 5local + * storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Display headers and panel text from right-to-left. + * @Default {false} + */ + enableRTL?: boolean; + + /** The events API binds the action for activating the accordion header. Users can activate the header by using mouse actions such as mouse-over, mouse-up, mouse-down, and soon. + * @Default {click} + */ + events?: string; + + /** To set the Accordion headers Expand Speed. + * @Default {300} + */ + expandSpeed?: number; + + /** Sets the height for Accordion items header. + */ + headerSize?: number|string; + + /** Specifies height of the accordion. + * @Default {null} + */ + height?: number|string; + + /** Adjusts the content panel height based on the given option (content, auto, or fill). By default, the panel heights are adjusted based on the content. + * @Default {content} + */ + heightAdjustMode?: ej.Accordion.HeightAdjustMode|string; + + /** It allows to define the characteristics of the Accordion control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /** The given index header will activate (open). If collapsible is set to true, and a negative value is given, then all headers are collapsed. Otherwise, the first panel isactivated. + * @Default {0} + */ + selectedItemIndex?: number; + + /** Activate the specified indexed items of the accordion + * @Default {[0]} + */ + selectedItems?: number[]; + + /** Used to determines the close button visibility an each accordion items. This close button helps to remove the accordion item from the control. + * @Default {false} + */ + showCloseButton?: boolean; + + /** Displays rounded corner borders on the Accordion control's panels and headers. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies width of the accordion. + * @Default {null} + */ + width?: number|string; + + /** Triggered after a Accordion item is active . Argument values are activeIndex, activeHeader, isInteraction and current model values. + */ + activate?(e: ActivateEventArgs): void; + + /** Triggered before the AJAX content is loaded in a content panel. Arguments have location of the content (URL) and current model value. + */ + ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; + + /** Triggered after AJAX load failed action. Arguments have URL, error message, and current model value. + */ + ajaxError?(e: AjaxErrorEventArgs): void; + + /** Triggered after the AJAX content loads. Arguments have current model values. + */ + ajaxLoad?(e: AjaxLoadEventArgs): void; + + /** Triggered after AJAX success action. Arguments have URL, content, and current model values. + */ + ajaxSuccess?(e: AjaxSuccessEventArgs): void; + + /** Triggered before a tab item is active. Arguments have active index and model values. + */ + beforeActivate?(e: BeforeActivateEventArgs): void; + + /** Triggered before a Accordion item is inactive. Argument values are inActiveIndex and model values. + */ + beforeInactivate?(e: BeforeInactivateEventArgs): void; + + /** Triggered after Accordion control creation. + */ + create?(e: CreateEventArgs): void; + + /** Triggered after Accordion control destroy. + */ + destroy?(e: DestroyEventArgs): void; + + /** Triggered after a Accordion item is inactive. Argument values are inActiveHeader, inActiveIndex ,isInteraction and current model values. + */ + inActivate?(e: InActivateEventArgs): void; + } + + export interface ActivateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** returns the name of the event. - */ - type?: string; - } + /** returns the name of the event + */ + type?: string; + + /** returns active index + */ + activeIndex?: number; - export interface ThumbMoveEventArgs { + /** returns current active header + */ + activeHeader?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction?: boolean; + } - /** returns the scroller model - */ - model?: ej.Scroller.Model; + export interface AjaxBeforeLoadEventArgs { - /** returns the original event name and its event properties of the current event. - */ - originalEvent?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the current data related to the event. - */ - scrollData?: any; + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** returns the name of the event. - */ - type?: string; - } + /** returns the name of the event + */ + type?: string; - export interface ThumbStartEventArgs { + /** returns current AJAX content location + */ + URL?: string; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface AjaxErrorEventArgs { - /** returns the scroller model - */ - model?: ej.Scroller.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the original event name and its event properties of the current event. - */ - originalEvent?: any; + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** returns the current data related to the event. - */ - scrollData?: any; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event. - */ - type?: string; - } + /** returns current AJAX content location + */ + URL?: string; - export interface ThumbEndEventArgs { + /** returns the failed data sent. + */ + data?: string; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface AjaxLoadEventArgs { - /** returns the scroller model - */ - model?: ej.Scroller.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the original event name and its event properties of the current event. - */ - originalEvent?: any; + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** returns the current data related to the event. - */ - scrollData?: any; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event. - */ - type?: string; - } - - export interface WheelMoveEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the scroller model - */ - model?: ej.Scroller.Model; - - /** returns the original event name and its event properties of the current event. - */ - originalEvent?: any; - } - - export interface WheelStartEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the scroller model - */ - model?: ej.Scroller.Model; - - /** returns the original event name and its event properties of the current event. - */ - originalEvent?: any; - - /** returns the current data related to the event. - */ - scrollData?: any; - - /** returns the name of the event. - */ - type?: string; - } - - export interface WheelStopEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the scroller model - */ - model?: ej.Scroller.Model; - - /** returns the name of the event. - */ - type?: string; - - /** returns the original event name and its event properties of the current event. - */ - originalEvent?: any; - } - } - - class Accordion extends ej.Widget { - static fn: Accordion; - constructor(element: JQuery | Element, options?: Accordion.Model); - static Locale: any; - model: Accordion.Model; - defaults: Accordion.Model; - - /** AddItem method is used to add the panel in dynamically. It receives the following parameters - * @param {string} specify the name of the header - * @param {string} content of the new panel - * @param {number} insertion place of the new panel - * @param {boolean} Enable or disable the AJAX request to the added panel - * @returns {void} - */ - addItem(header_name: string, content: string, index: number, isAjaxReq: boolean): void; - - /** This method used to collapse the all the expanded items in accordion at a time. - * @returns {void} - */ - collapseAll(): void; - - /** This method used to Collapses the specified items in accordion at a time. - * @returns {void} - */ - collapsePanel(): void; - - /** destroy the Accordion widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** Disables the accordion widget includes all the headers and content panels. - * @returns {void} - */ - disable(): void; - - /** Disable the accordion widget item based on specified header index. - * @param {Array} index values to disable the panels - * @returns {void} - */ - disableItems(index: any[]): void; - - /** Enable the accordion widget includes all the headers and content panels. - * @returns {void} - */ - enable(): void; - - /** Enable the accordion widget item based on specified header index. - * @param {Array} index values to enable the panels - * @returns {void} - */ - enableItems(index: any[]): void; - - /** To expand all the accordion widget items. - * @returns {void} - */ - expandAll(): void; - - /** This method used to Expand the specified items in accordion at a time. - * @returns {void} - */ - expandPanel(): void; - - /** Returns the total number of panels in the control. - * @returns {number} - */ - getItemsCount(): number; - - /** Hides the visible Accordion control. - * @returns {void} - */ - hide(): void; - - /** The refresh method is used to adjust the control size based on the parent element dimension. - * @returns {void} - */ - refresh(): void; - - /** RemoveItem method is used to remove the specified index panel.It receives the parameter as number. - * @param {number} specify the index value for remove the accordion panel. - * @returns {void} - */ - removeItem(index: number): void; - - /** Shows the hidden Accordion control. - * @returns {void} - */ - show(): void; - } - export namespace Accordion { - - export interface Model { - - /** Specifies the ajaxSettings option to load the content to the accordion control. - * @Default {null} - */ - ajaxSettings?: AjaxSettings; - - /** Accordion headers can be expanded and collapsed on keyboard action. - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** To set the Accordion headers Collapse Speed. - * @Default {300} - */ - collapseSpeed?: number; - - /** Specifies the collapsible state of accordion control. - * @Default {false} - */ - collapsible?: boolean; - - /** Sets the root CSS class for Accordion theme, which is used customize. - */ - cssClass?: string; - - /** Allows you to set the custom header Icon. It accepts two key values “header”, ”selectedHeader”. - * @Default {{ header: e-collapse, selectedHeader: e-expand }} - */ - customIcon?: CustomIcon; - - /** Disables the specified indexed items in accordion. - * @Default {[]} - */ - disabledItems?: number[]; - - /** Specifies the animation behavior in accordion. - * @Default {true} - */ - enableAnimation?: boolean; - - /** With this enabled property, you can enable or disable the Accordion. - * @Default {true} - */ - enabled?: boolean; - - /** Used to enable the disabled items in accordion. - * @Default {[]} - */ - enabledItems?: number[]; - - /** Multiple content panels to activate at a time. - * @Default {false} - */ - enableMultipleOpen?: boolean; - - /** Save current model value to browser cookies for maintaining states. When refreshing the accordion control page, the model value is applied from browser cookies or HTML 5local storage. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Display headers and panel text from right-to-left. - * @Default {false} - */ - enableRTL?: boolean; - - /** The events API binds the action for activating the accordion header. Users can activate the header by using mouse actions such as mouse-over, mouse-up, mouse-down, and soon. - * @Default {click} - */ - events?: string; - - /** To set the Accordion headers Expand Speed. - * @Default {300} - */ - expandSpeed?: number; - - /** Sets the height for Accordion items header. - */ - headerSize?: number | string; - - /** Specifies height of the accordion. - * @Default {null} - */ - height?: number | string; - - /** Adjusts the content panel height based on the given option (content, auto, or fill). By default, the panel heights are adjusted based on the content. - * @Default {content} - */ - heightAdjustMode?: ej.Accordion.HeightAdjustMode | string; - - /** It allows to define the characteristics of the Accordion control. It will helps to extend the capability of an HTML element. - * @Default {{}} - */ - htmlAttributes?: any; - - /** The given index header will activate (open). If collapsible is set to true, and a negative value is given, then all headers are collapsed. Otherwise, the first panel isactivated. - * @Default {0} - */ - selectedItemIndex?: number; - - /** Activate the specified indexed items of the accordion - * @Default {[0]} - */ - selectedItems?: number[]; - - /** Used to determines the close button visibility an each accordion items. This close button helps to remove the accordion item from the control. - * @Default {false} - */ - showCloseButton?: boolean; - - /** Displays rounded corner borders on the Accordion control's panels and headers. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specifies width of the accordion. - * @Default {null} - */ - width?: number | string; - - /** Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value. */ - activate?(e: ActivateEventArgs): void; - - /** Triggered before the AJAX content is loaded in a content panel. Arguments have location of the content (URL) and current model value. */ - ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; + /** returns the name of the URL + */ + URL?: string; + } - /** Triggered after AJAX load failed action. Arguments have URL, error message, and current model value. */ - ajaxError?(e: AjaxErrorEventArgs): void; - - /** Triggered after the AJAX content loads. Arguments have current model values. */ - ajaxLoad?(e: AjaxLoadEventArgs): void; - - /** Triggered after AJAX success action. Arguments have URL, content, and current model values. */ - ajaxSuccess?(e: AjaxSuccessEventArgs): void; + export interface AjaxSuccessEventArgs { - /** Triggered before a tab item is active. Arguments have active index and model values. */ - beforeActivate?(e: BeforeActivateEventArgs): void; - - /** Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value. */ - beforeInactivate?(e: BeforeInactivateEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggered after Accordion control creation. */ - create?(e: CreateEventArgs): void; + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** Triggered after Accordion control destroy. */ - destroy?(e: DestroyEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value. */ - inActivate?(e: InActivateEventArgs): void; - } + /** returns current AJAX content location + */ + URL?: string; - export interface ActivateEventArgs { + /** returns the successful data sent. + */ + data?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the AJAX content. + */ + content?: string; + } - /** returns the accordion model - */ - model?: ej.Accordion.Model; + export interface BeforeActivateEventArgs { - /** returns the name of the event - */ - type?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns active index - */ - activeIndex?: number; + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** returns current active header - */ - activeHeader?: any; + /** returns the name of the event + */ + type?: string; - /** returns true when the Accordion index activated by user interaction otherwise returns false - */ - isInteraction?: boolean; - } + /** returns active index + */ + activeIndex?: number; - export interface AjaxBeforeLoadEventArgs { + /** returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction?: boolean; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface BeforeInactivateEventArgs { - /** returns the accordion model - */ - model?: ej.Accordion.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** returns current AJAX content location - */ - URL?: string; - } + /** returns the name of the event + */ + type?: string; - export interface AjaxErrorEventArgs { + /** returns active index + */ + inActiveIndex?: number; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction?: boolean; + } - /** returns the accordion model - */ - model?: ej.Accordion.Model; + export interface CreateEventArgs { - /** returns the name of the event - */ - type?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns current AJAX content location - */ - URL?: string; + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** returns the failed data sent. - */ - data?: string; - } + /** returns the name of the event + */ + type?: string; + } - export interface AjaxLoadEventArgs { + export interface DestroyEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the accordion model - */ - model?: ej.Accordion.Model; + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** returns the name of the event - */ - type?: string; + /** returns the name of the event + */ + type?: string; + } - /** returns the name of the URL - */ - URL?: string; - } + export interface InActivateEventArgs { - export interface AjaxSuccessEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the accordion model + */ + model?: ej.Accordion.Model; - /** returns the accordion model - */ - model?: ej.Accordion.Model; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** returns active index + */ + inActiveIndex?: number; - /** returns current AJAX content location - */ - URL?: string; + /** returns in active element + */ + inActiveHeader?: any; - /** returns the successful data sent. - */ - data?: string; + /** returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction?: boolean; + } - /** returns the AJAX content. - */ - content?: string; - } + export interface AjaxSettings { - export interface BeforeActivateEventArgs { + /** It specifies, whether to enable or disable asynchronous request. + */ + async?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** It specifies the page will be cached in the web browser. + */ + cache?: boolean; - /** returns the accordion model - */ - model?: ej.Accordion.Model; + /** It specifies the type of data is send in the query string. + */ + contentType?: string; + + /** It specifies the data as an object, will be passed in the query string. + */ + data?: any; + + /** It specifies the type of data that you're expecting back from the response. + */ + dataType?: string; + + /** It specifies the HTTP request type. + */ + type?: string; + } + + export interface CustomIcon { + + /** This class name set to collapsing header. + */ + header?: string; + + /** This class name set to expanded (active) header. + */ + selectedHeader?: string; + } + + enum HeightAdjustMode { + + ///Height fit to the content in the panel + Content, + + ///Height set to the largest content in the panel + Auto, + + ///Height filled to the content of the panel + Fill + } + + } + + class Autocomplete extends ej.Widget { + static fn: Autocomplete; + constructor(element: JQuery | Element, options?: Autocomplete.Model); + static Locale: any; + model: Autocomplete.Model; + defaults: Autocomplete.Model; + + /** Clears the text in the Autocomplete textbox. + * @returns {void} + */ + clearText(): void; + + /** Destroys the Autocomplete widget. + * @returns {void} + */ + destroy(): void; + + /** Disables the autocomplete widget. + * @returns {void} + */ + disable(): void; + + /** Enables the autocomplete widget. + * @returns {void} + */ + enable(): void; + + /** Returns objects (data object) of all the selected items in the autocomplete textbox. + * @returns {any} + */ + getSelectedItems(): any; + + /** Returns the current selected value from the Autocomplete textbox. + * @returns {string} + */ + getValue(): string; + + /** Returns the current active text value in the Autocomplete suggestion list. + * @returns {string} + */ + getActiveText(): string; + + /** Search the entered text and show it in the suggestion list if available. + * @returns {void} + */ + search(): void; + + /** Open up the autocomplete suggestion popup with all list items. + * @returns {void} + */ + open(): void; + + /** Sets the value of the Autocomplete textbox based on the given key value. + * @param {string} The key value of the specific suggestion item. + * @returns {void} + */ + selectValueByKey(Key: string): void; + + /** Sets the value of the Autocomplete textbox based on the given input text value. + * @param {string} The text (label) value of the specific suggestion item. + * @returns {void} + */ + selectValueByText(Text: string): void; + } + export namespace Autocomplete { + + export interface Model { + + /** Customize "Add New" text (label) to be added in the autocomplete popup list for the entered text when there are no suggestions for it. + * @Default {Add New} + */ + addNewText?: string; + + /** Allows new values to be added to the autocomplete input other than the values in the suggestion list. Normally, when there are no suggestions it will display “No suggestions” + * label in the popup. + * @Default {false} + */ + allowAddNew?: boolean; + + /** Enables or disables the sorting of suggestion list item. The default sort order is ascending order. You customize sort order. + * @Default {true} + */ + allowSorting?: boolean; + + /** Enables or disables selecting the animation style for the popup list. Animation types can be selected through either of the following options, + * @Default {slide} + */ + animateType?: ej.Autocomplete.Animation|string; + + /** To focus the items in the suggestion list when the popup is shown. By default first item will be focused. + * @Default {false} + */ + autoFocus?: boolean; + + /** Enables or disables the case sensitive search. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /** The root class for the Autocomplete textbox widget which helps in customizing its theme. + * @Default {””} + */ + cssClass?: string; + + /** The data source contains the list of data for the suggestions list. It can be a string array or JSON array or service URL that returns JSON. + * @Default {null} + */ + dataSource?: any|any[]; + + /** The time delay (in milliseconds) after which the suggestion popup will be shown. + * @Default {200} + */ + delaySuggestionTimeout?: number; + + /** The special character which acts as a separator for the given words for multi-mode search i.e. the text after the delimiter are considered as a separate word or query for search + * operation. + * @Default {’,’} + */ + delimiterChar?: string; + + /** The text to be displayed in the popup when there are no suggestions available for the entered text. + * @Default {“No suggestions”} + */ + emptyResultText?: string; + + /** Fills the autocomplete textbox with the first matched item from the suggestion list automatically based on the entered text when enabled. + * @Default {false} + */ + enableAutoFill?: boolean; + + /** Enables or disables the Autocomplete textbox widget. + * @Default {true} + */ + enabled?: boolean; + + /** Enables or disables displaying the duplicate names present in the search result. + * @Default {false} + */ + enableDistinct?: boolean; + + /** Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. While refreshing the page, it retains the model value + * from browser cookies or local storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Displays the Autocomplete widget’s content from right to left when enabled. + * @Default {false} + */ + enableRTL?: boolean; + + /** Mapping fields for the suggestion items of the Autocomplete textbox widget. + * @Default {null} + */ + fields?: Fields; + + /** Specifies the search filter type. There are several types of search filter available such as ‘startswith’, ‘contains’, ‘endswith’, ‘lessthan’, + * ‘lessthanorequal’, ‘greaterthan’, ‘greaterthanorequal’, ‘equal’, ‘notequal’. + * @Default {ej.filterType.StartsWith} + */ + filterType?: string; + + /** The height of the Autocomplete textbox. + * @Default {null} + */ + height?: string|number; + + /** The search text can be highlighted in the AutoComplete suggestion list when enabled. + * @Default {false} + */ + highlightSearch?: boolean; + + /** Number of items to be displayed in the suggestion list. + * @Default {0} + */ + itemsCount?: number; + + /** Set the localization culture for Autocomplete Widget. + */ + locale?: string; + + /** Minimum number of character to be entered in the Autocomplete textbox to show the suggestion list. + * @Default {1} + */ + minCharacter?: number; + + /** An Autocomplete column collection can be defined and customized through the multiColumnSettings property.Column's header, field, and stringFormat can be define via + * multiColumnSettings properties. + */ + multiColumnSettings?: MultiColumnSettings; + + /** Enables or disables selecting multiple values from the suggestion list. Multiple values can be selected through either of the following options, + * @Default {ej.MultiSelectMode.None} + */ + multiSelectMode?: ej.Autocomplete.MultiSelectMode|string; + + /** The height of the suggestion list. + * @Default {“152px”} + */ + popupHeight?: string; + + /** The width of the suggestion list. + * @Default {“auto”} + */ + popupWidth?: string; + + /** The query to retrieve the data from the data source. + * @Default {null} + */ + query?: ej.Query; + + /** Indicates that the autocomplete textbox values can only be readable. + * @Default {false} + */ + readOnly?: boolean; + + /** Sets the value for the Autocomplete textbox based on the given input key value. + */ + selectValueByKey?: number; + + /** Enables or disables showing the message when there are no suggestions for the entered text. + * @Default {true} + */ + showEmptyResultText?: boolean; + + /** Enables or disables the loading icon to intimate the searching operation. The loading icon is visible when there is a time delay to perform the search. + * @Default {true} + */ + showLoadingIcon?: boolean; + + /** Enables the showPopup button in autocomplete textbox. When the showPopup button is clicked, it displays all the available data from the data source. + * @Default {false} + */ + showPopupButton?: boolean; + + /** Enables or disables rounded corner. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Enables or disables reset icon to clear the textbox values. + * @Default {false} + */ + showResetIcon?: boolean; + + /** Sort order specifies whether the suggestion list values has to be displayed in ascending or descending order. + * @Default {ej.SortOrder.Ascending} + */ + sortOrder?: ej.Autocomplete.SortOrder|string; + + /** The template to display the suggestion list items with customized appearance. + * @Default {null} + */ + template?: string; + + /** The jQuery validation error message to be displayed on form validation. + * @Default {null} + */ + validationMessage?: any; + + /** The jQuery validation rules for form validation. + * @Default {null} + */ + validationRules?: any; + + /** The value to be displayed in the autocomplete textbox. + * @Default {null} + */ + value?: string; + + /** Enables or disables the visibility of the autocomplete textbox. + * @Default {true} + */ + visible?: boolean; + + /** The text to be displayed when the value of the autocomplete textbox is empty. + * @Default {null} + */ + watermarkText?: string; + + /** The width of the Autocomplete textbox. + * @Default {null} + */ + width?: string|number; + + /** Triggers when the AJAX requests Begins. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Triggers when the data requested from AJAX will get successfully loaded in the Autocomplete widget. + */ + actionSuccess?(e: ActionSuccessEventArgs): void; + + /** Triggers when the AJAX requests complete. The request may get failed or succeed. + */ + actionComplete?(e: ActionCompleteEventArgs): void; + + /** Triggers when the data requested from AJAX get failed. + */ + actionFailure?(e: ActionFailureEventArgs): void; + + /** Triggers when the text box value is changed. + */ + change?(e: ChangeEventArgs): void; + + /** Triggers after the suggestion popup is closed. + */ + close?(e: CloseEventArgs): void; + + /** Triggers when Autocomplete widget is created. + */ + create?(e: CreateEventArgs): void; + + /** Triggers after the Autocomplete widget is destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** Triggers after the autocomplete textbox is focused. + */ + focusIn?(e: FocusInEventArgs): void; + + /** Triggers after the Autocomplete textbox gets out of the focus. + */ + focusOut?(e: FocusOutEventArgs): void; + + /** Triggers after the suggestion list is opened. + */ + open?(e: OpenEventArgs): void; + + /** Triggers when an item has been selected from the suggestion list. + */ + select?(e: SelectEventArgs): void; + } + + export interface ActionBeginEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Autocomplete model + */ + model?: any; - /** returns the name of the event - */ - type?: string; + /** returns the name of the event + */ + type?: string; + } - /** returns active index - */ - activeIndex?: number; + export interface ActionSuccessEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns true when the Accordion index activated by user interaction otherwise returns false - */ - isInteraction?: boolean; - } + /** Returns number of times trying to fetch the data + */ + count?: number; - export interface BeforeInactivateEventArgs { + /** returns the Autocomplete model + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the query for data retrieval + */ + query?: any; - /** returns the accordion model - */ - model?: ej.Accordion.Model; + /** Returns the query for data retrieval from the Database + */ + request?: any; - /** returns the name of the event - */ - type?: string; + /** returns the name of the event + */ + type?: string; - /** returns active index - */ - inActiveIndex?: number; + /** Returns the number of items fetched from remote data + */ + result?: any[]; - /** returns true when the Accordion index activated by user interaction otherwise returns false - */ - isInteraction?: boolean; - } + /** Returns the requested data + */ + xhr?: any; + } - export interface CreateEventArgs { + export interface ActionCompleteEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the accordion model - */ - model?: ej.Accordion.Model; + /** Returns number of times trying to fetch the data + */ + count?: number; - /** returns the name of the event - */ - type?: string; - } + /** returns the Autocomplete model + */ + model?: any; - export interface DestroyEventArgs { + /** Returns the query for data retrieval + */ + query?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the query for data retrieval from the Database + */ + request?: any; - /** returns the accordion model - */ - model?: ej.Accordion.Model; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event - */ - type?: string; - } + /** Returns the number of items fetched from remote data + */ + result?: any[]; - export interface InActivateEventArgs { + /** Returns the requested data + */ + xhr?: any; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface ActionFailureEventArgs { - /** returns the accordion model - */ - model?: ej.Accordion.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; + /** Returns the error message + */ + error?: any; - /** returns active index - */ - inActiveIndex?: number; + /** returns the Autocomplete model + */ + model?: any; - /** returns in active element - */ - inActiveHeader?: any; + /** Returns the query for data retrieval + */ + query?: any; - /** returns true when the Accordion index activated by user interaction otherwise returns false - */ - isInteraction?: boolean; - } + /** returns the name of the event + */ + type?: string; + } - export interface AjaxSettings { + export interface ChangeEventArgs { - /** It specifies, whether to enable or disable asynchronous request. - */ - async?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** It specifies the page will be cached in the web browser. - */ - cache?: boolean; + /** Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; - /** It specifies the type of data is send in the query string. - */ - contentType?: string; - - /** It specifies the data as an object, will be passed in the query string. - */ - data?: any; - - /** It specifies the type of data that you're expecting back from the response. - */ - dataType?: string; - - /** It specifies the HTTP request type. - */ - type?: string; - } - - export interface CustomIcon { - - /** This class name set to collapsing header. - */ - header?: string; - - /** This class name set to expanded (active) header. - */ - selectedHeader?: string; - } - - enum HeightAdjustMode { - - ///Height fit to the content in the panel - Content, - - ///Height set to the largest content in the panel - Auto, - - ///Height filled to the content of the panel - Fill - } - - } - - class Autocomplete extends ej.Widget { - static fn: Autocomplete; - constructor(element: JQuery | Element, options?: Autocomplete.Model); - static Locale: any; - model: Autocomplete.Model; - defaults: Autocomplete.Model; - - /** Clears the text in the Autocomplete textbox. - * @returns {void} - */ - clearText(): void; - - /** Destroys the Autocomplete widget. - * @returns {void} - */ - destroy(): void; - - /** Disables the autocomplete widget. - * @returns {void} - */ - disable(): void; - - /** Enables the autocomplete widget. - * @returns {void} - */ - enable(): void; - - /** Returns objects (data object) of all the selected items in the autocomplete textbox. - * @returns {any} - */ - getSelectedItems(): any; - - /** Returns the current selected value from the Autocomplete textbox. - * @returns {string} - */ - getValue(): string; - - /** Returns the current active text value in the Autocomplete suggestion list. - * @returns {string} - */ - getActiveText(): string; - - /** Search the entered text and show it in the suggestion list if available. - * @returns {void} - */ - search(): void; - - /** Open up the autocomplete suggestion popup with all list items. - * @returns {void} - */ - open(): void; - - /** Sets the value of the Autocomplete textbox based on the given key value. - * @param {string} The key value of the specific suggestion item. - * @returns {void} - */ - selectValueByKey(Key: string): void; - - /** Sets the value of the Autocomplete textbox based on the given input text value. - * @param {string} The text (label) value of the specific suggestion item. - * @returns {void} - */ - selectValueByText(Text: string): void; - } - export namespace Autocomplete { - - export interface Model { - - /** Customize "Add New" text (label) to be added in the autocomplete popup list for the entered text when there are no suggestions for it. - * @Default {Add New} - */ - addNewText?: boolean; - - /** Allows new values to be added to the autocomplete input other than the values in the suggestion list. - * Normally, when there are no suggestions it will display “No suggestions” label in the popup. - * @Default {false} - */ - allowAddNew?: boolean; - - /** Enables or disables the sorting of suggestion list item. The default sort order is ascending order. You customize sort order. - * @Default {true} - */ - allowSorting?: boolean; - - /** Enables or disables selecting the animation style for the popup list. Animation types can be selected through either of the following options, - * @Default {slide} - */ - animateType?: ej.Autocomplete.Animation | string; - - /** To focus the items in the suggestion list when the popup is shown. By default first item will be focused. - * @Default {false} - */ - autoFocus?: boolean; - - /** Enables or disables the case sensitive search. - * @Default {false} - */ - caseSensitiveSearch?: boolean; - - /** The root class for the Autocomplete textbox widget which helps in customizing its theme. - * @Default {””} - */ - cssClass?: string; - - /** The data source contains the list of data for the suggestions list. It can be a string array or JSON array. - * @Default {null} - */ - dataSource?: any | any[]; - - /** The time delay (in milliseconds) after which the suggestion popup will be shown. - * @Default {200} - */ - delaySuggestionTimeout?: number; - - /** The special character which acts as a separator for the given words for multi-mode search i.e. the text after the delimiter are considered as a separate word or query for search operation. - * @Default {’,’} - */ - delimiterChar?: string; - - /** The text to be displayed in the popup when there are no suggestions available for the entered text. - * @Default {“No suggestions”} - */ - emptyResultText?: string; - - /** Fills the autocomplete textbox with the first matched item from the suggestion list automatically based on the entered text when enabled. - * @Default {false} - */ - enableAutoFill?: boolean; - - /** Enables or disables the Autocomplete textbox widget. - * @Default {true} - */ - enabled?: boolean; - - /** Enables or disables displaying the duplicate names present in the search result. - * @Default {false} - */ - enableDistinct?: boolean; - - /** Allows the current model values to be saved in local storage or browser cookies for state maintenance - * when it is set to true. - * While refreshing the page, it retains the model value from browser cookies or local storage. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Displays the Autocomplete widget’s content from right to left when enabled. - * @Default {false} - */ - enableRTL?: boolean; - - /** Mapping fields for the suggestion items of the Autocomplete textbox widget. - * @Default {null} - */ - fields?: Fields; - - /** Specifies the search filter type. - * There are several types of search filter available such as ‘startswith’, - * ‘contains’, ‘endswith’, ‘lessthan’, ‘lessthanorequal’, ‘greaterthan’, - * ‘greaterthanorequal’, ‘equal’, ‘notequal’. - * @Default {ej.filterType.StartsWith} - */ - filterType?: string; - - /** The height of the Autocomplete textbox. - * @Default {null} - */ - height?: string | number; - - /** The search text can be highlighted in the AutoComplete suggestion list when enabled. - * @Default {false} - */ - highlightSearch?: boolean; - - /** Number of items to be displayed in the suggestion list. - * @Default {0} - */ - itemsCount?: number; - - /** Set the localization culture for Autocomplete Widget. - */ - locale?: string; - - /** Minimum number of character to be entered in the Autocomplete textbox to show the suggestion list. - * @Default {1} - */ - minCharacter?: number; - - /** An Autocomplete column collection can be defined and customized through the multiColumnSettings property.Column's header, field, and stringFormat can be define - * via multiColumnSettings properties. - */ - multiColumnSettings?: MultiColumnSettings; - - /** Enables or disables selecting multiple values from the suggestion list. Multiple values can be selected through either of the following options, - * @Default {ej.MultiSelectMode.None} - */ - multiSelectMode?: ej.Autocomplete.MultiSelectMode | string; - - /** The height of the suggestion list. - * @Default {“152px”} - */ - popupHeight?: string; - - /** The width of the suggestion list. - * @Default {“auto”} - */ - popupWidth?: string; - - /** The query to retrieve the data from the data source. - * @Default {null} - */ - query?: ej.Query; - - /** Indicates that the autocomplete textbox values can only be readable. - * @Default {false} - */ - readOnly?: boolean; - - /** Sets the value for the Autocomplete textbox based on the given input key value. - */ - selectValueByKey?: number; - - /** Enables or disables showing the message when there are no suggestions for the entered text. - * @Default {true} - */ - showEmptyResultText?: boolean; - - /** Enables or disables the loading icon to intimate the searching operation. The loading icon is visible when there is a time delay to perform the search. - * @Default {true} - */ - showLoadingIcon?: boolean; - - /** Enables the showPopup button in autocomplete textbox. When the showPopup button is clicked, it displays all the available data from the data source. - * @Default {false} - */ - showPopupButton?: boolean; - - /** Enables or disables rounded corner. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Enables or disables reset icon to clear the textbox values. - * @Default {false} - */ - showResetIcon?: boolean; - - /** Sort order specifies whether the suggestion list values has to be displayed in ascending or descending order. - * @Default {ej.SortOrder.Ascending} - */ - sortOrder?: ej.Autocomplete.SortOrder | string; - - /** The template to display the suggestion list items with customized appearance. - * @Default {null} - */ - template?: string; - - /** The jQuery validation error message to be displayed on form validation. - * @Default {null} - */ - validationMessage?: any; - - /** The jQuery validation rules for form validation. - * @Default {null} - */ - validationRules?: any; - - /** The value to be displayed in the autocomplete textbox. - * @Default {null} - */ - value?: string; - - /** Enables or disables the visibility of the autocomplete textbox. - * @Default {true} - */ - visible?: boolean; - - /** The text to be displayed when the value of the autocomplete textbox is empty. - * @Default {null} - */ - watermarkText?: string; - - /** The width of the Autocomplete textbox. - * @Default {null} - */ - width?: string | number; - - /** Triggers when the AJAX requests Begins. */ - actionBegin?(e: ActionBeginEventArgs): void; - - /** Triggers when the data requested from AJAX will get successfully loaded in the Autocomplete widget. */ - actionSuccess?(e: ActionSuccessEventArgs): void; - - /** Triggers when the AJAX requests complete. The request may get failed or succeed. */ - actionComplete?(e: ActionCompleteEventArgs): void; - - /** Triggers when the data requested from AJAX get failed. */ - actionFailure?(e: ActionFailureEventArgs): void; - - /** Triggers when the text box value is changed. */ - change?(e: ChangeEventArgs): void; - - /** Triggers after the suggestion popup is closed. */ - close?(e: CloseEventArgs): void; - - /** Triggers when Autocomplete widget is created. */ - create?(e: CreateEventArgs): void; - - /** Triggers after the Autocomplete widget is destroyed. */ - destroy?(e: DestroyEventArgs): void; - - /** Triggers after the autocomplete textbox is focused. */ - focusIn?(e: FocusInEventArgs): void; - - /** Triggers after the Autocomplete textbox gets out of the focus. */ - focusOut?(e: FocusOutEventArgs): void; - - /** Triggers after the suggestion list is opened. */ - open?(e: OpenEventArgs): void; - - /** Triggers when an item has been selected from the suggestion list. */ - select?(e: SelectEventArgs): void; - } - - export interface ActionBeginEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface ActionSuccessEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Name of the event. + */ + type?: string; - export interface ActionCompleteEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Value of the autocomplete textbox. + */ + value?: string; + } - export interface ActionFailureEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } + export interface CloseEventArgs { - export interface ChangeEventArgs { + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; - /** Instance of the autocomplete model object. - */ - model?: ej.Autocomplete.Model; + /** Name of the event. + */ + type?: string; + } - /** Name of the event. - */ - type?: string; + export interface CreateEventArgs { - /** Value of the autocomplete textbox. - */ - value?: string; - } + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - export interface CloseEventArgs { + /** Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Name of the event. + */ + type?: string; + } - /** Instance of the autocomplete model object. - */ - model?: ej.Autocomplete.Model; + export interface DestroyEventArgs { - /** Name of the event. - */ - type?: string; - } + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - export interface CreateEventArgs { + /** Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Name of the event. + */ + type?: string; + } - /** Instance of the autocomplete model object. - */ - model?: ej.Autocomplete.Model; + export interface FocusInEventArgs { - /** Name of the event. - */ - type?: string; - } + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - export interface DestroyEventArgs { + /** Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Name of the event. + */ + type?: string; - /** Instance of the autocomplete model object. - */ - model?: ej.Autocomplete.Model; + /** Value of the autocomplete textbox. + */ + value?: string; + } - /** Name of the event. - */ - type?: string; - } + export interface FocusOutEventArgs { - export interface FocusInEventArgs { + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; - /** Instance of the autocomplete model object. - */ - model?: ej.Autocomplete.Model; + /** Name of the event. + */ + type?: string; - /** Name of the event. - */ - type?: string; + /** Value of the autocomplete textbox. + */ + value?: string; + } - /** Value of the autocomplete textbox. - */ - value?: string; - } + export interface OpenEventArgs { - export interface FocusOutEventArgs { + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; - /** Instance of the autocomplete model object. - */ - model?: ej.Autocomplete.Model; + /** Name of the event. + */ + type?: string; + } - /** Name of the event. - */ - type?: string; + export interface SelectEventArgs { - /** Value of the autocomplete textbox. - */ - value?: string; - } + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - export interface OpenEventArgs { + /** Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Name of the event. + */ + type?: string; - /** Instance of the autocomplete model object. - */ - model?: ej.Autocomplete.Model; + /** Value of the autocomplete textbox. + */ + value?: string; - /** Name of the event. - */ - type?: string; - } + /** Text of the selected item. + */ + text?: string; - export interface SelectEventArgs { + /** Key of the selected item. + */ + key?: string; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Data object of the selected item. + */ + Item?: ej.Autocomplete.Model; + } - /** Instance of the autocomplete model object. - */ - model?: ej.Autocomplete.Model; + export interface Fields { - /** Name of the event. - */ - type?: string; + /** Used to group the suggestion list items. + */ + groupBy?: string; - /** Value of the autocomplete textbox. - */ - value?: string; + /** Defines the HTML attributes such as id, class, styles for the item. + */ + htmlAttributes?: any; - /** Text of the selected item. - */ - text?: string; + /** Defines the specific field name which contains unique key values for the list items. + */ + key?: string; - /** Key of the selected item. - */ - key?: string; + /** Defines the specific field name in the data source to load the suggestion list with data. + */ + text?: string; + } - /** Data object of the selected item. - */ - Item?: ej.Autocomplete.Model; - } + export interface MultiColumnSettingsColumn { - export interface Fields { + /** Get or set a value that indicates to display the columns in the autocomplete mapping with column name of the dataSource. + */ + field?: string; - /** Used to group the suggestion list items. - */ - groupBy?: string; + /** Get or set a value that indicates to display the title of that particular column. + */ + headerText?: string; - /** Defines the HTML attributes such as id, class, styles for the item. - */ - htmlAttributes?: any; + /** Gets or sets a value that indicates to render the multicolumn with custom theme. + */ + cssClass?: string; - /** Defines the specific field name which contains unique key values for the list items. - */ - key?: string; + /** Specifies the search data type. There are four types of data types available such as string, ‘number’, ‘boolean’ and ‘date’. + * @Default {ej.Type.String} + */ + type?: ej.Type|string; - /** Defines the specific field name in the data source to load the suggestion list with data. - */ - text?: string; - } + /** Specifies the search filter type. There are several types of search filter available such as ‘startswith’, ‘contains’, ‘endswith’, ‘lessthan’, + * ‘lessthanorequal’, ‘greaterthan’, ‘greaterthanorequal’, ‘equal’, ‘notequal’. + * @Default {ej.filterType.StartsWith} + */ + filterType?: ej.filterType|string; - export interface MultiColumnSettingsColumn { + /** This defines the text alignment of a particular column header cell value. See headerTextAlign + * @Default {ej.TextAlign.Left} + */ + headerTextAlign?: ej.TextAlign|string; - /** Get or set a value that indicates to display the columns in the autocomplete mapping with column name of the dataSource. - */ - field?: string; + /** Gets or sets a value that indicates to align the text within the column. See textAlign + * @Default {ej.TextAlign.Left} + */ + textAlign?: ej.TextAlign|string; + } - /** Get or set a value that indicates to display the title of that particular column. - */ - headerText?: string; + export interface MultiColumnSettings { - /** Gets or sets a value that indicates to render the multicolumn with custom theme. - */ - cssClass?: string; + /** Allow list of data to be displayed in several columns. + * @Default {false} + */ + enable?: boolean; - /** Specifies the search data type. There are four types of data types available such as string, ‘number’, ‘boolean’ and ‘date’. - * @Default {ej.Type.String} - */ - type?: ej.Type | string; + /** Allow header text to be displayed in corresponding columns. + * @Default {true} + */ + showHeader?: boolean; - /** Specifies the search filter type. There are several types of search filter available such as ‘startswith’, - * ‘contains’, ‘endswith’, ‘lessthan’, ‘lessthanorequal’, ‘greaterthan’, - * ‘greaterthanorequal’, ‘equal’, ‘notequal’. - * @Default {ej.filterType.StartsWith} - */ - filterType?: ej.filterType | string; + /** Displayed selected value and autocomplete search based on mentioned column value specified in that format. + */ + stringFormat?: string; - /** This defines the text alignment of a particular column header cell value. See headerTextAlign - * @Default {ej.TextAlign.Left} - */ - headerTextAlign?: ej.TextAlign | string; + /** Field and Header Text collections can be defined and customized through columns field. + */ + columns?: MultiColumnSettingsColumn[]; + } - /** Gets or sets a value that indicates to align the text within the column. See textAlign - * @Default {ej.TextAlign.Left} - */ - textAlign?: ej.TextAlign | string; - } + enum Animation { - export interface MultiColumnSettings { + ///Supports to animation type with none type only. + None, - /** Allow list of data to be displayed in several columns. - * @Default {false} - */ - enable?: boolean; + ///Supports to animation type with slide type only. + Slide, + + ///Supports to animation type with fade type only. + Fade + } + + + enum MultiSelectMode { - /** Allow header text to be displayed in corresponding columns. - * @Default {true} - */ - showHeader?: boolean; + ///Multiple values are separated using a given special character. + Delimiter, + + ///Each values are displayed in separate box with close button. + VisualMode + } + + + enum SortOrder { + + ///Items to be displayed in the suggestion list in ascending order. + Ascending, + + ///Items to be displayed in the suggestion list in descending order. + Descending + } + + } + + class Button extends ej.Widget { + static fn: Button; + constructor(element: JQuery | Element, options?: Button.Model); + static Locale: any; + model: Button.Model; + defaults: Button.Model; + + /** destroy the button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To disable the button + * @returns {void} + */ + disable(): void; + + /** To enable the button + * @returns {void} + */ + enable(): void; + } + export namespace Button { + + export interface Model { + + /** Specifies the contentType of the Button. See below to know available ContentType + * @Default {ej.ContentType.TextOnly} + */ + contentType?: ej.ContentType|string; + + /** Sets the root CSS class for Button theme, which is used customize. + */ + cssClass?: string; + + /** Specifies the button control state. + * @Default {true} + */ + enabled?: boolean; + + /** Specify the Right to Left direction to button + * @Default {false} + */ + enableRTL?: boolean; - /** Displayed selected value and autocomplete search based on mentioned column value specified in that format. - */ - stringFormat?: string; - - /** Field and Header Text collections can be defined and customized through columns field. - */ - columns?: MultiColumnSettingsColumn[]; - } - - enum Animation { + /** Specifies the height of the Button. + * @Default {28} + */ + height?: number; + + /** It allows to define the characteristics of the Button control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specifies the image position of the Button. This image position is applicable only with the textandimage contentType property. The images can be positioned in both imageLeft and + * imageRight options. See below to know about available ImagePosition + * @Default {ej.ImagePosition.ImageLeft} + */ + imagePosition?: ej.ImagePosition|string; - ///Supports to animation type with none type only. - None, - - ///Supports to animation type with slide type only. - Slide, - - ///Supports to animation type with fade type only. - Fade - } - - - enum MultiSelectMode { - - ///Multiple values are separated using a given special character. - Delimiter, - - ///Each values are displayed in separate box with close button. - VisualMode - } - - - enum SortOrder { - - ///Items to be displayed in the suggestion list in ascending order. - Ascending, - - ///Items to be displayed in the suggestion list in descending order. - Descending - } - - } - - class Button extends ej.Widget { - static fn: Button; - constructor(element: JQuery | Element, options?: Button.Model); - static Locale: any; - model: Button.Model; - defaults: Button.Model; - - /** destroy the button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** To disable the button - * @returns {void} - */ - disable(): void; - - /** To enable the button - * @returns {void} - */ - enable(): void; - } - export namespace Button { - - export interface Model { - - /** Specifies the contentType of the Button. See below to know available ContentType - * @Default {ej.ContentType.TextOnly} - */ - contentType?: ej.ContentType | string; - - /** Sets the root CSS class for Button theme, which is used customize. - */ - cssClass?: string; - - /** Specifies the button control state. - * @Default {true} - */ - enabled?: boolean; - - /** Specify the Right to Left direction to button - * @Default {false} - */ - enableRTL?: boolean; + /** Specifies the primary icon for Button. This icon will be displayed from the left margin of the button. + * @Default {null} + */ + prefixIcon?: string; - /** Specifies the height of the Button. - * @Default {28} - */ - height?: number; - - /** It allows to define the characteristics of the Button control. It will helps to extend the capability of an HTML element. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specifies the image position of the Button. This image position is applicable - * only with the textandimage contentType property. The images can be positioned in both - * imageLeft and imageRight options. See below to know about available ImagePosition - * @Default {ej.ImagePosition.ImageLeft} - */ - imagePosition?: ej.ImagePosition | string; - - /** Specifies the primary icon for Button. This icon will be displayed from the left margin of the button. - * @Default {null} - */ - prefixIcon?: string; - - /** Convert the button as repeat button. It raises the 'Click' event repeatedly from the it is pressed until it is released. - * @Default {false} - */ - repeatButton?: boolean; - - /** Displays the Button with rounded corners. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specifies the size of the Button. See below to know available ButtonSize - * @Default {ej.ButtonSize.Normal} - */ - size?: ej.ButtonSize | string; - - /** Specifies the secondary icon for Button. This icon will be displayed from the right margin of the button. - * @Default {null} - */ - suffixIcon?: string; - - /** Specifies the text content for Button. - * @Default {null} - */ - text?: string; - - /** Specified the time interval between two consecutive 'click' event on the button. - * @Default {150} - */ - timeInterval?: string; - - /** Specifies the Type of the Button. See below to know available ButtonType - * @Default {ej.ButtonType.Submit} - */ - type?: ej.ButtonType | string; - - /** Specifies the width of the Button. - * @Default {100px} - */ - width?: string | number; - - /** Fires when Button control is clicked successfully.Consider the scenario to perform any validation, - * modification of content or any other operations click on button,we can make use of this click event - * to achieve the scenario. - */ - click?(e: ClickEventArgs): void; - - /** Fires after Button control is created.If the user want to perform any operation after the button control creation then the user can make use of this create event. */ - create?(e: CreateEventArgs): void; - - /** Fires when the button is destroyed successfully.If the user want to perform any operation after the destroy button control then the user can make use of this destroy event. */ - destroy?(e: DestroyEventArgs): void; - } - - export interface ClickEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the button model - */ - model?: ej.Button.Model; - - /** returns the name of the event - */ - type?: string; - - /** return the button state - */ - status?: boolean; - - /** return the event model for sever side processing. - */ - e?: any; - } - - export interface CreateEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the button model - */ - model?: ej.Button.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the button model - */ - model?: ej.Button.Model; - - /** returns the name of the event - */ - type?: string; - } - } - enum ContentType { - //To display the text content only in button - TextOnly, - //To display the image only in button - ImageOnly, - //Supports to display image for both ends of the button - ImageBoth, - //Supports to display image with the text content - TextAndImage, - //Supports to display image with both ends of the text - ImageTextImage, - } - enum ImagePosition { - //support for aligning text in left and image in right - ImageRight, - //support for aligning text in right and image in left - ImageLeft, - //support for aligning text in bottom and image in top. - ImageTop, - //support for aligning text in top and image in bottom - ImageBottom, - } - enum ButtonSize { - //Creates button with Built-in default size height, width specified - Normal, - //Creates button with Built-in mini size height, width specified - Mini, - //Creates button with Built-in small size height, width specified - Small, - //Creates button with Built-in medium size height, width specified - Medium, - //Creates button with Built-in large size height, width specified - Large, - } - enum ButtonType { - //Creates button with Built-in button type specified - Button, - //Creates button with Built-in reset type specified - Reset, - //Creates button with Built-in submit type specified - Submit, - } - - class Captcha extends ej.Widget { - static fn: Captcha; - constructor(element: JQuery | Element, options?: Captcha.Model); - static Locale: any; - model: Captcha.Model; - defaults: Captcha.Model; - } - export namespace Captcha { - - export interface Model { - - /** Specifies the character set of the Captcha that will be used to generate captcha text randomly. - */ - characterSet?: string; - - /** Specifies the error message to be displayed when the Captcha mismatch. - */ - customErrorMessage?: string; - - /** Set the Captcha validation automatically. - */ - enableAutoValidation?: boolean; - - /** Specifies the case sensitivity for the characters typed in the Captcha. - */ - enableCaseSensitivity?: boolean; - - /** Specifies the background patterns for the Captcha. - */ - enablePattern?: boolean; - - /** Sets the Captcha direction as right to left alignment. - */ - enableRTL?: boolean; - - /** Specifies the background appearance for the captcha. - */ - hatchStyle?: ej.HatchStyle | string; - - /** Specifies the height of the Captcha. - */ - height?: number; - - /** Specifies the method with values to be mapped in the Captcha. - */ - mapper?: string; - - /** Specifies the maximum number of characters used in the Captcha. - */ - maximumLength?: number; - - /** Specifies the minimum number of characters used in the Captcha. - */ - minimumLength?: number; - - /** Specifies the method to map values to Captcha. - */ - requestMapper?: string; - - /** Sets the Captcha with audio support, that enables to dictate the captcha text. - */ - showAudioButton?: boolean; - - /** Sets the Captcha with a refresh button. - */ - showRefreshButton?: boolean; - - /** Specifies the target button of the Captcha to validate the entered text and captcha text. - */ - targetButton?: string; - - /** Specifies the target input element that will verify the Captcha. - */ - targetInput?: string; - - /** Specifies the width of the Captcha. - */ - width?: number; - - /** Fires when captcha refresh begins. */ - refreshBegin?(e: RefreshBeginEventArgs): void; - - /** Fires after captcha refresh completed. */ - refreshComplete?(e: RefreshCompleteEventArgs): void; - - /** Fires when captcha refresh fails to load. */ - refreshFailure?(e: RefreshFailureEventArgs): void; - - /** Fires after captcha refresh succeeded. */ - refreshSuccess?(e: RefreshSuccessEventArgs): void; - } - - export interface RefreshBeginEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Captcha model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface RefreshCompleteEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Captcha model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface RefreshFailureEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Captcha model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface RefreshSuccessEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Captcha model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - } - enum HatchStyle { - //Set background as None to Captcha - None, - //Set background as BackwardDiagonal to Captcha - BackwardDiagonal, - //Set background as Cross to Captcha - Cross, - //Set background as DarkDownwardDiagonal to Captcha - DarkDownwardDiagonal, - //Set background as DarkHorizontal to Captcha - DarkHorizontal, - //Set background as DarkUpwardDiagonal to Captcha - DarkUpwardDiagonal, - //Set background as DarkVertical to Captcha - DarkVertical, - //Set background as DashedDownwardDiagonal to Captcha - DashedDownwardDiagonal, - //Set background as DashedHorizontal to Captcha - DashedHorizontal, - //Set background as DashedUpwardDiagonal to Captcha - DashedUpwardDiagonal, - //Set background as DashedVertical to Captcha - DashedVertical, - //Set background as DiagonalBrick to Captcha - DiagonalBrick, - //Set background as DiagonalCross to Captcha - DiagonalCross, - //Set background as Divot to Captcha - Divot, - //Set background as DottedDiamond to Captcha - DottedDiamond, - //Set background as DottedGrid to Captcha - DottedGrid, - //Set background as ForwardDiagonal to Captcha - ForwardDiagonal, - //Set background as Horizontal to Captcha - Horizontal, - //Set background as HorizontalBrick to Captcha - HorizontalBrick, - //Set background as LargeCheckerBoard to Captcha - LargeCheckerBoard, - //Set background as LargeConfetti to Captcha - LargeConfetti, - //Set background as LargeGrid to Captcha - LargeGrid, - //Set background as LightDownwardDiagonal to Captcha - LightDownwardDiagonal, - //Set background as LightHorizontal to Captcha - LightHorizontal, - //Set background as LightUpwardDiagonal to Captcha - LightUpwardDiagonal, - //Set background as LightVertical to Captcha - LightVertical, - //Set background as Max to Captcha - Max, - //Set background as Min to Captcha - Min, - //Set background as NarrowHorizontal to Captcha - NarrowHorizontal, - //Set background as NarrowVertical to Captcha - NarrowVertical, - //Set background as OutlinedDiamond to Captcha - OutlinedDiamond, - //Set background as Percent90 to Captcha - Percent90, - //Set background as Wave to Captcha - Wave, - //Set background as Weave to Captcha - Weave, - //Set background as WideDownwardDiagonal to Captcha - WideDownwardDiagonal, - //Set background as WideUpwardDiagonal to Captcha - WideUpwardDiagonal, - //Set background as ZigZag to Captcha - ZigZag, - } - - class ListBox extends ej.Widget { - static fn: ListBox; - constructor(element: JQuery | Element, options?: ListBox.Model); - static Locale: any; - model: ListBox.Model; - defaults: ListBox.Model; - - /** Adds a given list items in the ListBox widget at a specified index. It accepts two parameters. - * @param {any|string} This can be a list item object (for JSON binding) or a string (for UL and LI rendering). - * Also we can the specify this as an array of list item object or an array of strings to add multiple items. - * @param {number} The index value to add the given items at the specified index. If index is not specified, the given items will be added at the end of the list. - * @returns {void} - */ - addItem(listItem: any | string, index: number): void; - - /** Checks all the list items in the ListBox widget. It is dependent on showCheckbox property. - * @returns {void} - */ - checkAll(): void; - - /** Checks a list item by using its index. It is dependent on showCheckbox property. - * @param {number} Index of the listbox item to be checked. If index is not specified, the given items will be added at the end of the list. - * @returns {void} - */ - checkItemByIndex(index: number): void; - - /** Checks multiple list items by using its index values. It is dependent on showCheckbox property. - * @param {number[]} Index/Indices of the listbox items to be checked. If index is not specified, the given items will be added at the end of the list. - * @returns {void} - */ - checkItemsByIndices(indices: number[]): void; - - /** Disables the ListBox widget. - * @returns {void} - */ - disable(): void; - - /** Disables a list item by passing the item text as parameter. - * @param {string} Text of the listbox item to be disabled. - * @returns {void} - */ - disableItem(text: string): void; - - /** Disables a list Item using its index value. - * @param {number} Index of the listbox item to be disabled. - * @returns {void} - */ - disableItemByIndex(index: number): void; - - /** Disables set of list Items using its index values. - * @param {number[]|string} Indices of the listbox items to be disabled. - * @returns {void} - */ - disableItemsByIndices(Indices: number[] | string): void; - - /** Enables the ListBox widget when it is disabled. - * @returns {void} - */ - enable(): void; - - /** Enables a list Item using its item text value. - * @param {string} Text of the listbox item to be enabled. - * @returns {void} - */ - enableItem(text: string): void; - - /** Enables a list item using its index value. - * @param {number} Index of the listbox item to be enabled. - * @returns {void} - */ - enableItemByIndex(index: number): void; - - /** Enables a set of list Items using its index values. - * @param {number[]|string} Indices of the listbox items to be enabled. - * @returns {void} - */ - enableItemsByIndices(indices: number[] | string): void; - - /** Returns the list of checked items in the ListBox widget. It is dependent on showCheckbox property. - * @returns {any} - */ - getCheckedItems(): any; - - /** Returns the list of selected items in the ListBox widget. - * @returns {any} - */ - getSelectedItems(): any; - - /** Returns an item’s index based on the given text. - * @param {string} The list item text (label) - * @returns {number} - */ - getIndexByText(text: string): number; - - /** Returns an item’s index based on the value given. - * @param {string} The list item’s value - * @returns {number} - */ - getIndexByValue(indices: string): number; - - /** Returns an item’s text (label) based on the index given. - * @returns {string} - */ - getTextByIndex(): string; - - /** Returns a list item’s object using its index. - * @returns {any} - */ - getItemByIndex(): any; - - /** Returns a list item’s object based on the text given. - * @param {string} The list item text. - * @returns {any} - */ - getItemByText(text: string): any; - - /** Merges the given data with the existing data items in the listbox. - * @param {Array} Data to merge in listbox. - * @returns {void} - */ - mergeData(data: any[]): void; - - /** Selects the next item based on the current selection. - * @returns {void} - */ - moveDown(): void; - - /** Selects the previous item based on the current selection. - * @returns {void} - */ - moveUp(): void; - - /** Refreshes the ListBox widget. - * @param {boolean} Refreshes both the datasource and the dimensions of the ListBox widget when the parameter is passed as true, otherwise only the ListBox dimensions will be refreshed. - * @returns {void} - */ - refresh(refreshData: boolean): void; - - /** Removes all the list items from listbox. - * @returns {void} - */ - removeAll(): void; - - /** Removes the selected list items from the listbox. - * @returns {void} - */ - removeSelectedItems(): void; - - /** Removes a list item by using its text. - * @param {string} Text of the listbox item to be removed. - * @returns {void} - */ - removeItemByText(text: string): void; - - /** Removes a list item by using its index value. - * @param {number} Index of the listbox item to be removed. - * @returns {void} - */ - removeItemByIndex(index: number): void; - - /** - * @returns {void} - */ - selectAll(): void; - - /** Selects the list item using its text value. - * @param {string} Text of the listbox item to be selected. - * @returns {void} - */ - selectItemByText(text: string): void; - - /** Selects list item using its value property. - * @param {string} Value of the listbox item to be selected. - * @returns {void} - */ - selectItemByValue(value: string): void; - - /** Selects list item using its index value. - * @param {number} Index of the listbox item to be selected. - * @returns {void} - */ - selectItemByIndex(index: number): void; - - /** Selects a set of list items through its index values. - * @param {number|number[]} Index/Indices of the listbox item to be selected. - * @returns {void} - */ - selectItemsByIndices(Indices: number | number[]): void; - - /** Unchecks all the checked list items in the ListBox widget. To use this method showCheckbox property to be set as true. - * @returns {void} - */ - uncheckAll(): void; - - /** Unchecks a checked list item using its index value. To use this method showCheckbox property to be set as true. - * @param {number} Index of the listbox item to be unchecked. - * @returns {void} - */ - uncheckItemByIndex(index: number): void; - - /** Unchecks the set of checked list items using its index values. To use this method showCheckbox property must be set to true. - * @param {number[]|string} Indices of the listbox item to be unchecked. - * @returns {void} - */ - uncheckItemsByIndices(indices: number[] | string): void; - - /** - * @returns {void} - */ - unselectAll(): void; - - /** Unselects a selected list item using its index value - * @param {number} Index of the listbox item to be unselected. - * @returns {void} - */ - unselectItemByIndex(index: number): void; - - /** Unselects a selected list item using its text value. - * @param {string} Text of the listbox item to be unselected. - * @returns {void} - */ - unselectItemByText(text: string): void; - - /** Unselects a selected list item using its value. - * @param {string} Value of the listbox item to be unselected. - * @returns {void} - */ - unselectItemByValue(value: string): void; - - /** Unselects a set of list items using its index values. - * @param {number[]|string} Indices of the listbox item to be unselected. - * @returns {void} - */ - unselectItemsByIndices(indices: number[] | string): void; - - /** Hides all the checked items in the listbox. - * @returns {void} - */ - hideCheckedItems(): void; - - /** Shows a set of hidden list Items using its index values. - * @param {number[]|string} Indices of the listbox items to be shown. - * @returns {void} - */ - showItemByIndices(indices: number[] | string): void; - - /** Hides a set of list Items using its index values. - * @param {number[]|string} Indices of the listbox items to be hidden. - * @returns {void} - */ - hideItemsByIndices(indices: number[] | string): void; - - /** Shows the hidden list items using its values. - * @param {Array} Values of the listbox items to be shown. - * @returns {void} - */ - showItemsByValues(values: any[]): void; - - /** Hides the list item using its values. - * @param {Array} Values of the listbox items to be hidden. - * @returns {void} - */ - hideItemsByValues(values: any[]): void; - - /** Shows a hidden list item using its value. - * @param {string} Value of the listbox item to be shown. - * @returns {void} - */ - showItemByValue(value: string): void; - - /** Hide a list item using its value. - * @param {string} Value of the listbox item to be hidden. - * @returns {void} - */ - hideItemByValue(value: string): void; - - /** Shows a hidden list item using its index value. - * @param {number} Index of the listbox item to be shown. - * @returns {void} - */ - showItemByIndex(index: number): void; - - /** Hides a list item using its index value. - * @param {number} Index of the listbox item to be hidden. - * @returns {void} - */ - hideItemByIndex(index: number): void; - - /** - * @returns {void} - */ - show(): void; - - /** Hides the listbox. - * @returns {void} - */ - hide(): void; - - /** Hides all the listbox items in the listbox. - * @returns {void} - */ - hideAllItems(): void; - - /** Shows all the listbox items in the listbox. - * @returns {void} - */ - showAllItems(): void; - } - export namespace ListBox { - - export interface Model { - - /** Enables/disables the dragging behavior of the items in ListBox widget. - * @Default {false} - */ - allowDrag?: boolean; - - /** Accepts the items which are dropped in to it, when it is set to true. - * @Default {false} - */ - allowDrop?: boolean; - - /** Enables or disables multiple selection. - * @Default {false} - */ - allowMultiSelection?: boolean; - - /** Loads the list data on demand via scrolling behavior to improve the application’s performance. There are two ways to load data which can be defined using “virtualScrollMode” property. - * @Default {false} - */ - allowVirtualScrolling?: boolean; - - /** Enables or disables the case sensitive search for list item by typing the text (search) value. - * @Default {false} - */ - caseSensitiveSearch?: boolean; - - /** Dynamically populate data of a list box while selecting an item in another list box i.e. - * rendering child list box based on the item selection in parent list box. - * This property accepts the id of the child ListBox widget to populate the data. - * @Default {null} - */ - cascadeTo?: string; - - /** Set of list items to be checked by default using its index. It works only when the showCheckbox property is set to true. - * @Default {null} - */ - checkedIndices?: any[]; - - /** The root class for the ListBox widget to customize the existing theme. - * @Default {“”} - */ - cssClass?: string; - - /** Contains the list of data for generating the list items. - * @Default {null} - */ - dataSource?: any; - - /** Enables or disables the ListBox widget. - * @Default {true} - */ - enabled?: boolean; - - /** Enables or disables the search behavior to find the specific list item by typing the text value. - * @Default {false} - */ - enableIncrementalSearch?: boolean; - - /** Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Displays the ListBox widget’s content from right to left when enabled. - * @Default {false} - */ - enableRTL?: boolean; - - /** Specifies ellipsis ("...") representation in an overflowed list item content when it is set to false. - * @Default {true} - */ - enableWordWrap?: boolean; - - /** Mapping fields for the data items of the ListBox widget. - * @Default {null} - */ - fields?: Fields; - - /** Defines the height of the ListBox widget. - * @Default {null} - */ - height?: string; - - /** Defines the height for individual ListBox item. - * @Default {null} - */ - itemHeight?: string; - - /** The number of list items to be shown in the ListBox widget. The remaining list items will be scrollable. - * @Default {null} - */ - itemsCount?: number; - - /** The total number of list items to be rendered in the ListBox widget. - * @Default {null} - */ - totalItemsCount?: number; - - /** The number of list items to be loaded in the list box while enabling virtual scrolling and when virtualScrollMode is set to continuous. - * @Default {5} - */ - itemRequestCount?: number; - - /** Loads data for the listbox by default (i.e. on initialization) when it is set to true. It creates empty ListBox if it is set to false. - */ - loadDataOnInit?: boolean; - - /** The query to retrieve required data from the data source. - * @Default {ej.Query()} - */ - query?: ej.Query; - - /** The list item to be selected by default using its index. - * @Default {null} - */ - selectedIndex?: number; - - /** The list items to be selected by default using its indices. To use this property allowMultiSelection should be enabled. - * @Default {[]} - */ - selectedIndices?: any[]; - - /** Enables/Disables the multi selection option with the help of checkbox control. - * @Default {false} - */ - showCheckbox?: boolean; - - /** To display the ListBox container with rounded corners. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** The template to display the ListBox widget with customized appearance. - * @Default {null} - */ - template?: string; - - /** Holds the selected items values and used to bind value to the list item using AngularJS and KnockoutJS. - * @Default {“”} - */ - value?: number; - - /** Specifies the virtual scroll mode to load the list data on demand via scrolling behavior. There are two types of mode. - */ - virtualScrollMode?: ej.VirtualScrollMode | string; - - /** Defines the width of the ListBox widget. - * @Default {null} - */ - width?: string; - - /** Specifies the targetID for the listbox items. - */ - targetID?: string; - - /** Triggers before the AJAX request begins to load data in the ListBox widget. */ - actionBegin?(e: ActionBeginEventArgs): void; - - /** Triggers after the data requested via AJAX is successfully loaded in the ListBox widget. */ - actionSuccess?(e: ActionSuccessEventArgs): void; - - /** Triggers when the AJAX requests complete. The request may get failed or succeed. */ - actionComplete?(e: ActionCompleteEventArgs): void; - - /** Triggers when the data requested from AJAX get failed. */ - actionFailure?(e: ActionFailureEventArgs): void; - - /** Event will be triggered before the requested data via AJAX once loaded in successfully. */ - actionBeforeSuccess?(e: ActionBeforeSuccessEventArgs): void; - - /** Triggers when the item selection is changed. */ - change?(e: ChangeEventArgs): void; + /** Convert the button as repeat button. It raises the 'Click' event repeatedly from the it is pressed until it is released. + * @Default {false} + */ + repeatButton?: boolean; + + /** Displays the Button with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies the size of the Button. See below to know available ButtonSize + * @Default {ej.ButtonSize.Normal} + */ + size?: ej.ButtonSize|string; + + /** Specifies the secondary icon for Button. This icon will be displayed from the right margin of the button. + * @Default {null} + */ + suffixIcon?: string; + + /** Specifies the text content for Button. + * @Default {null} + */ + text?: string; + + /** Specified the time interval between two consecutive 'click' event on the button. + * @Default {150} + */ + timeInterval?: string; + + /** Specifies the Type of the Button. See below to know available ButtonType + * @Default {ej.ButtonType.Submit} + */ + type?: ej.ButtonType|string; + + /** Specifies the width of the Button. + * @Default {100px} + */ + width?: string|number; + + /** Fires when Button control is clicked successfully.Consider the scenario to perform any validation,modification of content or any other operations click on button,we can make use + * of this click event to achieve the scenario. + */ + click?(e: ClickEventArgs): void; + + /** Fires after Button control is created.If the user want to perform any operation after the button control creation then the user can make use of this create event. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the button is destroyed successfully.If the user want to perform any operation after the destroy button control then the user can make use of this destroy event. + */ + destroy?(e: DestroyEventArgs): void; + } + + export interface ClickEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the button model + */ + model?: ej.Button.Model; + + /** returns the name of the event + */ + type?: string; + + /** return the button state + */ + status?: boolean; + + /** return the event model for sever side processing. + */ + e?: any; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the button model + */ + model?: ej.Button.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the button model + */ + model?: ej.Button.Model; + + /** returns the name of the event + */ + type?: string; + } + } + enum ContentType { + //To display the text content only in button + TextOnly, + //To display the image only in button + ImageOnly, + //Supports to display image for both ends of the button + ImageBoth, + //Supports to display image with the text content + TextAndImage, + //Supports to display image with both ends of the text + ImageTextImage, + } + enum ImagePosition { + //support for aligning text in left and image in right + ImageRight, + //support for aligning text in right and image in left + ImageLeft, + //support for aligning text in bottom and image in top. + ImageTop, + //support for aligning text in top and image in bottom + ImageBottom, + } + enum ButtonSize { + //Creates button with Built-in default size height, width specified + Normal, + //Creates button with Built-in mini size height, width specified + Mini, + //Creates button with Built-in small size height, width specified + Small, + //Creates button with Built-in medium size height, width specified + Medium, + //Creates button with Built-in large size height, width specified + Large, + } + enum ButtonType { + //Creates button with Built-in button type specified + Button, + //Creates button with Built-in reset type specified + Reset, + //Creates button with Built-in submit type specified + Submit, + } + + class Captcha extends ej.Widget { + static fn: Captcha; + constructor(element: JQuery | Element, options?: Captcha.Model); + static Locale: any; + model: Captcha.Model; + defaults: Captcha.Model; + } + export namespace Captcha { + + export interface Model { + + /** Specifies the character set of the Captcha that will be used to generate captcha text randomly. + */ + characterSet?: string; + + /** Specifies the error message to be displayed when the Captcha mismatch. + */ + customErrorMessage?: string; + + /** Set the Captcha validation automatically. + */ + enableAutoValidation?: boolean; + + /** Specifies the case sensitivity for the characters typed in the Captcha. + */ + enableCaseSensitivity?: boolean; + + /** Specifies the background patterns for the Captcha. + */ + enablePattern?: boolean; + + /** Sets the Captcha direction as right to left alignment. + */ + enableRTL?: boolean; + + /** Specifies the background appearance for the captcha. + */ + hatchStyle?: ej.HatchStyle|string; + + /** Specifies the height of the Captcha. + */ + height?: number; + + /** Specifies the method with values to be mapped in the Captcha. + */ + mapper?: string; + + /** Specifies the maximum number of characters used in the Captcha. + */ + maximumLength?: number; + + /** Specifies the minimum number of characters used in the Captcha. + */ + minimumLength?: number; + + /** Specifies the method to map values to Captcha. + */ + requestMapper?: string; + + /** Sets the Captcha with audio support, that enables to dictate the captcha text. + */ + showAudioButton?: boolean; + + /** Sets the Captcha with a refresh button. + */ + showRefreshButton?: boolean; + + /** Specifies the target button of the Captcha to validate the entered text and captcha text. + */ + targetButton?: string; + + /** Specifies the target input element that will verify the Captcha. + */ + targetInput?: string; + + /** Specifies the width of the Captcha. + */ + width?: number; + + /** Fires when captcha refresh begins. + */ + refreshBegin?(e: RefreshBeginEventArgs): void; + + /** Fires after captcha refresh completed. + */ + refreshComplete?(e: RefreshCompleteEventArgs): void; + + /** Fires when captcha refresh fails to load. + */ + refreshFailure?(e: RefreshFailureEventArgs): void; + + /** Fires after captcha refresh succeeded. + */ + refreshSuccess?(e: RefreshSuccessEventArgs): void; + } + + export interface RefreshBeginEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Captcha model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface RefreshCompleteEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Captcha model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface RefreshFailureEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Captcha model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface RefreshSuccessEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Captcha model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + } + enum HatchStyle { + //Set background as None to Captcha + None, + //Set background as BackwardDiagonal to Captcha + BackwardDiagonal, + //Set background as Cross to Captcha + Cross, + //Set background as DarkDownwardDiagonal to Captcha + DarkDownwardDiagonal, + //Set background as DarkHorizontal to Captcha + DarkHorizontal, + //Set background as DarkUpwardDiagonal to Captcha + DarkUpwardDiagonal, + //Set background as DarkVertical to Captcha + DarkVertical, + //Set background as DashedDownwardDiagonal to Captcha + DashedDownwardDiagonal, + //Set background as DashedHorizontal to Captcha + DashedHorizontal, + //Set background as DashedUpwardDiagonal to Captcha + DashedUpwardDiagonal, + //Set background as DashedVertical to Captcha + DashedVertical, + //Set background as DiagonalBrick to Captcha + DiagonalBrick, + //Set background as DiagonalCross to Captcha + DiagonalCross, + //Set background as Divot to Captcha + Divot, + //Set background as DottedDiamond to Captcha + DottedDiamond, + //Set background as DottedGrid to Captcha + DottedGrid, + //Set background as ForwardDiagonal to Captcha + ForwardDiagonal, + //Set background as Horizontal to Captcha + Horizontal, + //Set background as HorizontalBrick to Captcha + HorizontalBrick, + //Set background as LargeCheckerBoard to Captcha + LargeCheckerBoard, + //Set background as LargeConfetti to Captcha + LargeConfetti, + //Set background as LargeGrid to Captcha + LargeGrid, + //Set background as LightDownwardDiagonal to Captcha + LightDownwardDiagonal, + //Set background as LightHorizontal to Captcha + LightHorizontal, + //Set background as LightUpwardDiagonal to Captcha + LightUpwardDiagonal, + //Set background as LightVertical to Captcha + LightVertical, + //Set background as Max to Captcha + Max, + //Set background as Min to Captcha + Min, + //Set background as NarrowHorizontal to Captcha + NarrowHorizontal, + //Set background as NarrowVertical to Captcha + NarrowVertical, + //Set background as OutlinedDiamond to Captcha + OutlinedDiamond, + //Set background as Percent90 to Captcha + Percent90, + //Set background as Wave to Captcha + Wave, + //Set background as Weave to Captcha + Weave, + //Set background as WideDownwardDiagonal to Captcha + WideDownwardDiagonal, + //Set background as WideUpwardDiagonal to Captcha + WideUpwardDiagonal, + //Set background as ZigZag to Captcha + ZigZag, + } + + class ListBox extends ej.Widget { + static fn: ListBox; + constructor(element: JQuery | Element, options?: ListBox.Model); + static Locale: any; + model: ListBox.Model; + defaults: ListBox.Model; + + /** Adds a given list items in the ListBox widget at a specified index. It accepts two parameters. + * @param {any|string} This can be a list item object (for JSON binding) or a string (for UL and LI rendering). Also we can the specify this as an array of list item object or an + * array of strings to add multiple items. + * @param {number} The index value to add the given items at the specified index. If index is not specified, the given items will be added at the end of the list. + * @returns {void} + */ + addItem(listItem: any|string, index: number): void; + + /** Checks all the list items in the ListBox widget. It is dependent on showCheckbox property. + * @returns {void} + */ + checkAll(): void; + + /** Checks a list item by using its index. It is dependent on showCheckbox property. + * @param {number} Index of the listbox item to be checked. If index is not specified, the given items will be added at the end of the list. + * @returns {void} + */ + checkItemByIndex(index: number): void; + + /** Checks multiple list items by using its index values. It is dependent on showCheckbox property. + * @param {number[]} Index/Indices of the listbox items to be checked. If index is not specified, the given items will be added at the end of the list. + * @returns {void} + */ + checkItemsByIndices(indices: number[]): void; + + /** Disables the ListBox widget. + * @returns {void} + */ + disable(): void; + + /** Disables a list item by passing the item text as parameter. + * @param {string} Text of the listbox item to be disabled. + * @returns {void} + */ + disableItem(text: string): void; + + /** Disables a list Item using its index value. + * @param {number} Index of the listbox item to be disabled. + * @returns {void} + */ + disableItemByIndex(index: number): void; + + /** Disables set of list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be disabled. + * @returns {void} + */ + disableItemsByIndices(Indices: number[]|string): void; + + /** Enables the ListBox widget when it is disabled. + * @returns {void} + */ + enable(): void; + + /** Enables a list Item using its item text value. + * @param {string} Text of the listbox item to be enabled. + * @returns {void} + */ + enableItem(text: string): void; + + /** Enables a list item using its index value. + * @param {number} Index of the listbox item to be enabled. + * @returns {void} + */ + enableItemByIndex(index: number): void; + + /** Enables a set of list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be enabled. + * @returns {void} + */ + enableItemsByIndices(indices: number[]|string): void; + + /** Returns the list of checked items in the ListBox widget. It is dependent on showCheckbox property. + * @returns {any} + */ + getCheckedItems(): any; + + /** Returns the list of selected items in the ListBox widget. + * @returns {any} + */ + getSelectedItems(): any; + + /** Returns an item’s index based on the given text. + * @param {string} The list item text (label) + * @returns {number} + */ + getIndexByText(text: string): number; + + /** Returns an item’s index based on the value given. + * @param {string} The list item’s value + * @returns {number} + */ + getIndexByValue(indices: string): number; + + /** Returns an item’s text (label) based on the index given. + * @returns {string} + */ + getTextByIndex(): string; + + /** Returns a list item’s object using its index. + * @returns {any} + */ + getItemByIndex(): any; + + /** Returns a list item’s object based on the text given. + * @param {string} The list item text. + * @returns {any} + */ + getItemByText(text: string): any; + + /** Merges the given data with the existing data items in the listbox. + * @param {any[]} Data to merge in listbox. + * @returns {void} + */ + mergeData(data: any[]): void; + + /** Selects the next item based on the current selection. + * @returns {void} + */ + moveDown(): void; + + /** Selects the previous item based on the current selection. + * @returns {void} + */ + moveUp(): void; + + /** Refreshes the ListBox widget. + * @param {boolean} Refreshes both the datasource and the dimensions of the ListBox widget when the parameter is passed as true, otherwise only the ListBox dimensions will be + * refreshed. + * @returns {void} + */ + refresh(refreshData: boolean): void; + + /** Removes all the list items from listbox. + * @returns {void} + */ + removeAll(): void; + + /** Removes the selected list items from the listbox. + * @returns {void} + */ + removeSelectedItems(): void; + + /** Removes a list item by using its text. + * @param {string} Text of the listbox item to be removed. + * @returns {void} + */ + removeItemByText(text: string): void; + + /** Removes a list item by using its index value. + * @param {number} Index of the listbox item to be removed. + * @returns {void} + */ + removeItemByIndex(index: number): void; + + /** + * @returns {void} + */ + selectAll(): void; + + /** Selects the list item using its text value. + * @param {string} Text of the listbox item to be selected. + * @returns {void} + */ + selectItemByText(text: string): void; + + /** Selects list item using its value property. + * @param {string} Value of the listbox item to be selected. + * @returns {void} + */ + selectItemByValue(value: string): void; + + /** Selects list item using its index value. + * @param {number} Index of the listbox item to be selected. + * @returns {void} + */ + selectItemByIndex(index: number): void; + + /** Selects a set of list items through its index values. + * @param {number|number[]} Index/Indices of the listbox item to be selected. + * @returns {void} + */ + selectItemsByIndices(Indices: number|number[]): void; + + /** Unchecks all the checked list items in the ListBox widget. To use this method showCheckbox property to be set as true. + * @returns {void} + */ + uncheckAll(): void; + + /** Unchecks a checked list item using its index value. To use this method showCheckbox property to be set as true. + * @param {number} Index of the listbox item to be unchecked. + * @returns {void} + */ + uncheckItemByIndex(index: number): void; + + /** Unchecks the set of checked list items using its index values. To use this method showCheckbox property must be set to true. + * @param {number[]|string} Indices of the listbox item to be unchecked. + * @returns {void} + */ + uncheckItemsByIndices(indices: number[]|string): void; + + /** + * @returns {void} + */ + unselectAll(): void; + + /** Unselects a selected list item using its index value + * @param {number} Index of the listbox item to be unselected. + * @returns {void} + */ + unselectItemByIndex(index: number): void; + + /** Unselects a selected list item using its text value. + * @param {string} Text of the listbox item to be unselected. + * @returns {void} + */ + unselectItemByText(text: string): void; + + /** Unselects a selected list item using its value. + * @param {string} Value of the listbox item to be unselected. + * @returns {void} + */ + unselectItemByValue(value: string): void; + + /** Unselects a set of list items using its index values. + * @param {number[]|string} Indices of the listbox item to be unselected. + * @returns {void} + */ + unselectItemsByIndices(indices: number[]|string): void; + + /** Hides all the checked items in the listbox. + * @returns {void} + */ + hideCheckedItems(): void; + + /** Shows a set of hidden list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be shown. + * @returns {void} + */ + showItemByIndices(indices: number[]|string): void; + + /** Hides a set of list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be hidden. + * @returns {void} + */ + hideItemsByIndices(indices: number[]|string): void; + + /** Shows the hidden list items using its values. + * @param {any[]} Values of the listbox items to be shown. + * @returns {void} + */ + showItemsByValues(values: any[]): void; + + /** Hides the list item using its values. + * @param {any[]} Values of the listbox items to be hidden. + * @returns {void} + */ + hideItemsByValues(values: any[]): void; + + /** Shows a hidden list item using its value. + * @param {string} Value of the listbox item to be shown. + * @returns {void} + */ + showItemByValue(value: string): void; + + /** Hide a list item using its value. + * @param {string} Value of the listbox item to be hidden. + * @returns {void} + */ + hideItemByValue(value: string): void; + + /** Shows a hidden list item using its index value. + * @param {number} Index of the listbox item to be shown. + * @returns {void} + */ + showItemByIndex(index: number): void; + + /** Hides a list item using its index value. + * @param {number} Index of the listbox item to be hidden. + * @returns {void} + */ + hideItemByIndex(index: number): void; + + /** + * @returns {void} + */ + show(): void; + + /** Hides the listbox. + * @returns {void} + */ + hide(): void; + + /** Hides all the listbox items in the listbox. + * @returns {void} + */ + hideAllItems(): void; + + /** Shows all the listbox items in the listbox. + * @returns {void} + */ + showAllItems(): void; + } + export namespace ListBox { + + export interface Model { + + /** Enables/disables the dragging behavior of the items in ListBox widget. + * @Default {false} + */ + allowDrag?: boolean; + + /** Accepts the items which are dropped in to it, when it is set to true. + * @Default {false} + */ + allowDrop?: boolean; + + /** Enables or disables multiple selection. + * @Default {false} + */ + allowMultiSelection?: boolean; + + /** Loads the list data on demand via scrolling behavior to improve the application’s performance. There are two ways to load data which can be defined using “virtualScrollMode” + * property. + * @Default {false} + */ + allowVirtualScrolling?: boolean; + + /** Enables or disables the case sensitive search for list item by typing the text (search) value. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /** Dynamically populate data of a list box while selecting an item in another list box i.e. rendering child list box based on the item selection in parent list box. This property + * accepts the id of the child ListBox widget to populate the data. + * @Default {null} + */ + cascadeTo?: string; + + /** Set of list items to be checked by default using its index. It works only when the showCheckbox property is set to true. + * @Default {null} + */ + checkedIndices?: any[]; + + /** The root class for the ListBox widget to customize the existing theme. + * @Default {“”} + */ + cssClass?: string; + + /** Contains the list of data for generating the list items. + * @Default {null} + */ + dataSource?: any; + + /** Enables or disables the ListBox widget. + * @Default {true} + */ + enabled?: boolean; + + /** Enables or disables the search behavior to find the specific list item by typing the text value. + * @Default {false} + */ + enableIncrementalSearch?: boolean; + + /** Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Displays the ListBox widget’s content from right to left when enabled. + * @Default {false} + */ + enableRTL?: boolean; + + /** Specifies ellipsis ("...") representation in an overflowed list item content when it is set to false. + * @Default {true} + */ + enableWordWrap?: boolean; + + /** Mapping fields for the data items of the ListBox widget. + * @Default {null} + */ + fields?: Fields; + + /** Defines the height of the ListBox widget. + * @Default {null} + */ + height?: string; + + /** Defines the height for individual ListBox item. + * @Default {null} + */ + itemHeight?: string; + + /** The number of list items to be shown in the ListBox widget. The remaining list items will be scrollable. + * @Default {null} + */ + itemsCount?: number; + + /** The total number of list items to be rendered in the ListBox widget. + * @Default {null} + */ + totalItemsCount?: number; + + /** The number of list items to be loaded in the list box while enabling virtual scrolling and when virtualScrollMode is set to continuous. + * @Default {5} + */ + itemRequestCount?: number; + + /** Loads data for the listbox by default (i.e. on initialization) when it is set to true. It creates empty ListBox if it is set to false. + * @Default {true} + */ + loadDataOnInit?: boolean; + + /** The query to retrieve required data from the data source. + * @Default {ej.Query()} + */ + query?: ej.Query; + + /** The list item to be selected by default using its index. + * @Default {null} + */ + selectedIndex?: number; + + /** The list items to be selected by default using its indices. To use this property allowMultiSelection should be enabled. + * @Default {[]} + */ + selectedIndices?: any[]; + + /** Enables/Disables the multi selection option with the help of checkbox control. + * @Default {false} + */ + showCheckbox?: boolean; + + /** To display the ListBox container with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Set to sort ListBox items either by Ascending or Descending order. By default sortOrder is set as enum type of "None".You can use only below mentioned type for sorting + * purpose. + * @Default {ej.SortOrder.None} + */ + sortOrder?: ej.ListBox.SortOrder|string; + + /** The template to display the ListBox widget with customized appearance. + * @Default {null} + */ + template?: string; + + /** Holds the selected items values and used to bind value to the list item using AngularJS and KnockoutJS. + * @Default {“”} + */ + value?: number; + + /** Specifies the virtual scroll mode to load the list data on demand via scrolling behavior. There are two types of mode. + * @Default {ej.VirtualScrollMode.Normal} + */ + virtualScrollMode?: ej.VirtualScrollMode|string; + + /** Defines the width of the ListBox widget. + * @Default {null} + */ + width?: string; + + /** Specifies the targetID for the listbox items. + * @Default {null} + */ + targetID?: string; + + /** Triggers before the AJAX request begins to load data in the ListBox widget. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Triggers after the data requested via AJAX is successfully loaded in the ListBox widget. + */ + actionSuccess?(e: ActionSuccessEventArgs): void; + + /** Triggers when the AJAX requests complete. The request may get failed or succeed. + */ + actionComplete?(e: ActionCompleteEventArgs): void; + + /** Triggers when the data requested from AJAX get failed. + */ + actionFailure?(e: ActionFailureEventArgs): void; + + /** Event will be triggered before the requested data via AJAX once loaded in successfully. + */ + actionBeforeSuccess?(e: ActionBeforeSuccessEventArgs): void; + + /** Triggers when the item selection is changed. + */ + change?(e: ChangeEventArgs): void; + + /** Triggers when the list item is checked or unchecked. + */ + checkChange?(e: CheckChangeEventArgs): void; + + /** Triggers when the ListBox widget is created successfully. + */ + create?(e: CreateEventArgs): void; + + /** Triggers when the ListBox widget is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Triggers when focus the listbox items. + */ + focusIn?(e: FocusInEventArgs): void; + + /** Triggers when focus out from listbox items. + */ + focusOut?(e: FocusOutEventArgs): void; + + /** Triggers when the list item is being dragged. + */ + itemDrag?(e: ItemDragEventArgs): void; + + /** Triggers when the list item is ready to be dragged. + */ + itemDragStart?(e: ItemDragStartEventArgs): void; + + /** Triggers when the list item stops dragging. + */ + itemDragStop?(e: ItemDragStopEventArgs): void; + + /** Triggers when the list item is dropped. + */ + itemDrop?(e: ItemDropEventArgs): void; + + /** Triggers when a list item gets selected. + */ + select?(e: SelectEventArgs): void; - /** Triggers when the list item is checked or unchecked. */ - checkChange?(e: CheckChangeEventArgs): void; + /** Triggers when a list item gets unselected. + */ + unselect?(e: UnselectEventArgs): void; + } - /** Triggers when the ListBox widget is created successfully. */ - create?(e: CreateEventArgs): void; - - /** Triggers when the ListBox widget is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; + export interface ActionBeginEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggers when focus the listbox items. */ - focusIn?(e: FocusInEventArgs): void; + /** returns the ListBox model + */ + model?: any; - /** Triggers when focus out from listbox items. */ - focusOut?(e: FocusOutEventArgs): void; + /** returns the name of the event + */ + type?: string; + } - /** Triggers when the list item is being dragged. */ - itemDrag?(e: ItemDragEventArgs): void; + export interface ActionSuccessEventArgs { - /** Triggers when the list item is ready to be dragged. */ - itemDragStart?(e: ItemDragStartEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggers when the list item stops dragging. */ - itemDragStop?(e: ItemDragStopEventArgs): void; + /** Returns number of times trying to fetch the data + */ + count?: number; - /** Triggers when the list item is dropped. */ - itemDrop?(e: ItemDropEventArgs): void; + /** returns the ListBox model + */ + model?: any; - /** Triggers when a list item gets selected. */ - select?(e: SelectEventArgs): void; + /** Returns the query for data retrieval + */ + query?: any; - /** Triggers when a list item gets unselected. */ - unselect?(e: UnselectEventArgs): void; - } + /** Returns the query for data retrieval from the Database + */ + request?: any; - export interface ActionBeginEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** returns the name of the event + */ + type?: string; - export interface ActionSuccessEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Returns the number of items fetched from remote data + */ + result?: any[]; - export interface ActionCompleteEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Returns the requested data + */ + xhr?: any; + } - export interface ActionFailureEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } + export interface ActionCompleteEventArgs { - export interface ActionBeforeSuccessEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** Returns number of times trying to fetch the data + */ + count?: number; - /** Name of the event. - */ - type?: string; + /** returns the ListBox model + */ + model?: any; - /** List of actual object. - */ - actual?: any; + /** Returns the query for data retrieval + */ + query?: any; - /** Object of ListBox widget which contains DataManager arguments - */ - request?: any; + /** Returns the query for data retrieval from the Database + */ + request?: any; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** List of array object - */ - result?: any[]; + /** Returns the number of items fetched from remote data + */ + result?: any[]; - /** ExecuteQuery object of DataManager - */ - xhr?: any; - } + /** Returns the requested data + */ + xhr?: any; + } - export interface ChangeEventArgs { + export interface ActionFailureEventArgs { - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Name of the event. - */ - type?: string; + /** Returns the error message + */ + error?: any; - /** List item object. - */ - item?: any; + /** returns the ListBox model + */ + model?: any; - /** The Datasource of the listbox. - */ - data?: any; + /** Returns the query for data retrieval + */ + query?: any; - /** List item’s index. - */ - index?: number; + /** returns the name of the event + */ + type?: string; + } - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + export interface ActionBeforeSuccessEventArgs { - /** Boolean value based on whether the list item is checked or not. - */ - isChecked?: boolean; + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** Boolean value based on whether the list item is selected or not. - */ - isSelected?: boolean; + /** Name of the event. + */ + type?: string; - /** Boolean value based on the list item is enabled or not. - */ - isEnabled?: boolean; + /** List of actual object. + */ + actual?: any; - /** List item’s text (label). - */ - text?: string; + /** Object of ListBox widget which contains DataManager arguments + */ + request?: any; - /** List item’s value. - */ - value?: string; - } + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - export interface CheckChangeEventArgs { + /** List of array object + */ + result?: any[]; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** ExecuteQuery object of DataManager + */ + xhr?: any; + } - /** Name of the event. - */ - type?: string; + export interface ChangeEventArgs { - /** List item object. - */ - item?: any; + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** The Datasource of the listbox. - */ - data?: any; + /** Name of the event. + */ + type?: string; - /** List item’s index. - */ - index?: number; + /** List item object. + */ + item?: any; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** The Datasource of the listbox. + */ + data?: any; - /** Boolean value based on whether the list item is checked or not. - */ - isChecked?: boolean; + /** List item’s index. + */ + index?: number; - /** Boolean value based on whether the list item is selected or not. - */ - isSelected?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Boolean value based on the list item is enabled or not. - */ - isEnabled?: boolean; + /** Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; - /** List item’s text (label). - */ - text?: string; + /** Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; - /** List item’s value. - */ - value?: string; - } + /** Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; - export interface CreateEventArgs { + /** List item’s text (label). + */ + text?: string; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** List item’s value. + */ + value?: string; + } - /** Name of the event. - */ - type?: string; + export interface CheckChangeEventArgs { - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - } + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - export interface DestroyEventArgs { + /** Name of the event. + */ + type?: string; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** List item object. + */ + item?: any; - /** Name of the event. - */ - type?: string; + /** The Datasource of the listbox. + */ + data?: any; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - } + /** List item’s index. + */ + index?: number; - export interface FocusInEventArgs { + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; - /** Name of the event. - */ - type?: string; + /** Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - } + /** Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; - export interface FocusOutEventArgs { + /** List item’s text (label). + */ + text?: string; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** List item’s value. + */ + value?: string; + } - /** Name of the event. - */ - type?: string; + export interface CreateEventArgs { - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - } + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - export interface ItemDragEventArgs { + /** Name of the event. + */ + type?: string; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + } - /** Name of the event. - */ - type?: string; + export interface DestroyEventArgs { - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** The Datasource of the listbox. - */ - data?: any; + /** Name of the event. + */ + type?: string; - /** List item’s index. - */ - index?: number; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + } - /** Boolean value based on whether the list item is checked or not. - */ - isChecked?: boolean; + export interface FocusInEventArgs { - /** Boolean value based on whether the list item is selected or not. - */ - isSelected?: boolean; + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** Boolean value based on whether the list item is enabled or not. - */ - isEnabled?: boolean; + /** Name of the event. + */ + type?: string; - /** List item’s text (label). - */ - text?: string; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + } - /** List item’s value. - */ - value?: string; - } + export interface FocusOutEventArgs { - export interface ItemDragStartEventArgs { + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** Name of the event. + */ + type?: string; - /** Name of the event. - */ - type?: string; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + } - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + export interface ItemDragEventArgs { - /** The Datasource of the listbox. - */ - data?: any; + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** List item’s index. - */ - index?: number; + /** Name of the event. + */ + type?: string; - /** Boolean value based on whether the list item is checked or not. - */ - isChecked?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Boolean value based on whether the list item is selected or not. - */ - isSelected?: boolean; + /** The Datasource of the listbox. + */ + data?: any; - /** Boolean value based on whether the list item is enabled or not. - */ - isEnabled?: boolean; + /** List item’s index. + */ + index?: number; - /** List item’s text (label). - */ - text?: string; + /** Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; - /** List item’s value. - */ - value?: string; - } + /** Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; - export interface ItemDragStopEventArgs { + /** Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** List item’s text (label). + */ + text?: string; - /** Name of the event. - */ - type?: string; + /** List item’s value. + */ + value?: string; + } - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + export interface ItemDragStartEventArgs { - /** The Datasource of the listbox. - */ - data?: any; + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** List item’s index. - */ - index?: number; + /** Name of the event. + */ + type?: string; - /** Boolean value based on whether the list item is checked or not. - */ - isChecked?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Boolean value based on whether the list item is selected or not. - */ - isSelected?: boolean; + /** The Datasource of the listbox. + */ + data?: any; - /** Boolean value based on whether the list item is enabled or not. - */ - isEnabled?: boolean; + /** List item’s index. + */ + index?: number; - /** List item’s text (label). - */ - text?: string; + /** Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; - /** List item’s value. - */ - value?: string; - } + /** Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; - export interface ItemDropEventArgs { + /** Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** List item’s text (label). + */ + text?: string; - /** Name of the event. - */ - type?: string; + /** List item’s value. + */ + value?: string; + } - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + export interface ItemDragStopEventArgs { - /** The Datasource of the listbox. - */ - data?: any; + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** List item’s index. - */ - index?: number; + /** Name of the event. + */ + type?: string; - /** Boolean value based on whether the list item is checked or not. - */ - isChecked?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Boolean value based on whether the list item is selected or not. - */ - isSelected?: boolean; + /** The Datasource of the listbox. + */ + data?: any; - /** Boolean value based on whether the list item is enabled or not. - */ - isEnabled?: boolean; + /** List item’s index. + */ + index?: number; - /** List item’s text (label). - */ - text?: string; + /** Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; - /** List item’s value. - */ - value?: string; - } + /** Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; - export interface SelectEventArgs { + /** Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; + /** List item’s text (label). + */ + text?: string; - /** Name of the event. - */ - type?: string; + /** List item’s value. + */ + value?: string; + } - /** List item object. - */ - item?: any; + export interface ItemDropEventArgs { - /** The Datasource of the listbox. - */ - data?: any; + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** List item’s index. - */ - index?: number; + /** Name of the event. + */ + type?: string; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Boolean value based on whether the list item is checked or not. - */ - isChecked?: boolean; + /** The Datasource of the listbox. + */ + data?: any; - /** Boolean value based on whether the list item is selected or not. - */ - isSelected?: boolean; + /** List item’s index. + */ + index?: number; - /** Boolean value based on the list item is enabled or not. - */ - isEnabled?: boolean; + /** Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; - /** List item’s text (label). - */ - text?: string; + /** Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; - /** List item’s value. - */ - value?: string; - } + /** Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; - export interface UnselectEventArgs { + /** List item’s text (label). + */ + text?: string; - /** Instance of the listbox model object. - */ - model?: ej.ListBox.Model; - - /** Name of the event. - */ - type?: string; + /** List item’s value. + */ + value?: string; + } - /** List item object. - */ - item?: any; - - /** The Datasource of the listbox. - */ - data?: any; - - /** List item’s index. - */ - index?: number; - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - - /** Boolean value based on whether the list item is checked or not. - */ - isChecked?: boolean; - - /** Boolean value based on whether the list item is selected or not. - */ - isSelected?: boolean; - - /** Boolean value based on the list item is enabled or not. - */ - isEnabled?: boolean; - - /** List item’s text (label). - */ - text?: string; - - /** List item’s value. - */ - value?: string; - } - - export interface Fields { - - /** Defines the specific field name which contains Boolean values to specify whether the list items to be checked by default or not. - */ - checkBy?: boolean; - - /** The grouping in the ListBox widget can be defined using this field. - */ - groupBy?: string; - - /** Defines the HTML attributes such as id, class, styles for the specific ListBox item. - */ - htmlAttributes?: any; - - /** Defines the specific field name which contains id values for the list items. - */ - id?: string; - - /** Defines the imageURL for the image to be displayed in the ListBox item. - */ - imageUrl?: string; - - /** Defines the image attributes such as height, width, styles and so on. - */ - imageAttributes?: string; - - /** Defines the specific field name which contains Boolean values to specify whether the list items to be selected by default or not. - */ - selectBy?: boolean; - - /** Defines the sprite CSS class for the image to be displayed. - */ - spriteCssClass?: string; - - /** Defines the table name to get the specific set of list items to be loaded in the ListBox widget while rendering with remote data. - */ - tableName?: string; - - /** Defines the specific field name in the data source to load the list with data. - */ - text?: string; - - /** Defines the specific field name in the data source to load the list with data value property. - */ - value?: string; - } - } - - class Calculate { - static fn: Calculate; - constructor(element: JQuery | Element, options?: Calculate.Model); - static Locale: any; - model: Calculate.Model; - defaults: Calculate.Model; - - /** Add the custom formulas with function in CalcEngine library - * @param {string} pass the formula name - * @param {string} pass the custom function name to call - * @returns {void} - */ - addCustomFunction(FormulaName: string, FunctionName: string): void; - - /** Adds a named range to the NamedRanges collection - * @param {string} pass the namedRange's name - * @param {string} pass the cell range of NamedRange - * @returns {void} - */ - addNamedRange(Name: string, cellRange: string): void; - - /** Accepts a possible parsed formula and returns the calculated value without quotes. - * @param {string} pass the cell range to adjust its range - * @returns {string} - */ - adjustRangeArg(Name: string): string; - - /** When a formula cell changes, call this method to clear it from its dependent cells. - * @param {string} pass the changed cell address - * @returns {void} - */ - clearFormulaDependentCells(Cell: string): void; - - /** Call this method to clear whether an exception was raised during the computation of a library function. - * @returns {void} - */ - clearLibraryComputationException(): void; - - /** Get the column index from a cell reference passed in. - * @param {string} pass the cell address - * @returns {void} - */ - colIndex(Cell: string): void; - - /** Evaluates a parsed formula. - * @param {string} pass the parsed formula - * @returns {string} - */ - computedValue(Formula: string): string; - - /** Evaluates a parsed formula. - * @param {string} pass the parsed formula - * @returns {string} - */ - computeFormula(Formula: string): string; - } - export namespace Calculate { - - export interface Model { - /** Returns the cancel option value. - */ - cancel?: boolean; - } - } - - class CheckBox extends ej.Widget { - static fn: CheckBox; - constructor(element: JQuery | Element, options?: CheckBox.Model); - static Locale: any; - model: CheckBox.Model; - defaults: CheckBox.Model; - - /** Destroy the CheckBox widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** Disable the CheckBox to prevent all user interactions. - * @returns {void} - */ - disable(): void; - - /** To enable the CheckBox - * @returns {void} - */ - enable(): void; - - /** To Check the status of CheckBox - * @returns {boolean} - */ - isChecked(): boolean; - } - export namespace CheckBox { - - export interface Model { - - /** Specifies whether CheckBox has to be in checked or not. - * We can also specify array of string as value for this property. - * If any of the value in the specified array matches the value of the textbox, - * then it will be considered as checked. It will be useful in MVVM binding, - * specify array type to identify the values of the checked CheckBoxes. - * @Default {false} - */ - checked?: boolean | string[]; - - /** Specifies the State of CheckBox.See below to get available CheckState - * @Default {null} - */ - checkState?: ej.CheckState | string; - - /** Sets the root CSS class for CheckBox theme, which is used customize. - */ - cssClass?: string; - - /** Specifies the checkbox control state. - * @Default {true} - */ - enabled?: boolean; - - /** Specifies the persist property for CheckBox while initialization. - * The persist API save current model value to browser cookies for state maintains. - * While refreshing the CheckBox control page the model value apply from browser cookies. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Specify the Right to Left direction to Checkbox - * @Default {false} - */ - enableRTL?: boolean; - - /** Specifies the enable or disable Tri-State for checkbox control. - * @Default {false} - */ - enableTriState?: boolean; - - /** It allows to define the characteristics of the CheckBox control. It will helps to extend the capability of an HTML element. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specified value to be added an id attribute of the CheckBox. - * @Default {null} - */ - id?: string; - - /** Specify the prefix value of id to be added before the current id of the CheckBox. - * @Default {ej} - */ - idPrefix?: string; - - /** Specifies the name attribute of the CheckBox. - * @Default {null} - */ - name?: string; - - /** Displays rounded corner borders to CheckBox - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specifies the size of the CheckBox.See below to know available CheckboxSize - * @Default {small} - */ - size?: ej.CheckboxSize | string; - - /** Specifies the text content to be displayed for CheckBox. - */ - text?: string; - - /** Set the jQuery validation error message in CheckBox. - * @Default {null} - */ - validationMessage?: any; - - /** Set the jQuery validation rules in CheckBox. - * @Default {null} - */ - validationRules?: any; - - /** Specifies the value attribute of the CheckBox. - * @Default {null} - */ - value?: string; - - /** Fires before the CheckBox is going to changed its state successfully */ - beforeChange?(e: BeforeChangeEventArgs): void; - - /** Fires when the CheckBox state is changed successfully */ - change?(e: ChangeEventArgs): void; - - /** Fires when the CheckBox state is created successfully */ - create?(e: CreateEventArgs): void; - - /** Fires when the CheckBox state is destroyed successfully */ - destroy?(e: DestroyEventArgs): void; - } - - export interface BeforeChangeEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the CheckBox model - */ - model?: ej.CheckBox.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the event model values - */ - event?: any; - - /** returns the status whether the element is checked or not. - */ - isChecked?: boolean; - } - - export interface ChangeEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the CheckBox model - */ - model?: ej.CheckBox.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the event arguments - */ - event?: any; - - /** returns the status whether the element is checked or not. - */ - isChecked?: boolean; - - /** returns the state of the checkbox - */ - checkState?: string; - } - - export interface CreateEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the CheckBox model - */ - model?: ej.CheckBox.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the CheckBox model - */ - model?: ej.CheckBox.Model; - - /** returns the name of the event - */ - type?: string; - } - } - enum CheckState { - //string - Uncheck, - //string - Check, - //string - Indeterminate, - } - enum CheckboxSize { - //Displays the CheckBox in medium size - Medium, - //Displays the CheckBox in small size - Small, - } - - class ColorPicker extends ej.Widget { - static fn: ColorPicker; - constructor(element: JQuery | Element, options?: ColorPicker.Model); - static Locale: any; - model: ColorPicker.Model; - defaults: ColorPicker.Model; - - /** Disables the color picker control - * @returns {void} - */ - disable(): void; - - /** Enable the color picker control - * @returns {void} - */ - enable(): void; - - /** Gets the selected color in RGB format - * @returns {any} - */ - getColor(): any; - - /** Gets the selected color value as string - * @returns {string} - */ - getValue(): string; - - /** To Convert color value from hexCode to RGB - * @param {string} Specified HEX code converted to RGB - * @returns {any} - */ - hexCodeToRGB(colorCode: string): any; - - /** Hides the ColorPicker popup, if in opened state. - * @returns {void} - */ - hide(): void; - - /** Convert color value from HSV to RGB - * @param {any} Specified HSV code converted to RGB - * @returns {any} - */ - HSVToRGB(HSV: any): any; - - /** Convert color value from RGB to HEX - * @param {any} Specified RGB code converted to HEX code - * @returns {string} - */ - RGBToHEX(RGB: any): string; - - /** Convert color value from RGB to HSV - * @param {any} Specified RGB code converted to HSV code - * @returns {any} - */ - RGBToHSV(RGB: any): any; - - /** Open the ColorPicker popup. - * @returns {void} - */ - show(): void; - } - export namespace ColorPicker { - - export interface Model { - - /** The ColorPicker control allows to define the customized text to displayed in button elements. Using the property to achieve the customized culture values. - * @Default {{ apply: Apply, cancel: Cancel, swatches: Swatches }} - */ - buttonText?: ButtonText; - - /** Allows to change the mode of the button. Please refer below to know available button mode - * @Default {ej.ButtonMode.Split} - */ - buttonMode?: ej.ButtonMode | string; - - /** Specifies the number of columns to be displayed color palette model. - * @Default {10} - */ - columns?: number | string; - - /** This property allows you to customize its appearance using user-defined CSS and custom skin options such as colors and backgrounds. - */ - cssClass?: string; - - /** This property allows to define the custom colors in the palette model.Custom palettes are created by passing a comma delimited string of HEX values or an array of colors. - * @Default {empty} - */ - custom?: any[]; - - /** This property allows to embed the popup in the order of DOM element flow . When we set the value as true, the color picker popup is always in visible state. - * @Default {false} - */ - displayInline?: boolean; - - /** This property allows to change the control in enabled or disabled state. - * @Default {true} - */ - enabled?: boolean; - - /** This property allows to enable or disable the opacity slider in the color picker control - * @Default {true} - */ - enableOpacity?: boolean; - - /** It allows to define the characteristics of the ColorPicker control. It will helps to extend the capability of an HTML element. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Defines the localized text values in button and tooltip. - * @Default {en-US} - */ - locale?: string; - - /** Specifies the model type to be rendered initially in the color picker control. See below to get available ModelType - * @Default {ej.ColorPicker.ModelType.Default} - */ - modelType?: ej.ColorPicker.ModelType | string; - - /** This property allows to change the opacity value .The selected color opacity will be adjusted by using this opacity value. - * @Default {100} - */ - opacityValue?: number | string; - - /** Specifies the palette type to be displayed at initial time in palette model.There two types of palette model available in ColorPicker control. See below available Palette - * @Default {ej.ColorPicker.Palette.BasicPalette} - */ - palette?: ej.ColorPicker.Palette | string; - - /** This property allows to define the preset model to be rendered initially in palette type.It consists of 12 different types of presets. Each presets have 50 colors. - * See below available Presets - * @Default {ej.ColorPicker.Presets.Basic} - */ - presetType?: ej.ColorPicker.Presets | string; - - /** Allows to show/hides the apply and cancel buttons in ColorPicker control - * @Default {true} - */ - showApplyCancel?: boolean; - - /** Allows to show/hides the clear button in ColorPicker control - * @Default {true} - */ - showClearButton?: boolean; - - /** This property allows to provides live preview support for current cursor selection color and selected color. - * @Default {true} - */ - showPreview?: boolean; - - /** This property allows to store the color values in custom list.The ColorPicker will keep up to 11 colors in a custom list. - * By clicking the add button, the selected color from picker or palette will get added in the recent color list. - * @Default {false} - */ - showRecentColors?: boolean; - - /** Allows to show/hides the switcher button in ColorPicker control.It helps to switch palette or picker mode in colorpicker. - * @Default {true} - */ - showSwitcher?: boolean; - - /** This property allows to shows tooltip to notify the slider value in color picker control. - * @Default {false} - */ - showTooltip?: boolean; - - /** Specifies the toolIcon to be displayed in dropdown control color area. - * @Default {null} - */ - toolIcon?: string; - - /** This property allows to define the customized text or content to displayed when mouse over the following elements. This property also allows to use the culture values. - * @Default {{ switcher: Switcher, addbutton: Add Color, basic: Basic, monochrome: Mono Chrome, flatcolors: Flat Color, seawolf: Sea Wolf, webcolors: Web Colors, - * sandy: Sandy, pinkshades: Pink Shades, misty: Misty, citrus: Citrus, vintage: Vintage, moonlight: Moon Light, candycrush: Candy Crush, - * currentcolor: Current Color, selectedcolor: Selected Color }} - */ - tooltipText?: TooltipText; - - /** Specifies the color value for color picker control, the value is in hexadecimal form with prefix of "#". - * @Default {null} - */ - value?: string; - - /** Fires after Color value has been changed successfully.If the user want to perform any operation after the color value changed then the user can make use of this change event. */ - change?(e: ChangeEventArgs): void; - - /** Fires after closing the color picker popup. */ - close?(e: CloseEventArgs): void; - - /** Fires after Color picker control is created. If the user want to perform any operation after the color picker control creation then the user can make use of this create event. */ - create?(e: CreateEventArgs): void; - - /** Fires after Color picker control is destroyed. If the user want to perform any operation after the color picker control destroyed then the user can make use of this destroy event. */ - destroy?(e: DestroyEventArgs): void; - - /** Fires after opening the color picker popup */ - open?(e: OpenEventArgs): void; - - /** Fires after Color value has been selected successfully. If the user want to perform any operation after the color value selected then the user can make use of this select event. */ - select?(e: SelectEventArgs): void; - } - - export interface ChangeEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the color picker model - */ - model?: ej.ColorPicker.Model; - - /** returns the name of the event - */ - type?: string; - - /** return the changed color value - */ - value?: string; - } + export interface SelectEventArgs { - export interface CloseEventArgs { + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Name of the event. + */ + type?: string; - /** returns the color picker model - */ - model?: ej.ColorPicker.Model; + /** List item object. + */ + item?: any; - /** returns the name of the event - */ - type?: string; - } + /** The Datasource of the listbox. + */ + data?: any; - export interface CreateEventArgs { + /** List item’s index. + */ + index?: number; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** returns the color picker model - */ - model?: any; + /** Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; - /** returns the name of the event - */ - type?: string; - } + /** Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; - export interface DestroyEventArgs { + /** Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** List item’s text (label). + */ + text?: string; - /** returns the color picker model - */ - model?: ej.ColorPicker.Model; + /** List item’s value. + */ + value?: string; + } - /** returns the name of the event - */ - type?: string; - } + export interface UnselectEventArgs { - export interface OpenEventArgs { + /** Instance of the listbox model object. + */ + model?: ej.ListBox.Model; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Name of the event. + */ + type?: string; - /** returns the color picker model - */ - model?: ej.ColorPicker.Model; + /** List item object. + */ + item?: any; - /** returns the name of the event - */ - type?: string; - } + /** The Datasource of the listbox. + */ + data?: any; - export interface SelectEventArgs { + /** List item’s index. + */ + index?: number; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** returns the color picker model - */ - model?: ej.ColorPicker.Model; + /** Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; - /** returns the name of the event - */ - type?: string; + /** Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /** Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; + + /** List item’s text (label). + */ + text?: string; + + /** List item’s value. + */ + value?: string; + } + + export interface Fields { + + /** Defines the specific field name which contains Boolean values to specify whether the list items to be checked by default or not. + */ + checkBy?: boolean; + + /** The grouping in the ListBox widget can be defined using this field. + */ + groupBy?: string; + + /** Defines the HTML attributes such as id, class, styles for the specific ListBox item. + */ + htmlAttributes?: any; + + /** Defines the specific field name which contains id values for the list items. + */ + id?: string; + + /** Defines the imageURL for the image to be displayed in the ListBox item. + */ + imageUrl?: string; + + /** Defines the image attributes such as height, width, styles and so on. + */ + imageAttributes?: string; + + /** Defines the specific field name which contains Boolean values to specify whether the list items to be selected by default or not. + */ + selectBy?: boolean; + + /** Defines the sprite CSS class for the image to be displayed. + */ + spriteCssClass?: string; + + /** Defines the table name to get the specific set of list items to be loaded in the ListBox widget while rendering with remote data. + */ + tableName?: string; + + /** Defines the specific field name in the data source to load the list with data. + */ + text?: string; + + /** Defines the specific field name in the data source to load the list with data value property. + */ + value?: string; + } + + enum SortOrder { + + ///The items are not sorted. + None, + + ///To sort items in Ascending order. + Ascending, + + ///To sort items in Descending order. + Descending + } + + } + + class Calculate { + static fn: Calculate; + constructor(element: JQuery | Element, options?: Calculate.Model); + static Locale: any; + model: Calculate.Model; + defaults: Calculate.Model; + + /** Add the custom formulas with function in CalcEngine library + * @param {string} pass the formula name + * @param {string} pass the custom function name to call + * @returns {void} + */ + addCustomFunction(FormulaName: string, FunctionName: string): void; + + /** Adds a named range to the NamedRanges collection + * @param {string} pass the namedRange's name + * @param {string} pass the cell range of NamedRange + * @returns {void} + */ + addNamedRange(Name: string, cellRange: string): void; + + /** Accepts a possible parsed formula and returns the calculated value without quotes. + * @param {string} pass the cell range to adjust its range + * @returns {string} + */ + adjustRangeArg(Name: string): string; + + /** When a formula cell changes, call this method to clear it from its dependent cells. + * @param {string} pass the changed cell address + * @returns {void} + */ + clearFormulaDependentCells(Cell: string): void; + + /** Call this method to clear whether an exception was raised during the computation of a library function. + * @returns {void} + */ + clearLibraryComputationException(): void; + + /** Get the column index from a cell reference passed in. + * @param {string} pass the cell address + * @returns {void} + */ + colIndex(Cell: string): void; + + /** Evaluates a parsed formula. + * @param {string} pass the parsed formula + * @returns {string} + */ + computedValue(Formula: string): string; + + /** Evaluates a parsed formula. + * @param {string} pass the parsed formula + * @returns {string} + */ + computeFormula(Formula: string): string; + } + export namespace Calculate { + + export interface Model { + } + } + + class CheckBox extends ej.Widget { + static fn: CheckBox; + constructor(element: JQuery | Element, options?: CheckBox.Model); + static Locale: any; + model: CheckBox.Model; + defaults: CheckBox.Model; + + /** Destroy the CheckBox widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Disable the CheckBox to prevent all user interactions. + * @returns {void} + */ + disable(): void; + + /** To enable the CheckBox + * @returns {void} + */ + enable(): void; + + /** To Check the status of CheckBox + * @returns {boolean} + */ + isChecked(): boolean; + } + export namespace CheckBox { + + export interface Model { + + /** Specifies whether CheckBox has to be in checked or not. We can also specify array of string as value for this property. If any of the value in the specified array matches the + * value of the textbox, then it will be considered as checked. It will be useful in MVVM binding, specify array type to identify the values of the checked CheckBoxes. + * @Default {false} + */ + checked?: boolean|string[]; + + /** Specifies the State of CheckBox.See below to get available CheckState + * @Default {null} + */ + checkState?: ej.CheckState|string; + + /** Sets the root CSS class for CheckBox theme, which is used customize. + */ + cssClass?: string; + + /** Specifies the checkbox control state. + * @Default {true} + */ + enabled?: boolean; + + /** Specifies the persist property for CheckBox while initialization. The persist API save current model value to browser cookies for state maintains. While refreshing the CheckBox + * control page the model value apply from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Specify the Right to Left direction to Checkbox + * @Default {false} + */ + enableRTL?: boolean; + + /** Specifies the enable or disable Tri-State for checkbox control. + * @Default {false} + */ + enableTriState?: boolean; + + /** It allows to define the characteristics of the CheckBox control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specified value to be added an id attribute of the CheckBox. + * @Default {null} + */ + id?: string; + + /** Specify the prefix value of id to be added before the current id of the CheckBox. + * @Default {ej} + */ + idPrefix?: string; + + /** Specifies the name attribute of the CheckBox. + * @Default {null} + */ + name?: string; + + /** Displays rounded corner borders to CheckBox + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies the size of the CheckBox.See below to know available CheckboxSize + * @Default {small} + */ + size?: ej.CheckboxSize|string; + + /** Specifies the text content to be displayed for CheckBox. + */ + text?: string; + + /** Set the jQuery validation error message in CheckBox. + * @Default {null} + */ + validationMessage?: any; + + /** Set the jQuery validation rules in CheckBox. + * @Default {null} + */ + validationRules?: any; + + /** Specifies the value attribute of the CheckBox. + * @Default {null} + */ + value?: string; + + /** Fires before the CheckBox is going to changed its state successfully + */ + beforeChange?(e: BeforeChangeEventArgs): void; + + /** Fires when the CheckBox state is changed successfully + */ + change?(e: ChangeEventArgs): void; + + /** Fires when the CheckBox state is created successfully + */ + create?(e: CreateEventArgs): void; + + /** Fires when the CheckBox state is destroyed successfully + */ + destroy?(e: DestroyEventArgs): void; + } + + export interface BeforeChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event model values + */ + event?: any; + + /** returns the status whether the element is checked or not. + */ + isChecked?: boolean; + } + + export interface ChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event arguments + */ + event?: any; + + /** returns the status whether the element is checked or not. + */ + isChecked?: boolean; + + /** returns the state of the checkbox + */ + checkState?: string; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /** returns the name of the event + */ + type?: string; + } + } + enum CheckState { + //string + Uncheck, + //string + Check, + //string + Indeterminate, + } + enum CheckboxSize { + //Displays the CheckBox in medium size + Medium, + //Displays the CheckBox in small size + Small, + } + + class ColorPicker extends ej.Widget { + static fn: ColorPicker; + constructor(element: JQuery | Element, options?: ColorPicker.Model); + static Locale: any; + model: ColorPicker.Model; + defaults: ColorPicker.Model; + + /** Disables the color picker control + * @returns {void} + */ + disable(): void; + + /** Enable the color picker control + * @returns {void} + */ + enable(): void; + + /** Gets the selected color in RGB format + * @returns {any} + */ + getColor(): any; + + /** Gets the selected color value as string + * @returns {string} + */ + getValue(): string; + + /** To Convert color value from hexCode to RGB + * @param {string} Specified HEX code converted to RGB + * @returns {any} + */ + hexCodeToRGB(colorCode: string): any; + + /** Hides the ColorPicker popup, if in opened state. + * @returns {void} + */ + hide(): void; + + /** Convert color value from HSV to RGB + * @param {any} Specified HSV code converted to RGB + * @returns {any} + */ + HSVToRGB(HSV: any): any; + + /** Convert color value from RGB to HEX + * @param {any} Specified RGB code converted to HEX code + * @returns {string} + */ + RGBToHEX(RGB: any): string; + + /** Convert color value from RGB to HSV + * @param {any} Specified RGB code converted to HSV code + * @returns {any} + */ + RGBToHSV(RGB: any): any; + + /** Open the ColorPicker popup. + * @returns {void} + */ + show(): void; + } + export namespace ColorPicker { + + export interface Model { + + /** The ColorPicker control allows to define the customized text to displayed in button elements. Using the property to achieve the customized culture values. + * @Default {{ apply: Apply, cancel: Cancel, swatches: Swatches }} + */ + buttonText?: ButtonText; + + /** Allows to change the mode of the button. Please refer below to know available button mode + * @Default {ej.ButtonMode.Split} + */ + buttonMode?: ej.ButtonMode|string; + + /** Specifies the number of columns to be displayed color palette model. + * @Default {10} + */ + columns?: number|string; + + /** This property allows you to customize its appearance using user-defined CSS and custom skin options such as colors and backgrounds. + */ + cssClass?: string; + + /** This property allows to define the custom colors in the palette model.Custom palettes are created by passing a comma delimited string of HEX values or an array of colors. + * @Default {empty} + */ + custom?: any[]; + + /** This property allows to embed the popup in the order of DOM element flow . When we set the value as true, the color picker popup is always in visible state. + * @Default {false} + */ + displayInline?: boolean; + + /** This property allows to change the control in enabled or disabled state. + * @Default {true} + */ + enabled?: boolean; + + /** This property allows to enable or disable the opacity slider in the color picker control + * @Default {true} + */ + enableOpacity?: boolean; + + /** It allows to define the characteristics of the ColorPicker control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Defines the localized text values in button and tooltip. + * @Default {en-US} + */ + locale?: string; + + /** Specifies the model type to be rendered initially in the color picker control. See below to get available ModelType + * @Default {ej.ColorPicker.ModelType.Default} + */ + modelType?: ej.ColorPicker.ModelType|string; + + /** This property allows to change the opacity value .The selected color opacity will be adjusted by using this opacity value. + * @Default {100} + */ + opacityValue?: number|string; + + /** Specifies the palette type to be displayed at initial time in palette model.There two types of palette model available in ColorPicker control. See below available Palette + * @Default {ej.ColorPicker.Palette.BasicPalette} + */ + palette?: ej.ColorPicker.Palette|string; + + /** This property allows to define the preset model to be rendered initially in palette type.It consists of 12 different types of presets. Each presets have 50 colors. See below + * available Presets + * @Default {ej.ColorPicker.Presets.Basic} + */ + presetType?: ej.ColorPicker.Presets|string; + + /** Allows to show/hides the apply and cancel buttons in ColorPicker control + * @Default {true} + */ + showApplyCancel?: boolean; + + /** Allows to show/hides the clear button in ColorPicker control + * @Default {true} + */ + showClearButton?: boolean; + + /** This property allows to provides live preview support for current cursor selection color and selected color. + * @Default {true} + */ + showPreview?: boolean; + + /** This property allows to store the color values in custom list.The ColorPicker will keep up to 11 colors in a custom list.By clicking the add button, the selected color from picker + * or palette will get added in the recent color list. + * @Default {false} + */ + showRecentColors?: boolean; + + /** Allows to show/hides the switcher button in ColorPicker control.It helps to switch palette or picker mode in colorpicker. + * @Default {true} + */ + showSwitcher?: boolean; + + /** This property allows to shows tooltip to notify the slider value in color picker control. + * @Default {false} + */ + showTooltip?: boolean; + + /** Specifies the toolIcon to be displayed in dropdown control color area. + * @Default {null} + */ + toolIcon?: string; + + /** This property allows to define the customized text or content to displayed when mouse over the following elements. This property also allows to use the culture values. + * @Default {{ switcher: Switcher, addbutton: Add Color, basic: Basic, monochrome: Mono Chrome, flatcolors: Flat Color, seawolf: Sea Wolf, webcolors: Web Colors, sandy: Sandy, + * pinkshades: Pink Shades, misty: Misty, citrus: Citrus, vintage: Vintage, moonlight: Moon Light, candycrush: Candy Crush, currentcolor: Current Color, selectedcolor: Selected + * Color }} + */ + tooltipText?: TooltipText; + + /** Specifies the color value for color picker control, the value is in hexadecimal form with prefix of "#". + * @Default {null} + */ + value?: string; + + /** Fires after Color value has been changed successfully.If the user want to perform any operation after the color value changed then the user can make use of this change event. + */ + change?(e: ChangeEventArgs): void; + + /** Fires after closing the color picker popup. + */ + close?(e: CloseEventArgs): void; + + /** Fires after Color picker control is created. If the user want to perform any operation after the color picker control creation then the user can make use of this create event. + */ + create?(e: CreateEventArgs): void; + + /** Fires after Color picker control is destroyed. If the user want to perform any operation after the color picker control destroyed then the user can make use of this destroy event. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires after opening the color picker popup + */ + open?(e: OpenEventArgs): void; + + /** Fires after Color value has been selected successfully. If the user want to perform any operation after the color value selected then the user can make use of this select event. + */ + select?(e: SelectEventArgs): void; + } + + export interface ChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /** returns the name of the event + */ + type?: string; + + /** return the changed color value + */ + value?: string; + } + + export interface CloseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface CreateEventArgs { - /** return the selected color value - */ - value?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface ButtonText { + /** returns the color picker model + */ + model?: any; - /** Sets the text for the apply button. - */ - apply?: string; + /** returns the name of the event + */ + type?: string; + } - /** Sets the text for the cancel button. - */ - cancel?: string; + export interface DestroyEventArgs { - /** Sets the header text for the swatches area. - */ - swatches?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface TooltipText { + /** returns the color picker model + */ + model?: ej.ColorPicker.Model; - /** Sets the tooltip text for the switcher button. - */ - switcher?: string; + /** returns the name of the event + */ + type?: string; + } - /** Sets the tooltip text for the add button. - */ - addbutton?: string; + export interface OpenEventArgs { - /** Sets the tooltip text for the basic preset. - */ - basic?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Sets the tooltip text for the mono chrome preset. - */ - monochrome?: string; + /** returns the color picker model + */ + model?: ej.ColorPicker.Model; - /** Sets the tooltip text for the flat colors preset. - */ - flatcolors?: string; + /** returns the name of the event + */ + type?: string; + } - /** Sets the tooltip text for the sea wolf preset. - */ - seawolf?: string; + export interface SelectEventArgs { - /** Sets the tooltip text for the web colors preset. - */ - webcolors?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Sets the tooltip text for the sandy preset. - */ - sandy?: string; + /** returns the color picker model + */ + model?: ej.ColorPicker.Model; - /** Sets the tooltip text for the pink shades preset. - */ - pinkshades?: string; + /** returns the name of the event + */ + type?: string; - /** Sets the tooltip text for the misty preset. - */ - misty?: string; + /** return the selected color value + */ + value?: string; + } - /** Sets the tooltip text for the citrus preset. - */ - citrus?: string; + export interface ButtonText { - /** Sets the tooltip text for the vintage preset. - */ - vintage?: string; + /** Sets the text for the apply button. + */ + apply?: string; - /** Sets the tooltip text for the moon light preset. - */ - moonlight?: string; + /** Sets the text for the cancel button. + */ + cancel?: string; - /** Sets the tooltip text for the candy crush preset. - */ - candycrush?: string; + /** Sets the header text for the swatches area. + */ + swatches?: string; + } - /** Sets the tooltip text for the current color area. - */ - currentcolor?: string; + export interface TooltipText { - /** Sets the tooltip text for the selected color area. - */ - selectedcolor?: string; - } + /** Sets the tooltip text for the switcher button. + */ + switcher?: string; - enum ModelType { + /** Sets the tooltip text for the add button. + */ + addbutton?: string; - ///support palette type mode in color picker. - Palette, + /** Sets the tooltip text for the basic preset. + */ + basic?: string; - ///support palette type mode in color picker. - Picker - } + /** Sets the tooltip text for the mono chrome preset. + */ + monochrome?: string; + /** Sets the tooltip text for the flat colors preset. + */ + flatcolors?: string; - enum Palette { + /** Sets the tooltip text for the sea wolf preset. + */ + seawolf?: string; - ///used to show the basic palette - BasicPalette, + /** Sets the tooltip text for the web colors preset. + */ + webcolors?: string; - ///used to show the custompalette - CustomPalette - } + /** Sets the tooltip text for the sandy preset. + */ + sandy?: string; + /** Sets the tooltip text for the pink shades preset. + */ + pinkshades?: string; - enum Presets { + /** Sets the tooltip text for the misty preset. + */ + misty?: string; - ///used to show the basic presets - Basic, + /** Sets the tooltip text for the citrus preset. + */ + citrus?: string; - ///used to show the CandyCrush colors presets - CandyCrush, + /** Sets the tooltip text for the vintage preset. + */ + vintage?: string; - ///used to show the Citrus colors presets - Citrus, + /** Sets the tooltip text for the moon light preset. + */ + moonlight?: string; - ///used to show the FlatColors presets - FlatColors, + /** Sets the tooltip text for the candy crush preset. + */ + candycrush?: string; - ///used to show the Misty presets - Misty, + /** Sets the tooltip text for the current color area. + */ + currentcolor?: string; - ///used to show the MoonLight presets - MoonLight, - - ///used to show the PinkShades presets - PinkShades, + /** Sets the tooltip text for the selected color area. + */ + selectedcolor?: string; + } - ///used to show the Sandy presets - Sandy, + enum ModelType { - ///used to show the Seawolf presets - SeaWolf, - - ///used to show the Vintage presets - Vintage, - - ///used to show the WebColors presets - WebColors - } - - } - enum ButtonMode { - //Displays the button in split mode - Split, - //Displays the button in Dropdown mode - Dropdown, - } - - class FileExplorer extends ej.Widget { - static fn: FileExplorer; - constructor(element: JQuery | Element, options?: FileExplorer.Model); - static Locale: any; - model: FileExplorer.Model; - defaults: FileExplorer.Model; - - /** Refresh the size of FileExplorer control. - * @returns {void} - */ - adjustSize(): void; - - /** Disable the particular context menu item. - * @param {string|HTMLElement} Id of the menu item/ Menu element to be disabled - * @returns {void} - */ - disableMenuItem(item: string | HTMLElement): void; - - /** Disable the particular toolbar item. - * @param {string|HTMLElement} Id of the toolbar item/ Tool item element to be disabled - * @returns {void} - */ - disableToolbarItem(item: string | HTMLElement): void; - - /** Enable the particular context menu item. - * @param {string|HTMLElement} Id of the menu item/ Menu element to be Enabled - * @returns {void} - */ - enableMenuItem(item: string | HTMLElement): void; - - /** Enable the particular toolbar item - * @param {string|HTMLElement} Id of the tool item/ Tool item element to be Enabled - * @returns {void} - */ - enableToolbarItem(item: string | HTMLElement): void; - - /** Refresh the content of the selected folder in FileExplorer control. - * @returns {void} - */ - refresh(): void; - - /** Remove the particular toolbar item. - * @param {string|HTMLElement} Id of the tool item/ tool item element to be removed - * @returns {void} - */ - removeToolbarItem(item: string | HTMLElement): void; - } - export namespace FileExplorer { - - export interface Model { - - /** Sets the URL of server side AJAX handling method that handles file operation like Read, Remove, Rename, Create, Upload, Download, Copy and Move in FileExplorer. - */ - ajaxAction?: string; - - /** Specifies the data type of server side AJAX handling method. - * @Default {json} - */ - ajaxDataType?: string; - - /** By using ajaxSettings property, you can customize the AJAX configurations. Normally you can customize the following option in AJAX handling data, URL, type, async, contentType, dataType and - * success. For upload, download and getImage API, you can only customize URL. - * @Default {{ read: {}, createFolder: {}, remove: {}, rename: {}, paste: {}, getDetails: {}, download: {}, upload: {}, getImage: {}, search: {}}} - */ - ajaxSettings?: any; - - /** The FileExplorer allows to move the files from one folder to another folder of FileExplorer by using drag and drop option. Also it supports to upload a file by dragging it - * from windows explorer to the necessary folder of ejFileExplorer. - * @Default {true} - */ - allowDragAndDrop?: boolean; - - /** Gets or sets a value that indicates whether to enable keyboard support for FileExplorer actions. - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** The FileExplorer allows to select multiple files by enabling the allowMultiSelection property. You can perform multi selection by pressing the Ctrl key or Shift key. - * @Default {true} - */ - allowMultiSelection?: boolean; - - /** By using the contextMenuSettings property, you can customize the ContextMenu in the FileExplorer control. - */ - contextMenuSettings?: ContextMenuSettings; - - /** Sets the root class for FileExplorer theme. This cssClass API allows to use custom skinning option for File Explorer control. - * By defining the root class by using this API, you have to include this root class in CSS. - */ - cssClass?: string; - - /** Specify the enablePersistence to FileExplorer to save the current model value in browser cookies for state maintains. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Enables or disables the resize support in FileExplorer control. - * @Default {false} - */ - enableResize?: boolean; - - /** Enables or disables the Right to Left alignment support in FileExplorer control. - * @Default {false} - */ - enableRTL?: boolean; - - /** Enables or disables the thumbnail image compression option in FileExplorer control. By enabling this option, you can reduce the thumbnail image size while loading. - * @Default {false} - */ - enableThumbnailCompress?: boolean; - - /** Allows specified type of files only to display in FileExplorer control. - * @Default {.} - */ - fileTypes?: string; - - /** By using filterSettings property, you can customize the search functionality of the search bar in FileExplorer control. - */ - filterSettings?: FilterSettings; - - /** By using the gridSettings property, you can customize the grid behavior in the FileExplorer control. - */ - gridSettings?: GridSettings; - - /** Specifies the height of FileExplorer control. - * @Default {400} - */ - height?: string | number; - - /** Enables or disables the responsive support for FileExplorer control during the window resizing time. - * @Default {false} - */ - isResponsive?: boolean; - - /** Sets the file view type. There are three view types available such as Grid, Tile and Large icons. See layoutType. - * @Default {ej.FileExplorer.layoutType.Grid} - */ - layout?: ej.FileExplorer.layoutType | string; - - /** Sets the culture in FileExplorer. - * @Default {en-US} - */ - locale?: string; - - /** Sets the maximum height of FileExplorer control. - * @Default {null} - */ - maxHeight?: string | number; - - /** Sets the maximum width of FileExplorer control. - * @Default {null} - */ - maxWidth?: string | number; - - /** Sets the minimum height of FileExplorer control. - * @Default {250px} - */ - minHeight?: string | number; - - /** Sets the minimum width of FileExplorer control. - * @Default {400px} - */ - minWidth?: string | number; - - /** The property path denotes the filesystem path that are to be explored. The path for the filesystem can be physical path or relative path, - * but it has to be relevant to where the Web API is hosted. - */ - path?: string; - - /** The selectedFolder is used to select the specified folder of FileExplorer control. - */ - selectedFolder?: string; - - /** The selectedItems is used to select the specified items (file, folder) of FileExplorer control. - */ - selectedItems?: string | any[]; - - /** Enables or disables the checkbox option in FileExplorer control. - * @Default {true} - */ - showCheckbox?: boolean; - - /** Enables or disables the context menu option in FileExplorer control. - * @Default {true} - */ - showContextMenu?: boolean; - - /** Enables or disables the footer in FileExplorer control. The footer element displays the details of the current selected files and folders. - * And also the footer having the switcher to change the layout view. - * @Default {true} - */ - showFooter?: boolean; - - /** FileExplorer control is displayed with rounded corner when this property is set to true. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** FileExplorer control is rendered with thumbnail preview of images in Tile and LargeIcons layout when this property set to true. - * @Default {true} - */ - showThumbnail?: boolean; - - /** Shows or disables the toolbar in FileExplorer control. - * @Default {true} - */ - showToolbar?: boolean; + ///support palette type mode in color picker. + Palette, - /** Enables or disables the navigation pane in FileExplorer control. The navigation pane contains a tree view element that displays all the folders from the filesystem in a hierarchical manner. - * This is useful to a quick navigation of any folder in the filesystem. - * @Default {true} - */ - showNavigationPane?: boolean; + ///support palette type mode in color picker. + Picker + } - /** The tools property is used to configure and group required toolbar items in FileExplorer control. - * @Default {{ creation: [NewFolder], navigation: [Back, Forward, Upward], addressBar: [Addressbar], editing: [Refresh, Upload, Delete, Rename, Download], copyPaste: [Cut, Copy, Paste], - * getProperties: [Details], searchBar: [Searchbar], layout: [Layout], sortBy: [SortBy]}} - */ - tools?: any; - /** The toolsList property is used to arrange the toolbar items in the FileExplorer control. - * @Default {[layout, creation, navigation, addressBar, editing, copyPaste, sortBy, getProperties, searchBar]} - */ - toolsList?: any[]; + enum Palette { - /** Gets or sets an object that indicates whether to customize the upload behavior in the FileExplorer. - */ - uploadSettings?: UploadSettings; + ///used to show the basic palette + BasicPalette, - /** Specifies the width of FileExplorer control. - * @Default {850} - */ - width?: string | number; + ///used to show the custompalette + CustomPalette + } - /** Fires before the AJAX request is performed. */ - beforeAjaxRequest?(e: BeforeAjaxRequestEventArgs): void; - /** Fires before downloading the files. */ - beforeDownload?(e: BeforeDownloadEventArgs): void; + enum Presets { - /** Fires before getting a requested image from server. Also this event will be triggered when you have enabled thumbnail image compression option in FileExplorer. - * Using this event, you can customize the image compression size. - */ - beforeGetImage?(e: BeforeGetImageEventArgs): void; + ///used to show the basic presets + Basic, - /** Fires before files or folders open. */ - beforeOpen?(e: BeforeOpenEventArgs): void; + ///used to show the CandyCrush colors presets + CandyCrush, - /** Fires before uploading the files. */ - beforeUpload?(e: BeforeUploadEventArgs): void; + ///used to show the Citrus colors presets + Citrus, - /** Fires when FileExplorer control was created */ - create?(e: CreateEventArgs): void; + ///used to show the FlatColors presets + FlatColors, - /** Fires when file or folder is copied successfully. */ - copy?(e: CopyEventArgs): void; + ///used to show the Misty presets + Misty, - /** Fires when new folder is created successfully in file system. */ - createFolder?(e: CreateFolderEventArgs): void; + ///used to show the MoonLight presets + MoonLight, + + ///used to show the PinkShades presets + PinkShades, - /** Fires when file or folder is cut successfully. */ - cut?(e: CutEventArgs): void; + ///used to show the Sandy presets + Sandy, - /** Fires when the FileExplorer is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; + ///used to show the Seawolf presets + SeaWolf, + + ///used to show the Vintage presets + Vintage, + + ///used to show the WebColors presets + WebColors + } + + } + enum ButtonMode { + //Displays the button in split mode + Split, + //Displays the button in Dropdown mode + Dropdown, + } + + class FileExplorer extends ej.Widget { + static fn: FileExplorer; + constructor(element: JQuery | Element, options?: FileExplorer.Model); + static Locale: any; + model: FileExplorer.Model; + defaults: FileExplorer.Model; + + /** Refresh the size of FileExplorer control. + * @returns {void} + */ + adjustSize(): void; + + /** Disable the particular context menu item. + * @param {string|HTMLElement} Id of the menu item/ Menu element to be disabled + * @returns {void} + */ + disableMenuItem(item: string|HTMLElement): void; + + /** Disable the particular toolbar item. + * @param {string|HTMLElement} Id of the toolbar item/ Tool item element to be disabled + * @returns {void} + */ + disableToolbarItem(item: string|HTMLElement): void; + + /** Enable the particular context menu item. + * @param {string|HTMLElement} Id of the menu item/ Menu element to be Enabled + * @returns {void} + */ + enableMenuItem(item: string|HTMLElement): void; + + /** Enable the particular toolbar item + * @param {string|HTMLElement} Id of the tool item/ Tool item element to be Enabled + * @returns {void} + */ + enableToolbarItem(item: string|HTMLElement): void; + + /** Refresh the content of the selected folder in FileExplorer control. + * @returns {void} + */ + refresh(): void; + + /** Remove the particular toolbar item. + * @param {string|HTMLElement} Id of the tool item/ tool item element to be removed + * @returns {void} + */ + removeToolbarItem(item: string|HTMLElement): void; + } + export namespace FileExplorer { + + export interface Model { + + /** Sets the URL of server side AJAX handling method that handles file operation like Read, Remove, Rename, Create, Upload, Download, Copy and Move in FileExplorer. + */ + ajaxAction?: string; + + /** Specifies the data type of server side AJAX handling method. + * @Default {json} + */ + ajaxDataType?: string; + + /** By using ajaxSettings property, you can customize the AJAX configurations. Normally you can customize the following option in AJAX handling data, URL, type, async, contentType, + * dataType and success. For upload, download and getImage API, you can only customize URL. + * @Default {{ read: {}, createFolder: {}, remove: {}, rename: {}, paste: {}, getDetails: {}, download: {}, upload: {}, getImage: {}, search: {}}} + */ + ajaxSettings?: any; + + /** The FileExplorer allows to move the files from one folder to another folder of FileExplorer by using drag and drop option. Also it supports to upload a file by dragging it from + * windows explorer to the necessary folder of ejFileExplorer. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /** Gets or sets a value that indicates whether to enable keyboard support for FileExplorer actions. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** The FileExplorer allows to select multiple files by enabling the allowMultiSelection property. You can perform multi selection by pressing the Ctrl key or Shift key. + * @Default {true} + */ + allowMultiSelection?: boolean; + + /** By using the contextMenuSettings property, you can customize the ContextMenu in the FileExplorer control. + */ + contextMenuSettings?: ContextMenuSettings; + + /** Sets the root class for FileExplorer theme. This cssClass API allows to use custom skinning option for File Explorer control. By defining the root class by using this API, you + * have to include this root class in CSS. + */ + cssClass?: string; + + /** Specify the enablePersistence to FileExplorer to save the current model value in browser cookies for state maintains. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Enables or disables the resize support in FileExplorer control. + * @Default {false} + */ + enableResize?: boolean; + + /** Enables or disables the Right to Left alignment support in FileExplorer control. + * @Default {false} + */ + enableRTL?: boolean; + + /** Enables or disables the thumbnail image compression option in FileExplorer control. By enabling this option, you can reduce the thumbnail image size while loading. + * @Default {false} + */ + enableThumbnailCompress?: boolean; + + /** Allows specified type of files only to display in FileExplorer control. + * @Default {.} + */ + fileTypes?: string; + + /** By using filterSettings property, you can customize the search functionality of the search bar in FileExplorer control. + */ + filterSettings?: FilterSettings; + + /** By using the gridSettings property, you can customize the grid behavior in the FileExplorer control. + */ + gridSettings?: GridSettings; + + /** Specifies the height of FileExplorer control. + * @Default {400} + */ + height?: string|number; + + /** Enables or disables the responsive support for FileExplorer control during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /** Sets the file view type. There are three view types available such as Grid, Tile and Large icons. See layoutType. + * @Default {ej.FileExplorer.layoutType.Grid} + */ + layout?: ej.FileExplorer.layoutType|string; + + /** Sets the culture in FileExplorer. + * @Default {en-US} + */ + locale?: string; + + /** Sets the maximum height of FileExplorer control. + * @Default {null} + */ + maxHeight?: string|number; + + /** Sets the maximum width of FileExplorer control. + * @Default {null} + */ + maxWidth?: string|number; + + /** Sets the minimum height of FileExplorer control. + * @Default {250px} + */ + minHeight?: string|number; + + /** Sets the minimum width of FileExplorer control. + * @Default {400px} + */ + minWidth?: string|number; + + /** The property path denotes the filesystem path that are to be explored. The path for the filesystem can be physical path or relative path, but it has to be relevant to where the + * Web API is hosted. + */ + path?: string; + + /** The selectedFolder is used to select the specified folder of FileExplorer control. + */ + selectedFolder?: string; + + /** The selectedItems is used to select the specified items (file, folder) of FileExplorer control. + */ + selectedItems?: string|any[]; + + /** Enables or disables the checkbox option in FileExplorer control. + * @Default {true} + */ + showCheckbox?: boolean; + + /** Enables or disables the context menu option in FileExplorer control. + * @Default {true} + */ + showContextMenu?: boolean; + + /** Enables or disables the footer in FileExplorer control. The footer element displays the details of the current selected files and folders. And also the footer having the switcher + * to change the layout view. + * @Default {true} + */ + showFooter?: boolean; + + /** FileExplorer control is displayed with rounded corner when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** FileExplorer control is rendered with thumbnail preview of images in Tile and LargeIcons layout when this property set to true. + * @Default {true} + */ + showThumbnail?: boolean; + + /** Shows or disables the toolbar in FileExplorer control. + * @Default {true} + */ + showToolbar?: boolean; + + /** Enables or disables the navigation pane in FileExplorer control. The navigation pane contains a tree view element that displays all the folders from the filesystem in a + * hierarchical manner. This is useful to a quick navigation of any folder in the filesystem. + * @Default {true} + */ + showNavigationPane?: boolean; + + /** The tools property is used to configure and group required toolbar items in FileExplorer control. + * @Default {{ creation: [NewFolder], navigation: [Back, Forward, Upward], addressBar: [Addressbar], editing: [Refresh, Upload, Delete, Rename, Download], copyPaste: [Cut, Copy, + * Paste], getProperties: [Details], searchBar: [Searchbar], layout: [Layout], sortBy: [SortBy]}} + */ + tools?: any; + + /** The toolsList property is used to arrange the toolbar items in the FileExplorer control. + * @Default {[layout, creation, navigation, addressBar, editing, copyPaste, sortBy, getProperties, searchBar]} + */ + toolsList?: any[]; + + /** Gets or sets an object that indicates whether to customize the upload behavior in the FileExplorer. + */ + uploadSettings?: UploadSettings; + + /** Specifies the width of FileExplorer control. + * @Default {850} + */ + width?: string|number; + + /** Fires before the AJAX request is performed. + */ + beforeAjaxRequest?(e: BeforeAjaxRequestEventArgs): void; + + /** Fires before downloading the files. + */ + beforeDownload?(e: BeforeDownloadEventArgs): void; + + /** Fires before getting a requested image from server. Also this event will be triggered when you have enabled thumbnail image compression option in FileExplorer.Using this event, + * you can customize the image compression size. + */ + beforeGetImage?(e: BeforeGetImageEventArgs): void; + + /** Fires before files or folders open. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + + /** Fires before uploading the files. + */ + beforeUpload?(e: BeforeUploadEventArgs): void; + + /** Fires when FileExplorer control was created + */ + create?(e: CreateEventArgs): void; + + /** Fires when file or folder is copied successfully. + */ + copy?(e: CopyEventArgs): void; + + /** Fires when new folder is created successfully in file system. + */ + createFolder?(e: CreateFolderEventArgs): void; + + /** Fires when file or folder is cut successfully. + */ + cut?(e: CutEventArgs): void; + + /** Fires when the FileExplorer is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when the files or directory has been started to drag over on the FileExplorer + */ + dragStart?(e: DragStartEventArgs): void; + + /** Fires when the files or directory is dragging over on the FileExplorer. + */ + drag?(e: DragEventArgs): void; + + /** Fires when the files or directory has been stopped to drag over on FileExplorer + */ + dragStop?(e: DragStopEventArgs): void; + + /** Fires when the files or directory is dropped to the target folder of FileExplorer + */ + drop?(e: DropEventArgs): void; + + /** Fires after loading the requested image from server. Using this event, you can get the details of loaded image. + */ + getImage?(e: GetImageEventArgs): void; + + /** Fires when keydown in FileExplorer control. + */ + keydown?(e: KeydownEventArgs): void; + + /** Fires when the file view type is changed. + */ + layoutChange?(e: LayoutChangeEventArgs): void; + + /** Fires when before the ContextMenu opening. + */ + menuBeforeOpen?(e: MenuBeforeOpenEventArgs): void; + + /** Fires when click the ContextMenu item. + */ + menuClick?(e: MenuClickEventArgs): void; + + /** Fires when ContextMenu is successfully opened. + */ + menuOpen?(e: MenuOpenEventArgs): void; + + /** Fires when files are successfully opened. + */ + open?(e: OpenEventArgs): void; - /** Fires when the files or directory has been started to drag over on the FileExplorer */ - dragStart?(e: DragStartEventArgs): void; + /** Fires when a file or folder is pasted successfully. + */ + paste?(e: PasteEventArgs): void; - /** Fires when the files or directory is dragging over on the FileExplorer. */ - drag?(e: DragEventArgs): void; + /** Fires when file or folder is deleted successfully. + */ + remove?(e: RemoveEventArgs): void; - /** Fires when the files or directory has been stopped to drag over on FileExplorer */ - dragStop?(e: DragStopEventArgs): void; + /** Fires when resizing is performed for FileExplorer. + */ + resize?(e: ResizeEventArgs): void; - /** Fires when the files or directory is dropped to the target folder of FileExplorer */ - drop?(e: DropEventArgs): void; + /** Fires when resizing is started for FileExplorer. + */ + resizeStart?(e: ResizeStartEventArgs): void; - /** Fires after loading the requested image from server. Using this event, you can get the details of loaded image. */ - getImage?(e: GetImageEventArgs): void; + /** Fires this event when the resizing is stopped for FileExplorer. + */ + resizeStop?(e: ResizeStopEventArgs): void; - /** Fires when keydown in FileExplorer control. */ - keydown?(e: KeydownEventArgs): void; + /** Fires when the items from grid view or tile view of FileExplorer control is selected. + */ + select?(e: SelectEventArgs): void; - /** Fires when the file view type is changed. */ - layoutChange?(e: LayoutChangeEventArgs): void; + /** Triggered when refresh the template column elements in the grid view of FileExplorer control. + */ + templateRefresh?(e: TemplateRefreshEventArgs): void; - /** Fires when before the ContextMenu opening. */ - menuBeforeOpen?(e: MenuBeforeOpenEventArgs): void; + /** Fires when the items from grid view or tile view or large icons view of FileExplorer control is unselected. + */ + unselect?(e: UnselectEventArgs): void; + } - /** Fires when click the ContextMenu item. */ - menuClick?(e: MenuClickEventArgs): void; + export interface BeforeAjaxRequestEventArgs { - /** Fires when ContextMenu is successfully opened. */ - menuOpen?(e: MenuOpenEventArgs): void; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Fires when files are successfully opened. */ - open?(e: OpenEventArgs): void; + /** returns the AJAX request data + */ + data?: any; - /** Fires when a file or folder is pasted successfully. */ - paste?(e: PasteEventArgs): void; + /** returns the FileExplorer model + */ + model?: ej.FileExplorer.Model; - /** Fires when file or folder is deleted successfully. */ - remove?(e: RemoveEventArgs): void; + /** returns the name of the event + */ + type?: string; + } - /** Fires when resizing is performed for FileExplorer. */ - resize?(e: ResizeEventArgs): void; + export interface BeforeDownloadEventArgs { - /** Fires when resizing is started for FileExplorer. */ - resizeStart?(e: ResizeStartEventArgs): void; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Fires this event when the resizing is stopped for FileExplorer. */ - resizeStop?(e: ResizeStopEventArgs): void; + /** returns the downloaded file names. + */ + files?: string[]; - /** Fires when the items from grid view or tile view of FileExplorer control is selected. */ - select?(e: SelectEventArgs): void; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** Triggered when refresh the template column elements in the grid view of FileExplorer control. */ - templateRefresh?(e: TemplateRefreshEventArgs): void; + /** returns the path of currently opened item. + */ + path?: string; - /** Fires when the items from grid view or tile view or large icons view of FileExplorer control is unselected. */ - unselect?(e: UnselectEventArgs): void; - } + /** returns the selected item details. + */ + selectedItems?: any; - export interface BeforeAjaxRequestEventArgs { + /** returns the name of the event. + */ + type?: string; + } - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + export interface BeforeGetImageEventArgs { - /** returns the AJAX request data - */ - data?: any; + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the FileExplorer model - */ - model?: ej.FileExplorer.Model; + /** enable or disable the image compress option. + */ + canCompress?: boolean; - /** returns the name of the event - */ - type?: string; - } + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - export interface BeforeDownloadEventArgs { + /** returns the expected image size. + */ + size?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the selected item details. + */ + selectedItems?: any; - /** returns the downloaded file names. - */ - files?: string[]; + /** returns the name of the event. + */ + type?: string; + } - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + export interface BeforeOpenEventArgs { - /** returns the path of currently opened item. - */ - path?: string; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the selected item details. - */ - selectedItems?: any; + /** returns the opened item type. + */ + itemType?: string; - /** returns the name of the event. - */ - type?: string; - } + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - export interface BeforeGetImageEventArgs { + /** returns the path of currently opened item. + */ + path?: string; - /** set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the selected item details. + */ + selectedItems?: any; - /** enable or disable the image compress option. - */ - canCompress?: boolean; + /** returns the name of the event. + */ + type?: string; + } - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + export interface BeforeUploadEventArgs { - /** returns the expected image size. - */ - size?: any; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the selected item details. - */ - selectedItems?: any; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the name of the event. - */ - type?: string; - } + /** returns the path of currently opened item. + */ + path?: string; - export interface BeforeOpenEventArgs { + /** returns the selected item details. + */ + selectedItems?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the upload item details. + */ + uploadItemDetails?: any; - /** returns the opened item type. - */ - itemType?: string; + /** returns the name of the event. + */ + type?: string; + } - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + export interface CreateEventArgs { - /** returns the path of currently opened item. - */ - path?: string; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the selected item details. - */ - selectedItems?: any; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the name of the event. - */ - type?: string; - } + /** returns the name of the event. + */ + type?: string; + } - export interface BeforeUploadEventArgs { + export interface CopyEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the path of currently opened item. - */ - path?: string; + /** returns the name of copied file/folder. + */ + name?: string[]; - /** returns the selected item details. - */ - selectedItems?: any; + /** returns the selected item details. + */ + selectedItems?: any; - /** returns the upload item details. - */ - uploadItemDetails?: any; + /** returns the source path. + */ + sourcePath?: string; - /** returns the name of the event. - */ - type?: string; - } + /** returns the name of the event. + */ + type?: string; + } - export interface CreateEventArgs { + export interface CreateFolderEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the AJAX response data + */ + data?: any; - /** returns the name of the event. - */ - type?: string; - } + /** returns the FileExplorer model + */ + model?: ej.FileExplorer.Model; - export interface CopyEventArgs { + /** returns the selected item details + */ + selectedItems?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; + } - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + export interface CutEventArgs { - /** returns the name of copied file/folder. - */ - name?: string[]; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the selected item details. - */ - selectedItems?: any; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the source path. - */ - sourcePath?: string; + /** returns the name of moved file or folder. + */ + name?: string[]; - /** returns the name of the event. - */ - type?: string; - } + /** returns the selected item details. + */ + selectedItems?: any; - export interface CreateFolderEventArgs { + /** returns the source path. + */ + sourcePath?: string; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; + } - /** returns the AJAX response data - */ - data?: any; + export interface DestroyEventArgs { - /** returns the FileExplorer model - */ - model?: ej.FileExplorer.Model; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the selected item details - */ - selectedItems?: any; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the name of the event. - */ - type?: string; - } + /** returns the name of the event. + */ + type?: string; + } - export interface CutEventArgs { + export interface DragStartEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the name of moved file or folder. - */ - name?: string[]; + /** returns the name of the event. + */ + type?: string; - /** returns the selected item details. - */ - selectedItems?: any; + /** returns the dragging element. + */ + target?: any; - /** returns the source path. - */ - sourcePath?: string; + /** returns the path of dragging element. + */ + targetPath?: string; - /** returns the name of the event. - */ - type?: string; - } + /** returns the dragging file details. + */ + selectedItems?: any; + } - export interface DestroyEventArgs { + export interface DragEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the name of the event. - */ - type?: string; - } + /** returns the name of the event. + */ + type?: string; - export interface DragStartEventArgs { + /** returns the target element. + */ + target?: any; - /** set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the name of target element. + */ + targetElementName?: string; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the path of target element. + */ + targetPath?: string; + } - /** returns the name of the event. - */ - type?: string; + export interface DragStopEventArgs { - /** returns the dragging element. - */ - target?: any; + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the path of dragging element. - */ - targetPath?: string; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the dragging file details. - */ - selectedItems?: any; - } + /** returns the name of the event. + */ + type?: string; - export interface DragEventArgs { + /** returns the target element. + */ + target?: any; - /** set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the path of target element. + */ + targetPath?: string; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the name of target element + */ + targetElementName?: string; - /** returns the name of the event. - */ - type?: string; + /** returns the action, which is performed after dropping the files (upload/ move). + */ + dropAction?: string; - /** returns the target element. - */ - target?: any; + /** returns the dragging file details + */ + fileInfo?: any; + } - /** returns the name of target element. - */ - targetElementName?: string; + export interface DropEventArgs { - /** returns the path of target element. - */ - targetPath?: string; - } + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface DragStopEventArgs { + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the target element. + */ + target?: any; - /** returns the name of the event. - */ - type?: string; + /** returns the name of target folder. + */ + targetFolder?: string; - /** returns the target element. - */ - target?: any; + /** returns the path of target folder. + */ + targetPath?: string; - /** returns the path of target element. - */ - targetPath?: string; + /** returns the dragging element details. + */ + fileInfo?: any; - /** returns the name of target element - */ - targetElementName?: string; + /** returns the action, which is performed after dropping the files (upload/ move). + */ + dropAction?: string; + } - /** returns the action, which is performed after dropping the files (upload/ move). - */ - dropAction?: string; + export interface GetImageEventArgs { - /** returns the dragging file details - */ - fileInfo?: any; - } + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface DropEventArgs { + /** loaded image path. + */ + path?: string; - /** set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** loaded image element + */ + element?: any; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the name of the event. - */ - type?: string; + /** original arguments of image load or error event + */ + originalArgs?: any; - /** returns the target element. - */ - target?: any; + /** returns the action type, which specifies thumbnail preview or opening image. + */ + action?: string; - /** returns the name of target folder. - */ - targetFolder?: string; + /** returns the name of the event. + */ + type?: string; + } - /** returns the path of target folder. - */ - targetPath?: string; + export interface KeydownEventArgs { - /** returns the dragging element details. - */ - fileInfo?: any; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the action, which is performed after dropping the files (upload/ move). - */ - dropAction?: string; - } + /** returns the downed key keyCode value + */ + keyCode?: number; - export interface GetImageEventArgs { + /** returns altKey value. + */ + altKey?: boolean; - /** set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns shiftKey value. + */ + shiftKey?: boolean; - /** loaded image path. - */ - path?: string; + /** returns ctrlKey value. + */ + ctrlKey?: boolean; - /** loaded image element - */ - element?: any; + /** returns the event object. + */ + originalArgs?: any; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** original arguments of image load or error event - */ - originalArgs?: any; + /** returns the name of the event. + */ + type?: string; + } - /** returns the action type, which specifies thumbnail preview or opening image. - */ - action?: string; + export interface LayoutChangeEventArgs { - /** returns the name of the event. - */ - type?: string; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface KeydownEventArgs { + /** return true when we change the layout via interaction, else false. + */ + isInteraction?: boolean; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the current view type. + */ + layoutType?: string; - /** returns the downed key keyCode value - */ - keyCode?: number; + /** returns the FileExplorer model. + */ + model?: any; - /** returns altKey value. - */ - altKey?: boolean; + /** returns the name of the event. + */ + type?: string; + } - /** returns shiftKey value. - */ - shiftKey?: boolean; + export interface MenuBeforeOpenEventArgs { - /** returns ctrlKey value. - */ - ctrlKey?: boolean; + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the event object. - */ - originalArgs?: any; + /** returns the name of ContextMenu items group. + */ + contextMenu?: string; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the dataSource of ContextMenu. + */ + dataSource?: any[]; - /** returns the name of the event. - */ - type?: string; - } + /** returns the element of ContextMenu. + */ + element?: any; - export interface LayoutChangeEventArgs { + /** returns the event of ContextMenu. + */ + events?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** return true when we change the layout via interaction, else false. - */ - isInteraction?: boolean; + /** returns the target element. + */ + target?: any; - /** returns the current view type. - */ - layoutType?: string; + /** returns the name of the event. + */ + type?: string; + } - /** returns the FileExplorer model. - */ - model?: any; + export interface MenuClickEventArgs { - /** returns the name of the event. - */ - type?: string; - } + /** returns the ID of clicked ContextMenu item. + */ + ID?: string; - export interface MenuBeforeOpenEventArgs { + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the name of ContextMenu items group. + */ + contextMenu?: string; - /** returns the name of ContextMenu items group. - */ - contextMenu?: string; + /** returns the element of clicked ContextMenu item. + */ + element?: any; - /** returns the dataSource of ContextMenu. - */ - dataSource?: any[]; + /** returns the event of ContextMenu. + */ + event?: any; - /** returns the element of ContextMenu. - */ - element?: any; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the event of ContextMenu. - */ - events?: any; + /** returns the parent element ID of clicked ContextMenu item. + */ + parentId?: string; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the parent element text of clicked ContextMenu item. + */ + parentText?: string; - /** returns the target element. - */ - target?: any; + /** returns the text of clicked ContextMenu item. + */ + text?: string; - /** returns the name of the event. - */ - type?: string; - } + /** returns the name of the event. + */ + type?: string; + } - export interface MenuClickEventArgs { + export interface MenuOpenEventArgs { - /** returns the ID of clicked ContextMenu item. - */ - ID?: string; + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the name of ContextMenu items group. + */ + contextMenu?: string; - /** returns the name of ContextMenu items group. - */ - contextMenu?: string; + /** returns the element of ContextMenu. + */ + element?: any; - /** returns the element of clicked ContextMenu item. - */ - element?: any; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the event of ContextMenu. - */ - event?: any; + /** returns the target element. + */ + target?: any; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the name of the event. + */ + type?: string; + } - /** returns the parent element ID of clicked ContextMenu item. - */ - parentId?: string; + export interface OpenEventArgs { - /** returns the parent element text of clicked ContextMenu item. - */ - parentText?: string; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the text of clicked ContextMenu item. - */ - text?: string; + /** returns the opened item type. + */ + itemType?: string; - /** returns the name of the event. - */ - type?: string; - } + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - export interface MenuOpenEventArgs { + /** returns the path of currently opened item. + */ + path?: string; - /** set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the selected item details. + */ + selectedItems?: any; - /** returns the name of ContextMenu items group. - */ - contextMenu?: string; + /** returns the name of the event. + */ + type?: string; + } - /** returns the element of ContextMenu. - */ - element?: any; + export interface PasteEventArgs { - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the target element. - */ - target?: any; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the name of the event. - */ - type?: string; - } + /** returns the name of moved/copied file or folder. + */ + name?: string[]; - export interface OpenEventArgs { + /** returns the selected item details. + */ + selectedItems?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the target folder item details. + */ + targetFolder?: any; - /** returns the opened item type. - */ - itemType?: string; + /** returns the target path. + */ + targetPath?: string; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the name of the event. + */ + type?: string; + } - /** returns the path of currently opened item. - */ - path?: string; + export interface RemoveEventArgs { - /** returns the selected item details. - */ - selectedItems?: any; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the name of the event. - */ - type?: string; - } + /** returns the AJAX response data. + */ + data?: any; - export interface PasteEventArgs { + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the names of deleted items. + */ + name?: string; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the path of deleted item. + */ + path?: string; - /** returns the name of moved/copied file or folder. - */ - name?: string[]; + /** returns the removed item details. + */ + selectedItems?: any; - /** returns the selected item details. - */ - selectedItems?: any; + /** returns the name of the event. + */ + type?: string; + } - /** returns the target folder item details. - */ - targetFolder?: any; + export interface ResizeEventArgs { - /** returns the target path. - */ - targetPath?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event. - */ - type?: string; - } + /** returns the mouse move event args. + */ + event?: any; - export interface RemoveEventArgs { + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; + } - /** returns the AJAX response data. - */ - data?: any; + export interface ResizeStartEventArgs { - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the names of deleted items. - */ - name?: string; + /** returns the mouse down event args. + */ + event?: any; - /** returns the path of deleted item. - */ - path?: string; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the removed item details. - */ - selectedItems?: any; + /** returns the name of the event. + */ + type?: string; + } - /** returns the name of the event. - */ - type?: string; - } + export interface ResizeStopEventArgs { - export interface ResizeEventArgs { + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the mouse leave event args. + */ + event?: any; - /** returns the mouse move event args. - */ - event?: any; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the name of the event. + */ + type?: string; + } - /** returns the name of the event. - */ - type?: string; - } + export interface SelectEventArgs { - export interface ResizeStartEventArgs { + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the mouse down event args. - */ - event?: any; + /** returns the name of selected items. + */ + name?: string[]; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** returns the path of selected items. + */ + path?: string; - /** returns the name of the event. - */ - type?: string; - } + /** returns the selected item details + */ + selectedItems?: any; - export interface ResizeStopEventArgs { + /** returns the name of the event. + */ + type?: string; + } - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + export interface TemplateRefreshEventArgs { - /** returns the mouse leave event args. - */ - event?: any; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** Returns the cell object. + */ + cell?: ej.FileExplorer.Model; - /** returns the name of the event. - */ - type?: string; - } + /** Returns the column object. + */ + column?: any; - export interface SelectEventArgs { + /** Returns the current row data. + */ + data?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns the grid model of FileExplorer. + */ + model?: any; - /** returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** Returns the current row index. + */ + rowIndex?: number; - /** returns the name of selected items. - */ - name?: string[]; + /** returns the name of the event. + */ + type?: string; + } + + export interface UnselectEventArgs { + + /** Returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; - /** returns the path of selected items. - */ - path?: string; + /** Returns the name of unselected item. + */ + name?: string; - /** returns the selected item details - */ - selectedItems?: any; + /** Returns the name of unselected items. + */ + names?: string[]; - /** returns the name of the event. - */ - type?: string; - } + /** Returns the type of unselected item. + */ + nodeType?: string; - export interface TemplateRefreshEventArgs { + /** Returns the path of unselected item. + */ + path?: string; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns the name of the event. + */ + type?: string; + + /** Returns the unselected item details. + */ + unselectedItem?: any; + + /** Returns the unselected items details. + */ + unselectedItems?: any[]; + } + + export interface ContextMenuSettings { + + /** The items property is used to configure and group the required ContextMenu items in FileExplorer control. + * @Default {{% highlight javascript %}{navbar: [NewFolder, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, Getinfo],cwd: [Refresh, Paste,|, SortBy, |, NewFolder, Upload, |, + * Getinfo],files: [Open, Download, |, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, OpenFolderLocation, Getinfo]}{% endhighlight %}} + */ + items?: any; + + /** The customMenuFields property is used to define custom functionality for custom ContextMenu item's which are defined in items property. + * @Default {[]} + */ + customMenuFields?: any[]; + } + + export interface FilterSettings { + + /** It allows to search the text given in search Textbox in every keyup event. When this property was set as false, searching will works only on Enter key and searchbar blur. + * @Default {true} + */ + allowSearchOnTyping?: boolean; + + /** Enables or disables to perform the filter operation with case sensitive. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /** Sets the search filter type. There are several filter types available such as "startswith", "contains", "endswith". See filterType. + * @Default {ej.FileExplorer.filterType.Contains} + */ + filterType?: ej.FilterType|string; + } + + export interface GridSettings { + + /** Allows to Resize the width of the columns by simply click and move the particular column header line. + * @Default {true} + */ + allowResizing?: boolean; + + /** Gets or sets a value that indicates whether to enable the dynamic sorting behavior on grid data. Sorting can be done through clicking on particular column header. + * @Default {true} + */ + allowSorting?: boolean; + + /** Gets or sets an object that indicates to render the grid with specified columns. You can use this property same as the column property in Grid control. + * @Default {[{ field: name, headerText: Name, width: 30% }, { field: dateModified, headerText: Date Modified, width: 30% }, { field: type, headerText: Type, width: 15% }, { field: + * size, headerText: Size, width: 12%, textAlign: right, headerTextAlign: left }]} + */ + columns?: any[]; + } + + export interface UploadSettings { + + /** Specifies the maximum file size allowed to upload. It accepts the value in bytes. + * @Default {31457280} + */ + maxFileSize?: number; + + /** Enables or disables the multiple files upload. When it is enabled, you can upload multiple files at a time and when disabled, you can upload only one file at a time. + * @Default {true} + */ + allowMultipleFile?: boolean; + + /** Enables or disables the auto upload option while uploading files in FileExplorer control. + * @Default {false} + */ + autoUpload?: boolean; + } + + enum layoutType { + + ///Supports to display files in tile view + Tile, + + ///Supports to display files in grid view + Grid, + + ///Supports to display files as large icons + LargeIcons + } + + } + + class DatePicker extends ej.Widget { + static fn: DatePicker; + constructor(element: JQuery | Element, options?: DatePicker.Model); + static Locale: any; + model: DatePicker.Model; + defaults: DatePicker.Model; + + /** Disables the DatePicker control. + * @returns {void} + */ + disable(): void; + + /** Enable the DatePicker control, if it is in disabled state. + * @returns {void} + */ + enable(): void; + + /** Returns the current date value in the DatePicker control. + * @returns {string} + */ + getValue(): string; + + /** Close the DatePicker popup, if it is in opened state. + * @returns {void} + */ + hide(): void; + + /** Opens the DatePicker popup. + * @returns {void} + */ + show(): void; + } + export namespace DatePicker { + + export interface Model { + + /** Used to allow or restrict the editing in DatePicker input field directly. By setting false to this API, You can only pick the date from DatePicker popup. + * @Default {true} + */ + allowEdit?: boolean; + + /** allow or restrict the drill down to multiple levels of view (month/year/decade) in DatePicker calendar + * @Default {true} + */ + allowDrillDown?: boolean; + + /** Disable the list of specified date value. + * @Default {{}} + */ + blackoutDates?: any; + + /** Sets the specified text value to the today button in the DatePicker calendar. + * @Default {Today} + */ + buttonText?: string; + + /** Sets the root CSS class for DatePicker theme, which is used customize. + */ + cssClass?: string; + + /** Formats the value of the DatePicker in to the specified date format. If this API is not specified, dateFormat will be set based on the current culture of DatePicker. + * @Default {MM/dd/yyyy} + */ + dateFormat?: string; + + /** Specifies the header format of days in DatePicker calendar. See below to get available Headers options + * @Default {ej.DatePicker.Header.Short} + */ + dayHeaderFormat?: string|ej.DatePicker.Header; + + /** Specifies the navigation depth level in DatePicker calendar. This option is not applied when start level view option is lower than depth level view. See below to know available + * levels in DatePicker Calendar + */ + depthLevel?: string|ej.DatePicker.Level; + + /** Allows to embed the DatePicker calendar in the page. Also associates DatePicker with div element instead of input. + * @Default {false} + */ + displayInline?: boolean; + + /** Enables or disables the animation effect with DatePicker calendar. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Enable or disable the DatePicker control. + * @Default {true} + */ + enabled?: boolean; + + /** Sustain the entire widget model of DatePicker even after form post or browser refresh + * @Default {false} + */ + enablePersistence?: boolean; + + /** Displays DatePicker calendar along with DatePicker input field in Right to Left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows to enter valid or invalid date in input textbox and indicate as error if it is invalid value, when this API value is set to true. For false value, invalid date is not + * allowed to input field and corrected to valid date automatically, even if invalid date is given. + * @Default {false} + */ + enableStrictMode?: boolean; + + /** Used the required fields for special Dates in DatePicker in order to customize the special dates in a calendar. + * @Default {null} + */ + fields?: Fields; + + /** Specifies the header format to be displayed in the DatePicker calendar. + * @Default {MMMM yyyy} + */ + headerFormat?: string; + + /** Specifies the height of the DatePicker input text. + * @Default {28px} + */ + height?: string; + + /** HighlightSection is used to highlight currently selected date's month/week/workdays. See below to get available HighlightSection options + * @Default {none} + */ + highlightSection?: string|ej.DatePicker.HighlightSection; + + /** Weekend dates will be highlighted when this property is set to true. + * @Default {false} + */ + highlightWeekend?: boolean; + + /** Specifies the HTML Attributes of the DatePicker. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Change the DatePicker calendar and date format based on given culture. + * @Default {en-US} + */ + locale?: string; + + /** Specifies the maximum date in the calendar that the user can select. + * @Default {new Date(2099, 11, 31)} + */ + maxDate?: string|Date; + + /** Specifies the minimum date in the calendar that the user can select. + * @Default {new Date(1900, 00, 01)} + */ + minDate?: string|Date; + + /** Allows to toggles the read only state of the DatePicker. When the widget is readOnly, it doesn't allow your input. + * @Default {false} + */ + readOnly?: boolean; + + /** It allow to show/hide the disabled date ranges + * @Default {true} + */ + showDisabledRange?: boolean; + + /** It allows to display footer in DatePicker calendar. + * @Default {true} + */ + showFooter?: boolean; + + /** It allows to display/hides the other months days from the current month calendar in a DatePicker. + * @Default {true} + */ + showOtherMonths?: boolean; + + /** Shows/hides the date icon button at right side of textbox, which is used to open or close the DatePicker calendar popup. + * @Default {true} + */ + showPopupButton?: boolean; + + /** DatePicker input is displayed with rounded corner when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Used to show the tooltip when hovering on the days in the DatePicker calendar. + * @Default {true} + */ + showTooltip?: boolean; + + /** Specifies the special dates in DatePicker. + * @Default {null} + */ + specialDates?: any; + + /** Specifies the start day of the week in DatePicker calendar. + * @Default {0} + */ + startDay?: number; + + /** Specifies the start level view in DatePicker calendar. See below available Levels + * @Default {ej.DatePicker.Level.Month} + */ + startLevel?: string|ej.DatePicker.Level; + + /** Specifies the number of months to be navigate for one click of next and previous button in a DatePicker Calendar. + * @Default {1} + */ + stepMonths?: number; + + /** Provides option to customize the tooltip format. + * @Default {ddd MMM dd yyyy} + */ + tooltipFormat?: string; + + /** Sets the jQuery validation support to DatePicker Date value. See validation + * @Default {null} + */ + validationMessage?: any; + + /** Sets the jQuery validation custom rules to the DatePicker. see validation + * @Default {null} + */ + validationRules?: any; + + /** sets or returns the current value of DatePicker + * @Default {null} + */ + value?: string|Date; + + /** Specifies the water mark text to be displayed in input text. + * @Default {Select date} + */ + watermarkText?: string; + + /** Specifies the width of the DatePicker input text. + * @Default {160px} + */ + width?: string; + + /** Fires before closing the DatePicker popup. + */ + beforeClose?(e: BeforeCloseEventArgs): void; + + /** Fires when each date is created in the DatePicker popup calendar. + */ + beforeDateCreate?(e: BeforeDateCreateEventArgs): void; + + /** Fires before opening the DatePicker popup. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + + /** Fires when the DatePicker input value is changed. + */ + change?(e: ChangeEventArgs): void; + + /** Fires when DatePicker popup is closed. + */ + close?(e: CloseEventArgs): void; + + /** Fires when the DatePicker is created successfully. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the DatePicker is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when DatePicker input gets focus. + */ + focusIn?(e: FocusInEventArgs): void; + + /** Fires when DatePicker input loses the focus. + */ + focusOut?(e: FocusOutEventArgs): void; + + /** Fires when calender view navigates to month/year/decade/century. + */ + navigate?(e: NavigateEventArgs): void; + + /** Fires when DatePicker popup is opened. + */ + open?(e: OpenEventArgs): void; + + /** Fires when a date is selected from the DatePicker popup. + */ + select?(e: SelectEventArgs): void; + } + + export interface BeforeCloseEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Returns the cell object. - */ - cell?: ej.FileExplorer.Model; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** Returns the column object. - */ - column?: any; + /** returns the name of the event. + */ + type?: string; - /** Returns the current row data. - */ - data?: any; + /** returns the event parameters from DatePicker. + */ + events?: any; - /** Returns the grid model of FileExplorer. - */ - model?: any; + /** returns the DatePicker popup. + */ + element?: HTMLElement; + } - /** Returns the current row index. - */ - rowIndex?: number; + export interface BeforeDateCreateEventArgs { - /** returns the name of the event. - */ - type?: string; - } - - export interface UnselectEventArgs { - - /** Returns the FileExplorer model. - */ - model?: ej.FileExplorer.Model; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Returns the name of unselected item. - */ - name?: string; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** Returns the name of unselected items. - */ - names?: string[]; + /** returns the name of the event. + */ + type?: string; - /** Returns the type of unselected item. - */ - nodeType?: string; + /** returns the currently created date object. + */ + date?: any; - /** Returns the path of unselected item. - */ - path?: string; + /** returns the current DOM object of the date from the Calendar. + */ + element?: HTMLElement; - /** Returns the name of the event. - */ - type?: string; - - /** Returns the unselected item details. - */ - unselectedItem?: any; - - /** Returns the unselected items details. - */ - unselectedItems?: any[]; - } - - export interface ContextMenuSettings { - - /** The items property is used to configure and group the required ContextMenu items in FileExplorer control. - * @Default {{% highlight javascript %}{navbar: [NewFolder, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, Getinfo],cwd: [Refresh, Paste,|, SortBy, |, NewFolder, Upload, |, - * Getinfo],files: [Open, Download, |, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, OpenFolderLocation, Getinfo]}{% endhighlight %}} - */ - items?: any; - - /** The customMenuFields property is used to define custom functionality for custom ContextMenu item's which are defined in items property. - * @Default {[]} - */ - customMenuFields?: any[]; - } - - export interface FilterSettings { - - /** It allows to search the text given in search Textbox in every keyup event. When this property was set as false, searching will works only on Enter key and searchbar blur. - * @Default {true} - */ - allowSearchOnTyping?: boolean; - - /** Enables or disables to perform the filter operation with case sensitive. - * @Default {false} - */ - caseSensitiveSearch?: boolean; - - /** Sets the search filter type. There are several filter types available such as "startswith", "contains", "endswith". See filterType. - * @Default {ej.FileExplorer.filterType.Contains} - */ - filterType?: ej.FilterType | string; - } - - export interface GridSettings { - - /** Allows to Resize the width of the columns by simply click and move the particular column header line. - * @Default {true} - */ - allowResizing?: boolean; - - /** Gets or sets a value that indicates whether to enable the dynamic sorting behavior on grid data. Sorting can be done through clicking on particular column header. - * @Default {true} - */ - allowSorting?: boolean; - - /** Gets or sets an object that indicates to render the grid with specified columns. You can use this property same as the column property in Grid control. - * @Default {[{ field: name, headerText: Name, width: 30% }, { field: dateModified, headerText: Date Modified, width: 30% }, { field: type, headerText: Type, width: 15% }, - * { field: size, headerText: Size, width: 12%, textAlign: right, headerTextAlign: left }]} - */ - columns?: any[]; - } - - export interface UploadSettings { - - /** Specifies the maximum file size allowed to upload. It accepts the value in bytes. - * @Default {31457280} - */ - maxFileSize?: number; - - /** Enables or disables the multiple files upload. When it is enabled, you can upload multiple files at a time and when disabled, you can upload only one file at a time. - * @Default {true} - */ - allowMultipleFile?: boolean; - - /** Enables or disables the auto upload option while uploading files in FileExplorer control. - * @Default {false} - */ - autoUpload?: boolean; - } - - enum layoutType { - - ///Supports to display files in tile view - Tile, - - ///Supports to display files in grid view - Grid, - - ///Supports to display files as large icons - LargeIcons - } - - } - - class DatePicker extends ej.Widget { - static fn: DatePicker; - constructor(element: JQuery | Element, options?: DatePicker.Model); - static Locale: any; - model: DatePicker.Model; - defaults: DatePicker.Model; - - /** Disables the DatePicker control. - * @returns {void} - */ - disable(): void; - - /** Enable the DatePicker control, if it is in disabled state. - * @returns {void} - */ - enable(): void; - - /** Returns the current date value in the DatePicker control. - * @returns {string} - */ - getValue(): string; - - /** Close the DatePicker popup, if it is in opened state. - * @returns {void} - */ - hide(): void; - - /** Opens the DatePicker popup. - * @returns {void} - */ - show(): void; - } - export namespace DatePicker { - - export interface Model { - - /** Used to allow or restrict the editing in DatePicker input field directly. By setting false to this API, You can only pick the date from DatePicker popup. - * @Default {true} - */ - allowEdit?: boolean; - - /** allow or restrict the drill down to multiple levels of view (month/year/decade) in DatePicker calendar - * @Default {true} - */ - allowDrillDown?: boolean; - - /** Disable the list of specified date value. - * @Default {{}} - */ - blackoutDates?: any; - - /** Sets the specified text value to the today button in the DatePicker calendar. - * @Default {Today} - */ - buttonText?: string; - - /** Sets the root CSS class for DatePicker theme, which is used customize. - */ - cssClass?: string; - - /** Formats the value of the DatePicker in to the specified date format. If this API is not specified, dateFormat will be set based on the current culture of DatePicker. - * @Default {MM/dd/yyyy} - */ - dateFormat?: string; - - /** Specifies the header format of days in DatePicker calendar. See below to get available Headers options - * @Default {ej.DatePicker.Header.Short} - */ - dayHeaderFormat?: string | ej.DatePicker.Header; - - /** Specifies the navigation depth level in DatePicker calendar. This option is not applied when start level view option is lower than depth level view. - * See below to know available levels in DatePicker Calendar - */ - depthLevel?: string | ej.DatePicker.Level; - - /** Allows to embed the DatePicker calendar in the page. Also associates DatePicker with div element instead of input. - * @Default {false} - */ - displayInline?: boolean; - - /** Enables or disables the animation effect with DatePicker calendar. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Enable or disable the DatePicker control. - * @Default {true} - */ - enabled?: boolean; - - /** Sustain the entire widget model of DatePicker even after form post or browser refresh - * @Default {false} - */ - enablePersistence?: boolean; - - /** Displays DatePicker calendar along with DatePicker input field in Right to Left direction. - * @Default {false} - */ - enableRTL?: boolean; - - /** Allows to enter valid or invalid date in input textbox and indicate as error if it is invalid value, when this API value is set to true. For false value, invalid date is not allowed - * to input field and corrected to valid date automatically, even if invalid date is given. - * @Default {false} - */ - enableStrictMode?: boolean; - - /** Used the required fields for special Dates in DatePicker in order to customize the special dates in a calendar. - * @Default {null} - */ - fields?: Fields; - - /** Specifies the header format to be displayed in the DatePicker calendar. - * @Default {MMMM yyyy} - */ - headerFormat?: string; - - /** Specifies the height of the DatePicker input text. - * @Default {28px} - */ - height?: string; - - /** HighlightSection is used to highlight currently selected date's month/week/workdays. See below to get available HighlightSection options - * @Default {none} - */ - highlightSection?: string | ej.DatePicker.HighlightSection; - - /** Weekend dates will be highlighted when this property is set to true. - * @Default {false} - */ - highlightWeekend?: boolean; - - /** Specifies the HTML Attributes of the DatePicker. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Change the DatePicker calendar and date format based on given culture. - * @Default {en-US} - */ - locale?: string; - - /** Specifies the maximum date in the calendar that the user can select. - * @Default {new Date(2099, 11, 31)} - */ - maxDate?: string | Date; - - /** Specifies the minimum date in the calendar that the user can select. - * @Default {new Date(1900, 00, 01)} - */ - minDate?: string | Date; - - /** Allows to toggles the read only state of the DatePicker. When the widget is readOnly, it doesn't allow your input. - * @Default {false} - */ - readOnly?: boolean; - - /** It allow to show/hide the disabled date ranges - * @Default {true} - */ - showDisabledRange?: boolean; - - /** It allows to display footer in DatePicker calendar. - * @Default {true} - */ - showFooter?: boolean; - - /** It allows to display/hides the other months days from the current month calendar in a DatePicker. - * @Default {true} - */ - showOtherMonths?: boolean; - - /** Shows/hides the date icon button at right side of textbox, which is used to open or close the DatePicker calendar popup. - * @Default {true} - */ - showPopupButton?: boolean; - - /** DatePicker input is displayed with rounded corner when this property is set to true. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Used to show the tooltip when hovering on the days in the DatePicker calendar. - * @Default {true} - */ - showTooltip?: boolean; - - /** Specifies the special dates in DatePicker. - * @Default {null} - */ - specialDates?: any; - - /** Specifies the start day of the week in DatePicker calendar. - * @Default {0} - */ - startDay?: number; - - /** Specifies the start level view in DatePicker calendar. See below available Levels - * @Default {ej.DatePicker.Level.Month} - */ - startLevel?: string | ej.DatePicker.Level; - - /** Specifies the number of months to be navigate for one click of next and previous button in a DatePicker Calendar. - * @Default {1} - */ - stepMonths?: number; - - /** Provides option to customize the tooltip format. - * @Default {ddd MMM dd yyyy} - */ - tooltipFormat?: string; - - /** Sets the jQuery validation support to DatePicker Date value. See validation - * @Default {null} - */ - validationMessage?: any; - - /** Sets the jQuery validation custom rules to the DatePicker. see validation - * @Default {null} - */ - validationRules?: any; - - /** sets or returns the current value of DatePicker - * @Default {null} - */ - value?: string | Date; - - /** Specifies the water mark text to be displayed in input text. - * @Default {Select date} - */ - watermarkText?: string; - - /** Specifies the width of the DatePicker input text. - * @Default {160px} - */ - width?: string; - - /** Fires before closing the DatePicker popup. */ - beforeClose?(e: BeforeCloseEventArgs): void; - - /** Fires when each date is created in the DatePicker popup calendar. */ - beforeDateCreate?(e: BeforeDateCreateEventArgs): void; - - /** Fires before opening the DatePicker popup. */ - beforeOpen?(e: BeforeOpenEventArgs): void; - - /** Fires when the DatePicker input value is changed. */ - change?(e: ChangeEventArgs): void; + /** returns the currently created date as string type. + */ + value?: string; + } - /** Fires when DatePicker popup is closed. */ - close?(e: CloseEventArgs): void; + export interface BeforeOpenEventArgs { - /** Fires when the DatePicker is created successfully. */ - create?(e: CreateEventArgs): void; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Fires when the DatePicker is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** Fires when DatePicker input gets focus. */ - focusIn?(e: FocusInEventArgs): void; + /** returns the name of the event. + */ + type?: string; - /** Fires when DatePicker input loses the focus. */ - focusOut?(e: FocusOutEventArgs): void; + /** returns the event parameters from DatePicker. + */ + events?: any; - /** Fires when calender view navigates to month/year/decade/century. */ - navigate?(e: NavigateEventArgs): void; + /** returns the DatePicker popup. + */ + element?: HTMLElement; + } - /** Fires when DatePicker popup is opened. */ - open?(e: OpenEventArgs): void; + export interface ChangeEventArgs { - /** Fires when a date is selected from the DatePicker popup. */ - select?(e: SelectEventArgs): void; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface BeforeCloseEventArgs { + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + /** returns the DatePicker input value. + */ + value?: string; - /** returns the name of the event. - */ - type?: string; + /** returns the previously selected value. + */ + prevDate?: string; + } - /** returns the event parameters from DatePicker. - */ - events?: any; + export interface CloseEventArgs { - /** returns the DatePicker popup. - */ - element?: HTMLElement; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface BeforeDateCreateEventArgs { + /** returns the current date object. + */ + date?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + /** returns the name of the event. + */ + type?: string; - /** returns the name of the event. - */ - type?: string; + /** returns the current date value. + */ + value?: string; - /** returns the currently created date object. - */ - date?: any; + /** returns the previously selected value. + */ + prevDate?: string; + } - /** returns the current DOM object of the date from the Calendar. - */ - element?: HTMLElement; + export interface CreateEventArgs { - /** returns the currently created date as string type. - */ - value?: string; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface BeforeOpenEventArgs { + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; + } - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + export interface DestroyEventArgs { - /** returns the name of the event. - */ - type?: string; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the event parameters from DatePicker. - */ - events?: any; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** returns the DatePicker popup. - */ - element?: HTMLElement; - } + /** returns the name of the event. + */ + type?: string; + } - export interface ChangeEventArgs { + export interface FocusInEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** returns the name of the event. - */ - type?: string; + /** returns the name of the event. + */ + type?: string; - /** returns the DatePicker input value. - */ - value?: string; + /** returns the currently selected date value. + */ + value?: string; + } - /** returns the previously selected value. - */ - prevDate?: string; - } + export interface FocusOutEventArgs { - export interface CloseEventArgs { + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** returns the current date object. - */ - date?: any; + /** returns the name of the event. + */ + type?: string; - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + /** returns the currently selected date value. + */ + value?: string; - /** returns the name of the event. - */ - type?: string; + /** returns the previously selected date value. + */ + prevDate?: string; + } - /** returns the current date value. - */ - value?: string; + export interface NavigateEventArgs { - /** returns the previously selected value. - */ - prevDate?: string; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface CreateEventArgs { + /** returns the current date object. + */ + date?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + /** returns the previous view state of calendar. + */ + navigateFrom?: string; - /** returns the name of the event. - */ - type?: string; - } + /** returns the current view state of calendar. + */ + navigateTo?: string; - export interface DestroyEventArgs { + /** returns the name of the event + */ + type?: string; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the current date value. + */ + value?: string; + } - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + export interface OpenEventArgs { - /** returns the name of the event. - */ - type?: string; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface FocusInEventArgs { + /** returns the current date object. + */ + date?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event. - */ - type?: string; + /** returns the current date value. + */ + value?: string; - /** returns the currently selected date value. - */ - value?: string; - } + /** returns the previously selected value. + */ + prevDate?: string; + } - export interface FocusOutEventArgs { + export interface SelectEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + /** returns the selected date object. + */ + date?: any; - /** returns the name of the event. - */ - type?: string; + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; - /** returns the currently selected date value. - */ - value?: string; + /** returns the name of the event. + */ + type?: string; - /** returns the previously selected date value. - */ - prevDate?: string; - } + /** returns the current date value. + */ + value?: string; - export interface NavigateEventArgs { + /** returns the previously selected value. + */ + prevDate?: string; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns whether the currently selected date is special date or not. + */ + isSpecialDay?: string; + } - /** returns the current date object. - */ - date?: any; + export interface Fields { - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + /** Specifies the specials dates + */ + date?: string; - /** returns the previous view state of calendar. - */ - navigateFrom?: string; + /** Specifies the icon class to special dates. + */ + iconClass?: string; - /** returns the current view state of calendar. - */ - navigateTo?: string; + /** Specifies the tooltip to special dates. + */ + tooltip?: string; - /** returns the name of the event - */ - type?: string; + /** Specifies the CSS class to customize the date. + */ + cssClass?: string; + } - /** returns the current date value. - */ - value?: string; - } + enum Header { - export interface OpenEventArgs { + ///Removes day header in DatePicker + None, - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + ///sets the short format of day name (like Sun) in header in DatePicker + Short, - /** returns the current date object. - */ - date?: any; + ///sets the Min format of day name (like su) in header format DatePicker + Min + } - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; - /** returns the name of the event - */ - type?: string; + enum Level { - /** returns the current date value. - */ - value?: string; + ///allow navigation upto year level in DatePicker + Year, - /** returns the previously selected value. - */ - prevDate?: string; - } + ///allow navigation upto decade level in DatePicker + Decade, - export interface SelectEventArgs { + ///allow navigation upto Century level in DatePicker + Century + } - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the selected date object. - */ - date?: any; + enum HighlightSection { - /** returns the DatePicker model. - */ - model?: ej.DatePicker.Model; + ///Highlight the week of the currently selected date in DatePicker popup calendar + Week, - /** returns the name of the event. - */ - type?: string; + ///Highlight the workdays in a currently selected date's week in DatePicker popup calendar + WorkDays, - /** returns the current date value. - */ - value?: string; + ///Nothing will be highlighted, remove highlights from DatePicker popup calendar if already exists + None + } - /** returns the previously selected value. - */ - prevDate?: string; + } - /** returns whether the currently selected date is special date or not. - */ - isSpecialDay?: string; - } + class DateTimePicker extends ej.Widget { + static fn: DateTimePicker; + constructor(element: JQuery | Element, options?: DateTimePicker.Model); + static Locale: any; + model: DateTimePicker.Model; + defaults: DateTimePicker.Model; - export interface Fields { + /** Disables the DateTimePicker control. + * @returns {void} + */ + disable(): void; - /** Specifies the specials dates - */ - date?: string; + /** Enables the DateTimePicker control. + * @returns {void} + */ + enable(): void; + + /** Returns the current datetime value in the DateTimePicker. + * @returns {string} + */ + getValue(): string; + + /** Hides or closes the DateTimePicker popup. + * @returns {void} + */ + hide(): void; + + /** Updates the current system date value and time value to the DateTimePicker. + * @returns {void} + */ + setCurrentDateTime(): void; + + /** Shows or opens the DateTimePicker popup. + * @returns {void} + */ + show(): void; + } + export namespace DateTimePicker { + + export interface Model { + + /** Used to allow or restrict the editing in DateTimePicker input field directly. By setting false to this API, You can only pick the date and time values from DateTimePicker popup. + * @Default {true} + */ + allowEdit?: boolean; + + /** Displays the custom text for the buttons inside the DateTimePicker popup. when the culture value changed, we can change the buttons text based on the culture. + * @Default {{ today: Today, timeNow: Time Now, done: Done, timeTitle: Time }} + */ + buttonText?: ButtonText; + + /** Set the root class for DateTimePicker theme. This cssClass API helps to use custom skinning option for DateTimePicker control. + */ + cssClass?: string; + + /** Defines the datetime format displayed in the DateTimePicker. The value should be a combination of date format and time format. + * @Default {M/d/yyyy h:mm tt} + */ + dateTimeFormat?: string; + + /** Specifies the header format of the datepicker inside the DateTimePicker popup. See DatePicker.Header + * @Default {ej.DatePicker.Header.Short} + */ + dayHeaderFormat?: ej.DatePicker.Header|string; + + /** Specifies the navigation depth level in DatePicker calendar inside DateTimePicker popup. This option is not applied when start level view option is lower than depth level view. + * See ej.DatePicker.Level + */ + depthLevel?: ej.DatePicker.Level|string; + + /** Enable or disable the animation effect in DateTimePicker. + * @Default {true} + */ + enableAnimation?: boolean; + + /** When this property is set to false, it disables the DateTimePicker control. + * @Default {false} + */ + enabled?: boolean; + + /** Enables or disables the state maintenance of DateTimePicker. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Sets the DateTimePicker direction as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /** When enableStrictMode true it allows the value outside of the range also but it highlights the textbox with error class, otherwise it internally changed to the correct value. + * @Default {false} + */ + enableStrictMode?: boolean; + + /** Specifies the header format to be displayed in the DatePicker calendar inside the DateTimePicker popup. + * @Default {MMMM yyyy} + */ + headerFormat?: string; + + /** Defines the height of the DateTimePicker textbox. + * @Default {30} + */ + height?: string|number; + + /** Specifies the HTML Attributes of the ejDateTimePicker + * @Default {{}} + */ + htmlAttributes?: any; + + /** Sets the time interval between the two adjacent time values in the time popup. + * @Default {30} + */ + interval?: number; + + /** Defines the localization culture for DateTimePicker. + * @Default {en-US} + */ + locale?: string; + + /** Sets the maximum value to the DateTimePicker. Beyond the maximum value an error class is added to the wrapper element when we set true to enableStrictMode. + * @Default {new Date(12/31/2099 11:59:59 PM)} + */ + maxDateTime?: string|Date; + + /** Sets the minimum value to the DateTimePicker. Behind the minimum value an error class is added to the wrapper element. + * @Default {new Date(1/1/1900 12:00:00 AM)} + */ + minDateTime?: string|Date; + + /** Specifies the popup position of DateTimePicker.See below to know available popup positions + * @Default {ej.DateTimePicker.Bottom} + */ + popupPosition?: string|ej.popupPosition; + + /** Indicates that the DateTimePicker value can only be read and can’t change. + * @Default {false} + */ + readOnly?: boolean; + + /** It allows showing days in other months of DatePicker calendar inside the DateTimePicker popup. + * @Default {true} + */ + showOtherMonths?: boolean; + + /** Shows or hides the arrow button from the DateTimePicker textbox. When the button disabled, the DateTimePicker popup opens while focus in the textbox and hides while focus out from + * the textbox. + * @Default {true} + */ + showPopupButton?: boolean; + + /** Changes the sharped edges into rounded corner for the DateTimePicker textbox and popup. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies the start day of the week in datepicker inside the DateTimePicker popup. + * @Default {1} + */ + startDay?: number; + + /** Specifies the start level view in datepicker inside the DateTimePicker popup. See DatePicker.Level + * @Default {ej.DatePicker.Level.Month or month} + */ + startLevel?: ej.DatePicker.Level|string; + + /** Specifies the number of months to navigate at one click of next and previous button in datepicker inside the DateTimePicker popup. + * @Default {1} + */ + stepMonths?: number; + + /** Defines the time format displayed in the time dropdown inside the DateTimePicker popup. + * @Default {h:mm tt} + */ + timeDisplayFormat?: string; + + /** We can drill down up to time interval on selected date with meridian details. + * @Default {{ enabled: false, interval: 5, showMeridian: false, autoClose: true }} + */ + timeDrillDown?: TimeDrillDown; + + /** Defines the width of the time dropdown inside the DateTimePicker popup. + * @Default {100} + */ + timePopupWidth?: string|number; + + /** Set the jQuery validation error message in DateTimePicker. + * @Default {null} + */ + validationMessage?: any; + + /** Set the jQuery validation rules in DateTimePicker. + * @Default {null} + */ + validationRules?: any; + + /** Sets the DateTime value to the control. + */ + value?: string|Date; + + /** Specifies the water mark text to be displayed in input text. + * @Default {Select date and time} + */ + watermarkText?: string; + + /** Defines the width of the DateTimePicker textbox. + * @Default {143} + */ + width?: string|number; + + /** Fires before the datetime popup closed in the DateTimePicker. + */ + beforeClose?(e: BeforeCloseEventArgs): void; + + /** Fires before the datetime popup open in the DateTimePicker. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + + /** Fires when the datetime value changed in the DateTimePicker textbox. + */ + change?(e: ChangeEventArgs): void; + + /** Fires when DateTimePicker popup closes. + */ + close?(e: CloseEventArgs): void; + + /** Fires after DateTimePicker control is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the DateTimePicker is destroyed successfully + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when the focus-in happens in the DateTimePicker textbox. + */ + focusIn?(e: FocusInEventArgs): void; + + /** Fires when the focus-out happens in the DateTimePicker textbox. + */ + focusOut?(e: FocusOutEventArgs): void; + + /** Fires when DateTimePicker popup opens. + */ + open?(e: OpenEventArgs): void; + } + + export interface BeforeCloseEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the DateTimePicker model. + */ + model?: ej.DateTimePicker.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the event parameters from DateTimePicker. + */ + events?: any; - /** Specifies the icon class to special dates. - */ - iconClass?: string; + /** returns the DateTimePicker popup. + */ + element?: HTMLElement; + } - /** Specifies the tooltip to special dates. - */ - tooltip?: string; + export interface BeforeOpenEventArgs { - /** Specifies the CSS class to customize the date. - */ - cssClass?: string; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - enum Header { + /** returns the DateTimePicker model. + */ + model?: ej.DateTimePicker.Model; - ///Removes day header in DatePicker - None, + /** returns the name of the event. + */ + type?: string; - ///sets the short format of day name (like Sun) in header in DatePicker - Short, + /** returns the event parameters from DateTimePicker. + */ + events?: any; - ///sets the Min format of day name (like su) in header format DatePicker - Min - } + /** returns the DateTimePicker popup. + */ + element?: HTMLElement; + } + export interface ChangeEventArgs { - enum Level { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - ///allow navigation upto year level in DatePicker - Year, + /** returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; - ///allow navigation upto decade level in DatePicker - Decade, + /** returns the name of the event + */ + type?: string; - ///allow navigation upto Century level in DatePicker - Century - } + /** returns the current value is valid or not + */ + isValidState?: boolean; + /** returns the modified datetime value + */ + value?: string; - enum HighlightSection { + /** returns the previously selected date time value + */ + prevDateTime?: string; - ///Highlight the week of the currently selected date in DatePicker popup calendar - Week, + /** returns true if change event triggered by interaction, otherwise returns false + */ + isInteraction?: boolean; + } - ///Highlight the workdays in a currently selected date's week in DatePicker popup calendar - WorkDays, + export interface CloseEventArgs { - ///Nothing will be highlighted, remove highlights from DatePicker popup calendar if already exists - None - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - } + /** returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; - class DateTimePicker extends ej.Widget { - static fn: DateTimePicker; - constructor(element: JQuery | Element, options?: DateTimePicker.Model); - static Locale: any; - model: DateTimePicker.Model; - defaults: DateTimePicker.Model; + /** returns the name of the event + */ + type?: string; - /** Disables the DateTimePicker control. - * @returns {void} - */ - disable(): void; + /** returns the modified datetime value + */ + value?: string; - /** Enables the DateTimePicker control. - * @returns {void} - */ - enable(): void; - - /** Returns the current datetime value in the DateTimePicker. - * @returns {string} - */ - getValue(): string; - - /** Hides or closes the DateTimePicker popup. - * @returns {void} - */ - hide(): void; - - /** Updates the current system date value and time value to the DateTimePicker. - * @returns {void} - */ - setCurrentDateTime(): void; - - /** Shows or opens the DateTimePicker popup. - * @returns {void} - */ - show(): void; - } - export namespace DateTimePicker { - - export interface Model { - - /** Used to allow or restrict the editing in DateTimePicker input field directly. By setting false to this API, You can only pick the date and time values from DateTimePicker popup. - * @Default {true} - */ - allowEdit?: boolean; - - /** Displays the custom text for the buttons inside the DateTimePicker popup. when the culture value changed, we can change the buttons text based on the culture. - * @Default {{ today: Today, timeNow: Time Now, done: Done, timeTitle: Time }} - */ - buttonText?: ButtonText; - - /** Set the root class for DateTimePicker theme. This cssClass API helps to use custom skinning option for DateTimePicker control. - */ - cssClass?: string; - - /** Defines the datetime format displayed in the DateTimePicker. The value should be a combination of date format and time format. - * @Default {M/d/yyyy h:mm tt} - */ - dateTimeFormat?: string; - - /** Specifies the header format of the datepicker inside the DateTimePicker popup. See DatePicker.Header - * @Default {ej.DatePicker.Header.Short} - */ - dayHeaderFormat?: ej.DatePicker.Header | string; - - /** Specifies the navigation depth level in DatePicker calendar inside DateTimePicker popup. This option is not applied - * when start level view option is lower than depth level view. See ej.DatePicker.Level - */ - depthLevel?: ej.DatePicker.Level | string; - - /** Enable or disable the animation effect in DateTimePicker. - * @Default {true} - */ - enableAnimation?: boolean; - - /** When this property is set to false, it disables the DateTimePicker control. - * @Default {false} - */ - enabled?: boolean; - - /** Enables or disables the state maintenance of DateTimePicker. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Sets the DateTimePicker direction as right to left alignment. - * @Default {false} - */ - enableRTL?: boolean; - - /** When enableStrictMode true it allows the value outside of the range also but it highlights the textbox with error class, otherwise it internally changed to the correct value. - * @Default {false} - */ - enableStrictMode?: boolean; - - /** Specifies the header format to be displayed in the DatePicker calendar inside the DateTimePicker popup. - * @Default {MMMM yyyy} - */ - headerFormat?: string; - - /** Defines the height of the DateTimePicker textbox. - * @Default {30} - */ - height?: string | number; - - /** Specifies the HTML Attributes of the ejDateTimePicker - * @Default {{}} - */ - htmlAttributes?: any; - - /** Sets the time interval between the two adjacent time values in the time popup. - * @Default {30} - */ - interval?: number; - - /** Defines the localization culture for DateTimePicker. - * @Default {en-US} - */ - locale?: string; - - /** Sets the maximum value to the DateTimePicker. Beyond the maximum value an error class is added to the wrapper element when we set true to enableStrictMode. - * @Default {new Date(12/31/2099 11:59:59 PM)} - */ - maxDateTime?: string | Date; - - /** Sets the minimum value to the DateTimePicker. Behind the minimum value an error class is added to the wrapper element. - * @Default {new Date(1/1/1900 12:00:00 AM)} - */ - minDateTime?: string | Date; - - /** Specifies the popup position of DateTimePicker.See below to know available popup positions - * @Default {ej.DateTimePicker.Bottom} - */ - popupPosition?: string | ej.popupPosition; - - /** Indicates that the DateTimePicker value can only be read and can’t change. - * @Default {false} - */ - readOnly?: boolean; - - /** It allows showing days in other months of DatePicker calendar inside the DateTimePicker popup. - * @Default {true} - */ - showOtherMonths?: boolean; - - /** Shows or hides the arrow button from the DateTimePicker textbox. When the button disabled, the DateTimePicker popup opens while focus in the textbox and hides while focus out from the textbox. - * @Default {true} - */ - showPopupButton?: boolean; - - /** Changes the sharped edges into rounded corner for the DateTimePicker textbox and popup. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specifies the start day of the week in datepicker inside the DateTimePicker popup. - * @Default {1} - */ - startDay?: number; - - /** Specifies the start level view in datepicker inside the DateTimePicker popup. See DatePicker.Level - * @Default {ej.DatePicker.Level.Month or month} - */ - startLevel?: ej.DatePicker.Level | string; - - /** Specifies the number of months to navigate at one click of next and previous button in datepicker inside the DateTimePicker popup. - * @Default {1} - */ - stepMonths?: number; - - /** Defines the time format displayed in the time dropdown inside the DateTimePicker popup. - * @Default {h:mm tt} - */ - timeDisplayFormat?: string; - - /** We can drill down up to time interval on selected date with meridian details. - * @Default {{ enabled: false, interval: 5, showMeridian: false, autoClose: true }} - */ - timeDrillDown?: TimeDrillDown; - - /** Defines the width of the time dropdown inside the DateTimePicker popup. - * @Default {100} - */ - timePopupWidth?: string | number; - - /** Set the jQuery validation error message in DateTimePicker. - * @Default {null} - */ - validationMessage?: any; - - /** Set the jQuery validation rules in DateTimePicker. - * @Default {null} - */ - validationRules?: any; - - /** Sets the DateTime value to the control. - */ - value?: string | Date; - - /** Specifies the water mark text to be displayed in input text. - * @Default {Select date and time} - */ - watermarkText?: string; - - /** Defines the width of the DateTimePicker textbox. - * @Default {143} - */ - width?: string | number; - - /** Fires before the datetime popup closed in the DateTimePicker. */ - beforeClose?(e: BeforeCloseEventArgs): void; - - /** Fires before the datetime popup open in the DateTimePicker. */ - beforeOpen?(e: BeforeOpenEventArgs): void; - - /** Fires when the datetime value changed in the DateTimePicker textbox. */ - change?(e: ChangeEventArgs): void; - - /** Fires when DateTimePicker popup closes. */ - close?(e: CloseEventArgs): void; - - /** Fires after DateTimePicker control is created. */ - create?(e: CreateEventArgs): void; + /** returns the previously selected date time value + */ + prevDateTime?: string; + } - /** Fires when the DateTimePicker is destroyed successfully */ - destroy?(e: DestroyEventArgs): void; - - /** Fires when the focus-in happens in the DateTimePicker textbox. */ - focusIn?(e: FocusInEventArgs): void; + export interface CreateEventArgs { - /** Fires when the focus-out happens in the DateTimePicker textbox. */ - focusOut?(e: FocusOutEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Fires when DateTimePicker popup opens. */ - open?(e: OpenEventArgs): void; - } + /** returns the DateTimePicker model + */ + model?: ej.DateTimePicker.Model; - export interface BeforeCloseEventArgs { + /** returns the name of the event + */ + type?: string; + } - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + export interface DestroyEventArgs { - /** returns the DateTimePicker model. - */ - model?: ej.DateTimePicker.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event. - */ - type?: string; + /** returns the DateTimePicker model + */ + model?: ej.DateTimePicker.Model; - /** returns the event parameters from DateTimePicker. - */ - events?: any; + /** returns the name of the event + */ + type?: string; + } - /** returns the DateTimePicker popup. - */ - element?: HTMLElement; - } + export interface FocusInEventArgs { - export interface BeforeOpenEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; - /** returns the DateTimePicker model. - */ - model?: ej.DateTimePicker.Model; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event. - */ - type?: string; + /** returns the datetime value, which is in text box + */ + value?: string; + } + + export interface FocusOutEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the datetime value, which is in text box + */ + value?: string; + } + + export interface OpenEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the modified datetime value + */ + value?: string; + + /** returns the previously selected date time value + */ + prevDateTime?: string; + } + + export interface ButtonText { + + /** Sets the text for the Done button inside the datetime popup. + */ + done?: string; + + /** Sets the text for the Now button inside the datetime popup. + */ + timeNow?: string; + + /** Sets the header text for the Time dropdown. + */ + timeTitle?: string; + + /** Sets the text for the Today button inside the datetime popup. + */ + today?: string; + } + + export interface TimeDrillDown { + + /** This is the field to show/hide the timeDrillDown in DateTimePicker. + */ + enabled?: boolean; + + /** Sets the interval time of minutes on selected date. + */ + interval?: number; + + /** Allows the user to show or hide the meridian with time in DateTimePicker. + */ + showMeridian?: boolean; + + /** After choosing the time, the popup will close automatically if we set it as true, otherwise we focus out the DateTimePicker or choose timeNow button for closing the popup. + */ + autoClose?: boolean; + } + } + enum popupPosition { + //Opens the DateTimePicker popup below to the DateTimePicker input box + Bottom, + //Opens the DateTimePicker popup above to the DateTimePicker input box + Top, + } + + class DateRangePicker extends ej.Widget { + static fn: DateRangePicker; + constructor(element: JQuery | Element, options?: DateRangePicker.Model); + static Locale: any; + model: DateRangePicker.Model; + defaults: DateRangePicker.Model; + + /** Add the preset ranges to DateRangePicker popup. + * @param {string} Display name + * @param {any[]} StartDate and endDate of range. + * @returns {void} + */ + addRanges(label: string, range: any[]): void; + + /** Clears the all ranges selections in DateRangePicker popup + * @returns {void} + */ + clearRanges(): void; + + /** Disables the DateRangePicker control. + * @returns {void} + */ + disable(): void; + + /** Enable the DateRangePicker control, if it is in disabled state. + * @returns {void} + */ + enable(): void; + + /** Returns the startDate and endDate values in the selected ranges in the DateRangePicker control. + * @returns {any} + */ + getSelectedRange(): any; + + /** Close the DateRangePicker popup, if it is in opened state. + * @returns {void} + */ + popupHide(): void; + + /** Opens the DateRangePicker popup. + * @returns {void} + */ + popupShow(): void; + + /** set the preset ranges to DateRangePicker popup. + * @returns {void} + */ + setRange(): void; + } + export namespace DateRangePicker { + + export interface Model { + + /** Used to allow or restrict the editing in DateRangePicker input field directly. By setting false to this API, You can only pick the date ranges from DateRangePicker popup. + * @Default {true} + */ + allowEdit?: boolean; + + /** Sets the specified text value to the available buttons (Reset, Cancel, Apply) in the DateRangePicker popup. + * @Default {{ reset: Reset, cancel: Cancel, apply: Apply}} + */ + buttonText?: any; + + /** Sets the root CSS class for DateRangePicker theme, which is used to customize. + */ + cssClass?: string; + + /** Formats the date value of the DateRangePicker in to the specified date format. If this API is not specified, dateFormat will be set based on the current culture of DateRangePicker. + * @Default {MM/dd/yyyy} + */ + dateFormat?: string; + + /** Allows to embed the Timepicker align with the calendars in the page, two timepicker will be render, for selecting start and end date. + * @Default {false} + */ + enableTimePicker?: boolean; + + /** Enable or disable the DateRangePicker control. + * @Default {true} + */ + enabled?: boolean; + + /** Sustain the entire widget model of DateRangePicker even after form post or browser refresh + * @Default {false} + */ + enablePersistence?: boolean; + + /** Specifies the end date of the date ranges. + * @Default {null} + */ + endDate?: string|Date; + + /** Specifies the height of the DateRangePicker input. + * @Default {28px} + */ + height?: string|number; + + /** Change the DateRangePicker calendar and date format based on given culture. + * @Default {en-US} + */ + locale?: string; + + /** Used to add the preset ranges. Added ranges using this, will show in popup in right side for easy selection of different preset ranges. + * @Default {null} + */ + ranges?: any; + + /** Specifies the start date of the date ranges + * @Default {null} + */ + startDate?: string|Date; + + /** Shows/hides the date icon button at right side of textbox, which is used to open or close the DateRangePicker calendar popup. + * @Default {true} + */ + showPopupButton?: boolean; + + /** DateRangePicker input and popup is displayed with rounded corner when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Formats the date value of the DateRangePicker in to the specified time format. If this API is not specified, timeFormat will be set based on the current culture of DateRangePicker. + * @Default {HH:mm tt} + */ + timeFormat?: string; + + /** Separated two date values in string format to sets the date ranges in calendars. + * @Default {null} + */ + value?: string; + + /** Specifies the water mark text to be displayed in input text. + * @Default {Select Range} + */ + watermarkText?: string; + + /** Specifies the width of the DateRangePicker input text. + * @Default {160px} + */ + width?: string|number; + + /** Fires before closing the DateRangePicker popup. + */ + beforeClose?(e: BeforeCloseEventArgs): void; + + /** Fires before opening the DateRangePicker popup. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + + /** Fires when the DateRangePicker values get changed. + */ + onChange?(e: OnChangeEventArgs): void; + + /** Fires when DateRangePicker popup is closed. + */ + close?(e: CloseEventArgs): void; + + /** Fires when the DateRangePicker is created successfully. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the DateRangePicker is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when DateRangePicker popup is opened. + */ + open?(e: OpenEventArgs): void; + + /** Fires when a date ranges is selected from the DateRangePicker popup. + */ + select?(e: SelectEventArgs): void; + } + + export interface BeforeCloseEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the DateRangePicker model + */ + model?: ej.DateRangePicker.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the event parameters from DateRangePicker. + */ + events?: any; + + /** returns the DateRangePicker popup. + */ + element?: HTMLElement; + } + + export interface BeforeOpenEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the event parameters from DateTimePicker. - */ - events?: any; + /** returns the DateRangePicker model. + */ + model?: ej.DateRangePicker.Model; - /** returns the DateTimePicker popup. - */ - element?: HTMLElement; - } + /** returns the name of the event. + */ + type?: string; - export interface ChangeEventArgs { + /** returns the event parameters from DateRangePicker. + */ + events?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the DateRangePicker popup. + */ + element?: HTMLElement; + } - /** returns the TimePicker model - */ - model?: ej.DateTimePicker.Model; + export interface OnChangeEventArgs { - /** returns the name of the event - */ - type?: string; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the current value is valid or not - */ - isValidState?: boolean; + /** returns the DateRangePicker model. + */ + model?: ej.DateRangePicker.Model; - /** returns the modified datetime value - */ - value?: string; + /** returns the name of the event. + */ + type?: string; - /** returns the previously selected date time value - */ - prevDateTime?: string; + /** returns the DateRangePicker input value. + */ + value?: string; - /** returns true if change event triggered by interaction, otherwise returns false - */ - isInteraction?: boolean; - } + /** returns the startDate of DateRangePicker. + */ + startDate?: any; - export interface CloseEventArgs { + /** returns the endDate of the DateRangePicker popup. + */ + endDate?: any; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface CloseEventArgs { - /** returns the TimePicker model - */ - model?: ej.DateTimePicker.Model; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; + /** returns the current date object. + */ + date?: any; - /** returns the modified datetime value - */ - value?: string; + /** returns the DateRangePicker model. + */ + model?: ej.DateRangePicker.Model; - /** returns the previously selected date time value - */ - prevDateTime?: string; - } + /** returns the name of the event. + */ + type?: string; - export interface CreateEventArgs { + /** returns the DateRangePicker popup. + */ + element?: HTMLElement; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface CreateEventArgs { - /** returns the DateTimePicker model - */ - model?: ej.DateTimePicker.Model; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; - } + /** returns the DateRangePicker model. + */ + model?: ej.DateRangePicker.Model; - export interface DestroyEventArgs { + /** returns the name of the event. + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the DateRangePicker model. + */ + model?: ej.DateRangePicker.Model; + + /** returns the name of the event. + */ + type?: string; + } + + export interface OpenEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the current date object. + */ + date?: any; + + /** returns the DateRangePicker model. + */ + model?: ej.DateRangePicker.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the DateRangePicker popup. + */ + element?: HTMLElement; + } + + export interface SelectEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the selected date object. + */ + startDate?: any; + + /** returns the DateRangePicker model. + */ + model?: ej.DateRangePicker.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the current date value. + */ + endDate?: any; + } + } + + class Dialog extends ej.Widget { + static fn: Dialog; + constructor(element: JQuery | Element, options?: Dialog.Model); + static Locale: any; + model: Dialog.Model; + defaults: Dialog.Model; + + /** Closes the dialog widget dynamically. + * @returns {any} + */ + close(): any; + + /** Collapses the content area when it is expanded. + * @returns {any} + */ + collapse(): any; + + /** Destroys the Dialog widget. + * @returns {void} + */ + destroy(): void; + + /** Expands the content area when it is collapsed. + * @returns {any} + */ + expand(): any; + + /** Checks whether the Dialog widget is opened or not. This methods returns Boolean value. + * @returns {boolean} + */ + isOpen(): boolean; + + /** Maximizes the Dialog widget. + * @returns {any} + */ + maximize(): any; + + /** Minimizes the Dialog widget. + * @returns {any} + */ + minimize(): any; + + /** Opens the Dialog widget. + * @returns {any} + */ + open(): any; + + /** Pins the dialog in its current position. + * @returns {any} + */ + pin(): any; + + /** Refreshes the dialog content dynamically. + * @returns {void} + */ + refresh(): void; + + /** Restores the dialog. + * @returns {any} + */ + restore(): any; + + /** Unpins the Dialog widget. + * @returns {any} + */ + unpin(): any; + + /** Sets the title for the Dialog widget. + * @param {string} The title for the dialog widget. + * @returns {any} + */ + setTitle(Title: string): any; + + /** Sets the content for the Dialog widget dynamically. + * @param {string} The content for the dialog widget. It accepts both string and HTML string. + * @returns {any} + */ + setContent(content: string): any; + + /** Sets the focus on the Dialog widget. + * @returns {any} + */ + focus(): any; + } + export namespace Dialog { + + export interface Model { + + /** Adds action buttons like close, minimize, pin, maximize in the dialog header. + */ + actionButtons?: string[]; + + /** Specifies the ajaxSettings option to load the content to the Dialog control. + * @Default {null} + */ + ajaxSettings?: AjaxSettings; + + /** Enables or disables draggable. + */ + allowDraggable?: boolean; + + /** Enables or disables keyboard interaction. + */ + allowKeyboardNavigation?: boolean; + + /** Customizes the Dialog widget animations. The Dialog widget can be animated while opening and closing the dialog. In order to customize animation effects, you need to set + * “enableAnimation” as true. It contains the following sub properties. + */ + animation?: any; + + /** To Enable or disable the scrolling for background element of the modal dialog. This will work only with modal dialog. + */ + backgroundScroll?: boolean; + + /** Closes the dialog widget on pressing the ESC key when it is set to true. + */ + closeOnEscape?: boolean; + + /** The selector for the container element. If the property is set, then dialog will append to the selected element and it is restricted to move only within the specified container + * element. + */ + containment?: string; + + /** The content type to load the dialog content at run time. The possible values are null, AJAX, iframe and image. When it is null (default value), the content inside dialog element + * will be displayed as content and when it is not null, the content will be loaded from the URL specified in the contentUrl property. + */ + contentType?: string; + + /** The URL to load the dialog content (such as AJAX, image, and iframe). In order to load content from URL, you need to set contentType as ‘ajax’ or ‘iframe’ or ‘image’. + */ + contentUrl?: string; + + /** The root class for the Dialog widget to customize the existing theme. + */ + cssClass?: string; + + /** Enable or disables animation when the dialog is opened or closed. + */ + enableAnimation?: boolean; + + /** Enables or disables the Dialog widget. + */ + enabled?: boolean; + + /** Enable or disables modal dialog. The modal dialog acts like a child window that is displayed on top of the main window/screen and disables the main window interaction until it is + * closed. + */ + enableModal?: boolean; + + /** Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. + */ + enablePersistence?: boolean; + + /** Allows the dialog to be resized. The dialog cannot be resized less than the minimum height, width values and greater than the maximum height and width. + */ + enableResize?: boolean; + + /** Displays dialog content from right to left when set to true. + */ + enableRTL?: boolean; + + /** The CSS class name to display the favicon in the dialog header. In order to display favicon, you need to set showHeader as true since the favicon will be displayed in the dialog + * header. + */ + faviconCSS?: string; + + /** Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type and + * “100”, “500” as integer type. + */ + height?: string|number; + + /** Specifies the HTML Attributes of the Dialog. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Enable or disables responsive behavior. + */ + isResponsive?: boolean; + + /** Default Value:{:.param}“en-US” + */ + locale?: string; + + /** Sets the maximum height for the dialog widget. + */ + maxHeight?: string|number; + + /** Sets the maximum width for the dialog widget. + */ + maxWidth?: string|number; + + /** Sets the minimum height for the dialog widget. + */ + minHeight?: string|number; + + /** Sets the minimum width for the dialog widget. + */ + minWidth?: string|number; + + /** Displays the Dialog widget at the given X and Y position. + */ + position?: any; + + /** Shows or hides the dialog header. + */ + showHeader?: boolean; + + /** The Dialog widget can be opened by default i.e. on initialization, when it is set to true. + */ + showOnInit?: boolean; + + /** Enables or disables the rounder corner. + */ + showRoundedCorner?: boolean; + + /** The selector for the container element. If this property is set, the dialog will be displayed (positioned) based on its container. + */ + target?: string; + + /** The title text to be displayed in the dialog header. In order to set title, you need to set showHeader as true since the title will be displayed in the dialog header. + */ + title?: string; + + /** Add or configure the tooltip text for actionButtons in the dialog header. + */ + tooltip?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type and + * “100”, “500” as integer type. + */ + width?: string|number; + + /** Sets the z-index value for the Dialog widget. + */ + zIndex?: number; + + /** Sets the Footer for the Dialog widget. + */ + showFooter?: boolean; + + /** Sets the FooterTemplate for the Dialog widget. + */ + footerTemplateId?: string; + + /** This event is triggered before the dialog widgets gets open. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; - /** returns the DateTimePicker model - */ - model?: ej.DateTimePicker.Model; + /** This event is triggered whenever the AJAX request fails to retrieve the dialog content. + */ + ajaxError?(e: AjaxErrorEventArgs): void; - /** returns the name of the event - */ - type?: string; - } + /** This event is triggered whenever the AJAX request to retrieve the dialog content, gets succeed. + */ + ajaxSuccess?(e: AjaxSuccessEventArgs): void; - export interface FocusInEventArgs { + /** This event is triggered before the dialog widgets get closed. + */ + beforeClose?(e: BeforeCloseEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** This event is triggered after the dialog widget is closed. + */ + close?(e: CloseEventArgs): void; - /** returns the TimePicker model - */ - model?: ej.DateTimePicker.Model; + /** Triggered after the dialog content is loaded in DOM. + */ + contentLoad?(e: ContentLoadEventArgs): void; - /** returns the name of the event - */ - type?: string; + /** Triggered after the dialog is created successfully + */ + create?(e: CreateEventArgs): void; - /** returns the datetime value, which is in text box - */ - value?: string; - } - - export interface FocusOutEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TimePicker model - */ - model?: ej.DateTimePicker.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the datetime value, which is in text box - */ - value?: string; - } - - export interface OpenEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TimePicker model - */ - model?: ej.DateTimePicker.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the modified datetime value - */ - value?: string; - - /** returns the previously selected date time value - */ - prevDateTime?: string; - } - - export interface ButtonText { - - /** Sets the text for the Done button inside the datetime popup. - */ - done?: string; - - /** Sets the text for the Now button inside the datetime popup. - */ - timeNow?: string; - - /** Sets the header text for the Time dropdown. - */ - timeTitle?: string; - - /** Sets the text for the Today button inside the datetime popup. - */ - today?: string; - } - - export interface TimeDrillDown { - - /** This is the field to show/hide the timeDrillDown in DateTimePicker. - */ - enabled?: boolean; - - /** Sets the interval time of minutes on selected date. - */ - interval?: number; - - /** Allows the user to show or hide the meridian with time in DateTimePicker. - */ - showMeridian?: boolean; - - /** After choosing the time, the popup will close automatically if we set it as true, otherwise we focus out the DateTimePicker or choose timeNow button for closing the popup. - */ - autoClose?: boolean; - } - } - enum popupPosition { - //Opens the DateTimePicker popup below to the DateTimePicker input box - Bottom, - //Opens the DateTimePicker popup above to the DateTimePicker input box - Top, - } - - class DateRangePicker extends ej.Widget { - static fn: DateRangePicker; - constructor(element: JQuery | Element, options?: DateRangePicker.Model); - static Locale: any; - model: DateRangePicker.Model; - defaults: DateRangePicker.Model; - - /** Add the preset ranges to DateRangePicker popup. - * @param {string} Display name - * @param {Array} StartDate and endDate of range. - * @returns {void} - */ - addRanges(label: string, range: any[]): void; - - /** Clears the all ranges selections in DateRangePicker popup - * @returns {void} - */ - clearRanges(): void; - - /** Disables the DateRangePicker control. - * @returns {void} - */ - disable(): void; - - /** Enable the DateRangePicker control, if it is in disabled state. - * @returns {void} - */ - enable(): void; - - /** Returns the startDate and endDate values in the selected ranges in the DateRangePicker control. - * @returns {string} - */ - getSelectedValue(): string; - - /** Close the DateRangePicker popup, if it is in opened state. - * @returns {void} - */ - popupHide(): void; - - /** Opens the DateRangePicker popup. - * @returns {void} - */ - popupShow(): void; - - /** set the preset ranges to DateRangePicker popup. - * @returns {void} - */ - setRange(): void; - } - export namespace DateRangePicker { - - export interface Model { - - /** Used to allow or restrict the editing in DateRangePicker input field directly. By setting false to this API, You can only pick the date ranges from DateRangePicker popup. - * @Default {true} - */ - allowEdit?: boolean; - - /** Sets the specified text value to the available buttons (Reset, Cancel, Apply) in the DateRangePicker popup. - * @Default {{ reset: Reset, cancel: Cancel, apply: Apply}} - */ - buttonText?: any; - - /** Sets the root CSS class for DateRangePicker theme, which is used to customize. - */ - cssClass?: string; - - /** Formats the date value of the DateRangePicker in to the specified date format. If this API is not specified, dateFormat will be set based on the current culture of DateRangePicker. - * @Default {MM/dd/yyyy} - */ - dateFormat?: string; - - /** Allows to embed the Timepicker align with the calendars in the page, two timepicker will be render, for selecting start and end date. - * @Default {false} - */ - enableTimePicker?: boolean; - - /** Enable or disable the DateRangePicker control. - * @Default {true} - */ - enabled?: boolean; - - /** Sustain the entire widget model of DateRangePicker even after form post or browser refresh - * @Default {false} - */ - enablePersistence?: boolean; - - /** Specifies the end date of the date ranges. - * @Default {null} - */ - endDate?: string | Date; - - /** Specifies the height of the DateRangePicker input. - * @Default {28px} - */ - height?: string | number; - - /** Change the DateRangePicker calendar and date format based on given culture. - * @Default {en-US} - */ - locale?: string; - - /** Used to add the preset ranges. Added ranges using this, will show in popup in right side for easy selection of different preset ranges. - * @Default {null} - */ - ranges?: any; - - /** Specifies the start date of the date ranges - * @Default {null} - */ - startDate?: string | Date; - - /** Shows/hides the date icon button at right side of textbox, which is used to open or close the DateRangePicker calendar popup. - * @Default {true} - */ - showPopupButton?: boolean; - - /** DateRangePicker input and popup is displayed with rounded corner when this property is set to true. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Formats the date value of the DateRangePicker in to the specified time format. If this API is not specified, timeFormat will be set based on the current culture of DateRangePicker. - * @Default {HH:mm tt} - */ - timeFormat?: string; - - /** Separated two date values in string format to sets the date ranges in calendars. - * @Default {null} - */ - value?: string; - - /** Specifies the water mark text to be displayed in input text. - * @Default {Select Range} - */ - watermarkText?: string; - - /** Specifies the width of the DateRangePicker input text. - * @Default {160px} - */ - width?: string | number; - - /** Fires before closing the DateRangePicker popup. */ - beforeClose?(e: BeforeCloseEventArgs): void; - - /** Fires before opening the DateRangePicker popup. */ - beforeOpen?(e: BeforeOpenEventArgs): void; - - /** Fires when the DateRangePicker values get changed. */ - onChange?(e: OnChangeEventArgs): void; + /** Triggered after the dialog widget is destroyed successfully + */ + destroy?(e: DestroyEventArgs): void; - /** Fires when DateRangePicker popup is closed. */ - close?(e: CloseEventArgs): void; - - /** Fires when the DateRangePicker is created successfully. */ - create?(e: CreateEventArgs): void; - - /** Fires when the DateRangePicker is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; - - /** Fires when DateRangePicker popup is opened. */ - open?(e: OpenEventArgs): void; + /** Triggered while the dialog is dragged. + */ + drag?(e: DragEventArgs): void; - /** Fires when a date ranges is selected from the DateRangePicker popup. */ - select?(e: SelectEventArgs): void; - } + /** Triggered when the user starts dragging the dialog. + */ + dragStart?(e: DragStartEventArgs): void; - export interface BeforeCloseEventArgs { + /** Triggered when the user stops dragging the dialog. + */ + dragStop?(e: DragStopEventArgs): void; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Triggered after the dialog is opened. + */ + open?(e: OpenEventArgs): void; - /** returns the DateRangePicker model - */ - model?: ej.DateRangePicker.Model; + /** Triggered while the dialog is resized. + */ + resize?(e: ResizeEventArgs): void; - /** returns the name of the event. - */ - type?: string; + /** Triggered when the user starts resizing the dialog. + */ + resizeStart?(e: ResizeStartEventArgs): void; - /** returns the event parameters from DateRangePicker. - */ - events?: any; + /** Triggered when the user stops resizing the dialog. + */ + resizeStop?(e: ResizeStopEventArgs): void; - /** returns the DateRangePicker popup. - */ - element?: HTMLElement; - } + /** Triggered when the dialog content is expanded. + */ + expand?(e: ExpandEventArgs): void; - export interface BeforeOpenEventArgs { + /** Triggered when the dialog content is collapsed. + */ + collapse?(e: CollapseEventArgs): void; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Triggered when the custom action button clicked. + */ + actionButtonClick?(e: ActionButtonClickEventArgs): void; + } - /** returns the DateRangePicker model. - */ - model?: ej.DateRangePicker.Model; + export interface BeforeOpenEventArgs { - /** returns the name of the event. - */ - type?: string; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** returns the event parameters from DateRangePicker. - */ - events?: any; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** returns the DateRangePicker popup. - */ - element?: HTMLElement; - } + /** Name of the event + */ + type?: string; + } - export interface OnChangeEventArgs { + export interface AjaxErrorEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** returns the DateRangePicker model. - */ - model?: ej.DateRangePicker.Model; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** returns the name of the event. - */ - type?: string; + /** Name of the event. + */ + type?: string; - /** returns the DateRangePicker input value. - */ - value?: string; + /** URL of the content. + */ + URL?: string; - /** returns the startDate of DateRangePicker. - */ - startDate?: any; + /** Error page content. + */ + responseText?: string; - /** returns the endDate of the DateRangePicker popup. - */ - endDate?: any; - } + /** Error code. + */ + status?: number; - export interface CloseEventArgs { + /** The corresponding error description. + */ + statusText?: string; + } - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + export interface AjaxSuccessEventArgs { - /** returns the current date object. - */ - date?: any; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** returns the DateRangePicker model. - */ - model?: ej.DateRangePicker.Model; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** returns the name of the event. - */ - type?: string; + /** Name of the event. + */ + type?: string; - /** returns the DateRangePicker popup. - */ - element?: HTMLElement; - } + /** URL of the content. + */ + URL?: string; - export interface CreateEventArgs { + /** Response content. + */ + data?: string; + } - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + export interface BeforeCloseEventArgs { - /** returns the DateRangePicker model. - */ - model?: ej.DateRangePicker.Model; + /** Current event object. + */ + event?: any; - /** returns the name of the event. - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - - /** returns the DateRangePicker model. - */ - model?: ej.DateRangePicker.Model; - - /** returns the name of the event. - */ - type?: string; - } - - export interface OpenEventArgs { - - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - - /** returns the current date object. - */ - date?: any; - - /** returns the DateRangePicker model. - */ - model?: ej.DateRangePicker.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the DateRangePicker popup. - */ - element?: HTMLElement; - } - - export interface SelectEventArgs { - - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - - /** returns the selected date object. - */ - startDate?: any; - - /** returns the DateRangePicker model. - */ - model?: ej.DateRangePicker.Model; - - /** returns the name of the event. - */ - type?: string; - - /** returns the current date value. - */ - endDate?: any; - } - } - - class Dialog extends ej.Widget { - static fn: Dialog; - constructor(element: JQuery | Element, options?: Dialog.Model); - static Locale: any; - model: Dialog.Model; - defaults: Dialog.Model; - - /** Closes the dialog widget dynamically. - * @returns {any} - */ - close(): any; - - /** Collapses the content area when it is expanded. - * @returns {any} - */ - collapse(): any; - - /** Destroys the Dialog widget. - * @returns {void} - */ - destroy(): void; - - /** Expands the content area when it is collapsed. - * @returns {any} - */ - expand(): any; - - /** Checks whether the Dialog widget is opened or not. This methods returns Boolean value. - * @returns {boolean} - */ - isOpen(): boolean; - - /** Maximizes the Dialog widget. - * @returns {any} - */ - maximize(): any; - - /** Minimizes the Dialog widget. - * @returns {any} - */ - minimize(): any; - - /** Opens the Dialog widget. - * @returns {any} - */ - open(): any; - - /** Pins the dialog in its current position. - * @returns {any} - */ - pin(): any; - - /** Refreshes the dialog content dynamically. - * @returns {void} - */ - refresh(): void; - - /** Restores the dialog. - * @returns {any} - */ - restore(): any; - - /** Unpins the Dialog widget. - * @returns {any} - */ - unpin(): any; - - /** Sets the title for the Dialog widget. - * @param {string} The title for the dialog widget. - * @returns {any} - */ - setTitle(Title: string): any; - - /** Sets the content for the Dialog widget dynamically. - * @param {string} The content for the dialog widget. It accepts both string and HTML string. - * @returns {any} - */ - setContent(content: string): any; - - /** Sets the focus on the Dialog widget. - * @returns {any} - */ - focus(): any; - } - export namespace Dialog { - - export interface Model { - - /** Adds action buttons like close, minimize, pin, maximize in the dialog header. - */ - actionButtons?: string[]; - - /** Specifies the ajaxSettings option to load the content to the Dialog control. - * @Default {null} - */ - ajaxSettings?: AjaxSettings; - - /** Enables or disables draggable. - */ - allowDraggable?: boolean; - - /** Enables or disables keyboard interaction. - */ - allowKeyboardNavigation?: boolean; - - /** Customizes the Dialog widget animations. The Dialog widget can be animated while opening and closing the dialog. - * In order to customize animation effects, you need to set “enableAnimation” as true. It contains the following sub properties. - */ - animation?: any; - - /** Closes the dialog widget on pressing the ESC key when it is set to true. - */ - closeOnEscape?: boolean; - - /** The selector for the container element. If the property is set, then dialog will append to the selected element and it is restricted to move only within the specified container element. - */ - containment?: string; - - /** The content type to load the dialog content at run time. The possible values are null, AJAX, iframe and image. When it is null (default value), - * the content inside dialog element will be displayed as content and when it is not null, the content will be loaded from the URL specified in the contentUrl property. - */ - contentType?: string; - - /** The URL to load the dialog content (such as AJAX, image, and iframe). In order to load content from URL, you need to set contentType as ‘ajax’ or ‘iframe’ or ‘image’. - */ - contentUrl?: string; - - /** The root class for the Dialog widget to customize the existing theme. - */ - cssClass?: string; - - /** Enable or disables animation when the dialog is opened or closed. - */ - enableAnimation?: boolean; - - /** Enables or disables the Dialog widget. - */ - enabled?: boolean; - - /** Enable or disables modal dialog. The modal dialog acts like a child window that is displayed on top of the main window/screen and disables the main window interaction until it is closed. - */ - enableModal?: boolean; - - /** Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. - */ - enablePersistence?: boolean; - - /** Allows the dialog to be resized. The dialog cannot be resized less than the minimum height, width values and greater than the maximum height and width. - */ - enableResize?: boolean; - - /** Displays dialog content from right to left when set to true. - */ - enableRTL?: boolean; - - /** The CSS class name to display the favicon in the dialog header. In order to display favicon, you need to set showHeader as true since the favicon will be displayed in the dialog header. - */ - faviconCSS?: string; - - /** Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type - * and “100”, “500” as integer type. - */ - height?: string | number; - - /** Specifies the HTML Attributes of the Dialog. - * @Default {{}} - */ - htmlAttributes?: any; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Enable or disables responsive behavior. - */ - isResponsive?: boolean; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** Default Value:{:.param}“en-US” - */ - locale?: number; + /** Name of the event. + */ + type?: string; + } - /** Sets the maximum height for the dialog widget. - */ - maxHeight?: number; + export interface CloseEventArgs { - /** Sets the maximum width for the dialog widget. - */ - maxWidth?: number; + /** Current event object. + */ + event?: any; - /** Sets the minimum height for the dialog widget. - */ - minHeight?: number; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Sets the minimum width for the dialog widget. - */ - minWidth?: number; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** Displays the Dialog widget at the given X and Y position. - */ - position?: any; + /** Name of the event + */ + type?: string; + } - /** Shows or hides the dialog header. - */ - showHeader?: boolean; + export interface ContentLoadEventArgs { - /** The Dialog widget can be opened by default i.e. on initialization, when it is set to true. - */ - showOnInit?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Enables or disables the rounder corner. - */ - showRoundedCorner?: boolean; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** The selector for the container element. If this property is set, the dialog will be displayed (positioned) based on its container. - */ - target?: string; + /** Name of the event. + */ + type?: string; - /** The title text to be displayed in the dialog header. In order to set title, you need to set showHeader as true since the title will be displayed in the dialog header. - */ - title?: string; + /** URL of the content. + */ + URL?: string; - /** Add or configure the tooltip text for actionButtons in the dialog header. - */ - tooltip?: any; + /** Content type + */ + contentType?: any; + } - /** Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, - * “100px” as string type and “100”, “500” as integer type. - */ - width?: string | number; + export interface CreateEventArgs { - /** Sets the z-index value for the Dialog widget. - */ - zIndex?: number; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Sets the Footer for the Dialog widget. - */ - showFooter?: boolean; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** Sets the FooterTemplate for the Dialog widget. - */ - footerTemplateId?: string; + /** Name of the event. + */ + type?: string; + } - /** This event is triggered before the dialog widgets gets open. */ - beforeOpen?(e: BeforeOpenEventArgs): void; + export interface DestroyEventArgs { - /** This event is triggered whenever the AJAX request fails to retrieve the dialog content. */ - ajaxError?(e: AjaxErrorEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** This event is triggered whenever the AJAX request to retrieve the dialog content, gets succeed. */ - ajaxSuccess?(e: AjaxSuccessEventArgs): void; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** This event is triggered before the dialog widgets get closed. */ - beforeClose?(e: BeforeCloseEventArgs): void; + /** Name of the event. + */ + type?: string; + } - /** This event is triggered after the dialog widget is closed. */ - close?(e: CloseEventArgs): void; + export interface DragEventArgs { - /** Triggered after the dialog content is loaded in DOM. */ - contentLoad?(e: ContentLoadEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Triggered after the dialog is created successfully */ - create?(e: CreateEventArgs): void; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** Triggered after the dialog widget is destroyed successfully */ - destroy?(e: DestroyEventArgs): void; + /** Name of the event. + */ + type?: string; - /** Triggered while the dialog is dragged. */ - drag?(e: DragEventArgs): void; + /** Current event object. + */ + event?: any; + } - /** Triggered when the user starts dragging the dialog. */ - dragStart?(e: DragStartEventArgs): void; + export interface DragStartEventArgs { - /** Triggered when the user stops dragging the dialog. */ - dragStop?(e: DragStopEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Triggered after the dialog is opened. */ - open?(e: OpenEventArgs): void; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** Triggered while the dialog is resized. */ - resize?(e: ResizeEventArgs): void; + /** Name of the event. + */ + type?: string; - /** Triggered when the user starts resizing the dialog. */ - resizeStart?(e: ResizeStartEventArgs): void; + /** Current event object. + */ + event?: any; + } - /** Triggered when the user stops resizing the dialog. */ - resizeStop?(e: ResizeStopEventArgs): void; + export interface DragStopEventArgs { - /** Triggered when the dialog content is expanded. */ - expand?(e: ExpandEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Triggered when the dialog content is collapsed. */ - collapse?(e: CollapseEventArgs): void; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** Triggered when the custom action button clicked. */ - actionButtonClick?(e: ActionButtonClickEventArgs): void; - } + /** Name of the event. + */ + type?: string; - export interface BeforeOpenEventArgs { + /** Current event object. + */ + event?: any; + } - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + export interface OpenEventArgs { - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Name of the event - */ - type?: string; - } + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - export interface AjaxErrorEventArgs { + /** Name of the event. + */ + type?: string; + } - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + export interface ResizeEventArgs { - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Name of the event. - */ - type?: string; + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** URL of the content. - */ - URL?: string; + /** Name of the event. + */ + type?: string; - /** Error page content. - */ - responseText?: string; + /** Current event object. + */ + event?: any; + } - /** Error code. - */ - status?: number; + export interface ResizeStartEventArgs { - /** The corresponding error description. - */ - statusText?: string; - } + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - export interface AjaxSuccessEventArgs { + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** Current event object. + */ + event?: any; + } - /** Name of the event. - */ - type?: string; + export interface ResizeStopEventArgs { - /** URL of the content. - */ - URL?: string; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Response content. - */ - data?: string; - } + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - export interface BeforeCloseEventArgs { + /** Name of the event + */ + type?: string; - /** Current event object. - */ - event?: any; + /** Current event object. + */ + event?: any; + } - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + export interface ExpandEventArgs { - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Name of the event. - */ - type?: string; - } + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; - export interface CloseEventArgs { + /** Name of the event. + */ + type?: string; + } - /** Current event object. - */ - event?: any; + export interface CollapseEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /** Name of the event. + */ + type?: string; + } + + export interface ActionButtonClickEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Name of the event target attribute. + */ + buttonID?: string; + + /** Name of the event. + */ + type?: string; + + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /** Name of the event current target title. + */ + currentTarget?: string; + } + + export interface AjaxSettings { + + /** It specifies, whether to enable or disable asynchronous request. + */ + async?: boolean; + + /** It specifies the page will be cached in the web browser. + */ + cache?: boolean; + + /** It specifies the type of data is send in the query string. + */ + contentType?: string; + + /** It specifies the data as an object, will be passed in the query string. + */ + data?: any; + + /** It specifies the type of data that you're expecting back from the response. + */ + dataType?: string; + + /** It specifies the HTTP request type. + */ + type?: string; + } + } + + class DropDownList extends ej.Widget { + static fn: DropDownList; + constructor(element: JQuery | Element, options?: DropDownList.Model); + static Locale: any; + model: DropDownList.Model; + defaults: DropDownList.Model; + + /** Adding a single item or an array of items into the DropDownList allows you to specify all the field attributes such as value, template, image URL, and HTML attributes for those + * items.Grouping and sorting will not be supported when we add items through this method. + * @param {any|any[]} this parameter should have field attributes with respect to mapped field attributes and it's corresponding values to fields + * @returns {void} + */ + addItem(data: any|any[]): void; + + /** This method is used to select all the items in the DropDownList. + * @returns {void} + */ + checkAll(): void; + + /** Clears the text in the DropDownList textbox. + * @returns {void} + */ + clearText(): void; + + /** Destroys the DropDownList widget. + * @returns {void} + */ + destroy(): void; + + /** This property is used to disable the DropDownList widget. + * @returns {void} + */ + disable(): void; + + /** This property disables the set of items in the DropDownList. + * @param {string|number|any[]} disable the given index list items + * @returns {void} + */ + disableItemsByIndices(index: string|number|any[]): void; + + /** This property enables the DropDownList control. + * @returns {void} + */ + enable(): void; + + /** Enables an Item or set of Items that are disabled in the DropDownList + * @param {string|number|any[]} enable the given index list items if it's disabled + * @returns {void} + */ + enableItemsByIndices(index: string|number|any[]): void; + + /** This method retrieves the items using given value. + * @param {string|number|any} Return the whole object of data based on given value + * @returns {any[]} + */ + getItemDataByValue(value: string|number|any): any[]; + + /** This method is used to retrieve the items that are bound with the DropDownList. + * @returns {any} + */ + getListData(): any; + + /** This method is used to get the selected items in the DropDownList. + * @returns {any[]} + */ + getSelectedItem(): any[]; + + /** This method is used to retrieve the items value that are selected in the DropDownList. + * @returns {string} + */ + getSelectedValue(): string; + + /** This method hides the suggestion popup in the DropDownList. + * @returns {void} + */ + hidePopup(): void; + + /** This method is used to select the list of items in the DropDownList through the Index of the items. + * @param {string|number|any[]} select the given index list items + * @returns {void} + */ + selectItemsByIndices(index: string|number|any[]): void; + + /** This method is used to select an item in the DropDownList by using the given text value. + * @param {string|number|any[]} select the list items relates to given text + * @returns {void} + */ + selectItemByText(index: string|number|any[]): void; + + /** This method is used to select an item in the DropDownList by using the given value. + * @param {string|number|any[]} select the list items relates to given values + * @returns {void} + */ + selectItemByValue(index: string|number|any[]): void; + + /** This method shows the DropDownList control with the suggestion popup. + * @returns {void} + */ + showPopup(): void; + + /** This method is used to unselect all the items in the DropDownList. + * @returns {void} + */ + unCheckAll(): void; + + /** This method is used to unselect the list of items in the DropDownList through Index of the items. + * @param {string|number|any[]} unselect the given index list items + * @returns {void} + */ + unselectItemsByIndices(index: string|number|any[]): void; + + /** This method is used to unselect an item in the DropDownList by using the given text value. + * @param {string|number|any[]} unselect the list items relates to given text + * @returns {void} + */ + unselectItemByText(index: string|number|any[]): void; + + /** This method is used to unselect an item in the DropDownList by using the given value. + * @param {string|number|any[]} unselect the list items relates to given values + * @returns {void} + */ + unselectItemByValue(index: string|number|any[]): void; + } + export namespace DropDownList { + + export interface Model { + + /** The Virtual Scrolling(lazy loading) feature is used to display a large amount of data that you require without buffering the entire load of a huge database records in the + * DropDownList, that is, when scrolling, an AJAX request is sent to fetch some amount of data from the server dynamically. To achieve this scenario with DropDownList, set the + * allowVirtualScrolling to true. + * @Default {false} + */ + allowVirtualScrolling?: boolean; + + /** The cascading DropDownLists is a series of two or more DropDownLists in which each DropDownList is filtered according to the previous DropDownList’s value. + * @Default {null} + */ + cascadeTo?: string; + + /** Sets the case sensitivity of the search operation. It supports both enableFilterSearch and enableIncrementalSearch property. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /** Dropdown widget's style and appearance can be controlled based on 13 different default built-in themes.You can customize the appearance of the dropdown by using the cssClass + * property. You need to specify a class name in the cssClass property and the same class name is used before the class definitions wherever the custom styles are applied. + */ + cssClass?: string; + + /** This property is used to serve data from the data services based on the query provided. To bind the data to the dropdown widget, the dataSource property is assigned with the + * instance of the ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /** Sets the separator when the multiSelectMode with delimiter option or checkbox is enabled with the dropdown. When you enter the delimiter value, the texts after the delimiter are + * considered as a separate word or query. The delimiter string is a single character and must be a symbol. Mostly, the delimiter symbol is used as comma (,) or semi-colon (;) or + * any other special character. + * @Default {','} + */ + delimiterChar?: string; + + /** The enabled Animation property uses the easeOutQuad animation to SlideDown and SlideUp the Popup list in 200 and 100 milliseconds, respectively. + * @Default {false} + */ + enableAnimation?: boolean; + + /** This property is used to indicate whether the DropDownList control responds to the user interaction or not. By default, the control is in the enabled mode and you can disable it + * by setting it to false. + * @Default {true} + */ + enabled?: boolean; + + /** Specifies to perform incremental search for the selection of items from the DropDownList with the help of this property. This helps in selecting the item by using the typed + * character. + * @Default {true} + */ + enableIncrementalSearch?: boolean; + + /** This property selects the item in the DropDownList when the item is entered in the Search textbox. + * @Default {false} + */ + enableFilterSearch?: boolean; + + /** Saves the current model value to the browser cookies for state maintenance. While refreshing the DropDownList control page, it retains the model value and it is applied from the + * browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /** This enables the resize handler to resize the popup to any size. + * @Default {false} + */ + enablePopupResize?: boolean; + + /** Sets the DropDownList textbox direction from right to left align. + * @Default {false} + */ + enableRTL?: boolean; + + /** This property is used to sort the Items in the DropDownList. By default, it sorts the items in an ascending order. + * @Default {false} + */ + enableSorting?: boolean; + + /** Specifies the mapping fields for the data items of the DropDownList. + * @Default {null} + */ + fields?: Fields; + + /** When the enableFilterSearch property value is set to true, the values in the DropDownList shows the items starting with or containing the key word/letter typed in the Search + * textbox. + * @Default {ej.FilterType.Contains} + */ + filterType?: ej.FilterType|string; + + /** Used to create visualized header for dropdown items + * @Default {null} + */ + headerTemplate?: string; + + /** Defines the height of the DropDownList textbox. + * @Default {null} + */ + height?: string|number; + + /** It sets the given HTML attributes for the DropDownList control such as ID, name, disabled, etc. + * @Default {null} + */ + htmlAttributes?: any; + + /** Data can be fetched in the DropDownList control by using the DataSource, specifying the number of items. + * @Default {5} + */ + itemsCount?: number; + + /** Allows the user to set the particular country or region language for the DropDownList. + * @Default {en-US} + */ + locale?: string; + + /** Defines the maximum height of the suggestion box. This property restricts the maximum height of the popup when resize is enabled. + * @Default {null} + */ + maxPopupHeight?: string|number; + + /** Defines the minimum height of the suggestion box. This property restricts the minimum height of the popup when resize is enabled. + * @Default {null} + */ + minPopupHeight?: string|number; + + /** Defines the maximum width of the suggestion box. This property restricts the maximum width of the popup when resize is enabled. + * @Default {null} + */ + maxPopupWidth?: string|number; + + /** Defines the minimum height of the suggestion box. This property restricts the minimum height of the popup when resize is enabled. + * @Default {0} + */ + minPopupWidth?: string|number; + + /** With the help of this property, you can make a single or multi selection with the DropDownList and display the text in two modes, delimiter and visual mode. In delimiter mode, you + * can separate the items by using the delimiter character such as comma (,) or semi-colon (;) or any other special character. In the visual mode, the items are showcased like boxes + * with close icon in the textbox. + * @Default {ej.MultiSelectMode.None} + */ + multiSelectMode?: ej.MultiSelectMode|string; + + /** Defines the height of the suggestion popup box in the DropDownList control. + * @Default {152px} + */ + popupHeight?: string|number; + + /** Defines the width of the suggestion popup box in the DropDownList control. + * @Default {auto} + */ + popupWidth?: string|number; + + /** Specifies the query to retrieve the data from the DataSource. + * @Default {null} + */ + query?: any; + + /** Specifies that the DropDownList textbox values should be read-only. + * @Default {false} + */ + readOnly?: boolean; + + /** Specifies an item to be selected in the DropDownList. + * @Default {null} + */ + selectedIndex?: number; + + /** Specifies the selectedItems for the DropDownList. + * @Default {[]} + */ + selectedIndices?: any[]; + + /** Selects multiple items in the DropDownList with the help of the checkbox control. To achieve this, enable the showCheckbox option to true. + * @Default {false} + */ + showCheckbox?: boolean; + + /** DropDownList control is displayed with the popup seen. + * @Default {false} + */ + showPopupOnLoad?: boolean; + + /** DropDownList textbox displayed with the rounded corner style. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** When the enableSorting property value is set to true, this property helps to sort the items either in ascending or descending order + * @Default {ej.SortOrder.Ascending} + */ + sortOrder?: ej.SortOrder|string; + + /** Specifies the targetID for the DropDownList’s items. + * @Default {null} + */ + targetID?: string; + + /** By default, you can add any text or image to the DropDownList item. To customize the item layout or to create your own visualized elements, you can use this template support. + * @Default {null} + */ + template?: string; + + /** Defines the text value that is displayed in the DropDownList textbox. + * @Default {null} + */ + text?: string; + + /** Sets the jQuery validation error message in the DropDownList + * @Default {null} + */ + validationMessage?: any; + + /** Sets the jQuery validation rules in the Dropdownlist. + * @Default {null} + */ + validationRules?: any; + + /** Specifies the value (text content) for the DropDownList control. + * @Default {null} + */ + value?: string|number; + + /** Specifies a short hint that describes the expected value of the DropDownList control. + * @Default {null} + */ + watermarkText?: string; + + /** Defines the width of the DropDownList textbox. + * @Default {null} + */ + width?: string|number; + + /** The Virtual Scrolling feature is used to display a large amount of records in the DropDownList, that is, when scrolling, an AJAX request is sent to fetch some amount of data from + * the server dynamically. To achieve this scenario with DropDownList, set the allowVirtualScrolling to true. You can set the itemsCount property that represents the number of items + * to be fetched from the server on every AJAX request. + * @Default {normal} + */ + virtualScrollMode?: ej.VirtualScrollMode|string; + + /** Fires the action before the XHR request. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Fires the action when the list of items is bound to the DropDownList by xhr post calling + */ + actionComplete?(e: ActionCompleteEventArgs): void; + + /** Fires the action when the xhr post calling failed on remote data binding with the DropDownList control. + */ + actionFailure?(e: ActionFailureEventArgs): void; + + /** Fires the action when the xhr post calling succeed on remote data binding with the DropDownList control + */ + actionSuccess?(e: ActionSuccessEventArgs): void; + + /** Fires the action before the popup is ready to hide. + */ + beforePopupHide?(e: BeforePopupHideEventArgs): void; + + /** Fires the action before the popup is ready to be displayed. + */ + beforePopupShown?(e: BeforePopupShownEventArgs): void; + + /** Fires when the cascading happens between two DropDownList exactly after the value changes in the first dropdown and before filtering in the second Dropdown. + */ + cascade?(e: CascadeEventArgs): void; + + /** Fires the action when the DropDownList control’s value is changed. + */ + change?(e: ChangeEventArgs): void; + + /** Fires the action when the list item checkbox value is changed. + */ + checkChange?(e: CheckChangeEventArgs): void; + + /** Fires the action once the DropDownList is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires the action when the list items is bound to the DropDownList. + */ + dataBound?(e: DataBoundEventArgs): void; + + /** Fires the action when the DropDownList is destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires the action when the DropDownList is focused. + */ + focusIn?(e: FocusInEventArgs): void; + + /** Fires the action when the DropDownList is about to lose focus. + */ + focusOut?(e: FocusOutEventArgs): void; + + /** Fires the action, once the popup is closed + */ + popupHide?(e: PopupHideEventArgs): void; + + /** Fires the action, when the popup is resized. + */ + popupResize?(e: PopupResizeEventArgs): void; + + /** Fires the action, once the popup is opened. + */ + popupShown?(e: PopupShownEventArgs): void; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Fires the action, when resizing a popup starts. + */ + popupResizeStart?(e: PopupResizeStartEventArgs): void; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** Fires the action, when the popup resizing is stopped. + */ + popupResizeStop?(e: PopupResizeStopEventArgs): void; - /** Name of the event - */ - type?: string; - } + /** Fires the action before filtering the list items that starts in the DropDownList when the enableFilterSearch is enabled. + */ + search?(e: SearchEventArgs): void; - export interface ContentLoadEventArgs { + /** Fires the action, when the list of item is selected. + */ + select?(e: SelectEventArgs): void; + } - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + export interface ActionBeginEventArgs { - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Name of the event. - */ - type?: string; + /** returns the DropDownList model + */ + model?: any; - /** URL of the content. - */ - URL?: string; + /** returns the name of the event + */ + type?: string; + } - /** Content type - */ - contentType?: any; - } + export interface ActionCompleteEventArgs { - export interface CreateEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Returns number of times trying to fetch the data + */ + count?: number; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** returns the DropDownList model + */ + model?: any; - /** Name of the event. - */ - type?: string; - } + /** Returns the query for data retrieval + */ + query?: any; - export interface DestroyEventArgs { + /** Returns the query for data retrieval from the Database + */ + request?: any; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** Returns the number of items fetched from remote data + */ + result?: any[]; - /** Name of the event. - */ - type?: string; - } + /** Returns the requested data + */ + xhr?: any; + } - export interface DragEventArgs { + export interface ActionFailureEventArgs { - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** Returns the error message + */ + error?: any; - /** Name of the event. - */ - type?: string; + /** returns the DropDownList model + */ + model?: any; - /** Current event object. - */ - event?: any; - } + /** Returns the query for data retrieval + */ + query?: any; - export interface DragStartEventArgs { + /** returns the name of the event + */ + type?: string; + } - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + export interface ActionSuccessEventArgs { - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Name of the event. - */ - type?: string; + /** Returns number of times trying to fetch the data + */ + count?: number; - /** Current event object. - */ - event?: any; - } + /** returns the DropDownList model + */ + model?: any; - export interface DragStopEventArgs { + /** Returns the query for data retrieval + */ + query?: any; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Returns the query for data retrieval from the Database + */ + request?: any; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** returns the name of the event + */ + type?: string; - /** Name of the event. - */ - type?: string; + /** Returns the number of items fetched from remote data + */ + result?: any[]; - /** Current event object. - */ - event?: any; - } + /** Returns the requested data + */ + xhr?: any; + } - export interface OpenEventArgs { + export interface BeforePopupHideEventArgs { - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** returns the DropDownList model + */ + model?: any; - /** Name of the event. - */ - type?: string; - } + /** returns the name of the event + */ + type?: string; - export interface ResizeEventArgs { + /** returns the selected text + */ + text?: string; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** returns the selected value + */ + value?: string; + } - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + export interface BeforePopupShownEventArgs { - /** Name of the event. - */ - type?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Current event object. - */ - event?: any; - } + /** returns the DropDownList model + */ + model?: any; - export interface ResizeStartEventArgs { + /** returns the name of the event + */ + type?: string; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** returns the selected text + */ + text?: string; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** returns the selected value + */ + value?: string; + } - /** Name of the event - */ - type?: string; + export interface CascadeEventArgs { - /** Current event object. - */ - event?: any; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface ResizeStopEventArgs { + /** Returns the cascading dropdown model. + */ + cascadeModel?: any; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** returns the current selected value in first dropdown. + */ + cascadeValue?: string; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** returns the DropDownList model + */ + model?: any; - /** Name of the event - */ - type?: string; + /** returns the default filter action for second dropdown data should happen or not. + */ + requiresDefaultFilter?: boolean; - /** Current event object. - */ - event?: any; - } + /** returns the name of the event + */ + type?: string; + } - export interface ExpandEventArgs { + export interface ChangeEventArgs { - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; + /** Returns the selected item with checkbox checked or not. + */ + isChecked?: boolean; - /** Name of the event. - */ - type?: string; - } + /** Returns the selected item ID. + */ + itemId?: string; - export interface CollapseEventArgs { - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; - - /** Name of the event. - */ - type?: string; - } - - export interface ActionButtonClickEventArgs { - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - - /** Name of the event target attribute. - */ - buttonID?: string; - - /** Name of the event. - */ - type?: string; - - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; - - /** Name of the event current target title. - */ - currentTarget?: string; - } - - export interface AjaxSettings { - - /** It specifies, whether to enable or disable asynchronous request. - */ - async?: boolean; - - /** It specifies the page will be cached in the web browser. - */ - cache?: boolean; - - /** It specifies the type of data is send in the query string. - */ - contentType?: string; - - /** It specifies the data as an object, will be passed in the query string. - */ - data?: any; - - /** It specifies the type of data that you're expecting back from the response. - */ - dataType?: string; - - /** It specifies the HTTP request type. - */ - type?: string; - } - } - - class DropDownList extends ej.Widget { - static fn: DropDownList; - constructor(element: JQuery | Element, options?: DropDownList.Model); - static Locale: any; - model: DropDownList.Model; - defaults: DropDownList.Model; - - /** Adding a single item or an array of items into the DropDownList allows you to specify all the field attributes such as value, template, image URL, and HTML attributes for those items. - * @param {any|Array} this parameter should have field attributes with respect to mapped field attributes and it's corresponding values to fields - * @returns {void} - */ - addItem(data: any | any[]): void; - - /** This method is used to select all the items in the DropDownList. - * @returns {void} - */ - checkAll(): void; - - /** Clears the text in the DropDownList textbox. - * @returns {void} - */ - clearText(): void; - - /** Destroys the DropDownList widget. - * @returns {void} - */ - destroy(): void; - - /** This property is used to disable the DropDownList widget. - * @returns {void} - */ - disable(): void; - - /** This property disables the set of items in the DropDownList. - * @param {string|number|Array} disable the given index list items - * @returns {void} - */ - disableItemsByIndices(index: string | number | any[]): void; - - /** This property enables the DropDownList control. - * @returns {void} - */ - enable(): void; - - /** Enables an Item or set of Items that are disabled in the DropDownList - * @param {string|number|Array} enable the given index list items if it's disabled - * @returns {void} - */ - enableItemsByIndices(index: string | number | any[]): void; - - /** This method retrieves the items using given value. - * @param {string|number|any} Return the whole object of data based on given value - * @returns {Array} - */ - getItemDataByValue(value: string | number | any): any[]; - - /** This method is used to retrieve the items that are bound with the DropDownList. - * @returns {any} - */ - getListData(): any; - - /** This method is used to get the selected items in the DropDownList. - * @returns {Array} - */ - getSelectedItem(): any[]; - - /** This method is used to retrieve the items value that are selected in the DropDownList. - * @returns {string} - */ - getSelectedValue(): string; - - /** This method hides the suggestion popup in the DropDownList. - * @returns {void} - */ - hidePopup(): void; - - /** This method is used to select the list of items in the DropDownList through the Index of the items. - * @param {string|number|Array} select the given index list items - * @returns {void} - */ - selectItemsByIndices(index: string | number | any[]): void; - - /** This method is used to select an item in the DropDownList by using the given text value. - * @param {string|number|Array} select the list items relates to given text - * @returns {void} - */ - selectItemByText(index: string | number | any[]): void; - - /** This method is used to select an item in the DropDownList by using the given value. - * @param {string|number|Array} select the list items relates to given values - * @returns {void} - */ - selectItemByValue(index: string | number | any[]): void; - - /** This method shows the DropDownList control with the suggestion popup. - * @returns {void} - */ - showPopup(): void; - - /** This method is used to unselect all the items in the DropDownList. - * @returns {void} - */ - unCheckAll(): void; - - /** This method is used to unselect the list of items in the DropDownList through Index of the items. - * @param {string|number|Array} unselect the given index list items - * @returns {void} - */ - unselectItemsByIndices(index: string | number | any[]): void; - - /** This method is used to unselect an item in the DropDownList by using the given text value. - * @param {string|number|Array} unselect the list items relates to given text - * @returns {void} - */ - unselectItemByText(index: string | number | any[]): void; - - /** This method is used to unselect an item in the DropDownList by using the given value. - * @param {string|number|Array} unselect the list items relates to given values - * @returns {void} - */ - unselectItemByValue(index: string | number | any[]): void; - } - export namespace DropDownList { - - export interface Model { - - /** The Virtual Scrolling(lazy loading) feature is used to display a large amount of data that you require without buffering the entire load of a huge database records in the DropDownList, - * that is, when scrolling, an AJAX request is sent to fetch some amount of data from the server dynamically. To achieve this scenario with DropDownList, set the allowVirtualScrolling to true. - * @Default {false} - */ - allowVirtualScrolling?: boolean; - - /** The cascading DropDownLists is a series of two or more DropDownLists in which each DropDownList is filtered according to the previous DropDownList’s value. - * @Default {null} - */ - cascadeTo?: string; - - /** Sets the case sensitivity of the search operation. It supports both enableFilterSearch and enableIncrementalSearch property. - * @Default {false} - */ - caseSensitiveSearch?: boolean; - - /** Dropdown widget's style and appearance can be controlled based on 13 different default built-in themes.You can customize the appearance of the dropdown by using the cssClass property. - * You need to specify a class name in the cssClass property and the same class name is used before the class definitions wherever the custom styles are applied. - */ - cssClass?: string; - - /** This property is used to serve data from the data services based on the query provided. To bind the data to the dropdown widget, - * the dataSource property is assigned with the instance of the ej.DataManager. - * @Default {null} - */ - dataSource?: any; - - /** Sets the separator when the multiSelectMode with delimiter option or checkbox is enabled with the dropdown. When you enter the delimiter value,the texts after the delimiter are considered - * as a separate word or query. The delimiter string is a single character and must be a symbol. Mostly, the delimiter symbol is used as comma (,) or semi-colon (;) or any other special character. - * @Default {','} - */ - delimiterChar?: string; - - /** The enabled Animation property uses the easeOutQuad animation to SlideDown and SlideUp the Popup list in 200 and 100 milliseconds, respectively. - * @Default {false} - */ - enableAnimation?: boolean; - - /** This property is used to indicate whether the DropDownList control responds to the user interaction or not. By default, the control is in the enabled mode - * and you can disable it by setting it to false. - * @Default {true} - */ - enabled?: boolean; - - /** Specifies to perform incremental search for the selection of items from the DropDownList with the help of this property. This helps in selecting the item by using the typed character. - * @Default {true} - */ - enableIncrementalSearch?: boolean; - - /** This property selects the item in the DropDownList when the item is entered in the Search textbox. - * @Default {false} - */ - enableFilterSearch?: boolean; - - /** Saves the current model value to the browser cookies for state maintenance. While refreshing the DropDownList control page, it retains the model value and - * it is applied from the browser cookies. - * @Default {false} - */ - enablePersistence?: boolean; - - /** This enables the resize handler to resize the popup to any size. - * @Default {false} - */ - enablePopupResize?: boolean; - - /** Sets the DropDownList textbox direction from right to left align. - * @Default {false} - */ - enableRTL?: boolean; - - /** This property is used to sort the Items in the DropDownList. By default, it sorts the items in an ascending order. - * @Default {false} - */ - enableSorting?: boolean; - - /** Specifies the mapping fields for the data items of the DropDownList. - * @Default {null} - */ - fields?: Fields; - - /** When the enableFilterSearch property value is set to true, the values in the DropDownList shows the items starting with or containing the key word/letter typed in the Search textbox. - * @Default {ej.FilterType.Contains} - */ - filterType?: ej.FilterType | string; - - /** Used to create visualized header for dropdown items - * @Default {null} - */ - headerTemplate?: string; - - /** Defines the height of the DropDownList textbox. - * @Default {null} - */ - height?: string | number; - - /** It sets the given HTML attributes for the DropDownList control such as ID, name, disabled, etc. - * @Default {null} - */ - htmlAttributes?: any; - - /** Data can be fetched in the DropDownList control by using the DataSource, specifying the number of items. - * @Default {5} - */ - itemsCount?: number; - - /** Allows the user to set the particular country or region language for the DropDownList. - * @Default {en-US} - */ - locale?: string; - - /** Defines the maximum height of the suggestion box. This property restricts the maximum height of the popup when resize is enabled. - * @Default {null} - */ - maxPopupHeight?: string | number; - - /** Defines the minimum height of the suggestion box. This property restricts the minimum height of the popup when resize is enabled. - * @Default {null} - */ - minPopupHeight?: string | number; - - /** Defines the maximum width of the suggestion box. This property restricts the maximum width of the popup when resize is enabled. - * @Default {null} - */ - maxPopupWidth?: string | number; - - /** Defines the minimum height of the suggestion box. This property restricts the minimum height of the popup when resize is enabled. - * @Default {0} - */ - minPopupWidth?: string | number; - - /** With the help of this property, you can make a single or multi selection with the DropDownList and display the text in two modes, delimiter and visual mode. - * In delimiter mode, you can separate the items by using the delimiter character such as comma (,) or semi-colon (;) or any other special character. - * In the visual mode, the items are showcased like boxes with close icon in the textbox. - * @Default {ej.MultiSelectMode.None} - */ - multiSelectMode?: ej.MultiSelectMode | string; - - /** Defines the height of the suggestion popup box in the DropDownList control. - * @Default {152px} - */ - popupHeight?: string | number; - - /** Defines the width of the suggestion popup box in the DropDownList control. - * @Default {auto} - */ - popupWidth?: string | number; - - /** Specifies the query to retrieve the data from the DataSource. - * @Default {null} - */ - query?: any; - - /** Specifies that the DropDownList textbox values should be read-only. - * @Default {false} - */ - readOnly?: boolean; - - /** Specifies an item to be selected in the DropDownList. - * @Default {null} - */ - selectedIndex?: number; - - /** Specifies the selectedItems for the DropDownList. - * @Default {[]} - */ - selectedIndices?: any[]; - - /** Selects multiple items in the DropDownList with the help of the checkbox control. To achieve this, enable the showCheckbox option to true. - * @Default {false} - */ - showCheckbox?: boolean; - - /** DropDownList control is displayed with the popup seen. - * @Default {false} - */ - showPopupOnLoad?: boolean; - - /** DropDownList textbox displayed with the rounded corner style. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** When the enableSorting property value is set to true, this property helps to sort the items either in ascending or descending order - * @Default {ej.SortOrder.Ascending} - */ - sortOrder?: ej.SortOrder | string; - - /** Specifies the targetID for the DropDownList’s items. - * @Default {null} - */ - targetID?: string; - - /** By default, you can add any text or image to the DropDownList item. To customize the item layout or to create your own visualized elements, you can use this template support. - * @Default {null} - */ - template?: string; - - /** Defines the text value that is displayed in the DropDownList textbox. - * @Default {null} - */ - text?: string | number; - - /** Sets the jQuery validation error message in the DropDownList - * @Default {null} - */ - validationMessage?: any; - - /** Sets the jQuery validation rules in the Dropdownlist. - * @Default {null} - */ - validationRules?: any; - - /** Specifies the value (text content) for the DropDownList control. - * @Default {null} - */ - value?: string | number; - - /** Specifies a short hint that describes the expected value of the DropDownList control. - * @Default {null} - */ - watermarkText?: string; - - /** Defines the width of the DropDownList textbox. - * @Default {null} - */ - width?: string | number; + /** returns the DropDownList model + */ + model?: any; - /** The Virtual Scrolling feature is used to display a large amount of records in the DropDownList, that is, when scrolling, an AJAX request is sent to fetch some amount of data from - * the server dynamically. To achieve this scenario with DropDownList, set the allowVirtualScrolling to true. - * You can set the itemsCount property that represents the number of items to be fetched from the server on every AJAX request. - * @Default {normal} - */ - virtualScrollMode?: ej.VirtualScrollMode | string; + /** Returns the selected item text. + */ + selectedText?: string; - /** Fires the action before the XHR request. */ - actionBegin?(e: ActionBeginEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Fires the action when the list of items is bound to the DropDownList by xhr post calling */ - actionComplete?(e: ActionCompleteEventArgs): void; + /** Returns the selected text. + */ + text?: string; - /** Fires the action when the xhr post calling failed on remote data binding with the DropDownList control. */ - actionFailure?(e: ActionFailureEventArgs): void; + /** Returns the selected value. + */ + value?: string; + } - /** Fires the action when the xhr post calling succeed on remote data binding with the DropDownList control */ - actionSuccess?(e: ActionSuccessEventArgs): void; + export interface CheckChangeEventArgs { - /** Fires the action before the popup is ready to hide. */ - beforePopupHide?(e: BeforePopupHideEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Fires the action before the popup is ready to be displayed. */ - beforePopupShown?(e: BeforePopupShownEventArgs): void; + /** Returns the selected item with checkbox checked or not. + */ + isChecked?: boolean; - /** Fires when the cascading happens between two DropDownList exactly after the value changes in the first dropdown and before filtering in the second Dropdown. */ - cascade?(e: CascadeEventArgs): void; + /** Returns the selected item ID. + */ + itemId?: string; - /** Fires the action when the DropDownList control’s value is changed. */ - change?(e: ChangeEventArgs): void; + /** returns the DropDownList model + */ + model?: any; - /** Fires the action when the list item checkbox value is changed. */ - checkChange?(e: CheckChangeEventArgs): void; + /** Returns the selected item text. + */ + selectedText?: string; - /** Fires the action once the DropDownList is created. */ - create?(e: CreateEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Fires the action when the list items is bound to the DropDownList. */ - dataBound?(e: DataBoundEventArgs): void; + /** Returns the selected text. + */ + text?: string; - /** Fires the action when the DropDownList is destroyed. */ - destroy?(e: DestroyEventArgs): void; + /** Returns the selected value. + */ + value?: string; + } - /** Fires the action when the DropDownList is focused. */ - focusIn?(e: FocusInEventArgs): void; + export interface CreateEventArgs { - /** Fires the action when the DropDownList is about to lose focus. */ - focusOut?(e: FocusOutEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Fires the action, once the popup is closed */ - popupHide?(e: PopupHideEventArgs): void; + /** returns the DropDownList model + */ + model?: any; - /** Fires the action, when the popup is resized. */ - popupResize?(e: PopupResizeEventArgs): void; + /** returns the name of the event + */ + type?: string; + } - /** Fires the action, once the popup is opened. */ - popupShown?(e: PopupShownEventArgs): void; + export interface DataBoundEventArgs { - /** Fires the action, when resizing a popup starts. */ - popupResizeStart?(e: PopupResizeStartEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Fires the action, when the popup resizing is stopped. */ - popupResizeStop?(e: PopupResizeStopEventArgs): void; + /** returns the DropDownList model + */ + model?: any; - /** Fires the action before filtering the list items that starts in the DropDownList when the enableFilterSearch is enabled. */ - search?(e: SearchEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Fires the action, when the list of item is selected. */ - select?(e: SelectEventArgs): void; - } + /** returns the data that is bound to DropDownList + */ + data?: any; + } - export interface ActionBeginEventArgs { + export interface DestroyEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the DropDownList model - */ - model?: any; + /** returns the DropDownList model + */ + model?: any; - /** returns the name of the event - */ - type?: string; - } + /** returns the name of the event + */ + type?: string; + } - export interface ActionCompleteEventArgs { + export interface FocusInEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns number of times trying to fetch the data - */ - count?: number; + /** returns the DropDownList model + */ + model?: any; - /** returns the DropDownList model - */ - model?: any; + /** returns the name of the event + */ + type?: string; + } - /** Returns the query for data retrieval - */ - query?: any; + export interface FocusOutEventArgs { - /** Returns the query for data retrieval from the Database - */ - request?: any; + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; + /** returns the DropDownList model + */ + model?: any; - /** Returns the number of items fetched from remote data - */ - result?: any[]; + /** returns the name of the event + */ + type?: string; + } - /** Returns the requested data - */ - xhr?: any; - } + export interface PopupHideEventArgs { - export interface ActionFailureEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the DropDownList model + */ + model?: any; - /** Returns the error message - */ - error?: any; + /** returns the name of the event + */ + type?: string; - /** returns the DropDownList model - */ - model?: any; + /** returns the selected text + */ + text?: string; - /** Returns the query for data retrieval - */ - query?: any; + /** returns the selected value + */ + value?: string; + } - /** returns the name of the event - */ - type?: string; - } + export interface PopupResizeEventArgs { - export interface ActionSuccessEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the DropDownList model + */ + model?: any; - /** Returns number of times trying to fetch the data - */ - count?: number; + /** returns the name of the event + */ + type?: string; - /** returns the DropDownList model - */ - model?: any; + /** Returns the data from the resizable plugin. + */ + event?: any; + } - /** Returns the query for data retrieval - */ - query?: any; + export interface PopupShownEventArgs { - /** Returns the query for data retrieval from the Database - */ - request?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; + /** returns the DropDownList model + */ + model?: any; - /** Returns the number of items fetched from remote data - */ - result?: any[]; + /** returns the name of the event + */ + type?: string; - /** Returns the requested data - */ - xhr?: any; - } + /** returns the selected text + */ + text?: string; - export interface BeforePopupHideEventArgs { + /** returns the selected value + */ + value?: string; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface PopupResizeStartEventArgs { - /** returns the DropDownList model - */ - model?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; + /** returns the DropDownList model + */ + model?: any; - /** returns the selected text - */ - text?: string; + /** returns the name of the event + */ + type?: string; - /** returns the selected value - */ - value?: string; - } + /** Returns the data from the resizable plugin. + */ + event?: any; + } - export interface BeforePopupShownEventArgs { + export interface PopupResizeStopEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the DropDownList model - */ - model?: any; + /** returns the DropDownList model + */ + model?: any; - /** returns the name of the event - */ - type?: string; + /** returns the name of the event + */ + type?: string; - /** returns the selected text - */ - text?: string; + /** Returns the data from the resizable plugin. + */ + event?: any; + } - /** returns the selected value - */ - value?: string; - } + export interface SearchEventArgs { - export interface CascadeEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the data bound to the DropDownList. + */ + items?: any; - /** Returns the cascading dropdown model. - */ - cascadeModel?: any; + /** returns the DropDownList model + */ + model?: any; + + /** Returns the selected item text. + */ + selectedText?: string; + + /** returns the name of the event + */ + type?: string; + + /** Returns the search string typed in search box. + */ + searchString?: string; + } + + export interface SelectEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the selected item with checkbox checked or not. + */ + isChecked?: boolean; + + /** Returns the selected item ID. + */ + itemId?: string; + + /** returns the DropDownList model + */ + model?: any; + + /** Returns the selected item text. + */ + selectedText?: string; + + /** returns the name of the event + */ + type?: string; + + /** Returns the selected text. + */ + text?: string; + + /** Returns the selected value. + */ + value?: string; + } + + export interface Fields { + + /** Used to group the items. + */ + groupBy?: string; + + /** Defines the HTML attributes such as ID, class, and styles for the item. + */ + htmlAttributes?: any; + + /** Defines the ID for the tag. + */ + id?: string; + + /** Defines the image attributes such as height, width, styles, and so on. + */ + imageAttributes?: string; + + /** Defines the imageURL for the image location. + */ + imageUrl?: string; + + /** Defines the tag value to be selected initially. + */ + selected?: boolean; + + /** Defines the sprite CSS for the image tag. + */ + spriteCssClass?: string; + + /** Defines the table name for tag value or display text while rendering remote data. + */ + tableName?: string; + + /** Defines the text content for the tag. + */ + text?: string; + + /** Defines the tag value. + */ + value?: string; + } + } + enum FilterType { + //filter the data wherever contains search key + Contains, + //filter the data based on search key present at start position + StartsWith, + } + enum MultiSelectMode { + //can select only single item in DropDownList + None, + //can select multiple items and it's separated by delimiterChar + Delimiter, + //can select multiple items and it's show's like visual box in textbox + VisualMode, + } + enum VirtualScrollMode { + //The data is loaded only to the corresponding page (display items). When scrolling some other position, it enables the load on demand with the DropDownList. + Normal, + //The data items are loaded from the remote when scroll handle reaches the end of the scrollbar like infinity scrolling. + Continuous, + } + + class Tooltip extends ej.Widget { + static fn: Tooltip; + constructor(element: JQuery | Element, options?: Tooltip.Model); + static Locale: any; + model: Tooltip.Model; + defaults: Tooltip.Model; + + /** Destroys the Tooltip control. + * @returns {void} + */ + destroy(): void; + + /** Disables the Tooltip control. + * @returns {void} + */ + disable(): void; + + /** Enables the Tooltip control. + * @returns {void} + */ + enable(): void; + + /** Hide the Tooltip popup. + * @param {string} optional Determines the type of effect that takes place when hiding the tooltip. + * @param {() => void} optional custom effect takes place when hiding the tooltip. + * @returns {void} + */ + hide(effect?: string, func?: () => void): void; + + /** Shows the Tooltip popup for the given target element with the specified effect. + * @param {string} optional Determines the type of effect that takes place when showing the tooltip. + * @param {() => void} optional custom effect takes place when showing the tooltip. + * @param {JQuery} optional Tooltip will be shown for the given element + * @returns {void} + */ + show(effect?: string, func?: () => void, target?: JQuery): void; + } + export namespace Tooltip { + + export interface Model { + + /** Tooltip control can be accessed through the keyboard shortcut keys. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Specifies the animation behavior in Tooltip. It contains the following sub properties. + */ + animation?: Animation; + + /** Sets the position related to target element, window, mouse or (x,y) co-ordinates. + * @Default {ej.Tooltip.Associate.Target} + */ + associate?: ej.Tooltip.Associate|string; + + /** Specified the delay to hide Tooltip when closeMode is auto. + * @Default {4000} + */ + autoCloseTimeout?: number; + + /** Specifies the closing behavior of Tooltip popup. + * @Default {ej.Tooltip.CloseMode.None} + */ + closeMode?: ej.Tooltip.CloseMode|string; + + /** Sets the Tooltip in alternate position when collision occurs. + * @Default {ej.Tooltip.Collision.FlipFit} + */ + collision?: ej.Tooltip.Collision|string; + + /** Specified the selector for the container element. + * @Default {body} + */ + containment?: string; + + /** Specifies the text for Tooltip. + * @Default {null} + */ + content?: string; + + /** Sets the root CSS class for Tooltip for the customization. + * @Default {null} + */ + cssClass?: string; + + /** Enables or disables the Tooltip. + * @Default {true} + */ + enabled?: boolean; + + /** Sets the Tooltip direction from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Defines the height of the Tooltip popup. + * @Default {auto} + */ + height?: string|number; + + /** Enables the arrow in Tooltip. + * @Default {true} + */ + isBalloon?: boolean; + + /** defines various attributes of the Tooltip position + */ + position?: Position; + + /** Enables or disables rounded corner. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Enables or disables shadow effect. + * @Default {false} + */ + showShadow?: boolean; + + /** Specified a selector for elements, within the container. + * @Default {null} + */ + target?: string; + + /** defines Tooltip size and gap between tooltip against the target element. + */ + tip?: Tip; + + /** The title text to be displayed in the Tooltip header. + * @Default {null} + */ + title?: string; + + /** Specified the event action to show case the Tooltip. + * @Default {ej.Tooltip.Trigger.Hover} + */ + trigger?: ej.Tooltip.Trigger|string; + + /** Defines the width of the Tooltip popup. + * @Default {auto} + */ + width?: string|number; + + /** This event is triggered before the Tooltip widget get closed. + */ + beforeClose?(e: BeforeCloseEventArgs): void; + + /** This event is triggered before the Tooltip widget gets open. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + + /** Fires on clicking to the target element. + */ + click?(e: ClickEventArgs): void; + + /** This event is triggered after the Tooltip widget is closed. + */ + close?(e: CloseEventArgs): void; + + /** This event is triggered after the Tooltip is created successfully. + */ + create?(e: CreateEventArgs): void; + + /** This event is triggered after the Tooltip widget is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** This event is triggered while hovering the target element, when tooltip positioning relates to target element. + */ + hover?(e: HoverEventArgs): void; + + /** This event is triggered after the Tooltip is opened. + */ + open?(e: OpenEventArgs): void; + + /** This event is triggered while hover the target element, when the tooltip positioning is relates to the mouse. + */ + tracking?(e: TrackingEventArgs): void; + } + + export interface BeforeCloseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the tooltip model + */ + model?: any; - /** returns the current selected value in first dropdown. - */ - cascadeValue?: string; + /** returns the name of the event + */ + type?: string; - /** returns the DropDownList model - */ - model?: any; + /** returns the Tooltip's content + */ + content?: string; + } - /** returns the default filter action for second dropdown data should happen or not. - */ - requiresDefaultFilter?: boolean; + export interface BeforeOpenEventArgs { - /** returns the name of the event - */ - type?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface ChangeEventArgs { + /** returns the Tooltip model + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** Returns the selected item with checkbox checked or not. - */ - isChecked?: boolean; + /** returns the Tooltip's content + */ + content?: string; + } - /** Returns the selected item ID. - */ - itemId?: string; + export interface ClickEventArgs { - /** returns the DropDownList model - */ - model?: any; + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the selected item text. - */ - selectedText?: string; + /** returns the Tooltip model + */ + model?: any; - /** returns the name of the event - */ - type?: string; + /** returns the name of the event + */ + type?: string; - /** Returns the selected text. - */ - text?: string; + /** returns the event object + */ + event?: any; + } - /** Returns the selected value. - */ - value?: string; - } + export interface CloseEventArgs { - export interface CheckChangeEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the Tooltip model + */ + model?: any; - /** Returns the selected item with checkbox checked or not. - */ - isChecked?: boolean; + /** returns the name of the event + */ + type?: string; - /** Returns the selected item ID. - */ - itemId?: string; + /** returns the Tooltip's content + */ + content?: string; + } - /** returns the DropDownList model - */ - model?: any; + export interface CreateEventArgs { - /** Returns the selected item text. - */ - selectedText?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; + /** returns the Tooltip model + */ + model?: any; - /** Returns the selected text. - */ - text?: string; + /** returns the name of the event + */ + type?: string; + } - /** Returns the selected value. - */ - value?: string; - } + export interface DestroyEventArgs { - export interface CreateEventArgs { + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the Tooltip model + */ + model?: any; - /** returns the DropDownList model - */ - model?: any; + /** returns the name of the event + */ + type?: string; + } - /** returns the name of the event - */ - type?: string; - } + export interface HoverEventArgs { - export interface DataBoundEventArgs { + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the Tooltip model + */ + model?: any; - /** returns the DropDownList model - */ - model?: any; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** returns the event object + */ + event?: any; + } - /** returns the data that is bound to DropDownList - */ - data?: any; - } + export interface OpenEventArgs { - export interface DestroyEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** its value is set as true,if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the Tooltip model + */ + model?: any; - /** returns the DropDownList model - */ - model?: any; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event - */ - type?: string; - } + /** returns the Tooltip's content + */ + content?: string; + } - export interface FocusInEventArgs { + export interface TrackingEventArgs { - /** its value is set as true,if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the DropDownList model - */ - model?: any; + /** returns the Tooltip model + */ + model?: any; - /** returns the name of the event - */ - type?: string; - } + /** returns the name of the event + */ + type?: string; - export interface FocusOutEventArgs { + /** returns the event object + */ + event?: any; + } - /** its value is set as true,if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface Animation { - /** returns the DropDownList model - */ - model?: any; + /** Determines the type of effect. + * @Default {ej.Tooltip.Effect.None} + */ + effect?: ej.Tooltip.effect|string; - /** returns the name of the event - */ - type?: string; - } + /** Sets the animation speed in milliseconds. + * @Default {4000} + */ + speed?: number; + } - export interface PopupHideEventArgs { + export interface PositionTarget { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Sets the Tooltip position against target based on horizontal(x) value. + * @Default {center} + */ + horizontal?: string|number; - /** returns the DropDownList model - */ - model?: any; + /** Sets the Tooltip position against target based on vertical(y) value. + * @Default {top} + */ + vertical?: string|number; + } - /** returns the name of the event - */ - type?: string; + export interface PositionStem { - /** returns the selected text - */ - text?: string; + /** Sets the arrow position again popup based on horizontal(x) value + * @Default {center} + */ + horizontal?: string; - /** returns the selected value - */ - value?: string; - } + /** Sets the arrow position again popup based on vertical(y) value + * @Default {bottom} + */ + vertical?: string; + } - export interface PopupResizeEventArgs { + export interface Position { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Sets the Tooltip position against target. + */ + target?: PositionTarget; - /** returns the DropDownList model - */ - model?: any; + /** Sets the arrow position again popup. + */ + stem?: PositionStem; + } - /** returns the name of the event - */ - type?: string; + export interface TipSize { - /** Returns the data from the resizable plugin. - */ - event?: any; - } + /** Sets the Tooltip width. + * @Default {20} + */ + width?: number; - export interface PopupShownEventArgs { + /** Sets the Tooltip height. + * @Default {10} + */ + height?: number; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface TipAdjust { - /** returns the DropDownList model - */ - model?: any; + /** Sets horizontal gap between Tooltip and target element. + * @Default {0} + */ + xValue?: number; - /** returns the name of the event - */ - type?: string; + /** Sets vertical gap between Tooltip and target element. + * @Default {0} + */ + yValue?: number; + } - /** returns the selected text - */ - text?: string; + export interface Tip { - /** returns the selected value - */ - value?: string; - } + /** Sets the Tooltip size. + */ + size?: TipSize; - export interface PopupResizeStartEventArgs { + /** Sets gap between tooltip against the target element. + */ + adjust?: TipAdjust; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + enum effect { - /** returns the DropDownList model - */ - model?: any; + ///No animation takes place when showing/hiding the Tooltip + None, - /** returns the name of the event - */ - type?: string; + ///Sliding effect takes place when showing/hiding the Tooltip + Slide, - /** Returns the data from the resizable plugin. - */ - event?: any; - } + ///Fade the Tooltip in and out of visibility. + Fade + } - export interface PopupResizeStopEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + enum Associate { - /** returns the DropDownList model - */ - model?: any; + ///Sets the position related to target element. + Target, - /** returns the name of the event - */ - type?: string; + ///Sets the position related to mouse. + MouseFollow, - /** Returns the data from the resizable plugin. - */ - event?: any; - } + ///Sets the position related to mouse, first entry to the target element. + MouseEnter, - export interface SearchEventArgs { + ///Sets the position related to (x,y) co-ordinates. + Axis, - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///Sets the position related to browser window. + Window + } - /** Returns the data bound to the DropDownList. - */ - items?: any; - /** returns the DropDownList model - */ - model?: any; - - /** Returns the selected item text. - */ - selectedText?: string; - - /** returns the name of the event - */ - type?: string; - - /** Returns the search string typed in search box. - */ - searchString?: string; - } - - export interface SelectEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the selected item with checkbox checked or not. - */ - isChecked?: boolean; - - /** Returns the selected item ID. - */ - itemId?: string; - - /** returns the DropDownList model - */ - model?: any; - - /** Returns the selected item text. - */ - selectedText?: string; - - /** returns the name of the event - */ - type?: string; - - /** Returns the selected text. - */ - text?: string; - - /** Returns the selected value. - */ - value?: string; - } - - export interface Fields { - - /** Used to group the items. - */ - groupBy?: string; - - /** Defines the HTML attributes such as ID, class, and styles for the item. - */ - htmlAttributes?: any; - - /** Defines the ID for the tag. - */ - id?: string; - - /** Defines the image attributes such as height, width, styles, and so on. - */ - imageAttributes?: string; - - /** Defines the imageURL for the image location. - */ - imageUrl?: string; - - /** Defines the tag value to be selected initially. - */ - selected?: boolean; - - /** Defines the sprite CSS for the image tag. - */ - spriteCssClass?: string; - - /** Defines the table name for tag value or display text while rendering remote data. - */ - tableName?: string; - - /** Defines the text content for the tag. - */ - text?: string; - - /** Defines the tag value. - */ - value?: string; - } - } - enum FilterType { - //filter the data wherever contains search key - Contains, - //filter the data based on search key present at start position - StartsWith, - } - enum MultiSelectMode { - // can select only single item in DropDownList - None, - //can select multiple items and it's separated by delimiterChar - Delimiter, - // can select multiple items and it's show's like visual box in textbox - VisualMode, - } - enum VirtualScrollMode { - // The data is loaded only to the corresponding page (display items). When scrolling some other position, it enables the load on demand with the DropDownList. - Normal, - //The data items are loaded from the remote when scroll handle reaches the end of the scrollbar like infinity scrolling. - Continuous, - } - - class Tooltip extends ej.Widget { - static fn: Tooltip; - constructor(element: JQuery | Element, options?: Tooltip.Model); - static Locale: any; - model: Tooltip.Model; - defaults: Tooltip.Model; - - /** Destroys the Tooltip control. - * @returns {void} - */ - destroy(): void; - - /** Disables the Tooltip control. - * @returns {void} - */ - disable(): void; - - /** Enables the Tooltip control. - * @returns {void} - */ - enable(): void; - - /** Hide the Tooltip popup. - * @param {string} optional Determines the type of effect that takes place when hiding the tooltip. - * @param {Function} optional custom effect takes place when hiding the tooltip. - * @returns {void} - */ - hide(effect?: string, func?: any): void; - - /** Shows the Tooltip popup for the given target element with the specified effect. - * @param {string} optional Determines the type of effect that takes place when showing the tooltip. - * @param {Function} optional custom effect takes place when showing the tooltip. - * @param {JQuery} optional Tooltip will be shown for the given element - * @returns {void} - */ - show(effect?: string, func?: any, target?: JQuery): void; - } - export namespace Tooltip { - - export interface Model { - - /** Tooltip control can be accessed through the keyboard shortcut keys. - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** Specifies the animation behavior in Tooltip. It contains the following sub properties. - */ - animation?: Animation; - - /** Sets the position related to target element, window, mouse or (x,y) co-ordinates. - * @Default {ej.Tooltip.Associate.Target} - */ - associate?: ej.Tooltip.Associate | string; - - /** Specified the delay to hide Tooltip when closeMode is auto. - * @Default {4000} - */ - autoCloseTimeout?: number; - - /** Specifies the closing behavior of Tooltip popup. - * @Default {ej.Tooltip.CloseMode.None} - */ - closeMode?: ej.Tooltip.CloseMode | string; - - /** Sets the Tooltip in alternate position when collision occurs. - * @Default {ej.Tooltip.Collision.FlipFit} - */ - collision?: ej.Tooltip.Collision | string; - - /** Specified the selector for the container element. - * @Default {body} - */ - containment?: string; - - /** Specifies the text for Tooltip. - * @Default {null} - */ - content?: string; - - /** Sets the root CSS class for Tooltip for the customization. - * @Default {null} - */ - cssClass?: string; - - /** Enables or disables the Tooltip. - * @Default {true} - */ - enabled?: boolean; - - /** Sets the Tooltip direction from right to left. - * @Default {false} - */ - enableRTL?: boolean; - - /** Defines the height of the Tooltip popup. - * @Default {auto} - */ - height?: string | number; - - /** Enables the arrow in Tooltip. - * @Default {true} - */ - isBalloon?: boolean; - - /** defines various attributes of the Tooltip position - */ - position?: Position; - - /** Enables or disables rounded corner. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Enables or disables shadow effect. - * @Default {false} - */ - showShadow?: boolean; - - /** Specified a selector for elements, within the container. - * @Default {null} - */ - target?: string; - - /** The title text to be displayed in the Tooltip header. - * @Default {null} - */ - title?: string; - - /** Specified the event action to show case the Tooltip. - * @Default {ej.Tooltip.Trigger.Hover} - */ - trigger?: ej.Tooltip.Trigger | string; - - /** Defines the width of the Tooltip popup. - * @Default {auto} - */ - width?: string | number; + enum CloseMode { - /** This event is triggered before the Tooltip widget get closed. */ - beforeClose?(e: BeforeCloseEventArgs): void; - - /** This event is triggered before the Tooltip widget gets open. */ - beforeOpen?(e: BeforeOpenEventArgs): void; + ///Enables close button in Tooltip. + Sticky, - /** Fires on clicking to the target element. */ - click?(e: ClickEventArgs): void; - - /** This event is triggered after the Tooltip widget is closed. */ - close?(e: CloseEventArgs): void; - - /** This event is triggered after the Tooltip is created successfully. */ - create?(e: CreateEventArgs): void; + ///Sets the delay for Tooltip close + Auto, - /** This event is triggered after the Tooltip widget is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; - - /** This event is triggered while hovering the target element, when tooltip positioning relates to target element. */ - hover?(e: HoverEventArgs): void; + ///The Tooltip will be display normally. + None + } - /** This event is triggered after the Tooltip is opened. */ - open?(e: OpenEventArgs): void; - /** This event is triggered while hover the target element, when the tooltip positioning is relates to the mouse. */ - tracking?(e: TrackingEventArgs): void; - } + enum Collision { - export interface BeforeCloseEventArgs { + ///Flips the Tooltip to the opposite side of the target, if collision is occurs. + Flip, - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///Shift the Tooltip popup away from the edge of the window(collision side) that means adjacent position. + Fit, - /** returns the tooltip model - */ - model?: any; + ///Ensure as much of the element is visible as possible to showcase. + FlipFit, - /** returns the name of the event - */ - type?: string; + ///No collision detection is take place + None + } - /** returns the Tooltip's content - */ - content?: string; - } - export interface BeforeOpenEventArgs { + enum Trigger { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///The Tooltip to be shown when the target element is clicked. + Click, - /** returns the Tooltip model - */ - model?: any; + ///Enables the Tooltip when hover on the target element. + Hover, - /** returns the name of the event - */ - type?: string; + ///Enables the Tooltip when focus is set to target element. + Focus + } - /** returns the Tooltip's content - */ - content?: string; - } + } - export interface ClickEventArgs { + class Editor extends ej.Widget { + static fn: Editor; + constructor(element: JQuery | Element, options?: Editor.Model); + static Locale: any; + model: Editor.Model; + defaults: Editor.Model; - /** its value is set as true,if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** destroy the editor widgets all events are unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; - /** returns the Tooltip model - */ - model?: any; + /** To disable the corresponding Editors + * @returns {void} + */ + disable(): void; - /** returns the name of the event - */ - type?: string; + /** To enable the corresponding Editors + * @returns {void} + */ + enable(): void; - /** returns the event object - */ - event?: any; - } + /** To get value from corresponding Editors + * @returns {number} + */ + getValue(): number; + } - export interface CloseEventArgs { + class NumericTextbox extends Editor { + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + class CurrencyTextbox extends Editor { + } - /** returns the Tooltip model - */ - model?: any; + class PercentageTextbox extends Editor { + } + export namespace Editor { - /** returns the name of the event - */ - type?: string; + export interface Model { - /** returns the Tooltip's content - */ - content?: string; - } + /** Specifies the currency symbol of currency textbox, used when the user wants to overwrite the currency symbol commonly instead of the current culture symbol. + * @Default {Based on the culture} + */ + currencySymbol?: string; - export interface CreateEventArgs { + /** Sets the root CSS class for Editors which allow us to customize the appearance. + */ + cssClass?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Specifies the number of digits that should be allowed after the decimal point. + * @Default {0} + */ + decimalPlaces?: number; + + /** Specifies the editor control state. + * @Default {true} + */ + enabled?: boolean; + + /** Specify the enablePersistence to editor to save current editor control value to browser cookies for state maintenance. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Specifies the Right to Left Direction to editor. + * @Default {false} + */ + enableRTL?: boolean; + + /** When enableStrictMode true it allows the value outside of the range also but it highlights the textbox with error class,otherwise it internally changed to the correct value. + * @Default {false} + */ + enableStrictMode?: boolean; + + /** Specifies the number of digits in each group to the editor. + * @Default {Based on the culture.} + */ + groupSize?: string; + + /** It provides the options to get the customized character to separate the digits. If not set, the separator defined by the current culture. + * @Default {Based on the culture} + */ + groupSeparator?: string; + + /** Specifies the height of the editor. + * @Default {30} + */ + height?: string; + + /** It allows to define the characteristics of the Editors control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /** The Editor value increment or decrement based an incrementStep value. + * @Default {1} + */ + incrementStep?: number; + + /** Defines the localization culture for editor. + * @Default {en-US} + */ + locale?: string; + + /** Specifies the maximum value of the editor. + * @Default {Number.MAX_VALUE} + */ + maxValue?: number; + + /** Specifies the minimum value of the editor. + * @Default {-(Number.MAX_VALUE) and 0 for Currency Textbox.} + */ + minValue?: number; + + /** Specifies the name of the editor. + * @Default {Sets id as name if it is null.} + */ + name?: string; + + /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the negative pattern. you have to specify 'n' to place the digit in your + * pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. + * @Default {Based on the culture} + */ + negativePattern?: string; + + /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the positive pattern. you have to specify 'n' to place the digit in your + * pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. + * @Default {Based on the culture} + */ + positivePattern?: string; + + /** Toggles the readonly state of the editor. When the Editor is readonly it doesn't allow user interactions. + * @Default {false} + */ + readOnly?: boolean; + + /** Specifies to Change the sharped edges into rounded corner for the Editor. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies whether the up and down spin buttons should be displayed in editor. + * @Default {true} + */ + showSpinButton?: boolean; + + /** Enables decimal separator position validation on type . + * @Default {false} + */ + validateOnType?: boolean; + + /** Set the jQuery validation error message in editor. + * @Default {null} + */ + validationMessage?: any; + + /** Set the jQuery validation rules to the editor. + * @Default {null} + */ + validationRules?: any; + + /** Specifies the value of the editor. + * @Default {null} + */ + value?: number|string; + + /** Specifies the watermark text to editor. + * @Default {Based on the culture.} + */ + watermarkText?: string; + + /** Specifies the width of the editor. + * @Default {143} + */ + width?: string; + + /** Fires after Editor control value is changed. + */ + change?(e: ChangeEventArgs): void; + + /** Fires after Editor control is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the Editor is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires after Editor control is focused. + */ + focusIn?(e: FocusInEventArgs): void; + + /** Fires after Editor control is loss the focus. + */ + focusOut?(e: FocusOutEventArgs): void; + } + + export interface ChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the corresponding editor model. + */ + model?: ej.Editor.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the corresponding editor control value. + */ + value?: number; + + /** returns true when the value changed by user interaction otherwise returns false + */ + isInteraction?: boolean; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the editor model + */ + model?: ej.Editor.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the editor model + */ + model?: ej.Editor.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface FocusInEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the corresponding editor model. + */ + model?: ej.Editor.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the corresponding editor control value. + */ + value?: number; + } + + export interface FocusOutEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the corresponding editor model. + */ + model?: ej.Editor.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the corresponding editor control value. + */ + value?: number; + } + } + + class ListView extends ej.Widget { + static fn: ListView; + constructor(element: JQuery | Element, options?: ListView.Model); + static Locale: any; + model: ListView.Model; + defaults: ListView.Model; + + /** To add item in the given index. If you have enabled grouping in ListView then you need to pass the corresponding group list title to add item in it. + * @param {any} Specifies the item to be added in ListView + * @param {number} Specifies the index where item to be added + * @param {string} optionalThis is an optional parameter. You must pass the group list title here if grouping is enabled in the ListView + * @returns {void} + */ + addItem(item: any, index: number, groupid: string): void; + + /** To check all the items. + * @returns {void} + */ + checkAllItem(): void; + + /** To check item in the given index. + * @param {number} Specifies the index of the item to be checked + * @returns {void} + */ + checkItem(index: number): void; + + /** To clear all the list item in the control before updating with new datasource. + * @returns {void} + */ + clear(): void; + + /** To make the item in the given index to be default state. + * @param {number} Specifies the index to make the item to be in default state. + * @returns {void} + */ + deActive(index: number): void; + + /** To disable item in the given index. + * @param {number} Specifies the index value to be disabled. + * @returns {void} + */ + disableItem(index: number): void; + + /** To enable item in the given index. + * @param {number} Specifies the index value to be enabled. + * @returns {void} + */ + enableItem(index: number): void; + + /** To get the active item. + * @returns {HTMLElement} + */ + getActiveItem(): HTMLElement; + + /** To get the text of the active item. + * @returns {string} + */ + getActiveItemText(): string; + + /** To get all the checked items. + * @returns {any[]} + */ + getCheckedItems(): any[]; + + /** To get the text of all the checked items. + * @returns {any[]} + */ + getCheckedItemsText(): any[]; + + /** To get the total item count. + * @returns {number} + */ + getItemsCount(): number; + + /** To get the text of the item in the given index. + * @param {string|number} Specifies the index value to get the text value. + * @returns {string} + */ + getItemText(index: string|number): string; + + /** To check whether the item in the given index has child item. + * @param {number} Specifies the index value to check the item has child or not. + * @returns {boolean} + */ + hasChild(index: number): boolean; + + /** To hide the list. + * @returns {void} + */ + hide(): void; + + /** To hide item in the given index. + * @param {number} Specifies the index value to hide the item. + * @returns {void} + */ + hideItem(index: number): void; + + /** To check whether item in the given index is checked. + * @returns {boolean} + */ + isChecked(): boolean; + + /** To load the AJAX content while selecting the item. + * @param {string} Specifies the item to load the AJAX content. + * @returns {void} + */ + loadAjaxContent(item: string): void; + + /** To remove the check mark either for specific item in the given index or for all items. + * @param {number} Specifies the index value to remove the checkbox. + * @returns {void} + */ + removeCheckMark(index: number): void; + + /** To remove item in the given index. + * @param {number} Specifies the index value to remove the item. + * @returns {void} + */ + removeItem(index: number): void; + + /** To select item in the given index. + * @param {number} Specifies the index value to select the item. + * @returns {void} + */ + selectItem(index: number): void; + + /** To make the item in the given index to be active state. + * @param {number} Specifies the index value to make the item in active state. + * @returns {void} + */ + setActive(index: number): void; + + /** To show the list. + * @returns {void} + */ + show(): void; + + /** To show item in the given index. + * @param {number} Specifies the index value to show the hided item. + * @returns {void} + */ + showItem(index: number): void; + + /** To uncheck all the items. + * @returns {void} + */ + unCheckAllItem(): void; + + /** To uncheck item in the given index. + * @param {number} Specifies the index value to uncheck the item. + * @returns {void} + */ + unCheckItem(index: number): void; + } + export namespace ListView { + + export interface Model { + + /** Specifies the ajaxSettings option to load the items to the ListView control. + * @Default {null} + */ + ajaxSettings?: AjaxSettings; + + /** Set the index values to be selected on initial loading. This works only when enableCheckMark is set true. + * @Default {[]} + */ + checkedIndices?: any[]; + + /** Sets the root class for ListView theme. This cssClass API helps to use custom skinning option for ListView control. By defining the root class using this API, we need to include + * this root class in CSS. + */ + cssClass?: string; + + /** Contains the list of data for generating the ListView items. + * @Default {[]} + */ + dataSource?: any[]; + + /** Specifies whether to load AJAX content while selecting item. + * @Default {false} + */ + enableAjax?: boolean; + + /** Specifies whether to enable caching the content. + * @Default {false} + */ + enableCache?: boolean; + + /** Specifies whether to enable check mark for the item. + * @Default {false} + */ + enableCheckMark?: boolean; + + /** Specifies whether to enable the filtering feature to filter the item. + * @Default {false} + */ + enableFiltering?: boolean; + + /** Specifies whether to group the list item. + * @Default {false} + */ + enableGroupList?: boolean; + + /** Specifies to maintain the current model value to browser cookies for state maintenance. While refresh the page, the model value will get apply to the control from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Specifies the field settings to map the datasource. + */ + fieldSettings?: any; + + /** Contains the array of items to be added in ListView. + * @Default {[]} + */ + items?: any[]; + + /** Specifies the text of the back button in the header. + * @Default {null} + */ + headerBackButtonText?: string; + + /** Specifies the title of the header. + * @Default {Title} + */ + headerTitle?: string; + + /** Specifies the height. + * @Default {null} + */ + height?: string|number; + + /** Set the localization culture for ListView Widget. + */ + locale?: string; + + /** Specifies whether to retain the selection of the item. + * @Default {false} + */ + persistSelection?: boolean; + + /** Specifies whether to prevent the selection of the item. + * @Default {false} + */ + preventSelection?: boolean; + + /** Specifies the query to execute with the datasource. + * @Default {null} + */ + query?: any; + + /** Specifies whether need to render the control with the template contents. + * @Default {false} + */ + renderTemplate?: boolean; + + /** Specifies the index of item which need to be in selected state initially while loading. + * @Default {0} + */ + selectedItemIndex?: number; + + /** Specifies whether to show the header. + * @Default {true} + */ + showHeader?: boolean; + + /** Specifies whether to show the back button header. + * @Default {false} + */ + showHeaderBackButton?: boolean; + + /** Specifies ID of the element contains template contents. + * @Default {null} + */ + templateId?: string; + + /** Specifies the width. + * @Default {null} + */ + width?: string|number; + + /** Specifies the number of items to be fetched on each scroll. Note: This property works only with Virtual scrolling. + * @Default {5} + */ + itemRequestCount?: number; + + /** Specifies the maximum number of items to be fetched. Note: This will work only with Virtual scrolling + * @Default {null} + */ + totalItemsCount?: number; + + /** Loads the list data on demand via scrolling behavior to improve the application’s performance. There are two ways to load data which can be defined using virtualScrollMode + * property. + * @Default {false} + */ + allowVirtualScrolling?: boolean; + + /** Specifies the virtual scroll mode to load the list data on demand via scrolling behavior. There are two types of mode. + * @Default {ej.VirtualScrollMode.Normal} + */ + virtualScrollMode?: ej.VirtualScrollMode|string; + + /** Event triggers before the AJAX request happens. + */ + ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; + + /** Event triggers after the AJAX content loaded completely. + */ + ajaxComplete?(e: AjaxCompleteEventArgs): void; + + /** Event triggers when the AJAX request failed. + */ + ajaxError?(e: AjaxErrorEventArgs): void; + + /** Event triggers after the AJAX content loaded successfully. + */ + ajaxSuccess?(e: AjaxSuccessEventArgs): void; + + /** Event triggers before the items loaded. + */ + load?(e: LoadEventArgs): void; + + /** Event triggers after the items loaded. + */ + loadComplete?(e: LoadCompleteEventArgs): void; + + /** Event triggers when mouse down happens on the item. + */ + mouseDown?(e: MouseDownEventArgs): void; + + /** Event triggers when mouse up happens on the item. + */ + mouseUp?(e: MouseUpEventArgs): void; + } + + export interface AjaxBeforeLoadEventArgs { + + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the name of the event. + */ + type?: string; + + /** returns the model value of the control. + */ + model?: ej.ListView.Model; + + /** returns the AJAX settings. + */ + ajaxData?: any; + } + + export interface AjaxCompleteEventArgs { - /** returns the Tooltip model - */ - model?: any; + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; - } + /** returns the name of the event. + */ + type?: string; - export interface DestroyEventArgs { + /** returns the model value of the control. + */ + model?: ej.ListView.Model; + } - /** its value is set as true,if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface AjaxErrorEventArgs { - /** returns the Tooltip model - */ - model?: any; + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; - } + /** returns the name of the event. + */ + type?: string; - export interface HoverEventArgs { + /** returns the model value of the control. + */ + model?: ej.ListView.Model; - /** its value is set as true,if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the error thrown in the AJAX post. + */ + errorThrown?: any; - /** returns the Tooltip model - */ - model?: any; + /** returns the status. + */ + textStatus?: any; - /** returns the name of the event - */ - type?: string; + /** returns the current list item. + */ + item?: any; - /** returns the event object - */ - event?: any; - } + /** returns the current item text. + */ + text?: string; - export interface OpenEventArgs { + /** returns the current item index. + */ + index?: number; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface AjaxSuccessEventArgs { - /** returns the Tooltip model - */ - model?: any; + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; + /** returns the name of the event. + */ + type?: string; - /** returns the Tooltip's content - */ - content?: string; - } + /** returns the model value of the control. + */ + model?: ej.ListView.Model; - export interface TrackingEventArgs { + /** returns the AJAX current content. + */ + content?: string; - /** its value is set as true,if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the current list item. + */ + item?: any; - /** returns the Tooltip model - */ - model?: any; + /** returns the current item text. + */ + text?: string; - /** returns the name of the event - */ - type?: string; + /** returns the current item index. + */ + index?: number; - /** returns the event object - */ - event?: any; - } + /** returns the current URL of the AJAX post. + */ + URL?: string; + } - export interface Animation { + export interface LoadEventArgs { - /** Determines the type of effect. - * @Default {ej.Tooltip.Effect.None} - */ - effect?: ej.Tooltip.effect | string; + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Sets the animation speed in milliseconds. - * @Default {4000} - */ - speed?: number; - } + /** returns the name of the event. + */ + type?: string; - export interface PositionTarget { + /** returns the model value of the control. + */ + model?: ej.ListView.Model; + } - /** Sets the Tooltip position against target based on horizontal(x) value. - * @Default {center} - */ - horizontal?: string | number; + export interface LoadCompleteEventArgs { - /** Sets the Tooltip position against target based on vertical(y) value. - * @Default {top} - */ - vertical?: string | number; - } + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface PositionStem { + /** returns the name of the event. + */ + type?: string; - /** Sets the arrow position again popup based on horizontal(x) value - * @Default {center} - */ - horizontal?: string; + /** returns the model value of the control. + */ + model?: ej.ListView.Model; + } - /** Sets the arrow position again popup based on vertical(y) value - * @Default {bottom} - */ - vertical?: string; - } + export interface MouseDownEventArgs { - export interface Position { + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Sets the Tooltip position against target. - */ - target?: PositionTarget; + /** returns the name of the event. + */ + type?: string; - /** Sets the arrow position again popup. - */ - stem?: PositionStem; - } + /** returns the model value of the control. + */ + model?: ej.ListView.Model; - export interface TipSize { + /** If the child element exist return true; otherwise, false. + */ + hasChild?: boolean; - /** Sets the Tooltip width. - * @Default {20} - */ - width?: number; + /** returns the current list item. + */ + item?: string; - /** Sets the Tooltip height. - * @Default {10} - */ - height?: number; - } + /** returns the current text of item. + */ + text?: string; - export interface TipAdjust { + /** returns the current Index of the item. + */ + index?: number; - /** Sets horizontal gap between Tooltip and target element. - * @Default {0} - */ - xValue?: number; + /** If checked return true; otherwise, false. + */ + isChecked?: boolean; - /** Sets vertical gap between Tooltip and target element. - * @Default {0} - */ - yValue?: number; - } + /** returns the list of checked items. + */ + checkedItems?: number; + + /** returns the current checked item text. + */ + checkedItemsText?: string; + } + + export interface MouseUpEventArgs { + + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the name of the event. + */ + type?: string; + + /** returns the model value of the control. + */ + model?: ej.ListView.Model; + + /** If the child element exist return true; otherwise, false. + */ + hasChild?: boolean; + + /** returns the current list item. + */ + item?: string; + + /** returns the current text of item. + */ + text?: string; + + /** returns the current Index of the item. + */ + index?: number; + + /** If checked return true; otherwise, false. + */ + isChecked?: boolean; + + /** returns the list of checked items. + */ + checkedItems?: number; + + /** returns the current checked item text. + */ + checkedItemsText?: string; + } + + export interface AjaxSettings { + + /** It specifies, whether to enable or disable asynchronous request. + */ + async?: boolean; + + /** It specifies the page will be cached in the web browser. + */ + cache?: boolean; + + /** It specifies the type of data is send in the query string. + */ + contentType?: string; + + /** It specifies the data as an object, will be passed in the query string. + */ + data?: any; + + /** It specifies the type of data that you're expecting back from the response. + */ + dataType?: string; + + /** It specifies the HTTP request type. + */ + type?: string; + } + } + + class MaskEdit extends ej.Widget { + static fn: MaskEdit; + constructor(element: JQuery | Element, options?: MaskEdit.Model); + static Locale: any; + model: MaskEdit.Model; + defaults: MaskEdit.Model; + + /** To clear the text in mask edit textbox control. + * @returns {void} + */ + clear(): void; + + /** To disable the mask edit textbox control. + * @returns {void} + */ + disable(): void; + + /** To enable the mask edit textbox control. + * @returns {void} + */ + enable(): void; + + /** To obtained the pure value of the text value, removes all the symbols in mask edit textbox control. + * @returns {string} + */ + get_StrippedValue(): string; + + /** To obtained the textbox value as such that, Just replace all '_' to ' '(space) in mask edit textbox control. + * @returns {string} + */ + get_UnstrippedValue(): string; + } + export namespace MaskEdit { + + export interface Model { + + /** Specify the cssClass to achieve custom theme. + * @Default {null} + */ + cssClass?: string; + + /** Specify the custom character allowed to entered in mask edit textbox control. + * @Default {null} + */ + customCharacter?: string; + + /** Specify the state of the mask edit textbox control. + * @Default {true} + */ + enabled?: boolean; + + /** Specify the enablePersistence to mask edit textbox to save current model value to browser cookies for state maintains. + */ + enablePersistence?: boolean; + + /** Specifies the height for the mask edit textbox control. + * @Default {28 px} + */ + height?: string; + + /** Specifies whether hide the prompt characters with spaces on blur. Prompt chars will be shown again on focus the textbox. + * @Default {false} + */ + hidePromptOnLeave?: boolean; + + /** Specifies the list of HTML attributes to be added to mask edit textbox. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specify the inputMode for mask edit textbox control. See InputMode + * @Default {ej.InputMode.Text} + */ + inputMode?: ej.InputMode|string; + + /** Specifies the input mask. + * @Default {null} + */ + maskFormat?: string; + + /** Specifies the name attribute value for the mask edit textbox. + * @Default {null} + */ + name?: string; + + /** Toggles the readonly state of the mask edit textbox. When the mask edit textbox is readonly, it doesn't allow your input. + * @Default {false} + */ + readOnly?: boolean; + + /** Specifies whether the error will show until correct value entered in the mask edit textbox control. + * @Default {false} + */ + showError?: boolean; + + /** when showPromptChar is true, the hide the prompt characters are shown in focus of the control and hides in focus out of the control. + * @Default {true} + */ + showPromptChar?: boolean; + + /** MaskEdit input is displayed in rounded corner style when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specify the text alignment for mask edit textbox control.See TextAlign + * @Default {left} + */ + textAlign?: ej.TextAlign|string; + + /** Sets the jQuery validation error message in mask edit. This property works when the widget is present inside the form. Include jquery.validate.min.js plugin additionally. + * @Default {null} + */ + validationMessage?: any; + + /** Sets the jQuery validation rules to the MaskEdit. This property works when the widget is present inside the form. Include jquery.validate.min.js plugin additionally. + * @Default {null} + */ + validationRules?: any; + + /** Specifies the value for the mask edit textbox control. + * @Default {null} + */ + value?: string; + + /** Specifies the water mark text to be displayed in input text. + * @Default {null} + */ + watermarkText?: string; + + /** Specifies the width for the mask edit textbox control. + * @Default {143pixel} + */ + width?: string; + + /** Fires when value changed in mask edit textbox control. + */ + change?(e: ChangeEventArgs): void; + + /** Fires after MaskEdit control is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the MaskEdit is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when focused in mask edit textbox control. + */ + focusIn?(e: FocusInEventArgs): void; + + /** Fires when focused out in mask edit textbox control. + */ + focusOut?(e: FocusOutEventArgs): void; + + /** Fires when keydown in mask edit textbox control. + */ + keydown?(e: KeydownEventArgs): void; + + /** Fires when key press in mask edit textbox control. + */ + keyPress?(e: KeyPressEventArgs): void; + + /** Fires when keyup in mask edit textbox control. + */ + keyup?(e: KeyupEventArgs): void; + + /** Fires when mouse out in mask edit textbox control. + */ + mouseOut?(e: MouseOutEventArgs): void; + + /** Fires when mouse over in mask edit textbox control. + */ + mouseOver?(e: MouseOverEventArgs): void; + } + + export interface ChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /** returns the name of the event + */ + type?: string; - export interface Tip { + /** returns the mask edit value + */ + value?: number; - /** Sets the Tooltip size. - */ - size?: TipSize; + /** returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; + } - /** Sets gap between tooltip against the target element. - */ - adjust?: TipAdjust; - } + export interface CreateEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - enum effect { + /** returns the MaskEdit model + */ + model?: ej.MaskEdit.Model; - ///No animation takes place when showing/hiding the Tooltip - None, + /** returns the name of the event + */ + type?: string; + } - ///Sliding effect takes place when showing/hiding the Tooltip - Slide, + export interface DestroyEventArgs { - ///Fade the Tooltip in and out of visibility. - Fade - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + /** returns the MaskEdit model + */ + model?: ej.MaskEdit.Model; - enum Associate { + /** returns the name of the event + */ + type?: string; + } - ///Sets the position related to target element. - Target, + export interface FocusInEventArgs { - ///Sets the position related to mouse. - MouseFollow, + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - ///Sets the position related to mouse, first entry to the target element. - MouseEnter, + /** returns the mask edit model + */ + model?: ej.MaskEdit.Model; - ///Sets the position related to (x,y) co-ordinates. - Axis, + /** returns the name of the event + */ + type?: string; - ///Sets the position related to browser window. - Window - } + /** returns the mask edit value + */ + value?: number; + /** returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; + } - enum CloseMode { + export interface FocusOutEventArgs { - ///Enables close button in Tooltip. - Sticky, + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - ///Sets the delay for Tooltip close - Auto, + /** returns the mask edit model + */ + model?: ej.MaskEdit.Model; - ///The Tooltip will be display normally. - None - } + /** returns the name of the event + */ + type?: string; + /** returns the mask edit value + */ + value?: number; - enum Collision { + /** returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; + } - ///Flips the Tooltip to the opposite side of the target, if collision is occurs. - Flip, + export interface KeydownEventArgs { - ///Shift the Tooltip popup away from the edge of the window(collision side) that means adjacent position. - Fit, + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - ///Ensure as much of the element is visible as possible to showcase. - FlipFit, + /** returns the mask edit model + */ + model?: ej.MaskEdit.Model; - ///No collision detection is take place - None - } + /** returns the name of the event + */ + type?: string; + /** returns the mask edit value + */ + value?: number; - enum Trigger { + /** returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; + } - ///The Tooltip to be shown when the target element is clicked. - Click, + export interface KeyPressEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mask edit value + */ + value?: number; + + /** returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; + } + + export interface KeyupEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mask edit value + */ + value?: number; + + /** returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; + } + + export interface MouseOutEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mask edit value + */ + value?: number; + + /** returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; + } + + export interface MouseOverEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mask edit value + */ + value?: number; + + /** returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; + } + } + enum InputMode { + //string + Password, + //string + Text, + } + enum TextAlign { + //string + Center, + //string + Justify, + //string + Left, + //string + Right, + } + + class Menu extends ej.Widget { + static fn: Menu; + constructor(element: JQuery | Element, options?: Menu.Model); + static Locale: any; + model: Menu.Model; + defaults: Menu.Model; + + /** Disables the Menu control. + * @returns {void} + */ + disable(): void; + + /** Specifies the Menu Item to be disabled by using the Menu Item Text. + * @param {string} Specifies the Menu Item Text to be disabled. + * @returns {void} + */ + disableItem(itemtext: string): void; + + /** Specifies the Menu Item to be disabled by using the Menu Item Id. + * @param {string|number} Specifies the Menu Item id to be disabled + * @returns {void} + */ + disableItemByID(itemid: string|number): void; + + /** Enables the Menu control. + * @returns {void} + */ + enable(): void; + + /** Specifies the Menu Item to be enabled by using the Menu Item Text. + * @param {string} Specifies the Menu Item Text to be enabled. + * @returns {void} + */ + enableItem(itemtext: string): void; + + /** Specifies the Menu Item to be enabled by using the Menu Item Id. + * @param {string|number} Specifies the Menu Item id to be enabled. + * @returns {void} + */ + enableItemByID(itemid: string|number): void; + + /** Hides the Context Menu control. + * @returns {void} + */ + hide(): void; + + /** Hides the specific items in Menu control. + * @returns {void} + */ + hideItems(): void; + + /** Insert the menu item as child of target node. + * @param {any} Information about Menu item. + * @param {string|any} Selector of target node or Object of target node. + * @returns {void} + */ + insert(item: any, target: string|any): void; + + /** Insert the menu item after the target node. + * @param {any} Information about Menu item. + * @param {string|any} Selector of target node or Object of target node. + * @returns {void} + */ + insertAfter(item: any, target: string|any): void; + + /** Insert the menu item before the target node. + * @param {any} Information about Menu item. + * @param {string|any} Selector of target node or Object of target node. + * @returns {void} + */ + insertBefore(item: any, target: string|any): void; + + /** Remove Menu item. + * @param {any|any[]} Selector of target node or Object of target node. + * @returns {void} + */ + remove(target: any|any[]): void; + + /** To show the Menu control. + * @param {number} x co-ordinate position of context menu. + * @param {number} y co-ordinate position of context menu. + * @param {any} target element + * @param {any} name of the event + * @returns {void} + */ + show(locationX: number, locationY: number, targetElement: any, event: any): void; + + /** Show the specific items in Menu control. + * @returns {void} + */ + showItems(): void; + } + export namespace Menu { + + export interface Model { + + /** To enable or disable the Animation while hover or click an menu items.See AnimationType + * @Default {ej.AnimationType.Default} + */ + animationType?: ej.AnimationType|string; + + /** Specifies the target id of context menu. On right clicking the specified contextTarget element, context menu gets shown. + * @Default {null} + */ + contextMenuTarget?: string; + + /** Specifies the container element selectors for submenu’s collision. The submenu gets displayed based on spacing available with respect to container element. + * @Default {null} + */ + container?: string; + + /** Specify the CSS class to achieve custom theme. + */ + cssClass?: string; + + /** To enable or disable the Animation effect while hover or click an menu items. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Specifies the root menu items to be aligned center in horizontal menu. + * @Default {false} + */ + enableCenterAlign?: boolean; + + /** Enable / Disable the Menu control. + * @Default {true} + */ + enabled?: boolean; + + /** Specifies the menu items to be displayed in right to left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /** When this property sets to false, the menu items is displayed without any separators. + * @Default {true} + */ + enableSeparator?: boolean; + + /** Specifies the target which needs to be excluded. i.e., The context menu will not be displayed in those specified targets. + * @Default {null} + */ + excludeTarget?: string; + + /** Fields used to bind the data source and it includes following field members to make data bind easier. + * @Default {null} + */ + fields?: Fields; + + /** Specifies the height of the root menu. + * @Default {auto} + */ + height?: string|number; + + /** Specifies the list of HTML attributes to be added to menu control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Enables/disables responsive support for the Menu control during the window resizing time. + * @Default {true} + */ + isResponsive?: boolean; + + /** Specifies the type of the menu. Essential JavaScript Menu consists of two type of menu, they are Normal Menu and Context Menu mode.See MenuType + * @Default {ej.MenuType.NormalMenu} + */ + menuType?: string|ej.MenuType; + + /** Specifies the sub menu items to be show or open only on click. + * @Default {false} + */ + openOnClick?: boolean; + + /** Specifies the orientation of normal menu. Normal menu can rendered in horizontal or vertical direction by using this API. See Orientation + * @Default {ej.Orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /** Specifies the main menu items arrows only to be shown if it contains child items. + * @Default {true} + */ + showRootLevelArrows?: boolean; + + /** Specifies the sub menu items arrows only to be shown if it contains child items. + * @Default {true} + */ + showSubLevelArrows?: boolean; + + /** Specifies position of pull down submenu that will appear on mouse over.See Direction + * @Default {ej.Direction.Right} + */ + subMenuDirection?: string|ej.Direction; + + /** Specifies the title to responsive menu. + * @Default {Menu} + */ + titleText?: string; + + /** Specifies the width of the main menu. + * @Default {auto} + */ + width?: string|number; + + /** Specifies the popup menu height. + * @Default {auto} + */ + overflowHeight?: string|number; + + /** Specifies the popup menu width. + * @Default {auto} + */ + overflowWidth?: string|number; + + /** Fires before context menu gets open. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + + /** Fires when mouse click on menu items. + */ + click?(e: ClickEventArgs): void; + + /** Fire when context menu on close. + */ + close?(e: CloseEventArgs): void; + + /** Fires when context menu on open. + */ + open?(e: OpenEventArgs): void; + + /** Fires to create menu items. + */ + create?(e: CreateEventArgs): void; + + /** Fires to destroy menu items. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when key down on menu items. + */ + keydown?(e: KeydownEventArgs): void; + + /** Fires when mouse out from menu items. + */ + mouseout?(e: MouseoutEventArgs): void; + + /** Fires when mouse over the Menu items. + */ + mouseover?(e: MouseoverEventArgs): void; + + /** Fires when overflow popup menu opens. + */ + overflowOpen?(e: OverflowOpenEventArgs): void; + + /** Fires when overflow popup menu closes. + */ + overflowClose?(e: OverflowCloseEventArgs): void; + } - ///Enables the Tooltip when hover on the target element. - Hover, + export interface BeforeOpenEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the menu model + */ + model?: ej.Menu.Model; - ///Enables the Tooltip when focus is set to target element. - Focus - } + /** returns the name of the event + */ + type?: string; - } + /** returns the target element + */ + target?: any; + } - class Editor extends ej.Widget { - static fn: Editor; - constructor(element: JQuery | Element, options?: Editor.Model); - static Locale: any; - model: Editor.Model; - defaults: Editor.Model; + export interface ClickEventArgs { - /** destroy the editor widgets all events are unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; + /** returns the menu model + */ + model?: ej.Menu.Model; - /** To disable the corresponding Editors - * @returns {void} - */ - disable(): void; + /** returns the name of the event + */ + type?: string; - /** To enable the corresponding Editors - * @returns {void} - */ - enable(): void; + /** returns clicked menu item text + */ + text?: string; - /** To get value from corresponding Editors - * @returns {number} - */ - getValue(): number; - } + /** returns clicked menu item element + */ + element?: any; - class NumericTextbox extends Editor { - } + /** returns the event + */ + event?: any; - class CurrencyTextbox extends Editor { - } + /** returns the selected item + */ + selectedItem?: number; + } - class PercentageTextbox extends Editor { - } - export namespace Editor { + export interface CloseEventArgs { - export interface Model { + /** returns the menu model + */ + model?: ej.Menu.Model; - /** Specifies the currency symbol of currency textbox, used when the user wants to overwrite the currency symbol commonly instead of the current culture symbol. - * @Default {Based on the culture} - */ - currencySymbol?: string; + /** returns the name of the event + */ + type?: string; - /** Sets the root CSS class for Editors which allow us to customize the appearance. - */ - cssClass?: string; + /** returns the target element + */ + target?: any; + } - /** Specifies the number of digits that should be allowed after the decimal point. - * @Default {0} - */ - decimalPlaces?: number; - - /** Specifies the editor control state. - * @Default {true} - */ - enabled?: boolean; - - /** Specify the enablePersistence to editor to save current editor control value to browser cookies for state maintenance. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Specifies the Right to Left Direction to editor. - * @Default {false} - */ - enableRTL?: boolean; - - /** When enableStrictMode true it allows the value outside of the range also but it highlights the textbox with error class,otherwise it internally changed to the correct value. - * @Default {false} - */ - enableStrictMode?: boolean; - - /** Specifies the number of digits in each group to the editor. - * @Default {Based on the culture.} - */ - groupSize?: string; - - /** It provides the options to get the customized character to separate the digits. If not set, the separator defined by the current culture. - * @Default {Based on the culture} - */ - groupSeparator?: string; - - /** Specifies the height of the editor. - * @Default {30} - */ - height?: string; - - /** It allows to define the characteristics of the Editors control. It will helps to extend the capability of an HTML element. - * @Default {{}} - */ - htmlAttributes?: any; - - /** The Editor value increment or decrement based an incrementStep value. - * @Default {1} - */ - incrementStep?: number; - - /** Defines the localization culture for editor. - * @Default {en-US} - */ - locale?: string; - - /** Specifies the maximum value of the editor. - * @Default {Number.MAX_VALUE} - */ - maxValue?: number; - - /** Specifies the minimum value of the editor. - * @Default {-(Number.MAX_VALUE) and 0 for Currency Textbox.} - */ - minValue?: number; - - /** Specifies the name of the editor. - * @Default {Sets id as name if it is null.} - */ - name?: string; - - /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the negative pattern. - * you have to specify 'n' to place the digit in your pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. - * @Default {Based on the culture} - */ - negativePattern?: string; - - /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the positive pattern. - * you have to specify 'n' to place the digit in your pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. - * @Default {Based on the culture} - */ - positivePattern?: string; - - /** Toggles the readonly state of the editor. When the Editor is readonly it doesn't allow user interactions. - * @Default {false} - */ - readOnly?: boolean; - - /** Specifies to Change the sharped edges into rounded corner for the Editor. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specifies whether the up and down spin buttons should be displayed in editor. - * @Default {true} - */ - showSpinButton?: boolean; - - /** Enables decimal separator position validation on type . - * @Default {false} - */ - validateOnType?: boolean; - - /** Set the jQuery validation error message in editor. - * @Default {null} - */ - validationMessage?: any; - - /** Set the jQuery validation rules to the editor. - * @Default {null} - */ - validationRules?: any; - - /** Specifies the value of the editor. - * @Default {null} - */ - value?: number | string; - - /** Specifies the watermark text to editor. - * @Default {Based on the culture.} - */ - watermarkText?: string; - - /** Specifies the width of the editor. - * @Default {143} - */ - width?: string; - - /** Fires after Editor control value is changed. */ - change?(e: ChangeEventArgs): void; - - /** Fires after Editor control is created. */ - create?(e: CreateEventArgs): void; - - /** Fires when the Editor is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; - - /** Fires after Editor control is focused. */ - focusIn?(e: FocusInEventArgs): void; - - /** Fires after Editor control is loss the focus. */ - focusOut?(e: FocusOutEventArgs): void; - } - - export interface ChangeEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the corresponding editor model. - */ - model?: ej.Editor.Model; - - /** returns the name of the event. - */ - type?: string; - - /** returns the corresponding editor control value. - */ - value?: number; - - /** returns true when the value changed by user interaction otherwise returns false - */ - isInteraction?: boolean; - } - - export interface CreateEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the editor model - */ - model?: ej.Editor.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the editor model - */ - model?: ej.Editor.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface FocusInEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the corresponding editor model. - */ - model?: ej.Editor.Model; - - /** returns the name of the event. - */ - type?: string; - - /** returns the corresponding editor control value. - */ - value?: number; - } - - export interface FocusOutEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the corresponding editor model. - */ - model?: ej.Editor.Model; - - /** returns the name of the event. - */ - type?: string; - - /** returns the corresponding editor control value. - */ - value?: number; - } - } - - class ListView extends ej.Widget { - static fn: ListView; - constructor(element: JQuery | Element, options?: ListView.Model); - static Locale: any; - model: ListView.Model; - defaults: ListView.Model; - - /** To add item in the given index. If you have enabled grouping in ListView then you need to pass the corresponding group list title to add item in it. - * @param {any} Specifies the item to be added in ListView - * @param {number} Specifies the index where item to be added - * @param {string} optionalThis is an optional parameter. You must pass the group list title here if grouping is enabled in the ListView - * @returns {void} - */ - addItem(item: any, index: number, groupid: string): void; - - /** To check all the items. - * @returns {void} - */ - checkAllItem(): void; - - /** To check item in the given index. - * @param {number} Specifies the index of the item to be checked - * @returns {void} - */ - checkItem(index: number): void; - - /** To clear all the list item in the control before updating with new datasource. - * @returns {void} - */ - clear(): void; - - /** To make the item in the given index to be default state. - * @param {number} Specifies the index to make the item to be in default state. - * @returns {void} - */ - deActive(index: number): void; - - /** To disable item in the given index. - * @param {number} Specifies the index value to be disabled. - * @returns {void} - */ - disableItem(index: number): void; - - /** To enable item in the given index. - * @param {number} Specifies the index value to be enabled. - * @returns {void} - */ - enableItem(index: number): void; - - /** To get the active item. - * @returns {HTMLElement} - */ - getActiveItem(): HTMLElement; - - /** To get the text of the active item. - * @returns {string} - */ - getActiveItemText(): string; - - /** To get all the checked items. - * @returns {Array} - */ - getCheckedItems(): any[]; - - /** To get the text of all the checked items. - * @returns {Array} - */ - getCheckedItemsText(): any[]; - - /** To get the total item count. - * @returns {number} - */ - getItemsCount(): number; - - /** To get the text of the item in the given index. - * @param {string|number} Specifies the index value to get the text value. - * @returns {string} - */ - getItemText(index: string | number): string; - - /** To check whether the item in the given index has child item. - * @param {number} Specifies the index value to check the item has child or not. - * @returns {boolean} - */ - hasChild(index: number): boolean; - - /** To hide the list. - * @returns {void} - */ - hide(): void; - - /** To hide item in the given index. - * @param {number} Specifies the index value to hide the item. - * @returns {void} - */ - hideItem(index: number): void; - - /** To check whether item in the given index is checked. - * @returns {boolean} - */ - isChecked(): boolean; - - /** To load the AJAX content while selecting the item. - * @param {string} Specifies the item to load the AJAX content. - * @returns {void} - */ - loadAjaxContent(item: string): void; - - /** To remove the check mark either for specific item in the given index or for all items. - * @param {number} Specifies the index value to remove the checkbox. - * @returns {void} - */ - removeCheckMark(index: number): void; - - /** To remove item in the given index. - * @param {number} Specifies the index value to remove the item. - * @returns {void} - */ - removeItem(index: number): void; - - /** To select item in the given index. - * @param {number} Specifies the index value to select the item. - * @returns {void} - */ - selectItem(index: number): void; - - /** To make the item in the given index to be active state. - * @param {number} Specifies the index value to make the item in active state. - * @returns {void} - */ - setActive(index: number): void; - - /** To show the list. - * @returns {void} - */ - show(): void; - - /** To show item in the given index. - * @param {number} Specifies the index value to show the hided item. - * @returns {void} - */ - showItem(index: number): void; - - /** To uncheck all the items. - * @returns {void} - */ - unCheckAllItem(): void; - - /** To uncheck item in the given index. - * @param {number} Specifies the index value to uncheck the item. - * @returns {void} - */ - unCheckItem(index: number): void; - } - export namespace ListView { - - export interface Model { - - /** Specifies the ajaxSettings option to load the items to the ListView control. - * @Default {null} - */ - ajaxSettings?: AjaxSettings; - - /** Set the index values to be selected on initial loading. This works only when enableCheckMark is set true. - * @Default {[]} - */ - checkedIndices?: any[]; - - /** Sets the root class for ListView theme. This cssClass API helps to use custom skinning option for ListView control. By defining the root class using this API, - * we need to include this root class in CSS. - */ - cssClass?: string; - - /** Contains the list of data for generating the ListView items. - * @Default {[]} - */ - dataSource?: any[]; - - /** Specifies whether to load AJAX content while selecting item. - * @Default {false} - */ - enableAjax?: boolean; - - /** Specifies whether to enable caching the content. - * @Default {false} - */ - enableCache?: boolean; - - /** Specifies whether to enable check mark for the item. - * @Default {false} - */ - enableCheckMark?: boolean; - - /** Specifies whether to enable the filtering feature to filter the item. - * @Default {false} - */ - enableFiltering?: boolean; - - /** Specifies whether to group the list item. - * @Default {false} - */ - enableGroupList?: boolean; - - /** Specifies to maintain the current model value to browser cookies for state maintenance. While refresh the page, the model value will get apply to the control from browser cookies. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Specifies the field settings to map the datasource. - */ - fieldSettings?: any; - - /** Contains the array of items to be added in ListView. - * @Default {[]} - */ - items?: any[]; - - /** Specifies the text of the back button in the header. - * @Default {null} - */ - headerBackButtonText?: string; - - /** Specifies the title of the header. - * @Default {Title} - */ - headerTitle?: string; - - /** Specifies the height. - * @Default {null} - */ - height?: string | number; - - /** Set the localization culture for ListView Widget. - */ - locale?: string; - - /** Specifies whether to retain the selection of the item. - * @Default {false} - */ - persistSelection?: boolean; - - /** Specifies whether to prevent the selection of the item. - * @Default {false} - */ - preventSelection?: boolean; - - /** Specifies the query to execute with the datasource. - * @Default {null} - */ - query?: any; - - /** Specifies whether need to render the control with the template contents. - * @Default {false} - */ - renderTemplate?: boolean; - - /** Specifies the index of item which need to be in selected state initially while loading. - * @Default {0} - */ - selectedItemIndex?: number; - - /** Specifies whether to show the header. - * @Default {true} - */ - showHeader?: boolean; - - /** Specifies whether to show the back button header. - * @Default {false} - */ - showHeaderBackButton?: boolean; - - /** Specifies ID of the element contains template contents. - * @Default {null} - */ - templateId?: string; - - /** Specifies the width. - * @Default {null} - */ - width?: string | number; - - /** Event triggers before the AJAX request happens. */ - ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; - - /** Event triggers after the AJAX content loaded completely. */ - ajaxComplete?(e: AjaxCompleteEventArgs): void; - - /** Event triggers when the AJAX request failed. */ - ajaxError?(e: AjaxErrorEventArgs): void; - - /** Event triggers after the AJAX content loaded successfully. */ - ajaxSuccess?(e: AjaxSuccessEventArgs): void; + export interface OpenEventArgs { - /** Event triggers before the items loaded. */ - load?(e: LoadEventArgs): void; - - /** Event triggers after the items loaded. */ - loadComplete?(e: LoadCompleteEventArgs): void; - - /** Event triggers when mouse down happens on the item. */ - mouseDown?(e: MouseDownEventArgs): void; + /** returns the menu model + */ + model?: ej.Menu.Model; - /** Event triggers when mouse up happens on the item. */ - mouseUp?(e: MouseUpEventArgs): void; - } + /** returns the name of the event + */ + type?: string; - export interface AjaxBeforeLoadEventArgs { + /** returns the target element + */ + target?: any; + } - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface CreateEventArgs { - /** returns the name of the event. - */ - type?: string; + /** returns the menu model + */ + model?: ej.Menu.Model; - /** returns the model value of the control. - */ - model?: ej.ListView.Model; + /** returns the name of the event + */ + type?: string; + } - /** returns the AJAX settings. - */ - ajaxData?: any; - } + export interface DestroyEventArgs { - export interface AjaxCompleteEventArgs { + /** returns the menu model + */ + model?: ej.Menu.Model; - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; + } - /** returns the name of the event. - */ - type?: string; + export interface KeydownEventArgs { - /** returns the model value of the control. - */ - model?: ej.ListView.Model; - } + /** returns the menu model + */ + model?: ej.Menu.Model; - export interface AjaxErrorEventArgs { + /** returns the name of the event + */ + type?: string; - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns clicked menu item text + */ + menuText?: string; - /** returns the name of the event. - */ - type?: string; + /** returns clicked menu item element + */ + element?: any; - /** returns the model value of the control. - */ - model?: ej.ListView.Model; + /** returns the event + */ + event?: any; + } - /** returns the error thrown in the AJAX post. - */ - errorThrown?: any; + export interface MouseoutEventArgs { - /** returns the status. - */ - textStatus?: any; + /** returns the menu model + */ + model?: ej.Menu.Model; - /** returns the current list item. - */ - item?: any; + /** returns the name of the event + */ + type?: string; - /** returns the current item text. - */ - text?: string; + /** returns clicked menu item text + */ + text?: string; - /** returns the current item index. - */ - index?: number; - } + /** returns clicked menu item element + */ + element?: any; - export interface AjaxSuccessEventArgs { + /** returns the event + */ + event?: any; + } - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface MouseoverEventArgs { - /** returns the name of the event. - */ - type?: string; + /** returns the menu model + */ + model?: ej.Menu.Model; - /** returns the model value of the control. - */ - model?: ej.ListView.Model; + /** returns the name of the event + */ + type?: string; - /** returns the AJAX current content. - */ - content?: string; + /** returns clicked menu item text + */ + text?: string; - /** returns the current list item. - */ - item?: any; + /** returns clicked menu item element + */ + element?: any; - /** returns the current item text. - */ - text?: string; + /** returns the event + */ + event?: any; + } - /** returns the current item index. - */ - index?: number; + export interface OverflowOpenEventArgs { + + /** returns the menu model + */ + model?: ej.Menu.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event object + */ + e?: any; + + /** if the event should be cancelled ; otherwise ,false + */ + cancel?: boolean; + } + + export interface OverflowCloseEventArgs { + + /** returns the menu model + */ + model?: ej.Menu.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event object + */ + e?: any; + + /** if the event should be cancelled ; otherwise ,false + */ + cancel?: boolean; + } + + export interface Fields { + + /** It receives the child data for the inner level. + */ + child?: any; + + /** It receives datasource as Essential DataManager object and JSON object. + */ + dataSource?: any; + + /** Specifies the HTML attributes to “LI” item list. + */ + htmlAttribute?: string; + + /** Specifies the id to menu items list + */ + id?: string; + + /** Specifies the image attribute to “img” tag inside items list. + */ + imageAttribute?: string; + + /** Specifies the image URL to “img” tag inside item list. + */ + imageUrl?: string; + + /** Adds custom attributes like "target" to the anchor tag of the menu items. + */ + linkAttribute?: string; + + /** Specifies the parent id of the table. + */ + parentId?: string; + + /** It receives query to retrieve data from the table (query is same as SQL). + */ + query?: any; + + /** Specifies the sprite CSS class to “LI” item list. + */ + spriteCssClass?: string; + + /** It receives table name to execute query on the corresponding table. + */ + tableName?: string; + + /** Specifies the text of menu items list. + */ + text?: string; + + /** Specifies the URL to the anchor tag in menu item list. + */ + url?: string; + } + } + enum AnimationType { + //string + Default, + //string + None, + } + enum MenuType { + //string + ContextMenu, + //string + NormalMenu, + } + enum Direction { + //string + Left, + //string + None, + //string + Right, + } + + class Pager extends ej.Widget { + static fn: Pager; + constructor(element: JQuery | Element, options?: Pager.Model); + static Locale: any; + model: Pager.Model; + defaults: Pager.Model; + + /** Send a paging request to specified page through the pager control. + * @param {number} Specifies the index to be navigated + * @returns {void} + */ + gotoPage(pageIndex: number): void; + + /** refreshPager() helps to refresh the model value of pager control. + * @returns {void} + */ + refreshPager(): void; + } + export namespace Pager { + + export interface Model { + + /** Gets or sets a value that indicates whether to display the custom text message in Pager. + */ + customText?: string; + + /** Gets or sets a value that indicates whether to define which page to display currently in pager. + * @Default {1} + */ + currentPage?: number; + + /** Gets or sets a value that indicates whether to display the external Message in Pager. + * @Default {false} + */ + enableExternalMessage?: boolean; + + /** Gets or sets a value that indicates whether to pass the current page information as a query string along with the URL while navigating to other page. + * @Default {false} + */ + enableQueryString?: boolean; + + /** Align content in the pager control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /** Gets or sets a value that indicates whether to display the external Message in Pager. + */ + externalMessage?: string; + + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to + * a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /** Gets or sets a value that indicates whether to define the number of pages displayed in the pager for navigation. + * @Default {10} + */ + pageCount?: number; + + /** Gets or sets a value that indicates whether to define the number of records displayed per page. + * @Default {12} + */ + pageSize?: number; + + /** Get or sets a value of total number of pages in the pager. The totalPages value is calculated based on page size and total records. + * @Default {null} + */ + totalPages?: number; + + /** Get the value of total number of records which is bound to a data item. + * @Default {null} + */ + totalRecordsCount?: number; + + /** Shows or hides the current page information in pager footer. + * @Default {true} + */ + showPageInfo?: boolean; + + /** Triggered when pager numeric item is clicked in pager control. + */ + click?(e: ClickEventArgs): void; + } + + export interface ClickEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the current page index. + */ + currentPage?: number; + + /** Returns the pager model. + */ + model?: any; + + /** Returns the name of event + */ + type?: string; + + /** Returns current action event type and its target. + */ + event?: any; + } + } + + class Print extends ej.Widget { + static fn: Print; + constructor(element: JQuery | Element, options?: Print.Model); + static Locale: any; + model: Print.Model; + defaults: Print.Model; + + /** Print the specific page or an element. + * @returns {void} + */ + print(): void; + } + export namespace Print { + + export interface Model { + + /** Append the custom HTML after the selected content. + * @Default {null} + */ + append?: string; + + /** A selector that specifies a particular element to be excluded from printing. + * @Default {null} + */ + excludeSelector?: string; + + /** Specifies whether the URL of an external stylesheet can be included to customize and print that page. + * @Default {null} + */ + externalStyles?: string; + + /** Prepend a doctype to the document frame. + * @Default {<!doctype html>} + */ + docType?: string; + + /** Specifies whether the global styles can be applied to the element to be printed. + * @Default {true} + */ + globalStyles?: boolean; + + /** Sets the height of the print window. + * @Default {454} + */ + height?: number; + + /** Prepends the custom HTML before the selected content. + * @Default {null} + */ + prepend?: string; + + /** Allows printing the content in a new window. + * @Default {false} + */ + printInNewWindow?: boolean; + + /** Sets the period of time to wait before printing the content. + * @Default {1000} + */ + timeOutPeriod?: number; + + /** Sets the title of the print document. + * @Default {null} + */ + title?: string; + + /** Defines the width of the print window. + * @Default {1024} + */ + width?: number; + + /** Event triggers before the document page or an element in it gets printed. + */ + beforeStart?(e: BeforeStartEventArgs): void; + } + + export interface BeforeStartEventArgs { + + /** Set this option as true to cancel the event. + */ + cancel?: boolean; + + /** Returns the Print model + */ + model?: ej.Print.Model; + + /** Returns the name of an event + */ + type?: string; + + /** Returns the printed element + */ + content?: any; + } + } + + class ProgressBar extends ej.Widget { + static fn: ProgressBar; + constructor(element: JQuery | Element, options?: ProgressBar.Model); + static Locale: any; + model: ProgressBar.Model; + defaults: ProgressBar.Model; + + /** Destroy the progressbar widget + * @returns {void} + */ + destroy(): void; + + /** Disables the progressbar control + * @returns {void} + */ + disable(): void; + + /** Enables the progressbar control + * @returns {void} + */ + enable(): void; + + /** Returns the current progress value in percent. + * @returns {number} + */ + getPercentage(): number; + + /** Returns the current progress value + * @returns {number} + */ + getValue(): number; + } + export namespace ProgressBar { + + export interface Model { + + /** Sets the root CSS class for ProgressBar theme, which is used customize. + * @Default {null} + */ + cssClass?: string; + + /** When this property sets to false, it disables the ProgressBar control + * @Default {true} + */ + enabled?: boolean; + + /** Save current model value to browser cookies for state maintains. While refresh the progressBar control page retains the model value apply from browser cookies + * @Default {false} + */ + enablePersistence?: boolean; + + /** Sets the ProgressBar direction as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /** Defines the height of the ProgressBar. + * @Default {null} + */ + height?: number|string; + + /** It allows to define the characteristics of the progressBar control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Sets the maximum value of the ProgressBar. + * @Default {100} + */ + maxValue?: number; + + /** Sets the minimum value of the ProgressBar. + * @Default {0} + */ + minValue?: number; + + /** Sets the ProgressBar value in percentage. The value should be in between 0 to 100. + * @Default {0} + */ + percentage?: number; + + /** Displays rounded corner borders on the progressBar control. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Sets the custom text for the ProgressBar. The text placed in the middle of the ProgressBar and it can be customizable using the class 'e-progress-text'. + * @Default {null} + */ + text?: string; + + /** Sets the ProgressBar value. The value should be in between min and max values. + * @Default {0} + */ + value?: number; + + /** Defines the width of the ProgressBar. + * @Default {null} + */ + width?: number|string; + + /** Event triggers when the progress value changed + */ + change?(e: ChangeEventArgs): void; + + /** Event triggers when the process completes (at 100%) + */ + complete?(e: CompleteEventArgs): void; + + /** Event triggers when the progressbar are created + */ + create?(e: CreateEventArgs): void; + + /** Event triggers when the progressbar are destroyed + */ + destroy?(e: DestroyEventArgs): void; + + /** Event triggers when the process starts (from 0%) + */ + start?(e: StartEventArgs): void; + } + + export interface ChangeEventArgs { + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the ProgressBar model + */ + model?: ej.ProgressBar.Model; + + /** returns the current progress percentage + */ + percentage?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the current progress value + */ + value?: string; + } + + export interface CompleteEventArgs { + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the ProgressBar model + */ + model?: ej.ProgressBar.Model; + + /** returns the current progress percentage + */ + percentage?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the current progress value + */ + value?: string; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the progressbar model + */ + model?: ej.ProgressBar.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the progressbar model + */ + model?: ej.ProgressBar.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface StartEventArgs { + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the ProgressBar model + */ + model?: ej.ProgressBar.Model; + + /** returns the current progress percentage + */ + percentage?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the current progress value + */ + value?: string; + } + } + + class RadioButton extends ej.Widget { + static fn: RadioButton; + constructor(element: JQuery | Element, options?: RadioButton.Model); + static Locale: any; + model: RadioButton.Model; + defaults: RadioButton.Model; + + /** To disable the RadioButton + * @returns {void} + */ + disable(): void; + + /** To enable the RadioButton + * @returns {void} + */ + enable(): void; + } + export namespace RadioButton { + + export interface Model { + + /** Specifies the check attribute of the Radio Button. + * @Default {false} + */ + checked?: boolean; + + /** Specify the CSS class to RadioButton to achieve custom theme. + */ + cssClass?: string; + + /** Specifies the RadioButton control state. + * @Default {true} + */ + enabled?: boolean; + + /** Specifies the enablePersistence property for RadioButton while initialization. The enablePersistence API save current model value to browser cookies for state maintains. While + * refreshing the radio button control page the model value apply from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Specify the Right to Left direction to RadioButton + * @Default {false} + */ + enableRTL?: boolean; + + /** Specifies the HTML Attributes of the Checkbox + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specifies the id attribute for the Radio Button while initialization. + * @Default {null} + */ + id?: string; + + /** Specify the idPrefix value to be added before the current id of the RadioButton. + * @Default {ej} + */ + idPrefix?: string; + + /** Specifies the name attribute for the Radio Button while initialization. + * @Default {Sets id as name if it is null} + */ + name?: string; + + /** Specifies the size of the RadioButton. + * @Default {small} + */ + size?: ej.RadioButtonSize|string; + + /** Specifies the text content for RadioButton. + */ + text?: string; + + /** Set the jQuery validation error message in radio button. + * @Default {null} + */ + validationMessage?: any; + + /** Set the jQuery validation rules in radio button. + * @Default {null} + */ + validationRules?: any; + + /** Specifies the value attribute of the Radio Button. + * @Default {null} + */ + value?: string; + + /** Fires before the RadioButton is going to changed its state successfully + */ + beforeChange?(e: BeforeChangeEventArgs): void; + + /** Fires when the RadioButton state is changed successfully + */ + change?(e: ChangeEventArgs): void; + + /** Fires when the RadioButton created successfully + */ + create?(e: CreateEventArgs): void; + + /** Fires when the RadioButton destroyed successfully + */ + destroy?(e: DestroyEventArgs): void; + } + + export interface BeforeChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns true if element is checked, otherwise returns false + */ + isChecked?: boolean; + + /** returns true if change event triggered by interaction, otherwise returns false + */ + isInteraction?: boolean; + } + + export interface ChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns true if element is checked, otherwise returns false + */ + isChecked?: boolean; + + /** returns true if change event triggered by interaction, otherwise returns false + */ + isInteraction?: boolean; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /** returns the name of the event + */ + type?: string; + } + } + enum RadioButtonSize { + //Shows small size radio button + Small, + //Shows medium size radio button + Medium, + } + + class Rating extends ej.Widget { + static fn: Rating; + constructor(element: JQuery | Element, options?: Rating.Model); + static Locale: any; + model: Rating.Model; + defaults: Rating.Model; + + /** Destroy the Rating widget all events bound will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To get the current value of rating control. + * @returns {number} + */ + getValue(): number; + + /** To hide the rating control. + * @returns {void} + */ + hide(): void; + + /** User can refresh the rating control to identify changes. + * @returns {void} + */ + refresh(): void; + + /** To reset the rating value. + * @returns {void} + */ + reset(): void; + + /** To set the rating value. + * @param {string|number} Specifies the rating value. + * @returns {void} + */ + setValue(value: string|number): void; + + /** To show the rating control + * @returns {void} + */ + show(): void; + } + export namespace Rating { + + export interface Model { + + /** Enables the rating control with reset button.It can be used to reset the rating control value. + * @Default {true} + */ + allowReset?: boolean; + + /** Specify the CSS class to achieve custom theme. + */ + cssClass?: string; + + /** When this property is set to false, it disables the rating control. + * @Default {true} + */ + enabled?: boolean; + + /** Save current model value to browser cookies for state maintenance. While refresh the page Rating control values are retained. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Specifies the height of the Rating control wrapper. + * @Default {null} + */ + height?: string; + + /** Specifies the list of HTML attributes to be added to rating control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specifies the value to be increased while navigating between shapes(stars) in Rating control. + * @Default {1} + */ + incrementStep?: number; + + /** Allow to render the maximum number of Rating shape(star). + * @Default {5} + */ + maxValue?: number; + + /** Allow to render the minimum number of Rating shape(star). + * @Default {0} + */ + minValue?: number; + + /** Specifies the orientation of Rating control. See Orientation + * @Default {ej.Rating.Orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /** Helps to provide more precise ratings.Rating control supports three precision modes - full, half, and exact. See Precision + * @Default {full} + */ + precision?: ej.Rating.Precision|string; + + /** Interaction with Rating control can be prevented by enabling this API. + * @Default {false} + */ + readOnly?: boolean; + + /** To specify the height of each shape in Rating control. + * @Default {23} + */ + shapeHeight?: number; + + /** To specify the width of each shape in Rating control. + * @Default {23} + */ + shapeWidth?: number; + + /** Enables the tooltip option.Currently selected value will be displayed in tooltip. + * @Default {true} + */ + showTooltip?: boolean; + + /** To specify the number of stars to be selected while rendering. + * @Default {1} + */ + value?: number; + + /** Specifies the width of the Rating control wrapper. + * @Default {null} + */ + width?: string; + + /** Fires when Rating value changes. + */ + change?(e: ChangeEventArgs): void; + + /** Fires when Rating control is clicked successfully. + */ + click?(e: ClickEventArgs): void; + + /** Fires when Rating control is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires when Rating control is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when mouse hover is removed from Rating control. + */ + mouseout?(e: MouseoutEventArgs): void; + + /** Fires when mouse move is moving the Rating control. + */ + mousemove?(e: MousemoveEventArgs): void; + + /** Fires when mouse hovered over the Rating control. + */ + mouseover?(e: MouseoverEventArgs): void; + } + + export interface ChangeEventArgs { + + /** returns the current value. + */ + value?: number; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the rating model + */ + model?: ej.Rating.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mouse click event args values. + */ + event?: any; + } + + export interface ClickEventArgs { - /** returns the current URL of the AJAX post. - */ - URL?: string; - } + /** returns the current value. + */ + value?: number; - export interface LoadEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the rating model + */ + model?: ej.Rating.Model; - /** returns the name of the event. - */ - type?: string; + /** returns the name of the event + */ + type?: string; - /** returns the model value of the control. - */ - model?: ej.ListView.Model; - } + /** returns the mouse click event args values. + */ + event?: any; + } - export interface LoadCompleteEventArgs { + export interface CreateEventArgs { - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event. - */ - type?: string; + /** returns the rating model + */ + model?: ej.Rating.Model; - /** returns the model value of the control. - */ - model?: ej.ListView.Model; - } + /** returns the name of the event. + */ + type?: string; + } - export interface MouseDownEventArgs { + export interface DestroyEventArgs { - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event. - */ - type?: string; + /** returns the rating model + */ + model?: ej.Rating.Model; - /** returns the model value of the control. - */ - model?: ej.ListView.Model; + /** returns the name of the event + */ + type?: string; + } - /** If the child element exist return true; otherwise, false. - */ - hasChild?: boolean; + export interface MouseoutEventArgs { - /** returns the current list item. - */ - item?: string; + /** returns the current value. + */ + value?: number; - /** returns the current text of item. - */ - text?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the current Index of the item. - */ - index?: number; + /** returns the rating model + */ + model?: ej.Rating.Model; - /** If checked return true; otherwise, false. - */ - isChecked?: boolean; + /** returns the name of the event + */ + type?: string; - /** returns the list of checked items. - */ - checkedItems?: number; - - /** returns the current checked item text. - */ - checkedItemsText?: string; - } - - export interface MouseUpEventArgs { - - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the name of the event. - */ - type?: string; - - /** returns the model value of the control. - */ - model?: ej.ListView.Model; - - /** If the child element exist return true; otherwise, false. - */ - hasChild?: boolean; - - /** returns the current list item. - */ - item?: string; - - /** returns the current text of item. - */ - text?: string; - - /** returns the current Index of the item. - */ - index?: number; - - /** If checked return true; otherwise, false. - */ - isChecked?: boolean; - - /** returns the list of checked items. - */ - checkedItems?: number; - - /** returns the current checked item text. - */ - checkedItemsText?: string; - } - - export interface AjaxSettings { - - /** It specifies, whether to enable or disable asynchronous request. - */ - async?: boolean; - - /** It specifies the page will be cached in the web browser. - */ - cache?: boolean; - - /** It specifies the type of data is send in the query string. - */ - contentType?: string; - - /** It specifies the data as an object, will be passed in the query string. - */ - data?: any; - - /** It specifies the type of data that you're expecting back from the response. - */ - dataType?: string; - - /** It specifies the HTTP request type. - */ - type?: string; - } - } - - class MaskEdit extends ej.Widget { - static fn: MaskEdit; - constructor(element: JQuery | Element, options?: MaskEdit.Model); - static Locale: any; - model: MaskEdit.Model; - defaults: MaskEdit.Model; - - /** To clear the text in mask edit textbox control. - * @returns {void} - */ - clear(): void; - - /** To disable the mask edit textbox control. - * @returns {void} - */ - disable(): void; - - /** To enable the mask edit textbox control. - * @returns {void} - */ - enable(): void; - - /** To obtained the pure value of the text value, removes all the symbols in mask edit textbox control. - * @returns {string} - */ - get_StrippedValue(): string; - - /** To obtained the textbox value as such that, Just replace all '_' to ' '(space) in mask edit textbox control. - * @returns {string} - */ - get_UnstrippedValue(): string; - } - export namespace MaskEdit { - - export interface Model { - - /** Specify the cssClass to achieve custom theme. - * @Default {null} - */ - cssClass?: string; - - /** Specify the custom character allowed to entered in mask edit textbox control. - * @Default {null} - */ - customCharacter?: string; - - /** Specify the state of the mask edit textbox control. - * @Default {true} - */ - enabled?: boolean; - - /** Specify the enablePersistence to mask edit textbox to save current model value to browser cookies for state maintains. - */ - enablePersistence?: boolean; - - /** Specifies the height for the mask edit textbox control. - * @Default {28 px} - */ - height?: string; - - /** Specifies whether hide the prompt characters with spaces on blur. Prompt chars will be shown again on focus the textbox. - * @Default {false} - */ - hidePromptOnLeave?: boolean; - - /** Specifies the list of HTML attributes to be added to mask edit textbox. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specify the inputMode for mask edit textbox control. See InputMode - * @Default {ej.InputMode.Text} - */ - inputMode?: ej.InputMode | string; - - /** Specifies the input mask. - * @Default {null} - */ - maskFormat?: string; - - /** Specifies the name attribute value for the mask edit textbox. - * @Default {null} - */ - name?: string; - - /** Toggles the readonly state of the mask edit textbox. When the mask edit textbox is readonly, it doesn't allow your input. - * @Default {false} - */ - readOnly?: boolean; - - /** Specifies whether the error will show until correct value entered in the mask edit textbox control. - * @Default {false} - */ - showError?: boolean; - - /** when showPromptChar is true, the hide the prompt characters are shown in focus of the control and hides in focus out of the control. - * @Default {true} - */ - showPromptChar?: boolean; - - /** MaskEdit input is displayed in rounded corner style when this property is set to true. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specify the text alignment for mask edit textbox control.See TextAlign - * @Default {left} - */ - textAlign?: ej.TextAlign | string; - - /** Sets the jQuery validation error message in mask edit. This property works when the widget is present inside the form. Include jquery.validate.min.js plugin additionally. - * @Default {null} - */ - validationMessage?: any; - - /** Sets the jQuery validation rules to the MaskEdit. This property works when the widget is present inside the form. Include jquery.validate.min.js plugin additionally. - * @Default {null} - */ - validationRules?: any; - - /** Specifies the value for the mask edit textbox control. - * @Default {null} - */ - value?: string; - - /** Specifies the water mark text to be displayed in input text. - * @Default {null} - */ - watermarkText?: string; - - /** Specifies the width for the mask edit textbox control. - * @Default {143pixel} - */ - width?: string; - - /** Fires when value changed in mask edit textbox control. */ - change?(e: ChangeEventArgs): void; - - /** Fires after MaskEdit control is created. */ - create?(e: CreateEventArgs): void; - - /** Fires when the MaskEdit is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; + /** returns the mouse click event args values. + */ + event?: any; + } + + export interface MousemoveEventArgs { + + /** returns the current value. + */ + value?: number; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the rating model + */ + model?: ej.Rating.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mouse click event args values. + */ + event?: any; + } + + export interface MouseoverEventArgs { + + /** returns the current value. + */ + value?: number; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the rating model + */ + model?: ej.Rating.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mouse click event args values. + */ + event?: any; + + /** returns the current index value. + */ + index?: any; + } + + enum Precision { + + ///string + Exact, + + ///string + Full, + + ///string + Half + } + + } + + class Ribbon extends ej.Widget { + static fn: Ribbon; + constructor(element: JQuery | Element, options?: Ribbon.Model); + static Locale: any; + model: Ribbon.Model; + defaults: Ribbon.Model; + + /** Adds contextual tab or contextual tab set dynamically in the ribbon control with contextual tabs object and index position. When index is null, ribbon contextual tab or contextual + * tab set is added at the last index. + * @param {any} contextual tab or contextual tab set object. + * @param {number} index of the contextual tab or contextual tab set, this is optional. + * @returns {void} + */ + addContextualTabs(contextualTabSet: any, index?: number): void; + + /** Add new option to Backstage page. + * @param {any} select the object to add the backstage item + * @param {number} index to the backstage item this is optional. + * @returns {void} + */ + addBackStageItem(item: any, index?: number): void; + + /** Adds tab dynamically in the ribbon control with given name, tab group array and index position. When index is null, ribbon tab is added at the last index. + * @param {string} ribbon tab display text. + * @param {any[]} groups to be displayed in ribbon tab . + * @param {number} index of the ribbon tab,this is optional. + * @returns {void} + */ + addTab(tabText: string, ribbonGroups: any[], index?: number): void; + + /** Adds tab group dynamically in the ribbon control with given tab index, tab group object and group index position. When group index is null, ribbon group is added at the last index. + * @param {number} ribbon tab index. + * @param {any} group to be displayed in ribbon tab . + * @param {number} index of the ribbon group,this is optional. + * @returns {void} + */ + addTabGroup(tabIndex: number, tabGroup: any, groupIndex?: number): void; + + /** Adds group content dynamically in the ribbon control with given tab index, group index, content, content index and sub group index position. When content index is null, content is + * added at the last index. + * @param {number} ribbon tab index. + * @param {number} ribbon group index. + * @param {any} content to be displayed in the ribbon group. + * @param {number} ribbon content index. This is optional. If the value is not given, then by default contentIndex will be considered as 0. + * @param {number} sub group index in the ribbon group. This is optional. If the value is not given, then by default contentIndex will be considered as 0. + * @returns {void} + */ + addTabGroupContent(tabIndex: number, groupIndex: number, content: any, contentIndex?: number, subGroupIndex?: number): void; + + /** Hides the ribbon backstage page. + * @returns {void} + */ + hideBackstage(): void; + + /** Collapses the ribbon tab content. + * @returns {void} + */ + collapse(): void; + + /** Destroys the ribbon widget. All the events bound using this._on are unbound automatically and the ribbon control is moved to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Expands the ribbon tab content. + * @returns {void} + */ + expand(): void; + + /** Gets text of the given index tab in the ribbon control. + * @param {number} index of the tab item. + * @returns {string} + */ + getTabText(index: number): string; + + /** Hides the given text tab in the ribbon control. + * @param {string} text of the tab item. + * @returns {void} + */ + hideTab(text: string): void; + + /** Checks whether the given text tab in the ribbon control is enabled or not. + * @param {string} text of the tab item. + * @returns {boolean} + */ + isEnable(text: string): boolean; + + /** Checks whether the given text tab in the ribbon control is visible or not. + * @param {string} text of the tab item. + * @returns {boolean} + */ + isVisible(text: string): boolean; + + /** Removes the given index tab item from the ribbon control. + * @param {number} index of tab item. + * @returns {void} + */ + removeTab(index: number): void; + + /** Sets new text to the given text tab in the ribbon control. + * @param {string} current text of the tab item. + * @param {string} new text of the tab item. + * @returns {void} + */ + setTabText(tabText: string, newText: string): void; + + /** Displays the ribbon backstage page. + * @returns {void} + */ + showBackstage(): void; + + /** Displays the given text tab in the ribbon control. + * @param {string} text of the tab item. + * @returns {void} + */ + showTab(text: string): void; + + /** To customize Group alone in the inside content. + * @param {number} ribbon tab index. + * @param {string} group id to be displayed in ribbon tab . + * @param {any} contentGroup is used in the object + * @returns {void} + */ + updateGroup(tabIndex: number, groupId: string, contentGroup?: any): void; + + /** Update option in existing Backstage. + * @param {number} index to the backstage item + * @param {any} select the object to add the backstage item + * @returns {void} + */ + updateBackStageItem(index: number, item?: any): void; + + /** To customize whole content from Tab Group. + * @param {number} ribbon tab index. + * @param {string} ribbon group text. + * @param {number} ribbon content index. This is optional. If the value is not given, all content groups will be removed. + * @param {number} sub group index in the ribbon group. This is optional. If the value is not given, all content groups will be removed. + * @returns {void} + */ + removeTabGroupContent(tabIndex: number, groupText: string, contentIndex?: number, subGroupIndex?: number): void; + + /** Remove option from Backstage. + * @param {number} index to the backstage item + * @returns {void} + */ + removeBackStageItem(index: number): void; + } + export namespace Ribbon { + + export interface Model { + + /** Enables the ribbon resize feature.allowResizing is a deprecated property of isResponsive. + * @Default {false} + */ + allowResizing?: boolean; + + /** When set to true, adapts the Ribbon layout to fit the screen size of devices on which it renders. + * @Default {false} + */ + isResponsive?: boolean; + + /** Specifies the height, width, enableRTL, showRoundedCorner,enabled,cssClass property to the controls in the ribbon commonly andit will work only when those properties are not + * defined in buttonSettings and content defaults. + * @Default {Object} + */ + buttonDefaults?: any; + + /** Property to enable the ribbon quick access toolbar. + * @Default {false} + */ + showQAT?: boolean; + + /** Sets the root CSS class for Ribbon which allow us to customize the appearance. + */ + cssClass?: string; + + /** Sets custom setting to the collapsible pin in the ribbon. + * @Default {Object} + */ + collapsePinSettings?: CollapsePinSettings; + + /** Set enableOnDemand as true to load ribbon tab and backstage contents while corresponding item clicked. + * @Default {false} + */ + enableOnDemand?: boolean; + + /** Set collapsible property as true to render ribbon in initially collapsed state. + * @Default {false} + */ + collapsible?: boolean; + + /** Align content in the ribbon control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /** Sets custom setting to the expandable pin in the ribbon. + * @Default {Object} + */ + expandPinSettings?: ExpandPinSettings; + + /** Specifies the application tab to contain application menu or backstage page in the ribbon control. + * @Default {Object} + */ + applicationTab?: ApplicationTab; + + /** Specifies the contextual tabs and tab set to the ribbon control with the background color and border color. Refer to the tabs section for adding tabs into the contextual tab and + * contextual tab set. + * @Default {Array} + */ + contextualTabs?: ContextualTab[]; + + /** Specifies the index or indexes to disable the given index tab or indexes tabs in the ribbon control. + * @Default {0} + */ + disabledItemIndex?: any[]; + + /** Specifies the index or indexes to enable the given index tab or indexes tabs in the ribbon control. + * @Default {null} + */ + enabledItemIndex?: any[]; + + /** Specifies the index of the ribbon tab to select the given index tab item in the ribbon control. + * @Default {1} + */ + selectedItemIndex?: number; + + /** Specifies the tabs and its groups. Also specifies the control details that has to be placed in the tab area in the ribbon control. + * @Default {Array} + */ + tabs?: Tab[]; + + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to + * a particular country or region and it will need to use the user's preference. + * @Default {en-US} + */ + locale?: string; + + /** Specifies the width to the ribbon control. You can set width in string or number format. + * @Default {null} + */ + width?: string|number; + + /** Triggered before the ribbon tab item is removed. + */ + beforeTabRemove?(e: BeforeTabRemoveEventArgs): void; + + /** Triggered before the ribbon control is created. + */ + create?(e: CreateEventArgs): void; + + /** Triggered before the ribbon control is destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** Triggered when the control in the group is clicked successfully. + */ + groupClick?(e: GroupClickEventArgs): void; + + /** Triggered when the group expander in the group is clicked successfully. + */ + groupExpand?(e: GroupExpandEventArgs): void; + + /** Triggered when an item in the Gallery control is clicked successfully. + */ + galleryItemClick?(e: GalleryItemClickEventArgs): void; + + /** Triggered when a tab or button in the backstage page is clicked successfully. + */ + backstageItemClick?(e: BackstageItemClickEventArgs): void; + + /** Triggered when the ribbon control is collapsed. + */ + collapse?(e: CollapseEventArgs): void; + + /** Triggered when the ribbon control is expanded. + */ + expand?(e: ExpandEventArgs): void; + + /** Triggered before the ribbon control is load. + */ + load?(e: LoadEventArgs): void; + + /** Triggered after adding the new ribbon tab item. + */ + tabAdd?(e: TabAddEventArgs): void; + + /** Triggered when tab is clicked successfully in the ribbon control. + */ + tabClick?(e: TabClickEventArgs): void; + + /** Triggered before the ribbon tab is created. + */ + tabCreate?(e: TabCreateEventArgs): void; + + /** Triggered after the tab item is removed from the ribbon control. + */ + tabRemove?(e: TabRemoveEventArgs): void; + + /** Triggered after the ribbon tab item is selected in the ribbon control. + */ + tabSelect?(e: TabSelectEventArgs): void; + + /** Triggered when the expand/collapse button is clicked successfully . + */ + toggleButtonClick?(e: ToggleButtonClickEventArgs): void; + + /** Triggered when the QAT menu item is clicked successfully . + */ + qatMenuItemClick?(e: QatMenuItemClickEventArgs): void; + } - /** Fires when focused in mask edit textbox control. */ - focusIn?(e: FocusInEventArgs): void; - - /** Fires when focused out in mask edit textbox control. */ - focusOut?(e: FocusOutEventArgs): void; + export interface BeforeTabRemoveEventArgs { - /** Fires when keydown in mask edit textbox control. */ - keydown?(e: KeydownEventArgs): void; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Fires when key press in mask edit textbox control. */ - keyPress?(e: KeyPressEventArgs): void; + /** returns the ribbon model. + */ + model?: any; - /** Fires when keyup in mask edit textbox control. */ - keyup?(e: KeyupEventArgs): void; + /** returns the name of the event. + */ + type?: string; - /** Fires when mouse out in mask edit textbox control. */ - mouseOut?(e: MouseOutEventArgs): void; + /** returns current tab item index in the ribbon control. + */ + index?: number; + } - /** Fires when mouse over in mask edit textbox control. */ - mouseOver?(e: MouseOverEventArgs): void; - } + export interface CreateEventArgs { - export interface ChangeEventArgs { + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the ribbon model. + */ + model?: any; - /** returns the mask edit model - */ - model?: ej.MaskEdit.Model; + /** returns the name of the event. + */ + type?: string; + } - /** returns the name of the event - */ - type?: string; + export interface DestroyEventArgs { - /** returns the mask edit value - */ - value?: number; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns unstripped value in mask edit textbox control. - */ - unmaskedValue?: string; - } + /** returns the ribbon model. + */ + model?: any; - export interface CreateEventArgs { + /** returns the name of the event. + */ + type?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns current ribbon tab item index + */ + deleteIndex?: number; + } - /** returns the MaskEdit model - */ - model?: ej.MaskEdit.Model; + export interface GroupClickEventArgs { - /** returns the name of the event - */ - type?: string; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface DestroyEventArgs { + /** returns the ribbon model. + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; - /** returns the MaskEdit model - */ - model?: ej.MaskEdit.Model; + /** returns the control clicked in the group. + */ + target?: number; + } - /** returns the name of the event - */ - type?: string; - } + export interface GroupExpandEventArgs { - export interface FocusInEventArgs { + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the ribbon model. + */ + model?: any; - /** returns the mask edit model - */ - model?: ej.MaskEdit.Model; + /** returns the name of the event. + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** returns the clicked group expander. + */ + target?: number; + } - /** returns the mask edit value - */ - value?: number; + export interface GalleryItemClickEventArgs { - /** returns unstripped value in mask edit textbox control. - */ - unmaskedValue?: string; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface FocusOutEventArgs { + /** returns the ribbon model. + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the gallery model. + */ + galleryModel?: any; - /** returns the mask edit model - */ - model?: ej.MaskEdit.Model; + /** returns the name of the event. + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** returns the item clicked in the gallery. + */ + target?: number; + } - /** returns the mask edit value - */ - value?: number; + export interface BackstageItemClickEventArgs { - /** returns unstripped value in mask edit textbox control. - */ - unmaskedValue?: string; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface KeydownEventArgs { + /** returns the ribbon model. + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; - /** returns the mask edit model - */ - model?: ej.MaskEdit.Model; + /** returns the item clicked in the gallery. + */ + target?: number; - /** returns the name of the event - */ - type?: string; + /** returns the id of the target item. + */ + id?: string; - /** returns the mask edit value - */ - value?: number; + /** returns the text of the target item. + */ + text?: string; + } - /** returns unstripped value in mask edit textbox control. - */ - unmaskedValue?: string; - } + export interface CollapseEventArgs { - export interface KeyPressEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the mask edit model - */ - model?: ej.MaskEdit.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the mask edit value - */ - value?: number; - - /** returns unstripped value in mask edit textbox control. - */ - unmaskedValue?: string; - } - - export interface KeyupEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the mask edit model - */ - model?: ej.MaskEdit.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the mask edit value - */ - value?: number; - - /** returns unstripped value in mask edit textbox control. - */ - unmaskedValue?: string; - } - - export interface MouseOutEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the mask edit model - */ - model?: ej.MaskEdit.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the mask edit value - */ - value?: number; - - /** returns unstripped value in mask edit textbox control. - */ - unmaskedValue?: string; - } - - export interface MouseOverEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the mask edit model - */ - model?: ej.MaskEdit.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the mask edit value - */ - value?: number; - - /** returns unstripped value in mask edit textbox control. - */ - unmaskedValue?: string; - } - } - enum InputMode { - //string - Password, - //string - Text, - } - enum TextAlign { - //string - Center, - //string - Justify, - //string - Left, - //string - Right, - } - - class Menu extends ej.Widget { - static fn: Menu; - constructor(element: JQuery | Element, options?: Menu.Model); - static Locale: any; - model: Menu.Model; - defaults: Menu.Model; - - /** Disables the Menu control. - * @returns {void} - */ - disable(): void; - - /** Specifies the Menu Item to be disabled by using the Menu Item Text. - * @param {string} Specifies the Menu Item Text to be disabled. - * @returns {void} - */ - disableItem(itemtext: string): void; - - /** Specifies the Menu Item to be disabled by using the Menu Item Id. - * @param {string|number} Specifies the Menu Item id to be disabled - * @returns {void} - */ - disableItemByID(itemid: string | number): void; - - /** Enables the Menu control. - * @returns {void} - */ - enable(): void; - - /** Specifies the Menu Item to be enabled by using the Menu Item Text. - * @param {string} Specifies the Menu Item Text to be enabled. - * @returns {void} - */ - enableItem(itemtext: string): void; - - /** Specifies the Menu Item to be enabled by using the Menu Item Id. - * @param {string|number} Specifies the Menu Item id to be enabled. - * @returns {void} - */ - enableItemByID(itemid: string | number): void; - - /** Hides the Context Menu control. - * @returns {void} - */ - hide(): void; - - /** Hides the specific items in Menu control. - * @returns {void} - */ - hideItems(): void; - - /** Insert the menu item as child of target node. - * @param {any} Information about Menu item. - * @param {string|any} Selector of target node or Object of target node. - * @returns {void} - */ - insert(item: any, target: string | any): void; - - /** Insert the menu item after the target node. - * @param {any} Information about Menu item. - * @param {string|any} Selector of target node or Object of target node. - * @returns {void} - */ - insertAfter(item: any, target: string | any): void; - - /** Insert the menu item before the target node. - * @param {any} Information about Menu item. - * @param {string|any} Selector of target node or Object of target node. - * @returns {void} - */ - insertBefore(item: any, target: string | any): void; - - /** Remove Menu item. - * @param {any|Array} Selector of target node or Object of target node. - * @returns {void} - */ - remove(target: any | any[]): void; - - /** To show the Menu control. - * @param {number} x co-ordinate position of context menu. - * @param {number} y co-ordinate position of context menu. - * @param {any} target element - * @param {any} name of the event - * @returns {void} - */ - show(locationX: number, locationY: number, targetElement: any, event: any): void; - - /** Show the specific items in Menu control. - * @returns {void} - */ - showItems(): void; - } - export namespace Menu { - - export interface Model { - - /** To enable or disable the Animation while hover or click an menu items.See AnimationType - * @Default {ej.AnimationType.Default} - */ - animationType?: ej.AnimationType | string; - - /** Specifies the target id of context menu. On right clicking the specified contextTarget element, context menu gets shown. - * @Default {null} - */ - contextMenuTarget?: string; - - /** Specify the CSS class to achieve custom theme. - */ - cssClass?: string; - - /** To enable or disable the Animation effect while hover or click an menu items. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Specifies the root menu items to be aligned center in horizontal menu. - * @Default {false} - */ - enableCenterAlign?: boolean; - - /** Enable / Disable the Menu control. - * @Default {true} - */ - enabled?: boolean; - - /** Specifies the menu items to be displayed in right to left direction. - * @Default {false} - */ - enableRTL?: boolean; - - /** When this property sets to false, the menu items is displayed without any separators. - * @Default {true} - */ - enableSeparator?: boolean; - - /** Specifies the target which needs to be excluded. i.e., The context menu will not be displayed in those specified targets. - * @Default {null} - */ - excludeTarget?: string; - - /** Fields used to bind the data source and it includes following field members to make data bind easier. - * @Default {null} - */ - fields?: Fields; - - /** Specifies the height of the root menu. - * @Default {auto} - */ - height?: string | number; - - /** Specifies the list of HTML attributes to be added to menu control. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Enables/disables responsive support for the Menu control during the window resizing time. - * @Default {true} - */ - isResponsive?: boolean; - - /** Specifies the type of the menu. Essential JavaScript Menu consists of two type of menu, they are Normal Menu and Context Menu mode.See MenuType - * @Default {ej.MenuType.NormalMenu} - */ - menuType?: string | ej.MenuType; - - /** Specifies the sub menu items to be show or open only on click. - * @Default {false} - */ - openOnClick?: boolean; - - /** Specifies the orientation of normal menu. Normal menu can rendered in horizontal or vertical direction by using this API. See Orientation - * @Default {ej.Orientation.Horizontal} - */ - orientation?: ej.Orientation | string; - - /** Specifies the main menu items arrows only to be shown if it contains child items. - * @Default {true} - */ - showRootLevelArrows?: boolean; - - /** Specifies the sub menu items arrows only to be shown if it contains child items. - * @Default {true} - */ - showSubLevelArrows?: boolean; - - /** Specifies position of pull down submenu that will appear on mouse over.See Direction - * @Default {ej.Direction.Right} - */ - subMenuDirection?: string | ej.Direction; - - /** Specifies the title to responsive menu. - * @Default {Menu} - */ - titleText?: string; - - /** Specifies the width of the main menu. - * @Default {auto} - */ - width?: string | number; - - /** Specifies the popup menu height. - * @Default {auto} - */ - overflowHeight?: string | number; - - /** Specifies the popup menu width. - * @Default {auto} - */ - overflowWidth?: string | number; - - /** Fires before context menu gets open. */ - beforeOpen?(e: BeforeOpenEventArgs): void; - - /** Fires when mouse click on menu items. */ - click?(e: ClickEventArgs): void; - - /** Fire when context menu on close. */ - close?(e: CloseEventArgs): void; - - /** Fires when context menu on open. */ - open?(e: OpenEventArgs): void; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Fires to create menu items. */ - create?(e: CreateEventArgs): void; + /** returns the ribbon model. + */ + model?: any; - /** Fires to destroy menu items. */ - destroy?(e: DestroyEventArgs): void; + /** returns the name of the event. + */ + type?: string; + } - /** Fires when key down on menu items. */ - keydown?(e: KeydownEventArgs): void; + export interface ExpandEventArgs { - /** Fires when mouse out from menu items. */ - mouseout?(e: MouseoutEventArgs): void; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** Fires when mouse over the Menu items. */ - mouseover?(e: MouseoverEventArgs): void; + /** returns the ribbon model. + */ + model?: any; - /** Fires when overflow popup menu opens. */ - overflowOpen?(e: OverflowOpenEventArgs): void; + /** returns the name of the event. + */ + type?: string; + } - /** Fires when overflow popup menu closes. */ - overflowClose?(e: OverflowCloseEventArgs): void; - } + export interface LoadEventArgs { - export interface BeforeOpenEventArgs { + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the ribbon model. + */ + model?: any; - /** returns the menu model - */ - model?: ej.Menu.Model; + /** returns the name of the event. + */ + type?: string; + } - /** returns the name of the event - */ - type?: string; + export interface TabAddEventArgs { - /** returns the target element - */ - target?: any; - } + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - export interface ClickEventArgs { + /** returns the ribbon model. + */ + model?: any; - /** returns the menu model - */ - model?: ej.Menu.Model; + /** returns the name of the event. + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** returns new added tab header. + */ + tabHeader?: any; - /** returns clicked menu item text - */ - text?: string; + /** returns new added tab content panel. + */ + tabContent?: any; + } - /** returns clicked menu item element - */ - element?: any; + export interface TabClickEventArgs { - /** returns the event - */ - event?: any; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the selected item - */ - selectedItem?: number; - } + /** returns the ribbon model. + */ + model?: any; - export interface CloseEventArgs { + /** returns the name of the event. + */ + type?: string; - /** returns the menu model - */ - model?: ej.Menu.Model; + /** returns previous active tab header. + */ + prevActiveHeader?: any; - /** returns the name of the event - */ - type?: string; + /** returns previous active index. + */ + prevActiveIndex?: number; - /** returns the target element - */ - target?: any; - } + /** returns current active tab header . + */ + activeHeader?: any; - export interface OpenEventArgs { + /** returns current active index. + */ + activeIndex?: number; + } - /** returns the menu model - */ - model?: ej.Menu.Model; + export interface TabCreateEventArgs { - /** returns the name of the event - */ - type?: string; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the target element - */ - target?: any; - } + /** returns the ribbon model. + */ + model?: any; - export interface CreateEventArgs { + /** returns the name of the event. + */ + type?: string; - /** returns the menu model - */ - model?: ej.Menu.Model; + /** returns current ribbon tab item index + */ + deleteIndex?: number; + } - /** returns the name of the event - */ - type?: string; - } + export interface TabRemoveEventArgs { - export interface DestroyEventArgs { + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the menu model - */ - model?: ej.Menu.Model; + /** returns the ribbon model. + */ + model?: any; - /** returns the name of the event - */ - type?: string; - } + /** returns the name of the event. + */ + type?: string; - export interface KeydownEventArgs { + /** returns the removed index. + */ + removedIndex?: number; + } - /** returns the menu model - */ - model?: ej.Menu.Model; + export interface TabSelectEventArgs { - /** returns the name of the event - */ - type?: string; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns clicked menu item text - */ - menuText?: string; + /** returns the ribbon model. + */ + model?: any; - /** returns clicked menu item element - */ - element?: any; + /** returns the name of the event. + */ + type?: string; - /** returns the event - */ - event?: any; - } + /** returns previous active tab header. + */ + prevActiveHeader?: any; - export interface MouseoutEventArgs { + /** returns previous active index. + */ + prevActiveIndex?: number; - /** returns the menu model - */ - model?: ej.Menu.Model; + /** returns current active tab header . + */ + activeHeader?: any; - /** returns the name of the event - */ - type?: string; + /** returns current active index. + */ + activeIndex?: number; + } - /** returns clicked menu item text - */ - text?: string; + export interface ToggleButtonClickEventArgs { - /** returns clicked menu item element - */ - element?: any; + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; - /** returns the event - */ - event?: any; - } + /** returns the ribbon model. + */ + model?: any; - export interface MouseoverEventArgs { + /** returns the name of the event. + */ + type?: string; + + /** returns the expand/collapse button. + */ + target?: number; + } + + export interface QatMenuItemClickEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the ribbon model. + */ + model?: any; + + /** returns the name of the event. + */ + type?: string; + + /** returns the clicked menu item text. + */ + text?: string; + } + + export interface CollapsePinSettings { + + /** Sets tooltip for the collapse pin . + * @Default {null} + */ + toolTip?: string; + + /** Specifies the custom tooltip for collapse pin.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; + } + + export interface ExpandPinSettings { + + /** Sets tooltip for the expand pin. + * @Default {null} + */ + toolTip?: string; + + /** Specifies the custom tooltip for expand pin.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; + } + + export interface ApplicationTabBackstageSettingsPage { + + /** Specifies the id for ribbon backstage page's tab and button elements. + * @Default {null} + */ + id?: string; + + /** Specifies the text for ribbon backstage page's tab header and button elements. + * @Default {null} + */ + text?: string; + + /** Specifies the type for ribbon backstage page's contents. Set "ej.Ribbon.BackStageItemType.Tab" to render the tab or "ej.Ribbon.BackStageItemType.Button" to + * render the button. + * @Default {ej.Ribbon.ItemType.Tab} + */ + itemType?: ej.Ribbon.ItemType|string; + + /** Specifies the id of HTML elements like div,ul, etc., as ribbon backstage page's tab content. + * @Default {null} + */ + contentID?: string; + + /** Specifies the separator between backstage page's tab and button elements. + * @Default {false} + */ + enableSeparator?: boolean; + } + + export interface ApplicationTabBackstageSettings { + + /** Specifies the display text of application tab. + * @Default {null} + */ + text?: string; + + /** Specifies the height of ribbon backstage page. + * @Default {null} + */ + height?: string|number; + + /** Specifies the width of ribbon backstage page. + * @Default {null} + */ + width?: string|number; + + /** Specifies the ribbon backstage page with its tab and button elements. + * @Default {Array} + */ + pages?: ApplicationTabBackstageSettingsPage[]; + + /** Specifies the width of backstage page header that contains tabs and buttons. + * @Default {null} + */ + headerWidth?: string|number; + } + + export interface ApplicationTab { + + /** Specifies the ribbon backstage page items. + * @Default {Object} + */ + backstageSettings?: ApplicationTabBackstageSettings; + + /** Specifies the ID of ul list to create application menu in the ribbon control. + * @Default {null} + */ + menuItemID?: string; + + /** Specifies the menu members, events by using the menu settings for the menu in the application tab. + * @Default {Object} + */ + menuSettings?: any; + + /** Specifies the application menu or backstage page. Specify the type of application tab as "ej.Ribbon.ApplicationTabType.Menu" to render the application menu or + * "ej.Ribbon.ApplicationTabType.Backstage" to render backstage page in the ribbon control. + * @Default {ej.Ribbon.ApplicationTabType.Menu} + */ + type?: ej.Ribbon.ApplicationTabType|string; + } + + export interface ContextualTab { + + /** Specifies the backgroundColor of the contextual tabs and tab set in the ribbon control. + * @Default {null} + */ + backgroundColor?: string; + + /** Specifies the borderColor of the contextual tabs and tab set in the ribbon control. + * @Default {null} + */ + borderColor?: string; + + /** Specifies the tabs to present in the contextual tabs and tab set. Refer to the tabs section for adding tabs into the contextual tabs and tab set. + * @Default {Array} + */ + tabs?: any[]; + } + + export interface TabsGroupsContentDefaults { + + /** Specifies the controls height such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. + * @Default {null} + */ + height?: string|number; + + /** Specifies the controls width such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. + * @Default {null} + */ + width?: string|number; + + /** Specifies the controls type such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. + * @Default {ej.Ribbon.Type.Button} + */ + type?: string; + + /** Specifies the controls size such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. + * @Default {false} + */ + isBig?: boolean; + } + + export interface TabsGroupsContentGroupsCustomGalleryItem { + + /** Specifies the Syncfusion button members, events by using buttonSettings. + * @Default {Object} + */ + buttonSettings?: any; + + /** Specifies the type as ej.Ribbon.CustomItemType.Menu or ej.Ribbon.CustomItemType.Button to render Syncfusion button and menu. + * @Default {ej.Ribbon.CustomItemType.Button} + */ + customItemType?: ej.Ribbon.CustomItemType|string; + + /** Specifies the custom tooltip for gallery extra item's button. Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; + + /** Specifies the UL list id to render menu as gallery extra item. + * @Default {null} + */ + menuId?: string; + + /** Specifies the Syncfusion menu members, events by using menuSettings. + * @Default {Object} + */ + menuSettings?: any; + + /** Specifies the text for gallery extra item's button. + * @Default {null} + */ + text?: string; + + /** Specifies the tooltip for gallery extra item's button. + * @Default {null} + */ + toolTip?: string; + } + + export interface TabsGroupsContentGroupsCustomToolTip { + + /** Sets content to the custom tooltip. Text and HTML support are provided for content. + * @Default {null} + */ + content?: string; + + /** Sets icon to the custom tooltip content. + * @Default {null} + */ + prefixIcon?: string; + + /** Sets title to the custom tooltip. Text and HTML support are provided for title and the title is in bold for text format. + * @Default {null} + */ + title?: string; + } + + export interface TabsGroupsContentGroupsGalleryItem { + + /** Specifies the Syncfusion button members, events by using buttonSettings. + * @Default {Object} + */ + buttonSettings?: any; + + /** Specifies the custom tooltip for gallery content. Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; + + /** Sets text for the gallery content. + * @Default {null} + */ + text?: string; + + /** Sets tooltip for the gallery content. + * @Default {null} + */ + toolTip?: string; + } + + export interface TabsGroupsContentGroup { + + /** When isMobileOnly is true,its shows in mobile toolbar.isResponsive should be true for using this property. + * @Default {false} + */ + isMobileOnly?: boolean; + + /** Specifies the Syncfusion button members, events by using this buttonSettings. + * @Default {Object} + */ + buttonSettings?: any; + + /** It is used to set the count of gallery contents in a row. + * @Default {null} + */ + columns?: number; + + /** Specifies the custom items such as div, table, controls as custom controls with the type "ej.Ribbon.Type.Custom" in the groups. + * @Default {null} + */ + contentID?: string; + + /** Specifies the CSS class property to apply styles to the button, split, dropdown controls in the groups. + * @Default {null} + */ + cssClass?: string; + + /** Specifies the Syncfusion button and menu as gallery extra items. + * @Default {Array} + */ + customGalleryItems?: TabsGroupsContentGroupsCustomGalleryItem[]; + + /** Provides custom tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. Text and HTML support are also provided for title and content. + * @Default {Object} + */ + customToolTip?: TabsGroupsContentGroupsCustomToolTip; + + /** Specifies the Syncfusion dropdown list members, events by using this dropdownSettings. + * @Default {Object} + */ + dropdownSettings?: any; + + /** Specifies the separator to the control that is in row type group. The separator separates the control from the next control in the group. Set "true" to enable the + * separator. + * @Default {false} + */ + enableSeparator?: boolean; + + /** Sets the count of gallery contents in a row, when the gallery is in expanded state. + * @Default {null} + */ + expandedColumns?: number; + + /** Defines each gallery content. + * @Default {Array} + */ + galleryItems?: TabsGroupsContentGroupsGalleryItem[]; + + /** Specifies the Id for button, split button, dropdown list, toggle button, gallery, custom controls in the sub groups. + * @Default {null} + */ + id?: string; + + /** Specifies the size for button, split button controls. Set "true" for big size and "false" for small size. + * @Default {null} + */ + isBig?: boolean; + + /** Sets the height of each gallery content. + * @Default {null} + */ + itemHeight?: string|number; + + /** Sets the width of each gallery content. + * @Default {null} + */ + itemWidth?: string|number; + + /** Specifies the Syncfusion split button members, events by using this splitButtonSettings. + * @Default {Object} + */ + splitButtonSettings?: any; + + /** Specifies the text for button, split button, toggle button controls in the sub groups. + * @Default {null} + */ + text?: string; + + /** Specifies the Syncfusion toggle button members, events by using toggleButtonSettings. + * @Default {Object} + */ + toggleButtonSettings?: any; + + /** Specifies the tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. + * @Default {null} + */ + toolTip?: string; + + /** To add,show and hide controls in Quick Access toolbar. + * @Default {ej.Ribbon.QuickAccessMode.None} + */ + quickAccessMode?: ej.Ribbon.QuickAccessMode|string; + + /** Specifies the type as "ej.Ribbon.Type.Button" or "ej.Ribbon.Type.SplitButton" or "ej.Ribbon.Type.DropDownList" or + * "ej.Ribbon.Type.ToggleButton" or "ej.Ribbon.Type.Custom" or "ej.Ribbon.Type.Gallery" to render button, split, dropdown, toggle button, gallery, + * custom controls. + * @Default {ej.Ribbon.Type.Button} + */ + type?: ej.Ribbon.Type|string; + } + + export interface TabsGroupsContent { + + /** Specifies the height, width, type, isBig property to the controls in the group commonly. + * @Default {Object} + */ + defaults?: TabsGroupsContentDefaults; + + /** Specifies the controls such as Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls in the subgroup of the ribbon tab . + * @Default {Array} + */ + groups?: TabsGroupsContentGroup[]; + } + + export interface TabsGroupsGroupExpanderSettings { + + /** Sets tooltip for the group expander of the group. + * @Default {null} + */ + toolTip?: string; + + /** Specifies the custom tooltip for group expander.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; + } + + export interface TabsGroup { + + /** Specifies the alignment of controls in the groups in 'row' type or 'column' type. Value for row type is "ej.Ribbon.AlignType.Rows" and for column type is + * "ej.Ribbon.alignType.columns". + * @Default {ej.Ribbon.AlignType.Rows} + */ + alignType?: ej.Ribbon.AlignType|string; - /** returns the menu model - */ - model?: ej.Menu.Model; + /** Specifies the Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls to the groups in the ribbon control. + * @Default {Array} + */ + content?: TabsGroupsContent[]; - /** returns the name of the event - */ - type?: string; + /** Specifies the ID of custom items to be placed in the groups. + * @Default {null} + */ + contentID?: string; - /** returns clicked menu item text - */ - text?: string; + /** Specifies the HTML contents to place into the groups. + * @Default {null} + */ + customContent?: string; - /** returns clicked menu item element - */ - element?: any; + /** Specifies the group expander for groups in the ribbon control. Set "true" to enable the group expander. + * @Default {false} + */ + enableGroupExpander?: boolean; - /** returns the event - */ - event?: any; - } + /** Sets custom setting to the groups in the ribbon control. + * @Default {Object} + */ + groupExpanderSettings?: TabsGroupsGroupExpanderSettings; - export interface OverflowOpenEventArgs { - - /** returns the menu model - */ - model?: ej.Menu.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the event object - */ - e?: any; - - /** if the event should be cancelled ; otherwise ,false - */ - cancel?: boolean; - } - - export interface OverflowCloseEventArgs { - - /** returns the menu model - */ - model?: ej.Menu.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the event object - */ - e?: any; - - /** if the event should be cancelled ; otherwise ,false - */ - cancel?: boolean; - } - - export interface Fields { - - /** It receives the child data for the inner level. - */ - child?: any; - - /** It receives datasource as Essential DataManager object and JSON object. - */ - dataSource?: any; - - /** Specifies the HTML attributes to “LI” item list. - */ - htmlAttribute?: string; - - /** Specifies the id to menu items list - */ - id?: string; - - /** Specifies the image attribute to “img” tag inside items list. - */ - imageAttribute?: string; - - /** Specifies the image URL to “img” tag inside item list. - */ - imageUrl?: string; - - /** Adds custom attributes like "target" to the anchor tag of the menu items. - */ - linkAttribute?: string; - - /** Specifies the parent id of the table. - */ - parentId?: string; - - /** It receives query to retrieve data from the table (query is same as SQL). - */ - query?: any; - - /** Specifies the sprite CSS class to “LI” item list. - */ - spriteCssClass?: string; - - /** It receives table name to execute query on the corresponding table. - */ - tableName?: string; - - /** Specifies the text of menu items list. - */ - text?: string; - - /** Specifies the URL to the anchor tag in menu item list. - */ - url?: string; - } - } - enum AnimationType { - //string - Default, - //string - None, - } - enum MenuType { - //string - ContextMenu, - //string - NormalMenu, - } - enum Direction { - //string - Left, - //string - None, - //string - Right, - } - - class Pager extends ej.Widget { - static fn: Pager; - constructor(element: JQuery | Element, options?: Pager.Model); - static Locale: any; - model: Pager.Model; - defaults: Pager.Model; - - /** Send a paging request to specified page through the pager control. - * @param {number} Specifies the index to be navigated - * @returns {void} - */ - gotoPage(pageIndex: number): void; - - /** refreshPager() helps to refresh the model value of pager control. - * @returns {void} - */ - refreshPager(): void; - } - export namespace Pager { - - export interface Model { - - /** Gets or sets a value that indicates whether to display the custom text message in Pager. - */ - customText?: string; - - /** Gets or sets a value that indicates whether to define which page to display currently in pager. - * @Default {1} - */ - currentPage?: number; - - /** Gets or sets a value that indicates whether to display the external Message in Pager. - * @Default {false} - */ - enableExternalMessage?: boolean; - - /** Gets or sets a value that indicates whether to pass the current page information as a query string along with the URL while navigating to other page. - * @Default {false} - */ - enableQueryString?: boolean; - - /** Align content in the pager control from right to left by setting the property as true. - * @Default {false} - */ - enableRTL?: boolean; - - /** Gets or sets a value that indicates whether to display the external Message in Pager. - */ - externalMessage?: string; - - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. - * in a language and culture specific to a particular country or region. - * @Default {en-US} - */ - locale?: string; - - /** Gets or sets a value that indicates whether to define the number of pages displayed in the pager for navigation. - * @Default {10} - */ - pageCount?: number; - - /** Gets or sets a value that indicates whether to define the number of records displayed per page. - * @Default {12} - */ - pageSize?: number; - - /** Get or sets a value of total number of pages in the pager. The totalPages value is calculated based on page size and total records. - * @Default {null} - */ - totalPages?: number; - - /** Get the value of total number of records which is bound to a data item. - * @Default {null} - */ - totalRecordsCount?: number; - - /** Shows or hides the current page information in pager footer. - * @Default {true} - */ - showPageInfo?: boolean; - - /** Triggered when pager numeric item is clicked in pager control. */ - click?(e: ClickEventArgs): void; - } - - export interface ClickEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the current page index. - */ - currentPage?: number; - - /** Returns the pager model. - */ - model?: any; - - /** Returns the name of event - */ - type?: string; - - /** Returns current action event type and its target. - */ - event?: any; - } - } - - class Print extends ej.Widget { - static fn: Print; - constructor(element: JQuery | Element, options?: Print.Model); - static Locale: any; - model: Print.Model; - defaults: Print.Model; - - /** Print the specific page or an element. - * @returns {void} - */ - print(): void; - } - - export namespace Print { - - export interface Model { - - /** Append the custom HTML after the selected content. - * @Default {null} - */ - append?: string; - - /** A selector that specifies a particular element to be excluded from printing. - * @Default {null} - */ - excludeSelector?: string; - - /** Specifies whether the URL of an external stylesheet can be included to customize and print that page. - * @Default {null} - */ - externalStyles?: string; - - /** Prepend a doctype to the document frame. - * @Default {<!doctype html>} - */ - docType?: string; - - /** Specifies whether the global styles can be applied to the element to be printed. - * @Default {true} - */ - globalStyles?: boolean; - - /** Sets the height of the print window. - * @Default {454} - */ - height?: number; - - /** Prepends the custom HTML before the selected content. - * @Default {null} - */ - prepend?: string; - - /** Allows printing the content in a new window. - * @Default {false} - */ - printInNewWindow?: boolean; - - /** Sets the period of time to wait before printing the content. - * @Default {1000} - */ - timeOutPeriod?: number; - - /** Sets the title of the print document. - * @Default {null} - */ - title?: string; - - /** Defines the width of the print window. - * @Default {1024} - */ - width?: number; - - /** Event triggers before the document page or an element in it gets printed. */ - beforeStart?(e: BeforeStartEventArgs): void; - } - - export interface BeforeStartEventArgs { - - /** Set this option as true to cancel the event. - */ - cancel?: boolean; - - /** Returns the Print model - */ - model?: ej.Print.Model; - - /** Returns the name of an event - */ - type?: string; - - /** Returns the printed element - */ - content?: any; - } - } - - class ProgressBar extends ej.Widget { - static fn: ProgressBar; - constructor(element: JQuery | Element, options?: ProgressBar.Model); - static Locale: any; - model: ProgressBar.Model; - defaults: ProgressBar.Model; - - /** Destroy the progressbar widget - * @returns {void} - */ - destroy(): void; - - /** Disables the progressbar control - * @returns {void} - */ - disable(): void; - - /** Enables the progressbar control - * @returns {void} - */ - enable(): void; - - /** Returns the current progress value in percent. - * @returns {number} - */ - getPercentage(): number; - - /** Returns the current progress value - * @returns {number} - */ - getValue(): number; - } - export namespace ProgressBar { - - export interface Model { - - /** Sets the root CSS class for ProgressBar theme, which is used customize. - * @Default {null} - */ - cssClass?: string; - - /** When this property sets to false, it disables the ProgressBar control - * @Default {true} - */ - enabled?: boolean; - - /** Save current model value to browser cookies for state maintains. While refresh the progressBar control page retains the model value apply from browser cookies - * @Default {false} - */ - enablePersistence?: boolean; - - /** Sets the ProgressBar direction as right to left alignment. - * @Default {false} - */ - enableRTL?: boolean; - - /** Defines the height of the ProgressBar. - * @Default {null} - */ - height?: number | string; - - /** It allows to define the characteristics of the progressBar control. It will helps to extend the capability of an HTML element. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Sets the maximum value of the ProgressBar. - * @Default {100} - */ - maxValue?: number; - - /** Sets the minimum value of the ProgressBar. - * @Default {0} - */ - minValue?: number; - - /** Sets the ProgressBar value in percentage. The value should be in between 0 to 100. - * @Default {0} - */ - percentage?: number; - - /** Displays rounded corner borders on the progressBar control. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Sets the custom text for the ProgressBar. The text placed in the middle of the ProgressBar and it can be customizable using the class 'e-progress-text'. - * @Default {null} - */ - text?: string; - - /** Sets the ProgressBar value. The value should be in between min and max values. - * @Default {0} - */ - value?: number; - - /** Defines the width of the ProgressBar. - * @Default {null} - */ - width?: number | string; - - /** Event triggers when the progress value changed */ - change?(e: ChangeEventArgs): void; - - /** Event triggers when the process completes (at 100%) */ - complete?(e: CompleteEventArgs): void; - - /** Event triggers when the progressbar are created */ - create?(e: CreateEventArgs): void; - - /** Event triggers when the progressbar are destroyed */ - destroy?(e: DestroyEventArgs): void; - - /** Event triggers when the process starts (from 0%) */ - start?(e: StartEventArgs): void; - } - - export interface ChangeEventArgs { - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the ProgressBar model - */ - model?: ej.ProgressBar.Model; - - /** returns the current progress percentage - */ - percentage?: any; - - /** returns the name of the event - */ - type?: string; - - /** returns the current progress value - */ - value?: string; - } - - export interface CompleteEventArgs { - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the ProgressBar model - */ - model?: ej.ProgressBar.Model; - - /** returns the current progress percentage - */ - percentage?: any; - - /** returns the name of the event - */ - type?: string; - - /** returns the current progress value - */ - value?: string; - } - - export interface CreateEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the progressbar model - */ - model?: ej.ProgressBar.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the progressbar model - */ - model?: ej.ProgressBar.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface StartEventArgs { - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the ProgressBar model - */ - model?: ej.ProgressBar.Model; - - /** returns the current progress percentage - */ - percentage?: any; - - /** returns the name of the event - */ - type?: string; - - /** returns the current progress value - */ - value?: string; - } - } - - class RadioButton extends ej.Widget { - static fn: RadioButton; - constructor(element: JQuery | Element, options?: RadioButton.Model); - static Locale: any; - model: RadioButton.Model; - defaults: RadioButton.Model; - - /** To disable the RadioButton - * @returns {void} - */ - disable(): void; - - /** To enable the RadioButton - * @returns {void} - */ - enable(): void; - } - export namespace RadioButton { - - export interface Model { - - /** Specifies the check attribute of the Radio Button. - * @Default {false} - */ - checked?: boolean; - - /** Specify the CSS class to RadioButton to achieve custom theme. - */ - cssClass?: string; - - /** Specifies the RadioButton control state. - * @Default {true} - */ - enabled?: boolean; - - /** Specifies the enablePersistence property for RadioButton while initialization. The enablePersistence API save current model value to browser cookies for state maintains. - * While refreshing the radio button control page the model value apply from browser cookies. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Specify the Right to Left direction to RadioButton - * @Default {false} - */ - enableRTL?: boolean; - - /** Specifies the HTML Attributes of the Checkbox - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specifies the id attribute for the Radio Button while initialization. - * @Default {null} - */ - id?: string; - - /** Specify the idPrefix value to be added before the current id of the RadioButton. - * @Default {ej} - */ - idPrefix?: string; - - /** Specifies the name attribute for the Radio Button while initialization. - * @Default {Sets id as name if it is null} - */ - name?: string; - - /** Specifies the size of the RadioButton. - * @Default {small} - */ - size?: ej.RadioButtonSize | string; - - /** Specifies the text content for RadioButton. - */ - text?: string; - - /** Set the jQuery validation error message in radio button. - * @Default {null} - */ - validationMessage?: any; - - /** Set the jQuery validation rules in radio button. - * @Default {null} - */ - validationRules?: any; - - /** Specifies the value attribute of the Radio Button. - * @Default {null} - */ - value?: string; - - /** Fires before the RadioButton is going to changed its state successfully */ - beforeChange?(e: BeforeChangeEventArgs): void; - - /** Fires when the RadioButton state is changed successfully */ - change?(e: ChangeEventArgs): void; - - /** Fires when the RadioButton created successfully */ - create?(e: CreateEventArgs): void; - - /** Fires when the RadioButton destroyed successfully */ - destroy?(e: DestroyEventArgs): void; - } - - export interface BeforeChangeEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the RadioButton model - */ - model?: ej.RadioButton.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns true if element is checked, otherwise returns false - */ - isChecked?: boolean; - - /** returns true if change event triggered by interaction, otherwise returns false - */ - isInteraction?: boolean; - } - - export interface ChangeEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the RadioButton model - */ - model?: ej.RadioButton.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns true if element is checked, otherwise returns false - */ - isChecked?: boolean; - - /** returns true if change event triggered by interaction, otherwise returns false - */ - isInteraction?: boolean; - } - - export interface CreateEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the RadioButton model - */ - model?: ej.RadioButton.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the RadioButton model - */ - model?: ej.RadioButton.Model; - - /** returns the name of the event - */ - type?: string; - } - } - enum RadioButtonSize { - //Shows small size radio button - Small, - //Shows medium size radio button - Medium, - } - - class Rating extends ej.Widget { - static fn: Rating; - constructor(element: JQuery | Element, options?: Rating.Model); - static Locale: any; - model: Rating.Model; - defaults: Rating.Model; - - /** Destroy the Rating widget all events bound will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** To get the current value of rating control. - * @returns {number} - */ - getValue(): number; - - /** To hide the rating control. - * @returns {void} - */ - hide(): void; - - /** User can refresh the rating control to identify changes. - * @returns {void} - */ - refresh(): void; - - /** To reset the rating value. - * @returns {void} - */ - reset(): void; - - /** To set the rating value. - * @param {string|number} Specifies the rating value. - * @returns {void} - */ - setValue(value: string | number): void; - - /** To show the rating control - * @returns {void} - */ - show(): void; - } - export namespace Rating { - - export interface Model { - - /** Enables the rating control with reset button.It can be used to reset the rating control value. - * @Default {true} - */ - allowReset?: boolean; - - /** Specify the CSS class to achieve custom theme. - */ - cssClass?: string; - - /** When this property is set to false, it disables the rating control. - * @Default {true} - */ - enabled?: boolean; - - /** Save current model value to browser cookies for state maintenance. While refresh the page Rating control values are retained. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Specifies the height of the Rating control wrapper. - * @Default {null} - */ - height?: string; - - /** Specifies the list of HTML attributes to be added to rating control. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specifies the value to be increased while navigating between shapes(stars) in Rating control. - * @Default {1} - */ - incrementStep?: number; - - /** Allow to render the maximum number of Rating shape(star). - * @Default {5} - */ - maxValue?: number; - - /** Allow to render the minimum number of Rating shape(star). - * @Default {0} - */ - minValue?: number; - - /** Specifies the orientation of Rating control. See Orientation - * @Default {ej.Rating.Orientation.Horizontal} - */ - orientation?: ej.Orientation | string; - - /** Helps to provide more precise ratings.Rating control supports three precision modes - full, half, and exact. See Precision - * @Default {full} - */ - precision?: ej.Rating.Precision | string; - - /** Interaction with Rating control can be prevented by enabling this API. - * @Default {false} - */ - readOnly?: boolean; - - /** To specify the height of each shape in Rating control. - * @Default {23} - */ - shapeHeight?: number; - - /** To specify the width of each shape in Rating control. - * @Default {23} - */ - shapeWidth?: number; - - /** Enables the tooltip option.Currently selected value will be displayed in tooltip. - * @Default {true} - */ - showTooltip?: boolean; - - /** To specify the number of stars to be selected while rendering. - * @Default {1} - */ - value?: number; - - /** Specifies the width of the Rating control wrapper. - * @Default {null} - */ - width?: string; - - /** Fires when Rating value changes. */ - change?(e: ChangeEventArgs): void; - - /** Fires when Rating control is clicked successfully. */ - click?(e: ClickEventArgs): void; - - /** Fires when Rating control is created. */ - create?(e: CreateEventArgs): void; - - /** Fires when Rating control is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; - - /** Fires when mouse hover is removed from Rating control. */ - mouseout?(e: MouseoutEventArgs): void; - - /** Fires when mouse hovered over the Rating control. */ - mouseover?(e: MouseoverEventArgs): void; - } - - export interface ChangeEventArgs { + /** Specifies the text to the groups in the ribbon control. + * @Default {null} + */ + text?: string; - /** returns the current value. - */ - value?: number; + /** Specifies the custom items such as div, table, controls by using the "custom" type. + * @Default {null} + */ + type?: string; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface Tab { - /** returns the rating model - */ - model?: ej.Rating.Model; + /** Specifies single group or multiple groups and its contents to each tab in the ribbon control. + * @Default {Array} + */ + groups?: TabsGroup[]; - /** returns the name of the event - */ - type?: string; + /** Specifies the ID for each tab's content panel. + * @Default {null} + */ + id?: string; - /** returns the mouse click event args values. - */ - event?: any; - } + /** Specifies the text of the tab in the ribbon control. + * @Default {null} + */ + text?: string; + } - export interface ClickEventArgs { + enum ItemType { - /** returns the current value. - */ - value?: number; + ///To render the button for ribbon backstage page’s contents + Button, - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///To render the tab for ribbon backstage page’s contents + Tab + } - /** returns the rating model - */ - model?: ej.Rating.Model; - /** returns the name of the event - */ - type?: string; + enum ApplicationTabType { - /** returns the mouse click event args values. - */ - event?: any; - } + ///applicationTab display as menu + Menu, - export interface CreateEventArgs { + ///applicationTab display as backstage + Backstage + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the rating model - */ - model?: ej.Rating.Model; + enum AlignType { - /** returns the name of the event. - */ - type?: string; - } + ///To align the group content's in row + Rows, - export interface DestroyEventArgs { + ///To align group content's in columns + Columns + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the rating model - */ - model?: ej.Rating.Model; + enum CustomItemType { - /** returns the name of the event - */ - type?: string; - } + ///Specifies the button type in customGalleryItems + Button, - export interface MouseoutEventArgs { + ///Specifies the menu type in customGalleryItems + Menu + } - /** returns the current value. - */ - value?: number; - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the rating model - */ - model?: ej.Rating.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the mouse click event args values. - */ - event?: any; - } - - export interface MouseoverEventArgs { - - /** returns the current value. - */ - value?: number; - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the rating model - */ - model?: ej.Rating.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the mouse click event args values. - */ - event?: any; - - /** returns the current index value. - */ - index?: any; - } - - enum Precision { - - ///string - Exact, - - ///string - Full, - - ///string - Half - } - - } - - class Ribbon extends ej.Widget { - static fn: Ribbon; - constructor(element: JQuery | Element, options?: Ribbon.Model); - static Locale: any; - model: Ribbon.Model; - defaults: Ribbon.Model; - - /** Adds contextual tab or contextual tab set dynamically in the ribbon control with contextual tabs object and index position. - * When index is null, ribbon contextual tab or contextual tab set is added at the last index. - * @param {any} contextual tab or contextual tab set object. - * @param {number} index of the contextual tab or contextual tab set, this is optional. - * @returns {void} - */ - addContextualTabs(contextualTabSet: any, index?: number): void; - - /** Add new option to Backstage page. - * @param {any} select the object to add the backstage item - * @param {number} index to the backstage item this is optional. - * @returns {void} - */ - addBackStageItem(item: any, index?: number): void; - - /** Adds tab dynamically in the ribbon control with given name, tab group array and index position. When index is null, ribbon tab is added at the last index. - * @param {string} ribbon tab display text. - * @param {Array} groups to be displayed in ribbon tab . - * @param {number} index of the ribbon tab,this is optional. - * @returns {void} - */ - addTab(tabText: string, ribbonGroups: any[], index?: number): void; - - /** Adds tab group dynamically in the ribbon control with given tab index, tab group object and group index position. When group index is null, ribbon group is added at the last index. - * @param {number} ribbon tab index. - * @param {any} group to be displayed in ribbon tab . - * @param {number} index of the ribbon group,this is optional. - * @returns {void} - */ - addTabGroup(tabIndex: number, tabGroup: any, groupIndex?: number): void; - - /** Adds group content dynamically in the ribbon control with given tab index, group index, sub group index, content and content index position. - * When content index is null, content is added at the last index. - * @param {number} ribbon tab index. - * @param {number} ribbon group index. - * @param {any} content to be displayed in the ribbon group. - * @param {number} ribbon content index. This is optional. If the value is not given, then by default contentIndex will be considered as 0. - * @param {number} sub group index in the ribbon group. This is optional. If the value is not given, then by default contentIndex will be considered as 0. - * @returns {void} - */ - addTabGroupContent(tabIndex: number, groupIndex: number, content: any, contentIndex?: number, subGroupIndex?: number): void; - - /** Hides the ribbon backstage page. - * @returns {void} - */ - hideBackstage(): void; - - /** Collapses the ribbon tab content. - * @returns {void} - */ - collapse(): void; - - /** Destroys the ribbon widget. All the events bound using this._on are unbound automatically and the ribbon control is moved to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** Expands the ribbon tab content. - * @returns {void} - */ - expand(): void; - - /** Gets text of the given index tab in the ribbon control. - * @param {number} index of the tab item. - * @returns {String} - */ - getTabText(index: number): string; - - /** Hides the given text tab in the ribbon control. - * @param {string} text of the tab item. - * @returns {void} - */ - hideTab(text: string): void; - - /** Checks whether the given text tab in the ribbon control is enabled or not. - * @param {string} text of the tab item. - * @returns {Boolean} - */ - isEnable(text: string): boolean; - - /** Checks whether the given text tab in the ribbon control is visible or not. - * @param {string} text of the tab item. - * @returns {Boolean} - */ - isVisible(text: string): boolean; - - /** Removes the given index tab item from the ribbon control. - * @param {number} index of tab item. - * @returns {void} - */ - removeTab(index: number): void; - - /** Sets new text to the given text tab in the ribbon control. - * @param {string} current text of the tab item. - * @param {string} new text of the tab item. - * @returns {void} - */ - setTabText(tabText: string, newText: string): void; - - /** Displays the ribbon backstage page. - * @returns {void} - */ - showBackstage(): void; - - /** Displays the given text tab in the ribbon control. - * @param {string} text of the tab item. - * @returns {void} - */ - showTab(text: string): void; - - /** To customize Group alone in the inside content. - * @param {number} ribbon tab index. - * @param {string} group id to be displayed in ribbon tab . - * @param {any} contentGroup is used in the object - * @returns {void} - */ - updateGroup(tabIndex: number, groupId: string, contentGroup?: any): void; - - /** Update option in existing Backstage. - * @param {number} index to the backstage item - * @param {any} select the object to add the backstage item - * @returns {void} - */ - updateBackStageItem(index: number, item?: any): void; - - /** To customize whole content from Tab Group. - * @param {number} ribbon tab index. - * @param {string} ribbon group text. - * @param {number} ribbon content index. This is optional. If the value is not given, all content groups will be removed. - * @param {number} sub group index in the ribbon group. This is optional. If the value is not given, all content groups will be removed. - * @returns {void} - */ - removeTabGroupContent(tabIndex: number, groupText: string, contentIndex?: number, subGroupIndex?: number): void; - - /** Remove option from Backstage. - * @param {number} index to the backstage item - * @returns {void} - */ - removeBackStageItem(index: number): void; - } - export namespace Ribbon { - - export interface Model { - - /** Enables the ribbon resize feature.allowResizing is a deprecated property of isResponsive. - * @Default {false} - */ - allowResizing?: boolean; - - /** When set to true, adapts the Ribbon layout to fit the screen size of devices on which it renders. - * @Default {false} - */ - isResponsive?: boolean; - - /** Specifies the height, width, enableRTL, showRoundedCorner,enabled,cssClass property to the controls in the ribbon commonly andit will work only when those properties - * are not defined in buttonSettings and content defaults. - * @Default {Object} - */ - buttonDefaults?: any; - - /** Property to enable the ribbon quick access toolbar. - * @Default {false} - */ - showQAT?: boolean; - - /** Sets custom setting to the collapsible pin in the ribbon. - * @Default {Object} - */ - collapsePinSettings?: CollapsePinSettings; - - /** Set enableOnDemand as true to load ribbon tab and backstage contents while corresponding item clicked. - * @Default {false} - */ - enableOnDemand?: boolean; - - /** Set collapsible property as true to render ribbon in initially collapsed state. - * @Default {false} - */ - collapsible?: boolean; - - /** Align content in the ribbon control from right to left by setting the property as true. - * @Default {false} - */ - enableRTL?: boolean; - - /** Sets custom setting to the expandable pin in the ribbon. - * @Default {Object} - */ - expandPinSettings?: ExpandPinSettings; - - /** Specifies the application tab to contain application menu or backstage page in the ribbon control. - * @Default {Object} - */ - applicationTab?: ApplicationTab; - - /** Specifies the contextual tabs and tab set to the ribbon control with the background color and border color. Refer to the tabs section for adding tabs - * into the contextual tab and contextual tab set. - * @Default {Array} - */ - contextualTabs?: ContextualTab[]; - - /** Specifies the index or indexes to disable the given index tab or indexes tabs in the ribbon control. - * @Default {0} - */ - disabledItemIndex?: any[]; - - /** Specifies the index or indexes to enable the given index tab or indexes tabs in the ribbon control. - * @Default {null} - */ - enabledItemIndex?: any[]; - - /** Specifies the index of the ribbon tab to select the given index tab item in the ribbon control. - * @Default {1} - */ - selectedItemIndex?: number; - - /** Specifies the tabs and its groups. Also specifies the control details that has to be placed in the tab area in the ribbon control. - * @Default {Array} - */ - tabs?: Tab[]; - - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific - * to a particular country or region and it will need to use the user's preference. - * @Default {en-US} - */ - locale?: string; - - /** Specifies the width to the ribbon control. You can set width in string or number format. - * @Default {null} - */ - width?: string | number; - /** Triggered before the ribbon tab item is removed. */ - beforeTabRemove?(e: BeforeTabRemoveEventArgs): void; - - /** Triggered before the ribbon control is created. */ - create?(e: CreateEventArgs): void; + enum QuickAccessMode { - /** Triggered before the ribbon control is destroyed. */ - destroy?(e: DestroyEventArgs): void; + ///Controls are hidden in Quick Access toolbar + None, - /** Triggered when the control in the group is clicked successfully. */ - groupClick?(e: GroupClickEventArgs): void; + ///Add controls in toolBar + ToolBar, - /** Triggered when the group expander in the group is clicked successfully. */ - groupExpand?(e: GroupExpandEventArgs): void; + ///Add controls in menu + Menu + } - /** Triggered when an item in the Gallery control is clicked successfully. */ - galleryItemClick?(e: GalleryItemClickEventArgs): void; - /** Triggered when a tab or button in the backstage page is clicked successfully. */ - backstageItemClick?(e: BackstageItemClickEventArgs): void; + enum Type { - /** Triggered when the ribbon control is collapsed. */ - collapse?(e: CollapseEventArgs): void; + ///Specifies the button control + Button, - /** Triggered when the ribbon control is expanded. */ - expand?(e: ExpandEventArgs): void; + ///Specifies the split button + SplitButton, - /** Triggered before the ribbon control is load. */ - load?(e: LoadEventArgs): void; + ///Specifies the dropDown + DropDownList, - /** Triggered after adding the new ribbon tab item. */ - tabAdd?(e: TabAddEventArgs): void; + ///To append external element's + Custom, - /** Triggered when tab is clicked successfully in the ribbon control. */ - tabClick?(e: TabClickEventArgs): void; + ///Specifies the toggle button + ToggleButton, - /** Triggered before the ribbon tab is created. */ - tabCreate?(e: TabCreateEventArgs): void; + ///Specifies the ribbon gallery + Gallery + } - /** Triggered after the tab item is removed from the ribbon control. */ - tabRemove?(e: TabRemoveEventArgs): void; + } - /** Triggered after the ribbon tab item is selected in the ribbon control. */ - tabSelect?(e: TabSelectEventArgs): void; + class Kanban extends ej.Widget { + static fn: Kanban; + constructor(element: JQuery | Element, options?: Kanban.Model); + static Locale: any; + model: Kanban.Model; + defaults: Kanban.Model; - /** Triggered when the expand/collapse button is clicked successfully . */ - toggleButtonClick?(e: ToggleButtonClickEventArgs): void; + /** Add or remove columns in Kanban columns collections.Default action is add. + * @param {any[]|string} Pass array of columns or string of headerText to add/remove the column in Kanban + * @param {any[]|string} Pass array of columns or string of key value to add/remove the column in Kanban + * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform + * @returns {void} + */ + columns(columndetails: any[]|string, keyvalue: any[]|string, action?: string): void; - /** Triggered when the QAT menu item is clicked successfully . */ - qatMenuItemClick?(e: QatMenuItemClickEventArgs): void; - } + /** Destroy the Kanban widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; - export interface BeforeTabRemoveEventArgs { + /** Refresh the Kanban with new data source. + * @param {any[]} Pass new data source to the Kanban + * @returns {void} + */ + dataSource(datasource: any[]): void; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** toggleColumn based on the headerText in Kanban. + * @param {any} Pass the header text of the column to get the corresponding column object + * @returns {void} + */ + toggleColumn(headerText: any): void; - /** returns the ribbon model. - */ - model?: any; + /** Expand or collapse the card based on the state of target "div" + * @param {string|number} Pass the id of card to be toggle + * @returns {void} + */ + toggleCard(key: string|number): void; - /** returns the name of the event. - */ - type?: string; + /** Used for get the names of all the visible column name collections in Kanban. + * @returns {any[]} + */ + getVisibleColumnNames(): any[]; - /** returns current tab item index in the ribbon control. - */ - index?: number; - } + /** Get the scroller object of Kanban. + * @returns {ej.Scroller} + */ + getScrollObject(): ej.Scroller; + + /** Get the column details based on the given header text in Kanban. + * @param {string} Pass the header text of the column to get the corresponding column object + * @returns {string} + */ + getColumnByHeaderText(headerText: string): string; + + /** Get the table details based on the given header table in Kanban. + * @returns {string} + */ + getHeaderTable(): string; + + /** Hide columns from the Kanban based on the header text + * @param {any[]|string} you can pass either array of header text of various columns or a header text of a column to hide + * @returns {void} + */ + hideColumns(headerText: any[]|string): void; + + /** Print the Kanban Board + * @returns {void} + */ + print(): void; + + /** Refresh the template of the Kanban + * @returns {void} + */ + refreshTemplate(): void; + + /** Refresh the Kanban contents.The template refreshment is based on the argument passed along with this method + * @param {boolean} optional When templateRefresh is set true, template and Kanban contents both are refreshed in Kanban else only Kanban content is refreshed + * @returns {void} + */ + refresh(templateRefresh?: boolean): void; + + /** Show columns in the Kanban based on the header text. + * @param {any[]|string} You can pass either array of header text of various columns or a header text of a column to show + * @returns {void} + */ + showColumns(headerText: any[]|string): void; + + /** Update a card in Kanban control based on key and JSON data given. + * @param {string} Pass the key field Name of the column + * @param {any[]} Pass the edited JSON data of card need to be update. + * @returns {void} + */ + updateCard(key: string, data: any[]): void; + + KanbanSelection: Kanban.KanbanSelection; + + KanbanSwimlane: Kanban.KanbanSwimlane; + + KanbanFilter: Kanban.KanbanFilter; + + KanbanEdit: Kanban.KanbanEdit; + } + export namespace Kanban { + + export interface KanbanSelection { + + /** It is used to clear all the card selection. + * @returns {void} + */ + clear(): void; + } + + export interface KanbanSwimlane { + + /** Expand all the swimlane rows in Kanban. + * @returns {void} + */ + expandAll(): void; + + /** Collapse all the swimlane rows in Kanban. + * @returns {void} + */ + collapseAll(): void; + + /** Expand or collapse the swimlane row based on the state of target "div" + * @param {any} Pass the div object to toggleSwimlane row based on its row state + * @returns {void} + */ + toggle($div: any): void; + } + + export interface KanbanFilter { + + /** Method used for send a clear search request to Kanban. + * @returns {void} + */ + clearSearch(): void; + + /** Send a search request to Kanban with specified string passed in it. + * @param {string} Pass the string to search in Kanban card + * @returns {void} + */ + searchCards(searchString: string): void; + + /** Send a clear request to filter cards in the kanban. + * @returns {void} + */ + clearFilter(): void; + + /** Send a filtering request to cards in the kanban. + * @returns {void} + */ + filterCards(): void; + } + + export interface KanbanEdit { + + /** Add a new card in Kanban control when allowAdding is set as true. If parameters are not given default dialog will be open. + * @param {string} Pass the primary key field Name of the column + * @param {any[]} Pass the edited JSON data of card need to be add. + * @returns {void} + */ + addCard(primaryKey: string, card: any[]): void; + + /** Send a cancel request of add/edit card in Kanban when allowEditing/allowAdding is set as true. + * @returns {void} + */ + cancelEdit(): void; + + /** Delete a card in Kanban control when allowAdding/allowEditing is set as true. + * @param {string|number} Pass the key of card to be delete + * @returns {void} + */ + deleteCard(Key: string|number): void; + + /** Send a save request in Kanban when any card is in edit/new add card state and allowEditing/allowAdding is set as true. + * @returns {void} + */ + endEdit(): void; + + /** Send an edit card request in Kanban when allowEditing is set as true. Parameter will be HTML element or primary key + * @param {any} Pass the div selected row element to be edited in Kanban + * @returns {void} + */ + startEdit($div: any): void; + + /** Method used for set validation to a field during editing. + * @param {string} Specify the name of the column to set validation rules + * @param {any} Specify the validation rules for the field + * @returns {void} + */ + setValidationToField(name: string, rules: any): void; + } + + export interface Model { + + /** Gets or sets a value that indicates whether to enable allowDragAndDrop behavior on Kanban. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /** To enable or disable the title of the card. + * @Default {false} + */ + allowTitle?: boolean; + + /** Customize the settings for swim lane. + * @Default {Object} + */ + swimlaneSettings?: SwimlaneSettings; + + /** To enable or disable the column expand /collapse. + * @Default {false} + */ + allowToggleColumn?: boolean; + + /** To enable Searching operation in Kanban. + * @Default {false} + */ + allowSearching?: boolean; + + /** To enable filtering behavior on Kanban.User can specify query in filterSettings collection after enabling allowFiltering. + * @Default {false} + */ + allowFiltering?: boolean; + + /** Gets or sets a value that indicates whether to enable allowSelection behavior on Kanban.User can select card and the selected card will be highlighted on Kanban. + * @Default {true} + */ + allowSelection?: boolean; + + /** Gets or sets a value that indicates whether to allow card hover actions. + * @Default {true} + */ + allowHover?: boolean; + + /** To allow keyboard navigation actions. + * @Default {false} + */ + allowKeyboardNavigation?: boolean; + + /** Gets or sets a value that indicates whether to enable the scrollbar in the Kanban and view the card by scroll through the Kanban manually. + * @Default {false} + */ + allowScrolling?: boolean; + + /** Gets or sets a value that indicates whether to enable printing option. + * @Default {false} + */ + allowPrinting?: boolean; + + /** Gets or sets an object that indicates whether to customize the context menu behavior of the Kanban. + * @Default {Object} + */ + contextMenuSettings?: ContextMenuSettings; + + /** Gets or sets an object that indicates to render the Kanban with specified columns. + * @Default {Array} + */ + columns?: Column[]; + + /** Gets or sets an object that indicates whether to Customize the card settings. + * @Default {Object} + */ + cardSettings?: CardSettings; + + /** Gets or sets a value that indicates whether to add customToolbarItems within the toolbar to perform any action in the Kanban. + * @Default {[]} + */ + customToolbarItems?: CustomToolbarItem[]; + + /** Gets or sets a value that indicates to render the Kanban with custom theme. + */ + cssClass?: string; + + /** Gets or sets the data to render the Kanban with cards. + * @Default {null} + */ + dataSource?: any; + + /** To perform kanban functionalities with touch interaction. + * @Default {true} + */ + enableTouch?: boolean; + + /** Align content in the Kanban control align from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /** To show total count of cards in each column. + * @Default {false} + */ + enableTotalCount?: boolean; + + /** Get or sets an object that indicates whether to customize the editing behavior of the Kanban. + * @Default {Object} + */ + editSettings?: EditSettings; + + /** To customize field mappings for card , editing title and control key parameters + * @Default {Object} + */ + fields?: Fields; + + /** To map datasource field for column values mapping + * @Default {null} + */ + keyField?: string; + + /** When set to true, adapts the Kanban layout to fit the screen size of devices on which it renders. + * @Default {false} + */ + isResponsive?: boolean; + + /** Gets or sets a value that indicates whether to set the minimum width of the responsive Kanban while isResponsive property is true. + * @Default {0} + */ + minWidth?: number; + + /** To customize the filtering behavior based on queries given. + * @Default {Array} + */ + filterSettings?: FilterSetting[]; + + /** ej Query to query database of Kanban. + * @Default {null} + */ + query?: any; + + /** To change the key in keyboard interaction to Kanban control. + * @Default {null} + */ + keySettings?: any; + + /** Gets or sets an object that indicates whether to customize the scrolling behavior of the Kanban. + * @Default {Object} + */ + scrollSettings?: ScrollSettings; + + /** To customize the searching behavior of the Kanban. + * @Default {Object} + */ + searchSettings?: SearchSettings; + + /** To allow customize selection type. Accepting types are "single" and "multiple". + * @Default {ej.Kanban.SelectionType.Single} + */ + selectionType?: ej.Kanban.SelectionType|string; + + /** Gets or sets an object that indicates to managing the collection of stacked header rows for the Kanban. + * @Default {Array} + */ + stackedHeaderRows?: StackedHeaderRow[]; + + /** The tooltip allows to display card details in a tooltip while hovering on it. + */ + tooltipSettings?: TooltipSettings; + + /** Gets or sets an object that indicates to render the Kanban with specified workflows. + * @Default {Array} + */ + workflows?: Workflow[]; + + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to + * a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /** Triggered for every Kanban action before its starts. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Triggered for every Kanban action success event. + */ + actionComplete?(e: ActionCompleteEventArgs): void; + + /** Triggered for every Kanban action server failure event. + */ + actionFailure?(e: ActionFailureEventArgs): void; + + /** Triggered before the task is going to be edited. + */ + beginEdit?(e: BeginEditEventArgs): void; + + /** Triggered before the card is selected. + */ + beforeCardSelect?(e: BeforeCardSelectEventArgs): void; + + /** Trigger after the card is clicked. + */ + cardClick?(e: CardClickEventArgs): void; + + /** Triggered when the card is being dragged. + */ + cardDrag?(e: CardDragEventArgs): void; + + /** Triggered when card dragging start. + */ + cardDragStart?(e: CardDragStartEventArgs): void; + + /** Triggered when card dragging stops. + */ + cardDragStop?(e: CardDragStopEventArgs): void; + + /** Triggered when the card is Dropped. + */ + cardDrop?(e: CardDropEventArgs): void; + + /** Triggered after the card is selected. + */ + cardSelect?(e: CardSelectEventArgs): void; + + /** Triggered when card is double clicked. + */ + cardDoubleClick?(e: CardDoubleClickEventArgs): void; + + /** Triggered before the card is selected. + */ + cardSelecting?(e: CardSelectingEventArgs): void; + + /** Triggered when the Kanban is rendered completely + */ + create?(e: CreateEventArgs): void; + + /** Triggers after the cell is clicked. + */ + cellClick?(e: CellClickEventArgs): void; + + /** Triggered before the context menu is opened. + */ + contextOpen?(e: ContextOpenEventArgs): void; + + /** Triggered when context menu item is clicked in Kanban + */ + contextClick?(e: ContextClickEventArgs): void; + + /** Triggered the Kanban is bound with data during initial rendering. + */ + dataBound?(e: DataBoundEventArgs): void; + + /** Triggered when Kanban going to destroy. + */ + destroy?(e: DestroyEventArgs): void; + + /** Triggered after the card is deleted. + */ + endDelete?(e: EndDeleteEventArgs): void; - export interface CreateEventArgs { + /** Triggered after the card is edited. + */ + endEdit?(e: EndEditEventArgs): void; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Triggers after the header is clicked. + */ + headerClick?(e: HeaderClickEventArgs): void; - /** returns the ribbon model. - */ - model?: any; + /** Triggered initial load. + */ + load?(e: LoadEventArgs): void; - /** returns the name of the event. - */ - type?: string; - } + /** Triggers before swim lane expand or collapse icon is clicked. + */ + swimlaneClick?(e: SwimlaneClickEventArgs): void; - export interface DestroyEventArgs { + /** Triggered every time a single card rendered request is made to access particular card information. + */ + queryCellInfo?(e: QueryCellInfoEventArgs): void; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Triggered when toolbar item is clicked in Kanban. + */ + toolbarClick?(e: ToolbarClickEventArgs): void; + } - /** returns the ribbon model. - */ - model?: any; + export interface ActionBeginEventArgs { - /** returns the name of the event. - */ - type?: string; + /** Returns the Kanban model. + */ + model?: any; - /** returns current ribbon tab item index - */ - deleteIndex?: number; - } + /** Returns the name of the event. + */ + type?: string; - export interface GroupClickEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns the current action event type. + */ + originalEventType?: string; - /** returns the ribbon model. - */ - model?: any; + /** Returns primary key value. + */ + primaryKeyValue?: string; - /** returns the name of the event. - */ - type?: string; + /** Returns request type. + */ + requestType?: string; - /** returns the control clicked in the group. - */ - target?: number; - } + /** Returns the edited row index. + */ + rowIndex?: number; - export interface GroupExpandEventArgs { + /** Returns the card object (JSON). + */ + data?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns current filtering object field name. + */ + currentFilteringobject?: any; - /** returns the ribbon model. - */ - model?: any; + /** Returns filter details. + */ + filterCollection?: any; + } - /** returns the name of the event. - */ - type?: string; + export interface ActionCompleteEventArgs { - /** returns the clicked group expander. - */ - target?: number; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface GalleryItemClickEventArgs { + /** Returns the Kanban model. + */ + model?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns request type. + */ + requestType?: string; - /** returns the ribbon model. - */ - model?: any; + /** Returns the name of the event. + */ + type?: string; - /** returns the gallery model. - */ - galleryModel?: any; + /** Returns current action event type. + */ + originalEventType?: string; - /** returns the name of the event. - */ - type?: string; + /** Returns primary key. + */ + primaryKey?: string; - /** returns the item clicked in the gallery. - */ - target?: number; - } + /** Returns primary key value. + */ + primaryKeyValue?: string; - export interface BackstageItemClickEventArgs { + /** Returns Kanban element. + */ + target?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns the card object (JSON). + */ + data?: any; - /** returns the ribbon model. - */ - model?: any; + /** Returns the selectedRow index. + */ + selectedRow?: number; - /** returns the name of the event. - */ - type?: string; + /** Returns current filtering column field name. + */ + currentFilteringColumn?: string; - /** returns the item clicked in the gallery. - */ - target?: number; + /** Returns filter details. + */ + filterCollection?: any; + } - /** returns the id of the target item. - */ - id?: string; + export interface ActionFailureEventArgs { - /** returns the text of the target item. - */ - text?: string; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface CollapseEventArgs { + /** Returns the Kanban model. + */ + model?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns request type. + */ + requestType?: string; - /** returns the ribbon model. - */ - model?: any; + /** Returns the name of the event. + */ + type?: string; - /** returns the name of the event. - */ - type?: string; - } + /** Returns the error return by server. + */ + error?: any; - export interface ExpandEventArgs { + /** Returns current action event type. + */ + originalEventType?: string; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns primary key value. + */ + primaryKeyValue?: string; - /** returns the ribbon model. - */ - model?: any; + /** Returns Kanban element. + */ + target?: any; - /** returns the name of the event. - */ - type?: string; - } + /** Returns the card object (JSON). + */ + data?: any; - export interface LoadEventArgs { + /** Returns current filtering column field name. + */ + currentFilteringColumn?: string; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns filter details. + */ + filterCollection?: any; + } - /** returns the ribbon model. - */ - model?: any; + export interface BeginEditEventArgs { - /** returns the name of the event. - */ - type?: string; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface TabAddEventArgs { + /** Returns the Kanban model. + */ + model?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns primary key value. + */ + primaryKeyValue?: string; - /** returns the ribbon model. - */ - model?: any; + /** Returns begin edit data. + */ + data?: any; - /** returns the name of the event. - */ - type?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** returns new added tab header. - */ - tabHeader?: any; + export interface BeforeCardSelectEventArgs { - /** returns new added tab content panel. - */ - tabContent?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface TabClickEventArgs { + /** Returns the select cell index value. + */ + cellIndex?: number; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns the select card index value. + */ + cardIndex?: number; - /** returns the ribbon model. - */ - model?: any; + /** Returns the select cell element + */ + currentCell?: any; - /** returns the name of the event. - */ - type?: string; + /** Returns the previously select the card element + */ + previousCard?: any; - /** returns previous active tab header. - */ - prevActiveHeader?: any; + /** Returns the previously select card indexes + */ + previousRowcellindex?: any[]; - /** returns previous active index. - */ - prevActiveIndex?: number; + /** Returns the Target item. + */ + Target?: any; - /** returns current active tab header . - */ - activeHeader?: any; + /** Returns the Kanban model. + */ + model?: any; - /** returns current active index. - */ - activeIndex?: number; - } + /** Returns select card data. + */ + data?: any; - export interface TabCreateEventArgs { + /** Returns the name of the event. + */ + type?: string; + } - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + export interface CardClickEventArgs { - /** returns the ribbon model. - */ - model?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the name of the event. - */ - type?: string; + /** Returns current record object (JSON). + */ + data?: any; - /** returns current ribbon tab item index - */ - deleteIndex?: number; - } + /** Returns the current card to the Kanban. + */ + currentCard?: string; - export interface TabRemoveEventArgs { + /** Returns Kanban element. + */ + target?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns the Kanban model. + */ + model?: any; - /** returns the ribbon model. - */ - model?: any; + /** Returns the Header text of the column corresponding to the selected card. + */ + columnName?: string; - /** returns the name of the event. - */ - type?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** returns the removed index. - */ - removedIndex?: number; - } + export interface CardDragEventArgs { - export interface TabSelectEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns drag data. + */ + data?: any; - /** returns the ribbon model. - */ - model?: any; + /** Returns drag start element. + */ + dragtarget?: any; - /** returns the name of the event. - */ - type?: string; + /** Returns dragged element. + */ + draggedElement?: any; - /** returns previous active tab header. - */ - prevActiveHeader?: any; + /** Returns the Kanban model. + */ + model?: any; - /** returns previous active index. - */ - prevActiveIndex?: number; + /** Returns the name of the event. + */ + type?: string; + } - /** returns current active tab header . - */ - activeHeader?: any; + export interface CardDragStartEventArgs { - /** returns current active index. - */ - activeIndex?: number; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface ToggleButtonClickEventArgs { + /** Returns card drag start data. + */ + data?: any; - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; + /** Returns dragged element. + */ + draggedElement?: any; - /** returns the ribbon model. - */ - model?: any; + /** Returns the Kanban model. + */ + model?: any; - /** returns the name of the event. - */ - type?: string; - - /** returns the expand/collapse button. - */ - target?: number; - } - - export interface QatMenuItemClickEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the ribbon model. - */ - model?: any; - - /** returns the name of the event. - */ - type?: string; - - /** returns the clicked menu item text. - */ - text?: string; - } - - export interface CollapsePinSettings { - - /** Sets tooltip for the collapse pin . - * @Default {null} - */ - toolTip?: string; - - /** Specifies the custom tooltip for collapse pin.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. - * @Default {Object} - */ - customToolTip?: any; - } - - export interface ExpandPinSettings { - - /** Sets tooltip for the expand pin. - * @Default {null} - */ - toolTip?: string; - - /** Specifies the custom tooltip for expand pin.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. - * @Default {Object} - */ - customToolTip?: any; - } - - export interface ApplicationTabBackstageSettingsPage { - - /** Specifies the id for ribbon backstage page's tab and button elements. - * @Default {null} - */ - id?: string; - - /** Specifies the text for ribbon backstage page's tab header and button elements. - * @Default {null} - */ - text?: string; - - /** Specifies the type for ribbon backstage page's contents. Set "ej.Ribbon.BackStageItemType.Tab" to render the tab or " - * ej.Ribbon.BackStageItemType.Button" to render the button. - * @Default {ej.Ribbon.ItemType.Tab} - */ - itemType?: ej.Ribbon.ItemType | string; - - /** Specifies the id of HTML elements like div,ul, etc., as ribbon backstage page's tab content. - * @Default {null} - */ - contentID?: string; - - /** Specifies the separator between backstage page's tab and button elements. - * @Default {false} - */ - enableSeparator?: boolean; - } - - export interface ApplicationTabBackstageSettings { - - /** Specifies the display text of application tab. - * @Default {null} - */ - text?: string; - - /** Specifies the height of ribbon backstage page. - * @Default {null} - */ - height?: string | number; - - /** Specifies the width of ribbon backstage page. - * @Default {null} - */ - width?: string | number; - - /** Specifies the ribbon backstage page with its tab and button elements. - * @Default {Array} - */ - pages?: ApplicationTabBackstageSettingsPage[]; - - /** Specifies the width of backstage page header that contains tabs and buttons. - * @Default {null} - */ - headerWidth?: string | number; - } - - export interface ApplicationTab { - - /** Specifies the ribbon backstage page items. - * @Default {Object} - */ - backstageSettings?: ApplicationTabBackstageSettings; - - /** Specifies the ID of ul list to create application menu in the ribbon control. - * @Default {null} - */ - menuItemID?: string; - - /** Specifies the menu members, events by using the menu settings for the menu in the application tab. - * @Default {Object} - */ - menuSettings?: any; - - /** Specifies the application menu or backstage page. Specify the type of application tab as "ej.Ribbon.ApplicationTabType.Menu" to render the application menu or - * "ej.Ribbon.ApplicationTabType.Backstage" to render backstage page in the ribbon control. - * @Default {ej.Ribbon.ApplicationTabType.Menu} - */ - type?: ej.Ribbon.ApplicationTabType | string; - } - - export interface ContextualTab { - - /** Specifies the backgroundColor of the contextual tabs and tab set in the ribbon control. - * @Default {null} - */ - backgroundColor?: string; - - /** Specifies the borderColor of the contextual tabs and tab set in the ribbon control. - * @Default {null} - */ - borderColor?: string; - - /** Specifies the tabs to present in the contextual tabs and tab set. Refer to the tabs section for adding tabs into the contextual tabs and tab set. - * @Default {Array} - */ - tabs?: any[]; - } - - export interface TabsGroupsContentDefaults { - - /** Specifies the controls height such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. - * @Default {null} - */ - height?: string | number; - - /** Specifies the controls width such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. - * @Default {null} - */ - width?: string | number; - - /** Specifies the controls type such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. - * @Default {ej.Ribbon.Type.Button} - */ - type?: string; - - /** Specifies the controls size such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. - * @Default {false} - */ - isBig?: boolean; - } - - export interface TabsGroupsContentGroupsCustomGalleryItem { - - /** Specifies the Syncfusion button members, events by using buttonSettings. - * @Default {Object} - */ - buttonSettings?: any; - - /** Specifies the type as ej.Ribbon.CustomItemType.Menu or ej.Ribbon.CustomItemType.Button to render Syncfusion button and menu. - * @Default {ej.Ribbon.CustomItemType.Button} - */ - customItemType?: ej.Ribbon.CustomItemType | string; - - /** Specifies the custom tooltip for gallery extra item's button. Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. - * @Default {Object} - */ - customToolTip?: any; - - /** Specifies the UL list id to render menu as gallery extra item. - * @Default {null} - */ - menuId?: string; - - /** Specifies the Syncfusion menu members, events by using menuSettings. - * @Default {Object} - */ - menuSettings?: any; - - /** Specifies the text for gallery extra item's button. - * @Default {null} - */ - text?: string; - - /** Specifies the tooltip for gallery extra item's button. - * @Default {null} - */ - toolTip?: string; - } - - export interface TabsGroupsContentGroupsCustomToolTip { - - /** Sets content to the custom tooltip. Text and HTML support are provided for content. - * @Default {null} - */ - content?: string; - - /** Sets icon to the custom tooltip content. - * @Default {null} - */ - prefixIcon?: string; - - /** Sets title to the custom tooltip. Text and HTML support are provided for title and the title is in bold for text format. - * @Default {null} - */ - title?: string; - } - - export interface TabsGroupsContentGroupsGalleryItem { - - /** Specifies the Syncfusion button members, events by using buttonSettings. - * @Default {Object} - */ - buttonSettings?: any; - - /** Specifies the custom tooltip for gallery content. Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. - * @Default {Object} - */ - customToolTip?: any; - - /** Sets text for the gallery content. - * @Default {null} - */ - text?: string; - - /** Sets tooltip for the gallery content. - * @Default {null} - */ - toolTip?: string; - } - - export interface TabsGroupsContentGroup { - - /** When isMobileOnly is true,its shows in mobile toolbar.isResponsive should be true for using this property. - * @Default {false} - */ - isMobileOnly?: boolean; - - /** Specifies the Syncfusion button members, events by using this buttonSettings. - * @Default {Object} - */ - buttonSettings?: any; - - /** It is used to set the count of gallery contents in a row. - * @Default {null} - */ - columns?: number; - - /** Specifies the custom items such as div, table, controls as custom controls with the type "ej.Ribbon.Type.Custom" in the groups. - * @Default {null} - */ - contentID?: string; - - /** Specifies the CSS class property to apply styles to the button, split, dropdown controls in the groups. - * @Default {null} - */ - cssClass?: string; - - /** Specifies the Syncfusion button and menu as gallery extra items. - * @Default {Array} - */ - customGalleryItems?: TabsGroupsContentGroupsCustomGalleryItem[]; - - /** Provides custom tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. Text and HTML support are also provided for title and content. - * @Default {Object} - */ - customToolTip?: TabsGroupsContentGroupsCustomToolTip; - - /** Specifies the Syncfusion dropdown list members, events by using this dropdownSettings. - * @Default {Object} - */ - dropdownSettings?: any; - - /** Specifies the separator to the control that is in row type group. The separator separates the control from the next control in the group. Set "true" to enable the separator. - * @Default {false} - */ - enableSeparator?: boolean; - - /** Sets the count of gallery contents in a row, when the gallery is in expanded state. - * @Default {null} - */ - expandedColumns?: number; - - /** Defines each gallery content. - * @Default {Array} - */ - galleryItems?: TabsGroupsContentGroupsGalleryItem[]; - - /** Specifies the Id for button, split button, dropdown list, toggle button, gallery, custom controls in the sub groups. - * @Default {null} - */ - id?: string; - - /** Specifies the size for button, split button controls. Set "true" for big size and "false" for small size. - * @Default {null} - */ - isBig?: boolean; - - /** Sets the height of each gallery content. - * @Default {null} - */ - itemHeight?: string | number; - - /** Sets the width of each gallery content. - * @Default {null} - */ - itemWidth?: string | number; - - /** Specifies the Syncfusion split button members, events by using this splitButtonSettings. - * @Default {Object} - */ - splitButtonSettings?: any; - - /** Specifies the text for button, split button, toggle button controls in the sub groups. - * @Default {null} - */ - text?: string; - - /** Specifies the Syncfusion toggle button members, events by using toggleButtonSettings. - * @Default {Object} - */ - toggleButtonSettings?: any; - - /** Specifies the tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. - * @Default {null} - */ - toolTip?: string; - - /** To add,show and hide controls in Quick Access toolbar. - * @Default {ej.Ribbon.QuickAccessMode.None} - */ - quickAccessMode?: ej.Ribbon.QuickAccessMode | string; - - /** Specifies the type as "ej.Ribbon.Type.Button" or "ej.Ribbon.Type.SplitButton" or "ej.Ribbon.Type.DropDownList" or "ej.Ribbon.Type.ToggleButton" - * or "ej.Ribbon.Type.Custom" or "ej.Ribbon.Type.Gallery" to render button, split, dropdown, toggle button, gallery, custom controls. - * @Default {ej.Ribbon.Type.Button} - */ - type?: ej.Ribbon.Type | string; - } - - export interface TabsGroupsContent { - - /** Specifies the height, width, type, isBig property to the controls in the group commonly. - * @Default {Object} - */ - defaults?: TabsGroupsContentDefaults; - - /** Specifies the controls such as Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls in the subgroup of the ribbon tab . - * @Default {Array} - */ - groups?: TabsGroupsContentGroup[]; - } - - export interface TabsGroupsGroupExpanderSettings { - - /** Sets tooltip for the group expander of the group. - * @Default {null} - */ - toolTip?: string; - - /** Specifies the custom tooltip for group expander.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. - * @Default {Object} - */ - customToolTip?: any; - } - - export interface TabsGroup { + /** Returns drag start element. + */ + dragtarget?: any; - /** Specifies the alignment of controls in the groups in 'row' type or 'column' type. Value for row type is "ej.Ribbon.AlignType.Rows" - * and for column type is "ej.Ribbon.alignType.columns". - * @Default {ej.Ribbon.AlignType.Rows} - */ - alignType?: ej.Ribbon.AlignType | string; + /** Returns the name of the event. + */ + type?: string; + } - /** Specifies the Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls to the groups in the ribbon control. - * @Default {Array} - */ - content?: TabsGroupsContent[]; + export interface CardDragStopEventArgs { - /** Specifies the ID of custom items to be placed in the groups. - * @Default {null} - */ - contentID?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Specifies the HTML contents to place into the groups. - * @Default {null} - */ - customContent?: string; + /** Returns dragged element. + */ + draggedElement?: any; - /** Specifies the group expander for groups in the ribbon control. Set "true" to enable the group expander. - * @Default {false} - */ - enableGroupExpander?: boolean; + /** Returns the Kanban model. + */ + model?: any; - /** Sets custom setting to the groups in the ribbon control. - * @Default {Object} - */ - groupExpanderSettings?: TabsGroupsGroupExpanderSettings; + /** Returns drag stop element. + */ + droptarget?: any; - /** Specifies the text to the groups in the ribbon control. - * @Default {null} - */ - text?: string; + /** Returns drag stop data. + */ + data?: any; - /** Specifies the custom items such as div, table, controls by using the "custom" type. - * @Default {null} - */ - type?: string; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface Tab { + export interface CardDropEventArgs { - /** Specifies single group or multiple groups and its contents to each tab in the ribbon control. - * @Default {Array} - */ - groups?: TabsGroup[]; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Specifies the ID for each tab's content panel. - * @Default {null} - */ - id?: string; + /** Returns dragged element. + */ + draggedElement?: any; - /** Specifies the text of the tab in the ribbon control. - * @Default {null} - */ - text?: string; - } + /** Returns previous parent of dragged element + */ + draggedParent?: any; - enum ItemType { + /** Returns dragged data. + */ + data?: any; - ///To render the button for ribbon backstage page’s contents - Button, + /** Returns the Kanban model. + */ + model?: any; - ///To render the tab for ribbon backstage page’s contents - Tab - } + /** Returns drop element. + */ + target?: any; + /** Returns the name of the event. + */ + type?: string; + } - enum ApplicationTabType { + export interface CardSelectEventArgs { - ///applicationTab display as menu - Menu, + /** Returns the select cell index value. + */ + cellIndex?: number; - ///applicationTab display as backstage - Backstage - } + /** Returns the select card index value. + */ + cardIndex?: number; + /** Returns the select cell element + */ + currentCell?: any; - enum AlignType { + /** Returns the cancel option value. + */ + cancel?: boolean; - ///To align the group content's in row - Rows, + /** Returns the previously select the card element + */ + previousCard?: any; - ///To align group content's in columns - Columns - } + /** Returns the previously select card indexes + */ + previousRowcellindex?: any[]; + /** Returns the current item. + */ + currentTarget?: any; - enum CustomItemType { + /** Returns the Kanban model. + */ + model?: any; - ///Specifies the button type in customGalleryItems - Button, + /** Returns select card data. + */ + data?: any; - ///Specifies the menu type in customGalleryItems - Menu - } + /** Returns the name of the event. + */ + type?: string; + } + export interface CardDoubleClickEventArgs { - enum QuickAccessMode { + /** Returns the cancel option value. + */ + cancel?: boolean; - ///Controls are hidden in Quick Access toolbar - None, + /** Returns current card object (JSON). + */ + data?: any; - ///Add controls in toolBar - ToolBar, + /** Returns the Kanban model. + */ + model?: any; - ///Add controls in menu - Menu - } + /** Returns the name of the event. + */ + type?: string; + } + export interface CardSelectingEventArgs { - enum Type { + /** Returns the selecting cell index value. + */ + cellIndex?: number; - ///Specifies the button control - Button, + /** Returns the selecting card index value. + */ + cardIndex?: number; - ///Specifies the split button - SplitButton, + /** Returns the selecting cell element + */ + currentCell?: any; - ///Specifies the dropDown - DropDownList, + /** Returns the cancel option value. + */ + cancel?: boolean; - ///To append external element's - Custom, + /** Returns the previously selecting the card element + */ + previousCard?: any; - ///Specifies the toggle button - ToggleButton, + /** Returns the previously rowcell is selecting card indexes + */ + previousRowcellindex?: any[]; - ///Specifies the ribbon gallery - Gallery - } + /** Returns the current item. + */ + currentTarget?: any; - } + /** Returns the Kanban model. + */ + model?: any; - class Kanban extends ej.Widget { - static fn: Kanban; - constructor(element: JQuery | Element, options?: Kanban.Model); - static Locale: any; - model: Kanban.Model; - defaults: Kanban.Model; + /** Returns added data. + */ + data?: any; - /** Add or remove columns in Kanban columns collections.Default action is add. - * @param {Array|string} Pass array of columns or string of headerText to add/remove the column in Kanban - * @param {Array|string} Pass array of columns or string of key value to add/remove the column in Kanban - * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform - * @returns {void} - */ - columns(columndetails: any[] | string, keyvalue: any[] | string, action?: string): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Destroy the Kanban widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; + export interface CreateEventArgs { - /** Refresh the Kanban with new data source. - * @param {Array} Pass new data source to the Kanban - * @returns {void} - */ - dataSource(datasource: any[]): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** toggleColumn based on the headerText in Kanban. - * @param {any} Pass the header text of the column to get the corresponding column object - * @returns {void} - */ - toggleColumn(headerText: any): void; + /** Returns the kanban model. + */ + model?: any; - /** Expand or collapse the card based on the state of target "div" - * @param {string|number} Pass the id of card to be toggle - * @returns {void} - */ - toggleCard(key: string | number): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Used for get the names of all the visible column name collections in Kanban. - * @returns {Array} - */ - getVisibleColumnNames(): any[]; + export interface CellClickEventArgs { - /** Get the scroller object of Kanban. - * @returns {ej.Scroller} - */ - getScrollObject(): ej.Scroller; - - /** Get the column details based on the given header text in Kanban. - * @param {string} Pass the header text of the column to get the corresponding column object - * @returns {String} - */ - getColumnByHeaderText(headerText: string): string; - - /** Get the table details based on the given header table in Kanban. - * @returns {String} - */ - getHeaderTable(): string; - - /** Hide columns from the Kanban based on the header text - * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to hide - * @returns {void} - */ - hideColumns(headerText: any[] | string): void; - - /** Print the Kanban Board - * @returns {void} - */ - print(): void; - - /** Refresh the template of the Kanban - * @returns {void} - */ - refreshTemplate(): void; - - /** Refresh the Kanban contents.The template refreshment is based on the argument passed along with this method - * @param {boolean} optional When templateRefresh is set true, template and Kanban contents both are refreshed in Kanban else only Kanban content is refreshed - * @returns {void} - */ - refresh(templateRefresh?: boolean): void; - - /** Show columns in the Kanban based on the header text. - * @param {Array|string} You can pass either array of header text of various columns or a header text of a column to show - * @returns {void} - */ - showColumns(headerText: any[] | string): void; - - /** Update a card in Kanban control based on key and JSON data given. - * @param {string} Pass the key field Name of the column - * @param {Array} Pass the edited JSON data of card need to be update. - * @returns {void} - */ - updateCard(key: string, data: any[]): void; - - KanbanSelection: Kanban.KanbanSelection; - - KanbanSwimlane: Kanban.KanbanSwimlane; - - KanbanFilter: Kanban.KanbanFilter; - - KanbanEdit: Kanban.KanbanEdit; - } - export namespace Kanban { - - export interface KanbanSelection { - - /** It is used to clear all the card selection. - * @returns {void} - */ - clear(): void; - } - - export interface KanbanSwimlane { - - /** Expand all the swimlane rows in Kanban. - * @returns {void} - */ - expandAll(): void; - - /** Collapse all the swimlane rows in Kanban. - * @returns {void} - */ - collapseAll(): void; - - /** Expand or collapse the swimlane row based on the state of target "div" - * @param {any} Pass the div object to toggleSwimlane row based on its row state - * @returns {void} - */ - toggle($div: any): void; - } - - export interface KanbanFilter { - - /** Method used for send a clear search request to Kanban. - * @returns {void} - */ - clearSearch(): void; - - /** Send a search request to Kanban with specified string passed in it. - * @param {string} Pass the string to search in Kanban card - * @returns {void} - */ - searchCards(searchString: string): void; - - /** Send a clear request to filter cards in the kanban. - * @returns {void} - */ - clearFilter(): void; - - /** Send a filtering request to cards in the kanban. - * @returns {void} - */ - filterCards(): void; - } - - export interface KanbanEdit { - - /** Add a new card in Kanban control when allowAdding is set as true. If parameters are not given default dialog will be open. - * @param {string} Pass the primary key field Name of the column - * @param {Array} Pass the edited JSON data of card need to be add. - * @returns {void} - */ - addCard(primaryKey: string, card: any[]): void; - - /** Send a cancel request of add/edit card in Kanban when allowEditing/allowAdding is set as true. - * @returns {void} - */ - cancelEdit(): void; - - /** Delete a card in Kanban control when allowAdding/allowEditing is set as true. - * @param {string|number} Pass the key of card to be delete - * @returns {void} - */ - deleteCard(Key: string | number): void; - - /** Send a save request in Kanban when any card is in edit/new add card state and allowEditing/allowAdding is set as true. - * @returns {void} - */ - endEdit(): void; - - /** Send an edit card request in Kanban when allowEditing is set as true. Parameter will be HTML element or primary key - * @param {any} Pass the div selected row element to be edited in Kanban - * @returns {void} - */ - startEdit($div: any): void; - - /** Method used for set validation to a field during editing. - * @param {string} Specify the name of the column to set validation rules - * @param {any} Specify the validation rules for the field - * @returns {void} - */ - setValidationToField(name: string, rules: any): void; - } - - export interface Model { - - /** Gets or sets a value that indicates whether to enable allowDragAndDrop behavior on Kanban. - * @Default {true} - */ - allowDragAndDrop?: boolean; - - /** To enable or disable the title of the card. - * @Default {false} - */ - allowTitle?: boolean; - - /** Customize the settings for swim lane. - * @Default {Object} - */ - swimlaneSettings?: SwimlaneSettings; - - /** To enable or disable the column expand /collapse. - * @Default {false} - */ - allowToggleColumn?: boolean; - - /** To enable Searching operation in Kanban. - * @Default {false} - */ - allowSearching?: boolean; - - /** To enable filtering behavior on Kanban.User can specify query in filterSettings collection after enabling allowFiltering. - * @Default {false} - */ - allowFiltering?: boolean; - - /** Gets or sets a value that indicates whether to enable allowSelection behavior on Kanban.User can select card and the selected card will be highlighted on Kanban. - * @Default {true} - */ - allowSelection?: boolean; - - /** Gets or sets a value that indicates whether to allow card hover actions. - * @Default {true} - */ - allowHover?: boolean; - - /** To allow keyboard navigation actions. - * @Default {false} - */ - allowKeyboardNavigation?: boolean; - - /** Gets or sets a value that indicates whether to enable the scrollbar in the Kanban and view the card by scroll through the Kanban manually. - * @Default {false} - */ - allowScrolling?: boolean; - - /** Gets or sets a value that indicates whether to enable printing option. - * @Default {false} - */ - allowPrinting?: boolean; - - /** Gets or sets an object that indicates whether to customize the context menu behavior of the Kanban. - * @Default {Object} - */ - contextMenuSettings?: ContextMenuSettings; - - /** Gets or sets an object that indicates to render the Kanban with specified columns. - * @Default {Array} - */ - columns?: Column[]; - - /** Gets or sets an object that indicates whether to Customize the card settings. - * @Default {Object} - */ - cardSettings?: CardSettings; - - /** Gets or sets a value that indicates whether to add customToolbarItems within the toolbar to perform any action in the Kanban. - * @Default {[]} - */ - customToolbarItems?: CustomToolbarItem[]; - - /** Gets or sets a value that indicates to render the Kanban with custom theme. - */ - cssClass?: string; - - /** Gets or sets the data to render the Kanban with cards. - * @Default {null} - */ - dataSource?: any; - - /** To perform kanban functionalities with touch interaction. - * @Default {true} - */ - enableTouch?: boolean; - - /** Align content in the Kanban control align from right to left by setting the property as true. - * @Default {false} - */ - enableRTL?: boolean; - - /** To show total count of cards in each column. - * @Default {false} - */ - enableTotalCount?: boolean; - - /** Get or sets an object that indicates whether to customize the editing behavior of the Kanban. - * @Default {Object} - */ - editSettings?: EditSettings; - - /** To customize field mappings for card , editing title and control key parameters - * @Default {Object} - */ - fields?: Fields; - - /** To map datasource field for column values mapping - * @Default {null} - */ - keyField?: string; - - /** When set to true, adapts the Kanban layout to fit the screen size of devices on which it renders. - * @Default {false} - */ - isResponsive?: boolean; - - /** Gets or sets a value that indicates whether to set the minimum width of the responsive Kanban while isResponsive property is true. - * @Default {0} - */ - minWidth?: number; - - /** To customize the filtering behavior based on queries given. - * @Default {Array} - */ - filterSettings?: FilterSetting[]; - - /** ej Query to query database of Kanban. - * @Default {null} - */ - query?: any; - - /** To change the key in keyboard interaction to Kanban control. - * @Default {null} - */ - keySettings?: any; - - /** Gets or sets an object that indicates whether to customize the scrolling behavior of the Kanban. - * @Default {Object} - */ - scrollSettings?: ScrollSettings; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** To customize the searching behavior of the Kanban. - * @Default {Object} - */ - searchSettings?: SearchSettings; + /** Returns the kanban model. + */ + model?: any; - /** To allow customize selection type. Accepting types are "single" and "multiple". - * @Default {ej.Kanban.SelectionType.Single} - */ - selectionType?: ej.Kanban.SelectionType | string; + /** Returns the name of the event. + */ + type?: string; - /** Gets or sets an object that indicates to managing the collection of stacked header rows for the Kanban. - * @Default {Array} - */ - stackedHeaderRows?: StackedHeaderRow[]; + /** Returns the select cell index value. + */ + cellIndex?: number; - /** The tooltip allows to display card details in a tooltip while hovering on it. - */ - tooltipSettings?: TooltipSettings; + /** Returns the edited row index. + */ + rowIndex?: number; + } - /** Gets or sets an object that indicates to render the Kanban with specified workflows. - * @Default {Array} - */ - workflows?: Workflow[]; + export interface ContextOpenEventArgs { - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific - * to a particular country or region. - * @Default {en-US} - */ - locale?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggered for every Kanban action before its starts. */ - actionBegin?(e: ActionBeginEventArgs): void; + /** Returns the Kanban model. + */ + model?: any; - /** Triggered for every Kanban action success event. */ - actionComplete?(e: ActionCompleteEventArgs): void; + /** Returns the name of the event. + */ + type?: string; - /** Triggered for every Kanban action server failure event. */ - actionFailure?(e: ActionFailureEventArgs): void; + /** Returns the current item. + */ + currentTarget?: any; - /** Triggered before the task is going to be edited. */ - beginEdit?(e: BeginEditEventArgs): void; + /** Returns the status of contextmenu item which denotes its enabled state. + */ + status?: boolean; - /** Triggered before the card is going to be added */ - beginAdd?(e: BeginAddEventArgs): void; + /** Returns the target item. + */ + target?: any; + } - /** Triggered before the card is selected. */ - beforeCardSelect?(e: BeforeCardSelectEventArgs): void; + export interface ContextClickEventArgs { - /** Trigger after the card is clicked. */ - cardClick?(e: CardClickEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggered when the card is being dragged. */ - cardDrag?(e: CardDragEventArgs): void; + /** Returns the Kanban model. + */ + model?: any; - /** Triggered when card dragging start. */ - cardDragStart?(e: CardDragStartEventArgs): void; + /** Returns the name of the event. + */ + type?: string; - /** Triggered when card dragging stops. */ - cardDragStop?(e: CardDragStopEventArgs): void; + /** Returns the current item. + */ + currentTarget?: any; - /** Triggered when the card is Dropped. */ - cardDrop?(e: CardDropEventArgs): void; + /** Returns the status of contextmenu item which denotes its enabled state. + */ + status?: boolean; - /** Triggered after the card is selected. */ - cardSelect?(e: CardSelectEventArgs): void; + /** Returns the target item. + */ + target?: any; + } - /** Triggered when card is double clicked. */ - cardDoubleClick?(e: CardDoubleClickEventArgs): void; + export interface DataBoundEventArgs { - /** Triggered before the card is selected. */ - cardSelecting?(e: CardSelectingEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggered when the Kanban is rendered completely */ - create?(e: CreateEventArgs): void; + /** Returns the Kanban model. + */ + model?: any; - /** Triggers after the cell is clicked. */ - cellClick?(e: CellClickEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggered before the context menu is opened. */ - contextOpen?(e: ContextOpenEventArgs): void; + export interface DestroyEventArgs { - /** Triggered when context menu item is clicked in Kanban */ - contextClick?(e: ContextClickEventArgs): void; + /** Returns the kanban model. + */ + model?: any; - /** Triggered the Kanban is bound with data during initial rendering. */ - dataBound?(e: DataBoundEventArgs): void; + /** Returns deleted data. + */ + data?: any; - /** Triggered when Kanban going to destroy. */ - destroy?(e: DestroyEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggered after the card is deleted. */ - endDelete?(e: EndDeleteEventArgs): void; + export interface EndDeleteEventArgs { - /** Triggered after the card is edited. */ - endEdit?(e: EndEditEventArgs): void; + /** Returns the Kanban model. + */ + model?: any; - /** Triggers after the header is clicked. */ - headerClick?(e: HeaderClickEventArgs): void; + /** Returns request type. + */ + requestType?: string; - /** Triggered initial load. */ - load?(e: LoadEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggered every time a single card rendered request is made to access particular card information. */ - queryCellInfo?(e: QueryCellInfoEventArgs): void; + /** Returns deleted data. + */ + data?: any; - /** Triggered when toolbar item is clicked in Kanban. */ - toolbarClick?(e: ToolbarClickEventArgs): void; - } + /** Returns the name of the event. + */ + type?: string; - export interface ActionBeginEventArgs { + /** Current action name + */ + action?: string; + } - /** Returns the Kanban model. - */ - model?: any; + export interface EndEditEventArgs { - /** Returns the name of the event. - */ - type?: string; + /** Returns the Kanban model. + */ + model?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns request type. + */ + requestType?: string; - /** Returns the current action event type. - */ - originalEventType?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns primary key value. - */ - primaryKeyValue?: string; + /** Returns modified data. + */ + data?: any; - /** Returns request type. - */ - requestType?: string; + /** Returns the name of the event. + */ + type?: string; - /** Returns the edited row index. - */ - rowIndex?: number; + /** Current Action name + */ + action?: string; + } - /** Returns the card object (JSON). - */ - data?: any; + export interface HeaderClickEventArgs { - /** Returns current filtering object field name. - */ - currentFilteringobject?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns filter details. - */ - filterCollection?: any; - } + /** Returns the kanban model. + */ + model?: any; - export interface ActionCompleteEventArgs { + /** Returns the name of the event. + */ + type?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the select cell index value. + */ + cellIndex?: number; - /** Returns the Kanban model. - */ - model?: any; + /** Returns the column object. + */ + columnData?: any; + } - /** Returns request type. - */ - requestType?: string; + export interface LoadEventArgs { - /** Returns the name of the event. - */ - type?: string; + /** Returns the kanban model. + */ + model?: any; - /** Returns current action event type. - */ - originalEventType?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns primary key. - */ - primaryKey?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns primary key value. - */ - primaryKeyValue?: string; + export interface SwimlaneClickEventArgs { - /** Returns Kanban element. - */ - target?: any; + /** Current Action name while swim lane clicked. Actions are "expand" or "collapse" + */ + action?: string; - /** Returns the card object (JSON). - */ - data?: any; + /** Returns the kanban model. + */ + model?: any; - /** Returns the selectedRow index. - */ - selectedRow?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns current filtering column field name. - */ - currentFilteringColumn?: string; + /** Returns the name of the event. + */ + type?: string; - /** Returns filter details. - */ - filterCollection?: any; - } + /** Returns the swim lane group data's. + */ + data?: any; - export interface ActionFailureEventArgs { + /** Returns current swim lane row index. + */ + rowIndex?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns current target element. + */ + target?: any; + } - /** Returns the Kanban model. - */ - model?: any; + export interface QueryCellInfoEventArgs { - /** Returns request type. - */ - requestType?: string; + /** Returns Kanban card. + */ + card?: any; - /** Returns the name of the event. - */ - type?: string; + /** Returns Kanban card. + */ + cell?: any; - /** Returns the error return by server. - */ - error?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns current action event type. - */ - originalEventType?: string; + /** Returns current row record object (JSON). + */ + data?: any; - /** Returns primary key value. - */ - primaryKeyValue?: string; + /** Returns the column object. + */ + column?: any; - /** Returns Kanban element. - */ - target?: any; + /** Returns the Kanban model. + */ + model?: any; - /** Returns the card object (JSON). - */ - data?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns current filtering column field name. - */ - currentFilteringColumn?: string; + export interface ToolbarClickEventArgs { - /** Returns filter details. - */ - filterCollection?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface BeginEditEventArgs { + /** Returns the current item. + */ + currentTarget?: any; + + /** Returns the item id of that current element. + */ + itemId?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the item index of that current element. + */ + itemIndex?: number; + + /** Returns the item name of that current element. + */ + itemName?: string; - /** Returns the Kanban model. - */ - model?: any; + /** Returns the item text of that current element. + */ + itemText?: string; + + /** Returns the Kanban model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the toolbar object of the Kanban. + */ + toolbarData?: any; + } + + export interface SwimlaneSettingsUnassignedGroup { + + /** To enable or disable unassigned category change with swim lane key values. + * @Default {true} + */ + enable?: boolean; + + /** To set the user defined values which are need to categorized as unassigned category swim lane groups. + * @Default {[null,undefined,]} + */ + keys?: any[]; + } + + export interface SwimlaneSettings { + + /** To enable or disable items count in swim lane. + * @Default {true} + */ + showCount?: boolean; + + /** To enable or disable DragAndDrop across swim lane. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /** Customize the settings for unassigned category of swim lane. + * @Default {Object} + */ + unassignedGroup?: SwimlaneSettingsUnassignedGroup; + } + + export interface ContextMenuSettingsCustomMenuItem { + + /** Its sets target element to custom context menu item. + * @Default {ej.Kanban.Target.All} + */ + target?: ej.Kanban.Target|string; + + /** Gets the display name to custom menu item. + * @Default {null} + */ + text?: string; + + /** Gets the template to render custom context menu item. + * @Default {null} + */ + template?: string; + } + + export interface ContextMenuSettings { + + /** To enable context menu.All default context menu will show. + * @Default {false} + */ + enable?: boolean; + + /** Gets or sets a value that indicates the list of items needs to be disable from default context menu items. + * @Default {Array} + */ + disableDefaultItems?: any[]; + + /** Its used to add specific default context menu items. + * @Default {Array} + */ + menuItems?: any[]; + + /** Gets or sets a value that indicates whether to add custom contextMenu items. + * @Default {Array} + */ + customMenuItems?: ContextMenuSettingsCustomMenuItem[]; + } + + export interface ColumnsTotalCount { + + /** To customize the totalCount text properties. + * @Default {null} + */ + text?: string; + } + + export interface ColumnsConstraints { + + /** It is used to specify the type of constraints as column or swimlane. + * @Default {null} + */ + type?: string; + + /** It is used to specify the minimum amount of card in particular column cell or swimlane cell can hold. + * @Default {null} + */ + min?: number; + + /** It is used to specify the maximum amount of card in particular column cell or swimlane cell can hold. + * @Default {null} + */ + max?: number; + } + + export interface Column { + + /** Gets or sets an object that indicates to render the Kanban with specified columns header text. + * @Default {null} + */ + headerText?: string; + + /** To customize the totalCount properties. + * @Default {Object} + */ + totalCount?: ColumnsTotalCount; + + /** Gets or sets an object that indicates to render the Kanban with specified columns key. + * @Default {null} + */ + key?: string|number; + + /** To enable/disable allowDrop for specific column wise. + * @Default {true} + */ + allowDrop?: boolean; + + /** To enable/disable allowDrag for specific column wise. + * @Default {true} + */ + allowDrag?: boolean; + + /** To set column collapse or expand state + * @Default {false} + */ + isCollapsed?: boolean; + + /** To customize the column level constraints with minimum ,maximum limit validation. + * @Default {Object} + */ + constraints?: ColumnsConstraints; + + /** Gets or sets a value that indicates to add the template within the header element. + * @Default {null} + */ + headerTemplate?: string; + + /** Gets or sets an object that indicates to render the Kanban with specified columns width. + * @Default {null} + */ + width?: string|number; + + /** Gets or sets an object that indicates to set specific column visibility. + * @Default {true} + */ + visible?: boolean; + + /** Gets or sets an object that indicates whether to show add new button. + * @Default {false} + */ + showAddButton?: boolean; + } + + export interface CardSettings { + + /** Gets or sets a value that indicates to add the template for card . + * @Default {null} + */ + template?: string; + + /** To customize the card border color based on assigned task. Colors and corresponding values defined here will be mapped with colorField mapped data source column. + * @Default {Object} + */ + colorMapping?: any; + } + + export interface CustomToolbarItem { + + /** Gets the template to render customToolbarItems. + * @Default {null} + */ + template?: string; + } + + export interface EditSettingsEditItem { + + /** It is used to map editing field from the data source. + * @Default {null} + */ + field?: string; + + /** It is used to set the particular editType in the card for editing. + * @Default {ej.Kanban.EditingType.String} + */ + editType?: ej.Kanban.EditingType|string; + + /** Gets or sets a value that indicates to define constraints for saving data to the database. + * @Default {Object} + */ + validationRules?: any; + + /** It is used to set the particular editparams in the card for editing. + * @Default {Object} + */ + editParams?: any; + + /** It is used to specify defaultValue for the fields while adding new card. + * @Default {null} + */ + defaultValue?: string|number; + } + + export interface EditSettings { + + /** Gets or sets a value that indicates whether to enable the editing action in cards of Kanban. + * @Default {false} + */ + allowEditing?: boolean; + + /** Gets or sets a value that indicates whether to enable the adding action in cards behavior on Kanban. + * @Default {false} + */ + allowAdding?: boolean; + + /** This specifies the id of the template which is require to be edited using the Dialog Box. + * @Default {null} + */ + dialogTemplate?: string; + + /** Get or sets an object that indicates whether to customize the editMode of the Kanban. + * @Default {ej.Kanban.EditMode.Dialog} + */ + editMode?: ej.Kanban.EditMode|string; + + /** Get or sets an object that indicates whether to customize the editing fields of Kanban card. + * @Default {Array} + */ + editItems?: EditSettingsEditItem[]; + + /** This specifies the id of the template which is require to be edited using the External edit form. + * @Default {null} + */ + externalFormTemplate?: string; + + /** This specifies to set the position of an External edit form either in the right or bottom of the Kanban. + * @Default {ej.Kanban.FormPosition.Bottom} + */ + formPosition?: ej.Kanban.FormPosition|string; + } + + export interface Fields { + + /** The primarykey field is mapped to data source field. And this will used for Drag and drop and editing mainly. + * @Default {null} + */ + primaryKey?: string; + + /** To enable swimlane grouping based on the given key field from datasource mapping. + * @Default {null} + */ + swimlaneKey?: string; + + /** Priority field has been mapped data source field to maintain cards priority. + * @Default {null} + */ + priority?: string; + + /** Content field has been Mapped into card text. + * @Default {null} + */ + content?: string; + + /** Tag field has been Mapped into card tag. + * @Default {null} + */ + tag?: string; + + /** Title field has been Mapped to field in datasource for title content. If title field specified , card expand/collapse will be enabled with header and content section. + * @Default {null} + */ + title?: string; + + /** To customize the card has been Mapped into card color field. + * @Default {null} + */ + color?: string; + + /** ImageUrl field has been Mapped into card image. + * @Default {null} + */ + imageUrl?: string; + } + + export interface FilterSetting { + + /** Gets or sets an object of display name to filter queries. + * @Default {null} + */ + text?: string; + + /** Gets or sets an object that Queries to perform filtering + * @Default {Object} + */ + query?: any; + + /** Gets or sets an object of tooltip to filter buttons. + * @Default {null} + */ + description?: string; + } + + export interface ScrollSettings { + + /** Gets or sets an object that indicates to render the Kanban with specified scroll height. + * @Default {0} + */ + height?: string|number; + + /** Gets or sets an object that indicates to render the Kanban with specified scroll width. + * @Default {auto} + */ + width?: string|number; + + /** To allow the Kanban to freeze particular swimlane at the time of scrolling , until scroll reaches next swimlane and it continues. + * @Default {false} + */ + allowFreezeSwimlane?: boolean; + } + + export interface SearchSettings { + + /** To customize the fields the searching operation can be perform. + * @Default {Array} + */ + fields?: any[]; - /** Returns primary key value. - */ - primaryKeyValue?: string; + /** To customize the searching string. + */ + key?: string; - /** Returns begin edit data. - */ - data?: any; + /** To customize the operator based on searching. + * @Default {contains} + */ + operator?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** To customize the ignore case based on searching. + * @Default {true} + */ + ignoreCase?: boolean; + } - export interface BeginAddEventArgs { + export interface StackedHeaderRowsStackedHeaderColumn { - /** Returns the Kanban model. - */ - model?: any; + /** Gets or sets a value that indicates the headerText for the particular stacked header column. + * @Default {null} + */ + headerText?: string; - /** Returns primary key value. - */ - primaryKeyValue?: string; + /** Gets or sets a value that indicates the column for the particular stacked header column. + * @Default {null} + */ + column?: string; + } - /** Returns beginAdd data. - */ - data?: any; + export interface StackedHeaderRow { - /** Returns the name of the event. - */ - type?: string; - } + /** Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows. + * @Default {Array} + */ + stackedHeaderColumns?: StackedHeaderRowsStackedHeaderColumn[]; + } - export interface BeforeCardSelectEventArgs { + export interface TooltipSettings { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** To enable or disable the tooltip display. + * @Default {false} + */ + enable?: boolean; - /** Returns the select cell index value. - */ - cellIndex?: number; + /** To customize the tooltip display based on your requirements. + * @Default {null} + */ + template?: string; + } - /** Returns the select card index value. - */ - cardIndex?: number; + export interface Workflow { - /** Returns the select cell element - */ - currentCell?: any; + /** Gets or sets an object that indicates to render the Kanban with specified workflows key. + * @Default {null} + */ + key?: string|number; - /** Returns the previously select the card element - */ - previousCard?: any; + /** Gets or sets an object that indicates to render the Kanban with specified workflows allowed Transitions. + * @Default {null} + */ + allowedTransitions?: string; + } - /** Returns the previously select card indexes - */ - previousRowcellindex?: any[]; + enum Target { - /** Returns the Target item. - */ - Target?: any; + ///Sets context menu to Kanban header + Header, - /** Returns the Kanban model. - */ - model?: any; + ///Sets context menu to Kanban content + Content, - /** Returns select card data. - */ - data?: any; + ///Sets context menu to Kanban card + Card, - /** Returns the name of the event. - */ - type?: string; - } + ///Sets context menu to Kanban + All + } - export interface CardClickEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + enum EditMode { - /** Returns current record object (JSON). - */ - data?: any; + ///Creates Kanban with editMode as Dialog + Dialog, - /** Returns the current card to the Kanban. - */ - currentCard?: string; + ///Creates Kanban with editMode as DialogTemplate + DialogTemplate, - /** Returns Kanban element. - */ - target?: any; + ///Creates Kanban with editMode as ExternalForm + ExternalForm, - /** Returns the Kanban model. - */ - model?: any; + ///Creates Kanban with editMode as ExternalFormTemplate + ExternalFormTemplate + } - /** Returns the Header text of the column corresponding to the selected card. - */ - columnName?: string; - /** Returns the name of the event. - */ - type?: string; - } + enum EditingType { - export interface CardDragEventArgs { + ///Allows to set edit type as string edit type + String, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Allows to set edit type as numeric edit type + Numeric, - /** Returns drag data. - */ - data?: any; + ///Allows to set edit type as drop down edit type + Dropdown, - /** Returns drag start element. - */ - dragtarget?: any; + ///Allows to set edit type as date picker edit type + DatePicker, - /** Returns dragged element. - */ - draggedElement?: any; + ///Allows to set edit type as date time picker edit type + DateTimePicker, - /** Returns the Kanban model. - */ - model?: any; + ///Allows to set edit type as text area edit type + TextArea, - /** Returns the name of the event. - */ - type?: string; - } + ///Allows to set edit type as RTE edit type + RTE + } - export interface CardDragStartEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + enum FormPosition { - /** Returns card drag start data. - */ - data?: any; + ///Form position is bottom. + Bottom, - /** Returns dragged element. - */ - draggedElement?: any; + ///Form position is right. + Right + } - /** Returns the Kanban model. - */ - model?: any; - /** Returns drag start element. - */ - dragtarget?: any; + enum SelectionType { - /** Returns the name of the event. - */ - type?: string; - } + ///Support for Single selection in Kanban + Single, - export interface CardDragStopEventArgs { + ///Support for multiple selections in Kanban + Multiple + } - /** Returns the cancel option value. - */ - cancel?: boolean; + } - /** Returns dragged element. - */ - draggedElement?: any; + class Rotator extends ej.Widget { + static fn: Rotator; + constructor(element: JQuery | Element, options?: Rotator.Model); + static Locale: any; + model: Rotator.Model; + defaults: Rotator.Model; - /** Returns the Kanban model. - */ - model?: any; + /** Disables the Rotator control. + * @returns {void} + */ + disable(): void; - /** Returns drag stop element. - */ - droptarget?: any; + /** Enables the Rotator control. + * @returns {void} + */ + enable(): void; - /** Returns drag stop data. - */ - data?: any; + /** This method is used to get the current slide index. + * @returns {number} + */ + getIndex(): number; - /** Returns the name of the event. - */ - type?: string; - } + /** This method is used to move a slide to the specified index. + * @param {number} index of an slide + * @returns {void} + */ + gotoIndex(index: number): void; - export interface CardDropEventArgs { + /** This method is used to pause autoplay. + * @returns {void} + */ + pause(): void; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** This method is used to move slides continuously (or start autoplay) in the specified autoplay direction. + * @returns {void} + */ + play(): void; - /** Returns dragged element. - */ - draggedElement?: any; + /** This method is used to move to the next slide from the current slide. If the current slide is the last slide, then the first slide will be treated as the next slide. + * @returns {void} + */ + slideNext(): void; - /** Returns previous parent of dragged element - */ - draggedParent?: any; + /** This method is used to move to the previous slide from the current slide. If the current slide is the first slide, then the last slide will be treated as the previous slide. + * @returns {void} + */ + slidePrevious(): void; + + /** This method is used to update/modify the slide content of template rotator by using id based on index value. + * @param {number} index of an slide + * @param {string} id of a new updated slide + * @returns {void} + */ + updateTemplateById(index: number, id: string): void; + } + export namespace Rotator { + + export interface Model { + + /** Turns on keyboard interaction with the Rotator items. You must set this property to true to access the following keyboard shortcuts: + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Sets the animationSpeed of slide transition. + * @Default {600} + */ + animationSpeed?: string|number; + + /** Specifies the animationType type for the Rotator Item. animationType options include slide, fastSlide, slowSlide, and other custom easing animationTypes. + * @Default {slide} + */ + animationType?: string; + + /** Enables the circular mode item rotation. + * @Default {true} + */ + circularMode?: boolean; + + /** Specify the CSS class to Rotator to achieve custom theme. + */ + cssClass?: string; + + /** Specify the list of data which contains a set of data fields. Each data value is used to render an item for the Rotator. + * @Default {null} + */ + dataSource?: any; + + /** Sets the delay between the Rotator Items move after the slide transition. + * @Default {500} + */ + delay?: number; + + /** Specifies the number of Rotator Items to be displayed. + * @Default {1} + */ + displayItemsCount?: string|number; + + /** Rotates the Rotator Items continuously without user interference. + * @Default {false} + */ + enableAutoPlay?: boolean; + + /** Enables or disables the Rotator control. + * @Default {true} + */ + enabled?: boolean; + + /** Specifies right to left transition of slides. + * @Default {false} + */ + enableRTL?: boolean; + + /** Defines mapping fields for the data items of the Rotator. + * @Default {null} + */ + fields?: Fields; + + /** Sets the space between the Rotator Items. + */ + frameSpace?: string|number; + + /** Resizes the Rotator when the browser is resized. + * @Default {false} + */ + isResponsive?: boolean; + + /** Specifies the number of Rotator Items to navigate on a single click (next/previous/play buttons). The navigateSteps property value must be less than or equal to the + * displayItemsCount property value. + * @Default {1} + */ + navigateSteps?: string|number; + + /** Specifies the orientation for the Rotator control, that is, whether it must be rendered horizontally or vertically. See Orientation + * @Default {ej.Orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /** Specifies the position of the showPager in the Rotator Item. See PagerPosition + * @Default {outside} + */ + pagerPosition?: string|ej.Rotator.PagerPosition; + + /** Retrieves data from remote data. This property is applicable only when a remote data source is used. + * @Default {null} + */ + query?: string; + + /** If the Rotator Item is an image, you can specify a caption for the Rotator Item. The caption text for each Rotator Item must be set by using the title attribute of the respective + * tag. The caption cannot be displayed if multiple Rotator Items are present. + * @Default {false} + */ + showCaption?: boolean; + + /** Turns on or off the slide buttons (next and previous) in the Rotator Items. Slide buttons are used to navigate the Rotator Items. + * @Default {true} + */ + showNavigateButton?: boolean; + + /** Turns on or off the pager support in the Rotator control. The Pager is used to navigate the Rotator Items. + * @Default {true} + */ + showPager?: boolean; + + /** Enable play / pause button on rotator. + * @Default {false} + */ + showPlayButton?: boolean; + + /** Turns on or off thumbnail support in the Rotator control. Thumbnail is used to navigate between slides. Thumbnail supports only single slide transition You must specify the source + * for thumbnail elements through the thumbnailSourceID property. + * @Default {false} + */ + showThumbnail?: boolean; + + /** Sets the height of a Rotator Item. + */ + slideHeight?: string|number; + + /** Sets the width of a Rotator Item. + */ + slideWidth?: string|number; + + /** Sets the index of the slide that must be displayed first. + * @Default {0} + */ + startIndex?: string|number; + + /** Pause the auto play while hover on the rotator content. + * @Default {false} + */ + stopOnHover?: boolean; + + /** The template to display the Rotator widget with customized appearance. + * @Default {null} + */ + template?: string; + + /** The templateId enables to bind multiple customized template items in Rotator. + * @Default {null} + */ + templateId?: any[]; + + /** Specifies the source for thumbnail elements. + * @Default {null} + */ + thumbnailSourceID?: any; + + /** This event is fired when the Rotator slides are changed. + */ + change?(e: ChangeEventArgs): void; + + /** This event is fired when the Rotator control is initialized. + */ + create?(e: CreateEventArgs): void; + + /** This event is fired when the Rotator control is destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** This event is fired when a pager is clicked. + */ + pagerClick?(e: PagerClickEventArgs): void; + + /** This event is fired when enableAutoPlay is started. + */ + start?(e: StartEventArgs): void; + + /** This event is fired when autoplay is stopped or paused. + */ + stop?(e: StopEventArgs): void; + + /** This event is fired when a thumbnail pager is clicked. + */ + thumbItemClick?(e: ThumbItemClickEventArgs): void; + } + + export interface ChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the rotator model + */ + model?: ej.Rotator.Model; + + /** returns the name of the event + */ + type?: string; + + /** the current rotator id. + */ + itemId?: string; + + /** returns the current slide index. + */ + activeItemIndex?: number; + } + + export interface CreateEventArgs { - /** Returns dragged data. - */ - data?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the Kanban model. - */ - model?: any; + /** returns the rotator model + */ + model?: ej.Rotator.Model; - /** Returns drop element. - */ - target?: any; + /** returns the name of the event + */ + type?: string; + } - /** Returns the name of the event. - */ - type?: string; - } + export interface DestroyEventArgs { - export interface CardSelectEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the select cell index value. - */ - cellIndex?: number; + /** returns the rotator model + */ + model?: ej.Rotator.Model; - /** Returns the select card index value. - */ - cardIndex?: number; + /** returns the name of the event + */ + type?: string; + } - /** Returns the select cell element - */ - currentCell?: any; + export interface PagerClickEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the previously select the card element - */ - previousCard?: any; + /** returns the rotator model + */ + model?: ej.Rotator.Model; - /** Returns the previously select card indexes - */ - previousRowcellindex?: any[]; + /** returns the name of the event + */ + type?: string; - /** Returns the current item. - */ - currentTarget?: any; + /** the current rotator id. + */ + itemId?: string; - /** Returns the Kanban model. - */ - model?: any; + /** returns the current slide index. + */ + activeItemIndex?: number; + } - /** Returns select card data. - */ - data?: any; + export interface StartEventArgs { - /** Returns the name of the event. - */ - type?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface CardDoubleClickEventArgs { + /** returns the rotator model + */ + model?: ej.Rotator.Model; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** Returns current card object (JSON). - */ - data?: any; + /** the current rotator id. + */ + itemId?: string; - /** Returns the Kanban model. - */ - model?: any; + /** returns the current slide index. + */ + activeItemIndex?: number; + } - /** Returns the name of the event. - */ - type?: string; - } + export interface StopEventArgs { - export interface CardSelectingEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the selecting cell index value. - */ - cellIndex?: number; + /** returns the rotator model + */ + model?: ej.Rotator.Model; - /** Returns the selecting card index value. - */ - cardIndex?: number; + /** returns the name of the event + */ + type?: string; - /** Returns the selecting cell element - */ - currentCell?: any; + /** the current rotator id. + */ + itemId?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** returns the current slide index. + */ + activeItemIndex?: number; + } - /** Returns the previously selecting the card element - */ - previousCard?: any; + export interface ThumbItemClickEventArgs { - /** Returns the previously rowcell is selecting card indexes - */ - previousRowcellindex?: any[]; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the current item. - */ - currentTarget?: any; + /** returns the rotator model + */ + model?: ej.Rotator.Model; - /** Returns the Kanban model. - */ - model?: any; + /** returns the name of the event + */ + type?: string; - /** Returns added data. - */ - data?: any; + /** the current rotator id. + */ + itemId?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** returns the current slide index. + */ + activeItemIndex?: number; + } - export interface CreateEventArgs { + export interface Fields { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Specifies a link for the image. + */ + linkAttribute?: string; - /** Returns the kanban model. - */ - model?: any; + /** Specifies where to open a given link. + */ + targetAttribute?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Specifies a caption for the image. + */ + text?: string; + + /** Specifies a caption for the thumbnail image. + */ + thumbnailText?: string; + + /** Specifies the URL for an thumbnail image. + */ + thumbnailUrl?: string; + + /** Specifies the URL for an image. + */ + url?: string; + } + + enum PagerPosition { + + ///string + BottomLeft, + + ///string + BottomRight, + + ///string + Outside, + + ///string + TopCenter, + + ///string + TopLeft, + + ///string + TopRight + } + + } + + class RTE extends ej.Widget { + static fn: RTE; + constructor(element: JQuery | Element, options?: RTE.Model); + static Locale: any; + model: RTE.Model; + defaults: RTE.Model; + + /** Returns the range object. + * @returns {any} + */ + createRange(): any; + + /** Disables the RTE control. + * @returns {void} + */ + disable(): void; + + /** Disables the corresponding tool in the RTE ToolBar. + * @returns {void} + */ + disableToolbarItem(): void; + + /** Enables the RTE control. + * @returns {void} + */ + enable(): void; + + /** Enables the corresponding tool in the toolbar when the tool is disabled. + * @returns {void} + */ + enableToolbarItem(): void; + + /** Performs the action value based on the given command. + * @param {string} Command Name. + * @param {any} Content to be inserted as argument. + * @param {boolean} Boolean value to specify whether the argument is textnode or not, this is optional. + * @returns {void} + */ + executeCommand(cmdName: string, args: any, textnodeType?: boolean): void; + + /** Focuses the RTE control. + * @returns {void} + */ + focus(): void; + + /** Gets the command status of the selected text based on the given comment in the RTE control. + * @returns {boolean} + */ + getCommandStatus(): boolean; + + /** Gets the Document from the RTE control. + * @returns {Document} + */ + getDocument(): Document; + + /** Gets the HTML string from the RTE control. + * @returns {HTMLElement} + */ + getHtml(): HTMLElement; + + /** Gets the selected HTML string from the RTE control. + * @returns {HTMLElement} + */ + getSelectedHtml(): HTMLElement; + + /** Gets the content as string from the RTE control. + * @returns {string} + */ + getText(): string; + + /** Hides the RTE control. + * @returns {void} + */ + hide(): void; + + /** Inserts new item to the target contextmenu node. + * @returns {void} + */ + insertMenuOption(): void; + + /** Add a table column at the right or left of the specified cell + * @param {boolean} If it’s true, add a column at the left of the cell, otherwise add a column at the right of the cell + * @param {JQuery} Column will be added based on the given cell element + * @returns {HTMLElement} + */ + insertColumn(before?: boolean, cell?: JQuery): HTMLElement; + + /** To add a table row below or above the specified cell. + * @param {boolean} If it’s true, add a row before the cell, otherwise add a row after the cell + * @param {JQuery} Row will be added based on the given cell element + * @returns {HTMLElement} + */ + insertRow(before?: boolean, cell?: JQuery): HTMLElement; + + /** This method helps to insert/paste the content at the current cursor (caret) position or the selected content to be replaced with our text by passing the value as parameter to the + * pasteContent method in the Editor. + * @returns {void} + */ + pasteContent(): void; + + /** Refreshes the RTE control. + * @returns {void} + */ + refresh(): void; + + /** Removes the specified table column. + * @param {JQuery} Remove the given column element + * @returns {void} + */ + removeColumn(cell?: JQuery): void; + + /** Removes the specified table row. + * @param {JQuery} Remove the given row element + * @returns {void} + */ + removeRow(cell?: JQuery): void; + + /** Deletes the specified table. + * @param {JQuery} Remove the given table + * @returns {void} + */ + removeTable(table?: JQuery): void; + + /** Removes the target menu item from the RTE contextmenu. + * @returns {void} + */ + removeMenuOption(): void; + + /** Removes the given tool from the RTE Toolbar. + * @returns {void} + */ + removeToolbarItem(): void; + + /** Selects all the contents within the RTE. + * @returns {void} + */ + selectAll(): void; + + /** Selects the contents in the given range. + * @returns {void} + */ + selectRange(): void; + + /** Sets the color picker model type rendered initially in the RTE control. + * @returns {void} + */ + setColorPickerType(): void; + + /** Sets the HTML string from the RTE control. + * @returns {void} + */ + setHtml(): void; + + /** Displays the RTE control. + * @returns {void} + */ + show(): void; + } + export namespace RTE { + + export interface Model { + + /** Enables/disables the editing of the content. + * @Default {True} + */ + allowEditing?: boolean; + + /** RTE control can be accessed through the keyboard shortcut keys. + * @Default {True} + */ + allowKeyboardNavigation?: boolean; + + /** When the property is set to true, it focuses the RTE at the time of rendering. + * @Default {false} + */ + autoFocus?: boolean; + + /** Based on the content size, its height is adjusted instead of adding the scrollbar. + * @Default {false} + */ + autoHeight?: boolean; + + /** This API holds configuration setting for paste clenaup behavior. + * @Default {{ listConversion: false, cleanCSS: false, removeStyles: false, cleanElements: false }} + */ + pasteCleanupSettings?: PasteCleanupSettings; + + /** Sets the colorCode to display the color of the fontColor and backgroundColor in the font tools of the RTE. + * @Default {[000000, FFFFFF, C4C4C4, ADADAD, 595959, 262626, 4f81bd, dbe5f1, b8cce4, 95b3d7, 366092, 244061, c0504d, f2dcdb, e5b9b7, d99694, 953734,632423, 9bbb59, ebf1dd, d7e3bc, + * c3d69b, 76923c, 4f6128, 8064a2, e5e0ec, ccc1d9, b2a2c7, 5f497a, 3f3151, f79646, fdeada, fbd5b5, fac08f,e36c09, 974806]} + */ + colorCode?: any; + + /** The number of columns given are rendered in the color palate popup. + * @Default {6} + */ + colorPaletteColumns?: number; + + /** The number of rows given are rendered in the color palate popup. + * @Default {6} + */ + colorPaletteRows?: number; + + /** Sets the root class for the RTE theme. This cssClass API helps the usage of custom skinning option for the RTE control by including this root class in CSS. + */ + cssClass?: string; + + /** Enables/disables the RTE control’s accessibility or interaction. + * @Default {True} + */ + enabled?: boolean; + + /** When the property is set to true, it returns the encrypted text. + * @Default {false} + */ + enableHtmlEncode?: boolean; + + /** Maintain the values of the RTE after page reload. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Shows the resize icon and enables the resize option in the RTE. + * @Default {True} + */ + enableResize?: boolean; + + /** Shows the RTE in the RTL direction. + * @Default {false} + */ + enableRTL?: boolean; + + /** Formats the contents based on the XHTML rules. + * @Default {false} + */ + enableXHTML?: boolean; + + /** Enables the tab key action with the RichTextEditor content. + * @Default {True} + */ + enableTabKeyNavigation?: boolean; + + /** This API allows to enable url and fileName for pdf export. + * @Default {null} + */ + exportToPdfSettings?: ExportToPdfSettings; + + /** This API allows to enable url and fileName for word export. + * @Default {null} + */ + exportToWordSettings?: ExportToWordSettings; + + /** Load the external CSS file inside Iframe. + * @Default {null} + */ + externalCSS?: string; + + /** This API allows to enable the file browser support in the RTE control to browse, create, delete and upload the files in the specified current directory. + * @Default {null} + */ + fileBrowser?: FileBrowser; + + /** Sets the fontName in the RTE. + * @Default {{text: Segoe UI, value: Segoe UI },{text: Arial, value: Arial,Helvetica,sans-serif },{text: Courier New, value: Courier New,Courier,Monospace },{text: Georgia, value: + * Georgia,serif },{text: Impact, value: Impact,Charcoal,sans-serif },{text: Lucida Console, value: Lucida Console,Monaco,Monospace },{text: Tahoma, value: Tahoma,Geneva,sans-serif + * },{text: Times New Roman, value: Times New Roman },{text: Trebuchet MS, value: Trebuchet MS,Helvetica,sans-serif },{text: Verdana, value: Verdana,Geneva,sans-serif}} + */ + fontName?: any; + + /** Sets the fontSize in the RTE. + * @Default {{ text: 1, value: 1 },{ text: 2 (10pt), value: 2 },{ text: 3 (12pt), value: 3 },{ text: 4 (14pt), value: 4 },{ text: 5 (18pt), value: 5 },{ text: 6 (24pt), value: 6 },{ + * text: 7 (36pt), value: 7 }} + */ + fontSize?: any; + + /** Sets the format in the RTE. + * @Default {{ text: Paragraph, value: <p>, spriteCssClass: e-paragraph },{ text: Quotation, value: <blockquote>, spriteCssClass: e-quotation },{ text: Heading 1, value: + * <h1>, spriteCssClass: e-h1 },{ text: Heading 2, value: <h2>, spriteCssClass: e-h2 },{ text: Heading 3, value: <h3>, spriteCssClass: e-h3 },{ text: Heading 4, + * value: <h4>, spriteCssClass: e-h4 },{ text: Heading 5, value: <h5>, spriteCssClass: e-h5 },{ text: Heading 6, value: <h6>, spriteCssClass: e-h6}} + */ + format?: string; + + /** Defines the height of the RTE textbox. + * @Default {370} + */ + height?: string|number; + + /** Specifies the HTML Attributes of the ejRTE. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Sets the given attributes to the iframe body element. + * @Default {{}} + */ + iframeAttributes?: any; + + /** This API allows the image browser to support in the RTE control to browse, create, delete, and upload the image files to the specified current directory. + * @Default {null} + */ + imageBrowser?: ImageBrowser; + + /** This API allows to enable the url for connecting to RTE import. + * @Default {null} + */ + importSettings?: ImportSettings; + + /** Enables/disables responsive support for the RTE control toolbar items during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /** Sets the culture in the RTE when you set the localization values are needs to be assigned to the corresponding text as follows. + * @Default {en-US} + */ + locale?: string; + + /** Sets the maximum height for the RTE outer wrapper element. + * @Default {null} + */ + maxHeight?: string|number; + + /** Sets the maximum length for the RTE outer wrapper element. + * @Default {7000} + */ + maxLength?: number; + + /** Sets the maximum width for the RTE outer wrapper element. + * @Default {null} + */ + maxWidth?: string|number; + + /** Sets the minimum height for the RTE outer wrapper element. + * @Default {280} + */ + minHeight?: string|number; + + /** Sets the minimum width for the RTE outer wrapper element. + * @Default {400} + */ + minWidth?: string|number; + + /** Sets the name in the RTE. When the name value is not initialized, the ID value is assigned to the name. + */ + name?: string; + + /** Shows ClearAll icon in the RTE footer. + * @Default {false} + */ + showClearAll?: boolean; + + /** Shows the clear format in the RTE footer. + * @Default {true} + */ + showClearFormat?: boolean; + + /** Shows the Custom Table in the RTE. + * @Default {True} + */ + showCustomTable?: boolean; + + /** The showContextMenu property helps to enable custom context menu within editor area. + * @Default {True} + */ + showContextMenu?: boolean; + + /** This API is used to set the default dimensions for the image and video. When this property is set to true, the image and video dialog displays the dimension option. + * @Default {false} + */ + showDimensions?: boolean; + + /** Shows the FontOption in the RTE. + * @Default {True} + */ + showFontOption?: boolean; + + /** Shows footer in the RTE. When the footer is enabled, it displays the HTML tag, word Count, character count, clear format, resize icon and clear all the content icons, by default. + * @Default {false} + */ + showFooter?: boolean; + + /** Shows the HtmlSource in the RTE footer. + * @Default {false} + */ + showHtmlSource?: boolean; + + /** When the cursor is placed or when the text is selected in the RTE, it displays the tag info in the footer. + * @Default {True} + */ + showHtmlTagInfo?: boolean; + + /** Shows the toolbar in the RTE. + * @Default {True} + */ + showToolbar?: boolean; + + /** Counts the total characters and displays it in the RTE footer. + * @Default {True} + */ + showCharCount?: boolean; + + /** Enables or disables rounded corner UI look for RTE. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Counts the total words and displays it in the RTE footer. + * @Default {True} + */ + showWordCount?: boolean; + + /** The given number of columns render the insert table pop. + * @Default {10} + */ + tableColumns?: number; + + /** The given number of rows render the insert table pop. + * @Default {8} + */ + tableRows?: number; + + /** Sets the tools in the RTE and gets the inner display order of the corresponding group element. Tools are dependent on the toolsList property. + * @Default {formatStyle: [format],style: [bold, italic, underline, strikethrough],alignment: [justifyLeft, justifyCenter, justifyRight, justifyFull],lists: [unorderedList, + * orderedList],indenting: [outdent, indent],doAction: [undo, redo],links: [createLink,removeLink],images: [image],media: [video],tables: [createTable, addRowAbove, addRowBelow, + * addColumnLeft, addColumnRight, deleteRow, deleteColumn, deleteTable]],view:[“fullScreen”,zoomIn,zoomOut],print:[print]} + */ + tools?: Tools; + + /** Specifies the list of groups and order of those groups displayed in the RTE toolbar. The toolsList property is used to get the root group order and tools property is used to get + * the inner order of the corresponding groups displayed. When the value is not specified, it gets its default display order and tools. + * @Default {[formatStyle, font, style, effects, alignment, lists, indenting, clipboard, doAction, clear, links, images, media, tables, casing,view, customTools,print,edit]} + */ + toolsList?: any[]; + + /** Specifies the overflow mode for RTE responsive toolbar + * @Default {Popup} + */ + toolbarOverflowMode?: ej.RTE.ToolbarOverflowMode|string; + + /** Display the hints for the tools in the Toolbar. + * @Default {{ associate: mouseenter, showShadow: true, position: { stem: { horizontal: left, vertical: top } }, tip: { size: { width: 5, height: 5 }, isBalloon: false }} + */ + tooltipSettings?: any; + + /** Gets the undo stack limit. + * @Default {50} + */ + undoStackLimit?: number; + + /** The given string value is displayed in the editable area. + * @Default {null} + */ + value?: string; + + /** Sets the jQuery validation rules to the Rich Text Editor. + * @Default {null} + */ + validationRules?: any; + + /** Sets the jQuery validation error message to the Rich Text Editor. + * @Default {null} + */ + validationMessage?: any; + + /** Defines the width of the RTE textbox. + * @Default {786} + */ + width?: string|number; + + /** Increases and decreases the contents zoom range in percentage + * @Default {0.05} + */ + zoomStep?: string|number; + + /** Fires when changed successfully. + */ + change?(e: ChangeEventArgs): void; + + /** Fires when the RTE is created successfully + */ + create?(e: CreateEventArgs): void; + + /** Fires when mouse click on menu items. + */ + contextMenuClick?(e: ContextMenuClickEventArgs): void; + + /** Fires before the RTE is destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when the commands are executed successfully. + */ + execute?(e: ExecuteEventArgs): void; + + /** Fires when the keydown action is successful. + */ + keydown?(e: KeydownEventArgs): void; + + /** Fires when the keyup action is successful. + */ + keyup?(e: KeyupEventArgs): void; + + /** Fires before the RTE Edit area is rendered and after the toolbar is rendered. + */ + preRender?(e: PreRenderEventArgs): void; + + /** Fires when the text is selected in the text area + */ + select?(e: SelectEventArgs): void; + } + + export interface ChangeEventArgs { + + /** When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RTE model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } - export interface CellClickEventArgs { + export interface CreateEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** When the event is canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the kanban model. - */ - model?: any; + /** Returns the RTE model + */ + model?: any; - /** Returns the name of the event. - */ - type?: string; + /** Returns the name of the event + */ + type?: string; + } - /** Returns the select cell index value. - */ - cellIndex?: number; + export interface ContextMenuClickEventArgs { - /** Returns the edited row index. - */ - rowIndex?: number; - } + /** returns clicked menu item text. + */ + text?: string; - export interface ContextOpenEventArgs { + /** returns clicked menu item element. + */ + element?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** returns the selected item. + */ + selectedItem?: number; + } - /** Returns the Kanban model. - */ - model?: any; + export interface DestroyEventArgs { - /** Returns the name of the event. - */ - type?: string; + /** When the event is canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the current item. - */ - currentTarget?: any; + /** Returns the RTE model + */ + model?: any; - /** Returns the status of contextmenu item which denotes its enabled state. - */ - status?: boolean; + /** Returns the name of the event + */ + type?: string; + } - /** Returns the target item. - */ - target?: any; - } + export interface ExecuteEventArgs { - export interface ContextClickEventArgs { + /** When the event is canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the RTE model + */ + model?: any; - /** Returns the Kanban model. - */ - model?: any; + /** Returns the name of the event + */ + type?: string; + } - /** Returns the name of the event. - */ - type?: string; + export interface KeydownEventArgs { - /** Returns the current item. - */ - currentTarget?: any; + /** When the event is canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the status of contextmenu item which denotes its enabled state. - */ - status?: boolean; + /** Returns the RTE model + */ + model?: any; - /** Returns the target item. - */ - target?: any; - } + /** Returns the name of the event + */ + type?: string; + } - export interface DataBoundEventArgs { + export interface KeyupEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** When the event is canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the Kanban model. - */ - model?: any; + /** Returns the RTE model + */ + model?: any; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the name of the event + */ + type?: string; + } - export interface DestroyEventArgs { + export interface PreRenderEventArgs { - /** Returns the kanban model. - */ - model?: any; + /** When the event is canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns deleted data. - */ - data?: any; + /** Returns the RTE model + */ + model?: any; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the name of the event + */ + type?: string; + } - export interface EndDeleteEventArgs { + export interface SelectEventArgs { - /** Returns the Kanban model. - */ - model?: any; + /** When the event is canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns request type. - */ - requestType?: string; + /** Returns the RTE model + */ + model?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the name of the event + */ + type?: string; - /** Returns deleted data. - */ - data?: any; + /** Returns the event object + */ + event?: any; + } - /** Returns the name of the event. - */ - type?: string; + export interface PasteCleanupSettings { - /** Current action name - */ - action?: string; - } + /** This API is used to convert the list elements pasted from word document to editor. + * @Default {false} + */ + listConversion?: boolean; - export interface EndEditEventArgs { + /** This API is used to clean the unwanted css in the elements pasted from word document to editor. + * @Default {false} + */ + cleanCSS?: boolean; - /** Returns the Kanban model. - */ - model?: any; + /** This API is used to remove all styles in the elements pasted from word document to editor. + * @Default {false} + */ + removeStyles?: boolean; - /** Returns request type. - */ - requestType?: string; + /** This API is used to clean the unwanted elements pasted from word document to editor. + * @Default {false} + */ + cleanElements?: boolean; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface ExportToPdfSettings { - /** Returns modified data. - */ - data?: any; + /** This API is used to receive the server-side handler for export related operations. + */ + url?: string; - /** Returns the name of the event. - */ - type?: string; + /** Specifies the file name for the exported pdf file. + */ + fileName?: string; + } - /** Current Action name - */ - action?: string; - } + export interface ExportToWordSettings { - export interface HeaderClickEventArgs { + /** This API is used to receive the server-side handler for export related operations. + */ + url?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Specifies the file name for the exported word file. + */ + fileName?: string; + } - /** Returns the kanban model. - */ - model?: any; + export interface FileBrowser { - /** Returns the name of the event. - */ - type?: string; + /** This API is used to receive the server-side handler for file related operations. + */ + ajaxAction?: string; - /** Returns the select cell index value. - */ - cellIndex?: number; + /** Specifies the file type extension shown in the file browser window. + */ + extensionAllow?: string; - /** Returns the column object. - */ - columnData?: any; - } + /** Specifies the directory to perform operations like create, delete and rename folder and files, and upload the selected files to the current directory. + */ + filePath?: string; + } - export interface LoadEventArgs { + export interface ImageBrowser { - /** Returns the kanban model. - */ - model?: any; + /** This API is used to receive the server-side handler for the file related operations. + */ + ajaxAction?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Specifies the file type extension shown in the image browser window. + */ + extensionAllow?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Specifies the directory to perform operations like create, delete and rename folder and files, and upload the selected images to the current directory. + */ + filePath?: string; + } - export interface QueryCellInfoEventArgs { + export interface ImportSettings { - /** Returns Kanban card. - */ - card?: any; + /** This API is used to receive the server-side handler for import operations. + */ + url?: string; + } - /** Returns Kanban card. - */ - cell?: any; + export interface ToolsCustomOrderedList { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Specifies the name for customOrderedList item. + */ + name?: string; - /** Returns current row record object (JSON). - */ - data?: any; + /** Specifies the title for customOrderedList item. + */ + tooltip?: string; - /** Returns the column object. - */ - column?: any; + /** Specifies the styles for customOrderedList item. + */ + css?: string; - /** Returns the Kanban model. - */ - model?: any; + /** Specifies the text for customOrderedList item. + */ + text?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Specifies the list style for customOrderedList item. + */ + listStyle?: string; - export interface ToolbarClickEventArgs { + /** Specifies the image for customOrderedList item. + */ + listImage?: string; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface ToolsCustomUnorderedList { - /** Returns the current item. - */ - currentTarget?: any; - - /** Returns the item id of that current element. - */ - itemId?: string; + /** Specifies the name for customUnorderedList item. + */ + name?: string; - /** Returns the item index of that current element. - */ - itemIndex?: number; - - /** Returns the item name of that current element. - */ - itemName?: string; + /** Specifies the title for customUnorderedList item. + */ + tooltip?: string; - /** Returns the item text of that current element. - */ - itemText?: string; + /** Specifies the styles for customUnorderedList item. + */ + css?: string; - /** Returns the Kanban model. - */ - model?: any; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the toolbar object of the Kanban. - */ - toolbarData?: any; - } - - export interface SwimlaneSettingsUnassignedGroup { - - /** To enable or disable unassigned category change with swim lane key values. - * @Default {true} - */ - enable?: boolean; - - /** To set the user defined values which are need to categorized as unassigned category swim lane groups. - * @Default {[null,undefined,]} - */ - keys?: any[]; - } - - export interface SwimlaneSettings { - - /** To enable or disable items count in swim lane. - * @Default {true} - */ - showCount?: boolean; - - /** To enable or disable DragAndDrop across swim lane. - * @Default {false} - */ - allowDragAndDrop?: boolean; - - /** Customize the settings for unassigned category of swim lane. - * @Default {Object} - */ - unassignedGroup?: SwimlaneSettingsUnassignedGroup; - } - - export interface ContextMenuSettingsCustomMenuItem { - - /** Its sets target element to custom context menu item. - * @Default {ej.Kanban.Target.All} - */ - target?: ej.Kanban.Target | string; - - /** Gets the display name to custom menu item. - * @Default {null} - */ - text?: string; - - /** Gets the template to render custom context menu item. - * @Default {null} - */ - template?: string; - } - - export interface ContextMenuSettings { - - /** To enable context menu.All default context menu will show. - * @Default {false} - */ - enable?: boolean; - - /** Gets or sets a value that indicates the list of items needs to be disable from default context menu items. - * @Default {Array} - */ - disableDefaultItems?: any[]; - - /** Its used to add specific default context menu items. - * @Default {Array} - */ - menuItems?: any[]; - - /** Gets or sets a value that indicates whether to add custom contextMenu items. - * @Default {Array} - */ - customMenuItems?: ContextMenuSettingsCustomMenuItem[]; - } - - export interface ColumnsTotalCount { - - /** To customize the totalCount text properties. - * @Default {null} - */ - text?: string; - } - - export interface ColumnsConstraints { - - /** It is used to specify the type of constraints as column or swimlane. - * @Default {null} - */ - type?: string; - - /** It is used to specify the minimum amount of card in particular column cell or swimlane cell can hold. - * @Default {null} - */ - min?: number; - - /** It is used to specify the maximum amount of card in particular column cell or swimlane cell can hold. - * @Default {null} - */ - max?: number; - } - - export interface Column { - - /** Gets or sets an object that indicates to render the Kanban with specified columns header text. - * @Default {null} - */ - headerText?: string; - - /** To customize the totalCount properties. - * @Default {Object} - */ - totalCount?: ColumnsTotalCount; - - /** Gets or sets an object that indicates to render the Kanban with specified columns key. - * @Default {null} - */ - key?: string | number; - - /** To enable/disable allowDrop for specific column wise. - * @Default {true} - */ - allowDrop?: boolean; - - /** To enable/disable allowDrag for specific column wise. - * @Default {true} - */ - allowDrag?: boolean; - - /** To set column collapse or expand state - * @Default {false} - */ - isCollapsed?: boolean; - - /** To customize the column level constraints with minimum ,maximum limit validation. - * @Default {Object} - */ - constraints?: ColumnsConstraints; - - /** Gets or sets a value that indicates to add the template within the header element. - * @Default {null} - */ - headerTemplate?: string; - - /** Gets or sets an object that indicates to render the Kanban with specified columns width. - * @Default {null} - */ - width?: string | number; - - /** Gets or sets an object that indicates to set specific column visibility. - * @Default {true} - */ - visible?: boolean; - - /** Gets or sets an object that indicates whether to show add new button. - * @Default {false} - */ - showAddButton?: boolean; - } - - export interface CardSettings { - - /** Gets or sets a value that indicates to add the template for card . - * @Default {null} - */ - template?: string; - - /** To customize the card border color based on assigned task. Colors and corresponding values defined here will be mapped with colorField mapped data source column. - * @Default {Object} - */ - colorMapping?: any; - } - - export interface CustomToolbarItem { - - /** Gets the template to render customToolbarItems. - * @Default {null} - */ - template?: string; - } - - export interface EditSettingsEditItem { - - /** It is used to map editing field from the data source. - * @Default {null} - */ - field?: string; - - /** It is used to set the particular editType in the card for editing. - * @Default {ej.Kanban.EditingType.String} - */ - editType?: ej.Kanban.EditingType | string; - - /** Gets or sets a value that indicates to define constraints for saving data to the database. - * @Default {Object} - */ - validationRules?: any; - - /** It is used to set the particular editparams in the card for editing. - * @Default {Object} - */ - editParams?: any; - - /** It is used to specify defaultValue for the fields while adding new card. - * @Default {null} - */ - defaultValue?: string | number; - } - - export interface EditSettings { - - /** Gets or sets a value that indicates whether to enable the editing action in cards of Kanban. - * @Default {false} - */ - allowEditing?: boolean; - - /** Gets or sets a value that indicates whether to enable the adding action in cards behavior on Kanban. - * @Default {false} - */ - allowAdding?: boolean; - - /** This specifies the id of the template which is require to be edited using the Dialog Box. - * @Default {null} - */ - dialogTemplate?: string; - - /** Get or sets an object that indicates whether to customize the editMode of the Kanban. - * @Default {ej.Kanban.EditMode.Dialog} - */ - editMode?: ej.Kanban.EditMode | string; - - /** Get or sets an object that indicates whether to customize the editing fields of Kanban card. - * @Default {Array} - */ - editItems?: EditSettingsEditItem[]; - - /** This specifies the id of the template which is require to be edited using the External edit form. - * @Default {null} - */ - externalFormTemplate?: string; - - /** This specifies to set the position of an External edit form either in the right or bottom of the Kanban. - * @Default {ej.Kanban.FormPosition.Bottom} - */ - formPosition?: ej.Kanban.FormPosition | string; - } - - export interface Fields { - - /** The primarykey field is mapped to data source field. And this will used for Drag and drop and editing mainly. - * @Default {null} - */ - primaryKey?: string; - - /** To enable swimlane grouping based on the given key field from datasource mapping. - * @Default {null} - */ - swimlaneKey?: string; - - /** Priority field has been mapped data source field to maintain cards priority. - * @Default {null} - */ - priority?: string; - - /** Content field has been Mapped into card text. - * @Default {null} - */ - content?: string; - - /** Tag field has been Mapped into card tag. - * @Default {null} - */ - tag?: string; - - /** Title field has been Mapped to field in datasource for title content. If title field specified , card expand/collapse will be enabled with header and content section. - * @Default {null} - */ - title?: string; - - /** To customize the card has been Mapped into card color field. - * @Default {null} - */ - color?: string; - - /** ImageUrl field has been Mapped into card image. - * @Default {null} - */ - imageUrl?: string; - } - - export interface FilterSetting { - - /** Gets or sets an object of display name to filter queries. - * @Default {null} - */ - text?: string; - - /** Gets or sets an object that Queries to perform filtering - * @Default {Object} - */ - query?: any; - - /** Gets or sets an object of tooltip to filter buttons. - * @Default {null} - */ - description?: string; - } - - export interface ScrollSettings { - - /** Gets or sets an object that indicates to render the Kanban with specified scroll height. - * @Default {0} - */ - height?: string | number; - - /** Gets or sets an object that indicates to render the Kanban with specified scroll width. - * @Default {auto} - */ - width?: string | number; - - /** To allow the Kanban to freeze particular swimlane at the time of scrolling , until scroll reaches next swimlane and it continues. - * @Default {false} - */ - allowFreezeSwimlane?: boolean; - } - - export interface SearchSettings { - - /** To customize the fields the searching operation can be perform. - * @Default {Array} - */ - fields?: any[]; + /** Specifies the text for customUnorderedList item. + */ + text?: string; - /** To customize the searching string. - */ - key?: string; + /** Specifies the list style for customUnorderedList item. + */ + listStyle?: string; - /** To customize the operator based on searching. - * @Default {contains} - */ - operator?: string; + /** Specifies the image for customUnorderedList item. + */ + listImage?: string; + } - /** To customize the ignore case based on searching. - * @Default {true} - */ - ignoreCase?: boolean; - } + export interface Tools { - export interface StackedHeaderRowsStackedHeaderColumn { + /** Specifies the alignment tools and the display order of this tool in the RTE toolbar. + */ + alignment?: any; - /** Gets or sets a value that indicates the headerText for the particular stacked header column. - * @Default {null} - */ - headerText?: string; + /** Specifies the casing tools and the display order of this tool in the RTE toolbar. + */ + casing?: any[]; - /** Gets or sets a value that indicates the column for the particular stacked header column. - * @Default {null} - */ - column?: string; - } + /** Specifies the clear tools and the display order of this tool in the RTE toolbar. + */ + clear?: any[]; - export interface StackedHeaderRow { + /** Specifies the clipboard tools and the display order of this tool in the RTE toolbar. + */ + clipboard?: any[]; - /** Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows. - * @Default {Array} - */ - stackedHeaderColumns?: StackedHeaderRowsStackedHeaderColumn[]; - } + /** Specifies the edit tools and the displays tool in the RTE toolbar. + */ + edit?: any[]; - export interface TooltipSettings { + /** Specifies the doAction tools and the display order of this tool in the RTE toolbar. + */ + doAction?: any[]; - /** To enable or disable the tooltip display. - * @Default {false} - */ - enable?: boolean; + /** Specifies the effect of tools and the display order of this tool in RTE toolbar. + */ + effects?: any[]; - /** To customize the tooltip display based on your requirements. - * @Default {null} - */ - template?: string; - } + /** Specifies the font tools and the display order of this tool in the RTE toolbar. + */ + font?: any[]; - export interface Workflow { + /** Specifies the formatStyle tools and the display order of this tool in the RTE toolbar. + */ + formatStyle?: any[]; - /** Gets or sets an object that indicates to render the Kanban with specified workflows key. - * @Default {null} - */ - key?: string | number; + /** Specifies the image tools and the display order of this tool in the RTE toolbar. + */ + images?: any[]; + + /** Specifies the indent tools and the display order of this tool in the RTE toolbar. + */ + indenting?: any[]; - /** Gets or sets an object that indicates to render the Kanban with specified workflows allowed Transitions. - * @Default {null} - */ - allowedTransitions?: string; - } + /** Specifies the link tools and the display order of this tool in the RTE toolbar. + */ + links?: any[]; + + /** Specifies the list tools and the display order of this tool in the RTE toolbar. + */ + lists?: any[]; + + /** Specifies the media tools and the display order of this tool in the RTE toolbar. + */ + media?: any[]; + + /** Specifies the style tools and the display order of this tool in the RTE toolbar. + */ + style?: any[]; + + /** Specifies the table tools and the display order of this tool in the RTE toolbar. + */ + tables?: any[]; + + /** Specifies the view tools and the display order of this tool in the RTE toolbar. + */ + view?: any[]; + + /** Specifies the print tools and the display order of this tool in the RTE toolbar. + */ + print?: any[]; + + /** Specifies the importExport tools and the display order of this tool in the RTE toolbar. + */ + importExport?: any[]; + + /** Specifies the customOrderedList tools and the display order of this tool in the RTE toolbar. + */ + customOrderedList?: ToolsCustomOrderedList[]; + + /** Specifies the customUnOrderedList tools and the display order of this tool in the RTE toolbar. + */ + customUnorderedList?: ToolsCustomUnorderedList[]; + } + + enum ToolbarOverflowMode { + + ///To display the RTE toolbar overflow items as popup + Popup, + + ///To display the RTE toolbar overflow items as inline toolbar + Inline + } + + } + + class Slider extends ej.Widget { + static fn: Slider; + constructor(element: JQuery | Element, options?: Slider.Model); + static Locale: any; + model: Slider.Model; + defaults: Slider.Model; + + /** To disable the slider + * @returns {void} + */ + disable(): void; + + /** To enable the slider + * @returns {void} + */ + enable(): void; + + /** To get value from slider handle + * @returns {number} + */ + getValue(): number; + + /** To set value to slider handle.By default animation is false while set the value. If you want to enable the animation, pass the enableAnimation as true to this method. + * @returns {void} + */ + setValue(): void; + } + export namespace Slider { + + export interface Model { + + /** Specifies the allowMouseWheel of the slider. + * @Default {false} + */ + allowMouseWheel?: boolean; + + /** Specifies the animationSpeed of the slider. + * @Default {500} + */ + animationSpeed?: number; + + /** Specify the CSS class to slider to achieve custom theme. + */ + cssClass?: string; + + /** Specifies the animation behavior of the slider. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Specifies the state of the slider. + * @Default {true} + */ + enabled?: boolean; + + /** Specify the enablePersistence to slider to save current model value to browser cookies for state maintains + * @Default {false} + */ + enablePersistence?: boolean; + + /** Specifies the Right to Left Direction of the slider. + * @Default {false} + */ + enableRTL?: boolean; + + /** Specifies the height of the slider. + * @Default {14} + */ + height?: string; + + /** Specifies the HTML Attributes of the ejSlider. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specifies the incremental step value of the slider. + * @Default {1} + */ + incrementStep?: number; + + /** Specifies the distance between two major (large) ticks from the scale of the slider. + * @Default {10} + */ + largeStep?: number; + + /** Specifies the ending value of the slider. + * @Default {100} + */ + maxValue?: number; + + /** Specifies the starting value of the slider. + * @Default {0} + */ + minValue?: number; + + /** Specifies the orientation of the slider. + * @Default {ej.orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /** Specifies the readOnly of the slider. + * @Default {false} + */ + readOnly?: boolean; + + /** Specifies the rounded corner behavior for slider. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Shows/Hide the major (large) and minor (small) ticks in the scale of the slider. + * @Default {false} + */ + showScale?: boolean; + + /** Specifies the small ticks from the scale of the slider. + * @Default {true} + */ + showSmallTicks?: boolean; + + /** Specifies the showTooltip to shows the current Slider value, while moving the Slider handle or clicking on the slider handle of the slider. + * @Default {true} + */ + showTooltip?: boolean; + + /** Specifies the sliderType of the slider. + * @Default {ej.SliderType.Default} + */ + sliderType?: ej.slider.sliderType|string; + + /** Specifies the distance between two minor (small) ticks from the scale of the slider. + * @Default {1} + */ + smallStep?: number; + + /** Specifies the value of the slider. But it's not applicable for range slider. To range slider we can use values property. + * @Default {0} + */ + value?: number; + + /** Specifies the values of the range slider. But it's not applicable for default and minRange sliders. we can use value property for default and minRange sliders. + * @Default {[minValue,maxValue]} + */ + values?: any[]; + + /** Specifies the width of the slider. + * @Default {100%} + */ + width?: string; + + /** Fires once Slider control value is changed successfully. + */ + change?(e: ChangeEventArgs): void; + + /** Fires once Slider control has been created successfully. + */ + create?(e: CreateEventArgs): void; + + /** Fires when Slider control has been destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires once Slider control is sliding successfully. + */ + slide?(e: SlideEventArgs): void; + + /** Fires once Slider control is started successfully. + */ + start?(e: StartEventArgs): void; + + /** Fires when Slider control is stopped successfully. + */ + stop?(e: StopEventArgs): void; + + /** Fires when display the custom tooltip. + */ + tooltipChange?(e: TooltipChangeEventArgs): void; + } + + export interface ChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns current handle number or index + */ + sliderIndex?: number; + + /** returns slider id. + */ + id?: string; + + /** returns the slider model. + */ + model?: ej.Slider.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the slider value. + */ + value?: number; - enum Target { + /** returns true if event triggered by interaction else returns false. + */ + isInteraction?: boolean; + } - ///Sets context menu to Kanban header - Header, + export interface CreateEventArgs { - ///Sets context menu to Kanban content - Content, + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - ///Sets context menu to Kanban card - Card, + /** returns the slider model + */ + model?: ej.Slider.Model; - ///Sets context menu to Kanban - All - } + /** returns the name of the event + */ + type?: string; + } + export interface DestroyEventArgs { - enum EditMode { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - ///Creates Kanban with editMode as Dialog - Dialog, + /** returns the slider model + */ + model?: ej.Slider.Model; - ///Creates Kanban with editMode as DialogTemplate - DialogTemplate, + /** returns the name of the event + */ + type?: string; + } - ///Creates Kanban with editMode as ExternalForm - ExternalForm, + export interface SlideEventArgs { - ///Creates Kanban with editMode as ExternalFormTemplate - ExternalFormTemplate - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + /** returns current handle number or index + */ + sliderIndex?: number; - enum EditingType { + /** returns slider id + */ + id?: string; - ///Allows to set edit type as string edit type - String, + /** returns the slider model + */ + model?: ej.Slider.Model; - ///Allows to set edit type as numeric edit type - Numeric, + /** returns the name of the event + */ + type?: string; + + /** returns the slider value + */ + value?: number; + } + + export interface StartEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns current handle number or index + */ + sliderIndex?: number; + + /** returns slider id + */ + id?: string; + + /** returns the slider model + */ + model?: ej.Slider.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the slider value + */ + value?: number; + } + + export interface StopEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns current handle number or index + */ + sliderIndex?: number; + + /** returns slider id + */ + id?: string; + + /** returns the slider model + */ + model?: ej.Slider.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the slider value + */ + value?: number; + } + + export interface TooltipChangeEventArgs { + + /** returns the cancel option value. + */ + cancel?: boolean; + + /** returns slider id. + */ + id?: string; + + /** returns true if event triggered by interaction else returns false. + */ + isInteraction?: boolean; + + /** returns the slider model. + */ + model?: ej.Slider.Model; + + /** returns current handle number or index + */ + sliderIndex?: number; + + /** returns the name of the event. + */ + type?: string; + + /** returns the slider value. + */ + value?: number; + } + } + namespace slider { + enum sliderType { + //Shows default slider + Default, + //Shows minRange slider + MinRange, + //Shows Range slider + Range, + } + } + + class SplitButton extends ej.Widget { + static fn: SplitButton; + constructor(element: JQuery | Element, options?: SplitButton.Model); + static Locale: any; + model: SplitButton.Model; + defaults: SplitButton.Model; + + /** Destroy the split button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To disable the split button + * @returns {void} + */ + disable(): void; + + /** To Enable the split button + * @returns {void} + */ + enable(): void; + + /** To hide the list content of the split button. + * @returns {void} + */ + hide(): void; + + /** To show the list content of the split button. + * @returns {void} + */ + show(): void; + } + export namespace SplitButton { + + export interface Model { + + /** Specifies the arrowPosition of the Split or Dropdown Button.See arrowPosition + * @Default {ej.ArrowPosition.Right} + */ + arrowPosition?: string|ej.ArrowPosition; + + /** Specifies the buttonMode like Split or Dropdown Button.See ButtonMode + * @Default {ej.ButtonMode.Split} + */ + buttonMode?: string|ej.ButtonMode; + + /** Specifies the contentType of the Split Button.See ContentType + * @Default {ej.ContentType.TextOnly} + */ + contentType?: string|ej.ContentType; + + /** Set the root class for Split Button control theme + */ + cssClass?: string; + + /** Specifies the disabling of Split Button if enabled is set to false. + * @Default {true} + */ + enabled?: boolean; + + /** Specifies the enableRTL property for Split Button while initialization. + * @Default {false} + */ + enableRTL?: boolean; + + /** Specifies the height of the Split Button. + * @Default {“”} + */ + height?: string|number; + + /** Specifies the HTML Attributes of the Split Button. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specifies the imagePosition of the Split Button.See imagePositions + * @Default {ej.ImagePosition.ImageRight} + */ + imagePosition?: string|ej.ImagePosition; + + /** Specifies the image content for Split Button while initialization. + */ + prefixIcon?: string; + + /** Specifies the showRoundedCorner property for Split Button while initialization. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies the size of the Button. See ButtonSize + * @Default {ej.ButtonSize.Normal} + */ + size?: string|ej.ButtonSize; + + /** Specifies the image content for Split Button while initialization. + */ + suffixIcon?: string; + + /** Specifies the list content for Split Button while initialization + */ + targetID?: string; + + /** Specifies the text content for Split Button while initialization. + */ + text?: string; + + /** Specifies the width of the Split Button. + * @Default {“”} + */ + width?: string|number; + + /** Fires before menu of the split button control is opened. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + + /** Fires when Button control is clicked successfully + */ + click?(e: ClickEventArgs): void; + + /** Fires before the list content of Button control is closed + */ + close?(e: CloseEventArgs): void; + + /** Fires after Split Button control is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the Split Button is destroyed successfully + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when a menu item is Hovered out successfully + */ + itemMouseOut?(e: ItemMouseOutEventArgs): void; + + /** Fires when a menu item is Hovered in successfully + */ + itemMouseOver?(e: ItemMouseOverEventArgs): void; + + /** Fires when a menu item is clicked successfully + */ + itemSelected?(e: ItemSelectedEventArgs): void; + + /** Fires before the list content of Button control is opened + */ + open?(e: OpenEventArgs): void; + } + + export interface BeforeOpenEventArgs { - ///Allows to set edit type as drop down edit type - Dropdown, + /** returns the cancel option value + */ + cancel?: boolean; - ///Allows to set edit type as date picker edit type - DatePicker, + /** returns the split button model + */ + model?: ej.SplitButton.Model; - ///Allows to set edit type as date time picker edit type - DateTimePicker, + /** returns the name of the event + */ + type?: string; + } - ///Allows to set edit type as text area edit type - TextArea, + export interface ClickEventArgs { - ///Allows to set edit type as RTE edit type - RTE - } + /** returns the cancel option value + */ + cancel?: boolean; + /** returns the split button model + */ + model?: ej.SplitButton.Model; - enum FormPosition { + /** returns the name of the event + */ + type?: string; - ///Form position is bottom. - Bottom, + /** returns the target of the current object. + */ + target?: any; - ///Form position is right. - Right - } + /** return the button state + */ + status?: boolean; + } + export interface CloseEventArgs { - enum SelectionType { + /** returns the cancel option value + */ + cancel?: boolean; - ///Support for Single selection in Kanban - Single, + /** returns the split button model + */ + model?: ej.SplitButton.Model; - ///Support for multiple selections in Kanban - Multiple - } + /** returns the name of the event + */ + type?: string; + } - } + export interface CreateEventArgs { - class Rotator extends ej.Widget { - static fn: Rotator; - constructor(element: JQuery | Element, options?: Rotator.Model); - static Locale: any; - model: Rotator.Model; - defaults: Rotator.Model; + /** returns the cancel option value + */ + cancel?: boolean; - /** Disables the Rotator control. - * @returns {void} - */ - disable(): void; + /** returns the split button model + */ + model?: ej.SplitButton.Model; - /** Enables the Rotator control. - * @returns {void} - */ - enable(): void; + /** returns the name of the event + */ + type?: string; + } - /** This method is used to get the current slide index. - * @returns {number} - */ - getIndex(): number; + export interface DestroyEventArgs { - /** This method is used to move a slide to the specified index. - * @param {number} index of an slide - * @returns {void} - */ - gotoIndex(index: number): void; + /** returns the cancel option value + */ + cancel?: boolean; - /** This method is used to pause autoplay. - * @returns {void} - */ - pause(): void; + /** returns the split button model + */ + model?: ej.SplitButton.Model; - /** This method is used to move slides continuously (or start autoplay) in the specified autoplay direction. - * @returns {void} - */ - play(): void; + /** returns the name of the event + */ + type?: string; + } - /** This method is used to move to the next slide from the current slide. If the current slide is the last slide, then the first slide will be treated as the next slide. - * @returns {void} - */ - slideNext(): void; + export interface ItemMouseOutEventArgs { - /** This method is used to move to the previous slide from the current slide. If the current slide is the first slide, then the last slide will be treated as the previous slide. - * @returns {void} - */ - slidePrevious(): void; - - /** This method is used to update/modify the slide content of template rotator by using id based on index value. - * @param {number} index of an slide - * @param {string} id of a new updated slide - * @returns {void} - */ - updateTemplateById(index: number, id: string): void; - } - export namespace Rotator { - - export interface Model { - - /** Turns on keyboard interaction with the Rotator items. You must set this property to true to access the following keyboard shortcuts: - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** Sets the animationSpeed of slide transition. - * @Default {600} - */ - animationSpeed?: string | number; - - /** Specifies the animationType type for the Rotator Item. animationType options include slide, fastSlide, slowSlide, and other custom easing animationTypes. - * @Default {slide} - */ - animationType?: string; - - /** Enables the circular mode item rotation. - * @Default {true} - */ - circularMode?: boolean; - - /** Specify the CSS class to Rotator to achieve custom theme. - */ - cssClass?: string; - - /** Specify the list of data which contains a set of data fields. Each data value is used to render an item for the Rotator. - * @Default {null} - */ - dataSource?: any; - - /** Sets the delay between the Rotator Items move after the slide transition. - * @Default {500} - */ - delay?: number; - - /** Specifies the number of Rotator Items to be displayed. - * @Default {1} - */ - displayItemsCount?: string | number; - - /** Rotates the Rotator Items continuously without user interference. - * @Default {false} - */ - enableAutoPlay?: boolean; - - /** Enables or disables the Rotator control. - * @Default {true} - */ - enabled?: boolean; - - /** Specifies right to left transition of slides. - * @Default {false} - */ - enableRTL?: boolean; - - /** Defines mapping fields for the data items of the Rotator. - * @Default {null} - */ - fields?: Fields; - - /** Sets the space between the Rotator Items. - */ - frameSpace?: string | number; - - /** Resizes the Rotator when the browser is resized. - * @Default {false} - */ - isResponsive?: boolean; - - /** Specifies the number of Rotator Items to navigate on a single click (next/previous/play buttons). - * The navigateSteps property value must be less than or equal to the displayItemsCount property value. - * @Default {1} - */ - navigateSteps?: string | number; - - /** Specifies the orientation for the Rotator control, that is, whether it must be rendered horizontally or vertically. See Orientation - * @Default {ej.Orientation.Horizontal} - */ - orientation?: ej.Orientation | string; - - /** Specifies the position of the showPager in the Rotator Item. See PagerPosition - * @Default {outside} - */ - pagerPosition?: string | ej.Rotator.PagerPosition; - - /** Retrieves data from remote data. This property is applicable only when a remote data source is used. - * @Default {null} - */ - query?: string; - - /** If the Rotator Item is an image, you can specify a caption for the Rotator Item. The caption text for each Rotator Item must be set by using the title attribute of the respective tag. - * The caption cannot be displayed if multiple Rotator Items are present. - * @Default {false} - */ - showCaption?: boolean; - - /** Turns on or off the slide buttons (next and previous) in the Rotator Items. Slide buttons are used to navigate the Rotator Items. - * @Default {true} - */ - showNavigateButton?: boolean; - - /** Turns on or off the pager support in the Rotator control. The Pager is used to navigate the Rotator Items. - * @Default {true} - */ - showPager?: boolean; - - /** Enable play / pause button on rotator. - * @Default {false} - */ - showPlayButton?: boolean; - - /** Turns on or off thumbnail support in the Rotator control. Thumbnail is used to navigate between slides. Thumbnail supports only single slide transition - * You must specify the source for thumbnail elements through the thumbnailSourceID property. - * @Default {false} - */ - showThumbnail?: boolean; - - /** Sets the height of a Rotator Item. - */ - slideHeight?: string | number; - - /** Sets the width of a Rotator Item. - */ - slideWidth?: string | number; - - /** Sets the index of the slide that must be displayed first. - * @Default {0} - */ - startIndex?: string | number; - - /** Pause the auto play while hover on the rotator content. - * @Default {false} - */ - stopOnHover?: boolean; - - /** The template to display the Rotator widget with customized appearance. - * @Default {null} - */ - template?: string; - - /** The templateId enables to bind multiple customized template items in Rotator. - * @Default {null} - */ - templateId?: any[]; - - /** Specifies the source for thumbnail elements. - * @Default {null} - */ - thumbnailSourceID?: any; - - /** This event is fired when the Rotator slides are changed. */ - change?(e: ChangeEventArgs): void; - - /** This event is fired when the Rotator control is initialized. */ - create?(e: CreateEventArgs): void; - - /** This event is fired when the Rotator control is destroyed. */ - destroy?(e: DestroyEventArgs): void; - - /** This event is fired when a pager is clicked. */ - pagerClick?(e: PagerClickEventArgs): void; - - /** This event is fired when enableAutoPlay is started. */ - start?(e: StartEventArgs): void; - - /** This event is fired when autoplay is stopped or paused. */ - stop?(e: StopEventArgs): void; - - /** This event is fired when a thumbnail pager is clicked. */ - thumbItemClick?(e: ThumbItemClickEventArgs): void; - } - - export interface ChangeEventArgs { + /** returns the cancel option value + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the split button model + */ + model?: ej.SplitButton.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the clicked menu item element + */ + element?: any; + + /** return the menu item id + */ + ID?: string; + + /** return the clicked menu item text + */ + Text?: string; + } + + export interface ItemMouseOverEventArgs { + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the split button model + */ + model?: ej.SplitButton.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the clicked menu item element + */ + element?: any; + + /** return the menu item id + */ + ID?: string; + + /** return the clicked menu item text + */ + Text?: string; + } + + export interface ItemSelectedEventArgs { + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the split button model + */ + model?: ej.SplitButton.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the clicked menu item element + */ + element?: any; + + /** returns the selected item + */ + selectedItem?: any; + + /** return the menu id + */ + menuId?: string; + + /** return the clicked menu item text + */ + menuText?: string; + } + + export interface OpenEventArgs { + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the split button model + */ + model?: ej.SplitButton.Model; + + /** returns the name of the event + */ + type?: string; + } + } + enum ArrowPosition { + //To set Left arrowPosition of the split button + Left, + //To set Right arrowPosition of the split button + Right, + //To set Top arrowPosition of the split button + Top, + //To set Bottom arrowPosition of the split button + Bottom, + } + + class Splitter extends ej.Widget { + static fn: Splitter; + constructor(element: JQuery | Element, options?: Splitter.Model); + static Locale: any; + model: Splitter.Model; + defaults: Splitter.Model; + + /** To add a new pane to splitter control. + * @param {string} content of pane. + * @param {any} pane properties. + * @param {number} index of pane. + * @returns {HTMLElement} + */ + addItem(content: string, property: any, index: number): HTMLElement; + + /** To collapse the splitter control pane. + * @param {number} index number of pane. + * @returns {void} + */ + collapse(paneIndex: number): void; + + /** To expand the splitter control pane. + * @param {number} index number of pane. + * @returns {void} + */ + expand(paneIndex: number): void; + + /** To refresh the splitter control pane resizing. + * @returns {void} + */ + refresh(): void; + + /** To remove a specified pane from the splitter control. + * @param {number} index of pane. + * @returns {void} + */ + removeItem(index: number): void; + } + export namespace Splitter { + + export interface Model { + + /** Turns on keyboard interaction with the Splitter panes. You must set this property to true to access the keyboard shortcuts of ejSplitter. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Specify animation speed for the Splitter pane movement, while collapsing and expanding. + * @Default {300} + */ + animationSpeed?: number; + + /** Specify the CSS class to splitter control to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Specifies the animation behavior of the splitter. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Specifies the splitter control to be displayed in right to left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /** Specify height for splitter control. + * @Default {null} + */ + height?: string; + + /** Specifies the HTML Attributes of the Splitter. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specify window resizing behavior for splitter control. + * @Default {false} + */ + isResponsive?: boolean; + + /** Specify the orientation for splitter control. See orientation + * @Default {ej.orientation.Horizontal or “horizontal”} + */ + orientation?: ej.Orientation|string; + + /** Specify properties for each pane like paneSize, minSize, maxSize, collapsible, expandable, resizable. + * @Default {[]} + */ + properties?: any[]; + + /** Specify width for splitter control. + * @Default {null} + */ + width?: string; + + /** Fires before expanding / collapsing the split pane of splitter control. + */ + beforeExpandCollapse?(e: BeforeExpandCollapseEventArgs): void; + + /** Fires when splitter control pane has been created. + */ + create?(e: CreateEventArgs): void; + + /** Fires when splitter control pane has been destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when expand / collapse operation in splitter control pane has been performed successfully. + */ + expandCollapse?(e: ExpandCollapseEventArgs): void; + + /** Fires when resize in splitter control pane. + */ + resize?(e: ResizeEventArgs): void; + } + + export interface BeforeExpandCollapseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns collapsed pane details. + */ + collapsed?: any; + + /** returns expanded pane details. + */ + expanded?: any; + + /** returns the splitter model. + */ + model?: ej.Splitter.Model; + + /** returns the current split bar index. + */ + splitbarIndex?: number; + + /** returns the name of the event. + */ + type?: string; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the splitter model. + */ + model?: ej.Splitter.Model; + + /** returns the name of the event. + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the splitter model. + */ + model?: ej.Splitter.Model; + + /** returns the name of the event. + */ + type?: string; + } + + export interface ExpandCollapseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns collapsed pane details. + */ + collapsed?: any; + + /** returns expanded pane details. + */ + expanded?: any; + + /** returns the splitter model. + */ + model?: ej.Splitter.Model; + + /** returns the current split bar index. + */ + splitbarIndex?: number; + + /** returns the name of the event. + */ + type?: string; + } + + export interface ResizeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns previous pane details. + */ + prevPane?: any; + + /** returns next pane details. + */ + nextPane?: any; + + /** returns the splitter model. + */ + model?: ej.Splitter.Model; + + /** returns the current split bar index. + */ + splitbarIndex?: number; + + /** returns the name of the event. + */ + type?: string; + } + } + + class Tab extends ej.Widget { + static fn: Tab; + constructor(element: JQuery | Element, options?: Tab.Model); + static Locale: any; + model: Tab.Model; + defaults: Tab.Model; + + /** Add new tab items with given name, URL and given index position, if index null it’s add last item. + * @param {string} URL name / tab id. + * @param {string} Tab Display name. + * @param {number} Index position to placed , this is optional. + * @param {string} specifies cssClass, this is optional. + * @param {string} specifies id of tab, this is optional. + * @returns {void} + */ + addItem(URL: string, displayLabel: string, index: number, cssClass: string, id: string): void; + + /** To disable the tab control. + * @returns {void} + */ + disable(): void; + + /** To enable the tab control. + * @returns {void} + */ + enable(): void; + + /** This function get the number of tab rendered + * @returns {number} + */ + getItemsCount(): number; + + /** This function hides the tab control. + * @returns {void} + */ + hide(): void; + + /** This function hides the specified item tab in tab control. + * @param {number} index of tab item. + * @returns {void} + */ + hideItem(index: number): void; + + /** Remove the given index tab item. + * @param {number} index of tab item. + * @returns {void} + */ + removeItem(index: number): void; + + /** This function is to show the tab control. + * @returns {void} + */ + show(): void; + + /** This function helps to show the specified hidden tab item in tab control. + * @param {number} index of tab item. + * @returns {void} + */ + showItem(index: number): void; + } + export namespace Tab { + + export interface Model { + + /** Specifies the ajaxSettings option to load the content to the Tab control. + */ + ajaxSettings?: AjaxSettings; + + /** Tab items interaction with keyboard keys, like headers active navigation. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Allow to collapsing the active item, while click on the active header. + * @Default {false} + */ + collapsible?: boolean; + + /** Set the root class for Tab theme. This cssClass API helps to use custom skinning option for Tab control. + */ + cssClass?: string; + + /** Disables the given tab headers and content panels. + * @Default {[]} + */ + disabledItemIndex?: number[]; + + /** Specifies the animation behavior of the tab. + * @Default {true} + */ + enableAnimation?: boolean; + + /** When this property is set to false, it disables the tab control. + * @Default {true} + */ + enabled?: boolean; + + /** Enables the given tab headers and content panels. + * @Default {[]} + */ + enabledItemIndex?: number[]; + + /** Save current model value to browser cookies for state maintains. While refresh the Tab control page the model value apply from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Display Right to Left direction for headers and panels text of tab. + * @Default {false} + */ + enableRTL?: boolean; + + /** Specify to enable scrolling for Tab header. + * @Default {false} + */ + enableTabScroll?: boolean; + + /** The event API to bind the action for active the tab items. + * @Default {click} + */ + events?: string; + + /** Specifies the position of Tab header as top, bottom, left or right. See below to get available Position + * @Default {top} + */ + headerPosition?: string|ej.Tab.Position; + + /** Set the height of the tab header element. Default this property value is null, so height take content height. + * @Default {null} + */ + headerSize?: string|number; + + /** Height set the outer panel element. Default this property value is null, so height take content height. + * @Default {null} + */ + height?: string|number; + + /** Adjust the content panel height for given option (content, auto and fill), by default panels height adjust based on the content.See below to get available HeightAdjustMode + * @Default {content} + */ + heightAdjustMode?: string|ej.Tab.HeightAdjustMode; + + /** Specifies to hide a pane of Tab control. + * @Default {[]} + */ + hiddenItemIndex?: any[]; + + /** Specifies the HTML Attributes of the Tab. + * @Default {{}} + */ + htmlAttributes?: any; + + /** The idPrefix property appends the given string on the added tab item id’s in runtime. + * @Default {ej-tab-} + */ + idPrefix?: string; + + /** Specifies the Tab header in active for given index value. + * @Default {0} + */ + selectedItemIndex?: number; + + /** Display the close button for each tab items. While clicking on the close icon, particular tab item will be removed. + * @Default {false} + */ + showCloseButton?: boolean; + + /** Display the Reload button for each tab items. + * @Default {false} + */ + showReloadIcon?: boolean; + + /** Tab panels and headers to be displayed in rounded corner style. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Set the width for outer panel element, if not it’s take parent width. + * @Default {null} + */ + width?: string|number; + + /** Triggered after a tab item activated. + */ + itemActive?(e: ItemActiveEventArgs): void; + + /** Triggered before AJAX content has been loaded. + */ + ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; + + /** Triggered if error occurs in AJAX request. + */ + ajaxError?(e: AjaxErrorEventArgs): void; + + /** Triggered after AJAX content load action. + */ + ajaxLoad?(e: AjaxLoadEventArgs): void; + + /** Triggered after a tab item activated. + */ + ajaxSuccess?(e: AjaxSuccessEventArgs): void; + + /** Triggered before a tab item activated. + */ + beforeActive?(e: BeforeActiveEventArgs): void; + + /** Triggered before a tab item remove. + */ + beforeItemRemove?(e: BeforeItemRemoveEventArgs): void; + + /** Triggered before a tab item Create. + */ + create?(e: CreateEventArgs): void; + + /** Triggered before a tab item destroy. + */ + destroy?(e: DestroyEventArgs): void; + + /** Triggered after new tab item add + */ + itemAdd?(e: ItemAddEventArgs): void; + + /** Triggered after tab item removed. + */ + itemRemove?(e: ItemRemoveEventArgs): void; + } + + export interface ItemActiveEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the tab model. + */ + model?: ej.Tab.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; + + /** returns previous active index. + */ + prevActiveIndex?: number; + + /** returns current active tab header . + */ + activeHeader?: HTMLElement; + + /** returns current active index. + */ + activeIndex?: number; - /** returns the rotator model - */ - model?: ej.Rotator.Model; + /** returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; + } - /** returns the name of the event - */ - type?: string; + export interface AjaxBeforeLoadEventArgs { - /** the current rotator id. - */ - itemId?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the current slide index. - */ - activeItemIndex?: number; - } + /** returns the tab model. + */ + model?: ej.Tab.Model; - export interface CreateEventArgs { + /** returns the name of the event. + */ + type?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; - /** returns the rotator model - */ - model?: ej.Rotator.Model; + /** returns previous active index. + */ + prevActiveIndex?: number; - /** returns the name of the event - */ - type?: string; - } + /** returns current active tab header . + */ + activeHeader?: HTMLElement; - export interface DestroyEventArgs { + /** returns current active index. + */ + activeIndex?: number; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the URL of AJAX request + */ + URL?: string; - /** returns the rotator model - */ - model?: ej.Rotator.Model; + /** returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; + } - /** returns the name of the event - */ - type?: string; - } + export interface AjaxErrorEventArgs { - export interface PagerClickEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the tab model. + */ + model?: ej.Tab.Model; - /** returns the rotator model - */ - model?: ej.Rotator.Model; + /** returns the name of the event. + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** returns AJAX data details. + */ + data?: any; - /** the current rotator id. - */ - itemId?: string; + /** returns the URL of AJAX request. + */ + URL?: string; + } - /** returns the current slide index. - */ - activeItemIndex?: number; - } + export interface AjaxLoadEventArgs { - export interface StartEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the tab model. + */ + model?: ej.Tab.Model; - /** returns the rotator model - */ - model?: ej.Rotator.Model; + /** returns the name of the event. + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; - /** the current rotator id. - */ - itemId?: string; + /** returns previous active index. + */ + prevActiveIndex?: number; - /** returns the current slide index. - */ - activeItemIndex?: number; - } + /** returns current active tab header . + */ + activeHeader?: HTMLElement; - export interface StopEventArgs { + /** returns current active index. + */ + activeIndex?: number; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the URL of AJAX request + */ + URL?: string; - /** returns the rotator model - */ - model?: ej.Rotator.Model; + /** returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; + } - /** returns the name of the event - */ - type?: string; + export interface AjaxSuccessEventArgs { - /** the current rotator id. - */ - itemId?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the current slide index. - */ - activeItemIndex?: number; - } + /** returns the tab model. + */ + model?: ej.Tab.Model; - export interface ThumbItemClickEventArgs { + /** returns the name of the event. + */ + type?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** return AJAX data. + */ + data?: any; - /** returns the rotator model - */ - model?: ej.Rotator.Model; + /** returns AJAX URL + */ + URL?: string; - /** returns the name of the event - */ - type?: string; + /** returns content of AJAX request. + */ + content?: any; + } - /** the current rotator id. - */ - itemId?: string; + export interface BeforeActiveEventArgs { - /** returns the current slide index. - */ - activeItemIndex?: number; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface Fields { + /** returns the tab model. + */ + model?: ej.Tab.Model; - /** Specifies a link for the image. - */ - linkAttribute?: string; + /** returns the name of the event. + */ + type?: string; - /** Specifies where to open a given link. - */ - targetAttribute?: string; + /** returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; - /** Specifies a caption for the image. - */ - text?: string; + /** returns previous active index. + */ + prevActiveIndex?: number; - /** Specifies a caption for the thumbnail image. - */ - thumbnailText?: string; + /** returns current active tab header . + */ + activeHeader?: HTMLElement; - /** Specifies the URL for an thumbnail image. - */ - thumbnailUrl?: string; + /** returns current active index. + */ + activeIndex?: number; - /** Specifies the URL for an image. - */ - url?: string; - } - - enum PagerPosition { - - ///string - BottomLeft, - - ///string - BottomRight, - - ///string - Outside, - - ///string - TopCenter, - - ///string - TopLeft, - - ///string - TopRight - } - - } - - class RTE extends ej.Widget { - static fn: RTE; - constructor(element: JQuery | Element, options?: RTE.Model); - static Locale: any; - model: RTE.Model; - defaults: RTE.Model; - - /** Returns the range object. - * @returns {any} - */ - createRange(): any; - - /** Disables the RTE control. - * @returns {void} - */ - disable(): void; - - /** Disables the corresponding tool in the RTE ToolBar. - * @returns {void} - */ - disableToolbarItem(): void; - - /** Enables the RTE control. - * @returns {void} - */ - enable(): void; - - /** Enables the corresponding tool in the toolbar when the tool is disabled. - * @returns {void} - */ - enableToolbarItem(): void; - - /** Performs the action value based on the given command. - * @returns {void} - */ - executeCommand(): void; - - /** Focuses the RTE control. - * @returns {void} - */ - focus(): void; - - /** Gets the command status of the selected text based on the given comment in the RTE control. - * @returns {boolean} - */ - getCommandStatus(): boolean; - - /** Gets the Document from the RTE control. - * @returns {Document} - */ - getDocument(): Document; - - /** Gets the HTML string from the RTE control. - * @returns {HTMLElement} - */ - getHtml(): HTMLElement; - - /** Gets the selected HTML string from the RTE control. - * @returns {HTMLElement} - */ - getSelectedHtml(): HTMLElement; - - /** Gets the content as string from the RTE control. - * @returns {string} - */ - getText(): string; - - /** Hides the RTE control. - * @returns {void} - */ - hide(): void; - - /** Inserts new item to the target contextmenu node. - * @returns {void} - */ - insertMenuOption(): void; - - /** Add a table column at the right or left of the specified cell - * @param {boolean} If it’s true, add a column at the left of the cell, otherwise add a column at the right of the cell - * @param {JQuery} Column will be added based on the given cell element - * @returns {HTMLElement} - */ - insertColumn(before?: boolean, cell?: JQuery): HTMLElement; - - /** To add a table row below or above the specified cell. - * @param {boolean} If it’s true, add a row before the cell, otherwise add a row after the cell - * @param {JQuery} Row will be added based on the given cell element - * @returns {HTMLElement} - */ - insertRow(before?: boolean, cell?: JQuery): HTMLElement; - - /** This method helps to insert/paste the content at the current cursor (caret) position or the selected content to be replaced with our text by passing the value as parameter to the - * pasteContent method in the Editor. - * @returns {void} - */ - pasteContent(): void; - - /** Refreshes the RTE control. - * @returns {void} - */ - refresh(): void; - - /** Removes the specified table column. - * @param {JQuery} Remove the given column element - * @returns {void} - */ - removeColumn(cell?: JQuery): void; - - /** Removes the specified table row. - * @param {JQuery} Remove the given row element - * @returns {void} - */ - removeRow(cell?: JQuery): void; - - /** Deletes the specified table. - * @param {JQuery} Remove the given table - * @returns {void} - */ - removeTable(table?: JQuery): void; - - /** Removes the target menu item from the RTE contextmenu. - * @returns {void} - */ - removeMenuOption(): void; - - /** Removes the given tool from the RTE Toolbar. - * @returns {void} - */ - removeToolbarItem(): void; - - /** Selects all the contents within the RTE. - * @returns {void} - */ - selectAll(): void; - - /** Selects the contents in the given range. - * @returns {void} - */ - selectRange(): void; - - /** Sets the color picker model type rendered initially in the RTE control. - * @returns {void} - */ - setColorPickerType(): void; - - /** Sets the HTML string from the RTE control. - * @returns {void} - */ - setHtml(): void; - - /** Displays the RTE control. - * @returns {void} - */ - show(): void; - } - export namespace RTE { - - export interface Model { - - /** Enables/disables the editing of the content. - * @Default {True} - */ - allowEditing?: boolean; - - /** RTE control can be accessed through the keyboard shortcut keys. - * @Default {True} - */ - allowKeyboardNavigation?: boolean; - - /** When the property is set to true, it focuses the RTE at the time of rendering. - * @Default {false} - */ - autoFocus?: boolean; - - /** Based on the content size, its height is adjusted instead of adding the scrollbar. - * @Default {false} - */ - autoHeight?: boolean; - - /** Sets the colorCode to display the color of the fontColor and backgroundColor in the font tools of the RTE. - * @Default {[000000, FFFFFF, C4C4C4, ADADAD, 595959, 262626, 4f81bd, dbe5f1, b8cce4, 95b3d7, 366092, 244061, c0504d, f2dcdb, e5b9b7, d99694, 953734,632423, 9bbb59, - * ebf1dd, d7e3bc, c3d69b, 76923c, 4f6128, 8064a2, e5e0ec, ccc1d9, b2a2c7, 5f497a, 3f3151, f79646, fdeada, fbd5b5, fac08f,e36c09, 974806]} - */ - colorCode?: any; - - /** The number of columns given are rendered in the color palate popup. - * @Default {6} - */ - colorPaletteColumns?: number; - - /** The number of rows given are rendered in the color palate popup. - * @Default {6} - */ - colorPaletteRows?: number; - - /** Sets the root class for the RTE theme. This cssClass API helps the usage of custom skinning option for the RTE control by including this root class in CSS. - */ - cssClass?: string; - - /** Enables/disables the RTE control’s accessibility or interaction. - * @Default {True} - */ - enabled?: boolean; - - /** When the property is set to true, it returns the encrypted text. - * @Default {false} - */ - enableHtmlEncode?: boolean; - - /** Maintain the values of the RTE after page reload. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Shows the resize icon and enables the resize option in the RTE. - * @Default {True} - */ - enableResize?: boolean; - - /** Shows the RTE in the RTL direction. - * @Default {false} - */ - enableRTL?: boolean; - - /** Formats the contents based on the XHTML rules. - * @Default {false} - */ - enableXHTML?: boolean; - - /** Enables the tab key action with the RichTextEditor content. - * @Default {True} - */ - enableTabKeyNavigation?: boolean; - - /** This API allows to enable url and fileName for pdf export. - * @Default {null} - */ - exportToPdfSettings?: ExportToPdfSettings; - - /** This API allows to enable url and fileName for word export. - * @Default {null} - */ - exportToWordSettings?: ExportToWordSettings; - - /** Load the external CSS file inside Iframe. - * @Default {null} - */ - externalCSS?: string; - - /** This API allows to enable the file browser support in the RTE control to browse, create, delete and upload the files in the specified current directory. - * @Default {null} - */ - fileBrowser?: FileBrowser; - - /** Sets the fontName in the RTE. - * @Default {{text: Segoe UI, value: Segoe UI },{text: Arial, value: Arial,Helvetica,sans-serif },{text: Courier New, value: Courier New,Courier,Monospace }, - * {text: Georgia, value: Georgia,serif },{text: Impact, value: Impact,Charcoal,sans-serif },{text: Lucida Console, value: Lucida Console,Monaco,Monospace }, - * {text: Tahoma, value: Tahoma,Geneva,sans-serif },{text: Times New Roman, value: Times New Roman },{text: Trebuchet MS, value: Trebuchet MS,Helvetica,sans-serif }, - * {text: Verdana, value: Verdana,Geneva,sans-serif}} - */ - fontName?: any; - - /** Sets the fontSize in the RTE. - * @Default {{ text: 1, value: 1 },{ text: 2 (10pt), value: 2 },{ text: 3 (12pt), value: 3 },{ text: 4 (14pt), value: 4 },{ text: 5 (18pt), value: 5 }, - * { text: 6 (24pt), value: 6 },{ text: 7 (36pt), value: 7 }} - */ - fontSize?: any; - - /** Sets the format in the RTE. - * @Default {{ text: Paragraph, value: <p>, spriteCssClass: e-paragraph },{ text: Quotation, value: <blockquote>, spriteCssClass: e-quotation }, - * { text: Heading 1, value: <h1>, spriteCssClass: e-h1 },{ text: Heading 2, value: <h2>, spriteCssClass: e-h2 },{ text: Heading 3, value: <h3>, spriteCssClass: e-h3 }, - * { text: Heading 4, value: <h4>, spriteCssClass: e-h4 },{ text: Heading 5, value: <h5>, spriteCssClass: e-h5 },{ text: Heading 6, value: <h6>, spriteCssClass: e-h6}} - */ - format?: string; - - /** Defines the height of the RTE textbox. - * @Default {370} - */ - height?: string | number; - - /** Specifies the HTML Attributes of the ejRTE. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Sets the given attributes to the iframe body element. - * @Default {{}} - */ - iframeAttributes?: any; - - /** This API allows the image browser to support in the RTE control to browse, create, delete, and upload the image files to the specified current directory. - * @Default {null} - */ - imageBrowser?: ImageBrowser; - - /** This API allows to enable the url for connecting to RTE import. - * @Default {null} - */ - importSettings?: ImportSettings; - - /** Enables/disables responsive support for the RTE control toolbar items during the window resizing time. - * @Default {false} - */ - isResponsive?: boolean; - - /** Sets the culture in the RTE when you set the localization values are needs to be assigned to the corresponding text as follows. - * @Default {en-US} - */ - locale?: string; - - /** Sets the maximum height for the RTE outer wrapper element. - * @Default {null} - */ - maxHeight?: string | number; - - /** Sets the maximum length for the RTE outer wrapper element. - * @Default {7000} - */ - maxLength?: number; - - /** Sets the maximum width for the RTE outer wrapper element. - * @Default {null} - */ - maxWidth?: string | number; - - /** Sets the minimum height for the RTE outer wrapper element. - * @Default {280} - */ - minHeight?: string | number; - - /** Sets the minimum width for the RTE outer wrapper element. - * @Default {400} - */ - minWidth?: string | number; - - /** Sets the name in the RTE. When the name value is not initialized, the ID value is assigned to the name. - */ - name?: string; - - /** Shows ClearAll icon in the RTE footer. - * @Default {false} - */ - showClearAll?: boolean; - - /** Shows the clear format in the RTE footer. - * @Default {true} - */ - showClearFormat?: boolean; - - /** Shows the Custom Table in the RTE. - * @Default {True} - */ - showCustomTable?: boolean; - - /** The showContextMenu property helps to enable custom context menu within editor area. - * @Default {True} - */ - showContextMenu?: boolean; - - /** This API is used to set the default dimensions for the image and video. When this property is set to true, the image and video dialog displays the dimension option. - * @Default {false} - */ - showDimensions?: boolean; - - /** Shows the FontOption in the RTE. - * @Default {True} - */ - showFontOption?: boolean; - - /** Shows footer in the RTE. When the footer is enabled, it displays the HTML tag, word Count, character count, clear format, resize icon and clear all the content icons, by default. - * @Default {false} - */ - showFooter?: boolean; - - /** Shows the HtmlSource in the RTE footer. - * @Default {false} - */ - showHtmlSource?: boolean; - - /** When the cursor is placed or when the text is selected in the RTE, it displays the tag info in the footer. - * @Default {True} - */ - showHtmlTagInfo?: boolean; - - /** Shows the toolbar in the RTE. - * @Default {True} - */ - showToolbar?: boolean; - - /** Counts the total characters and displays it in the RTE footer. - * @Default {True} - */ - showCharCount?: boolean; - - /** Enables or disables rounded corner UI look for RTE. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Counts the total words and displays it in the RTE footer. - * @Default {True} - */ - showWordCount?: boolean; - - /** The given number of columns render the insert table pop. - * @Default {10} - */ - tableColumns?: number; - - /** The given number of rows render the insert table pop. - * @Default {8} - */ - tableRows?: number; - - /** Sets the tools in the RTE and gets the inner display order of the corresponding group element. Tools are dependent on the toolsList property. - * @Default {formatStyle: [format],style: [bold, italic, underline, strikethrough],alignment: [justifyLeft, justifyCenter, justifyRight, justifyFull],lists: [unorderedList, orderedList], - * indenting: [outdent, indent],doAction: [undo, redo],links: [createLink,removeLink],images: [image],media: [video],tables: [createTable, addRowAbove, addRowBelow, - * addColumnLeft, addColumnRight, deleteRow, deleteColumn, deleteTable]],view:[“fullScreen”,zoomIn,zoomOut],print:[print]} - */ - tools?: Tools; - - /** Specifies the list of groups and order of those groups displayed in the RTE toolbar. The toolsList property is used to get the root group order and tools property is used to get the - * inner order of the corresponding groups displayed. When the value is not specified, it gets its default display order and tools. - * @Default {[formatStyle, font, style, effects, alignment, lists, indenting, clipboard, doAction, clear, links, images, media, tables, casing,view, customTools,print,edit]} - */ - toolsList?: any[]; - - /** Display the hints for the tools in the Toolbar. - * @Default {{ associate: mouseenter, showShadow: true, position: { stem: { horizontal: left, vertical: top } }, tip: { size: { width: 5, height: 5 }, isBalloon: false }} - */ - tooltipSettings?: any; - - /** Gets the undo stack limit. - * @Default {50} - */ - undoStackLimit?: number; - - /** The given string value is displayed in the editable area. - * @Default {null} - */ - value?: string; - - /** Sets the jQuery validation rules to the Rich Text Editor. - * @Default {null} - */ - validationRules?: any; - - /** Sets the jQuery validation error message to the Rich Text Editor. - * @Default {null} - */ - validationMessage?: any; - - /** Defines the width of the RTE textbox. - * @Default {786} - */ - width?: string | number; - - /** Increases and decreases the contents zoom range in percentage - * @Default {0.05} - */ - zoomStep?: string | number; - - /** Fires when changed successfully. */ - change?(e: ChangeEventArgs): void; - - /** Fires when the RTE is created successfully */ - create?(e: CreateEventArgs): void; - - /** Fires when mouse click on menu items. */ - contextMenuClick?(e: ContextMenuClickEventArgs): void; - - /** Fires before the RTE is destroyed. */ - destroy?(e: DestroyEventArgs): void; - - /** Fires when the commands are executed successfully. */ - execute?(e: ExecuteEventArgs): void; - - /** Fires when the keydown action is successful. */ - keydown?(e: KeydownEventArgs): void; - - /** Fires when the keyup action is successful. */ - keyup?(e: KeyupEventArgs): void; + /** returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; + } - /** Fires before the RTE Edit area is rendered and after the toolbar is rendered. */ - preRender?(e: PreRenderEventArgs): void; + export interface BeforeItemRemoveEventArgs { - /** Fires when the text is selected in the text area */ - select?(e: SelectEventArgs): void; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface ChangeEventArgs { + /** returns the tab model. + */ + model?: ej.Tab.Model; - /** When the event is canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; - /** returns the RTE model - */ - model?: any; + /** returns current tab item index + */ + index?: number; + } - /** returns the name of the event - */ - type?: string; - } + export interface CreateEventArgs { - export interface CreateEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** When the event is canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the tab model. + */ + model?: ej.Tab.Model; - /** Returns the RTE model - */ - model?: any; + /** returns the name of the event. + */ + type?: string; + } - /** Returns the name of the event - */ - type?: string; - } + export interface DestroyEventArgs { - export interface ContextMenuClickEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns clicked menu item text. - */ - text?: string; + /** returns the tab model. + */ + model?: ej.Tab.Model; - /** returns clicked menu item element. - */ - element?: any; + /** returns the name of the event. + */ + type?: string; + } - /** returns the selected item. - */ - selectedItem?: number; - } + export interface ItemAddEventArgs { - export interface DestroyEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** When the event is canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the tab model. + */ + model?: ej.Tab.Model; - /** Returns the RTE model - */ - model?: any; + /** returns the name of the event. + */ + type?: string; - /** Returns the name of the event - */ - type?: string; - } + /** returns new added tab header. + */ + tabHeader?: HTMLElement; - export interface ExecuteEventArgs { + /** returns new added tab content panel. + */ + tabContent?: any; + } - /** When the event is canceled; otherwise, false. - */ - cancel?: boolean; + export interface ItemRemoveEventArgs { - /** Returns the RTE model - */ - model?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the name of the event - */ - type?: string; - } + /** returns the tab model. + */ + model?: ej.Tab.Model; - export interface KeydownEventArgs { + /** returns the name of the event. + */ + type?: string; - /** When the event is canceled; otherwise, false. - */ - cancel?: boolean; + /** returns removed tab header. + */ + removedTab?: HTMLElement; + } - /** Returns the RTE model - */ - model?: any; + export interface AjaxSettings { - /** Returns the name of the event - */ - type?: string; - } + /** It specifies, whether to enable or disable asynchronous request. + * @Default {true} + */ + async?: boolean; - export interface KeyupEventArgs { + /** It specifies the page will be cached in the web browser. + * @Default {false} + */ + cache?: boolean; - /** When the event is canceled; otherwise, false. - */ - cancel?: boolean; + /** It specifies the type of data is send in the query string. + * @Default {html} + */ + contentType?: string; - /** Returns the RTE model - */ - model?: any; + /** It specifies the data as an object, will be passed in the query string. + * @Default {{}} + */ + data?: any; - /** Returns the name of the event - */ - type?: string; - } + /** It specifies the type of data that you're expecting back from the response. + * @Default {html} + */ + dataType?: string; - export interface PreRenderEventArgs { + /** It specifies the HTTP request type. + * @Default {get} + */ + type?: string; + } + + enum Position { + + ///Tab headers display to top position + Top, + + ///Tab headers display to bottom position + Bottom, + + ///Tab headers display to left position. + Left, + + ///Tab headers display to right position. + Right + } + + + enum HeightAdjustMode { + + ///string + None, + + ///string + Content, + + ///string + Auto, + + ///string + Fill + } + + } + + class TagCloud extends ej.Widget { + static fn: TagCloud; + constructor(element: JQuery | Element, options?: TagCloud.Model); + static Locale: any; + model: TagCloud.Model; + defaults: TagCloud.Model; + + /** Inserts a new item into the TagCloud + * @param {string} Insert new item into the TagCloud + * @returns {void} + */ + insert(name: string): void; + + /** Inserts a new item into the TagCloud at a particular position. + * @param {string} Inserts a new item into the TagCloud + * @param {number} Inserts a new item into the TagCloud with the specified position + * @returns {void} + */ + insertAt(name: string, position: number): void; + + /** Removes the item from the TagCloud based on the name. It removes all the tags which have the corresponding name + * @param {string} name of the tag. + * @returns {void} + */ + remove(name: string): void; + + /** Removes the item from the TagCloud based on the position. It removes the tags from the the corresponding position only. + * @param {number} position of tag item. + * @returns {void} + */ + removeAt(position: number): void; + } + export namespace TagCloud { + + export interface Model { + + /** Specify the CSS class to button to achieve custom theme. + */ + cssClass?: string; + + /** The dataSource contains the list of data to display in a cloud format. Each data contains a link URL, frequency to categorize the font size and a display text. + * @Default {null} + */ + dataSource?: any; + + /** Sets the TagCloud and tag items direction as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /** Defines the mapping fields for the data items of the TagCloud. + * @Default {null} + */ + fields?: Fields; + + /** Specifies the list of HTML attributes to be added to TagCloud control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Defines the format for the TagCloud to display the tag items.See Format + * @Default {ej.Format.Cloud} + */ + format?: string|ej.Format; + + /** Sets the maximum font size value for the tag items. The font size for the tag items will be generated in between the minimum and maximum font size values. + * @Default {40px} + */ + maxFontSize?: string|number; + + /** Sets the minimum font size value for the tag items. The font size for the tag items will be generated in between the minimum and maximum font size values. + * @Default {10px} + */ + minFontSize?: string|number; + + /** Define the query to retrieve the data from online server. The query is used only when the online dataSource is used. + * @Default {null} + */ + query?: any; + + /** Shows or hides the TagCloud title. When this set to false, it hides the TagCloud header. + * @Default {true} + */ + showTitle?: boolean; + + /** Sets the title image for the TagCloud. To show the title image, the showTitle property should be enabled. + * @Default {null} + */ + titleImage?: string; + + /** Sets the title text for the TagCloud. To show the title text, the showTitle property should be enabled. + * @Default {Title} + */ + titleText?: string; + + /** Event triggers when the TagCloud items are clicked + */ + click?(e: ClickEventArgs): void; + + /** Event triggers when the TagCloud are created + */ + create?(e: CreateEventArgs): void; + + /** Event triggers when the TagCloud are destroyed + */ + destroy?(e: DestroyEventArgs): void; + + /** Event triggers when the cursor leaves out from a tag item + */ + mouseout?(e: MouseoutEventArgs): void; + + /** Event triggers when the cursor hovers on a tag item + */ + mouseover?(e: MouseoverEventArgs): void; + } + + export interface ClickEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /** returns the name of the event + */ + type?: string; + + /** return current tag name + */ + text?: string; + + /** return current URL link + */ + URL?: string; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface MouseoutEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /** returns the name of the event + */ + type?: string; + + /** return current tag name + */ + text?: string; + + /** return current URL link + */ + URL?: string; + } + + export interface MouseoverEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /** returns the name of the event + */ + type?: string; + + /** return current tag name + */ + text?: string; + + /** return current URL link + */ + URL?: string; + } + + export interface Fields { + + /** Defines the frequency column number to categorize the font size. + */ + frequency?: string; + + /** Defines the HTML attributes column for the anchor elements inside the each tag items. + */ + htmlAttributes?: string; + + /** Defines the tag value or display text. + */ + text?: string; + + /** Defines the URL link to navigate while click the tag. + */ + url?: string; + } + } + enum Format { + //To render the TagCloud items in cloud format + Cloud, + //To render the TagCloud items in list format + List, + } + + class TimePicker extends ej.Widget { + static fn: TimePicker; + constructor(element: JQuery | Element, options?: TimePicker.Model); + static Locale: any; + model: TimePicker.Model; + defaults: TimePicker.Model; + + /** Allows you to disable the TimePicker. + * @returns {void} + */ + disable(): void; + + /** Allows you to enable the TimePicker. + * @returns {void} + */ + enable(): void; + + /** It returns the current time value. + * @returns {string} + */ + getValue(): string; + + /** This method will hide the TimePicker control popup. + * @returns {void} + */ + hide(): void; + + /** Updates the current system time in TimePicker. + * @returns {void} + */ + setCurrentTime(): void; + + /** This method will show the TimePicker control popup. + * @returns {void} + */ + show(): void; + } + export namespace TimePicker { + + export interface Model { + + /** Sets the root CSS class for the TimePicker theme, which is used to customize. + */ + cssClass?: string; + + /** Specifies the list of time range to be disabled. + * @Default {{}} + */ + disableTimeRanges?: any; + + /** Specifies the animation behavior in TimePicker. + * @Default {true} + */ + enableAnimation?: boolean; + + /** When this property is set to false, it disables the TimePicker control. + * @Default {true} + */ + enabled?: boolean; + + /** Save current model value to browser cookies for maintaining states. When refreshing the TimePicker control page, the model value is applied from browser cookies or HTML 5local + * storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Displays the TimePicker as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /** When the enableStrictMode is set as true it allows the value outside of the range and also indicate with red color border, otherwise it internally changed to the min or max range + * value based an input value. + * @Default {false} + */ + enableStrictMode?: boolean; + + /** Defines the height of the TimePicker textbox. + */ + height?: string|number; + + /** Sets the step value for increment an hour value through arrow keys or mouse scroll. + * @Default {1} + */ + hourInterval?: number; + + /** It allows to define the characteristics of the TimePicker control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Sets the time interval between the two adjacent time values in the popup. + * @Default {30} + */ + interval?: number; + + /** Defines the localization info used by the TimePicker. + * @Default {en-US} + */ + locale?: string; + + /** Sets the maximum time value to the TimePicker. + * @Default {11:59:59 PM} + */ + maxTime?: string; + + /** Sets the minimum time value to the TimePicker. + * @Default {12:00:00 AM} + */ + minTime?: string; + + /** Sets the step value for increment the minute value through arrow keys or mouse scroll. + * @Default {1} + */ + minutesInterval?: number; + + /** Defines the height of the TimePicker popup. + * @Default {191px} + */ + popupHeight?: string|number; + + /** Defines the width of the TimePicker popup. + * @Default {auto} + */ + popupWidth?: string|number; + + /** Toggles the readonly state of the TimePicker. When the widget is readOnly, it doesn’t allow your input. + * @Default {false} + */ + readOnly?: boolean; + + /** Sets the step value for increment the seconds value through arrow keys or mouse scroll. + * @Default {1} + */ + secondsInterval?: number; + + /** shows or hides the drop down button in TimePicker. + * @Default {true} + */ + showPopupButton?: boolean; + + /** TimePicker is displayed with rounded corner when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Defines the time format displayed in the TimePicker. + * @Default {h:mm tt} + */ + timeFormat?: string; + + /** Sets a specified time value on the TimePicker. + * @Default {null} + */ + value?: string|Date; + + /** Defines the width of the TimePicker textbox. + */ + width?: string|number; + + /** Fires when the time value changed in the TimePicker. + */ + beforeChange?(e: BeforeChangeEventArgs): void; + + /** Fires when the TimePicker popup before opened. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + + /** Fires when the time value changed in the TimePicker. + */ + change?(e: ChangeEventArgs): void; + + /** Fires when the TimePicker popup closed. + */ + close?(e: CloseEventArgs): void; + + /** Fires when create TimePicker successfully. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the TimePicker is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when the TimePicker control gets focus. + */ + focusIn?(e: FocusInEventArgs): void; + + /** Fires when the TimePicker control get lost focus. + */ + focusOut?(e: FocusOutEventArgs): void; + + /** Fires when the TimePicker popup opened. + */ + open?(e: OpenEventArgs): void; + + /** Fires when the value is selected from the TimePicker dropdown list. + */ + select?(e: SelectEventArgs): void; + } + + export interface BeforeChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /** returns the name of the event + */ + type?: string; - /** When the event is canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the previously selected time value + */ + prevTime?: string; - /** Returns the RTE model - */ - model?: any; + /** returns the modified time value + */ + value?: string; + } - /** Returns the name of the event - */ - type?: string; - } + export interface BeforeOpenEventArgs { - export interface SelectEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** When the event is canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; - /** Returns the RTE model - */ - model?: any; + /** returns the name of the event + */ + type?: string; - /** Returns the name of the event - */ - type?: string; + /** returns the previously selected time value + */ + prevTime?: string; - /** Returns the event object - */ - event?: any; - } + /** returns the time value + */ + value?: string; + } - export interface ExportToPdfSettings { + export interface ChangeEventArgs { - /** This API is used to receive the server-side handler for export related operations. - */ - url?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Specifies the file name for the exported pdf file. - */ - fileName?: string; - } + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; - export interface ExportToWordSettings { + /** returns the name of the event + */ + type?: string; - /** This API is used to receive the server-side handler for export related operations. - */ - url?: string; + /** returns true when the value changed by user interaction otherwise returns false + */ + isInteraction?: boolean; - /** Specifies the file name for the exported word file. - */ - fileName?: string; - } + /** returns the previously selected time value + */ + prevTime?: string; - export interface FileBrowser { + /** returns the modified time value + */ + value?: string; + } - /** This API is used to receive the server-side handler for file related operations. - */ - ajaxAction?: string; + export interface CloseEventArgs { - /** Specifies the file type extension shown in the file browser window. - */ - extensionAllow?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Specifies the directory to perform operations like create, delete and rename folder and files, and upload the selected files to the current directory. - */ - filePath?: string; - } + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; - export interface ImageBrowser { + /** returns the name of the event + */ + type?: string; - /** This API is used to receive the server-side handler for the file related operations. - */ - ajaxAction?: string; + /** returns the previously selected time value + */ + prevTime?: string; - /** Specifies the file type extension shown in the image browser window. - */ - extensionAllow?: string; + /** returns the time value + */ + value?: string; + } - /** Specifies the directory to perform operations like create, delete and rename folder and files, and upload the selected images to the current directory. - */ - filePath?: string; - } + export interface CreateEventArgs { - export interface ImportSettings { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** This API is used to receive the server-side handler for import operations. - */ - url?: string; - } + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; - export interface ToolsCustomOrderedList { + /** returns the name of the event + */ + type?: string; + } - /** Specifies the name for customOrderedList item. - */ - name?: string; + export interface DestroyEventArgs { - /** Specifies the title for customOrderedList item. - */ - tooltip?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Specifies the styles for customOrderedList item. - */ - css?: string; + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; - /** Specifies the text for customOrderedList item. - */ - text?: string; + /** returns the name of the event + */ + type?: string; + } - /** Specifies the list style for customOrderedList item. - */ - listStyle?: string; + export interface FocusInEventArgs { - /** Specifies the image for customOrderedList item. - */ - listImage?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface ToolsCustomUnorderedList { + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; - /** Specifies the name for customUnorderedList item. - */ - name?: string; + /** returns the name of the event + */ + type?: string; - /** Specifies the title for customUnorderedList item. - */ - tooltip?: string; + /** returns the previously selected time value + */ + prevTime?: string; - /** Specifies the styles for customUnorderedList item. - */ - css?: string; + /** returns the current time value + */ + value?: string; + } - /** Specifies the text for customUnorderedList item. - */ - text?: string; + export interface FocusOutEventArgs { - /** Specifies the list style for customUnorderedList item. - */ - listStyle?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Specifies the image for customUnorderedList item. - */ - listImage?: string; - } + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; - export interface Tools { + /** returns the name of the event + */ + type?: string; - /** Specifies the alignment tools and the display order of this tool in the RTE toolbar. - */ - alignment?: any; + /** returns the previously selected time value + */ + prevTime?: string; - /** Specifies the casing tools and the display order of this tool in the RTE toolbar. - */ - casing?: any[]; + /** returns the current time value + */ + value?: string; + } - /** Specifies the clear tools and the display order of this tool in the RTE toolbar. - */ - clear?: any[]; - - /** Specifies the clipboard tools and the display order of this tool in the RTE toolbar. - */ - clipboard?: any[]; - - /** Specifies the edit tools and the displays tool in the RTE toolbar. - */ - edit?: any[]; - - /** Specifies the doAction tools and the display order of this tool in the RTE toolbar. - */ - doAction?: any[]; - - /** Specifies the effect of tools and the display order of this tool in RTE toolbar. - */ - effects?: any[]; - - /** Specifies the font tools and the display order of this tool in the RTE toolbar. - */ - font?: any[]; - - /** Specifies the formatStyle tools and the display order of this tool in the RTE toolbar. - */ - formatStyle?: any[]; - - /** Specifies the image tools and the display order of this tool in the RTE toolbar. - */ - images?: any[]; - - /** Specifies the indent tools and the display order of this tool in the RTE toolbar. - */ - indenting?: any[]; - - /** Specifies the link tools and the display order of this tool in the RTE toolbar. - */ - links?: any[]; - - /** Specifies the list tools and the display order of this tool in the RTE toolbar. - */ - lists?: any[]; - - /** Specifies the media tools and the display order of this tool in the RTE toolbar. - */ - media?: any[]; - - /** Specifies the style tools and the display order of this tool in the RTE toolbar. - */ - style?: any[]; - - /** Specifies the table tools and the display order of this tool in the RTE toolbar. - */ - tables?: any[]; - - /** Specifies the view tools and the display order of this tool in the RTE toolbar. - */ - view?: any[]; - - /** Specifies the print tools and the display order of this tool in the RTE toolbar. - */ - print?: any[]; - - /** Specifies the importExport tools and the display order of this tool in the RTE toolbar. - */ - importExport?: any[]; - - /** Specifies the customOrderedList tools and the display order of this tool in the RTE toolbar. - */ - customOrderedList?: ToolsCustomOrderedList[]; - - /** Specifies the customUnOrderedList tools and the display order of this tool in the RTE toolbar. - */ - customUnorderedList?: ToolsCustomUnorderedList[]; - } - } - - class Slider extends ej.Widget { - static fn: Slider; - constructor(element: JQuery | Element, options?: Slider.Model); - static Locale: any; - model: Slider.Model; - defaults: Slider.Model; - - /** To disable the slider - * @returns {void} - */ - disable(): void; - - /** To enable the slider - * @returns {void} - */ - enable(): void; - - /** To get value from slider handle - * @returns {number} - */ - getValue(): number; - - /** To set value to slider handle.By default animation is false while set the value. If you want to enable the animation, pass the enableAnimation as true to this method. - * @returns {void} - */ - setValue(): void; - } - export namespace Slider { - - export interface Model { - - /** Specifies the allowMouseWheel of the slider. - * @Default {false} - */ - allowMouseWheel?: boolean; - - /** Specifies the animationSpeed of the slider. - * @Default {500} - */ - animationSpeed?: number; - - /** Specify the CSS class to slider to achieve custom theme. - */ - cssClass?: string; - - /** Specifies the animation behavior of the slider. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Specifies the state of the slider. - * @Default {true} - */ - enabled?: boolean; - - /** Specify the enablePersistence to slider to save current model value to browser cookies for state maintains - * @Default {false} - */ - enablePersistence?: boolean; - - /** Specifies the Right to Left Direction of the slider. - * @Default {false} - */ - enableRTL?: boolean; - - /** Specifies the height of the slider. - * @Default {14} - */ - height?: string; - - /** Specifies the HTML Attributes of the ejSlider. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specifies the incremental step value of the slider. - * @Default {1} - */ - incrementStep?: number; - - /** Specifies the distance between two major (large) ticks from the scale of the slider. - * @Default {10} - */ - largeStep?: number; - - /** Specifies the ending value of the slider. - * @Default {100} - */ - maxValue?: number; - - /** Specifies the starting value of the slider. - * @Default {0} - */ - minValue?: number; - - /** Specifies the orientation of the slider. - * @Default {ej.orientation.Horizontal} - */ - orientation?: ej.Orientation | string; - - /** Specifies the readOnly of the slider. - * @Default {false} - */ - readOnly?: boolean; - - /** Specifies the rounded corner behavior for slider. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Shows/Hide the major (large) and minor (small) ticks in the scale of the slider. - * @Default {false} - */ - showScale?: boolean; - - /** Specifies the small ticks from the scale of the slider. - * @Default {true} - */ - showSmallTicks?: boolean; - - /** Specifies the showTooltip to shows the current Slider value, while moving the Slider handle or clicking on the slider handle of the slider. - * @Default {true} - */ - showTooltip?: boolean; - - /** Specifies the sliderType of the slider. - * @Default {ej.SliderType.Default} - */ - sliderType?: ej.slider.sliderType | string; - - /** Specifies the distance between two minor (small) ticks from the scale of the slider. - * @Default {1} - */ - smallStep?: number; - - /** Specifies the value of the slider. But it's not applicable for range slider. To range slider we can use values property. - * @Default {0} - */ - value?: number; - - /** Specifies the values of the range slider. But it's not applicable for default and minRange sliders. we can use value property for default and minRange sliders. - * @Default {[minValue,maxValue]} - */ - values?: any[]; - - /** Specifies the width of the slider. - * @Default {100%} - */ - width?: string; - - /** Fires once Slider control value is changed successfully. */ - change?(e: ChangeEventArgs): void; - - /** Fires once Slider control has been created successfully. */ - create?(e: CreateEventArgs): void; - - /** Fires when Slider control has been destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; - - /** Fires once Slider control is sliding successfully. */ - slide?(e: SlideEventArgs): void; - - /** Fires once Slider control is started successfully. */ - start?(e: StartEventArgs): void; - - /** Fires when Slider control is stopped successfully. */ - stop?(e: StopEventArgs): void; - - /** Fires when display the custom tooltip */ - tooltipChange?(e: TooltipChangeEventArgs): void; - } - - export interface ChangeEventArgs { + export interface OpenEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the time value + */ + value?: string; + } + + export interface SelectEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the previously selected time value + */ + prevTime?: string; + + /** returns the selected time value + */ + value?: string; + } + } + + class ToggleButton extends ej.Widget { + static fn: ToggleButton; + constructor(element: JQuery | Element, options?: ToggleButton.Model); + static Locale: any; + model: ToggleButton.Model; + defaults: ToggleButton.Model; + + /** Allows you to destroy the ToggleButton widget. + * @returns {void} + */ + destroy(): void; + + /** To disable the ToggleButton to prevent all user interactions. + * @returns {void} + */ + disable(): void; + + /** To enable the ToggleButton. + * @returns {void} + */ + enable(): void; + } + export namespace ToggleButton { + + export interface Model { + + /** Specify the icon in active state to the toggle button and it will be aligned from left margin of the button. + */ + activePrefixIcon?: string; + + /** Specify the icon in active state to the toggle button and it will be aligned from right margin of the button. + */ + activeSuffixIcon?: string; + + /** Sets the text when ToggleButton is in active state i.e.,checked state. + * @Default {null} + */ + activeText?: string; + + /** Specifies the contentType of the ToggleButton. See ContentType as below + * @Default {ej.ContentType.TextOnly} + */ + contentType?: ej.ContentType|string; + + /** Specify the CSS class to the ToggleButton to achieve custom theme. + */ + cssClass?: string; + + /** Specify the icon in default state to the toggle button and it will be aligned from left margin of the button. + */ + defaultPrefixIcon?: string; + + /** Specify the icon in default state to the toggle button and it will be aligned from right margin of the button. + */ + defaultSuffixIcon?: string; + + /** Specifies the text of the ToggleButton, when the control is a default state. i.e., unChecked state. + * @Default {null} + */ + defaultText?: string; + + /** Specifies the state of the ToggleButton. + * @Default {true} + */ + enabled?: boolean; + + /** Save current model value to browser cookies for maintaining states. When refreshing the ToggleButton control page, the model value is applied from browser cookies or HTML 5local + * storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Specify the Right to Left direction of the ToggleButton. + * @Default {false} + */ + enableRTL?: boolean; + + /** Specifies the height of the ToggleButton. + * @Default {28pixel} + */ + height?: number|string; + + /** It allows to define the characteristics of the ToggleButton control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specifies the image position of the ToggleButton. + * @Default {ej.ImagePosition.ImageLeft} + */ + imagePosition?: ej.ImagePosition|string; + + /** Allows to prevents the control switched to checked (active) state. + * @Default {false} + */ + preventToggle?: boolean; + + /** Displays the ToggleButton with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies the size of the ToggleButton. See ButtonSize as below + * @Default {ej.ButtonSize.Normal} + */ + size?: ej.ButtonSize|string; + + /** It allows to define the ToggleButton state to checked(Active) or unchecked(Default) at initial time. + * @Default {false} + */ + toggleState?: boolean; + + /** Specifies the type of the ToggleButton. See ButtonType as below + * @Default {ej.ButtonType.Button} + */ + type?: ej.ButtonType|string; + + /** Specifies the width of the ToggleButton. + * @Default {100pixel} + */ + width?: number|string; + + /** Fires when ToggleButton control state is changed successfully. + */ + change?(e: ChangeEventArgs): void; + + /** Fires when ToggleButton control is clicked successfully. + */ + click?(e: ClickEventArgs): void; + + /** Fires when ToggleButton control is created successfully. + */ + create?(e: CreateEventArgs): void; + + /** Fires when ToggleButton control is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + } + + export interface ChangeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** return the toggle button checked state + */ + isChecked?: boolean; + + /** returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface ClickEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** return the toggle button checked state + */ + isChecked?: boolean; + + /** returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /** return the toggle button state + */ + status?: boolean; + + /** returns the name of the event + */ + type?: string; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /** returns the name of the event + */ + type?: string; + } + } + + class Toolbar extends ej.Widget { + static fn: Toolbar; + constructor(element: JQuery | Element, options?: Toolbar.Model); + static Locale: any; + model: Toolbar.Model; + defaults: Toolbar.Model; + + /** Deselect the specified Toolbar item. + * @param {any} The element need to be deselected + * @returns {void} + */ + deselectItem(element: any): void; + + /** Deselect the Toolbar item based on specified id. + * @param {string} The ID of the element need to be deselected + * @returns {void} + */ + deselectItemByID(ID: string): void; + + /** Allows you to destroy the Toolbar widget. + * @returns {void} + */ + destroy(): void; + + /** To disable all items in the Toolbar control. + * @returns {void} + */ + disable(): void; + + /** Disable the specified Toolbar item. + * @param {any} The element need to be disabled + * @returns {void} + */ + disableItem(element: any): void; + + /** Disable the Toolbar item based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be disabled + * @returns {void} + */ + disableItemByID(ID: string): void; + + /** Enable the Toolbar if it is in disabled state. + * @returns {void} + */ + enable(): void; + + /** Enable the Toolbar item based on specified item. + * @param {any} The element need to be enabled + * @returns {void} + */ + enableItem(element: any): void; + + /** Enable the Toolbar item based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be enabled + * @returns {void} + */ + enableItemByID(ID: string): void; + + /** To hide the Toolbar + * @returns {void} + */ + hide(): void; + + /** Remove the item from toolbar, based on specified item. + * @param {any} The element need to be removed + * @returns {void} + */ + removeItem(element: any): void; + + /** Remove the item from toolbar, based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be removed + * @returns {void} + */ + removeItemByID(ID: string): void; + + /** Selects the item from toolbar, based on specified item. + * @param {any} The element need to be selected + * @returns {void} + */ + selectItem(element: any): void; + + /** Selects the item from toolbar, based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be selected + * @returns {void} + */ + selectItemByID(ID: string): void; + + /** To show the Toolbar. + * @returns {void} + */ + show(): void; + } + export namespace Toolbar { + + export interface Model { + + /** Sets the root CSS class for Toolbar control to achieve the custom theme. + */ + cssClass?: string; + + /** Specifies dataSource value for the Toolbar control during initialization. + * @Default {null} + */ + dataSource?: any; + + /** Disables an Item or set of Items that are enabled in the Toolbar + * @Default {[]} + */ + disabledItemIndices?: any[]; + + /** Specifies the Toolbar control state. + * @Default {true} + */ + enabled?: boolean; + + /** Enables an Item or set of Items that are disabled in the Toolbar + * @Default {[]} + */ + enabledItemIndices?: any[]; + + /** Specifies enableRTL property to align the Toolbar control from right to left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows to separate the each UL items in the Toolbar control. + * @Default {false} + */ + enableSeparator?: boolean; + + /** Specifies the mapping fields for the data items of the Toolbar + * @Default {null} + */ + fields?: string; + + /** Specifies the height of the Toolbar. + * @Default {28} + */ + height?: number|string; + + /** Specifies the list of HTML attributes to be added to toolbar control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specifies whether the Toolbar control is need to be show or hide. + * @Default {false} + */ + hide?: boolean; + + /** Enables/Disables the responsive support for Toolbar items during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /** Specifies the items of Toolbar + * @Default {null} + */ + Items?: Items; + + /** Specifies the Toolbar orientation. See orientation + * @Default {Horizontal} + */ + orientation?: ej.Orientation|string; + + /** Specifies the query to retrieve the data from the online server. The query is used only when the online dataSource is used. + * @Default {null} + */ + query?: any; + + /** Specifies the Toolbar responsive type. + * @Default {Popup} + */ + responsiveType?: ej.Toolbar.ResponsiveType|string; + + /** Displays the Toolbar with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies the width of the Toolbar. + */ + width?: number|string; + + /** Fires after Toolbar control is clicked. + */ + click?(e: ClickEventArgs): void; + + /** Fires after Toolbar control is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires after Toolbar control is focused. + */ + focusOut?(e: FocusOutEventArgs): void; + + /** Fires when the Toolbar is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires after Toolbar control item is hovered. + */ + itemHover?(e: ItemHoverEventArgs): void; + + /** Fires after mouse leave from Toolbar control item. + */ + itemLeave?(e: ItemLeaveEventArgs): void; + + /** Fires when the overflow popup of toolbar is opened. + */ + overflowOpen?(e: OverflowOpenEventArgs): void; + + /** Fires when the overflow popup of toolbar is closed. + */ + overflowClose?(e: OverflowCloseEventArgs): void; + } + + export interface ClickEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the target of the current object. + */ + target?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the target of the current object. + */ + currentTarget?: any; - /** returns current handle number or index - */ - sliderIndex?: number; + /** return the Toolbar state + */ + status?: boolean; + } - /** returns slider id. - */ - id?: string; - - /** returns the slider model. - */ - model?: ej.Slider.Model; + export interface CreateEventArgs { - /** returns the name of the event. - */ - type?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the slider value. - */ - value?: number; + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; - /** returns true if event triggered by interaction else returns false. - */ - isInteraction?: boolean; - } + /** returns the name of the event + */ + type?: string; + } - export interface CreateEventArgs { + export interface FocusOutEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the slider model - */ - model?: ej.Slider.Model; + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; - /** returns the name of the event - */ - type?: string; - } + /** returns the name of the event + */ + type?: string; + } - export interface DestroyEventArgs { + export interface DestroyEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the slider model - */ - model?: ej.Slider.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface SlideEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns current handle number or index - */ - sliderIndex?: number; - - /** returns slider id - */ - id?: string; - - /** returns the slider model - */ - model?: ej.Slider.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the slider value - */ - value?: number; - } - - export interface StartEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns current handle number or index - */ - sliderIndex?: number; - - /** returns slider id - */ - id?: string; - - /** returns the slider model - */ - model?: ej.Slider.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the slider value - */ - value?: number; - } - - export interface StopEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns current handle number or index - */ - sliderIndex?: number; - - /** returns slider id - */ - id?: string; - - /** returns the slider model - */ - model?: ej.Slider.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the slider value - */ - value?: number; - } - - export interface TooltipChangeEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } - } - namespace slider { - enum sliderType { - //Shows default slider - Default, - //Shows minRange slider - MinRange, - //Shows Range slider - Range, - } - } - - class SplitButton extends ej.Widget { - static fn: SplitButton; - constructor(element: JQuery | Element, options?: SplitButton.Model); - static Locale: any; - model: SplitButton.Model; - defaults: SplitButton.Model; - - /** Destroy the split button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** To disable the split button - * @returns {void} - */ - disable(): void; - - /** To Enable the split button - * @returns {void} - */ - enable(): void; - - /** To hide the list content of the split button. - * @returns {void} - */ - hide(): void; - - /** To show the list content of the split button. - * @returns {void} - */ - show(): void; - } - export namespace SplitButton { - - export interface Model { - - /** Specifies the arrowPosition of the Split or Dropdown Button.See arrowPosition - * @Default {ej.ArrowPosition.Right} - */ - arrowPosition?: string | ej.ArrowPosition; - - /** Specifies the buttonMode like Split or Dropdown Button.See ButtonMode - * @Default {ej.ButtonMode.Split} - */ - buttonMode?: string | ej.ButtonMode; - - /** Specifies the contentType of the Split Button.See ContentType - * @Default {ej.ContentType.TextOnly} - */ - contentType?: string | ej.ContentType; - - /** Set the root class for Split Button control theme - */ - cssClass?: string; - - /** Specifies the disabling of Split Button if enabled is set to false. - * @Default {true} - */ - enabled?: boolean; - - /** Specifies the enableRTL property for Split Button while initialization. - * @Default {false} - */ - enableRTL?: boolean; - - /** Specifies the height of the Split Button. - * @Default {“”} - */ - height?: string | number; - - /** Specifies the HTML Attributes of the Split Button. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specifies the imagePosition of the Split Button.See imagePositions - * @Default {ej.ImagePosition.ImageRight} - */ - imagePosition?: string | ej.ImagePosition; - - /** Specifies the image content for Split Button while initialization. - */ - prefixIcon?: string; - - /** Specifies the showRoundedCorner property for Split Button while initialization. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specifies the size of the Button. See ButtonSize - * @Default {ej.ButtonSize.Normal} - */ - size?: string | ej.ButtonSize; - - /** Specifies the image content for Split Button while initialization. - */ - suffixIcon?: string; - - /** Specifies the list content for Split Button while initialization - */ - targetID?: string; - - /** Specifies the text content for Split Button while initialization. - */ - text?: string; - - /** Specifies the width of the Split Button. - * @Default {“”} - */ - width?: string | number; + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; - /** Fires before menu of the split button control is opened. */ - beforeOpen?(e: BeforeOpenEventArgs): void; + /** returns the name of the event + */ + type?: string; + } - /** Fires when Button control is clicked successfully */ - click?(e: ClickEventArgs): void; + export interface ItemHoverEventArgs { - /** Fires before the list content of Button control is closed */ - close?(e: CloseEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Fires after Split Button control is created. */ - create?(e: CreateEventArgs): void; + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; - /** Fires when the Split Button is destroyed successfully */ - destroy?(e: DestroyEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Fires when a menu item is Hovered out successfully */ - itemMouseOut?(e: ItemMouseOutEventArgs): void; + /** returns the target of the current object. + */ + target?: any; - /** Fires when a menu item is Hovered in successfully */ - itemMouseOver?(e: ItemMouseOverEventArgs): void; + /** returns the target of the current object. + */ + currentTarget?: any; - /** Fires when a menu item is clicked successfully */ - itemSelected?(e: ItemSelectedEventArgs): void; + /** return the Toolbar state + */ + status?: boolean; + } - /** Fires before the list content of Button control is opened */ - open?(e: OpenEventArgs): void; - } + export interface ItemLeaveEventArgs { - export interface BeforeOpenEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; - /** returns the split button model - */ - model?: ej.SplitButton.Model; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event - */ - type?: string; - } + /** returns the target of the current object. + */ + target?: any; - export interface ClickEventArgs { + /** returns the target of the current object. + */ + currentTarget?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** return the Toolbar state + */ + status?: boolean; + } - /** returns the split button model - */ - model?: ej.SplitButton.Model; + export interface OverflowOpenEventArgs { - /** returns the name of the event - */ - type?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the target of the current object. - */ - target?: any; + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; - /** return the button state - */ - status?: boolean; - } + /** returns the name of the event + */ + type?: string; - export interface CloseEventArgs { + /** Returns the current X position of the target . + */ + clientX?: number; - /** returns the cancel option value - */ - cancel?: boolean; + /** Returns the current Y position of the target . + */ + clientY?: number; - /** returns the split button model - */ - model?: ej.SplitButton.Model; + /** returns the target of the current object. + */ + currentTarget?: any; + } - /** returns the name of the event - */ - type?: string; - } + export interface OverflowCloseEventArgs { - export interface CreateEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; - /** returns the split button model - */ - model?: ej.SplitButton.Model; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event - */ - type?: string; - } + /** Returns the current X position of the target . + */ + clientX?: number; - export interface DestroyEventArgs { + /** Returns the current Y position of the target . + */ + clientY?: number; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the target of the current object. + */ + currentTarget?: any; + } - /** returns the split button model - */ - model?: ej.SplitButton.Model; + export interface Fields { - /** returns the name of the event - */ - type?: string; - } + /** Defines the group name for the item. + */ + group?: string; - export interface ItemMouseOutEventArgs { + /** Defines the HTML attributes such as id, class, styles for the item to extend the capability. + */ + htmlAttributes?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** Defines id for the tag. + */ + id?: string; - /** returns the split button model - */ - model?: ej.SplitButton.Model; + /** Defines the image attributes such as height, width, styles and so on. + */ + imageAttributes?: string; - /** returns the name of the event - */ - type?: string; - - /** returns the clicked menu item element - */ - element?: any; - - /** return the menu item id - */ - ID?: string; - - /** return the clicked menu item text - */ - Text?: string; - } - - export interface ItemMouseOverEventArgs { - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the split button model - */ - model?: ej.SplitButton.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the clicked menu item element - */ - element?: any; - - /** return the menu item id - */ - ID?: string; - - /** return the clicked menu item text - */ - Text?: string; - } - - export interface ItemSelectedEventArgs { - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the split button model - */ - model?: ej.SplitButton.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the clicked menu item element - */ - element?: any; - - /** returns the selected item - */ - selectedItem?: any; - - /** return the menu id - */ - menuId?: string; - - /** return the clicked menu item text - */ - menuText?: string; - } - - export interface OpenEventArgs { - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the split button model - */ - model?: ej.SplitButton.Model; - - /** returns the name of the event - */ - type?: string; - } - } - enum ArrowPosition { - //To set Left arrowPosition of the split button - Left, - //To set Right arrowPosition of the split button - Right, - //To set Top arrowPosition of the split button - Top, - //To set Bottom arrowPosition of the split button - Bottom, - } - - class Splitter extends ej.Widget { - static fn: Splitter; - constructor(element: JQuery | Element, options?: Splitter.Model); - static Locale: any; - model: Splitter.Model; - defaults: Splitter.Model; - - /** To add a new pane to splitter control. - * @param {string} content of pane. - * @param {any} pane properties. - * @param {number} index of pane. - * @returns {HTMLElement} - */ - addItem(content: string, property: any, index: number): HTMLElement; - - /** To collapse the splitter control pane. - * @param {number} index number of pane. - * @returns {void} - */ - collapse(paneIndex: number): void; - - /** To expand the splitter control pane. - * @param {number} index number of pane. - * @returns {void} - */ - expand(paneIndex: number): void; - - /** To refresh the splitter control pane resizing. - * @returns {void} - */ - refresh(): void; - - /** To remove a specified pane from the splitter control. - * @param {number} index of pane. - * @returns {void} - */ - removeItem(index: number): void; - } - export namespace Splitter { - - export interface Model { - - /** Turns on keyboard interaction with the Splitter panes. You must set this property to true to access the keyboard shortcuts of ejSplitter. - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** Specify animation speed for the Splitter pane movement, while collapsing and expanding. - * @Default {300} - */ - animationSpeed?: number; - - /** Specify the CSS class to splitter control to achieve custom theme. - * @Default {“”} - */ - cssClass?: string; - - /** Specifies the animation behavior of the splitter. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Specifies the splitter control to be displayed in right to left direction. - * @Default {false} - */ - enableRTL?: boolean; - - /** Specify height for splitter control. - * @Default {null} - */ - height?: string; - - /** Specifies the HTML Attributes of the Splitter. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specify window resizing behavior for splitter control. - * @Default {false} - */ - isResponsive?: boolean; - - /** Specify the orientation for splitter control. See orientation - * @Default {ej.orientation.Horizontal or “horizontal”} - */ - orientation?: ej.Orientation | string; - - /** Specify properties for each pane like paneSize, minSize, maxSize, collapsible, expandable, resizable. - * @Default {[]} - */ - properties?: any[]; - - /** Specify width for splitter control. - * @Default {null} - */ - width?: string; - - /** Fires before expanding / collapsing the split pane of splitter control. */ - beforeExpandCollapse?(e: BeforeExpandCollapseEventArgs): void; - - /** Fires when splitter control pane has been created. */ - create?(e: CreateEventArgs): void; - - /** Fires when splitter control pane has been destroyed. */ - destroy?(e: DestroyEventArgs): void; - - /** Fires when expand / collapse operation in splitter control pane has been performed successfully. */ - expandCollapse?(e: ExpandCollapseEventArgs): void; - - /** Fires when resize in splitter control pane. */ - resize?(e: ResizeEventArgs): void; - } - - export interface BeforeExpandCollapseEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns collapsed pane details. - */ - collapsed?: any; - - /** returns expanded pane details. - */ - expanded?: any; - - /** returns the splitter model. - */ - model?: ej.Splitter.Model; - - /** returns the current split bar index. - */ - splitbarIndex?: number; - - /** returns the name of the event. - */ - type?: string; - } - - export interface CreateEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the splitter model. - */ - model?: ej.Splitter.Model; - - /** returns the name of the event. - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the splitter model. - */ - model?: ej.Splitter.Model; - - /** returns the name of the event. - */ - type?: string; - } - - export interface ExpandCollapseEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns collapsed pane details. - */ - collapsed?: any; - - /** returns expanded pane details. - */ - expanded?: any; - - /** returns the splitter model. - */ - model?: ej.Splitter.Model; - - /** returns the current split bar index. - */ - splitbarIndex?: number; - - /** returns the name of the event. - */ - type?: string; - } - - export interface ResizeEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns previous pane details. - */ - prevPane?: any; - - /** returns next pane details. - */ - nextPane?: any; - - /** returns the splitter model. - */ - model?: ej.Splitter.Model; - - /** returns the current split bar index. - */ - splitbarIndex?: number; - - /** returns the name of the event. - */ - type?: string; - } - } - - class Tab extends ej.Widget { - static fn: Tab; - constructor(element: JQuery | Element, options?: Tab.Model); - static Locale: any; - model: Tab.Model; - defaults: Tab.Model; - - /** Add new tab items with given name, URL and given index position, if index null it’s add last item. - * @param {string} URL name / tab id. - * @param {string} Tab Display name. - * @param {number} Index position to placed , this is optional. - * @param {string} specifies cssClass, this is optional. - * @param {string} specifies id of tab, this is optional. - * @returns {void} - */ - addItem(URL: string, displayLabel: string, index: number, cssClass: string, id: string): void; - - /** To disable the tab control. - * @returns {void} - */ - disable(): void; - - /** To enable the tab control. - * @returns {void} - */ - enable(): void; - - /** This function get the number of tab rendered - * @returns {number} - */ - getItemsCount(): number; - - /** This function hides the tab control. - * @returns {void} - */ - hide(): void; - - /** This function hides the specified item tab in tab control. - * @param {number} index of tab item. - * @returns {void} - */ - hideItem(index: number): void; - - /** Remove the given index tab item. - * @param {number} index of tab item. - * @returns {void} - */ - removeItem(index: number): void; - - /** This function is to show the tab control. - * @returns {void} - */ - show(): void; - - /** This function helps to show the specified hidden tab item in tab control. - * @param {number} index of tab item. - * @returns {void} - */ - showItem(index: number): void; - } - export namespace Tab { - - export interface Model { - - /** Specifies the ajaxSettings option to load the content to the Tab control. - */ - ajaxSettings?: AjaxSettings; - - /** Tab items interaction with keyboard keys, like headers active navigation. - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** Allow to collapsing the active item, while click on the active header. - * @Default {false} - */ - collapsible?: boolean; - - /** Set the root class for Tab theme. This cssClass API helps to use custom skinning option for Tab control. - */ - cssClass?: string; - - /** Disables the given tab headers and content panels. - * @Default {[]} - */ - disabledItemIndex?: number[]; - - /** Specifies the animation behavior of the tab. - * @Default {true} - */ - enableAnimation?: boolean; - - /** When this property is set to false, it disables the tab control. - * @Default {true} - */ - enabled?: boolean; - - /** Enables the given tab headers and content panels. - * @Default {[]} - */ - enabledItemIndex?: number[]; - - /** Save current model value to browser cookies for state maintains. While refresh the Tab control page the model value apply from browser cookies. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Display Right to Left direction for headers and panels text of tab. - * @Default {false} - */ - enableRTL?: boolean; - - /** Specify to enable scrolling for Tab header. - * @Default {false} - */ - enableTabScroll?: boolean; - - /** The event API to bind the action for active the tab items. - * @Default {click} - */ - events?: string; - - /** Specifies the position of Tab header as top, bottom, left or right. See below to get available Position - * @Default {top} - */ - headerPosition?: string | ej.Tab.Position; - - /** Set the height of the tab header element. Default this property value is null, so height take content height. - * @Default {null} - */ - headerSize?: string | number; - - /** Height set the outer panel element. Default this property value is null, so height take content height. - * @Default {null} - */ - height?: string | number; - - /** Adjust the content panel height for given option (content, auto and fill), by default panels height adjust based on the content.See below to get available HeightAdjustMode - * @Default {content} - */ - heightAdjustMode?: string | ej.Tab.HeightAdjustMode; - - /** Specifies to hide a pane of Tab control. - * @Default {[]} - */ - hiddenItemIndex?: any[]; - - /** Specifies the HTML Attributes of the Tab. - * @Default {{}} - */ - htmlAttributes?: any; - - /** The idPrefix property appends the given string on the added tab item id’s in runtime. - * @Default {ej-tab-} - */ - idPrefix?: string; - - /** Specifies the Tab header in active for given index value. - * @Default {0} - */ - selectedItemIndex?: number; - - /** Display the close button for each tab items. While clicking on the close icon, particular tab item will be removed. - * @Default {false} - */ - showCloseButton?: boolean; - - /** Display the Reload button for each tab items. - * @Default {false} - */ - showReloadIcon?: boolean; - - /** Tab panels and headers to be displayed in rounded corner style. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Set the width for outer panel element, if not it’s take parent width. - * @Default {null} - */ - width?: string | number; - - /** Triggered after a tab item activated. */ - itemActive?(e: ItemActiveEventArgs): void; - - /** Triggered before AJAX content has been loaded. */ - ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; - - /** Triggered if error occurs in AJAX request. */ - ajaxError?(e: AjaxErrorEventArgs): void; - - /** Triggered after AJAX content load action. */ - ajaxLoad?(e: AjaxLoadEventArgs): void; - - /** Triggered after a tab item activated. */ - ajaxSuccess?(e: AjaxSuccessEventArgs): void; + /** Defines the imageURL for the image location. + */ + imageUrl?: string; + + /** Defines the sprite CSS for the image tag. + */ + spriteCssClass?: string; + + /** Defines the text content for the tag. + */ + text?: string; + + /** Defines the tooltip text for the tag. + */ + tooltipText?: string; + + /** Allows you to add template as toolbar item + */ + template?: string; + } + + export interface Items { + + /** Defines the group name for the item. + */ + group?: string; + + /** Defines the HTML attributes such as id, class, styles for the item . + */ + htmlAttributes?: any; + + /** Defines id for the tag. + */ + id?: string; + + /** Defines the image attributes such as height, width, styles and so on. + */ + imageAttributes?: string; + + /** Defines the imageURL for the image location. + */ + imageUrl?: string; + + /** Defines the sprite CSS for the image tag. + */ + spriteCssClass?: string; + + /** Defines the text content for the tag. + */ + text?: string; + + /** Defines the tooltip text for the tag. + */ + tooltipText?: string; + + /** Allows to add template as toolbar item. + */ + template?: string; + } + + enum ResponsiveType { + + ///To display the toolbar overflow items as popup + Popup, + + ///To display the toolbar overflow items as inline toolbar + Inline + } + + } + + class TreeView extends ej.Widget { + static fn: TreeView; + constructor(element: JQuery | Element, options?: TreeView.Model); + static Locale: any; + model: TreeView.Model; + defaults: TreeView.Model; + + /** To add a Node or collection of nodes in TreeView. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in + * TreeView. + * @param {string|any} New node text or JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + addNode(newNodeText: string|any, target: string|any): void; + + /** To add a collection of nodes in TreeView. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. + * @param {any|any[]} New node details in JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + addNodes(collection: any|any[], target: string|any): void; + + /** To check all the nodes in TreeView. + * @returns {void} + */ + checkAll(): void; + + /** To check a node in TreeView. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes + * @returns {void} + */ + checkNode(element: string|any|any[]): void; + + /** This method is used to collapse all nodes in TreeView control. If you want to collapse all nodes up to the specific level in TreeView control then we need to pass levelUntil as + * argument to this method. + * @param {number} TreeView nodes will collapse until the given level + * @param {boolean} Weather exclude the hidden nodes of TreeView while collapse all nodes + * @returns {void} + */ + collapseAll(levelUntil?: number, excludeHiddenNodes?: boolean): void; + + /** To collapse a particular node in TreeView. + * @param {string|any|any[]} ID of TreeView node|object of TreeView node/collection of ID/object of TreeView nodes + * @returns {void} + */ + collapseNode(element: string|any|any[]): void; + + /** To disable the node in the TreeView. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes + * @returns {void} + */ + disableNode(element: string|any|any[]): void; + + /** To enable the node in the TreeView. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes + * @returns {void} + */ + enableNode(element: string|any|any[]): void; + + /** To ensure that the TreeView node is visible in the TreeView. This method is useful if we need select a TreeView node dynamically. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + ensureVisible(element: string|any): boolean; + + /** This method is used to expand all nodes in TreeView control. If you want to expand all nodes up to the specific level in TreeView control then we need to pass levelUntil as + * argument to this method. + * @param {number} TreeView nodes will expand until the given level + * @param {boolean} Weather exclude the hidden nodes of TreeView while expand all nodes + * @returns {void} + */ + expandAll(levelUntil?: number, excludeHiddenNodes?: boolean): void; + + /** To expandNode particular node in TreeView. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes + * @returns {void} + */ + expandNode(element: string|any|any[]): void; + + /** To get currently checked nodes in TreeView. + * @returns {any} + */ + getCheckedNodes(): any; + + /** To get currently checked nodes indexes in TreeView. + * @returns {any[]} + */ + getCheckedNodesIndex(): any[]; + + /** This method is used to get immediate child nodes of a node in TreeView control. If you want to get the all child nodes include nested child nodes then we need to pass + * includeNestedChild as true along with element arguments to this method. + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {boolean} Weather include nested child nodes of TreeView node + * @returns {any[]} + */ + getChildren(element: string|any, includeNestedChild?: boolean): any[]; + + /** To get number of nodes in TreeView. + * @returns {number} + */ + getNodeCount(): number; + + /** To get currently expanded nodes in TreeView. + * @returns {any} + */ + getExpandedNodes(): any; + + /** To get currently expanded nodes indexes in TreeView. + * @returns {any[]} + */ + getExpandedNodesIndex(): any[]; + + /** To get TreeView node by using index position in TreeView. + * @param {number} Index position of TreeView node + * @returns {any} + */ + getNodeByIndex(index: number): any; + + /** To get TreeView node data such as id, text, parentId, selected, checked, expanded, level, childes and index. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {any} + */ + getNode(element: string|any): any; + + /** To get current index position of TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {number} + */ + getNodeIndex(element: string|any): number; + + /** To get immediate parent TreeView node of particular TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {any} + */ + getParent(element: string|any): any; + + /** To get the currently selected node in TreeView. + * @returns {any} + */ + getSelectedNode(): any; + + /** To get the currently selected nodes in TreeView. + * @returns {any[]} + */ + getSelectedNodes(): any[]; + + /** To get the index position of currently selected node in TreeView. + * @returns {number} + */ + getSelectedNodeIndex(): number; + + /** To get the index positions of currently selected nodes in TreeView. + * @returns {any[]} + */ + getSelectedNodesIndex(): any[]; + + /** To get the text of a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {string} + */ + getText(element: string|any): string; + + /** To get the updated datasource of TreeView after performing some operation like drag and drop, node editing, adding and removing node. + * @param {string|number} ID of TreeView node + * @returns {any[]} + */ + getTreeData(id?: string|number): any[]; + + /** To get currently visible nodes in TreeView. + * @returns {any} + */ + getVisibleNodes(): any; + + /** To check a node having child or not. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + hasChildNode(element: string|any): boolean; + + /** To show nodes in TreeView. + * @returns {void} + */ + hide(): void; + + /** To hide particular node in TreeView. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes + * @returns {void} + */ + hideNode(element: string|any|any[]): void; + + /** To add a Node or collection of nodes after the particular TreeView node. + * @param {string|any} New node text or JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + insertAfter(newNodeText: string|any, target: string|any): void; + + /** To add a Node or collection of nodes before the particular TreeView node. + * @param {string|any} New node text or JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + insertBefore(newNodeText: string|any, target: string|any): void; + + /** To check the given TreeView node is checked or unchecked. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isNodeChecked(element: string|any): boolean; + + /** To check whether the child nodes are loaded of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isChildLoaded(element: string|any): boolean; + + /** To check the given TreeView node is disabled or enabled. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isDisabled(element: string|any): boolean; + + /** To check the given node is exist in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isExist(element: string|any): boolean; + + /** To get the expand status of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isExpanded(element: string|any): boolean; + + /** To get the select status of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isSelected(element: string|any): boolean; + + /** To get the visibility status of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isVisible(element: string|any): boolean; + + /** To load the TreeView nodes from the particular URL. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in + * TreeView. + * @param {string} URL location, the data returned from the URL will be loaded in TreeView + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + loadData(URL: string, target: string|any): void; + + /** To move the TreeView node with in same TreeView. The new position of given TreeView node will be based on destination node and index position. + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {number} New index position of given source node + * @returns {void} + */ + moveNode(sourceNode: string|any, destinationNode: string|any, index: number): void; + + /** To refresh the TreeView + * @returns {void} + */ + refresh(): void; + + /** To remove all the nodes in TreeView. + * @returns {void} + */ + removeAll(): void; + + /** To remove a node in TreeView. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes + * @returns {void} + */ + removeNode(element: string|any|any[]): void; + + /** To select all the TreeView nodes when enable allowMultiSelection property. + * @returns {void} + */ + selectAll(): void; + + /** This method is used to select a node in TreeView control. If you want to select the collection of nodes in TreeView control then we need to enable allowMultiSelection property. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/ collection of ID/object of TreeView nodes + * @returns {void} + */ + selectNode(element: string|any|any[]): void; + + /** To show nodes in TreeView. + * @returns {void} + */ + show(): void; + + /** To show a node in TreeView. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes + * @returns {void} + */ + showNode(element: string|any|any[]): void; + + /** To uncheck all the nodes in TreeView. + * @returns {void} + */ + unCheckAll(): void; + + /** To uncheck a node in TreeView. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes + * @returns {void} + */ + uncheckNode(element: string|any|any[]): void; + + /** To unselect all the TreeView nodes when enable allowMultiSelection property. + * @returns {void} + */ + unselectAll(): void; + + /** This method is used to unselect a node in TreeView control. If you want to unselect the collection of nodes in TreeView control then we need to enable allowMultiSelection property. + * @param {string|any|any[]} ID of TreeView node/object of TreeView node/ collection of ID/object of TreeView nodes + * @returns {void} + */ + unselectNode(element: string|any|any[]): void; + + /** To edit or update the text of the TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string} New text + * @returns {void} + */ + updateText(target: string|any, newText: string): void; + } + export namespace TreeView { + + export interface Model { + + /** Gets or sets a value that indicates whether to enable drag and drop a node within the same tree. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /** Gets or sets a value that indicates whether to enable drag and drop a node in inter ej.TreeView. + * @Default {true} + */ + allowDragAndDropAcrossControl?: boolean; + + /** Gets or sets a value that indicates whether to drop a node to a sibling of particular node. + * @Default {true} + */ + allowDropSibling?: boolean; + + /** Gets or sets a value that indicates whether to drop a node to a child of particular node. + * @Default {true} + */ + allowDropChild?: boolean; + + /** Gets or sets a value that indicates whether to enable node editing support for TreeView. + * @Default {false} + */ + allowEditing?: boolean; + + /** Gets or sets a value that indicates whether to enable keyboard support for TreeView actions like nodeSelection, nodeEditing, nodeExpand, nodeCollapse, nodeCut and Paste. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Gets or sets a value that indicates whether to enable multi selection support for TreeView. + * @Default {false} + */ + allowMultiSelection?: boolean; + + /** Allow us to specify the parent and child nodes to get auto check while we check or uncheck a node. + * @Default {true} + */ + autoCheck?: boolean; + + /** Allow us to specify the parent node to be retain in checked or unchecked state instead of going for indeterminate state. + * @Default {false} + */ + autoCheckParentNode?: boolean; + + /** Gets or sets a value that indicates the checkedNodes index collection as an array. The given array index position denotes the nodes, that are checked while rendering TreeView. + * @Default {[]} + */ + checkedNodes?: any[]; + + /** Sets the root CSS class for TreeView which allow us to customize the appearance. + */ + cssClass?: string; + + /** Gets or sets a value that indicates whether to enable or disable the animation effect while expanding or collapsing a node. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Gets or sets a value that indicates whether a TreeView can be enabled or disabled. No actions can be performed while this property is set as false + * @Default {true} + */ + enabled?: boolean; + + /** Allow us to prevent multiple nodes to be in expanded state. If it set to false, previously expanded node will be collapsed automatically, while we expand a node. + * @Default {true} + */ + enableMultipleExpand?: boolean; + + /** Sets a value that indicates whether to persist the TreeView model state in page using applicable medium i.e., HTML5 localStorage or cookies + * @Default {false} + */ + enablePersistence?: boolean; + + /** Gets or sets a value that indicates to align content in the TreeView control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /** Gets or sets a array of value that indicates the expandedNodes index collection as an array. The given array index position denotes the nodes, that are expanded while rendering + * TreeView. + * @Default {[]} + */ + expandedNodes?: any[]; + + /** Gets or sets a value that indicates the TreeView node can be expand or collapse by using the specified action. + * @Default {dblclick} + */ + expandOn?: string; + + /** Gets or sets a fields object that allow us to map the data members with field properties in order to make the data binding easier. + * @Default {null} + */ + fields?: Fields; + + /** Gets or sets a value that indicates whether to enable full row selection support for TreeView. + * @Default {false} + */ + fullRowSelect?: boolean; + + /** Defines the height of the TreeView. + * @Default {Null} + */ + height?: string|number; + + /** Specifies the HTML Attributes for the TreeView. Using this API we can add custom attributes in TreeView control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specifies the child nodes to be loaded on demand + * @Default {false} + */ + loadOnDemand?: boolean; + + /** Gets or Sets a value that indicates the index position of a tree node. The particular index tree node will be selected while rendering the TreeView. + * @Default {-1} + */ + selectedNode?: number; + + /** Gets or sets a value that indicates the selectedNodes index collection as an array. The given array index position denotes the nodes, that are selected while rendering TreeView. + * @Default {[]} + */ + selectedNodes?: any[]; + + /** Gets or sets a value that indicates whether to display or hide checkbox for all TreeView nodes. + * @Default {false} + */ + showCheckbox?: boolean; + + /** By using sortSettings property, you can customize the sorting option in TreeView control. + */ + sortSettings?: SortSettings; + + /** Allow us to use custom template in order to create TreeView. + * @Default {null} + */ + template?: string; + + /** Defines the width of the TreeView. + * @Default {Null} + */ + width?: string|number; + + /** Fires before adding node to TreeView. + */ + beforeAdd?(e: BeforeAddEventArgs): void; + + /** Fires before collapse a node. + */ + beforeCollapse?(e: BeforeCollapseEventArgs): void; + + /** Fires before cut node in TreeView. + */ + beforeCut?(e: BeforeCutEventArgs): void; + + /** Fires before deleting node in TreeView. + */ + beforeDelete?(e: BeforeDeleteEventArgs): void; + + /** Fires before editing the node in TreeView. + */ + beforeEdit?(e: BeforeEditEventArgs): void; + + /** Fires before expanding the node. + */ + beforeExpand?(e: BeforeExpandEventArgs): void; + + /** Fires before loading nodes to TreeView. + */ + beforeLoad?(e: BeforeLoadEventArgs): void; + + /** Fires before paste node in TreeView. + */ + beforePaste?(e: BeforePasteEventArgs): void; + + /** Fires before selecting node in TreeView. + */ + beforeSelect?(e: BeforeSelectEventArgs): void; + + /** Fires when TreeView created successfully. + */ + create?(e: CreateEventArgs): void; + + /** Fires when TreeView destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires before nodeEdit Successful. + */ + inlineEditValidation?(e: InlineEditValidationEventArgs): void; + + /** Fires when key pressed successfully. + */ + keyPress?(e: KeyPressEventArgs): void; + + /** Fires when data load fails. + */ + loadError?(e: LoadErrorEventArgs): void; + + /** Fires when data loaded successfully. + */ + loadSuccess?(e: LoadSuccessEventArgs): void; + + /** Fires once node added successfully. + */ + nodeAdd?(e: NodeAddEventArgs): void; + + /** Fires once node checked successfully. + */ + nodeCheck?(e: NodeCheckEventArgs): void; + + /** Fires when node clicked successfully. + */ + nodeClick?(e: NodeClickEventArgs): void; + + /** Fires when node collapsed successfully. + */ + nodeCollapse?(e: NodeCollapseEventArgs): void; - /** Triggered before a tab item activated. */ - beforeActive?(e: BeforeActiveEventArgs): void; + /** Fires when node cut successfully. + */ + nodeCut?(e: NodeCutEventArgs): void; - /** Triggered before a tab item remove. */ - beforeItemRemove?(e: BeforeItemRemoveEventArgs): void; - - /** Triggered before a tab item Create. */ - create?(e: CreateEventArgs): void; + /** Fires when node deleted successfully. + */ + nodeDelete?(e: NodeDeleteEventArgs): void; - /** Triggered before a tab item destroy. */ - destroy?(e: DestroyEventArgs): void; + /** Fires when node dragging. + */ + nodeDrag?(e: NodeDragEventArgs): void; - /** Triggered after new tab item add */ - itemAdd?(e: ItemAddEventArgs): void; + /** Fires once node drag start successfully. + */ + nodeDragStart?(e: NodeDragStartEventArgs): void; - /** Triggered after tab item removed. */ - itemRemove?(e: ItemRemoveEventArgs): void; - } + /** Fires before the dragged node to be dropped. + */ + nodeDragStop?(e: NodeDragStopEventArgs): void; - export interface ItemActiveEventArgs { + /** Fires once node dropped successfully. + */ + nodeDropped?(e: NodeDroppedEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Fires once node edited successfully. + */ + nodeEdit?(e: NodeEditEventArgs): void; - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** Fires once node expanded successfully. + */ + nodeExpand?(e: NodeExpandEventArgs): void; - /** returns the name of the event. - */ - type?: string; + /** Fires once node pasted successfully. + */ + nodePaste?(e: NodePasteEventArgs): void; - /** returns previous active tab header. - */ - prevActiveHeader?: HTMLElement; + /** Fires when node selected successfully. + */ + nodeSelect?(e: NodeSelectEventArgs): void; - /** returns previous active index. - */ - prevActiveIndex?: number; + /** Fires once node unchecked successfully. + */ + nodeUncheck?(e: NodeUncheckEventArgs): void; - /** returns current active tab header . - */ - activeHeader?: HTMLElement; + /** Fires once node unselected successfully. + */ + nodeUnselect?(e: NodeUnselectEventArgs): void; - /** returns current active index. - */ - activeIndex?: number; + /** Fires when TreeView nodes are loaded successfully + */ + ready?(e: ReadyEventArgs): void; + } - /** returns, is it triggered by interaction or not. - */ - isInteraction?: boolean; - } + export interface BeforeAddEventArgs { - export interface AjaxBeforeLoadEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event. - */ - type?: string; + /** returns the given new node data + */ + data?: string|any; - /** returns previous active tab header. - */ - prevActiveHeader?: HTMLElement; + /** returns the parent element, the given new nodes to be appended to the given parent element + */ + targetParent?: any; - /** returns previous active index. - */ - prevActiveIndex?: number; + /** returns the given parent node details + */ + parentDetails?: any; + } - /** returns current active tab header . - */ - activeHeader?: HTMLElement; + export interface BeforeCollapseEventArgs { - /** returns current active index. - */ - activeIndex?: number; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the URL of AJAX request - */ - URL?: string; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns, is it triggered by interaction or not. - */ - isInteraction?: boolean; - } + /** returns the name of the event + */ + type?: string; - export interface AjaxErrorEventArgs { + /** returns the value of the node + */ + value?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the current element of the node clicked + */ + currentElement?: any; - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** returns the child nodes are loaded or not + */ + isChildLoaded?: boolean; - /** returns the name of the event. - */ - type?: string; + /** returns the id of currently clicked node + */ + id?: string; - /** returns AJAX data details. - */ - data?: any; + /** returns the parent id of currently clicked node + */ + parentId?: string; - /** returns the URL of AJAX request. - */ - URL?: string; - } + /** returns the format asynchronous or synchronous + */ + async?: boolean; + } - export interface AjaxLoadEventArgs { + export interface BeforeCutEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns the name of the event. - */ - type?: string; + /** returns the name of the event + */ + type?: string; - /** returns previous active tab header. - */ - prevActiveHeader?: HTMLElement; + /** returns the event object + */ + event?: any; - /** returns previous active index. - */ - prevActiveIndex?: number; + /** returns the target element, the given node to be cut + */ + target?: any; - /** returns current active tab header . - */ - activeHeader?: HTMLElement; + /** returns the given target node values + */ + nodeDetails?: any; - /** returns current active index. - */ - activeIndex?: number; + /** returns the key pressed key code value + */ + keyCode?: number; + } - /** returns the URL of AJAX request - */ - URL?: string; + export interface BeforeDeleteEventArgs { - /** returns, is it triggered by interaction or not. - */ - isInteraction?: boolean; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface AjaxSuccessEventArgs { + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** returns the event object + */ + event?: any; - /** returns the name of the event. - */ - type?: string; + /** returns the target element, the given node to be deleted + */ + target?: any; - /** return AJAX data. - */ - data?: any; + /** returns the given target node values + */ + nodeDetails?: any; - /** returns AJAX URL - */ - URL?: string; + /** returns the current parent element of the target node + */ + parentElement?: any; - /** returns content of AJAX request. - */ - content?: any; - } + /** returns the parent node values + */ + parentDetails?: any; - export interface BeforeActiveEventArgs { + /** returns the currently removed nodes + */ + removedNodes?: any[]; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface BeforeEditEventArgs { - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event. - */ - type?: string; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns previous active tab header. - */ - prevActiveHeader?: HTMLElement; + /** returns the name of the event + */ + type?: string; - /** returns previous active index. - */ - prevActiveIndex?: number; + /** returns the current element of the node clicked + */ + currentElement?: any; + } - /** returns current active tab header . - */ - activeHeader?: HTMLElement; + export interface BeforeExpandEventArgs { - /** returns current active index. - */ - activeIndex?: number; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns, is it triggered by interaction or not. - */ - isInteraction?: boolean; - } + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - export interface BeforeItemRemoveEventArgs { + /** returns the name of the event + */ + type?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the value of the node + */ + value?: string; - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** if the child node is ready to expanded state; otherwise, false. + */ + isChildLoaded?: boolean; - /** returns the name of the event. - */ - type?: string; + /** returns the current element of the node clicked + */ + currentElement?: any; - /** returns current tab item index - */ - index?: number; - } + /** returns the id of currently clicked node + */ + id?: string; - export interface CreateEventArgs { + /** returns the parent id of currently clicked node + */ + parentId?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the format asynchronous or synchronous + */ + async?: boolean; + } - /** returns the tab model. - */ - model?: ej.Tab.Model; + export interface BeforeLoadEventArgs { - /** returns the name of the event. - */ - type?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface DestroyEventArgs { + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** returns the AJAX settings object + */ + AjaxOptions?: any; + } - /** returns the name of the event. - */ - type?: string; - } + export interface BeforePasteEventArgs { - export interface ItemAddEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event. - */ - type?: string; + /** returns the event object + */ + event?: any; - /** returns new added tab header. - */ - tabHeader?: HTMLElement; + /** returns the target element, the given node to be pasted + */ + target?: any; - /** returns new added tab content panel. - */ - tabContent?: any; - } + /** returns the given target node values + */ + nodeDetails?: any; - export interface ItemRemoveEventArgs { + /** returns the key pressed key code value + */ + keyCode?: number; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface BeforeSelectEventArgs { - /** returns the tab model. - */ - model?: ej.Tab.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event. - */ - type?: string; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns removed tab header. - */ - removedTab?: HTMLElement; - } + /** returns the name of the event + */ + type?: string; - export interface AjaxSettings { + /** returns the target element, the given node to be selected + */ + target?: any; - /** It specifies, whether to enable or disable asynchronous request. - * @Default {true} - */ - async?: boolean; + /** returns the given target node values + */ + nodeDetails?: any; + } - /** It specifies the page will be cached in the web browser. - * @Default {false} - */ - cache?: boolean; + export interface CreateEventArgs { - /** It specifies the type of data is send in the query string. - * @Default {html} - */ - contentType?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** It specifies the data as an object, will be passed in the query string. - * @Default {{}} - */ - data?: any; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** It specifies the type of data that you're expecting back from the response. - * @Default {html} - */ - dataType?: string; + /** returns the name of the event + */ + type?: string; + } - /** It specifies the HTTP request type. - * @Default {get} - */ - type?: string; - } - - enum Position { - - ///Tab headers display to top position - Top, - - ///Tab headers display to bottom position - Bottom, - - ///Tab headers display to left position. - Left, - - ///Tab headers display to right position. - Right - } - - - enum HeightAdjustMode { - - ///string - None, - - ///string - Content, - - ///string - Auto, - - ///string - Fill - } - - } - - class TagCloud extends ej.Widget { - static fn: TagCloud; - constructor(element: JQuery | Element, options?: TagCloud.Model); - static Locale: any; - model: TagCloud.Model; - defaults: TagCloud.Model; - - /** Inserts a new item into the TagCloud - * @param {string} Insert new item into the TagCloud - * @returns {void} - */ - insert(name: string): void; - - /** Inserts a new item into the TagCloud at a particular position. - * @param {string} Inserts a new item into the TagCloud - * @param {number} Inserts a new item into the TagCloud with the specified position - * @returns {void} - */ - insertAt(name: string, position: number): void; - - /** Removes the item from the TagCloud based on the name. It removes all the tags which have the corresponding name - * @param {string} name of the tag. - * @returns {void} - */ - remove(name: string): void; - - /** Removes the item from the TagCloud based on the position. It removes the tags from the the corresponding position only. - * @param {number} position of tag item. - * @returns {void} - */ - removeAt(position: number): void; - } - export namespace TagCloud { - - export interface Model { - - /** Specify the CSS class to button to achieve custom theme. - */ - cssClass?: string; - - /** The dataSource contains the list of data to display in a cloud format. Each data contains a link URL, frequency to categorize the font size and a display text. - * @Default {null} - */ - dataSource?: any; - - /** Sets the TagCloud and tag items direction as right to left alignment. - * @Default {false} - */ - enableRTL?: boolean; - - /** Defines the mapping fields for the data items of the TagCloud. - * @Default {null} - */ - fields?: Fields; + export interface DestroyEventArgs { - /** Specifies the list of HTML attributes to be added to TagCloud control. - * @Default {{}} - */ - htmlAttributes?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Defines the format for the TagCloud to display the tag items.See Format - * @Default {ej.Format.Cloud} - */ - format?: string | ej.Format; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** Sets the maximum font size value for the tag items. The font size for the tag items will be generated in between the minimum and maximum font size values. - * @Default {40px} - */ - maxFontSize?: string | number; + /** returns the name of the event + */ + type?: string; + } - /** Sets the minimum font size value for the tag items. The font size for the tag items will be generated in between the minimum and maximum font size values. - * @Default {10px} - */ - minFontSize?: string | number; + export interface InlineEditValidationEventArgs { - /** Define the query to retrieve the data from online server. The query is used only when the online dataSource is used. - * @Default {null} - */ - query?: any; - - /** Shows or hides the TagCloud title. When this set to false, it hides the TagCloud header. - * @Default {true} - */ - showTitle?: boolean; - - /** Sets the title image for the TagCloud. To show the title image, the showTitle property should be enabled. - * @Default {null} - */ - titleImage?: string; - - /** Sets the title text for the TagCloud. To show the title text, the showTitle property should be enabled. - * @Default {Title} - */ - titleText?: string; - - /** Event triggers when the TagCloud items are clicked */ - click?(e: ClickEventArgs): void; - - /** Event triggers when the TagCloud are created */ - create?(e: CreateEventArgs): void; - - /** Event triggers when the TagCloud are destroyed */ - destroy?(e: DestroyEventArgs): void; - - /** Event triggers when the cursor leaves out from a tag item */ - mouseout?(e: MouseoutEventArgs): void; - - /** Event triggers when the cursor hovers on a tag item */ - mouseover?(e: MouseoverEventArgs): void; - } - - export interface ClickEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TagCloud model - */ - model?: ej.TagCloud.Model; - - /** returns the name of the event - */ - type?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** return current tag name - */ - text?: string; - - /** return current URL link - */ - URL?: string; - } - - export interface CreateEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TagCloud model - */ - model?: ej.TagCloud.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TagCloud model - */ - model?: ej.TagCloud.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface MouseoutEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TagCloud model - */ - model?: ej.TagCloud.Model; - - /** returns the name of the event - */ - type?: string; - - /** return current tag name - */ - text?: string; - - /** return current URL link - */ - URL?: string; - } - - export interface MouseoverEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TagCloud model - */ - model?: ej.TagCloud.Model; - - /** returns the name of the event - */ - type?: string; - - /** return current tag name - */ - text?: string; - - /** return current URL link - */ - URL?: string; - } - - export interface Fields { - - /** Defines the frequency column number to categorize the font size. - */ - frequency?: string; - - /** Defines the HTML attributes column for the anchor elements inside the each tag items. - */ - htmlAttributes?: string; - - /** Defines the tag value or display text. - */ - text?: string; - - /** Defines the URL link to navigate while click the tag. - */ - url?: string; - } - } - enum Format { - //To render the TagCloud items in cloud format - Cloud, - //To render the TagCloud items in list format - List, - } - - class TimePicker extends ej.Widget { - static fn: TimePicker; - constructor(element: JQuery | Element, options?: TimePicker.Model); - static Locale: any; - model: TimePicker.Model; - defaults: TimePicker.Model; - - /** Allows you to disable the TimePicker. - * @returns {void} - */ - disable(): void; - - /** Allows you to enable the TimePicker. - * @returns {void} - */ - enable(): void; - - /** It returns the current time value. - * @returns {string} - */ - getValue(): string; - - /** This method will hide the TimePicker control popup. - * @returns {void} - */ - hide(): void; - - /** Updates the current system time in TimePicker. - * @returns {void} - */ - setCurrentTime(): void; - - /** This method will show the TimePicker control popup. - * @returns {void} - */ - show(): void; - } - export namespace TimePicker { - - export interface Model { - - /** Sets the root CSS class for the TimePicker theme, which is used to customize. - */ - cssClass?: string; - - /** Specifies the list of time range to be disabled. - * @Default {{}} - */ - disableTimeRanges?: any; - - /** Specifies the animation behavior in TimePicker. - * @Default {true} - */ - enableAnimation?: boolean; - - /** When this property is set to false, it disables the TimePicker control. - * @Default {true} - */ - enabled?: boolean; - - /** Save current model value to browser cookies for maintaining states. When refreshing the TimePicker control page, the model value is applied from browser cookies or HTML 5local storage. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Displays the TimePicker as right to left alignment. - * @Default {false} - */ - enableRTL?: boolean; - - /** When the enableStrictMode is set as true it allows the value outside of the range and also indicate with red color border, - * otherwise it internally changed to the min or max range value based an input value. - * @Default {false} - */ - enableStrictMode?: boolean; - - /** Defines the height of the TimePicker textbox. - */ - height?: string | number; - - /** Sets the step value for increment an hour value through arrow keys or mouse scroll. - * @Default {1} - */ - hourInterval?: number; - - /** It allows to define the characteristics of the TimePicker control. It will helps to extend the capability of an HTML element. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Sets the time interval between the two adjacent time values in the popup. - * @Default {30} - */ - interval?: number; - - /** Defines the localization info used by the TimePicker. - * @Default {en-US} - */ - locale?: string; - - /** Sets the maximum time value to the TimePicker. - * @Default {11:59:59 PM} - */ - maxTime?: string; - - /** Sets the minimum time value to the TimePicker. - * @Default {12:00:00 AM} - */ - minTime?: string; - - /** Sets the step value for increment the minute value through arrow keys or mouse scroll. - * @Default {1} - */ - minutesInterval?: number; - - /** Defines the height of the TimePicker popup. - * @Default {191px} - */ - popupHeight?: string | number; - - /** Defines the width of the TimePicker popup. - * @Default {auto} - */ - popupWidth?: string | number; - - /** Toggles the readonly state of the TimePicker - * @Default {false} - */ - readOnly?: boolean; - - /** Sets the step value for increment the seconds value through arrow keys or mouse scroll. - * @Default {1} - */ - secondsInterval?: number; - - /** shows or hides the drop down button in TimePicker. - * @Default {true} - */ - showPopupButton?: boolean; - - /** TimePicker is displayed with rounded corner when this property is set to true. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Defines the time format displayed in the TimePicker. - * @Default {h:mm tt} - */ - timeFormat?: string; - - /** Sets a specified time value on the TimePicker. - * @Default {null} - */ - value?: string | Date; - - /** Defines the width of the TimePicker textbox. - */ - width?: string | number; - - /** Fires when the time value changed in the TimePicker. */ - beforeChange?(e: BeforeChangeEventArgs): void; - - /** Fires when the TimePicker popup before opened. */ - beforeOpen?(e: BeforeOpenEventArgs): void; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** Fires when the time value changed in the TimePicker. */ - change?(e: ChangeEventArgs): void; - - /** Fires when the TimePicker popup closed. */ - close?(e: CloseEventArgs): void; - - /** Fires when create TimePicker successfully. */ - create?(e: CreateEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Fires when the TimePicker is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; + /** returns the new entered text for the node + */ + newText?: string; - /** Fires when the TimePicker control gets focus. */ - focusIn?(e: FocusInEventArgs): void; + /** returns the current node element id + */ + id?: any; - /** Fires when the TimePicker control get lost focus. */ - focusOut?(e: FocusOutEventArgs): void; + /** returns the old node text + */ + oldText?: string; + } - /** Fires when the TimePicker popup opened. */ - open?(e: OpenEventArgs): void; + export interface KeyPressEventArgs { - /** Fires when the value is selected from the TimePicker dropdown list. */ - select?(e: SelectEventArgs): void; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface BeforeChangeEventArgs { + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; + /** returns the event object + */ + event?: any; - /** returns the name of the event - */ - type?: string; + /** returns the current element of the node clicked + */ + currentElement?: any; - /** returns the previously selected time value - */ - prevTime?: string; + /** returns the value of the node + */ + value?: string; - /** returns the modified time value - */ - value?: string; - } + /** returns node path from root element + */ + path?: string; - export interface BeforeOpenEventArgs { + /** returns the key pressed key code value + */ + keyCode?: number; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** it returns when the current node is in expanded state; otherwise, false. + */ + isExpanded?: boolean; - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; + /** returns the id of current TreeView node + */ + id?: string; - /** returns the name of the event - */ - type?: string; + /** returns the parentId of current TreeView node + */ + parentId?: string; + } - /** returns the previously selected time value - */ - prevTime?: string; + export interface LoadErrorEventArgs { - /** returns the time value - */ - value?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface ChangeEventArgs { + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; + /** returns the AJAX error object + */ + error?: any; + } - /** returns the name of the event - */ - type?: string; + export interface LoadSuccessEventArgs { - /** returns true when the value changed by user interaction otherwise returns false - */ - isInteraction?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the previously selected time value - */ - prevTime?: string; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns the modified time value - */ - value?: string; - } + /** returns the name of the event + */ + type?: string; - export interface CloseEventArgs { + /** returns the success data from the URL + */ + data?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the target parent element, the data returned from the URL to be appended to the given parent element, else in TreeView + */ + targetParent?: any; - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; + /** returns the given parent node details + */ + parentDetails?: any; + } - /** returns the name of the event - */ - type?: string; + export interface NodeAddEventArgs { - /** returns the previously selected time value - */ - prevTime?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the time value - */ - value?: string; - } + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - export interface CreateEventArgs { + /** returns the name of the event + */ + type?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the added data, that are given initially + */ + data?: any; - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; + /** returns the newly added elements + */ + nodes?: any; - /** returns the name of the event - */ - type?: string; - } + /** returns the target parent element of the added element + */ + parentElement?: any; - export interface DestroyEventArgs { + /** returns the given parent node details + */ + parentDetails?: any; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface NodeCheckEventArgs { - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; - } + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - export interface FocusInEventArgs { + /** returns the name of the event + */ + type?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the event object + */ + event?: any; - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; + /** returns the value of the node + */ + value?: string; - /** returns the name of the event - */ - type?: string; + /** returns the id of the current element of the node clicked + */ + id?: string; - /** returns the previously selected time value - */ - prevTime?: string; + /** returns the id of the parent element of current element of the node clicked + */ + parentId?: string; - /** returns the current time value - */ - value?: string; - } + /** returns the current element of the node clicked + */ + currentElement?: any; - export interface FocusOutEventArgs { + /** it returns true when the node checkbox is checked; otherwise, false. + */ + isChecked?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** it returns the currently checked node name + */ + currentNode?: any[]; - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; + /** it returns the currently checked and its child node details + */ + currentCheckedNodes?: any[]; + } - /** returns the name of the event - */ - type?: string; + export interface NodeClickEventArgs { - /** returns the previously selected time value - */ - prevTime?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the current time value - */ - value?: string; - } + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - export interface OpenEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the time value - */ - value?: string; - } - - export interface SelectEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TimePicker model - */ - model?: ej.TimePicker.Model; - - /** returns the name of the event - */ - type?: string; - - /** returns the previously selected time value - */ - prevTime?: string; - - /** returns the selected time value - */ - value?: string; - } - } - - class ToggleButton extends ej.Widget { - static fn: ToggleButton; - constructor(element: JQuery | Element, options?: ToggleButton.Model); - static Locale: any; - model: ToggleButton.Model; - defaults: ToggleButton.Model; - - /** Allows you to destroy the ToggleButton widget. - * @returns {void} - */ - destroy(): void; - - /** To disable the ToggleButton to prevent all user interactions. - * @returns {void} - */ - disable(): void; - - /** To enable the ToggleButton. - * @returns {void} - */ - enable(): void; - } - export namespace ToggleButton { - - export interface Model { - - /** Specify the icon in active state to the toggle button and it will be aligned from left margin of the button. - */ - activePrefixIcon?: string; - - /** Specify the icon in active state to the toggle button and it will be aligned from right margin of the button. - */ - activeSuffixIcon?: string; - - /** Sets the text when ToggleButton is in active state i.e.,checked state. - * @Default {null} - */ - activeText?: string; - - /** Specifies the contentType of the ToggleButton. See ContentType as below - * @Default {ej.ContentType.TextOnly} - */ - contentType?: ej.ContentType | string; - - /** Specify the CSS class to the ToggleButton to achieve custom theme. - */ - cssClass?: string; - - /** Specify the icon in default state to the toggle button and it will be aligned from left margin of the button. - */ - defaultPrefixIcon?: string; - - /** Specify the icon in default state to the toggle button and it will be aligned from right margin of the button. - */ - defaultSuffixIcon?: string; - - /** Specifies the text of the ToggleButton, when the control is a default state. i.e., unChecked state. - * @Default {null} - */ - defaultText?: string; - - /** Specifies the state of the ToggleButton. - * @Default {true} - */ - enabled?: boolean; - - /** Save current model value to browser cookies for maintaining states. When refreshing the ToggleButton control page, the model value is applied from browser cookies or HTML 5local storage. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Specify the Right to Left direction of the ToggleButton. - * @Default {false} - */ - enableRTL?: boolean; - - /** Specifies the height of the ToggleButton. - * @Default {28pixel} - */ - height?: number | string; - - /** It allows to define the characteristics of the ToggleButton control. It will helps to extend the capability of an HTML element. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specifies the image position of the ToggleButton. - * @Default {ej.ImagePosition.ImageLeft} - */ - imagePosition?: ej.ImagePosition | string; - - /** Allows to prevents the control switched to checked (active) state. - * @Default {false} - */ - preventToggle?: boolean; - - /** Displays the ToggleButton with rounded corners. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specifies the size of the ToggleButton. See ButtonSize as below - * @Default {ej.ButtonSize.Normal} - */ - size?: ej.ButtonSize | string; - - /** It allows to define the ToggleButton state to checked(Active) or unchecked(Default) at initial time. - * @Default {false} - */ - toggleState?: boolean; - - /** Specifies the type of the ToggleButton. See ButtonType as below - * @Default {ej.ButtonType.Button} - */ - type?: ej.ButtonType | string; - - /** Specifies the width of the ToggleButton. - * @Default {100pixel} - */ - width?: number | string; - - /** Fires when ToggleButton control state is changed successfully. */ - change?(e: ChangeEventArgs): void; - - /** Fires when ToggleButton control is clicked successfully. */ - click?(e: ClickEventArgs): void; - - /** Fires when ToggleButton control is created successfully. */ - create?(e: CreateEventArgs): void; - - /** Fires when ToggleButton control is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; - } - - export interface ChangeEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** return the toggle button checked state - */ - isChecked?: boolean; - - /** returns the toggle button model - */ - model?: ej.ToggleButton.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface ClickEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** return the toggle button checked state - */ - isChecked?: boolean; - - /** returns the toggle button model - */ - model?: ej.ToggleButton.Model; - - /** return the toggle button state - */ - status?: boolean; - - /** returns the name of the event - */ - type?: string; - } - - export interface CreateEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the toggle button model - */ - model?: ej.ToggleButton.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the toggle button model - */ - model?: ej.ToggleButton.Model; - - /** returns the name of the event - */ - type?: string; - } - } - - class Toolbar extends ej.Widget { - static fn: Toolbar; - constructor(element: JQuery | Element, options?: Toolbar.Model); - static Locale: any; - model: Toolbar.Model; - defaults: Toolbar.Model; - - /** Deselect the specified Toolbar item. - * @param {any} The element need to be deselected - * @returns {void} - */ - deselectItem(element: any): void; - - /** Deselect the Toolbar item based on specified id. - * @param {string} The ID of the element need to be deselected - * @returns {void} - */ - deselectItemByID(ID: string): void; - - /** Allows you to destroy the Toolbar widget. - * @returns {void} - */ - destroy(): void; - - /** To disable all items in the Toolbar control. - * @returns {void} - */ - disable(): void; - - /** Disable the specified Toolbar item. - * @param {any} The element need to be disabled - * @returns {void} - */ - disableItem(element: any): void; - - /** Disable the Toolbar item based on specified item id in the Toolbar. - * @param {string} The ID of the element need to be disabled - * @returns {void} - */ - disableItemByID(ID: string): void; - - /** Enable the Toolbar if it is in disabled state. - * @returns {void} - */ - enable(): void; - - /** Enable the Toolbar item based on specified item. - * @param {any} The element need to be enabled - * @returns {void} - */ - enableItem(element: any): void; - - /** Enable the Toolbar item based on specified item id in the Toolbar. - * @param {string} The ID of the element need to be enabled - * @returns {void} - */ - enableItemByID(ID: string): void; - - /** To hide the Toolbar - * @returns {void} - */ - hide(): void; - - /** Remove the item from toolbar, based on specified item. - * @param {any} The element need to be removed - * @returns {void} - */ - removeItem(element: any): void; - - /** Remove the item from toolbar, based on specified item id in the Toolbar. - * @param {string} The ID of the element need to be removed - * @returns {void} - */ - removeItemByID(ID: string): void; - - /** Selects the item from toolbar, based on specified item. - * @param {any} The element need to be selected - * @returns {void} - */ - selectItem(element: any): void; - - /** Selects the item from toolbar, based on specified item id in the Toolbar. - * @param {string} The ID of the element need to be selected - * @returns {void} - */ - selectItemByID(ID: string): void; - - /** To show the Toolbar. - * @returns {void} - */ - show(): void; - } - export namespace Toolbar { - - export interface Model { - - /** Sets the root CSS class for Toolbar control to achieve the custom theme. - */ - cssClass?: string; - - /** Specifies dataSource value for the Toolbar control during initialization. - * @Default {null} - */ - dataSource?: any; - - /** Disables an Item or set of Items that are enabled in the Toolbar - * @Default {[]} - */ - disabledItemIndices?: any[]; - - /** Specifies the Toolbar control state. - * @Default {true} - */ - enabled?: boolean; - - /** Enables an Item or set of Items that are disabled in the Toolbar - * @Default {[]} - */ - enabledItemIndices?: any[]; - - /** Specifies enableRTL property to align the Toolbar control from right to left direction. - * @Default {false} - */ - enableRTL?: boolean; - - /** Allows to separate the each UL items in the Toolbar control. - * @Default {false} - */ - enableSeparator?: boolean; - - /** Specifies the mapping fields for the data items of the Toolbar - * @Default {null} - */ - fields?: string; - - /** Specifies the height of the Toolbar. - * @Default {28} - */ - height?: number | string; - - /** Specifies the list of HTML attributes to be added to toolbar control. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specifies whether the Toolbar control is need to be show or hide. - * @Default {false} - */ - hide?: boolean; - - /** Enables/Disables the responsive support for Toolbar items during the window resizing time. - * @Default {false} - */ - isResponsive?: boolean; - - /** Specifies the items of Toolbar - * @Default {null} - */ - Items?: Items; - - /** Specifies the Toolbar orientation. See orientation - * @Default {Horizontal} - */ - orientation?: ej.Orientation | string; - - /** Specifies the query to retrieve the data from the online server. The query is used only when the online dataSource is used. - * @Default {null} - */ - query?: any; - - /** Specifies the Toolbar responsive type. - * @Default {Popup} - */ - responsiveType?: ej.Toolbar.ResponsiveType | string; - - /** Displays the Toolbar with rounded corners. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specifies the width of the Toolbar. - */ - width?: number | string; - - /** Fires after Toolbar control is clicked. */ - click?(e: ClickEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Fires after Toolbar control is created. */ - create?(e: CreateEventArgs): void; - - /** Fires after Toolbar control is focused. */ - focusOut?(e: FocusOutEventArgs): void; + /** returns the event object + */ + event?: any; - /** Fires when the Toolbar is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; + /** returns the current element of the node clicked + */ + currentElement?: any; - /** Fires after Toolbar control item is hovered. */ - itemHover?(e: ItemHoverEventArgs): void; + /** returns the id of currently clicked TreeView node + */ + id?: string; - /** Fires after mouse leave from Toolbar control item. */ - itemLeave?(e: ItemLeaveEventArgs): void; - - /** Fires when the overflow popup of toolbar is opened. */ - overflowOpen?(e: OverflowOpenEventArgs): void; + /** returns the parentId of currently clicked TreeView node + */ + parentId?: string; + } - /** Fires when the overflow popup of toolbar is closed. */ - overflowClose?(e: OverflowCloseEventArgs): void; - } + export interface NodeCollapseEventArgs { - export interface ClickEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns the Toolbar model - */ - model?: ej.Toolbar.Model; + /** returns the id of the current element of the node clicked + */ + id?: string; - /** returns the name of the event - */ - type?: string; + /** returns the name of the event + */ + type?: string; - /** returns the target of the current object. - */ - target?: any; + /** returns the id of the parent element of current element of the node clicked + */ + parentId?: string; - /** returns the target of the current object. - */ - currentTarget?: any; + /** returns the value of the node + */ + value?: string; - /** return the Toolbar state - */ - status?: boolean; - } + /** returns the current element of the node clicked + */ + currentElement?: any; - export interface CreateEventArgs { + /** returns the child nodes are loaded or not + */ + isChildLoaded?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the format asynchronous or synchronous + */ + async?: boolean; + } - /** returns the Toolbar model - */ - model?: ej.Toolbar.Model; + export interface NodeCutEventArgs { - /** returns the name of the event - */ - type?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface FocusOutEventArgs { + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** returns the Toolbar model - */ - model?: ej.Toolbar.Model; + /** returns the event object + */ + event?: any; - /** returns the name of the event - */ - type?: string; - } + /** returns the current parent element of the cut node + */ + parentElement?: any; - export interface DestroyEventArgs { + /** returns the given parent node details + */ + parentDetails?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the key pressed key code value + */ + keyCode?: number; + } - /** returns the Toolbar model - */ - model?: ej.Toolbar.Model; + export interface NodeDeleteEventArgs { - /** returns the name of the event - */ - type?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface ItemHoverEventArgs { + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; - /** returns the Toolbar model - */ - model?: ej.Toolbar.Model; + /** returns the event object + */ + event?: any; - /** returns the name of the event - */ - type?: string; + /** returns the current parent element of the deleted node + */ + parentElement?: any; - /** returns the target of the current object. - */ - target?: any; + /** returns the given parent node details + */ + parentDetails?: any; - /** returns the target of the current object. - */ - currentTarget?: any; + /** returns the currently removed nodes + */ + removedNodes?: any[]; + } - /** return the Toolbar state - */ - status?: boolean; - } + export interface NodeDragEventArgs { - export interface ItemLeaveEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns the Toolbar model - */ - model?: ej.Toolbar.Model; + /** returns the name of the event + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** returns the original drag target + */ + dragTarget?: any; - /** returns the target of the current object. - */ - target?: any; + /** returns the current target TreeView node + */ + target?: any; - /** returns the target of the current object. - */ - currentTarget?: any; + /** returns the current target details + */ + targetElementData?: any; - /** return the Toolbar state - */ - status?: boolean; - } + /** returns the current parent element of the target node + */ + draggedElement?: any; - export interface OverflowOpenEventArgs { + /** returns the given parent node details + */ + draggedElementData?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the event object + */ + event?: any; + } - /** returns the Toolbar model - */ - model?: ej.Toolbar.Model; + export interface NodeDragStartEventArgs { - /** returns the name of the event - */ - type?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the current X position of the target . - */ - clientX?: number; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** Returns the current Y position of the target . - */ - clientY?: number; + /** returns the name of the event + */ + type?: string; - /** returns the target of the current object. - */ - currentTarget?: any; - } + /** returns the original drag target + */ + dragTarget?: any; - export interface OverflowCloseEventArgs { + /** returns the current dragging parent TreeView node + */ + parentElement?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the current dragging parent TreeView node details + */ + parentElementData?: any; - /** returns the Toolbar model - */ - model?: ej.Toolbar.Model; + /** returns the current parent element of the dragging node + */ + target?: any; - /** returns the name of the event - */ - type?: string; + /** returns the given parent node details + */ + targetElementData?: any; - /** Returns the current X position of the target . - */ - clientX?: number; + /** returns the event object + */ + event?: any; + } - /** Returns the current Y position of the target . - */ - clientY?: number; + export interface NodeDragStopEventArgs { - /** returns the target of the current object. - */ - currentTarget?: any; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface Fields { + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** Defines the group name for the item. - */ - group?: string; + /** returns the name of the event + */ + type?: string; - /** Defines the HTML attributes such as id, class, styles for the item to extend the capability. - */ - htmlAttributes?: any; + /** returns the original drop target + */ + dropTarget?: any; - /** Defines id for the tag. - */ - id?: string; + /** returns the current dragged TreeView node + */ + draggedElement?: any; - /** Defines the image attributes such as height, width, styles and so on. - */ - imageAttributes?: string; + /** returns the current dragged TreeView node details + */ + draggedElementData?: any; - /** Defines the imageURL for the image location. - */ - imageUrl?: string; - - /** Defines the sprite CSS for the image tag. - */ - spriteCssClass?: string; - - /** Defines the text content for the tag. - */ - text?: string; - - /** Defines the tooltip text for the tag. - */ - tooltipText?: string; - - /** Allows you to add template as toolbar item - */ - template?: string; - } - - export interface Items { - - /** Defines the group name for the item. - */ - group?: string; - - /** Defines the HTML attributes such as id, class, styles for the item . - */ - htmlAttributes?: any; - - /** Defines id for the tag. - */ - id?: string; - - /** Defines the image attributes such as height, width, styles and so on. - */ - imageAttributes?: string; - - /** Defines the imageURL for the image location. - */ - imageUrl?: string; - - /** Defines the sprite CSS for the image tag. - */ - spriteCssClass?: string; - - /** Defines the text content for the tag. - */ - text?: string; - - /** Defines the tooltip text for the tag. - */ - tooltipText?: string; - - /** Allows to add template as toolbar item. - */ - template?: string; - } - - enum ResponsiveType { - - ///To display the toolbar overflow items as popup - Popup, - - ///To display the toolbar overflow items as inline toolbar - Inline - } - - } - - class TreeView extends ej.Widget { - static fn: TreeView; - constructor(element: JQuery | Element, options?: TreeView.Model); - static Locale: any; - model: TreeView.Model; - defaults: TreeView.Model; - - /** To add a Node or collection of nodes in TreeView. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. - * @param {string|any} New node text or JSON object - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {void} - */ - addNode(newNodeText: string | any, target: string | any): void; - - /** To add a collection of nodes in TreeView. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. - * @param {any|Array} New node details in JSON object - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {void} - */ - addNodes(collection: any | any[], target: string | any): void; - - /** To check all the nodes in TreeView. - * @returns {void} - */ - checkAll(): void; - - /** To check a node in TreeView. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes - * @returns {void} - */ - checkNode(element: string | any | any[]): void; - - /** This method is used to collapse all nodes in TreeView control. If you want to collapse all nodes up to the specific level in - * TreeView control then we need to pass levelUntil as argument to this method. - * @param {number} TreeView nodes will collapse until the given level - * @param {boolean} Weather exclude the hidden nodes of TreeView while collapse all nodes - * @returns {void} - */ - collapseAll(levelUntil?: number, excludeHiddenNodes?: boolean): void; - - /** To collapse a particular node in TreeView. - * @param {string|any|Array} ID of TreeView node|object of TreeView node/collection of ID/object of TreeView nodes - * @returns {void} - */ - collapseNode(element: string | any | any[]): void; - - /** To disable the node in the TreeView. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes - * @returns {void} - */ - disableNode(element: string | any | any[]): void; - - /** To enable the node in the TreeView. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes - * @returns {void} - */ - enableNode(element: string | any | any[]): void; - - /** To ensure that the TreeView node is visible in the TreeView. This method is useful if we need select a TreeView node dynamically. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {boolean} - */ - ensureVisible(element: string | any): boolean; - - /** This method is used to expand all nodes in TreeView control. If you want to expand all nodes up to the specific level in TreeView control - * then we need to pass levelUntil as argument to this method. - * @param {number} TreeView nodes will expand until the given level - * @param {boolean} Weather exclude the hidden nodes of TreeView while expand all nodes - * @returns {void} - */ - expandAll(levelUntil?: number, excludeHiddenNodes?: boolean): void; - - /** To expandNode particular node in TreeView. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes - * @returns {void} - */ - expandNode(element: string | any | any[]): void; - - /** To get currently checked nodes in TreeView. - * @returns {any} - */ - getCheckedNodes(): any; - - /** To get currently checked nodes indexes in TreeView. - * @returns {Array} - */ - getCheckedNodesIndex(): any[]; - - /** This method is used to get immediate child nodes of a node in TreeView control. If you want to get the all child nodes include nested - * child nodes then we need to pass includeNestedChild as true along with element arguments to this method. - * @param {string|any} ID of TreeView node/object of TreeView node - * @param {boolean} Weather include nested child nodes of TreeView node - * @returns {Array} - */ - getChildren(element: string | any, includeNestedChild?: boolean): any[]; - - /** To get number of nodes in TreeView. - * @returns {number} - */ - getNodeCount(): number; - - /** To get currently expanded nodes in TreeView. - * @returns {any} - */ - getExpandedNodes(): any; - - /** To get currently expanded nodes indexes in TreeView. - * @returns {Array} - */ - getExpandedNodesIndex(): any[]; - - /** To get TreeView node by using index position in TreeView. - * @param {number} Index position of TreeView node - * @returns {any} - */ - getNodeByIndex(index: number): any; - - /** To get TreeView node data such as id, text, parentId, selected, checked, expanded, level, childes and index. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {any} - */ - getNode(element: string | any): any; - - /** To get current index position of TreeView node. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {number} - */ - getNodeIndex(element: string | any): number; - - /** To get immediate parent TreeView node of particular TreeView node. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {any} - */ - getParent(element: string | any): any; - - /** To get the currently selected node in TreeView. - * @returns {any} - */ - getSelectedNode(): any; - - /** To get the currently selected nodes in TreeView. - * @returns {Array} - */ - getSelectedNodes(): any[]; - - /** To get the index position of currently selected node in TreeView. - * @returns {number} - */ - getSelectedNodeIndex(): number; - - /** To get the index positions of currently selected nodes in TreeView. - * @returns {Array} - */ - getSelectedNodesIndex(): any[]; - - /** To get the text of a node in TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {string} - */ - getText(element: string | any): string; - - /** To get the updated datasource of TreeView after performing some operation like drag and drop, node editing, adding and removing node. - * @param {string|number} ID of TreeView node - * @returns {Array} - */ - getTreeData(id?: string | number): any[]; - - /** To get currently visible nodes in TreeView. - * @returns {any} - */ - getVisibleNodes(): any; - - /** To check a node having child or not. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {boolean} - */ - hasChildNode(element: string | any): boolean; - - /** To show nodes in TreeView. - * @returns {void} - */ - hide(): void; - - /** To hide particular node in TreeView. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes - * @returns {void} - */ - hideNode(element: string | any | any[]): void; - - /** To add a Node or collection of nodes after the particular TreeView node. - * @param {string|any} New node text or JSON object - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {void} - */ - insertAfter(newNodeText: string | any, target: string | any): void; - - /** To add a Node or collection of nodes before the particular TreeView node. - * @param {string|any} New node text or JSON object - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {void} - */ - insertBefore(newNodeText: string | any, target: string | any): void; - - /** To check the given TreeView node is checked or unchecked. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {boolean} - */ - isNodeChecked(element: string | any): boolean; - - /** To check whether the child nodes are loaded of the given TreeView node. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {boolean} - */ - isChildLoaded(element: string | any): boolean; - - /** To check the given TreeView node is disabled or enabled. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {boolean} - */ - isDisabled(element: string | any): boolean; - - /** To check the given node is exist in TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {boolean} - */ - isExist(element: string | any): boolean; - - /** To get the expand status of the given TreeView node. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {boolean} - */ - isExpanded(element: string | any): boolean; - - /** To get the select status of the given TreeView node. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {boolean} - */ - isSelected(element: string | any): boolean; - - /** To get the visibility status of the given TreeView node. - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {boolean} - */ - isVisible(element: string | any): boolean; - - /** To load the TreeView nodes from the particular URL. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. - * @param {string} URL location, the data returned from the URL will be loaded in TreeView - * @param {string|any} ID of TreeView node/object of TreeView node - * @returns {void} - */ - loadData(URL: string, target: string | any): void; - - /** To move the TreeView node with in same TreeView. The new position of given TreeView node will be based on destination node and index position. - * @param {string|any} ID of TreeView node/object of TreeView node - * @param {string|any} ID of TreeView node/object of TreeView node - * @param {number} New index position of given source node - * @returns {void} - */ - moveNode(sourceNode: string | any, destinationNode: string | any, index: number): void; - - /** To refresh the TreeView - * @returns {void} - */ - refresh(): void; - - /** To remove all the nodes in TreeView. - * @returns {void} - */ - removeAll(): void; - - /** To remove a node in TreeView. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes - * @returns {void} - */ - removeNode(element: string | any | any[]): void; - - /** To select all the TreeView nodes when enable allowMultiSelection property. - * @returns {void} - */ - selectAll(): void; - - /** This method is used to select a node in TreeView control. If you want to select the collection of nodes in TreeView control then we need to enable allowMultiSelection property. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/ collection of ID/object of TreeView nodes - * @returns {void} - */ - selectNode(element: string | any | any[]): void; - - /** To show nodes in TreeView. - * @returns {void} - */ - show(): void; - - /** To show a node in TreeView. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes - * @returns {void} - */ - showNode(element: string | any | any[]): void; - - /** To uncheck all the nodes in TreeView. - * @returns {void} - */ - unCheckAll(): void; - - /** To uncheck a node in TreeView. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes - * @returns {void} - */ - uncheckNode(element: string | any | any[]): void; - - /** To unselect all the TreeView nodes when enable allowMultiSelection property. - * @returns {void} - */ - unselectAll(): void; - - /** This method is used to unselect a node in TreeView control. If you want to unselect the collection of nodes in TreeView control then we need to enable allowMultiSelection property. - * @param {string|any|Array} ID of TreeView node/object of TreeView node/ collection of ID/object of TreeView nodes - * @returns {void} - */ - unselectNode(element: string | any | any[]): void; - - /** To edit or update the text of the TreeView node. - * @param {string|any} ID of TreeView node/object of TreeView node - * @param {string} New text - * @returns {void} - */ - updateText(target: string | any, newText: string): void; - } - export namespace TreeView { - - export interface Model { - - /** Gets or sets a value that indicates whether to enable drag and drop a node within the same tree. - * @Default {false} - */ - allowDragAndDrop?: boolean; - - /** Gets or sets a value that indicates whether to enable drag and drop a node in inter ej.TreeView. - * @Default {true} - */ - allowDragAndDropAcrossControl?: boolean; - - /** Gets or sets a value that indicates whether to drop a node to a sibling of particular node. - * @Default {true} - */ - allowDropSibling?: boolean; - - /** Gets or sets a value that indicates whether to drop a node to a child of particular node. - * @Default {true} - */ - allowDropChild?: boolean; - - /** Gets or sets a value that indicates whether to enable node editing support for TreeView. - * @Default {false} - */ - allowEditing?: boolean; - - /** Gets or sets a value that indicates whether to enable keyboard support for TreeView actions like nodeSelection, nodeEditing, nodeExpand, nodeCollapse, nodeCut and Paste. - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** Gets or sets a value that indicates whether to enable multi selection support for TreeView. - * @Default {false} - */ - allowMultiSelection?: boolean; - - /** Allow us to specify the parent and child nodes to get auto check while we check or uncheck a node. - * @Default {true} - */ - autoCheck?: boolean; - - /** Allow us to specify the parent node to be retain in checked or unchecked state instead of going for indeterminate state. - * @Default {false} - */ - autoCheckParentNode?: boolean; - - /** Gets or sets a value that indicates the checkedNodes index collection as an array. The given array index position denotes the nodes, that are checked while rendering TreeView. - * @Default {[]} - */ - checkedNodes?: any[]; - - /** Sets the root CSS class for TreeView which allow us to customize the appearance. - */ - cssClass?: string; - - /** Gets or sets a value that indicates whether to enable or disable the animation effect while expanding or collapsing a node. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Gets or sets a value that indicates whether a TreeView can be enabled or disabled. No actions can be performed while this property is set as false - * @Default {true} - */ - enabled?: boolean; - - /** Allow us to prevent multiple nodes to be in expanded state. If it set to false, previously expanded node will be collapsed automatically, while we expand a node. - * @Default {true} - */ - enableMultipleExpand?: boolean; - - /** Sets a value that indicates whether to persist the TreeView model state in page using applicable medium i.e., HTML5 localStorage or cookies - * @Default {false} - */ - enablePersistence?: boolean; - - /** Gets or sets a value that indicates to align content in the TreeView control from right to left by setting the property as true. - * @Default {false} - */ - enableRTL?: boolean; - - /** Gets or sets a array of value that indicates the expandedNodes index collection as an array. The given array index position denotes the nodes, that are expanded while rendering TreeView. - * @Default {[]} - */ - expandedNodes?: any[]; - - /** Gets or sets a value that indicates the TreeView node can be expand or collapse by using the specified action. - * @Default {dblclick} - */ - expandOn?: string; - - /** Gets or sets a fields object that allow us to map the data members with field properties in order to make the data binding easier. - * @Default {null} - */ - fields?: Fields; - - /** Gets or sets a value that indicates whether to enable full row selection support for TreeView. - * @Default {false} - */ - fullRowSelect?: boolean; - - /** Defines the height of the TreeView. - * @Default {Null} - */ - height?: string | number; - - /** Specifies the HTML Attributes for the TreeView. Using this API we can add custom attributes in TreeView control. - * @Default {{}} - */ - htmlAttributes?: any; + /** returns the current parent element of the dragged node + */ + target?: any; - /** Specifies the child nodes to be loaded on demand - * @Default {false} - */ - loadOnDemand?: boolean; + /** returns the given parent node details + */ + targetElementData?: any; - /** Gets or Sets a value that indicates the index position of a tree node. The particular index tree node will be selected while rendering the TreeView. - * @Default {-1} - */ - selectedNode?: number; + /** returns the drop position such as before, after or over + */ + position?: string; - /** Gets or sets a value that indicates the selectedNodes index collection as an array. The given array index position denotes the nodes, that are selected while rendering TreeView. - * @Default {[]} - */ - selectedNodes?: any[]; + /** returns the event object + */ + event?: any; + } - /** Gets or sets a value that indicates whether to display or hide checkbox for all TreeView nodes. - * @Default {false} - */ - showCheckbox?: boolean; + export interface NodeDroppedEventArgs { - /** By using sortSettings property, you can customize the sorting option in TreeView control. - */ - sortSettings?: SortSettings; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Allow us to use custom template in order to create TreeView. - * @Default {null} - */ - template?: string; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** Defines the width of the TreeView. - * @Default {Null} - */ - width?: string | number; + /** returns the name of the event + */ + type?: string; - /** Fires before adding node to TreeView. */ - beforeAdd?(e: BeforeAddEventArgs): void; + /** returns the original drop target + */ + dropTarget?: any; - /** Fires before collapse a node. */ - beforeCollapse?(e: BeforeCollapseEventArgs): void; + /** returns the current dropped TreeView node + */ + droppedElement?: any; - /** Fires before cut node in TreeView. */ - beforeCut?(e: BeforeCutEventArgs): void; + /** returns the current dropped TreeView node details + */ + droppedElementData?: any; - /** Fires before deleting node in TreeView. */ - beforeDelete?(e: BeforeDeleteEventArgs): void; + /** returns the current parent element of the dropped node + */ + target?: any; - /** Fires before editing the node in TreeView. */ - beforeEdit?(e: BeforeEditEventArgs): void; + /** returns the given parent node details + */ + targetElementData?: any; - /** Fires before expanding the node. */ - beforeExpand?(e: BeforeExpandEventArgs): void; + /** returns the drop position such as before, after or over + */ + position?: string; - /** Fires before loading nodes to TreeView. */ - beforeLoad?(e: BeforeLoadEventArgs): void; + /** returns the event object + */ + event?: any; + } - /** Fires before paste node in TreeView. */ - beforePaste?(e: BeforePasteEventArgs): void; + export interface NodeEditEventArgs { - /** Fires before selecting node in TreeView. */ - beforeSelect?(e: BeforeSelectEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Fires when TreeView created successfully. */ - create?(e: CreateEventArgs): void; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** Fires when TreeView destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Fires before nodeEdit Successful. */ - inlineEditValidation?(e: InlineEditValidationEventArgs): void; + /** returns the id of the element + */ + id?: string; - /** Fires when key pressed successfully. */ - keyPress?(e: KeyPressEventArgs): void; + /** returns the oldText of the element + */ + oldText?: string; - /** Fires when data load fails. */ - loadError?(e: LoadErrorEventArgs): void; + /** returns the newText of the element + */ + newText?: string; - /** Fires when data loaded successfully. */ - loadSuccess?(e: LoadSuccessEventArgs): void; + /** returns the event object + */ + event?: any; - /** Fires once node added successfully. */ - nodeAdd?(e: NodeAddEventArgs): void; + /** returns the target element, the given node to be cut + */ + target?: any; - /** Fires once node checked successfully. */ - nodeCheck?(e: NodeCheckEventArgs): void; + /** returns the given target node values + */ + nodeDetails?: any; + } - /** Fires when node clicked successfully. */ - nodeClick?(e: NodeClickEventArgs): void; + export interface NodeExpandEventArgs { - /** Fires when node collapsed successfully. */ - nodeCollapse?(e: NodeCollapseEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Fires when node cut successfully. */ - nodeCut?(e: NodeCutEventArgs): void; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** Fires when node deleted successfully. */ - nodeDelete?(e: NodeDeleteEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Fires when node dragging. */ - nodeDrag?(e: NodeDragEventArgs): void; + /** returns the value of the node + */ + value?: string; - /** Fires once node drag start successfully. */ - nodeDragStart?(e: NodeDragStartEventArgs): void; + /** if the child node is ready to expanded state; otherwise, false. + */ + isChildLoaded?: boolean; - /** Fires before the dragged node to be dropped. */ - nodeDragStop?(e: NodeDragStopEventArgs): void; + /** returns the current element of the node clicked + */ + currentElement?: any; - /** Fires once node dropped successfully. */ - nodeDropped?(e: NodeDroppedEventArgs): void; + /** returns the id of currently clicked node + */ + id?: string; - /** Fires once node edited successfully. */ - nodeEdit?(e: NodeEditEventArgs): void; + /** returns the parent id of currently clicked node + */ + parentId?: string; - /** Fires once node expanded successfully. */ - nodeExpand?(e: NodeExpandEventArgs): void; + /** returns the format asynchronous or synchronous + */ + async?: boolean; + } - /** Fires once node pasted successfully. */ - nodePaste?(e: NodePasteEventArgs): void; + export interface NodePasteEventArgs { - /** Fires when node selected successfully. */ - nodeSelect?(e: NodeSelectEventArgs): void; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Fires once node unchecked successfully. */ - nodeUncheck?(e: NodeUncheckEventArgs): void; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** Fires once node unselected successfully. */ - nodeUnselect?(e: NodeUnselectEventArgs): void; + /** returns the name of the event + */ + type?: string; - /** Fires when TreeView nodes are loaded successfully */ - ready?(e: ReadyEventArgs): void; - } + /** returns the event object + */ + event?: any; - export interface BeforeAddEventArgs { + /** returns the pasted element + */ + target?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the given target node values + */ + nodeDetails?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns the key pressed key code value + */ + keyCode?: number; + } - /** returns the name of the event - */ - type?: string; + export interface NodeSelectEventArgs { - /** returns the given new node data - */ - data?: string | any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the parent element, the given new nodes to be appended to the given parent element - */ - targetParent?: any; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns the given parent node details - */ - parentDetails?: any; - } + /** returns the name of the event + */ + type?: string; - export interface BeforeCollapseEventArgs { + /** returns the id of the current element of the node clicked + */ + id?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the id of the parent element of current element of the node clicked + */ + parentId?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns the current selected nodes index of TreeView + */ + selectedNodes?: any[]; - /** returns the name of the event - */ - type?: string; + /** returns the value of the node + */ + value?: string; - /** returns the value of the node - */ - value?: string; + /** returns the current element of the node clicked + */ + currentElement?: any; + } - /** returns the current element of the node clicked - */ - currentElement?: any; + export interface NodeUncheckEventArgs { - /** returns the child nodes are loaded or not - */ - isChildLoaded?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the id of currently clicked node - */ - id?: string; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns the parent id of currently clicked node - */ - parentId?: string; + /** returns the name of the event + */ + type?: string; - /** returns the format asynchronous or synchronous - */ - async?: boolean; - } + /** returns the event object + */ + event?: any; - export interface BeforeCutEventArgs { + /** returns the id of the current element of the node clicked + */ + id?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the id of the parent element of current element of the node clicked + */ + parentId?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns the value of the node + */ + value?: string; - /** returns the name of the event - */ - type?: string; + /** returns the current element of the node clicked + */ + currentElement?: any; - /** returns the event object - */ - event?: any; + /** it returns true when the node checkbox is checked; otherwise, false. + */ + isChecked?: boolean; - /** returns the target element, the given node to be cut - */ - target?: any; + /** it returns currently unchecked node name + */ + currentNode?: string; - /** returns the given target node values - */ - nodeDetails?: any; + /** it returns currently unchecked node and its child node details. + */ + currentUncheckedNodes?: any[]; + } - /** returns the key pressed key code value - */ - keyCode?: number; - } + export interface NodeUnselectEventArgs { - export interface BeforeDeleteEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the current element of the node unselected + */ + currentElement?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns the id of the current element of the node unselected + */ + id?: string; - /** returns the name of the event - */ - type?: string; + /** returns the TreeView model + */ + model?: ej.TreeView.Model; - /** returns the event object - */ - event?: any; + /** returns the id of the parent element of current element of the node unselected + */ + parentId?: string; - /** returns the target element, the given node to be deleted - */ - target?: any; + /** returns the current selected nodes index of TreeView + */ + selectedNodes?: any[]; - /** returns the given target node values - */ - nodeDetails?: any; + /** returns the name of the event + */ + type?: string; - /** returns the current parent element of the target node - */ - parentElement?: any; + /** returns the value of the node + */ + value?: string; + } + + export interface ReadyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the TreeView model + */ + model?: ej.TreeView.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface Fields { + + /** It receives the child level or inner level data source such as Essential DataManager object and JSON object. + */ + child?: any; + + /** It receives Essential DataManager object and JSON object. + */ + dataSource?: any; + + /** Specifies the node to be in expanded state. + */ + expanded?: string; + + /** Its allow us to indicate whether the node has child or not in load on demand + */ + hasChild?: string; + + /** Specifies the HTML Attributes to "li" item list. + */ + htmlAttribute?: any; + + /** Specifies the id to TreeView node items list. + */ + id?: string; + + /** Specifies the image attribute to “img” tag inside items list + */ + imageAttribute?: any; + + /** Specifies the HTML Attributes to "li" item list. + */ + imageUrl?: string; + + /** If its true Checkbox node will be checked when rendered with checkbox. + */ + isChecked?: string; + + /** Specifies the link attribute to “a” tag in item list. + */ + linkAttribute?: any; + + /** Specifies the parent id of the node. The nodes are listed as child nodes of the specified parent node by using its parent id. + */ + parentId?: string; + + /** It receives query to retrieve data from the table (query is same as SQL). + */ + query?: any; + + /** Allow us to specify the node to be in selected state + */ + selected?: string; + + /** Specifies the sprite CSS class to "li" item list. + */ + spriteCssClass?: string; + + /** It receives the table name to execute query on the corresponding table. + */ + tableName?: string; + + /** Specifies the text of TreeView node items list. + */ + text?: string; + } + + export interface SortSettings { + + /** Enables or disables the sorting option in TreeView control + * @Default {false} + */ + allowSorting?: boolean; + + /** Sets the sorting order type. There are two sorting types available, such as "ascending", "descending". + * @Default {ej.sortOrder.Ascending} + */ + sortOrder?: ej.sortOrder|string; + } + } + enum sortOrder { + //Enum for Ascending sort order + Ascending, + //Enum for Descending sort order + Descending, + } + + class Uploadbox extends ej.Widget { + static fn: Uploadbox; + constructor(element: JQuery | Element, options?: Uploadbox.Model); + static Locale: any; + model: Uploadbox.Model; + defaults: Uploadbox.Model; + + /** The destroy method destroys the control and brings the control to a pre-init state. All the events of the Upload control is bound by using this._on unbinds automatically. + * @returns {void} + */ + destroy(): void; + + /** Disables the Uploadbox control + * @returns {void} + */ + disable(): void; + + /** Enables the Uploadbox control + * @returns {void} + */ + enable(): void; + + /** Refresh the Uploadbox control + * @returns {void} + */ + refresh(): void; + + /** Upload the selected files. + * @returns {void} + */ + upload(): void; + } + export namespace Uploadbox { + + export interface Model { + + /** Enables the file drag and drop support to the Uploadbox control. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /** Uploadbox supports both synchronous and asynchronous upload. This can be achieved by using the asyncUpload property. + * @Default {true} + */ + asyncUpload?: boolean; + + /** Uploadbox supports auto uploading of files after the file selection is done. + * @Default {false} + */ + autoUpload?: boolean; + + /** Sets the text for each action button. + * @Default {{browse: Browse, upload: Upload, cancel: Cancel, close: Close}} + */ + buttonText?: ButtonText; + + /** Sets the root class for the Uploadbox control theme. This cssClass API helps to use custom skinning option for the Uploadbox button and dialog content. + */ + cssClass?: string; + + /** Specifies the custom file details in the dialog popup on initialization. + * @Default {{ title:true, name:true, size:true, status:true, action:true}} + */ + customFileDetails?: CustomFileDetails; + + /** Specifies the actions for dialog popup while initialization. + * @Default {{ modal:false, closeOnComplete:false, content:null, drag:true}} + */ + dialogAction?: DialogAction; + + /** Displays the Uploadbox dialog at the given X and Y positions. X: Dialog sets the left position value. Y: Dialog sets the top position value. + * @Default {null} + */ + dialogPosition?: any; + + /** Property for applying the text to the Dialog title and content headers. + * @Default {{ title: Upload Box, name: Name, size: Size, status: Status}} + */ + dialogText?: DialogText; + + /** The dropAreaText is displayed when the drag and drop support is enabled in the Uploadbox control. + * @Default {Drop files or click to upload} + */ + dropAreaText?: string; + + /** Specifies the dropAreaHeight when the drag and drop support is enabled in the Uploadbox control. + * @Default {100%} + */ + dropAreaHeight?: number|string; + + /** Specifies the dropAreaWidth when the drag and drop support is enabled in the Uploadbox control. + * @Default {100%} + */ + dropAreaWidth?: number|string; + + /** Based on the property value, Uploadbox is enabled or disabled. + * @Default {true} + */ + enabled?: boolean; + + /** Sets the right-to-left direction property for the Uploadbox control. + * @Default {false} + */ + enableRTL?: boolean; + + /** Only the files with the specified extension is allowed to upload. This is mentioned in the string format. + */ + extensionsAllow?: string; + + /** Only the files with the specified extension is denied for upload. This is mentioned in the string format. + */ + extensionsDeny?: string; + + /** Sets the maximum size limit for uploading the file. This is mentioned in the number format. + * @Default {31457280} + */ + fileSize?: number; + + /** Sets the height of the browse button. + * @Default {35px} + */ + height?: string; + + /** Specifies the list of HTML attributes to be added to uploadbox control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Configures the culture data and sets the culture to the Uploadbox. + * @Default {en-US} + */ + locale?: string; + + /** Enables multiple file selection for upload. + * @Default {true} + */ + multipleFilesSelection?: boolean; + + /** You can push the file to the Uploadbox in the client-side of the XHR supported browsers alone. + * @Default {null} + */ + pushFile?: any; + + /** Specifies the remove action to be performed after the file uploading is completed. Here, mention the server address for removal. + */ + removeUrl?: string; + + /** Specifies the save action to be performed after the file is pushed for uploading. Here, mention the server address to be saved. + */ + saveUrl?: string; + + /** Enables the browse button support to the Uploadbox control. + * @Default {true} + */ + showBrowseButton?: boolean; + + /** Specifies the file details to be displayed when selected for uploading. This can be done when the showFileDetails is set to true. + * @Default {true} + */ + showFileDetails?: boolean; + + /** Specifies the file details to be displayed when selected for uploading. This can be done when the showFileDetails is set to true. + * @Default {true} + */ + showRoundedCorner?: boolean; + + /** Sets the name for the Uploadbox control. This API helps to Map the action in code behind to retrieve the files. + */ + uploadName?: string; + + /** Sets the width of the browse button. + * @Default {100px} + */ + width?: string; + + /** Fires when the upload progress beforeSend. + */ + beforeSend?(e: BeforeSendEventArgs): void; + + /** Fires when the upload progress begins. + */ + begin?(e: BeginEventArgs): void; + + /** Fires when the upload progress is cancelled. + */ + cancel?(e: CancelEventArgs): void; + + /** Fires when the file upload progress is completed. + */ + complete?(e: CompleteEventArgs): void; + + /** Fires when the file upload progress is succeeded. + */ + success?(e: SuccessEventArgs): void; + + /** Fires when the Uploadbox control is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the Uploadbox control is destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires when the Upload process ends in Error. + */ + error?(e: ErrorEventArgs): void; + + /** Fires when the file is selected for upload successfully. + */ + fileSelect?(e: FileSelectEventArgs): void; + + /** Fires when the file is uploading. + */ + inProgress?(e: InProgressEventArgs): void; + + /** Fires when the uploaded file is removed successfully. + */ + remove?(e: RemoveEventArgs): void; + } + + export interface BeforeSendEventArgs { - /** returns the parent node values - */ - parentDetails?: any; + /** Selected FileList Object. + */ + files?: any; - /** returns the currently removed nodes - */ - removedNodes?: any[]; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface BeforeEditEventArgs { + /** returns the Uploadbox model + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** XHR-AJAX Object for reference. + */ + xhr?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns the name of the event. + */ + type?: string; + } - /** returns the name of the event - */ - type?: string; + export interface BeginEventArgs { - /** returns the current element of the node clicked - */ - currentElement?: any; - } + /** To pass additional information to the server. + */ + data?: any; - export interface BeforeExpandEventArgs { + /** Selected FileList Object. + */ + files?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns the Uploadbox model + */ + model?: any; - /** returns the name of the event - */ - type?: string; + /** returns the name of the event. + */ + type?: string; + } - /** returns the value of the node - */ - value?: string; + export interface CancelEventArgs { - /** if the child node is ready to expanded state; otherwise, false. - */ - isChildLoaded?: boolean; + /** Canceled FileList Object. + */ + fileStatus?: any; - /** returns the current element of the node clicked - */ - currentElement?: any; + /** returns the Uploadbox model + */ + model?: any; - /** returns the id of currently clicked node - */ - id?: string; + /** returns the name of the event. + */ + type?: string; + } - /** returns the parent id of currently clicked node - */ - parentId?: string; + export interface CompleteEventArgs { - /** returns the format asynchronous or synchronous - */ - async?: boolean; - } + /** AJAX event argument for reference. + */ + e?: any; - export interface BeforeLoadEventArgs { + /** Uploaded file list. + */ + files?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** response from the server. + */ + responseText?: string; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** XHR-AJAX Object for reference. + */ + xhr?: any; - /** returns the name of the event - */ - type?: string; + /** returns the Uploadbox model + */ + model?: any; - /** returns the AJAX settings object - */ - AjaxOptions?: any; - } + /** returns the name of the event. + */ + type?: string; + } - export interface BeforePasteEventArgs { + export interface SuccessEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** response from the server. + */ + responseText?: string; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** AJAX event argument for reference. + */ + e?: any; - /** returns the name of the event - */ - type?: string; + /** successfully uploaded files list. + */ + success?: any; - /** returns the event object - */ - event?: any; + /** Uploaded file list. + */ + files?: any; - /** returns the target element, the given node to be pasted - */ - target?: any; + /** XHR-AJAX Object for reference. + */ + xhr?: any; - /** returns the given target node values - */ - nodeDetails?: any; + /** returns the Uploadbox model + */ + model?: any; - /** returns the key pressed key code value - */ - keyCode?: number; - } + /** returns the name of the event. + */ + type?: string; + } - export interface BeforeSelectEventArgs { + export interface CreateEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the Uploadbox model + */ + model?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns the name of the event. + */ + type?: string; + } - /** returns the name of the event - */ - type?: string; + export interface DestroyEventArgs { - /** returns the target element, the given node to be selected - */ - target?: any; + /** returns the Uploadbox model + */ + model?: any; - /** returns the given target node values - */ - nodeDetails?: any; - } + /** returns the name of the event. + */ + type?: string; + } - export interface CreateEventArgs { + export interface ErrorEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** details about the error information. + */ + error?: string; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns the name of the event. + */ + type?: string; - /** returns the name of the event - */ - type?: string; - } + /** error event action details. + */ + action?: string; - export interface DestroyEventArgs { + /** returns the file details of the file uploaded + */ + files?: any; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface FileSelectEventArgs { - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns Selected FileList objects + */ + files?: any; - /** returns the name of the event - */ - type?: string; - } + /** returns the Uploadbox model + */ + model?: any; - export interface InlineEditValidationEventArgs { + /** returns the name of the event. + */ + type?: string; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface InProgressEventArgs { - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; + /** AJAX event argument for reference. + */ + e?: any; - /** returns the new entered text for the node - */ - newText?: string; + /** returns Selected FileList objects + */ + files?: any; - /** returns the current node element id - */ - id?: any; + /** returns the Uploadbox model + */ + model?: any; - /** returns the old node text - */ - oldText?: string; - } + /** returns the current progress percentage. + */ + percentage?: any; - export interface KeyPressEventArgs { + /** returns the name of the event. + */ + type?: string; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface RemoveEventArgs { - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** returns the Uploadbox model + */ + model?: any; - /** returns the name of the event - */ - type?: string; + /** returns the name of the event. + */ + type?: string; - /** returns the event object - */ - event?: any; + /** returns the file details of the file object + */ + fileStatus?: any; + } - /** returns the current element of the node clicked - */ - currentElement?: any; + export interface ButtonText { - /** returns the value of the node - */ - value?: string; + /** Sets the text for the browse button. + */ + browse?: string; - /** returns node path from root element - */ - path?: string; + /** Sets the text for the cancel button. + */ + cancel?: string; - /** returns the key pressed key code value - */ - keyCode?: number; + /** Sets the text for the close button. + */ + Close?: string; - /** it returns when the current node is in expanded state; otherwise, false. - */ - isExpanded?: boolean; + /** Sets the text for the Upload button inside the dialog popup. + */ + upload?: string; + } - /** returns the id of current TreeView node - */ - id?: string; + export interface CustomFileDetails { + + /** Enables the file upload interactions like remove/cancel in File details of the dialog popup. + */ + action?: boolean; + + /** Enables the name in the File details of the dialog popup. + */ + name?: boolean; + + /** Enables or disables the File size details of the dialog popup. + */ + size?: boolean; + + /** Enables or disables the file uploading status visibility in the dialog file details content. + */ + status?: boolean; + + /** Enables the title in File details for the dialog popup. + */ + title?: boolean; + } + + export interface DialogAction { + + /** Once uploaded successfully, the dialog popup closes immediately. + */ + closeOnComplete?: boolean; + + /** Sets the content container option to the Uploadbox dialog popup. + */ + content?: string; + + /** Enables the drag option to the dialog popup. + */ + drag?: boolean; + + /** Enables or disables the Uploadbox dialog’s modal property to the dialog popup. + */ + modal?: boolean; + } + + export interface DialogText { + + /** Sets the uploaded file’s Name (header text) to the Dialog popup. + */ + name?: string; + + /** Sets the upload file Size (header text) to the dialog popup. + */ + size?: string; + + /** Sets the upload file Status (header text) to the dialog popup. + */ + status?: string; + + /** Sets the title text of the dialog popup. + */ + title?: string; + } + } + + class WaitingPopup extends ej.Widget { + static fn: WaitingPopup; + constructor(element: JQuery | Element, options?: WaitingPopup.Model); + static Locale: any; + model: WaitingPopup.Model; + defaults: WaitingPopup.Model; + + /** To hide the waiting popup + * @returns {void} + */ + hide(): void; + + /** Refreshes the WaitingPopup control by resetting the pop-up panel position and content position + * @returns {void} + */ + refresh(): void; + + /** To show the waiting popup + * @returns {void} + */ + show(): void; + } + export namespace WaitingPopup { + + export interface Model { + + /** Sets the root class for the WaitingPopup control theme + * @Default {null} + */ + cssClass?: string; + + /** Specifies the list of HTML attributes to be added to waitingpopup control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Enables or disables the default loading icon. + * @Default {true} + */ + showImage?: boolean; + + /** Enables the visibility of the WaitingPopup control + * @Default {false} + */ + showOnInit?: boolean; + + /** Specified a selector for elements, within the container. + * @Default {null} + */ + target?: string; + + /** Waitingpopup element append to given container element. + * @Default {null} + */ + appendTo?: string; + + /** Loads HTML content inside the popup panel instead of the default icon + * @Default {null} + */ + template?: any; + + /** Sets the custom text in the pop-up panel to notify the waiting process + * @Default {null} + */ + text?: string; + + /** Fires after Create WaitingPopup successfully + */ + create?(e: CreateEventArgs): void; + + /** Fires after Destroy WaitingPopup successfully + */ + destroy?(e: DestroyEventArgs): void; + } + + export interface CreateEventArgs { + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the WaitingPopup model + */ + model?: ej.WaitingPopup.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the WaitingPopup model + */ + model?: ej.WaitingPopup.Model; + + /** returns the name of the event + */ + type?: string; + } + } + + class Grid extends ej.Widget { + static fn: Grid; + constructor(element: JQuery | Element, options?: Grid.Model); + static Locale: any; + model: Grid.Model; + defaults: Grid.Model; + + /** Adds a grid model property which is to be ignored upon exporting. + * @param {any[]} Pass the array of parameters which need to be ignored on exporting + * @returns {void} + */ + addIgnoreOnExport(propertyNames: any[]): void; + + /** Adds a grid model property which is to be ignored upon OnServerToolbarClick. + * @param {any[]} Pass the array of parameters which need to be ignored on OnServerToolbarClick + * @returns {void} + */ + addIgnoreOnToolbarServerClick(propertyNames: any[]): void; + + /** Add a new record in grid control when allowAdding is set as true.Without passing parameters it will add empty row. + * @param {any[]} Pass the array of added Records + * @param {any[]} optionalIf we pass serverChange as true, send post to server side for server action. + * @returns {void} + */ + addRecord(data?: any[], serverChange?: any[]): void; + + /** Cancel the modified changes in grid control when edit mode is "batch". + * @returns {void} + */ + batchCancel(): void; + + /** Save the modified changes to data source in grid control when edit mode is "batch". + * @returns {void} + */ + batchSave(): void; + + /** Send a cancel request in grid. + * @returns {void} + */ + cancelEdit(): void; + + /** Send a cancel request to the edited cell in grid. + * @returns {void} + */ + cancelEditCell(): void; + + /** It is used to clear all the cell selection. + * @returns {boolean} + */ + clearCellSelection(): boolean; + + /** It is used to clear specified cell selection based on the rowIndex and columnIndex provided. + * @param {number} It is used to pass the row index of the cell + * @param {number} It is used to pass the column index of the cell. + * @returns {boolean} + */ + clearCellSelection(rowIndex: number, columnIndex: number): boolean; + + /** It is used to clear all the row selection or at specific row selection based on the index provided. + * @param {number} optional If index of the column is specified then it will remove the selection from the particular column else it will clears all of the column selection + * @returns {boolean} + */ + clearColumnSelection(index?: number): boolean; + + /** It is used to clear all the filtering done. + * @param {string} If field of the column is specified then it will clear the particular filtering column + * @returns {void} + */ + clearFiltering(field: string): void; + + /** Clear the searching from the grid + * @returns {void} + */ + clearSearching(): void; + + /** Clear all the row selection or at specific row selection based on the index provided + * @param {number} optional If index of the row is specified then it will remove the selection from the particular row else it will clears all of the row selection + * @returns {boolean} + */ + clearSelection(index?: number): boolean; + + /** Clear the sorting from columns in the grid + * @returns {void} + */ + clearSorting(): void; + + /** Collapse all the group caption rows in grid + * @returns {void} + */ + collapseAll(): void; + + /** Collapse the group drop area in grid + * @returns {void} + */ + collapseGroupDropArea(): void; + + /** Add or remove columns in grid column collections + * @param {any[]|string} Pass array of columns or string of field name to add/remove the column in grid + * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform + * @returns {void} + */ + columns(columnDetails: any[]|string, action?: string): void; + + /** Refresh the grid with new data source + * @param {any} Pass new data source to the grid + * @param {boolean} optional When templateRefresh is set true, both header and contents get refreshed + * @returns {void} + */ + dataSource(datasource: any, templateRefresh?: boolean): void; + + /** Delete a record in grid control when allowDeleting is set as true + * @param {string} Pass the primary key field Name of the column + * @param {any} Pass the JSON data of record need to be delete. + * @returns {void} + */ + deleteRecord(fieldName: string, data: any): void; + + /** Delete the row based on the given tr element in grid. + * @param {JQuery} Pass the tr element in grid content to get its row index + * @returns {HTMLElement} + */ + deleteRow($tr: JQuery): HTMLElement; + + /** Destroy the grid widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Edit a particular cell based on the row index and field name provided in "batch" edit mode. + * @param {number} Pass row index to edit particular cell + * @param {string} Pass the field name of the column to perform batch edit + * @returns {void} + */ + editCell(index: number, fieldName: string): void; + + /** It returns a value and if the input field values of edit form is not based on the validation rules then it will show the validation message. + * @returns {boolean} + */ + editFormValidate(): boolean; + + /** Send a save request in grid. + * @returns {void} + */ + endEdit(): void; + + /** Expand all the group caption rows in grid. + * @returns {void} + */ + expandAll(): void; + + /** Expand or collapse the row based on the row state in grid + * @param {JQuery} Pass the target object to expand/collapse the row based on its row state + * @returns {void} + */ + expandCollapse($target: JQuery): void; + + /** Expand the group drop area in grid. + * @returns {void} + */ + expandGroupDropArea(): void; + + /** Export the grid content to excel, word or PDF document. + * @param {string} Pass the controller action name corresponding to exporting + * @param {string} optionalASP server event name corresponding to exporting + * @param {boolean} optionalPass the multiple exporting value as true/false + * @param {any[]} optionalPass the array of the gridIds to be filtered + * @returns {void} + */ + export(action?: string, serverEvent?: string, multipleExport?: boolean, gridIds?: any[]): void; + + /** Send a filtering request to filter one column in grid. + * @param {any[]} Pass the field name of the column + * @param {string} string/integer/dateTime operator + * @param {string} Pass the value to be filtered in a column + * @param {string} Pass the predicate as and/or + * @param {boolean} optional Pass the match case value as true/false + * @param {any} optionalactualFilterValue denote the filter object of current filtered columns.Pass the value to filtered in a column + * @returns {void} + */ + filterColumn(fieldName: any[], filterOperator: string, filterValue: string, predicate: string, matchcase?: boolean, actualFilterValue?: any): void; + + /** Send a filtering request to filter single or multiple column in grid. + * @param {any[]} Pass array of filterColumn query for performing filter operation + * @returns {void} + */ + filterColumn(filterQueries: any[]): void; + + /** Get the batch changes of edit, delete and add operations of grid. + * @returns {any} + */ + getBatchChanges(): any; + + /** Get the browser details + * @returns {any} + */ + getBrowserDetails(): any; + + /** Get the column details based on the given field in grid + * @param {string} Pass the field name of the column to get the corresponding column object + * @returns {any} + */ + getColumnByField(fieldName: string): any; + + /** Get the column details based on the given header text in grid. + * @param {string} Pass the header text of the column to get the corresponding column object + * @returns {any} + */ + getColumnByHeaderText(headerText: string): any; + + /** Get the column details based on the given column index in grid + * @param {number} Pass the index of the column to get the corresponding column object + * @returns {any} + */ + getColumnByIndex(columnIndex: number): any; + + /** Get the list of field names from column collection in grid. + * @returns {any[]} + */ + getColumnFieldNames(): any[]; + + /** Get the column index of the given field in grid. + * @param {string} Pass the field name of the column to get the corresponding column index + * @returns {number} + */ + getColumnIndexByField(fieldName: string): number; + + /** Get the column index of the given headerText of column in grid. + * @param {string} Pass the headerText of the column to get that column index + * @param {string} optionalOptional Pass the field name of the column. + * @returns {number} + */ + getColumnIndexByHeaderText(headerText: string, field?: string): number; + + /** Get the content div element of grid. + * @returns {HTMLElement} + */ + getContent(): HTMLElement; + + /** Get the content table element of grid + * @returns {HTMLTableElement[]} + */ + getContentTable(): HTMLTableElement[]; + + /** Get the data of currently edited cell value in "batch" edit mode + * @returns {any} + */ + getCurrentEditCellData(): any; + + /** Get the current page index in grid pager. + * @returns {number} + */ + getCurrentIndex(): number; + + /** Get the current page data source of grid. + * @returns {any[]} + */ + getCurrentViewData(): any[]; + + /** Get the data of given row index in grid. + * @returns {any} + */ + getDataByIndex(): any; + + /** Get the column field name from the given header text in grid. + * @param {string} Pass header text of the column to get its corresponding field name + * @returns {string} + */ + getFieldNameByHeaderText(headerText: string): string; + + /** Get the filter bar of grid + * @returns {HTMLElement} + */ + getFilterBar(): HTMLElement; + + /** Get the records filtered or searched in Grid + * @returns {any[]} + */ + getFilteredRecords(): any[]; + + /** Get the footer content of grid. + * @returns {HTMLElement} + */ + getFooterContent(): HTMLElement; + + /** Get the footer table element of grid. + * @returns {HTMLElement} + */ + getFooterTable(): HTMLElement; + + /** Get the header content div element of grid. + * @returns {HTMLElement} + */ + getHeaderContent(): HTMLElement; + + /** Get the header table element of grid + * @returns {HTMLElement} + */ + getHeaderTable(): HTMLElement; + + /** Get the column header text from the given field name in grid. + * @param {string} Pass field name of the column to get its corresponding header text + * @returns {string} + */ + getHeaderTextByFieldName(field: string): string; + + /** Get the names of all the hidden column collections in grid. + * @returns {any[]} + */ + getHiddenColumnNames(): any[]; + + /** Get the row index based on the given tr element in grid. + * @param {JQuery} Pass the tr element in grid content to get its row index + * @returns {number} + */ + getIndexByRow($tr: JQuery): number; + + /** Get the pager of grid. + * @returns {HTMLElement} + */ + getPager(): HTMLElement; + + /** Get the names of primary key columns in Grid + * @returns {any[]} + */ + getPrimaryKeyFieldNames(): any[]; + + /** Get the rows(tr element) from the given from and to row index in grid + * @param {number} Pass the from index from which the rows to be returned + * @param {number} Pass the to index to which the rows to be returned + * @returns {HTMLElement} + */ + getRowByIndex(from: number, to: number): HTMLElement; + + /** Get the row height of grid. + * @returns {number} + */ + getRowHeight(): number; + + /** Get the rows(tr element)of grid which is displayed in the current page. + * @returns {HTMLElement} + */ + getRows(): HTMLElement; + + /** Get the scroller object of grid. + * @returns {ej.Scroller} + */ + getScrollObject(): ej.Scroller; + + /** Get the selected records details in grid. + * @returns {any[]} + */ + getSelectedRecords(): any[]; + + /** Get the selected row element details in grid. + * @returns {any[]} + */ + getSelectedRows(): any[]; + + /** It accepts the string value and returns the field and sorted direction of the column in grid. + * @param {string} Pass the field of the column to get the sorted direction of the corresponding column in Grid. + * @returns {number} + */ + getsortColumnByField(field: string): number; + + /** Get the calculated summary values of JSON data passed to it + * @param {any} Pass Summary Column details + * @param {any} Pass JSON Array for which its field values to be calculated + * @returns {number} + */ + getSummaryValues(summaryCol: any, summaryData: any): number; + + /** Get the names of all the visible column collections in grid + * @returns {any[]} + */ + getVisibleColumnNames(): any[]; + + /** Send a paging request to specified page in grid + * @param {number} Pass the page index to perform paging at specified page index + * @returns {void} + */ + gotoPage(pageIndex: number): void; + + /** Send a column grouping request in grid. + * @param {string} Pass the field Name of the column to be grouped in grid control + * @returns {void} + */ + groupColumn(fieldName: string): void; + + /** Hide columns from the grid based on the header text + * @param {any[]|string} you can pass either array of header text of various columns or a header text of a column to hide + * @returns {void} + */ + hideColumns(headerText: any[]|string): void; + + /** Print the grid control + * @returns {void} + */ + print(): void; + + /** It is used to refresh and reset the changes made in "batch" edit mode + * @returns {void} + */ + refreshBatchEditChanges(): void; + + /** It is used to refresh the grid header. + * @returns {void} + */ + refreshHeader(): void; + + /** Refresh the grid contents. The template refreshment is based on the argument passed along with this method + * @param {boolean} optional When templateRefresh is set true, template and grid contents both are refreshed in grid else only grid content is refreshed + * @returns {void} + */ + refreshContent(templateRefresh?: boolean): void; + + /** Refresh the template of the grid + * @returns {void} + */ + refreshTemplate(): void; + + /** Refresh the toolbar items in grid. + * @returns {void} + */ + refreshToolbar(): void; + + /** Remove a column or collection of columns from a sorted column collections in grid. + * @param {any[]|string} Pass array of field names of the columns to remove a collection of sorted columns or pass a string of field name to remove a column from sorted column + * collections + * @returns {void} + */ + removeSortedColumns(fieldName: any[]|string): void; + + /** Creates a grid control + * @returns {void} + */ + render(): void; + + /** Re-order the column in grid + * @param {string} Pass the from field name of the column needs to be changed + * @param {string} Pass the to field name of the column needs to be changed + * @returns {void} + */ + reorderColumns(fromFieldName: string, toFieldName: string): void; + + /** Re-order the row in grid + * @param {any[]} Pass the indexes of the rows needs to reorder. + * @param {number} Pass the index of a row where to be reordered. + * @returns {void} + */ + reorderRows(indexes: any[], toIndex: number): void; + + /** Reset the model collections like pageSettings, groupSettings, filterSettings, sortSettings and summaryRows. + * @returns {void} + */ + resetModelCollections(): void; + + /** Resize the columns by giving column name and width for the corresponding one. + * @param {string} Pass the column name that needs to be changed + * @param {string} Pass the width to resize the particular columns + * @returns {void} + */ + resizeColumns(column: string, width: string): void; + + /** Resolves row height issue when unbound column is used with FrozenColumn + * @returns {void} + */ + rowHeightRefresh(): void; + + /** We can prevent the client side cellSave event triggering by passing the preventSaveEvent argument as true.Without argument it will save the particular edited grid cell. + * @param {boolean} optionalIf we pass preventSaveEvent as true, it prevents the client side cellSave event triggering + * @returns {void} + */ + saveCell(preventSaveEvent?: boolean): void; + + /** Set dimension for grid with corresponding to grid parent. + * @param {number} Pass the height of the grid container + * @param {number} Pass the width of the grid container + * @returns {void} + */ + setDimension(height: number, width: number): void; + + /** Send a request to grid to refresh the width set to columns + * @returns {void} + */ + setWidthToColumns(): void; + + /** Send a search request to grid with specified string passed in it + * @param {string} Pass the string to search in Grid records + * @returns {void} + */ + search(searchString: string): void; + + /** Select cells in grid. + * @param {any} It is used to set the starting index of row and indexes of cells for that corresponding row for selecting cells. + * @returns {void} + */ + selectCells(rowCellIndexes: any): void; + + /** Select columns in grid. + * @param {number} It is used to set the starting index of column for selecting columns. + * @returns {void} + */ + selectColumns(fromIndex: number): void; + + /** Select the specified columns in grid based on Index provided. + * @param {number} It is used to set the starting index of column for selecting columns. + * @param {number} optionalIt is used to set the ending index of column for selecting columns. + * @returns {boolean} + */ + selectColumns(columnIndex: number, toIndex?: number): boolean; + + /** Select rows in grid. + * @param {number} It is used to set the starting index of row for selecting rows. + * @param {number} It is used to set the ending index of row for selecting rows. + * @returns {void} + */ + selectRows(fromIndex: number, toIndex: number): void; + + /** Select specified rows in grid based on Index provided. + * @param {any[]|number} It is used to set the starting index of row for selecting rows. + * @param {number} optionalIt is used to set the ending index of row for selecting rows. + * @param {any} optionalTarget element which is clicked. + * @returns {void} + */ + selectRows(from: any[]|number, to: number, target?: any): void; + + /** Select rows in grid. + * @param {any[]} Pass array of rowIndexes for selecting rows + * @returns {void} + */ + selectRows(rowIndexes: any[]): void; + + /** Used to update a particular cell value. + * @returns {void} + */ + setCellText(): void; + + /** Used to update a particular cell value based on specified row Index and the fieldName. + * @param {number} It is used to set the index for selecting the row. + * @param {string} It is used to set the field name for selecting column. + * @param {any} It is used to set the value for the selected cell. + * @returns {void} + */ + setCellValue(Index: number, fieldName: string, value: any): void; + + /** It sets the default data to the column in grid during adding record in batch edit mode. + * @returns {void} + */ + setDefaultData(): void; + + /** The grid rows has to be rendered as detail view in mobile mode based on given value. + * @param {number} It is used to render grid rows as details view in mobile mode. + * @returns {void} + */ + setPhoneModeMaxWidth(Index: number): void; + + /** Set validation to edit form in the grid. + * @returns {void} + */ + setValidation(): void; + + /** Set validation to a particular input field in a edit form dynamically. + * @param {string} Specify the field name of the column to set validation rules + * @param {any} Specify the validation rules for the field + * @returns {void} + */ + setValidationToField(fieldName: string, rules: any): void; + + /** Show columns in the grid based on the header text + * @param {any[]|string} you can pass either array of header text of various columns or a header text of a column to show + * @returns {void} + */ + showColumns(headerText: any[]|string): void; + + /** Send a sorting request in grid. + * @param {string} Pass the field name of the column as columnName for which sorting have to be performed + * @param {string} optional Pass the sort direction ascending/descending by which the column have to be sort. By default it is sorting in an ascending order + * @returns {void} + */ + sortColumn(columnName: string, sortingDirection?: string): void; + + /** Send an edit record request in grid + * @param {JQuery} Pass the tr- selected row element to be edited in grid + * @returns {void} + */ + startEdit($tr: JQuery): void; + + /** Un-group a column from grouped columns collection in grid + * @param {string} Pass the field Name of the column to be ungrouped from grouped column collection + * @returns {void} + */ + ungroupColumn(fieldName: string): void; + + /** Update a edited record in grid control when allowEditing is set as true. + * @param {string} Pass the primary key field Name of the column + * @param {any[]} Pass the edited JSON data of record need to be update. + * @returns {void} + */ + updateRecord(fieldName: string, data: any[]): void; + + /** It adapts grid to its parent element or to the browsers window. + * @returns {void} + */ + windowonresize(): void; + } + export namespace Grid { + + export interface Model { + + /** Gets or sets a value that indicates whether to customizing cell based on our needs. + * @Default {false} + */ + allowCellMerging?: boolean; + + /** Gets or sets a value that indicates whether to enable dynamic grouping behavior. Grouping can be done by drag on drop desired columns to grid’s GroupDropArea. This can be + * further customized through “groupSettings” property. + * @Default {false} + */ + allowGrouping?: boolean; + + /** Gets or sets a value that indicates whether to enable keyboard support for performing grid actions. selectionType – Gets or sets a value that indicates whether to enable single + * row or multiple rows selection behavior in grid. Multiple selection can be done through by holding CTRL and clicking the grid rows + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Gets or sets a value that indicates whether to enable dynamic filtering behavior on grid. Filtering can be used to limit the records displayed using required criteria and this can + * be further customized through “filterSettings” property + * @Default {false} + */ + allowFiltering?: boolean; + + /** Gets or sets a value that indicates whether to enable the dynamic sorting behavior on grid data. Sorting can be done through clicking on particular column header. + * @Default {false} + */ + allowSorting?: boolean; + + /** Gets or sets a value that indicates whether to enable multi columns sorting behavior in grid. Sort multiple columns by holding CTRL and click on the corresponding column header. + * @Default {false} + */ + allowMultiSorting?: boolean; + + /** This specifies the grid to show the paginated data. Also enables pager control at the bottom of grid for dynamic navigation through data source. Paging can be further customized + * through “pageSettings” property. + * @Default {false} + */ + allowPaging?: boolean; + + /** Gets or sets a value that indicates whether to enable the columns reordering behavior in the grid. Reordering can be done through by drag and drop the particular column from one + * index to another index within the grid. + * @Default {false} + */ + allowReordering?: boolean; + + /** Gets or sets a value that indicates whether the column is non resizable. Column width is set automatically based on the content or header text which is large. + * @Default {false} + */ + allowResizeToFit?: boolean; + + /** Gets or sets a value that indicates whether to enable dynamic resizable of columns. Resize the width of the columns by simply click and move the particular column header line + * @Default {false} + */ + allowResizing?: boolean; + + /** Gets or sets a value that indicates whether to enable the rows reordering in Grid and drag & drop rows between multiple Grid. + * @Default {false} + */ + allowRowDragAndDrop?: boolean; + + /** Gets or sets a value that indicates whether to enable the scrollbar in the grid and view the records by scroll through the grid manually + * @Default {false} + */ + allowScrolling?: boolean; + + /** Gets or sets a value that indicates whether to enable dynamic searching behavior in grid. Currently search box can be enabled through “toolbarSettings” + * @Default {false} + */ + allowSearching?: boolean; + + /** Gets or sets a value that indicates whether user can select rows on grid. On enabling feature, selected row will be highlighted. + * @Default {true} + */ + allowSelection?: boolean; + + /** Gets or sets a value that indicates whether the Content will wrap to the next line if the content exceeds the boundary of the Column Cells. + * @Default {false} + */ + allowTextWrap?: boolean; + + /** Gets or sets a value that indicates whether to enable the multiple exporting behavior on grid data. + * @Default {false} + */ + allowMultipleExporting?: boolean; + + /** Gets or sets a value that indicates to define common width for all the columns in the grid. + */ + commonWidth?: number; + + /** Gets or sets a value that indicates to enable the visibility of the grid lines. + * @Default {ej.Grid.GridLines.Both} + */ + gridLines?: ej.Grid.GridLines|string; + + /** This specifies the grid to add the grid control inside the grid row of the parent with expand/collapse options + * @Default {null} + */ + childGrid?: any; + + /** Used to enable or disable static width settings for column. If the columnLayout is set as fixed, then column width will be static. + * @Default {ej.Grid.ColumnLayout.Auto} + */ + columnLayout?: ej.Grid.ColumnLayout|string; + + /** Gets or sets an object that indicates to render the grid with specified columns + * @Default {[]} + */ + columns?: Column[]; + + /** Gets or sets an object that indicates whether to customize the context menu behavior of the grid. + */ + contextMenuSettings?: ContextMenuSettings; + + /** Gets or sets a value that indicates to render the grid with custom theme. + */ + cssClass?: string; + + /** Gets or sets the data to render the grid with records + * @Default {null} + */ + dataSource?: any; + + /** Default Value: + * @Default {null} + */ + detailsTemplate?: string; + + /** Gets or sets an object that indicates whether to customize the editing behavior of the grid. + */ + editSettings?: EditSettings; + + /** Gets or sets a value that indicates whether to enable the alternative rows differentiation in the grid records based on corresponding theme. + * @Default {true} + */ + enableAltRow?: boolean; + + /** Gets or sets a value that indicates whether to enable the save action in the grid through row selection + * @Default {true} + */ + enableAutoSaveOnSelectionChange?: boolean; + + /** Gets or sets a value that indicates whether to enable mouse over effect on the corresponding column header cell of the grid + * @Default {false} + */ + enableHeaderHover?: boolean; + + /** Gets or sets a value that indicates whether to persist the grid model state in page using applicable medium i.e., HTML5 localStorage or cookies + * @Default {false} + */ + enablePersistence?: boolean; + + /** Gets or sets a value that indicates whether the grid rows has to be rendered as detail view in mobile mode + * @Default {false} + */ + enableResponsiveRow?: boolean; + + /** Gets or sets a value that indicates whether to enable mouse over effect on corresponding grid row. + * @Default {true} + */ + enableRowHover?: boolean; + + /** Align content in the grid control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /** To Disable the mouse swipe property as false. + * @Default {true} + */ + enableTouch?: boolean; + + /** It sets a value that indicates whether to enable toolbar items, when allowEditing, allowAdding and allowDeleting property set as false in the grid. + * @Default {false} + */ + enableToolbarItems?: boolean; + + /** Act as mapper for the excel exporting URL. + * @Default {ExportToExcel} + */ + exportToExcelAction?: string; + + /** Act as mapper for the PDF exporting URL. + * @Default {ExportToPdf} + */ + exportToPdfAction?: string; + + /** Act as mapper for the Word exporting URL. + * @Default {ExportToWord} + */ + exportToWordAction?: string; + + /** Gets or sets an object that indicates whether to customize the filtering behavior of the grid + */ + filterSettings?: FilterSettings; + + /** Gets or sets an object that indicates whether to customize the grouping behavior of the grid. + */ + groupSettings?: GroupSettings; + + /** Gets or sets a value that indicates whether the grid design has be to made responsive. + * @Default {false} + */ + isResponsive?: boolean; + + /** This specifies to change the key in keyboard interaction to grid control + * @Default {null} + */ + keySettings?: any; + + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to + * a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /** Gets or sets a value that indicates whether to set the minimum width of the responsive grid while isResponsive property is true and enableResponsiveRow property is set as false. + * @Default {0} + */ + minWidth?: number; + + /** Gets or sets an object that indicates whether to modify the pager default configuration. + */ + pageSettings?: PageSettings; + + /** Query the dataSource from the table for Grid. + * @Default {null} + */ + query?: any; + + /** Gets or sets an object that indicates whether to modify the resizing behavior. + */ + resizeSettings?: ResizeSettings; + + /** Gets or sets a value that indicates to render the grid with template rows. The template row must be a table row. That table row must have the JavaScript render binding format + * ({{:columnName}}) then the grid data source binds the data to the corresponding table row of the template. + * @Default {null} + */ + rowTemplate?: string; + + /** Gets or sets an object that indicates whether to customize the drag and drop behavior of the grid rows + */ + rowDropSettings?: RowDropSettings; + + /** Gets or sets an object that indicates whether to customize the searching behavior of the grid + */ + searchSettings?: SearchSettings; + + /** Gets a value that indicates whether the grid model to hold multiple selected records . selectedRecords can be used to displayed hold the single or multiple selected records using + * “selectedRecords” property + * @Default {null} + */ + selectedRecords?: any[]; + + /** Gets or sets a value that indicates to select the row while initializing the grid + * @Default {-1} + */ + selectedRowIndex?: number; + + /** Gets or sets a value that indicates the selected rows in grid + * @Default {[]} + */ + selectedRowIndices?: any[]; + + /** This property is used to configure the selection behavior of the grid. + */ + selectionSettings?: SelectionSettings; + + /** The row selection behavior of grid. Accepting types are "single" and "multiple". + * @Default {ej.Grid.SelectionType.Single} + */ + selectionType?: ej.Grid.SelectionType|string; + + /** Gets or sets an object that indicates whether to customize the scrolling behavior of the grid. + */ + scrollSettings?: ScrollSettings; + + /** Default Value: + * @Default {false} + */ + showColumnChooser?: boolean; + + /** Gets or sets a value that indicates stacked header should be shown on grid layout when the property “stackedHeaderRows” is set. + * @Default {false} + */ + showStackedHeader?: boolean; + + /** Gets or sets a value that indicates summary rows should be shown on grid layout when the property “summaryRows” is set + * @Default {false} + */ + showSummary?: boolean; + + /** Gets or sets a value that indicates whether to customize the sorting behavior of the grid. + */ + sortSettings?: SortSettings; + + /** Gets or sets an object that indicates to managing the collection of stacked header rows for the grid. + * @Default {[]} + */ + stackedHeaderRows?: StackedHeaderRow[]; + + /** Gets or sets an object that indicates to managing the collection of summary rows for the grid. + * @Default {[]} + */ + summaryRows?: SummaryRow[]; + + /** Gets or sets an object that indicates whether to auto wrap the grid header or content or both + */ + textWrapSettings?: TextWrapSettings; + + /** Gets or sets an object that indicates whether to enable the toolbar in the grid and add toolbar items + */ + toolbarSettings?: ToolbarSettings; + + /** Triggered for every grid action before its starts. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Triggered for every grid action success event. + */ + actionComplete?(e: ActionCompleteEventArgs): void; + + /** Triggered for every grid action server failure event. + */ + actionFailure?(e: ActionFailureEventArgs): void; + + /** Triggered when record batch add. + */ + batchAdd?(e: BatchAddEventArgs): void; + + /** Triggered when record batch delete. + */ + batchDelete?(e: BatchDeleteEventArgs): void; + + /** Triggered before the batch add. + */ + beforeBatchAdd?(e: BeforeBatchAddEventArgs): void; + + /** Triggered before the batch delete. + */ + beforeBatchDelete?(e: BeforeBatchDeleteEventArgs): void; + + /** Triggered before the batch save. + */ + beforeBatchSave?(e: BeforeBatchSaveEventArgs): void; + + /** Triggered before the print. + */ + beforePrint?(e: BeforePrintEventArgs): void; + + /** Triggered before row drop in the grid + */ + beforeRowDrop?(e: BeforeRowDropEventArgs): void; + + /** Triggered before the record is going to be edited. + */ + beginEdit?(e: BeginEditEventArgs): void; + + /** Triggered when record cell edit. + */ + cellEdit?(e: CellEditEventArgs): void; + + /** Triggered when record cell save. + */ + cellSave?(e: CellSaveEventArgs): void; + + /** Triggered after the cell is selected. + */ + cellSelected?(e: CellSelectedEventArgs): void; + + /** Triggered before the cell is going to be selected. + */ + cellSelecting?(e: CellSelectingEventArgs): void; + + /** Triggered after the cell is deselected. + */ + cellDeselected?(e: CellDeselectedEventArgs): void; + + /** Triggered before the cell is going to be deselected. + */ + cellDeselecting?(e: CellDeselectingEventArgs): void; - /** returns the parentId of current TreeView node - */ - parentId?: string; - } + /** Triggered when the column is being dragged. + */ + columnDrag?(e: ColumnDragEventArgs): void; - export interface LoadErrorEventArgs { + /** Triggered when column dragging begins. + */ + columnDragStart?(e: ColumnDragStartEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Triggered when the column is dropped. + */ + columnDrop?(e: ColumnDropEventArgs): void; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Triggered after the column is selected. + */ + columnSelected?(e: ColumnSelectedEventArgs): void; - /** returns the name of the event - */ - type?: string; + /** Triggered before the column is going to be selected. + */ + columnSelecting?(e: ColumnSelectingEventArgs): void; - /** returns the AJAX error object - */ - error?: any; - } + /** Triggered after the column is deselected. + */ + columnDeselected?(e: ColumnDeselectedEventArgs): void; - export interface LoadSuccessEventArgs { + /** Triggered before the column is going to be deselected. + */ + columnDeselecting?(e: ColumnDeselectingEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Triggered when context menu item is clicked + */ + contextClick?(e: ContextClickEventArgs): void; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Triggered before the context menu is opened. + */ + contextOpen?(e: ContextOpenEventArgs): void; - /** returns the name of the event - */ - type?: string; + /** Triggered when the grid is rendered completely. + */ + create?(e: CreateEventArgs): void; - /** returns the success data from the URL - */ - data?: any; + /** Triggered when the grid is bound with data during initial rendering. + */ + dataBound?(e: DataBoundEventArgs): void; - /** returns the target parent element, the data returned from the URL to be appended to the given parent element, else in TreeView - */ - targetParent?: any; + /** Triggered when grid going to destroy. + */ + destroy?(e: DestroyEventArgs): void; - /** returns the given parent node details - */ - parentDetails?: any; - } + /** Triggered when detail template row is clicked to collapse. + */ + detailsCollapse?(e: DetailsCollapseEventArgs): void; - export interface NodeAddEventArgs { + /** Triggered detail template row is initialized. + */ + detailsDataBound?(e: DetailsDataBoundEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Triggered when detail template row is clicked to expand. + */ + detailsExpand?(e: DetailsExpandEventArgs): void; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Triggered after the record is added. + */ + endAdd?(e: EndAddEventArgs): void; - /** returns the name of the event - */ - type?: string; + /** Triggered after the record is deleted. + */ + endDelete?(e: EndDeleteEventArgs): void; - /** returns the added data, that are given initially - */ - data?: any; + /** Triggered after the record is edited. + */ + endEdit?(e: EndEditEventArgs): void; - /** returns the newly added elements - */ - nodes?: any; + /** Triggered initial load. + */ + load?(e: LoadEventArgs): void; - /** returns the target parent element of the added element - */ - parentElement?: any; + /** Triggered every time a request is made to access particular header cell information, element and data. + */ + mergeHeaderCellInfo?(e: MergeHeaderCellInfoEventArgs): void; - /** returns the given parent node details - */ - parentDetails?: any; - } + /** Triggered every time a request is made to access particular cell information, element and data. + */ + mergeCellInfo?(e: MergeCellInfoEventArgs): void; - export interface NodeCheckEventArgs { + /** Triggered every time a request is made to access particular cell information, element and data. + */ + queryCellInfo?(e: QueryCellInfoEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Triggered when record is clicked. + */ + recordClick?(e: RecordClickEventArgs): void; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Triggered when record is double clicked. + */ + recordDoubleClick?(e: RecordDoubleClickEventArgs): void; - /** returns the name of the event - */ - type?: string; + /** Triggered after column resized. + */ + resized?(e: ResizedEventArgs): void; - /** returns the event object - */ - event?: any; + /** Triggered when column resize end. + */ + resizeEnd?(e: ResizeEndEventArgs): void; - /** returns the value of the node - */ - value?: string; + /** Triggered when column resize start. + */ + resizeStart?(e: ResizeStartEventArgs): void; - /** returns the id of the current element of the node clicked - */ - id?: string; + /** Triggered when right clicked on grid element. + */ + rightClick?(e: RightClickEventArgs): void; - /** returns the id of the parent element of current element of the node clicked - */ - parentId?: string; + /** Triggered every time a request is made to access row information, element and data. + */ + rowDataBound?(e: RowDataBoundEventArgs): void; - /** returns the current element of the node clicked - */ - currentElement?: any; + /** Triggered after the row is selected. + */ + rowSelected?(e: RowSelectedEventArgs): void; - /** it returns true when the node checkbox is checked; otherwise, false. - */ - isChecked?: boolean; + /** Triggered before the row is going to be selected. + */ + rowSelecting?(e: RowSelectingEventArgs): void; - /** it returns the currently checked node name - */ - currentNode?: any[]; + /** Triggered after the row is deselected. + */ + rowDeselected?(e: RowDeselectedEventArgs): void; - /** it returns the currently checked and its child node details - */ - currentCheckedNodes?: any[]; - } + /** Triggered before the row is going to be deselected. + */ + rowDeselecting?(e: RowDeselectingEventArgs): void; - export interface NodeClickEventArgs { + /** Triggered when the row is being dragged. + */ + rowDrag?(e: RowDragEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Triggered when row dragging begins. + */ + rowDragStart?(e: RowDragStartEventArgs): void; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Triggered when the row is dropped. + */ + rowDrop?(e: RowDropEventArgs): void; - /** returns the name of the event - */ - type?: string; + /** Triggered when refresh the template column elements in the Grid. + */ + templateRefresh?(e: TemplateRefreshEventArgs): void; - /** returns the event object - */ - event?: any; + /** Triggered when toolbar item is clicked in grid. + */ + toolbarClick?(e: ToolbarClickEventArgs): void; + } - /** returns the current element of the node clicked - */ - currentElement?: any; + export interface ActionBeginEventArgs { - /** returns the id of currently clicked TreeView node - */ - id?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the parentId of currently clicked TreeView node - */ - parentId?: string; - } + /** Returns the grid model. + */ + model?: any; - export interface NodeCollapseEventArgs { + /** Returns the name of the event. + */ + type?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the current selected page number. + */ + currentPage?: number; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns the previous selected page number. + */ + previousPage?: number; - /** returns the id of the current element of the node clicked - */ - id?: string; + /** Returns the end row index of that current page. + */ + endIndex?: number; - /** returns the name of the event - */ - type?: string; + /** Returns request type. + */ + requestType?: string; - /** returns the id of the parent element of current element of the node clicked - */ - parentId?: string; + /** Returns the start row index of that current page. + */ + startIndex?: number; - /** returns the value of the node - */ - value?: string; + /** Returns the current grouped column field name. + */ + columnName?: string; - /** returns the current element of the node clicked - */ - currentElement?: any; + /** Returns the column sort direction. + */ + columnSortDirection?: string; - /** returns the child nodes are loaded or not - */ - isChildLoaded?: boolean; + /** Returns current edited row. + */ + row?: any; - /** returns the format asynchronous or synchronous - */ - async?: boolean; - } + /** Returns the current action event type. + */ + originalEventType?: string; - export interface NodeCutEventArgs { + /** Returns primary key. + */ + primaryKey?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns primary key value. + */ + primaryKeyValue?: string; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns the edited row index. + */ + rowIndex?: number; - /** returns the name of the event - */ - type?: string; + /** Returns the record object (JSON). + */ + data?: any; - /** returns the event object - */ - event?: any; + /** Returns the record object (JSON). + */ + rowData?: any; - /** returns the current parent element of the cut node - */ - parentElement?: any; + /** Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; - /** returns the given parent node details - */ - parentDetails?: any; + /** Returns the selected row index. + */ + selectedRow?: number; - /** returns the key pressed key code value - */ - keyCode?: number; - } + /** Returns selected row for delete. + */ + tr?: any; - export interface NodeDeleteEventArgs { + /** Returns current filtering column field name. + */ + currentFilteringColumn?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns current filtering object. + */ + currentFilterObject?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns filter details. + */ + filterCollection?: any; - /** returns the name of the event - */ - type?: string; + /** Returns type of the column like number, string and so on. + */ + columnType?: string; - /** returns the event object - */ - event?: any; + /** Returns the excel filter model. + */ + filtermodel?: any; - /** returns the current parent element of the deleted node - */ - parentElement?: any; + /** Returns the dataSource. + */ + dataSource?: any; - /** returns the given parent node details - */ - parentDetails?: any; + /** Returns the query manager. + */ + query?: any; - /** returns the currently removed nodes - */ - removedNodes?: any[]; - } + /** Returns the customfilter option value. + */ + isCustomFilter?: boolean; + } - export interface NodeDragEventArgs { + export interface ActionCompleteEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns the grid model. + */ + model?: any; - /** returns the name of the event - */ - type?: string; + /** Returns request type. + */ + requestType?: string; - /** returns the original drag target - */ - dragTarget?: any; + /** Returns the name of the event. + */ + type?: string; - /** returns the current target TreeView node - */ - target?: any; + /** Returns the current selected page number. + */ + currentPage?: number; - /** returns the current target details - */ - targetElementData?: any; + /** Returns the previous selected page number. + */ + previousPage?: number; - /** returns the current parent element of the target node - */ - draggedElement?: any; + /** Returns the end row index of that current page. + */ + endIndex?: number; - /** returns the given parent node details - */ - draggedElementData?: any; + /** Returns current action event type. + */ + originalEventType?: string; - /** returns the event object - */ - event?: any; - } + /** Returns the start row index of the current page. + */ + startIndex?: number; - export interface NodeDragStartEventArgs { + /** Returns grid element. + */ + target?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the current sorted column field name. + */ + columnName?: string; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns the column sort direction. + */ + columnSortDirection?: string; - /** returns the name of the event - */ - type?: string; + /** Returns current edited row. + */ + row?: any; - /** returns the original drag target - */ - dragTarget?: any; + /** Returns primary key. + */ + primaryKey?: string; - /** returns the current dragging parent TreeView node - */ - parentElement?: any; + /** Returns primary key value. + */ + primaryKeyValue?: string; - /** returns the current dragging parent TreeView node details - */ - parentElementData?: any; + /** Returns the edited row index. + */ + rowIndex?: number; - /** returns the current parent element of the dragging node - */ - target?: any; + /** Returns the record object (JSON). + */ + data?: any; - /** returns the given parent node details - */ - targetElementData?: any; + /** Returns the record object (JSON). + */ + rowData?: any; - /** returns the event object - */ - event?: any; - } + /** Returns the selectedRow index. + */ + selectedRow?: number; - export interface NodeDragStopEventArgs { + /** Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns selected row for delete. + */ + tr?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns current filtering column field name. + */ + currentFilteringColumn?: string; - /** returns the name of the event - */ - type?: string; + /** Returns current filtering object. + */ + currentFilterObject?: any; - /** returns the original drop target - */ - dropTarget?: any; + /** Returns filter details. + */ + filterCollection?: any; - /** returns the current dragged TreeView node - */ - draggedElement?: any; + /** Returns the dataSource. + */ + dataSource?: any; - /** returns the current dragged TreeView node details - */ - draggedElementData?: any; + /** Returns the excel filter model. + */ + filtermodel?: any; - /** returns the current parent element of the dragged node - */ - target?: any; + /** Returns type of the column like number, string and so on. + */ + columnType?: string; - /** returns the given parent node details - */ - targetElementData?: any; + /** Returns the customfilter option value. + */ + isCustomFilter?: boolean; + } - /** returns the drop position such as before, after or over - */ - position?: string; + export interface ActionFailureEventArgs { - /** returns the event object - */ - event?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface NodeDroppedEventArgs { + /** Returns the grid model. + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns request type. + */ + requestType?: string; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns the name of the event. + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** Returns the error return by server. + */ + error?: any; - /** returns the original drop target - */ - dropTarget?: any; + /** Returns the current selected page number. + */ + currentPage?: number; - /** returns the current dropped TreeView node - */ - droppedElement?: any; + /** Returns the previous selected page number. + */ + previousPage?: number; - /** returns the current dropped TreeView node details - */ - droppedElementData?: any; + /** Returns the end row index of that current page. + */ + endIndex?: number; - /** returns the current parent element of the dropped node - */ - target?: any; + /** Returns current action event type. + */ + originalEventType?: string; - /** returns the given parent node details - */ - targetElementData?: any; + /** Returns the start row index of the current page. + */ + startIndex?: number; - /** returns the drop position such as before, after or over - */ - position?: string; + /** Returns grid element. + */ + target?: any; - /** returns the event object - */ - event?: any; - } + /** Returns the current sorted column field name. + */ + columnName?: string; - export interface NodeEditEventArgs { + /** Returns the column sort direction. + */ + columnSortDirection?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns current edited row. + */ + row?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns primary key. + */ + primaryKey?: string; - /** returns the name of the event - */ - type?: string; + /** Returns primary key value. + */ + primaryKeyValue?: string; - /** returns the id of the element - */ - id?: string; + /** Returns the edited row index. + */ + rowIndex?: number; - /** returns the oldText of the element - */ - oldText?: string; + /** Returns the record object (JSON). + */ + data?: any; - /** returns the newText of the element - */ - newText?: string; + /** Returns the record object (JSON). + */ + rowData?: any; - /** returns the event object - */ - event?: any; + /** Returns the selectedRow index. + */ + selectedRow?: number; - /** returns the target element, the given node to be cut - */ - target?: any; + /** Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; - /** returns the given target node values - */ - nodeDetails?: any; - } + /** Returns selected row for delete. + */ + tr?: any; - export interface NodeExpandEventArgs { + /** Returns current filtering column field name. + */ + currentFilteringColumn?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns current filtering object. + */ + currentFilterObject?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns filter details. + */ + filterCollection?: any; + } - /** returns the name of the event - */ - type?: string; + export interface BatchAddEventArgs { - /** returns the value of the node - */ - value?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** if the child node is ready to expanded state; otherwise, false. - */ - isChildLoaded?: boolean; + /** Returns the grid model. + */ + model?: any; - /** returns the current element of the node clicked - */ - currentElement?: any; + /** Returns deleted data. + */ + defaultData?: any; - /** returns the id of currently clicked node - */ - id?: string; + /** Returns the name of the event. + */ + type?: string; - /** returns the parent id of currently clicked node - */ - parentId?: string; + /** Returns the column object. + */ + columnObject?: any; - /** returns the format asynchronous or synchronous - */ - async?: boolean; - } + /** Returns the column index. + */ + columnIndex?: number; - export interface NodePasteEventArgs { + /** Returns the row element. + */ + row?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the primaryKey. + */ + primaryKey?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns the cell object. + */ + cell?: any; + } - /** returns the name of the event - */ - type?: string; + export interface BatchDeleteEventArgs { - /** returns the event object - */ - event?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the pasted element - */ - target?: any; + /** Returns the grid model. + */ + model?: any; - /** returns the given target node values - */ - nodeDetails?: any; + /** Returns deleted data. + */ + rowData?: any; - /** returns the key pressed key code value - */ - keyCode?: number; - } + /** Returns the name of the event. + */ + type?: string; - export interface NodeSelectEventArgs { + /** Returns the primary key. + */ + primaryKey?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the row Index. + */ + rowIndex?: number; + } - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + export interface BeforeBatchAddEventArgs { - /** returns the name of the event - */ - type?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the id of the current element of the node clicked - */ - id?: any; + /** Returns the grid model. + */ + model?: any; - /** returns the id of the parent element of current element of the node clicked - */ - parentId?: any; + /** Returns the name of the event. + */ + type?: string; - /** returns the current selected nodes index of TreeView - */ - selectedNodes?: any[]; + /** Returns the default data object. + */ + defaultData?: any; - /** returns the value of the node - */ - value?: string; + /** Returns the primaryKey. + */ + primaryKey?: any; + } - /** returns the current element of the node clicked - */ - currentElement?: any; - } + export interface BeforeBatchDeleteEventArgs { - export interface NodeUncheckEventArgs { + /** Returns the grid model. + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns deleted data. + */ + rowData?: any; - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns the name of the event. + */ + type?: string; - /** returns the name of the event - */ - type?: string; + /** Returns the primaryKey. + */ + primaryKey?: any; - /** returns the event object - */ - event?: any; + /** Returns the row index. + */ + rowIndex?: number; - /** returns the id of the current element of the node clicked - */ - id?: any; + /** Returns the row element. + */ + row?: any; + } - /** returns the id of the parent element of current element of the node clicked - */ - parentId?: any; + export interface BeforeBatchSaveEventArgs { - /** returns the value of the node - */ - value?: string; + /** Returns the grid model. + */ + model?: any; - /** returns the current element of the node clicked - */ - currentElement?: any; + /** Returns the name of the event. + */ + type?: string; - /** it returns true when the node checkbox is checked; otherwise, false. - */ - isChecked?: boolean; + /** Returns the changed record object. + */ + batchChanges?: any; + } - /** it returns currently unchecked node name - */ - currentNode?: string; + export interface BeforePrintEventArgs { - /** it returns currently unchecked node and its child node details. - */ - currentUncheckedNodes?: any[]; - } + /** Returns the grid model. + */ + model?: any; - export interface NodeUnselectEventArgs { + /** Returns the name of the event. + */ + type?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the Grid element. + */ + element?: any; - /** returns the current element of the node unselected - */ - currentElement?: any; + /** Returns the selected records. + */ + selectedRows?: any; + } - /** returns the id of the current element of the node unselected - */ - id?: string; + export interface BeforeRowDropEventArgs { - /** returns the TreeView model - */ - model?: ej.TreeView.Model; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the id of the parent element of current element of the node unselected - */ - parentId?: string; + /** Returns the targeted row. + */ + target?: any; - /** returns the current selected nodes index of TreeView - */ - selectedNodes?: any[]; + /** Returns the targeted row index. + */ + targetIndex?: any; - /** returns the name of the event - */ - type?: string; + /** Returns the dragged record details + */ + draggedRecords?: any; - /** returns the value of the node - */ - value?: string; - } - - export interface ReadyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the TreeView model - */ - model?: ej.TreeView.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface Fields { - - /** It receives the child level or inner level data source such as Essential DataManager object and JSON object. - */ - child?: any; - - /** It receives Essential DataManager object and JSON object. - */ - dataSource?: any; - - /** Specifies the node to be in expanded state. - */ - expanded?: string; - - /** Its allow us to indicate whether the node has child or not in load on demand - */ - hasChild?: string; - - /** Specifies the HTML Attributes to "li" item list. - */ - htmlAttribute?: any; - - /** Specifies the id to TreeView node items list. - */ - id?: string; - - /** Specifies the image attribute to “img” tag inside items list - */ - imageAttribute?: any; - - /** Specifies the HTML Attributes to "li" item list. - */ - imageUrl?: string; - - /** If its true Checkbox node will be checked when rendered with checkbox. - */ - isChecked?: string; - - /** Specifies the link attribute to “a” tag in item list. - */ - linkAttribute?: any; - - /** Specifies the parent id of the node. The nodes are listed as child nodes of the specified parent node by using its parent id. - */ - parentId?: string; - - /** It receives query to retrieve data from the table (query is same as SQL). - */ - query?: any; - - /** Allow us to specify the node to be in selected state - */ - selected?: string; - - /** Specifies the sprite CSS class to "li" item list. - */ - spriteCssClass?: string; - - /** It receives the table name to execute query on the corresponding table. - */ - tableName?: string; - - /** Specifies the text of TreeView node items list. - */ - text?: string; - } - - export interface SortSettings { - - /** Enables or disables the sorting option in TreeView control - * @Default {false} - */ - allowSorting?: boolean; - - /** Sets the sorting order type. There are two sorting types available, such as "ascending", "descending". - * @Default {ej.sortOrder.Ascending} - */ - sortOrder?: ej.sortOrder | string; - } - } - enum sortOrder { - //Enum for Ascending sort order - Ascending, - //Enum for Descending sort order - Descending, - } - - class Uploadbox extends ej.Widget { - static fn: Uploadbox; - constructor(element: JQuery | Element, options?: Uploadbox.Model); - static Locale: any; - model: Uploadbox.Model; - defaults: Uploadbox.Model; - - /** The destroy method destroys the control and brings the control to a pre-init state. All the events of the Upload control is bound by using this._on unbinds automatically. - * @returns {void} - */ - destroy(): void; - - /** Disables the Uploadbox control - * @returns {void} - */ - disable(): void; - - /** Enables the Uploadbox control - * @returns {void} - */ - enable(): void; - - /** Refresh the Uploadbox control - * @returns {void} - */ - refresh(): void; - } - export namespace Uploadbox { - - export interface Model { - - /** Enables the file drag and drop support to the Uploadbox control. - * @Default {false} - */ - allowDragAndDrop?: boolean; - - /** Uploadbox supports both synchronous and asynchronous upload. This can be achieved by using the asyncUpload property. - * @Default {true} - */ - asyncUpload?: boolean; - - /** Uploadbox supports auto uploading of files after the file selection is done. - * @Default {false} - */ - autoUpload?: boolean; - - /** Sets the text for each action button. - * @Default {{browse: Browse, upload: Upload, cancel: Cancel, close: Close}} - */ - buttonText?: ButtonText; - - /** Sets the root class for the Uploadbox control theme. This cssClass API helps to use custom skinning option for the Uploadbox button and dialog content. - */ - cssClass?: string; - - /** Specifies the custom file details in the dialog popup on initialization. - * @Default {{ title:true, name:true, size:true, status:true, action:true}} - */ - customFileDetails?: CustomFileDetails; - - /** Specifies the actions for dialog popup while initialization. - * @Default {{ modal:false, closeOnComplete:false, content:null, drag:true}} - */ - dialogAction?: DialogAction; - - /** Displays the Uploadbox dialog at the given X and Y positions. X: Dialog sets the left position value. Y: Dialog sets the top position value. - * @Default {null} - */ - dialogPosition?: any; - - /** Property for applying the text to the Dialog title and content headers. - * @Default {{ title: Upload Box, name: Name, size: Size, status: Status}} - */ - dialogText?: DialogText; - - /** The dropAreaText is displayed when the drag and drop support is enabled in the Uploadbox control. - * @Default {Drop files or click to upload} - */ - dropAreaText?: string; - - /** Specifies the dropAreaHeight when the drag and drop support is enabled in the Uploadbox control. - * @Default {100%} - */ - dropAreaHeight?: number | string; - - /** Specifies the dropAreaWidth when the drag and drop support is enabled in the Uploadbox control. - * @Default {100%} - */ - dropAreaWidth?: number | string; - - /** Based on the property value, Uploadbox is enabled or disabled. - * @Default {true} - */ - enabled?: boolean; - - /** Sets the right-to-left direction property for the Uploadbox control. - * @Default {false} - */ - enableRTL?: boolean; - - /** Only the files with the specified extension is allowed to upload. This is mentioned in the string format. - */ - extensionsAllow?: string; - - /** Only the files with the specified extension is denied for upload. This is mentioned in the string format. - */ - extensionsDeny?: string; - - /** Sets the maximum size limit for uploading the file. This is mentioned in the number format. - * @Default {31457280} - */ - fileSize?: number; - - /** Sets the height of the browse button. - * @Default {35px} - */ - height?: string; - - /** Specifies the list of HTML attributes to be added to uploadbox control. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Configures the culture data and sets the culture to the Uploadbox. - * @Default {en-US} - */ - locale?: string; - - /** Enables multiple file selection for upload. - * @Default {true} - */ - multipleFilesSelection?: boolean; - - /** You can push the file to the Uploadbox in the client-side of the XHR supported browsers alone. - * @Default {null} - */ - pushFile?: any; - - /** Specifies the remove action to be performed after the file uploading is completed. Here, mention the server address for removal. - */ - removeUrl?: string; - - /** Specifies the save action to be performed after the file is pushed for uploading. Here, mention the server address to be saved. - */ - saveUrl?: string; - - /** Enables the browse button support to the Uploadbox control. - * @Default {true} - */ - showBrowseButton?: boolean; - - /** Specifies the file details to be displayed when selected for uploading. This can be done when the showFileDetails is set to true. - * @Default {true} - */ - showFileDetails?: boolean; - - /** Specifies the file details to be displayed when selected for uploading. This can be done when the showFileDetails is set to true. - * @Default {true} - */ - showRoundedCorner?: boolean; - - /** Sets the name for the Uploadbox control. This API helps to Map the action in code behind to retrieve the files. - */ - uploadName?: string; + /** Returns the drop details + */ + dropDetails?: any; + } - /** Sets the width of the browse button. - * @Default {100px} - */ - width?: string; + export interface BeginEditEventArgs { - /** Fires when the upload progress beforeSend. */ - beforeSend?(e: BeforeSendEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Fires when the upload progress begins. */ - begin?(e: BeginEventArgs): void; + /** Returns the current edited row. + */ + row?: any; - /** Fires when the upload progress is cancelled. */ - cancel?(e: CancelEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Fires when the file upload progress is completed. */ - complete?(e: CompleteEventArgs): void; + /** Returns the primary key. + */ + primaryKey?: any; - /** Fires when the file upload progress is succeeded. */ - success?(e: SuccessEventArgs): void; + /** Returns the primary key value. + */ + primaryKeyValue?: any; - /** Fires when the Uploadbox control is created. */ - create?(e: CreateEventArgs): void; + /** Returns the edited row index. + */ + rowIndex?: number; - /** Fires when the Uploadbox control is destroyed. */ - destroy?(e: DestroyEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Fires when the Upload process ends in Error. */ - error?(e: ErrorEventArgs): void; + export interface CellEditEventArgs { - /** Fires when the file is selected for upload successfully. */ - fileSelect?(e: FileSelectEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Fires when the file is uploading. */ - inProgress?(e: InProgressEventArgs): void; + /** Returns the name of the event. + */ + type?: string; - /** Fires when the uploaded file is removed successfully. */ - remove?(e: RemoveEventArgs): void; - } + /** Returns the validation rules. + */ + validationRules?: any; - export interface BeforeSendEventArgs { + /** Returns the column name. + */ + columnName?: string; - /** Selected FileList Object. - */ - files?: any; + /** Returns the cell value. + */ + value?: string; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the row data object. + */ + rowData?: any; - /** returns the Uploadbox model - */ - model?: any; + /** Returns the previous value of the cell. + */ + previousValue?: string; - /** XHR-AJAX Object for reference. - */ - xhr?: any; + /** Returns the column object. + */ + columnObject?: any; - /** returns the name of the event. - */ - type?: string; - } + /** Returns the cell object. + */ + cell?: any; - export interface BeginEventArgs { + /** Returns isForeignKey option value. + */ + isForeignKey?: boolean; + } - /** To pass additional information to the server. - */ - data?: any; + export interface CellSaveEventArgs { - /** Selected FileList Object. - */ - files?: any; + /** Returns the grid model. + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the name of the event. + */ + type?: string; - /** returns the Uploadbox model - */ - model?: any; + /** Returns the column name. + */ + columnName?: string; - /** returns the name of the event. - */ - type?: string; - } + /** Returns the cell value. + */ + value?: string; - export interface CancelEventArgs { + /** Returns the row data object. + */ + rowData?: any; - /** Canceled FileList Object. - */ - fileStatus?: any; + /** Returns the previous value of the cell. + */ + previousValue?: string; - /** returns the Uploadbox model - */ - model?: any; + /** Returns the column object. + */ + columnObject?: any; - /** returns the name of the event. - */ - type?: string; - } + /** Returns the cell object. + */ + cell?: any; - export interface CompleteEventArgs { + /** Returns isForeignKey option value. + */ + isForeignKey?: boolean; + } - /** AJAX event argument for reference. - */ - e?: any; + export interface CellSelectedEventArgs { - /** Uploaded file list. - */ - files?: any; + /** Returns the selected cell index value. + */ + cellIndex?: number; - /** response from the server. - */ - responseText?: string; + /** Returns the previous selected cell index value. + */ + previousRowCellIndex?: number; - /** XHR-AJAX Object for reference. - */ - xhr?: any; + /** Returns the selected cell element. + */ + currentCell?: any; - /** returns the Uploadbox model - */ - model?: any; + /** Returns the previous selected cell element. + */ + previousRowCell?: any; - /** returns the name of the event. - */ - type?: string; - } + /** Returns current record object (JSON). + */ + data?: any; - export interface SuccessEventArgs { + /** Returns current record object (JSON). + */ + selectedData?: any; - /** response from the server. - */ - responseText?: string; + /** Returns the selected row cell index values. + */ + selectedRowCellIndex?: any[]; - /** AJAX event argument for reference. - */ - e?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** successfully uploaded files list. - */ - success?: any; + /** Returns the grid model. + */ + model?: any; - /** Uploaded file list. - */ - files?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** XHR-AJAX Object for reference. - */ - xhr?: any; + export interface CellSelectingEventArgs { - /** returns the Uploadbox model - */ - model?: any; + /** Returns the selected cell index value. + */ + cellIndex?: number; - /** returns the name of the event. - */ - type?: string; - } + /** Returns the previous selected cell index value. + */ + previousRowCellIndex?: number; - export interface CreateEventArgs { + /** Returns the selected cell element. + */ + currentCell?: any; - /** returns the Uploadbox model - */ - model?: any; + /** Returns the previous selected cell element. + */ + previousRowCell?: any; - /** returns the name of the event. - */ - type?: string; - } + /** Returns current record object (JSON). + */ + data?: any; - export interface DestroyEventArgs { + /** Returns current record object (JSON). + */ + selectedData?: any; - /** returns the Uploadbox model - */ - model?: any; + /** Returns whether the ctrl key is pressed while selecting cell + */ + isCtrlKeyPressed?: boolean; - /** returns the name of the event. - */ - type?: string; - } + /** Returns whether the shift key is pressed while selecting cell + */ + isShiftKeyPressed?: boolean; - export interface ErrorEventArgs { + /** Returns the grid model. + */ + model?: any; - /** details about the error information. - */ - error?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** returns the name of the event. - */ - type?: string; + export interface CellDeselectedEventArgs { - /** error event action details. - */ - action?: string; + /** Returns the deselected cell index value. + */ + cellIndex?: number; - /** returns the file details of the file uploaded - */ - files?: any; - } + /** Returns the deselected cell element. + */ + currentCell?: any; - export interface FileSelectEventArgs { + /** Returns current record object (JSON). + */ + data?: any; - /** returns Selected FileList objects - */ - files?: any; + /** Returns current record object (JSON). + */ + selectedData?: any; - /** returns the Uploadbox model - */ - model?: any; + /** Returns the grid model. + */ + model?: any; - /** returns the name of the event. - */ - type?: string; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface InProgressEventArgs { + export interface CellDeselectingEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the deselecting cell index value. + */ + cellIndex?: number; - /** AJAX event argument for reference. - */ - e?: any; + /** Returns the deselecting cell element. + */ + currentCell?: any; - /** returns Selected FileList objects - */ - files?: any; + /** Returns current record object (JSON). + */ + data?: any; - /** returns the Uploadbox model - */ - model?: any; + /** Returns current record object (JSON). + */ + selectedData?: any; - /** returns the current progress percentage. - */ - percentage?: any; + /** Returns whether the ctrl key is pressed while deselecting cell + */ + isCtrlKeyPressed?: boolean; - /** returns the name of the event. - */ - type?: string; - } + /** Returns whether the shift key is pressed while deselecting cell + */ + isShiftKeyPressed?: boolean; - export interface RemoveEventArgs { + /** Returns the grid model. + */ + model?: any; - /** returns the Uploadbox model - */ - model?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** returns the name of the event. - */ - type?: string; + export interface ColumnDragEventArgs { - /** returns the file details of the file object - */ - fileStatus?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface ButtonText { + /** Returns draggable element type. + */ + draggableType?: any; - /** Sets the text for the browse button. - */ - browse?: string; + /** Returns the draggable column object. + */ + column?: any; - /** Sets the text for the cancel button. - */ - cancel?: string; + /** Returns the grid model. + */ + model?: any; - /** Sets the text for the close button. - */ - Close?: string; + /** Returns target elements based on mouse move position. + */ + target?: any; - /** Sets the text for the Upload button inside the dialog popup. - */ - upload?: string; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface CustomFileDetails { - - /** Enables the file upload interactions like remove/cancel in File details of the dialog popup. - */ - action?: boolean; - - /** Enables the name in the File details of the dialog popup. - */ - name?: boolean; - - /** Enables or disables the File size details of the dialog popup. - */ - size?: boolean; - - /** Enables or disables the file uploading status visibility in the dialog file details content. - */ - status?: boolean; - - /** Enables the title in File details for the dialog popup. - */ - title?: boolean; - } - - export interface DialogAction { - - /** Once uploaded successfully, the dialog popup closes immediately. - */ - closeOnComplete?: boolean; - - /** Sets the content container option to the Uploadbox dialog popup. - */ - content?: string; - - /** Enables the drag option to the dialog popup. - */ - drag?: boolean; - - /** Enables or disables the Uploadbox dialog’s modal property to the dialog popup. - */ - modal?: boolean; - } - - export interface DialogText { - - /** Sets the uploaded file’s Name (header text) to the Dialog popup. - */ - name?: string; - - /** Sets the upload file Size (header text) to the dialog popup. - */ - size?: string; - - /** Sets the upload file Status (header text) to the dialog popup. - */ - status?: string; - - /** Sets the title text of the dialog popup. - */ - title?: string; - } - } - - class WaitingPopup extends ej.Widget { - static fn: WaitingPopup; - constructor(element: JQuery | Element, options?: WaitingPopup.Model); - static Locale: any; - model: WaitingPopup.Model; - defaults: WaitingPopup.Model; - - /** To hide the waiting popup - * @returns {void} - */ - hide(): void; - - /** Refreshes the WaitingPopup control by resetting the pop-up panel position and content position - * @returns {void} - */ - refresh(): void; - - /** To show the waiting popup - * @returns {void} - */ - show(): void; - } - export namespace WaitingPopup { - - export interface Model { - - /** Sets the root class for the WaitingPopup control theme - * @Default {null} - */ - cssClass?: string; - - /** Specifies the list of HTML attributes to be added to waitingpopup control. - * @Default {{}} - */ - htmlAttributes?: any; - - /** Enables or disables the default loading icon. - * @Default {true} - */ - showImage?: boolean; - - /** Enables the visibility of the WaitingPopup control - * @Default {false} - */ - showOnInit?: boolean; - - /** Specified a selector for elements, within the container. - * @Default {null} - */ - target?: string; - - /** Waitingpopup element append to given container element. - * @Default {null} - */ - appendTo?: string; - - /** Loads HTML content inside the popup panel instead of the default icon - * @Default {null} - */ - template?: any; - - /** Sets the custom text in the pop-up panel to notify the waiting process - * @Default {null} - */ - text?: string; - - /** Fires after Create WaitingPopup successfully */ - create?(e: CreateEventArgs): void; - - /** Fires after Destroy WaitingPopup successfully */ - destroy?(e: DestroyEventArgs): void; - } - - export interface CreateEventArgs { - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the WaitingPopup model - */ - model?: ej.WaitingPopup.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface DestroyEventArgs { - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the WaitingPopup model - */ - model?: ej.WaitingPopup.Model; - - /** returns the name of the event - */ - type?: string; - } - } - - class Grid extends ej.Widget { - static fn: Grid; - constructor(element: JQuery | Element, options?: Grid.Model); - static Locale: any; - model: Grid.Model; - defaults: Grid.Model; - - /** Adds a grid model property which is to be ignored upon exporting. - * @param {Array} Pass the array of parameters which need to be ignored on exporting - * @returns {void} - */ - addIgnoreOnExport(propertyNames: any[]): void; - - /** Add a new record in grid control when allowAdding is set as true. - * @returns {void} - */ - //addRecord(): void; - - /** Add a new record in grid control when allowAdding is set as true. - * @param {Array} Pass the array of added Records - * @param {Array} optionalIf we pass serverChange as true, send post to server side for server action. - * @returns {void} - */ - addRecord(data: any[], serverChange?: any[]): void; - - /** Cancel the modified changes in grid control when edit mode is "batch". - * @returns {void} - */ - batchCancel(): void; - - /** Save the modified changes to data source in grid control when edit mode is "batch". - * @returns {void} - */ - batchSave(): void; - - /** Send a cancel request in grid. - * @returns {void} - */ - cancelEdit(): void; - - /** Send a cancel request to the edited cell in grid. - * @returns {void} - */ - cancelEditCell(): void; - - /** It is used to clear all the cell selection. - * @returns {Boolean} - */ - clearCellSelection(): boolean; - - /** It is used to clear specified cell selection based on the rowIndex and columnIndex provided. - * @param {number} It is used to pass the row index of the cell - * @param {number} It is used to pass the column index of the cell. - * @returns {Boolean} - */ - clearCellSelection(rowIndex: number, columnIndex: number): boolean; - - /** It is used to clear all the row selection or at specific row selection based on the index provided. - * @param {number} optional If index of the column is specified then it will remove the selection from the particular column else it will clears all of the column selection - * @returns {Boolean} - */ - clearColumnSelection(index?: number): boolean; - - /** It is used to clear all the filtering done. - * @param {string} If field of the column is specified then it will clear the particular filtering column - * @returns {void} - */ - clearFiltering(field: string): void; - - /** Clear the searching from the grid - * @returns {void} - */ - clearSearching(): void; - - /** Clear all the row selection or at specific row selection based on the index provided - * @param {number} optional If index of the row is specified then it will remove the selection from the particular row else it will clears all of the row selection - * @returns {Boolean} - */ - clearSelection(index?: number): boolean; - - /** Clear the sorting from columns in the grid - * @returns {void} - */ - clearSorting(): void; - - /** Collapse all the group caption rows in grid - * @returns {void} - */ - collapseAll(): void; - - /** Collapse the group drop area in grid - * @returns {void} - */ - collapseGroupDropArea(): void; - - /** Add or remove columns in grid column collections - * @param {Array|string} Pass array of columns or string of field name to add/remove the column in grid - * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform - * @returns {void} - */ - columns(columnDetails: any[] | string, action?: string): void; - - /** Refresh the grid with new data source - * @param {Array} Pass new data source to the grid - * @param {boolean} optional When templateRefresh is set true, both header and contents get refreshed - * @returns {void} - */ - dataSource(datasource: any[], templateRefresh?: boolean): void; - - /** Delete a record in grid control when allowDeleting is set as true - * @param {string} Pass the primary key field Name of the column - * @param {Array} Pass the JSON data of record need to be delete. - * @returns {void} - */ - deleteRecord(fieldName: string, data: any[]): void; - - /** Delete the row based on the given tr element in grid. - * @param {JQuery} Pass the tr element in grid content to get its row index - * @returns {HTMLElement} - */ - deleteRow($tr: JQuery): HTMLElement; - - /** Destroy the grid widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** Edit a particular cell based on the row index and field name provided in "batch" edit mode. - * @param {number} Pass row index to edit particular cell - * @param {string} Pass the field name of the column to perform batch edit - * @returns {void} - */ - editCell(index: number, fieldName: string): void; - - /** It returns a value and if the input field values of edit form is not based on the validation rules then it will show the validation message. - * @returns {Boolean} - */ - editFormValidate(): boolean; - - /** Send a save request in grid. - * @returns {void} - */ - endEdit(): void; - - /** Expand all the group caption rows in grid. - * @returns {void} - */ - expandAll(): void; - - /** Expand or collapse the row based on the row state in grid - * @param {JQuery} Pass the target object to expand/collapse the row based on its row state - * @returns {void} - */ - expandCollapse($target: JQuery): void; - - /** Expand the group drop area in grid. - * @returns {void} - */ - expandGroupDropArea(): void; - - /** Export the grid content to excel, word or PDF document. - * @param {string} Pass the controller action name corresponding to exporting - * @param {string} optionalASP server event name corresponding to exporting - * @param {boolean} optionalPass the multiple exporting value as true/false - * @param {Array} optionalPass the array of the gridIds to be filtered - * @returns {void} - */ - export(action: string, serverEvent?: string, multipleExport?: boolean, gridIds?: any[]): void; - - /** Send a filtering request to filter one column in grid. - * @param {Array} Pass the field name of the column - * @param {string} string/integer/dateTime operator - * @param {string} Pass the value to be filtered in a column - * @param {string} Pass the predicate as and/or - * @param {boolean} optional Pass the match case value as true/false - * @param {any} optionalactualFilterValue denote the filter object of current filtered columns.Pass the value to filtered in a column - * @returns {void} - */ - filterColumn(fieldName: any[], filterOperator: string, filterValue: string, predicate: string, matchcase?: boolean, actualFilterValue?: any): void; - - /** Send a filtering request to filter single or multiple column in grid. - * @param {Array} Pass array of filterColumn query for performing filter operation - * @returns {void} - */ - filterColumn(filterQueries: any[]): void; - - /** Get the batch changes of edit, delete and add operations of grid. - * @returns {any} - */ - getBatchChanges(): any; - - /** Get the browser details - * @returns {any} - */ - getBrowserDetails(): any; - - /** Get the column details based on the given field in grid - * @param {string} Pass the field name of the column to get the corresponding column object - * @returns {any} - */ - getColumnByField(fieldName: string): any; - - /** Get the column details based on the given header text in grid. - * @param {string} Pass the header text of the column to get the corresponding column object - * @returns {any} - */ - getColumnByHeaderText(headerText: string): any; - - /** Get the column details based on the given column index in grid - * @param {number} Pass the index of the column to get the corresponding column object - * @returns {any} - */ - getColumnByIndex(columnIndex: number): any; - - /** Get the list of field names from column collection in grid. - * @returns {Array} - */ - getColumnFieldNames(): any[]; - - /** Get the column index of the given field in grid. - * @param {string} Pass the field name of the column to get the corresponding column index - * @returns {number} - */ - getColumnIndexByField(fieldName: string): number; - - /** Get the column index of the given headerText of column in grid. - * @param {string} Pass the headerText of the column to get that column index - * @param {string} optionalOptional Pass the field name of the column. - * @returns {number} - */ - getColumnIndexByHeaderText(headerText: string, field?: string): number; - - /** Get the content div element of grid. - * @returns {HTMLElement} - */ - getContent(): HTMLElement; - - /** Get the content table element of grid - * @returns {Array} - */ - getContentTable(): HTMLTableElement[]; - - /** Get the data of currently edited cell value in "batch" edit mode - * @returns {any} - */ - getCurrentEditCellData(): any; - - /** Get the current page index in grid pager. - * @returns {number} - */ - getCurrentIndex(): number; - - /** Get the current page data source of grid. - * @returns {Array} - */ - getCurrentViewData(): any[]; - - /** Get the data of given row index in grid. - * @returns {any} - */ - getDataByIndex(): any; - - /** Get the column field name from the given header text in grid. - * @param {string} Pass header text of the column to get its corresponding field name - * @returns {String} - */ - getFieldNameByHeaderText(headerText: string): string; - - /** Get the filter bar of grid - * @returns {HTMLElement} - */ - getFilterBar(): HTMLElement; - - /** Get the records filtered or searched in Grid - * @returns {Array} - */ - getFilteredRecords(): any[]; - - /** Get the footer content of grid. - * @returns {HTMLElement} - */ - getFooterContent(): HTMLElement; - - /** Get the footer table element of grid. - * @returns {HTMLElement} - */ - getFooterTable(): HTMLElement; - - /** Get the header content div element of grid. - * @returns {HTMLElement} - */ - getHeaderContent(): HTMLElement; - - /** Get the header table element of grid - * @returns {HTMLElement} - */ - getHeaderTable(): HTMLElement; - - /** Get the column header text from the given field name in grid. - * @param {string} Pass field name of the column to get its corresponding header text - * @returns {String} - */ - getHeaderTextByFieldName(field: string): string; - - /** Get the names of all the hidden column collections in grid. - * @returns {Array} - */ - getHiddenColumnNames(): any[]; - - /** Get the row index based on the given tr element in grid. - * @param {JQuery} Pass the tr element in grid content to get its row index - * @returns {number} - */ - getIndexByRow($tr: JQuery): number; - - /** Get the pager of grid. - * @returns {HTMLElement} - */ - getPager(): HTMLElement; - - /** Get the names of primary key columns in Grid - * @returns {Array} - */ - getPrimaryKeyFieldNames(): any[]; - - /** Get the rows(tr element) from the given from and to row index in grid - * @param {number} Pass the from index from which the rows to be returned - * @param {number} Pass the to index to which the rows to be returned - * @returns {HTMLElement} - */ - getRowByIndex(from: number, to: number): HTMLElement; - - /** Get the row height of grid. - * @returns {number} - */ - getRowHeight(): number; - - /** Get the rows(tr element)of grid which is displayed in the current page. - * @returns {HTMLElement} - */ - getRows(): HTMLElement; - - /** Get the scroller object of grid. - * @returns {ej.Scroller} - */ - getScrollObject(): ej.Scroller; - - /** Get the selected records details in grid. - * @returns {Array} - */ - getSelectedRecords(): any[]; - - /** Get the selected row element details in grid. - * @returns {Array} - */ - getSelectedRows(): any[]; - - /** It accepts the string value and returns the field and sorted direction of the column in grid. - * @param {string} Pass the field of the column to get the sorted direction of the corresponding column in Grid. - * @returns {number} - */ - getsortColumnByField(field: string): number; - - /** Get the calculated summary values of JSON data passed to it - * @param {any} Pass Summary Column details - * @param {any} Pass JSON Array for which its field values to be calculated - * @returns {Number} - */ - getSummaryValues(summaryCol: any, summaryData: any): number; - - /** Get the names of all the visible column collections in grid - * @returns {Array} - */ - getVisibleColumnNames(): any[]; - - /** Send a paging request to specified page in grid - * @param {number} Pass the page index to perform paging at specified page index - * @returns {void} - */ - gotoPage(pageIndex: number): void; - - /** Send a column grouping request in grid. - * @param {string} Pass the field Name of the column to be grouped in grid control - * @returns {void} - */ - groupColumn(fieldName: string): void; - - /** Hide columns from the grid based on the header text - * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to hide - * @returns {void} - */ - hideColumns(headerText: any[] | string): void; - - /** Print the grid control - * @returns {void} - */ - print(): void; - - /** It is used to refresh and reset the changes made in "batch" edit mode - * @returns {void} - */ - refreshBatchEditChanges(): void; - - /** It is used to refresh the grid header. - * @returns {void} - */ - refreshHeader(): void; - - /** Refresh the grid contents. The template refreshment is based on the argument passed along with this method - * @param {boolean} optional When templateRefresh is set true, template and grid contents both are refreshed in grid else only grid content is refreshed - * @returns {void} - */ - refreshContent(templateRefresh?: boolean): void; - - /** Refresh the template of the grid - * @returns {void} - */ - refreshTemplate(): void; - - /** Refresh the toolbar items in grid. - * @returns {void} - */ - refreshToolbar(): void; - - /** Remove a column or collection of columns from a sorted column collections in grid. - * @param {Array|string} Pass array of field names of the columns to remove a collection of sorted columns or pass a string of field name to remove a column from sorted column collections - * @returns {void} - */ - removeSortedColumns(fieldName: any[] | string): void; - - /** Creates a grid control - * @returns {void} - */ - render(): void; - - /** Re-order the column in grid - * @param {string} Pass the from field name of the column needs to be changed - * @param {string} Pass the to field name of the column needs to be changed - * @returns {void} - */ - reorderColumns(fromFieldName: string, toFieldName: string): void; - - /** Re-order the row in grid - * @param {Array} Pass the indexes of the rows needs to reorder. - * @param {number} Pass the index of a row where to be reordered. - * @returns {void} - */ - reorderRows(indexes: any[], toindex: number): void; - - /** Reset the model collections like pageSettings, groupSettings, filterSettings, sortSettings and summaryRows. - * @returns {void} - */ - resetModelCollections(): void; - - /** Resize the columns by giving column name and width for the corresponding one. - * @param {string} Pass the column name that needs to be changed - * @param {string} Pass the width to resize the particular columns - * @returns {void} - */ - resizeColumns(column: string, width: string): void; - - /** Resolves row height issue when unbound column is used with FrozenColumn - * @returns {void} - */ - rowHeightRefresh(): void; - - /** Save the particular edited cell in grid. - * @returns {void} - */ - //saveCell(): void; - - /** We can prevent the client side cellSave event triggering by passing the preventSaveEvent argument as true. - * @param {boolean} optionalIf we pass preventSaveEvent as true, it prevents the client side cellSave event triggering - * @returns {void} - */ - saveCell(preventSaveEvent: boolean): void; - - /** Set dimension for grid with corresponding to grid parent. - * @param {number} Pass the height of the grid container - * @param {number} Pass the width of the grid container - * @returns {void} - */ - setDimension(height: number, width: number): void; - - /** Send a request to grid to refresh the width set to columns - * @returns {void} - */ - setWidthToColumns(): void; - - /** Send a search request to grid with specified string passed in it - * @param {string} Pass the string to search in Grid records - * @returns {void} - */ - search(searchString: string): void; - - /** Select cells in grid. - * @param {any} It is used to set the starting index of row and indexes of cells for that corresponding row for selecting cells. - * @returns {void} - */ - selectCells(rowCellIndexes: any): void; - - /** Select columns in grid. - * @param {number} It is used to set the starting index of column for selecting columns. - * @returns {void} - */ - selectColumns(fromIndex: number): void; - - /** Select the specified columns in grid based on Index provided. - * @param {number} It is used to set the starting index of column for selecting columns. - * @param {number} optionalIt is used to set the ending index of column for selecting columns. - * @returns {Boolean} - */ - selectColumns(columnIndex: number, toIndex?: number): boolean; - - /** Select rows in grid. - * @param {number} It is used to set the starting index of row for selecting rows. - * @param {number} It is used to set the ending index of row for selecting rows. - * @returns {void} - */ - selectRows(fromIndex: number, toIndex: number): void; - - /** Select specified rows in grid based on Index provided. - * @param {Array|number} It is used to set the starting index of row for selecting rows. - * @param {number} optionalIt is used to set the ending index of row for selecting rows. - * @param {any} optionalTarget element which is clicked. - * @returns {void} - */ - selectRows(from: any[] | number, to: number, target?: any): void; - - /** Select rows in grid. - * @param {Array} Pass array of rowIndexes for selecting rows - * @returns {void} - */ - selectRows(rowIndexes: any[]): void; - - /** Used to update a particular cell value. - * @returns {void} - */ - setCellText(): void; - - /** Used to update a particular cell value based on specified row Index and the fieldName. - * @param {number} It is used to set the index for selecting the row. - * @param {string} It is used to set the field name for selecting column. - * @param {any} It is used to set the value for the selected cell. - * @returns {void} - */ - setCellValue(Index: number, fieldName: string, value: any): void; - - /** It sets the default data to the column in grid during adding record in batch edit mode. - * @returns {void} - */ - setDefaultData(): void; - - /** The grid rows has to be rendered as detail view in mobile mode based on given value. - * @param {number} It is used to render grid rows as details view in mobile mode. - * @returns {void} - */ - setPhoneModeMaxWidth(Index: number): void; - - /** Set validation to edit form in the grid. - * @returns {void} - */ - setValidation(): void; - - /** Set validation to a particular input field in a edit form dynamically. - * @param {string} Specify the field name of the column to set validation rules - * @param {any} Specify the validation rules for the field - * @returns {void} - */ - setValidationToField(fieldName: string, rules: any): void; - - /** Show columns in the grid based on the header text - * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to show - * @returns {void} - */ - showColumns(headerText: any[] | string): void; - - /** Send a sorting request in grid. - * @param {string} Pass the field name of the column as columnName for which sorting have to be performed - * @param {string} optional Pass the sort direction ascending/descending by which the column have to be sort. By default it is sorting in an ascending order - * @returns {void} - */ - sortColumn(columnName: string, sortingDirection?: string): void; - - /** Send an edit record request in grid - * @param {JQuery} Pass the tr- selected row element to be edited in grid - * @returns {void} - */ - startEdit($tr: JQuery): void; - - /** Un-group a column from grouped columns collection in grid - * @param {string} Pass the field Name of the column to be ungrouped from grouped column collection - * @returns {void} - */ - ungroupColumn(fieldName: string): void; - - /** Update a edited record in grid control when allowEditing is set as true. - * @param {string} Pass the primary key field Name of the column - * @param {Array} Pass the edited JSON data of record need to be update. - * @returns {void} - */ - updateRecord(fieldName: string, data: any[]): void; - - /** It adapts grid to its parent element or to the browsers window. - * @returns {void} - */ - windowonresize(): void; - } - export namespace Grid { - - export interface Model { - - /** Gets or sets a value that indicates whether to customizing cell based on our needs. - * @Default {false} - */ - allowCellMerging?: boolean; - - /** Gets or sets a value that indicates whether to enable dynamic grouping behavior. Grouping can be done by drag on drop desired columns to grid’s GroupDropArea. - * This can be further customized through “groupSettings” property. - * @Default {false} - */ - allowGrouping?: boolean; - - /** Gets or sets a value that indicates whether to enable keyboard support for performing grid actions. selectionType – Gets or sets a value that indicates whether to enable single - * row or multiple rows selection behavior in grid. Multiple selection can be done through by holding CTRL and clicking the grid rows - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** Gets or sets a value that indicates whether to enable dynamic filtering behavior on grid. Filtering can be used to limit the records displayed using required criteria and - * this can be further customized through “filterSettings” property - * @Default {false} - */ - allowFiltering?: boolean; - - /** Gets or sets a value that indicates whether to enable the dynamic sorting behavior on grid data. Sorting can be done through clicking on particular column header. - * @Default {false} - */ - allowSorting?: boolean; - - /** Gets or sets a value that indicates whether to enable multi columns sorting behavior in grid. Sort multiple columns by holding CTRL and click on the corresponding column header. - * @Default {false} - */ - allowMultiSorting?: boolean; - - /** This specifies the grid to show the paginated data. Also enables pager control at the bottom of grid for dynamic navigation through data source. - * Paging can be further customized through “pageSettings” property. - * @Default {false} - */ - allowPaging?: boolean; - - /** Gets or sets a value that indicates whether to enable the columns reordering behavior in the grid. Reordering can be done through by drag and drop the particular column - * from one index to another index within the grid. - * @Default {false} - */ - allowReordering?: boolean; - - /** Gets or sets a value that indicates whether the column is non resizable. Column width is set automatically based on the content or header text which is large. - * @Default {false} - */ - allowResizeToFit?: boolean; - - /** Gets or sets a value that indicates whether to enable dynamic resizable of columns. Resize the width of the columns by simply click and move the particular column header line - * @Default {false} - */ - allowResizing?: boolean; - - /** Gets or sets a value that indicates whether to enable the rows reordering in Grid and drag & drop rows between multiple Grid. - * @Default {false} - */ - allowRowDragAndDrop?: boolean; - - /** Gets or sets a value that indicates whether to enable the scrollbar in the grid and view the records by scroll through the grid manually - * @Default {false} - */ - allowScrolling?: boolean; - - /** Gets or sets a value that indicates whether to enable dynamic searching behavior in grid. Currently search box can be enabled through “toolbarSettings” - * @Default {false} - */ - allowSearching?: boolean; - - /** Gets or sets a value that indicates whether user can select rows on grid. On enabling feature, selected row will be highlighted. - * @Default {true} - */ - allowSelection?: boolean; - - /** Gets or sets a value that indicates whether the Content will wrap to the next line if the content exceeds the boundary of the Column Cells. - * @Default {false} - */ - allowTextWrap?: boolean; - - /** Gets or sets a value that indicates whether to enable the multiple exporting behavior on grid data. - * @Default {false} - */ - allowMultipleExporting?: boolean; - - /** Gets or sets a value that indicates to define common width for all the columns in the grid. - */ - commonWidth?: number; - - /** Gets or sets a value that indicates to enable the visibility of the grid lines. - * @Default {ej.Grid.GridLines.Both} - */ - gridLines?: ej.Grid.GridLines | string; - - /** This specifies the grid to add the grid control inside the grid row of the parent with expand/collapse options - * @Default {null} - */ - childGrid?: any; - - /** Used to enable or disable static width settings for column. If the columnLayout is set as fixed, then column width will be static. - * @Default {ej.Grid.ColumnLayout.Auto} - */ - columnLayout?: ej.Grid.ColumnLayout | string; - - /** Gets or sets an object that indicates to render the grid with specified columns - * @Default {[]} - */ - columns?: Column[]; - - /** Gets or sets an object that indicates whether to customize the context menu behavior of the grid. - */ - contextMenuSettings?: ContextMenuSettings; - - /** Gets or sets a value that indicates to render the grid with custom theme. - */ - cssClass?: string; - - /** Gets or sets the data to render the grid with records - * @Default {null} - */ - dataSource?: any; - - /** Default Value: - * @Default {null} - */ - detailsTemplate?: string; - - /** Gets or sets an object that indicates whether to customize the editing behavior of the grid. - */ - editSettings?: EditSettings; - - /** Gets or sets a value that indicates whether to enable the alternative rows differentiation in the grid records based on corresponding theme. - * @Default {true} - */ - enableAltRow?: boolean; - - /** Gets or sets a value that indicates whether to enable the save action in the grid through row selection - * @Default {true} - */ - enableAutoSaveOnSelectionChange?: boolean; - - /** Gets or sets a value that indicates whether to enable mouse over effect on the corresponding column header cell of the grid - * @Default {false} - */ - enableHeaderHover?: boolean; - - /** Gets or sets a value that indicates whether to persist the grid model state in page using applicable medium i.e., HTML5 localStorage or cookies - * @Default {false} - */ - enablePersistence?: boolean; - - /** Gets or sets a value that indicates whether the grid rows has to be rendered as detail view in mobile mode - * @Default {false} - */ - enableResponsiveRow?: boolean; - - /** Gets or sets a value that indicates whether to enable mouse over effect on corresponding grid row. - * @Default {true} - */ - enableRowHover?: boolean; - - /** Align content in the grid control from right to left by setting the property as true. - * @Default {false} - */ - enableRTL?: boolean; - - /** To Disable the mouse swipe property as false. - * @Default {true} - */ - enableTouch?: boolean; - - /** It sets a value that indicates whether to enable toolbar items, when allowEditing, allowAdding and allowDeleting property set as false in the grid. - * @Default {false} - */ - enableToolbarItems?: boolean; - - /** Act as mapper for the excel exporting URL. - * @Default {ExportToExcel} - */ - exportToExcelAction?: string; - - /** Act as mapper for the PDF exporting URL. - * @Default {ExportToPdf} - */ - exportToPdfAction?: string; - - /** Act as mapper for the Word exporting URL. - * @Default {ExportToWord} - */ - exportToWordAction?: string; - - /** Gets or sets an object that indicates whether to customize the filtering behavior of the grid - */ - filterSettings?: FilterSettings; - - /** Gets or sets an object that indicates whether to customize the grouping behavior of the grid. - */ - groupSettings?: GroupSettings; - - /** Gets or sets a value that indicates whether the grid design has be to made responsive. - * @Default {false} - */ - isResponsive?: boolean; - - /** This specifies to change the key in keyboard interaction to grid control - * @Default {null} - */ - keySettings?: any; - - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and - * culture specific to a particular country or region. - * @Default {en-US} - */ - locale?: string; - - /** Gets or sets a value that indicates whether to set the minimum width of the responsive grid while isResponsive property is true and enableResponsiveRow property is set as false. - * @Default {0} - */ - minWidth?: number; - - /** Gets or sets an object that indicates whether to modify the pager default configuration. - */ - pageSettings?: PageSettings; - - /** Query the dataSource from the table for Grid. - * @Default {null} - */ - query?: any; - - /** Gets or sets an object that indicates whether to modify the resizing behavior. - */ - resizeSettings?: ResizeSettings; - - /** Gets or sets a value that indicates to render the grid with template rows. The template row must be a table row. That table row must have the JavaScript render binding format ({{:columnName}}) - * then the grid data source binds the data to the corresponding table row of the template. - * @Default {null} - */ - rowTemplate?: string; - - /** Gets or sets an object that indicates whether to customize the drag and drop behavior of the grid rows - */ - rowDropSettings?: RowDropSettings; - - /** Gets or sets an object that indicates whether to customize the searching behavior of the grid - */ - searchSettings?: SearchSettings; - - /** Gets a value that indicates whether the grid model to hold multiple selected records . selectedRecords can be used to displayed hold the single - * or multiple selected records using “selectedRecords” property - * @Default {null} - */ - selectedRecords?: any[]; - - /** Gets or sets a value that indicates to select the row while initializing the grid - * @Default {-1} - */ - selectedRowIndex?: number; - - /** Gets or sets a value that indicates the selected rows in grid - * @Default {[]} - */ - selectedRowIndices?: any[]; - - /** This property is used to configure the selection behavior of the grid. - */ - selectionSettings?: SelectionSettings; - - /** The row selection behavior of grid. Accepting types are "single" and "multiple". - * @Default {ej.Grid.SelectionType.Single} - */ - selectionType?: ej.Grid.SelectionType | string; - - /** Gets or sets an object that indicates whether to customize the scrolling behavior of the grid. - */ - scrollSettings?: ScrollSettings; + export interface ColumnDragStartEventArgs { - /** Default Value: - * @Default {false} - */ - showColumnChooser?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Gets or sets a value that indicates stacked header should be shown on grid layout when the property “stackedHeaderRows” is set. - * @Default {false} - */ - showStackedHeader?: boolean; + /** Returns draggable element type. + */ + draggableType?: any; - /** Gets or sets a value that indicates summary rows should be shown on grid layout when the property “summaryRows” is set - * @Default {false} - */ - showSummary?: boolean; + /** Returns the draggable column object. + */ + column?: any; - /** Gets or sets a value that indicates whether to customize the sorting behavior of the grid. - */ - sortSettings?: SortSettings; + /** Returns the grid model. + */ + model?: any; - /** Gets or sets an object that indicates to managing the collection of stacked header rows for the grid. - * @Default {[]} - */ - stackedHeaderRows?: StackedHeaderRow[]; + /** Returns drag start element. + */ + target?: any; - /** Gets or sets an object that indicates to managing the collection of summary rows for the grid. - * @Default {[]} - */ - summaryRows?: SummaryRow[]; + /** Returns the name of the event. + */ + type?: string; + } - /** Gets or sets an object that indicates whether to auto wrap the grid header or content or both - */ - textWrapSettings?: TextWrapSettings; + export interface ColumnDropEventArgs { - /** Gets or sets an object that indicates whether to enable the toolbar in the grid and add toolbar items - */ - toolbarSettings?: ToolbarSettings; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggered for every grid action before its starts. */ - actionBegin?(e: ActionBeginEventArgs): void; + /** Returns draggable element type. + */ + draggableType?: string; - /** Triggered for every grid action success event. */ - actionComplete?(e: ActionCompleteEventArgs): void; + /** Returns the draggable column object. + */ + column?: any; - /** Triggered for every grid action server failure event. */ - actionFailure?(e: ActionFailureEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Triggered when record batch add. */ - batchAdd?(e: BatchAddEventArgs): void; + /** Returns dropped dragged element. + */ + target?: any; - /** Triggered when record batch delete. */ - batchDelete?(e: BatchDeleteEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggered before the batch add. */ - beforeBatchAdd?(e: BeforeBatchAddEventArgs): void; + export interface ColumnSelectedEventArgs { - /** Triggered before the batch delete. */ - beforeBatchDelete?(e: BeforeBatchDeleteEventArgs): void; + /** Returns the selected cell index value. + */ + columnIndex?: number; - /** Triggered before the batch save. */ - beforeBatchSave?(e: BeforeBatchSaveEventArgs): void; + /** Returns the previous selected column index value. + */ + previousColumnIndex?: number; - /** Triggered before the print. */ - beforePrint?(e: BeforePrintEventArgs): void; + /** Returns the selected header cell element. + */ + headerCell?: any; - /** Triggered before row drop in the grid */ - beforeRowDrop?(e: BeforeRowDropEventArgs): void; + /** Returns the previous selected header cell element. + */ + prevColumnHeaderCell?: any; - /** Triggered before the record is going to be edited. */ - beginEdit?(e: BeginEditEventArgs): void; + /** Returns corresponding column object (JSON). + */ + column?: any; - /** Triggered when record cell edit. */ - cellEdit?(e: CellEditEventArgs): void; + /** Returns the selected columns values. + */ + selectedColumnsIndex?: any[]; - /** Triggered when record cell save. */ - cellSave?(e: CellSaveEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggered after the cell is selected. */ - cellSelected?(e: CellSelectedEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Triggered before the cell is going to be selected. */ - cellSelecting?(e: CellSelectingEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggered after the cell is deselected. */ - cellDeselected?(e: CellDeselectedEventArgs): void; + export interface ColumnSelectingEventArgs { - /** Triggered before the cell is going to be deselected. */ - cellDeselecting?(e: CellDeselectingEventArgs): void; + /** Returns the selected column index value. + */ + columnIndex?: number; - /** Triggered when the column is being dragged. */ - columnDrag?(e: ColumnDragEventArgs): void; + /** Returns the previous selected column index value. + */ + previousColumnIndex?: number; - /** Triggered when column dragging begins. */ - columnDragStart?(e: ColumnDragStartEventArgs): void; + /** Returns the selected header cell element. + */ + headerCell?: any; - /** Triggered when the column is dropped. */ - columnDrop?(e: ColumnDropEventArgs): void; + /** Returns the previous selected header cell element. + */ + prevColumnHeaderCell?: any; - /** Triggered when the row is being dragged. */ - rowDrag?(e: RowDragEventArgs): void; + /** Returns corresponding column object (JSON). + */ + column?: any; - /** Triggered when row dragging begins. */ - rowDragStart?(e: RowDragStartEventArgs): void; + /** Returns whether the ctrl key is pressed while selecting cell + */ + isCtrlKeyPressed?: boolean; - /** Triggered when the row is dropped. */ - rowDrop?(e: RowDropEventArgs): void; + /** Returns whether the shift key is pressed while selecting cell + */ + isShiftKeyPressed?: boolean; - /** Triggered after the column is selected. */ - columnSelected?(e: ColumnSelectedEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Triggered before the column is going to be selected. */ - columnSelecting?(e: ColumnSelectingEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggered after the column is deselected. */ - columnDeselected?(e: ColumnDeselectedEventArgs): void; + export interface ColumnDeselectedEventArgs { - /** Triggered before the column is going to be deselected. */ - columnDeselecting?(e: ColumnDeselectingEventArgs): void; + /** Returns the Deselected column index value. + */ + columnIndex?: number; - /** Triggered when context menu item is clicked */ - contextClick?(e: ContextClickEventArgs): void; + /** Returns the Deselected column header element. + */ + headerCell?: any; - /** Triggered before the context menu is opened. */ - contextOpen?(e: ContextOpenEventArgs): void; + /** Returns corresponding column object (JSON). + */ + column?: any; - /** Triggered when the grid is rendered completely. */ - create?(e: CreateEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Triggered when the grid is bound with data during initial rendering. */ - dataBound?(e: DataBoundEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggered when grid going to destroy. */ - destroy?(e: DestroyEventArgs): void; + export interface ColumnDeselectingEventArgs { - /** Triggered when detail template row is clicked to collapse. */ - detailsCollapse?(e: DetailsCollapseEventArgs): void; + /** Returns the deselecting column index value. + */ + columnIndex?: number; - /** Triggered detail template row is initialized. */ - detailsDataBound?(e: DetailsDataBoundEventArgs): void; + /** Returns the deselecting column header element. + */ + headerCell?: any; - /** Triggered when detail template row is clicked to expand. */ - detailsExpand?(e: DetailsExpandEventArgs): void; + /** Returns corresponding column object (JSON). + */ + column?: any; - /** Triggered after the record is added. */ - endAdd?(e: EndAddEventArgs): void; + /** Returns whether the ctrl key is pressed while deselecting column + */ + isCtrlKeyPressed?: boolean; - /** Triggered after the record is deleted. */ - endDelete?(e: EndDeleteEventArgs): void; + /** Returns whether the shift key is pressed while deselecting column + */ + isShiftKeyPressed?: boolean; - /** Triggered after the record is edited. */ - endEdit?(e: EndEditEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Triggered initial load. */ - load?(e: LoadEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggered every time a request is made to access particular cell information, element and data. */ - mergeCellInfo?(e: MergeCellInfoEventArgs): void; + export interface ContextClickEventArgs { - /** Triggered every time a request is made to access particular cell information, element and data. */ - queryCellInfo?(e: QueryCellInfoEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggered when record is clicked. */ - recordClick?(e: RecordClickEventArgs): void; + /** Returns the current item. + */ + currentTarget?: any; - /** Triggered when record is double clicked. */ - recordDoubleClick?(e: RecordDoubleClickEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Triggered after column resized. */ - resized?(e: ResizedEventArgs): void; + /** Returns the status of contextmenu item which denotes its enabled state + */ + status?: boolean; - /** Triggered when column resize end. */ - resizeEnd?(e: ResizeEndEventArgs): void; + /** Returns the target item. + */ + target?: any; - /** Triggered when column resize start. */ - resizeStart?(e: ResizeStartEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggered when right clicked on grid element. */ - rightClick?(e: RightClickEventArgs): void; + export interface ContextOpenEventArgs { - /** Triggered every time a request is made to access row information, element and data. */ - rowDataBound?(e: RowDataBoundEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggered after the row is selected. */ - rowSelected?(e: RowSelectedEventArgs): void; + /** Returns the current item. + */ + currentTarget?: any; - /** Triggered before the row is going to be selected. */ - rowSelecting?(e: RowSelectingEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Triggered after the row is deselected. */ - rowDeselected?(e: RowDeselectedEventArgs): void; + /** Returns the status of contextmenu item which denotes its enabled state + */ + status?: boolean; - /** Triggered before the row is going to be deselected. */ - rowDeselecting?(e: RowDeselectingEventArgs): void; + /** Returns the target item. + */ + target?: any; - /** Triggered when refresh the template column elements in the Grid. */ - templateRefresh?(e: TemplateRefreshEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggered when toolbar item is clicked in grid. */ - toolbarClick?(e: ToolbarClickEventArgs): void; - } + export interface CreateEventArgs { - export interface ActionBeginEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the grid model. + */ + model?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the name of the event. - */ - type?: string; + export interface DataBoundEventArgs { - /** Returns the current selected page number. - */ - currentPage?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the previous selected page number. - */ - previousPage?: number; + /** Returns the grid model. + */ + model?: any; - /** Returns the end row index of that current page. - */ - endIndex?: number; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns request type. - */ - requestType?: string; + export interface DestroyEventArgs { - /** Returns the start row index of that current page. - */ - startIndex?: number; + /** Returns the grid model. + */ + model?: any; - /** Returns the current grouped column field name. - */ - columnName?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the column sort direction. - */ - columnSortDirection?: string; + export interface DetailsCollapseEventArgs { - /** Returns current edited row. - */ - row?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the current action event type. - */ - originalEventType?: string; + /** Returns detail row element. + */ + detailsRow?: any; - /** Returns primary key. - */ - primaryKey?: string; + /** Returns master row of detail row record object (JSON). + */ + masterData?: any; - /** Returns primary key value. - */ - primaryKeyValue?: string; + /** Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; - /** Returns the edited row index. - */ - rowIndex?: number; + /** Returns master row element. + */ + masterRow?: any; - /** Returns the record object (JSON). - */ - data?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns the foreign key record object (JSON). - */ - foreignKeyData?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the selected row index. - */ - selectedRow?: number; + export interface DetailsDataBoundEventArgs { - /** Returns selected row for delete. - */ - tr?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns current filtering column field name. - */ - currentFilteringColumn?: any; + /** Returns details row element. + */ + detailsElement?: any; - /** Returns current filtering object. - */ - currentFilterObject?: any; + /** Returns the details row data. + */ + data?: any; - /** Returns filter details. - */ - filterCollection?: any; + /** Returns the details row data. + */ + rowData?: any; - /** Returns type of the column like number, string and so on. - */ - columnType?: string; + /** Returns the grid model. + */ + model?: any; - /** Returns the excel filter model. - */ - filtermodel?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the dataSource. - */ - dataSource?: any; + export interface DetailsExpandEventArgs { - /** Returns the query manager. - */ - query?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the customfilter option value. - */ - isCustomFilter?: boolean; - } + /** Returns detail row element. + */ + detailsRow?: any; - export interface ActionCompleteEventArgs { + /** Returns master row of detail row record object (JSON). + */ + masterData?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns master row element. + */ + masterRow?: any; - /** Returns request type. - */ - requestType?: string; + /** Returns the grid model. + */ + model?: any; - /** Returns the name of the event. - */ - type?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the current selected page number. - */ - currentPage?: number; + export interface EndAddEventArgs { - /** Returns the previous selected page number. - */ - previousPage?: number; + /** Returns the grid model. + */ + model?: any; - /** Returns the end row index of that current page. - */ - endIndex?: number; + /** Returns added data. + */ + data?: any; - /** Returns current action event type. - */ - originalEventType?: string; + /** Returns added data. + */ + rowData?: any; - /** Returns the start row index of the current page. - */ - startIndex?: number; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns grid element. - */ - target?: any; + export interface EndDeleteEventArgs { - /** Returns the current sorted column field name. - */ - columnName?: string; + /** Returns the grid model. + */ + model?: any; - /** Returns the column sort direction. - */ - columnSortDirection?: string; + /** Returns deleted data. + */ + data?: any; - /** Returns current edited row. - */ - row?: any; + /** Returns deleted data. + */ + rowData?: any; - /** Returns primary key. - */ - primaryKey?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns primary key value. - */ - primaryKeyValue?: string; + export interface EndEditEventArgs { - /** Returns the edited row index. - */ - rowIndex?: number; + /** Returns the grid model. + */ + model?: any; - /** Returns the record object (JSON). - */ - data?: any; + /** Returns modified data. + */ + data?: any; - /** Returns the selectedRow index. - */ - selectedRow?: number; + /** Returns modified data. + */ + rowData?: any; - /** Returns the foreign key record object (JSON). - */ - foreignKeyData?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns selected row for delete. - */ - tr?: any; + export interface LoadEventArgs { - /** Returns current filtering column field name. - */ - currentFilteringColumn?: string; + /** Returns the grid model. + */ + model?: any; - /** Returns current filtering object. - */ - currentFilterObject?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns filter details. - */ - filterCollection?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the dataSource. - */ - dataSource?: any; + export interface MergeHeaderCellInfoEventArgs { - /** Returns the excel filter model. - */ - filtermodel?: any; + /** Method to merge the header cells. + */ + headerCellMerge?(): void; - /** Returns type of the column like number, string and so on. - */ - columnType?: string; + /** Returns the column headers. + */ + columnHeaders?: any; - /** Returns the customfilter option value. - */ - isCustomFilter?: boolean; - } + /** Returns the grid model. + */ + model?: any; + } - export interface ActionFailureEventArgs { + export interface MergeCellInfoEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns grid cell. + */ + cell?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns request type. - */ - requestType?: string; + /** Returns current row record object (JSON). + */ + data?: any; - /** Returns the name of the event. - */ - type?: string; + /** Returns current row record object (JSON). + */ + rowData?: any; - /** Returns the error return by server. - */ - error?: any; + /** Returns the text value in the cell. + */ + text?: string; - /** Returns the current selected page number. - */ - currentPage?: number; + /** Returns the column object. + */ + column?: any; - /** Returns the previous selected page number. - */ - previousPage?: number; + /** Method to merge Grid rows. + */ + rowMerge?(): void; - /** Returns the end row index of that current page. - */ - endIndex?: number; + /** Method to merge Grid columns. + */ + colMerge?(): void; - /** Returns current action event type. - */ - originalEventType?: string; + /** Method to merge Grid rows and columns. + */ + merge?(): void; - /** Returns the start row index of the current page. - */ - startIndex?: number; + /** Returns the grid model. + */ + model?: any; - /** Returns grid element. - */ - target?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the current sorted column field name. - */ - columnName?: string; + export interface QueryCellInfoEventArgs { - /** Returns the column sort direction. - */ - columnSortDirection?: string; + /** Returns grid cell. + */ + cell?: any; - /** Returns current edited row. - */ - row?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns primary key. - */ - primaryKey?: string; + /** Returns current row record object (JSON). + */ + data?: any; - /** Returns primary key value. - */ - primaryKeyValue?: string; + /** Returns current row record object (JSON). + */ + rowData?: any; - /** Returns the edited row index. - */ - rowIndex?: number; + /** Returns the text value in the cell. + */ + text?: string; - /** Returns the record object (JSON). - */ - data?: any; + /** Returns the column object. + */ + column?: any; - /** Returns the selectedRow index. - */ - selectedRow?: number; + /** Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; - /** Returns the foreign key record object (JSON). - */ - foreignKeyData?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns selected row for delete. - */ - tr?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns current filtering column field name. - */ - currentFilteringColumn?: string; + export interface RecordClickEventArgs { - /** Returns current filtering object. - */ - currentFilterObject?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns filter details. - */ - filterCollection?: any; - } + /** Returns current record object (JSON). + */ + data?: any; - export interface BatchAddEventArgs { + /** Returns current record object (JSON). + */ + rowData?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the row index of the selected row. + */ + rowIndex?: number; - /** Returns the grid model. - */ - model?: any; + /** Returns the jQuery object of the current selected row. + */ + row?: any; - /** Returns deleted data. - */ - data?: any; + /** Returns the current selected cell. + */ + cell?: any; - /** Returns the name of the event. - */ - type?: string; + /** Returns the grid model. + */ + model?: any; - /** Returns the column object. - */ - columnObject?: any; + /** Returns the cell index value. + */ + cellIndex?: number; - /** Returns the column index. - */ - columnIndex?: number; + /** Returns the corresponding cell value. + */ + cellValue?: string; - /** Returns the row element. - */ - row?: any; + /** Returns the Header text of the column corresponding to the selected cell. + */ + columnName?: string; - /** Returns the primaryKey. - */ - primaryKey?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the cell object. - */ - cell?: any; - } + export interface RecordDoubleClickEventArgs { - export interface BatchDeleteEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns current record object (JSON). + */ + data?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns current record object (JSON). + */ + rowData?: any; - /** Returns deleted data. - */ - data?: any; + /** Returns the row index of the selected row. + */ + rowIndex?: number; - /** Returns the name of the event. - */ - type?: string; + /** Returns the jQuery object of the current selected row. + */ + row?: any; - /** Returns the primary key. - */ - primaryKey?: any; + /** Returns the current selected cell. + */ + cell?: any; - /** Returns the row Index. - */ - rowIndex?: number; - } + /** Returns the grid model. + */ + model?: any; - export interface BeforeBatchAddEventArgs { + /** Returns the selected cell index value. + */ + cellIndex?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the corresponding cell value. + */ + cellValue?: string; - /** Returns the grid model. - */ - model?: any; + /** Returns the Header text of the column corresponding to the selected cell. + */ + columnName?: string; - /** Returns deleted data. - */ - data?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the name of the event. - */ - type?: string; + export interface ResizedEventArgs { - /** Returns the default data object. - */ - defaultData?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns the primaryKey. - */ - primaryKey?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface BeforeBatchDeleteEventArgs { + /** Returns the name of the event. + */ + type?: string; - /** Returns the grid model. - */ - model?: any; + /** Returns the column index. + */ + columnIndex?: number; - /** Returns deleted data. - */ - data?: any; + /** Returns the column object. + */ + column?: any; - /** Returns the name of the event. - */ - type?: string; + /** Returns the grid object. + */ + target?: any; - /** Returns the primaryKey. - */ - primaryKey?: any; + /** Returns the old width value. + */ + oldWidth?: number; - /** Returns the row index. - */ - rowIndex?: number; + /** Returns the new width value. + */ + newWidth?: number; + } - /** Returns the row data. - */ - rowData?: any; + export interface ResizeEndEventArgs { - /** Returns the row element. - */ - row?: any; - } + /** Returns the grid model. + */ + model?: any; - export interface BeforeBatchSaveEventArgs { + /** Returns the name of the event. + */ + type?: string; - /** Returns the grid model. - */ - model?: any; + /** Returns the column index. + */ + columnIndex?: number; - /** Returns deleted data. - */ - data?: any; + /** Returns the column object. + */ + column?: any; - /** Returns the name of the event. - */ - type?: string; + /** Returns the grid object. + */ + target?: any; - /** Returns the changed record object. - */ - batchChanges?: any; - } + /** Returns the old width value. + */ + oldWidth?: number; - export interface BeforePrintEventArgs { + /** Returns the new width value. + */ + newWidth?: number; - /** Returns the grid model. - */ - model?: any; + /** Returns the extra width value. + */ + extra?: number; + } - /** Returns the name of the event. - */ - type?: string; + export interface ResizeStartEventArgs { - /** Returns the Grid element. - */ - element?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns the selected records. - */ - selectedRows?: any; - } + /** Returns the name of the event. + */ + type?: string; - export interface BeforeRowDropEventArgs { + /** Returns the column index. + */ + columnIndex?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the column object. + */ + column?: any; - /** Returns the targeted row. - */ - target?: any; + /** Returns the grid object. + */ + target?: any; - /** Returns the targeted row index. - */ - targetIndex?: any; + /** Returns the old width value. + */ + oldWidth?: number; + } - /** Returns the dragged record details - */ - draggedRecords?: any; + export interface RightClickEventArgs { - /** Returns the drop details - */ - dropDetails?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface BeginEditEventArgs { + /** Returns current record object (JSON). + */ + currentData?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the row index of the selected row. + */ + rowIndex?: number; - /** Returns the current edited row. - */ - row?: any; + /** Returns the current selected row. + */ + row?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns the selected row data object. + */ + data?: any; - /** Returns the primary key. - */ - primaryKey?: any; + /** Returns the selected row data object. + */ + rowData?: any; - /** Returns the primary key value. - */ - primaryKeyValue?: any; + /** Returns the cell index of the selected cell. + */ + cellIndex?: number; - /** Returns the edited row index. - */ - rowIndex?: number; + /** Returns the cell value. + */ + cellValue?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the cell object. + */ + cell?: any; - export interface CellEditEventArgs { + /** Returns the grid model. + */ + model?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns deleted data. - */ - data?: any; + export interface RowDataBoundEventArgs { - /** Returns the name of the event. - */ - type?: string; + /** Returns grid row. + */ + row?: any; - /** Returns the validation rules. - */ - validationRules?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the column name. - */ - columnName?: string; + /** Returns current row record object (JSON). + */ + data?: any; - /** Returns the cell value. - */ - value?: string; + /** Returns current row record object (JSON). + */ + rowData?: any; - /** Returns the row data object. - */ - rowData?: any; + /** Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; - /** Returns the previous value of the cell. - */ - previousValue?: string; + /** Returns the grid model. + */ + model?: any; - /** Returns the column object. - */ - columnObject?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the cell object. - */ - cell?: any; + export interface RowSelectedEventArgs { - /** Returns isForeignKey option value. - */ - isForeignKey?: boolean; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface CellSaveEventArgs { + /** Returns current record object (JSON). + */ + data?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns current record object (JSON). + */ + selectedData?: any; - /** Returns deleted data. - */ - data?: any; + /** Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; - /** Returns the name of the event. - */ - type?: string; + /** Returns the row index of the selected row. + */ + rowIndex?: number; - /** Returns the column name. - */ - columnName?: string; + /** Returns the current selected row. + */ + row?: any; - /** Returns the cell value. - */ - value?: string; + /** Returns the previous selected row element. + */ + prevRow?: any; - /** Returns the row data object. - */ - rowData?: any; + /** Returns the previous selected row index. + */ + prevRowIndex?: number; - /** Returns the previous value of the cell. - */ - previousValue?: string; + /** Returns the grid model. + */ + model?: any; - /** Returns the column object. - */ - columnObject?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the cell object. - */ - cell?: any; + export interface RowSelectingEventArgs { - /** Returns isForeignKey option value. - */ - isForeignKey?: boolean; - } + /** Returns the selected row index value. + */ + rowIndex?: number; - export interface CellSelectedEventArgs { + /** Returns the selected row element. + */ + row?: any; - /** Returns the selected cell index value. - */ - cellIndex?: number; + /** Returns the previous selected row element. + */ + prevRow?: any; - /** Returns the previous selected cell index value. - */ - previousRowCellIndex?: number; + /** Returns the previous selected row index. + */ + prevRowIndex?: number; - /** Returns the selected cell element. - */ - currentCell?: any; + /** Returns current record object (JSON). + */ + selectedData?: any; - /** Returns the previous selected cell element. - */ - previousRowCell?: any; + /** Returns current record object (JSON). + */ + data?: any; - /** Returns current record object (JSON). - */ - data?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the selected row cell index values. - */ - selectedRowCellIndex?: any[]; + /** Returns the grid model. + */ + model?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the grid model. - */ - model?: any; + export interface RowDeselectedEventArgs { - /** Returns the name of the event. - */ - type?: string; - } + /** Returns current record object (JSON). + */ + data?: any; - export interface CellSelectingEventArgs { + /** Returns current record object (JSON). + */ + selectedData?: any; - /** Returns the selected cell index value. - */ - cellIndex?: number; + /** Returns the row index of the deselected row. + */ + rowIndex?: number; - /** Returns the previous selected cell index value. - */ - previousRowCellIndex?: number; + /** Returns the current deselected row element. + */ + row?: any; - /** Returns the selected cell element. - */ - currentCell?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns the previous selected cell element. - */ - previousRowCell?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns current record object (JSON). - */ - data?: any; + export interface RowDeselectingEventArgs { - /** Returns whether the ctrl key is pressed while selecting cell - */ - isCtrlKeyPressed?: boolean; + /** Returns the deselecting row index value. + */ + rowIndex?: number; - /** Returns whether the shift key is pressed while selecting cell - */ - isShiftKeyPressed?: boolean; + /** Returns the deselecting row element. + */ + row?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns current record object (JSON). + */ + data?: any; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns current record object (JSON). + */ + selectedData?: any; - export interface CellDeselectedEventArgs { + /** Returns whether the ctrl key is pressed while deselecting row + */ + isCtrlKeyPressed?: boolean; - /** Returns the deselected cell index value. - */ - cellIndex?: number; + /** Returns whether the shift key is pressed while deselecting row + */ + isShiftKeyPressed?: boolean; - /** Returns the deselected cell element. - */ - currentCell?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns current record object (JSON). - */ - data?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the grid model. - */ - model?: any; + export interface RowDragEventArgs { - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface CellDeselectingEventArgs { + /** Returns draggable element type. + */ + draggableType?: any; - /** Returns the deselecting cell index value. - */ - cellIndex?: number; + /** Returns the draggable row object. + */ + target?: any; - /** Returns the deselecting cell element. - */ - currentCell?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns current record object (JSON). - */ - data?: any; + /** Returns target elements based on mouse move position. + */ + currentTarget?: any; - /** Returns whether the ctrl key is pressed while deselecting cell - */ - isCtrlKeyPressed?: boolean; + /** Returns the name of the event. + */ + type?: string; - /** Returns whether the shift key is pressed while deselecting cell - */ - isShiftKeyPressed?: boolean; + /** Returns JSON data of dragged rows. + */ + data?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns JSON data of dragged rows. + */ + draggedRecords?: any; + } - /** Returns the name of the event. - */ - type?: string; - } + export interface RowDragStartEventArgs { - export interface ColumnDragEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns draggable element type. + */ + draggableType?: any; - /** Returns draggable element type. - */ - draggableType?: any; + /** Returns the draggable row object. + */ + target?: any; - /** Returns the draggable column object. - */ - column?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns drag start element cell. + */ + currentTarget?: any; - /** Returns target elements based on mouse move position. - */ - target?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the JSON data of dragged rows. + */ + data?: any; - export interface ColumnDragStartEventArgs { + /** Returns the JSON data of dragged rows. + */ + draggedRecords?: any; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface RowDropEventArgs { - /** Returns draggable element type. - */ - draggableType?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the draggable column object. - */ - column?: any; + /** Returns draggable element type. + */ + draggableType?: string; - /** Returns the grid model. - */ - model?: any; + /** Returns the draggable row object. + */ + rows?: any; - /** Returns drag start element. - */ - target?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the current mouse position cell element. + */ + target?: any; - export interface ColumnDropEventArgs { + /** Returns the name of the event. + */ + type?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the JSON data of dragged rows. + */ + data?: any; - /** Returns draggable element type. - */ - draggableType?: string; + /** Returns the JSON data of dragged rows. + */ + droppedRecords?: any; + } - /** Returns the draggable column object. - */ - column?: any; + export interface TemplateRefreshEventArgs { - /** Returns the grid model. - */ - model?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns dropped dragged element. - */ - target?: any; + /** Returns the cell object. + */ + cell?: any; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the column object. + */ + column?: any; - export interface RowDragEventArgs { + /** Returns the current row data. + */ + data?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the current row data. + */ + rowData?: any; - /** Returns draggable element type. - */ - draggableType?: any; + /** Returns the grid model. + */ + model?: any; - /** Returns the draggable row object. - */ - target?: any; + /** Returns the current row index. + */ + rowIndex?: number; - /** Returns the grid model. - */ - model?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns target elements based on mouse move position. - */ - currentTarget?: any; + export interface ToolbarClickEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the current item. + */ + currentTarget?: any; + + /** Returns the grid model. + */ + model?: any; + + /** Returns the status of toolbar item which denotes its enabled state + */ + status?: boolean; + + /** Returns the target item. + */ + target?: any; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the grid model. + */ + gridModel?: any; + + /** Returns the toolbar object of the selected toolbar element. + */ + toolbarData?: any; + + /** Returns the Id of the current toolbar element. + */ + itemId?: string; + + /** Returns the index of the current toolbar element. + */ + itemIndex?: number; + + /** Returns the name of the current toolbar element. + */ + itemName?: string; + } + + export interface ColumnsCommand { + + /** Gets or sets an object that indicates to define all the button options which are available in ejButton. + */ + buttonOptions?: any; + + /** Gets or sets a value that indicates to add the command column button. See unboundType + */ + type?: ej.Grid.UnboundType|string; + } + + export interface Column { + + /** Sets the clip mode for Grid cell as ellipsis or clipped content(both header and content) + * @Default {ej.Grid.ClipMode.Clip} + */ + clipMode?: ej.Grid.ClipMode|string; + + /** Gets or sets a value that indicates whether to enable editing behavior for particular column. + * @Default {true} + */ + allowEditing?: boolean; + + /** Gets or sets a value that indicates whether to enable dynamic filtering behavior for particular column. + * @Default {true} + */ + allowFiltering?: boolean; + + /** Gets or sets a value that indicates whether to enable dynamic grouping behavior for particular column. + * @Default {true} + */ + allowGrouping?: boolean; + + /** Gets or sets a value that indicates whether to enable dynamic sorting behavior for particular column. + * @Default {true} + */ + allowSorting?: boolean; + + /** Gets or sets a value that indicates whether to enable dynamic resizable for particular column. + * @Default {true} + */ + allowResizing?: boolean; + + /** Gets or sets an object that indicates to define a command column in the grid. + * @Default {[]} + */ + commands?: ColumnsCommand[]; + + /** Gets or sets a value that indicates to provide custom CSS for an individual column. + */ + cssClass?: string; + + /** Gets or sets a value that indicates the attribute values to the td element of a particular column + */ + customAttributes?: any; + + /** Gets or sets a value that indicates to bind the external datasource to the particular column when column editType as dropdownedit and also it is used to bind the datasource to the + * foreign key column while editing the grid. //Where data is array of JSON objects of text and value for the drop-down and array of JSON objects for foreign key column. + * @Default {null} + */ + dataSource?: any; + + /** Gets or sets a value that indicates to display the specified default value while adding a new record to the grid + */ + defaultValue?: string|number|boolean|Date; + + /** Gets or sets a value that indicates to render the grid content and header with an HTML elements + * @Default {false} + */ + disableHtmlEncode?: boolean; + + /** Gets or sets a value that indicates to display a column value as checkbox or string + * @Default {true} + */ + displayAsCheckBox?: boolean; + + /** Gets or sets a value that indicates to customize ejNumericTextbox of an editable column. See editingType + */ + editParams?: any; + + /** Gets or sets a template that displays a custom editor used to edit column values. See editTemplate + * @Default {null} + */ + editTemplate?: any; + + /** Gets or sets a value that indicates to render the element(based on edit type) for editing the grid record. See editingType + * @Default {ej.Grid.EditingType.String} + */ + editType?: ej.Grid.EditingType|string; + + /** Gets or sets a value that indicates to groups the column based on its column format. + * @Default {false} + */ + enableGroupByFormat?: boolean; + + /** Gets or sets a value that indicates to display the columns in the grid mapping with column name of the dataSource. + */ + field?: string; + + /** Gets or sets a template that customize the filter control from default . See filterBarTemplate + * @Default {null} + */ + filterBarTemplate?: any; + + /** Gets or sets a value that indicates to render the excel or menu filter dialog to the grid columns. See filterType + * @Default {null} + */ + filterType?: ej.Grid.FilterType|string; + + /** Gets or sets a value that indicates to define foreign key field name of the grid datasource. + * @Default {null} + */ + foreignKeyField?: string; + + /** Gets or sets a value that indicates to bind the field which is in foreign column datasource based on the foreignKeyField + * @Default {null} + */ + foreignKeyValue?: string; + + /** Gets or sets a value that indicates the format for the text applied on the column + */ + format?: string; + + /** Gets or sets a value that indicates to add the template within the header element of the particular column. + * @Default {null} + */ + headerTemplateID?: string; + + /** Gets or sets a value that indicates to display the title of that particular column. + */ + headerText?: string; + + /** This defines the text alignment of a particular column header cell value. See headerTextAlign + * @Default {null} + */ + headerTextAlign?: ej.TextAlign|string; + + /** It accepts the string value and shows the tooltip for the Grid column header. + * @Default {null} + */ + headerTooltip?: string; + + /** You can use this property to freeze selected columns in grid at the time of scrolling. + * @Default {false} + */ + isFrozen?: boolean; + + /** Gets or sets a value that indicates the column has an identity in the database. + * @Default {false} + */ + isIdentity?: boolean; + + /** Gets or sets a value that indicates the column is act as a primary key(read-only) of the grid. The editing is performed based on the primary key column + * @Default {false} + */ + isPrimaryKey?: boolean; + + /** Gets or sets a value that indicates the order of Column that are to be hidden or visible when Grid element is in responsive mode and could not occupy all columns. + * @Default {-1} + */ + priority?: number; + + /** Used to hide the particular column in column chooser by giving value as false. + * @Default {true} + */ + showInColumnChooser?: boolean; + + /** Gets or sets a value that indicates whether to enables column template for a particular column. + * @Default {false} + */ + template?: boolean|string; + + /** Gets or sets a value that indicates to align the text within the column. See textAlign + * @Default {ej.TextAlign.Left} + */ + textAlign?: ej.TextAlign|string; + + /** Sets the template for Tooltip in Grid Columns(both header and content) + */ + tooltip?: string; + + /** Gets or sets a value that indicates to specify the data type of the specified columns. + */ + type?: string; + + /** Gets or sets a value that indicates to define constraints for saving data to the database. + */ + validationRules?: any; + + /** Gets or sets a value that indicates whether this column is visible in the grid. + * @Default {true} + */ + visible?: boolean; + + /** Gets or sets a value that indicates to define the width for a particular column in the grid. + */ + width?: number; + } + + export interface ContextMenuSettingsSubContextMenu { + + /** Used to get or set the corresponding custom context menu item to which the submenu to be appended. + * @Default {null} + */ + contextMenuItem?: string; + + /** Used to get or set the sub menu items to the custom context menu item. + * @Default {[]} + */ + subMenu?: any[]; + } + + export interface ContextMenuSettings { + + /** Gets or sets a value that indicates whether to add the default context menu actions as a context menu items If enableContextMenu is true it will show all the items related to the + * target, if you want selected items from contextmenu you have to mention in the contextMenuItems + * @Default {[]} + */ + contextMenuItems?: any[]; + + /** Gets or sets a value that indicates whether to add custom contextMenu items within the toolbar to perform any action in the grid + * @Default {[]} + */ + customContextMenuItems?: any[]; + + /** Gets or sets a value that indicates whether to enable the context menu action in the grid. + * @Default {false} + */ + enableContextMenu?: boolean; + + /** Used to get or set the subMenu to the corresponding custom context menu item. + */ + subContextMenu?: ContextMenuSettingsSubContextMenu[]; + + /** Gets or sets a value that indicates whether to disable the default context menu items in the grid. + * @Default {false} + */ + disableDefaultItems?: boolean; + } + + export interface EditSettings { + + /** Gets or sets a value that indicates whether to enable insert action in the editing mode. + * @Default {false} + */ + allowAdding?: boolean; + + /** Gets or sets a value that indicates whether to enable the delete action in the editing mode. + * @Default {false} + */ + allowDeleting?: boolean; + + /** Gets or sets a value that indicates whether to enable the edit action in the editing mode. + * @Default {false} + */ + allowEditing?: boolean; + + /** Gets or sets a value that indicates whether to enable the editing action while double click on the record + * @Default {true} + */ + allowEditOnDblClick?: boolean; + + /** This specifies the id of the template. This template can be used to display the data that you require to be edited using the Dialog Box + * @Default {null} + */ + dialogEditorTemplateID?: string; + + /** Gets or sets a value that indicates whether to define the mode of editing See editMode + * @Default {ej.Grid.EditMode.Normal} + */ + editMode?: ej.Grid.EditMode|string; + + /** This specifies the id of the template. This template can be used to display the data that you require to be edited using the External edit form + * @Default {null} + */ + externalFormTemplateID?: string; + + /** This specifies to set the position of an External edit form either in the top-right or bottom-left of the grid. See formPosition + * @Default {ej.Grid.FormPosition.BottomLeft} + */ + formPosition?: ej.Grid.FormPosition|string; + + /** This specifies the id of the template. This template can be used to display the data that you require to be edited using the Inline edit form + * @Default {null} + */ + inlineFormTemplateID?: string; + + /** This specifies to set the position of an adding new row either in the top or bottom of the grid. See rowPosition + * @Default {ej.Grid.RowPosition.Top} + */ + rowPosition?: ej.Grid.RowPosition|string; + + /** Gets or sets a value that indicates whether the confirm dialog has to be shown while saving or discarding the batch changes + * @Default {true} + */ + showConfirmDialog?: boolean; + + /** Gets or sets a value that indicates whether the confirm dialog has to be shown while deleting record + * @Default {false} + */ + showDeleteConfirmDialog?: boolean; + + /** Gets or sets a value that indicates whether the title for edit form is different from the primarykey column. + * @Default {null} + */ + titleColumn?: string; + + /** Gets or sets a value that indicates whether to display the add new form by default in the grid. + * @Default {false} + */ + showAddNewRow?: boolean; + } + + export interface FilterSettingsFilteredColumn { + + /** Gets or sets a value that indicates whether to define the field name of the column to be filter. + */ + field?: string; + + /** Gets or sets a value that indicates whether to define the matchCase of given value to be filter. + */ + matchCase?: boolean; + + /** Gets or sets a value that indicates whether to define the filter condition to filtered column. See operator + */ + operator?: ej.FilterOperators|string; + + /** Gets or sets a value that indicates whether to define the predicate as and/or. + */ + predicate?: string; + + /** Gets or sets a value that indicates whether to define the value to be filtered in a column. + */ + value?: string|number; + } + + export interface FilterSettings { + + /** Gets or sets a value that indicates to perform the filter operation with case sensitive in excel styled filter menu mode + * @Default {false} + */ + enableCaseSensitivity?: boolean; + + /** Gets or sets a value that indicates to define the interDeterminateState of checkbox in excel filter dialog. + * @Default {true} + */ + enableInterDeterminateState?: boolean; + + /** This specifies the grid to starts the filter action while typing in the filterBar or after pressing the enter key. based on the filterBarMode. See filterBarMode. + * @Default {ej.Grid.FilterBarMode.Immediate} + */ + filterBarMode?: ej.Grid.FilterBarMode|string; + + /** Gets or sets a value that indicates whether to define the filtered columns details programmatically at initial load + * @Default {[]} + */ + filteredColumns?: FilterSettingsFilteredColumn[]; + + /** This specifies the grid to show the filterBar or filterMenu to the grid records. See filterType + * @Default {ej.Grid.FilterType.FilterBar} + */ + filterType?: ej.Grid.FilterType|string; + + /** This specifies the grid to delay the filter action while typing in the filterBar. + * @Default {1500} + */ + immediateModeDelay?: number; + + /** Gets or sets a value that indicates the maximum number of filter choices that can be showed in the excel styled filter menu. + * @Default {1000} + */ + maxFilterChoices?: number; + + /** This specifies the grid to show the filter text within the grid pager itself. + * @Default {true} + */ + showFilterBarStatus?: boolean; + + /** Gets or sets a value that indicates whether to enable the predicate options in the filtering menu + * @Default {false} + */ + showPredicate?: boolean; + } + + export interface GroupSettings { + + /** Gets or sets a value that customize the group caption format. + * @Default {null} + */ + captionFormat?: string; + + /** Gets or sets a value that indicates whether to enable animation button option in the group drop area of the grid. + * @Default {false} + */ + enableDropAreaAutoSizing?: boolean; + + /** Gets or sets a value that indicates whether to add grouped columns programmatically at initial load + * @Default {[]} + */ + groupedColumns?: any[]; + + /** Gets or sets a value that indicates whether to show the group drop area just above the column header. It can be used to avoid ungrouping the already grouped column using + * groupSettings. + * @Default {true} + */ + showDropArea?: boolean; + + /** Gets or sets a value that indicates whether to hide the grouped columns from the grid + * @Default {false} + */ + showGroupedColumn?: boolean; + + /** Gets or sets a value that indicates whether to show the group button image(toggle button)in the column header and also in the grouped column in the group drop area . It can be + * used to group/ungroup the columns by click on the toggle button. + * @Default {false} + */ + showToggleButton?: boolean; + + /** Gets or sets a value that indicates whether to enable the close button in the grouped column which is in the group drop area to ungroup the grouped column + * @Default {false} + */ + showUngroupButton?: boolean; + } + + export interface PageSettings { + + /** Gets or sets a value that indicates whether to define which page to display currently in the grid + * @Default {1} + */ + currentPage?: number; + + /** Gets or sets a value that indicates whether to pass the current page information as a query string along with the URL while navigating to other page. + * @Default {false} + */ + enableQueryString?: boolean; + + /** Gets or sets a value that indicates whether to enables pager template for the grid. + * @Default {false} + */ + enableTemplates?: boolean; + + /** Gets or sets a value that indicates whether to define the number of pages displayed in the pager for navigation + * @Default {8} + */ + pageCount?: number; + + /** Gets or sets a value that indicates whether to define the number of records displayed per page + * @Default {12} + */ + pageSize?: number; + + /** Gets or sets a value that indicates whether to enables default pager for the grid. + * @Default {false} + */ + showDefaults?: boolean; + + /** Gets or sets a value that indicates to add the template as a pager template for grid. + * @Default {null} + */ + template?: string; + + /** Get the value of total number of pages in the grid. The totalPages value is calculated based on page size and total records of grid + * @Default {null} + */ + totalPages?: number; + + /** Get the value of total number of records which is bound to the grid. The totalRecordsCount value is calculated based on dataSource bound to the grid. + * @Default {null} + */ + totalRecordsCount?: number; + + /** Gets or sets a value that indicates whether to define the number of pages to print. See printMode. + * @Default {ej.Grid.PrintMode.AllPages} + */ + printMode?: ej.Grid.PrintMode|string; + } + + export interface ResizeSettings { + + /** Gets or sets a value that indicates whether to define the mode of resizing. + * @Default {ej.Grid.ResizeMode.Normal} + */ + resizeMode?: ej.Grid.ResizeMode|string; + } + + export interface RowDropSettings { + + /** This specifies the grid to drop the grid rows only at particular target element. + * @Default {null} + */ + dropTargetID?: any; + + /** This helps in mapping server-side action when rows are dragged from Grid. + * @Default {null} + */ + dragMapper?: string; + + /** This helps in mapping server-side action when rows are dropped in Grid. + * @Default {null} + */ + dropMapper?: string; + } + + export interface SearchSettings { + + /** This specify the grid to search for the value in particular columns that is mentioned in the field. + * @Default {[]} + */ + fields?: any; + + /** This specifies the grid to search the particular data that is mentioned in the key. + */ + key?: string; + + /** It specifies the grid to search the records based on operator. + * @Default {contains} + */ + operator?: string; + + /** It enables or disables case-sensitivity while searching the search key in grid. + * @Default {true} + */ + ignoreCase?: boolean; + } + + export interface SelectionSettings { + + /** Gets or sets a value that indicates the cell selection actions based on the cell selection mode. + * @Default {ej.Grid.CellSelectionMode.Flow} + */ + cellSelectionMode?: ej.Grid.CellSelectionMode|string; + + /** Gets or sets a value that indicates whether to enable the toggle selection behavior for row, cell and column. + * @Default {false} + */ + enableToggle?: boolean; + + /** Gets or sets a value that indicates whether to add the default selection actions as a selection mode.See selectionMode + * @Default {[row]} + */ + selectionMode?: any[]; + } + + export interface ScrollSettings { + + /** This specify the grid to to view data that you require without buffering the entire load of a huge database + * @Default {false} + */ + allowVirtualScrolling?: boolean; + + /** It accepts the boolean value and shows or hides the scrollbar while focus in or focus out of the Grid. + * @Default {false} + */ + autoHide?: boolean; + + /** Specifies the height and width of button in the scrollbar. + * @Default {18} + */ + buttonSize?: number; + + /** This specify the grid to enable/disable touch control for scrolling. + * @Default {true} + */ + enableTouchScroll?: boolean; + + /** This specify the grid to freeze particular columns at the time of scrolling. + * @Default {0} + */ + frozenColumns?: number; + + /** This specify the grid to freeze particular rows at the time of scrolling. + * @Default {0} + */ + frozenRows?: number; + + /** This specify the grid to show the vertical scroll bar, to scroll and view the grid contents. + * @Default {0} + */ + height?: string|number; + + /** It accepts the integer value and sets the width of scrollbar. + * @Default {18} + */ + scrollerSize?: number; + + /** This is used to define the mode of virtual scrolling in grid. See virtualScrollMode + * @Default {ej.Grid.VirtualScrollMode.Normal} + */ + virtualScrollMode?: ej.Grid.VirtualScrollMode|string; + + /** This is used to enable the enhanced virtual scrolling in Grid. + * @Default {false} + */ + enableVirtualization?: boolean; + + /** This specify the grid to show the horizontal scroll bar, to scroll and view the grid contents + * @Default {250} + */ + width?: string|number; + + /** This specify the scroll down pixel of mouse wheel, to scroll mouse wheel and view the grid contents. + * @Default {57} + */ + scrollOneStepBy?: number; + } + + export interface SortSettingsSortedColumn { + + /** Gets or sets a value that indicates whether to define the direction to sort the column. + */ + direction?: string; + + /** Gets or sets a value that indicates whether to define the field name of the column to be sort + */ + field?: string; + } + + export interface SortSettings { + + /** Gets or sets a value that indicates whether to define the direction and field to sort the column. + */ + sortedColumns?: SortSettingsSortedColumn[]; + } + + export interface StackedHeaderRowsStackedHeaderColumn { + + /** Gets or sets a value that indicates the header text for the particular stacked header column. + * @Default {null} + */ + column?: any; + + /** Gets or sets a value that indicates class to the corresponding stackedHeaderColumn. + * @Default {null} + */ + cssClass?: string; + + /** Gets or sets a value that indicates the header text for the particular stacked header column. + * @Default {null} + */ + headerText?: string; + + /** Gets or sets a value that indicates the text alignment of the corresponding headerText. + * @Default {ej.TextAlign.Left} + */ + textAlign?: string; + + /** Sets the template for tooltip for the Grid stackedHeaderColumns. + * @Default {null} + */ + tooltip?: string; + } + + export interface StackedHeaderRow { + + /** Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows + * @Default {[]} + */ + stackedHeaderColumns?: StackedHeaderRowsStackedHeaderColumn[]; + } + + export interface SummaryRowsSummaryColumn { + + /** Gets or sets a value that indicates the text displayed in the summary column as a value + * @Default {null} + */ + customSummaryValue?: string; + + /** This specifies summary column used to perform the summary calculation + * @Default {null} + */ + dataMember?: string; + + /** Gets or sets a value that indicates to define the target column at which to display the summary. + * @Default {null} + */ + displayColumn?: string; + + /** Gets or sets a value that indicates the format for the text applied on the column + * @Default {null} + */ + format?: string; + + /** Gets or sets a value that indicates the text displayed before the summary column value + * @Default {null} + */ + prefix?: string; + + /** Gets or sets a value that indicates the text displayed after the summary column value + * @Default {null} + */ + suffix?: string; + + /** Gets or sets a value that indicates the type of calculations to be performed for the corresponding summary column. See summaryType. + * @Default {[]} + */ + summaryType?: ej.Grid.SummaryType|string; + + /** Gets or sets a value that indicates to add the template for the summary value of dataMember given. + * @Default {null} + */ + template?: string; + } - /** Returns the name of the event. - */ - type?: string; + export interface SummaryRow { - /** Returns JSON data of dragged rows. - */ - data?: any; - } + /** Gets or sets a value that indicates whether to show the summary value within the group caption area for the corresponding summary column while grouping the column + * @Default {false} + */ + showCaptionSummary?: boolean; - export interface RowDragStartEventArgs { + /** Gets or sets a value that indicates whether to show the group summary value for the corresponding summary column while grouping a column + * @Default {false} + */ + showGroupSummary?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Gets or sets a value that indicates whether to show the total summary value the for the corresponding summary column. The summary row is added after the grid content. + * @Default {true} + */ + showTotalSummary?: boolean; - /** Returns draggable element type. - */ - draggableType?: any; + /** Gets or sets a value that indicates whether to add summary columns into the summary rows. + * @Default {[]} + */ + summaryColumns?: SummaryRowsSummaryColumn[]; - /** Returns the draggable row object. - */ - target?: any; + /** This specifies the grid to show the title for the summary rows. + */ + title?: string; - /** Returns the grid model. - */ - model?: any; + /** This specifies the grid to show the title of summary row in the specified column. + * @Default {null} + */ + titleColumn?: string; + } - /** Returns drag start element cell. - */ - currentTarget?: any; + export interface TextWrapSettings { - /** Returns the name of the event. - */ - type?: string; + /** This specifies the grid to apply the auto wrap for grid content or header or both. + * @Default {ej.Grid.WrapMode.Both} + */ + wrapMode?: ej.Grid.WrapMode|string; + } - /** Returns the JSON data of dragged rows. - */ - data?: any; - } + export interface ToolbarSettingsCustomToolbarItem { - export interface RowDropEventArgs { + /** Gets or sets a value that indicates whether to add custom toolbar item as a template element. + */ + templateID?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Gets or sets a value that indicates whether to add custom toolbar item with a custom tooltip. + */ + tooltip?: string; + } - /** Returns draggable element type. - */ - draggableType?: string; + export interface ToolbarSettings { - /** Returns the draggable row object. - */ - rows?: any; + /** Gets or sets a value that indicates whether to add custom toolbar items within the toolbar to perform any action in the grid + * @Default {[]} + */ + customToolbarItems?: ToolbarSettingsCustomToolbarItem[]; - /** Returns the grid model. - */ - model?: any; + /** Gets or sets a value that indicates whether to enable toolbar in the grid. + * @Default {false} + */ + showToolbar?: boolean; - /** Returns the current mouse position cell element. - */ - target?: any; + /** Gets or sets a value that indicates whether to add the default editing actions as a toolbar items. See toolbarItems. + * @Default {[]} + */ + toolbarItems?: Array; + } - /** Returns the name of the event. - */ - type?: string; + enum GridLines { - /** Returns the JSON data of dragged rows. - */ - data?: any; - } + ///Displays both the horizontal and vertical grid lines. + Both, - export interface ColumnSelectedEventArgs { + ///Displays the horizontal grid lines only. + Horizontal, - /** Returns the selected cell index value. - */ - columnIndex?: number; + ///Displays the vertical grid lines only. + Vertical, - /** Returns the previous selected column index value. - */ - previousColumnIndex?: number; + ///No grid lines are displayed. + None + } - /** Returns the selected header cell element. - */ - headerCell?: any; - /** Returns the previous selected header cell element. - */ - prevColumnHeaderCell?: any; + enum ClipMode { - /** Returns corresponding column object (JSON). - */ - column?: any; + ///Shows ellipsis for the overflown cell. + Ellipsis, - /** Returns the selected columns values. - */ - selectedColumnsIndex?: any[]; + ///Truncate the text in the cell + Clip, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Shows ellipsis and tooltip for the overflown cell. + EllipsisWithTooltip + } - /** Returns the grid model. - */ - model?: any; - /** Returns the name of the event. - */ - type?: string; - } + enum ColumnLayout { - export interface ColumnSelectingEventArgs { + ///Column layout is auto(based on width). + Auto, - /** Returns the selected column index value. - */ - columnIndex?: number; + ///Column layout is fixed(based on width). + Fixed + } - /** Returns the previous selected column index value. - */ - previousColumnIndex?: number; - /** Returns the selected header cell element. - */ - headerCell?: any; + enum UnboundType { - /** Returns the previous selected header cell element. - */ - prevColumnHeaderCell?: any; + ///Unbound type is edit. + Edit, - /** Returns corresponding column object (JSON). - */ - column?: any; + ///Unbound type is save. + Save, - /** Returns whether the ctrl key is pressed while selecting cell - */ - isCtrlKeyPressed?: boolean; + ///Unbound type is delete. + Delete, - /** Returns whether the shift key is pressed while selecting cell - */ - isShiftKeyPressed?: boolean; + ///Unbound type is cancel. + Cancel + } - /** Returns the grid model. - */ - model?: any; - /** Returns the name of the event. - */ - type?: string; - } + enum EditingType { - export interface ColumnDeselectedEventArgs { + ///Specifies editing type as string edit. + String, - /** Returns the Deselected column index value. - */ - columnIndex?: number; + ///Specifies editing type as boolean edit. + Boolean, - /** Returns the Deselected column header element. - */ - headerCell?: any; + ///Specifies editing type as numeric edit. + Numeric, - /** Returns corresponding column object (JSON). - */ - column?: any; + ///Specifies editing type as dropdown edit. + Dropdown, - /** Returns the grid model. - */ - model?: any; + ///Specifies editing type as datepicker. + DatePicker, - /** Returns the name of the event. - */ - type?: string; - } + ///Specifies editing type as datetime picker. + DateTimePicker + } - export interface ColumnDeselectingEventArgs { - /** Returns the deselecting column index value. - */ - columnIndex?: number; + enum FilterType { - /** Returns the deselecting column header element. - */ - headerCell?: any; + ///Specifies the filter type as menu. + Menu, - /** Returns corresponding column object (JSON). - */ - column?: any; + ///Specifies the filter type as excel. + Excel + } - /** Returns whether the ctrl key is pressed while deselecting column - */ - isCtrlKeyPressed?: boolean; - /** Returns whether the shift key is pressed while deselecting column - */ - isShiftKeyPressed?: boolean; + enum EditMode { - /** Returns the grid model. - */ - model?: any; + ///Edit mode is normal. + Normal, - /** Returns the name of the event. - */ - type?: string; - } + ///Edit mode is dialog. + Dialog, - export interface ContextClickEventArgs { + ///Edit mode is dialog template. + DialogTemplate, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Edit mode is batch. + Batch, - /** Returns the current item. - */ - currentTarget?: any; + ///Edit mode is inline form. + InlineForm, - /** Returns the grid model. - */ - model?: any; + ///Edit mode is inline template form. + InlineTemplateForm, - /** Returns the status of contextmenu item which denotes its enabled state - */ - status?: boolean; + ///Edit mode is external form. + ExternalForm, - /** Returns the target item. - */ - target?: any; + ///Edit mode is external form template. + ExternalFormTemplate + } - /** Returns the name of the event. - */ - type?: string; - } - export interface ContextOpenEventArgs { + enum FormPosition { - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Form position is bottomleft. + BottomLeft, - /** Returns the current item. - */ - currentTarget?: any; + ///Form position is topright. + TopRight + } - /** Returns the grid model. - */ - model?: any; - /** Returns the status of contextmenu item which denotes its enabled state - */ - status?: boolean; + enum RowPosition { - /** Returns the target item. - */ - target?: any; + ///Specifies position of add new row as top. + Top, - /** Returns the name of the event. - */ - type?: string; - } + ///Specifies position of add new row as bottom. + Bottom + } - export interface CreateEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + enum FilterBarMode { - /** Returns the grid model. - */ - model?: any; + ///Initiate filter operation on typing the filter query. + Immediate, - /** Returns the name of the event. - */ - type?: string; - } + ///Initiate filter operation after Enter key is pressed. + OnEnter + } - export interface DataBoundEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + enum PrintMode { - /** Returns the grid model. - */ - model?: any; + ///Prints all pages. + AllPages, - /** Returns the name of the event. - */ - type?: string; - } + ///Prints current page. + CurrentPage + } - export interface DestroyEventArgs { - /** Returns the grid model. - */ - model?: any; + enum ResizeMode { - /** Returns deleted data. - */ - data?: any; + ///New column size will be adjusted by all other Columns + Normal, - /** Returns the name of the event. - */ - type?: string; - } + ///New column Size will be adjusted using next column. + NextColumn, - export interface DetailsCollapseEventArgs { + ///New column Size will be adjusted using entire control + Control + } - /** Returns the cancel option value. - */ - cancel?: boolean; - /** Returns detail row element. - */ - detailsRow?: any; + enum CellSelectionMode { - /** Returns master row of detail row record object (JSON). - */ - masterData?: any; + ///It selects cells continuously from the start cell to end cell. + Flow, - /** Returns the foreign key record object (JSON). - */ - foreignKeyData?: any; + ///It selects range of cells as a block from start cell to the end cell. + Box + } - /** Returns master row element. - */ - masterRow?: any; - /** Returns the grid model. - */ - model?: any; + enum SelectionType { - /** Returns the name of the event. - */ - type?: string; - } + ///Specifies the selection type as single. + Single, - export interface DetailsDataBoundEventArgs { + ///Specifies the selection type as multiple. + Multiple + } - /** Returns the cancel option value. - */ - cancel?: boolean; - /** Returns details row element. - */ - detailsElement?: any; + enum VirtualScrollMode { - /** Returns the details row data. - */ - data?: any; + ///virtual scroll mode is normal. + Normal, - /** Returns the grid model. - */ - model?: any; + ///virtual scroll mode is continuous. + Continuous + } - /** Returns the name of the event. - */ - type?: string; - } - export interface DetailsExpandEventArgs { + enum SummaryType { - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Summary type is average. + Average, - /** Returns detail row element. - */ - detailsRow?: any; + ///Summary type is minimum. + Minimum, - /** Returns master row of detail row record object (JSON). - */ - masterData?: any; + ///Summary type is maximum. + Maximum, - /** Returns the foreign key record object (JSON). - */ - foreignKeyData?: any; + ///Summary type is count. + Count, - /** Returns master row element. - */ - masterRow?: any; + ///Summary type is sum. + Sum, - /** Returns the grid model. - */ - model?: any; + ///Summary type is custom. + Custom, - /** Returns the name of the event. - */ - type?: string; - } + ///Summary type is true count. + TrueCount, - export interface EndAddEventArgs { + ///Summary type is false count. + FalseCount + } - /** Returns the grid model. - */ - model?: any; - /** Returns added data. - */ - data?: any; + enum WrapMode { - /** Returns the name of the event. - */ - type?: string; - } + ///Auto wrap is applied for both content and header. + Both, - export interface EndDeleteEventArgs { + ///Auto wrap is applied only for content. + Content, - /** Returns the grid model. - */ - model?: any; + ///Auto wrap is applied only for header. + Header + } - /** Returns deleted data. - */ - data?: any; - /** Returns the name of the event. - */ - type?: string; - } + enum ToolBarItems { - export interface EndEditEventArgs { + ///Toolbar item is add. + Add, - /** Returns the grid model. - */ - model?: any; + ///Toolbar item is edit. + Edit, - /** Returns modified data. - */ - data?: any; + ///Toolbar item is delete. + Delete, - /** Returns the name of the event. - */ - type?: string; - } + ///Toolbar item is update. + Update, - export interface LoadEventArgs { + ///Toolbar item is cancel. + Cancel, - /** Returns the grid model. - */ - model?: any; + ///Toolbar item is search. + Search, - /** Returns deleted data. - */ - data?: any; + ///Toolbar item is pdfExport. + PdfExport, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Toolbar item is printGrid. + PrintGrid, - /** Returns the name of the event. - */ - type?: string; - } + ///Toolbar item is wordExport. + WordExport + } - export interface MergeCellInfoEventArgs { + } - /** Returns grid cell. - */ - cell?: any; + class Sparkline extends ej.Widget { + static fn: Sparkline; + constructor(element: JQuery | Element, options?: Sparkline.Model); + static Locale: any; + model: Sparkline.Model; + defaults: Sparkline.Model; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Redraws the entire sparkline. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; + } + export namespace Sparkline { - /** Returns current row record object (JSON). - */ - data?: any; + export interface Model { - /** Returns the text value in the cell. - */ - text?: string; + /** Background color of the plot area. + * @Default {transparent} + */ + background?: string; - /** Returns the column object. - */ - column?: any; + /** Fill color for the sparkline series. + * @Default {#33ccff} + */ + fill?: string; - /** Method to merge Grid rows. - */ - rowMerge?: any; + /** Border color of the series. + * @Default {null} + */ + stroke?: string; - /** Method to merge Grid columns. - */ - colMerge?: any; + /** Options for customizing the color, opacity and width of the sparkline border. + */ + border?: Border; - /** Method to merge Grid rows and columns. - */ - merge?: any; + /** Border width of the series. + * @Default {1} + */ + width?: number; - /** Returns the grid model. - */ - model?: any; + /** Opacity of the series. + * @Default {1} + */ + opacity?: number; - /** Returns the name of the event. - */ - type?: string; - } + /** Color for series high point. + * @Default {null} + */ + highPointColor?: string; - export interface QueryCellInfoEventArgs { + /** Color for series low point. + * @Default {null} + */ + lowPointColor?: string; + + /** Color for series start point. + * @Default {null} + */ + startPointColor?: string; + + /** Color for series end point. + * @Default {null} + */ + endPointColor?: string; + + /** Color for series negative point. + * @Default {null} + */ + negativePointColor?: string; + + /** Options for customizing the color, opacity of the sparkline start and end range. + */ + rangeBandSettings?: RangeBandSettings; + + /** Name of the culture based on which sparkline should be localized. + * @Default {en-US} + */ + locale?: string; + + /** Name of a field in data source, where the fill color for all the data points is generated. + */ + palette?: string; + + /** Controls whether sparkline has to be responsive or not. + * @Default {true} + */ + isResponsive?: boolean; + + /** Controls whether Sparkline has to be rendered as Canvas or SVG.Canvas rendering supports all functionalities in SVG rendering. + * @Default {false} + */ + enableCanvasRendering?: boolean; + + /** Specify to convert the date object to string, using locale settings. + * @Default {false} + */ + enableGroupSeparator?: boolean; + + /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /** Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /** Gap or padding for sparkline. + * @Default {8} + */ + padding?: number; + + /** Specifies the type of the series to render in sparkline. + * @Default {line. See Type} + */ + type?: ej.datavisualization.Sparkline.Type|string; + + /** Specifies the theme for Sparkline. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Sparkline.Theme|string; + + /** Options to customize the tooltip. + */ + tooltip?: Tooltip; + + /** Options for displaying and customizing marker for a data point. + */ + markerSettings?: MarkerSettings; + + /** Options to customize the Sparkline size. + */ + size?: Size; + + /** Options for customizing the color,dashArray and width of the axisLine. + */ + axisLineSettings?: AxisLineSettings; + + /** Fires before loading the sparkline. + */ + load?(e: LoadEventArgs): void; + + /** Fires after loaded the sparkline. + */ + loaded?(e: LoadedEventArgs): void; + + /** Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip. + */ + tooltipInitialize?(e: TooltipInitializeEventArgs): void; + + /** Fires before rendering a series. This event is fired for each series in Sparkline. + */ + seriesRendering?(e: SeriesRenderingEventArgs): void; + + /** Fires when mouse is moved over a point. + */ + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; + + /** Fires on clicking a point in sparkline. You can use this event to handle clicks made on points. + */ + pointRegionMouseClick?(e: PointRegionMouseClickEventArgs): void; + + /** Fires on moving mouse over the sparkline. + */ + sparklineMouseMove?(e: SparklineMouseMoveEventArgs): void; + + /** Fires on moving mouse outside the sparkline. + */ + sparklineMouseLeave?(e: SparklineMouseLeaveEventArgs): void; + } + + export interface LoadEventArgs { - /** Returns grid cell. - */ - cell?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Instance of the sparkline model object + */ + model?: any; - /** Returns current row record object (JSON). - */ - data?: any; + /** Name of the event + */ + type?: string; + } - /** Returns the text value in the cell. - */ - text?: string; + export interface LoadedEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the column object. - */ - column?: any; + /** Instance of the sparkline model object + */ + model?: any; - /** Returns the foreign key record object (JSON). - */ - foreignKeyData?: any; + /** Name of the event + */ + type?: string; + } - /** Returns the grid model. - */ - model?: any; + export interface TooltipInitializeEventArgs { - /** Returns the name of the event. - */ - type?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface RecordClickEventArgs { + /** Instance of the sparkline model object + */ + model?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; - /** Returns current record object (JSON). - */ - data?: any; + /** X Location of the trackball tooltip in pixels + */ + locationX?: any; - /** Returns the row index of the selected row. - */ - rowIndex?: number; + /** Y Location of the trackball tooltip in pixels + */ + locationY?: any; - /** Returns the jQuery object of the current selected row. - */ - row?: any; + /** Index of the point for which trackball tooltip is displayed + */ + pointIndex?: number; - /** Returns the current selected cell. - */ - cell?: any; + /** Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip + */ + currentText?: string; + } - /** Returns the grid model. - */ - model?: any; + export interface SeriesRenderingEventArgs { - /** Returns the cell index value. - */ - cellIndex?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the corresponding cell value. - */ - cellValue?: string; + /** Instance of the sparkline model object + */ + model?: any; - /** Returns the Header text of the column corresponding to the selected cell. - */ - columnName?: string; + /** Name of the event + */ + type?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Minimum x value of the data point + */ + minX?: any; - export interface RecordDoubleClickEventArgs { + /** Minimum y value of the data point + */ + minY?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Maximum x value of the data point + */ + maxX?: any; - /** Returns current record object (JSON). - */ - data?: any; + /** Maximum y value of the data point + */ + maxY?: any; + } - /** Returns the row index of the selected row. - */ - rowIndex?: number; + export interface PointRegionMouseMoveEventArgs { - /** Returns the jQuery object of the current selected row. - */ - row?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the current selected cell. - */ - cell?: any; + /** Instance of the sparkline model object + */ + model?: any; - /** Returns the grid model. - */ - model?: any; + /** Name of the event + */ + type?: string; - /** Returns the selected cell index value. - */ - cellIndex?: number; + /** X-coordinate of point in pixel + */ + locationX?: number; - /** Returns the corresponding cell value. - */ - cellValue?: string; + /** Y-coordinate of point in pixel + */ + locationY?: number; - /** Returns the Header text of the column corresponding to the selected cell. - */ - columnName?: string; + /** Index of the point in series + */ + pointIndex?: number; - /** Returns the name of the event. - */ - type?: string; - } + /** Type of the series + */ + seriesType?: string; + } - export interface ResizedEventArgs { + export interface PointRegionMouseClickEventArgs { - /** Returns the grid model. - */ - model?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Instance of the sparkline model object + */ + model?: any; - /** Returns deleted data. - */ - data?: any; + /** Name of the event + */ + type?: string; - /** Returns the name of the event. - */ - type?: string; + /** X-coordinate of point in pixel + */ + locationX?: number; - /** Returns the column index. - */ - columnIndex?: number; + /** Y-coordinate of point in pixel + */ + locationY?: number; - /** Returns the column object. - */ - column?: any; + /** Index of the point in series + */ + pointIndex?: number; + + /** Type of the series + */ + seriesType?: string; + } + + export interface SparklineMouseMoveEventArgs { - /** Returns the grid object. - */ - target?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the old width value. - */ - oldWidth?: number; + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + } + + export interface SparklineMouseLeaveEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + } + + export interface Border { + + /** Border color of the sparkline. + * @Default {transparent} + */ + color?: string; + + /** Width of the Sparkline border. + * @Default {1} + */ + width?: number; + } + + export interface RangeBandSettings { + + /** Start value of the range band. + * @Default {null} + */ + startRange?: number; + + /** End value of the range band. + * @Default {null} + */ + endRange?: number; + + /** Range band opacity of the series. + * @Default {1} + */ + opacity?: number; + + /** Range band color of the series. + * @Default {transparent} + */ + color?: string; + } + + export interface TooltipBorder { + + /** Border color of the tooltip. + * @Default {transparent} + */ + color?: string; + + /** Border width of the tooltip. + * @Default {1} + */ + width?: number; + } + + export interface TooltipFont { + + /** Font color of the text in the tooltip. + * @Default {#111111} + */ + color?: string; + + /** Font Family for the tooltip. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font Style for the tooltip. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Sparkline.FontStyle|string; + + /** Specifies the font weight for the tooltip. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Sparkline.FontWeight|string; + + /** Opacity for text in the tooltip. + * @Default {1} + */ + opacity?: number; + + /** Font size for text in the tooltip. + * @Default {8px} + */ + size?: string; + } + + export interface Tooltip { + + /** Show/hides the tooltip visibility. + * @Default {false} + */ + visible?: boolean; + + /** Fill color for the sparkline tooltip. + * @Default {white} + */ + fill?: string; + + /** Custom template to the tooltip. + */ + template?: string; + + /** Options for customizing the border of the tooltip. + */ + border?: TooltipBorder; + + /** Options for customizing the font of the tooltip. + */ + font?: TooltipFont; + } + + export interface MarkerSettingsBorder { + + /** Border color of the marker shape. + * @Default {transparent} + */ + color?: string; + + /** Controls the opacity of the marker border. + * @Default {1} + */ + opacity?: number; + + /** Border width of the marker shape. + * @Default {null} + */ + width?: number; + } + + export interface MarkerSettings { + + /** Controls the opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /** Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; + + /** width of the marker shape. + * @Default {2} + */ + width?: number; + + /** Color of the marker shape. + * @Default {white} + */ + fill?: string; + + /** Options for customizing the border of the marker shape. + */ + border?: MarkerSettingsBorder; + } + + export interface Size { + + /** Height of the Sparkline. Height can be specified in either pixel or percentage. + * @Default {''} + */ + height?: string; + + /** Width of the Sparkline. Width can be specified in either pixel or percentage. + * @Default {''} + */ + width?: string; + } + + export interface AxisLineSettings { + + /** Controls the visibility of the axis. + * @Default {false} + */ + visible?: boolean; + + /** Color of the axis line. + * @Default {'#111111'} + */ + color?: string; + + /** Width of the axis line. + * @Default {1} + */ + width?: number; + + /** Dash array of the axis line. + * @Default {1} + */ + dashArray?: number; + } + } + namespace Sparkline { + enum Type { + //string + Area, + //string + Line, + //string + Column, + //string + Pie, + //string + WinLoss, + } + } + namespace Sparkline { + enum Theme { + //string + Azure, + //string + FlatLight, + //string + FlatDark, + //string + Azuredark, + //string + Lime, + //string + LimeDark, + //string + Saffron, + //string + SaffronDark, + //string + GradientLight, + //string + GradientDark, + } + } + namespace Sparkline { + enum FontStyle { + //string + Normal, + //string + Italic, + } + } + namespace Sparkline { + enum FontWeight { + //string + Regular, + //string + Bold, + //string + Lighter, + } + } + + class SunburstChart extends ej.Widget { + static fn: SunburstChart; + constructor(element: JQuery | Element, options?: SunburstChart.Model); + static Locale: any; + model: SunburstChart.Model; + defaults: SunburstChart.Model; + + /** Redraws the entire sunburst. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; + + /** destroy the sunburst + * @returns {void} + */ + destroy(): void; + } + export namespace SunburstChart { + + export interface Model { + + /** Background color of the plot area. + * @Default {null} + */ + background?: string; + + /** Bind the data field from the data source. + * @Default {null} + */ + valueMemberPath?: string; + + /** Options for customizing the sunburst border. + */ + border?: Border; + + /** Options for customizing the sunburst segment border. + */ + segmentBorder?: SegmentBorder; + + /** Specifies the dataSource to the sunburst. + * @Default {null} + */ + dataSource?: any; + + /** Palette color for the data points. + * @Default {null} + */ + palette?: string; + + /** Parent node of the data points. + * @Default {null} + */ + parentNode?: string; + + /** Name of the property in the datasource that contains x values. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y values. + * @Default {null} + */ + yName?: string; + + /** Controls whether sunburst has to be responsive or not. + * @Default {true} + */ + isResponsive?: boolean; + + /** Options to customize the Sunburst size. + */ + size?: Size; + + /** Controls the visibility of sunburst. + * @Default {true} + */ + visible?: boolean; + + /** Options to customize the Sunburst tooltip. + */ + tooltip?: Tooltip; + + /** Options for customizing sunburst points. + */ + points?: Points; + + /** Sunburst rendering will start from the specified value + * @Default {null} + */ + startAngle?: number; + + /** Sunburst rendering will end at the specified value + * @Default {null} + */ + endAngle?: number; + + /** Sunburst outer radius value + * @Default {1} + */ + radius?: number; + + /** Sunburst inner radius value + * @Default {0.4} + */ + innerRadius?: number; + + /** Options to customize the Sunburst dataLabel. + */ + dataLabelSettings?: DataLabelSettings; + + /** Options for customizing the title and subtitle of sunburst. + */ + title?: Title; + + /** Options for customizing the appearance of the levels or point while highlighting. + */ + highlightSettings?: HighlightSettings; + + /** Options for customizing the appearance of the levels or data point while selection. + */ + selectionSettings?: SelectionSettings; + + /** Specify levels of sunburst for grouped visualization of data + * @Default {[]} + */ + levels?: Level[]; + + /** Options to customize the legend items and legend title. + */ + legend?: Legend; + + /** Specifies the theme for Sunburst. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Sunburst.SunburstTheme|string; + + /** Options to customize the left, right, top and bottom margins of sunburst area. + */ + margin?: Margin; + + /** Enable/disable the animation for all the levels. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Opacity of the levels. + * @Default {1} + */ + opacity?: number; + + /** Options for enable zooming feature of chart. + */ + zoomSettings?: ZoomSettings; + + /** Animation type of sunburst + * @Default {rotation. See Alignment} + */ + animationType?: ej.datavisualization.Sunburst.Animation|string; + + /** Fires before loading. + */ + load?(e: LoadEventArgs): void; + + /** Fires before rendering sunburst. + */ + preRender?(e: PreRenderEventArgs): void; + + /** Fires after rendering sunburst. + */ + loaded?(e: LoadedEventArgs): void; + + /** Fires before rendering the datalabel + */ + dataLabelRendering?(e: DataLabelRenderingEventArgs): void; + + /** Fires before rendering each segment + */ + segmentRendering?(e: SegmentRenderingEventArgs): void; + + /** Fires before rendering sunburst title. + */ + titleRendering?(e: TitleRenderingEventArgs): void; + + /** Fires during initialization of tooltip. + */ + tooltipInitialize?(e: TooltipInitializeEventArgs): void; + + /** Fires after clicking the point in sunburst + */ + pointRegionClick?(e: PointRegionClickEventArgs): void; - /** Returns the new width value. - */ - newWidth?: number; - } + /** Fires while moving the mouse over sunburst points + */ + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; - export interface ResizeEndEventArgs { + /** Fires when clicking the point to perform drilldown. + */ + drillDownClick?(e: DrillDownClickEventArgs): void; - /** Returns the grid model. - */ - model?: any; + /** Fires when resetting drilldown points. + */ + drillDownBack?(e: DrillDownBackEventArgs): void; - /** Returns deleted data. - */ - data?: any; + /** Fires after resetting the sunburst points + */ + drillDownReset?(e: DrillDownResetEventArgs): void; + } - /** Returns the name of the event. - */ - type?: string; + export interface LoadEventArgs { - /** Returns the column index. - */ - columnIndex?: number; + /** Load event data + */ + data?: string; - /** Returns the column object. - */ - column?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the grid object. - */ - target?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** Returns the old width value. - */ - oldWidth?: number; + /** Name of the event + */ + type?: string; + } - /** Returns the new width value. - */ - newWidth?: number; + export interface PreRenderEventArgs { - /** Returns the extra width value. - */ - extra?: number; - } + /** PreRender event data + */ + data?: string; - export interface ResizeStartEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the grid model. - */ - model?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** Returns deleted data. - */ - data?: any; + /** Name of the event + */ + type?: string; + } - /** Returns the name of the event. - */ - type?: string; + export interface LoadedEventArgs { - /** Returns the column index. - */ - columnIndex?: number; + /** Loaded event data + */ + data?: string; - /** Returns the column object. - */ - column?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the grid object. - */ - target?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** Returns the old width value. - */ - oldWidth?: number; - } + /** Name of the event + */ + type?: string; + } - export interface RightClickEventArgs { + export interface DataLabelRenderingEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Sunburst datalabel data + */ + data?: string; - /** Returns current record object (JSON). - */ - currentData?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the row index of the selected row. - */ - rowIndex?: number; + /** Instance of the sunburst model object + */ + model?: any; - /** Returns the current selected row. - */ - row?: any; + /** Name of the event + */ + type?: string; + } - /** Returns the selected row data object. - */ - data?: any; + export interface SegmentRenderingEventArgs { - /** Returns the cell index of the selected cell. - */ - cellIndex?: number; + /** Sunburst datalabel data + */ + data?: string; - /** Returns the cell value. - */ - cellValue?: string; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the cell object. - */ - cell?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** Returns the grid model. - */ - model?: any; + /** Name of the event + */ + type?: string; + } - /** Returns the name of the event. - */ - type?: string; - } + export interface TitleRenderingEventArgs { - export interface RowDataBoundEventArgs { + /** Sunburst title data + */ + data?: string; - /** Returns grid row. - */ - row?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Instance of the sunburst model object + */ + model?: any; - /** Returns current row record object (JSON). - */ - data?: any; + /** Name of the event + */ + type?: string; + } - /** Returns the foreign key record object (JSON). - */ - foreignKeyData?: any; + export interface TooltipInitializeEventArgs { - /** Returns the grid model. - */ - model?: any; + /** Sunburst tooltip data + */ + data?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface RowSelectedEventArgs { + /** Instance of the sunburst model object + */ + model?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; + } - /** Returns current record object (JSON). - */ - data?: any; + export interface PointRegionClickEventArgs { - /** Returns the foreign key record object (JSON). - */ - foreignKeyData?: any; + /** Includes clicked points region data + */ + data?: string; - /** Returns the row index of the selected row. - */ - rowIndex?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns the current selected row. - */ - row?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** Returns the previous selected row element. - */ - prevRow?: any; + /** Name of the event + */ + type?: string; + } - /** Returns the previous selected row index. - */ - prevRowIndex?: number; + export interface PointRegionMouseMoveEventArgs { - /** Returns the grid model. - */ - model?: any; + /** Includes data of mouse moved region + */ + data?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface RowSelectingEventArgs { + /** Instance of the sunburst model object + */ + model?: any; - /** Returns the selected row index value. - */ - rowIndex?: number; + /** Name of the event + */ + type?: string; + } - /** Returns the selected row element. - */ - row?: any; + export interface DrillDownClickEventArgs { - /** Returns the previous selected row element. - */ - prevRow?: any; + /** Clicked point data + */ + data?: string; - /** Returns the previous selected row index. - */ - prevRowIndex?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns current record object (JSON). - */ - data?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; + } - /** Returns the grid model. - */ - model?: any; + export interface DrillDownBackEventArgs { - /** Returns the name of the event. - */ - type?: string; - } + /** Drill down data of points + */ + data?: string; - export interface RowDeselectedEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Returns current record object (JSON). - */ - data?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** Returns the row index of the deselected row. - */ - rowIndex?: number; + /** Name of the event + */ + type?: string; + } - /** Returns the current deselected row element. - */ - row?: any; + export interface DrillDownResetEventArgs { + + /** Drill down reset data + */ + data?: string; - /** Returns the grid model. - */ - model?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + } + + export interface Border { + + /** Border color of the sunburst. + * @Default {null} + */ + color?: string; + + /** Width of the Sunburst border. + * @Default {2} + */ + width?: number; + } + + export interface SegmentBorder { + + /** Segment Border color of the sunburst. + * @Default {null} + */ + color?: string; + + /** Width of the Sunburst segment border. + * @Default {2} + */ + width?: number; + } + + export interface Size { + + /** Height of the Sunburst. + * @Default {''} + */ + height?: string; + + /** Width of the Sunburst. + * @Default {''} + */ + width?: string; + } + + export interface TooltipBorder { + + /** Border color of the tooltip. + * @Default {null} + */ + color?: string; + + /** Border width of the tooltip. + * @Default {5} + */ + width?: number; + } + + export interface TooltipFont { + + /** Font color of the text in the tooltip. + * @Default {null} + */ + color?: string; + + /** Font Family for the tooltip. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font Style for the tooltip. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Specifies the font weight for the tooltip. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity for text in the tooltip. + * @Default {1} + */ + opacity?: number; + + /** Font size for text in the tooltip. + * @Default {12px} + */ + size?: string; + } + + export interface Tooltip { + + /** tooltip visibility of the Sunburst. + * @Default {true} + */ + visible?: boolean; + + /** Options for customizing the border of the sunburst tooltip. + */ + border?: TooltipBorder; + + /** Fill color for the sunburst tooltip. + * @Default {null} + */ + fill?: string; + + /** Options for customizing the font of the tooltip. + */ + font?: TooltipFont; + + /** Custom template to the tooltip. + * @Default {null} + */ + template?: string; + + /** Setting the format for the data displayed in the tooltip + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /** Sets the opacity of the dispalyed tooltip + * @Default {0.95} + */ + opacity?: number; + } + + export interface Points { + + /** Points x value of the sunburst. + * @Default {null} + */ + x?: string; + + /** Points y value of the sunburst. + * @Default {null} + */ + y?: number; + + /** Points text of the sunburst. + * @Default {null} + */ + text?: string; + + /** Points fill color of the sunburst. + * @Default {null} + */ + fill?: string; + } + + export interface DataLabelSettingsFont { + + /** Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /** Font color of the data label text. + * @Default {null} + */ + color?: string; + + /** Font size of the data label. + * @Default {12px} + */ + size?: string; + } + + export interface DataLabelSettings { + + /** Datalabel visibility of the Sunburst. + * @Default {false} + */ + visible?: boolean; + + /** Alignment of sunburst datalabel + * @Default {Angle. See DatalabelAlignment} + */ + labelRotationMode?: ej.datavisualization.Sunburst.SunburstLabelRotationMode|string; + + /** Options for customizing the data label font. + */ + font?: DataLabelSettingsFont; + + /** Custom template for datalabel + * @Default {null} + */ + template?: string; + + /** Fill color for the datalabel + * @Default {null} + */ + fill?: string; + + /** Datalabel overflow mode + * @Default {Trim. See LabelOverflowMode} + */ + labelOverflowMode?: ej.datavisualization.Sunburst.SunburstLabelOverflowMode|string; + } + + export interface TitleFont { + + /** Font family for Sunburst title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for Sunburst title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for Sunburst title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the Sunburst title. + * @Default {1} + */ + opacity?: number; + + /** Font size for Sunburst title. + * @Default {20px} + */ + size?: string; + } + + export interface TitleSubtitleFont { + + /** Font family of sub title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for sub title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for sub title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the sub title. + * @Default {1} + */ + opacity?: number; + + /** Font size for sub title. + * @Default {12px} + */ + size?: string; + } + + export interface TitleSubtitle { + + /** Subtitle text for sunburst + */ + text?: string; + + /** Sub title text visibility for sunburst + * @Default {true} + */ + visible?: string; + + /** Sub title text alignment + * @Default {far. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the font of sub title. + */ + font?: TitleSubtitleFont; + } + + export interface Title { + + /** Title text for sunburst + */ + text?: string; + + /** Title text visibility for sunburst + * @Default {true} + */ + visible?: string; + + /** Title text alignment + * @Default {center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the font of sunburst title. + */ + font?: TitleFont; + + /** Options to customize the sub title of Sunburst. + */ + subtitle?: TitleSubtitle; + } + + export interface HighlightSettings { + + /** Enables/disables the ability to highlight the levels or point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether the levels or point has to be highlighted. + * @Default {point. See Mode} + */ + mode?: ej.datavisualization.Sunburst.SunburstHighlightMode|string; + + /** Color of the levels/point on highlight. + * @Default {red} + */ + color?: string; + + /** Opacity of the levels/point on highlight. + * @Default {0.5} + */ + opacity?: number; + + /** Specifies whether the levels or data point has to be highlighted. + * @Default {opacity. See Mode} + */ + type?: ej.datavisualization.Sunburst.SunburstHighlightType|string; + } + + export interface SelectionSettings { + + /** Enables/disables the ability to select the levels or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether the levels or data point has to be selected. + * @Default {point. See Mode} + */ + mode?: ej.datavisualization.Sunburst.SunburstHighlightMode|string; + + /** Color of the levels/point on selection. + * @Default {green} + */ + color?: string; + + /** Opacity of the levels/point on selection. + * @Default {0.5} + */ + opacity?: number; + + /** Specifies whether the levels or data point has to be selected. + * @Default {opacity. See Mode} + */ + type?: ej.datavisualization.Sunburst.SunburstHighlightType|string; + } + + export interface Level { + + /** Specifies the group member path + * @Default {null} + */ + groupMemberPath?: string; + } + + export interface LegendBorder { + + /** Border color of the legend. + * @Default {null} + */ + color?: string; + + /** Border width of the legend. + * @Default {1} + */ + width?: number; + } + + export interface LegendFont { + + /** Font family for legend item text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend item text. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for legend item text. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Font size for legend item text. + * @Default {12px} + */ + size?: string; + } + + export interface LegendItemStyle { + + /** Height of the shape in legend items. + * @Default {10} + */ + height?: number; + + /** Width of the shape in legend items. + * @Default {10} + */ + width?: number; + } + + export interface LegendLocation { + + /** X value or horizontal offset to position the legend in chart. + * @Default {0} + */ + x?: number; + + /** Y value or vertical offset to position the legend. + * @Default {0} + */ + y?: number; + } + + export interface LegendSize { + + /** Height of the legend. Height can be specified in either pixel or percentage. + * @Default {null} + */ + height?: string; + + /** Width of the legend. Width can be specified in either pixel or percentage. + * @Default {null} + */ + width?: string; + } + + export interface LegendTitleFont { + + /** Font family for the text in legend title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend title. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for legend title. + * @Default {normal. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Font size for legend title. + * @Default {12px} + */ + size?: string; + } + + export interface LegendTitle { + + /** Options to customize the font used for legend title + */ + font?: LegendTitleFont; + + /** Enables or disables the legend title. + * @Default {true} + */ + visible?: string; + + /** Text to be displayed in legend title. + */ + text?: string; + + /** Alignment of the legend title. + * @Default {center. See Alignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + } + + export interface Legend { + + /** Visibility of the legend. + * @Default {false} + */ + visible?: boolean; + + /** Interactive action of legend items. + * @Default {toggleSegmentVisibility. See Alignment} + */ + clickAction?: ej.datavisualization.Sunburst.SunburstClickAction|string; + + /** Horizontal alignment of the legend. + * @Default {Center. See Alignment} + */ + alignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the legend border. + */ + border?: LegendBorder; + + /** Number of columns to arrange the legend items. + * @Default {null} + */ + columnCount?: number; + + /** Number of rows to arrange the legend items. + * @Default {null} + */ + rowCount?: number; + + /** Options to customize the font used for legend item text. + */ + font?: LegendFont; + + /** Gap or padding between the legend items. + * @Default {10} + */ + itemPadding?: number; + + /** Options to customize the style of legend items. + */ + itemStyle?: LegendItemStyle; + + /** Options to customize the location of sunburst legend. Legend is placed in provided location only when value of position property is custom + */ + location?: LegendLocation; + + /** Places the legend at specified position. Legend can be placed at **left**, **right**, **top** or **bottom** of the chart area. To manually specify the location of legend, set + * **custom** as value to this property. + * @Default {Bottom. See Position} + */ + position?: ej.datavisualization.Sunburst.SunburstLegendPosition|string; + + /** Shape of the legend items. + * @Default {None. See Shape} + */ + shape?: ej.datavisualization.Sunburst.SunburstLegendShape|string; + + /** Options to customize the size of the legend. + */ + size?: LegendSize; + + /** Options to customize the legend title. + */ + title?: LegendTitle; + } + + export interface Margin { + + /** Spacing for the left margin of chart area. Setting positive value decreases the width of the chart area from left side. + * @Default {10} + */ + left?: number; + + /** Spacing for the right margin of chart area. Setting positive value decreases the width of the chart area from right side. + * @Default {10} + */ + right?: number; + + /** Spacing for the top margin of chart area. Setting positive value decreases the height of the chart area from the top. + * @Default {10} + */ + top?: number; + + /** Spacing for the bottom margin of the chart area. Setting positive value decreases the height of the chart area from the bottom. + * @Default {10} + */ + bottom?: number; + } + + export interface ZoomSettings { + + /** Enables or disables zooming. + * @Default {false} + */ + enable?: boolean; + + /** Toolbar horizontal alignment + * @Default {right. See Alignment} + */ + toolbarHorizontalAlignment?: ej.datavisualization.Sunburst.SunburstHorizontalAlignment|string; + + /** Toolbar vertical alignment + * @Default {top. See Alignment} + */ + toolbarVerticalAlignment?: ej.datavisualization.Sunburst.SunburstVerticalAlignment|string; + } + } + namespace Sunburst { + enum FontStyle { + //string + Normal, + //string + Italic, + } + } + namespace Sunburst { + enum FontWeight { + //string + Regular, + //string + Bold, + //string + Lighter, + } + } + namespace Sunburst { + enum SunburstLabelRotationMode { + //string + Angle, + //string + Normal, + } + } + namespace Sunburst { + enum SunburstLabelOverflowMode { + //string + Trim, + //string + Hide, + //string + None, + } + } + namespace Sunburst { + enum SunburstAlignment { + //string + Center, + //string + Near, + //string + Far, + } + } + namespace Sunburst { + enum SunburstHighlightMode { + //string + Point, + //string + Parent, + //string + Child, + //string + All, + } + } + namespace Sunburst { + enum SunburstHighlightType { + //string + Opacity, + //string + Color, + } + } + namespace Sunburst { + enum SunburstClickAction { + //string + None, + //string + ToggleSegmentVisibility, + //string + ToggleSegmentSelection, + } + } + namespace Sunburst { + enum SunburstLegendPosition { + //string + Left, + //string + Right, + //string + Top, + //string + Bottom, + } + } + namespace Sunburst { + enum SunburstLegendShape { + //string + Diamond, + //string + Pentagon, + //string + Rectangle, + //string + Circle, + //string + Cross, + //string + Triangle, + } + } + namespace Sunburst { + enum SunburstTheme { + //string + FlatLight, + //string + FlatDark, + } + } + namespace Sunburst { + enum SunburstHorizontalAlignment { + //string + Center, + //string + Left, + //string + Right, + } + } + namespace Sunburst { + enum SunburstVerticalAlignment { + //string + Top, + //string + Bottom, + //string + Middle, + } + } + namespace Sunburst { + enum Animation { + //string + Rotation, + //string + FadeIn, + } + } + + class PivotGrid extends ej.Widget { + static fn: PivotGrid; + constructor(element: JQuery | Element, options?: PivotGrid.Model); + static Locale: any; + model: PivotGrid.Model; + defaults: PivotGrid.Model; + + /** Performs an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Performs an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + + /** Exports the PivotGrid to the specified format. + * @returns {void} + */ + exportPivotGrid(): void; + + /** This function re-renders the PivotGrid on clicking the navigation buttons on PivotPager. + * @returns {void} + */ + refreshPagedPivotGrid(): void; + + /** This function refreshes the PivotGrid with modified data input in client-mode. + * @returns {void} + */ + refreshPivotGrid(): void; + + /** This function re-renders the control with the report available at that instant. + * @returns {void} + */ + refreshControl(): void; + + /** This function returns the height of all rows and width each and every column. + * @returns {any} + */ + calculateCellWidths(): any; + + /** This function creates the conditional formatting dialog to apply conditional formatting for PivotGrid control. + * @returns {void} + */ + createConditionalDialog(): void; + + /** This function saves the current report to the database/local storage. + * @returns {void} + */ + saveReport(): void; + + /** This function loads the specified report from the database/local storage. + * @returns {void} + */ + loadReport(): void; + + /** This function reconstructs the JSON data formed for rendering PivotGrid in excel-like layout format. + * @returns {void} + */ + excelLikeLayout(): void; + + /** Returns the OlapReport string maintained along with the axis elements information. + * @returns {string} + */ + getOlapReport(): string; + + /** Sets the OlapReport string along with the axis information. + * @returns {void} + */ + setOlapReport(): void; + + /** Returns the JSON records formed to render the control. + * @returns {any[]} + */ + getJSONRecords(): any[]; + + /** Sets the JSON records formed to render the control. + * @returns {void} + */ + setJSONRecords(): void; + + /** This function allows user to change the caption of the Pivot Item (name displayed in UI) on-demand for relational datasource in client-mode. + * @returns {void} + */ + refreshFieldCaption(): void; + + /** This function receives the JSON formatted datasource to render the PivotGrid control. + * @returns {void} + */ + renderControlFromJSON(): void; + } + export namespace PivotGrid { + + export interface Model { + + /** Sets the mode for the PivotGrid widget for binding either OLAP or relational data source. + * @Default {ej.Pivot.AnalysisMode.Pivot} + */ + analysisMode?: ej.Pivot.AnalysisMode|string; + + /** Specifies the CSS class to PivotGrid to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Connects the PivotSchemaDesigner with the specified ID to the PivotGrid Control. + * @Default {“”} + */ + pivotTableFieldListID?: string; + + /** Initializes the data source for the PivotGrid widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /** Holds the necessary properties for value sorting. + * @Default {{}} + */ + valueSortSettings?: ValueSortSettings; + + /** Object that holds the settings of frozen headers. + * @Default {{}} + */ + frozenHeaderSettings?: FrozenHeaderSettings; + + /** Allows user to display header name in PivotGrid control. + * @Default {{}} + */ + headerSettings?: HeaderSettings; + + /** Allows user to show appropriate unique name on Pivot button. + * @Default {false} + */ + showUniqueNameOnPivotButton?: boolean; + + /** Object utilized to pass additional information between client-end and service-end on operating the control in server mode. + * @Default {null} + */ + customObject?: any; + + /** Allows the user to collapsed the specified members in each field by default. + * @Default {null} + */ + collapsedMembers?: any; + + /** Allows the user to access each cell on mouse right-click. + * @Default {false} + */ + enableCellContext?: boolean; + + /** Enables the cell selection for a specific range of value cells. + * @Default {false} + */ + enableCellSelection?: boolean; + + /** Enables the Drill-Through feature which retrieves the raw items that are used to create the specific cell in PivotGrid. + * @Default {false} + */ + enableDrillThrough?: boolean; + + /** Allows user to get the cell details in JSON format on double clicking the cell. + * @Default {false} + */ + enableCellDoubleClick?: boolean; + + /** Allows user to edit the value cells for write-back support in PivotGrid. This is applicable only for server-mode. + * @Default {false} + */ + enableCellEditing?: boolean; + + /** Collapses the Pivot items along rows and columns by default. It works only for relational data source. + * @Default {false} + */ + enableCollapseByDefault?: boolean; + + /** Enables/Disables the display of grand total for all the columns. + * @Default {true} + */ + enableColumnGrandTotal?: boolean; + + /** Allows the user to format a specific set of cells based on the condition. + * @Default {false} + */ + enableConditionalFormatting?: boolean; + + /** Enables the advanced filtering options Value Filtering, Label Filtering and Sorting for each fields in server mode. + * @Default {false} + */ + enableAdvancedFilter?: boolean; + + /** Allows the user to refresh the control on-demand and not during every UI operation. + * @Default {false} + */ + enableDeferUpdate?: boolean; + + /** Enables the display of GroupingBar allowing you to filter, sort and remove fields obtained from datasource. + * @Default {false} + */ + enableGroupingBar?: boolean; + + /** Enables/Disables paging in Member Editor for viewing the large count of members in pages. + * @Default {false} + */ + enableMemberEditorPaging?: boolean; + + /** Allows the user to set the number of members to be displayed in each page of Member Editor on applying paging in it. + * @Default {100} + */ + memberEditorPageSize?: number; + + /** Enables/Disables the display of grand total for rows and columns. + * @Default {true} + */ + enableGrandTotal?: boolean; + + /** Allows the user to load PivotGrid using JSON data. + * @Default {false} + */ + enableJSONRendering?: boolean; + + /** Enables rendering of PivotGrid widget along with the PivotTable Field List, which allows UI operations. + * @Default {true} + */ + enablePivotFieldList?: boolean; + + /** Enables the display of grand total for all the rows. + * @Default {true} + */ + enableRowGrandTotal?: boolean; + + /** Allows the user to view layout of the PivotGrid from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows the user to enable ToolTip option. + * @Default {false} + */ + enableToolTip?: boolean; + + /** Allows the user to enable the animation effects in tooltip. + * @Default {false} + */ + enableToolTipAnimation?: boolean; + + /** Allows the user to adjust the width of the columns dynamically. + * @Default {false} + */ + enableColumnResizing?: boolean; + + /** Allows the user to view large amount of data through virtual scrolling. + * @Default {false} + */ + enableVirtualScrolling?: boolean; + + /** Allows the user to view large amount of data by applying paging. + * @Default {false} + */ + enablePaging?: boolean; + + /** Allows the user to configure hyperlink settings of PivotGrid control. + * @Default {{}} + */ + hyperlinkSettings?: HyperlinkSettings; + + /** Allows the user to enable PivotGrid’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /** Contains the serialized JSON string which renders PivotGrid. + */ + jsonRecords?: string; + + /** Sets the summary layout for PivotGrid.Following are the ways in which summary can be positioned: normal summary (bottom), top summary, no summary and excel-like summary. + * @Default {ej.PivotGrid.Layout.Normal} + */ + layout?: ej.PivotGrid.Layout|string; + + /** Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /** Sets the mode for the PivotGrid widget for binding data source either in server-side or client-side. + * @Default {ej.Pivot.OperationalMode.ClientMode} + */ + operationalMode?: ej.Pivot.OperationalMode|string; + + /** Allows the user to set custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /** Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /** Triggers when it reaches client-side after any AJAX request. + */ + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; + + /** Triggers before any AJAX request is passed from PivotGrid to service methods. + */ + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + + /** Triggers before Pivot Engine starts to populate. + */ + beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; + + /** Triggers when double click action is performed over a cell. + */ + cellDoubleClick?(e: CellDoubleClickEventArgs): void; + + /** Triggers when right-click action is performed on a cell. + */ + cellContext?(e: CellContextEventArgs): void; + + /** Triggers when a specific range of value cells are selected. + */ + cellSelection?(e: CellSelectionEventArgs): void; + + /** Triggers when the hyperlink of column header is clicked. + */ + columnHeaderHyperlinkClick?(e: ColumnHeaderHyperlinkClickEventArgs): void; + + /** Triggers after performing drill operation in PivotGrid. + */ + drillSuccess?(e: DrillSuccessEventArgs): void; + + /** Triggers while clicking "OK" button in the drill-through dialog. + */ + drillThrough?(e: DrillThroughEventArgs): void; + + /** Triggers when PivotGrid loading is initiated. + */ + load?(e: LoadEventArgs): void; + + /** Triggers when PivotGrid widget completes all operations at client-side after any AJAX request. + */ + renderComplete?(e: RenderCompleteEventArgs): void; + + /** Triggers when any error occurred during AJAX request. + */ + renderFailure?(e: RenderFailureEventArgs): void; + + /** Triggers when PivotGrid successfully reaches client-side after any AJAX request. + */ + renderSuccess?(e: RenderSuccessEventArgs): void; + + /** Triggers when the hyperlink of row header is clicked. + */ + rowHeaderHyperlinkClick?(e: RowHeaderHyperlinkClickEventArgs): void; - /** Returns the name of the event. - */ - type?: string; - } + /** Triggers when the hyperlink of summary cell is clicked. + */ + summaryCellHyperlinkClick?(e: SummaryCellHyperlinkClickEventArgs): void; - export interface RowDeselectingEventArgs { + /** Triggers when the hyperlink of value cell is clicked. + */ + valueCellHyperlinkClick?(e: ValueCellHyperlinkClickEventArgs): void; - /** Returns the deselecting row index value. - */ - rowIndex?: number; + /** Triggers before saving the current report to database. + */ + saveReport?(e: SaveReportEventArgs): void; - /** Returns the deselecting row element. - */ - row?: any; + /** Triggers before loading a report from database. + */ + loadReport?(e: LoadReportEventArgs): void; - /** Returns current record object (JSON). - */ - data?: any; + /** Triggers before performing exporting in pivot grid. + */ + beforeExport?(e: BeforeExportEventArgs): void; - /** Returns whether the ctrl key is pressed while deselecting row - */ - isCtrlKeyPressed?: boolean; + /** Triggers before editing the cells. + */ + cellEdit?(e: CellEditEventArgs): void; + } - /** Returns whether the shift key is pressed while deselecting row - */ - isShiftKeyPressed?: boolean; + export interface AfterServiceInvokeEventArgs { - /** Returns the grid model. - */ - model?: any; + /** returns the current action of PivotGrid control. + */ + action?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** returns the custom object bound with PivotGrid control. + */ + customObject?: any; - export interface TemplateRefreshEventArgs { + /** returns the HTML element of PivotGrid control. + */ + element?: any; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface BeforeServiceInvokeEventArgs { - /** Returns the cell object. - */ - cell?: any; + /** returns the current action of PivotGrid control. + */ + action?: string; - /** Returns the column object. - */ - column?: any; + /** returns the custom object bound with PivotGrid control. + */ + customObject?: any; - /** Returns the current row data. - */ - data?: any; + /** returns the HTML element of PivotGrid control. + */ + element?: any; + } - /** Returns the grid model. - */ - model?: any; + export interface BeforePivotEnginePopulateEventArgs { - /** Returns the current row index. - */ - rowIndex?: number; + /** returns the PivotGrid object + */ + pivotGridObject?: any; + } - /** Returns the name of the event. - */ - type?: string; - } + export interface CellDoubleClickEventArgs { - export interface ToolbarClickEventArgs { + /** returns the JSON details of the double clicked cell. + */ + selectedData?: any[]; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** returns the custom object bound with PivotGrid control. + */ + customObject?: any; - /** Returns the current item. - */ - currentTarget?: any; + /** returns the HTML element of PivotGrid control. + */ + element?: any; + } - /** Returns the grid model. - */ - model?: any; + export interface CellContextEventArgs { - /** Returns the status of toolbar item which denotes its enabled state - */ - status?: boolean; - - /** Returns the target item. - */ - target?: any; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the grid model. - */ - gridModel?: any; - - /** Returns the toolbar object of the selected toolbar element. - */ - toolbarData?: any; - - /** Returns the Id of the current toolbar element. - */ - itemId?: string; - - /** Returns the index of the current toolbar element. - */ - itemIndex?: number; - - /** Returns the name of the current toolbar element. - */ - itemName?: string; - } - - export interface ColumnsCommand { - - /** Gets or sets an object that indicates to define all the button options which are available in ejButton. - */ - buttonOptions?: any; - - /** Gets or sets a value that indicates to add the command column button. See unboundType - */ - type?: ej.Grid.UnboundType | string; - } - - export interface Column { - - /** Sets the clip mode for Grid cell as ellipsis or clipped content(both header and content) - * @Default {ej.Grid.ClipMode.Clip} - */ - clipMode?: ej.Grid.ClipMode | string; - - /** Gets or sets a value that indicates whether to enable editing behavior for particular column. - * @Default {true} - */ - allowEditing?: boolean; - - /** Gets or sets a value that indicates whether to enable dynamic filtering behavior for particular column. - * @Default {true} - */ - allowFiltering?: boolean; - - /** Gets or sets a value that indicates whether to enable dynamic grouping behavior for particular column. - * @Default {true} - */ - allowGrouping?: boolean; - - /** Gets or sets a value that indicates whether to enable dynamic sorting behavior for particular column. - * @Default {true} - */ - allowSorting?: boolean; - - /** Gets or sets a value that indicates whether to enable dynamic resizable for particular column. - * @Default {true} - */ - allowResizing?: boolean; - - /** Gets or sets an object that indicates to define a command column in the grid. - * @Default {[]} - */ - commands?: ColumnsCommand[]; - - /** Gets or sets a value that indicates to provide custom CSS for an individual column. - */ - cssClass?: string; - - /** Gets or sets a value that indicates the attribute values to the td element of a particular column - */ - customAttributes?: any; - - /** Gets or sets a value that indicates to bind the external datasource to the particular column when column editType as dropdownedit and also it is used to bind the datasource - * to the foreign key column while editing the grid. //Where data is array of JSON objects of text and value for the drop-down and array of JSON objects for foreign key column. - * @Default {null} - */ - dataSource?: any[]; - - /** Gets or sets a value that indicates to display the specified default value while adding a new record to the grid - */ - defaultValue?: string | number | boolean | Date; - - /** Gets or sets a value that indicates to render the grid content and header with an HTML elements - * @Default {false} - */ - disableHtmlEncode?: boolean; - - /** Gets or sets a value that indicates to display a column value as checkbox or string - * @Default {true} - */ - displayAsCheckBox?: boolean; - - /** Gets or sets a value that indicates to customize ejNumericTextbox of an editable column. See editingType - */ - editParams?: any; - - /** Gets or sets a template that displays a custom editor used to edit column values. See editTemplate - * @Default {null} - */ - editTemplate?: any; - - /** Gets or sets a value that indicates to render the element(based on edit type) for editing the grid record. See editingType - * @Default {ej.Grid.EditingType.String} - */ - editType?: ej.Grid.EditingType | string; - - /** Gets or sets a value that indicates to groups the column based on its column format. - * @Default {false} - */ - enableGroupByFormat?: boolean; - - /** Gets or sets a value that indicates to display the columns in the grid mapping with column name of the dataSource. - */ - field?: string; - - /** Gets or sets a template that customize the filter control from default . See filterBarTemplate - * @Default {null} - */ - filterBarTemplate?: any; - - /** Gets or sets a value that indicates to render the excel or menu filter dialog to the grid columns. See filterType - * @Default {null} - */ - filterType?: ej.Grid.FilterType | string; - - /** Gets or sets a value that indicates to define foreign key field name of the grid datasource. - * @Default {null} - */ - foreignKeyField?: string; - - /** Gets or sets a value that indicates to bind the field which is in foreign column datasource based on the foreignKeyField - * @Default {null} - */ - foreignKeyValue?: string; - - /** Gets or sets a value that indicates the format for the text applied on the column - */ - format?: string; - - /** Gets or sets a value that indicates to add the template within the header element of the particular column. - * @Default {null} - */ - headerTemplateID?: string; - - /** Gets or sets a value that indicates to display the title of that particular column. - */ - headerText?: string; - - /** This defines the text alignment of a particular column header cell value. See headerTextAlign - * @Default {null} - */ - headerTextAlign?: ej.TextAlign | string; - - /** It accepts the string value and shows the tooltip for the Grid column header. - * @Default {null} - */ - headerTooltip?: string; - - /** You can use this property to freeze selected columns in grid at the time of scrolling. - * @Default {false} - */ - isFrozen?: boolean; - - /** Gets or sets a value that indicates the column has an identity in the database. - * @Default {false} - */ - isIdentity?: boolean; - - /** Gets or sets a value that indicates the column is act as a primary key(read-only) of the grid. The editing is performed based on the primary key column - * @Default {false} - */ - isPrimaryKey?: boolean; - - /** Gets or sets a value that indicates the order of Column that are to be hidden or visible when Grid element is in responsive mode and could not occupy all columns. - * @Default {-1} - */ - priority?: number; - - /** Used to hide the particular column in column chooser by giving value as false. - * @Default {true} - */ - showInColumnChooser?: boolean; - - /** Gets or sets a value that indicates whether to enables column template for a particular column. - * @Default {false} - */ - template?: boolean | string; - - /** Gets or sets a value that indicates to align the text within the column. See textAlign - * @Default {ej.TextAlign.Left} - */ - textAlign?: ej.TextAlign | string; - - /** Sets the template for Tooltip in Grid Columns(both header and content) - */ - tooltip?: string; - - /** Gets or sets a value that indicates to specify the data type of the specified columns. - */ - type?: string; - - /** Gets or sets a value that indicates to define constraints for saving data to the database. - */ - validationRules?: any; - - /** Gets or sets a value that indicates whether this column is visible in the grid. - * @Default {true} - */ - visible?: boolean; - - /** Gets or sets a value that indicates to define the width for a particular column in the grid. - */ - width?: number; - } - - export interface ContextMenuSettingsSubContextMenu { - - /** Used to get or set the corresponding custom context menu item to which the submenu to be appended. - * @Default {null} - */ - contextMenuItem?: string; - - /** Used to get or set the sub menu items to the custom context menu item. - * @Default {[]} - */ - subMenu?: any[]; - } - - export interface ContextMenuSettings { - - /** Gets or sets a value that indicates whether to add the default context menu actions as a context menu items If enableContextMenu is true it will show all the items related to the target, - * if you want selected items from contextmenu you have to mention in the contextMenuItems - * @Default {[]} - */ - contextMenuItems?: any[]; - - /** Gets or sets a value that indicates whether to add custom contextMenu items within the toolbar to perform any action in the grid - * @Default {[]} - */ - customContextMenuItems?: any[]; - - /** Gets or sets a value that indicates whether to enable the context menu action in the grid. - * @Default {false} - */ - enableContextMenu?: boolean; - - /** Used to get or set the subMenu to the corresponding custom context menu item. - */ - subContextMenu?: ContextMenuSettingsSubContextMenu[]; - - /** Gets or sets a value that indicates whether to disable the default context menu items in the grid. - * @Default {false} - */ - disableDefaultItems?: boolean; - } - - export interface EditSettings { - - /** Gets or sets a value that indicates whether to enable insert action in the editing mode. - * @Default {false} - */ - allowAdding?: boolean; - - /** Gets or sets a value that indicates whether to enable the delete action in the editing mode. - * @Default {false} - */ - allowDeleting?: boolean; - - /** Gets or sets a value that indicates whether to enable the edit action in the editing mode. - * @Default {false} - */ - allowEditing?: boolean; - - /** Gets or sets a value that indicates whether to enable the editing action while double click on the record - * @Default {true} - */ - allowEditOnDblClick?: boolean; - - /** This specifies the id of the template. This template can be used to display the data that you require to be edited using the Dialog Box - * @Default {null} - */ - dialogEditorTemplateID?: string; - - /** Gets or sets a value that indicates whether to define the mode of editing See editMode - * @Default {ej.Grid.EditMode.Normal} - */ - editMode?: ej.Grid.EditMode | string; - - /** This specifies the id of the template. This template can be used to display the data that you require to be edited using the External edit form - * @Default {null} - */ - externalFormTemplateID?: string; - - /** This specifies to set the position of an External edit form either in the top-right or bottom-left of the grid - * @Default {ej.Grid.FormPosition.BottomLeft} - */ - formPosition?: ej.Grid.FormPosition | string; - - /** This specifies the id of the template. This template can be used to display the data that you require to be edited using the Inline edit form - * @Default {null} - */ - inlineFormTemplateID?: string; - - /** This specifies to set the position of an adding new row either in the top or bottom of the grid - * @Default {ej.Grid.RowPosition.Top} - */ - rowPosition?: ej.Grid.RowPosition | string; - - /** Gets or sets a value that indicates whether the confirm dialog has to be shown while saving or discarding the batch changes - * @Default {true} - */ - showConfirmDialog?: boolean; - - /** Gets or sets a value that indicates whether the confirm dialog has to be shown while deleting record - * @Default {false} - */ - showDeleteConfirmDialog?: boolean; - - /** Gets or sets a value that indicates whether the title for edit form is different from the primarykey column. - * @Default {null} - */ - titleColumn?: string; - - /** Gets or sets a value that indicates whether to display the add new form by default in the grid. - * @Default {false} - */ - showAddNewRow?: boolean; - } - - export interface FilterSettingsFilteredColumn { - - /** Gets or sets a value that indicates whether to define the field name of the column to be filter. - */ - field?: string; - - /** Gets or sets a value that indicates whether to define the matchCase of given value to be filter. - */ - matchCase?: boolean; - - /** Gets or sets a value that indicates whether to define the filter condition to filtered column. See operator - */ - operator?: ej.FilterOperators | string; - - /** Gets or sets a value that indicates whether to define the predicate as and/or. - */ - predicate?: string; - - /** Gets or sets a value that indicates whether to define the value to be filtered in a column. - */ - value?: string | number; - } - - export interface FilterSettings { - - /** Gets or sets a value that indicates to perform the filter operation with case sensitive in excel styled filter menu mode - * @Default {false} - */ - enableCaseSensitivity?: boolean; - - /** Gets or sets a value that indicates to define the interDeterminateState of checkbox in excel filter dialog. - * @Default {true} - */ - enableInterDeterminateState?: boolean; - - /** This specifies the grid to starts the filter action while typing in the filterBar or after pressing the enter key. based on the filterBarMode. See filterBarMode. - * @Default {ej.Grid.FilterBarMode.Immediate} - */ - filterBarMode?: ej.Grid.FilterBarMode | string; - - /** Gets or sets a value that indicates whether to define the filtered columns details programmatically at initial load - * @Default {[]} - */ - filteredColumns?: FilterSettingsFilteredColumn[]; - - /** This specifies the grid to show the filterBar or filterMenu to the grid records. See filterType - * @Default {ej.Grid.FilterType.FilterBar} - */ - filterType?: ej.Grid.FilterType | string; - - /** This specifies the grid to delay the filter action while typing in the filterBar. - * @Default {1500} - */ - immediateModeDelay?: number; - - /** Gets or sets a value that indicates the maximum number of filter choices that can be showed in the excel styled filter menu. - * @Default {1000} - */ - maxFilterChoices?: number; - - /** This specifies the grid to show the filter text within the grid pager itself. - * @Default {true} - */ - showFilterBarMessage?: boolean; - - /** Gets or sets a value that indicates whether to enable the predicate options in the filtering menu - * @Default {false} - */ - showPredicate?: boolean; - } - - export interface GroupSettings { - - /** Gets or sets a value that customize the group caption format. - * @Default {null} - */ - captionFormat?: string; - - /** Gets or sets a value that indicates whether to enable animation button option in the group drop area of the grid. - * @Default {false} - */ - enableDropAreaAutoSizing?: boolean; - - /** Gets or sets a value that indicates whether to add grouped columns programmatically at initial load - * @Default {[]} - */ - groupedColumns?: any[]; - - /** Gets or sets a value that indicates whether to show the group drop area just above the column header. It can be used to avoid ungrouping the already grouped column using groupSettings. - * @Default {true} - */ - showDropArea?: boolean; - - /** Gets or sets a value that indicates whether to hide the grouped columns from the grid - * @Default {false} - */ - showGroupedColumn?: boolean; - - /** Gets or sets a value that indicates whether to show the group button image(toggle button)in the column header and also in the grouped column in the group drop area. - * It can be used to group/ungroup the columns by click on the toggle button. - * @Default {false} - */ - showToggleButton?: boolean; - - /** Gets or sets a value that indicates whether to enable the close button in the grouped column which is in the group drop area to ungroup the grouped column - * @Default {false} - */ - showUngroupButton?: boolean; - } - - export interface PageSettings { - - /** Gets or sets a value that indicates whether to define which page to display currently in the grid - * @Default {1} - */ - currentPage?: number; - - /** Gets or sets a value that indicates whether to pass the current page information as a query string along with the URL while navigating to other page. - * @Default {false} - */ - enableQueryString?: boolean; - - /** Gets or sets a value that indicates whether to enables pager template for the grid. - * @Default {false} - */ - enableTemplates?: boolean; - - /** Gets or sets a value that indicates whether to define the number of pages displayed in the pager for navigation - * @Default {8} - */ - pageCount?: number; - - /** Gets or sets a value that indicates whether to define the number of records displayed per page - * @Default {12} - */ - pageSize?: number; - - /** Gets or sets a value that indicates whether to enables default pager for the grid. - * @Default {false} - */ - showDefaults?: boolean; - - /** Gets or sets a value that indicates to add the template as a pager template for grid. - * @Default {null} - */ - template?: string; - - /** Get the value of total number of pages in the grid. The totalPages value is calculated based on page size and total records of grid - * @Default {null} - */ - totalPages?: number; - - /** Get the value of total number of records which is bound to the grid. The totalRecordsCount value is calculated based on dataSource bound to the grid. - * @Default {null} - */ - totalRecordsCount?: number; - - /** Gets or sets a value that indicates whether to define the number of pages to print - * @Default {ej.Grid.PrintMode.AllPages} - */ - printMode?: ej.Grid.PrintMode | string; - } - - export interface ResizeSettings { - - /** Gets or sets a value that indicates whether to define the mode of resizing. - * @Default {ej.Grid.ResizeMode.Normal} - */ - resizeMode?: ej.Grid.ResizeMode | string; - } - - export interface RowDropSettings { - - /** This specifies the grid to drop the grid rows only at particular target element. - * @Default {null} - */ - dropTargetID?: any; - - /** This helps in mapping server-side action when rows are dragged from Grid. - * @Default {null} - */ - dragMapper?: string; - - /** This helps in mapping server-side action when rows are dropped in Grid. - * @Default {null} - */ - dropMapper?: string; - } - - export interface SearchSettings { - - /** This specify the grid to search for the value in particular columns that is mentioned in the field. - * @Default {[]} - */ - fields?: any; - - /** This specifies the grid to search the particular data that is mentioned in the key. - */ - key?: string; - - /** It specifies the grid to search the records based on operator. - * @Default {contains} - */ - operator?: string; - - /** It enables or disables case-sensitivity while searching the search key in grid. - * @Default {true} - */ - ignoreCase?: boolean; - } - - export interface SelectionSettings { - - /** Gets or sets a value that indicates the cell selection actions based on the cell selection mode. - * @Default {flow} - */ - cellSelectionMode?: string; - - /** Gets or sets a value that indicates whether to enable the toggle selection behavior for row, cell and column. - * @Default {false} - */ - enableToggle?: boolean; - - /** Gets or sets a value that indicates whether to add the default selection actions as a selection mode.See selectionMode - * @Default {[row]} - */ - selectionMode?: any[]; - } - - export interface ScrollSettings { - - /** This specify the grid to to view data that you require without buffering the entire load of a huge database - * @Default {false} - */ - allowVirtualScrolling?: boolean; - - /** It accepts the boolean value and shows or hides the scrollbar while focus in or focus out of the Grid. - * @Default {false} - */ - autoHide?: boolean; - - /** Specifies the height and width of button in the scrollbar. - * @Default {18} - */ - buttonSize?: number; - - /** This specify the grid to enable/disable touch control for scrolling. - * @Default {true} - */ - enableTouchScroll?: boolean; - - /** This specify the grid to freeze particular columns at the time of scrolling. - * @Default {0} - */ - frozenColumns?: number; - - /** This specify the grid to freeze particular rows at the time of scrolling. - * @Default {0} - */ - frozenRows?: number; - - /** This specify the grid to show the vertical scroll bar, to scroll and view the grid contents. - * @Default {0} - */ - height?: string | number; - - /** It accepts the integer value and sets the width of scrollbar. - * @Default {18} - */ - scrollerSize?: number; - - /** This is used to define the mode of virtual scrolling in grid. See virtualScrollMode - * @Default {ej.Grid.VirtualScrollMode.Normal} - */ - virtualScrollMode?: ej.Grid.VirtualScrollMode | string; - - /** This is used to enable the enhanced virtual scrolling in Grid. - * @Default {false} - */ - enableVirtualization?: boolean; - - /** This specify the grid to show the horizontal scroll bar, to scroll and view the grid contents - * @Default {250} - */ - width?: string | number; - - /** This specify the scroll down pixel of mouse wheel, to scroll mouse wheel and view the grid contents. - * @Default {57} - */ - scrollOneStepBy?: number; - } - - export interface SortSettingsSortedColumn { - - /** Gets or sets a value that indicates whether to define the direction to sort the column. - */ - direction?: string; - - /** Gets or sets a value that indicates whether to define the field name of the column to be sort - */ - field?: string; - } - - export interface SortSettings { - - /** Gets or sets a value that indicates whether to define the direction and field to sort the column. - */ - sortedColumns?: SortSettingsSortedColumn[]; - } - - export interface StackedHeaderRowsStackedHeaderColumn { - - /** Gets or sets a value that indicates the header text for the particular stacked header column. - * @Default {null} - */ - column?: any; - - /** Gets or sets a value that indicates class to the corresponding stackedHeaderColumn. - * @Default {null} - */ - cssClass?: string; - - /** Gets or sets a value that indicates the header text for the particular stacked header column. - * @Default {null} - */ - headerText?: string; - - /** Gets or sets a value that indicates the text alignment of the corresponding headerText. - * @Default {ej.TextAlign.Left} - */ - textAlign?: string; - - /** Sets the template for tooltip for the Grid stackedHeaderColumns. - * @Default {null} - */ - tooltip?: string; - } - - export interface StackedHeaderRow { - - /** Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows - * @Default {[]} - */ - stackedHeaderColumns?: StackedHeaderRowsStackedHeaderColumn[]; - } - - export interface SummaryRowsSummaryColumn { - - /** Gets or sets a value that indicates the text displayed in the summary column as a value - * @Default {null} - */ - customSummaryValue?: string; - - /** This specifies summary column used to perform the summary calculation - * @Default {null} - */ - dataMember?: string; - - /** Gets or sets a value that indicates to define the target column at which to display the summary. - * @Default {null} - */ - displayColumn?: string; - - /** Gets or sets a value that indicates the format for the text applied on the column - * @Default {null} - */ - format?: string; - - /** Gets or sets a value that indicates the text displayed before the summary column value - * @Default {null} - */ - prefix?: string; - - /** Gets or sets a value that indicates the text displayed after the summary column value - * @Default {null} - */ - suffix?: string; + /** returns the cell position (row index and column index) in table. + */ + cellPosition?: string; - /** Gets or sets a value that indicates the type of calculations to be performed for the corresponding summary column - * @Default {[]} - */ - summaryType?: ej.Grid.SummaryType | string; + /** returns the type of the cell. + */ + cellType?: string; - /** Gets or sets a value that indicates to add the template for the summary value of dataMember given. - * @Default {null} - */ - template?: string; - } + /** returns the content of the cell. + */ + cellValue?: string; - export interface SummaryRow { + /** returns the unique name of levels/members. + */ + uniqueName?: string; - /** Gets or sets a value that indicates whether to show the summary value within the group caption area for the corresponding summary column while grouping the column - * @Default {false} - */ - showCaptionSummary?: boolean; + /** returns the role of the cell in PivotGrid. + */ + role?: string; - /** Gets or sets a value that indicates whether to show the group summary value for the corresponding summary column while grouping a column - * @Default {false} - */ - showGroupSummary?: boolean; + /** returns JSON record corresponding to the selected cell. + */ + rawdata?: any; - /** Gets or sets a value that indicates whether to show the total summary value the for the corresponding summary column. The summary row is added after the grid content. - * @Default {true} - */ - showTotalSummary?: boolean; + /** returns the original event object. + */ + args?: any; + } - /** Gets or sets a value that indicates whether to add summary columns into the summary rows. - * @Default {[]} - */ - summaryColumns?: SummaryRowsSummaryColumn[]; + export interface CellSelectionEventArgs { - /** This specifies the grid to show the title for the summary rows. - */ - title?: string; + /** returns the JSON records of the selected range of cells. + */ + JSONRecords?: any; - /** This specifies the grid to show the title of summary row in the specified column. - * @Default {null} - */ - titleColumn?: string; - } + /** Returns the row headers corresponding to the selected value cells. + */ + rowheader?: any; - export interface TextWrapSettings { + /** Returns the column headers corresponding to the selected value cells. + */ + columnheader?: any; - /** This specifies the grid to apply the auto wrap for grid content or header or both. - * @Default {ej.Grid.WrapMode.Both} - */ - wrapMode?: ej.Grid.WrapMode | string; - } + /** Returns the information about the measure associated with the selected cell. + */ + measureCount?: string; + } - export interface ToolbarSettings { + export interface ColumnHeaderHyperlinkClickEventArgs { - /** Gets or sets a value that indicates whether to add custom toolbar items within the toolbar to perform any action in the grid - * @Default {[]} - */ - customToolbarItems?: any[]; + /** returns the information about the clicked cell + */ + args?: any; - /** Gets or sets a value that indicates whether to enable toolbar in the grid. - * @Default {false} - */ - showToolbar?: boolean; + /** returns the HTML element of the control. + */ + element?: any; - /** Gets or sets a value that indicates whether to add the default editing actions as a toolbar items - * @Default {[]} - */ - toolbarItems?: Array; - } + /** returns the custom object bound to the control. + */ + customObject?: any; + } - enum GridLines { + export interface DrillSuccessEventArgs { - ///Displays both the horizontal and vertical grid lines. - Both, + /** returns the HTML element of the control. + */ + args?: any; + } - ///Displays the horizontal grid lines only. - Horizontal, + export interface DrillThroughEventArgs { - ///Displays the vertical grid lines only. - Vertical, + /** return the JSON records of the generated cells on drill-through operation. + */ + data?: any; - ///No grid lines are displayed. - None - } + /** returns the HTML element of PivotGrid control. + */ + element?: any; + } + export interface LoadEventArgs { - enum ClipMode { + /** returns the custom object bound with the control. + */ + customObject?: any; - ///Shows ellipsis for the overflown cell. - Ellipsis, + /** returns the HTML element of PivotGrid control. + */ + element?: any; + } - ///Truncate the text in the cell - Clip, + export interface RenderCompleteEventArgs { - ///Shows ellipsis and tooltip for the overflown cell. - EllipsisWithTooltip - } + /** returns the current action of PivotGrid control. + */ + action?: string; + /** returns the custom object bound with the control. + */ + customObject?: any; - enum ColumnLayout { + /** returns the HTML element of PivotGrid control. + */ + element?: any; + } - ///Column layout is auto(based on width). - Auto, + export interface RenderFailureEventArgs { - ///Column layout is fixed(based on width). - Fixed - } + /** returns the current action of PivotGrid control. + */ + action?: string; + /** returns the custom object bound with the control. + */ + customObject?: any; - enum UnboundType { + /** returns the HTML element of PivotGrid control. + */ + element?: any; - ///Unbound type is edit. - Edit, + /** returns the error message with error code. + */ + message?: string; + } - ///Unbound type is save. - Save, + export interface RenderSuccessEventArgs { - ///Unbound type is delete. - Delete, + /** returns the current action of PivotGrid control. + */ + action?: string; - ///Unbound type is cancel. - Cancel - } + /** returns the custom object bound with the control. + */ + customObject?: any; + /** returns the HTML element of PivotGrid control. + */ + element?: any; + } - enum EditingType { + export interface RowHeaderHyperlinkClickEventArgs { - ///Specifies editing type as string edit. - String, + /** returns the information about the clicked cell + */ + args?: any; - ///Specifies editing type as boolean edit. - Boolean, + /** returns the HTML element of the control. + */ + element?: any; - ///Specifies editing type as numeric edit. - Numeric, + /** returns the custom object bound to the control. + */ + customObject?: any; + } - ///Specifies editing type as dropdown edit. - Dropdown, + export interface SummaryCellHyperlinkClickEventArgs { - ///Specifies editing type as datepicker. - DatePicker, + /** returns the information about the clicked cell + */ + args?: any; - ///Specifies editing type as datetime picker. - DateTimePicker - } + /** returns the HTML element of the control. + */ + element?: any; + /** returns the custom object bound to the control. + */ + customObject?: any; + } - enum FilterType { + export interface ValueCellHyperlinkClickEventArgs { - ///Specifies the filter type as menu. - Menu, + /** returns the information about the clicked cell + */ + args?: any; - ///Specifies the filter type as excel. - Excel - } + /** returns the HTML element of the control. + */ + element?: any; + /** returns the custom object bound to the control. + */ + customObject?: any; + } - enum EditMode { + export interface SaveReportEventArgs { - ///Edit mode is normal. - Normal, + /** returns the report to be stored in database. + */ + report?: any; + } - ///Edit mode is dialog. - Dialog, + export interface LoadReportEventArgs { - ///Edit mode is dialog template. - DialogTemplate, + /** returns the PivotGrid object. + */ + targetControl?: any; - ///Edit mode is batch. - Batch, + /** returns whether the control is bound with OLAP or Relational data source. + */ + dataModel?: string; + } - ///Edit mode is inline form. - InlineForm, + export interface BeforeExportEventArgs { - ///Edit mode is inline template form. - InlineTemplateForm, + /** contains the url of the service responsible for exporting. + */ + url?: string; - ///Edit mode is external form. - ExternalForm, + /** contains the name of the exporting file. + */ + fileName?: string; + } - ///Edit mode is external form template. - ExternalFormTemplate - } + export interface CellEditEventArgs { + /** contains the array of cells selected for editing. + */ + editCellsInfo?: any[]; + } - enum FormPosition { + export interface DataSourceColumnsAdvancedFilter { - ///Form position is bottomleft. - BottomLeft, + /** Allows the user to provide level unique name to perform advanced filtering. + */ + name?: string; - ///Form position is topright. - TopRight - } + /** Allows the user to set the operator to perform Label Filtering. + * @Default {none} + */ + labelFilterOperator?: string; + /** Allows the user to set the operator to perform Value Filtering. + * @Default {none} + */ + valueFilterOperator?: string; - enum RowPosition { + /** Allows the user to set the filtering type while performing advanced filtering. + */ + advancedFilterType?: string; - ///Specifies position of add new row as top. - Top, + /** In case of value filtering, this property contains the measure name to which the filter is applied. + */ + measure?: string; - ///Specifies position of add new row as bottom. - Bottom - } + /** Allows the user to hold the filter operand values in advanced filtering. + */ + values?: any[]; + } + export interface DataSourceColumnsFilterItems { - enum FilterBarMode { + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; + + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceColumn { - ///Initiate filter operation on typing the filter query. - Immediate, + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; - ///Initiate filter operation after Enter key is pressed. - OnEnter - } + /** Allows the user to set the display caption for an item. + */ + fieldCaption?: string; + + /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. + * @Default {[]} + */ + advancedFilter?: DataSourceColumnsAdvancedFilter[]; + + /** Allows the user to indicate whether the added item is a named set or not. + * @Default {false} + */ + isNamedSets?: boolean; + + /** Shows/Hides the sub-total of the field in PivotGrid. + * @Default {true} + */ + showSubTotal?: boolean; + + /** Allows to set the format for the column headers. + */ + format?: string; + + /** This property sets type of display of date. + */ + formatString?: string; + + /** Allows to set the custom theme for the column headers. + */ + cssClass?: string; + + /** Allows the user to set the sorting order of the members of the field. + * @Default {ej.PivotAnalysis.SortOrder.Ascending} + */ + sortOrder?: ej.PivotAnalysis.SortOrder|string; + + /** Contains the list of members need to be drilled down by default in the field. + * @Default {[]} + */ + drilledItems?: any[]; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceColumnsFilterItems; + } + + export interface DataSourceRowsAdvancedFilter { + + /** Allows the user to provide level unique name to perform advanced filtering. + */ + name?: string; + + /** Allows the user to set the operator to perform Label Filtering. + * @Default {none} + */ + labelFilterOperator?: string; + + /** Allows the user to set the operator to perform Value Filtering. + * @Default {none} + */ + valueFilterOperator?: string; + + /** Allows the user to set the filtering type while performing advanced filtering. + */ + advancedFilterType?: string; + + /** In case of value filtering, this property contains the measure name to which the filter is applied. + */ + measure?: string; + + /** Allows the user to hold the filter operand values in advanced filtering. + */ + values?: any[]; + } + + export interface DataSourceRowsFilterItems { + + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; + + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceRow { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display caption for an item. + */ + fieldCaption?: string; + + /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. + * @Default {[]} + */ + advancedFilter?: DataSourceRowsAdvancedFilter[]; + + /** Allows the user to indicate whether the added item is a named set or not. + * @Default {false} + */ + isNamedSets?: boolean; + + /** Shows/Hides the sub-total of the field. + * @Default {true} + */ + showSubTotal?: boolean; + + /** Allows to set the format for the row headers. + */ + format?: string; + + /** This property sets type of display of date. + */ + formatString?: string; + + /** Allows to set the custom theme for the row headers. + */ + cssClass?: string; + + /** Allows the user to set the sorting order of the members of the field. + * @Default {ej.PivotAnalysis.SortOrder.Ascending} + */ + sortOrder?: ej.PivotAnalysis.SortOrder|string; + + /** Contains the list of members need to be drilled down by default in the field. + * @Default {[]} + */ + drilledItems?: any[]; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceRowsFilterItems; + } + + export interface DataSourceValuesMeasure { + + /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. + */ + fieldName?: string; + } + + export interface DataSourceValue { + + /** Allows the user to bind the item by using its unique name as field name for Relational datasource. + */ + fieldName?: string; + + /** Allows the user to set the display caption for an item for Relational datasource. + */ + fieldCaption?: string; + + /** This holds the list of unique names of measures to bind them from the OLAP cube. + * @Default {[]} + */ + measures?: DataSourceValuesMeasure[]; + + /** Allows to set the axis name to place the measures items. + * @Default {rows} + */ + axis?: string; + + /** Indicates whether the field is a calculated field or not with Relational datasource. + * @Default {false} + */ + isCalculatedField?: boolean; + + /** Allows to set the type of PivotGrid summary calculation for the value field with Relational datasource. + * @Default {ej.PivotAnalysis.SummaryType.Sum} + */ + summaryType?: ej.PivotAnalysis.SummaryType|string; + + /** Allows to set the format for the values. + */ + format?: string; + + /** This property sets type of display of date. + */ + formatString?: string; + + /** Allows to set the formula for calculation of values for calculated members in Relational datasource. + */ + formula?: string; + + /** Allows to set the custom theme for the values. + */ + cssClass?: string; + } + + export interface DataSourceFiltersFilterItems { + + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; + + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceFilter { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceFiltersFilterItems; + } + + export interface DataSourcePagerOptions { + + /** Allows to set the number of categorical columns to be displayed in each page on applying paging. + * @Default {0} + */ + categoricalPageSize?: number; + + /** Allows to set the number of series rows to be displayed in each page on applying paging. + * @Default {0} + */ + seriesPageSize?: number; + + /** Allows to set the page number in categorical axis to be loaded by default. + * @Default {1} + */ + categoricalCurrentPage?: number; + + /** Allows to set the page number in series axis to be loaded by default. + * @Default {1} + */ + seriesCurrentPage?: number; + } + + export interface DataSource { + + /** Lists out the items to be arranged in columns section of PivotGrid. + * @Default {[]} + */ + columns?: DataSourceColumn[]; + + /** Lists out the items to be arranged in rows section of PivotGrid. + * @Default {[]} + */ + rows?: DataSourceRow[]; + + /** Lists out the items which supports calculation in PivotGrid. + * @Default {[]} + */ + values?: DataSourceValue[]; + + /** Lists out the items which supports filtering of values without displaying the members in UI in PivotGrid. + * @Default {[]} + */ + filters?: DataSourceFilter[]; + + /** Contains the respective cube name from OLAP database as string type. + * @Default {“”} + */ + cube?: string; + + /** To set the data source name to fetch data from that. + * @Default {“”} + */ + sourceInfo?: string; + + /** Set the provider name for PivotGrid to identify whether the provider is SSAS or Mondrian. + * @Default {ssas} + */ + providerName?: string; + + /** Provides the raw data source for the PivotGrid. + * @Default {null} + */ + data?: any; + + /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. + * @Default {“”} + */ + catalog?: string; + + /** Allows user to filter the members (by its name and values) through advanced filtering (excel-like) option for OLAP data source in client-mode. + * @Default {false} + */ + enableAdvancedFilter?: boolean; + + /** Sets a name to the report bound to the control. + */ + reportName?: string; + + /** Allows to set the page size and current page number for each axis on applying paging. + * @Default {{}} + */ + pagerOptions?: DataSourcePagerOptions; + } + + export interface ValueSortSettings { + + /** Contains the headers of the specific column to which value sorting is applied. + */ + headerText?: string; + + /** Allows the user to set the string for separating column headers provided in the above property headerText. + */ + headerDelimiters?: string; + + /** Allows the user to set the sorting order of the values of the field. + * @Default {ej.PivotAnalysis.SortOrder.Ascending} + */ + sortOrder?: ej.PivotAnalysis.SortOrder|string; + } + + export interface FrozenHeaderSettings { + + /** Allows the user to freeze the row headers alone on scrolling the horizontal scroll bar. + * @Default {false} + */ + enableFrozenRowHeaders?: boolean; + + /** Allows the user to freeze the column headers alone on scrolling the vertical scroll bar. + * @Default {false} + */ + enableFrozenColumnHeaders?: boolean; + + /** Allows the user to freeze both the row headers and column headers on scrolling. + * @Default {false} + */ + enableFrozenHeaders?: boolean; + + /** Allows user to set the size of the scrollbar (horizontal and vertical) visible in PivotGrid. + * @Default {18} + */ + scrollerSize?: number; + } + + export interface HeaderSettings { + + /** Allows user to enable/disable row header names in PivotGrid control. + * @Default {false} + */ + showRowItems?: boolean; + + /** Allows user to enable/disable column header names in PivotGrid control. + * @Default {false} + */ + showColumnItems?: boolean; + } + + export interface HyperlinkSettings { + + /** Allows the user to enable/disable hyperlink for column header. + * @Default {false} + */ + enableColumnHeaderHyperlink?: boolean; + + /** Allows the user to enable/disable hyperlink for row header. + * @Default {false} + */ + enableRowHeaderHyperlink?: boolean; + + /** Allows the user to enable/disable hyperlink for summary cells. + * @Default {false} + */ + enableSummaryCellHyperlink?: boolean; + + /** Allows the user to enable/disable hyperlink for value cells. + * @Default {false} + */ + enableValueCellHyperlink?: boolean; + } + + export interface ServiceMethodSettings { + + /** Allows the user to set the custom name for the service method responsible for drill up/down operation in PivotGrid. + * @Default {DrillGrid} + */ + drillDown?: string; + + /** Allows the user to set the custom name for the service method responsible for exporting. + * @Default {Export} + */ + exportPivotGrid?: string; + + /** Allows the user to set the custom name for the service method responsible for performing server-side actions on defer update. + * @Default {DeferUpdate} + */ + deferUpdate?: string; + + /** Allows the user to set the custom name for the service method responsible for getting the values for the tree-view inside filter dialog. + * @Default {FetchMembers} + */ + fetchMembers?: string; + + /** Allows the user to set the custom name for the service method responsible for filtering operation in PivotGrid. + * @Default {Filtering} + */ + filtering?: string; + + /** Allows the user to set the custom name for the service method responsible for initializing PivotGrid. + * @Default {InitializeGrid} + */ + initialize?: string; + + /** Allows the user to set the custom name for the service method responsible for the server-side action, on dropping a node from Field List. + * @Default {NodeDropped} + */ + nodeDropped?: string; + + /** Allows the user to set the custom name for the service method responsible for the server-side action on changing the checked state of a node in Field List. + * @Default {NodeStateModified} + */ + nodeStateModified?: string; + + /** Allows the user to set the custom name for the service method responsible for performing paging operation in PivotGrid. + * @Default {Paging} + */ + paging?: string; + + /** Allows the user to set the custom name for the service method responsible for sorting operation in PivotGrid. + * @Default {Sorting} + */ + sorting?: string; + + /** Allows the user to set the custom name for the service method responsible for expanding members inside member editor. + * @Default {MemberExpanded} + */ + memberExpand?: string; + + /** Allows the user to set the custom name for the service method responsible for editing the cells. + * @Default {CellEditing} + */ + cellEditing?: string; + + /** Allows the user to set the custom name for the service method responsible for saving the current report to database. + * @Default {SaveReport} + */ + saveReport?: string; + + /** Allows the user to set the custom name for the service method responsible for loading a report from database. + * @Default {LoadReportFromDB} + */ + loadReport?: string; + + /** Allows the user to set the custom name for the service method responsible for adding a calculated field to the report. + * @Default {CalculatedField} + */ + calculatedField?: string; + + /** Allows the user to set the custom name for the service method responsible for performing drill through operation. + * @Default {DrillThroughHierarchies} + */ + drillThroughHierarchies?: string; + + /** Allows the user to set the custom name for the service method responsible for performing drill through operation in data table. + * @Default {DrillThroughDataTable} + */ + drillThroughDataTable?: string; + + /** Allows the user to set the custom name for the service method responsible for write-back operation in OLAP Cube. This is only applicable in server-side component. + * @Default {WriteBack} + */ + writeBack?: string; + } + + enum Layout { + + ///To set normal summary layout in PivotGrid. + Normal, + + ///To set layout with summaries at the top in PivotGrid. + NormalTopSummary, + + ///To set layout without summaries in PivotGrid. + NoSummaries, + + ///To set excel-like layout in PivotGrid. + ExcelLikeLayout + } + + } + namespace Pivot { + enum AnalysisMode { + //To bind an OLAP data source to PivotGrid. + OLAP, + //To bind a relational data source to PivotGrid. + Pivot, + } + } + namespace PivotAnalysis { + enum SortOrder { + //Sorts the members of the field in ascending order. + Ascending, + //Sorts the members of the field in descending order. + Descending, + //Displays the members without sorting in any order. + None, + } + } + namespace PivotAnalysis { + enum FilterType { + //Excludes the specified values among the members of the field. + Exclude, + //Includes the specified values alone among the members of the field. + Include, + } + } + namespace PivotAnalysis { + enum SummaryType { + //Calculates the summary as the total of all values. + Sum, + //Displays the average of all values as the summaries. + Average, + //Displays the count of items in summaries. + Count, + //Displays the minimum value of all the items in the summary. + Min, + //Displays the maximum value of all the items in the summary. + Max, + } + } + namespace Pivot { + enum OperationalMode { + //To bind data source completely from client-side. + ClientMode, + //To bind data source completely from server-side. + ServerMode, + } + } + + class PivotSchemaDesigner extends ej.Widget { + static fn: PivotSchemaDesigner; + constructor(element: JQuery | Element, options?: PivotSchemaDesigner.Model); + static Locale: any; + model: PivotSchemaDesigner.Model; + defaults: PivotSchemaDesigner.Model; + + /** Performs an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Re-renders the control with the data source bound to the pivot control at that instant. + * @returns {void} + */ + refreshControl(): void; + } + export namespace PivotSchemaDesigner { + + export interface Model { + + /** Specifies the CSS class to PivotSchemaDesigner to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /** For ASP.NET and MVC Wrapper, PivotSchemaDesigner will be initialized and rendered empty initially. Once the connected pivot control widget is rendered completely, + * PivotSchemaDesigner will just be populated with data source by setting this property to “true”. + * @Default {false} + */ + enableWrapper?: boolean; + + /** Allows the user to view PivotTable Field List from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Sets the visibility of OLAP elements in PivotTable Field List. This is only applicable for OLAP datasource. + * @Default {null} + */ + olap?: Olap; + + /** Allows the user to enable/disable drag and drop operations within the PivotTable Field List. + * @Default {true} + */ + enableDragDrop?: boolean; + + /** Sets the height for PivotSchemaDesigner. + * @Default {“”} + */ + height?: string; + + /** Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /** Sets the Pivot control bound with this PivotSchemaDesigner. + * @Default {null} + */ + pivotControl?: any; + + /** Allows the user to set custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethod?: ServiceMethod; + + /** Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /** Sets the width for PivotSchemaDesigner. + * @Default {“”} + */ + width?: string; + + /** Sets the layout for PivotSchemaDesigner. + * @Default {ej.PivotSchemaDesigner.Layouts.Excel} + */ + layout?: ej.PivotSchemaDesigner.Layouts|string; + + /** Triggers when it reaches client-side after any AJAX request. + */ + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; + + /** Triggers before any AJAX request is passed from PivotSchemaDesigner to service methods. + */ + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + + /** Triggers when we start dragging any field from PivotSchemaDesigner. + */ + dragMove?(e: DragMoveEventArgs): void; + } + + export interface AfterServiceInvokeEventArgs { + + /** returns the current action of PivotSchemaDesigner control. + */ + action?: string; + + /** returns the custom object bound with PivotSchemaDesigner control. + */ + customObject?: any; + + /** returns the HTML element of PivotSchemaDesigner control. + */ + element?: any; + } + + export interface BeforeServiceInvokeEventArgs { + + /** returns the current action of PivotSchemaDesigner control. + */ + action?: string; + + /** returns the custom object bound with PivotSchemaDesigner control. + */ + customObject?: any; + + /** returns the HTML element of PivotSchemaDesigner control. + */ + element?: any; + } + + export interface DragMoveEventArgs { + + /** returns the HTML element of the dragged field from PivotSchemaDesigner. + */ + dragTarget?: any; + + /** return the JSON details of the dragged field. + */ + draggedElementData?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotSchemaDesigner model + */ + model?: any; + } + + export interface Olap { + + /** Allows the user to view the KPI elements in tree-view inside PivotTable Field List. This is only applicable for OLAP datasource. + * @Default {false} + */ + showKPI?: boolean; + + /** Allows the user to view the named sets in tree-view inside PivotTable Field List. This is only applicable for OLAP datasource. + * @Default {false} + */ + showNamedSets?: boolean; + } + + export interface ServiceMethod { + + /** Allows the user to set the custom name for the service method responsible for getting the values for the tree-view inside filter dialog. + * @Default {FetchMembers} + */ + fetchMembers?: string; + + /** Allows the user to set the custom name for the service method responsible for filtering operation in Field List. + * @Default {Filtering} + */ + filtering?: string; + + /** Allows the user to set the custom name for the service method responsible for the server-side action, on expanding members in Field List. + * @Default {MemberExpanded} + */ + memberExpand?: string; + + /** Allows the user to set the custom name for the service method responsible for the server-side action, on dropping a node into Field List. + * @Default {NodeDropped} + */ + nodeDropped?: string; + + /** Allows the user to set the custom name for the service method responsible for the server-side action on changing the checked state of a node in Field List. + * @Default {NodeStateModified} + */ + nodeStateModified?: string; + + /** Allows the user to set the custom name for the service method responsible for button removing operation in Field List. + * @Default {RemoveButton} + */ + removeButton?: string; + } + + enum Layouts { + + ///To set the layout as same in the Excel. + Excel, + + ///To set normal layout for Field List. + Normal, + + ///To set layout with the axes one above the other. + OneByOne + } + + } + + class PivotPager extends ej.Widget { + static fn: PivotPager; + constructor(element: JQuery | Element, options?: PivotPager.Model); + static Locale: any; + model: PivotPager.Model; + defaults: PivotPager.Model; + + /** This function initializes the page counts and page numbers for the PivotPager. + * @returns {void} + */ + initPagerProperties(): void; + } + export namespace PivotPager { + + export interface Model { + + /** Contains the current page number in categorical axis. + * @Default {1} + */ + categoricalCurrentPage?: number; + + /** Contains the total page count in categorical axis. + * @Default {1} + */ + categoricalPageCount?: number; + + /** Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /** Sets the pager mode (Only Categorical Pager/Only Series Pager/Both) for the PivotPager. + * @Default {ej.PivotPager.Mode.Both} + */ + mode?: ej.PivotPager.Mode|string; + + /** Contains the current page number in series axis. + * @Default {1} + */ + seriesCurrentPage?: number; + + /** Contains the total page count in series axis. + * @Default {1} + */ + seriesPageCount?: number; + + /** Contains the ID of the target element for which paging needs to be done. + * @Default {“”} + */ + targetControlID?: string; + } + + enum Mode { + + ///To set both categorical and series pager for paging. + Both, + + ///To set only categorical pager for paging. + Categorical, + + ///To set only series pager for paging. + Series + } + + } + + class PivotChart extends ej.Widget { + static fn: PivotChart; + constructor(element: JQuery | Element, options?: PivotChart.Model); + static Locale: any; + model: PivotChart.Model; + defaults: PivotChart.Model; + + /** Performs an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + + /** Exports the PivotChart to the format specified in the parameter. + * @returns {void} + */ + exportPivotChart(): void; + + /** This function renders the PivotChart control with the JSON formatted datasource. + * @returns {void} + */ + renderChartFromJSON(): void; + + /** This function receives the update from service-end, which would be utilized for rendering the widget. + * @returns {void} + */ + renderControlSuccess(): void; + + /** Returns the OlapReport string maintained along with the axis elements information. + * @returns {string} + */ + getOlapReport(): string; + + /** Sets the OlapReport string along with the axis information and maintains it in a property. + * @returns {void} + */ + setOlapReport(): void; + + /** Returns the JSON records formed to render the control. + * @returns {any[]} + */ + getJSONRecords(): any[]; + + /** Sets the JSON records to render the control. + * @returns {void} + */ + setJSONRecords(): void; + + /** Returns the PivotEngine formed to render the control. + * @returns {any[]} + */ + getPivotEngine(): any[]; + + /** Sets the PivotEngine required to render the control. + * @returns {void} + */ + setPivotEngine(): void; + + /** Re-renders the control with the data source at the instant. + * @returns {void} + */ + refreshControl(): void; + + /** Renders the control with the pivot engine obtained from olap cube. + * @returns {void} + */ + generateJSON(): void; + + /** Navigates to the specified page number in specified axis. + * @returns {void} + */ + refreshPagedPivotChart(): void; + } + export namespace PivotChart { + + export interface Model { + + /** Sets the mode for the PivotChart widget for binding either OLAP or Relational data source. + * @Default {ej.Pivot.AnalysisMode.Pivot} + */ + analysisMode?: ej.Pivot.AnalysisMode|string; + + /** Specifies the CSS class to PivotChart to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Options for enabling zooming feature of PivotChart. + * @Default {{}} + */ + zooming?: Zooming; + + /** Options available to configure the properties of entire series. You can also override the options for specific series by using series collection. + * @Default {{}} + */ + commonSeriesOptions?: CommonSeriesOptions; + + /** Initializes the data source for the PivotChart widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /** Object utilized to pass additional information between client-end and service-end on operating the control in server mode. + * @Default {{}} + */ + customObject?: any; + + /** Allows the user to enable 3D view of PivotChart. + * @Default {false} + */ + enable3D?: boolean; + + /** Allows the user to view PivotChart from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows user to render complete PivotChart on drill operation, that is, when expanding and collapsing members which are shown in multi-level labels. + * @Default {false} + */ + enableMultiLevelLabels?: boolean; + + /** Allows the user to enable PivotChart’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /** Lets the user to customize the legend items and their labels. + * @Default {{}} + */ + legend?: any; + + /** Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /** Sets the mode for the PivotChart widget for binding data source either in server-side or client-side. + * @Default {ej.Pivot.OperationalMode.ClientMode} + */ + operationalMode?: ej.Pivot.OperationalMode|string; + + /** This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. To override x axis for particular series, create + * an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s xAxisName property to link both axis and series. + * @Default {{}} + */ + primaryXAxis?: any; + + /** This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. To override y axis for particular series, create an + * axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s yAxisName property to link both axis and series. + * @Default {{}} + */ + primaryYAxis?: any; + + /** Allows the user to rotate the angle of PivotChart in 3D view. + * @Default {0} + */ + rotation?: number; + + /** Allows the user to set custom name for the methods at service-end, communicated on AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /** Options to customize the size of the PivotChart control. + * @Default {{}} + */ + size?: any; + + /** Connects the service using the specified URL for any server updates on operating the control in server mode. + * @Default {“”} + */ + url?: string; + + /** Triggers when PivotChart starts to render. + */ + load?(e: LoadEventArgs): void; + + /** Triggers when it reaches client-side after any AJAX request. + */ + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; + + /** Triggers before any AJAX request is passed from PivotChart to service methods. + */ + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + + /** Triggers on performing drill up/down in PivotChart control. + */ + drillSuccess?(e: DrillSuccessEventArgs): void; + + /** Triggers when PivotChart widget completes all operations at client-side after any AJAX request. + */ + renderComplete?(e: RenderCompleteEventArgs): void; + + /** Triggers when any error occurred during AJAX request. + */ + renderFailure?(e: RenderFailureEventArgs): void; + + /** Triggers when PivotChart successfully reaches client-side after any AJAX request. + */ + renderSuccess?(e: RenderSuccessEventArgs): void; + + /** Triggers before performing exporting in pivot chart. + */ + beforeExport?(e: BeforeExportEventArgs): void; + } + + export interface LoadEventArgs { + + /** returns the current action of PivotChart control. + */ + action?: string; + + /** returns the custom object bound with PivotChart control. + */ + customObject?: any; + + /** returns the HTML element of PivotChart control. + */ + element?: any; + } + + export interface AfterServiceInvokeEventArgs { + + /** returns the current action of PivotChart control. + */ + action?: string; + + /** returns the custom object bound with PivotChart control. + */ + customObject?: any; + /** returns the HTML element of PivotChart control. + */ + element?: any; + } - enum PrintMode { + export interface BeforeServiceInvokeEventArgs { - ///Prints all pages. - AllPages, + /** returns the current action of PivotChart control. + */ + action?: string; - ///Prints current page. - CurrentPage - } + /** returns the custom object bound with PivotChart control. + */ + customObject?: any; + /** returns the HTML element of PivotChart control. + */ + element?: any; + } - enum ResizeMode { + export interface DrillSuccessEventArgs { - ///New column size will be adjusted by all other Columns - Normal, + /** returns the current instance of PivotChart. + */ + chartObj?: any; - ///New column Size will be adjusted using next column. - NextColumn, + /** returns the drill action of PivotChart. + */ + drillAction?: string; - ///New column Size will be adjusted using entire control - Control - } + /** contains the name of the member drilled. + */ + drilledMember?: string; + /** returns the event object. + */ + event?: any; + } - enum SelectionType { + export interface RenderCompleteEventArgs { - ///Specifies the selection type as single. - Single, + /** returns the current action of PivotChart control. + */ + action?: string; - ///Specifies the selection type as multiple. - Multiple - } + /** returns the custom object bound with PivotChart control. + */ + customObject?: any; + /** returns the HTML element of PivotChart control. + */ + element?: any; + } - enum VirtualScrollMode { + export interface RenderFailureEventArgs { - ///virtual scroll mode is normal. - Normal, + /** returns the current action of PivotChart control. + */ + action?: string; - ///virtual scroll mode is continuous. - Continuous - } + /** returns the custom object bound with PivotChart control. + */ + customObject?: any; + /** returns the HTML element of PivotChart control. + */ + element?: any; - enum SummaryType { + /** returns the error stack trace of the original exception. + */ + message?: string; + } - ///Summary type is average. - Average, + export interface RenderSuccessEventArgs { - ///Summary type is minimum. - Minimum, + /** returns the current instance of PivotChart. + */ + args?: any; + } - ///Summary type is maximum. - Maximum, + export interface BeforeExportEventArgs { - ///Summary type is count. - Count, + /** contains the url of the service responsible for exporting. + */ + url?: string; - ///Summary type is sum. - Sum, + /** contains the name of the exporting file. + */ + fileName?: string; + } - ///Summary type is custom. - Custom, + export interface Zooming { - ///Summary type is true count. - TrueCount, + /** Enables or disables horizontal scrollbar. + * @Default {false} + */ + enableScrollbar?: boolean; + } - ///Summary type is false count. - FalseCount - } + export interface CommonSeriesOptions { + /** Allows the user to set the specific chart type for PivotChart widget. + * @Default {ej.PivotChart.ChartTypes.Column} + */ + type?: ej.PivotChart.ChartTypes|string; + } - enum WrapMode { + export interface DataSourceColumnsFilterItems { - ///Auto wrap is applied for both content and header. - Both, + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; - ///Auto wrap is applied only for content. - Content, + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } - ///Auto wrap is applied only for header. - Header - } + export interface DataSourceColumn { + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; - enum ToolBarItems { + /** Allows the user to set the display caption for an item. + */ + fieldCaption?: string; - ///Toolbar item is add. - Add, + /** Allows the user to indicate whether the added item is a named set or not. + * @Default {false} + */ + isNamedSets?: boolean; + + /** Allows the user to set the sorting order of the members of the field. + * @Default {ej.PivotAnalysis.SortOrder.Ascending} + */ + sortOrder?: ej.PivotAnalysis.SortOrder|string; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceColumnsFilterItems; + } + + export interface DataSourceRowsFilterItems { + + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; + + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceRow { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display caption for an item. + */ + fieldCaption?: string; + + /** Allows the user to indicate whether the added item is a named set or not. + * @Default {false} + */ + isNamedSets?: boolean; + + /** Allows the user to set the sorting order of the members of the field. + * @Default {ej.PivotAnalysis.SortOrder.Ascending} + */ + sortOrder?: ej.PivotAnalysis.SortOrder|string; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceRowsFilterItems; + } + + export interface DataSourceValuesMeasure { + + /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. + */ + fieldName?: string; + } + + export interface DataSourceValue { + + /** Allows the user to bind the item by using its unique name as field name for Relational datasource. + */ + fieldName?: string; + + /** Allows the user to set the display caption for an item for Relational datasource. + */ + fieldCaption?: string; + + /** This holds the list of unique names of measures to bind them from the OLAP cube. + * @Default {[]} + */ + measures?: DataSourceValuesMeasure[]; + + /** Allows to set the axis name to place the measures items. + * @Default {rows} + */ + axis?: string; + + /** Indicates whether the field is a calculated field or not with Relational datasource. + * @Default {false} + */ + isCalculatedField?: boolean; + + /** Allows to set the formula for calculation of values for calculated members in Relational datasource. + */ + formula?: string; + } + + export interface DataSourceFiltersFilterItems { + + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; + + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceFilter { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceFiltersFilterItems; + } + + export interface DataSource { + + /** Contains the respective cube name from OLAP database as string type. + * @Default {“”} + */ + cube?: string; + + /** To set the data source name to fetch data from that. + * @Default {“”} + */ + sourceInfo?: string; - ///Toolbar item is edit. - Edit, + /** Set the provider name for PivotChart to identify whether the provider is SSAS or Mondrian. + * @Default {ssas} + */ + providerName?: string; - ///Toolbar item is delete. - Delete, + /** Provides the raw data source for the PivotChart. + * @Default {null} + */ + data?: any; - ///Toolbar item is update. - Update, + /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. + * @Default {“”} + */ + catalog?: string; - ///Toolbar item is cancel. - Cancel, + /** Lists out the items to be displayed as series of PivotChart. + * @Default {[]} + */ + columns?: DataSourceColumn[]; - ///Toolbar item is search. - Search, + /** Lists out the items to be displayed as segments of PivotChart. + * @Default {[]} + */ + rows?: DataSourceRow[]; - ///Toolbar item is pdfExport. - PdfExport, + /** Lists out the items supports calculation in PivotChart. + * @Default {[]} + */ + values?: DataSourceValue[]; - ///Toolbar item is printGrid. - PrintGrid, + /** Lists out the items which supports filtering of values without displaying the members in UI in PivotChart. + * @Default {[]} + */ + filters?: DataSourceFilter[]; + } + + export interface ServiceMethodSettings { - ///Toolbar item is wordExport. - WordExport - } + /** Allows the user to set the custom name for the service method responsible for drilling up/down operation in PivotChart. + * @Default {DrillChart} + */ + drillDown?: string; - } + /** Allows the user to set the custom name for the service method responsible for exporting. + * @Default {Export} + */ + exportPivotChart?: string; - class Sparkline extends ej.Widget { - static fn: Sparkline; - constructor(element: JQuery | Element, options?: Sparkline.Model); - static Locale: any; - model: Sparkline.Model; - defaults: Sparkline.Model; + /** Allows the user to set the custom name for the service method responsible for initializing PivotChart. + * @Default {InitializeChart} + */ + initialize?: string; - /** Redraws the entire sparkline. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. - * @returns {void} - */ - redraw(): void; - } - export namespace Sparkline { + /** Allows the user to set the custom name for the service method responsible for navigating between pages in paged PivotChart. + * @Default {Paging} + */ + paging?: string; + } + + enum ChartTypes { + + ///To render a Line type PivotChart. + Line, + + ///To render a Spline type PivotChart. + Spline, + + ///To render a Column type PivotChart. + Column, + + ///To render an Area type PivotChart. + Area, + + ///To render a SplineArea type PivotChart. + SplineArea, - export interface Model { + ///To render a StepLine type PivotChart. + StepLine, + + ///To render a StepArea type PivotChart. + StepArea, + + ///To render a Pie type PivotChart. + Pie, + + ///To render a Bar type PivotChart. + Bar, + + ///To render a StackingArea type PivotChart. + StackingArea, + + ///To render a StackingColumn type PivotChart. + StackingColumn, + + ///To render a StackingBar type PivotChart. + StackingBar, + + ///To render a Pyramid type PivotChart. + Pyramid, + + ///To render a Funnel type PivotChart. + Funnel, + + ///To render a Doughnut type PivotChart. + Doughnut, + + ///To render a Scatter type PivotChart. + Scatter, + + ///To render a Bubble type PivotChart. + Bubble + } + + } + + class PivotClient extends ej.Widget { + static fn: PivotClient; + constructor(element: JQuery | Element, options?: PivotClient.Model); + static Locale: any; + model: PivotClient.Model; + defaults: PivotClient.Model; + + /** Performs an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Performs an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + + /** Navigates to the specified page in specified axis. + * @returns {void} + */ + refreshPagedPivotClient(): void; + + /** Updates the PivotClient component with the JSON data fetched from the service on navigating between pages. + * @returns {void} + */ + refreshPagedPivotClientSuccess(): void; + + /** Renders the PivotChart and PivotGrid with the JSON data provided. + * @returns {void} + */ + generateJSON(): void; + + /** Re-renders the control with the report at that instant. + * @returns {void} + */ + refreshControl(): void; + + /** Returns the OlapReport string maintained along with the axis elements information. + * @returns {string} + */ + getOlapReport(): string; + + /** Sets the OlapReport string along with the axis information and maintains it in a property. + * @returns {void} + */ + setOlapReport(): void; + + /** Returns the JSON records formed to render the control. + * @returns {any[]} + */ + getJSONRecords(): any[]; + + /** Sets the JSON records formed to render the control to a property. + * @returns {void} + */ + setJSONRecords(): void; + } + export namespace PivotClient { + + export interface Model { + + /** Sets the mode for the PivotClient widget for binding either OLAP or Relational data source. + * @Default {ej.Pivot.AnalysisMode.Pivot} + */ + analysisMode?: ej.Pivot.AnalysisMode|string; + + /** Allows the user to set the specific chart type for PivotChart inside PivotClient widget. + * @Default {ej.PivotChart.ChartTypes.Column} + */ + chartType?: ej.PivotChart.ChartTypes|string; + + /** Allows the user to set the content on exporting the PivotClient widget. + * @Default {ej.PivotClient.ClientExportMode.ChartAndGrid} + */ + clientExportMode?: ej.PivotClient.ClientExportMode|string; + + /** Specifies the CSS class to PivotClient to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Object utilized to pass additional information between client-end and service-end when the control functions in server-mode. + * @Default {{}} + */ + customObject?: any; + + /** Initializes the data source for the PivotClient widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /** Allows the user to customize the widget's layout and appearance. + * @Default {{}} + */ + displaySettings?: DisplaySettings; + + /** Allows user to set visibility of icons in toolbar panel. + * @Default {{}} + */ + toolbarIconSettings?: ToolbarIconSettings; + + /** Allows user to show unique name on pivotbutton. + * @Default {false} + */ + showUniqueNameOnPivotButton?: boolean; + + /** Enables the splitter option for resizing the elements inside the control. + * @Default {false} + */ + enableSplitter?: boolean; + + /** Enables the advanced filtering options Value Filtering, Label Filtering and Sorting for each dimensions on binding OLAP data in server mode. + * @Default {false} + */ + enableAdvancedFilter?: boolean; + + /** Allows the user to refresh the control on-demand and not during every UI operation. + * @Default {false} + */ + enableDeferUpdate?: boolean; + + /** Lets the user to save and load reports in a customized way with the help of events. + * @Default {false} + */ + enableLocalStorage?: boolean; + + /** Allows the user to enable paging for both the PivotChart and PivotGrid components for the ease of viewing large data. + * @Default {false} + */ + enablePaging?: boolean; + + /** Allows the user to include the PivotTreeMap component as one of the chart types. + * @Default {false} + */ + enablePivotTreeMap?: boolean; + + /** Allows the user to view the layout of PivotClient from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Enables/disables the visibility of measure group selector drop-down in Cube Browser. + * @Default {false} + */ + enableMeasureGroups?: boolean; + + /** Allows the user to enable virtual scrolling for both the PivotChart and PivotGrid components for the ease of viewing large data. + * @Default {false} + */ + enableVirtualScrolling?: boolean; + + /** Enables/Disables paging in Member Editor for viewing the large count of members in pages. + * @Default {false} + */ + enableMemberEditorPaging?: boolean; + + /** Allows the user to set the number of members to be displayed in each page of Member Editor on applying paging in it. + * @Default {100} + */ + memberEditorPageSize?: number; + + /** Sets the summary layout for PivotGrid. Following are the ways in which summary can be positioned: normal summary (bottom), top summary, no summary and excel-like summary. + * @Default {ej.PivotGrid.Layout.Normal} + */ + gridLayout?: ej.PivotGrid.Layout|string; + + /** Allows the user to hide PivotClient's Cube Browser and Axis Element Builder while initiate the widget. + * @Default {false} + */ + collapseCubeBrowserByDefault?: boolean; + + /** Allows the user to enable PivotClient’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /** Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /** Sets the mode for the PivotClient widget for binding data source either in server-side or client-side. + * @Default {ej.Pivot.OperationalMode.ClientMode} + */ + operationalMode?: ej.Pivot.OperationalMode|string; + + /** Allows the user to set custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /** Sets the title for PivotClient widget. + */ + title?: string; + + /** Connects the service using the specified URL for any server updates. + */ + url?: string; + + /** Triggers when it reaches client-side after any AJAX request. + */ + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; + + /** Triggers before any AJAX request is passed from client-side to service methods. + */ + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + + /** Triggers before saving the current collection of reports. + */ + saveReport?(e: SaveReportEventArgs): void; + + /** Triggers before loading a saved collection of reports. + */ + loadReport?(e: LoadReportEventArgs): void; + + /** Triggers before fetching the report collection from storage. + */ + fetchReport?(e: FetchReportEventArgs): void; + + /** Triggers before exporting the control. + */ + beforeExport?(e: BeforeExportEventArgs): void; + + /** Triggers before rendering the PivotChart. + */ + chartLoad?(e: ChartLoadEventArgs): void; + + /** Triggers before rendering the PivotTreeMap. + */ + treeMapLoad?(e: TreeMapLoadEventArgs): void; + + /** Triggers while we initiate loading of the widget. + */ + load?(e: LoadEventArgs): void; + + /** Triggers when PivotClient widget completes all operations at client-end after any AJAX request. + */ + renderComplete?(e: RenderCompleteEventArgs): void; - /** Background color of the plot area. - * @Default {transparent} - */ - background?: string; + /** Triggers when any error occurred during AJAX request. + */ + renderFailure?(e: RenderFailureEventArgs): void; - /** Fill color for the sparkline series. - * @Default {#33ccff} - */ - fill?: string; + /** Triggers when PivotClient successfully completes rendering. + */ + renderSuccess?(e: RenderSuccessEventArgs): void; + } - /** Border color of the series. - * @Default {null} - */ - stroke?: string; + export interface AfterServiceInvokeEventArgs { - /** Options for customizing the color, opacity and width of the sparkline border. - */ - border?: Border; + /** returns the current action of PivotClient control. + */ + action?: string; - /** Border width of the series. - * @Default {1} - */ - width?: number; + /** returns the custom object bounds with PivotClient control. + */ + customObject?: any; - /** Opacity of the series. - * @Default {1} - */ - opacity?: number; + /** returns the HTML element of PivotClient control. + */ + element?: any; + } - /** Color for series high point. - * @Default {null} - */ - highPointColor?: string; + export interface BeforeServiceInvokeEventArgs { - /** Color for series low point. - * @Default {null} - */ - lowPointColor?: string; + /** returns the current action of PivotClient control. + */ + action?: string; - /** Color for series start point. - * @Default {null} - */ - startPointColor?: string; + /** returns the custom object bounds with PivotClient control. + */ + customObject?: any; - /** Color for series end point. - * @Default {null} - */ - endPointColor?: string; + /** returns the HTML element of PivotClient control. + */ + element?: any; + } - /** Color for series negative point. - * @Default {null} - */ - negativePointColor?: string; + export interface SaveReportEventArgs { - /** Options for customizing the color, opacity of the sparkline start and end range. - */ - rangeBandSettings?: RangeBandSettings; - - /** Name of a field in data source, where the fill color for all the data points is generated. - */ - palette?: string; - - /** Controls whether sparkline has to be responsive or not. - * @Default {true} - */ - isResponsive?: boolean; - - /** Controls whether Sparkline has to be rendered as Canvas or SVG.Canvas rendering supports all functionalities in SVG rendering. - * @Default {false} - */ - enableCanvasRendering?: boolean; - - /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. - * @Default {null} - */ - dataSource?: any; - - /** Name of the property in the datasource that contains x value for the series. - * @Default {null} - */ - xName?: string; - - /** Name of the property in the datasource that contains y value for the series. - * @Default {null} - */ - yName?: string; - - /** Gap or padding for sparkline. - * @Default {8} - */ - padding?: number; - - /** Specifies the type of the series to render in sparkline. - * @Default {line. See Type} - */ - type?: ej.datavisualization.Sparkline.Type | string; - - /** Specifies the theme for Sparkline. - * @Default {Flatlight. See Theme} - */ - theme?: ej.datavisualization.Sparkline.Theme | string; - - /** Options to customize the tooltip. - */ - tooltip?: Tooltip; - - /** Options for displaying and customizing marker for a data point. - */ - markerSettings?: MarkerSettings; + /** returns the current instance of PivotClient control. + */ + targetControl?: any; - /** Options to customize the Sparkline size. - */ - size?: Size; + /** returns the object which holds the necessary parameters required for saving the report collection. + */ + saveReportSetting?: any; + } - /** Options for customizing the color,dashArray and width of the axisLine. - */ - axisLineSettings?: AxisLineSettings; + export interface LoadReportEventArgs { - /** Fires before loading the sparkline. */ - load?(e: LoadEventArgs): void; - - /** Fires after loaded the sparkline. */ - loaded?(e: LoadedEventArgs): void; + /** returns the current instance of PivotClient control. + */ + targetControl?: any; - /** Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip. */ - tooltipInitialize?(e: TooltipInitializeEventArgs): void; + /** returns the object which holds the necessary parameters required for loading a report collection from database. + */ + loadReportSetting?: any; + } - /** Fires before rendering a series. This event is fired for each series in Sparkline. */ - seriesRendering?(e: SeriesRenderingEventArgs): void; + export interface FetchReportEventArgs { - /** Fires when mouse is moved over a point. */ - pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; + /** returns the current instance of PivotClient control. + */ + targetControl?: any; - /** Fires on clicking a point in sparkline. You can use this event to handle clicks made on points. */ - pointRegionMouseClick?(e: PointRegionMouseClickEventArgs): void; + /** returns the object which holds the necessary parameters required for fetching the report names stored in database. + */ + fetchReportSetting?: any; + } - /** Fires on moving mouse over the sparkline. */ - sparklineMouseMove?(e: SparklineMouseMoveEventArgs): void; + export interface BeforeExportEventArgs { - /** Fires on moving mouse outside the sparkline. */ - sparklineMouseLeave?(e: SparklineMouseLeaveEventArgs): void; - } + /** holds the url of the service method responsible for exporting the PivotClient control. + */ + url?: string; - export interface LoadEventArgs { + /** holds the name of the file to be exported. + */ + fileName?: string; + } - /** Set this option to true to cancel the event - */ - cancel?: boolean; + export interface ChartLoadEventArgs { - /** Instance of the sparkline model object - */ - model?: any; + /** returns the current action of PivotChart control. + */ + action?: string; - /** Name of the event - */ - type?: string; - } + /** returns the custom object bound with PivotChart control. + */ + customObject?: any; - export interface LoadedEventArgs { + /** returns the HTML element of PivotChart control. + */ + element?: any; + } - /** Set this option to true to cancel the event - */ - cancel?: boolean; + export interface TreeMapLoadEventArgs { - /** Instance of the sparkline model object - */ - model?: any; + /** returns the current action of PivotTreeMap control. + */ + action?: string; - /** Name of the event - */ - type?: string; - } + /** returns the custom object bound with PivotTreeMap control. + */ + customObject?: any; - export interface TooltipInitializeEventArgs { + /** returns the HTML element of PivotTreeMap control. + */ + element?: any; + } - /** Set this option to true to cancel the event - */ - cancel?: boolean; + export interface LoadEventArgs { - /** Instance of the sparkline model object - */ - model?: any; + /** returns the HTML element of PivotClient component. + */ + element?: any; - /** Name of the event - */ - type?: string; + /** returns the custom object bound with PivotTreeMap control. + */ + customObject?: any; + } - /** X Location of the trackball tooltip in pixels - */ - locationX?: any; + export interface RenderCompleteEventArgs { - /** Y Location of the trackball tooltip in pixels - */ - locationY?: any; + /** returns the HTML element of PivotClient component. + */ + element?: any; - /** Index of the point for which trackball tooltip is displayed - */ - pointIndex?: number; + /** returns the custom object bound with PivotTreeMap control. + */ + customObject?: any; + } - /** Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip - */ - currentText?: string; - } + export interface RenderFailureEventArgs { - export interface SeriesRenderingEventArgs { + /** returns the custom object bound with the control. + */ + customObject?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the HTML element of PivotClient control. + */ + element?: any; - /** Instance of the sparkline model object - */ - model?: any; + /** returns the error message with error code. + */ + message?: string; + } - /** Name of the event - */ - type?: string; + export interface RenderSuccessEventArgs { - /** Minimum x value of the data point - */ - minX?: any; + /** returns the object of PivotClient control at that instant. + */ + args?: any; + } - /** Minimum y value of the data point - */ - minY?: any; + export interface DataSourceColumnsAdvancedFilter { - /** Maximum x value of the data point - */ - maxX?: any; + /** Allows the user to provide level unique name to perform advanced filtering. + */ + name?: string; - /** Maximum y value of the data point - */ - maxY?: any; - } + /** Allows the user to set the operator to perform Label Filtering. + * @Default {none} + */ + labelFilterOperator?: string; - export interface PointRegionMouseMoveEventArgs { + /** Allows the user to set the operator to perform Value Filtering. + * @Default {none} + */ + valueFilterOperator?: string; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Allows the user to set the filtering type while performing advanced filtering. + */ + advancedFilterType?: string; - /** Instance of the sparkline model object - */ - model?: any; + /** In case of value filtering, this property contains the measure name to which the filter is applied. + */ + measure?: string; - /** Name of the event - */ - type?: string; + /** Allows the user to hold the filter operand values in advanced filtering. + */ + values?: any[]; + } + + export interface DataSourceColumnsFilterItems { - /** X-coordinate of point in pixel - */ - locationX?: number; + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; + + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceColumn { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display caption for an item. + */ + fieldCaption?: string; + + /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. + * @Default {[]} + */ + advancedFilter?: DataSourceColumnsAdvancedFilter[]; + + /** Allows the user to indicate whether the added item is a named set or not. + * @Default {false} + */ + isNamedSets?: boolean; + + /** Shows/Hides the sub-total of the field in PivotGrid. + * @Default {true} + */ + showSubTotal?: boolean; + + /** Allows to set the format for the column headers. + */ + format?: string; + + /** This property sets type of display of date. + */ + formatString?: string; + + /** Allows to set the custom theme for the column headers. + */ + cssClass?: string; + + /** Allows the user to set the sorting order of the members of the field. + * @Default {ej.PivotAnalysis.SortOrder.Ascending} + */ + sortOrder?: ej.PivotAnalysis.SortOrder|string; + + /** Contains the list of members need to be drilled down by default in the field. + * @Default {[]} + */ + drilledItems?: any[]; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceColumnsFilterItems; + } + + export interface DataSourceRowsAdvancedFilter { + + /** Allows the user to provide level unique name to perform advanced filtering. + */ + name?: string; + + /** Allows the user to set the operator to perform Label Filtering. + * @Default {none} + */ + labelFilterOperator?: string; + + /** Allows the user to set the operator to perform Value Filtering. + * @Default {none} + */ + valueFilterOperator?: string; + + /** Allows the user to set the filtering type while performing advanced filtering. + */ + advancedFilterType?: string; + + /** In case of value filtering, this property contains the measure name to which the filter is applied. + */ + measure?: string; + + /** Allows the user to hold the filter operand values in advanced filtering. + */ + values?: any[]; + } + + export interface DataSourceRowsFilterItems { + + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; + + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceRow { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display caption for an item. + */ + fieldCaption?: string; + + /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. + * @Default {[]} + */ + advancedFilter?: DataSourceRowsAdvancedFilter[]; + + /** Allows the user to indicate whether the added item is a named set or not. + * @Default {false} + */ + isNamedSets?: boolean; + + /** Shows/Hides the sub-total of the field. + * @Default {true} + */ + showSubTotal?: boolean; + + /** Allows to set the format for the row headers. + */ + format?: string; + + /** This property sets type of display of date. + */ + formatString?: string; + + /** Allows to set the custom theme for the row headers. + */ + cssClass?: string; + + /** Allows the user to set the sorting order of the members of the field. + * @Default {ej.PivotAnalysis.SortOrder.Ascending} + */ + sortOrder?: ej.PivotAnalysis.SortOrder|string; + + /** Contains the list of members need to be drilled down by default in the field. + * @Default {[]} + */ + drilledItems?: any[]; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceRowsFilterItems; + } + + export interface DataSourceValuesMeasure { + + /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. + */ + fieldName?: string; + } + + export interface DataSourceValue { + + /** Allows the user to bind the item by using its unique name as field name for Relational datasource. + */ + fieldName?: string; + + /** Allows the user to set the display caption for an item for Relational datasource. + */ + fieldCaption?: string; + + /** This holds the list of unique names of measures to bind them from the OLAP cube. + * @Default {[]} + */ + measures?: DataSourceValuesMeasure[]; + + /** Allows to set the axis name to place the measures items. + * @Default {rows} + */ + axis?: string; + + /** Indicates whether the field is a calculated field or not with Relational datasource. + * @Default {false} + */ + isCalculatedField?: boolean; + + /** Allows to set the type of PivotGrid summary calculation for the value field with Relational datasource. + * @Default {ej.PivotAnalysis.SummaryType.Sum} + */ + summaryType?: ej.PivotAnalysis.SummaryType|string; + + /** Allows to set the format of the values. + */ + format?: string; + + /** This property sets type of display of date. + */ + formatString?: string; + + /** Allows to set the custom theme for the values. + */ + cssClass?: string; + + /** Allows to set the formula for calculation of values for calculated members in Relational datasource. + */ + formula?: string; + } + + export interface DataSourceFiltersFilterItems { + + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; + + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceFilter { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceFiltersFilterItems; + } + + export interface DataSourcePagerOptions { + + /** Allows to set the number of categorical columns to be displayed in each page on applying paging. + * @Default {0} + */ + categoricalPageSize?: number; + + /** Allows to set the number of series rows to be displayed in each page on applying paging. + * @Default {0} + */ + seriesPageSize?: number; + + /** Allows to set the page number in categorical axis to be loaded by default. + * @Default {1} + */ + categoricalCurrentPage?: number; + + /** Allows to set the page number in series axis to be loaded by default. + * @Default {1} + */ + seriesCurrentPage?: number; + } + + export interface DataSource { + + /** Lists out the items to be arranged in columns section of PivotClient. + * @Default {[]} + */ + columns?: DataSourceColumn[]; + + /** Lists out the items to be arranged in rows section of PivotClient. + * @Default {[]} + */ + rows?: DataSourceRow[]; + + /** Lists out the items which supports calculation in PivotClient. + * @Default {[]} + */ + values?: DataSourceValue[]; + + /** Lists out the items which supports filtering of values without displaying the members in UI in PivotClient. + * @Default {[]} + */ + filters?: DataSourceFilter[]; + + /** Contains the respective cube name from OLAP database as string type. + * @Default {“”} + */ + cube?: string; + + /** To set the data source name to fetch data from that. + * @Default {“”} + */ + sourceInfo?: string; + + /** Set the provider name for PivotClient to identify whether the provider is SSAS or Mondrian. + * @Default {ssas} + */ + providerName?: string; + + /** Provides the raw data source for the PivotClient. + * @Default {null} + */ + data?: any; + + /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. + * @Default {“”} + */ + catalog?: string; + + /** Allows user to filter the members (by its name and values) through advanced filtering (excel-like) option in client-mode. + * @Default {false} + */ + enableAdvancedFilter?: boolean; + + /** Sets a name to the report bound to the control. + */ + reportName?: string; + + /** Allows to set the page size and current page number for each axis on applying paging. + * @Default {{}} + */ + pagerOptions?: DataSourcePagerOptions; + } + + export interface DisplaySettings { + + /** Lets the user to customize the display of PivotChart and PivotGrid widgets, either in tabs or tiles. + * @Default {ej.PivotClient.ControlPlacement.Tab} + */ + controlPlacement?: ej.PivotClient.ControlPlacement|string; + + /** Lets the user to set either Chart or Grid as the start-up widget. + * @Default {ej.PivotClient.DefaultView.Grid} + */ + defaultView?: ej.PivotClient.DefaultView|string; + + /** Lets the user to have an option for switching to full screen view of PivotChart and PivotGrid from default view in PivotClient. + * @Default {false} + */ + enableFullScreen?: boolean; + + /** Enables an option to enhance the space for PivotGrid and PivotChart by hiding Cube Browser and Axis Element Builder. + * @Default {false} + */ + enableTogglePanel?: boolean; + + /** Sets the display mode (Only Chart/Only Grid/Both) in PivotClient. + * @Default {ej.PivotClient.DisplayMode.ChartAndGrid} + */ + mode?: ej.PivotClient.DisplayMode|string; + } + + export interface ToolbarIconSettings { + + /** Allows user to set the visibility of Add Report icon in toolbar panel. + * @Default {true} + */ + enableAddReport?: boolean; + + /** Allows user to set the visibility of New Report icon in toolbar panel. + * @Default {true} + */ + enableNewReport?: boolean; + + /** Allows user to set the visibility of Rename Report icon in toolbar panel. + * @Default {true} + */ + enableRenameReport?: boolean; + + /** Allows user to set the visibility of DB Manipulation icon in toolbar panel. + * @Default {true} + */ + enableDBManipulation?: boolean; + + /** Allows user to set the visibility of Word Export icon in toolbar panel. + * @Default {true} + */ + enableWordExport?: boolean; + + /** Allows user to set the visibility of Excel Export icon in toolbar panel. + * @Default {true} + */ + enableExcelExport?: boolean; + + /** Allows user to set the visibility of PDF Export icon in toolbar panel. + * @Default {true} + */ + enablePdfExport?: boolean; + + /** Allows user to set the visibility of MDX Query icon in toolbar panel. + * @Default {true} + */ + enableMDXQuery?: boolean; + + /** Allows user to set the visibility of Defer Update icon in toolbar panel. + * @Default {false} + */ + enableDeferUpdate?: boolean; + + /** Allows user to set the visibility of Full Screen icon in toolbar panel. + * @Default {false} + */ + enableFullScreen?: boolean; + + /** Allows user to set the visibility of Sort/Filter Column icon in toolbar panel. + * @Default {true} + */ + enableSortOrFilterColumn?: boolean; + + /** Allows user to set the visibility of Sort/Filter Row icon in toolbar panel. + * @Default {true} + */ + enableSortOrFilterRow?: boolean; + + /** Allows user to set the visibility of Toggle Axis icon in toolbar panel. + * @Default {true} + */ + enableToggleAxis?: boolean; + + /** Allows user to set the visibility of Chart Types icon in toolbar panel. + * @Default {true} + */ + enableChartTypes?: boolean; + + /** Allows user to set the visibility of Remove Report icon in toolbar panel. + * @Default {true} + */ + enableRemoveReport?: boolean; + + /** Allows user to set the visibility of Calculated Member icon in toolbar panel. + * @Default {false} + */ + enableCalculatedMember?: boolean; + } + + export interface ServiceMethodSettings { + + /** Allows the user to set the custom name for the service method responsible for updating the entire report and widget, while changing the Cube. + * @Default {CubeChanged} + */ + cubeChanged?: string; + + /** Allows the user to set the custom name for the service method responsible for exporting. + * @Default {Export} + */ + exportPivotClient?: string; + + /** Allows the user to set the custom name for the service method responsible to get the members for the tree-view, inside member-editor dialog. + * @Default {FetchMemberTreeNodes} + */ + fetchMemberTreeNodes?: string; + + /** Allows the user to set the custom name for the service method responsible for fetching the report names from the database. + * @Default {FetchReportListFromDB} + */ + fetchReportList?: string; + + /** Allows the user to set the custom name for the service method responsible for updating report while filtering members. + * @Default {FilterElement} + */ + filterElement?: string; + + /** Allows the user to set the custom name for the service method responsible for initializing PivotClient. + * @Default {InitializeClient} + */ + initialize?: string; + + /** Allows the user to set the custom name for the service method responsible for loading a report collection from the database. + * @Default {LoadReportFromDB} + */ + loadReport?: string; + + /** Allows the user to set the custom name for the service method responsible for retrieving the MDX query for the current report. + * @Default {GetMDXQuery} + */ + mdxQuery?: string; + + /** Allows the user to set the custom name for the service method responsible for updating the tree-view inside Cube Browser, while changing the measure group. + * @Default {MeasureGroupChanged} + */ + measureGroupChanged?: string; + + /** Allows the user to set the custom name for the service method responsible to get the child members, on tree-view node expansion. + * @Default {MemberExpanded} + */ + memberExpand?: string; + + /** Allows the user to set the custom name for the service method responsible for updating report while dropping a node/SplitButton inside Axis Element Builder. + * @Default {NodeDropped} + */ + nodeDropped?: string; + + /** Allows the user to set the custom name for the service method responsible for updating report while removing SplitButton from Axis Element Builder. + * @Default {RemoveSplitButton} + */ + removeSplitButton?: string; + + /** Allows the user to set the custom name for the service method responsible for saving the report collection to database. + * @Default {SaveReportToDB} + */ + saveReport?: string; + + /** Allows the user to set the custom name for the service method responsible for toggling the elements in row and column axes. + * @Default {ToggleAxis} + */ + toggleAxis?: string; + + /** Allows the user to set the custom name for the service method responsible for all the toolbar operations. + * @Default {ToolbarOperations} + */ + toolbarServices?: string; + + /** Allows the user to set the custom name for the service method responsible for updating report collection. + * @Default {UpdateReport} + */ + updateReport?: string; + + /** Allows the user to set the custom name for the service method responsible on navigating between pages in paged PivotClient. + * @Default {Paging} + */ + paging?: string; + + /** Allows the user to set the custom name for the service method responsible for updating report with calculated member. + * @Default {CalculatedMember} + */ + calculatedMember?: string; + } + + enum ClientExportMode { + + ///Exports both the PivotChart and PivotGrid on exporting. + ChartAndGrid, + + ///Exports the PivotChart control alone on exporting. + ChartOnly, + + ///Exports the PivotGrid control alone on exporting. + GridOnly + } + + + enum ControlPlacement { + + ///Displays PivotChart and PivotGrid widgets in separate tabs. + Tab, + + ///Displays PivotChart and PivotGrid widgets one above the other. + Tile + } + + + enum DefaultView { + + ///To set PivotChart as a default control in view. + Chart, + + ///To set PivotGrid as a default control in view. + Grid + } + + + enum DisplayMode { + + ///To display only PivotChart widget. + ChartOnly, + + ///To display only PivotGrid widget. + GridOnly, + + ///To display both PivotChart and PivotGrid widgets. + ChartAndGrid + } + + } + + class PivotGauge extends ej.Widget { + static fn: PivotGauge; + constructor(element: JQuery | Element, options?: PivotGauge.Model); + static Locale: any; + model: PivotGauge.Model; + defaults: PivotGauge.Model; + + /** Performs an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** This function is used to refresh the PivotGauge at client-side itself. + * @returns {void} + */ + refresh(): void; + + /** This function removes the KPI related images from PivotGauge on binding OLAP datasource. + * @returns {void} + */ + removeImg(): void; + + /** This function receives the JSON formatted datasource and renders the PivotGauge control. + * @returns {void} + */ + renderControlFromJSON(): void; + + /** Returns the OlapReport string maintained along with the axis elements information. + * @returns {string} + */ + getOlapReport(): string; + + /** Sets the OlapReport string along with the axis information and maintains it in a property. + * @returns {void} + */ + setOlapReport(): void; + + /** Returns the JSON records formed to render the control. + * @returns {any[]} + */ + getJSONRecords(): any[]; + + /** Sets the JSON records to render the control. + * @returns {void} + */ + setJSONRecords(): void; + + /** Returns the JSON records required to render the PivotGauge on performing any action with OLAP data source. + * @returns {void} + */ + getJSONData(): void; + } + export namespace PivotGauge { + + export interface Model { + + /** Sets the number of columns to arrange the Pivot Gauges. + * @Default {0} + */ + columnsCount?: number; + + /** Specifies the CSS class to PivotGauge to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Object utilized to pass additional information between client-end and service-end on operating in server mode. + * @Default {{}} + */ + customObject?: any; + + /** Initializes the data source for the PivotGauge widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /** Enables/disables the animation of pointer in PivotGauge. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Enables/disables tooltip visibility in PivotGauge. + * @Default {false} + */ + enableTooltip?: boolean; + + /** Allows the user to view PivotGauge from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows the user to enable PivotGauge’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /** Allows the user to change the format of the label values in PivotGauge. + * @Default {null} + */ + labelFormatSettings?: LabelFormatSettings; + + /** Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /** Sets the number of rows to arrange the Pivot Gauges. + * @Default {0} + */ + rowsCount?: number; + + /** Sets the scale values such as pointers, indicators, etc... for PivotGauge. + * @Default {{}} + */ + scales?: any; + + /** Allows the user to set the custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /** Enables/disables the header labels in PivotGauge. + * @Default {true} + */ + showHeaderLabel?: boolean; + + /** Connects the service using the specified URL for any server updates on server mode operation. + * @Default {“”} + */ + url?: string; + + /** Sets the mode for the PivotGauge widget for binding either OLAP or Relational data source. + * @Default {ej.Pivot.AnalysisMode.Pivot} + */ + analysisMode?: ej.Pivot.AnalysisMode|string; + + /** Sets the mode for the PivotGauge widget for binding data source either in server-side or client-side. + * @Default {ej.Pivot.OperationalMode.ClientMode} + */ + operationalMode?: ej.Pivot.OperationalMode|string; + + /** Triggers when it reaches client-side after any AJAX request. + */ + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; + + /** Triggers before any AJAX request is passed from PivotGauge to service methods. + */ + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + + /** Triggers before populating the pivot engine on operating in client mode. + */ + beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; + + /** Triggers when PivotGauge started loading at client-side. + */ + load?(e: LoadEventArgs): void; + + /** Triggers when PivotGauge widget completes all operations at client-side after any AJAX request. + */ + renderComplete?(e: RenderCompleteEventArgs): void; + + /** Triggers when any error occurred during AJAX request. + */ + renderFailure?(e: RenderFailureEventArgs): void; + + /** Triggers when PivotGauge successfully reaches client-side after any AJAX request. + */ + renderSuccess?(e: RenderSuccessEventArgs): void; + } + + export interface AfterServiceInvokeEventArgs { + + /** returns the custom object bound with PivotGauge control. + */ + customObject?: any; + + /** returns the HTML element of PivotGauge control. + */ + element?: any; + } + + export interface BeforeServiceInvokeEventArgs { + + /** returns the custom object bound with PivotGauge control. + */ + customObject?: any; + + /** returns the HTML element of PivotGauge control. + */ + element?: any; + } + + export interface BeforePivotEnginePopulateEventArgs { + + /** returns the current instance of PivotGauge control. + */ + gaugeObject?: any; + } - /** Y-coordinate of point in pixel - */ - locationY?: number; + export interface LoadEventArgs { - /** Index of the point in series - */ - pointIndex?: number; + /** returns the current action of PivotGauge control. + */ + action?: string; - /** Type of the series - */ - seriesType?: string; - } + /** returns the model of PivotGauge control. + */ + model?: any; - export interface PointRegionMouseClickEventArgs { + /** returns the HTML element of the widget. + */ + element?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the custom object bound to the control. + */ + customObject?: any; + } - /** Instance of the sparkline model object - */ - model?: any; + export interface RenderCompleteEventArgs { - /** Name of the event - */ - type?: string; + /** returns the custom object bound with PivotGauge control. + */ + customObject?: any; - /** X-coordinate of point in pixel - */ - locationX?: number; + /** returns the HTML element of PivotGauge control. + */ + element?: any; + } - /** Y-coordinate of point in pixel - */ - locationY?: number; + export interface RenderFailureEventArgs { - /** Index of the point in series - */ - pointIndex?: number; - - /** Type of the series - */ - seriesType?: string; - } - - export interface SparklineMouseMoveEventArgs { + /** returns the HTML element of PivotGauge control. + */ + element?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the custom object bound with the control. + */ + customObject?: any; - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface SparklineMouseLeaveEventArgs { - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface Border { - - /** Border color of the sparkline. - * @Default {transparent} - */ - color?: string; - - /** Width of the Sparkline border. - * @Default {1} - */ - width?: number; - } - - export interface RangeBandSettings { - - /** Start value of the range band. - * @Default {null} - */ - startRange?: number; - - /** End value of the range band. - * @Default {null} - */ - endRange?: number; - - /** Range band opacity of the series. - * @Default {1} - */ - opacity?: number; - - /** Range band color of the series. - * @Default {transparent} - */ - color?: string; - } - - export interface TooltipBorder { - - /** Border color of the tooltip. - * @Default {transparent} - */ - color?: string; - - /** Border width of the tooltip. - * @Default {1} - */ - width?: number; - } - - export interface TooltipFont { - - /** Font color of the text in the tooltip. - * @Default {#111111} - */ - color?: string; - - /** Font Family for the tooltip. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the font Style for the tooltip. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Sparkline.FontStyle | string; - - /** Specifies the font weight for the tooltip. - * @Default {Regular} - */ - fontWeight?: ej.datavisualization.Sparkline.FontWeight | string; - - /** Opacity for text in the tooltip. - * @Default {1} - */ - opacity?: number; - - /** Font size for text in the tooltip. - * @Default {8px} - */ - size?: string; - } - - export interface Tooltip { - - /** Show/hides the tooltip visibility. - * @Default {false} - */ - visible?: boolean; - - /** Fill color for the sparkline tooltip. - * @Default {white} - */ - fill?: string; - - /** Custom template to the tooltip. - */ - template?: string; - - /** Options for customizing the border of the tooltip. - */ - border?: TooltipBorder; - - /** Options for customizing the font of the tooltip. - */ - font?: TooltipFont; - } - - export interface MarkerSettingsBorder { - - /** Border color of the marker shape. - * @Default {transparent} - */ - color?: string; - - /** Controls the opacity of the marker border. - * @Default {1} - */ - opacity?: number; - - /** Border width of the marker shape. - * @Default {null} - */ - width?: number; - } - - export interface MarkerSettings { - - /** Controls the opacity of the marker. - * @Default {1} - */ - opacity?: number; - - /** Controls the visibility of the marker shape. - * @Default {false} - */ - visible?: boolean; - - /** width of the marker shape. - * @Default {2} - */ - width?: number; - - /** Color of the marker shape. - * @Default {white} - */ - fill?: string; - - /** Options for customizing the border of the marker shape. - */ - border?: MarkerSettingsBorder; - } - - export interface Size { - - /** Height of the Sparkline. Height can be specified in either pixel or percentage. - * @Default {''} - */ - height?: string; - - /** Width of the Sparkline. Width can be specified in either pixel or percentage. - * @Default {''} - */ - width?: string; - } - - export interface AxisLineSettings { - - /** Controls the visibility of the axis. - * @Default {false} - */ - visible?: boolean; - - /** Color of the axis line. - * @Default {'#111111'} - */ - color?: string; - - /** Width of the axis line. - * @Default {1} - */ - width?: number; - - /** Dash array of the axis line. - * @Default {1} - */ - dashArray?: number; - } - } - namespace Sparkline { - enum Type { - //string - Area, - //string - Line, - //string - Column, - //string - Pie, - //string - WinLoss, - } - } - namespace Sparkline { - enum Theme { - //string - Azure, - //string - FlatLight, - //string - FlatDark, - //string - Azuredark, - //string - Lime, - //string - LimeDark, - //string - Saffron, - //string - SaffronDark, - //string - GradientLight, - //string - GradientDark, - } - } - namespace Sparkline { - enum FontStyle { - //string - Normal, - //string - Italic, - } - } - namespace Sparkline { - enum FontWeight { - //string - Regular, - //string - Bold, - //string - Lighter, - } - } - - class SunburstChart extends ej.Widget { - static fn: SunburstChart; - constructor(element: JQuery | Element, options?: SunburstChart.Model); - static Locale: any; - model: SunburstChart.Model; - defaults: SunburstChart.Model; - - /** Redraws the entire sunburst. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. - * @returns {void} - */ - redraw(): void; - - /** destroy the sunburst - * @returns {void} - */ - _destroy(): void; - } - export namespace SunburstChart { - - export interface Model { - - /** Background color of the plot area. - * @Default {null} - */ - background?: string; - - /** Bind the data field from the data source. - * @Default {null} - */ - valueMemberPath?: string; - - /** Options for customizing the sunburst border. - */ - border?: Border; - - /** Options for customizing the sunburst segment border. - */ - segmentBorder?: SegmentBorder; - - /** Specifies the dataSource to the sunburst. - * @Default {null} - */ - dataSource?: any; - - /** Palette color for the data points. - * @Default {null} - */ - palette?: string; - - /** Parent node of the data points. - * @Default {null} - */ - parentNode?: string; - - /** Name of the property in the datasource that contains x values. - * @Default {null} - */ - xName?: string; - - /** Name of the property in the datasource that contains y values. - * @Default {null} - */ - yName?: string; - - /** Controls whether sunburst has to be responsive or not. - * @Default {true} - */ - isResponsive?: boolean; - - /** Options to customize the Sunburst size. - */ - size?: Size; - - /** Controls the visibility of sunburst. - * @Default {true} - */ - visible?: boolean; - - /** Options to customize the Sunburst tooltip. - */ - tooltip?: Tooltip; - - /** Options for customizing sunburst points. - */ - points?: Points; - - /** Sunburst rendering will start from the specified value - * @Default {null} - */ - startAngle?: number; - - /** Sunburst rendering will end at the specified value - * @Default {null} - */ - endAngle?: number; - - /** Sunburst outer radius value - * @Default {1} - */ - radius?: number; - - /** Sunburst inner radius value - * @Default {0.4} - */ - innerRadius?: number; - - /** Options to customize the Sunburst dataLabel. - */ - dataLabelSettings?: DataLabelSettings; - - /** Options for customizing the title and subtitle of sunburst. - */ - title?: Title; - - /** Options for customizing the appearance of the levels or point while highlighting. - */ - highlightSettings?: HighlightSettings; + /** returns the error message with error code. + */ + message?: string; + } - /** Options for customizing the appearance of the levels or data point while selection. - */ - selectionSettings?: SelectionSettings; - - /** Specify levels of sunburst for grouped visualization of data - * @Default {[]} - */ - levels?: Level[]; - - /** Options to customize the legend items and legend title. - */ - legend?: Legend; + export interface RenderSuccessEventArgs { - /** Specifies the theme for Sunburst. - * @Default {Flatlight. See Theme} - */ - theme?: ej.datavisualization.Sunburst.SunburstTheme | string; + /** returns the HTML element of PivotGauge control. + */ + element?: any; - /** Options to customize the left, right, top and bottom margins of sunburst area. - */ - margin?: Margin; + /** returns the custom object bound with the control. + */ + customObject?: any; + } - /** Enable/disable the animation for all the levels. - * @Default {false} - */ - enableAnimation?: boolean; + export interface DataSourceColumnsFilterItems { - /** Opacity of the levels. - * @Default {1} - */ - opacity?: number; + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; - /** Options for enable zooming feature of chart. - */ - zoomSettings?: ZoomSettings; + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } - /** Animation type of sunburst - * @Default {rotation. See Alignment} - */ - animationType?: ej.datavisualization.Sunburst.Animation | string; + export interface DataSourceColumn { - /** Fires before loading. */ - load?(e: LoadEventArgs): void; + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; - /** Fires before rendering sunburst. */ - preRender?(e: PreRenderEventArgs): void; + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceColumnsFilterItems; + } - /** Fires after rendering sunburst. */ - loaded?(e: LoadedEventArgs): void; + export interface DataSourceRowsFilterItems { - /** Fires before rendering the datalabel */ - dataLabelRendering?(e: DataLabelRenderingEventArgs): void; + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; - /** Fires before rendering each segment */ - segmentRendering?(e: SegmentRenderingEventArgs): void; + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceRow { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; - /** Fires before rendering sunburst title. */ - titleRendering?(e: TitleRenderingEventArgs): void; + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceRowsFilterItems; + } + + export interface DataSourceValuesMeasure { + + /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. + */ + fieldName?: string; + } + + export interface DataSourceValue { + + /** Allows the user to bind the item by using its unique name as field name for Relational datasource. + */ + fieldName?: string; + + /** Allows the user to set the display caption for an item for Relational datasource. + */ + fieldCaption?: string; + + /** This holds the list of unique names of measures to bind them from the OLAP cube. + * @Default {[]} + */ + measures?: DataSourceValuesMeasure[]; + + /** Allows to set the axis name to place the measures items. + * @Default {rows} + */ + axis?: string; + + /** Indicates whether the field is a calculated field or not with Relational datasource. + * @Default {false} + */ + isCalculatedField?: boolean; + + /** Allows to set the formula for calculation of values for calculated members in Relational datasource. + */ + formula?: string; + } + + export interface DataSourceFiltersFilterItems { + + /** Sets the type of filter whether to include/exclude the mentioned values. + * @Default {ej.PivotAnalysis.FilterType.Exclude} + */ + filterType?: ej.PivotAnalysis.FilterType|string; + + /** Contains the collection of items to be included/excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceFilter { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceFiltersFilterItems; + } + + export interface DataSource { + + /** Contains the respective cube name from OLAP database as string type. + * @Default {“”} + */ + cube?: string; + + /** To set the data source name to fetch data from that. + * @Default {“”} + */ + sourceInfo?: string; + + /** Set the provider name for PivotGauge to identify whether the provider is SSAS or Mondrian. + * @Default {ssas} + */ + providerName?: string; + + /** Provides the raw data source for the PivotGauge. + * @Default {null} + */ + data?: any; + + /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. + * @Default {“”} + */ + catalog?: string; + + /** Lists out the items to bind in columns section. + * @Default {[]} + */ + columns?: DataSourceColumn[]; + + /** Lists out the items to bind in rows section. + * @Default {[]} + */ + rows?: DataSourceRow[]; + + /** Lists out the items supports calculation in PivotGauge. + * @Default {[]} + */ + values?: DataSourceValue[]; + + /** Lists out the items which supports filtering of values without displaying the members in UI in PivotGauge. + * @Default {[]} + */ + filters?: DataSourceFilter[]; + } + + export interface LabelFormatSettings { + + /** Allows the user to change the number format of the label values in PivotGauge. + * @Default {ej.PivotGauge.NumberFormat.Default} + */ + numberFormat?: ej.PivotGauge.NumberFormat|string; + + /** Allows you to set the number of digits displayed after decimal point. + * @Default {5} + */ + decimalPlaces?: number; + + /** Allows you to add a text at the beginning of the label. + */ + prefixText?: string; + + /** Allows you to add text at the end of the label. + */ + suffixText?: string; + } + + export interface ServiceMethodSettings { + + /** Allows the user to set the custom name for the service method responsible for initializing PivotGauge. + * @Default {InitializeGauge} + */ + initialize?: string; + } + + enum NumberFormat { + + ///To set default format for label values. + Default, + + ///To set currency format for label values. + Currency, + + ///To set percentage format for label values. + Percentage, + + ///To set fraction format for label values. + Fraction, + + ///To set scientific format for label values. + Scientific, + + ///To set text format for label values. + Text, + + ///To set notation format for label values. + Notation + } + + } + + class PivotTreeMap extends ej.Widget { + static fn: PivotTreeMap; + constructor(element: JQuery | Element, options?: PivotTreeMap.Model); + static Locale: any; + model: PivotTreeMap.Model; + defaults: PivotTreeMap.Model; + + /** Performs an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Returns the OlapReport string maintained along with the axis elements information. + * @returns {string} + */ + getOlapReport(): string; + + /** Sets the OlapReport string along with the axis information and maintains it in a property. + * @returns {void} + */ + setOlapReport(): void; + + /** Returns the JSON records formed to render the control. + * @returns {any[]} + */ + getJSONRecords(): any[]; + + /** Sets the JSON records to render the control. + * @returns {void} + */ + setJSONRecords(): void; + + /** Renders the control with the pivot engine obtained from OLAP cube. + * @returns {void} + */ + generateJSON(): void; + + /** This function receives the JSON formatted datasource to render the PivotTreeMap control. + * @returns {void} + */ + renderTreeMapFromJSON(): void; + + /** This function receives the update from service-end, which would be utilized for rendering the widget. + * @returns {void} + */ + renderControlSuccess(): void; + } + export namespace PivotTreeMap { + + export interface Model { + + /** Specifies the CSS class to PivotTreeMap to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Initializes the data source for the PivotTreeMap widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /** Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /** Allows the user to enable PivotTreeMap’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /** Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /** Sets the mode for the PivotTreeMap widget for binding data source either in server-side or client-side. + * @Default {ej.Pivot.OperationalMode.ClientMode} + */ + operationalMode?: ej.Pivot.OperationalMode|string; + + /** Allows the user to set custom name for the methods at service-end, communicated on AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /** Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /** Triggers when it reaches client-side after any AJAX request. + */ + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; + + /** Triggers before any AJAX request is passed from PivotTreeMap to service methods. + */ + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + + /** Triggers when PivotTreeMap starts to render. + */ + load?(e: LoadEventArgs): void; + + /** Triggers before populating the pivot engine from datasource. + */ + beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; + + /** Triggers when drill up/down happens in PivotTreeMap control. And it returns the outer HTML of PivotTreeMap control. + */ + drillSuccess?(e: DrillSuccessEventArgs): void; + + /** Triggers when PivotTreeMap widget completes all operations at client-side after any AJAX request. + */ + renderComplete?(e: RenderCompleteEventArgs): void; + + /** Triggers when any error occurred during AJAX request. + */ + renderFailure?(e: RenderFailureEventArgs): void; + + /** Triggers when PivotTreeMap successfully reaches client-side after any AJAX request. + */ + renderSuccess?(e: RenderSuccessEventArgs): void; + } + + export interface AfterServiceInvokeEventArgs { + + /** returns the current action of PivotTreeMap control. + */ + action?: string; + + /** returns the custom object bound with PivotTreeMap control. + */ + customObject?: any; - /** Fires during initialization of tooltip. */ - tooltipInitialize?(e: TooltipInitializeEventArgs): void; + /** returns the HTML element of PivotTreeMap control. + */ + element?: any; + } + + export interface BeforeServiceInvokeEventArgs { - /** Fires after clicking the point in sunburst */ - pointRegionClick?(e: PointRegionClickEventArgs): void; + /** returns the current action of PivotTreeMap control. + */ + action?: string; - /** Fires while moving the mouse over sunburst points */ - pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; + /** returns the custom object bound with PivotTreeMap control. + */ + customObject?: any; - /** Fires when clicking the point to perform drilldown. */ - drillDownClick?(e: DrillDownClickEventArgs): void; + /** returns the HTML element of PivotTreeMap control. + */ + element?: any; + } - /** Fires when resetting drilldown points. */ - drillDownBack?(e: DrillDownBackEventArgs): void; + export interface LoadEventArgs { - /** Fires after resetting the sunburst points */ - drillDownReset?(e: DrillDownResetEventArgs): void; - } + /** returns the current action of PivotTreeMap control. + */ + action?: string; - export interface LoadEventArgs { + /** returns the custom object bound with PivotTreeMap control. + */ + customObject?: any; - /** Load event data - */ - data?: string; + /** returns the HTML element of PivotTreeMap control. + */ + element?: any; + } - /** Set this option to true to cancel the event - */ - cancel?: boolean; + export interface BeforePivotEnginePopulateEventArgs { - /** Instance of the sunburst model object - */ - model?: any; + /** returns the current instance of PivotTreeMap control. + */ + treeMapObject?: any; + } - /** Name of the event - */ - type?: string; - } + export interface DrillSuccessEventArgs { - export interface PreRenderEventArgs { + /** return the HTML element of PivotTreeMap control. + */ + element?: any; + } - /** PreRender event data - */ - data?: string; + export interface RenderCompleteEventArgs { - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the current action of PivotTreeMap control. + */ + action?: string; - /** Instance of the sunburst model object - */ - model?: any; + /** returns the custom object bound with PivotTreeMap control. + */ + customObject?: any; - /** Name of the event - */ - type?: string; - } + /** returns the HTML element of PivotTreeMap control. + */ + element?: any; + } - export interface LoadedEventArgs { + export interface RenderFailureEventArgs { - /** Loaded event data - */ - data?: string; + /** returns the current action of PivotTreeMap control. + */ + action?: string; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the custom object bound with PivotTreeMap control. + */ + customObject?: any; - /** Instance of the sunburst model object - */ - model?: any; + /** returns the HTML element of PivotTreeMap control. + */ + element?: any; - /** Name of the event - */ - type?: string; - } + /** returns the error stack trace of the original exception. + */ + message?: string; + } - export interface DataLabelRenderingEventArgs { + export interface RenderSuccessEventArgs { - /** Sunburst datalabel data - */ - data?: string; + /** returns the current action of PivotTreeMap control. + */ + action?: string; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the custom object bound with PivotTreeMap control. + */ + customObject?: any; - /** Instance of the sunburst model object - */ - model?: any; + /** returns the HTML element of PivotTreeMap control. + */ + element?: any; + } - /** Name of the event - */ - type?: string; - } + export interface DataSourceColumnsFilterItems { - export interface SegmentRenderingEventArgs { + /** Contains the collection of items to be excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } - /** Sunburst datalabel data - */ - data?: string; + export interface DataSourceColumn { - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; - /** Instance of the sunburst model object - */ - model?: any; + /** Allows the user to indicate whether the added item is a named set or not. + * @Default {false} + */ + isNamedSets?: boolean; - /** Name of the event - */ - type?: string; - } + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceColumnsFilterItems; + } + + export interface DataSourceRowsFilterItems { + + /** Contains the collection of items to be excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceRow { - export interface TitleRenderingEventArgs { + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to indicate whether the added item is a named set or not. + * @Default {false} + */ + isNamedSets?: boolean; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceRowsFilterItems; + } + + export interface DataSourceValuesMeasure { + + /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. + */ + fieldName?: string; + } + + export interface DataSourceValue { + + /** This holds the list of unique names of measures to bind them from the OLAP cube. + * @Default {[]} + */ + measures?: DataSourceValuesMeasure[]; + + /** Allows to set the axis name to place the measures items. + * @Default {rows} + */ + axis?: string; + } + + export interface DataSourceFiltersFilterItems { + + /** Contains the collection of items to be excluded among the field members. + * @Default {[]} + */ + values?: any[]; + } + + export interface DataSourceFilter { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Applies filter to the field members. + * @Default {null} + */ + filterItems?: DataSourceFiltersFilterItems; + } + + export interface DataSource { + + /** Provides the raw data source for the PivotTreeMap. + * @Default {null} + */ + data?: any; + + /** Contains the respective cube name from OLAP database as string type. + * @Default {“”} + */ + cube?: string; + + /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. + * @Default {“”} + */ + catalog?: string; + + /** Lists out the items to be displayed as series of PivotTreeMap. + * @Default {[]} + */ + columns?: DataSourceColumn[]; + + /** Lists out the items to be displayed as segments of PivotTreeMap. + * @Default {[]} + */ + rows?: DataSourceRow[]; + + /** Lists out the items supports calculation in PivotTreeMap. + * @Default {[]} + */ + values?: DataSourceValue[]; + + /** Lists out the items which supports filtering of values without displaying the members in UI in PivotTreeMap. + * @Default {[]} + */ + filters?: DataSourceFilter[]; + } + + export interface ServiceMethodSettings { + + /** Allows the user to set the custom name for the service method responsible for initializing PivotTreeMap. + * @Default {InitializeTreemap} + */ + initialize?: string; + + /** Allows the user to set the custom name for the service method responsible for drilling up/down operation in PivotTreeMap. + * @Default {DrillTreeMap} + */ + drillDown?: string; + } + } + + class Schedule extends ej.Widget { + static fn: Schedule; + constructor(element: JQuery | Element, options?: Schedule.Model); + static Locale: any; + model: Schedule.Model; + defaults: Schedule.Model; + + /** This method is used to delete the appointment based on the guid value or the appointment data passed to it. + * @param {string|any} GUID value of an appointment element or an appointment object + * @returns {void} + */ + deleteAppointment(data: string|any): void; + + /** Destroys the Schedule widget. All the events bound using this._on are unbound automatically and the control is moved to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Exports the appointments from the Schedule control. + * @param {string} It refers the controller action name to redirect. (For MVC) + * @param {string} It refers the server event name.(For ASP) + * @param {string|number} Pass the id of an appointment, in case if a single appointment needs to be exported. Otherwise, it takes the null value. + * @returns {void} + */ + exportSchedule(action: string, serverEvent: string, id: string|number): void; + + /** Searches and filters the appointments from appointment list of Schedule control. + * @param {any[]} Holds array of one or more conditional objects for filtering the appointments based on it. + * @returns {any[]} + */ + filterAppointments(filterConditions: any[]): any[]; + + /** Gets the complete appointment list of Schedule control. + * @returns {any[]} + */ + getAppointments(): any[]; + + /** Prints the entire Scheduler or a single appointment based on the appointment data passed as an argument to it. Simply calling the print() method, without passing any argument will + * print the entire Scheduler. + * @param {any} Either accepts no arguments at all or else accepts an appointment object. + * @returns {void} + */ + print(data: any): void; + + /** Refreshes the Scroller of Scheduler while using it within some other controls or application. + * @returns {void} + */ + refreshScroller(): void; + + /** It is used to save the appointment. The appointment object is based on the argument passed to this method. + * @param {any} appointment object which includes appointment details + * @returns {void} + */ + saveAppointment(appointmentObject: any): void; + + /** Generate the recurrence rule as a string, based on the repeat options selected. + * @returns {string} + */ + getRecurrenceRule(): string; + + /** Retrieves the time slot information (start/end time and resource details) of the given element. The parameter is optional - as when no element is passed to it, the currently + * selected cell information will be retrieved. When multiple cells are selected in the Scheduler, it is not necessary to provide the parameter. + * @param {any} TD element object rendered as Scheduler work cell + * @returns {any} + */ + getSlotByElement(element: any): any; + + /** Searches the appointments from the appointment list of Schedule control based on the provided search string in its argument list. + * @param {any|string} Defines the search word or the filter condition, based on which the appointments are filtered from the list. + * @param {string} Defines the field name on which the search is to be made. + * @param {ej.FilterOperators|string} Defines the filterOperator value for the search operation. + * @param {boolean} Defines the ignoreCase value for performing the search operation. + * @returns {any[]} + */ + searchAppointments(searchString: any|string, field: string, operator: ej.FilterOperators|string, ignoreCase: boolean): any[]; + + /** Refreshes the entire Schedule control. + * @returns {void} + */ + refresh(): void; + + /** Refreshes only the appointment elements within the Schedule control. + * @returns {void} + */ + refreshAppointments(): void; + + /** Passes the server-side action and data to the client-side for rendering the modified appointment list on the Schedule control. + * @returns {void} + */ + notifyChanges(): void; + } + export namespace Schedule { + + export interface Model { + + /** When set to true, Schedule allows the appointments to be dragged and dropped at required time. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /** When set to true, allows the user to create/edit appointments inline - simply through a single click made either on the Scheduler cells or on the existing appointment’s Subject + * text respectively. Pressing enter key after the new Subject text typed onto the inline created text box, will save/update the appointments appropriately. + * @Default {false} + */ + allowInline?: boolean; + + /** When set to true, Scheduler allows interaction through keyboard shortcut keys. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** It includes the dataSource option and the fields related to Schedule appointments. The appointment fields within the appointmentSettings can accept both string and object type + * values. To apply validation rules on the appointment window fields, then the appointment fields needs to be defined with object type values. + */ + appointmentSettings?: AppointmentSettings; + + /** Template design that applies on the Schedule appointments. All the field names that are mapped from dataSource to the appropriate field properties within the appointmentSettings + * can be used within the template. + * @Default {null} + */ + appointmentTemplateId?: string; + + /** Accepts the custom CSS class name that defines specific user-defined styles and themes to be applied for partial or complete elements of the Schedule. + */ + cssClass?: string; + + /** Sets various categorize colors to the Schedule appointments to differentiate it. + */ + categorizeSettings?: CategorizeSettings; + + /** Sets the height for Schedule cells. + * @Default {20px} + */ + cellHeight?: string; + + /** Sets the width for Schedule cells. + */ + cellWidth?: string; + + /** Holds all options related to the context menu settings of Scheduler. + */ + contextMenuSettings?: ContextMenuSettings; + + /** Sets current date of the Schedule. The Schedule displays initially with the date that is provided here. + * @Default {new Date()} + */ + currentDate?: any; + + /** Sets current view of the Schedule. Schedule renders initially with the view that is specified here. The available views are day, week, workweek, month, agenda and custom view - + * from which any one of the required view can be set to the Schedule. It accepts both string or enum values. The enum values that are accepted by + * currentView(ej.Schedule.CurrentView) are as follows, + * @Default {ej.Schedule.CurrentView.Week} + */ + currentView?: string|ej.Schedule.CurrentView; + + /** Sets the date format for Schedule. + */ + dateFormat?: string; + + /** When set to true, shows the previous/next appointment navigator button on the Scheduler. + * @Default {true} + */ + showAppointmentNavigator?: boolean; + + /** When set to true, enables the resize behavior of appointments within the Schedule. + * @Default {true} + */ + enableAppointmentResize?: boolean; + + /** When set to true, enables the loading of Schedule appointments based on your demand. With this load on demand concept, the data consumption of the Schedule can be limited. + * @Default {false} + */ + enableLoadOnDemand?: boolean; + + /** Saves the current model value to browser cookies for state maintenance. When the page gets refreshed, Schedule control values are retained. + * @Default {false} + */ + enablePersistence?: boolean; + + /** When set to true, the Schedule layout and behavior changes as per the common RTL conventions. + * @Default {false} + */ + enableRTL?: boolean; + + /** Sets the end hour time limit to be displayed on the Schedule. + * @Default {24} + */ + endHour?: number; + + /** To configure resource grouping on the Schedule. + */ + group?: Group; + + /** Sets the height of the Schedule. Accepts both pixel and percentage values. + * @Default {1120px} + */ + height?: string; + + /** To define the work hours within the Schedule control. + */ + workHours?: WorkHours; + + /** When set to true, enables the Schedule to observe Daylight Saving Time for supported timezones. + * @Default {false} + */ + isDST?: boolean; + + /** When set to true, adapts the Schedule layout to fit the screen size of devices on which it renders. + * @Default {true} + */ + isResponsive?: boolean; + + /** Sets the specific culture to the Schedule. + * @Default {en-US} + */ + locale?: string; + + /** Sets the maximum date limit to display on the Schedule. Setting maxDate with specific date value disallows the Schedule to navigate beyond that date. + * @Default {new Date(2099, 12, 31)} + */ + maxDate?: any; + + /** Sets the minimum date limit to display on the Schedule. Setting minDate with specific date value disallows the Schedule to navigate beyond that date. + * @Default {new Date(1900, 01, 01)} + */ + minDate?: any; + + /** Sets the mode of Schedule rendering either in a vertical or horizontal direction. It accepts either string("vertical" or "horizontal") or enum values. The enum + * values that are accepted by orientation(ej.Schedule.Orientation) are as follows, + * @Default {ej.Schedule.Orientation.Vertical} + */ + orientation?: string|ej.Schedule.Orientation; + + /** Holds all the options related to priority settings of the Schedule. + */ + prioritySettings?: PrioritySettings; + + /** When set to true, disables the interaction with the Schedule appointments, simply allowing the date and view navigation to occur. + * @Default {false} + */ + readOnly?: boolean; + + /** Holds all the options related to reminder settings of the Schedule. + */ + reminderSettings?: ReminderSettings; + + /** Defines the specific start and end dates to be rendered in the Schedule control. To render such user-specified custom date ranges in the Schedule control, set the currentView + * property to ej.Schedule.CurrentView.CustomView. + * @Default {null} + */ + renderDates?: RenderDates; + + /** Template design that applies on the Schedule resource header. + * @Default {null} + */ + resourceHeaderTemplateId?: string; + + /** Holds all the options related to the resources settings of the Schedule. It is a collection of one or more resource objects, where the levels of resources are rendered on the + * Schedule based on the order of the resource data provided within this collection. + * @Default {null} + */ + resources?: Resource[]; + + /** When set to true, displays the all-day row cells on the Schedule. + * @Default {true} + */ + showAllDayRow?: boolean; + + /** When set to false, hides the weekend days on all the Scheduler views. + * @Default {true} + */ + showWeekend?: boolean; + + /** When set to true, displays the current time indicator on the Schedule. + * @Default {true} + */ + showCurrentTimeIndicator?: boolean; + + /** When set to true, displays the header bar on the Schedule. + * @Default {true} + */ + showHeaderBar?: boolean; + + /** When set to true, displays the location field additionally on Schedule appointment window. + * @Default {false} + */ + showLocationField?: boolean; + + /** When set to false, doesn't render the start and end timezone fields on the Schedule appointment window. + * @Default {true} + */ + showTimeZoneFields?: boolean; + + /** When set to true, displays the quick window for every single click made on the Schedule cells or appointments. + * @Default {true} + */ + showQuickWindow?: boolean; + + /** Sets the start hour time range to be displayed on the Schedule. + * @Default {0} + */ + startHour?: number; + + /** Sets either 12 or 24 hour time mode on the Schedule. It accepts either the string value("12" or "24") or the below mentioned enum values. The enum values that + * are accepted by timeMode(ej.Schedule.TimeMode) are as follows, + * @Default {null} + */ + timeMode?: string|ej.Schedule.TimeMode; + + /** Sets the timezone for the Schedule. + * @Default {null} + */ + timeZone?: string; + + /** Sets the collection of timezone items to be bound to the Schedule. Only the items bound to this property gets listed out in the timezone field of the appointment window. + */ + timeZoneCollection?: TimeZoneCollection; + + /** Defines the view collection to be displayed on the Schedule. By default, it displays all the views namely, Day, Week, WorkWeek and Month. + * @Default {[Day, Week, WorkWeek, Month, Agenda]} + */ + views?: any[]; + + /** Sets the width of the Schedule. Accepts both pixel and percentage values. + * @Default {100%} + */ + width?: string; + + /** When set to true, Schedule allows the validation of recurrence pattern to take place before it is being assigned to the appointments. For example, when one of the instance of + * recurrence appointment is dragged beyond the next or previous instance of the same recurrence appointment, a pop-up is displayed with the validation message disallowing the drag + * functionality. + * @Default {true} + */ + enableRecurrenceValidation?: boolean; + + /** Sets the week to display more than one week appointment summary. + */ + agendaViewSettings?: AgendaViewSettings; + + /** Sets specific day as the starting day of the week. + * @Default {null} + */ + firstDayOfWeek?: string; + + /** Sets different day collection within workWeek view. + * @Default {[Monday, Tuesday, Wednesday, Thursday, Friday]} + */ + workWeek?: any[]; + + /** Allows to pop-up appointment details in a tooltip while hovering over the appointments. + */ + tooltipSettings?: TooltipSettings; + + /** Holds all the options related to the time scale of Scheduler. The timeslots either major or minor slots can be customized with this property. + */ + timeScale?: TimeScale; + + /** When set to true, shows the delete confirmation dialog before deleting an appointment. + * @Default {true} + */ + showDeleteConfirmationDialog?: boolean; + + /** Accepts the id value of the template layout defined for the all-day cells and customizes it. + * @Default {null} + */ + allDayCellsTemplateId?: string; + + /** Accepts the id value of the template layout defined for the work cells and month cells. + * @Default {null} + */ + workCellsTemplateId?: string; + + /** Accepts the id value of the template layout defined for the date header cells and customizes it. + * @Default {null} + */ + dateHeaderTemplateId?: string; + + /** when set to false, allows the height of the work-cells to adjust automatically (either expand or collapse) based on the number of appointment count it has. + * @Default {true} + */ + showOverflowButton?: boolean; + + /** Allows setting draggable area for the Scheduler appointments. Also, turns on the external drag and drop, when set with some specific external drag area name. + */ + appointmentDragArea?: string; + + /** When set to true, displays the other months days from the current month on the Schedule. + * @Default {true} + */ + showNextPrevMonth?: boolean; + + /** Blocks the user-specific time interval on the Scheduler, so that no appointments can be created on that particular time slots. It includes the dataSource option and also the + * fields related to block intervals. + */ + blockoutSettings?: BlockoutSettings; + + /** Triggers on the beginning of every action that starts within the Schedule. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Triggers after the completion of every action within the Schedule. + */ + actionComplete?(e: ActionCompleteEventArgs): void; + + /** Triggers after an appointment is clicked. + */ + appointmentClick?(e: AppointmentClickEventArgs): void; + + /** Triggers before the appointment is being removed from the Scheduler. + */ + beforeAppointmentRemove?(e: BeforeAppointmentRemoveEventArgs): void; + + /** Triggers before the edited appointment is being saved. + */ + beforeAppointmentChange?(e: BeforeAppointmentChangeEventArgs): void; + + /** Triggers on hovering the mouse over the appointments. + */ + appointmentHover?(e: AppointmentHoverEventArgs): void; + + /** Triggers before the new appointment gets saved. + */ + beforeAppointmentCreate?(e: BeforeAppointmentCreateEventArgs): void; + + /** Triggers before the appointment window opens. + */ + appointmentWindowOpen?(e: AppointmentWindowOpenEventArgs): void; + + /** Triggers before the context menu opens. + */ + beforeContextMenuOpen?(e: BeforeContextMenuOpenEventArgs): void; + + /** Triggers after the cell is clicked. + */ + cellClick?(e: CellClickEventArgs): void; + + /** Triggers after the cell is clicked twice. + */ + cellDoubleClick?(e: CellDoubleClickEventArgs): void; + + /** Triggers on hovering the mouse overs the cells. + */ + cellHover?(e: CellHoverEventArgs): void; + + /** Triggers when the Scheduler completely renders on the page. + */ + create?(e: CreateEventArgs): void; + + /** Triggers when the Scheduler and all its sub-components gets destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** Triggers while the appointment is being dragged over the work cells. + */ + drag?(e: DragEventArgs): void; + + /** Triggers when the appointment dragging begins. + */ + dragStart?(e: DragStartEventArgs): void; + + /** Triggers when the appointment is dropped. + */ + dragStop?(e: DragStopEventArgs): void; + + /** Triggers after the menu/sub-menu items within the context menu is clicked. + */ + menuItemClick?(e: MenuItemClickEventArgs): void; + + /** Triggers after the Schedule view or date is navigated. + */ + navigation?(e: NavigationEventArgs): void; - /** Sunburst title data - */ - data?: string; + /** Triggers every time before the elements of the scheduler such as work cells, time cells or header cells and so on renders or re-renders on a page. + */ + queryCellInfo?(e: QueryCellInfoEventArgs): void; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Triggers when the reminder is raised for an appointment based on the alertBefore value. + */ + reminder?(e: ReminderEventArgs): void; - /** Instance of the sunburst model object - */ - model?: any; + /** Triggers while resizing the appointment. + */ + resize?(e: ResizeEventArgs): void; - /** Name of the event - */ - type?: string; - } + /** Triggers when the appointment resizing begins. + */ + resizeStart?(e: ResizeStartEventArgs): void; - export interface TooltipInitializeEventArgs { + /** Triggers when an appointment resizing stops. + */ + resizeStop?(e: ResizeStopEventArgs): void; - /** Sunburst tooltip data - */ - data?: string; + /** Triggers when the overflow button is clicked. + */ + overflowButtonClick?(e: OverflowButtonClickEventArgs): void; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Triggers while mouse hovering on the overflow button. + */ + overflowButtonHover?(e: OverflowButtonHoverEventArgs): void; - /** Instance of the sunburst model object - */ - model?: any; + /** Triggers when any of the keyboard keys are pressed. + */ + keyDown?(e: KeyDownEventArgs): void; - /** Name of the event - */ - type?: string; - } + /** Triggers after the new appointment is saved. + */ + appointmentCreated?(e: AppointmentCreatedEventArgs): void; - export interface PointRegionClickEventArgs { + /** Triggers after an existing appointment is edited. + */ + appointmentChanged?(e: AppointmentChangedEventArgs): void; - /** Includes clicked points region data - */ - data?: string; + /** Triggers after the appointment is deleted. + */ + appointmentRemoved?(e: AppointmentRemovedEventArgs): void; + } - /** Set this option to true to cancel the event - */ - cancel?: boolean; + export interface ActionBeginEventArgs { - /** Instance of the sunburst model object - */ - model?: any; + /** Returns the current date value. + */ + currentDate?: any; - /** Name of the event - */ - type?: string; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface PointRegionMouseMoveEventArgs { + /** Returns the current view value. + */ + currentView?: string; - /** Includes data of mouse moved region - */ - data?: string; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Returns the action begin request type. + */ + requestType?: string; - /** Instance of the sunburst model object - */ - model?: any; + /** Returns the target of the click. + */ + target?: any; - /** Name of the event - */ - type?: string; - } + /** Returns the name of the event. + */ + type?: string; - export interface DrillDownClickEventArgs { + /** Returns the save appointment value. + */ + data?: any; - /** Clicked point data - */ - data?: string; + /** Returns the id of delete appointment. + */ + id?: number; + } - /** Set this option to true to cancel the event - */ - cancel?: boolean; + export interface ActionCompleteEventArgs { - /** Instance of the sunburst model object - */ - model?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Name of the event - */ - type?: string; - } + /** Returns the data about view change action. + */ + data?: any; - export interface DrillDownBackEventArgs { + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Drill down data of points - */ - data?: string; + /** Returns the action complete request type. + */ + requestType?: string; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Returns the name of the event. + */ + type?: string; - /** Instance of the sunburst model object - */ - model?: any; + /** Returns the appointment data dropped. + */ + appointment?: any; + } - /** Name of the event - */ - type?: string; - } + export interface AppointmentClickEventArgs { - export interface DrillDownResetEventArgs { - - /** Drill down reset data - */ - data?: string; + /** Returns the object of appointmentClick event. + */ + object?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface Border { - - /** Border color of the sunburst. - * @Default {null} - */ - color?: string; - - /** Width of the Sunburst border. - * @Default {2} - */ - width?: number; - } - - export interface SegmentBorder { - - /** Segment Border color of the sunburst. - * @Default {null} - */ - color?: string; - - /** Width of the Sunburst segment border. - * @Default {2} - */ - width?: number; - } - - export interface Size { - - /** Height of the Sunburst. - * @Default {''} - */ - height?: string; - - /** Width of the Sunburst. - * @Default {''} - */ - width?: string; - } - - export interface TooltipBorder { - - /** Border color of the tooltip. - * @Default {null} - */ - color?: string; - - /** Border width of the tooltip. - * @Default {5} - */ - width?: number; - } - - export interface TooltipFont { - - /** Font color of the text in the tooltip. - * @Default {null} - */ - color?: string; - - /** Font Family for the tooltip. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the font Style for the tooltip. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Specifies the font weight for the tooltip. - * @Default {Regular} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Opacity for text in the tooltip. - * @Default {1} - */ - opacity?: number; - - /** Font size for text in the tooltip. - * @Default {12px} - */ - size?: string; - } - - export interface Tooltip { - - /** tooltip visibility of the Sunburst. - * @Default {true} - */ - visible?: boolean; - - /** Options for customizing the border of the sunburst tooltip. - */ - border?: TooltipBorder; - - /** Fill color for the sunburst tooltip. - * @Default {null} - */ - fill?: string; - - /** Options for customizing the font of the tooltip. - */ - font?: TooltipFont; - - /** Custom template to the tooltip. - * @Default {null} - */ - template?: string; - } - - export interface Points { - - /** Points x value of the sunburst. - * @Default {null} - */ - x?: string; - - /** Points y value of the sunburst. - * @Default {null} - */ - y?: number; - - /** Points text of the sunburst. - * @Default {null} - */ - text?: string; - - /** Points fill color of the sunburst. - * @Default {null} - */ - fill?: string; - } - - export interface DataLabelSettingsFont { - - /** Font family of the data label. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the data label. - * @Default {normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight of the data label. - * @Default {regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Opacity of the text. - * @Default {1} - */ - opacity?: number; - - /** Font color of the data label text. - * @Default {null} - */ - color?: string; - - /** Font size of the data label. - * @Default {12px} - */ - size?: string; - } - - export interface DataLabelSettings { - - /** Datalabel visibility of the Sunburst. - * @Default {false} - */ - visible?: boolean; - - /** Alignment of sunburst datalabel - * @Default {Angle. See DatalabelAlignment} - */ - labelRotationMode?: ej.datavisualization.Sunburst.SunburstLabelRotationMode | string; - - /** Options for customizing the data label font. - */ - font?: DataLabelSettingsFont; - - /** Custom template for datalabel - * @Default {null} - */ - template?: string; - - /** Fill color for the datalabel - * @Default {null} - */ - fill?: string; - - /** Datalabel overflow mode - * @Default {Trim. See LabelOverflowMode} - */ - labelOverflowMode?: ej.datavisualization.Sunburst.SunburstLabelOverflowMode | string; - } - - export interface TitleFont { - - /** Font family for Sunburst title. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for Sunburst title. - * @Default {Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight for Sunburst title. - * @Default {Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Opacity of the Sunburst title. - * @Default {1} - */ - opacity?: number; - - /** Font size for Sunburst title. - * @Default {20px} - */ - size?: string; - } - - export interface TitleSubtitleFont { - - /** Font family of sub title. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for sub title. - * @Default {Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight for sub title. - * @Default {Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Opacity of the sub title. - * @Default {1} - */ - opacity?: number; - - /** Font size for sub title. - * @Default {12px} - */ - size?: string; - } - - export interface TitleSubtitle { - - /** Subtitle text for sunburst - */ - text?: string; - - /** Sub title text visibility for sunburst - * @Default {true} - */ - visible?: string; - - /** Sub title text alignment - * @Default {far. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment | string; - - /** Options for customizing the font of sub title. - */ - font?: TitleSubtitleFont; - } - - export interface Title { - - /** Title text for sunburst - */ - text?: string; - - /** Title text visibility for sunburst - * @Default {true} - */ - visible?: string; - - /** Title text alignment - * @Default {center. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment | string; - - /** Options for customizing the font of sunburst title. - */ - font?: TitleFont; - - /** Options to customize the sub title of Sunburst. - */ - subtitle?: TitleSubtitle; - } - - export interface HighlightSettings { - - /** Enables/disables the ability to highlight the levels or point interactively. - * @Default {false} - */ - enable?: boolean; - - /** Specifies whether the levels or point has to be highlighted. - * @Default {point. See Mode} - */ - mode?: ej.datavisualization.Sunburst.SunburstHighlightMode | string; - - /** Color of the levels/point on highlight. - * @Default {red} - */ - color?: string; - - /** Opacity of the levels/point on highlight. - * @Default {0.5} - */ - opacity?: number; - - /** Specifies whether the levels or data point has to be highlighted. - * @Default {opacity. See Mode} - */ - type?: ej.datavisualization.Sunburst.SunburstHighlightType | string; - } - - export interface SelectionSettings { - - /** Enables/disables the ability to select the levels or data point interactively. - * @Default {false} - */ - enable?: boolean; - - /** Specifies whether the levels or data point has to be selected. - * @Default {point. See Mode} - */ - mode?: ej.datavisualization.Sunburst.SunburstHighlightMode | string; - - /** Color of the levels/point on selection. - * @Default {green} - */ - color?: string; - - /** Opacity of the levels/point on selection. - * @Default {0.5} - */ - opacity?: number; - - /** Specifies whether the levels or data point has to be selected. - * @Default {opacity. See Mode} - */ - type?: ej.datavisualization.Sunburst.SunburstHighlightType | string; - } - - export interface Level { - - /** Specifies the group member path - * @Default {null} - */ - groupMemberPath?: string; - } - - export interface LegendBorder { - - /** Border color of the legend. - * @Default {null} - */ - color?: string; - - /** Border width of the legend. - * @Default {1} - */ - width?: number; - } - - export interface LegendFont { - - /** Font family for legend item text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for legend item text. - * @Default {Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight for legend item text. - * @Default {Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Font size for legend item text. - * @Default {12px} - */ - size?: string; - } - - export interface LegendItemStyle { - - /** Height of the shape in legend items. - * @Default {10} - */ - height?: number; - - /** Width of the shape in legend items. - * @Default {10} - */ - width?: number; - } - - export interface LegendLocation { - - /** X value or horizontal offset to position the legend in chart. - * @Default {0} - */ - x?: number; - - /** Y value or vertical offset to position the legend. - * @Default {0} - */ - y?: number; - } - - export interface LegendSize { - - /** Height of the legend. Height can be specified in either pixel or percentage. - * @Default {null} - */ - height?: string; - - /** Width of the legend. Width can be specified in either pixel or percentage. - * @Default {null} - */ - width?: string; - } - - export interface LegendTitleFont { - - /** Font family for the text in legend title. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for legend title. - * @Default {normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight for legend title. - * @Default {normal. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Font size for legend title. - * @Default {12px} - */ - size?: string; - } - - export interface LegendTitle { - - /** Options to customize the font used for legend title - */ - font?: LegendTitleFont; - - /** Enables or disables the legend title. - * @Default {true} - */ - visible?: string; - - /** Text to be displayed in legend title. - */ - text?: string; - - /** Alignment of the legend title. - * @Default {center. See Alignment} - */ - textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment | string; - } - - export interface Legend { - - /** Visibility of the legend. - * @Default {false} - */ - visible?: boolean; - - /** Interactive action of legend items. - * @Default {toggleSegmentVisibility. See Alignment} - */ - clickAction?: ej.datavisualization.Sunburst.SunburstClickAction | string; - - /** Horizontal alignment of the legend. - * @Default {Center. See Alignment} - */ - alignment?: ej.datavisualization.Sunburst.SunburstAlignment | string; - - /** Options for customizing the legend border. - */ - border?: LegendBorder; - - /** Number of columns to arrange the legend items. - * @Default {null} - */ - columnCount?: number; - - /** Number of rows to arrange the legend items. - * @Default {null} - */ - rowCount?: number; - - /** Options to customize the font used for legend item text. - */ - font?: LegendFont; - - /** Gap or padding between the legend items. - * @Default {10} - */ - itemPadding?: number; - - /** Options to customize the style of legend items. - */ - itemStyle?: LegendItemStyle; - - /** Options to customize the location of sunburst legend. Legend is placed in provided location only when value of position property is custom - */ - location?: LegendLocation; - - /** Places the legend at specified position. Legend can be placed at left, right, top or bottom of the chart area.To manually specify the location of legend, set custom as value to this property. - * @Default {Bottom. See Position} - */ - position?: ej.datavisualization.Sunburst.SunburstLegendPosition | string; - - /** Shape of the legend items. - * @Default {None. See Shape} - */ - shape?: ej.datavisualization.Sunburst.SunburstLegendShape | string; - - /** Options to customize the size of the legend. - */ - size?: LegendSize; - - /** Options to customize the legend title. - */ - title?: LegendTitle; - } - - export interface Margin { - - /** Spacing for the left margin of chart area. Setting positive value decreases the width of the chart area from left side. - * @Default {10} - */ - left?: number; - - /** Spacing for the right margin of chart area. Setting positive value decreases the width of the chart area from right side. - * @Default {10} - */ - right?: number; - - /** Spacing for the top margin of chart area. Setting positive value decreases the height of the chart area from the top. - * @Default {10} - */ - top?: number; - - /** Spacing for the bottom margin of the chart area. Setting positive value decreases the height of the chart area from the bottom. - * @Default {10} - */ - bottom?: number; - } - - export interface ZoomSettings { - - /** Enables or disables zooming. - * @Default {false} - */ - enable?: boolean; - - /** Toolbar horizontal alignment - * @Default {right. See Alignment} - */ - toolbarHorizontalAlignment?: ej.datavisualization.Sunburst.SunburstHorizontalAlignment | string; - - /** Toolbar vertical alignment - * @Default {top. See Alignment} - */ - toolbarVerticalAlignment?: ej.datavisualization.Sunburst.SunburstVerticalAlignment | string; - } - } - namespace Sunburst { - enum FontStyle { - //string - Normal, - //string - Italic, - } - } - namespace Sunburst { - enum FontWeight { - //string - Regular, - //string - Bold, - //string - Lighter, - } - } - namespace Sunburst { - enum SunburstLabelRotationMode { - //string - Angle, - //string - Normal, - } - } - namespace Sunburst { - enum SunburstLabelOverflowMode { - //string - Trim, - //string - Hide, - //string - None, - } - } - namespace Sunburst { - enum SunburstAlignment { - //string - Center, - //string - Near, - //string - Far, - } - } - namespace Sunburst { - enum SunburstHighlightMode { - //string - Point, - //string - Parent, - //string - Child, - //string - All, - } - } - namespace Sunburst { - enum SunburstHighlightType { - //string - Opacity, - //string - Color, - } - } - namespace Sunburst { - enum SunburstClickAction { - //string - None, - //string - ToggleSegmentVisibility, - //string - ToggleSegmentSelection, - } - } - namespace Sunburst { - enum SunburstLegendPosition { - //string - Left, - //string - Right, - //string - Top, - //string - Bottom, - } - } - namespace Sunburst { - enum SunburstLegendShape { - //string - Diamond, - //string - Pentagon, - //string - Rectangle, - //string - Circle, - //string - Cross, - //string - Triangle, - } - } - namespace Sunburst { - enum SunburstTheme { - //string - FlatLight, - //string - FlatDark, - } - } - namespace Sunburst { - enum SunburstHorizontalAlignment { - //string - Center, - //string - Left, - //string - Right, - } - } - namespace Sunburst { - enum SunburstVerticalAlignment { - //string - Top, - //string - Bottom, - //string - Middle, - } - } - namespace Sunburst { - enum Animation { - //string - Rotation, - //string - FadeIn, - } - } - - class PivotGrid extends ej.Widget { - static fn: PivotGrid; - constructor(element: JQuery | Element, options?: PivotGrid.Model); - static Locale: any; - model: PivotGrid.Model; - defaults: PivotGrid.Model; - - /** Performs an asynchronous HTTP (AJAX) request. - * @returns {void} - */ - doAjaxPost(): void; - - /** Performs an asynchronous HTTP (FullPost) submit. - * @returns {void} - */ - doPostBack(): void; - - /** Exports the PivotGrid to the specified format. - * @returns {void} - */ - exportPivotGrid(): void; - - /** This function re-renders the PivotGrid on clicking the navigation buttons on PivotPager. - * @returns {void} - */ - refreshPagedPivotGrid(): void; - - /** This function refreshes the PivotGrid with modified data input in client-mode. - * @returns {void} - */ - refreshPivotGrid(): void; - - /** This function re-renders the control with the report available at that instant. - * @returns {void} - */ - refreshControl(): void; - - /** This function returns the height of all rows and width each and every column. - * @returns {any} - */ - calculateCellWidths(): any; - - /** This function creates the conditional formatting dialog to apply conditional formatting for PivotGrid control. - * @returns {void} - */ - createConditionalDialog(): void; - - /** This function saves the current report to the database/local storage. - * @returns {void} - */ - saveReport(): void; - - /** This function loads the specified report from the database/local storage. - * @returns {void} - */ - loadReport(): void; - - /** This function reconstructs the JSON data formed for rendering PivotGrid in excel-like layout format. - * @returns {void} - */ - excelLikeLayout(): void; - - /** Returns the OlapReport string maintained along with the axis elements information. - * @returns {string} - */ - getOlapReport(): string; - - /** Sets the OlapReport string along with the axis information. - * @returns {void} - */ - setOlapReport(): void; - - /** Returns the JSON records formed to render the control. - * @returns {Array} - */ - getJSONRecords(): any[]; - - /** Sets the JSON records formed to render the control. - * @returns {void} - */ - setJSONRecords(): void; - - /** This function allows user to change the caption of the Pivot Item (name displayed in UI) on-demand for relational datasource in client-mode. - * @returns {void} - */ - refreshFieldCaption(): void; - - /** This function receives the JSON formatted datasource to render the PivotGrid control. - * @returns {void} - */ - renderControlFromJSON(): void; - } - export namespace PivotGrid { - - export interface Model { - - /** Sets the mode for the PivotGrid widget for binding either OLAP or relational data source. - * @Default {ej.Pivot.AnalysisMode.Pivot} - */ - analysisMode?: ej.Pivot.AnalysisMode | string; - - /** Specifies the CSS class to PivotGrid to achieve custom theme. - * @Default {“”} - */ - cssClass?: string; - - /** Connects the PivotSchemaDesigner with the specified ID to the PivotGrid Control. - * @Default {“”} - */ - pivotTableFieldListID?: string; - - /** Initializes the data source for the PivotGrid widget, when it functions completely on client-side. - * @Default {{}} - */ - dataSource?: DataSource; - - /** Holds the neccessary properties for value sorting. - * @Default {{}} - */ - valueSortSettings?: ValueSortSettings; - - /** Object that holds the settings of frozen headers. - * @Default {{}} - */ - frozenHeaderSettings?: FrozenHeaderSettings; - - /** Object utilized to pass additional information between client-end and service-end on operating the control in server mode. - * @Default {null} - */ - customObject?: any; - - /** Allows the user to collapsed the specified members in each field by default. - * @Default {null} - */ - collapsedMembers?: any; - - /** Allows the user to access each cell on mouse right-click. - * @Default {false} - */ - enableCellContext?: boolean; - - /** Enables the cell selection for a specific range of value cells. - * @Default {false} - */ - enableCellSelection?: boolean; - - /** Enables the Drill-Through feature which retrieves the raw items that are used to create the specific cell in PivotGrid. - * @Default {false} - */ - enableDrillThrough?: boolean; - - /** Allows user to get the cell details in JSON format on double clicking the cell. - * @Default {false} - */ - enableCellDoubleClick?: boolean; - - /** Allows user to edit the value cells for write-back support in PivotGrid. This is applicable only for server-mode. - * @Default {false} - */ - enableCellEditing?: boolean; - - /** Collapses the Pivot items along rows and columns by default. It works only for relational data source. - * @Default {false} - */ - enableCollapseByDefault?: boolean; - - /** Enables/Disables the display of grand total for all the columns. - * @Default {true} - */ - enableColumnGrandTotal?: boolean; - - /** Allows the user to format a specific set of cells based on the condition. - * @Default {false} - */ - enableConditionalFormatting?: boolean; - - /** Enables the advanced filtering options Value Filtering, Label Filtering and Sorting for each fields in server mode. - * @Default {false} - */ - enableAdvancedFilter?: boolean; - - /** Allows the user to refresh the control on-demand and not during every UI operation. - * @Default {false} - */ - enableDeferUpdate?: boolean; - - /** Enables the display of GroupingBar allowing you to filter, sort and remove fields obtained from datasource. - * @Default {false} - */ - enableGroupingBar?: boolean; - - /** Enables/Disables the display of grand total for rows and columns. - * @Default {true} - */ - enableGrandTotal?: boolean; - - /** Allows the user to load PivotGrid using JSON data. - * @Default {false} - */ - enableJSONRendering?: boolean; - - /** Enables rendering of PivotGrid widget along with the PivotTable Field List, which allows UI operations. - * @Default {true} - */ - enablePivotFieldList?: boolean; - - /** Enables the display of grand total for all the rows. - * @Default {true} - */ - enableRowGrandTotal?: boolean; - - /** Allows the user to view layout of the PivotGrid from right to left. - * @Default {false} - */ - enableRTL?: boolean; - - /** Allows the user to enable ToolTip option. - * @Default {false} - */ - enableToolTip?: boolean; - - /** Allows the user to enable the animation effects in tooltip. - * @Default {false} - */ - enableToolTipAnimation?: boolean; - - /** Allows the user to adjust the width of the columns dynamically. - * @Default {false} - */ - enableColumnResizing?: boolean; - - /** Allows the user to view large amount of data through virtual scrolling. - * @Default {false} - */ - enableVirtualScrolling?: boolean; - - /** Allows the user to view large amount of data by applying paging. - * @Default {false} - */ - enablePaging?: boolean; - - /** Allows the user to configure hyperlink settings of PivotGrid control. - * @Default {{}} - */ - hyperlinkSettings?: HyperlinkSettings; - - /** Allows the user to enable PivotGrid’s responsiveness in the browser layout. - * @Default {false} - */ - isResponsive?: boolean; + /** Returns the clicked appointment object. + */ + appointment?: any; - /** Contains the serialized JSON string which renders PivotGrid. - */ - jsonRecords?: string; - - /** Sets the summary layout for PivotGrid.Following are the ways in which summary can be positioned: normal summary (bottom), top summary, no summary and excel-like summary. - * @Default {ej.PivotGrid.Layout.Normal} - */ - layout?: ej.PivotGrid.Layout | string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Allows the user to set the localized language for the widget. - * @Default {en-US} - */ - locale?: string; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Sets the mode for the PivotGrid widget for binding data source either in server-side or client-side. - * @Default {ej.Pivot.OperationalMode.ClientMode} - */ - operationalMode?: ej.Pivot.OperationalMode | string; + /** Returns the name of the event. + */ + type?: string; + } - /** Allows the user to set custom name for the methods at service-end, communicated during AJAX post. - * @Default {{}} - */ - serviceMethodSettings?: ServiceMethodSettings; + export interface BeforeAppointmentRemoveEventArgs { - /** Connects the service using the specified URL for any server updates. - * @Default {“”} - */ - url?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; + /** Returns the deleted appointment object. + */ + appointment?: any; - /** Triggers before any AJAX request is passed from PivotGrid to service methods. */ - beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Triggers before Pivot Engine starts to populate. */ - beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; + /** Returns the name of the Scheduler event. + */ + type?: string; + } - /** Triggers when double click action is performed over a cell. */ - cellDoubleClick?(e: CellDoubleClickEventArgs): void; + export interface BeforeAppointmentChangeEventArgs { - /** Triggers when right-click action is performed on a cell. */ - cellContext?(e: CellContextEventArgs): void; + /** Returns the edited appointment object. + */ + appointment?: any; - /** Triggers when a specific range of value cells are selected. */ - cellSelection?(e: CellSelectionEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggers when the hyperlink of column header is clicked. */ - columnHeaderHyperlinkClick?(e: ColumnHeaderHyperlinkClickEventArgs): void; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Triggers after performing drill operation in PivotGrid. */ - drillSuccess?(e: DrillSuccessEventArgs): void; + /** Returns the name of the Scheduler event. + */ + type?: string; + } - /** Triggers while clicking "OK" button in the drill-through dialog. */ - drillThrough?(e: DrillThroughEventArgs): void; + export interface AppointmentHoverEventArgs { - /** Triggers when PivotGrid loading is initiated. */ - load?(e: LoadEventArgs): void; + /** Returns the object of appointmentHover event. + */ + object?: any; - /** Triggers when PivotGrid widget completes all operations at client-side after any AJAX request. */ - renderComplete?(e: RenderCompleteEventArgs): void; + /** Returns the hovered appointment object. + */ + appointment?: any; - /** Triggers when any error occurred during AJAX request. */ - renderFailure?(e: RenderFailureEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggers when PivotGrid successfully reaches client-side after any AJAX request. */ - renderSuccess?(e: RenderSuccessEventArgs): void; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Triggers when the hyperlink of row header is clicked. */ - rowHeaderHyperlinkClick?(e: RowHeaderHyperlinkClickEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggers when the hyperlink of summary cell is clicked. */ - summaryCellHyperlinkClick?(e: SummaryCellHyperlinkClickEventArgs): void; + export interface BeforeAppointmentCreateEventArgs { - /** Triggers when the hyperlink of value cell is clicked. */ - valueCellHyperlinkClick?(e: ValueCellHyperlinkClickEventArgs): void; + /** Returns the appointment object. + */ + appointment?: any; - /** Triggers before saving the current report to database. */ - saveReport?(e: SaveReportEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggers before loading a report from database. */ - loadReport?(e: LoadReportEventArgs): void; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Triggers before performing exporting in pivot grid. */ - beforeExport?(e: BeforeExportEventArgs): void; + /** Returns the name of the Scheduler event. + */ + type?: string; + } - /** Triggers before editing the cells. */ - cellEdit?(e: CellEditEventArgs): void; - } + export interface AppointmentWindowOpenEventArgs { - export interface AfterServiceInvokeEventArgs { + /** returns the object of appointmentWindowOpen event while selecting the detail option from quick window or edit appointment or edit series option. + */ + object?: any; - /** returns the current action of PivotGrid control. - */ - action?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the custom object bound with PivotGrid control. - */ - customObject?: any; + /** Returns the end time of the double clicked cell. + */ + endTime?: any; - /** returns the HTML element of PivotGrid control. - */ - element?: any; - } + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - export interface BeforeServiceInvokeEventArgs { + /** Returns the action name that triggers window open. + */ + originalEventType?: string; - /** returns the current action of PivotGrid control. - */ - action?: string; + /** Returns the start time of the double clicked cell. + */ + startTime?: any; - /** returns the custom object bound with PivotGrid control. - */ - customObject?: any; + /** Returns the target of the double clicked cell. + */ + target?: any; - /** returns the HTML element of PivotGrid control. - */ - element?: any; - } + /** Returns the name of the event. + */ + type?: string; - export interface BeforePivotEnginePopulateEventArgs { + /** Returns the edit appointment object. + */ + appointment?: any; - /** returns the PivotGrid object - */ - pivotGridObject?: any; - } + /** Returns the edit occurrence option value. + */ + edit?: boolean; + } - export interface CellDoubleClickEventArgs { + export interface BeforeContextMenuOpenEventArgs { - /** returns the JSON details of the double clicked cell. - */ - selectedData?: any[]; + /** Returns the object of beforeContextMenuOpen event. + */ + object?: any; - /** returns the custom object bound with PivotGrid control. - */ - customObject?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the HTML element of PivotGrid control. - */ - element?: any; - } + /** Returns the current cell index value. + */ + cellIndex?: number; - export interface CellContextEventArgs { + /** Returns the current date value. + */ + currentDate?: any; - /** returns the cell position (row index and column index) in table. - */ - cellPosition?: string; + /** Returns the current resource details, when multiple resources are present, otherwise returns null. + */ + resources?: any; - /** returns the type of the cell. - */ - cellType?: string; + /** Returns the current appointment details while opening the menu from appointment. + */ + appointment?: any; - /** returns the content of the cell. - */ - cellValue?: string; + /** Returns the object of before opening menu target. + */ + events?: any; - /** returns the unique name of levels/members. - */ - uniqueName?: string; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** returns the role of the cell in PivotGrid. - */ - role?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** returns JSON record corresponding to the selected cell. - */ - rawdata?: any; + export interface CellClickEventArgs { - /** returns the original event object. - */ - args?: any; - } + /** Returns the object of cellClick event. + */ + object?: any; - export interface CellSelectionEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the JSON records of the selected range of cells. - */ - JSONRecords?: any; + /** Returns the end time of the clicked cell. + */ + endTime?: any; - /** Returns the row headers corresponding to the selected value cells. - */ - rowheader?: any; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Returns the column headers corresponding to the selected value cells. - */ - columnheader?: any; + /** Returns the start time of the clicked cell. + */ + startTime?: any; - /** Returns the information about the measure associated with the selected cell. - */ - measureCount?: string; - } + /** Returns the target of the clicked cell. + */ + target?: any; - export interface ColumnHeaderHyperlinkClickEventArgs { + /** Returns the name of the event. + */ + type?: string; + } - /** returns the information about the clicked cell - */ - args?: any; + export interface CellDoubleClickEventArgs { - /** returns the HTML element of the control. - */ - element?: any; + /** Returns the object of cellDoubleClick event. + */ + object?: any; - /** returns the custom object bound to the control. - */ - customObject?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface DrillSuccessEventArgs { + /** Returns the end time of the double clicked cell. + */ + endTime?: any; - /** returns the HTML element of the control. - */ - args?: any; - } + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - export interface DrillThroughEventArgs { + /** Returns the start time of the double clicked cell. + */ + startTime?: any; - /** return the JSON records of the generated cells on drill-through operation. - */ - data?: any; + /** Returns the target of the double clicked cell. + */ + target?: any; - /** returns the HTML element of PivotGrid control. - */ - element?: any; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface LoadEventArgs { + export interface CellHoverEventArgs { - /** returns the custom object bound with the control. - */ - customObject?: any; + /** Returns the object of cellHover event. + */ + object?: any; - /** returns the HTML element of PivotGrid control. - */ - element?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface RenderCompleteEventArgs { + /** Returns the index of the hovered cell. + */ + cellIndex?: any; - /** returns the current action of PivotGrid control. - */ - action?: string; + /** Returns the current date of the hovered cell. + */ + currentDate?: any; - /** returns the custom object bound with the control. - */ - customObject?: any; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** returns the HTML element of PivotGrid control. - */ - element?: any; - } + /** Returns the target of the clicked cell. + */ + target?: any; - export interface RenderFailureEventArgs { + /** Returns the name of the event. + */ + type?: string; + } - /** returns the current action of PivotGrid control. - */ - action?: string; + export interface CreateEventArgs { - /** returns the custom object bound with the control. - */ - customObject?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the HTML element of PivotGrid control. - */ - element?: any; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** returns the error message with error code. - */ - message?: string; - } + /** Returns the name of the Scheduler event. + */ + type?: string; + } - export interface RenderSuccessEventArgs { + export interface DestroyEventArgs { - /** returns the current action of PivotGrid control. - */ - action?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the custom object bound with the control. - */ - customObject?: any; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** returns the HTML element of PivotGrid control. - */ - element?: any; - } + /** Returns the name of the Scheduler event. + */ + type?: string; + } - export interface RowHeaderHyperlinkClickEventArgs { + export interface DragEventArgs { - /** returns the information about the clicked cell - */ - args?: any; + /** Returns the object of dragOver event. + */ + object?: any; - /** returns the HTML element of the control. - */ - element?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the custom object bound to the control. - */ - customObject?: any; - } + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - export interface SummaryCellHyperlinkClickEventArgs { + /** Returns the target of the drag over appointment. + */ + target?: any; - /** returns the information about the clicked cell - */ - args?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** returns the HTML element of the control. - */ - element?: any; + export interface DragStartEventArgs { - /** returns the custom object bound to the control. - */ - customObject?: any; - } + /** Returns the object of dragStart event. + */ + object?: any; - export interface ValueCellHyperlinkClickEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the information about the clicked cell - */ - args?: any; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** returns the HTML element of the control. - */ - element?: any; + /** Returns the target of the dragging appointment. + */ + target?: any; - /** returns the custom object bound to the control. - */ - customObject?: any; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface SaveReportEventArgs { + export interface DragStopEventArgs { - /** returns the report to be stored in database. - */ - report?: any; - } + /** Returns the object of dragDrop event. + */ + object?: any; - export interface LoadReportEventArgs { + /** Returns the dropped appointment object. + */ + appointment?: any; - /** returns the PivotGrid object. - */ - targetControl?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns whether the control is bound with OLAP or Relational data source. - */ - dataModel?: string; - } + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - export interface BeforeExportEventArgs { + /** Returns the name of the event. + */ + type?: string; + } - /** contains the url of the service responsible for exporting. - */ - url?: string; + export interface MenuItemClickEventArgs { - /** contains the name of the exporting file. - */ - fileName?: string; - } + /** Returns the object of menuItemClick event. + */ + object?: any; - export interface CellEditEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** contains the array of cells selected for editing. - */ - editCellsInfo?: any[]; - } + /** Returns the object of menu item event. + */ + events?: any; - export interface DataSourceColumnsAdvancedFilter { + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Allows the user to provide level unique name to perform advanced filtering. - */ - name?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Allows the user to set the operator to perform Label Filtering. - * @Default {none} - */ - labelFilterOperator?: string; - - /** Allows the user to set the operator to perform Value Filtering. - * @Default {none} - */ - valueFilterOperator?: string; + export interface NavigationEventArgs { - /** Allows the user to set the filtering type while performing advanced filtering. - */ - advancedFilterType?: string; + /** Returns the current date object. + */ + currentDate?: any; - /** In case of value filtering, this property contains the measure name to which the filter is applied. - */ - measure?: string; - - /** Allows the user to hold the filter operand values in advanced filtering. - */ - values?: any[]; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface DataSourceColumnsFilterItems { + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; + /** Returns the current view value. + */ + currentView?: string; - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceColumn { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Allows the user to set the display caption for an item. - */ - fieldCaption?: string; - - /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. - * @Default {[]} - */ - advancedFilter?: DataSourceColumnsAdvancedFilter[]; - - /** Allows the user to indicate whether the added item is a named set or not. - * @Default {false} - */ - isNamedSets?: boolean; - - /** Shows/Hides the sub-total of the field in PivotGrid. - * @Default {true} - */ - showSubTotal?: boolean; - - /** Allows the user to set the sorting order of the members of the field. - * @Default {ej.PivotAnalysis.SortOrder.Ascending} - */ - sortOrder?: ej.PivotAnalysis.SortOrder | string; - - /** Contains the list of members need to be drilled down by default in the field. - * @Default {[]} - */ - drilledItems?: any[]; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceColumnsFilterItems; - } - - export interface DataSourceRowsAdvancedFilter { - - /** Allows the user to provide level unique name to perform advanced filtering. - */ - name?: string; - - /** Allows the user to set the operator to perform Label Filtering. - * @Default {none} - */ - labelFilterOperator?: string; - - /** Allows the user to set the operator to perform Value Filtering. - * @Default {none} - */ - valueFilterOperator?: string; - - /** Allows the user to set the filtering type while performing advanced filtering. - */ - advancedFilterType?: string; - - /** In case of value filtering, this property contains the measure name to which the filter is applied. - */ - measure?: string; - - /** Allows the user to hold the filter operand values in advanced filtering. - */ - values?: any[]; - } - - export interface DataSourceRowsFilterItems { - - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; - - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceRow { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Allows the user to set the display caption for an item. - */ - fieldCaption?: string; - - /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. - * @Default {[]} - */ - advancedFilter?: DataSourceRowsAdvancedFilter[]; - - /** Allows the user to indicate whether the added item is a named set or not. - * @Default {false} - */ - isNamedSets?: boolean; - - /** Shows/Hides the sub-total of the field. - * @Default {true} - */ - showSubTotal?: boolean; - - /** Allows the user to set the sorting order of the members of the field. - * @Default {ej.PivotAnalysis.SortOrder.Ascending} - */ - sortOrder?: ej.PivotAnalysis.SortOrder | string; - - /** Contains the list of members need to be drilled down by default in the field. - * @Default {[]} - */ - drilledItems?: any[]; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceRowsFilterItems; - } - - export interface DataSourceValuesMeasure { - - /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. - */ - fieldName?: string; - } - - export interface DataSourceValue { - - /** Allows the user to bind the item by using its unique name as field name for Relational datasource. - */ - fieldName?: string; - - /** Allows the user to set the display caption for an item for Relational datasource. - */ - fieldCaption?: string; - - /** This holds the list of unique names of measures to bind them from the OLAP cube. - * @Default {[]} - */ - measures?: DataSourceValuesMeasure[]; - - /** Allows to set the axis name to place the measures items. - * @Default {rows} - */ - axis?: string; - - /** Indicates whether the field is a calculated field or not with Relational datasource. - * @Default {false} - */ - isCalculatedField?: boolean; - - /** Allows to set the type of PivotGrid summary calculation for the value field with Relational datasource. - * @Default {ej.PivotAnalysis.SummaryType.Sum} - */ - summaryType?: ej.PivotAnalysis.SummaryType | string; - - /** Allows to set the format of the values. - */ - format?: string; - - /** This property sets type of display of date. - */ - formatString?: string; - - /** Allows to set the formula for calculation of values for calculated members in Relational datasource. - */ - formula?: string; - } - - export interface DataSourceFiltersFilterItems { - - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; - - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceFilter { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Allows the user to set the display name for an item. - */ - fieldCaption?: string; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceFiltersFilterItems; - } - - export interface DataSourcePagerOptions { - - /** Allows to set the number of categorical columns to be displayed in each page on applying paging. - * @Default {0} - */ - categoricalPageSize?: number; - - /** Allows to set the number of series rows to be displayed in each page on applying paging. - * @Default {0} - */ - seriesPageSize?: number; - - /** Allows to set the page number in categorical axis to be loaded by default. - * @Default {1} - */ - categoricalCurrentPage?: number; - - /** Allows to set the page number in series axis to be loaded by default. - * @Default {1} - */ - seriesCurrentPage?: number; - } - - export interface DataSource { - - /** Lists out the items to be arranged in columns section of PivotGrid. - * @Default {[]} - */ - columns?: DataSourceColumn[]; - - /** Lists out the items to be arranged in rows section of PivotGrid. - * @Default {[]} - */ - rows?: DataSourceRow[]; - - /** Lists out the items which supports calculation in PivotGrid. - * @Default {[]} - */ - values?: DataSourceValue[]; - - /** Lists out the items which supports filtering of values without displaying the members in UI in PivotGrid. - * @Default {[]} - */ - filters?: DataSourceFilter[]; - - /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} - */ - cube?: string; - - /** Provides the raw data source for the PivotGrid. - * @Default {null} - */ - data?: any; - - /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} - */ - catalog?: string; - - /** Allows user to filter the members (by its name and values) through advanced filtering (excel-like) option for OLAP data source in client-mode. - * @Default {false} - */ - enableAdvancedFilter?: boolean; - - /** Sets a name to the report bound to the control. - */ - reportName?: string; - - /** Allows to set the page size and current page number for each axis on applying paging. - * @Default {{}} - */ - pagerOptions?: DataSourcePagerOptions; - } - - export interface ValueSortSettings { - - /** Contains the headers of the specific column to which value sorting is applied. - */ - headerText?: string; - - /** Allows the user to set the string for separating column headers provided in the above property headerText. - */ - headerDelimiters?: string; - - /** Allows the user to set the sorting order of the values of the field. - * @Default {ej.PivotAnalysis.SortOrder.Ascending} - */ - sortOrder?: ej.PivotAnalysis.SortOrder | string; - } - - export interface FrozenHeaderSettings { - - /** Allows the user to freeze the row headers alone on scrolling the horizontal scroll bar. - * @Default {false} - */ - enableFrozenRowHeaders?: boolean; - - /** Allows the user to freeze the column headers alone on scrolling the vertical scroll bar. - * @Default {false} - */ - enableFrozenColumnHeaders?: boolean; - - /** Allows the user to freeze both the row headers and column headers on scrolling. - * @Default {false} - */ - enableFrozenHeaders?: boolean; - } - - export interface HyperlinkSettings { - - /** Allows the user to enable/disable hyperlink for column header. - * @Default {false} - */ - enableColumnHeaderHyperlink?: boolean; - - /** Allows the user to enable/disable hyperlink for row header. - * @Default {false} - */ - enableRowHeaderHyperlink?: boolean; - - /** Allows the user to enable/disable hyperlink for summary cells. - * @Default {false} - */ - enableSummaryCellHyperlink?: boolean; - - /** Allows the user to enable/disable hyperlink for value cells. - * @Default {false} - */ - enableValueCellHyperlink?: boolean; - } - - export interface ServiceMethodSettings { - - /** Allows the user to set the custom name for the service method responsible for drill up/down operation in PivotGrid. - * @Default {DrillGrid} - */ - drillDown?: string; - - /** Allows the user to set the custom name for the service method responsible for exporting. - * @Default {Export} - */ - exportPivotGrid?: string; - - /** Allows the user to set the custom name for the service method responsible for performing server-side actions on defer update. - * @Default {DeferUpdate} - */ - deferUpdate?: string; - - /** Allows the user to set the custom name for the service method responsible for getting the values for the tree-view inside filter dialog. - * @Default {FetchMembers} - */ - fetchMembers?: string; - - /** Allows the user to set the custom name for the service method responsible for filtering operation in PivotGrid. - * @Default {Filtering} - */ - filtering?: string; - - /** Allows the user to set the custom name for the service method responsible for initializing PivotGrid. - * @Default {InitializeGrid} - */ - initialize?: string; - - /** Allows the user to set the custom name for the service method responsible for the server-side action, on dropping a node from Field List. - * @Default {NodeDropped} - */ - nodeDropped?: string; - - /** Allows the user to set the custom name for the service method responsible for the server-side action on changing the checked state of a node in Field List. - * @Default {NodeStateModified} - */ - nodeStateModified?: string; - - /** Allows the user to set the custom name for the service method responsible for performing paging operation in PivotGrid. - * @Default {Paging} - */ - paging?: string; - - /** Allows the user to set the custom name for the service method responsible for sorting operation in PivotGrid. - * @Default {Sorting} - */ - sorting?: string; - - /** Allows the user to set the custom name for the service method responsible for expanding members inside member editor. - * @Default {MemberExpanded} - */ - memberExpand?: string; - - /** Allows the user to set the custom name for the service method responsible for editing the cells. - * @Default {CellEditing} - */ - cellEditing?: string; - - /** Allows the user to set the custom name for the service method responsible for saving the current report to database. - * @Default {SaveReport} - */ - saveReport?: string; - - /** Allows the user to set the custom name for the service method responsible for loading a report from database. - * @Default {LoadReportFromDB} - */ - loadReport?: string; - - /** Allows the user to set the custom name for the service method responsible for adding a calculated field to the report. - * @Default {CalculatedField} - */ - calculatedField?: string; - - /** Allows the user to set the custom name for the service method responsible for performing drill through operation. - * @Default {DrillThroughHierarchies} - */ - drillThroughHierarchies?: string; - - /** Allows the user to set the custom name for the service method responsible for performing drill through operation in data table. - * @Default {DrillThroughDataTable} - */ - drillThroughDataTable?: string; - - /** Allows the user to set the custom name for the service method responsible for write-back operation in OLAP Cube. This is only applicable in server-side component. - * @Default {WriteBack} - */ - writeBack?: string; - } - - enum Layout { - - ///To set normal summary layout in PivotGrid. - Normal, - - ///To set layout with summaries at the top in PivotGrid. - NormalTopSummary, - - ///To set layout without summaries in PivotGrid. - NoSummaries, - - ///To set excel-like layout in PivotGrid. - ExcelLikeLayout - } - - } - namespace Pivot { - enum AnalysisMode { - //To bind an OLAP data source to PivotGrid. - OLAP, - //To bind a relational data source to PivotGrid. - Pivot, - } - } - namespace PivotAnalysis { - enum SortOrder { - //Sorts the members of the field in ascending order. - Ascending, - //Sorts the members of the field in descending order. - Descending, - //Displays the members without sorting in any order. - None, - } - } - namespace PivotAnalysis { - enum FilterType { - //Excludes the specified values among the members of the field. - Exclude, - //Includes the specified values alone among the members of the field. - Include, - } - } - namespace PivotAnalysis { - enum SummaryType { - //Calculates the summary as the total of all values. - Sum, - //Displays the average of all values as the summaries. - Average, - //Displays the count of items in summaries. - Count, - //Displays the minimum value of all the items in the summary. - Min, - //Displays the maximum value of all the items in the summary. - Max, - } - } - namespace Pivot { - enum OperationalMode { - //To bind data source completely from client-side. - ClientMode, - //To bind data source completely from server-side. - ServerMode, - } - } - - class PivotSchemaDesigner extends ej.Widget { - static fn: PivotSchemaDesigner; - constructor(element: JQuery | Element, options?: PivotSchemaDesigner.Model); - static Locale: any; - model: PivotSchemaDesigner.Model; - defaults: PivotSchemaDesigner.Model; - - /** Performs an asynchronous HTTP (AJAX) request. - * @returns {void} - */ - doAjaxPost(): void; - - /** Re-renders the control with the data source bound to the pivot control at that instant. - * @returns {void} - */ - refreshControl(): void; - } - export namespace PivotSchemaDesigner { - - export interface Model { - - /** Specifies the CSS class to PivotSchemaDesigner to achieve custom theme. - * @Default {“”} - */ - cssClass?: string; - - /** Object utilized to pass additional information between client-end and service-end. - * @Default {{}} - */ - customObject?: any; - - /** For ASP.NET and MVC Wrapper, PivotSchemaDesigner will be initialized and rendered empty initially. Once the connected pivot control widget is rendered completely, - * PivotSchemaDesigner will just be populated with data source by setting this property to “true”. - * @Default {false} - */ - enableWrapper?: boolean; - - /** Allows the user to view PivotTable Field List from right to left. - * @Default {false} - */ - enableRTL?: boolean; - - /** Sets the visibility of OLAP elements in PivotTable Field List. This is only applicable for OLAP datasource. - * @Default {null} - */ - olap?: Olap; - - /** Allows the user to enable/disable drag and drop operations within the PivotTable Field List. - * @Default {true} - */ - enableDragDrop?: boolean; - - /** Sets the height for PivotSchemaDesigner. - * @Default {“”} - */ - height?: string; - - /** Allows the user to set the localized language for the widget. - * @Default {en-US} - */ - locale?: string; - - /** Sets the Pivot control bound with this PivotSchemaDesigner. - * @Default {null} - */ - pivotControl?: any; - - /** Allows the user to set custom name for the methods at service-end, communicated during AJAX post. - * @Default {{}} - */ - serviceMethod?: ServiceMethod; - - /** Connects the service using the specified URL for any server updates. - * @Default {“”} - */ - url?: string; - - /** Sets the width for PivotSchemaDesigner. - * @Default {“”} - */ - width?: string; - - /** Sets the layout for PivotSchemaDesigner. - * @Default {ej.PivotSchemaDesigner.Layouts.Excel} - */ - layout?: ej.PivotSchemaDesigner.Layouts | string; - - /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; - - /** Triggers before any AJAX request is passed from PivotSchemaDesigner to service methods. */ - beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; - - /** Triggers when we start dragging any field from PivotSchemaDesigner. */ - dragMove?(e: DragMoveEventArgs): void; - } - - export interface AfterServiceInvokeEventArgs { - - /** returns the current action of PivotSchemaDesigner control. - */ - action?: string; - - /** returns the custom object bound with PivotSchemaDesigner control. - */ - customObject?: any; - - /** returns the HTML element of PivotSchemaDesigner control. - */ - element?: any; - } - - export interface BeforeServiceInvokeEventArgs { - - /** returns the current action of PivotSchemaDesigner control. - */ - action?: string; - - /** returns the custom object bound with PivotSchemaDesigner control. - */ - customObject?: any; - - /** returns the HTML element of PivotSchemaDesigner control. - */ - element?: any; - } - - export interface DragMoveEventArgs { - - /** returns the HTML element of the dragged field from PivotSchemaDesigner. - */ - dragTarget?: any; - - /** return the JSON details of the dragged field. - */ - draggedElementData?: any; - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the PivotSchemaDesigner model - */ - model?: any; - } - - export interface Olap { - - /** Allows the user to view the KPI elements in tree-view inside PivotTable Field List. This is only applicable for OLAP datasource. - * @Default {false} - */ - showKPI?: boolean; - - /** Allows the user to view the named sets in tree-view inside PivotTable Field List. This is only applicable for OLAP datasource. - * @Default {false} - */ - showNamedSets?: boolean; - } - - export interface ServiceMethod { - - /** Allows the user to set the custom name for the service method responsible for getting the values for the tree-view inside filter dialog. - * @Default {FetchMembers} - */ - fetchMembers?: string; - - /** Allows the user to set the custom name for the service method responsible for filtering operation in Field List. - * @Default {Filtering} - */ - filtering?: string; - - /** Allows the user to set the custom name for the service method responsible for the server-side action, on expanding members in Field List. - * @Default {MemberExpanded} - */ - memberExpand?: string; - - /** Allows the user to set the custom name for the service method responsible for the server-side action, on dropping a node into Field List. - * @Default {NodeDropped} - */ - nodeDropped?: string; - - /** Allows the user to set the custom name for the service method responsible for the server-side action on changing the checked state of a node in Field List. - * @Default {NodeStateModified} - */ - nodeStateModified?: string; - - /** Allows the user to set the custom name for the service method responsible for button removing operation in Field List. - * @Default {RemoveButton} - */ - removeButton?: string; - } - - enum Layouts { - - ///To set the layout as same in the Excel. - Excel, - - ///To set normal layout for Field List. - Normal, - - ///To set layout with the axes one above the other. - OneByOne - } - - } - - class PivotPager extends ej.Widget { - static fn: PivotPager; - constructor(element: JQuery | Element, options?: PivotPager.Model); - static Locale: any; - model: PivotPager.Model; - defaults: PivotPager.Model; - - /** This function initializes the page counts and page numbers for the PivotPager. - * @returns {void} - */ - initPagerProperties(): void; - } - export namespace PivotPager { - - export interface Model { - - /** Contains the current page number in categorical axis. - * @Default {1} - */ - categoricalCurrentPage?: number; - - /** Contains the total page count in categorical axis. - * @Default {1} - */ - categoricalPageCount?: number; - - /** Allows the user to set the localized language for the widget. - * @Default {en-US} - */ - locale?: string; - - /** Sets the pager mode (Only Categorical Pager/Only Series Pager/Both) for the PivotPager. - * @Default {ej.PivotPager.Mode.Both} - */ - mode?: ej.PivotPager.Mode | string; - - /** Contains the current page number in series axis. - * @Default {1} - */ - seriesCurrentPage?: number; - - /** Contains the total page count in series axis. - * @Default {1} - */ - seriesPageCount?: number; - - /** Contains the ID of the target element for which paging needs to be done. - * @Default {“”} - */ - targetControlID?: string; - } - - enum Mode { - - ///To set both categorical and series pager for paging. - Both, - - ///To set only categorical pager for paging. - Categorical, - - ///To set only series pager for paging. - Series - } - - } - - class PivotChart extends ej.Widget { - static fn: PivotChart; - constructor(element: JQuery | Element, options?: PivotChart.Model); - static Locale: any; - model: PivotChart.Model; - defaults: PivotChart.Model; - - /** Performs an asynchronous HTTP (AJAX) request. - * @returns {void} - */ - doAjaxPost(): void; - - /** Perform an asynchronous HTTP (FullPost) submit. - * @returns {void} - */ - doPostBack(): void; - - /** Exports the PivotChart to the format specified in the parameter. - * @returns {void} - */ - exportPivotChart(): void; - - /** This function renders the PivotChart control with the JSON formatted datasource. - * @returns {void} - */ - renderChartFromJSON(): void; - - /** This function receives the update from service-end, which would be utilized for rendering the widget. - * @returns {void} - */ - renderControlSuccess(): void; - - /** Returns the OlapReport string maintained along with the axis elements information. - * @returns {string} - */ - getOlapReport(): string; - - /** Sets the OlapReport string along with the axis information and maintains it in a property. - * @returns {void} - */ - setOlapReport(): void; - - /** Returns the JSON records formed to render the control. - * @returns {Array} - */ - getJSONRecords(): any[]; - - /** Sets the JSON records to render the control. - * @returns {void} - */ - setJSONRecords(): void; - - /** Returns the PivotEngine formed to render the control. - * @returns {Array} - */ - getPivotEngine(): any[]; - - /** Sets the PivotEngine required to render the control. - * @returns {void} - */ - setPivotEngine(): void; - - /** Re-renders the control with the data source at the instant. - * @returns {void} - */ - refreshControl(): void; - - /** Renders the control with the pivot engine obtained from olap cube. - * @returns {void} - */ - generateJSON(): void; - - /** Navigates to the specified page number in specified axis. - * @returns {void} - */ - refreshPagedPivotChart(): void; - } - export namespace PivotChart { - - export interface Model { - - /** Sets the mode for the PivotChart widget for binding either OLAP or Relational data source. - * @Default {ej.Pivot.AnalysisMode.Pivot} - */ - analysisMode?: ej.Pivot.AnalysisMode | string; - - /** Specifies the CSS class to PivotChart to achieve custom theme. - * @Default {“”} - */ - cssClass?: string; - - /** Options for enabling zooming feature of PivotChart. - * @Default {{}} - */ - zooming?: Zooming; - - /** Options available to configure the properties of entire series. You can also override the options for specific series by using series collection. - * @Default {{}} - */ - commonSeriesOptions?: CommonSeriesOptions; - - /** Initializes the data source for the PivotChart widget, when it functions completely on client-side. - * @Default {{}} - */ - dataSource?: DataSource; - - /** Object utilized to pass additional information between client-end and service-end on operating the control in server mode. - * @Default {{}} - */ - customObject?: any; - - /** Allows the user to enable 3D view of PivotChart. - * @Default {false} - */ - enable3D?: boolean; - - /** Allows the user to view PivotChart from right to left. - * @Default {false} - */ - enableRTL?: boolean; - - /** Allows the user to enable PivotChart’s responsiveness in the browser layout. - * @Default {false} - */ - isResponsive?: boolean; - - /** Lets the user to customize the legend items and their labels. - * @Default {{}} - */ - legend?: any; - - /** Allows the user to set the localized language for the widget. - * @Default {en-US} - */ - locale?: string; - - /** Sets the mode for the PivotChart widget for binding data source either in server-side or client-side. - * @Default {ej.Pivot.OperationalMode.ClientMode} - */ - operationalMode?: ej.Pivot.OperationalMode | string; - - /** This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. - * To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. - * Then, assign the name to the series’s xAxisName property to link both axis and series. - * @Default {{}} - */ - primaryXAxis?: any; - - /** This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. - * To override y axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. - * Then, assign the name to the series’s yAxisName property to link both axis and series. - * @Default {{}} - */ - primaryYAxis?: any; - - /** Allows the user to rotate the angle of PivotChart in 3D view. - * @Default {0} - */ - rotation?: number; - - /** Allows the user to set custom name for the methods at service-end, communicated on AJAX post. - * @Default {{}} - */ - serviceMethodSettings?: ServiceMethodSettings; - - /** Options to customize the size of the PivotChart control. - * @Default {{}} - */ - size?: any; - - /** Connects the service using the specified URL for any server updates on operating the control in server mode. - * @Default {“”} - */ - url?: string; - - /** Triggers when PivotChart starts to render. */ - load?(e: LoadEventArgs): void; - - /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; - - /** Triggers before any AJAX request is passed from PivotChart to service methods. */ - beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; - - /** Triggers on performing drill up/down in PivotChart control. */ - drillSuccess?(e: DrillSuccessEventArgs): void; - - /** Triggers when PivotChart widget completes all operations at client-side after any AJAX request. */ - renderComplete?(e: RenderCompleteEventArgs): void; - - /** Triggers when any error occurred during AJAX request. */ - renderFailure?(e: RenderFailureEventArgs): void; - - /** Triggers when PivotChart successfully reaches client-side after any AJAX request. */ - renderSuccess?(e: RenderSuccessEventArgs): void; - - /** Triggers before performing exporting in pivot chart. */ - beforeExport?(e: BeforeExportEventArgs): void; - } + /** Returns the previous view value. + */ + previousView?: string; - export interface LoadEventArgs { - - /** returns the current action of PivotChart control. - */ - action?: string; + /** Returns the target of the action. + */ + target?: any; - /** returns the custom object bound with PivotChart control. - */ - customObject?: any; + /** Returns the name of the event. + */ + type?: string; - /** returns the HTML element of PivotChart control. - */ - element?: any; - } + /** Returns the previous date of the Schedule. + */ + previousDate?: any; + } - export interface AfterServiceInvokeEventArgs { + export interface QueryCellInfoEventArgs { - /** returns the current action of PivotChart control. - */ - action?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the custom object bound with PivotChart control. - */ - customObject?: any; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** returns the HTML element of PivotChart control. - */ - element?: any; - } + /** Returns the current appointment data. + */ + appointment?: any; - export interface BeforeServiceInvokeEventArgs { + /** Returns the currently rendering DOM element. + */ + element?: any; - /** returns the current action of PivotChart control. - */ - action?: string; + /** Returns the name of the currently rendering element on the scheduler. + */ + requestType?: string; - /** returns the custom object bound with PivotChart control. - */ - customObject?: any; + /** Returns the cell type which is currently rendering on the Scheduler. + */ + cellType?: string; - /** returns the HTML element of PivotChart control. - */ - element?: any; - } + /** Returns the start date of the currently rendering appointment. + */ + currentAppointmentDate?: any; - export interface DrillSuccessEventArgs { + /** Returns the currently rendering cell information. + */ + cell?: any; - /** returns the current instance of PivotChart. - */ - chartObj?: any; + /** Returns the currently rendering resource details. + */ + resource?: any; - /** returns the drill action of PivotChart. - */ - drillAction?: string; + /** Returns the currently rendering date information. + */ + currentDay?: any; + } - /** contains the name of the member drilled. - */ - drilledMember?: string; + export interface ReminderEventArgs { - /** returns the event object. - */ - event?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface RenderCompleteEventArgs { + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** returns the current action of PivotChart control. - */ - action?: string; + /** Returns the name of the event. + */ + type?: string; - /** returns the custom object bound with PivotChart control. - */ - customObject?: any; + /** Returns the appointment object for which the reminder is raised. + */ + reminderAppointment?: any; + } - /** returns the HTML element of PivotChart control. - */ - element?: any; - } + export interface ResizeEventArgs { - export interface RenderFailureEventArgs { + /** Returns the object of resizing event. + */ + object?: any; - /** returns the current action of PivotChart control. - */ - action?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the custom object bound with PivotChart control. - */ - customObject?: any; + /** Returns the resize element value. + */ + element?: any; - /** returns the HTML element of PivotChart control. - */ - element?: any; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** returns the error stack trace of the original exception. - */ - message?: string; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface RenderSuccessEventArgs { + export interface ResizeStartEventArgs { - /** returns the current instance of PivotChart. - */ - args?: any; - } + /** Returns the object of resizeStart event. + */ + object?: any; - export interface BeforeExportEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** contains the url of the service responsible for exporting. - */ - url?: string; + /** Returns the resize element value. + */ + element?: any; - /** contains the name of the exporting file. - */ - fileName?: string; - } + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - export interface Zooming { + /** Returns the name of the event. + */ + type?: string; + } - /** Enables or disables horizontal scrollbar. - * @Default {false} - */ - enableScrollbar?: boolean; - } + export interface ResizeStopEventArgs { - export interface CommonSeriesOptions { + /** Returns the object of resizeStop event. + */ + object?: any; - /** Allows the user to set the specific chart type for PivotChart widget. - * @Default {ej.PivotChart.ChartTypes.Column} - */ - type?: ej.PivotChart.ChartTypes | string; - } + /** Returns the resized appointment value. + */ + appointment?: any; - export interface DataSourceColumnsFilterItems { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } + /** Returns the target of the resized appointment. + */ + target?: any; - export interface DataSourceColumn { + /** Returns the name of the event. + */ + type?: string; + } - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; + export interface OverflowButtonClickEventArgs { - /** Allows the user to set the display caption for an item. - */ - fieldCaption?: string; + /** Returns the object consisting of start time, end time and resource value of the underlying cell on which the clicked overflow button is present. + */ + object?: any; - /** Allows the user to indicate whether the added item is a named set or not. - * @Default {false} - */ - isNamedSets?: boolean; - - /** Allows the user to set the sorting order of the members of the field. - * @Default {ej.PivotAnalysis.SortOrder.Ascending} - */ - sortOrder?: ej.PivotAnalysis.SortOrder | string; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceColumnsFilterItems; - } - - export interface DataSourceRowsFilterItems { - - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; - - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceRow { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Allows the user to set the display caption for an item. - */ - fieldCaption?: string; - - /** Allows the user to indicate whether the added item is a named set or not. - * @Default {false} - */ - isNamedSets?: boolean; - - /** Allows the user to set the sorting order of the members of the field. - * @Default {ej.PivotAnalysis.SortOrder.Ascending} - */ - sortOrder?: ej.PivotAnalysis.SortOrder | string; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceRowsFilterItems; - } - - export interface DataSourceValuesMeasure { - - /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. - */ - fieldName?: string; - } - - export interface DataSourceValue { - - /** Allows the user to bind the item by using its unique name as field name for Relational datasource. - */ - fieldName?: string; - - /** Allows the user to set the display caption for an item for Relational datasource. - */ - fieldCaption?: string; - - /** This holds the list of unique names of measures to bind them from the OLAP cube. - * @Default {[]} - */ - measures?: DataSourceValuesMeasure[]; - - /** Allows to set the axis name to place the measures items. - * @Default {rows} - */ - axis?: string; - - /** Indicates whether the field is a calculated field or not with Relational datasource. - * @Default {false} - */ - isCalculatedField?: boolean; - - /** Allows to set the formula for calculation of values for calculated members in Relational datasource. - */ - formula?: string; - } - - export interface DataSourceFiltersFilterItems { - - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; - - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceFilter { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceFiltersFilterItems; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface DataSource { + /** Returns the object of menu item event. + */ + events?: any; - /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} - */ - cube?: string; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Provides the raw data source for the PivotChart. - * @Default {null} - */ - data?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} - */ - catalog?: string; + export interface OverflowButtonHoverEventArgs { - /** Lists out the items to be displayed as series of PivotChart. - * @Default {[]} - */ - columns?: DataSourceColumn[]; + /** Returns the object consisting of start time, end time and resource value of the underlying cell on which the overflow button is currently hovered. + */ + object?: any; - /** Lists out the items to be displayed as segments of PivotChart. - * @Default {[]} - */ - rows?: DataSourceRow[]; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Lists out the items supports calculation in PivotChart. - * @Default {[]} - */ - values?: DataSourceValue[]; + /** Returns the object of menu item event. + */ + events?: any; - /** Lists out the items which supports filtering of values without displaying the members in UI in PivotChart. - * @Default {[]} - */ - filters?: DataSourceFilter[]; - } + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - export interface ServiceMethodSettings { + /** Returns the name of the event. + */ + type?: string; + } - /** Allows the user to set the custom name for the service method responsible for drilling up/down operation in PivotChart. - * @Default {DrillChart} - */ - drillDown?: string; + export interface KeyDownEventArgs { - /** Allows the user to set the custom name for the service method responsible for exporting. - * @Default {Export} - */ - exportPivotChart?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Allows the user to set the custom name for the service method responsible for initializing PivotChart. - * @Default {InitializeChart} - */ - initialize?: string; + /** Returns the object of menu item event. + */ + events?: any; - /** Allows the user to set the custom name for the service method responsible for navigating between pages in paged PivotChart. - * @Default {Paging} - */ - paging?: string; - } - - enum ChartTypes { - - ///To render a Line type PivotChart. - Line, - - ///To render a Spline type PivotChart. - Spline, + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - ///To render a Column type PivotChart. - Column, - - ///To render an Area type PivotChart. - Area, - - ///To render a SplineArea type PivotChart. - SplineArea, - - ///To render a StepLine type PivotChart. - StepLine, - - ///To render a StepArea type PivotChart. - StepArea, - - ///To render a Pie type PivotChart. - Pie, - - ///To render a Bar type PivotChart. - Bar, - - ///To render a StackingArea type PivotChart. - StackingArea, - - ///To render a StackingColumn type PivotChart. - StackingColumn, - - ///To render a StackingBar type PivotChart. - StackingBar, - - ///To render a Pyramid type PivotChart. - Pyramid, - - ///To render a Funnel type PivotChart. - Funnel, - - ///To render a Doughnut type PivotChart. - Doughnut, - - ///To render a Scatter type PivotChart. - Scatter, - - ///To render a Bubble type PivotChart. - Bubble - } - - } - - class PivotClient extends ej.Widget { - static fn: PivotClient; - constructor(element: JQuery | Element, options?: PivotClient.Model); - static Locale: any; - model: PivotClient.Model; - defaults: PivotClient.Model; - - /** Performs an asynchronous HTTP (AJAX) request. - * @returns {void} - */ - doAjaxPost(): void; - - /** Performs an asynchronous HTTP (FullPost) submit. - * @returns {void} - */ - doPostBack(): void; - - /** Navigates to the specified page in specified axis. - * @returns {void} - */ - refreshPagedPivotClient(): void; - - /** Updates the PivotClient component with the JSON data fetched from the service on navigating between pages. - * @returns {void} - */ - refreshPagedPivotClientSuccess(): void; - - /** Renders the PivotChart and PivotGrid with the JSON data provided. - * @returns {void} - */ - generateJSON(): void; - - /** Re-renders the control with the report at that instant. - * @returns {void} - */ - refreshControl(): void; - - /** Returns the OlapReport string maintained along with the axis elements information. - * @returns {string} - */ - getOlapReport(): string; - - /** Sets the OlapReport string along with the axis information and maintains it in a property. - * @returns {void} - */ - setOlapReport(): void; - - /** Returns the JSON records formed to render the control. - * @returns {Array} - */ - getJSONRecords(): any[]; - - /** Sets the JSON records formed to render the control to a property. - * @returns {void} - */ - setJSONRecords(): void; - } - export namespace PivotClient { - - export interface Model { - - /** Sets the mode for the PivotClient widget for binding either OLAP or Relational data source. - * @Default {ej.Pivot.AnalysisMode.Pivot} - */ - analysisMode?: ej.Pivot.AnalysisMode | string; - - /** Allows the user to set the specific chart type for PivotChart inside PivotClient widget. - * @Default {ej.PivotChart.ChartTypes.Column} - */ - chartType?: ej.PivotChart.ChartTypes | string; - - /** Allows the user to set the content on exporting the PivotClient widget. - * @Default {ej.PivotClient.ClientExportMode.ChartAndGrid} - */ - clientExportMode?: ej.PivotClient.ClientExportMode | string; - - /** Specifies the CSS class to PivotClient to achieve custom theme. - * @Default {“”} - */ - cssClass?: string; - - /** Object utilized to pass additional information between client-end and service-end when the control functions in server-mode. - * @Default {{}} - */ - customObject?: any; - - /** Initializes the data source for the PivotClient widget, when it functions completely on client-side. - * @Default {{}} - */ - dataSource?: DataSource; - - /** Allows the user to customize the widget's layout and appearance. - * @Default {{}} - */ - displaySettings?: DisplaySettings; - - /** Enables the splitter option for resizing the elements inside the control. - * @Default {false} - */ - enableSplitter?: boolean; - - /** Enables the advanced filtering options Value Filtering, Label Filtering and Sorting for each dimensions on binding OLAP data in server mode. - * @Default {false} - */ - enableAdvancedFilter?: boolean; - - /** Allows the user to refresh the control on-demand and not during every UI operation. - * @Default {false} - */ - enableDeferUpdate?: boolean; - - /** Lets the user to save and load reports in a customized way with the help of events. - * @Default {false} - */ - enableLocalStorage?: boolean; - - /** Allows the user to enable paging for both the PivotChart and PivotGrid components for the ease of viewing large data. - * @Default {false} - */ - enablePaging?: boolean; - - /** Allows the user to include the PivotTreeMap component as one of the chart types. - * @Default {false} - */ - enablePivotTreeMap?: boolean; - - /** Allows the user to view the layout of PivotClient from right to left. - * @Default {false} - */ - enableRTL?: boolean; - - /** Enables/disables the visibility of measure group selector drop-down in Cube Browser. - * @Default {false} - */ - enableMeasureGroups?: boolean; - - /** Allows the user to enable virtual scrolling for both the PivotChart and PivotGrid components for the ease of viewing large data. - * @Default {false} - */ - enableVirtualScrolling?: boolean; - - /** Enables/Disables paging in Member Editor for viewing the large count of members in pages. - * @Default {false} - */ - enableMemberEditorPaging?: boolean; - - /** Allows the user to set the number of members to be displayed in each page of Member Editor on applying paging in it. - * @Default {100} - */ - memberEditorPageSize?: number; - - /** Sets the summary layout for PivotGrid. Following are the ways in which summary can be positioned: normal summary (bottom), top summary, no summary and excel-like summary. - * @Default {ej.PivotGrid.Layout.Normal} - */ - gridLayout?: ej.PivotGrid.Layout | string; - - /** Allows the user to enable PivotClient’s responsiveness in the browser layout. - * @Default {false} - */ - isResponsive?: boolean; - - /** Allows the user to set the localized language for the widget. - * @Default {en-US} - */ - locale?: string; - - /** Sets the mode for the PivotClient widget for binding data source either in server-side or client-side. - * @Default {ej.Pivot.OperationalMode.ClientMode} - */ - operationalMode?: ej.Pivot.OperationalMode | string; - - /** Allows the user to set custom name for the methods at service-end, communicated during AJAX post. - * @Default {{}} - */ - serviceMethodSettings?: ServiceMethodSettings; + /** Returns the name of the event. + */ + type?: string; + } - /** Sets the title for PivotClient widget. - */ - title?: string; + export interface AppointmentCreatedEventArgs { - /** Connects the service using the specified URL for any server updates. - */ - url?: string; + /** Returns the appointment object. + */ + appointment?: any; - /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggers before any AJAX request is passed from client-side to service methods. */ - beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; - /** Triggers before saving the current collection of reports. */ - saveReport?(e: SaveReportEventArgs): void; + /** Returns the name of the Scheduler event. + */ + type?: string; + } + + export interface AppointmentChangedEventArgs { + + /** Returns the edited appointment object. + */ + appointment?: any; + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /** Returns the name of the Scheduler event. + */ + type?: string; + } + + export interface AppointmentRemovedEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the deleted appointment object. + */ + appointment?: any; + + /** Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /** Returns the name of the Scheduler event. + */ + type?: string; + } + + export interface AppointmentSettings { + + /** The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule appointments. + * @Default {[]} + */ + dataSource?: any|any[]; + + /** It holds either the ej.Query() object or simply the query string that retrieves the specified records from the table. + * @Default {null} + */ + query?: string; + + /** Assign the table name from where the records are to be fetched for the Schedule. + * @Default {null} + */ + tableName?: string; + + /** When set to false, doesn't consider the time difference offset calculation on appointment time. + * @Default {true} + */ + applyTimeOffset?: boolean; + + /** When set to true, introduces a new option to edit only the future occurrences of the appointments in a recurrence series from the currently selected appointment's date. + * @Default {false} + */ + editFutureEventsOnly?: boolean; + + /** Binds the id field name in dataSource to the id of Schedule appointments. It denotes the unique id assigned to appointments. + * @Default {null} + */ + id?: string; + + /** Binds the name of startTime field in the dataSource with start time of the Schedule appointments. It indicates the date and Time when Schedule appointment actually starts. + * @Default {null} + */ + startTime?: string; + + /** Binds the name of endTime field in dataSource with the end time of Schedule appointments. It indicates the date and time when Schedule appointment actually ends. + * @Default {null} + */ + endTime?: string; + + /** Binds the name of subject field in the dataSource to appointment Subject. Indicates the Subject or title that gets displayed on Schedule appointments. + * @Default {null} + */ + subject?: string; + + /** Binds the description field name in dataSource. It indicates the appointment description. + * @Default {null} + */ + description?: string; + + /** Binds the name of recurrence field in dataSource. It indicates whether the appointment is a recurrence appointment or not. + * @Default {null} + */ + recurrence?: string; + + /** Binds the name of recurrenceRule field in dataSource. It indicates the recurrence pattern associated with appointments. + * @Default {null} + */ + recurrenceRule?: string; + + /** Binds the name of allDay field in dataSource. It indicates whether the appointment is an all-day appointment or not. + * @Default {null} + */ + allDay?: string; + + /** Binds one or more fields in resource collection dataSource. It maps the resource field names with appointments denoting the resource of appointments actually belongs. + * @Default {null} + */ + resourceFields?: string; + + /** Binds the name of categorize field in dataSource. It indicates the categorize value, red categorize, green, yellow and so on applied to the appointments. + * @Default {null} + */ + categorize?: string; + + /** Binds the name of location field in dataSource. It indicates the appointment location. + * @Default {null} + */ + location?: string; + + /** Binds the name of the priority field in dataSource. It indicates the priority, high, low, medium and none of the appointments. + * @Default {null} + */ + priority?: string; + + /** Binds the name of start timezone field in dataSource. It indicates the timezone of appointment start date. When startTimeZone field is not mentioned, the appointment uses the + * Schedule timeZone or System timeZone. + * @Default {null} + */ + startTimeZone?: string; + + /** Binds the name of end timezone field in dataSource. It indicates the timezone of appointment end date. When the endTimeZone field is not mentioned, the appointment uses the + * Schedule timeZone or System timeZone. + * @Default {null} + */ + endTimeZone?: string; + } + + export interface CategorizeSettings { + + /** When set to true, enables the multiple selection of categories to be applied for the appointments. + * @Default {false} + */ + allowMultiple?: boolean; + + /** When set to true, enables the categories option to be applied for the appointments. + * @Default {false} + */ + enable?: boolean; + + /** The dataSource option accepts either the JSON object collection or DataManager [ej.DataManager] instance that contains the categorize data. + */ + dataSource?: any[]|any; + + /** Binds id field name in the dataSource to id of category data. + * @Default {id} + */ + id?: string; + + /** Binds text field name in the dataSource to category text. + * @Default {text} + */ + text?: string; + + /** Binds color field name in the dataSource to category color. + * @Default {color} + */ + color?: string; + + /** Binds fontColor field name in the dataSource to category font. + * @Default {fontColor} + */ + fontColor?: string; + } + + export interface ContextMenuSettingsMenuItems { + + /** All the appointment related context menu items are grouped under this appointment menu collection. + */ + appointment?: any[]; + + /** All the Scheduler cell related context menu items are grouped under this cells menu item collection. + */ + cells?: any[]; + } + + export interface ContextMenuSettings { + + /** When set to true, enables the context menu options available for the Schedule cells and appointments. + * @Default {false} + */ + enable?: boolean; + + /** Contains all the default context menu options that are applicable for both Schedule cells and appointments. It also supports adding custom menu items to cells or appointment + * collection. + */ + menuItems?: ContextMenuSettingsMenuItems; + } + + export interface Group { + + /** Holds the array of resource names to be grouped on the Schedule. + */ + resources?: any[]; + } + + export interface WorkHours { + + /** When set to true, highlights the work hours of the Schedule. + * @Default {true} + */ + highlight?: boolean; + + /** Sets the start time to depict the start of working or business hour in a day. + * @Default {9} + */ + start?: number; + + /** Sets the end time to depict the end of working or business hour in a day. + * @Default {18} + */ + end?: number; + } + + export interface PrioritySettings { + + /** When set to true, enables the priority options available for the Schedule appointments. + * @Default {false} + */ + enable?: boolean; + + /** The dataSource option can accept the JSON object collection that contains the priority related data. + * @Default {{% highlight js%}[{ text: None, value: none },{ text: High, value: high },{ text: Medium, value: medium },{ text: Low, value: low }]{% endhighlight %}} + */ + dataSource?: any|any[]; + + /** Binds text field name in the dataSource to prioritySettings text. These text gets listed out in priority field of the appointment window. + * @Default {text} + */ + text?: string; + + /** Binds value field name in the dataSource to prioritySettings value. These field names usually accepts four priority values by default, high, low, medium and none. + * @Default {value} + */ + value?: string; + + /** Allows priority field customization in the appointment window to add custom icons denoting the priority level for the appointments. + * @Default {null} + */ + template?: string; + } + + export interface ReminderSettings { + + /** When set to true, enables the reminder option available for the Schedule appointments. + * @Default {false} + */ + enable?: boolean; + + /** Sets the timing, when the reminders are to be alerted for the Schedule appointments. + * @Default {5} + */ + alertBefore?: number; + } + + export interface RenderDates { + + /** Sets the start of custom date range to be rendered in the Schedule. + * @Default {null} + */ + start?: any; + + /** Sets the end limit of the custom date range. + * @Default {null} + */ + end?: any; + } + + export interface ResourcesResourceSettings { + + /** The dataSource option accepts either JSON object collection or DataManager (ejDataManager) instance that contains the resources related data. + * @Default {[]} + */ + dataSource?: any|any[]; + + /** Binds text field name in the dataSource to resourceSettings text. These text gets listed out in resources field of the appointment window. + * @Default {null} + */ + text?: string; + + /** Binds id field name in the dataSource to resourceSettings id. + * @Default {null} + */ + id?: string; + + /** Binds groupId field name in the dataSource to resourceSettings groupId. + * @Default {null} + */ + groupId?: string; + + /** Binds color field name in the dataSource to resourceSettings color. The color specified here gets applied to the Schedule appointments denoting to the resource it belongs. + * @Default {null} + */ + color?: string; + + /** Binds the starting work hour field name in the dataSource. It's optional, but providing it with some numeric value will set the starting work hour for specific resources. + * @Default {null} + */ + start?: string; + + /** Binds the end work hour field name in the dataSource. It's optional, but providing it with some numeric value will set the end work hour for specific resources. + * @Default {null} + */ + end?: string; + + /** Binds the resources working days field name in the dataSource. It's optional, and accepts the array of strings (week day names). When provided with specific collection of days + * (array of day names), only those days will render for the specific resources. + * @Default {null} + */ + workWeek?: string; + + /** Binds appointmentClass field name in the dataSource. It applies custom CSS class name to appointments depicting to the resource it belongs. + * @Default {null} + */ + appointmentClass?: string; + } + + export interface Resource { + + /** It holds the name of the resource field to be bound to the Schedule appointments that contains the resource Id. + * @Default {null} + */ + field?: string; + + /** It holds the title name of the resource field to be displayed on the Schedule appointment window. + * @Default {null} + */ + title?: string; + + /** A unique resource name that is used for differentiating various resource objects while grouping it in various levels. + * @Default {null} + */ + name?: string; + + /** When set to true, allows multiple selection of resource names, thus creating multiple instances of same appointment for the selected resources. + * @Default {false} + */ + allowMultiple?: boolean; + + /** It holds the field names of the resources to be bound to the Schedule and also the dataSource. + */ + resourceSettings?: ResourcesResourceSettings; + } + + export interface TimeZoneCollection { + + /** Sets the collection of timezone items to the dataSource that accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule timezones. + */ + dataSource?: any; + + /** Binds text field name in the dataSource to timeZoneCollection text. These text gets listed out in the timezone fields of the appointment window. + * @Default {text} + */ + text?: string; + + /** Binds id field name in the dataSource to timeZoneCollection id. + * @Default {id} + */ + id?: string; + + /** Binds value field name in the dataSource to timeZoneCollection value. + * @Default {value} + */ + value?: string; + } + + export interface AgendaViewSettings { + + /** You can display the summary of multiple week's appointment by setting this value. + * @Default {7} + */ + daysInAgenda?: number; + + /** You can customize the Date column display based on the requirement. + * @Default {null} + */ + dateColumnTemplateId?: string; + + /** You can customize the time column display based on the requirement. + * @Default {null} + */ + timeColumnTemplateId?: string; + } + + export interface TooltipSettings { + + /** Enables or disables the tooltip display. + * @Default {false} + */ + enable?: boolean; + + /** Template design that customizes the tooltip. All the field names that are mapped from dataSource to the appropriate field properties within the appointmentSettings can be accessed + * within the template. + * @Default {null} + */ + templateId?: string; + } + + export interface TimeScale { + + /** When set to true, displays the time slots on the Scheduler. + * @Default {true} + */ + enable?: boolean; + + /** When set with some specific value, defines the number of time divisions split per hour(as per value given for the majorTimeSlot). Those time divisions are meant to be the minor + * slots. + * @Default {2} + */ + minorSlotCount?: number; + + /** Accepts the value in minutes. When provided with specific value, displays the appropriate time interval on the Scheduler + * @Default {60} + */ + majorSlot?: number; + + /** Template design that customizes the timecells (minor slots) that are partitioned based on minorSlotCount. Accepts id value of the template defined for minor time slots. + * @Default {null} + */ + minorSlotTemplateId?: string; + + /** Template design that customizes the timecells (major slots). Accepts id value of the template defined for major time slots. + * @Default {null} + */ + majorSlotTemplateId?: string; + } + + export interface BlockoutSettings { + + /** When set to true, enables the blockout option to be applied on the Scheduler cells. + * @Default {false} + */ + enable?: boolean; + + /** Template design that applies on the Schedule block intervals. All the field names that are mapped from dataSource to the appropriate field properties within the blockoutSettings + * can be used within the template. + * @Default {null} + */ + templateId?: string; + + /** The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule block intervals. + * @Default {[]} + */ + dataSource?: any|any[]; + + /** It holds either the ej.Query() object or simply the query string that retrieves the specified records from the table. + * @Default {null} + */ + query?: string; + + /** Assign the table name from where the records are to be fetched for the Schedule. + * @Default {null} + */ + tableName?: string; + + /** Binds the id field name in dataSource to the id of block time interval. It denotes the unique id assigned to each of the block records. + * @Default {null} + */ + id?: string; + + /** Binds the name of startTime field in the dataSource with start time of block time interval. It indicates the date and time, when the block interval actually starts in the + * Scheduler. + * @Default {null} + */ + startTime?: string; + + /** Binds the name of endTime field in dataSource with the end time of block time interval. It indicates the date and time, when the block interval actually ends in the Scheduler. + * @Default {null} + */ + endTime?: string; + + /** Binds the name of subject field in the dataSource to block time Subject. Indicates the Subject or title that gets displayed on the Schedule block intervals. + * @Default {null} + */ + subject?: string; + + /** Binds the name of isBlockAppointment field in dataSource. When set to true, disables the appointments that lies on the blocked area and restrict to perform CRUD operations in it. + * @Default {null} + */ + isBlockAppointment?: string; + + /** Binds the name of isAllDay field in dataSource. It indicates whether an entire day is blocked or not. + * @Default {null} + */ + isAllDay?: string; + + /** Binds the name of resourceId field in dataSource. Specifies the id of the resources, to which the time intervals are needed to be blocked. + * @Default {null} + */ + resourceId?: string; + + /** Binds the name of groupId field in dataSource. Specifies the id of the resource group, to which the time intervals are needed to be blocked. + * @Default {null} + */ + groupId?: string; + + /** Binds the name of customStyle field in dataSource. It applies the custom CSS to the block intervals. + * @Default {null} + */ + customStyle?: string; + } + + enum CurrentView { + + ///Sets currentView of the Scheduler as Day + Day, + + ///Sets currentView of the Scheduler as Week + Week, + + ///Sets currentView of the Scheduler as WorkWeek + Workweek, + + ///Sets currentView of the Scheduler as Month + Month, + + ///Sets currentView of the Scheduler as Agenda + Agenda, + + ///Sets currentView of the Scheduler as CustomView with user-specified date range. + CustomView + } + + + enum Orientation { + + ///Set orientation as vertical to Scheduler + Vertical, + + ///Set orientation as horizontal to Scheduler + Horizontal + } + + + enum TimeMode { + + ///Sets 12 hour time mode to Scheduler + Hour12, + + ///Sets 24 hour time mode to Scheduler + Hour24 + } + + } + + class RecurrenceEditor extends ej.Widget { + static fn: RecurrenceEditor; + constructor(element: JQuery | Element, options?: RecurrenceEditor.Model); + static Locale: any; + model: RecurrenceEditor.Model; + defaults: RecurrenceEditor.Model; + + /** Generates the recurrence rule with the options selected within the Recurrence Editor. + * @returns {string} + */ + getRecurrenceRule(): string; + + /** Generates the collection of date, that lies within the selected recurrence start and end date for which the recurrence pattern applies. + * @param {string} It refers the recurrence rule. + * @param {any} It refers the start date of the recurrence. + * @returns {any} + */ + recurrenceDateGenerator(recurrenceString: string, startDate: any): any; + + /** It splits and returns the recurrence rule string into object collection. + * @param {string} It refers the recurrence rule string. + * @param {any} It refers the appointment dates (ExDate) to be excluded + * @returns {any} + */ + recurrenceRuleSplit(recurrenceRule: string, exDate: any): any; + } + export namespace RecurrenceEditor { + + export interface Model { + + /** Defines the collection of recurrence frequencies within Recurrence Editor such as Never, Daily, Weekly, Monthly, Yearly and Every Weekday. + * @Default {[never, daily, weekly, monthly, yearly, everyweekday]} + */ + frequencies?: any[]; + + /** Sets the starting day of the week. + * @Default {null} + */ + firstDayOfWeek?: string; + + /** When set to true, enables the spin button of numeric textboxes within the Recurrence Editor. + * @Default {true} + */ + enableSpinners?: boolean; + + /** Sets the start date of the recurrence. The Recurrence Editor initially displays the current date as its start date. + * @Default {new Date()} + */ + startDate?: any; + + /** Sets the specific culture to the Recurrence Editor. + * @Default {en-US} + */ + locale?: string; + + /** Sets the date format for the datepickers available within the Recurrence Editor. + */ + dateFormat?: string; + + /** When set to true, renders the Recurrence Editor options from Right-to-Left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /** Sets the active/current repeat type(frequency) on Recurrence Editor based on the index value provided. For example, setting the value 1 will initially set the repeat type as Daily + * and display its related options. + * @Default {0} + */ + selectedRecurrenceType?: number; + + /** Sets the minimum date limit to display on the datepickers defined within the Recurrence Editor. Setting minDate with specific date value disallows the datepickers within + * Recurrence Editor to navigate beyond that date. + * @Default {new Date(1900, 01, 01)} + */ + minDate?: any; + + /** Sets the maximum date limit to display on the datepickers used within the Recurrence Editor. Setting maxDate with specific date value disallows the datepickers within the + * Recurrence Editor to navigate beyond that date. + * @Default {new Date(2099, 12, 31)} + */ + maxDate?: any; + + /** Accepts the custom CSS class name, that defines user-defined styles and themes to be applied on partial or complete elements of the Recurrence Editor. + */ + cssClass?: string; + + /** Triggers whenever any of the Recurrence Editor's value is changed. + */ + change?(e: ChangeEventArgs): void; + } + + export interface ChangeEventArgs { + + /** When set to true, event gets canceled. + */ + cancel?: boolean; + + /** Returns the Recurrence Editor model + */ + model?: ej.RecurrenceEditor.Model; + + /** Returns the name of the event + */ + type?: string; + + /** Returns the recurrence rule value. + */ + recurrenceRule?: string; + } + } + + class Gantt extends ej.Widget { + static fn: Gantt; + constructor(element: JQuery | Element, options?: Gantt.Model); + static Locale: any; + model: Gantt.Model; + defaults: Gantt.Model; + + /** To add a new item in Gantt + * @param {any} Item to add in Gantt row. + * @param {string} Defines in which position the row wants to add + * @returns {void} + */ + addRecord(data: any, rowPosition: string): void; + + /** To select cell based on the cell and row index dynamically. + * @param {any[]} array of cell indexes to be select + * @param {boolean} Defines that we need to preserve the previously selected cells of not + * @returns {void} + */ + selectCells(Indexes: any[], preservePreviousSelectedCell: boolean): void; + + /** Positions the splitter by the specified column index. + * @param {number} Set the splitter position based on column index. + * @returns {void} + */ + setSplitterIndex(index: number): void; + + /** To sort the column in required direction + * @param {string} Defines the column's mapping name in which sorting have to be performed + * @param {string} Defines the sort direction whether the column has to sorted in ascending/descending order. By default it is sorting in an ascending order + * @returns {void} + */ + sortColumn(mappingName: string, columnSortDirection: string): void; + + /** To cancel the edited state of an item in Gantt + * @returns {void} + */ + cancelEdit(): void; + + /** To collapse all the parent items in Gantt + * @returns {void} + */ + collapseAllItems(): void; + + /** To delete a selected item in Gantt + * @returns {void} + */ + deleteItem(): void; + + /** destroy the Gantt widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To Expand all the parent items in Gantt + * @returns {void} + */ + expandAllItems(): void; + + /** To expand and collapse an item in Gantt using item's ID + * @param {number} Expand or Collapse a record based on task id. + * @returns {void} + */ + expandCollapseRecord(taskId: number): void; + + /** Export the Gantt content to excel or PDF document. + * @param {string} Pass the controller action name corresponding to exporting + * @param {string} optionalASP server event name corresponding to exporting + * @param {boolean} optionalPass the multiple exporting value as true/false + * @returns {void} + */ + export(action: string, serverEvent?: string, multipleExport?: boolean): void; + + /** To hide the column by using header text + * @param {string} you can pass a header text of a column to hide + * @returns {void} + */ + hideColumn(headerText: string): void; + + /** To indent a selected item in Gantt + * @returns {void} + */ + indentItem(): void; + + /** To Open the dialog to add new task to the Gantt + * @returns {void} + */ + openAddDialog(): void; + + /** To Open the dialog to edit existing task to the Gantt + * @returns {void} + */ + openEditDialog(): void; + + /** To outdent a selected item in Gantt + * @returns {void} + */ + outdentItem(): void; + + /** To save the edited state of an item in Gantt + * @returns {void} + */ + saveEdit(): void; + + /** To search an item with search string provided at the run time + * @param {string} you can pass a text to search in Gantt Control. + * @returns {void} + */ + searchItem(searchString: string): void; + + /** To set the grid width in Gantt + * @param {string} you can give either percentage or pixels value + * @returns {void} + */ + setSplitterPosition(width: string): void; + + /** To show the column by using header text + * @param {string} you can pass a header text of a column to show + * @returns {void} + */ + showColumn(headerText: string): void; + } + export namespace Gantt { + + export interface Model { + + /** Specifies the fields to be included in the add dialog in Gantt + * @Default {[]} + */ + addDialogFields?: AddDialogField[]; + + /** Enables or disables the ability to resize column. + * @Default {false} + */ + allowColumnResize?: boolean; + + /** Enables or Disables Gantt chart editing in Gantt + * @Default {true} + */ + allowGanttChartEditing?: boolean; + + /** Enables or Disables Keyboard navigation in Gantt + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Specifies enabling or disabling multiple sorting for Gantt columns + * @Default {false} + */ + allowMultiSorting?: boolean; + + /** Enables or disables the option for multiple exporting + * @Default {false} + */ + allowMultipleExporting?: boolean; + + /** Enables or disables the interactive selection of a row. + * @Default {true} + */ + allowSelection?: boolean; + + /** Enables or disables sorting. When enabled, we can sort the column by clicking on the column. + * @Default {false} + */ + allowSorting?: boolean; + + /** Enables or disables the ability to drag and drop the row interactively to reorder the rows + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /** Enable or disable predecessor validation. When it is true, all the task's start and end dates are aligned based on its predecessors start and end dates. + * @Default {true} + */ + enablePredecessorValidation?: boolean; + + /** Specifies the baseline background color in Gantt + * @Default {#fba41c} + */ + baselineColor?: string; + + /** Specifies the mapping property path for the work field of a task in the data source. When it is mapped the end date and duration for a task will be calculated automatically. + */ + workMapping?: string; + + /** Specifies the mapping property path for the expand status of a record in data source. + */ + expandStateMapping?: string; + + /** Specifies the mapping property path for baseline end date in datasource + */ + baselineEndDateMapping?: string; + + /** Specifies the mapping property path for baseline start date of a task in datasource + */ + baselineStartDateMapping?: string; + + /** Specifies the mapping property path for sub tasks in datasource + */ + childMapping?: string; + + /** To Specify the column fields to be displayed in the dialog while inserting a column using column menu. + * @Default {[]} + */ + columnDialogFields?: any[]; + + /** Specifies the background of connector lines in Gantt + */ + connectorLineBackground?: string; + + /** Specifies the width of the connector lines in Gantt + * @Default {1} + */ + connectorlineWidth?: number; + + /** Specify the CSS class for Gantt to achieve custom theme. + */ + cssClass?: string; + + /** Specifies the template for cell tooltip + * @Default {null} + */ + cellTooltipTemplate?: string; + + /** Option for customizing the drag tooltip while reordering the rows. + */ + dragTooltip?: DragTooltip; + + /** Collection of data or hierarchical data to represent in Gantt + * @Default {null} + */ + dataSource?: any[]; + + /** Specifies the dateFormat for Gantt , given format is displayed in tooltip , Grid . + * @Default {MM/dd/yyyy} + */ + dateFormat?: string; + + /** Specifies the customized working time for tasks in Gantt + * @Default {[{ from: 08:00 AM, to: 12:00 PM }, { from: 01:00 PM, to: 05:00 PM }]} + */ + dayWorkingTime?: any[]; + + /** Specifies the mapping property path for duration of a task in datasource + */ + durationMapping?: string; + + /** Specifies the duration unit for each tasks whether days or hours or minutes + * @Default {ej.Gantt.DurationUnit.Day} + */ + durationUnit?: ej.Gantt.DurationUnit|string; + + /** Specifies the fields to be included in the edit dialog in Gantt + * @Default {[]} + */ + editDialogFields?: EditDialogField[]; + + /** Enables or disables the responsiveness of Gantt + * @Default {false} + */ + isResponsive?: boolean; + + /** Option to configure the splitter position. + */ + splitterSettings?: SplitterSettings; + + /** Specifies the editSettings options in Gantt. + */ + editSettings?: EditSettings; + + /** Enables or Disables enableAltRow row effect in Gantt + * @Default {true} + */ + enableAltRow?: boolean; + + /** Enables/disables work breakdown structure column. + * @Default {false} + */ + enableWBS?: boolean; + + /** Enables/disables WBS predecessor column. + * @Default {false} + */ + enableWBSPredecessor?: boolean; + + /** Enables or disables the collapse all records when loading the Gantt. + * @Default {false} + */ + enableCollapseAll?: boolean; + + /** Specifies the data source field name to be displayed as left task label + */ + leftTaskLabelMapping?: string; + + /** Specifies the data source field name to be displayed as right task label + */ + rightTaskLabelMapping?: string; + + /** Specifies the template for left task label + */ + leftTaskLabelTemplate?: string; + + /** Specifies the template for right task label + */ + rightTaskLabelTemplate?: string; + + /** Enables or disables the contextmenu for Gantt , when enabled contextmenu appears on right clicking Gantt + * @Default {false} + */ + enableContextMenu?: boolean; + + /** Indicates whether we can edit the progress of a task interactively in Gantt. + * @Default {true} + */ + enableProgressBarResizing?: boolean; + + /** Enables or disables the option for dynamically updating the Gantt size on window resizing + * @Default {false} + */ + enableResize?: boolean; + + /** Enables or disables tooltip while editing (dragging/resizing) the taskbar. + * @Default {true} + */ + enableTaskbarDragTooltip?: boolean; + + /** Enables or disables tooltip for taskbar. + * @Default {true} + */ + enableTaskbarTooltip?: boolean; + + /** Enables/Disables virtualization for rendering Gantt items. + * @Default {false} + */ + enableVirtualization?: boolean; + + /** Specifies the mapping property path for end Date of a task in datasource + */ + endDateMapping?: string; + + /** Specifies whether to highlight the weekends in Gantt . + * @Default {true} + */ + highlightWeekends?: boolean; + + /** Collection of holidays with date, background and label information to be displayed in Gantt. + * @Default {[]} + */ + holidays?: Holiday[]; + + /** Specifies whether to include weekends while calculating the duration of a task. + * @Default {true} + */ + includeWeekend?: boolean; + + /** Specify the locale for Gantt + * @Default {en-US} + */ + locale?: string; + + /** Specifies the mapping property path for milestone in datasource + */ + milestoneMapping?: string; + + /** Enables/disables the options for inserting , deleting and renaming columns. + * @Default {false} + */ + showColumnOptions?: boolean; + + /** Specifies the template for parent taskbar + */ + parentTaskbarTemplate?: string; + + /** Specifies the nature of a task for calculating the work, and it can fixed duration, fixed work and fixed resource unit + * @Default {ej.Gantt.TaskType.FixedUnit} + */ + taskType?: ej.Gantt.TaskType|string; + + /** Specifies the unit for the work involved in a task and it can be day, hour or minute + * @Default {ej.Gantt.WorkUnit.Hour} + */ + workUnit?: ej.Gantt.WorkUnit|string; + + /** Specifies the task scheduling mode for a project and this will be set to all the tasks available in the project + * @Default {ej.Gantt.TaskSchedulingMode.Auto} + */ + taskSchedulingMode?: ej.Gantt.TaskSchedulingMode|string; + + /** Specifies the row selection type. + * @Default {ej.Gantt.SelectionType.Single} + */ + selectionType?: ej.Gantt.SelectionType|string; + + /** Specifies the background of parent progressbar in Gantt + */ + parentProgressbarBackground?: string; + + /** Specifies the mapping property path for resource's percent effort involved in a task in datasource + */ + resourceUnitMapping?: string; + + /** Specifies the mapping property path for the task description in datasource + */ + notesMapping?: string; + + /** Specifies the mapping property path for the task scheduling mode for a task in datasource + * @Default {auto} + */ + taskSchedulingModeMapping?: string; + + /** Specifies the mapping property path for task duration unit in datasource + */ + durationUnitMapping?: string; + + /** Specifies the background of parent taskbar in Gantt + */ + parentTaskbarBackground?: string; + + /** Specifies the mapping property path for parent task Id in self reference datasource + */ + parentTaskIdMapping?: string; + + /** Specifies the mapping property path for predecessors of a task in datasource + */ + predecessorMapping?: string; + + /** Specifies the background of progressbar in Gantt + */ + progressbarBackground?: string; + + /** Specified the height of the progressbar in taskbar + * @Default {100} + */ + progressbarHeight?: number; + + /** Specifies the template for tooltip on resizing progressbar + * @Default {null} + */ + progressbarTooltipTemplate?: string; + + /** Specifies the template ID for customized tooltip for progressbar editing in Gantt + * @Default {null} + */ + progressbarTooltipTemplateId?: string; + + /** Specifies the mapping property path for progress percentage of a task in datasource + */ + progressMapping?: string; + + /** It receives query to retrieve data from the table (query is same as SQL). + * @Default {null} + */ + query?: any; + + /** Enables or Disables rendering baselines in Gantt , when enabled baseline is rendered in Gantt + * @Default {false} + */ + renderBaseline?: boolean; + + /** Specifies the mapping property name for resource ID in resource Collection in Gantt + */ + resourceIdMapping?: string; + + /** Specifies the mapping property path for resources of a task in datasource + */ + resourceInfoMapping?: string; + + /** Specifies the mapping property path for resource name of a task in Gantt + */ + resourceNameMapping?: string; + + /** Collection of data regarding resources involved in entire project + * @Default {[]} + */ + resources?: any[]; + + /** Specifies whether rounding off the day working time edits + * @Default {true} + */ + roundOffDayworkingTime?: boolean; + + /** Specifies the height of a single row in Gantt. Also, we need to set same height in the CSS style with class name e-rowcell. + * @Default {30} + */ + rowHeight?: number; + + /** Specifies end date of the Gantt schedule. By default, end date will be rounded to its next Saturday. + * @Default {null} + */ + scheduleEndDate?: string; + + /** Specifies the options for customizing schedule header. + */ + scheduleHeaderSettings?: ScheduleHeaderSettings; + + /** Specifies start date of the Gantt schedule. By default, start date will be rounded to its previous Sunday. + * @Default {null} + */ + scheduleStartDate?: string; + + /** Specifies the selected row Index in Gantt , the row with given index will highlighted + * @Default {-1} + */ + selectedRowIndex?: number; + + /** Enables or disables the column chooser. + * @Default {false} + */ + showColumnChooser?: boolean; + + /** Specifies the template for cell tooltip + * @Default {true} + */ + showGridCellTooltip?: boolean; + + /** Specifies whether to show grid cell tooltip over expander cell alone. + * @Default {true} + */ + showGridExpandCellTooltip?: boolean; + + /** Specifies whether display task progress inside taskbar. + * @Default {true} + */ + showProgressStatus?: boolean; + + /** Specifies whether to display resource names for a task beside taskbar. + * @Default {true} + */ + showResourceNames?: boolean; + + /** Specifies whether to display task name beside task bar. + * @Default {true} + */ + showTaskNames?: boolean; + + /** Specifies the size option of Gantt control. + */ + sizeSettings?: SizeSettings; + + /** Specifies the selected cell information on rendering Gantt. + */ + selectedCellIndexes?: SelectedCellIndex[]; + + /** Specifies the sorting options for Gantt. + */ + sortSettings?: SortSettings; + + /** Specifies splitter position in Gantt. + * @Default {null} + */ + splitterPosition?: string; + + /** Specifies the mapping property path for start date of a task in datasource + */ + startDateMapping?: string; + + /** Specifies the options for striplines + * @Default {[]} + */ + stripLines?: StripLine[]; + + /** Specifies the background of the taskbar in Gantt + */ + taskbarBackground?: string; + + /** Specifies the template script for customized tooltip for taskbar editing in Gantt + */ + taskbarEditingTooltipTemplate?: string; + + /** Specifies the template Id for customized tooltip for taskbar editing in Gantt + */ + taskbarEditingTooltipTemplateId?: string; + + /** Specifies the height of taskBar in Gantt. + * @Default {20} + */ + taskbarHeight?: number; + + /** Specifies the template for tooltip on mouse action on taskbars + */ + taskbarTooltipTemplate?: string; + + /** To Specify the JsRender script Id to customize the task bar with our preference + */ + taskbarTemplate?: string; + + /** To Specify the JsRender script Id to customize the mile stone with our preference + */ + milestoneTemplate?: string; + + /** Enables or disables Gantt to read-only mode + * @Default {false} + */ + readOnly?: boolean; + + /** Specifies the template id for tooltip on mouse action on taskbars + */ + taskbarTooltipTemplateId?: string; + + /** Specifies the mapping property path for task Id in datasource + */ + taskIdMapping?: string; + + /** Specifies the mapping property path for task name in datasource + */ + taskNameMapping?: string; + + /** Specifies the toolbarSettings options. + */ + toolbarSettings?: ToolbarSettings; + + /** Specifies the tree expander column in Gantt + * @Default {0} + */ + treeColumnIndex?: number; + + /** Specifies the type of selection whether to select row or cell. + * @Default {ej.Gantt.SelectionMode.Row} + */ + selectionMode?: ej.Gantt.SelectionMode|string; + + /** Enables or disables the schedule date validation while connecting a manually scheduled task with predecessor + * @Default {false} + */ + validateManualTasksOnLinking?: boolean; + + /** Specifies the weekendBackground color in Gantt + * @Default {#F2F2F2} + */ + weekendBackground?: string; + + /** Specifies the working time schedule of day + * @Default {ej.Gantt.workingTimeScale.TimeScale8Hours} + */ + workingTimeScale?: ej.Gantt.workingTimeScale|string; + + /** Triggered for every Gantt action before its starts. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Triggered for every Gantt action success event. + */ + actionComplete?(e: ActionCompleteEventArgs): void; + + /** Triggered while enter the edit mode in the TreeGrid cell + */ + beginEdit?(e: BeginEditEventArgs): void; + + /** Triggered before selecting a cell + */ + cellSelecting?(e: CellSelectingEventArgs): void; + + /** Triggered after selected a cell + */ + cellSelected?(e: CellSelectedEventArgs): void; + + /** Triggered while dragging a row in Gantt control + */ + rowDrag?(e: RowDragEventArgs): void; + + /** Triggered while start to drag row in Gantt control + */ + rowDragStart?(e: RowDragStartEventArgs): void; + + /** Triggered while drop a row in Gantt control + */ + rowDragStop?(e: RowDragStopEventArgs): void; + + /** Triggered after collapsed the Gantt record + */ + collapsed?(e: CollapsedEventArgs): void; + + /** Triggered while collapsing the Gantt record + */ + collapsing?(e: CollapsingEventArgs): void; + + /** Triggered while Context Menu is rendered in Gantt control + */ + contextMenuOpen?(e: ContextMenuOpenEventArgs): void; + + /** Triggered when Gantt is rendered completely. + */ + create?(e: CreateEventArgs): void; + + /** Triggered after save the modified cellValue in Gantt. + */ + endEdit?(e: EndEditEventArgs): void; + + /** Triggered after expand the record + */ + expanded?(e: ExpandedEventArgs): void; + + /** Triggered while expanding the Gantt record + */ + expanding?(e: ExpandingEventArgs): void; + + /** Triggered while Gantt is loaded + */ + load?(e: LoadEventArgs): void; + + /** Triggered while rendering each cell in the TreeGrid + */ + queryCellInfo?(e: QueryCellInfoEventArgs): void; + + /** Triggered while rendering each taskbar in the Gantt + */ + queryTaskbarInfo?(e: QueryTaskbarInfoEventArgs): void; + + /** Triggered while rendering each row + */ + rowDataBound?(e: RowDataBoundEventArgs): void; + + /** Triggered after the row is selected. + */ + rowSelected?(e: RowSelectedEventArgs): void; - /** Triggers before loading a saved collection of reports. */ - loadReport?(e: LoadReportEventArgs): void; + /** Triggered before the row is going to be selected. + */ + rowSelecting?(e: RowSelectingEventArgs): void; - /** Triggers before fetching the report collection from storage. */ - fetchReport?(e: FetchReportEventArgs): void; + /** Triggered after completing the editing operation in taskbar + */ + taskbarEdited?(e: TaskbarEditedEventArgs): void; - /** Triggers before exporting the control. */ - beforeExport?(e: BeforeExportEventArgs): void; + /** Triggered while editing the Gantt chart (dragging, resizing the taskbar ) + */ + taskbarEditing?(e: TaskbarEditingEventArgs): void; - /** Triggers before rendering the PivotChart. */ - chartLoad?(e: ChartLoadEventArgs): void; + /** Triggered when taskbar item is clicked in Gantt. + */ + taskbarClick?(e: TaskbarClickEventArgs): void; - /** Triggers before rendering the PivotTreeMap. */ - treeMapLoad?(e: TreeMapLoadEventArgs): void; + /** Triggered when toolbar item is clicked in Gantt. + */ + toolbarClick?(e: ToolbarClickEventArgs): void; + } - /** Triggers while we initiate loading of the widget. */ - load?(e: LoadEventArgs): void; + export interface ActionBeginEventArgs { - /** Triggers when PivotClient widget completes all operations at client-end after any AJAX request. */ - renderComplete?(e: RenderCompleteEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggers when any error occurred during AJAX request. */ - renderFailure?(e: RenderFailureEventArgs): void; + /** Returns the grid model. + */ + model?: any; - /** Triggers when PivotClient successfully completes rendering. */ - renderSuccess?(e: RenderSuccessEventArgs): void; - } + /** Returns the name of the event. + */ + type?: string; - export interface AfterServiceInvokeEventArgs { + /** Returns the current grouped column field name. + */ + columnName?: string; - /** returns the current action of PivotClient control. - */ - action?: string; + /** Returns request type. + */ + requestType?: string; - /** returns the custom object bounds with PivotClient control. - */ - customObject?: any; + /** Returns the direction of sorting ascending or descending + */ + columnSortDirection?: string; - /** returns the HTML element of PivotClient control. - */ - element?: any; - } + /** Returns the value of searching element. + */ + keyValue?: string; - export interface BeforeServiceInvokeEventArgs { + /** Returns the data of deleting element. + */ + data?: string; - /** returns the current action of PivotClient control. - */ - action?: string; + /** Returns selected record index + */ + recordIndex?: number; + } - /** returns the custom object bounds with PivotClient control. - */ - customObject?: any; + export interface ActionCompleteEventArgs { - /** returns the HTML element of PivotClient control. - */ - element?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface SaveReportEventArgs { + /** Returns the grid model. + */ + model?: any; - /** returns the current instance of PivotClient control. - */ - targetControl?: any; + /** Returns the name of the event. + */ + type?: string; - /** returns the object which holds the necessary parameters required for saving the report collection. - */ - saveReportSetting?: any; - } + /** Returns the current grouped column field name. + */ + columnName?: string; - export interface LoadReportEventArgs { + /** Returns request type. + */ + requestType?: string; - /** returns the current instance of PivotClient control. - */ - targetControl?: any; + /** Returns the direction of sorting ascending or descending + */ + columnSortDirection?: string; - /** returns the object which holds the necessary parameters required for loading a report collection from database. - */ - loadReportSetting?: any; - } + /** Returns the value of searched element. + */ + keyValue?: string; - export interface FetchReportEventArgs { + /** Returns the data of deleted element. + */ + data?: string; - /** returns the current instance of PivotClient control. - */ - targetControl?: any; + /** Returns selected record index + */ + recordIndex?: number; + } - /** returns the object which holds the necessary parameters required for fetching the report names stored in database. - */ - fetchReportSetting?: any; - } + export interface BeginEditEventArgs { - export interface BeforeExportEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** holds the url of the service method responsible for exporting the PivotClient control. - */ - url?: string; + /** Returns the row element of editing cell. + */ + rowElement?: any; - /** holds the name of the file to be exported. - */ - fileName?: string; - } + /** Returns the Element of editing cell. + */ + cellElement?: any; - export interface ChartLoadEventArgs { + /** Returns the data of current cell record. + */ + data?: any; - /** returns the current action of PivotChart control. - */ - action?: string; + /** Returns the column Index of cell belongs. + */ + columnIndex?: number; + } - /** returns the custom object bound with PivotChart control. - */ - customObject?: any; + export interface CellSelectingEventArgs { - /** returns the HTML element of PivotChart control. - */ - element?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface TreeMapLoadEventArgs { + /** Returns the cell index on the selection. + */ + cellIndex?: number; - /** returns the current action of PivotTreeMap control. - */ - action?: string; + /** Returns the row index on the selection + */ + rowIndex?: number; - /** returns the custom object bound with PivotTreeMap control. - */ - customObject?: any; + /** Returns the selecting cell element + */ + targetCell?: any; - /** returns the HTML element of PivotTreeMap control. - */ - element?: any; - } + /** Returns the selecting row element + */ + targetRow?: any; - export interface LoadEventArgs { + /** Returns the selecting record object + */ + data?: any; - /** returns the HTML element of PivotClient component. - */ - element?: any; + /** Returns the Gantt object Model + */ + model?: any; + } - /** returns the custom object bound with PivotTreeMap control. - */ - customObject?: any; - } + export interface CellSelectedEventArgs { - export interface RenderCompleteEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the HTML element of PivotClient component. - */ - element?: any; + /** Returns the cell index on the selection. + */ + cellIndex?: number; - /** returns the custom object bound with PivotTreeMap control. - */ - customObject?: any; - } + /** Returns the row index on the selection + */ + rowIndex?: number; - export interface RenderFailureEventArgs { + /** Returns the selecting cell element + */ + targetCell?: any; - /** returns the custom object bound with the control. - */ - customObject?: any; + /** Returns the selecting row element + */ + targetRow?: any; - /** returns the HTML element of PivotClient control. - */ - element?: any; + /** Returns the selecting record object + */ + data?: any; - /** returns the error message with error code. - */ - message?: string; - } + /** Returns the Gantt object Model + */ + model?: any; - export interface RenderSuccessEventArgs { + /** Returns the previously selected row data + */ + previousData?: any; - /** returns the object of PivotClient control at that instant. - */ - args?: any; - } + /** Returns the previously selected cell index + */ + previousCellIndex?: any; - export interface DataSourceColumnsAdvancedFilter { + /** Returns the previously selected row index + */ + previousRowIndex?: any; - /** Allows the user to provide level unique name to perform advanced filtering. - */ - name?: string; + /** Returns the previously selected cell element + */ + previousTargetCell?: any; - /** Allows the user to set the operator to perform Label Filtering. - * @Default {none} - */ - labelFilterOperator?: string; - - /** Allows the user to set the operator to perform Value Filtering. - * @Default {none} - */ - valueFilterOperator?: string; + /** Returns the previously selected row element + */ + previousTargetRow?: any; + } - /** Allows the user to set the filtering type while performing advanced filtering. - */ - advancedFilterType?: string; + export interface RowDragEventArgs { - /** In case of value filtering, this property contains the measure name to which the filter is applied. - */ - measure?: string; - - /** Allows the user to hold the filter operand values in advanced filtering. - */ - values?: any[]; - } - - export interface DataSourceColumnsFilterItems { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; + /** Returns the row which we start to drag. + */ + draggedRow?: any; - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceColumn { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Allows the user to set the display caption for an item. - */ - fieldCaption?: string; - - /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. - * @Default {[]} - */ - advancedFilter?: DataSourceColumnsAdvancedFilter[]; - - /** Allows the user to indicate whether the added item is a named set or not. - * @Default {false} - */ - isNamedSets?: boolean; - - /** Shows/Hides the sub-total of the field in PivotGrid. - * @Default {true} - */ - showSubTotal?: boolean; - - /** Allows the user to set the sorting order of the members of the field. - * @Default {ej.PivotAnalysis.SortOrder.Ascending} - */ - sortOrder?: ej.PivotAnalysis.SortOrder | string; - - /** Contains the list of members need to be drilled down by default in the field. - * @Default {[]} - */ - drilledItems?: any[]; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceColumnsFilterItems; - } - - export interface DataSourceRowsAdvancedFilter { - - /** Allows the user to provide level unique name to perform advanced filtering. - */ - name?: string; - - /** Allows the user to set the operator to perform Label Filtering. - * @Default {none} - */ - labelFilterOperator?: string; - - /** Allows the user to set the operator to perform Value Filtering. - * @Default {none} - */ - valueFilterOperator?: string; - - /** Allows the user to set the filtering type while performing advanced filtering. - */ - advancedFilterType?: string; - - /** In case of value filtering, this property contains the measure name to which the filter is applied. - */ - measure?: string; - - /** Allows the user to hold the filter operand values in advanced filtering. - */ - values?: any[]; - } - - export interface DataSourceRowsFilterItems { - - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; - - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceRow { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Allows the user to set the display caption for an item. - */ - fieldCaption?: string; - - /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. - * @Default {[]} - */ - advancedFilter?: DataSourceRowsAdvancedFilter[]; - - /** Allows the user to indicate whether the added item is a named set or not. - * @Default {false} - */ - isNamedSets?: boolean; - - /** Shows/Hides the sub-total of the field. - * @Default {true} - */ - showSubTotal?: boolean; - - /** Allows the user to set the sorting order of the members of the field. - * @Default {ej.PivotAnalysis.SortOrder.Ascending} - */ - sortOrder?: ej.PivotAnalysis.SortOrder | string; - - /** Contains the list of members need to be drilled down by default in the field. - * @Default {[]} - */ - drilledItems?: any[]; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceRowsFilterItems; - } - - export interface DataSourceValuesMeasure { - - /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. - */ - fieldName?: string; - } - - export interface DataSourceValue { - - /** Allows the user to bind the item by using its unique name as field name for Relational datasource. - */ - fieldName?: string; - - /** Allows the user to set the display caption for an item for Relational datasource. - */ - fieldCaption?: string; - - /** This holds the list of unique names of measures to bind them from the OLAP cube. - * @Default {[]} - */ - measures?: DataSourceValuesMeasure[]; - - /** Allows to set the axis name to place the measures items. - * @Default {rows} - */ - axis?: string; - - /** Indicates whether the field is a calculated field or not with Relational datasource. - * @Default {false} - */ - isCalculatedField?: boolean; - - /** Allows to set the type of PivotGrid summary calculation for the value field with Relational datasource. - * @Default {ej.PivotAnalysis.SummaryType.Sum} - */ - summaryType?: ej.PivotAnalysis.SummaryType | string; - - /** Allows to set the format of the values. - */ - format?: string; - - /** This property sets type of display of date. - */ - formatString?: string; - - /** Allows to set the formula for calculation of values for calculated members in Relational datasource. - */ - formula?: string; - } - - export interface DataSourceFiltersFilterItems { - - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; - - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceFilter { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Allows the user to set the display name for an item. - */ - fieldCaption?: string; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceFiltersFilterItems; - } - - export interface DataSourcePagerOptions { - - /** Allows to set the number of categorical columns to be displayed in each page on applying paging. - * @Default {0} - */ - categoricalPageSize?: number; - - /** Allows to set the number of series rows to be displayed in each page on applying paging. - * @Default {0} - */ - seriesPageSize?: number; - - /** Allows to set the page number in categorical axis to be loaded by default. - * @Default {1} - */ - categoricalCurrentPage?: number; - - /** Allows to set the page number in series axis to be loaded by default. - * @Default {1} - */ - seriesCurrentPage?: number; - } - - export interface DataSource { - - /** Lists out the items to be arranged in columns section of PivotClient. - * @Default {[]} - */ - columns?: DataSourceColumn[]; - - /** Lists out the items to be arranged in rows section of PivotClient. - * @Default {[]} - */ - rows?: DataSourceRow[]; - - /** Lists out the items which supports calculation in PivotClient. - * @Default {[]} - */ - values?: DataSourceValue[]; - - /** Lists out the items which supports filtering of values without displaying the members in UI in PivotClient. - * @Default {[]} - */ - filters?: DataSourceFilter[]; - - /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} - */ - cube?: string; - - /** Provides the raw data source for the PivotClient. - * @Default {null} - */ - data?: any; - - /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} - */ - catalog?: string; - - /** Allows user to filter the members (by its name and values) through advanced filtering (excel-like) option in client-mode. - * @Default {false} - */ - enableAdvancedFilter?: boolean; - - /** Sets a name to the report bound to the control. - */ - reportName?: string; - - /** Allows to set the page size and current page number for each axis on applying paging. - * @Default {{}} - */ - pagerOptions?: DataSourcePagerOptions; - } - - export interface DisplaySettings { - - /** Lets the user to customize the display of PivotChart and PivotGrid widgets, either in tabs or tiles. - * @Default {ej.PivotClient.ControlPlacement.Tab} - */ - controlPlacement?: ej.PivotClient.ControlPlacement | string; - - /** Lets the user to set either Chart or Grid as the start-up widget. - * @Default {ej.PivotClient.DefaultView.Grid} - */ - defaultView?: ej.PivotClient.DefaultView | string; - - /** Lets the user to have an option for switching to full screen view of PivotChart and PivotGrid from default view in PivotClient. - * @Default {false} - */ - enableFullScreen?: boolean; - - /** Enables an option to enhance the space for PivotGrid and PivotChart by hiding Cube Browser and Axis Element Builder. - * @Default {false} - */ - enableTogglePanel?: boolean; - - /** Sets the display mode (Only Chart/Only Grid/Both) in PivotClient. - * @Default {ej.PivotClient.DisplayMode.ChartAndGrid} - */ - mode?: ej.PivotClient.DisplayMode | string; - } - - export interface ServiceMethodSettings { - - /** Allows the user to set the custom name for the service method responsible for updating the entire report and widget, while changing the Cube. - * @Default {CubeChanged} - */ - cubeChanged?: string; - - /** Allows the user to set the custom name for the service method responsible for exporting. - * @Default {Export} - */ - exportPivotClient?: string; - - /** Allows the user to set the custom name for the service method responsible to get the members for the tree-view, inside member-editor dialog. - * @Default {FetchMemberTreeNodes} - */ - fetchMemberTreeNodes?: string; - - /** Allows the user to set the custom name for the service method responsible for fetching the report names from the database. - * @Default {FetchReportListFromDB} - */ - fetchReportList?: string; - - /** Allows the user to set the custom name for the service method responsible for updating report while filtering members. - * @Default {FilterElement} - */ - filterElement?: string; - - /** Allows the user to set the custom name for the service method responsible for initializing PivotClient. - * @Default {InitializeClient} - */ - initialize?: string; - - /** Allows the user to set the custom name for the service method responsible for loading a report collection from the database. - * @Default {LoadReportFromDB} - */ - loadReport?: string; + /** Returns the row index which we start to drag. + */ + draggedRowIndex?: number; - /** Allows the user to set the custom name for the service method responsible for retrieving the MDX query for the current report. - * @Default {GetMDXQuery} - */ - mdxQuery?: string; + /** Returns the row on which we are dragging. + */ + targetRow?: any; - /** Allows the user to set the custom name for the service method responsible for updating the tree-view inside Cube Browser, while changing the measure group. - * @Default {MeasureGroupChanged} - */ - measureGroupChanged?: string; + /** Returns the row index on which we are dragging. + */ + targetRowIndex?: number; - /** Allows the user to set the custom name for the service method responsible to get the child members, on tree-view node expansion. - * @Default {MemberExpanded} - */ - memberExpand?: string; + /** Returns that we can drop over that record or not. + */ + canDrop?: boolean; - /** Allows the user to set the custom name for the service method responsible for updating report while dropping a node/SplitButton inside Axis Element Builder. - * @Default {NodeDropped} - */ - nodeDropped?: string; + /** Returns the Gantt model. + */ + model?: any; - /** Allows the user to set the custom name for the service method responsible for updating report while removing SplitButton from Axis Element Builder. - * @Default {RemoveSplitButton} - */ - removeSplitButton?: string; + /** Returns request type. + */ + requestType?: string; - /** Allows the user to set the custom name for the service method responsible for saving the report collection to database. - * @Default {SaveReportToDB} - */ - saveReport?: string; - - /** Allows the user to set the custom name for the service method responsible for toggling the elements in row and column axes. - * @Default {ToggleAxis} - */ - toggleAxis?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Allows the user to set the custom name for the service method responsible for all the toolbar operations. - * @Default {ToolbarOperations} - */ - toolbarServices?: string; - - /** Allows the user to set the custom name for the service method responsible for updating report collection. - * @Default {UpdateReport} - */ - updateReport?: string; - - /** Allows the user to set the custom name for the service method responsible on navigating between pages in paged PivotClient. - * @Default {Paging} - */ - paging?: string; - } - - enum ClientExportMode { - - ///Exports both the PivotChart and PivotGrid on exporting. - ChartAndGrid, - - ///Exports the PivotChart control alone on exporting. - ChartOnly, - - ///Exports the PivotGrid control alone on exporting. - GridOnly - } - - - enum ControlPlacement { - - ///Displays PivotChart and PivotGrid widgets in separate tabs. - Tab, - - ///Displays PivotChart and PivotGrid widgets one above the other. - Tile - } - - - enum DefaultView { - - ///To set PivotChart as a default control in view. - Chart, - - ///To set PivotGrid as a default control in view. - Grid - } - - - enum DisplayMode { - - ///To display only PivotChart widget. - ChartOnly, - - ///To display only PivotGrid widget. - GridOnly, - - ///To display both PivotChart and PivotGrid widgets. - ChartAndGrid - } - - } - - class PivotGauge extends ej.Widget { - static fn: PivotGauge; - constructor(element: JQuery | Element, options?: PivotGauge.Model); - static Locale: any; - model: PivotGauge.Model; - defaults: PivotGauge.Model; - - /** Performs an asynchronous HTTP (AJAX) request. - * @returns {void} - */ - doAjaxPost(): void; - - /** This function is used to refresh the PivotGauge at client-side itself. - * @returns {void} - */ - refresh(): void; - - /** This function removes the KPI related images from PivotGauge on binding OLAP datasource. - * @returns {void} - */ - removeImg(): void; - - /** This function receives the JSON formatted datasource and renders the PivotGauge control. - * @returns {void} - */ - renderControlFromJSON(): void; - - /** Returns the OlapReport string maintained along with the axis elements information. - * @returns {string} - */ - getOlapReport(): string; - - /** Sets the OlapReport string along with the axis information and maintains it in a property. - * @returns {void} - */ - setOlapReport(): void; - - /** Returns the JSON records formed to render the control. - * @returns {Array} - */ - getJSONRecords(): any[]; - - /** Sets the JSON records to render the control. - * @returns {void} - */ - setJSONRecords(): void; + export interface RowDragStartEventArgs { - /** Returns the JSON records required to render the PivotGauge on performing any action with OLAP data source. - * @returns {void} - */ - getJSONData(): void; - } - export namespace PivotGauge { + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface Model { + /** Returns the row which we start to drag. + */ + draggedRow?: any; - /** Sets the number of columns to arrange the Pivot Gauges. - * @Default {0} - */ - columnsCount?: number; + /** Returns the row index which we start to drag. + */ + draggedRowIndex?: boolean; - /** Specifies the CSS class to PivotGauge to achieve custom theme. - * @Default {“”} - */ - cssClass?: string; + /** Returns the Gantt model. + */ + model?: any; - /** Object utilized to pass additional information between client-end and service-end on operating in server mode. - * @Default {{}} - */ - customObject?: any; - - /** Initializes the data source for the PivotGauge widget, when it functions completely on client-side. - * @Default {{}} - */ - dataSource?: DataSource; - - /** Enables/disables the animation of pointer in PivotGauge. - * @Default {false} - */ - enableAnimation?: boolean; - - /** Enables/disables tooltip visibility in PivotGauge. - * @Default {false} - */ - enableTooltip?: boolean; - - /** Allows the user to view PivotGauge from right to left. - * @Default {false} - */ - enableRTL?: boolean; - - /** Allows the user to enable PivotGauge’s responsiveness in the browser layout. - * @Default {false} - */ - isResponsive?: boolean; - - /** Allows the user to change the format of the label values in PivotGauge. - * @Default {null} - */ - labelFormatSettings?: LabelFormatSettings; - - /** Allows the user to set the localized language for the widget. - * @Default {en-US} - */ - locale?: string; - - /** Sets the number of rows to arrange the Pivot Gauges. - * @Default {0} - */ - rowsCount?: number; - - /** Sets the scale values such as pointers, indicators, etc... for PivotGauge. - * @Default {{}} - */ - scales?: any; - - /** Allows the user to set the custom name for the methods at service-end, communicated during AJAX post. - * @Default {{}} - */ - serviceMethodSettings?: ServiceMethodSettings; - - /** Enables/disables the header labels in PivotGauge. - * @Default {true} - */ - showHeaderLabel?: boolean; - - /** Connects the service using the specified URL for any server updates on server mode operation. - * @Default {“”} - */ - url?: string; - - /** Sets the mode for the PivotGauge widget for binding either OLAP or Relational data source. - * @Default {ej.Pivot.AnalysisMode.Pivot} - */ - analysisMode?: ej.Pivot.AnalysisMode | string; - - /** Sets the mode for the PivotGauge widget for binding data source either in server-side or client-side. - * @Default {ej.Pivot.OperationalMode.ClientMode} - */ - operationalMode?: ej.Pivot.OperationalMode | string; - - /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; - - /** Triggers before any AJAX request is passed from PivotGauge to service methods. */ - beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; - - /** Triggers before populating the pivot engine on operating in client mode. */ - beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; + /** Returns request type. + */ + requestType?: string; - /** Triggers when PivotGauge started loading at client-side. */ - load?(e: LoadEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggers when PivotGauge widget completes all operations at client-side after any AJAX request. */ - renderComplete?(e: RenderCompleteEventArgs): void; + export interface RowDragStopEventArgs { - /** Triggers when any error occurred during AJAX request. */ - renderFailure?(e: RenderFailureEventArgs): void; - - /** Triggers when PivotGauge successfully reaches client-side after any AJAX request. */ - renderSuccess?(e: RenderSuccessEventArgs): void; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface AfterServiceInvokeEventArgs { + /** Returns the row which we start to drag. + */ + draggedRow?: any; - /** returns the custom object bound with PivotGauge control. - */ - customObject?: any; + /** Returns the row index which we start to drag. + */ + draggedRowIndex?: number; - /** returns the HTML element of PivotGauge control. - */ - element?: any; - } + /** Returns the row which we are dropped to row. + */ + targetRow?: any; - export interface BeforeServiceInvokeEventArgs { + /** Returns the row index which we are dropped to row. + */ + targetRowIndex?: number; - /** returns the custom object bound with PivotGauge control. - */ - customObject?: any; + /** Returns the Gantt model. + */ + model?: any; - /** returns the HTML element of PivotGauge control. - */ - element?: any; - } + /** Returns request type. + */ + requestType?: string; - export interface BeforePivotEnginePopulateEventArgs { + /** Returns the name of the event. + */ + type?: string; + } - /** returns the current instance of PivotGauge control. - */ - gaugeObject?: any; - } + export interface CollapsedEventArgs { - export interface LoadEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the current action of PivotGauge control. - */ - action?: string; + /** Returns the row index of collapsed record. + */ + recordIndex?: number; - /** returns the model of PivotGauge control. - */ - model?: any; + /** Returns the data of collapsed record. + */ + data?: any; - /** returns the HTML element of the widget. - */ - element?: any; + /** Returns Request Type. + */ + requestType?: string; - /** returns the custom object bound to the control. - */ - customObject?: any; - } + /** Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; + } - export interface RenderCompleteEventArgs { + export interface CollapsingEventArgs { - /** returns the custom object bound with PivotGauge control. - */ - customObject?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the HTML element of PivotGauge control. - */ - element?: any; - } + /** Returns the row index of collapsing record. + */ + recordIndex?: number; - export interface RenderFailureEventArgs { + /** Returns the data of edited cell record.. + */ + data?: any; - /** returns the HTML element of PivotGauge control. - */ - element?: any; + /** Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; + } - /** returns the custom object bound with the control. - */ - customObject?: any; + export interface ContextMenuOpenEventArgs { - /** returns the error message with error code. - */ - message?: string; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface RenderSuccessEventArgs { + /** Returns the default context menu items to which we add custom items. + */ + contextMenuItems?: any[]; - /** returns the HTML element of PivotGauge control. - */ - element?: any; + /** Returns the Gantt model. + */ + model?: any; - /** returns the custom object bound with the control. - */ - customObject?: any; - } + /** Returns request type. + */ + requestType?: string; - export interface DataSourceColumnsFilterItems { + /** Returns the name of the event. + */ + type?: string; + } - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; + export interface CreateEventArgs { - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface DataSourceColumn { + /** Returns the Gantt model + */ + model?: any; - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceColumnsFilterItems; - } + export interface EndEditEventArgs { - export interface DataSourceRowsFilterItems { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; + /** Returns the row element of editing cell. + */ + rowElement?: any; - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceRow { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; + /** Returns the Element of editing cell. + */ + cellElement?: any; - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceRowsFilterItems; - } - - export interface DataSourceValuesMeasure { - - /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. - */ - fieldName?: string; - } - - export interface DataSourceValue { - - /** Allows the user to bind the item by using its unique name as field name for Relational datasource. - */ - fieldName?: string; - - /** Allows the user to set the display caption for an item for Relational datasource. - */ - fieldCaption?: string; - - /** This holds the list of unique names of measures to bind them from the OLAP cube. - * @Default {[]} - */ - measures?: DataSourceValuesMeasure[]; - - /** Allows to set the axis name to place the measures items. - * @Default {rows} - */ - axis?: string; - - /** Indicates whether the field is a calculated field or not with Relational datasource. - * @Default {false} - */ - isCalculatedField?: boolean; - - /** Allows to set the formula for calculation of values for calculated members in Relational datasource. - */ - formula?: string; - } - - export interface DataSourceFiltersFilterItems { - - /** Sets the type of filter whether to include/exclude the mentioned values. - * @Default {ej.PivotAnalysis.FilterType.Exclude} - */ - filterType?: ej.PivotAnalysis.FilterType | string; - - /** Contains the collection of items to be included/excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } + /** Returns the data of edited cell record. + */ + data?: any; - export interface DataSourceFilter { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; + /** Returns the column name of edited cell belongs. + */ + columnName?: string; - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceFiltersFilterItems; - } + /** Returns the column object of edited cell belongs. + */ + columnObject?: any; + } - export interface DataSource { - - /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} - */ - cube?: string; - - /** Provides the raw data source for the PivotGauge. - * @Default {null} - */ - data?: any; - - /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} - */ - catalog?: string; - - /** Lists out the items to bind in columns section. - * @Default {[]} - */ - columns?: DataSourceColumn[]; - - /** Lists out the items to bind in rows section. - * @Default {[]} - */ - rows?: DataSourceRow[]; - - /** Lists out the items supports calculation in PivotGauge. - * @Default {[]} - */ - values?: DataSourceValue[]; - - /** Lists out the items which supports filtering of values without displaying the members in UI in PivotGauge. - * @Default {[]} - */ - filters?: DataSourceFilter[]; - } - - export interface LabelFormatSettings { - - /** Allows the user to change the number format of the label values in PivotGauge. - * @Default {ej.PivotGauge.NumberFormat.Default} - */ - numberFormat?: ej.PivotGauge.NumberFormat | string; - - /** Allows you to set the number of digits displayed after decimal point. - * @Default {5} - */ - decimalPlaces?: number; - - /** Allows you to add a text at the beginning of the label. - */ - prefixText?: string; - - /** Allows you to add text at the end of the label. - */ - suffixText?: string; - } - - export interface ServiceMethodSettings { - - /** Allows the user to set the custom name for the service method responsible for initializing PivotGauge. - * @Default {InitializeGauge} - */ - initialize?: string; - } - - enum NumberFormat { - - ///To set default format for label values. - Default, - - ///To set currency format for label values. - Currency, - - ///To set percentage format for label values. - Percentage, - - ///To set fraction format for label values. - Fraction, - - ///To set scientific format for label values. - Scientific, - - ///To set text format for label values. - Text, - - ///To set notation format for label values. - Notation - } - - } - - class PivotTreeMap extends ej.Widget { - static fn: PivotTreeMap; - constructor(element: JQuery | Element, options?: PivotTreeMap.Model); - static Locale: any; - model: PivotTreeMap.Model; - defaults: PivotTreeMap.Model; - - /** Performs an asynchronous HTTP (AJAX) request. - * @returns {void} - */ - doAjaxPost(): void; - - /** Returns the OlapReport string maintained along with the axis elements information. - * @returns {string} - */ - getOlapReport(): string; - - /** Sets the OlapReport string along with the axis information and maintains it in a property. - * @returns {void} - */ - setOlapReport(): void; - - /** Returns the JSON records formed to render the control. - * @returns {Array} - */ - getJSONRecords(): any[]; - - /** Sets the JSON records to render the control. - * @returns {void} - */ - setJSONRecords(): void; - - /** Renders the control with the pivot engine obtained from OLAP cube. - * @returns {void} - */ - generateJSON(): void; + export interface ExpandedEventArgs { - /** This function receives the JSON formatted datasource to render the PivotTreeMap control. - * @returns {void} - */ - renderTreeMapFromJSON(): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** This function receives the update from service-end, which would be utilized for rendering the widget. - * @returns {void} - */ - renderControlSuccess(): void; - } - export namespace PivotTreeMap { + /** Returns the row index of record. + */ + recordIndex?: number; - export interface Model { + /** Returns the data of expanded record. + */ + data?: any; - /** Specifies the CSS class to PivotTreeMap to achieve custom theme. - * @Default {“”} - */ - cssClass?: string; + /** Returns Request Type. + */ + requestType?: string; - /** Initializes the data source for the PivotTreeMap widget, when it functions completely on client-side. - * @Default {{}} - */ - dataSource?: DataSource; + /** Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; + } - /** Object utilized to pass additional information between client-end and service-end. - * @Default {{}} - */ - customObject?: any; + export interface ExpandingEventArgs { - /** Allows the user to enable PivotTreeMap’s responsiveness in the browser layout. - * @Default {false} - */ - isResponsive?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Allows the user to set the localized language for the widget. - * @Default {en-US} - */ - locale?: string; + /** Returns the row index of record. + */ + recordIndex?: any; - /** Sets the mode for the PivotTreeMap widget for binding data source either in server-side or client-side. - * @Default {ej.Pivot.OperationalMode.ClientMode} - */ - operationalMode?: ej.Pivot.OperationalMode | string; + /** Returns the data of edited cell record.. + */ + data?: any; - /** Allows the user to set custom name for the methods at service-end, communicated on AJAX post. - * @Default {{}} - */ - serviceMethodSettings?: ServiceMethodSettings; + /** Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; + } - /** Connects the service using the specified URL for any server updates. - * @Default {“”} - */ - url?: string; + export interface LoadEventArgs { - /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggers before any AJAX request is passed from PivotTreeMap to service methods. */ - beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + /** Returns the Gantt model + */ + model?: any; - /** Triggers when PivotTreeMap starts to render. */ - load?(e: LoadEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggers before populating the pivot engine from datasource. */ - beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; - - /** Triggers when drill up/down happens in PivotTreeMap control. And it returns the outer HTML of PivotTreeMap control. */ - drillSuccess?(e: DrillSuccessEventArgs): void; + export interface QueryCellInfoEventArgs { - /** Triggers when PivotTreeMap widget completes all operations at client-side after any AJAX request. */ - renderComplete?(e: RenderCompleteEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggers when any error occurred during AJAX request. */ - renderFailure?(e: RenderFailureEventArgs): void; + /** Returns the selecting cell element. + */ + cellElement?: any; - /** Triggers when PivotTreeMap successfully reaches client-side after any AJAX request. */ - renderSuccess?(e: RenderSuccessEventArgs): void; - } + /** Returns the value of cell. + */ + cellValue?: string; - export interface AfterServiceInvokeEventArgs { + /** Returns the data of current cell record. + */ + data?: any; - /** returns the current action of PivotTreeMap control. - */ - action?: string; + /** Returns the column of cell belongs. + */ + column?: any; + } - /** returns the custom object bound with PivotTreeMap control. - */ - customObject?: any; + export interface QueryTaskbarInfoEventArgs { - /** returns the HTML element of PivotTreeMap control. - */ - element?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface BeforeServiceInvokeEventArgs { + /** Returns the taskbar background of current item. + */ + TaskbarBackground?: string; - /** returns the current action of PivotTreeMap control. - */ - action?: string; + /** Returns the progressbar background of current item. + */ + ProgressbarBackground?: string; - /** returns the custom object bound with PivotTreeMap control. - */ - customObject?: any; + /** Returns the parent taskbar background of current item. + */ + parentTaskbarBackground?: string; - /** returns the HTML element of PivotTreeMap control. - */ - element?: any; - } + /** Returns the parent progressbar background of current item. + */ + parentProgressbarBackground?: string; - export interface LoadEventArgs { + /** Returns the data of the record. + */ + data?: any; + } - /** returns the current action of PivotTreeMap control. - */ - action?: string; + export interface RowDataBoundEventArgs { - /** returns the custom object bound with PivotTreeMap control. - */ - customObject?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** returns the HTML element of PivotTreeMap control. - */ - element?: any; - } + /** Returns the row element of rendering row. + */ + rowElement?: any; - export interface BeforePivotEnginePopulateEventArgs { + /** Returns the data of rendering row record.. + */ + data?: any; + } - /** returns the current instance of PivotTreeMap control. - */ - treeMapObject?: any; - } + export interface RowSelectedEventArgs { - export interface DrillSuccessEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** return the HTML element of PivotTreeMap control. - */ - element?: any; - } + /** Returns the selecting row element. + */ + targetRow?: any; - export interface RenderCompleteEventArgs { + /** Returns the index of selecting row record. + */ + recordIndex?: number; - /** returns the current action of PivotTreeMap control. - */ - action?: string; + /** Returns the data of selected record. + */ + data?: any; + } - /** returns the custom object bound with PivotTreeMap control. - */ - customObject?: any; + export interface RowSelectingEventArgs { - /** returns the HTML element of PivotTreeMap control. - */ - element?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface RenderFailureEventArgs { + /** Returns the data selecting record. + */ + data?: any; - /** returns the current action of PivotTreeMap control. - */ - action?: string; + /** Returns the index of selecting row record. + */ + recordIndex?: string; - /** returns the custom object bound with PivotTreeMap control. - */ - customObject?: any; + /** Returns the selecting row chart element. + */ + targetChartRow?: any; - /** returns the HTML element of PivotTreeMap control. - */ - element?: any; + /** Returns the selecting row grid element. + */ + targetGridRow?: any; - /** returns the error stack trace of the original exception. - */ - message?: string; - } + /** Returns the previous selected data. + */ + previousData?: any; - export interface RenderSuccessEventArgs { + /** Returns the previous selected row index. + */ + previousIndex?: string; - /** returns the current action of PivotTreeMap control. - */ - action?: string; + /** Returns the previous selected row chart element. + */ + previousChartRow?: any; - /** returns the custom object bound with PivotTreeMap control. - */ - customObject?: any; + /** Returns the previous selected row grid element. + */ + previousGridRow?: any; + } - /** returns the HTML element of PivotTreeMap control. - */ - element?: any; - } + export interface TaskbarEditedEventArgs { - export interface DataSourceColumnsFilterItems { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Contains the collection of items to be excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } + /** Returns the data of edited record. + */ + data?: any; - export interface DataSourceColumn { + /** Returns the previous data value of edited record. + */ + previousData?: any; - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; + /** Returns 'true' if taskbar is dragged. + */ + dragging?: boolean; - /** Allows the user to indicate whether the added item is a named set or not. - * @Default {false} - */ - isNamedSets?: boolean; + /** Returns 'true' if taskbar is left resized. + */ + leftResizing?: boolean; - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceColumnsFilterItems; - } - - export interface DataSourceRowsFilterItems { - - /** Contains the collection of items to be excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceRow { + /** Returns 'true' if taskbar is right resized. + */ + rightResizing?: boolean; - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Allows the user to indicate whether the added item is a named set or not. - * @Default {false} - */ - isNamedSets?: boolean; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceRowsFilterItems; - } - - export interface DataSourceValuesMeasure { - - /** Allows the user to bind the measure from OLAP datasource by using its unique name as field name. - */ - fieldName?: string; - } - - export interface DataSourceValue { - - /** This holds the list of unique names of measures to bind them from the OLAP cube. - * @Default {[]} - */ - measures?: DataSourceValuesMeasure[]; - - /** Allows to set the axis name to place the measures items. - * @Default {rows} - */ - axis?: string; - } - - export interface DataSourceFiltersFilterItems { - - /** Contains the collection of items to be excluded among the field members. - * @Default {[]} - */ - values?: any[]; - } - - export interface DataSourceFilter { - - /** Allows the user to bind the item by using its unique name as field name. - */ - fieldName?: string; - - /** Applies filter to the field members. - * @Default {null} - */ - filterItems?: DataSourceFiltersFilterItems; - } - - export interface DataSource { - - /** Provides the raw data source for the PivotTreeMap. - * @Default {null} - */ - data?: any; - - /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} - */ - cube?: string; - - /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} - */ - catalog?: string; - - /** Lists out the items to be displayed as series of PivotTreeMap. - * @Default {[]} - */ - columns?: DataSourceColumn[]; - - /** Lists out the items to be displayed as segments of PivotTreeMap. - * @Default {[]} - */ - rows?: DataSourceRow[]; - - /** Lists out the items supports calculation in PivotTreeMap. - * @Default {[]} - */ - values?: DataSourceValue[]; - - /** Lists out the items which supports filtering of values without displaying the members in UI in PivotTreeMap. - * @Default {[]} - */ - filters?: DataSourceFilter[]; - } - - export interface ServiceMethodSettings { - - /** Allows the user to set the custom name for the service method responsible for initializing PivotTreeMap. - * @Default {InitializeTreemap} - */ - initialize?: string; - - /** Allows the user to set the custom name for the service method responsible for drilling up/down operation in PivotTreeMap. - * @Default {DrillTreeMap} - */ - drillDown?: string; - } - } - - class Schedule extends ej.Widget { - static fn: Schedule; - constructor(element: JQuery | Element, options?: Schedule.Model); - static Locale: any; - model: Schedule.Model; - defaults: Schedule.Model; - - /** This method is used to delete the appointment based on the guid value or the appointment data passed to it. - * @param {string|any} GUID value of an appointment element or an appointment object - * @returns {void} - */ - deleteAppointment(data: string | any): void; - - /** Destroys the Schedule widget. All the events bound using this._on are unbound automatically and the control is moved to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** Exports the appointments from the Schedule control. - * @param {string} It refers the controller action name to redirect. (For MVC) - * @param {string} It refers the server event name.(For ASP) - * @param {string|number} Pass the id of an appointment, in case if a single appointment needs to be exported. Otherwise, it takes the null value. - * @returns {void} - */ - exportSchedule(action: string, serverEvent: string, id: string | number): void; - - /** Searches and filters the appointments from appointment list of Schedule control. - * @param {Array} Holds array of one or more conditional objects for filtering the appointments based on it. - * @returns {Array} - */ - filterAppointments(filterConditions: any[]): any[]; - - /** Gets the complete appointment list of Schedule control. - * @returns {Array} - */ - getAppointments(): any[]; - - /** Prints the entire Scheduler or a single appointment based on the appointment data passed as an argument to it. Simply calling the print() method, - * without passing any argument will print the entire Scheduler. - * @param {any} Either accepts no arguments at all or else accepts an appointment object. - * @returns {void} - */ - print(data: any): void; - - /** Refreshes the Scroller of Scheduler while using it within some other controls or application. - * @returns {void} - */ - refreshScroller(): void; - - /** It is used to save the appointment. The appointment object is based on the argument passed to this method. - * @param {any} appointment object which includes appointment details - * @returns {void} - */ - saveAppointment(appointmentObject: any): void; - - /** Generate the recurrence rule as a string, based on the repeat options selected. - * @returns {string} - */ - getRecurrenceRule(): string; - - /** Retrieves the time slot information (start/end time and resource details) of the given element. - * The parameter is optional - as when no element is passed to it, the currently selected cell information will be retrieved. When multiple cells are selected in the Scheduler, - * it is not necessary to provide the parameter. - * @param {any} TD element object rendered as Scheduler work cell - * @returns {any} - */ - getSlotByElement(element: any): any; - - /** Searches the appointments from the appointment list of Schedule control based on the provided search string in its argument list. - * @param {any|string} Defines the search word or the filter condition, based on which the appointments are filtered from the list. - * @param {string} Defines the field name on which the search is to be made. - * @param {ej.FilterOperators|string} Defines the filterOperator value for the search operation. - * @param {boolean} Defines the ignoreCase value for performing the search operation. - * @returns {Array} - */ - searchAppointments(searchString: any | string, field: string, operator: ej.FilterOperators | string, ignoreCase: boolean): any[]; - - /** Refreshes the entire Schedule control. - * @returns {void} - */ - refresh(): void; - - /** Refreshes only the appointment elements within the Schedule control. - * @returns {void} - */ - refreshAppointments(): void; - - /** Passes the server-side action and data to the client-side for rendering the modified appointment list on the Schedule control. - * @returns {void} - */ - notifyChanges(): void; - } - export namespace Schedule { - - export interface Model { - - /** When set to true, Schedule allows the appointments to be dragged and dropped at required time. - * @Default {true} - */ - allowDragAndDrop?: boolean; - - /** When set to true, Scheduler allows interaction through keyboard shortcut keys. - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** It includes the dataSource option and the fields related to Schedule appointments. The appointment fields within the appointmentSettings can accept both string and object type values. - * To apply validation rules on the appointment window fields, then the appointment fields needs to be defined with object type values. - */ - appointmentSettings?: AppointmentSettings; - - /** Template design that applies on the Schedule appointments. All the field names that are mapped from dataSource - * to the appropriate field properties within the appointmentSettings can be used within the template. - * @Default {null} - */ - appointmentTemplateId?: string; - - /** Accepts the custom CSS class name that defines specific user-defined styles and themes to be applied for partial or complete elements of the Schedule. - */ - cssClass?: string; - - /** Sets various categorize colors to the Schedule appointments to differentiate it. - */ - categorizeSettings?: CategorizeSettings; - - /** Sets the height for Schedule cells. - * @Default {20px} - */ - cellHeight?: string; - - /** Sets the width for Schedule cells. - */ - cellWidth?: string; - - /** Holds all options related to the context menu settings of Scheduler. - */ - contextMenuSettings?: ContextMenuSettings; - - /** Sets current date of the Schedule. The Schedule displays initially with the date that is provided here. - * @Default {new Date()} - */ - currentDate?: any; - - /** Sets current view of the Schedule. Schedule renders initially with the view that is specified here. The available views are day, week, workweek, month, agenda and - * custom view - from which any one of the required view can be set to the Schedule. It accepts both string or enum values. The enum values that are accepted - * by currentView(ej.Schedule.CurrentView) are as follows, - * @Default {ej.Schedule.CurrentView.Week} - */ - currentView?: string | ej.Schedule.CurrentView; - - /** Sets the date format for Schedule. - */ - dateFormat?: string; - - /** When set to true, shows the previous/next appointment navigator button on the Scheduler. - * @Default {true} - */ - showAppointmentNavigator?: boolean; - - /** When set to true, enables the resize behavior of appointments within the Schedule. - * @Default {true} - */ - enableAppointmentResize?: boolean; - - /** When set to true, enables the loading of Schedule appointments based on your demand. With this load on demand concept, the data consumption of the Schedule can be limited. - * @Default {false} - */ - enableLoadOnDemand?: boolean; - - /** Saves the current model value to browser cookies for state maintenance. When the page gets refreshed, Schedule control values are retained. - * @Default {false} - */ - enablePersistence?: boolean; - - /** When set to true, the Schedule layout and behavior changes as per the common RTL conventions. - * @Default {false} - */ - enableRTL?: boolean; - - /** Sets the end hour time limit to be displayed on the Schedule. - * @Default {24} - */ - endHour?: number; - - /** To configure resource grouping on the Schedule. - */ - group?: Group; - - /** Sets the height of the Schedule. Accepts both pixel and percentage values. - * @Default {1120px} - */ - height?: string; - - /** To define the work hours within the Schedule control. - */ - workHours?: WorkHours; - - /** When set to true, enables the Schedule to observe Daylight Saving Time for supported timezones. - * @Default {false} - */ - isDST?: boolean; - - /** When set to true, adapts the Schedule layout to fit the screen size of devices on which it renders. - * @Default {true} - */ - isResponsive?: boolean; - - /** Sets the specific culture to the Schedule. - * @Default {en-US} - */ - locale?: string; - - /** Sets the maximum date limit to display on the Schedule. Setting maxDate with specific date value disallows the Schedule to navigate beyond that date. - * @Default {new Date(2099, 12, 31)} - */ - maxDate?: any; - - /** Sets the minimum date limit to display on the Schedule. Setting minDate with specific date value disallows the Schedule to navigate beyond that date. - * @Default {new Date(1900, 01, 01)} - */ - minDate?: any; - - /** Sets the mode of Schedule rendering either in a vertical or horizontal direction. It accepts either string("vertical" or "horizontal") or enum values. - * The enum values that are accepted by orientation(ej.Schedule.Orientation) are as follows, - * @Default {ej.Schedule.Orientation.Vertical} - */ - orientation?: string | ej.Schedule.Orientation; - - /** Holds all the options related to priority settings of the Schedule. - */ - prioritySettings?: PrioritySettings; - - /** When set to true, disables the interaction with the Schedule appointments, simply allowing the date and view navigation to occur. - * @Default {false} - */ - readOnly?: boolean; - - /** Holds all the options related to reminder settings of the Schedule. - */ - reminderSettings?: ReminderSettings; - - /** Defines the specific start and end dates to be rendered in the Schedule control. To render such user-specified custom date ranges in the Schedule control, - * set the currentView property to ej.Schedule.CurrentView.CustomView. - * @Default {null} - */ - renderDates?: RenderDates; - - /** Template design that applies on the Schedule resource header. - * @Default {null} - */ - resourceHeaderTemplateId?: string; - - /** Holds all the options related to the resources settings of the Schedule. It is a collection of one or more resource objects, where the levels of resources are rendered on the Schedule - * based on the order of the resource data provided within this collection. - * @Default {null} - */ - resources?: Resource[]; - - /** When set to true, displays the all-day row cells on the Schedule. - * @Default {true} - */ - showAllDayRow?: boolean; - - /** When set to true, displays the current time indicator on the Schedule. - * @Default {true} - */ - showCurrentTimeIndicator?: boolean; - - /** When set to true, displays the header bar on the Schedule. - * @Default {true} - */ - showHeaderBar?: boolean; - - /** When set to true, displays the location field additionally on Schedule appointment window. - * @Default {false} - */ - showLocationField?: boolean; - - /** When set to false, doesn't render the start and end timezone fields on the Schedule appointment window. - * @Default {true} - */ - showTimeZoneFields?: boolean; - - /** When set to true, displays the quick window for every single click made on the Schedule cells or appointments. - * @Default {true} - */ - showQuickWindow?: boolean; - - /** Sets the start hour time range to be displayed on the Schedule. - * @Default {0} - */ - startHour?: number; - - /** Sets either 12 or 24 hour time mode on the Schedule. It accepts either the string value("12" or "24") or the below mentioned enum values. - * The enum values that are accepted by timeMode(ej.Schedule.TimeMode) are as follows, - * @Default {null} - */ - timeMode?: string | ej.Schedule.TimeMode; - - /** Sets the timezone for the Schedule. - * @Default {null} - */ - timeZone?: string; - - /** Sets the collection of timezone items to be bound to the Schedule. Only the items bound to this property gets listed out in the timezone field of the appointment window. - */ - timeZoneCollection?: TimeZoneCollection; - - /** Defines the view collection to be displayed on the Schedule. By default, it displays all the views namely, Day, Week, WorkWeek and Month. - * @Default {[Day, Week, WorkWeek, Month, Agenda]} - */ - views?: any[]; - - /** Sets the width of the Schedule. Accepts both pixel and percentage values. - * @Default {100%} - */ - width?: string; - - /** When set to true, Schedule allows the validation of recurrence pattern to take place before it is being assigned to the appointments. For example, when one of the instance of - * recurrence appointment is dragged beyond the next or previous instance of the same recurrence appointment, a pop-up is displayed with the validation message disallowing the drag functionality. - * @Default {true} - */ - enableRecurrenceValidation?: boolean; - - /** Sets the week to display more than one week appointment summary. - */ - agendaViewSettings?: AgendaViewSettings; - - /** Sets specific day as the starting day of the week. - * @Default {null} - */ - firstDayOfWeek?: string; - - /** Sets different day collection within workWeek view. - * @Default {[Monday, Tuesday, Wednesday, Thursday, Friday]} - */ - workWeek?: any[]; - - /** Allows to pop-up appointment details in a tooltip while hovering over the appointments. - */ - tooltipSettings?: TooltipSettings; - - /** Holds all the options related to the time scale of Scheduler. The timeslots either major or minor slots can be customized with this property. - */ - timeScale?: TimeScale; - - /** When set to true, shows the delete confirmation dialog before deleting an appointment. - * @Default {true} - */ - showDeleteConfirmationDialog?: boolean; + /** Returns 'true' if taskbar is progress resized. + */ + progressResizing?: boolean; - /** Accepts the id value of the template layout defined for the all-day cells and customizes it. - * @Default {null} - */ - allDayCellsTemplateId?: string; + /** Returns the field values of record being edited. + */ + editingFields?: any; - /** Accepts the id value of the template layout defined for the work cells and month cells. - * @Default {null} - */ - workCellsTemplateId?: string; + /** Returns the Gantt model. + */ + model?: any; + } - /** Accepts the id value of the template layout defined for the date header cells and customizes it. - * @Default {null} - */ - dateHeaderTemplateId?: string; + export interface TaskbarEditingEventArgs { - /** when set to false, allows the height of the work-cells to adjust automatically (either expand or collapse) based on the number of appointment count it has. - * @Default {true} - */ - showOverflowButton?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Allows setting draggable area for the Scheduler appointments. Also, turns on the external drag and drop, when set with some specific external drag area name. - */ - appointmentDragArea?: string; + /** Returns the Gantt model. + */ + model?: any; - /** When set to true, displays the other months days from the current month on the Schedule. - * @Default {true} - */ - showNextPrevMonth?: boolean; + /** Returns the row object being edited. + */ + rowData?: any; - /** Blocks the user-specific time interval on the Scheduler, so that no appointments can be created on that particular time slots. - * It includes the dataSource option and also the fields related to block intervals. - */ - blockoutSettings?: BlockoutSettings; + /** Returns the field values of record being edited. + */ + editingFields?: any; - /** Triggers on the beginning of every action that starts within the Schedule. */ - actionBegin?(e: ActionBeginEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggers after the completion of every action within the Schedule. */ - actionComplete?(e: ActionCompleteEventArgs): void; + export interface TaskbarClickEventArgs { - /** Triggers after an appointment is clicked. */ - appointmentClick?(e: AppointmentClickEventArgs): void; + /** Returns currently clicked row data + */ + data?: any; - /** Triggers before the appointment is being removed from the Scheduler. */ - beforeAppointmentRemove?(e: BeforeAppointmentRemoveEventArgs): void; + /** Returns the current item index. + */ + index?: number; - /** Triggers before the edited appointment is being saved. */ - beforeAppointmentChange?(e: BeforeAppointmentChangeEventArgs): void; + /** Returns the Gantt model. + */ + model?: any; - /** Triggers on hovering the mouse over the appointments. */ - appointmentHover?(e: AppointmentHoverEventArgs): void; + /** Returns the clicked row element + */ + taskbarElement?: any; - /** Triggers before the new appointment gets saved. */ - beforeAppointmentCreate?(e: BeforeAppointmentCreateEventArgs): void; + /** Returns the target element. + */ + target?: any; - /** Triggers before the appointment window opens. */ - appointmentWindowOpen?(e: AppointmentWindowOpenEventArgs): void; + /** Returns the name of the event. + */ + type?: string; + } - /** Triggers before the context menu opens. */ - beforeContextMenuOpen?(e: BeforeContextMenuOpenEventArgs): void; + export interface ToolbarClickEventArgs { - /** Triggers after the cell is clicked. */ - cellClick?(e: CellClickEventArgs): void; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Triggers after the cell is clicked twice. */ - cellDoubleClick?(e: CellDoubleClickEventArgs): void; + /** Returns the current item. + */ + currentTarget?: any; - /** Triggers on hovering the mouse overs the cells. */ - cellHover?(e: CellHoverEventArgs): void; + /** Returns the Gantt model. + */ + model?: any; + + /** Returns the name of the toolbar item on which mouse click has been performed + */ + itemName?: string; + + /** Returns the name of the event. + */ + type?: string; + } - /** Triggers when the Scheduler completely renders on the page. */ - create?(e: CreateEventArgs): void; + export interface AddDialogField { - /** Triggers when the Scheduler and all its sub-components gets destroyed. */ - destroy?(e: DestroyEventArgs): void; + /** Specifies mapping name to include required fields in Gantt + */ + field?: string; - /** Triggers while the appointment is being dragged over the work cells. */ - drag?(e: DragEventArgs): void; + /** Specifies editType of fields to be included in the add dialog in Gantt + */ + editType?: string; + } - /** Triggers when the appointment dragging begins. */ - dragStart?(e: DragStartEventArgs): void; + export interface DragTooltip { - /** Triggers when the appointment is dropped. */ - dragStop?(e: DragStopEventArgs): void; + /** Specifies option to enable/disable tooltip while drag and drop a row. + * @Default {true} + */ + showTooltip?: boolean; - /** Triggers after the menu/sub-menu items within the context menu is clicked. */ - menuItemClick?(e: MenuItemClickEventArgs): void; + /** Specifies the data source fields to be displayed in the drag tooltip. + * @Default {[]} + */ + tooltipItems?: any[]; + + /** Specifies the custom template for drag tooltip. + * @Default {null} + */ + tooltipTemplate?: string; + } + + export interface EditDialogField { + + /** Specifies mapping name to include required fields in Gantt + */ + field?: string; + + /** Specifies editType of fields to be included in the edit dialog in Gantt + */ + editType?: string; + } + + export interface SplitterSettings { + + /** Specifies position of the splitter in Gantt , splitter can be placed either based on percentage values or pixel values. + */ + position?: string; + + /** Specifies the position of splitter in Gantt, based on column index in Gantt. + */ + index?: string; + } + + export interface EditSettings { + + /** Enables or disables add record icon in Gantt toolbar + * @Default {false} + */ + allowAdding?: boolean; + + /** Enables or disables delete icon in Gantt toolbar + * @Default {false} + */ + allowDeleting?: boolean; + + /** Specifies the option for enabling or disabling editing in Gantt grid part + * @Default {false} + */ + allowEditing?: boolean; + + /** Specifies the option for enabling or disabling indent action in Gantt. + * @Default {false} + */ + allowIndent?: boolean; + + /** Specifies the option for enabling or disabling outdent action in Gantt + * @Default {false} + */ + allowOutdent?: boolean; + + /** Specifies the mouse action whether single click or double click to begin the editing + * @Default {ej.Gantt.BeginEditAction.DblClick} + */ + beginEditAction?: ej.Gantt.BeginEditAction|string; + + /** Specifies the edit mode in Gantt, "normal" is for dialog editing ,"cellEditing" is for cell type editing + * @Default {normal} + */ + editMode?: string; + + /** Specifies the position where the new row has to be added. + * @Default {ej.Gantt.RowPosition.BelowSelectedRow} + */ + rowPosition?: ej.Gantt.RowPosition|string; + } + + export interface Holiday { + + /** Specifies holiday date to be displayed in Gantt + */ + day?: string; + + /** Specifies the background color for holiday date in Gantt Schedule + */ + background?: string; + + /** Specifies the label to be displayed for rendered holiday in Gantt + */ + label?: string; + } + + export interface ScheduleHeaderSettings { + + /** Specified the format for day view in schedule header + */ + dayHeaderFormat?: string; + + /** Specified the format for Hour view in schedule header + * @Default {HH} + */ + hourHeaderFormat?: string; + + /** Specifies the number of minutes per interval + * @Default {ej.Gantt.minutesPerInterval.Auto} + */ + minutesPerInterval?: ej.Gantt.minutesPerInterval|string; + + /** Specified the format for month view in schedule header + * @Default {MMM} + */ + monthHeaderFormat?: string; + + /** Specifies the schedule mode + * @Default {ej.Gantt.ScheduleHeaderType.Week} + */ + scheduleHeaderType?: ej.Gantt.ScheduleHeaderType|string; + + /** Specifies the round-off mode for the start date in schedule header. + * @Default {ej.Gantt.TimescaleRoundMode.Auto} + */ + timescaleStartDateMode?: ej.Gantt.TimescaleRoundMode|string; + + /** Specified the background for weekends in Gantt + * @Default {#F2F2F2} + */ + weekendBackground?: string; + + /** Specified the format for week view in schedule header + * @Default {MMM dd , yyyy} + */ + weekHeaderFormat?: string; + + /** Specified the format for year view in schedule header + * @Default {yyyy} + */ + yearHeaderFormat?: string; + + /** Specifies the size of the lowest time unit along the timescale, with minimum value as "50%" and maximum value as "500%". It is also possible to set the value + * in pixels. + * @Default {100%} + */ + timescaleUnitSize?: string; + + /** Specifies the start day of the week in week timescale mode + * @Default {0} + */ + weekStartDay?: number; + } + + export interface SizeSettings { + + /** Specifies the height of Gantt control + */ + height?: string; + + /** Specifies the width of Gantt control + */ + width?: string; + } - /** Triggers after the Schedule view or date is navigated. */ - navigation?(e: NavigationEventArgs): void; + export interface SelectedCellIndex { - /** Triggers every time before the elements of the scheduler such as work cells, time cells or header cells and so on renders or re-renders on a page. */ - queryCellInfo?(e: QueryCellInfoEventArgs): void; + /** Specifies the row index of the cell to be selected Gantt control + */ + rowIndex?: number; - /** Triggers when the reminder is raised for an appointment based on the alertBefore value. */ - reminder?(e: ReminderEventArgs): void; + /** Specifies the cell index to be selected in the row. + * @Default { } + */ + cellIndex?: number; + } - /** Triggers while resizing the appointment. */ - resize?(e: ResizeEventArgs): void; + export interface SortSettingsSortedColumn { - /** Triggers when the appointment resizing begins. */ - resizeStart?(e: ResizeStartEventArgs): void; + /** Specifies the field to be sorted in Gantt + */ + field?: string; - /** Triggers when an appointment resizing stops. */ - resizeStop?(e: ResizeStopEventArgs): void; + /** Specifies the sort direction in Gantt + */ + direction?: string; + } - /** Triggers when the overflow button is clicked. */ - overflowButtonClick?(e: OverflowButtonClickEventArgs): void; + export interface SortSettings { - /** Triggers while mouse hovering on the overflow button. */ - overflowButtonHover?(e: OverflowButtonHoverEventArgs): void; + /** Specifies the sorted columns for Gantt + * @Default {[]} + */ + sortedColumns?: SortSettingsSortedColumn[]; + } - /** Triggers when any of the keyboard keys are pressed. */ - keyDown?(e: KeyDownEventArgs): void; + export interface StripLine { - /** Triggers after the new appointment is saved. */ - appointmentCreated?(e: AppointmentCreatedEventArgs): void; + /** Specifies date to render striplines in Gantt + */ + day?: string; - /** Triggers after an existing appointment is edited. */ - appointmentChanged?(e: AppointmentChangedEventArgs): void; + /** Specifies label to be displayed for striplines in Gantt + */ + label?: string; - /** Triggers after the appointment is deleted. */ - appointmentRemoved?(e: AppointmentRemovedEventArgs): void; - } + /** Specifies line style for rendered striplines in Gantt + */ + lineStyle?: string; - export interface ActionBeginEventArgs { + /** Specifies the line color for rendered striplines in Gantt + */ + lineColor?: string; - /** Returns the current date value. - */ - currentDate?: any; + /** Specifies the width of the stripline in Gantt + */ + lineWidth?: string; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface ToolbarSettingsCustomToolbarItem { - /** Returns the current view value. - */ - currentView?: string; + /** Allows the user to insert the custom icons in toolbar using CSS class name selector. + */ + text?: string; - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + /** Allows the user to insert the custom icons in toolbar using script templates. Using this property we can bind HTML elements and other EJ controls to Gantt toolbar. + */ + templateID?: string; - /** Returns the action begin request type. - */ - requestType?: string; + /** Allows the user to display custom tooltip text for Gantt custom toolbar items. + */ + tooltipText?: string; + } - /** Returns the target of the click. - */ - target?: any; + export interface ToolbarSettings { - /** Returns the name of the event. - */ - type?: string; + /** Specifies the state of enabling or disabling toolbar + * @Default {true} + */ + showToolbar?: boolean; - /** Returns the save appointment value. - */ - data?: any; + /** Specifies the list of toolbar items to be rendered in Gantt toolbar + * @Default {[]} + */ + toolbarItems?: any[]; - /** Returns the id of delete appointment. - */ - id?: number; - } + /** Allows the user to insert custom toolbar items. + */ + customToolbarItems?: ToolbarSettingsCustomToolbarItem[]; + } - export interface ActionCompleteEventArgs { + enum DurationUnit { - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Sets the Duration Unit as day. + Day, - /** Returns the data about view change action. - */ - data?: any; + ///Sets the Duration Unit as hour. + Hour, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Sets the Duration Unit as minute. + Minute + } - /** Returns the action complete request type. - */ - requestType?: string; - /** Returns the name of the event. - */ - type?: string; + enum BeginEditAction { - /** Returns the appointment data dropped. - */ - appointment?: any; - } + ///you can begin the editing at double click + DblClick, - export interface AppointmentClickEventArgs { + ///you can begin the editing at single click + Click + } - /** Returns the object of appointmentClick event. - */ - object?: any; - /** Returns the clicked appointment object. - */ - appointment?: any; + enum RowPosition { - /** Returns the cancel option value. - */ - cancel?: boolean; + ///you can add a new row at top. + Top, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///you can add a new row at bottom. + Bottom, - /** Returns the name of the event. - */ - type?: string; - } + ///you can add a new row to above selected row. + AboveSelectedRow, - export interface BeforeAppointmentRemoveEventArgs { + ///you can add a new row to below selected row. + BelowSelectedRow, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///you can add a new row as a child for selected row. + Child + } - /** Returns the deleted appointment object. - */ - appointment?: any; - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + enum TaskType { - /** Returns the name of the Scheduler event. - */ - type?: string; - } + ///Resource unit remains constant while editing the work and duration values. + FixedUnit, - export interface BeforeAppointmentChangeEventArgs { + ///Work value of a task remains constant while editing duration and resource unit values. + FixedWork, - /** Returns the edited appointment object. - */ - appointment?: any; + ///Duration value remains constant while editing work and resource unit values. + FixedDuration + } - /** Returns the cancel option value. - */ - cancel?: boolean; - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + enum WorkUnit { - /** Returns the name of the Scheduler event. - */ - type?: string; - } + ///Displays the work involved in a task in days. + Day, - export interface AppointmentHoverEventArgs { + ///Displays the work involved in a task in hours. + Hour, - /** Returns the object of appointmentHover event. - */ - object?: any; + ///Displays the work involved in a task in minutes + Minute + } - /** Returns the hovered appointment object. - */ - appointment?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + enum TaskSchedulingMode { - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///All the tasks in the project will be displayed in auto scheduled mode, where the tasks are scheduled automatically over non-working days and holidays. + Auto, - /** Returns the name of the event. - */ - type?: string; - } + ///All the tasks in the project will be displayed in manually scheduled mode. + Manual, - export interface BeforeAppointmentCreateEventArgs { + ///Project consists of tasks with both auto and manually scheduled modes, based on the datasource values + Custom + } - /** Returns the appointment object. - */ - appointment?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + enum SelectionType { - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///you can select a single row. + Single, - /** Returns the name of the Scheduler event. - */ - type?: string; - } + ///you can select a multiple row. + Multiple + } - export interface AppointmentWindowOpenEventArgs { - /** returns the object of appointmentWindowOpen event while selecting the detail option from quick window or edit appointment or edit series option. - */ - object?: any; + enum minutesPerInterval { - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Sets the interval automatically according with schedule start and end date. + Auto, - /** Returns the end time of the double clicked cell. - */ - endTime?: any; + ///Sets one minute intervals per hour. + OneMinute, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Sets Five minute intervals per hour. + FiveMinutes, - /** Returns the action name that triggers window open. - */ - originalEventType?: string; + ///Sets fifteen minute intervals per hour. + FifteenMinutes, - /** Returns the start time of the double clicked cell. - */ - startTime?: any; + ///Sets thirty minute intervals per hour. + ThirtyMinutes + } - /** Returns the target of the double clicked cell. - */ - target?: any; - /** Returns the name of the event. - */ - type?: string; + enum ScheduleHeaderType { - /** Returns the edit appointment object. - */ - appointment?: any; + ///Sets year Schedule Mode. + Year, - /** Returns the edit occurrence option value. - */ - edit?: boolean; - } + ///Sets month Schedule Mode. + Month, - export interface BeforeContextMenuOpenEventArgs { + ///Sets week Schedule Mode. + Week, - /** Returns the object of beforeContextMenuOpen event. - */ - object?: any; + ///Sets day Schedule Mode. + Day, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Sets hour Schedule Mode. + Hour + } - /** Returns the current cell index value. - */ - cellIndex?: number; - /** Returns the current date value. - */ - currentDate?: any; + enum TimescaleRoundMode { - /** Returns the current resource details, when multiple resources are present, otherwise returns null. - */ - resources?: any; + ///The round-off value will be automatically calculated based on the data source values. + Auto, - /** Returns the current appointment details while opening the menu from appointment. - */ - appointment?: any; + ///Schedule header start date will round-off to the immediate week. + Week, - /** Returns the object of before opening menu target. - */ - events?: any; + ///Schedule headers start date will round off to the immediate month + Month, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Schedule headers start date will round off to the immediate year + Year + } - /** Returns the name of the event. - */ - type?: string; - } - export interface CellClickEventArgs { + enum SelectionMode { - /** Returns the object of cellClick event. - */ - object?: any; + ///you can select a row. + Row, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///you can select a cell. + Cell + } - /** Returns the end time of the clicked cell. - */ - endTime?: any; - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + enum workingTimeScale { - /** Returns the start time of the clicked cell. - */ - startTime?: any; + ///Sets eight hour timescale. + TimeScale8Hours, - /** Returns the target of the clicked cell. - */ - target?: any; + ///Sets twenty four hour timescale. + TimeScale24Hours + } - /** Returns the name of the event. - */ - type?: string; - } + } - export interface CellDoubleClickEventArgs { + class ReportViewer extends ej.Widget { + static fn: ReportViewer; + constructor(element: JQuery | Element, options?: ReportViewer.Model); + static Locale: any; + model: ReportViewer.Model; + defaults: ReportViewer.Model; - /** Returns the object of cellDoubleClick event. - */ - object?: any; + /** Export the report to the specified format. + * @returns {void} + */ + exportReport(): void; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Fit the report page to the container. + * @returns {void} + */ + fitToPage(): void; - /** Returns the end time of the double clicked cell. - */ - endTime?: any; + /** Fit the report page height to the container. + * @returns {void} + */ + fitToPageHeight(): void; - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + /** Fit the report page width to the container. + * @returns {void} + */ + fitToPageWidth(): void; - /** Returns the start time of the double clicked cell. - */ - startTime?: any; + /** Get the available datasets name of the rdlc report. + * @returns {void} + */ + getDataSetNames(): void; - /** Returns the target of the double clicked cell. - */ - target?: any; + /** Get the available parameters of the report. + * @returns {void} + */ + getParameters(): void; - /** Returns the name of the event. - */ - type?: string; - } + /** Navigate to first page of report. + * @returns {void} + */ + gotoFirstPage(): void; - export interface CellHoverEventArgs { + /** Navigate to last page of the report. + * @returns {void} + */ + gotoLastPage(): void; + + /** Navigate to next page from the current page. + * @returns {void} + */ + gotoNextPage(): void; + + /** Go to specific page index of the report. + * @returns {void} + */ + gotoPageIndex(): void; + + /** Navigate to previous page from the current page. + * @returns {void} + */ + gotoPreviousPage(): void; + + /** Print the report. + * @returns {void} + */ + print(): void; + + /** Apply print layout to the report. + * @returns {void} + */ + printLayout(): void; + + /** Refresh the report. + * @returns {void} + */ + refresh(): void; + } + export namespace ReportViewer { + + export interface Model { + + /** Gets or sets the list of data sources for the RDLC report. + * @Default {[]} + */ + dataSources?: DataSource[]; + + /** Enables or disables the page cache of report. + * @Default {false} + */ + enablePageCache?: boolean; + + /** Specifies the export settings. + */ + exportSettings?: ExportSettings; + + /** When set to true, adapts the report layout to fit the screen size of devices on which it renders. + * @Default {true} + */ + isResponsive?: boolean; + + /** Specifies the locale for report viewer. + * @Default {en-US} + */ + locale?: string; + + /** Specifies the page settings. + */ + pageSettings?: PageSettings; + + /** Gets or sets the list of parameters associated with the report. + * @Default {[]} + */ + parameters?: Parameter[]; + + /** Enables and disables the print mode. + * @Default {false} + */ + printMode?: boolean; + + /** Specifies the print option of the report. + * @Default {ej.ReportViewer.PrintOptions.Default} + */ + printOptions?: ej.ReportViewer.PrintOptions|string; + + /** Specifies the processing mode of the report. + * @Default {ej.ReportViewer.ProcessingMode.Remote} + */ + processingMode?: ej.ReportViewer.ProcessingMode|string; + + /** Specifies the render layout. + * @Default {ej.ReportViewer.RenderMode.Default} + */ + renderMode?: ej.ReportViewer.RenderMode|string; + + /** Gets or sets the path of the report file. + * @Default {empty} + */ + reportPath?: string; + + /** Gets or sets the reports server URL. + * @Default {empty} + */ + reportServerUrl?: string; + + /** Specifies the report Web API service URL. + * @Default {empty} + */ + reportServiceUrl?: string; + + /** Specifies the toolbar settings. + */ + toolbarSettings?: ToolbarSettings; + + /** Gets or sets the zoom factor for report viewer. + * @Default {1} + */ + zoomFactor?: number; + + /** Fires when the report viewer is destroyed successfully.If you want to perform any operation after destroying the reportviewer control,you can make use of the destroy event. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires during drill through action done in report.If you want to perform any operation when a drill through action is performed, you can make use of the drillThrough event. + */ + drillThrough?(e: DrillThroughEventArgs): void; + + /** Fires before report rendering is completed.If you want to perform any operation before the rendering of report,you can make use of the renderingBegin event. + */ + renderingBegin?(e: RenderingBeginEventArgs): void; + + /** Fires after report rendering completed.If you want to perform any operation after the rendering of report,you can make use of this renderingComplete event. + */ + renderingComplete?(e: RenderingCompleteEventArgs): void; + + /** Fires when any error occurred while rendering the report.If you want to perform any operation when an error occurs in the report, you can make use of the reportError event. + */ + reportError?(e: ReportErrorEventArgs): void; + + /** Fires when the report is being exported.If you want to perform any operation before exporting of report, you can make use of the reportExport event. + */ + reportExport?(e: ReportExportEventArgs): void; + + /** Fires when the report is loaded.If you want to perform any operation after the successful loading of report, you can make use of the reportLoaded event. + */ + reportLoaded?(e: ReportLoadedEventArgs): void; + + /** Fires when click the View Report Button. + */ + viewReportClick?(e: ViewReportClickEventArgs): void; + } + + export interface DestroyEventArgs { + + /** true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the report model. + */ + model?: any; + + /** returns the name of the event. + */ + type?: string; + } + + export interface DrillThroughEventArgs { - /** Returns the object of cellHover event. - */ - object?: any; + /** true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** returns the actionInfo's parameters bookmarkLink, hyperLink, reportName, parameters. + */ + actionInfo?: any; - /** Returns the index of the hovered cell. - */ - cellIndex?: any; + /** returns the report model. + */ + model?: any; - /** Returns the current date of the hovered cell. - */ - currentDate?: any; + /** returns the name of the event. + */ + type?: string; + } - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + export interface RenderingBeginEventArgs { - /** Returns the target of the clicked cell. - */ - target?: any; + /** true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the name of the event. - */ - type?: string; - } + /** returns the report model. + */ + model?: any; - export interface CreateEventArgs { + /** returns the name of the event. + */ + type?: string; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface RenderingCompleteEventArgs { - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + /** true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the name of the Scheduler event. - */ - type?: string; - } + /** returns the report model. + */ + model?: any; - export interface DestroyEventArgs { + /** returns the name of the event. + */ + type?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** returns the collection of parameters. + */ + reportParameters?: any; + } - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + export interface ReportErrorEventArgs { - /** Returns the name of the Scheduler event. - */ - type?: string; - } + /** true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface DragEventArgs { + /** returns the error details. + */ + error?: string; - /** Returns the object of dragOver event. - */ - object?: any; + /** returns the report model. + */ + model?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** returns the name of the event. + */ + type?: string; + } - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + export interface ReportExportEventArgs { - /** Returns the target of the drag over appointment. - */ - target?: any; + /** true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the name of the event. - */ - type?: string; - } + /** returns the report model. + */ + model?: any; - export interface DragStartEventArgs { + /** returns the name of the event. + */ + type?: string; + } - /** Returns the object of dragStart event. - */ - object?: any; + export interface ReportLoadedEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + /** returns the report model. + */ + model?: any; - /** Returns the target of the dragging appointment. - */ - target?: any; + /** returns the name of the event. + */ + type?: string; + } - /** Returns the name of the event. - */ - type?: string; - } + export interface ViewReportClickEventArgs { + + /** true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the parameter collection. + */ + parameters?: any; + + /** returns the report model. + */ + model?: any; + + /** returns the name of the event. + */ + type?: string; + } + + export interface DataSource { + + /** Gets or sets the name of the data source. + * @Default {empty} + */ + name?: string; + + /** Gets or sets the values of data source. + * @Default {[]} + */ + values?: any[]; + } - export interface DragStopEventArgs { + export interface ExportSettings { - /** Returns the object of dragDrop event. - */ - object?: any; + /** Specifies the export formats. + * @Default {ej.ReportViewer.ExportOptions.All} + */ + exportOptions?: ej.ReportViewer.ExportOptions|string; - /** Returns the dropped appointment object. - */ - appointment?: any; + /** Specifies the excel export format. + * @Default {ej.ReportViewer.ExcelFormats.Excel97to2003} + */ + excelFormat?: ej.ReportViewer.ExcelFormats|string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Specifies the word export format. + * @Default {ej.ReportViewer.WordFormats.Doc} + */ + wordFormat?: ej.ReportViewer.WordFormats|string; + } - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + export interface PageSettings { - /** Returns the name of the event. - */ - type?: string; - } + /** Specifies the print layout orientation. + * @Default {null} + */ + orientation?: ej.ReportViewer.Orientation|string; - export interface MenuItemClickEventArgs { + /** Specifies the paper size of print layout. + * @Default {null} + */ + paperSize?: ej.ReportViewer.PaperSize|string; + } - /** Returns the object of menuItemClick event. - */ - object?: any; + export interface Parameter { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Gets or sets the parameter labels. + * @Default {null} + */ + labels?: any[]; - /** Returns the object of menu item event. - */ - events?: any; + /** Gets or sets the name of the parameter. + * @Default {empty} + */ + name?: string; - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + /** Gets or sets whether the parameter allows nullable value or not. + * @Default {false} + */ + nullable?: boolean; - /** Returns the name of the event. - */ - type?: string; - } + /** Gets or sets the prompt message associated with the specified parameter. + * @Default {empty} + */ + prompt?: string; - export interface NavigationEventArgs { + /** Gets or sets the parameter values. + * @Default {[]} + */ + values?: any[]; + } - /** Returns the current date object. - */ - currentDate?: any; + export interface ToolbarSettings { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Fires when user click on toolbar item in the toolbar. + * @Default {empty} + */ + click?: string; - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + /** Specifies the toolbar items. + * @Default {ej.ReportViewer.ToolbarItems.All} + */ + items?: ej.ReportViewer.ToolbarItems|string; - /** Returns the current view value. - */ - currentView?: string; + /** Shows or hides the toolbar. + * @Default {true} + */ + showToolbar?: boolean; - /** Returns the previous view value. - */ - previousView?: string; + /** Shows or hides the tooltip of toolbar items. + * @Default {true} + */ + showTooltip?: boolean; - /** Returns the target of the action. - */ - target?: any; + /** Specifies the toolbar template ID. + * @Default {empty} + */ + templateId?: string; + } - /** Returns the name of the event. - */ - type?: string; + enum ExportOptions { - /** Returns the previous date of the Schedule. - */ - previousDate?: any; - } + ///Specifies the All property in ExportOptions to get all available options. + All, - export interface QueryCellInfoEventArgs { + ///Specifies the PDF property in ExportOptions to get PDF option. + PDF, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Specifies the Word property in ExportOptions to get Word option. + Word, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Specifies the Excel property in ExportOptions to get Excel option. + Excel, - /** Returns the current appointment data. - */ - appointment?: any; + ///Specifies the HTML property in ExportOptions to get HTML option. + HTML + } - /** Returns the currently rendering DOM element. - */ - element?: any; - /** Returns the name of the currently rendering element on the scheduler. - */ - requestType?: string; + enum ExcelFormats { - /** Returns the cell type which is currently rendering on the Scheduler. - */ - cellType?: string; + ///Specifies the Excel97to2003 property in ExcelFormats to get specified version of exported format. + Excel97to2003, - /** Returns the start date of the currently rendering appointment. - */ - currentAppointmentDate?: any; + ///Specifies the Excel2007 property in ExcelFormats to get specified version of exported format. + Excel2007, - /** Returns the currently rendering cell information. - */ - cell?: any; + ///Specifies the Excel2010 property in ExcelFormats to get specified version of exported format. + Excel2010, - /** Returns the currently rendering resource details. - */ - resource?: any; + ///Specifies the Excel2013 property in ExcelFormats to get specified version of exported format. + Excel2013 + } - /** Returns the currently rendering date information. - */ - currentDay?: any; - } - export interface ReminderEventArgs { + enum WordFormats { - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Specifies the Doc property in WordFormats to get specified version of exported format. + Doc, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Specifies the Dot property in WordFormats to get specified version of exported format. + Dot, - /** Returns the name of the event. - */ - type?: string; + ///Specifies the DOCX property in WordFormats to get specified version of exported format. + DOCX, - /** Returns the appointment object for which the reminder is raised. - */ - reminderAppointment?: any; - } + ///Specifies the Word2007 property in WordFormats to get specified version of exported format. + Word2007, - export interface ResizeEventArgs { + ///Specifies the Word2010 property in WordFormats to get specified version of exported format. + Word2010, - /** Returns the object of resizing event. - */ - object?: any; + ///Specifies the Word2013 property in WordFormats to get specified version of exported format. + Word2013, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Specifies the Word2007Dotx property in WordFormats to get specified version of exported format. + Word2007Dotx, - /** Returns the resize element value. - */ - element?: any; + ///Specifies the Word2010Dotx property in WordFormats to get specified version of exported format. + Word2010Dotx, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Specifies the Word2013Dotx property in WordFormats to get specified version of exported format. + Word2013Dotx, - /** Returns the name of the event. - */ - type?: string; - } + ///Specifies the Word2007Docm property in WordFormats to get specified version of exported format. + Word2007Docm, - export interface ResizeStartEventArgs { + ///Specifies the Word2010Docm property in WordFormats to get specified version of exported format. + Word2010Docm, - /** Returns the object of resizeStart event. - */ - object?: any; + ///Specifies the Word2013Docm property in WordFormats to get specified version of exported format. + Word2013Docm, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Specifies the Word2007Dotm property in WordFormats to get specified version of exported format. + Word2007Dotm, - /** Returns the resize element value. - */ - element?: any; + ///Specifies the Word2010Dotm property in WordFormats to get specified version of exported format. + Word2010Dotm, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Specifies the Word2013Dotm property in WordFormats to get specified version of exported format. + Word2013Dotm, - /** Returns the name of the event. - */ - type?: string; - } + ///Specifies the RTF property in WordFormats to get specified version of exported format. + RTF, - export interface ResizeStopEventArgs { + ///Specifies the Txt property in WordFormats to get specified version of exported format. + Txt, - /** Returns the object of resizeStop event. - */ - object?: any; + ///Specifies the EPUB property in WordFormats to get specified version of exported format. + EPUB, - /** Returns the resized appointment value. - */ - appointment?: any; + ///Specifies the HTML property in WordFormats to get specified version of exported format. + HTML, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Specifies the XML property in WordFormats to get specified version of exported format. + XML, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Specifies the Automatic property in WordFormats to get specified version of exported format. + Automatic + } - /** Returns the target of the resized appointment. - */ - target?: any; - /** Returns the name of the event. - */ - type?: string; - } + enum Orientation { - export interface OverflowButtonClickEventArgs { + ///Specifies the Landscape property in pageSettings.orientation to get specified layout. + Landscape, - /** Returns the object consisting of start time, end time and resource value of the underlying cell on which the clicked overflow button is present. - */ - object?: any; + ///Specifies the portrait property in pageSettings.orientation to get specified layout. + Portrait + } - /** Returns the cancel option value. - */ - cancel?: boolean; - /** Returns the object of menu item event. - */ - events?: any; + enum PaperSize { - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Specifies the A3 as value in pageSettings.paperSize to get specified size. + A3, - /** Returns the name of the event. - */ - type?: string; - } + ///Specifies the A4 as value in pageSettings.paperSize to get specified size. + Portrait, - export interface OverflowButtonHoverEventArgs { + ///Specifies the B4(JIS) as value in pageSettings.paperSize to get specified size. + B4_JIS, - /** Returns the object consisting of start time, end time and resource value of the underlying cell on which the overflow button is currently hovered. - */ - object?: any; + ///Specifies the B5(JIS) as value in pageSettings.paperSize to get specified size. + B5_JIS, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Specifies the Envelope #10 as value in pageSettings.paperSize to get specified size. + Envelope_10, - /** Returns the object of menu item event. - */ - events?: any; + ///Specifies the Envelope as value in pageSettings.paperSize to get specified size. + Envelope_Monarch, - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; + ///Specifies the Executive as value in pageSettings.paperSize to get specified size. + Executive, - /** Returns the name of the event. - */ - type?: string; - } + ///Specifies the Legal as value in pageSettings.paperSize to get specified size. + Legal, - export interface KeyDownEventArgs { + ///Specifies the Letter as value in pageSettings.paperSize to get specified size. + Letter, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Specifies the Tabloid as value in pageSettings.paperSize to get specified size. + Tabloid, - /** Returns the object of menu item event. - */ - events?: any; + ///Specifies the Custom as value in pageSettings.paperSize to get specified size. + Custom + } - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; - /** Returns the name of the event. - */ - type?: string; - } + enum PrintOptions { - export interface AppointmentCreatedEventArgs { + ///Specifies the Default property in printOptions. + Default, - /** Returns the appointment object. - */ - appointment?: any; + ///Specifies the NewTab property in printOptions. + NewTab, - /** Returns the cancel option value. - */ - cancel?: boolean; + ///Specifies the None property in printOptions. + None + } - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; - /** Returns the name of the Scheduler event. - */ - type?: string; - } - - export interface AppointmentChangedEventArgs { - - /** Returns the edited appointment object. - */ - appointment?: any; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; - - /** Returns the name of the Scheduler event. - */ - type?: string; - } - - export interface AppointmentRemovedEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the deleted appointment object. - */ - appointment?: any; - - /** Returns the Schedule model. - */ - model?: ej.Schedule.Model; - - /** Returns the name of the Scheduler event. - */ - type?: string; - } - - export interface AppointmentSettings { - - /** The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule appointments. - * @Default {[]} - */ - dataSource?: any | any[]; - - /** It holds either the ej.Query() object or simply the query string that retrieves the specified records from the table. - * @Default {null} - */ - query?: string; - - /** Assign the table name from where the records are to be fetched for the Schedule. - * @Default {null} - */ - tableName?: string; - - /** When set to false, doesn't consider the time difference offset calculation on appointment time. - * @Default {true} - */ - applyTimeOffset?: boolean; - - /** Binds the id field name in dataSource to the id of Schedule appointments. It denotes the unique id assigned to appointments. - * @Default {null} - */ - id?: string; - - /** Binds the name of startTime field in the dataSource with start time of the Schedule appointments. It indicates the date and Time when Schedule appointment actually starts. - * @Default {null} - */ - startTime?: string; - - /** Binds the name of endTime field in dataSource with the end time of Schedule appointments. It indicates the date and time when Schedule appointment actually ends. - * @Default {null} - */ - endTime?: string; - - /** Binds the name of subject field in the dataSource to appointment Subject. Indicates the Subject or title that gets displayed on Schedule appointments. - * @Default {null} - */ - subject?: string; - - /** Binds the description field name in dataSource. It indicates the appointment description. - * @Default {null} - */ - description?: string; - - /** Binds the name of recurrence field in dataSource. It indicates whether the appointment is a recurrence appointment or not. - * @Default {null} - */ - recurrence?: string; - - /** Binds the name of recurrenceRule field in dataSource. It indicates the recurrence pattern associated with appointments. - * @Default {null} - */ - recurrenceRule?: string; - - /** Binds the name of allDay field in dataSource. It indicates whether the appointment is an all-day appointment or not. - * @Default {null} - */ - allDay?: string; - - /** Binds one or more fields in resource collection dataSource. It maps the resource field names with appointments denoting the resource of appointments actually belongs. - * @Default {null} - */ - resourceFields?: string; - - /** Binds the name of categorize field in dataSource. It indicates the categorize value, red categorize, green, yellow and so on applied to the appointments. - * @Default {null} - */ - categorize?: string; - - /** Binds the name of location field in dataSource. It indicates the appointment location. - * @Default {null} - */ - location?: string; - - /** Binds the name of the priority field in dataSource. It indicates the priority, high, low, medium and none of the appointments. - * @Default {null} - */ - priority?: string; - - /** Binds the name of start timezone field in dataSource. It indicates the timezone of appointment start date. When startTimeZone field is not mentioned, - * the appointment uses the Schedule timeZone or System timeZone. - * @Default {null} - */ - startTimeZone?: string; - - /** Binds the name of end timezone field in dataSource. It indicates the timezone of appointment end date. When the endTimeZone field is not mentioned, - * the appointment uses the Schedule timeZone or System timeZone. - * @Default {null} - */ - endTimeZone?: string; - } - - export interface CategorizeSettings { - - /** When set to true, enables the multiple selection of categories to be applied for the appointments. - * @Default {false} - */ - allowMultiple?: boolean; - - /** When set to true, enables the categories option to be applied for the appointments. - * @Default {false} - */ - enable?: boolean; - - /** The dataSource option accepts either the JSON object collection or DataManager [ej.DataManager] instance that contains the categorize data. - */ - dataSource?: any[] | any; - - /** Binds id field name in the dataSource to id of category data. - * @Default {id} - */ - id?: string; - - /** Binds text field name in the dataSource to category text. - * @Default {text} - */ - text?: string; - - /** Binds color field name in the dataSource to category color. - * @Default {color} - */ - color?: string; - - /** Binds fontColor field name in the dataSource to category font. - * @Default {fontColor} - */ - fontColor?: string; - } - - export interface ContextMenuSettingsMenuItems { - - /** All the appointment related context menu items are grouped under this appointment menu collection. - */ - appointment?: any[]; - - /** All the Scheduler cell related context menu items are grouped under this cells menu item collection. - */ - cells?: any[]; - } - - export interface ContextMenuSettings { - - /** When set to true, enables the context menu options available for the Schedule cells and appointments. - * @Default {false} - */ - enable?: boolean; - - /** Contains all the default context menu options that are applicable for both Schedule cells and appointments. It also supports adding custom menu items to cells or appointment collection. - */ - menuItems?: ContextMenuSettingsMenuItems; - } - - export interface Group { - - /** Holds the array of resource names to be grouped on the Schedule. - */ - resources?: any[]; - } - - export interface WorkHours { - - /** When set to true, highlights the work hours of the Schedule. - * @Default {true} - */ - highlight?: boolean; - - /** Sets the start time to depict the start of working or business hour in a day. - * @Default {9} - */ - start?: number; - - /** Sets the end time to depict the end of working or business hour in a day. - * @Default {18} - */ - end?: number; - } - - export interface PrioritySettings { - - /** When set to true, enables the priority options available for the Schedule appointments. - * @Default {false} - */ - enable?: boolean; - - /** The dataSource option can accept the JSON object collection that contains the priority related data. - * @Default {{% highlight js%}[{ text: None, value: none },{ text: High, value: high },{ text: Medium, value: medium },{ text: Low, value: low }]{% endhighlight %}} - */ - dataSource?: any | any[]; - - /** Binds text field name in the dataSource to prioritySettings text. These text gets listed out in priority field of the appointment window. - * @Default {text} - */ - text?: string; - - /** Binds value field name in the dataSource to prioritySettings value. These field names usually accepts four priority values by default, high, low, medium and none. - * @Default {value} - */ - value?: string; - - /** Allows priority field customization in the appointment window to add custom icons denoting the priority level for the appointments. - * @Default {null} - */ - template?: string; - } - - export interface ReminderSettings { - - /** When set to true, enables the reminder option available for the Schedule appointments. - * @Default {false} - */ - enable?: boolean; - - /** Sets the timing, when the reminders are to be alerted for the Schedule appointments. - * @Default {5} - */ - alertBefore?: number; - } - - export interface RenderDates { - - /** Sets the start of custom date range to be rendered in the Schedule. - * @Default {null} - */ - start?: any; - - /** Sets the end limit of the custom date range. - * @Default {null} - */ - end?: any; - } - - export interface ResourcesResourceSettings { - - /** The dataSource option accepts either JSON object collection or DataManager (ejDataManager) instance that contains the resources related data. - * @Default {[]} - */ - dataSource?: any | any[]; - - /** Binds text field name in the dataSource to resourceSettings text. These text gets listed out in resources field of the appointment window. - * @Default {null} - */ - text?: string; - - /** Binds id field name in the dataSource to resourceSettings id. - * @Default {null} - */ - id?: string; - - /** Binds groupId field name in the dataSource to resourceSettings groupId. - * @Default {null} - */ - groupId?: string; - - /** Binds color field name in the dataSource to resourceSettings color. The color specified here gets applied to the Schedule appointments denoting to the resource it belongs. - * @Default {null} - */ - color?: string; - - /** Binds the starting work hour field name in the dataSource. It's optional, but providing it with some numeric value will set the starting work hour for specific resources. - * @Default {null} - */ - start?: string; - - /** Binds the end work hour field name in the dataSource. It's optional, but providing it with some numeric value will set the end work hour for specific resources. - * @Default {null} - */ - end?: string; - - /** Binds the resources working days field name in the dataSource. It's optional, and accepts the array of strings (week day names). When provided with specific collection of - * days (array of day names), only those days will render for the specific resources. - * @Default {null} - */ - workWeek?: string; - - /** Binds appointmentClass field name in the dataSource. It applies custom CSS class name to appointments depicting to the resource it belongs. - * @Default {null} - */ - appointmentClass?: string; - } - - export interface Resource { - - /** It holds the name of the resource field to be bound to the Schedule appointments that contains the resource Id. - * @Default {null} - */ - field?: string; - - /** It holds the title name of the resource field to be displayed on the Schedule appointment window. - * @Default {null} - */ - title?: string; - - /** A unique resource name that is used for differentiating various resource objects while grouping it in various levels. - * @Default {null} - */ - name?: string; - - /** When set to true, allows multiple selection of resource names, thus creating multiple instances of same appointment for the selected resources. - * @Default {false} - */ - allowMultiple?: boolean; - - /** It holds the field names of the resources to be bound to the Schedule and also the dataSource. - */ - resourceSettings?: ResourcesResourceSettings; - } - - export interface TimeZoneCollection { - - /** Sets the collection of timezone items to the dataSource that accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule timezones. - */ - dataSource?: any; - - /** Binds text field name in the dataSource to timeZoneCollection text. These text gets listed out in the timezone fields of the appointment window. - * @Default {text} - */ - text?: string; - - /** Binds id field name in the dataSource to timeZoneCollection id. - * @Default {id} - */ - id?: string; - - /** Binds value field name in the dataSource to timeZoneCollection value. - * @Default {value} - */ - value?: string; - } - - export interface AgendaViewSettings { - - /** You can display the summary of multiple week's appointment by setting this value. - * @Default {7} - */ - daysInAgenda?: number; - - /** You can customize the Date column display based on the requirement. - * @Default {null} - */ - dateColumnTemplateId?: string; - - /** You can customize the time column display based on the requirement. - * @Default {null} - */ - timeColumnTemplateId?: string; - } - - export interface TooltipSettings { - - /** Enables or disables the tooltip display. - * @Default {false} - */ - enable?: boolean; - - /** Template design that customizes the tooltip. All the field names that are mapped from dataSource to the appropriate field properties within - * the appointmentSettings can be accessed within the template. - * @Default {null} - */ - templateId?: string; - } - - export interface TimeScale { - - /** When set to true, displays the time slots on the Scheduler. - * @Default {true} - */ - enable?: boolean; - - /** When set with some specific value, defines the number of time divisions split per hour(as per value given for the majorTimeSlot). Those time divisions are meant to be the minor slots. - * @Default {2} - */ - minorSlotCount?: number; - - /** Accepts the value in minutes. When provided with specific value, displays the appropriate time interval on the Scheduler - * @Default {60} - */ - majorSlot?: number; - - /** Template design that customizes the timecells (minor slots) that are partitioned based on minorSlotCount. Accepts id value of the template defined for minor time slots. - * @Default {null} - */ - minorSlotTemplateId?: string; - - /** Template design that customizes the timecells (major slots). Accepts id value of the template defined for major time slots. - * @Default {null} - */ - majorSlotTemplateId?: string; - } - - export interface BlockoutSettings { - - /** When set to true, enables the blockout option to be applied on the Scheduler cells. - * @Default {false} - */ - enable?: boolean; - - /** Template design that applies on the Schedule block intervals. All the field names that are mapped from dataSource to the appropriate field - * properties within the blockoutSettings can be used within the template. - * @Default {null} - */ - templateId?: string; + enum ProcessingMode { - /** The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule block intervals. - * @Default {[]} - */ - dataSource?: any | any[]; - - /** It holds either the ej.Query() object or simply the query string that retrieves the specified records from the table. - * @Default {null} - */ - query?: string; - - /** Assign the table name from where the records are to be fetched for the Schedule. - * @Default {null} - */ - tableName?: string; - - /** Binds the id field name in dataSource to the id of block time interval. It denotes the unique id assigned to each of the block records. - * @Default {null} - */ - id?: string; - - /** Binds the name of startTime field in the dataSource with start time of block time interval. It indicates the date and time, when the block interval actually starts in the Scheduler. - * @Default {null} - */ - startTime?: string; - - /** Binds the name of endTime field in dataSource with the end time of block time interval. It indicates the date and time, when the block interval actually ends in the Scheduler. - * @Default {null} - */ - endTime?: string; - - /** Binds the name of subject field in the dataSource to block time Subject. Indicates the Subject or title that gets displayed on the Schedule block intervals. - * @Default {null} - */ - subject?: string; - - /** Binds the name of isBlockAppointment field in dataSource. When set to true, disables the appointments that lies on the blocked area and restrict to perform CRUD operations in it. - * @Default {null} - */ - isBlockAppointment?: string; - - /** Binds the name of isAllDay field in dataSource. It indicates whether an entire day is blocked or not. - * @Default {null} - */ - isAllDay?: string; - - /** Binds the name of resourceId field in dataSource. Specifies the id of the resources, to which the time intervals are needed to be blocked. - * @Default {null} - */ - resourceId?: string; - - /** Binds the name of customStyle field in dataSource. It applies the custom CSS to the block intervals. - * @Default {null} - */ - customStyle?: string; - } - - enum CurrentView { - - ///Sets currentView of the Scheduler as Day - Day, - - ///Sets currentView of the Scheduler as Week - Week, - - ///Sets currentView of the Scheduler as WorkWeek - Workweek, - - ///Sets currentView of the Scheduler as Month - Month, - - ///Sets currentView of the Scheduler as Agenda - Agenda, - - ///Sets currentView of the Scheduler as CustomView with user-specified date range. - CustomView - } - - - enum Orientation { - - ///Set orientation as vertical to Scheduler - Vertical, - - ///Set orientation as horizontal to Scheduler - Horizontal - } - - - enum TimeMode { - - ///Sets 12 hour time mode to Scheduler - Hour12, - - ///Sets 24 hour time mode to Scheduler - Hour24 - } - - } - - class RecurrenceEditor extends ej.Widget { - static fn: RecurrenceEditor; - constructor(element: JQuery | Element, options?: RecurrenceEditor.Model); - static Locale: any; - model: RecurrenceEditor.Model; - defaults: RecurrenceEditor.Model; - - /** Generates the recurrence rule with the options selected within the Recurrence Editor. - * @returns {String} - */ - getRecurrenceRule(): string; - - /** Generates the collection of date, that lies within the selected recurrence start and end date for which the recurrence pattern applies. - * @param {string} It refers the recurrence rule. - * @param {any} It refers the start date of the recurrence. - * @returns {any} - */ - recurrenceDateGenerator(recurrenceString: string, startDate: any): any; - - /** It splits and returns the recurrence rule string into object collection. - * @param {string} It refers the recurrence rule string. - * @param {any} It refers the appointment dates (ExDate) to be excluded - * @returns {any} - */ - recurrenceRuleSplit(recurrenceRule: string, exDate: any): any; - } - export namespace RecurrenceEditor { - - export interface Model { - - /** Defines the collection of recurrence frequencies within Recurrence Editor such as Never, Daily, Weekly, Monthly, Yearly and Every Weekday. - * @Default {[never, daily, weekly, monthly, yearly, everyweekday]} - */ - frequencies?: any[]; - - /** Sets the starting day of the week. - * @Default {null} - */ - firstDayOfWeek?: string; - - /** When set to true, enables the spin button of numeric textboxes within the Recurrence Editor. - * @Default {true} - */ - enableSpinners?: boolean; - - /** Sets the start date of the recurrence. The Recurrence Editor initially displays the current date as its start date. - * @Default {new Date()} - */ - startDate?: any; - - /** Sets the specific culture to the Recurrence Editor. - * @Default {en-US} - */ - locale?: string; - - /** Sets the date format for the datepickers available within the Recurrence Editor. - */ - dateFormat?: string; - - /** When set to true, renders the Recurrence Editor options from Right-to-Left direction. - * @Default {false} - */ - enableRTL?: boolean; - - /** Sets the active/current repeat type(frequency) on Recurrence Editor based on the index value provided. For example, setting the value 1 will initially set the repeat type - * as Daily and display its related options. - * @Default {0} - */ - selectedRecurrenceType?: number; - - /** Sets the minimum date limit to display on the datepickers defined within the Recurrence Editor. Setting minDate with specific date value disallows the datepickers within - * Recurrence Editor to navigate beyond that date. - * @Default {new Date(1900, 01, 01)} - */ - minDate?: any; - - /** Sets the maximum date limit to display on the datepickers used within the Recurrence Editor. Setting maxDate with specific date value disallows the - * datepickers within the Recurrence Editor to navigate beyond that date. - * @Default {new Date(2099, 12, 31)} - */ - maxDate?: any; - - /** Accepts the custom CSS class name, that defines user-defined styles and themes to be applied on partial or complete elements of the Recurrence Editor. - */ - cssClass?: string; - - /** Triggers whenever any of the Recurrence Editor's value is changed. */ - change?(e: ChangeEventArgs): void; - } - - export interface ChangeEventArgs { - - /** When set to true, event gets canceled. - */ - cancel?: boolean; - - /** Returns the Recurrence Editor model - */ - model?: ej.RecurrenceEditor.Model; - - /** Returns the name of the event - */ - type?: string; - - /** Returns the recurrence rule value. - */ - recurrenceRule?: string; - } - } - - class Gantt extends ej.Widget { - static fn: Gantt; - constructor(element: JQuery | Element, options?: Gantt.Model); - static Locale: any; - model: Gantt.Model; - defaults: Gantt.Model; - - /** To add a new item in Gantt - * @param {any} Item to add in Gantt row. - * @param {string} Defines in which position the row wants to add - * @returns {void} - */ - addRecord(data: any, rowPosition: string): void; - - /** To select cell based on the cell and row index dynamically. - * @param {Array} array of cell indexes to be select - * @param {boolean} Defines that we need to preserve the previously selected cells of not - * @returns {void} - */ - selectCells(Indexes: any[], preservePreviousSelectedCell: boolean): void; - - /** Positions the splitter by the specified column index. - * @param {number} Set the splitter position based on column index. - * @returns {void} - */ - setSplitterIndex(index: number): void; - - /** To cancel the edited state of an item in Gantt - * @returns {void} - */ - cancelEdit(): void; - - /** To collapse all the parent items in Gantt - * @returns {void} - */ - collapseAllItems(): void; - - /** To delete a selected item in Gantt - * @returns {void} - */ - deleteItem(): void; - - /** destroy the Gantt widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** To Expand all the parent items in Gantt - * @returns {void} - */ - expandAllItems(): void; - - /** To expand and collapse an item in Gantt using item's ID - * @param {number} Expand or Collapse a record based on task id. - * @returns {void} - */ - expandCollapseRecord(taskId: number): void; - - /** To hide the column by using header text - * @param {string} you can pass a header text of a column to hide - * @returns {void} - */ - hideColumn(headerText: string): void; - - /** To indent a selected item in Gantt - * @returns {void} - */ - indentItem(): void; - - /** To Open the dialog to add new task to the Gantt - * @returns {void} - */ - openAddDialog(): void; - - /** To Open the dialog to edit existing task to the Gantt - * @returns {void} - */ - openEditDialog(): void; - - /** To outdent a selected item in Gantt - * @returns {void} - */ - outdentItem(): void; - - /** To save the edited state of an item in Gantt - * @returns {void} - */ - saveEdit(): void; - - /** To search an item with search string provided at the run time - * @param {string} you can pass a text to search in Gantt Control. - * @returns {void} - */ - searchItem(searchString: string): void; - - /** To set the grid width in Gantt - * @param {string} you can give either percentage or pixels value - * @returns {void} - */ - setSplitterPosition(width: string): void; - - /** To show the column by using header text - * @param {string} you can pass a header text of a column to show - * @returns {void} - */ - showColumn(headerText: string): void; - } - export namespace Gantt { - - export interface Model { - - /** Specifies the fields to be included in the add dialog in Gantt - * @Default {[]} - */ - addDialogFields?: any[]; - - /** Enables or disables the ability to resize column. - * @Default {false} - */ - allowColumnResize?: boolean; - - /** Enables or Disables Gantt chart editing in Gantt - * @Default {true} - */ - allowGanttChartEditing?: boolean; - - /** Enables or Disables Keyboard navigation in Gantt - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** Specifies enabling or disabling multiple sorting for Gantt columns - * @Default {false} - */ - allowMultiSorting?: boolean; - - /** Enables or disables the option for multiple exporting - * @Default {false} - */ - allowMultipleExporting?: boolean; - - /** Enables or disables the interactive selection of a row. - * @Default {true} - */ - allowSelection?: boolean; - - /** Enables or disables sorting. When enabled, we can sort the column by clicking on the column. - * @Default {false} - */ - allowSorting?: boolean; - - /** Enables or disables the ability to drag and drop the row interactively to reorder the rows - * @Default {false} - */ - allowDragAndDrop?: boolean; - - /** Enable or disable predecessor validation. When it is true, all the task's start and end dates are aligned based on its predecessors start and end dates. - * @Default {true} - */ - enablePredecessorValidation?: boolean; - - /** Specifies the baseline background color in Gantt - * @Default {#fba41c} - */ - baselineColor?: string; - - /** Specifies the mapping property path for baseline end date in datasource - */ - baselineEndDateMapping?: string; - - /** Specifies the mapping property path for baseline start date of a task in datasource - */ - baselineStartDateMapping?: string; - - /** Specifies the mapping property path for sub tasks in datasource - */ - childMapping?: string; - - /** To Specify the column fields to be displayed in the dialog while inserting a column using column menu. - * @Default {[]} - */ - columnDialogFields?: any[]; - - /** Specifies the background of connector lines in Gantt - */ - connectorLineBackground?: string; - - /** Specifies the width of the connector lines in Gantt - * @Default {1} - */ - connectorlineWidth?: number; - - /** Specify the CSS class for Gantt to achieve custom theme. - */ - cssClass?: string; - - /** Specifies the template for cell tooltip - * @Default {null} - */ - cellTooltipTemplate?: string; - - /** Option for customizing the drag tooltip while reordering the rows. - */ - dragTooltip?: DragTooltip; - - /** Collection of data or hierarchical data to represent in Gantt - * @Default {null} - */ - dataSource?: any[]; - - /** Specifies the dateFormat for Gantt , given format is displayed in tooltip , Grid . - * @Default {MM/dd/yyyy} - */ - dateFormat?: string; - - /** Specifies the mapping property path for duration of a task in datasource - */ - durationMapping?: string; - - /** Specifies the duration unit for each tasks whether days or hours or minutes - * @Default {ej.Gantt.DurationUnit.Day} - */ - durationUnit?: ej.Gantt.DurationUnit | string; - - /** Specifies the fields to be included in the edit dialog in Gantt - * @Default {[]} - */ - editDialogFields?: any[]; - - /** Enables or disables the responsiveness of Gantt - * @Default {false} - */ - isResponsive?: boolean; - - /** Option to configure the splitter position. - */ - splitterSettings?: SplitterSettings; - - /** Specifies the editSettings options in Gantt. - */ - editSettings?: EditSettings; - - /** Enables or Disables enableAltRow row effect in Gantt - * @Default {true} - */ - enableAltRow?: boolean; - - /** Enables/disables work breakdown structure column. - * @Default {false} - */ - enableWBS?: boolean; - - /** Enables/disables WBS predecessor column. - * @Default {false} - */ - enableWBSPredecessor?: boolean; - - /** Enables or disables the collapse all records when loading the Gantt. - * @Default {false} - */ - enableCollapseAll?: boolean; - - /** Specifies the data source field name to be displayed as left task label - */ - leftTaskLabelMapping?: string; - - /** Specifies the data source field name to be displayed as right task label - */ - rightTaskLabelMapping?: string; - - /** Specifies the template for left task label - */ - leftTaskLabelTemplate?: string; - - /** Specifies the template for right task label - */ - rightTaskLabelTemplate?: string; - - /** Enables or disables the contextmenu for Gantt , when enabled contextmenu appears on right clicking Gantt - * @Default {false} - */ - enableContextMenu?: boolean; - - /** Indicates whether we can edit the progress of a task interactively in Gantt. - * @Default {true} - */ - enableProgressBarResizing?: boolean; - - /** Enables or disables the option for dynamically updating the Gantt size on window resizing - * @Default {false} - */ - enableResize?: boolean; - - /** Enables or disables tooltip while editing (dragging/resizing) the taskbar. - * @Default {true} - */ - enableTaskbarDragTooltip?: boolean; - - /** Enables or disables tooltip for taskbar. - * @Default {true} - */ - enableTaskbarTooltip?: boolean; - - /** Enables/Disables virtualization for rendering Gantt items. - * @Default {false} - */ - enableVirtualization?: boolean; - - /** Specifies the mapping property path for end Date of a task in datasource - */ - endDateMapping?: string; - - /** Specifies whether to highlight the weekends in Gantt . - * @Default {true} - */ - highlightWeekends?: boolean; - - /** Collection of holidays with date, background and label information to be displayed in Gantt. - * @Default {[]} - */ - holidays?: any[]; - - /** Specifies whether to include weekends while calculating the duration of a task. - * @Default {true} - */ - includeWeekend?: boolean; - - /** Specify the locale for Gantt - * @Default {en-US} - */ - locale?: string; - - /** Specifies the mapping property path for milestone in datasource - */ - milestoneMapping?: string; - - /** Enables/disables the options for inserting , deleting and renaming columns. - * @Default {false} - */ - showColumnOptions?: boolean; - - /** Specifies the template for parent taskbar - */ - parentTaskbarTemplate?: string; - - /** Specifies the nature of a task for calculating the work, and it can fixed duration, fixed work and fixed resource unit - * @Default {ej.Gantt.TaskType.FixedUnit} - */ - taskType?: ej.Gantt.TaskType | string; - - /** Specifies the unit for the work involved in a task and it can be day, hour or minute - * @Default {ej.Gantt.WorkUnit.Hour} - */ - workUnit?: ej.Gantt.WorkUnit | string; - - /** Specifies the task scheduling mode for a project and this will be set to all the tasks available in the project - * @Default {ej.Gantt.TaskSchedulingMode.Auto} - */ - taskSchedulingMode?: ej.Gantt.TaskSchedulingMode | string; - - /** Specifies the row selection type. - * @Default {ej.Gantt.SelectionType.Single} - */ - selectionType?: ej.Gantt.SelectionType | string; - - /** Specifies the background of parent progressbar in Gantt - */ - parentProgressbarBackground?: string; - - /** Specifies the mapping property path for resource's percent effort involved in a task in datasource - */ - resourceUnitMapping?: string; - - /** Specifies the mapping property path for the task description in datasource - */ - notesMapping?: string; - - /** Specifies the mapping property path for the task scheduling mode for a task in datasource - * @Default {auto} - */ - taskSchedulingModeMapping?: string; - - /** Specifies the mapping property path for task duration unit in datasource - */ - durationUnitMapping?: string; - - /** Specifies the background of parent taskbar in Gantt - */ - parentTaskbarBackground?: string; - - /** Specifies the mapping property path for parent task Id in self reference datasource - */ - parentTaskIdMapping?: string; - - /** Specifies the mapping property path for predecessors of a task in datasource - */ - predecessorMapping?: string; - - /** Specifies the background of progressbar in Gantt - */ - progressbarBackground?: string; - - /** Specified the height of the progressbar in taskbar - * @Default {100} - */ - progressbarHeight?: number; - - /** Specifies the template for tooltip on resizing progressbar - * @Default {null} - */ - progressbarTooltipTemplate?: string; - - /** Specifies the template ID for customized tooltip for progressbar editing in Gantt - * @Default {null} - */ - progressbarTooltipTemplateId?: string; - - /** Specifies the mapping property path for progress percentage of a task in datasource - */ - progressMapping?: string; - - /** It receives query to retrieve data from the table (query is same as SQL). - * @Default {null} - */ - query?: any; - - /** Enables or Disables rendering baselines in Gantt , when enabled baseline is rendered in Gantt - * @Default {false} - */ - renderBaseline?: boolean; - - /** Enables or disables the schedule date validation while connecting a manually scheduled task with predecessor - * @Default {false} - */ - validateManualTasksOnLinking?: boolean; - - /** Specifies the mapping property name for resource ID in resource Collection in Gantt - */ - resourceIdMapping?: string; - - /** Specifies the mapping property path for resources of a task in datasource - */ - resourceInfoMapping?: string; - - /** Specifies the mapping property path for resource name of a task in Gantt - */ - resourceNameMapping?: string; - - /** Collection of data regarding resources involved in entire project - * @Default {[]} - */ - resources?: any[]; - - /** Specifies whether rounding off the day working time edits - * @Default {true} - */ - roundOffDayworkingTime?: boolean; - - /** Specifies the height of a single row in Gantt. Also, we need to set same height in the CSS style with class name e-rowcell. - * @Default {30} - */ - rowHeight?: number; - - /** Specifies end date of the Gantt schedule. By default, end date will be rounded to its next Saturday. - * @Default {null} - */ - scheduleEndDate?: string; - - /** Specifies the options for customizing schedule header. - */ - scheduleHeaderSettings?: ScheduleHeaderSettings; - - /** Specifies start date of the Gantt schedule. By default, start date will be rounded to its previous Sunday. - * @Default {null} - */ - scheduleStartDate?: string; - - /** Specifies the selected row Index in Gantt , the row with given index will highlighted - * @Default {-1} - */ - selectedRowIndex?: number; - - /** Enables or disables the column chooser. - * @Default {false} - */ - showColumnChooser?: boolean; - - /** Specifies the template for cell tooltip - * @Default {true} - */ - showGridCellTooltip?: boolean; - - /** Specifies whether to show grid cell tooltip over expander cell alone. - * @Default {true} - */ - showGridExpandCellTooltip?: boolean; - - /** Specifies whether display task progress inside taskbar. - * @Default {true} - */ - showProgressStatus?: boolean; - - /** Specifies whether to display resource names for a task beside taskbar. - * @Default {true} - */ - showResourceNames?: boolean; - - /** Specifies whether to display task name beside task bar. - * @Default {true} - */ - showTaskNames?: boolean; - - /** Specifies the size option of Gantt control. - */ - sizeSettings?: SizeSettings; - - /** Specifies the selected cell information on rendering Gantt. - */ - selectedCellIndexes?: SelectedCellIndex[]; - - /** Specifies the sorting options for Gantt. - */ - sortSettings?: SortSettings; - - /** Specifies splitter position in Gantt. - * @Default {null} - */ - splitterPosition?: string; - - /** Specifies the mapping property path for start date of a task in datasource - */ - startDateMapping?: string; - - /** Specifies the options for striplines - * @Default {[]} - */ - stripLines?: any[]; - - /** Specifies the background of the taskbar in Gantt - */ - taskbarBackground?: string; - - /** Specifies the template script for customized tooltip for taskbar editing in Gantt - */ - taskbarEditingTooltipTemplate?: string; - - /** Specifies the template Id for customized tooltip for taskbar editing in Gantt - */ - taskbarEditingTooltipTemplateId?: string; - - /** Specifies the template for tooltip on mouse action on taskbars - */ - taskbarTooltipTemplate?: string; + ///Specifies the Remote property in processingMode. + Remote, - /** To Specify the JsRender script Id to customize the task bar with our preference - */ - taskbarTemplate?: string; + ///Specifies the Local property in processingMode. + Local + } - /** To Specify the JsRender script Id to customize the mile stone with our preference - */ - milestoneTemplate?: string; - /** Enables or disables Gantt to read-only mode - * @Default {false} - */ - readOnly?: boolean; + enum RenderMode { - /** Specifies the template id for tooltip on mouse action on taskbars - */ - taskbarTooltipTemplateId?: string; + ///Specifies the Default property in RenderMode to get default output. + Default, - /** Specifies the mapping property path for task Id in datasource - */ - taskIdMapping?: string; + ///Specifies the Mobile property in RenderMode to get specified output. + Mobile, - /** Specifies the mapping property path for task name in datasource - */ - taskNameMapping?: string; + ///Specifies the Desktop property in RenderMode to get specified output. + Desktop + } - /** Specifies the toolbarSettings options. - */ - toolbarSettings?: ToolbarSettings; - /** Specifies the tree expander column in Gantt - * @Default {0} - */ - treeColumnIndex?: number; + enum ToolbarItems { - /** Specifies the type of selection whether to select row or cell. - * @Default {ej.Gantt.SelectionMode.Row} - */ - selectionMode?: ej.Gantt.SelectionMode | string; + ///Specifies the Print as value in ToolbarItems to get specified item. + Print, - /** Specifies the weekendBackground color in Gantt - * @Default {#F2F2F2} - */ - weekendBackground?: string; + ///Specifies the Refresh as value in ToolbarItems to get specified item. + Refresh, - /** Specifies the working time schedule of day - * @Default {ej.Gantt.workingTimeScale.TimeScale8Hours} - */ - workingTimeScale?: ej.Gantt.workingTimeScale | string; + ///Specifies the Zoom as value in ToolbarItems to get specified item. + Zoom, - /** Triggered for every Gantt action before its starts. */ - actionBegin?(e: ActionBeginEventArgs): void; + ///Specifies the FittoPage as value in ToolbarItems to get specified item. + FittoPage, - /** Triggered for every Gantt action success event. */ - actionComplete?(e: ActionCompleteEventArgs): void; + ///Specifies the Export as value in ToolbarItems to get specified item. + Export, - /** Triggered while enter the edit mode in the TreeGrid cell */ - beginEdit?(e: BeginEditEventArgs): void; + ///Specifies the PageNavigation as value in ToolbarItems to get specified item. + PageNavigation, - /** Triggered before selecting a cell */ - cellSelecting?(e: CellSelectingEventArgs): void; + ///Specifies the Parameters as value in ToolbarItems to get specified item. + Parameters, - /** Triggered after selected a cell */ - cellSelected?(e: CellSelectedEventArgs): void; + ///Specifies the PrintLayout as value in ToolbarItems to get specified item. + PrintLayout, - /** Triggered while dragging a row in Gantt control */ - rowDrag?(e: RowDragEventArgs): void; + ///Specifies the PageSetup as value in ToolbarItems to get specified item. + PageSetup + } - /** Triggered while start to drag row in Gantt control */ - rowDragStart?(e: RowDragStartEventArgs): void; + } - /** Triggered while drop a row in Gantt control */ - rowDragStop?(e: RowDragStopEventArgs): void; + class TreeGrid extends ej.Widget { + static fn: TreeGrid; + constructor(element: JQuery | Element, options?: TreeGrid.Model); + static Locale: any; + model: TreeGrid.Model; + defaults: TreeGrid.Model; - /** Triggered after collapsed the Gantt record */ - collapsed?(e: CollapsedEventArgs): void; + /** Add a new row in TreeGrid, while allowAdding is set to true + * @param {any} Item to add in TreeGrid row. + * @param {string} Defines in which position the row wants to be added + * @returns {void} + */ + addRow(data: any, rowPosition: string): void; - /** Triggered while collapsing the Gantt record */ - collapsing?(e: CollapsingEventArgs): void; + /** To clear all the selection in TreeGrid + * @param {number} you can pass a row index to clear the row selection. + * @returns {void} + */ + clearSelection(index: number): void; + + /** To select cell based on the cell and row index dynamically. + * @param {any[]} array of cell indexes to be select + * @param {boolean} Defines that we need to preserve the previously selected cells or not + * @returns {void} + */ + selectCells(Indexes: any[], preservePreviousSelectedCell: boolean): void; + + /** To rename a column with the specified name + * @param {number} Index of the column to be renamed + * @param {string} Header text of the column + * @returns {void} + */ + renameColumn(columnIndex: number, name: string): void; + + /** To delete the specified column + * @param {number} Index of the column to be deleted + * @returns {void} + */ + deleteColumn(columnIndex: number): void; + + /** To collapse all the parent items in tree grid + * @returns {void} + */ + collapseAll(): void; + + /** To hide the column by using header text + * @param {string} you can pass a header text of a column to hide. + * @returns {void} + */ + hideColumn(headerText: string): void; + + /** Expands the records at specific hierarchical level + * @param {number} you can pass the level as index number to expand + * @returns {void} + */ + expandAtLevel(index: number): void; + + /** Collapses the records at specific hierarchical level + * @param {number} you can pass the particular level as index. + * @returns {void} + */ + collapseAtLevel(index: number): void; + + /** To refresh the changes in tree grid + * @param {any[]} Pass which data source you want to show in tree grid + * @param {any} Pass which data you want to show in tree grid + * @returns {void} + */ + refresh(dataSource: any[], query: any): void; + + /** Freeze all the columns preceding to the column specified by the field name. + * @param {string} Freeze all Columns before this field column. + * @returns {void} + */ + freezePrecedingColumns(field: string): void; + + /** Freeze/unfreeze the specified column. + * @param {string} Freeze/Unfreeze this field column. + * @param {boolean} Decides to Freeze/Unfreeze this field column. + * @returns {void} + */ + freezeColumn(field: string, isFrozen: boolean): void; + + /** To save the edited cell in TreeGrid + * @returns {void} + */ + saveCell(): void; + + /** To show the column by using header text + * @param {string} you can pass a header text of a column to show. + * @returns {void} + */ + showColumn(headerText: string): void; + + /** To sorting the data based on the particular fields + * @param {string} you can pass a name of column to sort. + * @param {string} you can pass a sort direction to sort the column. + * @returns {void} + */ + sortColumn(fieldName: string, columnSortDirection: string): void; + + /** To reorder the column with field name and target index values + * @param {string} you can pass a name of column to reorder. + * @param {string} you can pass a target column index to be inserted. + * @returns {void} + */ + reorderColumn(fieldName: string, targetIndex: string): void; + } + export namespace TreeGrid { + + export interface Model { + + /** Enables or disables the ability to resize the column width interactively. + * @Default {false} + */ + allowColumnResize?: boolean; + + /** Enables or disables the option for column reordering + * @Default {false} + */ + allowColumnReordering?: boolean; + + /** Enables or disables the ability to drag and drop the row interactively to reorder the rows. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /** Enables or disables the ability to filter the data on all the columns. Enabling this property will display a row with editor controls corresponding to each column. You can + * restrict filtering on particular column by disabling this property directly on that column instance itself. + * @Default {false} + */ + allowFiltering?: boolean; + + /** Enables or disables keyboard navigation. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Enables or disables the ability to sort the rows based on multiple columns/fields by clicking on each column header. Rows will be sorted recursively on clicking the column headers. + * @Default {false} + */ + allowMultiSorting?: boolean; + + /** Enables or disables the ability to select a row interactively. + * @Default {true} + */ + allowSelection?: boolean; + + /** Enables or disables the ability to sort the rows based on a single field/column by clicking on that column header. When enabled, rows can be sorted only by single field/column. + * @Default {false} + */ + allowSorting?: boolean; + + /** Enables/disables pagination of rows in TreeGrid + * @Default {false} + */ + allowPaging?: boolean; + + /** Specifies the id of the template that has to be applied for alternate rows. + */ + altRowTemplateID?: string; + + /** Specifies the mapping property path for the expand status of a record in data source. + */ + expandStateMapping?: string; + + /** Specifies the mapping property path for sub tasks in datasource + */ + childMapping?: string; + + /** Option for adding columns; each column has the option to bind to a field in the dataSource. + */ + columns?: Column[]; + + /** To Specify the column fields to be displayed in the dialog while inserting a column using column menu. + * @Default {[]} + */ + columnDialogFields?: any[]; + + /** Options for displaying and customizing context menu items. + */ + contextMenuSettings?: ContextMenuSettings; + + /** Specify the CSS class for TreeGrid to achieve custom theme. + */ + cssClass?: string; + + /** Specifies hierarchical or self-referential data to populate the TreeGrid. + * @Default {null} + */ + dataSource?: any[]; + + /** Specifies whether to wrap the header text when it is overflown i.e., when it exceeds the header width. + * @Default {ej.TreeGrid.HeaderTextOverflow.None} + */ + headerTextOverflow?: ej.TreeGrid.HeaderTextOverflow|string; + + /** Options for displaying and customizing the tooltip. This tooltip will show the preview of the row that is being dragged. + */ + dragTooltip?: DragTooltip; + + /** Options for enabling and configuring the editing related operations. + */ + editSettings?: EditSettings; + + /** Specifies whether to render alternate rows in different background colors. + * @Default {true} + */ + enableAltRow?: boolean; + + /** Specifies whether to load all the rows in collapsed state when the TreeGrid is rendered for the first time. + * @Default {false} + */ + enableCollapseAll?: boolean; + + /** Specifies whether to resize TreeGrid whenever window size changes. + * @Default {false} + */ + enableResize?: boolean; + + /** Specifies whether to render only the visual elements that are visible in the UI. When you enable this property, it will reduce the loading time for loading large number of records. + * @Default {false} + */ + enableVirtualization?: boolean; + + /** Specifies the settings for column resize + */ + columnResizeSettings?: ColumnResizeSettings; + + /** Defines the common width for all the columns in TreeGrid + * @Default {150} + */ + commonWidth?: number; + + /** Options for filtering and customizing filter actions. + */ + filterSettings?: FilterSettings; + + /** Specifies the localization information to customize the User Interface (UI) to support regional language and culture + * @Default {en-US} + */ + locale?: string; + + /** Enables or disables internal parsing of a row. When disabled this property, row will be displayed using the defined template without any internal event bindings. + * @Default {true} + */ + parseRowTemplate?: boolean; + + /** Specifies the name of the field in the dataSource, which contains the id of that row. + */ + idMapping?: string; + + /** Enables or disables the responsiveness of TreeGrid + * @Default {false} + */ + isResponsive?: boolean; + + /** Specifies the name of the field in the dataSource, which contains the parent's id. This is necessary to form a parent-child hierarchy, if the dataSource contains self-referential + * data. + */ + parentIdMapping?: string; + + /** Specifies the options for customizing the pager. + */ + pageSettings?: PageSettings; + + /** Specifies the template for cell tooltip + * @Default {null} + */ + cellTooltipTemplate?: string; + + /** Specifies ej.Query to select data from the dataSource. This property is applicable only when the dataSource is ej.DataManager. + * @Default {null} + */ + query?: any; + + /** Specifies the height of a single row in tree grid. Also, we need to set same height in the CSS style with class name e-rowcell. + * @Default {30} + */ + rowHeight?: number; + + /** Specifies the id of the template to be applied for all the rows. + */ + rowTemplateID?: string; + + /** Specifies the index of the selected row. + * @Default {-1} + */ + selectedRowIndex?: number; + + /** Specifies the selected cell information on rendering TreeGrid. + */ + selectedCellIndexes?: SelectedCellIndex[]; + + /** Specifies the settings for row and cell selection. + */ + selectionSettings?: SelectionSettings; + + /** Enables/disables the options for inserting , deleting and renaming columns. + * @Default {false} + */ + showColumnOptions?: boolean; + + /** Controls the visibility of the menu button, which is displayed on the column header. Clicking on this button will show a popup menu. When you choose Columns item from this popup, + * a list box with column names will be shown, from which you can select/deselect a column name to control the visibility of the respective columns. + * @Default {false} + */ + showColumnChooser?: boolean; + + /** Specifies the visibility of details view + * @Default {false} + */ + showDetailsRow?: boolean; + + /** Specifies the visibility of the expander column which is used to expand or collapse the details view + * @Default {false} + */ + showDetailsRowInfoColumn?: boolean; + + /** Specifies the template for details view + */ + detailsTemplate?: string; + + /** Specifies the row height of the details view + * @Default {100} + */ + detailsRowHeight?: number; + + /** Specifies the visibility of summary row + * @Default {false} + */ + showSummaryRow?: boolean; + + /** Specifies the visibility of total summary row for the corresponding summary column + * @Default {false} + */ + showTotalSummary?: boolean; + + /** Specifies the summary row collection object to be displayed + * @Default {[]} + */ + summaryRows?: SummaryRow[]; + + /** Specifies whether to show tooltip when mouse is hovered on the cell. + * @Default {true} + */ + showGridCellTooltip?: boolean; + + /** Specifies whether to show tooltip for the cells, which has expander button. + * @Default {true} + */ + showGridExpandCellTooltip?: boolean; + + /** Options for setting width and height for TreeGrid. + */ + sizeSettings?: SizeSettings; + + /** Options for sorting the rows. + */ + sortSettings?: SortSettings; + + /** Options for displaying and customizing the toolbar items. + */ + toolbarSettings?: ToolbarSettings; + + /** Specifies the index of the column that needs to have the expander button. By default, cells in the first column contain the expander button. + * @Default {0} + */ + treeColumnIndex?: number; + + /** Triggered before every success event of TreeGrid action. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Triggered for every TreeGrid action success event. + */ + actionComplete?(e: ActionCompleteEventArgs): void; + + /** Triggered before the printing initiated in TreeGrid. + */ + beforePrint?(e: BeforePrintEventArgs): void; + + /** Triggered while enter the edit mode in the TreeGrid cell + */ + beginEdit?(e: BeginEditEventArgs): void; + + /** Triggered after collapsed the TreeGrid record + */ + collapsed?(e: CollapsedEventArgs): void; + + /** Triggered while collapsing the TreeGrid record + */ + collapsing?(e: CollapsingEventArgs): void; + + /** Triggered while clicking a row, even when allowSelection property is disabled. + */ + recordClick?(e: RecordClickEventArgs): void; + + /** Triggered when you start to drag a column + */ + columnDragStart?(e: ColumnDragStartEventArgs): void; + + /** Triggered while dragging a column + */ + columnDrag?(e: ColumnDragEventArgs): void; + + /** Triggered when a column is dropped + */ + columnDrop?(e: ColumnDropEventArgs): void; + + /** Triggered after a column resized + */ + columnResized?(e: ColumnResizedEventArgs): void; + + /** Triggered while start to resize a column + */ + columnResizeStart?(e: ColumnResizeStartEventArgs): void; + + /** Triggered when a column has been resized + */ + columnResizeEnd?(e: ColumnResizeEndEventArgs): void; + + /** Triggered while Context Menu is rendered in TreeGrid control + */ + contextMenuOpen?(e: ContextMenuOpenEventArgs): void; + + /** Triggered when TreeGrid is rendered completely + */ + create?(e: CreateEventArgs): void; + + /** Triggered while rendering details template in TreeGrid + */ + detailsDataBound?(e: DetailsDataBoundEventArgs): void; + + /** Triggered when details template pop-up is shown. + */ + detailsShown?(e: DetailsShownEventArgs): void; - /** Triggered while Context Menu is rendered in Gantt control */ - contextMenuOpen?(e: ContextMenuOpenEventArgs): void; + /** Triggered when details template pop-up is hidden. + */ + detailsHidden?(e: DetailsHiddenEventArgs): void; - /** Triggered when Gantt is rendered completely. */ - create?(e: CreateEventArgs): void; + /** Triggered after saved the modified cellValue in TreeGrid + */ + endEdit?(e: EndEditEventArgs): void; - /** Triggered after save the modified cellValue in Gantt. */ - endEdit?(e: EndEditEventArgs): void; + /** Triggered after expand the record + */ + expanded?(e: ExpandedEventArgs): void; - /** Triggered after expand the record */ - expanded?(e: ExpandedEventArgs): void; + /** Triggered while expanding the TreeGrid record + */ + expanding?(e: ExpandingEventArgs): void; - /** Triggered while expanding the Gantt record */ - expanding?(e: ExpandingEventArgs): void; + /** Triggered while Treegrid is loaded + */ + load?(e: LoadEventArgs): void; - /** Triggered while Gantt is loaded */ - load?(e: LoadEventArgs): void; + /** Triggered while rendering each cell in the TreeGrid + */ + queryCellInfo?(e: QueryCellInfoEventArgs): void; - /** Triggered while rendering each cell in the TreeGrid */ - queryCellInfo?(e: QueryCellInfoEventArgs): void; + /** Triggered while rendering each row + */ + rowDataBound?(e: RowDataBoundEventArgs): void; - /** Triggered while rendering each taskbar in the Gantt */ - queryTaskbarInfo?(e: QueryTaskbarInfoEventArgs): void; + /** Triggered while dragging a row in TreeGrid control + */ + rowDrag?(e: RowDragEventArgs): void; - /** Triggered while rendering each row */ - rowDataBound?(e: RowDataBoundEventArgs): void; + /** Triggered while start to drag row in TreeGrid control + */ + rowDragStart?(e: RowDragStartEventArgs): void; - /** Triggered after the row is selected. */ - rowSelected?(e: RowSelectedEventArgs): void; + /** Triggered while drop a row in TreeGrid control + */ + rowDragStop?(e: RowDragStopEventArgs): void; - /** Triggered before the row is going to be selected. */ - rowSelecting?(e: RowSelectingEventArgs): void; + /** Triggered before selecting a cell + */ + cellSelecting?(e: CellSelectingEventArgs): void; - /** Triggered after completing the editing operation in taskbar */ - taskbarEdited?(e: TaskbarEditedEventArgs): void; + /** Triggered after selected a cell + */ + cellSelected?(e: CellSelectedEventArgs): void; - /** Triggered while editing the Gantt chart (dragging, resizing the taskbar ) */ - taskbarEditing?(e: TaskbarEditingEventArgs): void; + /** Triggered after the row is selected. + */ + rowSelected?(e: RowSelectedEventArgs): void; - /** Triggered when taskbar item is clicked in Gantt. */ - taskbarClick?(e: TaskbarClickEventArgs): void; + /** Triggered before the row is going to be selected. + */ + rowSelecting?(e: RowSelectingEventArgs): void; - /** Triggered when toolbar item is clicked in Gantt. */ - toolbarClick?(e: ToolbarClickEventArgs): void; - } + /** Triggered when toolbar item is clicked in TreeGrid. + */ + toolbarClick?(e: ToolbarClickEventArgs): void; + } - export interface ActionBeginEventArgs { + export interface ActionBeginEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the grid model. - */ - model?: any; + /** Returns the current grouped column field name. + */ + columnName?: string; - /** Returns the name of the event. - */ - type?: string; + /** Returns the TreeGrid model. + */ + model?: any; - /** Returns the current grouped column field name. - */ - columnName?: string; + /** Returns request type. + */ + requestType?: string; - /** Returns request type. - */ - requestType?: string; + /** Returns the name of the event. + */ + type?: string; - /** Returns the direction of sorting ascending or descending - */ - columnSortDirection?: string; + /** Returns the direction of sorting ascending or descending. + */ + columnSortDirection?: string; - /** Returns the value of searching element. - */ - keyValue?: string; + /** Returns the value of expanding parent element. + */ + keyValue?: string; - /** Returns the data of deleting element. - */ - data?: string; + /** Returns the data or deleting element. + */ + data?: string; + } - /** Returns selected record index - */ - recordIndex?: number; - } + export interface ActionCompleteEventArgs { - export interface ActionCompleteEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the grid model. + */ + model?: any; - /** Returns the grid model. - */ - model?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the name of the event. - */ - type?: string; + /** Returns the current grouped column field name. + */ + columnName?: string; - /** Returns the current grouped column field name. - */ - columnName?: string; + /** Returns request type. + */ + requestType?: string; - /** Returns request type. - */ - requestType?: string; + /** Returns the direction of sorting ascending or descending + */ + columnSortDirection?: string; - /** Returns the direction of sorting ascending or descending - */ - columnSortDirection?: string; + /** Returns the value of searched element. + */ + keyValue?: string; - /** Returns the value of searched element. - */ - keyValue?: string; + /** Returns the data of deleted element. + */ + data?: string; - /** Returns the data of deleted element. - */ - data?: string; + /** Returns selected record index + */ + recordIndex?: number; + } - /** Returns selected record index - */ - recordIndex?: number; - } + export interface BeforePrintEventArgs { - export interface BeginEditEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the treegrid element which is going to be print + */ + element?: any; - /** Returns the row element of editing cell. - */ - rowElement?: any; + /** Returns request type. + */ + requestType?: string; + } - /** Returns the Element of editing cell. - */ - cellElement?: any; + export interface BeginEditEventArgs { - /** Returns the data of current cell record. - */ - data?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the column Index of cell belongs. - */ - columnIndex?: number; - } + /** Returns the row element of editing cell. + */ + rowElement?: any; - export interface CellSelectingEventArgs { + /** Returns the Element of editing cell. + */ + cellElement?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the data of current cell record. + */ + data?: any; - /** Returns the cell index on the selection. - */ - cellIndex?: number; + /** Returns the column Index of cell belongs. + */ + columnIndex?: number; + } - /** Returns the row index on the selection - */ - rowIndex?: number; + export interface CollapsedEventArgs { - /** Returns the selecting cell element - */ - targetCell?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the selecting row element - */ - targetRow?: any; + /** Returns the row index of collapsed record. + */ + recordIndex?: number; - /** Returns the selecting record object - */ - data?: any; + /** Returns the data of collapsed record.. + */ + data?: any; - /** Returns the Gantt object Model - */ - model?: any; - } + /** Returns Request Type. + */ + requestType?: string; - export interface CellSelectedEventArgs { + /** Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the event type. + */ + type?: string; + } - /** Returns the cell index on the selection. - */ - cellIndex?: number; + export interface CollapsingEventArgs { - /** Returns the row index on the selection - */ - rowIndex?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the selecting cell element - */ - targetCell?: any; + /** Returns the row index of collapsing record. + */ + recordIndex?: number; - /** Returns the selecting row element - */ - targetRow?: any; + /** Returns the data of collapsing record.. + */ + data?: any; - /** Returns the selecting record object - */ - data?: any; + /** Returns the event Type. + */ + type?: string; - /** Returns the Gantt object Model - */ - model?: any; + /** Returns state of a record whether it is in expanded or collapsing state. + */ + expanded?: boolean; + } - /** Returns the previously selected row data - */ - previousData?: any; + export interface RecordClickEventArgs { - /** Returns the previously selected cell index - */ - previousCellIndex?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the previously selected row index - */ - previousRowIndex?: any; + /** Returns the element of clicked cell. + */ + cell?: any; - /** Returns the previously selected cell element - */ - previousTargetCell?: any; + /** Returns the index of the clicked cell. + */ + cellIndex?: number; - /** Returns the previously selected row element - */ - previousTargetRow?: any; - } + /** Returns the data of clicked cell. + */ + cellValue?: any; - export interface RowDragEventArgs { + /** Returns the element of the clicked row. + */ + row?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the index of the clicked row. + */ + rowIndex?: number; - /** Returns the row which we start to drag. - */ - draggedRow?: any; + /** Returns the column name of the clicked cell. + */ + columnName?: string; + } - /** Returns the row index which we start to drag. - */ - draggedRowIndex?: number; + export interface ColumnDragStartEventArgs { - /** Returns the row on which we are dragging. - */ - targetRow?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the row index on which we are dragging. - */ - targetRowIndex?: number; + /** Returns the control model values. + */ + model?: any; - /** Returns that we can drop over that record or not. - */ - canDrop?: boolean; + /** Returns the event Type. + */ + type?: string; - /** Returns the Gantt model. - */ - model?: any; + /** Returns the column data which is dragged + */ + draggedColumn?: any; - /** Returns request type. - */ - requestType?: string; + /** Returns the index of the column being dragged + */ + draggedColumnIndex?: number; + } - /** Returns the name of the event. - */ - type?: string; - } + export interface ColumnDragEventArgs { - export interface RowDragStartEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the control model values. + */ + model?: any; - /** Returns the row which we start to drag. - */ - draggedRow?: any; + /** Returns the event Type. + */ + type?: string; - /** Returns the row index which we start to drag. - */ - draggedRowIndex?: boolean; + /** Returns the column data which is dragged + */ + draggedColumn?: any; - /** Returns the Gantt model. - */ - model?: any; + /** Returns the index of the column being dragged + */ + draggedColumnIndex?: number; - /** Returns request type. - */ - requestType?: string; + /** Returns the target column data + */ + targetColumn?: any; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the index of the target column + */ + targetColumnIndex?: number; - export interface RowDragStopEventArgs { + /** Returns that we can drop over the column or not. + */ + canDrop?: boolean; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface ColumnDropEventArgs { - /** Returns the row which we start to drag. - */ - draggedRow?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the row index which we start to drag. - */ - draggedRowIndex?: number; + /** Returns the control model values. + */ + model?: any; - /** Returns the row which we are dropped to row. - */ - targetRow?: any; + /** Returns the event Type. + */ + type?: string; - /** Returns the row index which we are dropped to row. - */ - targetRowIndex?: number; + /** Returns the column data which is dragged + */ + draggedColumn?: any; - /** Returns the Gantt model. - */ - model?: any; + /** Returns the index of the column being dragged + */ + draggedColumnIndex?: number; - /** Returns request type. - */ - requestType?: string; + /** Returns the target column data + */ + targetColumn?: any; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the index of the target column + */ + targetColumnIndex?: number; + } - export interface CollapsedEventArgs { + export interface ColumnResizedEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the row index of collapsed record. - */ - recordIndex?: number; + /** Returns the control model values. + */ + model?: any; - /** Returns the data of collapsed record. - */ - data?: any; + /** Returns the event Type. + */ + type?: string; - /** Returns Request Type. - */ - requestType?: string; + /** Returns the column data which is resized + */ + column?: any; - /** Returns state of a record whether it is in expanded or collapsed state. - */ - expanded?: boolean; - } + /** Returns the index of the column being resized. + */ + columnIndex?: number; - export interface CollapsingEventArgs { + /** Returns resized column width after resized. + */ + newWidth?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns resized column width before resizing + */ + oldWidth?: number; + } - /** Returns the row index of collapsing record. - */ - recordIndex?: number; + export interface ColumnResizeStartEventArgs { - /** Returns the data of edited cell record.. - */ - data?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns state of a record whether it is in expanded or collapsed state. - */ - expanded?: boolean; - } + /** Returns the control model values. + */ + model?: any; - export interface ContextMenuOpenEventArgs { + /** Returns the event Type. + */ + type?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the column data in which the resizing started + */ + column?: any; - /** Returns the default context menu items to which we add custom items. - */ - contextMenuItems?: any[]; + /** Returns the column index in which the resizing started + */ + columnIndex?: number; - /** Returns the Gantt model. - */ - model?: any; + /** Returns column width before dragging + */ + oldWidth?: number; - /** Returns request type. - */ - requestType?: string; + /** Returns initial column element object. + */ + target?: any; + } - /** Returns the name of the event. - */ - type?: string; - } + export interface ColumnResizeEndEventArgs { - export interface CreateEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the control model values. + */ + model?: any; - /** Returns the Gantt model - */ - model?: any; + /** Returns the event Type. + */ + type?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the column data in which the resizing started + */ + column?: any; - export interface EndEditEventArgs { + /** Returns the column index in which the resizing started + */ + columnIndex?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the column width difference, before and after the resizing + */ + extra?: number; - /** Returns the row element of editing cell. - */ - rowElement?: any; + /** Returns the new column width after resized + */ + newWidth?: number; - /** Returns the Element of editing cell. - */ - cellElement?: any; + /** Returns column width before dragging + */ + oldWidth?: number; - /** Returns the data of edited cell record. - */ - data?: any; + /** Returns initial column element object. + */ + target?: any; + } - /** Returns the column name of edited cell belongs. - */ - columnName?: string; + export interface ContextMenuOpenEventArgs { - /** Returns the column object of edited cell belongs. - */ - columnObject?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface ExpandedEventArgs { + /** Returns the default context menu items to which we add custom items. + */ + contextMenuItems?: any[]; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the TreeGrid model. + */ + model?: any; - /** Returns the row index of record. - */ - recordIndex?: number; + /** Returns request type. + */ + requestType?: string; - /** Returns the data of expanded record. - */ - data?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns Request Type. - */ - requestType?: string; + export interface CreateEventArgs { - /** Returns state of a record whether it is in expanded or collapsed state. - */ - expanded?: boolean; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface ExpandingEventArgs { + /** Returns the TreeGrid model + */ + model?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the row index of record. - */ - recordIndex?: any; + export interface DetailsDataBoundEventArgs { - /** Returns the data of edited cell record.. - */ - data?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns state of a record whether it is in expanded or collapsed state. - */ - expanded?: boolean; - } + /** Returns the data collection of selected row. + */ + data?: any; - export interface LoadEventArgs { + /** Returns the details element of selected row. + */ + detailsElement?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the rowIndex of selected row. + */ + rowIndex?: number; - /** Returns the Gantt model - */ - model?: any; + /** Returns the TreeGrid model + */ + model?: any; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface QueryCellInfoEventArgs { + export interface DetailsShownEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the selecting cell element. - */ - cellElement?: any; + /** Returns the data collection of selected row. + */ + data?: any; - /** Returns the value of cell. - */ - cellValue?: string; + /** Returns the details element of selected row. + */ + detailsElement?: any; - /** Returns the data of current cell record. - */ - data?: any; + /** Returns the rowIndex of selected row. + */ + rowIndex?: number; - /** Returns the column of cell belongs. - */ - column?: any; - } + /** Returns the TreeGrid model + */ + model?: any; - export interface QueryTaskbarInfoEventArgs { + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface DetailsHiddenEventArgs { - /** Returns the taskbar background of current item. - */ - TaskbarBackground?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the progressbar background of current item. - */ - ProgressbarBackground?: string; + /** Returns the TreeGrid model + */ + model?: any; - /** Returns the parent taskbar background of current item. - */ - parentTaskbarBackground?: string; + /** Returns the data collection of hidden details Template + */ + rowData?: any; - /** Returns the parent progressbar background of current item. - */ - parentProgressbarBackground?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the data of the record. - */ - data?: any; - } + export interface EndEditEventArgs { - export interface RowDataBoundEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the row element of editing cell. + */ + rowElement?: any; - /** Returns the row element of rendering row. - */ - rowElement?: any; + /** Returns the Element of editing cell. + */ + cellElement?: any; - /** Returns the data of rendering row record.. - */ - data?: any; - } + /** Returns the data of edited cell record. + */ + data?: any; - export interface RowSelectedEventArgs { + /** Returns the column name of edited cell belongs. + */ + columnName?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the column object of edited cell belongs. + */ + columnObject?: any; + } - /** Returns the selecting row element. - */ - targetRow?: any; + export interface ExpandedEventArgs { - /** Returns the index of selecting row record. - */ - recordIndex?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the data of selected record. - */ - data?: any; - } + /** Returns the row index of expanded record. + */ + recordIndex?: number; - export interface RowSelectingEventArgs { + /** Returns the data of expanded record.. + */ + data?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns Request Type. + */ + requestType?: string; - /** Returns the data selecting record. - */ - data?: any; + /** Returns state of a record whether it is in expanded or expanded state. + */ + expanded?: boolean; - /** Returns the index of selecting row record. - */ - recordIndex?: string; + /** Returns the event type. + */ + type?: string; + } - /** Returns the selecting row chart element. - */ - targetChartRow?: any; + export interface ExpandingEventArgs { - /** Returns the selecting row grid element. - */ - targetGridRow?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the previous selected data. - */ - previousData?: any; + /** Returns the row index of expanding record. + */ + recordIndex?: number; - /** Returns the previous selected row index. - */ - previousIndex?: string; + /** Returns the data of expanding record.. + */ + data?: any; - /** Returns the previous selected row chart element. - */ - previousChartRow?: any; + /** Returns the event Type. + */ + type?: string; - /** Returns the previous selected row grid element. - */ - previousGridRow?: any; - } + /** Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; + } - export interface TaskbarEditedEventArgs { + export interface LoadEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the data of edited record. - */ - data?: any; + /** Returns the TreeGrid model + */ + model?: any; - /** Returns the previous data value of edited record. - */ - previousData?: any; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns 'true' if taskbar is dragged. - */ - dragging?: boolean; + export interface QueryCellInfoEventArgs { - /** Returns 'true' if taskbar is left resized. - */ - leftResizing?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns 'true' if taskbar is right resized. - */ - rightResizing?: boolean; + /** Returns the selecting cell element. + */ + cellElement?: any; - /** Returns 'true' if taskbar is progress resized. - */ - progressResizing?: boolean; + /** Returns the value of cell. + */ + cellValue?: string; - /** Returns the field values of record being edited. - */ - editingFields?: any; + /** Returns the data of current cell record. + */ + data?: any; - /** Returns the Gantt model. - */ - model?: any; - } + /** Returns the column of cell belongs. + */ + column?: any; + } - export interface TaskbarEditingEventArgs { + export interface RowDataBoundEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the Gantt model. - */ - model?: any; + /** Returns the row element of rendering row. + */ + rowElement?: any; - /** Returns the row object being edited. - */ - rowData?: any; + /** Returns the data of rendering row record. + */ + data?: any; + } - /** Returns the field values of record being edited. - */ - editingFields?: any; + export interface RowDragEventArgs { - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface TaskbarClickEventArgs { + /** Returns the row which we start to drag. + */ + draggedRow?: any; - /** Returns currently clicked row data - */ - data?: any; + /** Returns the row index which we start to drag. + */ + draggedRowIndex?: number; - /** Returns the current item index. - */ - index?: number; - - /** Returns the Gantt model. - */ - model?: any; - - /** Returns the clicked row element - */ - taskbarElement?: any; - - /** Returns the target element. - */ - target?: any; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface ToolbarClickEventArgs { + /** Returns the row on which we are dragging. + */ + targetRow?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the current item. - */ - currentTarget?: any; - - /** Returns the Gantt model. - */ - model?: any; - - /** Returns the name of the toolbar item on which mouse click has been performed - */ - itemName?: string; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface DragTooltip { - - /** Specifies option to enable/disable tooltip while drag and drop a row. - * @Default {true} - */ - showTooltip?: boolean; - - /** Specifies the data source fields to be displayed in the drag tooltip. - * @Default {[]} - */ - tooltipItems?: any[]; - - /** Specifies the custom template for drag tooltip. - * @Default {null} - */ - tooltipTemplate?: string; - } - - export interface SplitterSettings { - - /** Specifies position of the splitter in Gantt , splitter can be placed either based on percentage values or pixel values. - */ - position?: string; - - /** Specifies the position of splitter in Gantt, based on column index in Gantt. - */ - index?: string; - } - - export interface EditSettings { - - /** Enables or disables add record icon in Gantt toolbar - * @Default {false} - */ - allowAdding?: boolean; - - /** Enables or disables delete icon in Gantt toolbar - * @Default {false} - */ - allowDeleting?: boolean; - - /** Specifies the option for enabling or disabling editing in Gantt grid part - * @Default {false} - */ - allowEditing?: boolean; - - /** Specifies the option for enabling or disabling indent action in Gantt. - * @Default {false} - */ - allowIndent?: boolean; - - /** Specifies the option for enabling or disabling outdent action in Gantt - * @Default {false} - */ - allowOutdent?: boolean; - - /** Specifies the mouse action whether single click or double click to begin the editing - * @Default {ej.Gantt.BeginEditAction.DblClick} - */ - beginEditAction?: ej.Gantt.BeginEditAction | string; - - /** Specifies the edit mode in Gantt, "normal" is for dialog editing ,"cellEditing" is for cell type editing - * @Default {normal} - */ - editMode?: string; - - /** Specifies the position where the new row has to be added. - * @Default {ej.Gantt.RowPosition.BelowSelectedRow} - */ - rowPosition?: ej.Gantt.RowPosition | string; - } - - export interface ScheduleHeaderSettings { - - /** Specified the format for day view in schedule header - * @Default {ddd} - */ - dayHeaderFormat?: string; - - /** Specified the format for Hour view in schedule header - * @Default {HH} - */ - hourHeaderFormat?: string; - - /** Specifies the number of minutes per interval - * @Default {ej.Gantt.minutesPerInterval.Auto} - */ - minutesPerInterval?: ej.Gantt.minutesPerInterval | string; - - /** Specified the format for month view in schedule header - * @Default {MMM} - */ - monthHeaderFormat?: string; - - /** Specifies the schedule mode - * @Default {ej.Gantt.ScheduleHeaderType.Week} - */ - scheduleHeaderType?: ej.Gantt.ScheduleHeaderType | string; - - /** Specifies the round-off mode for the start date in schedule header. - * @Default {ej.Gantt.TimescaleRoundMode.Auto} - */ - timescaleStartDateMode?: ej.Gantt.TimescaleRoundMode | string; - - /** Specified the background for weekends in Gantt - * @Default {#F2F2F2} - */ - weekendBackground?: string; - - /** Specified the format for week view in schedule header - * @Default {ddd} - */ - weekHeaderFormat?: string; + /** Returns the row index on which we are dragging. + */ + targetRowIndex?: number; - /** Specified the format for year view in schedule header - * @Default {yyyy} - */ - yearHeaderFormat?: string; + /** Returns that we can drop over that record or not. + */ + canDrop?: boolean; - /** Specifies the size of the lowest time unit along the timescale, with minimum value as "50%" and maximum value as "500%". It is also possible to set the value in pixels. - * @Default {100%} - */ - timescaleUnitSize?: string; + /** Returns the TreeGrid model. + */ + model?: any; - /** Specifies the start day of the week in week timescale mode - * @Default {0} - */ - weekStartDay?: number; - } + /** Returns request type. + */ + requestType?: string; - export interface SizeSettings { + /** Returns the name of the event. + */ + type?: string; + } - /** Specifies the height of Gantt control - * @Default {450px} - */ - height?: string; + export interface RowDragStartEventArgs { - /** Specifies the width of Gantt control - * @Default {1000px} - */ - width?: string; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface SelectedCellIndex { + /** Returns the row which we start to drag. + */ + draggedRow?: any; - /** Specifies the row index of the cell to be selected Gantt control - */ - rowIndex?: number; + /** Returns the row index which we start to drag. + */ + draggedRowIndex?: boolean; - /** Specifies the cell index to be selected in the row. - * @Default { } - */ - cellIndex?: number; - } + /** Returns the TreeGrid model. + */ + model?: any; - export interface SortSettings { + /** Returns request type. + */ + requestType?: string; - /** Specifies the sorted columns for Gantt - * @Default {[]} - */ - sortedColumns?: any[]; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface ToolbarSettings { + export interface RowDragStopEventArgs { - /** Specifies the state of enabling or disabling toolbar - * @Default {true} - */ - showToolbar?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Specifies the list of toolbar items to be rendered in Gantt toolbar - * @Default {[]} - */ - toolbarItems?: any[]; - } + /** Returns the row which we start to drag. + */ + draggedRow?: any; - enum DurationUnit { + /** Returns the row index which we start to drag. + */ + draggedRowIndex?: number; - ///Sets the Duration Unit as day. - Day, + /** Returns the row which we are dropped to row. + */ + targetRow?: any; - ///Sets the Duration Unit as hour. - Hour, + /** Returns the row index which we are dropped to row. + */ + targetRowIndex?: number; - ///Sets the Duration Unit as minute. - Minute - } + /** Returns the TreeGrid model. + */ + model?: any; + /** Returns request type. + */ + requestType?: string; - enum BeginEditAction { + /** Returns the name of the event. + */ + type?: string; + } - ///you can begin the editing at double click - DblClick, + export interface CellSelectingEventArgs { - ///you can begin the editing at single click - Click - } + /** Returns the cancel option value. + */ + cancel?: boolean; + /** Returns the cell index on the selection. + */ + cellIndex?: number; - enum RowPosition { + /** Returns the row index on the selection + */ + rowIndex?: number; - ///you can add a new row at top. - Top, + /** Returns the selecting cell element + */ + targetCell?: any; - ///you can add a new row at bottom. - Bottom, + /** Returns the selecting row element + */ + targetRow?: any; - ///you can add a new row to above selected row. - AboveSelectedRow, + /** Returns the selecting record object + */ + data?: any; - ///you can add a new row to below selected row. - BelowSelectedRow, + /** Returns the Gantt object Model + */ + model?: any; + } - ///you can add a new row as a child for selected row. - Child - } + export interface CellSelectedEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - enum TaskType { + /** Returns the cell index on the selection. + */ + cellIndex?: number; - ///Resource unit remains constant while editing the work and duration values. - FixedUnit, + /** Returns the row index on the selection + */ + rowIndex?: number; - ///Work value of a task remains constant while editing duration and resource unit values. - FixedWork, + /** Returns the selecting cell element + */ + targetCell?: any; - ///Duration value remains constant while editing work and resource unit values. - FixedDuration - } + /** Returns the selecting row element + */ + targetRow?: any; + /** Returns the selecting record object + */ + data?: any; - enum WorkUnit { + /** Returns the Gantt object Model + */ + model?: any; - ///Displays the work involved in a task in days. - Day, + /** Returns the previously selected row data + */ + previousData?: any; - ///Displays the work involved in a task in hours. - Hour, + /** Returns the previously selected cell index + */ + previousCellIndex?: any; - ///Displays the work involved in a task in minutes - Minute - } + /** Returns the previously selected row index + */ + previousRowIndex?: any; + /** Returns the previously selected cell element + */ + previousTargetCell?: any; - enum TaskSchedulingMode { + /** Returns the previously selected row element + */ + previousTargetRow?: any; + } - ///All the tasks in the project will be displayed in auto scheduled mode, where the tasks are scheduled automatically over non-working days and holidays. - Auto, + export interface RowSelectedEventArgs { - ///All the tasks in the project will be displayed in manually scheduled mode. - Manual, + /** Returns the cancel option value. + */ + cancel?: boolean; - ///Project consists of tasks with both auto and manually scheduled modes, based on the datasource values - Custom - } + /** Returns the selecting row element. + */ + targetRow?: any; + /** Returns the index of selecting row record. + */ + recordIndex?: number; - enum SelectionType { + /** Returns the data of selected record. + */ + data?: any; - ///you can select a single row. - Single, + /** Returns the event type. + */ + type?: string; + } - ///you can select a multiple row. - Multiple - } + export interface RowSelectingEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - enum minutesPerInterval { + /** Returns the data selecting record. + */ + data?: any; - ///Sets the interval automatically according with schedule start and end date. - Auto, + /** Returns the index of selecting row record. + */ + recordIndex?: string; + + /** Returns the selecting row element. + */ + targetRow?: any; + + /** Returns the previous selected data. + */ + previousData?: any; + + /** Returns the previous selected row index. + */ + previousIndex?: string; - ///Sets one minute intervals per hour. - OneMinute, + /** Returns the previous selected row element. + */ + previousTreeGridRow?: any; + } + + export interface ToolbarClickEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the current item. + */ + currentTarget?: any; + + /** Returns the TreeGrid model. + */ + model?: any; + + /** Returns the name of the toolbar item on which mouse click has been performed + */ + itemName?: string; + + /** Returns the name of the event. + */ + type?: string; + } + + export interface Column { + + /** Enables or disables the ability to filter the rows based on this column. + * @Default {false} + */ + allowFiltering?: boolean; + + /** Enables the blanks option in ejDropDownList mapped in TreeGrid column + * @Default {true} + */ + allowFilteringBlankContent?: boolean; + + /** Enables or disables the ability to sort the rows based on this column/field. + * @Default {false} + */ + allowSorting?: boolean; + + /** Enables/disables cell selection. + * @Default {false} + */ + allowCellSelection?: boolean; + + /** To customize the ej controls defined in TreeGrid column with their native property. + */ + editParams?: any; + + /** Specifies the edit type of the column. + * @Default {ej.TreeGrid.EditingType.String} + */ + editType?: ej.TreeGrid.EditingType|string; + + /** To bind the dropdown data for TreeGrid column mapped with ejDropDownList + */ + dropdownData?: string; + + /** Specifies the name of the field from the dataSource to bind with this column. + */ + field?: string; + + /** Specifies the template string of the script element to enable column template for a column. + */ + template?: string; + + /** Specifies the template ID of the script element to enable column template for a column. + */ + templateID?: string; + + /** Specifies the template ID or the template string of the AngularJS script element to enable column template for a column. + */ + angularTemplate?: string; + + /** Specifies the type of the editor control to be used to filter the rows. + * @Default {ej.TreeGrid.EditingType.String} + */ + filterEditType?: ej.TreeGrid.EditingType|string; + + /** Header text of the column. + * @Default {null} + */ + headerText?: string; + + /** Gets or sets a value that indicates to display a column value as checkbox or string + * @Default {false} + */ + displayAsCheckbox?: boolean; + + /** Enables or disables the checkbox visibility in a column for checkbox selection. + * @Default {false} + */ + showCheckbox?: boolean; + + /** Controls the visibility of the column. + * @Default {true} + */ + visible?: boolean; + + /** Gets or sets a value for treegrid column width + */ + width?: number; + + /** Specifies the header template value for the column header + */ + headerTemplateID?: string; + + /** Specifies the display format of a column + * @Default {null} + */ + format?: any; + + /** Specifies whether the column is a template column + * @Default {false} + */ + isTemplateColumn?: boolean; + + /** Specifies the alignment of the column header text + * @Default {ej.TextAlign.Left} + */ + headerTextAlign?: ej.TextAlign|string; + + /** Specifies whether the column is frozen + * @Default {false} + */ + isFrozen?: boolean; + + /** Specifies the text alignment for the column + * @Default {ej.TextAlign.Left} + */ + textAlign?: ej.TextAlign|string; + + /** Enables or disables the ability to edit a row or cell. + * @Default {false} + */ + allowEditing?: boolean; + + /** We can include or exclude particular column from column visibility list in column menu. + * @Default {true} + */ + showInColumnChooser?: boolean; + + /** Sets the clip mode for TreeGrid cell as ellipsis or clipped content(both header and content) + * @Default {ej.TreeGrid.ClipMode.Clip} + */ + clipMode?: ej.TreeGrid.ClipMode|string; + + /** Sets the tooltip template for the specific column. + * @Default {null} + */ + tooltip?: string; + + /** Sets the tooltip template for the column header + * @Default {null} + */ + headerTooltip?: string; + + /** specifies the conditions for saving data to the database while adding or editing the fields. + */ + validationRules?: any; + + /** Enables or disables the ability to freeze/unfreeze the columns + * @Default {false} + */ + allowFreezing?: boolean; + } + + export interface ContextMenuSettings { + + /** Option for adding items to context menu. + * @Default {[]} + */ + contextMenuItems?: any[]; + + /** Shows/hides the context menu. + * @Default {false} + */ + showContextMenu?: boolean; + } + + export interface DragTooltip { + + /** Specifies whether to show tooltip while dragging a row. + * @Default {true} + */ + showTooltip?: boolean; + + /** Option to add field names whose corresponding values in the dragged row needs to be shown in the preview tooltip. + * @Default {[]} + */ + tooltipItems?: any[]; + + /** Custom template for that tooltip that is shown while dragging a row. + * @Default {null} + */ + tooltipTemplate?: string; + } + + export interface EditSettings { + + /** Enables or disables the button to add new row in context menu as well as in toolbar. + * @Default {true} + */ + allowAdding?: boolean; + + /** Enables or disables the button to delete the selected row in context menu as well as in toolbar. + * @Default {true} + */ + allowDeleting?: boolean; + + /** Enables or disables the ability to edit a row or cell. + * @Default {false} + */ + allowEditing?: boolean; + + /** Specifies the mouse action whether single click or double click to begin the editing + * @Default {ej.TreeGrid.BeginEditAction.DblClick} + */ + beginEditAction?: ej.TreeGrid.BeginEditAction|string; + + /** specifies the edit mode in TreeGrid , "cellEditing" is for cell type editing and "rowEditing" is for entire row. + * @Default {ej.TreeGrid.EditMode.CellEditing} + */ + editMode?: ej.TreeGrid.EditMode|string; + + /** Specifies the position where the new row has to be added. + * @Default {top} + */ + rowPosition?: ej.TreeGrid.RowPosition|string; + + /** Specifies the template ID for the custom dialog. + * @Default {null} + */ + dialogEditorTemplateID?: string; + } + + export interface ColumnResizeSettings { + + /** Specifies the mode for column resizing + * @Default {ej.TreeGrid.ColumnResizeMode.Normal} + */ + columnResizeMode?: ej.TreeGrid.ColumnResizeMode|string; + } + + export interface FilterSettingsFilteredColumn { + + /** Specifies the value to be filtered in TreeGrid. + */ + value?: string; + + /** Specifies the field where filtering has to be performed. + */ + field?: string; + + /** Specifies the predicate(and/or) value to perform filtering. + */ + predicate?: string; + + /** Specifies the filter condition to filtered column. See operator + */ + operator?: string; + } + + export interface FilterSettings { + + /** Specifies the mode on which column filtering should start + * @Default {immediate} + */ + filterBarMode?: string; + + /** Specifies the type of column filtering. + * @Default {ej.TreeGrid.FilterType.FilterBar} + */ + filterType?: ej.TreeGrid.FilterType|string; + + /** Specifies the column collection for filtering the TreeGrid content on initial load + * @Default {[]} + */ + filteredColumns?: FilterSettingsFilteredColumn[]; + } + + export interface PageSettings { + + /** Using this property we can specify the number of pages should pager contains, according to this count TreeGrid height will be updated. + * @Default {8} + */ + pageCount?: number; + + /** This specifies the number of rows to display in each page. + * @Default {12} + */ + pageSize?: number; + + /** Get the value of records which is bound to TreeGrid. The totalRecordsCount value is calculated based on the datasource bound to TreeGrid. + * @Default {null} + */ + totalRecordsCount?: number; + + /** Specifies the current page to display at load time. + * @Default {1} + */ + currentPage?: number; + + /** Specifies the mode of record count in a page, whether it should count all the records or the root to count zero level parent records. + * @Default {ej.TreeGrid.PageSizeMode.All} + */ + pageSizeMode?: ej.TreeGrid.PageSizeMode|string; + + /** Specifies the mode of printing the control, whether it should print the all the records or the current page content. + * @Default {ej.TreeGrid.PrintMode.AllPages} + */ + printMode?: ej.TreeGrid.PrintMode|string; + + /** Specifies the Custom template for Pager control. + * @Default {null} + */ + template?: string; + } + + export interface SelectedCellIndex { + + /** Specifies the row index of the cell to be selected in TreeGrid control + */ + rowIndex?: number; + + /** Specifies the cell index to be selected in the row. + * @Default { } + */ + cellIndex?: number; + } + + export interface SelectionSettings { + + /** Specifies the type of selection whether to select row or cell. + * @Default {ej.TreeGrid.SelectionMode.Row} + */ + selectionMode?: ej.TreeGrid.SelectionMode|string; + + /** Specifies the type of selection whether single, multiple or checkbox. + * @Default {ej.TreeGrid.SelectionType.Single} + */ + selectionType?: ej.TreeGrid.SelectionType|string; + + /** Enables or disables the selection by hierarchy in check box selection + * @Default {true} + */ + enableHierarchySelection?: boolean; + + /** Toggles the visibility of the checkbox in column header, using which all the check boxes can be selected or unselected. + * @Default {true} + */ + enableSelectAll?: boolean; + } + + export interface SummaryRowsSummaryColumn { + + /** Specifies the summary type to perform calculations in a corresponding summary column. See summaryType. + */ + summaryType?: ej.TreeGrid.SummaryType|string; + + /** Specifies summary column used to perform the summary calculation. + */ + dataMember?: string; + + /** Specifies the required column to display the summary. + */ + displayColumn?: string; + + /** Specifies the text to be displayed before the summary column value. + */ + prefix?: string; + + /** Specifies the text to be displayed after the summary column value. + */ + suffix?: string; - ///Sets Five minute intervals per hour. - FiveMinutes, + /** Specifies the format to be applied on the summary column value. + */ + format?: string; + } - ///Sets fifteen minute intervals per hour. - FifteenMinutes, + export interface SummaryRow { - ///Sets thirty minute intervals per hour. - ThirtyMinutes - } + /** Specifies the title for summary row collection in TreeGrid + */ + title?: string; + /** Specifies the summary columns in the summary rows. + */ + summaryColumns?: SummaryRowsSummaryColumn[]; + } - enum ScheduleHeaderType { + export interface SizeSettings { - ///Sets year Schedule Mode. - Year, + /** Height of the TreeGrid. + * @Default {null} + */ + height?: string; - ///Sets month Schedule Mode. - Month, + /** Width of the TreeGrid. + * @Default {null} + */ + width?: string; + } - ///Sets week Schedule Mode. - Week, + export interface SortSettingsSortedColumn { - ///Sets day Schedule Mode. - Day, + /** Specifies the field to be sorted in TreeGrid + */ + field?: string; - ///Sets hour Schedule Mode. - Hour - } + /** Specifies the sort direction in TreeGrid + */ + direction?: string; + } + export interface SortSettings { - enum TimescaleRoundMode { + /** Option to add columns based on which the rows have to be sorted recursively. + * @Default {[]} + */ + sortedColumns?: SortSettingsSortedColumn[]; + } - ///The round-off value will be automatically calculated based on the data source values. - Auto, + export interface ToolbarSettingsCustomToolbarItem { - ///Schedule header start date will round-off to the immediate week. - Week, + /** Allows the user to insert the custom icons in toolbar using CSS class name selector. + */ + text?: string; - ///Schedule headers start date will round off to the immediate month - Month, + /** Allows the user to insert the custom icons in toolbar using script templates. Using this property we can bind HTML elements and other EJ controls to TreeGrid toolbar. + */ + templateID?: string; - ///Schedule headers start date will round off to the immediate year - Year - } + /** Allows the user to display custom tooltip text for TreeGrid custom toolbar items. + */ + tooltipText?: string; + } + export interface ToolbarSettings { - enum SelectionMode { + /** Shows/hides the toolbar. + * @Default {false} + */ + showToolbar?: boolean; - ///you can select a row. - Row, + /** Specifies the list of toolbar items to be rendered in TreeGrid toolbar + * @Default {[]} + */ + toolbarItems?: any[]; - ///you can select a cell. - Cell - } + /** Allows the user to insert custom toolbar items. + */ + customToolbarItems?: ToolbarSettingsCustomToolbarItem[]; + } + enum EditingType { - enum workingTimeScale { + ///It Specifies String edit type. + String, - ///Sets eight hour timescale. - TimeScale8Hours, + ///It Specifies Boolean edit type. + Boolean, - ///Sets twenty four hour timescale. - TimeScale24Hours - } + ///It Specifies Numeric edit type. + Numeric, - } + ///It Specifies Dropdown edit type. + Dropdown, - class ReportViewer extends ej.Widget { - static fn: ReportViewer; - constructor(element: JQuery | Element, options?: ReportViewer.Model); - static Locale: any; - model: ReportViewer.Model; - defaults: ReportViewer.Model; + ///It Specifies DatePicker edit type. + DatePicker, - /** Export the report to the specified format. - * @returns {void} - */ - exportReport(): void; + ///It Specifies DateTimePicker edit type. + DateTimePicker, - /** Fit the report page to the container. - * @returns {void} - */ - fitToPage(): void; + ///It Specifies Maskedit edit type. + Maskedit + } - /** Fit the report page height to the container. - * @returns {void} - */ - fitToPageHeight(): void; - /** Fit the report page width to the container. - * @returns {void} - */ - fitToPageWidth(): void; + enum ClipMode { - /** Get the available datasets name of the rdlc report. - * @returns {void} - */ - getDataSetNames(): void; + ///Shows ellipsis for the overflown cell. + Ellipsis, - /** Get the available parameters of the report. - * @returns {void} - */ - getParameters(): void; + ///Truncate the text in the cell. + Clip + } - /** Navigate to first page of report. - * @returns {void} - */ - gotoFirstPage(): void; - /** Navigate to last page of the report. - * @returns {void} - */ - gotoLastPage(): void; - - /** Navigate to next page from the current page. - * @returns {void} - */ - gotoNextPage(): void; - - /** Go to specific page index of the report. - * @returns {void} - */ - gotoPageIndex(): void; - - /** Navigate to previous page from the current page. - * @returns {void} - */ - gotoPreviousPage(): void; - - /** Print the report. - * @returns {void} - */ - print(): void; - - /** Apply print layout to the report. - * @returns {void} - */ - printLayout(): void; - - /** Refresh the report. - * @returns {void} - */ - refresh(): void; - } - export namespace ReportViewer { - - export interface Model { - - /** Gets or sets the list of data sources for the RDLC report. - * @Default {[]} - */ - dataSources?: DataSource[]; - - /** Enables or disables the page cache of report. - * @Default {false} - */ - enablePageCache?: boolean; - - /** Specifies the export settings. - */ - exportSettings?: ExportSettings; - - /** When set to true, adapts the report layout to fit the screen size of devices on which it renders. - * @Default {true} - */ - isResponsive?: boolean; - - /** Specifies the locale for report viewer. - * @Default {en-US} - */ - locale?: string; - - /** Specifies the page settings. - */ - pageSettings?: PageSettings; - - /** Gets or sets the list of parameters associated with the report. - * @Default {[]} - */ - parameters?: Parameter[]; - - /** Enables and disables the print mode. - * @Default {false} - */ - printMode?: boolean; - - /** Specifies the print option of the report. - * @Default {ej.ReportViewer.PrintOptions.Default} - */ - printOptions?: ej.ReportViewer.PrintOptions | string; - - /** Specifies the processing mode of the report. - * @Default {ej.ReportViewer.ProcessingMode.Remote} - */ - processingMode?: ej.ReportViewer.ProcessingMode | string; - - /** Specifies the render layout. - * @Default {ej.ReportViewer.RenderMode.Default} - */ - renderMode?: ej.ReportViewer.RenderMode | string; - - /** Gets or sets the path of the report file. - * @Default {empty} - */ - reportPath?: string; - - /** Gets or sets the reports server URL. - * @Default {empty} - */ - reportServerUrl?: string; - - /** Specifies the report Web API service URL. - * @Default {empty} - */ - reportServiceUrl?: string; - - /** Specifies the toolbar settings. - */ - toolbarSettings?: ToolbarSettings; - - /** Gets or sets the zoom factor for report viewer. - * @Default {1} - */ - zoomFactor?: number; - - /** Fires when the report viewer is destroyed successfully.If you want to perform any operation after destroying the reportviewer control,you can make use of the destroy event. */ - destroy?(e: DestroyEventArgs): void; + enum HeaderTextOverflow { - /** Fires during drill through action done in report.If you want to perform any operation when a drill through action is performed, you can make use of the drillThrough event. */ - drillThrough?(e: DrillThroughEventArgs): void; - - /** Fires before report rendering is completed.If you want to perform any operation before the rendering of report,you can make use of the renderingBegin event. */ - renderingBegin?(e: RenderingBeginEventArgs): void; + ///You can disable the word wrap + None, - /** Fires after report rendering completed.If you want to perform any operation after the rendering of report,you can make use of this renderingComplete event. */ - renderingComplete?(e: RenderingCompleteEventArgs): void; + ///You can wrap the header content + Wrap + } - /** Fires when any error occurred while rendering the report.If you want to perform any operation when an error occurs in the report, you can make use of the reportError event. */ - reportError?(e: ReportErrorEventArgs): void; - /** Fires when the report is being exported.If you want to perform any operation before exporting of report, you can make use of the reportExport event. */ - reportExport?(e: ReportExportEventArgs): void; + enum BeginEditAction { - /** Fires when the report is loaded.If you want to perform any operation after the successful loading of report, you can make use of the reportLoaded event. */ - reportLoaded?(e: ReportLoadedEventArgs): void; + ///you can begin the editing at double click + DblClick, - /** Fires when click the View Report Button. */ - viewReportClick?(e: ViewReportClickEventArgs): void; - } + ///you can begin the editing at single click + Click + } - export interface DestroyEventArgs { - /** true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + enum EditMode { - /** returns the report model. - */ - model?: any; + ///you can edit a cell. + CellEditing, - /** returns the name of the event. - */ - type?: string; - } + ///you can edit a row. + RowEditing, - export interface DrillThroughEventArgs { + ///you can edit a row in dialog form. + DialogEditing + } - /** true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the actionInfo's parameters bookmarkLink, hyperLink, reportName, parameters. - */ - actionInfo?: any; + enum RowPosition { - /** returns the report model. - */ - model?: any; + ///you can add a new row at top. + Top, - /** returns the name of the event. - */ - type?: string; - } + ///you can add a new row at bottom. + Bottom, - export interface RenderingBeginEventArgs { + ///you can add a new row to above selected row. + Above, - /** true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///you can add a new row to below selected row. + Below, - /** returns the report model. - */ - model?: any; + ///you can add a new row as a child for selected row. + Child + } - /** returns the name of the event. - */ - type?: string; - } - export interface RenderingCompleteEventArgs { + enum ColumnResizeMode { - /** true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///At load time column are rendered with given width value, while resizing the column only current column width is changed + FixedColumns, - /** returns the report model. - */ - model?: any; + ///At load time columns are stretched with control width,while resizing the column, current column width updated based on next column + Normal, - /** returns the name of the event. - */ - type?: string; + ///In this mode columns are stretched with control width in load time and on resizing action. + NextColumn + } - /** returns the collection of parameters. - */ - reportParameters?: any; - } - export interface ReportErrorEventArgs { + enum FilterType { - /** true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///Enables the filterbar filtering + FilterBar, - /** returns the error details. - */ - error?: string; + ///Enables the menu filtering + Menu + } - /** returns the report model. - */ - model?: any; - /** returns the name of the event. - */ - type?: string; - } + enum PageSizeMode { - export interface ReportExportEventArgs { + ///To count all the parent and child records. + All, - /** true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///To count the Zeroth level parent records. + Root + } - /** returns the report model. - */ - model?: any; - /** returns the name of the event. - */ - type?: string; - } + enum PrintMode { - export interface ReportLoadedEventArgs { + ///To print all the pages + AllPages, - /** true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///To print only the current page content. + CurrentPage + } - /** returns the report model. - */ - model?: any; - /** returns the name of the event. - */ - type?: string; - } + enum SelectionMode { - export interface ViewReportClickEventArgs { - - /** true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the parameter collection. - */ - parameters?: any; - - /** returns the report model. - */ - model?: any; - - /** returns the name of the event. - */ - type?: string; - } - - export interface DataSource { - - /** Gets or sets the name of the data source. - * @Default {empty} - */ - name?: string; - - /** Gets or sets the values of data source. - * @Default {[]} - */ - values?: any[]; - } + ///you can select a row. + Row, - export interface ExportSettings { + ///you can select a cell. + Cell + } - /** Specifies the export formats. - * @Default {ej.ReportViewer.ExportOptions.All} - */ - exportOptions?: ej.ReportViewer.ExportOptions | string; - /** Specifies the excel export format. - * @Default {ej.ReportViewer.ExcelFormats.Excel97to2003} - */ - excelFormat?: ej.ReportViewer.ExcelFormats | string; + enum SelectionType { - /** Specifies the word export format. - * @Default {ej.ReportViewer.WordFormats.Doc} - */ - wordFormat?: ej.ReportViewer.WordFormats | string; - } + ///you can select a single row. + Single, - export interface PageSettings { + ///you can select a multiple row. + Multiple, - /** Specifies the print layout orientation. - * @Default {null} - */ - orientation?: ej.ReportViewer.Orientation | string; + ///you can select rows using checkbox. + Checkbox + } - /** Specifies the paper size of print layout. - * @Default {null} - */ - paperSize?: ej.ReportViewer.PaperSize | string; - } - export interface Parameter { + enum SummaryType { - /** Gets or sets the parameter labels. - * @Default {null} - */ - labels?: any[]; + ///Displays the sum of summary column + Sum, - /** Gets or sets the name of the parameter. - * @Default {empty} - */ - name?: string; + ///Displays the average of summary column + Average, - /** Gets or sets whether the parameter allows nullable value or not. - * @Default {false} - */ - nullable?: boolean; + ///Displays the maximum value of summary column + Maximum, - /** Gets or sets the prompt message associated with the specified parameter. - * @Default {empty} - */ - prompt?: string; + ///Displays the minimum value of summary column + Minimum, - /** Gets or sets the parameter values. - * @Default {[]} - */ - values?: any[]; - } + ///Displays the total count of summary column + Count, - export interface ToolbarSettings { + ///Displays the minimum date value in summary column + MinimumDate, - /** Fires when user click on toolbar item in the toolbar. - * @Default {empty} - */ - click?: string; + ///Displays the maximum date value in summary column + MaximumDate, - /** Specifies the toolbar items. - * @Default {ej.ReportViewer.ToolbarItems.All} - */ - items?: ej.ReportViewer.ToolbarItems | string; + ///Displays the true count value for boolean summary columns + TrueCount, - /** Shows or hides the toolbar. - * @Default {true} - */ - showToolbar?: boolean; + ///Displays the false count value for boolean summary columns + FalseCount + } - /** Shows or hides the tooltip of toolbar items. - * @Default {true} - */ - showTooltip?: boolean; + } - /** Specifies the toolbar template ID. - * @Default {empty} - */ - templateId?: string; - } + class GroupButton extends ej.Widget { + static fn: GroupButton; + constructor(element: JQuery | Element, options?: GroupButton.Model); + static Locale: any; + model: GroupButton.Model; + defaults: GroupButton.Model; - enum ExportOptions { + /** Remove the selection state of the specified the button element from the GroupButton + * @param {JQuery} Specific button element + * @returns {void} + */ + deselectItem(element: JQuery): void; - ///Specifies the All property in ExportOptions to get all available options. - All, + /** Destroy the GroupButton widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; - ///Specifies the PDF property in ExportOptions to get PDF option. - PDF, + /** Disables the GroupButton control + * @returns {void} + */ + disable(): void; - ///Specifies the Word property in ExportOptions to get Word option. - Word, + /** Disable the specified button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + disableItem(element: JQuery): void; - ///Specifies the Excel property in ExportOptions to get Excel option. - Excel, + /** Enables the disabled ejGroupButton control. + * @returns {void} + */ + enable(): void; - ///Specifies the HTML property in ExportOptions to get HTML option. - HTML - } + /** Enable the specified disabled button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + enableItem(element: JQuery): void; + + /** Returns the index value for specified button element in the GroupButton control. + * @param {JQuery} Specific button element + * @returns {number} + */ + getIndex(element: JQuery): number; + + /** This method returns the list of active state button elements from the GroupButton control. + * @returns {any} + */ + getSelectedItem(): any; + + /** Hides the GroupButton control + * @returns {void} + */ + hide(): void; + + /** Hide the specified button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + hideItem(element: JQuery): void; + + /** Returns the disabled state of the specified element button element in GroupButton as Boolean. + * @returns {boolean} + */ + isDisabled(): boolean; + + /** Returns the state of the specified button element as Boolean. + * @returns {boolean} + */ + isSelected(): boolean; + + /** Public method used to select the specified button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + selectItem(element: JQuery): void; + + /** Shows the GroupButton control, if its hide. + * @returns {void} + */ + show(): void; + + /** Show the specified hidden button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + showItem(element: JQuery): void; + } + export namespace GroupButton { + + export interface Model { + + /** Sets the specified class to GroupButton wrapper element, which allows for custom skinning option in ejGroupButton control. + */ + cssClass?: string; + + /** To set the local JSON data, define a JSON array and initialize the GroupButton with dataSource property. Specify the column names in the fields property. + * @Default {null} + */ + dataSource?: any; + + /** Displays the ejGroupButton in Right to Left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /** Used to enable or disable the ejGroupButton control. + * @Default {true} + */ + enabled?: boolean; + + /** Gets or sets a value that indicates to display the values of the data. + * @Default {null} + */ + fields?: any; + + /** Sets the GroupButton behavior to works as Checkbox mode/ radio button mode based on the specified option. + * @Default {ej.GroupButtonMode.RadioButton} + */ + groupButtonMode?: ej.GroupButtonMode|string; + + /** Used to sets the height of the ejGroupButton control. + * @Default {28} + */ + height?: string|number; + + /** Defines the characteristics of the ejGroupButton control and extend the capability of an HTML element by adding specified attributes to element tag and by performing the related + * actions + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specify the orientation of the GroupButton. See below to get available orientations + * @Default {ej.Orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /** Query the dataSource from the table for Groupbutton + * @Default {null} + */ + query?: any; + + /** Sets the list of button elements to be selected. To enable this option groupButtonMode should be in “checkbox” mode. + * @Default {[]} + */ + selectedItemIndex?: number[]|string[]; + + /** Sets the rounder corner to the GroupButton, if sets as true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies the size of the button. See available size + * @Default {ej.ButtonSize.Normal} + */ + size?: ej.ButtonSize|string; + + /** Defines the width of the ejGroupButton control. + */ + width?: string|number; + + /** Triggered before any button element in the GroupButton get selected. + */ + beforeSelect?(e: BeforeSelectEventArgs): void; + + /** Fires after GroupButton control is created.If the user want to perform any operation after the button control creation then the user can make use of this create event. + */ + create?(e: CreateEventArgs): void; + + /** Fires when the GroupButton is destroyed successfully.If the user want to perform any operation after the destroy button control then the user can make use of this destroy event. + */ + destroy?(e: DestroyEventArgs): void; + + /** Triggered once the key is pressed, when the control is in focused state. + */ + keyPress?(e: KeyPressEventArgs): void; + + /** Triggered when the button element get selected. + */ + select?(e: SelectEventArgs): void; + } + + export interface BeforeSelectEventArgs { + + /** Boolean value based on whether the button element is disabled or not. + */ + disabled?: boolean; + + /** Returns the selection button element. + */ + element?: any; + + /** Event object + */ + event?: any; + + /** Return the button element ID. + */ + id?: string; + + /** Button item index. + */ + index?: number; + + /** returns the button model + */ + model?: ej.GroupButton.Model; + + /** Boolean value based on whether the button element is selected or not. + */ + selected?: boolean; + + /** returns the name of the event + */ + type?: string; + /** return the button state + */ + status?: boolean; + } - enum ExcelFormats { + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the GroupButton model + */ + model?: ej.GroupButton.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the GroupButton model + */ + model?: ej.GroupButton.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface KeyPressEventArgs { + + /** Boolean value based on whether the button element is disabled or not. + */ + disabled?: boolean; + + /** Returns the selection button element. + */ + element?: any; + + /** Event object + */ + event?: any; + + /** Return the button element ID. + */ + id?: string; + + /** Button item index. + */ + index?: number; + + /** returns the button model + */ + model?: ej.GroupButton.Model; + + /** Boolean value based on whether the button element is selected or not. + */ + selected?: boolean; + + /** returns the name of the event + */ + type?: string; + + /** return the button state + */ + status?: boolean; + } + + export interface SelectEventArgs { + + /** Boolean value based on whether the selected button element is disabled or not. + */ + disabled?: boolean; + + /** Returns the selection button element. + */ + element?: any; + + /** Event object + */ + event?: any; + + /** Return the selected button element ID. + */ + id?: string; + + /** Selected button item index. + */ + index?: number; + + /** returns the button model + */ + model?: ej.GroupButton.Model; + + /** Boolean value based on whether the button element is selected or not. + */ + selected?: boolean; + + /** returns the name of the event + */ + type?: string; + + /** return the button state + */ + status?: boolean; + } + } + enum GroupButtonMode { + //Sets the GroupButton to work as checkbox mode + CheckBox, + //Sets the RadioButton to work as radio button mode + RadioButton, + } + + class NavigationDrawer extends ej.Widget { + static fn: NavigationDrawer; + constructor(element: JQuery | Element, options?: NavigationDrawer.Model); + static Locale: any; + model: NavigationDrawer.Model; + defaults: NavigationDrawer.Model; + + /** To close the navigation drawer control + * @returns {void} + */ + close(): void; + + /** To load AJAX content into NavigationDrawer container. + * @returns {void} + */ + loadContent(): void; + + /** To open the navigation drawer control + * @returns {void} + */ + open(): void; + + /** To Toggle the navigation drawer control + * @returns {void} + */ + toggle(): void; + } + export namespace NavigationDrawer { + + export interface Model { + + /** Specifies the ajaxSettings option to load the content to the NavigationDrawer control. + * @Default {null} + */ + ajaxSettings?: AjaxSettings; + + /** Specifies the contentId for navigation drawer, where the AJAX content need to updated + * @Default {null} + */ + contentId?: string; + + /** Sets the root class for NavigationDrawer theme. This cssClass API helps to use custom skinning option for NavigationDrawer control. By defining the root class using this API, we + * need to include this root class in CSS. + */ + cssClass?: string; + + /** Sets the Direction for the control. See Direction + * @Default {left} + */ + direction?: ej.Direction|string; + + /** Sets the listview to be enabled or not + * @Default {false} + */ + enableListView?: boolean; + + /** Specifies the listview items as an array of object. + * @Default {[]} + */ + items?: any[]; + + /** Sets all the properties of listview to render in navigation drawer + */ + listViewSettings?: any; + + /** Specifies position whether it is in fixed or relative to the page. See Position + * @Default {normal} + */ + position?: string; + + /** Specifies the targetId for navigation drawer + */ + targetId?: string; + + /** Sets the rendering type of the control. See Type + * @Default {overlay} + */ + type?: string; + + /** Specifies the width of the control + * @Default {auto} + */ + width?: number; + + /** Navigation pane opened initially when isPaneOpen property is true. + * @Default {false} + */ + isPaneOpen?: boolean; + + /** Event triggers after the AJAX content loaded completely. + */ + ajaxComplete?(e: AjaxCompleteEventArgs): void; + + /** Event triggers when the AJAX request failed. + */ + ajaxError?(e: AjaxErrorEventArgs): void; + + /** Event triggers after the AJAX content loaded successfully. + */ + ajaxSuccess?(e: AjaxSuccessEventArgs): void; + + /** Event triggers before the control gets closed. + */ + beforeClose?(e: BeforeCloseEventArgs): void; + + /** Event triggers when the control open. + */ + open?(e: OpenEventArgs): void; + + /** Event triggers when the Swipe happens. + */ + swipe?(e: SwipeEventArgs): void; + } + + export interface AjaxCompleteEventArgs { + + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the name of the event. + */ + type?: string; + + /** returns the model value of the control. + */ + model?: ej.NavigationDrawer.Model; + } - ///Specifies the Excel97to2003 property in ExcelFormats to get specified version of exported format. - Excel97to2003, + export interface AjaxErrorEventArgs { - ///Specifies the Excel2007 property in ExcelFormats to get specified version of exported format. - Excel2007, + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - ///Specifies the Excel2010 property in ExcelFormats to get specified version of exported format. - Excel2010, + /** returns the name of the event. + */ + type?: string; - ///Specifies the Excel2013 property in ExcelFormats to get specified version of exported format. - Excel2013 - } + /** returns the model value of the control. + */ + model?: ej.NavigationDrawer.Model; + /** returns the error thrown in the AJAX post. + */ + errorThrown?: any; + + /** returns the status. + */ + textStatus?: any; + } + + export interface AjaxSuccessEventArgs { + + /** returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the name of the event. + */ + type?: string; + + /** returns the model value of the control. + */ + model?: ej.NavigationDrawer.Model; + + /** returns the AJAX current content. + */ + content?: string; - enum WordFormats { + /** returns the current URL of the AJAX post. + */ + URL?: string; + } + + export interface BeforeCloseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Navigation Drawer model + */ + model?: ej.NavigationDrawer.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface OpenEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Navigation Drawer model + */ + model?: ej.NavigationDrawer.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface SwipeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Navigation Drawer model + */ + model?: ej.NavigationDrawer.Model; + + /** returns the name of the event + */ + type?: string; + } + + export interface AjaxSettings { + + /** It specifies, whether to enable or disable asynchronous request. + */ + async?: boolean; + + /** It specifies the page will be cached in the web browser. + */ + cache?: boolean; + + /** It specifies the type of data is send in the query string. + */ + contentType?: string; + + /** It specifies the data as an object, will be passed in the query string. + */ + data?: any; + + /** It specifies the type of data that you're expecting back from the response. + */ + dataType?: string; + + /** It specifies the HTTP request type. + */ + type?: string; + } + } + + class RadialMenu extends ej.Widget { + static fn: RadialMenu; + constructor(element: JQuery | Element, options?: RadialMenu.Model); + static Locale: any; + model: RadialMenu.Model; + defaults: RadialMenu.Model; + + /** To hide the radialmenu + * @returns {void} + */ + hide(): void; + + /** To hide the radialmenu items + * @returns {void} + */ + hideMenu(): void; + + /** To Show the radial menu + * @returns {void} + */ + show(): void; + + /** To show menu items + * @returns {void} + */ + showMenu(): void; + + /** To enable menu item using index + * @param {number} Index of the Radialmenu to be enabled. + * @returns {void} + */ + enableItemByIndex(itemIndex: number): void; + + /** To enable menu items using indices + * @param {any[]} Index of the Radialmenu to be enabled. + * @returns {void} + */ + enableItemsByIndices(itemIndices: any[]): void; + + /** To disable menu item using index + * @param {number} Index of the Radialmenu to be disabled. + * @returns {void} + */ + disableItemByIndex(itemIndex: number): void; + + /** To disable menu items using indices + * @param {any[]} items of the Radialmenu to disable. + * @returns {void} + */ + disableItemsByIndices(itemIndices: any[]): void; + + /** To enable menu item using item text + * @param {string} item of the Radialmenu item to enable. + * @returns {void} + */ + enableItem(item: string): void; + + /** To disable menu item using item text + * @param {string} item of the Radialmenu item to disable. + * @returns {void} + */ + disableItem(item: string): void; + + /** To enable menu items using item texts + * @param {any[]} items of the Radialmenu item to enable. + * @returns {void} + */ + enableItems(items: any[]): void; + + /** To disable menu items using item texts + * @param {any[]} items of the Radialmenu item to disable. + * @returns {void} + */ + disableItems(items: any[]): void; + + /** To update menu item badge value + * @param {number} The index value to add the given items at the specified index. If index is not specified, the given value will not be updated. + * @param {number} The Value to be updated in the badge. It will be updated based on the given index + * @returns {void} + */ + updateBadgeValue(index: number, value: number): void; + + /** To show menu item badge + * @param {number} Index of the Radialmenu item to be shown badge. + * @returns {void} + */ + showBadge(index: number): void; + + /** To hide menu item badge + * @param {number} Index of the Radialmenu item to hide the badge. + * @returns {void} + */ + hideBadge(index: number): void; + } + export namespace RadialMenu { + + export interface Model { + + /** To show the Radial in initial render. + */ + autoOpen?: boolean; + + /** Renders the back button Image for Radial using class. + */ + backImageClass?: string; + + /** Sets the root class for RadialMenu theme. This cssClass API helps to use custom skinning option for RadialMenu control. By defining the root class using this API, we need to + * include this root class in CSS. + */ + cssClass?: string; + + /** To enable Animation for Radial Menu. + */ + enableAnimation?: boolean; + + /** Renders the Image for Radial using Class. + */ + imageClass?: string; + + /** Specify the items of radial menu + */ + items?: Item[]; + + /** Specifies the radius of radial menu + */ + radius?: number; + + /** To show the Radial while clicking given target element. + */ + targetElementId?: string; + + /** To set radial render position. + */ + position?: any; + + /** Event triggers when we click an item. + */ + click?(e: ClickEventArgs): void; + + /** Event triggers when the menu is opened. + */ + open?(e: OpenEventArgs): void; + + /** Event triggers when the menu is closed. + */ + close?(e: CloseEventArgs): void; + } + + export interface ClickEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialmenu model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the item of element + */ + item?: any; + + /** returns the name of item + */ + itemName?: string; + } + + export interface OpenEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialmenu model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface CloseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialmenu model + */ + model?: any; - ///Specifies the Doc property in WordFormats to get specified version of exported format. - Doc, + /** returns the name of the event + */ + type?: string; + } + + export interface ItemsBadge { + + /** Specifies whether to enable radialmenu item badge or not. + */ + enabled?: boolean; + + /** Specifies the value of radial menu item badge. + */ + value?: number; + } + + export interface ItemsSliderSettings { + + /** Specifies the sliderSettings ticks values of nested radial menu items. + */ + ticks?: any[]; + + /** Specifies the sliderSettings stroke Width value. + */ + strokeWidth?: number; + + /** Specifies the value of sliderSettings labelSpace . + */ + labelSpace?: number; + } + + export interface Item { + + /** Specify the URL of the frame background image for radial menu item. + */ + imageUrl?: string; + + /** Specifies the template property of RadialMenu for SVG icon. + */ + prependTo?: string; + + /** Specifies the text of RadialMenu item. + */ + text?: string; + + /** Specifies the enable state of RadialMenu item. + */ + enabled?: boolean; + + /** specify the click event to corresponding image/text for performing some specific action. + */ + click?: string; + + /** Specifies radialmenu item badges. + */ + badge?: ItemsBadge; + + /** Specifies the type of nested radial menu item. + */ + type?: string; + + /** Specifies the sliderSettings ticks for nested radial menu items. + */ + sliderSettings?: ItemsSliderSettings; + + /** Specifies to add sub level items . + */ + items?: any[]; + } + } + + class Tile extends ej.Widget { + static fn: Tile; + constructor(element: JQuery | Element, options?: Tile.Model); + static Locale: any; + model: Tile.Model; + defaults: Tile.Model; + + /** Update the image template of tile item to another one. + * @param {string} UpdateTemplate by using id + * @param {number} index of the tile + * @returns {void} + */ + updateTemplate(id: string, index: number): void; + } + export namespace Tile { + + export interface Model { + + /** Section for badge specific functionalities and it represents the notification for tile items. + */ + badge?: Badge; + + /** Section for caption specific functionalities and it represents the notification for tile items. + */ + caption?: Caption; + + /** Sets the root class for Tile theme. This cssClass API helps to use custom skinning option for Tile control. By defining the root class using this API, we need to include this root + * class in CSS. + */ + cssClass?: string; + + /** Saves current model value to browser cookies for state maintains. While refreshing the page retains the model value applies from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Customize the tile size height. + * @Default {null} + */ + height?: string|number; + + /** Specifies Tile imageClass, using this property we can give images for each tile through CSS classes. + * @Default {null} + */ + imageClass?: string; + + /** Specifies the position of tile image. + * @Default {center} + */ + imagePosition?: ej.Tile.ImagePosition|string; + + /** Specifies the tile image in outside of template content. + * @Default {null} + */ + imageTemplateId?: string; + + /** Specifies the URL of tile image. + * @Default {null} + */ + imageUrl?: string; + + /** Set the localization culture for Tile Widget. + */ + locale?: string; + + /** Section for liveTile specific functionalities. + */ + liveTile?: LiveTile; + + /** Specifies the size of a tile. See tileSize + * @Default {small} + */ + tileSize?: ej.Tile.TileSize|string; + + /** Customize the tile size width. + * @Default {null} + */ + width?: string|number; + + /** Sets the rounded corner to tile. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Sets allowSelection to tile. + * @Default {false} + */ + allowSelection?: boolean; + + /** Sets the background color to tile. + * @Default {null} + */ + backgroundColor?: string; + + /** Event triggers when the mouseDown happens in the tile + */ + mouseDown?(e: MouseDownEventArgs): void; + + /** Event triggers when the mouseUp happens in the tile + */ + mouseUp?(e: MouseUpEventArgs): void; + } + + export interface MouseDownEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the tile model + */ + model?: boolean; + + /** returns the name of the event + */ + type?: boolean; + + /** returns the current tile text + */ + text?: string; + + /** returns the index of current tile item + */ + index?: number; + } + + export interface MouseUpEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the tile model + */ + model?: boolean; + + /** returns the name of the event + */ + type?: boolean; + + /** returns the current tile text + */ + text?: boolean; + + /** returns the index of current tile item + */ + index?: number; + } + + export interface Badge { + + /** Specifies whether to enable badge or not. + * @Default {false} + */ + enabled?: boolean; + + /** Specifies maximum value for tile badge. + * @Default {100} + */ + maxValue?: number; + + /** Specifies minimum value for tile badge. + * @Default {1} + */ + minValue?: number; + + /** Specifies text instead of number for tile badge. + * @Default {null} + */ + text?: string; + + /** Sets value for tile badge. + * @Default {1} + */ + value?: number; - ///Specifies the Dot property in WordFormats to get specified version of exported format. - Dot, + /** Sets position for tile badge. + * @Default {“bottomright”} + */ + position?: ej.Tile.BadgePosition|string; + } - ///Specifies the DOCX property in WordFormats to get specified version of exported format. - DOCX, + export interface Caption { - ///Specifies the Word2007 property in WordFormats to get specified version of exported format. - Word2007, + /** Specifies whether the tile text to be shown or hidden. + * @Default {true} + */ + enabled?: boolean; - ///Specifies the Word2010 property in WordFormats to get specified version of exported format. - Word2010, + /** Changes the text of a tile. + * @Default {Text} + */ + text?: string; - ///Specifies the Word2013 property in WordFormats to get specified version of exported format. - Word2013, + /** It is used to align the text of a tile. + * @Default {normal} + */ + alignment?: ej.Tile.CaptionAlignment|string; - ///Specifies the Word2007Dotx property in WordFormats to get specified version of exported format. - Word2007Dotx, + /** It is used to specify the caption position like Inner top, inner bottom and outer. + * @Default {Innerbottom} + */ + position?: ej.Tile.CaptionPosition|string; - ///Specifies the Word2010Dotx property in WordFormats to get specified version of exported format. - Word2010Dotx, + /** sets the icon instead of text. + * @Default {null} + */ + icon?: string; + } - ///Specifies the Word2013Dotx property in WordFormats to get specified version of exported format. - Word2013Dotx, + export interface LiveTile { - ///Specifies the Word2007Docm property in WordFormats to get specified version of exported format. - Word2007Docm, + /** Specifies whether to enable liveTile or not. + * @Default {false} + */ + enabled?: boolean; - ///Specifies the Word2010Docm property in WordFormats to get specified version of exported format. - Word2010Docm, + /** Specifies liveTile images in CSS classes. + * @Default {null} + */ + imageClass?: any[]; - ///Specifies the Word2013Docm property in WordFormats to get specified version of exported format. - Word2013Docm, + /** Specifies liveTile images in templates. + * @Default {null} + */ + imageTemplateId?: any[]; - ///Specifies the Word2007Dotm property in WordFormats to get specified version of exported format. - Word2007Dotm, + /** Specifies liveTile images in CSS classes. + * @Default {null} + */ + imageUrl?: any[]; - ///Specifies the Word2010Dotm property in WordFormats to get specified version of exported format. - Word2010Dotm, + /** Specifies liveTile type for Tile. See orientation + * @Default {flip} + */ + type?: ej.Tile.liveTileType|string; - ///Specifies the Word2013Dotm property in WordFormats to get specified version of exported format. - Word2013Dotm, + /** Specifies time interval between two successive liveTile animation + * @Default {2000} + */ + updateInterval?: number; - ///Specifies the RTF property in WordFormats to get specified version of exported format. - RTF, + /** Sets the text to each living tile + * @Default {Null} + */ + text?: any[]; + } - ///Specifies the Txt property in WordFormats to get specified version of exported format. - Txt, + enum BadgePosition { - ///Specifies the EPUB property in WordFormats to get specified version of exported format. - EPUB, + ///To set the topright position of tile badge + Topright, - ///Specifies the HTML property in WordFormats to get specified version of exported format. - HTML, + ///To set the bottomright of tile badge + Bottomright + } - ///Specifies the XML property in WordFormats to get specified version of exported format. - XML, - ///Specifies the Automatic property in WordFormats to get specified version of exported format. - Automatic - } + enum CaptionAlignment { + ///To set the normal alignment of text in tile control + Normal, - enum Orientation { + ///To set the left alignment of text in tile control + Left, - ///Specifies the Landscape property in pageSettings.orientation to get specified layout. - Landscape, + ///To set the right alignment of text in tile control + Right, - ///Specifies the portrait property in pageSettings.orientation to get specified layout. - Portrait - } + ///To set the center alignment of text in tile control + Center + } - enum PaperSize { + enum CaptionPosition { - ///Specifies the A3 as value in pageSettings.paperSize to get specified size. - A3, + ///To set the inner top position of the tile text + Innertop, - ///Specifies the A4 as value in pageSettings.paperSize to get specified size. - Portrait, + ///To set the inner bottom position of the tile text + Innerbottom, - ///Specifies the B4(JIS) as value in pageSettings.paperSize to get specified size. - B4_JIS, + ///To set the outer position of the tile text + Outer + } - ///Specifies the B5(JIS) as value in pageSettings.paperSize to get specified size. - B5_JIS, - ///Specifies the Envelope #10 as value in pageSettings.paperSize to get specified size. - Envelope_10, + enum ImagePosition { - ///Specifies the Envelope as value in pageSettings.paperSize to get specified size. - Envelope_Monarch, + ///To set the center position of tile image + Center, - ///Specifies the Executive as value in pageSettings.paperSize to get specified size. - Executive, + ///To set the top center position of tile image + TopCenter, - ///Specifies the Legal as value in pageSettings.paperSize to get specified size. - Legal, + ///To set the bottom center position of tile image + BottomCenter, - ///Specifies the Letter as value in pageSettings.paperSize to get specified size. - Letter, + ///To set the right center position of tile image + RightCenter, - ///Specifies the Tabloid as value in pageSettings.paperSize to get specified size. - Tabloid, + ///To set the left center position of tile image + LeftCenter, - ///Specifies the Custom as value in pageSettings.paperSize to get specified size. - Custom - } + ///To set the topleft position of tile image + TopLeft, + ///To set the topright position of tile image + TopRight, - enum PrintOptions { + ///To set the bottomright position of tile image + BottomRight, - ///Specifies the Default property in printOptions. - Default, + ///To set the bottomleft position of tile image + BottomLeft, - ///Specifies the NewTab property in printOptions. - NewTab, + ///To set the fill position of tile image + Fill + } - ///Specifies the None property in printOptions. - None - } + enum liveTileType { - enum ProcessingMode { + ///To set flip type of liveTile for tile control + Flip, - ///Specifies the Remote property in processingMode. - Remote, + ///To set slide type of liveTile for tile control + Slide, - ///Specifies the Local property in processingMode. - Local - } + ///To set carousel type of liveTile for tile control + Carousel + } - enum RenderMode { + enum TileSize { - ///Specifies the Default property in RenderMode to get default output. - Default, + ///To set the medium size for tile control + Medium, - ///Specifies the Mobile property in RenderMode to get specified output. - Mobile, + ///To set the small size for tile control + Small, - ///Specifies the Desktop property in RenderMode to get specified output. - Desktop - } + ///To set the large size for tile control + Large, + ///To set the wide size for tile control + Wide + } - enum ToolbarItems { + } - ///Specifies the Print as value in ToolbarItems to get specified item. - Print, + class Signature extends ej.Widget { + static fn: Signature; + constructor(element: JQuery | Element, options?: Signature.Model); + static Locale: any; + model: Signature.Model; + defaults: Signature.Model; - ///Specifies the Refresh as value in ToolbarItems to get specified item. - Refresh, + /** Clears the strokes in the signature. + * @returns {void} + */ + clear(): void; - ///Specifies the Zoom as value in ToolbarItems to get specified item. - Zoom, + /** Destroys the signature widget. + * @returns {void} + */ + destroy(): void; - ///Specifies the FittoPage as value in ToolbarItems to get specified item. - FittoPage, + /** Disables the signature widget. + * @returns {void} + */ + disable(): void; - ///Specifies the Export as value in ToolbarItems to get specified item. - Export, + /** Enables the signature widget. + * @returns {void} + */ + enable(): void; - ///Specifies the PageNavigation as value in ToolbarItems to get specified item. - PageNavigation, + /** Hides the signature widget. + * @returns {void} + */ + hide(): void; - ///Specifies the Parameters as value in ToolbarItems to get specified item. - Parameters, + /** redo the last drawn stroke of the signature + * @returns {void} + */ + redo(): void; - ///Specifies the PrintLayout as value in ToolbarItems to get specified item. - PrintLayout, + /** used to save the drawn image. + * @param {string} The file name of the signature to be downloaded. + * @returns {void} + */ + save(Filename: string): void; - ///Specifies the PageSetup as value in ToolbarItems to get specified item. - PageSetup - } + /** Used to Show the signature widget, if it is already hided. + * @returns {void} + */ + show(): void; - } + /** undo the last drawn stroke of the signature. + * @returns {void} + */ + undo(): void; + } + export namespace Signature { - class TreeGrid extends ej.Widget { - static fn: TreeGrid; - constructor(element: JQuery | Element, options?: TreeGrid.Model); - static Locale: any; - model: TreeGrid.Model; - defaults: TreeGrid.Model; + export interface Model { - /** Add a new row in TreeGrid, while allowAdding is set to true - * @param {any} Item to add in TreeGrid row. - * @param {string} Defines in which position the row wants to be added - * @returns {void} - */ - addRow(data: any, rowPosition: string): void; - - /** To clear all the selection in TreeGrid - * @param {number} you can pass a row index to clear the row selection. - * @returns {void} - */ - clearSelection(index: number): void; - - /** To select cell based on the cell and row index dynamically. - * @param {Array} array of cell indexes to be select - * @param {boolean} Defines that we need to preserve the previously selected cells or not - * @returns {void} - */ - selectCells(Indexes: any[], preservePreviousSelectedCell: boolean): void; - - /** To rename a column with the specified name - * @param {number} Index of the column to be renamed - * @param {string} Header text of the column - * @returns {void} - */ - renameColumn(columnIndex: number, name: string): void; - - /** To delete the specified column - * @param {number} Index of the column to be deleted - * @returns {void} - */ - deleteColumn(columnIndex: number): void; - - /** To collapse all the parent items in tree grid - * @returns {void} - */ - collapseAll(): void; - - /** To hide the column by using header text - * @param {string} you can pass a header text of a column to hide. - * @returns {void} - */ - hideColumn(headerText: string): void; - - /** Expands the records at specific hierarchical level - * @param {number} you can pass the level as index number to expand - * @returns {void} - */ - expandAtLevel(index: number): void; - - /** Collapses the records at specific hierarchical level - * @param {number} you can pass the particular level as index. - * @returns {void} - */ - collapseAtLevel(index: number): void; - - /** To refresh the changes in tree grid - * @param {Array} Pass which data source you want to show in tree grid - * @param {any} Pass which data you want to show in tree grid - * @returns {void} - */ - refresh(dataSource: any[], query: any): void; - - /** Freeze all the columns preceding to the column specified by the field name. - * @param {string} Freeze all Columns before this field column. - * @returns {void} - */ - freezePrecedingColumns(field: string): void; - - /** Freeze/unfreeze the specified column. - * @param {string} Freeze/Unfreeze this field column. - * @param {boolean} Decides to Freeze/Unfreeze this field column. - * @returns {void} - */ - freezeColumn(field: string, isFrozen: boolean): void; - - /** To save the edited cell in TreeGrid - * @returns {void} - */ - saveCell(): void; - - /** To search an item with search string provided at the run time - * @param {string} you can pass a searchString to search the tree grid - * @returns {void} - */ - search(searchString: string): void; - - /** To show the column by using header text - * @param {string} you can pass a header text of a column to show. - * @returns {void} - */ - showColumn(headerText: string): void; - - /** To sorting the data based on the particular fields - * @param {string} you can pass a name of column to sort. - * @param {string} you can pass a sort direction to sort the column. - * @returns {void} - */ - sortColumn(columnName: string, columnSortDirection: string): void; - - /** To reorder the column with field name and target index values - * @param {string} you can pass a name of column to reorder. - * @param {string} you can pass a target column index to be inserted. - * @returns {void} - */ - reorderColumn(fieldName: string, targetIndex: string): void; - } - export namespace TreeGrid { - - export interface Model { - - /** Enables or disables the ability to resize the column width interactively. - * @Default {false} - */ - allowColumnResize?: boolean; - - /** Enables or disables the option for column reordering - * @Default {false} - */ - allowColumnReordering?: boolean; - - /** Enables or disables the ability to drag and drop the row interactively to reorder the rows. - * @Default {false} - */ - allowDragAndDrop?: boolean; - - /** Enables or disables the ability to filter the data on all the columns. Enabling this property will display a row with editor controls corresponding to each column. - * You can restrict filtering on particular column by disabling this property directly on that column instance itself. - * @Default {false} - */ - allowFiltering?: boolean; - - /** Enables or disables keyboard navigation. - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** Enables or disables the ability to sort the rows based on multiple columns/fields by clicking on each column header. Rows will be sorted recursively on clicking the column headers. - * @Default {false} - */ - allowMultiSorting?: boolean; - - /** Enables or disables the ability to select a row interactively. - * @Default {true} - */ - allowSelection?: boolean; - - /** Enables or disables the ability to sort the rows based on a single field/column by clicking on that column header. When enabled, rows can be sorted only by single field/column. - * @Default {false} - */ - allowSorting?: boolean; - - /** Enables/disables pagination of rows in TreeGrid - * @Default {false} - */ - allowPaging?: boolean; - - /** Specifies the id of the template that has to be applied for alternate rows. - */ - altRowTemplateID?: string; - - /** Specifies the mapping property path for sub tasks in datasource - */ - childMapping?: string; - - /** Option for adding columns; each column has the option to bind to a field in the dataSource. - */ - columns?: Column[]; - - /** To Specify the column fields to be displayed in the dialog while inserting a column using column menu. - * @Default {[]} - */ - columnDialogFields?: any[]; - - /** Options for displaying and customizing context menu items. - */ - contextMenuSettings?: ContextMenuSettings; - - /** Specify the CSS class for TreeGrid to achieve custom theme. - */ - cssClass?: string; - - /** Specifies hierarchical or self-referential data to populate the TreeGrid. - * @Default {null} - */ - dataSource?: any[]; - - /** Specifies whether to wrap the header text when it is overflown i.e., when it exceeds the header width. - * @Default {none} - */ - headerTextOverflow?: string; - - /** Options for displaying and customizing the tooltip. This tooltip will show the preview of the row that is being dragged. - */ - dragTooltip?: DragTooltip; - - /** Options for enabling and configuring the editing related operations. - */ - editSettings?: EditSettings; - - /** Specifies whether to render alternate rows in different background colors. - * @Default {true} - */ - enableAltRow?: boolean; - - /** Specifies whether to load all the rows in collapsed state when the TreeGrid is rendered for the first time. - * @Default {false} - */ - enableCollapseAll?: boolean; - - /** Specifies whether to resize TreeGrid whenever window size changes. - * @Default {false} - */ - enableResize?: boolean; - - /** Specifies whether to render only the visual elements that are visible in the UI. When you enable this property, it will reduce the loading time for loading large number of records. - * @Default {false} - */ - enableVirtualization?: boolean; - - /** Specifies the settings for column resize - */ - columnResizeSettings?: ColumnResizeSettings; - - /** Options for filtering and customizing filter actions. - */ - filterSettings?: FilterSettings; - - /** Specifies the localization information to customize the User Interface (UI) to support regional language and culture - * @Default {en-US} - */ - locale?: string; - - /** Enables or disables internal parsing of a row. When disabled this property, row will be displayed using the defined template without any internal event bindings. - * @Default {true} - */ - parseRowTemplate?: boolean; - - /** Specifies the name of the field in the dataSource, which contains the id of that row. - */ - idMapping?: string; - - /** Enables or disables the responsiveness of TreeGrid - * @Default {false} - */ - isResponsive?: boolean; - - /** Specifies the name of the field in the dataSource, which contains the parent's id. This is necessary to form a parent-child hierarchy, if the dataSource contains self-referential data. - */ - parentIdMapping?: string; - - /** Specifies the options for customizing the pager. - */ - pageSettings?: PageSettings; - - /** Specifies the template for cell tooltip - * @Default {null} - */ - cellTooltipTemplate?: string; - - /** Specifies ej.Query to select data from the dataSource. This property is applicable only when the dataSource is ej.DataManager. - * @Default {null} - */ - query?: any; - - /** Specifies the height of a single row in tree grid. Also, we need to set same height in the CSS style with class name e-rowcell. - * @Default {30} - */ - rowHeight?: number; - - /** Specifies the id of the template to be applied for all the rows. - */ - rowTemplateID?: string; - - /** Specifies the index of the selected row. - * @Default {-1} - */ - selectedRowIndex?: number; - - /** Specifies the settings for row and cell selection. - */ - selectionSettings?: SelectionSettings; - - /** Enables/disables the options for inserting , deleting and renaming columns. - * @Default {false} - */ - showColumnOptions?: boolean; - - /** Controls the visibility of the menu button, which is displayed on the column header. Clicking on this button will show a popup menu. When you choose Columns item from this popup, - * a list box with column names will be shown, from which you can select/deselect a column name to control the visibility of the respective columns. - * @Default {false} - */ - showColumnChooser?: boolean; - - /** Specifies the visibility of details view - * @Default {false} - */ - showDetailsRow?: boolean; - - /** Specifies the visibility of the expander column which is used to expand or collapse the details view - * @Default {false} - */ - showDetailsRowInfoColumn?: boolean; - - /** Specifies the template for details view - */ - detailsTemplate?: string; - - /** Specifies the row height of the details view - * @Default {100} - */ - detailsRowHeight?: number; + /** This property is used to set the background color for the signature. + * @Default {#ffffff} + */ + backgroundColor?: string; - /** Specifies the visibility of summary row - * @Default {false} - */ - showSummaryRow?: boolean; + /** This property is used to set the background image for the signature. + */ + backgroundImage?: string; + + /** Enables or disables the Signature textbox widget. + * @Default {true} + */ + enabled?: boolean; + + /** Sets the height of the Signature control. + * @Default {100%} + */ + height?: string; + + /** Enables/disables responsive support for the signature control (i.e) maintain the signature drawing during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /** Allows the type of the image format to be saved when the signature image is saved. + */ + saveImageFormat?: ej.Signature.SaveImageFormat|string; + + /** Allows the signature image to be saved along with its background. + * @Default {false} + */ + saveWithBackground?: boolean; + + /** Enables or disables rounded corner. + * @Default {true} + */ + showRoundedCorner?: boolean; + + /** Sets the stroke color for the stroke of the signature. + * @Default {#000000} + */ + strokeColor?: string; + + /** Sets the stroke width for the stroke of the signature. + * @Default {2} + */ + strokeWidth?: number; + + /** Sets the width of the Signature control. + * @Default {100%} + */ + width?: string; + + /** Triggers when the stroke is changed. + */ + change?(e: ChangeEventArgs): void; + + /** Triggered when the pointer is clicked or touched in the signature canvas. + */ + mouseDown?(e: MouseDownEventArgs): void; + + /** Triggered when the pointer is moved in the signature canvas. + */ + mouseMove?(e: MouseMoveEventArgs): void; + + /** Triggered when the pointer is released after click or touch in the signature canvas. + */ + mouseUp?(e: MouseUpEventArgs): void; + } + + export interface ChangeEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Instance of the signature model object. + */ + model?: ej.Signature.Model; + + /** Name of the event. + */ + type?: string; + + /** Gives the last stored image + */ + lastImage?: string; + } + + export interface MouseDownEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Instance of the signature model object. + */ + model?: ej.Signature.Model; + + /** Name of the event. + */ + type?: string; + + /** returns all the event values + */ + value?: any; + } + + export interface MouseMoveEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Instance of the signature model object. + */ + model?: ej.Signature.Model; + + /** Name of the event. + */ + type?: string; + + /** returns all the event values + */ + value?: any; + } + + export interface MouseUpEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Instance of the signature model object. + */ + model?: ej.Signature.Model; + + /** Name of the event. + */ + type?: string; + + /** returns all the event values + */ + value?: any; + } + + enum SaveImageFormat { + + ///To save the signature image with PNG format only. + PNG, + + ///To save the signature image with JPG format only. + JPG, + + ///To save the signature image with BMP format only. + BMP, + + ///To save the signature image with TIFF format only. + TIFF + } + + } + + class RadialSlider extends ej.Widget { + static fn: RadialSlider; + constructor(element: JQuery | Element, options?: RadialSlider.Model); + static Locale: any; + model: RadialSlider.Model; + defaults: RadialSlider.Model; + + /** To show the radialslider + * @returns {void} + */ + show(): void; + + /** To hide the radialslider + * @returns {void} + */ + hide(): void; + } + export namespace RadialSlider { + + export interface Model { + + /** To show the RadialSlider in initial render. + * @Default {false} + */ + autoOpen?: boolean; + + /** Sets the root class for RadialSlider theme. This cssClass API helps to use custom skinning option for RadialSlider control. By defining the root class using this API, we need to + * include this root class in CSS. + */ + cssClass?: string; + + /** To enable Animation for Radial Slider. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Enable/Disable the Roundoff property of RadialSlider + * @Default {true} + */ + enableRoundOff?: boolean; + + /** Specifies the endAngle value for radial slider circle. + * @Default {360} + */ + endAngle?: number; + + /** Specifies the inline for label show or not on given radius. + * @Default {false} + */ + inline?: boolean; + + /** Specifies innerCircleImageClass, using this property we can give images for center radial circle through CSS classes. + * @Default {null} + */ + innerCircleImageClass?: string; + + /** Specifies the file name of center circle icon + * @Default {null} + */ + innerCircleImageUrl?: string; + + /** Specifies the Space between the radial slider element and the label. + * @Default {30} + */ + labelSpace?: number; + + /** Specifies the radius of radial slider + * @Default {200} + */ + radius?: number; + + /** To show the RadialSlider inner circle. + * @Default {true} + */ + showInnerCircle?: boolean; + + /** Specifies the endAngle value for radial slider circle. + * @Default {0} + */ + startAngle?: number; + + /** Specifies the strokeWidth for customize the needle, outer circle and inner circle. + * @Default {2} + */ + strokeWidth?: number; + + /** Specifies the ticks value of radial slider + */ + ticks?: any[]; + + /** Specifies the value of radial slider + * @Default {10} + */ + value?: number; + + /** Event triggers when the change occurs. + */ + change?(e: ChangeEventArgs): void; + + /** Event triggers when the radial slider is created. + */ + create?(e: CreateEventArgs): void; + + /** Event triggers when the mouse pointer is dragged over the radial slider. + */ + mouseover?(e: MouseoverEventArgs): void; + + /** Event triggers when the Radial slider slides. + */ + slide?(e: SlideEventArgs): void; + + /** Event triggers when the radial slider starts. + */ + start?(e: StartEventArgs): void; + + /** Event triggers when the radial slider stops. + */ + stop?(e: StopEventArgs): void; + } + + export interface ChangeEventArgs { + + /** returns the Radialslider model + */ + model?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the initial value of Radial slider + */ + oldValue?: number; + + /** returns the name of the event + */ + type?: string; + + /** returns the current value of the Radial slider + */ + value?: number; + } + + export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface MouseoverEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model + */ + model?: any; + + /** returns the value selected + */ + selectedValue?: number; + + /** returns the name of the event + */ + type?: string; + + /** returns the current value selected in Radial slider + */ + value?: number; + } + + export interface SlideEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model + */ + model?: any; + + /** returns the value selected in Radial slider + */ + selectedValue?: number; + + /** returns the name of the event + */ + type?: string; + + /** returns the currently selected value + */ + value?: number; + } + + export interface StartEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the current value selected in Radial slider + */ + value?: number; + } + + export interface StopEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the current value selected in Radial slider + */ + value?: number; + } + } + + class Spreadsheet extends ej.Widget { + static fn: Spreadsheet; + constructor(element: JQuery | Element, options?: Spreadsheet.Model); + static Locale: any; + model: Spreadsheet.Model; + defaults: Spreadsheet.Model; + + /** This method is used to add custom formulas in Spreadsheet. + * @param {string} Pass the name of the formula. + * @param {string} Pass the name of the function. + * @returns {void} + */ + addCustomFormula(formulaName: string, functionName: string): void; + + /** This method is used to add a new sheet in the last position of the sheet container. + * @returns {void} + */ + addNewSheet(): void; + + /** It is used to clear all the data and format in the specified range of cells in Spreadsheet. + * @param {string|any[]} Optional. If range is specified, then it will clear all content in the specified range else it will use the current selected range. + * @returns {void} + */ + clearAll(range?: string|any[]): void; + + /** This property is used to clear all the formats applied in the specified range in Spreadsheet. + * @param {string|any[]} Optional. If range is specified, then it will clear all format in the specified range else it will use the current selected range. + * @returns {void} + */ + clearAllFormat(range?: string|any[]): void; + + /** Used to clear the applied border in the specified range in Spreadsheet. + * @param {string|any[]} Optional. If range is specified, then it will clear border in the specified range else it will use the current selected range. + * @returns {void} + */ + clearBorder(range?: string|any[]): void; + + /** This property is used to clear the contents in the specified range in Spreadsheet. + * @param {string|any[]} Optional. If the range is specified, then it will clear the content in the specified range else it will use the current selected range. + * @returns {void} + */ + clearContents(range?: string|any[]): void; + + /** This method is used to remove only the data in the range denoted by the specified range name. + * @param {string} Pass the defined rangeSettings property name. + * @returns {void} + */ + clearRange(rangeName: string): void; + + /** It is used to remove data in the specified range of cells based on the defined property. + * @param {any[]|string} Optional. If range is specified, it will clear data for the specified range else it will use the current selected range. + * @param {string} Optional. If property is specified, it will remove the specified property in the range else it will remove default properties + * @param {any} Optional. + * @param {boolean} Optional. pass {{'`true`' | markdownify}}, if you want to skip the hidden rows + * @param {any} Optional. Pass the status to perform undo and redo operation. + * @param {any} Optional. It specifies whether to skip element processing or not. + * @returns {void} + */ + clearRangeData(range?: any[]|string, property?: string, cells?: any, skipHiddenRow?: boolean, status?: any, skipCell?: any): void; + + /** This method is used to clear undo and redo collections in the Spreadsheet. + * @returns {void} + */ + clearUndoRedo(): void; + + /** This method is used to copy or move the sheets in Spreadsheet. + * @param {number} Pass the sheet index that you want to copy or move. + * @param {number} Pass the position index where you want to copy or move. + * @param {boolean} Pass {{'`true`' | markdownify}},If you want to copy sheet or else it will move sheet. + * @returns {void} + */ + copySheet(fromIdx: number, toIdx: number, isCopySheet: boolean): void; + + /** This method is used to delete the entire column which is selected. + * @param {number} Pass the start column index. + * @param {number} Pass the end column index. + * @returns {void} + */ + deleteEntireColumn(startCol: number, endCol: number): void; + + /** This method is used to delete the entire row which is selected. + * @param {number} Pass the start row index. + * @param {number} Pass the end row index. + * @returns {void} + */ + deleteEntireRow(startRow: number, endRow: number): void; + + /** This method is used to delete a particular sheet in the Spreadsheet. + * @param {number} Pass the sheet index to perform delete action. + * @returns {void} + */ + deleteSheet(idx: number): void; + + /** This method is used to delete the selected cells and shift the remaining cells to left. + * @param {any} Row index and column index of the starting cell. + * @param {any} Row index and column index of the ending cell. + * @returns {void} + */ + deleteShiftLeft(startCell: any, endCell: any): void; + + /** This method is used to delete the selected cells and shift the remaining cells up. + * @param {any} Row index and column index of the start cell. + * @param {any} Row index and column index of the end cell. + * @returns {void} + */ + deleteShiftUp(startCell: any, endCell: any): void; + + /** This method is used to edit data in the specified range of cells based on its corresponding rangeSettings. + * @param {string} Pass the defined rangeSettings property name. + * @param {() => void} Pass the function that you want to perform range edit. + * @returns {void} + */ + editRange(rangeName: string, fn: () => void): void; + + /** This method is used to get the activation panel in the Spreadsheet. + * @returns {HTMLElement} + */ + getActivationPanel(): HTMLElement; + + /** This method is used to get the active cell object in Spreadsheet. It will returns object which contains rowIndex and colIndex of the active cell. + * @param {number} Optional. If sheetIdx is specified, it will return the active cell object in specified sheet index else it will use the current sheet index + * @returns {any} + */ + getActiveCell(sheetIdx?: number): any; + + /** This method is used to get the active cell element based on the given sheet index in the Spreadsheet. + * @param {number} Optional. If sheetIndex is specified, it will return the active cell element in specified sheet index else it will use the current active sheet index. + * @returns {HTMLElement} + */ + getActiveCellElem(sheetIdx?: number): HTMLElement; + + /** This method is used to get the current active sheet index in Spreadsheet. + * @returns {number} + */ + getActiveSheetIndex(): number; + + /** This method is used to get the auto fill element in Spreadsheet. + * @returns {HTMLElement} + */ + getAutoFillElem(): HTMLElement; + + /** This method is used to get the cell element based on specified row and column index in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the column index. + * @param {number} Optional. Pass the sheet index that you want to get cell. + * @returns {HTMLElement} + */ + getCell(rowIdx: number, colIdx: number, sheetIdx?: number): HTMLElement; + + /** This method is used to get the data settings in the Spreadsheet. + * @param {number} Pass the sheet index. + * @returns {number} + */ + getDataSettings(sheetIdx: number): number; + + /** This method is used to get the frozen columns index in the Spreadsheet. + * @param {number} Pass the sheet index. + * @returns {number} + */ + getFrozenColumns(sheetIdx: number): number; + + /** This method is used to get the frozen row index in Spreadsheet. + * @param {number} Pass the sheet index. + * @returns {number} + */ + getFrozenRows(sheetIdx: number): number; + + /** This method is used to get the hyperlink data as object from the specified cell in Spreadsheet. + * @param {HTMLElement} Pass the DOM element to get hyperlink + * @returns {any} + */ + getHyperlink(cell: HTMLElement): any; + + /** This method is used to get all cell elements in the specified range. + * @param {string} Pass the range that you want to get the cells. + * @param {number} Pass the index of the sheet. + * @param {boolean} Optional. Pass {{'`true`' | markdownify}}, if you want to skip the hidden rows. + * @returns {HTMLElement} + */ + getRange(range: string, sheetIdx: number, skipHiddenRow?: boolean): HTMLElement; + + /** This method is used to get the data in specified range in Spreadsheet. + * @param {any} Optional. Pass the range, property, sheetIdx, valueOnly in options. + * @returns {any[]} + */ + getRangeData(options?: any): any[]; + + /** This method is used to get the range indices array based on the specified alpha range in Spreadsheet. + * @param {string} Pass the alpha range that you want to get range indices. + * @returns {any[]} + */ + getRangeIndices(range: string): any[]; + + /** This method is used to get the sheet details based on the given sheet index in Spreadsheet. + * @param {number} Pass the sheet index to get the sheet object. + * @returns {any} + */ + getSheet(sheetIdx: number): any; + + /** This method is used to get the sheet content div element of Spreadsheet. + * @param {number} Pass the sheet index to get the sheet content. + * @returns {HTMLElement} + */ + getSheetElement(sheetIdx: number): HTMLElement; + + /** This method is used to get all the sheets in workbook. + * @returns {any[]} + */ + getSheets(): any[]; + + /** This method is used to send a paging request to the specified sheet Index in the Spreadsheet. + * @param {number} Pass the sheet index to perform paging at specified sheet index + * @param {boolean} Pass {{'`true`' | markdownify}} to create a new sheet. If the specified sheet index is already exist, it navigate to that sheet else it create a new sheet. + * @returns {void} + */ + gotoPage(sheetIdx: number, newSheet: boolean): void; + + /** This method is used to hide the pivot table activationPanel in the Spreadsheet. + * @returns {void} + */ + hideActivationPanel(): void; + + /** This method is used to hide the entire columns from the specified range (startCol, endCol) in Spreadsheet. + * @param {number} Index of the start column. + * @param {number} Optional. Index of the end column. + * @returns {void} + */ + hideColumn(startCol: number, endCol: number): void; + + /** This method is used to hide the formula bar in Spreadsheet. + * @returns {void} + */ + hideFormulaBar(): void; + + /** This method is used to hide the rows, based on the specified row index in Spreadsheet. + * @param {number} Index of the start row. + * @param {number} Optional. Index of the end row. + * @returns {void} + */ + hideRow(startRow: number, endRow: number): void; + + /** This method is used to hide the sheet based on the specified sheetIndex or sheet name in the Spreadsheet. + * @param {string|number} Pass the sheet name or index that you want to hide. + * @returns {void} + */ + hideSheet(sheetIdx: string|number): void; + + /** This method is used to hide the displayed waiting pop-up in Spreadsheet. + * @returns {void} + */ + hideWaitingPopUp(): void; + + /** This method is used to insert a column before the active cell's column in the Spreadsheet. + * @param {number} Pass start column. + * @param {number} Pass end column. + * @returns {void} + */ + insertEntireColumn(startCol: number, endCol: number): void; + + /** This method is used to insert a row before the active cell's row in the Spreadsheet. + * @param {number} Pass start row. + * @param {number} Pass end row. + * @returns {void} + */ + insertEntireRow(startRow: number, endRow: number): void; + + /** This method is used to insert a new sheet to the left of the current active sheet. + * @returns {void} + */ + insertSheet(): void; + + /** This method is used to insert cells in the selected or specified range and shift remaining cells to bottom. + * @param {any} Row index and column index of the start cell. + * @param {any} Row index and column index of the end cell. + * @returns {void} + */ + insertShiftBottom(startCell: any, endCell: any): void; + + /** This method is used to insert cells in the selected or specified range and shift remaining cells to right. + * @param {any} Row index and column index of the start cell. + * @param {any} Row index and column index of the end cell. + * @returns {void} + */ + insertShiftRight(startCell: any, endCell: any): void; + + /** This method is used to import excel file manually by using form data. + * @param {any} Pass the form data object to import files manually. + * @returns {void} + */ + import(importRequest: any): void; + + /** This method is used to load JSON data in Spreadsheet. + * @param {any} Pass the response that you want to load. + * @returns {void} + */ + loadFromJSON(response: any): void; + + /** This method is used to lock/unlock the range of cells in active sheet. Lock cells are activated only after the sheet is protected. Once the sheet is protected it is unable to + * lock/unlock cells. + * @param {string|any[]} Pass the alpha range cells or array range of cells. + * @param {string} Optional. By default is {{'`true`' | markdownify}}. If it is {{'`false`' | markdownify}} locked cells are unlocked. + * @returns {void} + */ + lockCells(range: string|any[], isLocked?: string): void; + + /** This method is used to merge cells by across in the Spreadsheet. + * @param {string} Optional. To pass the cell range or selected cells are process. + * @param {boolean} Optional. If pass {{'`true`' | markdownify}} it does not show alert. + * @returns {void} + */ + mergeAcrossCells(range?: string, alertStatus?: boolean): void; + + /** This method is used to merge the selected cells in the Spreadsheet. + * @param {string|any[]} Optional. To pass the cell range or selected cells are process. + * @param {boolean} Optional. If pass {{'`true`' | markdownify}} it does not show alert. + * @returns {void} + */ + mergeCells(range?: string|any[], alertStatus?: boolean): void; + + /** This method is used to select a cell or range in the Spreadsheet. + * @param {any} Pass the start cell to perform selection. + * @param {any} Pass the end cell to perform selection. + * @returns {void} + */ + performSelection(startCell: any, endCell: any): void; + + /** This method is used to protect or unprotect active sheet. + * @param {boolean} Optional. By default is {{'`true`' | markdownify}}. If it is {{'`false`' | markdownify}} active sheet is unprotected. + * @returns {void} + */ + protectSheet(isProtected?: boolean): void; + + /** This method is used to refresh the content in Spreadsheet. + * @param {number} Pass the index of the sheet. + * @returns {void} + */ + refreshContent(sheetIdx: number): void; + + /** This method is used to refresh the Spreadsheet. + * @returns {void} + */ + refreshSpreadsheet(): void; + + /** This method is used to remove custom formulae in Spreadsheet. + * @param {string} Pass the name of the formula. + * @param {string} Pass the name of the function. + * @returns {void} + */ + removeCustomFormula(formulaName: string, functionName: string): void; + + /** This method is used to remove the hyperlink from selected cells of current sheet. + * @param {string} Hyperlink remove from the specified range. + * @param {boolean} Optional. If it is {{'`true`' | markdownify}}, It will clear link only not format. + * @param {boolean} Optional. Pass the status to perform undo and redo operations. + * @param {any} Optional. Pass the cells that you want to remove hyperlink. + * @param {boolean} Optional. Pass {{'`true`' | markdownify}}, if you want to skip the hidden rows. + * @returns {void} + */ + removeHyperlink(range: string, isClearHLink?: boolean, status?: boolean, cells?: any, skipHiddenRow?: boolean): void; + + /** This method is used to remove the range data and its defined rangeSettings property based on the specified range name. + * @param {string} Pass the defined rangeSetting property name. + * @returns {void} + */ + removeRange(rangeName: string): void; + + /** This method is used to remove the readonly option for the specified range. + * @param {string|any[]} Pass the range. + * @returns {void} + */ + removeReadOnly(range?: string|any[]): void; + + /** This method is used to save JSON data in Spreadsheet. + * @returns {any} + */ + saveAsJSON(): any; + + /** This method is used to save batch changes in Spreadsheet. + * @param {number} Pass the sheet index for Spreadsheet. + * @returns {void} + */ + saveBatchChanges(sheetIdx: number): void; + + /** This method is used to set the active cell in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the column index. + * @param {number} Pass the index of the sheet. + * @returns {void} + */ + setActiveCell(rowIdx: number, colIdx: number, sheetIdx: number): void; + + /** This method is used to set active sheet index for the Spreadsheet. + * @param {number} Pass the active sheet index for Spreadsheet. + * @returns {void} + */ + setActiveSheetIndex(sheetIdx: number): void; + + /** This method is used to set border for the specified range of cells in the Spreadsheet. + * @param {any} Pass the border properties that you want to set. + * @param {string} Optional. If range is specified, it will set border for the specified range else it will use the selected range. + * @returns {void} + */ + setBorder(property: any, range?: string): void; + + /** This method is used to set the height for the rows in the Spreadsheet. + * @param {any[]|any} Pass the row index and height of the rows. + * @returns {void} + */ + setHeightToRows(heightColl: any[]|any): void; + + /** This method is used to set the hyperlink in selected cells of the current sheet. + * @param {string|any[]} If range is specified, it will set the hyperlink in range of the cells. + * @param {any} Pass cellAddress or webAddress + * @param {number} If we pass cellAddress then which sheet to be navigate in the applied link. + * @returns {void} + */ + setHyperlink(range: string|any[], link: any, sheetIdx: number): void; + + /** This method is used to set the readonly option for the specified range. + * @param {string|any[]} Pass the range. + * @returns {void} + */ + setReadOnly(range?: string|any[]): void; + + /** This method is used to set the focus to the Spreadsheet. + * @returns {void} + */ + setSheetFocus(): void; + + /** This method is used to set the width for the columns in the Spreadsheet. + * @param {any[]|any} Pass the column index and width of the columns. + * @returns {void} + */ + setWidthToColumns(widthColl: any[]|any): void; + + /** This method is used to rename the active sheet. + * @param {string} Pass the sheet name that you want to change the current active sheet name. + * @returns {void} + */ + sheetRename(sheetName: string): void; + + /** This method is used to display the activationPanel for the specified range name. + * @param {string} Pass the range name that you want to display the activation panel. + * @returns {void} + */ + showActivationPanel(rangeName: string): void; + + /** This method is used to show the hidden columns within the specified range in the Spreadsheet. + * @param {number} Index of the start column. + * @param {number} Optional. Index of the end column. + * @returns {void} + */ + showColumn(startColIdx: number, endColIdx: number): void; + + /** This method is used to show the formula bar in Spreadsheet. + * @returns {void} + */ + showFormulaBar(): void; + + /** This method is used to show/hide gridlines in active sheet in the Spreadsheet. + * @param {boolean} Pass {{'`true`' | markdownify}} to show the gridlines + * @returns {void} + */ + showGridlines(status: boolean): void; + + /** This method is used to show/hide the headers in active sheet in the Spreadsheet. + * @param {boolean} Pass {{'`true`' | markdownify}} to show the sheet headers. + * @returns {void} + */ + showHeadings(startRow: boolean): void; + + /** This method is used to show/hide pager in the Spreadsheet. + * @param {boolean} Pass {{'`true`' | markdownify}} to show pager. + * @returns {void} + */ + showPager(status: boolean): void; + + /** This method is used to show the hidden rows in the specified range in the Spreadsheet. + * @param {number} Index of the start row. + * @param {number} Optional. Index of the end row. + * @returns {void} + */ + showRow(startRow: number, endRow: number): void; + + /** This method is used to show waiting pop-up in Spreadsheet. + * @returns {void} + */ + showWaitingPopUp(): void; + + /** This method is used to unhide the sheet based on specified sheet name or sheet index. + * @param {string|number} Pass the sheet name or index that you want to unhide. + * @returns {void} + */ + unhideSheet(sheetInfo: string|number): void; + + /** This method is used to unmerge the selected range of cells in the Spreadsheet. + * @param {string} Optional. If the range is specified, then it will un merge the specified range else it will use the current selected range. + * @returns {void} + */ + unmergeCells(range?: string): void; + + /** This method is used to unwrap the selected range of cells in the Spreadsheet. + * @param {any[]|string} Optional. If the range is specified, then it will update unwrap in the specified range else it will use the current selected range. + * @returns {void} + */ + unWrapText(range?: any[]|string): void; + + /** This method is used to update the data for the specified range of cells in the Spreadsheet. + * @param {any} Pass the cells data that you want to update. + * @param {any[]|string} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. + * @returns {void} + */ + updateData(data: any, range?: any[]|string): void; + + /** This method is used to update the formula bar in the Spreadsheet. + * @returns {void} + */ + updateFormulaBar(): void; + + /** This method is used to update the range of cells based on the specified settings which we want to update in the Spreadsheet. + * @param {number} Pass the sheet index that you want to update. + * @param {any} Pass the dataSource, startCell and showHeader values as settings. + * @returns {void} + */ + updateRange(sheetIdx: number, settings: any): void; + + /** This method is used to update the details for custom undo and redo operations. + * @param {any} Pass the details to update undo and redo collection + * @returns {void} + */ + updateUndoRedoCollection(details: any): void; + + /** This method is used to update the unique data for the specified range of cells in Spreadsheet. + * @param {any} Pass the data that you want to update in the particular range + * @param {any[]|string} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. + * @param {any} Optional. It specifies whether to skip element processing or not. + * @returns {void} + */ + updateUniqueData(data: any, range?: any[]|string, skipCell?: any): void; + + /** This method is used to wrap the selected range of cells in the Spreadsheet. + * @param {any[]|string} Optional. If the range is specified, then it will update wrap in the specified range else it will use the current selected range. + * @returns {void} + */ + wrapText(range?: any[]|string): void; + + XLCellType: Spreadsheet.XLCellType; + + XLCFormat: Spreadsheet.XLCFormat; + + XLChart: Spreadsheet.XLChart; + + XLClipboard: Spreadsheet.XLClipboard; + + XLComment: Spreadsheet.XLComment; + + XLCMenu: Spreadsheet.XLCMenu; + + XLDragDrop: Spreadsheet.XLDragDrop; + + XLDragFill: Spreadsheet.XLDragFill; + + XLEdit: Spreadsheet.XLEdit; + + XLExport: Spreadsheet.XLExport; + + /** This method is used to get the export properties in the Spreadsheet. + * @returns {any} + */ + getExportProps(): any; + + XLFilter: Spreadsheet.XLFilter; + + XLFormat: Spreadsheet.XLFormat; + + XLFreeze: Spreadsheet.XLFreeze; + + /** This method is used to unfreeze the frozen rows and columns in the Spreadsheet. + * @returns {void} + */ + unfreezePanes(): void; + + XLPivot: Spreadsheet.XLPivot; + + XLPrint: Spreadsheet.XLPrint; + + XLResize: Spreadsheet.XLResize; + + XLRibbon: Spreadsheet.XLRibbon; + + XLSearch: Spreadsheet.XLSearch; + + XLSelection: Spreadsheet.XLSelection; + + XLShape: Spreadsheet.XLShape; + + XLSort: Spreadsheet.XLSort; + + XLValidate: Spreadsheet.XLValidate; + } + export namespace Spreadsheet { + + export interface XLCellType { + + /** This method is used to set a cell type from the specified range of cells in the spreadsheet. + * @param {string} Pass the range where you want apply cell type. + * @param {any} Pass type of cell type and its settings. + * @param {number} Optional. Pass sheet index. + * @returns {void} + */ + addCellTypes(range: string, settings: any, sheetIdx: number): void; + + /** This method is used to remove cell type from the specified range of cells in the Spreadsheet. + * @param {string|any[]} Pass the range where you want remove cell type. + * @param {number} Optional. Pass sheet index. + * @returns {void} + */ + removeCellTypes(range: string|any[], sheetIdx: number): void; + } + + export interface XLCFormat { + + /** This method is used to clear the applied conditional formatting rules in the Spreadsheet. + * @param {any[]|string} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. + * @returns {void} + */ + clearCF(range: any[]|string): void; + + /** This method is used to get the applied conditional formatting rules as array of objects based on the specified row Index and column Index in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the column index. + * @returns {any[]} + */ + getCFRule(rowIdx: number, colIdx: number): any[]; + + /** This method is used to set the conditional formatting rule in the Spreadsheet. + * @param {any} Pass the rule to set. + * @returns {void} + */ + setCFRule(rule: any): void; + } + + export interface XLChart { + + /** This method is used to change the theme of the chart in the Spreadsheet. + * @param {string} Pass the chart id. + * @param {ej.datavisualization.Chart.Theme} Pass the chart theme which want to update. + * @returns {void} + */ + changeTheme(chartId: string, theme: ej.datavisualization.Chart.Theme): void; + + /** This method is used to change the type of the chart in the Spreadsheet. + * @param {string} Pass the chart id. + * @param {any} Pass the chart type. + * @returns {void} + */ + changeType(chartId: string, option: any): void; + + /** This method is used to change the data range of the chart in the Spreadsheet. + * @param {string} Pass the chart id. + * @param {string} X axis range of chart data. + * @param {string} Y axis range of chart data. + * @param {string} Legend range of chart data. + * @returns {void} + */ + changeDataRange(chartId: string, xRange: string, yRange: string, lRange: string): void; + + /** This method is used to create a chart for specified range in Spreadsheet. + * @param {string|any[]} Optional. If range is specified, it will create chart for the specified range else it will use the current selected range. + * @param {any} Optional. To pass the type of chart and chart name. + * @returns {void} + */ + createChart(range: string|any[], options: any): void; + + /** This method is used to refresh the chart in the Spreadsheet. + * @param {string} To pass the chart Id. + * @param {any} To pass the type of chart and chart name. + * @returns {void} + */ + refreshChart(id: string, options: any): void; + + /** This method is used to resize the chart of specified id in the Spreadsheet. + * @param {string} To pass the chart id. + * @param {number} To pass height value. + * @param {number} To pass the width value. + * @returns {void} + */ + resizeChart(id: string, height: number, width: number): void; + + /** This method is used to update the chart element, such as axes, titles, data labels, grid lines and legends in the Spreadsheet. + * @param {string} Pass the chart id. + * @param {ej.Spreadsheet.ChartProperties} Pass chart element value which you want to update. + * @returns {void} + */ + updateChartElement(chartId: string, value: ej.Spreadsheet.ChartProperties): void; + + /** This method is used switch row to columns and vice versa for chart in the Spreadsheet. So that the data is displayed in the chart the way you want. + * @param {string} Pass the chart id. + * @returns {void} + */ + switchRowColumn(chartId: string): void; + } + + export interface XLClipboard { + + /** This method is used to copy the selected cells in the Spreadsheet. + * @returns {void} + */ + copy(): void; + + /** This method is used to cut the selected cells in the Spreadsheet. + * @returns {void} + */ + cut(): void; + + /** This method is used to paste the cut or copied cells data in the Spreadsheet. + * @returns {void} + */ + paste(): void; + } + + export interface XLComment { + + /** This method is used to delete the comment in the specified range in Spreadsheet. + * @param {any[]|string} Optional. If range is specified, it will delete comments for the specified range else it will use the current selected range. + * @param {number} Optional. If sheetIdx is specified, it will delete comment in specified sheet else it will use active sheet. + * @param {boolean} Optional. Pass {{'`true`' | markdownify}}, if you want to skip the hidden rows data. + * @returns {void} + */ + deleteComment(range: any[]|string, sheetIdx: number, skipHiddenRow: boolean): void; + + /** This method is used to edit the comment in the target Cell in Spreadsheet. + * @param {any} Optional. Pass the row index and column index of the cell which contains comment. + * @returns {void} + */ + editComment(targetCell: any): void; + + /** This method is used to find the next comment from the active cell in Spreadsheet. + * @returns {boolean} + */ + findNextComment(): boolean; + + /** This method is used to find the previous comment from the active cell in Spreadsheet. + * @returns {boolean} + */ + findPrevComment(): boolean; + + /** This method is used to get comment data for the specified cell. + * @param {HTMLElement} Pass the DOM element to get comment data as object. + * @returns {any} + */ + getComment(cell: HTMLElement): any; + + /** This method is used to set new comment in Spreadsheet. + * @param {string|any[]} Optional. If we pass the range comment will set in the range otherwise it will set with selected cells. + * @param {string} Optional. Pass the comment data. + * @param {boolean} Optional. Pass {{'`true`' | markdownify}} to show comment in edit mode + * @param {boolean} Optional. Pass {{'`true`' | markdownify}} to show the user name + * @returns {void} + */ + setComment(range: string|any[], data: string, showEditPanel: boolean, showUserName: boolean): void; + + /** This method is used to show all the comments in the Spreadsheet. + * @returns {void} + */ + showAllComments(): void; + + /** This method is used to show or hide the specific comment in the Spreadsheet. + * @param {HTMLElement} Optional. Pass the cell DOM element to show or hide its comment. If pass empty argument active cell will processed. + * @returns {void} + */ + showHideComment(targetCell: HTMLElement): void; + } + + export interface XLCMenu { + + /** This method is used to dynamically add items in the context menu. + * @param {string} Specifies the context menu type in which the item to be inserted. + * @param {any[]} Pass the items to be inserted + * @param {string} Specifies the type of operation to be performed + * @returns {void} + */ + addItem(target: string, itemColl: any[], operation: string): void; + + /** This method is used to change data source in the context menu. + * @param {string} Specifies the context menu type to bind the data source. + * @param {any[]} Pass the data source to be binded + * @returns {void} + */ + changeDataSource(target: string, data: any[]): void; + + /** This method is used to disable the items in the context menu. + * @param {string} Specifies the context menu type in which the item to be disabled. + * @param {any[]} Specifies the Menu Item id collection to be disabled + * @returns {void} + */ + disableItem(target: string, idxColl: any[]): void; + + /** This method is used to enable the items in the context menu. + * @param {string} Specifies the context menu type in which the item to be enabled. + * @param {any[]} Specifies the Menu Item id collection to be enabled + * @returns {void} + */ + enableItem(target: string, idxColl: any[]): void; + + /** This method is used to remove the items in the context menu. + * @param {string} Specifies the context menu type in which the item to be removed. + * @param {any[]} Specifies the Menu Item id collection to be removed + * @returns {void} + */ + removeItem(target: string, idxColl: any[]): void; + } + + export interface XLDragDrop { + + /** This method is used to drag and drop the selected range of cells to destination range in the Spreadsheet. + * @param {any|any[]} Pass the source range to perform drag and drop. + * @param {any|any[]} Pass the destination range to drop the dragged cells. + * @returns {void} + */ + moveRangeTo(sourceRange: any|any[], destinationRange: any|any[]): void; + } + + export interface XLDragFill { + + /** This method is used to perform auto fill in Spreadsheet. + * @param {any} Pass the options to perform auto fill in Spreadsheet. + * @returns {void} + */ + autoFill(options: any): void; + + /** This method is used to hide the auto fill element in the Spreadsheet. + * @returns {void} + */ + hideAutoFillElement(): void; + + /** This method is used to hide the auto fill options in the Spreadsheet. + * @returns {void} + */ + hideAutoFillOptions(): void; + + /** This method is used to set position of the auto fill element in the Spreadsheet. + * @param {boolean} Pass the isDragFill option as {{'`boolean`' | markdownify}} value to show auto fill options in Spreadsheet. + * @returns {void} + */ + positionAutoFillElement(isDragFill: boolean): void; + } + + export interface XLEdit { + + /** This method is used to calculate formulas in the specified sheet. + * @param {number} Optional. If sheet index is specified, then it will calculate formulas in the specified sheet only else it will calculate formulas in all sheets. + * @returns {void} + */ + calcNow(sheetIdx: number): void; + + /** This method is used to edit a particular cell based on the row index and column index in the Spreadsheet. + * @param {number} Pass the row index to edit particular cell. + * @param {number} Pass the column index to edit particular cell. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to maintain previous cell value. + * @returns {void} + */ + editCell(rowIdx: number, colIdx: number, oldData: boolean): void; + + /** This method is used to get the property value of particular cell, based on the row and column index in the Spreadsheet. + * @param {number} Pass the row index to get the property value. + * @param {number} Pass the column index to get the property value. + * @param {string} Optional. Pass the property name that you want("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", + * "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", "decimalPlaces", + * "cellType"). + * @param {number} Optional. Pass the index of the sheet. + * @returns {any|string|any[]} + */ + getPropertyValue(rowIdx: number, colIdx: number, prop: string, sheetIdx: number): any|string|any[]; + + /** This method is used to get the property value in specified cell in Spreadsheet. + * @param {HTMLElement} Pass the cell element to get property value. + * @param {string} Pass the property name that you want ("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", "chart", + * "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", "decimalPlaces", + * "cellType"). + * @param {number} Pass the index of sheet. + * @returns {any|string|any[]} + */ + getPropertyValueByElem(elem: HTMLElement, property: string, sheetIdx: number): any|string|any[]; + + /** This method is used to save the edited cell value in the Spreadsheet. + * @returns {void} + */ + saveCell(): void; + + /** This method is used to update a particular cell value in the Spreadsheet. + * @param {any} Pass row index and column index of the cell. + * @param {string|number} Pass the cell value. + * @returns {void} + */ + updateCell(cell: any, value: string|number): void; + + /** This method is used to update a particular cell value and its format in the Spreadsheet. + * @param {any} Pass row index and column index of the cell. + * @param {string|number} Pass the cell value. + * @param {string} Pass the class name to update format. + * @param {number} Pass sheet index. + * @returns {void} + */ + updateCellValue(cellIdx: any, val: string|number, formatClass: string, sheetIdx: number): void; + } + + export interface XLExport { + + /** This method is used to save the sheet data as Excel ,CSV or PDF document (.xls, .xlsx .csv, .pdf) in Spreadsheet. + * @param {string} Pass the export type that you want. + * @returns {void} + */ + export(type: string): void; + + /** This method is used to get the export properties in the Spreadsheet. + * @returns {any} + */ + getExportProps(): any; + } + + export interface XLFilter { + + /** This method is used to clear the filter in filtered columns in the Spreadsheet. + * @returns {void} + */ + clearFilter(): void; + + /** This method is used to apply filter for the selected range of cells in the Spreadsheet. + * @param {string|any[]} Pass the range of the selected cells. + * @returns {void} + */ + filter(range: string|any[]): void; + + /** This method is used to apply filter for the column by active cell's value in the Spreadsheet. + * @returns {void} + */ + filterByActiveCell(): void; + } + + export interface XLFormat { + + /** This method is used to add the font to the Ribbon font family dropdown. + * @param {string} Font name which needs to add into the font family option. + * @returns {void} + */ + addFontFamily(fontName: string): void; + + /** This method is used to convert table range to normal range. + * @param {any} Pass the sheet index and table id. + * @returns {void} + */ + convertToRange(options: any): void; + + /** This method is used to create a table for the selected range of cells in the Spreadsheet. + * @param {any} Pass the table object. + * @param {string|any[]} Optional. If the range is specified, then it will create table in the specified range else it will use the current selected range. + * @returns {string} + */ + createTable(tableObject: any, range: string|any[]): string; + + /** This method is used to set format style and values in a cell or range of cells. + * @param {any} Pass the formatObject which contains style, type, format, groupSeparator and decimalPlaces. + * @param {string} Pass the range to format cells. + * @returns {void} + */ + format(formatObj: any, range: string): void; + + /** This method is used to remove the font from the Ribbon font family dropdown. + * @param {string} Font name which needs to remove from the font family drop down. + * @returns {void} + */ + removeFontFamily(fontName: string): void; + + /** This method is used to remove the style in the specified range. + * @param {any[]|string} Pass the cell range . + * @param {any} Optional. Pass the options for which the style gets removed. + * @returns {void} + */ + removeStyle(range: any[]|string, options: any): void; + + /** This method is used to remove table with specified tableId in the Spreadsheet. + * @param {number} Pass the tableId that you want to remove. + * @returns {void} + */ + removeTable(tableId: number): void; + + /** This method is used to update the decimal places for numeric value for the selected range of cells in the Spreadsheet. + * @param {string} Pass the decimal places type in IncreaseDecimal/DecreaseDecimal. + * @param {string|any[]} Pass the range. + * @returns {void} + */ + updateDecimalPlaces(type: string, range: string|any[]): void; + + /** This method is used to update the format for the selected range of cells in the Spreadsheet. + * @param {any} Pass the format object that you want to update. + * @param {any[]} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. + * @returns {void} + */ + updateFormat(formatObj: any, range: any[]): void; + + /** This method is used to update the unique format for selected range of cells in the Spreadsheet. + * @param {string} Pass the unique format class. + * @param {any[]} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. + * @returns {void} + */ + updateUniqueFormat(formatClass: string, range: any[]): void; + } + + export interface XLFreeze { + + /** This method is used to freeze columns upto the specified column index in the Spreadsheet. + * @param {number} Index of the column to be freeze. + * @returns {void} + */ + freezeColumns(colIdx: number): void; + + /** This method is used to freeze the first column in the Spreadsheet. + * @returns {void} + */ + freezeLeftColumn(): void; + + /** This method is used to freeze rows and columns before the specified cell in the Spreadsheet. + * @param {number} Index of the row to be freeze. + * @param {number} Index of the column to be freeze. + * @returns {void} + */ + freezePanes(rowIdx: number, colIdx: number): void; + + /** This method is used to freeze rows upto the specified row index in the Spreadsheet. + * @param {number} Index of the row to be freeze. + * @returns {void} + */ + freezeRows(rowIdx: number): void; + + /** This method is used to freeze the top row in the Spreadsheet. + * @returns {void} + */ + freezeTopRow(): void; + + /** This method is used to unfreeze the frozen rows and columns in the Spreadsheet. + * @returns {void} + */ + unfreezePanes(): void; + } + + export interface XLPivot { + + /** This property is used to clear the pivot table list in Spreadsheet. + * @param {string} Pass the name of the pivot table. + * @returns {void} + */ + clearPivotFieldList(pivotName: string): void; + + /** This method is used to create pivot table. + * @param {string} It specifies the range for which the pivot table is created. + * @param {string} It specifies the location in which the pivot table is created. + * @param {string} It specifies the name of the pivot table. + * @param {any} Pass the pivot table settings. + * @param {any} Pass the pivot range, sheet index, address and data source . + * @returns {string} + */ + createPivotTable(range: string, location: string, name: string, settings: any, pvt: any): string; + + /** This method is used to delete the pivot table which is selected. + * @param {string} Pass the name of the pivot table. + * @returns {void} + */ + deletePivotTable(pivotName: string): void; + + /** This method is used to refresh data in pivot table. + * @param {string} Optional. Pass the name of the pivot table. + * @param {number} Optional. Pass the index of the sheet. + * @returns {void} + */ + refreshDataSource(name: string, sheetIdx: number): void; + } + + export interface XLPrint { + + /** This method is used to print the selected contents in the Spreadsheet. + * @returns {void} + */ + printSelection(): void; + + /** This method is used to print the entire contents in the active sheet. + * @returns {void} + */ + printSheet(): void; + } + + export interface XLResize { + + /** This method is used to fit the height of rows in the Spreadsheet. + * @param {any[]} Optional. Pass row index collection that you want to fit its height. + * @returns {void} + */ + fitHeight(rowIndexes: any[]): void; + + /** This method is used to fit the width of columns in the Spreadsheet. + * @param {any[]} Optional. Pass column index collection that you want to fit its width. + * @returns {void} + */ + fitWidth(colIndexes: any[]): void; + + /** This method is used to get the column width of the specified column index in the Spreadsheet. + * @param {number} Pass the column index. + * @returns {number} + */ + getColWidth(colIdx: number): number; + + /** This method is used to get the row height of the specified row index in the Spreadsheet. + * @param {number} Pass the row index which you want to find its height. + * @returns {number} + */ + getRowHeight(rowIdx: number): number; + + /** This method is used to set the column width of the specified column index in the Spreadsheet. + * @param {number} Pass the column index. + * @param {number} Pass the width value that you want to set. + * @returns {void} + */ + setColWidth(colIdx: number, size: number): void; + + /** This method is used to set the row height of the specified row index in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the height value that you want to set. + * @returns {void} + */ + setRowHeight(rowIdx: number, size: number): void; + } + + export interface XLRibbon { + + /** This method is used to add a new item in the backstage. + * @param {any} Specifies the item to be added in the backstage. + * @param {number} pass the index of the item to be added in the backstage. + * @returns {void} + */ + addBackStageItem(pageItem: any, index: number): void; + + /** This method is used to dynamically add the contextual tabs in the ribbon. + * @param {any} Specifies the contextual tab set object. + * @param {number} pass the index of the contextual tab. + * @returns {void} + */ + addContextualTabs(contextualTabSet: any, index: number): void; + + /** This method is used to dynamically add the menu item in the file menu. + * @param {any[]} Specifies the item to be added + * @param {number} pass the index of the menu item. + * @returns {void} + */ + addMenuItem(item: any[], index: number): void; + + /** This method is used to add a new name in the Spreadsheet name manager. + * @param {string} Pass the name that you want to define in name manager. + * @param {string} Pass the cell reference. + * @param {string} Optional. Pass comment, if you want. + * @param {number} Optional. Pass the sheet index. + * @returns {void} + */ + addNamedRange(name: string, refersTo: string, comment: string, sheetIdx: number): void; + + /** This method is used to dynamically add the tab in the ribbon. + * @param {any[]} Specifies the text to be displayed in the tab. + * @param {number} pass the groups to be displayed in the ribbon tab. + * @param {number} pass the index of the tab. + * @returns {void} + */ + addTab(tabText: any[], ribbonGroups: number, index: number): void; + + /** This method is used to dynamically add the tab group in the ribbon. + * @param {number} Specifies the ribbon tab index. + * @param {any} pass the groups to be displayed in the ribbon tab. + * @param {number} pass the index of the ribbon group. + * @returns {void} + */ + addTabGroup(tabIndex: number, tabGroup: any, groupIndex: number): void; + + /** This method is used to insert the few type (SUM, MAX, MIN, AVG, COUNT) of formulas in the selected range of cells in the Spreadsheet. + * @param {string} To pass the type("SUM","MAX","MIN","AVG","COUNT"). + * @param {string|any[]} If range is specified, it will apply auto sum for the specified range else it will use the current selected range. + * @returns {void} + */ + autoSum(type: string, range: string|any[]): void; + + /** This method is used to hide the file menu in the ribbon tab. + * @returns {void} + */ + hideMenu(): void; + + /** This method is used to remove the item from the backstage in the spreadsheet. + * @param {number} Specifies the index of the item to be removed from backstage. + * @returns {void} + */ + removeBackStageItem(index: number): void; + + /** This method is used to remove the menu item form file menu in spreadsheet. + * @param {number} Specifies the index of the item to be removed from the file menu. + * @returns {void} + */ + removeMenuItem(index: number): void; + + /** This method is used to delete the defined name in the Spreadsheet name manager. + * @param {string} Pass the defined name that you want to remove from name manager. + * @returns {void} + */ + removeNamedRange(name: string): void; + + /** This method is used to remove the tab form ribbon in the spreadsheet. + * @param {number} Specifies the index of the tab to be removed from the ribbon. + * @param {boolean} pass the boolean value to remove the tab from ribbon + * @returns {void} + */ + removeTab(index: number, isRemoveMenu: boolean): void; + + /** This method is used to remove the tab group form ribbon in the spreadsheet. + * @param {number} Specifies the index of the tab group to be removed from the ribbon. + * @param {string} Specifies the text to be displayed in the tab group + * @returns {void} + */ + removeTabGroup(tabIndex: number, groupText: string): void; + + /** This method is used to show the file menu in the ribbon tab. + * @returns {void} + */ + showMenu(): void; + + /** This method is used to update the menu item in the file menu. + * @param {any} Specifies the menu item to be updated in the ribbon + * @param {number} pass the index of the item to be updated + * @returns {void} + */ + updateMenuItem(item: any, index: number): void; + + /** This method is used to update the ribbon icons in the Spreadsheet. + * @returns {void} + */ + updateRibbonIcons(): void; + } + + export interface XLSearch { + + /** This method is used to find and replace all data by workbook in the Spreadsheet. + * @param {string} Pass the search data. + * @param {string} Pass the replace data. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with case-sensitive. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with entire cell contents. + * @returns {void} + */ + replaceAllByBook(findData: string, replaceData: string, isCSen: boolean, isEMatch: boolean): void; + + /** This method is used to find and replace all data by sheet in Spreadsheet. + * @param {string} Pass the search data. + * @param {string} Pass the replace data. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with case-sensitive. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with entire cell contents. + * @returns {void} + */ + replaceAllBySheet(findData: string, replaceData: string, isCSen: boolean, isEMatch: boolean): void; + } + + export interface XLSelection { + + /** This method is used to clear the selection of the active sheet in the Spreadsheet. + * @returns {void} + */ + clearAll(): void; + + /** This method is used to get the selected cells element based on specified sheet index in the Spreadsheet. + * @param {number} Pass the sheet index to get the cells element. + * @returns {HTMLElement} + */ + getSelectedCells(sheetIdx: number): HTMLElement; + + /** This method is used to refresh the selection in the Spreadsheet. + * @param {any[]|string} Optional. Pass range to refresh selection. + * @returns {void} + */ + refreshSelection(range: any[]|string): void; + + /** This method is used to select a single column in the Spreadsheet. + * @param {number} Pass the column index value. + * @returns {void} + */ + selectColumn(colIdx: number): void; + + /** This method is used to select entire columns in a specified range (start index and end index) in the Spreadsheet. + * @param {number} Pass the column start index. + * @param {number} Pass the column end index. + * @returns {void} + */ + selectColumns(startIdx: number, endIdx: number): void; + + /** This method is used to select the specified range of cells in the Spreadsheet. + * @param {string} Pass range which want to select. + * @returns {void} + */ + selectRange(range: string): void; + + /** This method is used to select a single row in the Spreadsheet. + * @param {number} Pass the row index value. + * @returns {void} + */ + selectRow(rowIdx: number): void; + + /** This method is used to select entire rows in a specified range (start index and end index) in the Spreadsheet. + * @param {number} Pass the start row index. + * @param {number} Pass the end row index. + * @returns {void} + */ + selectRows(startIdx: number, endIdx: number): void; + + /** This method is used to select all cells in active sheet. + * @returns {void} + */ + selectSheet(): void; + } + + export interface XLShape { + + /** This method is used to set a picture in the Spreadsheet. + * @param {string} Pass the range of the cell. + * @param {string} Pass the path of the specified image. + * @param {number} Optional. Pass the width of the image that you want to set. + * @param {number} Optional. Pass the height of the image that you want to set. + * @param {number} Optional. Pass the top of the image that you want to set. + * @param {number} Optional. Pass the left of the image that you want to set. + * @returns {string} + */ + setPicture(range: string, url: string, width: number, height: number, top: number, left: number): string; + } + + export interface XLSort { + + /** This method is used to sort a particular range of cells based on its cell or font color in the Spreadsheet. + * @param {string} Pass {{'`PutCellColor`' | markdownify}} to sort by cell color or {{'`PutFontColor`' | markdownify}} for sort by font color. + * @param {any} Pass the HEX color code to sort. + * @param {string} Pass the range + * @returns {void} + */ + sortByColor(operation: string, color: any, range: string): void; + + /** This method is used to sort a particular range of cells based on its values in the Spreadsheet. + * @param {any[]|string} Pass the range to sort. + * @param {string} Pass the column name. + * @param {any} Pass the direction to sort (ascending or descending). + * @returns {boolean} + */ + sortByRange(range: any[]|string, columnName: string, direction: any): boolean; + } + + export interface XLValidate { + + /** This method is used to apply data validation rules in a selected range of cells based on the defined condition in the Spreadsheet. + * @param {string|any[]} If range is specified, it will apply rules for the specified range else it will use the current selected range. + * @param {any[]} Pass the validation condition, value1 and value2. + * @param {string} Pass the data type. + * @param {boolean} Pass {{'`true`' | markdownify}} if you ignore blank values. + * @param {boolean} Pass {{'`true`' | markdownify}} if you want to show an error alert. + * @returns {void} + */ + applyDVRules(range: string|any[], values: any[], type: string, required: boolean, showErrorAlert: boolean): void; + + /** This method is used to clear the applied validation rules in a specified range of cells in the Spreadsheet. + * @param {string|any[]} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. + * @returns {void} + */ + clearDV(range: string|any[]): void; + + /** This method is used to highlight invalid data in a specified range of cells in the Spreadsheet. + * @param {string|any[]} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. + * @returns {void} + */ + highlightInvalidData(range: string|any[]): void; + } + + export interface Model { + + /** Gets or sets an active sheet index in the Spreadsheet. By defining this value, you can specify which sheet should be active in workbook. + * @Default {1} + */ + activeSheetIndex?: number; + + /** Gets or sets a value that indicates whether to enable or disable auto rendering of cell type in the Spreadsheet. + * @Default {false} + */ + allowAutoCellType?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable auto fill feature in the Spreadsheet. + * @Default {true} + */ + allowAutoFill?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable auto sum feature in the Spreadsheet. + * @Default {true} + */ + allowAutoSum?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable cell format feature in the Spreadsheet. By enabling this, you can customize styles and number formats. + * @Default {true} + */ + allowCellFormatting?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable cell type feature in the Spreadsheet. + * @Default {false} + */ + allowCellType?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable chart feature in the Spreadsheet. By enabling this feature, you can create and customize charts in Spreadsheet. + * @Default {true} + */ + allowCharts?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable clear feature in the Spreadsheet. + * @Default {true} + */ + allowClear?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable clipboard feature in the Spreadsheet. By enabling this feature, you can perform cut/copy and paste operations in + * Spreadsheet. + * @Default {true} + */ + allowClipboard?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable comment feature in the Spreadsheet. By enabling this, you can add/delete/modify comments in Spreadsheet. + * @Default {true} + */ + allowComments?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable Conditional Format feature in the Spreadsheet. By enabling this, you can apply formatting to the selected range of + * cells based on the provided conditions (Greater than, Less than, Equal, Between, Contains, etc.). + * @Default {true} + */ + allowConditionalFormats?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable data validation feature in the Spreadsheet. + * @Default {true} + */ + allowDataValidation?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable the delete action in the Spreadsheet. By enabling this feature, you can delete existing rows, columns, cells and + * sheet. + * @Default {true} + */ + allowDelete?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable drag and drop feature in the Spreadsheet. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable the edit action in the Spreadsheet. + * @Default {true} + */ + allowEditing?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable filtering feature in the Spreadsheet. Filtering can be used to limit the data displayed using required criteria. + * @Default {true} + */ + allowFiltering?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable table feature in the Spreadsheet. By enabling this, you can render table in selected range. + * @Default {true} + */ + allowFormatAsTable?: boolean; + + /** Get or sets a value that indicates whether to enable or disable format painter feature in the Spreadsheet. By enabling this feature, you can copy the format from the selected + * range and apply it to another range. + * @Default {true} + */ + allowFormatPainter?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable formula bar in the Spreadsheet. + * @Default {true} + */ + allowFormulaBar?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable freeze pane support in Spreadsheet. By enabling this feature, you can use freeze top row, freeze first column and + * freeze panes options. + * @Default {true} + */ + allowFreezing?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable hyperlink feature in the Spreadsheet. By enabling this feature, you can add hyperlink which is used to easily + * navigate to the cell reference from one sheet to another or a web page. + * @Default {true} + */ + allowHyperlink?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable import feature in the Spreadsheet. By enabling this feature, you can open existing Spreadsheet documents. + * @Default {true} + */ + allowImport?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable the insert action in the Spreadsheet. By enabling this feature, you can insert new rows, columns, cells and sheet. + * @Default {true} + */ + allowInsert?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable keyboard navigation feature in the Spreadsheet. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable lock cell feature in the Spreadsheet. + * @Default {true} + */ + allowLockCell?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable merge feature in the Spreadsheet. + * @Default {true} + */ + allowMerging?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable overflow feature in the Spreadsheet. + * @Default {true} + */ + allowOverflow?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable resizing feature in the Spreadsheet. By enabling this feature, you can change the column width and row height by + * dragging its header boundaries. + * @Default {true} + */ + allowResizing?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable find and replace feature in the Spreadsheet. By enabling this, you can easily find and replace a specific value in + * the sheet or workbook. By using goto behavior, you can select and highlight all cells that contains specific data or data types. + * @Default {true} + */ + allowSearching?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable selection in the Spreadsheet. By enabling this feature, selected items will be highlighted. + * @Default {true} + */ + allowSelection?: boolean; + + /** Gets or sets a value that indicates whether to enable the sorting feature in the Spreadsheet. + * @Default {true} + */ + allowSorting?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable undo and redo feature in the Spreadsheet. + * @Default {true} + */ + allowUndoRedo?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable wrap text feature in the Spreadsheet. By enabling this, cell content can wrap to the next line, if the cell + * content exceeds the boundary of the cell. + * @Default {true} + */ + allowWrap?: boolean; + + /** Gets or sets a value that indicates to define the width of the activation panel in Spreadsheet. + * @Default {300} + */ + apWidth?: number; + + /** Gets or sets an object that indicates to customize the auto fill behavior in the Spreadsheet. + */ + autoFillSettings?: AutoFillSettings; + + /** Gets or sets an object that indicates to customize the chart behavior in the Spreadsheet. + */ + chartSettings?: ChartSettings; + + /** Gets or sets a value that defines the number of columns displayed in the sheet. + * @Default {21} + */ + columnCount?: number; + + /** Gets or sets a value that indicates to define the common width for each column in the Spreadsheet. + * @Default {64} + */ + columnWidth?: number; + + /** Gets or sets a value to add root CSS class for customizing Spreadsheet skins. + */ + cssClass?: string; + + /** Gets or sets a value that indicates custom formulas in Spreadsheet. + * @Default {[]} + */ + customFormulas?: any[]; + + /** Gets or sets a value that indicates whether to enable or disable context menu in the Spreadsheet. + * @Default {true} + */ + enableContextMenu?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable pivot table in the Spreadsheet. + * @Default {false} + */ + enablePivotTable?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable touch support in the Spreadsheet. + * @Default {true} + */ + enableTouch?: boolean; + + /** Gets or sets an object that indicates to customize the exporting behavior in Spreadsheet. + */ + exportSettings?: ExportSettings; + + /** Gets or sets an object that indicates to customize the format behavior in the Spreadsheet. + */ + formatSettings?: FormatSettings; + + /** Gets or sets an object that indicates to customize the import behavior in the Spreadsheet. + */ + importSettings?: ImportSettings; + + /** Gets or sets a value that indicates whether to enable or disable readonly support in the Spreadsheet. + * @Default {false} + */ + isReadOnly?: boolean; + + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data (i.e.) in a language and culture specific + * to a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /** Gets or sets a value that indicates name manager in Spreadsheet. + */ + nameManager?: NameManager[]; + + /** Gets or sets an object that indicates to customize the picture behavior in the Spreadsheet. + */ + pictureSettings?: PictureSettings; + + /** Gets or sets an object that indicates to customize the print option in Spreadsheet. + */ + printSettings?: PrintSettings; + + /** Gets or sets an object that indicates to customize the ribbon settings in Spreadsheet. + */ + ribbonSettings?: RibbonSettings; + + /** Gets or sets a value that indicates whether to define the number of rows to be displayed in the sheet. + * @Default {20} + */ + rowCount?: number; + + /** Gets or sets a value that indicates to define the common height for each row in the sheet. + * @Default {20} + */ + rowHeight?: number; + + /** Gets or sets an object that indicates to customize the scroll options in the Spreadsheet. + */ + scrollSettings?: ScrollSettings; + + /** Gets or sets an object that indicates to customize the selection options in the Spreadsheet. + */ + selectionSettings?: SelectionSettings; + + /** Gets or sets a value that indicates to define the number of sheets to be created at the initial load. + * @Default {1} + */ + sheetCount?: number; + + /** Gets or sets an object that indicates to customize the sheet behavior in Spreadsheet. + */ + sheets?: Sheet[]; + + /** Gets or sets a value that indicates whether to show or hide pager in the Spreadsheet. + * @Default {true} + */ + showPager?: boolean; + + /** Gets or sets a value that indicates whether to show or hide ribbon in the Spreadsheet. + * @Default {true} + */ + showRibbon?: boolean; + + /** This is used to set the number of undo-redo steps in the Spreadsheet. + * @Default {20} + */ + undoRedoStep?: number; + + /** Define the username for the Spreadsheet which is displayed in comment. + * @Default {User Name} + */ + userName?: string; + + /** Triggered for every action before its starts. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Triggered for every action complete. + */ + actionComplete?(e: ActionCompleteEventArgs): void; + + /** Triggered when the auto fill operation begins. + */ + autoFillBegin?(e: AutoFillBeginEventArgs): void; + + /** Triggered when the auto fill operation completes. + */ + autoFillComplete?(e: AutoFillCompleteEventArgs): void; + + /** Triggered before the batch save. + */ + beforeBatchSave?(e: BeforeBatchSaveEventArgs): void; + + /** Triggered before the cells to be formatted. + */ + beforeCellFormat?(e: BeforeCellFormatEventArgs): void; + + /** Triggered before the cell selection. + */ + beforeCellSelect?(e: BeforeCellSelectEventArgs): void; + + /** Triggered before the selected cells are dropped. + */ + beforeDrop?(e: BeforeDropEventArgs): void; + + /** Triggered while start to edit the comment. + */ + beforeEditComment?(e: BeforeEditCommentEventArgs): void; + + /** Triggered before the contextmenu is open. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + + /** Triggered before the activation panel is open. + */ + beforePanelOpen?(e: BeforePanelOpenEventArgs): void; + + /** Triggered when click on sheet cell. + */ + cellClick?(e: CellClickEventArgs): void; + + /** Triggered when the cell is edited. + */ + cellEdit?(e: CellEditEventArgs): void; + + /** Triggered while cell is formatting. + */ + cellFormatting?(e: CellFormattingEventArgs): void; + + /** Triggered when mouse hover on cell in sheets. + */ + cellHover?(e: CellHoverEventArgs): void; + + /** Triggered when save the edited cell. + */ + cellSave?(e: CellSaveEventArgs): void; + + /** Triggered when the cell is selected. + */ + cellSelected?(e: CellSelectedEventArgs): void; + + /** Triggered when click the contextmenu items. + */ + contextMenuClick?(e: ContextMenuClickEventArgs): void; + + /** Triggered when the selected cells are being dragged. + */ + drag?(e: DragEventArgs): void; - /** Specifies the visibility of total summary row for the corresponding summary column - * @Default {false} - */ - showTotalSummary?: boolean; + /** Triggered when you start to drag the picture or chart. + */ + dragShape?(e: DragShapeEventArgs): void; - /** Specifies the summary row collection object to be displayed - * @Default {[]} - */ - summaryRows?: any[]; + /** Triggered when the selected cells are initiated to drag. + */ + dragStart?(e: DragStartEventArgs): void; - /** Specifies whether to show tooltip when mouse is hovered on the cell. - * @Default {true} - */ - showGridCellTooltip?: boolean; + /** Triggered when the selected cells are dropped. + */ + drop?(e: DropEventArgs): void; - /** Specifies whether to show tooltip for the cells, which has expander button. - * @Default {true} - */ - showGridExpandCellTooltip?: boolean; + /** Triggered before the range editing starts. + */ + editRangeBegin?(e: EditRangeBeginEventArgs): void; - /** Options for setting width and height for TreeGrid. - */ - sizeSettings?: SizeSettings; + /** Triggered after range editing completes. + */ + editRangeComplete?(e: EditRangeCompleteEventArgs): void; - /** Options for sorting the rows. - */ - sortSettings?: SortSettings; + /** Triggered when the key is pressed down. + */ + keyDown?(e: KeyDownEventArgs): void; - /** Options for displaying and customizing the toolbar items. - */ - toolbarSettings?: ToolbarSettings; + /** Triggered when the key is released. + */ + keyUp?(e: KeyUpEventArgs): void; - /** Specifies the index of the column that needs to have the expander button. By default, cells in the first column contain the expander button. - * @Default {0} - */ - treeColumnIndex?: number; + /** Triggered before the sheet is loaded. + */ + load?(e: LoadEventArgs): void; - /** Triggered before every success event of TreeGrid action. */ - actionBegin?(e: ActionBeginEventArgs): void; + /** Triggered after the sheet is loaded. + */ + loadComplete?(e: LoadCompleteEventArgs): void; - /** Triggered for every TreeGrid action success event. */ - actionComplete?(e: ActionCompleteEventArgs): void; + /** Triggered every click of the menu item. + */ + menuClick?(e: MenuClickEventArgs): void; - /** Triggered while enter the edit mode in the TreeGrid cell */ - beginEdit?(e: BeginEditEventArgs): void; + /** Triggered when a file is imported. + */ + onImport?(e: OnImportEventArgs): void; - /** Triggered after collapsed the TreeGrid record */ - collapsed?(e: CollapsedEventArgs): void; + /** Triggered when import sheet is failed to open. + */ + openFailure?(e: OpenFailureEventArgs): void; - /** Triggered while collapsing the TreeGrid record */ - collapsing?(e: CollapsingEventArgs): void; + /** Triggered when pager item is clicked in the Spreadsheet. + */ + pagerClick?(e: PagerClickEventArgs): void; - /** Triggered while clicking a row, even when allowSelection property is disabled. */ - recordClick?(e: RecordClickEventArgs): void; + /** Triggered when you start resizing the chart, picture, row and column. + */ + resizeStart?(e: ResizeStartEventArgs): void; - /** Triggered when you start to drag a column */ - columnDragStart?(e: ColumnDragStartEventArgs): void; + /** Triggered after end of resizing the chart, picture, row and column. + */ + resizeEnd?(e: ResizeEndEventArgs): void; - /** Triggered while dragging a column */ - columnDrag?(e: ColumnDragEventArgs): void; + /** Triggered when click on the ribbon. + */ + ribbonClick?(e: RibbonClickEventArgs): void; - /** Triggered when a column is dropped */ - columnDrop?(e: ColumnDropEventArgs): void; + /** Triggered when the chart series rendering. + */ + seriesRendering?(e: SeriesRenderingEventArgs): void; - /** Triggered after a column resized */ - columnResized?(e: ColumnResizedEventArgs): void; + /** Triggered when click the ribbon tab. + */ + tabClick?(e: TabClickEventArgs): void; - /** Triggered while start to resize a column */ - columnResizeStart?(e: ColumnResizeStartEventArgs): void; + /** Triggered when select the ribbon tab. + */ + tabSelect?(e: TabSelectEventArgs): void; + } - /** Triggered when a column has been resized */ - columnResizeEnd?(e: ColumnResizeEndEventArgs): void; + export interface ActionBeginEventArgs { - /** Triggered while Context Menu is rendered in TreeGrid control */ - contextMenuOpen?(e: ContextMenuOpenEventArgs): void; + /** Returns the applied style format object. + */ + afterFormat?: any; - /** Triggered when TreeGrid is rendered completely */ - create?(e: CreateEventArgs): void; + /** Returns the applied style format object. + */ + beforeFormat?: any; - /** Triggered after saved the modified cellValue in TreeGrid */ - endEdit?(e: EndEditEventArgs): void; + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Triggered after expand the record */ - expanded?(e: ExpandedEventArgs): void; + /** Returns the cell range. + */ + range?: any[]; - /** Triggered while expanding the TreeGrid record */ - expanding?(e: ExpandingEventArgs): void; + /** Returns the action format. + */ + reqType?: string; - /** Triggered while Treegrid is loaded */ - load?(e: LoadEventArgs): void; + /** Returns goto index while paging. + */ + gotoIdx?: number; - /** Triggered while rendering each cell in the TreeGrid */ - queryCellInfo?(e: QueryCellInfoEventArgs): void; + /** Returns boolean value. If create new sheet it returns true. + */ + newSheet?: boolean; - /** Triggered while rendering each row */ - rowDataBound?(e: RowDataBoundEventArgs): void; + /** Return column name while sorting. + */ + columnName?: string; - /** Triggered while dragging a row in TreeGrid control */ - rowDrag?(e: RowDragEventArgs): void; + /** Returns selected columns while sorting or filtering begins. + */ + colSelected?: number; - /** Triggered while start to drag row in TreeGrid control */ - rowDragStart?(e: RowDragStartEventArgs): void; + /** Returns sort direction while sort action begins. + */ + sortDirection?: string; + } - /** Triggered while drop a row in TreeGrid control */ - rowDragStop?(e: RowDragStopEventArgs): void; + export interface ActionCompleteEventArgs { - /** Triggered before selecting a cell */ - cellSelecting?(e: CellSelectingEventArgs): void; + /** Returns Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Triggered after selected a cell */ - cellSelected?(e: CellSelectedEventArgs): void; + /** Returns the applied cell format object. + */ + selectedCell?: any[]|any; - /** Triggered after the row is selected. */ - rowSelected?(e: RowSelectedEventArgs): void; + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Triggered before the row is going to be selected. */ - rowSelecting?(e: RowSelectingEventArgs): void; + /** Returns the request type. + */ + reqType?: string; - /** Triggered when toolbar item is clicked in TreeGrid. */ - toolbarClick?(e: ToolbarClickEventArgs): void; - } + /** Returns the cancel option value. + */ + cancel?: boolean; - export interface ActionBeginEventArgs { + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface AutoFillBeginEventArgs { - /** Returns the current grouped column field name. - */ - columnName?: string; + /** Returns auto fill begin cell range. + */ + dataRange?: any[]; - /** Returns the TreeGrid model. - */ - model?: any; + /** Returns which direction drag the auto fill. + */ + direction?: string; - /** Returns request type. - */ - requestType?: string; + /** Returns fill cells range. + */ + fillRange?: any[]; - /** Returns the name of the event. - */ - type?: string; + /** Returns the auto fill type. + */ + fillType?: string; - /** Returns the direction of sorting ascending or descending. - */ - columnSortDirection?: string; + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Returns the value of expanding parent element. - */ - keyValue?: string; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the data or deleting element. - */ - data?: string; - } + /** Returns the name of the event. + */ + type?: string; - export interface ActionCompleteEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface AutoFillCompleteEventArgs { - /** Returns the grid model. - */ - model?: any; + /** Returns auto fill begin cell range. + */ + dataRange?: any[]; - /** Returns the name of the event. - */ - type?: string; + /** Returns which direction to drag the auto fill. + */ + direction?: string; - /** Returns the current grouped column field name. - */ - columnName?: string; + /** Returns fill cells range. + */ + fillRange?: any[]; - /** Returns request type. - */ - requestType?: string; + /** Returns the auto fill type. + */ + fillType?: string; - /** Returns the direction of sorting ascending or descending - */ - columnSortDirection?: string; + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Returns the value of searched element. - */ - keyValue?: string; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the data of deleted element. - */ - data?: string; + /** Returns the name of the event. + */ + type?: string; - /** Returns selected record index - */ - recordIndex?: number; - } + /** Returns the cancel option value. + */ + cancel?: boolean; + } - export interface BeginEditEventArgs { + export interface BeforeBatchSaveEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Returns the row element of editing cell. - */ - rowElement?: any; + /** Returns the query, primary key,batch changes for the data Source. + */ + dataSetting?: any; - /** Returns the Element of editing cell. - */ - cellElement?: any; + /** Returns the changed record object. + */ + batchChanges?: any; + } - /** Returns the data of current cell record. - */ - data?: any; + export interface BeforeCellFormatEventArgs { - /** Returns the column Index of cell belongs. - */ - columnIndex?: number; - } + /** Returns the sheet index. + */ + sheetIdx?: number; - export interface CollapsedEventArgs { + /** Returns the applied style format object. + */ + format?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the selected cells. + */ + cells?: any[]|any; - /** Returns the row index of collapsed record. - */ - recordIndex?: number; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the data of collapsed record.. - */ - data?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns Request Type. - */ - requestType?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns state of a record whether it is in expanded or collapsed state. - */ - expanded?: boolean; + export interface BeforeCellSelectEventArgs { - /** Returns the event type. - */ - type?: string; - } + /** Returns the previous cell range. + */ + prevRange?: any[]; - export interface CollapsingEventArgs { + /** Returns the current cell range. + */ + currRange?: any[]; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the row index of collapsing record. - */ - recordIndex?: number; + /** Returns the name of the event. + */ + type?: string; - /** Returns the data of collapsing record.. - */ - data?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the event Type. - */ - type?: string; + export interface BeforeDropEventArgs { - /** Returns state of a record whether it is in expanded or collapsing state. - */ - expanded?: boolean; - } + /** Returns the sheet index. + */ + sheetIdx?: number; - export interface RecordClickEventArgs { + /** Returns the current cell row and column index. + */ + currentCell?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the drag cells range object. + */ + dragAndDropRange?: any; - /** Returns the element of clicked cell. - */ - cell?: any; + /** Returns the cell Overwriting alert option value. + */ + preventAlert?: boolean; - /** Returns the index of the clicked cell. - */ - cellIndex?: number; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the data of clicked cell. - */ - cellValue?: any; + /** Returns the target item. + */ + target?: HTMLElement; - /** Returns the element of the clicked row. - */ - row?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the index of the clicked row. - */ - rowIndex?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the column name of the clicked cell. - */ - columnName?: string; - } + export interface BeforeEditCommentEventArgs { - export interface ColumnDragStartEventArgs { + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the comment cell index. + */ + cellIndex?: any; - /** Returns the control model values. - */ - model?: any; + /** Returns the disable option value. + */ + disable?: boolean; - /** Returns the event Type. - */ - type?: string; + /** Returns the Spreadsheet model. + */ + model?: any; - /** Returns the column data which is dragged - */ - draggedColumn?: any; + /** Returns the value of the comment + */ + value?: string; - /** Returns the index of the column being dragged - */ - draggedColumnIndex?: number; - } + /** Returns the name of the event. + */ + type?: string; - export interface ColumnDragEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface BeforeOpenEventArgs { - /** Returns the control model values. - */ - model?: any; + /** Returns the target element. + */ + target?: HTMLElement; - /** Returns the event Type. - */ - type?: string; + /** Returns the name of the event. + */ + type?: string; - /** Returns the column data which is dragged - */ - draggedColumn?: any; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the index of the column being dragged - */ - draggedColumnIndex?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the target column data - */ - targetColumn?: any; + export interface BeforePanelOpenEventArgs { - /** Returns the index of the target column - */ - targetColumnIndex?: number; + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Returns that we can drop over the column or not. - */ - canDrop?: boolean; - } + /** Returns the activation panel element. + */ + activationPanel?: any; - export interface ColumnDropEventArgs { + /** Returns the range option value. + */ + range?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the control model values. - */ - model?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the event Type. - */ - type?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the column data which is dragged - */ - draggedColumn?: any; + export interface CellClickEventArgs { - /** Returns the index of the column being dragged - */ - draggedColumnIndex?: number; + /** Returns the click cell element. + */ + cell?: HTMLElement; - /** Returns the target column data - */ - targetColumn?: any; + /** Returns the column index of clicked cell. + */ + columnIndex?: number; - /** Returns the index of the target column - */ - targetColumnIndex?: number; - } + /** Returns the row index of clicked cell. + */ + rowIndex?: number; - export interface ColumnResizedEventArgs { + /** Returns the column name of clicked cell. + */ + columnName?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the column information. + */ + columnObject?: any; - /** Returns the control model values. - */ - model?: any; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the event Type. - */ - type?: string; + /** Returns the name of the event. + */ + type?: string; - /** Returns the column data which is resized - */ - column?: any; + /** Returns the target element. + */ + target?: HTMLElement; - /** Returns the index of the column being resized. - */ - columnIndex?: number; + /** Returns the value of the cell. + */ + value?: string; - /** Returns resized column width after resized. - */ - newWidth?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns resized column width before resizing - */ - oldWidth?: number; - } + export interface CellEditEventArgs { - export interface ColumnResizeStartEventArgs { + /** Returns the click cell element. + */ + cell?: HTMLElement; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the columnName of clicked cell. + */ + columnName?: string; - /** Returns the control model values. - */ - model?: any; + /** Returns the column field information. + */ + columnObject?: any; - /** Returns the event Type. - */ - type?: string; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the column data in which the resizing started - */ - column?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the column index in which the resizing started - */ - columnIndex?: number; + /** Returns the target element. + */ + target?: HTMLElement; - /** Returns column width before dragging - */ - oldWidth?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns initial column element object. - */ - target?: any; - } + export interface CellFormattingEventArgs { - export interface ColumnResizeEndEventArgs { + /** Returns the sheet index + */ + SheetIdx?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the applied style format object + */ + Format?: any; - /** Returns the control model values. - */ - model?: any; + /** Returns the cell index. + */ + Cell?: number; - /** Returns the event Type. - */ - type?: string; + /** Returns the name of the CSS theme. + */ + cssClass?: string; - /** Returns the column data in which the resizing started - */ - column?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the column index in which the resizing started - */ - columnIndex?: number; + /** Returns the target element. + */ + target?: HTMLElement; - /** Returns the column width difference, before and after the resizing - */ - extra?: number; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + } - /** Returns the new column width after resized - */ - newWidth?: number; + export interface CellHoverEventArgs { - /** Returns column width before dragging - */ - oldWidth?: number; + /** Returns the target element. + */ + target?: HTMLElement; - /** Returns initial column element object. - */ - target?: any; - } + /** Returns the name of the event. + */ + type?: string; - export interface ContextMenuOpenEventArgs { + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the default context menu items to which we add custom items. - */ - contextMenuItems?: any[]; + export interface CellSaveEventArgs { - /** Returns the TreeGrid model. - */ - model?: any; + /** Returns the save cell element. + */ + cell?: HTMLElement; - /** Returns request type. - */ - requestType?: string; + /** Returns the columnName of clicked cell. + */ + columnName?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the column field information. + */ + columnObject?: any; - export interface CreateEventArgs { + /** Returns the index of the row. + */ + rowIndex?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the index of the column. + */ + colIndex?: number; - /** Returns the TreeGrid model - */ - model?: any; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the cell previous value. + */ + pValue?: string; - export interface EndEditEventArgs { + /** Returns the name of the event. + */ + type?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the row element of editing cell. - */ - rowElement?: any; + /** Returns the target element. + */ + target?: HTMLElement; - /** Returns the Element of editing cell. - */ - cellElement?: any; + /** Returns the cell value. + */ + value?: string; + } - /** Returns the data of edited cell record. - */ - data?: any; + export interface CellSelectedEventArgs { - /** Returns the column name of edited cell belongs. - */ - columnName?: string; + /** Returns the active sheet index. + */ + sheetIdx?: number; - /** Returns the column object of edited cell belongs. - */ - columnObject?: any; - } + /** Returns the selected range. + */ + selectedRange?: any[]; - export interface ExpandedEventArgs { + /** Returns the target element. + */ + target?: HTMLElement; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the row index of expanded record. - */ - recordIndex?: number; + /** Returns the name of the event. + */ + type?: string; - /** Returns the data of expanded record.. - */ - data?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns Request Type. - */ - requestType?: string; + export interface ContextMenuClickEventArgs { - /** Returns state of a record whether it is in expanded or expanded state. - */ - expanded?: boolean; + /** Returns target element Id. + */ + Id?: string; - /** Returns the event type. - */ - type?: string; - } + /** Returns the target element. + */ + element?: HTMLElement; - export interface ExpandingEventArgs { + /** Returns event information. + */ + event?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns target element and event information. + */ + events?: any; - /** Returns the row index of expanding record. - */ - recordIndex?: number; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the data of expanding record.. - */ - data?: any; + /** Returns target element parent Id. + */ + parentId?: string; - /** Returns the event Type. - */ - type?: string; + /** Returns target element parent text. + */ + parentText?: string; - /** Returns state of a record whether it is in expanded or collapsed state. - */ - expanded?: boolean; - } + /** Returns target element text. + */ + text?: string; - export interface LoadEventArgs { + /** Returns the name of the event. + */ + type?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the TreeGrid model - */ - model?: any; + export interface DragEventArgs { - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the sheet index. + */ + sheetIdx?: number; - export interface QueryCellInfoEventArgs { + /** Returns the current cell row and column index. + */ + currentCell?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the drag cells range object. + */ + dragAndDropRange?: any; - /** Returns the selecting cell element. - */ - cellElement?: any; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the value of cell. - */ - cellValue?: string; + /** Returns the target item. + */ + target?: HTMLElement; - /** Returns the data of current cell record. - */ - data?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the column of cell belongs. - */ - column?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; + } - export interface RowDataBoundEventArgs { + export interface DragShapeEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the Spreadsheet model. + */ + model?: any; - /** Returns the row element of rendering row. - */ - rowElement?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the data of rendering row record. - */ - data?: any; - } + /** Returns the target element. + */ + target?: HTMLElement; - export interface RowDragEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the cancel option value. - */ - cancel?: boolean; + export interface DragStartEventArgs { - /** Returns the row which we start to drag. - */ - draggedRow?: any; + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Returns the row index which we start to drag. - */ - draggedRowIndex?: number; + /** Returns the current cell row and column index. + */ + currentCell?: any; - /** Returns the row on which we are dragging. - */ - targetRow?: any; + /** Returns the drag cells range object. + */ + dragAndDropRange?: any; - /** Returns the row index on which we are dragging. - */ - targetRowIndex?: number; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns that we can drop over that record or not. - */ - canDrop?: boolean; + /** Returns the target item. + */ + target?: HTMLElement; - /** Returns the TreeGrid model. - */ - model?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns request type. - */ - requestType?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the name of the event. - */ - type?: string; - } + export interface DropEventArgs { - export interface RowDragStartEventArgs { + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the current cell row and column index. + */ + currentCell?: any; - /** Returns the row which we start to drag. - */ - draggedRow?: any; + /** Returns the drag cells range object. + */ + dragAndDropRange?: any; - /** Returns the row index which we start to drag. - */ - draggedRowIndex?: boolean; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the TreeGrid model. - */ - model?: any; + /** Returns the target item. + */ + target?: HTMLElement; - /** Returns request type. - */ - requestType?: string; + /** Returns the name of the event. + */ + type?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the cancel option value. + */ + cancel?: boolean; + } - export interface RowDragStopEventArgs { + export interface EditRangeBeginEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Returns the row which we start to drag. - */ - draggedRow?: any; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the row index which we start to drag. - */ - draggedRowIndex?: number; + /** Returns the range option value. + */ + range?: any; - /** Returns the row which we are dropped to row. - */ - targetRow?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the row index which we are dropped to row. - */ - targetRowIndex?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the TreeGrid model. - */ - model?: any; + export interface EditRangeCompleteEventArgs { - /** Returns request type. - */ - requestType?: string; + /** Returns the sheet index. + */ + sheetIdx?: number; - /** Returns the name of the event. - */ - type?: string; - } + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - export interface CellSelectingEventArgs { + /** Returns the range option value. + */ + range?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the name of the event. + */ + type?: string; - /** Returns the cell index on the selection. - */ - cellIndex?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the row index on the selection - */ - rowIndex?: number; + export interface KeyDownEventArgs { - /** Returns the selecting cell element - */ - targetCell?: any; + /** Returns the sheet index. + */ + sheetIndex?: number; - /** Returns the selecting row element - */ - targetRow?: any; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the selecting record object - */ - data?: any; + /** Returns the boolean value. + */ + isCommentEdit?: boolean; - /** Returns the Gantt object Model - */ - model?: any; - } + /** Returns the boolean value. + */ + isEdit?: boolean; - export interface CellSelectedEventArgs { + /** Returns the boolean value. + */ + isSheetRename?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the target element. + */ + target?: HTMLElement; - /** Returns the cell index on the selection. - */ - cellIndex?: number; + /** Returns the name of the event. + */ + type?: string; - /** Returns the row index on the selection - */ - rowIndex?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Returns the selecting cell element - */ - targetCell?: any; + export interface KeyUpEventArgs { - /** Returns the selecting row element - */ - targetRow?: any; + /** Returns the sheet index. + */ + sheetIndex?: number; - /** Returns the selecting record object - */ - data?: any; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the Gantt object Model - */ - model?: any; + /** Returns the boolean value. + */ + isCommentEdit?: boolean; - /** Returns the previously selected row data - */ - previousData?: any; + /** Returns the boolean value. + */ + isEdit?: boolean; - /** Returns the previously selected cell index - */ - previousCellIndex?: any; + /** Returns the boolean value. + */ + isSheetRename?: boolean; - /** Returns the previously selected row index - */ - previousRowIndex?: any; + /** Returns the target element. + */ + target?: HTMLElement; - /** Returns the previously selected cell element - */ - previousTargetCell?: any; + /** Returns the name of the event. + */ + type?: string; - /** Returns the previously selected row element - */ - previousTargetRow?: any; - } + /** Returns the cancel option value. + */ + cancel?: boolean; + } - export interface RowSelectedEventArgs { + export interface LoadEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the name of the event. + */ + type?: string; - /** Returns the selecting row element. - */ - targetRow?: any; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Returns the index of selecting row record. - */ - recordIndex?: number; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the data of selected record. - */ - data?: any; + /** Returns the active sheet index. + */ + sheetIndex?: number; + } - /** Returns the event type. - */ - type?: string; - } + export interface LoadCompleteEventArgs { - export interface RowSelectingEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the data selecting record. - */ - data?: any; - - /** Returns the index of selecting row record. - */ - recordIndex?: string; - - /** Returns the selecting row element. - */ - targetRow?: any; - - /** Returns the previous selected data. - */ - previousData?: any; - - /** Returns the previous selected row index. - */ - previousIndex?: string; - - /** Returns the previous selected row element. - */ - previousTreeGridRow?: any; - } - - export interface ToolbarClickEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the current item. - */ - currentTarget?: any; - - /** Returns the TreeGrid model. - */ - model?: any; - - /** Returns the name of the toolbar item on which mouse click has been performed - */ - itemName?: string; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface Column { - - /** Enables or disables the ability to filter the rows based on this column. - * @Default {false} - */ - allowFiltering?: boolean; - - /** Enables or disables the ability to sort the rows based on this column/field. - * @Default {false} - */ - allowSorting?: boolean; - - /** Enables/disables cell selection. - * @Default {false} - */ - allowCellSelection?: boolean; - - /** Specifies the edit type of the column. - * @Default {ej.TreeGrid.EditingType.String} - */ - editType?: ej.TreeGrid.EditingType | string; - - /** Specifies the name of the field from the dataSource to bind with this column. - */ - field?: string; - - /** Specifies the type of the editor control to be used to filter the rows. - * @Default {ej.TreeGrid.EditingType.String} - */ - filterEditType?: ej.TreeGrid.EditingType | string; - - /** Header text of the column. - * @Default {null} - */ - headerText?: string; - - /** Enables or disables the checkbox visibility in a column to make it as a checkbox column - * @Default {false} - */ - showCheckbox?: boolean; - - /** Controls the visibility of the column. - * @Default {true} - */ - visible?: boolean; - - /** Gets or sets a value for treegrid column width - */ - width?: number; - - /** Specifies the header template value for the column header - */ - headerTemplateID?: string; - - /** Specifies the display format of a column - * @Default {null} - */ - format?: any; - - /** Specifies whether the column is a template column - * @Default {false} - */ - isTemplateColumn?: boolean; - - /** Specifies the alignment of the column header text - * @Default {ej.TextAlign.Left} - */ - headerTextAlign?: ej.TextAlign | string; - - /** Specifies whether the column is frozen - * @Default {false} - */ - isFrozen?: boolean; - - /** Specifies the text alignment for the column - * @Default {ej.TextAlign.Left} - */ - textAlign?: ej.TextAlign | string; - - /** Specifies the template for the TreeGrid column - */ - templateID?: string; - - /** Enables or disables the ability to edit a row or cell. - * @Default {false} - */ - allowEditing?: boolean; - - /** Enables or disables the ability to freeze/unfreeze the columns - * @Default {false} - */ - allowFreezing?: boolean; - } - - export interface ContextMenuSettings { - - /** Option for adding items to context menu. - * @Default {[]} - */ - contextMenuItems?: any[]; - - /** Shows/hides the context menu. - * @Default {false} - */ - showContextMenu?: boolean; - } - - export interface DragTooltip { - - /** Specifies whether to show tooltip while dragging a row. - * @Default {true} - */ - showTooltip?: boolean; - - /** Option to add field names whose corresponding values in the dragged row needs to be shown in the preview tooltip. - * @Default {[]} - */ - tooltipItems?: any[]; - - /** Custom template for that tooltip that is shown while dragging a row. - * @Default {null} - */ - tooltipTemplate?: string; - } - - export interface EditSettings { - - /** Enables or disables the button to add new row in context menu as well as in toolbar. - * @Default {true} - */ - allowAdding?: boolean; - - /** Enables or disables the button to delete the selected row in context menu as well as in toolbar. - * @Default {true} - */ - allowDeleting?: boolean; - - /** Enables or disables the ability to edit a row or cell. - * @Default {false} - */ - allowEditing?: boolean; - - /** Specifies the mouse action whether single click or double click to begin the editing - * @Default {ej.TreeGrid.BeginEditAction.DblClick} - */ - beginEditAction?: ej.TreeGrid.BeginEditAction | string; - - /** specifies the edit mode in TreeGrid , "cellEditing" is for cell type editing and "rowEditing" is for entire row. - * @Default {ej.TreeGrid.EditMode.CellEditing} - */ - editMode?: ej.TreeGrid.EditMode | string; - - /** Specifies the position where the new row has to be added. - * @Default {top} - */ - rowPosition?: ej.TreeGrid.RowPosition | string; - } - - export interface ColumnResizeSettings { - - /** Specifies the mode for column resizing - * @Default {normal} - */ - columnResizeMode?: string; - } - - export interface FilterSettings { - - /** Specifies the mode on which column filtering should start - * @Default {immediate} - */ - filterBarMode?: string; - - /** Specifies the type of column filtering. - * @Default {filterbar} - */ - filterType?: string; - - /** Specifies the column collection for filtering the TreeGrid content on initial load - * @Default {[]} - */ - filteredColumns?: any[]; - } - - export interface PageSettings { - - /** Using this property we can specify the number of pages should pager contains, according to this count TreeGrid height will be updated. - * @Default {8} - */ - pageCount?: number; - - /** This specifies the number of rows to display in each page. - * @Default {12} - */ - pageSize?: number; - - /** Get the value of records which is bound to TreeGrid. The totalRecordsCount value is calculated based on the datasource bound to TreeGrid. - * @Default {null} - */ - totalRecordsCount?: number; - - /** Specifies the current page to display at load time. - * @Default {1} - */ - currentPage?: number; - - /** Specifies the mode of record count in a page, whether it should count all the records or the root to count zero level parent records. - * @Default {ej.TreeGrid.PageSizeMode.All} - */ - pageSizeMode?: ej.TreeGrid.PageSizeMode | string; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Specifies the Custom template for Pager control. - * @Default {null} - */ - template?: string; - } + /** Returns the name of the event. + */ + type?: string; - export interface SelectionSettings { + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Specifies the type of selection whether to select row or cell. - * @Default {ej.TreeGrid.SelectionMode.Row} - */ - selectionMode?: ej.TreeGrid.SelectionMode | string; + export interface MenuClickEventArgs { - /** Specifies the type of selection whether single, multiple or checkbox. - * @Default {ej.TreeGrid.SelectionType.Single} - */ - selectionType?: ej.TreeGrid.SelectionType | string; + /** Returns menu click element. + */ + element?: HTMLElement; - /** Enables or disables the selection by hierarchy in check box selection - * @Default {true} - */ - enableHierarchySelection?: boolean; + /** Returns the event information. + */ + event?: any; - /** Toggles the visibility of the checkbox in column header, using which all the check boxes can be selected or unselected. - * @Default {true} - */ - enableSelectAll?: boolean; - } + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - export interface SizeSettings { + /** Returns target element parent Id. + */ + parentId?: string; - /** Height of the TreeGrid. - * @Default {null} - */ - height?: string; + /** Returns target element parent text. + */ + parentText?: string; - /** Width of the TreeGrid. - * @Default {null} - */ - width?: string; - } + /** Returns target element text. + */ + text?: string; - export interface SortSettings { + /** Returns the name of the event. + */ + type?: string; - /** Option to add columns based on which the rows have to be sorted recursively. - * @Default {[]} - */ - sortedColumns?: any[]; - } + /** Returns the cancel option value. + */ + cancel?: boolean; + } - export interface ToolbarSettings { + export interface OnImportEventArgs { - /** Shows/hides the toolbar. - * @Default {false} - */ - showToolbar?: boolean; + /** Returns the name of the event. + */ + type?: string; - /** Specifies the list of toolbar items to be rendered in TreeGrid toolbar - * @Default {[]} - */ - toolbarItems?: any[]; - } + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - enum EditingType { + /** Returns the cancel option value. + */ + cancel?: boolean; - ///It Specifies String edit type. - String, + /** Returns the imported data. + */ + importData?: any; + } - ///It Specifies Boolean edit type. - Boolean, + export interface OpenFailureEventArgs { - ///It Specifies Numeric edit type. - Numeric, + /** Returns the failure type. + */ + failureType?: string; - ///It Specifies Dropdown edit type. - Dropdown, + /** Returns the status index. + */ + status?: number; - ///It Specifies DatePicker edit type. - DatePicker, + /** Returns the status in text. + */ + statusText?: string; - ///It Specifies DateTimePicker edit type. - DateTimePicker, + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - ///It Specifies Maskedit edit type. - Maskedit - } + /** Returns the name of the event. + */ + type?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - enum BeginEditAction { + export interface PagerClickEventArgs { - ///you can begin the editing at double click - DblClick, + /** Returns the active sheet index. + */ + activeSheet?: number; - ///you can begin the editing at single click - Click - } + /** Returns the new sheet index. + */ + gotoSheet?: number; + /** Returns whether new sheet icon is clicked. + */ + newSheet?: boolean; - enum EditMode { + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - ///you can edit a cell. - CellEditing, + /** Returns the name of the event. + */ + type?: string; - ///you can edit a row. - RowEditing - } + /** Returns the target element. + */ + target?: HTMLElement; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - enum RowPosition { + export interface ResizeStartEventArgs { - ///you can add a new row at top. - Top, + /** Returns the column index which column you start to resize. + */ + colIndex?: number; - ///you can add a new row at bottom. - Bottom, + /** Returns the row index which row you start to resize. + */ + rowIndex?: number; - ///you can add a new row to above selected row. - Above, + /** Returns the Spreadsheet model. + */ + model?: any; - ///you can add a new row to below selected row. - Below, + /** Returns type of the request. + */ + reqType?: string; - ///you can add a new row as a child for selected row. - Child - } + /** Returns the name of the event. + */ + type?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - enum PageSizeMode { + export interface ResizeEndEventArgs { - ///To count all the parent and child records. - All, + /** Returns the column index which you resized. + */ + colIndex?: number; - ///To count the Zeroth level parent records. - Root - } + /** Returns old width of the column or shape. + */ + oldWidth?: number; + /** Returns new width of the column or shape. + */ + newWidth?: number; - enum SelectionMode { + /** Returns the row index which you resized. + */ + rowIndex?: number; - ///you can select a row. - Row, + /** Returns old height of the row or shape. + */ + oldHeight?: number; - ///you can select a cell. - Cell - } + /** Returns new height of the row or shape. + */ + newHeight?: number; + /** Returns the Spreadsheet model. + */ + model?: any; - enum SelectionType { + /** Returns type of the request. + */ + reqType?: string; - ///you can select a single row. - Single, + /** Returns the name of the event. + */ + type?: string; - ///you can select a multiple row. - Multiple, + /** Returns the cancel option value. + */ + cancel?: boolean; + } - ///you can select rows using checkbox. - Checkbox - } + export interface RibbonClickEventArgs { - } + /** Returns element Id. + */ + Id?: string; - class GroupButton extends ej.Widget { - static fn: GroupButton; - constructor(element: JQuery | Element, options?: GroupButton.Model); - static Locale: any; - model: GroupButton.Model; - defaults: GroupButton.Model; + /** Returns target information. + */ + prop?: any; - /** Remove the selection state of the specified the button element from the GroupButton - * @param {JQuery} Specific button element - * @returns {void} - */ - deselectItem(element: JQuery): void; + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; - /** Destroy the GroupButton widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; + /** Returns status. + */ + status?: boolean; - /** Disables the GroupButton control - * @returns {void} - */ - disable(): void; + /** Returns isChecked in boolean. + */ + isChecked?: boolean; - /** Disable the specified button element from the ejGroupButton control. - * @param {JQuery} Specific button element - * @returns {void} - */ - disableItem(element: JQuery): void; + /** Returns the name of the event. + */ + type?: string; - /** Enables the disabled ejGroupButton control. - * @returns {void} - */ - enable(): void; + /** Returns the target element. + */ + target?: HTMLElement; - /** Enable the specified disabled button element from the ejGroupButton control. - * @param {JQuery} Specific button element - * @returns {void} - */ - enableItem(element: JQuery): void; - - /** Returns the index value for specified button element in the GroupButton control. - * @param {JQuery} Specific button element - * @returns {number} - */ - getIndex(element: JQuery): number; - - /** This method returns the list of active state button elements from the GroupButton control. - * @returns {any} - */ - getSelectedItem(): any; - - /** Hides the GroupButton control - * @returns {void} - */ - hide(): void; - - /** Hide the specified button element from the ejGroupButton control. - * @param {JQuery} Specific button element - * @returns {void} - */ - hideItem(element: JQuery): void; - - /** Returns the disabled state of the specified element button element in GroupButton as Boolean. - * @returns {boolean} - */ - isDisabled(): boolean; - - /** Returns the state of the specified button element as Boolean. - * @returns {boolean} - */ - isSelected(): boolean; - - /** Public method used to select the specified button element from the ejGroupButton control. - * @param {JQuery} Specific button element - * @returns {void} - */ - selectItem(element: JQuery): void; - - /** Shows the GroupButton control, if its hide. - * @returns {void} - */ - show(): void; - - /** Show the specified hidden button element from the ejGroupButton control. - * @param {JQuery} Specific button element - * @returns {void} - */ - showItem(element: JQuery): void; - } - export namespace GroupButton { - - export interface Model { - - /** Sets the specified class to GroupButton wrapper element, which allows for custom skinning option in ejGroupButton control. - */ - cssClass?: string; - - /** To set the local JSON data, define a JSON array and initialize the GroupButton with dataSource property. Specify the column names in the fields property. - * @Default {null} - */ - dataSource?: any; - - /** Displays the ejGroupButton in Right to Left direction. - * @Default {false} - */ - enableRTL?: boolean; - - /** Used to enable or disable the ejGroupButton control. - * @Default {true} - */ - enabled?: boolean; - - /** Gets or sets a value that indicates to display the values of the data. - * @Default {null} - */ - fields?: any; - - /** Sets the GroupButton behavior to works as Checkbox mode/ radio button mode based on the specified option. - * @Default {ej.GroupButtonMode.RadioButton} - */ - groupButtonMode?: ej.GroupButtonMode | string; - - /** Used to sets the height of the ejGroupButton control. - * @Default {28} - */ - height?: string | number; - - /** Defines the characteristics of the ejGroupButton control and extend the capability of an HTML element by adding specified attributes to element tag and by performing the related actions - * @Default {{}} - */ - htmlAttributes?: any; - - /** Specify the orientation of the GroupButton. See below to get available orientations - * @Default {ej.Orientation.Horizontal} - */ - orientation?: ej.Orientation | string; - - /** Query the dataSource from the table for Groupbutton - * @Default {null} - */ - query?: any; - - /** Sets the list of button elements to be selected. To enable this option groupButtonMode should be in “checkbox” mode. - * @Default {[]} - */ - selectedItemIndex?: number[] | string[]; - - /** Sets the rounder corner to the GroupButton, if sets as true. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Specifies the size of the button. See available size - * @Default {ej.ButtonSize.Normal} - */ - size?: ej.ButtonSize | string; - - /** Defines the width of the ejGroupButton control. - */ - width?: string | number; - - /** Triggered before any button element in the GroupButton get selected. */ - beforeSelect?(e: BeforeSelectEventArgs): void; - - /** Fires after GroupButton control is created.If the user want to perform any operation after the button control creation then the user can make use of this create event. */ - create?(e: CreateEventArgs): void; - - /** Fires when the GroupButton is destroyed successfully.If the user want to perform any operation after the destroy button control then the user can make use of this destroy event. */ - destroy?(e: DestroyEventArgs): void; - - /** Triggered once the key is pressed, when the control is in focused state. */ - keyPress?(e: KeyPressEventArgs): void; - - /** Triggered when the button element get selected. */ - select?(e: SelectEventArgs): void; - } - - export interface BeforeSelectEventArgs { - - /** Boolean value based on whether the button element is disabled or not. - */ - disabled?: boolean; - - /** Returns the selection button element. - */ - element?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** Event object - */ - event?: any; + export interface SeriesRenderingEventArgs { - /** Return the button element ID. - */ - id?: string; + /** Returns chart data and chart information. + */ + data?: any; - /** Button item index. - */ - index?: number; + /** Returns the chart model. + */ + model?: ej.Spreadsheet.Model; - /** returns the button model - */ - model?: ej.GroupButton.Model; + /** Returns the name of the event. + */ + type?: string; - /** Boolean value based on whether the button element is selected or not. - */ - selected?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; + } - /** returns the name of the event - */ - type?: string; + export interface TabClickEventArgs { - /** return the button state - */ - status?: boolean; - } + /** Returns the active tab index. + */ + activeIndex?: number; - export interface CreateEventArgs { + /** Returns active tab header element. + */ + activeHeader?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns previous active tab header element. + */ + prevActiveHeader?: any; - /** returns the GroupButton model - */ - model?: ej.GroupButton.Model; + /** Returns previous active tab index. + */ + prevActiveIndex?: number; - /** returns the name of the event - */ - type?: string; - } + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /** Returns the name of the event. + */ + type?: string; - export interface DestroyEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the GroupButton model - */ - model?: ej.GroupButton.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface KeyPressEventArgs { - - /** Boolean value based on whether the button element is disabled or not. - */ - disabled?: boolean; - - /** Returns the selection button element. - */ - element?: any; - - /** Event object - */ - event?: any; - - /** Return the button element ID. - */ - id?: string; - - /** Button item index. - */ - index?: number; - - /** returns the button model - */ - model?: ej.GroupButton.Model; - - /** Boolean value based on whether the button element is selected or not. - */ - selected?: boolean; - - /** returns the name of the event - */ - type?: string; - - /** return the button state - */ - status?: boolean; - } - - export interface SelectEventArgs { - - /** Boolean value based on whether the selected button element is disabled or not. - */ - disabled?: boolean; - - /** Returns the selection button element. - */ - element?: any; - - /** Event object - */ - event?: any; - - /** Return the selected button element ID. - */ - id?: string; - - /** Selected button item index. - */ - index?: number; - - /** returns the button model - */ - model?: ej.GroupButton.Model; - - /** Boolean value based on whether the button element is selected or not. - */ - selected?: boolean; - - /** returns the name of the event - */ - type?: string; - - /** return the button state - */ - status?: boolean; - } - } - enum GroupButtonMode { - //Sets the GroupButton to work as checkbox mode - CheckBox, - //Sets the RadioButton to work as radio button mode - RadioButton, - } - - class NavigationDrawer extends ej.Widget { - static fn: NavigationDrawer; - constructor(element: JQuery | Element, options?: NavigationDrawer.Model); - static Locale: any; - model: NavigationDrawer.Model; - defaults: NavigationDrawer.Model; - - /** To close the navigation drawer control - * @returns {void} - */ - close(): void; - - /** To load AJAX content into NavigationDrawer container. - * @returns {void} - */ - loadContent(): void; - - /** To open the navigation drawer control - * @returns {void} - */ - open(): void; - - /** To Toggle the navigation drawer control - * @returns {void} - */ - toggle(): void; - } - export namespace NavigationDrawer { - - export interface Model { - - /** Specifies the ajaxSettings option to load the content to the NavigationDrawer control. - * @Default {null} - */ - ajaxSettings?: AjaxSettings; - - /** Specifies the contentId for navigation drawer, where the AJAX content need to updated - * @Default {null} - */ - contentId?: string; - - /** Sets the root class for NavigationDrawer theme. This cssClass API helps to use custom skinning option for NavigationDrawer control. - * By defining the root class using this API, we need to include this root class in CSS. - */ - cssClass?: string; - - /** Sets the Direction for the control. See Direction - * @Default {left} - */ - direction?: ej.Direction | string; - - /** Sets the listview to be enabled or not - * @Default {false} - */ - enableListView?: boolean; - - /** Specifies the listview items as an array of object. - * @Default {[]} - */ - items?: any[]; - - /** Sets all the properties of listview to render in navigation drawer - */ - listViewSettings?: any; - - /** Specifies position whether it is in fixed or relative to the page. See Position - * @Default {normal} - */ - position?: string; - - /** Specifies the targetId for navigation drawer - */ - targetId?: string; - - /** Sets the rendering type of the control. See Type - * @Default {overlay} - */ - type?: string; - - /** Specifies the width of the control - * @Default {auto} - */ - width?: number; - - /** Navigation pane opened initially when isPaneOpen property is true. - * @Default {false} - */ - isPaneOpen?: boolean; - - /** Event triggers after the AJAX content loaded completely. */ - ajaxComplete?(e: AjaxCompleteEventArgs): void; - - /** Event triggers when the AJAX request failed. */ - ajaxError?(e: AjaxErrorEventArgs): void; - - /** Event triggers after the AJAX content loaded successfully. */ - ajaxSuccess?(e: AjaxSuccessEventArgs): void; - - /** Event triggers before the control gets closed. */ - beforeClose?(e: BeforeCloseEventArgs): void; - - /** Event triggers when the control open. */ - open?(e: OpenEventArgs): void; - - /** Event triggers when the Swipe happens. */ - swipe?(e: SwipeEventArgs): void; - } - - export interface AjaxCompleteEventArgs { + /** Returns the target element. + */ + target?: HTMLElement; + + /** Returns the cancel option value. + */ + cancel?: boolean; + } + + export interface TabSelectEventArgs { - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Returns the active tab index. + */ + activeIndex?: number; + + /** Returns active tab header element. + */ + activeHeader?: any; - /** returns the name of the event. - */ - type?: string; + /** Returns previous active tab header element. + */ + prevActiveHeader?: any; + + /** Returns previous active tab index. + */ + prevActiveIndex?: number; + + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the target element. + */ + target?: HTMLElement; + + /** Returns the cancel option value. + */ + cancel?: boolean; + } + + export interface AutoFillSettings { + + /** This property is used to set fillType unit in Spreadsheet. It has five types which are CopyCells, FillSeries, FillFormattingOnly, FillWithoutFormatting and FlashFill. + * @Default {ej.Spreadsheet.AutoFillOptions.FillSeries} + */ + fillType?: ej.Spreadsheet.AutoFillOptions|string; + + /** Gets or sets a value that indicates to enable or disable auto fill options in the Spreadsheet. + * @Default {true} + */ + showFillOptions?: boolean; + } + + export interface ChartSettings { + + /** Gets or sets a value that defines the chart height in Spreadsheet. + * @Default {220} + */ + height?: number; + + /** Gets or sets a value that defines the chart width in the Spreadsheet. + * @Default {440} + */ + width?: number; + } + + export interface ExportSettings { + + /** Gets or sets a value that indicates whether to enable or disable save feature in Spreadsheet. By enabling this feature, you can save existing Spreadsheet. + * @Default {true} + */ + allowExporting?: boolean; + + /** Gets or sets a value that indicates to define csvUrl for export to CSV format. + * @Default {null} + */ + csvUrl?: string; + + /** Gets or sets a value that indicates to define excelUrl for export to excel format. + * @Default {null} + */ + excelUrl?: string; + + /** Gets or sets a value that indicates to define password while export to excel format. + * @Default {null} + */ + password?: string; + + /** Gets or sets a value that indicates to define pdfUrl for export to PDF format. + * @Default {null} + */ + pdfUrl?: string; + } + + export interface FormatSettings { + + /** Gets or sets a value that indicates whether to enable or disable cell border feature in the Spreadsheet. + * @Default {true} + */ + allowCellBorder?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable decimal places in the Spreadsheet. + * @Default {true} + */ + allowDecimalPlaces?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable font family feature in Spreadsheet. + * @Default {true} + */ + allowFontFamily?: boolean; + } + + export interface ImportSettings { + + /** Sets import mapper to perform import feature in Spreadsheet. + */ + importMapper?: string; + + /** Gets or sets a value that indicates whether to enable or disable import while initial loading. + * @Default {false} + */ + importOnLoad?: boolean; + + /** Sets import URL to access the online files in the Spreadsheet. + */ + importUrl?: string; + + /** Gets or sets a value that indicates to define password while importing in the Spreadsheet. + */ + password?: string; + } + + export interface NameManager { + + /** Specifies the name for the cell or a range. + */ + name?: string; + + /** Specifies the address for the cell or a range. + */ + refersto?: string; + } + + export interface PictureSettings { + + /** Gets or sets a value that indicates whether to enable or disable picture feature in Spreadsheet. By enabling this, you can add pictures in Spreadsheet. + * @Default {true} + */ + allowPictures?: boolean; + + /** Gets or sets a value that indicates to define height to picture in the Spreadsheet. + * @Default {220} + */ + height?: number; + + /** Gets or sets a value that indicates to define width to picture in the Spreadsheet. + * @Default {440} + */ + width?: number; + } + + export interface PrintSettings { + + /** Gets or sets a value that indicates whether to enable or disable page setup support for printing in Spreadsheet. + * @Default {true} + */ + allowPageSetup?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable page size support for printing in Spreadsheet. + * @Default {false} + */ + allowPageSize?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable print feature in the Spreadsheet. + * @Default {true} + */ + allowPrinting?: boolean; + } + + export interface RibbonSettingsApplicationTabMenuSettings { + + /** Gets or sets a value that indicates whether to enable or disable isAppend property in ribbon settings. + * @Default {false} + */ + isAppend?: boolean; + + /** Specifies the data source to append in application tab. + * @Default {[]} + */ + dataSource?: any[]; + } + + export interface RibbonSettingsApplicationTab { + + /** Gets or sets a value that indicates to set application tab type in Spreadsheet. It has two types, Menu and Backstage. + * @Default {ej.Ribbon.ApplicationTabType.Backstage} + */ + type?: ej.Ribbon.ApplicationTabType|string; + + /** Gets or sets an object that indicates menu settings for application tab in Spreadsheet. + */ + menuSettings?: RibbonSettingsApplicationTabMenuSettings; + } + + export interface RibbonSettings { + + /** Gets or sets an object that indicates application tab settings in Spreadsheet. + */ + applicationTab?: RibbonSettingsApplicationTab; + } + + export interface ScrollSettings { + + /** Gets or sets a value that indicates whether to enable or disable scrolling in Spreadsheet. + * @Default {true} + */ + allowScrolling?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable sheet on demand. By enabling this, it render only the active sheet element while paging remaining sheets are + * created one by one. + * @Default {false} + */ + allowSheetOnDemand?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable virtual scrolling feature in the Spreadsheet. + * @Default {true} + */ + allowVirtualScrolling?: boolean; + + /** Gets or sets the value that indicates to define the height of spreadsheet. + * @Default {100%} + */ + height?: number|string; + + /** Gets or sets the value that indicates whether to enable or disable responsive mode in the Spreadsheet. + * @Default {true} + */ + isResponsive?: boolean; + + /** Gets or sets a value that indicates to set scroll mode in Spreadsheet. It has two scroll modes, Normal and Infinite. + * @Default {ej.Spreadsheet.scrollMode.Infinite} + */ + scrollMode?: ej.Spreadsheet.scrollMode|string; + + /** Gets or sets the value that indicates to define the height of the spreadsheet. + * @Default {100%} + */ + width?: number|string; + } + + export interface SelectionSettings { + + /** Gets or sets a value that indicates to define active cell in spreadsheet. + */ + activeCell?: string; + + /** Gets or sets a value that indicates to define animation time while selection in the Spreadsheet. + * @Default {0.001} + */ + animationTime?: number; + + /** Gets or sets a value that indicates to enable or disable animation while selection. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Gets or sets a value that indicates to set selection type in Spreadsheet. It has three types which are Column, Row and Default. + * @Default {ej.Spreadsheet.SelectionType.Default} + */ + selectionType?: ej.Spreadsheet.SelectionType|string; + + /** Gets or sets a value that indicates to set selection unit in Spreadsheet. It has three types which are Single, Range and MultiRange. + * @Default {ej.Spreadsheet.SelectionUnit.MultiRange} + */ + selectionUnit?: ej.Spreadsheet.SelectionUnit|string; + } + + export interface SheetsBorder { + + /** Specifies border type in the Spreadsheet. + */ + type?: ej.Spreadsheet.BorderType|string; + + /** Specifies border color for range of cells in Spreadsheet. + */ + color?: string; + + /** To apply border for the specified range of cell. + */ + range?: string; + } + + export interface SheetsCFormatRule { + + /** Specifies the conditions to apply for the range of cells in Spreadsheet. + */ + action?: ej.Spreadsheet.CFormatRule|string; + + /** Specifies the color to apply for the range of cell while conditional formatting. + */ + color?: ej.Spreadsheet.CFormatHighlightColor|string; + + /** Specifies the inputs for conditional formatting in Spreadsheet. + * @Default {[]} + */ + inputs?: any[]; + + /** Specifies the range for conditional formatting in Spreadsheet. + */ + range?: string; + } + + export interface SheetsRangeSetting { + + /** Gets or sets the data to render the Spreadsheet. + * @Default {null} + */ + dataSource?: any; + + /** Specifies the header styles for the headers in datasource range. + * @Default {null} + */ + headerStyles?: any; + + /** Specifies the primary key for the datasource in Spreadsheet. + */ + primaryKey?: string; + + /** Specifies the query for the datasource in Spreadsheet. + * @Default {null} + */ + query?: any; + + /** Gets or sets a value that indicates whether to enable or disable the datasource header in Spreadsheet. + * @Default {true} + */ + showHeader?: boolean; + + /** Specifies the start cell for the datasource range in Spreadsheet. + * @Default {A1} + */ + startCell?: string; + } + + export interface SheetsRowsCellsComment { + + /** Get or sets the value that indicates whether to show or hide comments in Spreadsheet. + * @Default {false} + */ + isVisible?: boolean; + + /** Specifies the value for the comment in Spreadsheet. + */ + value?: string; + } + + export interface SheetsRowsCellsFormat { + + /** Specifies the number of decimal places for the given input. + * @Default {2} + */ + decimalPlaces?: number; + + /** Specifies the string format for the given input. + */ + formatStr?: string; + + /** Specifies the thousand separator for the given input. + * @Default {false} + */ + thousandSeparator?: boolean; + + /** Specifies the type of the format in Spreadsheet. + */ + type?: string; + } + + export interface SheetsRowsCellsHyperlink { + + /** Specifies the web address for the hyperlink of a cell. + */ + webAddr?: string; + + /** Specifies the cell address for the hyperlink of a cell. + */ + cellAddr?: string; + + /** Specifies the sheet index to which the cell is referred. + * @Default {1} + */ + sheetIndex?: number; + } + + export interface SheetsRowsCellsStyle { + + /** Specifies the background color of a cell in the Spreadsheet. + */ + backgroundColor?: string; + + /** Specifies the font color of a cell in the Spreadsheet. + */ + color?: string; + + /** Specifies the font weight of a cell in the Spreadsheet. + */ + fontWeight?: string; + } + + export interface SheetsRowsCell { + + /** Specifies the comment for a cell in Spreadsheet. + * @Default {null} + */ + comment?: SheetsRowsCellsComment; + + /** Specifies the format of a cell in Spreadsheet. + * @Default {null} + */ + format?: SheetsRowsCellsFormat; + + /** Specifies the hyperlink for a cell in Spreadsheet. + * @Default {null} + */ + hyperlink?: SheetsRowsCellsHyperlink; + + /** Specifies the index of a cell in Spreadsheet. + * @Default {0} + */ + index?: number; + + /** Specifies whether to lock or unlock a particular cell. + * @Default {false} + */ + isLocked?: boolean; + + /** Specifies the styles of a cell in Spreadsheet. + * @Default {null} + */ + style?: SheetsRowsCellsStyle; + + /** Specifies the value for a cell in Spreadsheet. + */ + value?: string; + } + + export interface SheetsRow { + + /** Gets or sets the height of a row in Spreadsheet. + * @Default {20} + */ + height?: number; + + /** Specifies the cells of a row in Spreadsheet. + * @Default {[]} + */ + cells?: SheetsRowsCell[]; + + /** Gets or sets the index of a row in Spreadsheet. + * @Default {0} + */ + index?: number; + } + + export interface Sheet { + + /** Specifies the border for the cell in the Spreadsheet. + * @Default {[]} + */ + border?: SheetsBorder[]; + + /** Specifies the cell types for a cell or range in Spreadsheet. + * @Default {[]} + */ + cellTypes?: any[]; + + /** Specifies the conditional formatting for the range of cell in Spreadsheet. + * @Default {[]} + */ + cFormatRule?: SheetsCFormatRule[]; + + /** Gets or sets a value that indicates to define column count in the Spreadsheet. + * @Default {21} + */ + colCount?: number; + + /** Gets or sets a value that indicates to define column width in the Spreadsheet. + * @Default {64} + */ + columnWidth?: number; + + /** Gets or sets the data to render the Spreadsheet. + * @Default {null} + */ + dataSource?: any; + + /** Gets or sets a value that indicates whether to enable or disable field as column header in the Spreadsheet. + * @Default {false} + */ + fieldAsColumnHeader?: boolean; + + /** Gets or sets a value to freeze rows in the Spreadsheet. + * @Default {0} + */ + frozenRows?: number; + + /** Gets or sets a value to freeze columns in the Spreadsheet. + * @Default {0} + */ + frozenColumns?: number; + + /** Specifies the header styles for the headers in datasource range. + * @Default {null} + */ + headerStyles?: any; + + /** To hide the specified columns in Spreadsheet. + * @Default {[]} + */ + hideColumns?: any[]; - /** returns the model value of the control. - */ - model?: ej.NavigationDrawer.Model; - } + /** To hide the specified rows in Spreadsheet. + * @Default {[]} + */ + hideRows?: any[]; - export interface AjaxErrorEventArgs { + /** To merge specified ranges in Spreadsheet. + * @Default {[]} + */ + mergeCells?: any[]; - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Specifies the primary key for the datasource in Spreadsheet. + */ + primaryKey?: string; - /** returns the name of the event. - */ - type?: string; + /** Specifies the query for the dataSource in Spreadsheet. + * @Default {null} + */ + query?: any; - /** returns the model value of the control. - */ - model?: ej.NavigationDrawer.Model; + /** Specifies single range or multiple range settings for a sheet in Spreadsheet. + * @Default {[]} + */ + rangeSettings?: SheetsRangeSetting[]; - /** returns the error thrown in the AJAX post. - */ - errorThrown?: any; + /** Gets or sets a value that indicates to define row count in the Spreadsheet. + * @Default {20} + */ + rowCount?: number; - /** returns the status. - */ - textStatus?: any; - } + /** Specifies the rows for a sheet in Spreadsheet. + * @Default {[]} + */ + rows?: SheetsRow[]; - export interface AjaxSuccessEventArgs { + /** Gets or sets a value that indicates whether to show or hide grid lines in the Spreadsheet. + * @Default {true} + */ + showGridlines?: boolean; - /** returns true if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Gets or sets a value that indicates whether to enable or disable the datasource header in Spreadsheet. + * @Default {true} + */ + showHeader?: boolean; - /** returns the name of the event. - */ - type?: string; + /** Gets or sets a value that indicates whether to show or hide headings in the Spreadsheet. + * @Default {true} + */ + showHeadings?: boolean; - /** returns the model value of the control. - */ - model?: ej.NavigationDrawer.Model; + /** Specifies the start cell for the datasource range in Spreadsheet. + * @Default {A1} + */ + startCell?: string; + } - /** returns the AJAX current content. - */ - content?: string; + enum AutoFillOptions { - /** returns the current URL of the AJAX post. - */ - URL?: string; - } + ///Specifies the CopyCells property in AutoFillOptions. + CopyCells, - export interface BeforeCloseEventArgs { + ///Specifies the FillSeries property in AutoFillOptions. + FillSeries, - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + ///Specifies the FillFormattingOnly property in AutoFillOptions. + FillFormattingOnly, - /** returns the Navigation Drawer model - */ - model?: ej.NavigationDrawer.Model; + ///Specifies the FillWithoutFormatting property in AutoFillOptions. + FillWithoutFormatting, - /** returns the name of the event - */ - type?: string; - } + ///Specifies the FlashFill property in AutoFillOptions. + FlashFill + } - export interface OpenEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Navigation Drawer model - */ - model?: ej.NavigationDrawer.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface SwipeEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Navigation Drawer model - */ - model?: ej.NavigationDrawer.Model; - - /** returns the name of the event - */ - type?: string; - } - - export interface AjaxSettings { - - /** It specifies, whether to enable or disable asynchronous request. - */ - async?: boolean; - - /** It specifies the page will be cached in the web browser. - */ - cache?: boolean; - - /** It specifies the type of data is send in the query string. - */ - contentType?: string; - - /** It specifies the data as an object, will be passed in the query string. - */ - data?: any; - - /** It specifies the type of data that you're expecting back from the response. - */ - dataType?: string; - - /** It specifies the HTTP request type. - */ - type?: string; - } - } - - class RadialMenu extends ej.Widget { - static fn: RadialMenu; - constructor(element: JQuery | Element, options?: RadialMenu.Model); - static Locale: any; - model: RadialMenu.Model; - defaults: RadialMenu.Model; - - /** To hide the radialmenu - * @returns {void} - */ - hide(): void; - - /** To hide the radialmenu items - * @returns {void} - */ - hideMenu(): void; - - /** To Show the radial menu - * @returns {void} - */ - show(): void; - - /** To show menu items - * @returns {void} - */ - showMenu(): void; - - /** To enable menu item using index - * @param {number} Index of the Radialmenu to be enabled. - * @returns {void} - */ - enableItemByIndex(itemIndex: number): void; - - /** To enable menu items using indices - * @param {Array} Index of the Radialmenu to be enabled. - * @returns {void} - */ - enableItemsByIndices(itemIndices: any[]): void; - - /** To disable menu item using index - * @param {number} Index of the Radialmenu to be disabled. - * @returns {void} - */ - disableItemByIndex(itemIndex: number): void; - - /** To disable menu items using indices - * @param {Array} items of the Radialmenu to disable. - * @returns {void} - */ - disableItemsByIndices(itemIndices: any[]): void; - - /** To enable menu item using item text - * @param {string} item of the Radialmenu item to enable. - * @returns {void} - */ - enableItem(item: string): void; - - /** To disable menu item using item text - * @param {string} item of the Radialmenu item to disable. - * @returns {void} - */ - disableItem(item: string): void; - - /** To enable menu items using item texts - * @param {Array} items of the Radialmenu item to enable. - * @returns {void} - */ - enableItems(items: any[]): void; - - /** To disable menu items using item texts - * @param {Array} items of the Radialmenu item to disable. - * @returns {void} - */ - disableItems(items: any[]): void; - - /** To update menu item badge value - * @param {number} The index value to add the given items at the specified index. If index is not specified, the given value will not be updated. - * @param {number} The Value to be updated in the badge. It will be updated based on the given index - * @returns {void} - */ - updateBadgeValue(index: number, value: number): void; - - /** To show menu item badge - * @param {number} Index of the Radialmenu item to be shown badge. - * @returns {void} - */ - showBadge(index: number): void; - - /** To hide menu item badge - * @param {number} Index of the Radialmenu item to hide the badge. - * @returns {void} - */ - hideBadge(index: number): void; - } - export namespace RadialMenu { - - export interface Model { - - /** To show the Radial in initial render. - */ - autoOpen?: boolean; - - /** Renders the back button Image for Radial using class. - */ - backImageClass?: string; - - /** Sets the root class for RadialMenu theme. This cssClass API helps to use custom skinning option for RadialMenu control. By defining the root class using this API, - * we need to include this root class in CSS. - */ - cssClass?: string; - - /** To enable Animation for Radial Menu. - */ - enableAnimation?: boolean; - - /** Renders the Image for Radial using Class. - */ - imageClass?: string; - - /** Specify the items of radial menu - */ - items?: Item[]; - - /** Specifies the radius of radial menu - */ - radius?: number; - - /** To show the Radial while clicking given target element. - */ - targetElementId?: string; - - /** To set radial render position. - */ - position?: any; - - /** Event triggers when we click an item. */ - click?(e: ClickEventArgs): void; - - /** Event triggers when the menu is opened. */ - open?(e: OpenEventArgs): void; - - /** Event triggers when the menu is closed. */ - close?(e: CloseEventArgs): void; - } - - export interface ClickEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Radialmenu model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - - /** returns the item of element - */ - item?: any; - - /** returns the name of item - */ - itemName?: string; - } - - export interface OpenEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Radialmenu model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface CloseEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Radialmenu model - */ - model?: any; - /** returns the name of the event - */ - type?: string; - } + enum scrollMode { - export interface ItemsBadge { + ///To enable Infinite scroll mode for Spreadsheet. + Infinite, - /** Specifies whether to enable radialmenu item badge or not. - */ - enabled?: boolean; - - /** Specifies the value of radial menu item badge. - */ - value?: number; - } - - export interface ItemsSliderSettings { + ///To enable Normal scroll mode for Spreadsheet. + Normal + } - /** Specifies the sliderSettings ticks values of nested radial menu items. - */ - ticks?: any[]; - /** Specifies the sliderSettings stroke Width value. - */ - strokeWidth?: number; - - /** Specifies the value of sliderSettings labelSpace . - */ - labelSpace?: number; - } - - export interface Item { - - /** Specify the URL of the frame background image for radial menu item. - */ - imageUrl?: string; - - /** Specifies the text of RadialMenu item. - */ - text?: string; - - /** Specifies the enable state of RadialMenu item. - */ - enabled?: boolean; - - /** specify the click event to corresponding image/text for performing some specific action. - */ - click?: string; - - /** Specifies radialmenu item badges. - */ - badge?: ItemsBadge; - - /** Specifies the type of nested radial menu item. - */ - type?: string; - - /** Specifies the sliderSettings ticks for nested radial menu items. - */ - sliderSettings?: ItemsSliderSettings; - - /** Specifies to add sub level items . - */ - items?: any[]; - } - } - - class Tile extends ej.Widget { - static fn: Tile; - constructor(element: JQuery | Element, options?: Tile.Model); - static Locale: any; - model: Tile.Model; - defaults: Tile.Model; - - /** Update the image template of tile item to another one. - * @param {string} UpdateTemplate by using id - * @param {number} index of the tile - * @returns {void} - */ - updateTemplate(id: string, index: number): void; - } - export namespace Tile { - - export interface Model { - - /** Section for badge specific functionalities and it represents the notification for tile items. - */ - badge?: Badge; - - /** Section for caption specific functionalities and it represents the notification for tile items. - */ - caption?: Caption; - - /** Sets the root class for Tile theme. This cssClass API helps to use custom skinning option for Tile control. By defining the root class using this API, we need to include this root class in CSS. - */ - cssClass?: string; - - /** Saves current model value to browser cookies for state maintains. While refreshing the page retains the model value applies from browser cookies. - * @Default {false} - */ - enablePersistence?: boolean; - - /** Customize the tile size height. - * @Default {null} - */ - height?: number; - - /** Specifies Tile imageClass, using this property we can give images for each tile through CSS classes. - * @Default {null} - */ - imageClass?: string; - - /** Specifies the position of tile image. - * @Default {center} - */ - imagePosition?: ej.Tile.ImagePosition | string; - - /** Specifies the tile image in outside of template content. - * @Default {null} - */ - imageTemplateId?: string; - - /** Specifies the URL of tile image. - * @Default {null} - */ - imageUrl?: string; - - /** Set the localization culture for Tile Widget. - */ - locale?: string; - - /** Section for liveTile specific functionalities. - */ - liveTile?: LiveTile; - - /** Specifies the size of a tile. See tileSize - * @Default {small} - */ - tileSize?: ej.Tile.TileSize | string; - - /** Customize the tile size width. - * @Default {null} - */ - width?: number; - - /** Sets the rounded corner to tile. - * @Default {false} - */ - showRoundedCorner?: boolean; - - /** Sets allowSelection to tile. - * @Default {false} - */ - allowSelection?: boolean; - - /** Sets the background color to tile. - * @Default {null} - */ - backgroundColor?: string; - - /** Event triggers when the mouseDown happens in the tile */ - mouseDown?(e: MouseDownEventArgs): void; - - /** Event triggers when the mouseUp happens in the tile */ - mouseUp?(e: MouseUpEventArgs): void; - } - - export interface MouseDownEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the tile model - */ - model?: boolean; - - /** returns the name of the event - */ - type?: boolean; - - /** returns the current tile text - */ - text?: string; - - /** returns the index of current tile item - */ - index?: number; - } - - export interface MouseUpEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the tile model - */ - model?: boolean; - - /** returns the name of the event - */ - type?: boolean; - - /** returns the current tile text - */ - text?: boolean; - - /** returns the index of current tile item - */ - index?: number; - } - - export interface Badge { - - /** Specifies whether to enable badge or not. - * @Default {false} - */ - enabled?: boolean; - - /** Specifies maximum value for tile badge. - * @Default {100} - */ - maxValue?: number; - - /** Specifies minimum value for tile badge. - * @Default {1} - */ - minValue?: number; - - /** Specifies text instead of number for tile badge. - * @Default {null} - */ - text?: string; - - /** Sets value for tile badge. - * @Default {1} - */ - value?: number; + enum SelectionType { - /** Sets position for tile badge. - * @Default {“bottomright”} - */ - position?: ej.Tile.BadgePosition | string; - } + ///To select only Column in Spreadsheet. + Column, - export interface Caption { + ///To select only Row in Spreadsheet. + Row, - /** Specifies whether the tile text to be shown or hidden. - * @Default {true} - */ - enabled?: boolean; + ///To select both Column/Row in Spreadsheet. + Default + } - /** Changes the text of a tile. - * @Default {Text} - */ - text?: string; - /** It is used to align the text of a tile. - * @Default {normal} - */ - alignment?: ej.Tile.CaptionAlignment | string; + enum SelectionUnit { - /** It is used to specify the caption position like Inner top, inner bottom and outer. - * @Default {Innerbottom} - */ - position?: ej.Tile.CaptionPosition | string; + ///To enable Single selection in Spreadsheet + Single, - /** sets the icon instead of text. - * @Default {null} - */ - icon?: string; - } + ///To enable Range selection in Spreadsheet + Range, - export interface LiveTile { + ///To enable MultiRange selection in Spreadsheet + MultiRange + } - /** Specifies whether to enable liveTile or not. - * @Default {false} - */ - enabled?: boolean; - /** Specifies liveTile images in CSS classes. - * @Default {null} - */ - imageClass?: any[]; + enum BorderType { - /** Specifies liveTile images in templates. - * @Default {null} - */ - imageTemplateId?: any[]; + ///To apply top border for the given range of cell. + Top, - /** Specifies liveTile images in CSS classes. - * @Default {null} - */ - imageUrl?: any[]; + ///To apply left border for the given range of cell. + Left, - /** Specifies liveTile type for Tile. See orientation - * @Default {flip} - */ - type?: ej.Tile.liveTileType | string; + ///To apply right border for the given range of cell. + Right, - /** Specifies time interval between two successive liveTile animation - * @Default {2000} - */ - updateInterval?: number; + ///To apply bottom border for the given range of cell. + Bottom, - /** Sets the text to each living tile - * @Default {Null} - */ - text?: any[]; - } + ///To apply outside border for the given range of cell. + OutSide, - enum BadgePosition { + ///To apply all border for the given range of cell. + AllBorder, - ///To set the topright position of tile badge - Topright, + ///To apply thick box border for the given range of cell. + ThickBox, - ///To set the bottomright of tile badge - Bottomright - } + ///To apply thick bottom border for the given range of cell. + ThickBottom, + ///To apply top and bottom border for the given range of cell. + TopandBottom, - enum CaptionAlignment { + ///To apply top and thick bottom border for the given range of cell. + TopandThickBottom + } - ///To set the normal alignment of text in tile control - Normal, - ///To set the left alignment of text in tile control - Left, + enum CFormatRule { - ///To set the right alignment of text in tile control - Right, + ///To identify greater than values in the given range of cells. + GreaterThan, - ///To set the center alignment of text in tile control - Center - } + ///To identify less than values in the given range of cells. + LessThan, + ///To identify in between values in the given range of cells. + Between, - enum CaptionPosition { + ///To identify the equal values in the given range of cells. + EqualTo, - ///To set the inner top position of the tile text - Innertop, + ///To identify the specified text in the range of cells. + TextContains, - ///To set the inner bottom position of the tile text - Innerbottom, + ///To identify the specified date in the range of cells. + DateOccurs + } - ///To set the outer position of the tile text - Outer - } + enum CFormatHighlightColor { - enum ImagePosition { + ///Highlights red with dark red text color. + RedFillwithDarkRedText, - ///To set the center position of tile image - Center, + ///Highlights yellow with dark yellow text color. + YellowFillwithDarkYellowText, - ///To set the top center position of tile image - TopCenter, + ///Highlights green with dark green text color. + GreenFillwithDarkGreenText, - ///To set the bottom center position of tile image - BottomCenter, + ///Highlights with red fill. + RedFill, - ///To set the right center position of tile image - RightCenter, + ///Highlights with red text. + RedText + } - ///To set the left center position of tile image - LeftCenter, - ///To set the topleft position of tile image - TopLeft, + enum ChartProperties { - ///To set the topright position of tile image - TopRight, + ///Specifies to make the data label center of the chart. + DataLabelCenter, - ///To set the bottomright position of tile image - BottomRight, + ///Specifies to make the data label inside base of the chart. + DataLabelInsideBase, - ///To set the bottomleft position of tile image - BottomLeft, + ///Specifies to make the data label inside end of the chart. + DataLabelInsideEnd, - ///To set the fill position of tile image - Fill - } + ///Specifies to make the data label none of the chart. + DataLabelNone, + ///Specifies to make the data label outside end of the chart. + DataLabelOutsideEnd, - enum liveTileType { + ///Specifies to make the legends to bottom of the chart. + LegendsBottom, - ///To set flip type of liveTile for tile control - Flip, + ///Specifies to make the legends to left of the chart. + LegendsLeft, - ///To set slide type of liveTile for tile control - Slide, + ///Specifies to make the legends to none of the chart. + LegendsNone, - ///To set carousel type of liveTile for tile control - Carousel - } + ///Specifies to make the legends to right of the chart. + LegendsRight, + ///Specifies to make the legends to top of the chart. + LegendsTop, - enum TileSize { + ///To set the primary horizontal of the chart. + PrimaryHorizontal, - ///To set the medium size for tile control - Medium, + ///To set the primary horizontal axis title of the chart. + PrimaryHorizontalAxisTitle, - ///To set the small size for tile control - Small, + ///To set the primary major horizontal of the chart. + PrimaryMajorHorizontal, - ///To set the large size for tile control - Large, + ///To set the primary major vertical of the chart. + PrimaryMajorVertical, - ///To set the wide size for tile control - Wide - } + ///To set the primary minor horizontal of the chart. + PrimaryMinorHorizontal, - } + ///To set the primary minor vertical of the chart. + PrimaryMinorVertical, - class Signature extends ej.Widget { - static fn: Signature; - constructor(element: JQuery | Element, options?: Signature.Model); - static Locale: any; - model: Signature.Model; - defaults: Signature.Model; + ///To set the primary vertical of the chart. + PrimaryVertical, - /** Clears the strokes in the signature. - * @returns {void} - */ - clear(): void; + ///To set the primary vertical axis title of the chart. + PrimaryVerticalAxisTitle, - /** Destroys the signature widget. - * @returns {void} - */ - destroy(): void; + ///Specifies to make the title to center of the chart. + TitleCenter, - /** Disables the signature widget. - * @returns {void} - */ - disable(): void; + ///Specifies to make the title to far of the chart. + TitleFar, - /** Enables the signature widget. - * @returns {void} - */ - enable(): void; + ///Specifies to make the title to near of the chart. + TitleNear, - /** Hides the signature widget. - * @returns {void} - */ - hide(): void; + ///Specifies to make the title to none of the chart. + TitleNone + } - /** redo the last drawn stroke of the signature - * @returns {void} - */ - redo(): void; + } - /** used to save the drawn image. - * @returns {void} - */ - save(): void; + class PdfViewer extends ej.Widget { + static fn: PdfViewer; + constructor(element: JQuery | Element, options?: PdfViewer.Model); + static Locale: any; + model: PdfViewer.Model; + defaults: PdfViewer.Model; - /** Used to Show the signature widget, if it is already hided. - * @returns {void} - */ - show(): void; + /** Loads the document with the filename and displays it in PDF viewer. + * @param {string} File name to be loaded + * @returns {void} + */ + load(fileName: string): void; - /** undo the last drawn stroke of the signature. - * @returns {void} - */ - undo(): void; - } - export namespace Signature { + /** Shows/hides the toolbar in the PDF viewer. + * @param {boolean} shows/hides the toolbar + * @returns {void} + */ + showToolbar(show: boolean): void; + + /** Prints the PDF document. + * @returns {void} + */ + print(): void; + + /** Abort the printing function and restores the PDF viewer. + * @returns {void} + */ + abortPrint(): void; + + /** Shows/hides the print icon in the toolbar. + * @param {boolean} shows/hides print button in the toolbar + * @returns {void} + */ + showPrintTools(show: boolean): void; + + /** Downloads the PDF document being loaded in the ejPdfViewer control. + * @returns {void} + */ + download(): void; + + /** Shows/hides the download tool in the toolbar. + * @param {boolean} shows/hides download button in the toolbar + * @returns {void} + */ + showDownloadTool(show: boolean): void; + + /** Shows/hides the page navigation tools in the toolbar + * @param {boolean} shows/hides navigation tools in the toolbar + * @returns {void} + */ + showPageNavigationTools(show: boolean): void; + + /** Shows/hides the text markup annotation tools in the toolbar. + * @param {boolean} shows/hides text markup annotation tools in the toolbar + * @returns {void} + */ + showTextMarkupAnnotationTools(show: boolean): void; + + /** Navigates to the specific page in the PDF document. If the page is not available for the given pageNumber, PDF viewer retains the existing page in view. + * @param {number} navigates to the page number in the PDF document + * @returns {void} + */ + goToPage(pageNumber: number): void; + + /** Navigates to the last page of the PDF document. + * @returns {void} + */ + goToLastPage(): void; + + /** Navigates to the first page of PDF document. + * @returns {void} + */ + goToFirstPage(): void; + + /** Navigates to the next page of the PDF document. + * @returns {void} + */ + goToNextPage(): void; + + /** Navigates to the previous page of the PDF document. + * @returns {void} + */ + goToPreviousPage(): void; + + /** Shows/hides the zoom tools in the toolbar. + * @param {boolean} shows/hides zoom tools in the toolbar + * @returns {void} + */ + showMagnificationTools(show: boolean): void; + + /** Scales the page to fit the page in the container in the control. + * @returns {void} + */ + fitToPage(): void; + + /** Scales the page to fit the page width to the width of the container in the control. + * @returns {void} + */ + fitToWidth(): void; + + /** Magnifies the page to the next value in the zoom drop down list. + * @returns {void} + */ + zoomIn(): void; + + /** Shrinks the page to the previous value in the magnification in the drop down list. + * @returns {void} + */ + zoomOut(): void; + + /** Scales the page to the specified percentage ranging from 50 to 400. If the given zoomValue is less than 50 or greater than 400; the PDF viewer scales the page to 50 and 400 + * respectively. + * @param {number} zoom value for scaling the pages in the PDF Viewer + * @returns {void} + */ + zoomTo(zoomValue: number): void; + + /** Adds annotations to the PDF document. + * @param {ej.PdfViewer.AnnotationType} type of the annotation to be added in the PDF document. + * @returns {void} + */ + addAnnotation(annotationType: ej.PdfViewer.AnnotationType): void; + + /** Performs undo function for the included annotations in the PDF document. + * @returns {void} + */ + undo(): void; + + /** Performs redo function for the included annotations in the PDF document. + * @returns {void} + */ + redo(): void; + + /** Unloads the PDF document being displayed in the PDF viewer. + * @returns {void} + */ + unload(): void; + } + export namespace PdfViewer { + + export interface Model { + + /** Specifies the locale information of the PDF viewer. + */ + locale?: string; + + /** Specifies the toolbar settings. + */ + toolbarSettings?: ToolbarSettings; + + /** Specifies the name of the action method in the server. + */ + serverActionSettings?: ServerActionSettings; + + /** Sets the PDF Web API service URL + */ + serviceUrl?: string; + + /** Sets the PDF document path for initial loading. + */ + documentPath?: string; + + /** Enables or disables the text markup annotations. + */ + enableTextMarkupAnnotations?: boolean; + + /** Enables or disables the highlight annotation. + */ + enableHighlightAnnotation?: boolean; + + /** Enables or disables the underline annotation. + */ + enableUnderlineAnnotation?: boolean; + + /** Enables or disables the strikethrough annotation. + */ + enableStrikethroughAnnotation?: boolean; + + /** Gets/sets the settings of the strikethrough annotation. + */ + strikethroughSettings?: StrikethroughSettings; + + /** Gets/sets the settings of the underline annotation. + */ + underlineSettings?: UnderlineSettings; + + /** Gets/sets the settings of the highlight annotation. + */ + highlightSettings?: HighlightSettings; + + /** Specifies the type of the annotations. + */ + annotationType?: ej.PdfViewer.AnnotationType|string; + + /** Gets the total number of pages in PDF document. + */ + pageCount?: number; + + /** Gets the number of the page being displayed in the PDF viewer. + */ + currentPageNumber?: number; + + /** Gets the current zoom percentage of the PDF document in viewer. + */ + zoomPercentage?: number; + + /** Specifies the location of the supporting PDF service + */ + pdfService?: ej.PdfViewer.PdfService|string; + + /** Specifies the open state of the hyperlink in the PDF document. + */ + hyperlinkOpenState?: ej.PdfViewer.LinkTarget|string; + + /** Enables or disables the hyperlinks in PDF document. + */ + enableHyperlink?: boolean; + + /** Enables or disables the text selection in PDF document. + */ + enableTextSelection?: boolean; - export interface Model { + /** Enables or disables the responsiveness of the PDF viewer control during the window resize. + */ + isResponsive?: boolean; - /** This property is used to set the background color for the signature. - * @Default {#ffffff} - */ - backgroundColor?: string; + /** Checks whether the PDF document is edited. + */ + isDocumentEdited?: boolean; - /** This property is used to set the background image for the signature. - */ - backgroundImage?: string; + /** Enables or disables the buffering of the PDF pages in the client side. + */ + allowClientBuffering?: boolean; - /** Enables or disables the Signature textbox widget. - * @Default {true} - */ - enabled?: boolean; + /** Gets the name of the PDF document which loaded in the ejPdfViewer control for downloading. + */ + fileName?: string; - /** Sets the height of the Signature control. - * @Default {100%} - */ - height?: string; + /** Triggers when the PDF document gets loaded and is ready to view in the Control. + */ + documentLoad?(e: DocumentLoadEventArgs): void; - /** Enables/disables responsive support for the signature control (i.e) maintain the signature drawing during the window resizing time. - * @Default {false} - */ - isResponsive?: boolean; - - /** Allows the type of the image format to be saved when the signature image is saved. - */ - saveImageFormat?: ej.Signature.SaveImageFormat | string; - - /** Allows the signature image to be saved along with its background. - * @Default {false} - */ - saveWithBackground?: boolean; - - /** Enables or disables rounded corner. - * @Default {true} - */ - showRoundedCorner?: boolean; - - /** Sets the stroke color for the stroke of the signature. - * @Default {#000000} - */ - strokeColor?: string; - - /** Sets the stroke width for the stroke of the signature. - * @Default {2} - */ - strokeWidth?: number; - - /** Sets the width of the Signature control. - * @Default {100%} - */ - width?: string; - - /** Triggers when the stroke is changed. */ - change?(e: ChangeEventArgs): void; - - /** Triggered when the pointer is clicked or touched in the signature canvas. */ - mouseDown?(e: MouseDownEventArgs): void; + /** Triggers when the PDF document gets unloaded from the PDF viewer. + */ + documentUnload?(e: DocumentUnloadEventArgs): void; - /** Triggered when the pointer is moved in the signature canvas. */ - mouseMove?(e: MouseMoveEventArgs): void; - - /** Triggered when the pointer is released after click or touch in the signature canvas. */ - mouseUp?(e: MouseUpEventArgs): void; - } + /** Triggers when there is change in current page number. + */ + pageChange?(e: PageChangeEventArgs): void; - export interface ChangeEventArgs { - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - - /** Instance of the signature model object. - */ - model?: ej.Signature.Model; - - /** Name of the event. - */ - type?: string; + /** Triggers when the ajax request is failed. + */ + ajaxRequestFailure?(e: AjaxRequestFailureEventArgs): void; - /** Gives the last stored image - */ - lastImage?: string; - } + /** Triggers when there is change in the magnification value. + */ + zoomChange?(e: ZoomChangeEventArgs): void; - export interface MouseDownEventArgs { - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Triggers when hyperlink in the PDF Document is clicked + */ + hyperlinkClick?(e: HyperlinkClickEventArgs): void; - /** Instance of the signature model object. - */ - model?: ej.Signature.Model; + /** Triggers before the printing starts. + */ + beforePrint?(e: BeforePrintEventArgs): void; - /** Name of the event. - */ - type?: string; - - /** returns all the event values - */ - value?: any; - } - - export interface MouseMoveEventArgs { - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - - /** Instance of the signature model object. - */ - model?: ej.Signature.Model; - - /** Name of the event. - */ - type?: string; - - /** returns all the event values - */ - value?: any; - } - - export interface MouseUpEventArgs { - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - - /** Instance of the signature model object. - */ - model?: ej.Signature.Model; - - /** Name of the event. - */ - type?: string; - - /** returns all the event values - */ - value?: any; - } - - enum SaveImageFormat { - - ///To save the signature image with PNG format only. - PNG, - - ///To save the signature image with JPG format only. - JPG, - - ///To save the signature image with BMP format only. - BMP, - - ///To save the signature image with TIFF format only. - TIFF - } - - } - - class RadialSlider extends ej.Widget { - static fn: RadialSlider; - constructor(element: JQuery | Element, options?: RadialSlider.Model); - static Locale: any; - model: RadialSlider.Model; - defaults: RadialSlider.Model; + /** Triggers after the printing is completed. + */ + afterPrint?(e: AfterPrintEventArgs): void; - /** To show the radialslider - * @returns {void} - */ - show(): void; - - /** To hide the radialslider - * @returns {void} - */ - hide(): void; - } - export namespace RadialSlider { - - export interface Model { + /** Triggers when the mouse click is performed over the page of the PDF document. + */ + pageClick?(e: PageClickEventArgs): void; - /** To show the RadialSlider in initial render. - * @Default {false} - */ - autoOpen?: boolean; + /** Triggers when an annotation is added over the page of the PDF document. + */ + annotationAdd?(e: AnnotationAddEventArgs): void; - /** Sets the root class for RadialSlider theme. This cssClass API helps to use custom skinning option for RadialSlider control. - * By defining the root class using this API, we need to include this root class in CSS. - */ - cssClass?: string; - - /** To enable Animation for Radial Slider. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Enable/Disable the Roundoff property of RadialSlider - * @Default {true} - */ - enableRoundOff?: boolean; - - /** Specifies the endAngle value for radial slider circle. - * @Default {360} - */ - endAngle?: number; - - /** Specifies the inline for label show or not on given radius. - * @Default {false} - */ - inline?: boolean; - - /** Specifies innerCircleImageClass, using this property we can give images for center radial circle through CSS classes. - * @Default {null} - */ - innerCircleImageClass?: string; - - /** Specifies the file name of center circle icon - * @Default {null} - */ - innerCircleImageUrl?: string; - - /** Specifies the Space between the radial slider element and the label. - * @Default {30} - */ - labelSpace?: number; + /** Triggers when an annotation is removed from the page of the PDF document. + */ + annotationRemove?(e: AnnotationRemoveEventArgs): void; - /** Specifies the radius of radial slider - * @Default {200} - */ - radius?: number; - - /** To show the RadialSlider inner circle. - * @Default {true} - */ - showInnerCircle?: boolean; - - /** Specifies the endAngle value for radial slider circle. - * @Default {0} - */ - startAngle?: number; + /** Triggers when the property of the annotation is changed in the page of the PDF document. + */ + annotationPropertiesChange?(e: AnnotationPropertiesChangeEventArgs): void; - /** Specifies the strokeWidth for customize the needle, outer circle and inner circle. - * @Default {2} - */ - strokeWidth?: number; - - /** Specifies the ticks value of radial slider - */ - ticks?: any[]; - - /** Specifies the value of radial slider - * @Default {10} - */ - value?: number; - - /** Event triggers when the change occurs. */ - change?(e: ChangeEventArgs): void; - - /** Event triggers when the radial slider is created. */ - create?(e: CreateEventArgs): void; - - /** Event triggers when the mouse pointer is dragged over the radial slider. */ - mouseover?(e: MouseoverEventArgs): void; - - /** Event triggers when the Radial slider slides. */ - slide?(e: SlideEventArgs): void; - - /** Event triggers when the radial slider starts. */ - start?(e: StartEventArgs): void; - - /** Event triggers when the radial slider stops. */ - stop?(e: StopEventArgs): void; - } - - export interface ChangeEventArgs { - - /** returns the Radialslider model - */ - model?: any; + /** Triggers when the client buffering process starts. + */ + bufferStart?(e: BufferStartEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Triggers when the client buffering process ends. + */ + bufferEnd?(e: BufferEndEventArgs): void; - /** returns the initial value of Radial slider - */ - oldValue?: number; + /** Triggers when PDF viewer control is destroyed successfully. + */ + destroy?(e: DestroyEventArgs): void; + } - /** returns the name of the event - */ - type?: string; + export interface DocumentLoadEventArgs { - /** returns the current value of the Radial slider - */ - value?: number; - } + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface CreateEventArgs { + /** Returns the PDF viewer model + */ + model?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Radialslider model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface MouseoverEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Radialslider model - */ - model?: any; - - /** returns the value selected - */ - selectedValue?: number; - - /** returns the name of the event - */ - type?: string; - - /** returns the current value selected in Radial slider - */ - value?: number; - } - - export interface SlideEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Radialslider model - */ - model?: any; - - /** returns the value selected in Radial slider - */ - selectedValue?: number; - - /** returns the name of the event - */ - type?: string; - - /** returns the currently selected value - */ - value?: number; - } - - export interface StartEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Radialslider model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - - /** returns the current value selected in Radial slider - */ - value?: number; - } - - export interface StopEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the Radialslider model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - - /** returns the current value selected in Radial slider - */ - value?: number; - } - } - - class Spreadsheet extends ej.Widget { - static fn: Spreadsheet; - constructor(element: JQuery | Element, options?: Spreadsheet.Model); - static Locale: any; - model: Spreadsheet.Model; - defaults: Spreadsheet.Model; - - /** This method is used to add custom formulas in Spreadsheet. - * @param {string} Pass the name of the formula. - * @param {string} Pass the name of the function. - * @returns {void} - */ - addCustomFormula(formulaName: string, functionName: string): void; - - /** This method is used to add a new sheet in the last position of the sheet container. - * @returns {void} - */ - addNewSheet(): void; - - /** It is used to clear all the data and format in the specified range of cells in Spreadsheet. - * @param {string|Array} Optional. If range is specified, then it will clear all content in the specified range else it will use the current selected range. - * @returns {void} - */ - clearAll(range?: string | any[]): void; - - /** This property is used to clear all the formats applied in the specified range in Spreadsheet. - * @param {string|Array} Optional. If range is specified, then it will clear all format in the specified range else it will use the current selected range. - * @returns {void} - */ - clearAllFormat(range?: string | any[]): void; - - /** Used to clear the applied border in the specified range in Spreadsheet. - * @param {string|Array} Optional. If range is specified, then it will clear border in the specified range else it will use the current selected range. - * @returns {void} - */ - clearBorder(range?: string | any[]): void; - - /** This property is used to clear the contents in the specified range in Spreadsheet. - * @param {string|Array} Optional. If the range is specified, then it will clear the content in the specified range else it will use the current selected range. - * @returns {void} - */ - clearContents(range?: string | any[]): void; - - /** This method is used to remove only the data in the range denoted by the specified range name. - * @param {string} Pass the defined rangeSettings property name. - * @returns {void} - */ - clearRange(rangeName: string): void; - - /** It is used to remove data in the specified range of cells based on the defined property. - * @param {Array|string} Optional. If range is specified, it will clear data for the specified range else it will use the current selected range. - * @param {string} Optional. If property is specified, it will remove the specified property in the range else it will remove default properties - * @param {any} Optional. - * @param {boolean} Optional. pass {{'`true`' | markdownify}}, if you want to skip the hidden rows - * @param {any} Optional. Pass the status to perform undo and redo operation. - * @param {any} Optional. It specifies whether to skip element processing or not. - * @returns {void} - */ - clearRangeData(range?: any[] | string, property?: string, cells?: any, skipHiddenRow?: boolean, status?: any, skipCell?: any): void; - - /** This method is used to clear undo and redo collections in the Spreadsheet. - * @returns {void} - */ - clearUndoRedo(): void; - - /** This method is used to copy or move the sheets in Spreadsheet. - * @param {number} Pass the sheet index that you want to copy or move. - * @param {number} Pass the position index where you want to copy or move. - * @param {boolean} Pass {{'`true`' | markdownify}},If you want to copy sheet or else it will move sheet. - * @returns {void} - */ - copySheet(fromIdx: number, toIdx: number, isCopySheet: boolean): void; - - /** This method is used to delete the entire column which is selected. - * @param {number} Pass the start column index. - * @param {number} Pass the end column index. - * @returns {void} - */ - deleteEntireColumn(startCol: number, endCol: number): void; - - /** This method is used to delete the entire row which is selected. - * @param {number} Pass the start row index. - * @param {number} Pass the end row index. - * @returns {void} - */ - deleteEntireRow(startRow: number, endRow: number): void; - - /** This method is used to delete a particular sheet in the Spreadsheet. - * @param {number} Pass the sheet index to perform delete action. - * @returns {void} - */ - deleteSheet(idx: number): void; - - /** This method is used to delete the selected cells and shift the remaining cells to left. - * @param {any} Row index and column index of the starting cell. - * @param {any} Row index and column index of the ending cell. - * @returns {void} - */ - deleteShiftLeft(startCell: any, endCell: any): void; - - /** This method is used to delete the selected cells and shift the remaining cells up. - * @param {any} Row index and column index of the start cell. - * @param {any} Row index and column index of the end cell. - * @returns {void} - */ - deleteShiftUp(startCell: any, endCell: any): void; - - /** This method is used to edit data in the specified range of cells based on its corresponding rangeSettings. - * @param {string} Pass the defined rangeSettings property name. - * @param {Function} Pass the function that you want to perform range edit. - * @returns {void} - */ - editRange(rangeName: string, fn: any): void; - - /** This method is used to get the activation panel in the Spreadsheet. - * @returns {HTMLElement} - */ - getActivationPanel(): HTMLElement; - - /** This method is used to get the active cell object in Spreadsheet. It will returns object which contains rowIndex and colIndex of the active cell. - * @param {number} Optional. If sheetIdx is specified, it will return the active cell object in specified sheet index else it will use the current sheet index - * @returns {any} - */ - getActiveCell(sheetIdx?: number): any; - - /** This method is used to get the active cell element based on the given sheet index in the Spreadsheet. - * @param {number} Optional. If sheetIndex is specified, it will return the active cell element in specified sheet index else it will use the current active sheet index. - * @returns {HTMLElement} - */ - getActiveCellElem(sheetIdx?: number): HTMLElement; - - /** This method is used to get the current active sheet index in Spreadsheet. - * @returns {number} - */ - getActiveSheetIndex(): number; - - /** This method is used to get the auto fill element in Spreadsheet. - * @returns {HTMLElement} - */ - getAutoFillElem(): HTMLElement; - - /** This method is used to get the cell element based on specified row and column index in the Spreadsheet. - * @param {number} Pass the row index. - * @param {number} Pass the column index. - * @param {number} Optional. Pass the sheet index that you want to get cell. - * @returns {HTMLElement} - */ - getCell(rowIdx: number, colIdx: number, sheetIdx?: number): HTMLElement; - - /** This method is used to get the data settings in the Spreadsheet. - * @param {number} Pass the sheet index. - * @returns {number} - */ - getDataSettings(sheetIdx: number): number; - - /** This method is used to get the frozen columns index in the Spreadsheet. - * @param {number} Pass the sheet index. - * @returns {number} - */ - getFrozenColumns(sheetIdx: number): number; - - /** This method is used to get the frozen row index in Spreadsheet. - * @param {number} Pass the sheet index. - * @returns {number} - */ - getFrozenRows(sheetIdx: number): number; - - /** This method is used to get the hyperlink data as object from the specified cell in Spreadsheet. - * @param {HTMLElement} Pass the DOM element to get hyperlink - * @returns {any} - */ - getHyperlink(cell: HTMLElement): any; - - /** This method is used to get all cell elements in the specified range. - * @param {string} Pass the range that you want to get the cells. - * @param {number} Pass the index of the sheet. - * @param {boolean} Optional. Pass {{'`true`' | markdownify}}, if you want to skip the hidden rows. - * @returns {HTMLElement} - */ - getRange(range: string, sheetIdx: number, skipHiddenRow?: boolean): HTMLElement; - - /** This method is used to get the data in specified range in Spreadsheet. - * @param {any} Optional. Pass the range, property, sheetIdx, valueOnly in options. - * @returns {Array} - */ - getRangeData(options?: any): any[]; - - /** This method is used to get the range indices array based on the specified alpha range in Spreadsheet. - * @param {string} Pass the alpha range that you want to get range indices. - * @returns {Array} - */ - getRangeIndices(range: string): any[]; - - /** This method is used to get the sheet details based on the given sheet index in Spreadsheet. - * @param {number} Pass the sheet index to get the sheet object. - * @returns {any} - */ - getSheet(sheetIdx: number): any; - - /** This method is used to get the sheet content div element of Spreadsheet. - * @param {number} Pass the sheet index to get the sheet content. - * @returns {HTMLElement} - */ - getSheetElement(sheetIdx: number): HTMLElement; - - /** This method is used to get all the sheets in workbook. - * @returns {Array} - */ - getSheets(): any[]; - - /** This method is used to send a paging request to the specified sheet Index in the Spreadsheet. - * @param {number} Pass the sheet index to perform paging at specified sheet index - * @param {boolean} Pass {{'`true`' | markdownify}} to create a new sheet. If the specified sheet index is already exist, it navigate to that sheet else it create a new sheet. - * @returns {void} - */ - gotoPage(sheetIdx: number, newSheet: boolean): void; - - /** This method is used to hide the entire columns from the specified range (startCol, endCol) in Spreadsheet. - * @param {number} Index of the start column. - * @param {number} Optional. Index of the end column. - * @returns {void} - */ - hideColumn(startCol: number, endCol: number): void; - - /** This method is used to hide the formula bar in Spreadsheet. - * @returns {void} - */ - hideFormulaBar(): void; - - /** This method is used to hide the rows, based on the specified row index in Spreadsheet. - * @param {number} Index of the start row. - * @param {number} Optional. Index of the end row. - * @returns {void} - */ - hideRow(startRow: number, endRow: number): void; - - /** This method is used to hide the sheet based on the specified sheetIndex or sheet name in the Spreadsheet. - * @param {string|number} Pass the sheet name or index that you want to hide. - * @returns {void} - */ - hideSheet(sheetIdx: string | number): void; - - /** This method is used to hide the displayed waiting pop-up in Spreadsheet. - * @returns {void} - */ - hideWaitingPopUp(): void; - - /** This method is used to insert a column before the active cell's column in the Spreadsheet. - * @param {number} Pass start column. - * @param {number} Pass end column. - * @returns {void} - */ - insertEntireColumn(startCol: number, endCol: number): void; - - /** This method is used to insert a row before the active cell's row in the Spreadsheet. - * @param {number} Pass start row. - * @param {number} Pass end row. - * @returns {void} - */ - insertEntireRow(startRow: number, endRow: number): void; - - /** This method is used to insert a new sheet to the left of the current active sheet. - * @returns {void} - */ - insertSheet(): void; - - /** This method is used to insert cells in the selected or specified range and shift remaining cells to bottom. - * @param {any} Row index and column index of the start cell. - * @param {any} Row index and column index of the end cell. - * @returns {void} - */ - insertShiftBottom(startCell: any, endCell: any): void; - - /** This method is used to insert cells in the selected or specified range and shift remaining cells to right. - * @param {any} Row index and column index of the start cell. - * @param {any} Row index and column index of the end cell. - * @returns {void} - */ - insertShiftRight(startCell: any, endCell: any): void; - - /** This method is used to import excel file manually by using form data. - * @param {any} Pass the form data object to import files manually. - * @returns {void} - */ - import(importRequest: any): void; - - /** This method is used to load JSON data in Spreadsheet. - * @param {any} Pass the response that you want to load. - * @returns {void} - */ - loadFromJSON(response: any): void; - - /** This method is used to lock/unlock the range of cells in active sheet. Lock cells are activated only after the sheet is protected. Once the sheet is protected it is unable to lock/unlock cells. - * @param {string|Array} Pass the alpha range cells or array range of cells. - * @param {string} Optional. By default is {{'`true`' | markdownify}}. If it is {{'`false`' | markdownify}} locked cells are unlocked. - * @returns {void} - */ - lockCells(range: string | any[], isLocked?: string): void; - - /** This method is used to merge cells by across in the Spreadsheet. - * @param {string} Optional. To pass the cell range or selected cells are process. - * @param {boolean} Optional. If pass {{'`true`' | markdownify}} it does not show alert. - * @returns {void} - */ - mergeAcrossCells(range?: string, alertStatus?: boolean): void; - - /** This method is used to merge the selected cells in the Spreadsheet. - * @param {string|Array} Optional. To pass the cell range or selected cells are process. - * @param {boolean} Optional. If pass {{'`true`' | markdownify}} it does not show alert. - * @returns {void} - */ - mergeCells(range?: string | any[], alertStatus?: boolean): void; - - /** This method is used to select a cell or range in the Spreadsheet. - * @param {any} Pass the start cell to perform selection. - * @param {any} Pass the end cell to perform selection. - * @returns {void} - */ - performSelection(startCell: any, endCell: any): void; - - /** This method is used to protect or unprotect active sheet. - * @param {boolean} Optional. By default is {{'`true`' | markdownify}}. If it is {{'`false`' | markdownify}} active sheet is unprotected. - * @returns {void} - */ - protectSheet(isProtected?: boolean): void; - - /** This method is used to refresh the content in Spreadsheet. - * @param {number} Pass the index of the sheet. - * @returns {void} - */ - refreshContent(sheetIdx: number): void; - - /** This method is used to refresh the Spreadsheet. - * @returns {void} - */ - refreshSpreadsheet(): void; - - /** This method is used to remove custom formulae in Spreadsheet. - * @param {string} Pass the name of the formula. - * @param {string} Pass the name of the function. - * @returns {void} - */ - removeCustomFormula(formulaName: string, functionName: string): void; - - /** This method is used to remove the hyperlink from selected cells of current sheet. - * @param {string} Hyperlink remove from the specified range. - * @param {boolean} Optional. If it is {{'`true`' | markdownify}}, It will clear link only not format. - * @param {boolean} Optional. Pass the status to perform undo and redo operations. - * @param {any} Optional. Pass the cells that you want to remove hyperlink. - * @param {boolean} Optional. Pass {{'`true`' | markdownify}}, if you want to skip the hidden rows. - * @returns {void} - */ - removeHyperlink(range: string, isClearHLink?: boolean, status?: boolean, cells?: any, skipHiddenRow?: boolean): void; - - /** This method is used to remove the range data and its defined rangeSettings property based on the specified range name. - * @param {string} Pass the defined rangeSetting property name. - * @returns {void} - */ - removeRange(rangeName: string): void; - - /** This method is used to remove the readonly option for the specified range. - * @param {string|Array} Pass the range. - * @returns {void} - */ - removeReadOnly(range?: string | any[]): void; - - /** This method is used to save JSON data in Spreadsheet. - * @returns {any} - */ - saveAsJSON(): any; - - /** This method is used to save batch changes in Spreadsheet. - * @param {number} Pass the sheet index for Spreadsheet. - * @returns {void} - */ - saveBatchChanges(sheetIdx: number): void; - - /** This method is used to set the active cell in the Spreadsheet. - * @param {number} Pass the row index. - * @param {number} Pass the column index. - * @param {number} Pass the index of the sheet. - * @returns {void} - */ - setActiveCell(rowIdx: number, colIdx: number, sheetIdx: number): void; - - /** This method is used to set active sheet index for the Spreadsheet. - * @param {number} Pass the active sheet index for Spreadsheet. - * @returns {void} - */ - setActiveSheetIndex(sheetIdx: number): void; - - /** This method is used to set border for the specified range of cells in the Spreadsheet. - * @param {any} Pass the border properties that you want to set. - * @param {string} Optional. If range is specified, it will set border for the specified range else it will use the selected range. - * @returns {void} - */ - setBorder(property: any, range?: string): void; - - /** This method is used to set the height for the rows in the Spreadsheet. - * @param {Array|any} Pass the row index and height of the rows. - * @returns {void} - */ - setHeightToRows(heightColl: any[] | any): void; - - /** This method is used to set the hyperlink in selected cells of the current sheet. - * @param {string|Array} If range is specified, it will set the hyperlink in range of the cells. - * @param {any} Pass cellAddress or webAddress - * @param {number} If we pass cellAddress then which sheet to be navigate in the applied link. - * @returns {void} - */ - setHyperlink(range: string | any[], link: any, sheetIdx: number): void; - - /** This method is used to set the readonly option for the specified range. - * @param {string|Array} Pass the range. - * @returns {void} - */ - setReadOnly(range?: string | any[]): void; - - /** This method is used to set the focus to the Spreadsheet. - * @returns {void} - */ - setSheetFocus(): void; - - /** This method is used to set the width for the columns in the Spreadsheet. - * @param {Array|any} Pass the column index and width of the columns. - * @returns {void} - */ - setWidthToColumns(widthColl: any[] | any): void; - - /** This method is used to rename the active sheet. - * @param {string} Pass the sheet name that you want to change the current active sheet name. - * @returns {void} - */ - sheetRename(sheetName: string): void; - - /** This method is used to display the activationPanel for the specified range name. - * @param {string} Pass the range name that you want to display the activation panel. - * @returns {void} - */ - showActivationPanel(rangeName: string): void; - - /** This method is used to show the hidden columns within the specified range in the Spreadsheet. - * @param {number} Index of the start column. - * @param {number} Optional. Index of the end column. - * @returns {void} - */ - showColumn(startColIdx: number, endColIdx: number): void; - - /** This method is used to show the formula bar in Spreadsheet. - * @returns {void} - */ - showFormulaBar(): void; - - /** This method is used to show/hide gridlines in active sheet in the Spreadsheet. - * @param {boolean} Pass {{'`true`' | markdownify}} to show the gridlines - * @returns {void} - */ - showGridlines(status: boolean): void; - - /** This method is used to show/hide the headers in active sheet in the Spreadsheet. - * @param {boolean} Pass {{'`true`' | markdownify}} to show the sheet headers. - * @returns {void} - */ - showHeadings(startRow: boolean): void; - - /** This method is used to show/hide pager in the Spreadsheet. - * @param {boolean} Pass {{'`true`' | markdownify}} to show pager. - * @returns {void} - */ - showPager(status: boolean): void; - - /** This method is used to show the hidden rows in the specified range in the Spreadsheet. - * @param {number} Index of the start row. - * @param {number} Optional. Index of the end row. - * @returns {void} - */ - showRow(startRow: number, endRow: number): void; - - /** This method is used to show waiting pop-up in Spreadsheet. - * @returns {void} - */ - showWaitingPopUp(): void; - - /** This method is used to unhide the sheet based on specified sheet name or sheet index. - * @param {string|number} Pass the sheet name or index that you want to unhide. - * @returns {void} - */ - unhideSheet(sheetInfo: string | number): void; - - /** This method is used to unmerge the selected range of cells in the Spreadsheet. - * @param {string} Optional. If the range is specified, then it will un merge the specified range else it will use the current selected range. - * @returns {void} - */ - unmergeCells(range?: string): void; - - /** This method is used to unwrap the selected range of cells in the Spreadsheet. - * @param {Array|string} Optional. If the range is specified, then it will update unwrap in the specified range else it will use the current selected range. - * @returns {void} - */ - unWrapText(range?: any[] | string): void; - - /** This method is used to update the data for the specified range of cells in the Spreadsheet. - * @param {any} Pass the cells data that you want to update. - * @param {Array|string} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. - * @returns {void} - */ - updateData(data: any, range?: any[] | string): void; - - /** This method is used to update the formula bar in the Spreadsheet. - * @returns {void} - */ - updateFormulaBar(): void; - - /** This method is used to update the range of cells based on the specified settings which we want to update in the Spreadsheet. - * @param {number} Pass the sheet index that you want to update. - * @param {any} Pass the dataSource, startCell and showHeader values as settings. - * @returns {void} - */ - updateRange(sheetIdx: number, settings: any): void; - - /** This method is used to update the details for custom undo and redo operations. - * @param {any} Pass the details to update undo and redo collection - * @returns {void} - */ - updateUndoRedoCollection(details: any): void; - - /** This method is used to update the unique data for the specified range of cells in Spreadsheet. - * @param {any} Pass the data that you want to update in the particular range - * @param {Array|string} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. - * @param {any} Optional. It specifies whether to skip element processing or not. - * @returns {void} - */ - updateUniqueData(data: any, range?: any[] | string, skipCell?: any): void; - - /** This method is used to wrap the selected range of cells in the Spreadsheet. - * @param {Array|string} Optional. If the range is specified, then it will update wrap in the specified range else it will use the current selected range. - * @returns {void} - */ - wrapText(range?: any[] | string): void; - - XLCellType: Spreadsheet.XLCellType; - - XLCFormat: Spreadsheet.XLCFormat; - - XLChart: Spreadsheet.XLChart; - - XLClipboard: Spreadsheet.XLClipboard; - - XLComment: Spreadsheet.XLComment; - - XLCMenu: Spreadsheet.XLCMenu; - - XLDragDrop: Spreadsheet.XLDragDrop; - - XLDragFill: Spreadsheet.XLDragFill; - - XLEdit: Spreadsheet.XLEdit; - - XLExport: Spreadsheet.XLExport; - - /** This method is used to get the export properties in the Spreadsheet. - * @returns {any} - */ - getExportProps(): any; - - XLFilter: Spreadsheet.XLFilter; - - XLFormat: Spreadsheet.XLFormat; - - XLFreeze: Spreadsheet.XLFreeze; - - /** This method is used to unfreeze the frozen rows and columns in the Spreadsheet. - * @returns {void} - */ - unfreezePanes(): void; - - XLPivot: Spreadsheet.XLPivot; - - XLPrint: Spreadsheet.XLPrint; - - XLResize: Spreadsheet.XLResize; - - XLRibbon: Spreadsheet.XLRibbon; - - XLSearch: Spreadsheet.XLSearch; - - XLSelection: Spreadsheet.XLSelection; - - XLShape: Spreadsheet.XLShape; - - XLSort: Spreadsheet.XLSort; - - XLValidate: Spreadsheet.XLValidate; - } - export namespace Spreadsheet { - - export interface XLCellType { - - /** This method is used to set a cell type from the specified range of cells in the spreadsheet. - * @param {string} Pass the range where you want apply cell type. - * @param {any} Pass type of cell type and its settings. - * @param {number} Optional. Pass sheet index. - * @returns {void} - */ - addCellTypes(range: string, settings: any, sheetIdx: number): void; - - /** This method is used to remove cell type from the specified range of cells in the Spreadsheet. - * @param {string|Array} Pass the range where you want remove cell type. - * @param {number} Optional. Pass sheet index. - * @returns {void} - */ - removeCellTypes(range: string | any[], sheetIdx: number): void; - } - - export interface XLCFormat { - - /** This method is used to clear the applied conditional formatting rules in the Spreadsheet. - * @param {Array|string} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. - * @returns {void} - */ - clearCF(range: any[] | string): void; - - /** This method is used to get the applied conditional formatting rules as array of objects based on the specified row Index and column Index in the Spreadsheet. - * @param {number} Pass the row index. - * @param {number} Pass the column index. - * @returns {Array} - */ - getCFRule(rowIdx: number, colIdx: number): any[]; - - /** This method is used to set the conditional formatting rule in the Spreadsheet. - * @param {any} Pass the rule to set. - * @returns {void} - */ - setCFRule(rule: any): void; - } - - export interface XLChart { - - /** This method is used to change the theme of the chart in the Spreadsheet. - * @param {string} Pass the chart id. - * @param {ej.datavisualization.Chart.Theme} Pass the chart theme which want to update. - * @returns {void} - */ - changeTheme(chartId: string, theme: ej.datavisualization.Chart.Theme): void; - - /** This method is used to change the type of the chart in the Spreadsheet. - * @param {string} Pass the chart id. - * @param {any} Pass the chart type. - * @returns {void} - */ - changeType(chartId: string, option: any): void; - - /** This method is used to change the data range of the chart in the Spreadsheet. - * @param {string} Pass the chart id. - * @param {string} X axis range of chart data. - * @param {string} Y axis range of chart data. - * @param {string} Legend range of chart data. - * @returns {void} - */ - changeDataRange(chartId: string, xRange: string, yRange: string, lRange: string): void; - - /** This method is used to create a chart for specified range in Spreadsheet. - * @param {string|Array} Optional. If range is specified, it will create chart for the specified range else it will use the current selected range. - * @param {any} Optional. To pass the type of chart and chart name. - * @returns {void} - */ - createChart(range: string | any[], options: any): void; - - /** This method is used to refresh the chart in the Spreadsheet. - * @param {string} To pass the chart Id. - * @param {any} To pass the type of chart and chart name. - * @returns {void} - */ - refreshChart(id: string, options: any): void; - - /** This method is used to resize the chart of specified id in the Spreadsheet. - * @param {string} To pass the chart id. - * @param {number} To pass height value. - * @param {number} To pass the width value. - * @returns {void} - */ - resizeChart(id: string, height: number, width: number): void; - - /** This method is used to update the chart element, such as axes, titles, data labels, grid lines and legends in the Spreadsheet. - * @param {string} Pass the chart id. - * @param {ej.Spreadsheet.ChartProperties} Pass chart element value which you want to update. - * @returns {void} - */ - updateChartElement(chartId: string, value: ej.Spreadsheet.ChartProperties): void; - - /** This method is used switch row to columns and vice versa for chart in the Spreadsheet. So that the data is displayed in the chart the way you want. - * @param {string} Pass the chart id. - * @returns {void} - */ - switchRowColumn(chartId: string): void; - } - - export interface XLClipboard { - - /** This method is used to copy the selected cells in the Spreadsheet. - * @returns {void} - */ - copy(): void; - - /** This method is used to cut the selected cells in the Spreadsheet. - * @returns {void} - */ - cut(): void; - - /** This method is used to paste the cut or copied cells data in the Spreadsheet. - * @returns {void} - */ - paste(): void; - } - - export interface XLComment { - - /** This method is used to delete the comment in the specified range in Spreadsheet. - * @param {Array|string} Optional. If range is specified, it will delete comments for the specified range else it will use the current selected range. - * @param {number} Optional. If sheetIdx is specified, it will delete comment in specified sheet else it will use active sheet. - * @param {boolean} Optional. Pass {{'`true`' | markdownify}}, if you want to skip the hidden rows data. - * @returns {void} - */ - deleteComment(range: any[] | string, sheetIdx: number, skipHiddenRow: boolean): void; - - /** This method is used to edit the comment in the target Cell in Spreadsheet. - * @param {any} Optional. Pass the row index and column index of the cell which contains comment. - * @returns {void} - */ - editComment(targetCell: any): void; - - /** This method is used to find the next comment from the active cell in Spreadsheet. - * @returns {boolean} - */ - findNextComment(): boolean; - - /** This method is used to find the previous comment from the active cell in Spreadsheet. - * @returns {boolean} - */ - findPrevComment(): boolean; - - /** This method is used to get comment data for the specified cell. - * @param {HTMLElement} Pass the DOM element to get comment data as object. - * @returns {any} - */ - getComment(cell: HTMLElement): any; - - /** This method is used to set new comment in Spreadsheet. - * @param {string|Array} Optional. If we pass the range comment will set in the range otherwise it will set with selected cells. - * @param {string} Optional. Pass the comment data. - * @param {boolean} Optional. Pass {{'`true`' | markdownify}} to show comment in edit mode - * @param {boolean} Optional. Pass {{'`true`' | markdownify}} to show the user name - * @returns {void} - */ - setComment(range: string | any[], data: string, showEditPanel: boolean, showUserName: boolean): void; - - /** This method is used to show all the comments in the Spreadsheet. - * @returns {void} - */ - showAllComments(): void; - - /** This method is used to show or hide the specific comment in the Spreadsheet. - * @param {HTMLElement} Optional. Pass the cell DOM element to show or hide its comment. If pass empty argument active cell will processed. - * @returns {void} - */ - showHideComment(targetCell: HTMLElement): void; - } - - export interface XLCMenu { - - /** This method is used to dynamically add items in the context menu. - * @param {string} Specifies the context menu type in which the item to be inserted. - * @param {Array} Pass the items to be inserted - * @param {string} Specifies the type of operation to be performed - * @returns {void} - */ - addItem(target: string, itemColl: any[], operation: string): void; - - /** This method is used to change data source in the context menu. - * @param {string} Specifies the context menu type to bind the data source. - * @param {Array} Pass the data source to be binded - * @returns {void} - */ - changeDataSource(target: string, data: any[]): void; - - /** This method is used to disable the items in the context menu. - * @param {string} Specifies the context menu type in which the item to be disabled. - * @param {Array} Specifies the Menu Item id collection to be disabled - * @returns {void} - */ - disableItem(target: string, idxColl: any[]): void; - - /** This method is used to enable the items in the context menu. - * @param {string} Specifies the context menu type in which the item to be enabled. - * @param {Array} Specifies the Menu Item id collection to be enabled - * @returns {void} - */ - enableItem(target: string, idxColl: any[]): void; - - /** This method is used to remove the items in the context menu. - * @param {string} Specifies the context menu type in which the item to be removed. - * @param {Array} Specifies the Menu Item id collection to be removed - * @returns {void} - */ - removeItem(target: string, idxColl: any[]): void; - } - - export interface XLDragDrop { - - /** This method is used to drag and drop the selected range of cells to destination range in the Spreadsheet. - * @param {any|Array} Pass the source range to perform drag and drop. - * @param {any|Array} Pass the destination range to drop the dragged cells. - * @returns {void} - */ - moveRangeTo(sourceRange: any | any[], destinationRange: any | any[]): void; - } - - export interface XLDragFill { - - /** This method is used to perform auto fill in Spreadsheet. - * @param {any} Pass the options to perform auto fill in Spreadsheet. - * @returns {void} - */ - autoFill(options: any): void; - - /** This method is used to hide the auto fill element in the Spreadsheet. - * @returns {void} - */ - hideAutoFillElement(): void; - - /** This method is used to hide the auto fill options in the Spreadsheet. - * @returns {void} - */ - hideAutoFillOptions(): void; - - /** This method is used to set position of the auto fill element in the Spreadsheet. - * @param {boolean} Pass the isDragFill option as {{'`boolean`' | markdownify}} value to show auto fill options in Spreadsheet. - * @returns {void} - */ - positionAutoFillElement(isDragFill: boolean): void; - } - - export interface XLEdit { - - /** This method is used to calculate formulas in the specified sheet. - * @param {number} Optional. If sheet index is specified, then it will calculate formulas in the specified sheet only else it will calculate formulas in all sheets. - * @returns {void} - */ - calcNow(sheetIdx: number): void; - - /** This method is used to edit a particular cell based on the row index and column index in the Spreadsheet. - * @param {number} Pass the row index to edit particular cell. - * @param {number} Pass the column index to edit particular cell. - * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to maintain previous cell value. - * @returns {void} - */ - editCell(rowIdx: number, colIdx: number, oldData: boolean): void; - - /** This method is used to get the property value of particular cell, based on the row and column index in the Spreadsheet. - * @param {number} Pass the row index to get the property value. - * @param {number} Pass the column index to get the property value. - * @param {string} Optional. Pass the property name that you want("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", - * "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", - * "decimalPlaces", "cellType"). - * @param {number} Optional. Pass the index of the sheet. - * @returns {any|string|Array} - */ - getPropertyValue(rowIdx: number, colIdx: number, prop: string, sheetIdx: number): any | string | any[]; - - /** This method is used to get the property value in specified cell in Spreadsheet. - * @param {HTMLElement} Pass the cell element to get property value. - * @param {string} Pass the property name that you want ("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", - * "picture", "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", - * "comment", "formatStr", "decimalPlaces", "cellType"). - * @param {number} Pass the index of sheet. - * @returns {any|string|Array} - */ - getPropertyValueByElem(elem: HTMLElement, property: string, sheetIdx: number): any | string | any[]; - - /** This method is used to save the edited cell value in the Spreadsheet. - * @returns {void} - */ - saveCell(): void; - - /** This method is used to update a particular cell value in the Spreadsheet. - * @param {any} Pass row index and column index of the cell. - * @param {string|number} Pass the cell value. - * @returns {void} - */ - updateCell(cell: any, value: string | number): void; - - /** This method is used to update a particular cell value and its format in the Spreadsheet. - * @param {any} Pass row index and column index of the cell. - * @param {string|number} Pass the cell value. - * @param {string} Pass the class name to update format. - * @param {number} Pass sheet index. - * @returns {void} - */ - updateCellValue(cellIdx: any, val: string | number, formatClass: string, sheetIdx: number): void; - } - - export interface XLExport { - - /** This method is used to save the sheet data as Excel ,CSV or PDF document (.xls, .xlsx .csv, .pdf) in Spreadsheet. - * @param {string} Pass the export type that you want. - * @returns {void} - */ - export(type: string): void; - - /** This method is used to get the export properties in the Spreadsheet. - * @returns {any} - */ - getExportProps(): any; - } - - export interface XLFilter { - - /** This method is used to clear the filter in filtered columns in the Spreadsheet. - * @returns {void} - */ - clearFilter(): void; - - /** This method is used to apply filter for the selected range of cells in the Spreadsheet. - * @param {string|Array} Pass the range of the selected cells. - * @returns {void} - */ - filter(range: string | any[]): void; - - /** This method is used to apply filter for the column by active cell's value in the Spreadsheet. - * @returns {void} - */ - filterByActiveCell(): void; - } - - export interface XLFormat { - - /** This method is used to convert table range to normal range. - * @param {any} Pass the sheet index and table id. - * @returns {void} - */ - convertToRange(options: any): void; - - /** This method is used to create a table for the selected range of cells in the Spreadsheet. - * @param {any} Pass the table object. - * @param {string|Array} Optional. If the range is specified, then it will create table in the specified range else it will use the current selected range. - * @returns {string} - */ - createTable(tableObject: any, range: string | any[]): string; - - /** This method is used to set format style and values in a cell or range of cells. - * @param {any} Pass the formatObject which contains style, type, format, groupSeparator and decimalPlaces. - * @param {string} Pass the range to format cells. - * @returns {void} - */ - format(formatObj: any, range: string): void; - - /** This method is used to remove the style in the specified range. - * @param {Array|string} Pass the cell range . - * @param {any} Optional. Pass the options for which the style gets removed. - * @returns {void} - */ - removeStyle(range: any[] | string, options: any): void; - - /** This method is used to remove table with specified tableId in the Spreadsheet. - * @param {number} Pass the tableId that you want to remove. - * @returns {void} - */ - removeTable(tableId: number): void; - - /** This method is used to update the decimal places for numeric value for the selected range of cells in the Spreadsheet. - * @param {string} Pass the decimal places type in increment/decrement. - * @param {string|Array} Pass the range. - * @returns {void} - */ - updateDecimalPlaces(type: string, range: string | any[]): void; - - /** This method is used to update the format for the selected range of cells in the Spreadsheet. - * @param {any} Pass the format object that you want to update. - * @param {Array} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. - * @returns {void} - */ - updateFormat(formatObj: any, range: any[]): void; - - /** This method is used to update the unique format for selected range of cells in the Spreadsheet. - * @param {string} Pass the unique format class. - * @param {Array} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. - * @returns {void} - */ - updateUniqueFormat(formatClass: string, range: any[]): void; - } - - export interface XLFreeze { - - /** This method is used to freeze columns upto the specified column index in the Spreadsheet. - * @param {number} Index of the column to be freeze. - * @returns {void} - */ - freezeColumns(colIdx: number): void; - - /** This method is used to freeze the first column in the Spreadsheet. - * @returns {void} - */ - freezeLeftColumn(): void; - - /** This method is used to freeze rows and columns before the specified cell in the Spreadsheet. - * @param {number} Index of the row to be freeze. - * @param {number} Index of the column to be freeze. - * @returns {void} - */ - freezePanes(rowIdx: number, colIdx: number): void; - - /** This method is used to freeze rows upto the specified row index in the Spreadsheet. - * @param {number} Index of the row to be freeze. - * @returns {void} - */ - freezeRows(rowIdx: number): void; - - /** This method is used to freeze the top row in the Spreadsheet. - * @returns {void} - */ - freezeTopRow(): void; - - /** This method is used to unfreeze the frozen rows and columns in the Spreadsheet. - * @returns {void} - */ - unfreezePanes(): void; - } - - export interface XLPivot { - - /** This property is used to clear the pivot table list in Spreadsheet. - * @param {string} Pass the name of the pivot table. - * @returns {void} - */ - clearPivotFieldList(pivotName: string): void; - - /** This method is used to create pivot table. - * @param {string} It specifies the range for which the pivot table is created. - * @param {string} It specifies the location in which the pivot table is created. - * @param {string} It specifies the name of the pivot table. - * @param {any} Pass the pivot table settings. - * @param {any} Pass the pivot range, sheet index, address and data source . - * @returns {string} - */ - createPivotTable(range: string, location: string, name: string, settings: any, pvt: any): string; - - /** This method is used to delete the pivot table which is selected. - * @param {string} Pass the name of the pivot table. - * @returns {void} - */ - deletePivotTable(pivotName: string): void; - - /** This method is used to refresh data in pivot table. - * @param {string} Optional. Pass the name of the pivot table. - * @param {number} Optional. Pass the index of the sheet. - * @returns {void} - */ - refreshDataSource(name: string, sheetIdx: number): void; - } - - export interface XLPrint { - - /** This method is used to print the selected contents in the Spreadsheet. - * @returns {void} - */ - printSelection(): void; - - /** This method is used to print the entire contents in the active sheet. - * @returns {void} - */ - printSheet(): void; - } - - export interface XLResize { - - /** This method is used to fit the height of rows in the Spreadsheet. - * @param {Array} Optional. Pass row index collection that you want to fit its height. - * @returns {void} - */ - fitHeight(rowIndexes: any[]): void; - - /** This method is used to fit the width of columns in the Spreadsheet. - * @param {Array} Optional. Pass column index collection that you want to fit its width. - * @returns {void} - */ - fitWidth(colIndexes: any[]): void; - - /** This method is used to get the column width of the specified column index in the Spreadsheet. - * @param {number} Pass the column index. - * @returns {number} - */ - getColWidth(colIdx: number): number; - - /** This method is used to get the row height of the specified row index in the Spreadsheet. - * @param {number} Pass the row index which you want to find its height. - * @returns {number} - */ - getRowHeight(rowIdx: number): number; - - /** This method is used to set the column width of the specified column index in the Spreadsheet. - * @param {number} Pass the column index. - * @param {number} Pass the width value that you want to set. - * @returns {void} - */ - setColWidth(colIdx: number, size: number): void; - - /** This method is used to set the row height of the specified row index in the Spreadsheet. - * @param {number} Pass the row index. - * @param {number} Pass the height value that you want to set. - * @returns {void} - */ - setRowHeight(rowIdx: number, size: number): void; - } - - export interface XLRibbon { - - /** This method is used to add a new item in the backstage. - * @param {any} Specifies the item to be added in the backstage. - * @param {number} pass the index of the item to be added in the backstage. - * @returns {void} - */ - addBackStageItem(pageItem: any, index: number): void; - - /** This method is used to dynamically add the contextual tabs in the ribbon. - * @param {any} Specifies the contextual tab set object. - * @param {number} pass the index of the contextual tab. - * @returns {void} - */ - addContextualTabs(contextualTabSet: any, index: number): void; - - /** This method is used to dynamically add the menu item in the file menu. - * @param {Array} Specifies the item to be added - * @param {number} pass the index of the menu item. - * @returns {void} - */ - addMenuItem(item: any[], index: number): void; - - /** This method is used to add a new name in the Spreadsheet name manager. - * @param {string} Pass the name that you want to define in name manager. - * @param {string} Pass the cell reference. - * @param {string} Optional. Pass comment, if you want. - * @param {number} Optional. Pass the sheet index. - * @returns {void} - */ - addNamedRange(name: string, refersTo: string, comment: string, sheetIdx: number): void; - - /** This method is used to dynamically add the tab in the ribbon. - * @param {Array} Specifies the text to be displayed in the tab. - * @param {number} pass the groups to be displayed in the ribbon tab. - * @param {number} pass the index of the tab. - * @returns {void} - */ - addTab(tabText: any[], ribbonGroups: number, index: number): void; - - /** This method is used to dynamically add the tab group in the ribbon. - * @param {number} Specifies the ribbon tab index. - * @param {any} pass the groups to be displayed in the ribbon tab. - * @param {number} pass the index of the ribbon group. - * @returns {void} - */ - addTabGroup(tabIndex: number, tabGroup: any, groupIndex: number): void; - - /** This method is used to insert the few type (SUM, MAX, MIN, AVG, COUNT) of formulas in the selected range of cells in the Spreadsheet. - * @param {string} To pass the type("SUM","MAX","MIN","AVG","COUNT"). - * @param {string|Array} If range is specified, it will apply auto sum for the specified range else it will use the current selected range. - * @returns {void} - */ - autoSum(type: string, range: string | any[]): void; - - /** This method is used to hide the file menu in the ribbon tab. - * @returns {void} - */ - hideMenu(): void; - - /** This method is used to remove the item from the backstage in the spreadsheet. - * @param {number} Specifies the index of the item to be removed from backstage. - * @returns {void} - */ - removeBackStageItem(index: number): void; - - /** This method is used to remove the menu item form file menu in spreadsheet. - * @param {number} Specifies the index of the item to be removed from the file menu. - * @returns {void} - */ - removeMenuItem(index: number): void; - - /** This method is used to delete the defined name in the Spreadsheet name manager. - * @param {string} Pass the defined name that you want to remove from name manager. - * @returns {void} - */ - removeNamedRange(name: string): void; - - /** This method is used to remove the tab form ribbon in the spreadsheet. - * @param {number} Specifies the index of the tab to be removed from the ribbon. - * @param {boolean} pass the boolean value to remove the tab from ribbon - * @returns {void} - */ - removeTab(index: number, isRemoveMenu: boolean): void; - - /** This method is used to remove the tab group form ribbon in the spreadsheet. - * @param {number} Specifies the index of the tab group to be removed from the ribbon. - * @param {string} Specifies the text to be displayed in the tab group - * @returns {void} - */ - removeTabGroup(tabIndex: number, groupText: string): void; - - /** This method is used to show the file menu in the ribbon tab. - * @returns {void} - */ - showMenu(): void; - - /** This method is used to update the menu item in the file menu. - * @param {any} Specifies the menu item to be updated in the ribbon - * @param {number} pass the index of the item to be updated - * @returns {void} - */ - updateMenuItem(item: any, index: number): void; - - /** This method is used to update the ribbon icons in the Spreadsheet. - * @returns {void} - */ - updateRibbonIcons(): void; - } - - export interface XLSearch { - - /** This method is used to find and replace all data by workbook in the Spreadsheet. - * @param {string} Pass the search data. - * @param {string} Pass the replace data. - * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with case-sensitive. - * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with entire cell contents. - * @returns {void} - */ - replaceAllByBook(findData: string, replaceData: string, isCSen: boolean, isEMatch: boolean): void; - - /** This method is used to find and replace all data by sheet in Spreadsheet. - * @param {string} Pass the search data. - * @param {string} Pass the replace data. - * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with case-sensitive. - * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with entire cell contents. - * @returns {void} - */ - replaceAllBySheet(findData: string, replaceData: string, isCSen: boolean, isEMatch: boolean): void; - } - - export interface XLSelection { - - /** This method is used to clear the selection of the active sheet in the Spreadsheet. - * @returns {void} - */ - clearAll(): void; - - /** This method is used to get the selected cells element based on specified sheet index in the Spreadsheet. - * @param {number} Pass the sheet index to get the cells element. - * @returns {HTMLElement} - */ - getSelectedCells(sheetIdx: number): HTMLElement; - - /** This method is used to refresh the selection in the Spreadsheet. - * @param {Array|string} Optional. Pass range to refresh selection. - * @returns {void} - */ - refreshSelection(range: any[] | string): void; - - /** This method is used to select a single column in the Spreadsheet. - * @param {number} Pass the column index value. - * @returns {void} - */ - selectColumn(colIdx: number): void; - - /** This method is used to select entire columns in a specified range (start index and end index) in the Spreadsheet. - * @param {number} Pass the column start index. - * @param {number} Pass the column end index. - * @returns {void} - */ - selectColumns(startIdx: number, endIdx: number): void; - - /** This method is used to select the specified range of cells in the Spreadsheet. - * @param {string} Pass range which want to select. - * @returns {void} - */ - selectRange(range: string): void; - - /** This method is used to select a single row in the Spreadsheet. - * @param {number} Pass the row index value. - * @returns {void} - */ - selectRow(rowIdx: number): void; - - /** This method is used to select entire rows in a specified range (start index and end index) in the Spreadsheet. - * @param {number} Pass the start row index. - * @param {number} Pass the end row index. - * @returns {void} - */ - selectRows(startIdx: number, endIdx: number): void; - - /** This method is used to select all cells in active sheet. - * @returns {void} - */ - selectSheet(): void; - } - - export interface XLShape { - - /** This method is used to set a picture in the Spreadsheet. - * @param {string} Pass the range of the cell. - * @param {string} Pass the path of the specified image. - * @param {number} Optional. Pass the width of the image that you want to set. - * @param {number} Optional. Pass the height of the image that you want to set. - * @param {number} Optional. Pass the top of the image that you want to set. - * @param {number} Optional. Pass the left of the image that you want to set. - * @returns {string} - */ - setPicture(range: string, url: string, width: number, height: number, top: number, left: number): string; - } - - export interface XLSort { - - /** This method is used to sort a particular range of cells based on its cell or font color in the Spreadsheet. - * @param {string} Pass {{'`PutCellColor`' | markdownify}} to sort by cell color or {{'`PutFontColor`' | markdownify}} for sort by font color. - * @param {any} Pass the HEX color code to sort. - * @param {string} Pass the range - * @returns {void} - */ - sortByColor(operation: string, color: any, range: string): void; - - /** This method is used to sort a particular range of cells based on its values in the Spreadsheet. - * @param {Array|string} Pass the range to sort. - * @param {string} Pass the column name. - * @param {any} Pass the direction to sort (ascending or descending). - * @returns {boolean} - */ - sortByRange(range: any[] | string, columnName: string, direction: any): boolean; - } - - export interface XLValidate { - - /** This method is used to apply data validation rules in a selected range of cells based on the defined condition in the Spreadsheet. - * @param {string|Array} If range is specified, it will apply rules for the specified range else it will use the current selected range. - * @param {Array} Pass the validation condition, value1 and value2. - * @param {string} Pass the data type. - * @param {boolean} Pass {{'`true`' | markdownify}} if you ignore blank values. - * @param {boolean} Pass {{'`true`' | markdownify}} if you want to show an error alert. - * @returns {void} - */ - applyDVRules(range: string | any[], values: any[], type: string, required: boolean, showErrorAlert: boolean): void; - - /** This method is used to clear the applied validation rules in a specified range of cells in the Spreadsheet. - * @param {string|Array} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. - * @returns {void} - */ - clearDV(range: string | any[]): void; - - /** This method is used to highlight invalid data in a specified range of cells in the Spreadsheet. - * @param {string|Array} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. - * @returns {void} - */ - highlightInvalidData(range: string | any[]): void; - } - - export interface Model { - - /** Gets or sets an active sheet index in the Spreadsheet. By defining this value, you can specify which sheet should be active in workbook. - * @Default {1} - */ - activeSheetIndex?: number; - - /** Gets or sets a value that indicates whether to enable or disable auto rendering of cell type in the Spreadsheet. - * @Default {false} - */ - allowAutoCellType?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable auto fill feature in the Spreadsheet. - * @Default {true} - */ - allowAutoFill?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable auto sum feature in the Spreadsheet. - * @Default {true} - */ - allowAutoSum?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable cell format feature in the Spreadsheet. By enabling this, you can customize styles and number formats. - * @Default {true} - */ - allowCellFormatting?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable cell type feature in the Spreadsheet. - * @Default {false} - */ - allowCellType?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable chart feature in the Spreadsheet. By enabling this feature, you can create and customize charts in Spreadsheet. - * @Default {true} - */ - allowCharts?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable clear feature in the Spreadsheet. - * @Default {true} - */ - allowClear?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable clipboard feature in the Spreadsheet. By enabling this feature, you can perform cut/copy and paste operations in Spreadsheet. - * @Default {true} - */ - allowClipboard?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable comment feature in the Spreadsheet. By enabling this, you can add/delete/modify comments in Spreadsheet. - * @Default {true} - */ - allowComments?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable Conditional Format feature in the Spreadsheet. By enabling this, you can apply formatting to the selected range - * of cells based on the provided conditions (Greater than, Less than, Equal, Between, Contains, etc.). - * @Default {true} - */ - allowConditionalFormats?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable data validation feature in the Spreadsheet. - * @Default {true} - */ - allowDataValidation?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable the delete action in the Spreadsheet. By enabling this feature, you can delete existing rows, columns, cells and sheet. - * @Default {true} - */ - allowDelete?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable drag and drop feature in the Spreadsheet. - * @Default {true} - */ - allowDragAndDrop?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable the edit action in the Spreadsheet. - * @Default {true} - */ - allowEditing?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable filtering feature in the Spreadsheet. Filtering can be used to limit the data displayed using required criteria. - * @Default {true} - */ - allowFiltering?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable table feature in the Spreadsheet. By enabling this, you can render table in selected range. - * @Default {true} - */ - allowFormatAsTable?: boolean; - - /** Get or sets a value that indicates whether to enable or disable format painter feature in the Spreadsheet. By enabling this feature, you can copy - * the format from the selected range and apply it to another range. - * @Default {true} - */ - allowFormatPainter?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable formula bar in the Spreadsheet. - * @Default {true} - */ - allowFormulaBar?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable freeze pane support in Spreadsheet. After enabling this feature, - * you can use freeze top row, freeze first column and freeze panes options. - * @Default {false} - */ - allowFreezing?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable hyperlink feature in the Spreadsheet. By enabling this feature, you can add hyperlink which is used to - * easily navigate to the cell reference from one sheet to another or a web page. - * @Default {true} - */ - allowHyperlink?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable import feature in the Spreadsheet. By enabling this feature, you can open existing Spreadsheet documents. - * @Default {true} - */ - allowImport?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable the insert action in the Spreadsheet. By enabling this feature, you can insert new rows, columns, cells and sheet. - * @Default {true} - */ - allowInsert?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable keyboard navigation feature in the Spreadsheet. - * @Default {true} - */ - allowKeyboardNavigation?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable lock cell feature in the Spreadsheet. - * @Default {true} - */ - allowLockCell?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable merge feature in the Spreadsheet. - * @Default {true} - */ - allowMerging?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable overflow feature in the Spreadsheet. - * @Default {true} - */ - allowOverflow?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable resizing feature in the Spreadsheet. By enabling this feature, you can change the column width and - * row height by dragging its header boundaries. - * @Default {true} - */ - allowResizing?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable find and replace feature in the Spreadsheet. By enabling this, you can easily find and replace - * a specific value in the sheet or workbook. By using goto behavior, you can select and highlight all cells that contains specific data or data types. - * @Default {true} - */ - allowSearching?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable selection in the Spreadsheet. By enabling this feature, selected items will be highlighted. - * @Default {true} - */ - allowSelection?: boolean; - - /** Gets or sets a value that indicates whether to enable the sorting feature in the Spreadsheet. - * @Default {true} - */ - allowSorting?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable undo and redo feature in the Spreadsheet. - * @Default {true} - */ - allowUndoRedo?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable wrap text feature in the Spreadsheet. By enabling this, cell content can wrap to the next line, - * if the cell content exceeds the boundary of the cell. - * @Default {true} - */ - allowWrap?: boolean; - - /** Gets or sets a value that indicates to define the width of the activation panel in Spreadsheet. - * @Default {300} - */ - apWidth?: number; - - /** Gets or sets an object that indicates to customize the auto fill behavior in the Spreadsheet. - */ - autoFillSettings?: AutoFillSettings; - - /** Gets or sets an object that indicates to customize the chart behavior in the Spreadsheet. - */ - chartSettings?: ChartSettings; - - /** Gets or sets a value that defines the number of columns displayed in the sheet. - * @Default {21} - */ - columnCount?: number; - - /** Gets or sets a value that indicates to define the common width for each column in the Spreadsheet. - * @Default {64} - */ - columnWidth?: number; - - /** Gets or sets a value to add root CSS class for customizing Spreadsheet skins. - */ - cssClass?: string; - - /** Gets or sets a value that indicates custom formulas in Spreadsheet. - * @Default {[]} - */ - customFormulas?: any[]; - - /** Gets or sets a value that indicates whether to enable or disable context menu in the Spreadsheet. - * @Default {true} - */ - enableContextMenu?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable pivot table in the Spreadsheet. - * @Default {false} - */ - enablePivotTable?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable touch support in the Spreadsheet. - * @Default {true} - */ - enableTouch?: boolean; - - /** Gets or sets an object that indicates to customize the exporting behavior in Spreadsheet. - */ - exportSettings?: ExportSettings; - - /** Gets or sets an object that indicates to customize the format behavior in the Spreadsheet. - */ - formatSettings?: FormatSettings; - - /** Gets or sets an object that indicates to customize the import behavior in the Spreadsheet. - */ - importSettings?: ImportSettings; - - /** Gets or sets a value that indicates whether to enable or disable readonly support in the Spreadsheet. - * @Default {false} - */ - isReadOnly?: boolean; - - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data (i.e.) - * in a language and culture specific to a particular country or region. - * @Default {en-US} - */ - locale?: string; - - /** Gets or sets an object that indicates to customize the picture behavior in the Spreadsheet. - */ - pictureSettings?: PictureSettings; - - /** Gets or sets an object that indicates to customize the print option in Spreadsheet. - */ - printSettings?: PrintSettings; - - /** Gets or sets an object that indicates to customize the ribbon settings in Spreadsheet. - */ - ribbonSettings?: RibbonSettings; - - /** Gets or sets a value that indicates whether to define the number of rows to be displayed in the sheet. - * @Default {20} - */ - rowCount?: number; + /** Returns the name of the event + */ + type?: string; - /** Gets or sets a value that indicates to define the common height for each row in the sheet. - * @Default {20} - */ - rowHeight?: number; + /** Returns the PDF document name displaying in the PDF viewer. + */ + fileName?: string; + } - /** Gets or sets an object that indicates to customize the scroll options in the Spreadsheet. - */ - scrollSettings?: ScrollSettings; + export interface DocumentUnloadEventArgs { - /** Gets or sets an object that indicates to customize the selection options in the Spreadsheet. - */ - selectionSettings?: SelectionSettings; + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Gets or sets a value that indicates to define the number of sheets to be created at the initial load. - * @Default {1} - */ - sheetCount?: number; + /** Returns the PDF viewer model + */ + model?: any; - /** Gets or sets an object that indicates to customize the sheet behavior in Spreadsheet. - */ - sheets?: Sheet[]; + /** Returns the name of the event + */ + type?: string; + } - /** Gets or sets a value that indicates whether to show or hide pager in the Spreadsheet. - * @Default {true} - */ - showPager?: boolean; + export interface PageChangeEventArgs { - /** Gets or sets a value that indicates whether to show or hide ribbon in the Spreadsheet. - * @Default {true} - */ - showRibbon?: boolean; + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** This is used to set the number of undo-redo steps in the Spreadsheet. - * @Default {20} - */ - undoRedoStep?: number; + /** Returns the PDF viewer model + */ + model?: any; - /** Define the username for the Spreadsheet which is displayed in comment. - * @Default {User Name} - */ - userName?: string; + /** Returns the name of the event + */ + type?: string; - /** Triggered for every action before its starts. */ - actionBegin?(e: ActionBeginEventArgs): void; + /** Returns the current page number in view. + */ + currentPageNumber?: number; + } - /** Triggered for every action complete. */ - actionComplete?(e: ActionCompleteEventArgs): void; + export interface AjaxRequestFailureEventArgs { - /** Triggered when the auto fill operation begins. */ - autoFillBegin?(e: AutoFillBeginEventArgs): void; + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggered when the auto fill operation completes. */ - autoFillComplete?(e: AutoFillCompleteEventArgs): void; + /** Returns the PDF viewer model + */ + model?: any; - /** Triggered before the batch save. */ - beforeBatchSave?(e: BeforeBatchSaveEventArgs): void; + /** Returns the name of the event + */ + type?: string; - /** Triggered before the cells to be formatted. */ - beforeCellFormat?(e: BeforeCellFormatEventArgs): void; + /** Returns the exception details. + */ + message?: string; + } - /** Triggered before the cell selection. */ - beforeCellSelect?(e: BeforeCellSelectEventArgs): void; + export interface ZoomChangeEventArgs { - /** Triggered before the selected cells are dropped. */ - beforeDrop?(e: BeforeDropEventArgs): void; + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggered while start to edit the comment. */ - beforeEditComment?(e: BeforeEditCommentEventArgs): void; + /** Returns the PDF viewer model + */ + model?: any; - /** Triggered before the contextmenu is open. */ - beforeOpen?(e: BeforeOpenEventArgs): void; + /** Returns the name of the event. + */ + type?: string; - /** Triggered before the activation panel is open. */ - beforePanelOpen?(e: BeforePanelOpenEventArgs): void; + /** Returns the previous zoom percentage of the PDF viewer control + */ + previousZoomPercentage?: number; - /** Triggered when click on sheet cell. */ - cellClick?(e: CellClickEventArgs): void; + /** Returns the current zoom percentage of the PDF viewer control + */ + currentZoomPercentage?: number; + } - /** Triggered when the cell is edited. */ - cellEdit?(e: CellEditEventArgs): void; + export interface HyperlinkClickEventArgs { - /** Triggered while cell is formatting. */ - cellFormatting?(e: CellFormattingEventArgs): void; + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggered when mouse hover on cell in sheets. */ - cellHover?(e: CellHoverEventArgs): void; + /** Returns the PDF viewer model + */ + model?: any; - /** Triggered when save the edited cell. */ - cellSave?(e: CellSaveEventArgs): void; + /** Returns the name of the event + */ + type?: string; - /** Triggered when the cell is selected. */ - cellSelected?(e: CellSelectedEventArgs): void; + /** Returns the clicked hyperlink + */ + hyperlink?: string; + } - /** Triggered when click the contextmenu items. */ - contextMenuClick?(e: ContextMenuClickEventArgs): void; + export interface BeforePrintEventArgs { - /** Triggered when the selected cells are being dragged. */ - drag?(e: DragEventArgs): void; + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggered when you start to drag the picture or chart. */ - dragShape?(e: DragShapeEventArgs): void; + /** Returns the PDF viewer model + */ + model?: any; - /** Triggered when the selected cells are initiated to drag. */ - dragStart?(e: DragStartEventArgs): void; + /** Returns the name of the event + */ + type?: string; + } - /** Triggered when the selected cells are dropped. */ - drop?(e: DropEventArgs): void; + export interface AfterPrintEventArgs { - /** Triggered before the range editing starts. */ - editRangeBegin?(e: EditRangeBeginEventArgs): void; + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggered after range editing completes. */ - editRangeComplete?(e: EditRangeCompleteEventArgs): void; + /** Returns the PDF viewer model + */ + model?: any; - /** Triggered when the key is pressed down. */ - keyDown?(e: KeyDownEventArgs): void; + /** Returns the name of the event + */ + type?: string; + } - /** Triggered when the key is released. */ - keyUp?(e: KeyUpEventArgs): void; + export interface PageClickEventArgs { - /** Triggered before the sheet is loaded. */ - load?(e: LoadEventArgs): void; + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggered after the sheet is loaded. */ - loadComplete?(e: LoadCompleteEventArgs): void; + /** Returns the PDF viewer model + */ + model?: any; - /** Triggered every click of the menu item. */ - menuClick?(e: MenuClickEventArgs): void; + /** Returns the name of the event + */ + type?: string; - /** Triggered when a file is imported. */ - onImport?(e: OnImportEventArgs): void; + /** Returns the current X position + */ + offsetX?: number; - /** Triggered when import sheet is failed to open. */ - openFailure?(e: OpenFailureEventArgs): void; + /** Returns the current Y position + */ + offsetY?: number; + } - /** Triggered when pager item is clicked in the Spreadsheet. */ - pagerClick?(e: PagerClickEventArgs): void; + export interface AnnotationAddEventArgs { - /** Triggered when you start resizing the chart, picture, row and column. */ - resizeStart?(e: ResizeStartEventArgs): void; + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Triggered after end of resizing the chart, picture, row and column. */ - resizeEnd?(e: ResizeEndEventArgs): void; + /** Returns the PDF viewer model + */ + model?: any; - /** Triggered when click on the ribbon. */ - ribbonClick?(e: RibbonClickEventArgs): void; + /** Returns the name of the event + */ + type?: string; - /** Triggered when the chart series rendering. */ - seriesRendering?(e: SeriesRenderingEventArgs): void; + /** Returns the settings of the annotation added to the PDF document. + */ + annotationSettings?: any; - /** Triggered when click the ribbon tab. */ - tabClick?(e: TabClickEventArgs): void; + /** Returns the id of the annotation added in the page of the PDF document. + */ + annotationID?: number; - /** Triggered when select the ribbon tab. */ - tabSelect?(e: TabSelectEventArgs): void; - } + /** Returns the bounds of the annotation added in the page of the PDF document. + */ + annotationBound?: any[]; - export interface ActionBeginEventArgs { + /** Returns the page number in which the annotation is added. + */ + pageID?: number; - /** Returns the applied style format object. - */ - afterFormat?: any; + /** Returns the type of the annotation added in the page of the PDF document. + */ + annotationType?: string; + } - /** Returns the applied style format object. - */ - beforeFormat?: any; + export interface AnnotationRemoveEventArgs { - /** Returns the sheet index. - */ - sheetIdx?: number; + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the cell range. - */ - range?: any[]; + /** Returns the PDF viewer model + */ + model?: any; - /** Returns the action format. - */ - reqType?: string; + /** Returns the name of the event + */ + type?: string; - /** Returns goto index while paging. - */ - gotoIdx?: number; + /** Returns the id of the annotation removed from the page of the PDF document. + */ + annotationID?: number; - /** Returns boolean value. If create new sheet it returns true. - */ - newSheet?: boolean; + /** Returns the page number in which the annotation is removed. + */ + pageID?: number; - /** Return column name while sorting. - */ - columnName?: string; + /** Returns the type of the annotation removed from the page of the PDF document. + */ + annotationType?: string; + } - /** Returns selected columns while sorting or filtering begins. - */ - colSelected?: number; + export interface AnnotationPropertiesChangeEventArgs { - /** Returns sort direction while sort action begins. - */ - sortDirection?: string; - } + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface ActionCompleteEventArgs { + /** Returns the PDF viewer model + */ + model?: any; - /** Returns Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Returns the name of the event + */ + type?: string; - /** Returns the applied cell format object. - */ - selectedCell?: any[] | any; + /** Returns the id of the annotation added in the page of the PDF document. + */ + annotationID?: number; - /** Returns the sheet index. - */ - sheetIdx?: number; + /** Returns the page number in which the annotation is added. + */ + pageID?: number; - /** Returns the request type. - */ - reqType?: string; + /** Returns the type of the annotation added in the page of the PDF document. + */ + annotationType?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Specifies that the color of the annotation is changed. + */ + isColorChanged?: boolean; - /** Returns the name of the event. - */ - type?: string; - } + /** Specifies that the opacity of the annotation is changed. + */ + isOpacityChanged?: boolean; + } - export interface AutoFillBeginEventArgs { + export interface BufferStartEventArgs { - /** Returns auto fill begin cell range. - */ - dataRange?: any[]; + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns which direction drag the auto fill. - */ - direction?: string; + /** Returns the PDF viewer model + */ + model?: any; - /** Returns fill cells range. - */ - fillRange?: any[]; + /** Returns the name of the event + */ + type?: string; - /** Returns the auto fill type. - */ - fillType?: string; + /** Specifies the state of the buffering + */ + isBuffering?: boolean; + } - /** Returns the sheet index. - */ - sheetIdx?: number; + export interface BufferEndEventArgs { - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns the name of the event. - */ - type?: string; + /** Returns the PDF viewer model + */ + model?: any; - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Returns the name of the event + */ + type?: string; - export interface AutoFillCompleteEventArgs { + /** Specifies the state of the buffering + */ + isBuffering?: boolean; + } - /** Returns auto fill begin cell range. - */ - dataRange?: any[]; + export interface DestroyEventArgs { - /** Returns which direction to drag the auto fill. - */ - direction?: string; + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Returns fill cells range. - */ - fillRange?: any[]; + /** Returns the PDF viewer model + */ + model?: any; - /** Returns the auto fill type. - */ - fillType?: string; + /** Returns the name of the event + */ + type?: string; + } - /** Returns the sheet index. - */ - sheetIdx?: number; + export interface ToolbarSettings { - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Shows or hides the tooltip of the toolbar items. + */ + showToolTip?: boolean; - /** Returns the name of the event. - */ - type?: string; + /** Shows or hides the grouped items in the toolbar with the help of enum ej.PdfViewer.ToolbarItems + */ + toolbarItem?: ej.PdfViewer.ToolbarItems|string; + } - /** Returns the cancel option value. - */ - cancel?: boolean; - } + export interface ServerActionSettings { - export interface BeforeBatchSaveEventArgs { + /** Specifies the name of the action method used for loading the PDF document. + */ + load?: string; - /** Returns the sheet index. - */ - sheetIdx?: number; + /** Specifies the name of the action method used for uploading the PDF document to the PDF viewer control. + */ + fileUpload?: string; - /** Returns the query, primary key,batch changes for the data Source. - */ - dataSetting?: any; + /** Specifies the name of the action method used for printing the PDF document in the PDF viewer control. + */ + print?: string; - /** Returns the changed record object. - */ - batchChanges?: any; - } + /** Specifies the name of the action method used for downloading the PDF document from the PDF viewer control. + */ + download?: string; + } - export interface BeforeCellFormatEventArgs { + export interface StrikethroughSettings { - /** Returns the sheet index. - */ - sheetIdx?: number; + /** Gets/sets the color of the strikethrough annotation. + */ + color?: string; - /** Returns the applied style format object. - */ - format?: any; + /** Gets/sets the author of the strikethrough annotation. + */ + author?: string; - /** Returns the selected cells. - */ - cells?: any[] | any; + /** Gets/sets the opacity of the strikethrough annotation. + */ + opacity?: number; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Gets/sets the subject of the strikethrough annotation. + */ + subject?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Gets/sets the modified Date of the strikethrough annotation. + */ + modifiedDate?: string; - /** Returns the name of the event. - */ - type?: string; - } + /** Gets/sets the locked property of the strikethrough annotation. + */ + isLocked?: boolean; + } - export interface BeforeCellSelectEventArgs { + export interface UnderlineSettings { - /** Returns the previous cell range. - */ - prevRange?: any[]; + /** Gets/sets the color of the underline annotation. + */ + color?: string; - /** Returns the current cell range. - */ - currRange?: any[]; + /** Gets/sets the author of the underline annotation. + */ + author?: string; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Gets/sets the opacity of the underline annotation. + */ + opacity?: number; - /** Returns the name of the event. - */ - type?: string; + /** Gets/sets the subject of the underline annotation. + */ + subject?: string; - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Gets/sets the modified Date of the underline annotation. + */ + modifiedDate?: string; - export interface BeforeDropEventArgs { + /** Gets/sets the locked property of the underline annotation. + */ + isLocked?: boolean; + } - /** Returns the sheet index. - */ - sheetIdx?: number; + export interface HighlightSettings { - /** Returns the current cell row and column index. - */ - currentCell?: any; + /** Gets/sets the color of the highlight annotation. + */ + color?: string; - /** Returns the drag cells range object. - */ - dragAndDropRange?: any; + /** Gets/sets the author of the highlight annotation. + */ + author?: string; - /** Returns the cell Overwriting alert option value. - */ - preventAlert?: boolean; + /** Gets/sets the opacity of the highlight annotation. + */ + opacity?: number; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Gets/sets the subject of the highlight annotation. + */ + subject?: string; - /** Returns the target item. - */ - target?: HTMLElement; + /** Gets/sets the modified Date of the highlight annotation. + */ + modifiedDate?: string; - /** Returns the name of the event. - */ - type?: string; + /** Gets/sets the locked property of the highlight annotation. + */ + isLocked?: boolean; + } - /** Returns the cancel option value. - */ - cancel?: boolean; - } + enum ToolbarItems { - export interface BeforeEditCommentEventArgs { + ///Shows only magnification tools in the toolbar. + MagnificationTools, - /** Returns the sheet index. - */ - sheetIdx?: number; + ///Shows only page navigation tools in the toolbar. + PageNavigationTools, - /** Returns the comment cell index. - */ - cellIndex?: any; + ///Shows only print tool in the toolbar. + PrintTools, - /** Returns the disable option value. - */ - disable?: boolean; + ///Shows only download tool in the toolbar. + DownloadTool, - /** Returns the Spreadsheet model. - */ - model?: any; + ///Shows only text search tool in the toolbar. + TextSearchTool, - /** Returns the value of the comment - */ - value?: string; + ///Shows only text markup annotation tools in the toolbar. + TextMarkupAnnotationTools, - /** Returns the name of the event. - */ - type?: string; + ///Shows all the toolbar items. + All + } - /** Returns the cancel option value. - */ - cancel?: boolean; - } - export interface BeforeOpenEventArgs { + enum AnnotationType { - /** Returns the target element. - */ - target?: HTMLElement; + ///Specifies the underline annotation. + Underline, - /** Returns the name of the event. - */ - type?: string; + ///Specifies the strikethrough annotation. + Strikethrough, - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + ///Specifies the highlight annotation. + Highlight + } - /** Returns the cancel option value. - */ - cancel?: boolean; - } - export interface BeforePanelOpenEventArgs { + enum PdfService { - /** Returns the sheet index. - */ - sheetIdx?: number; + ///Denotes that the service is located in the local project + Local, - /** Returns the activation panel element. - */ - activationPanel?: any; + ///Denotes that the service is hosted in the remote server + Remote + } - /** Returns the range option value. - */ - range?: any; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + enum LinkTarget { - /** Returns the name of the event. - */ - type?: string; + ///Opens the hyperlink in the same tab of the browser. + Default, - /** Returns the cancel option value. - */ - cancel?: boolean; - } + ///Opens the hyperlink in a new tab of the browser. + NewTab, - export interface CellClickEventArgs { + ///Opens the hyperlink in a new window of the browser. + NewWindow + } - /** Returns the click cell element. - */ - cell?: HTMLElement; + } - /** Returns the column index of clicked cell. - */ - columnIndex?: number; + class SpellCheck extends ej.Widget { + static fn: SpellCheck; + constructor(element: JQuery | Element, options?: SpellCheck.Model); + static Locale: any; + model: SpellCheck.Model; + defaults: SpellCheck.Model; + + /** Open the dialog to correct the spelling of the target content. + * @returns {void} + */ + showInDialog(): void; + + /** Highlighting the error word in the target area itself and correct the spelling using the context menu. + * @returns {void} + */ + validate(): void; - /** Returns the row index of clicked cell. - */ - rowIndex?: number; + /** To get the error word highlighted string by passing the given input sentence. + * @param {string} Content to be spell check + * @param {string} Class name that contains style value to highlight the error word + * @returns {any} + */ + spellCheck(targetSentence: string, misspellWordCss: string): any; + + /** To ignore all the error word occurrences from the given input sentence. + * @param {string} Error word to ignore from the target content + * @param {string} Content to perform the ignore all operation + * @returns {any} + */ + ignoreAll(word: string, targetSentence: string): any; + + /** To ignore the error word once from the given input sentence. + * @param {string} Error word to ignore from the target content + * @param {string} Content to perform the ignore operation + * @param {number} Index of the error word present in the target content + * @returns {any} + */ + ignore(word: string, targetSentence: string, index: number): any; + + /** To change the error word once from the given input sentence. + * @param {string} Error word to change from the target content + * @param {string} Content to perform the change operation + * @param {string} Word to replace with the error word + * @param {number} Index of the error word present in the target content + * @returns {any} + */ + change(word: string, targetSentence: string, changeWord: string, index: number): any; + + /** To change all the error word occurrences from the given input sentence. + * @param {string} Error word to change from the target content + * @param {string} Content to perform the change all operation + * @param {string} Word to replace with the error word + * @returns {any} + */ + changeAll(word: string, targetSentence: string, changeWord: string): any; + + /** To add the words into the custom dictionary. + * @param {string} Word to add into the dictionary file + * @returns {any} + */ + addToDictionary(customWord: string): any; + } + export namespace SpellCheck { + + export interface Model { + + /** It includes the service method path to find the error words and its suggestions also adding the custom word into the custom dictionary. + */ + dictionarySettings?: DictionarySettings; + + /** To display the error word in a customized style. + * @Default {e-errorword} + */ + misspellWordCss?: string; + + /** Sets the specific culture to the SpellCheck. + * @Default {en-US} + */ + locale?: string; + + /** To set the maximum suggestion display count. + * @Default {6} + */ + maxSuggestionCount?: number; + + /** To ignore the words from the error word consideration. + * @Default {[]} + */ + ignoreWords?: any[]; + + /** Holds all options related to the context menu settings of SpellCheck. + */ + contextMenuSettings?: ContextMenuSettings; + + /** It helps to ignore the uppercase, mixed case words, alpha numeric words, file path and email addresses based on the property values. + */ + ignoreSettings?: IgnoreSettings; + + /** When set to true, allows the spellcheck to render based upon screen size. + * @Default {true} + */ + isResponsive?: boolean; + + /** Gets or sets a value that indicates whether to enable the spellcheck operation on Enter/Space key-press. + * @Default {false} + */ + enableValidateOnType?: boolean; + + /** It allows to spell check the multiple target HTML element's texts and correct its error words. + * @Default {null} + */ + controlsToValidate?: string; + + /** Triggers on the success of AJAX call request. + */ + actionSuccess?(e: ActionSuccessEventArgs): void; + + /** Triggers on the AJAX call request beginning. + */ + actionBegin?(e: ActionBeginEventArgs): void; + + /** Triggers when the AJAX call request failure. + */ + actionFailure?(e: ActionFailureEventArgs): void; + + /** Triggers when the dialog mode spell check starting. + */ + start?(e: StartEventArgs): void; + + /** Triggers when the spell check operations completed through dialog mode. + */ + complete?(e: CompleteEventArgs): void; + + /** Triggers before context menu opening. + */ + contextOpen?(e: ContextOpenEventArgs): void; + + /** Triggers when the context menu item clicked. + */ + contextClick?(e: ContextClickEventArgs): void; + + /** Triggers before the spell check dialog opens. + */ + dialogBeforeOpen?(e: DialogBeforeOpenEventArgs): void; + + /** Triggers after the spell check dialog opens. + */ + dialogOpen?(e: DialogOpenEventArgs): void; + + /** Triggers when the spell check dialog closed. + */ + dialogClose?(e: DialogCloseEventArgs): void; + + /** Triggers when the spell check control performing the spell check operations such as ignore, ignoreAll, change, changeAll and addToDictionary. + */ + validating?(e: ValidatingEventArgs): void; + + /** Triggers before loading the target HTML element text into the dialog sentence area. + */ + targetUpdating?(e: TargetUpdatingEventArgs): void; + } - /** Returns the column name of clicked cell. - */ - columnName?: string; + export interface ActionSuccessEventArgs { - /** Returns the column information. - */ - columnObject?: any; + /** Returns the error word highlighted string. + */ + resultHTML?: string; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Returns the error word details of the given input. + */ + errorWordDetails?: any; - /** Returns the name of the event. - */ - type?: string; + /** Returns the request type value. + */ + requestType?: string; - /** Returns the target element. - */ - target?: HTMLElement; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the value of the cell. - */ - value?: string; + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface CellEditEventArgs { + export interface ActionBeginEventArgs { - /** Returns the click cell element. - */ - cell?: HTMLElement; + /** Returns the input string. + */ + targetSentence?: string; - /** Returns the columnName of clicked cell. - */ - columnName?: string; + /** Returns the misspellWordCss class name. + */ + misspellWordCss?: string; - /** Returns the column field information. - */ - columnObject?: any; + /** Returns the request type value. + */ + requestType?: string; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the name of the event. - */ - type?: string; + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - /** Returns the target element. - */ - target?: HTMLElement; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the cancel option value. - */ - cancel?: boolean; - } + export interface ActionFailureEventArgs { - export interface CellFormattingEventArgs { + /** Returns AJAX request failure error message. + */ + errorMessage?: string; - /** Returns the sheet index - */ - SheetIdx?: number; + /** Returns the request type value. + */ + requestType?: string; - /** Returns the applied style format object - */ - Format?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cell index. - */ - Cell?: number; + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - /** Returns the name of the CSS theme. - */ - cssClass?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the name of the event. - */ - type?: string; + export interface StartEventArgs { - /** Returns the target element. - */ - target?: HTMLElement; + /** Returns the input string. + */ + targetSentence?: string; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - } + /** Returns the error words details. + */ + errorWords?: any; - export interface CellHoverEventArgs { + /** Returns the request type value. + */ + requestType?: string; - /** Returns the target element. - */ - target?: HTMLElement; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the name of the event. - */ - type?: string; + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the cancel option value. - */ - cancel?: boolean; - } + export interface CompleteEventArgs { - export interface CellSaveEventArgs { + /** Returns the error word highlighted string. + */ + resultHTML?: string; - /** Returns the save cell element. - */ - cell?: HTMLElement; + /** Returns the request type value. + */ + requestType?: string; - /** Returns the columnName of clicked cell. - */ - columnName?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the column field information. - */ - columnObject?: any; + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - /** Returns the index of the row. - */ - rowIndex?: number; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the index of the column. - */ - colIndex?: number; + export interface ContextOpenEventArgs { - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Returns the selected error word. + */ + selectedErrorWord?: string; - /** Returns the cell previous value. - */ - pValue?: string; + /** Returns the request type value. + */ + requestType?: string; - /** Returns the name of the event. - */ - type?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - /** Returns the target element. - */ - target?: HTMLElement; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the cell value. - */ - value?: string; - } + export interface ContextClickEventArgs { - export interface CellSelectedEventArgs { + /** Returns the selected error word. + */ + selectedValue?: string; - /** Returns the active sheet index. - */ - sheetIdx?: number; + /** Returns the selected option in the context menu. + */ + selectedOption?: string; - /** Returns the selected range. - */ - selectedRange?: any[]; + /** Returns the input string. + */ + targetContent?: string; - /** Returns the target element. - */ - target?: HTMLElement; + /** Returns the request type value. + */ + requestType?: string; - /** Returns Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the name of the event. - */ - type?: string; + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Returns the name of the event. + */ + type?: string; + } - export interface ContextMenuClickEventArgs { + export interface DialogBeforeOpenEventArgs { - /** Returns target element Id. - */ - Id?: string; + /** Returns the spell check window details. + */ + spellCheckDialog?: any; - /** Returns the target element. - */ - element?: HTMLElement; + /** Returns the request type value. + */ + requestType?: string; - /** Returns event information. - */ - event?: any; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns target element and event information. - */ - events?: any; + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns target element parent Id. - */ - parentId?: string; + export interface DialogOpenEventArgs { - /** Returns target element parent text. - */ - parentText?: string; + /** Returns the target input. + */ + targetText?: string; - /** Returns target element text. - */ - text?: string; + /** Returns the request type value. + */ + requestType?: string; - /** Returns the name of the event. - */ - type?: string; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - export interface DragEventArgs { + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the sheet index. - */ - sheetIdx?: number; + export interface DialogCloseEventArgs { - /** Returns the current cell row and column index. - */ - currentCell?: any; + /** Returns the error corrected string. + */ + updatedText?: string; - /** Returns the drag cells range object. - */ - dragAndDropRange?: any; + /** Returns the request type value. + */ + requestType?: string; - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the target item. - */ - target?: HTMLElement; + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - /** Returns the name of the event. - */ - type?: string; + /** Returns the name of the event. + */ + type?: string; + } - /** Returns the cancel option value. - */ - cancel?: boolean; - } + export interface ValidatingEventArgs { - export interface DragShapeEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; - /** Returns the Spreadsheet model. - */ - model?: any; + /** Returns the error word to ignore. + */ + ignoreWord?: string; - /** Returns the name of the event. - */ - type?: string; + /** Returns the target content. + */ + targetContent?: string; - /** Returns the target element. - */ - target?: HTMLElement; + /** Returns the index of an error word. + */ + index?: number; - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; - export interface DragStartEventArgs { + /** Returns the validating request type. + */ + requestType?: string; - /** Returns the sheet index. - */ - sheetIdx?: number; + /** Returns the name of the event. + */ + type?: string; - /** Returns the current cell row and column index. - */ - currentCell?: any; + /** Returns the error word to change. + */ + changeableWord?: string; + + /** Returns the change word to replace the error word. + */ + changeWord?: string; + + /** Returns the custom word to add into dictionary file. + */ + customWord?: string; + } + + export interface TargetUpdatingEventArgs { + + /** Returns the previous target element value. + */ + previousElement?: any; + + /** Returns the current target element value. + */ + currentElement?: any; + + /** Returns the target html value. + */ + targetHtml?: string; + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; + + /** Returns the name of the event. + */ + type?: string; + } + + export interface DictionarySettings { + + /** The dictionaryUrl option accepts string, which is the method path to find the error words and get the suggestions to correct the errors. + */ + dictionaryUrl?: string; + + /** The customDictionaryUrl option accepts string, which is the method path to add the error word into the custom dictionary. + */ + customDictionaryUrl?: string; + } + + export interface ContextMenuSettings { + + /** When set to true, enables the context menu options available for the SpellCheck. + * @Default {true} + */ + enable?: boolean; + + /** Contains all the default context menu options that are applicable for SpellCheck. It also supports adding custom menu items. All the SpellCheck related context menu items are + * grouped under this menu collection. + * @Default {{% highlight javascript %}[{ id: IgnoreAll, text: Ignore All },{ id: AddToDictionary, text: Add To Dictionary }]{% endhighlight %}} + */ + menuItems?: any[]; + } + + export interface IgnoreSettings { + + /** When set to true, ignoring the alphanumeric words from the error word consideration. + * @Default {true} + */ + ignoreAlphaNumericWords?: string; + + /** When set to true, ignoring the Email address from the error word consideration. + * @Default {true} + */ + ignoreEmailAddress?: boolean; + + /** When set to true, ignoring the MixedCase words from the error word consideration. + * @Default {true} + */ + ignoreMixedCaseWords?: boolean; + + /** When set to true, ignoring the UpperCase words from the error word consideration. + * @Default {true} + */ + ignoreUpperCase?: boolean; + + /** When set to true, ignoring the Url from the error word consideration. + * @Default {true} + */ + ignoreUrl?: boolean; + + /** When set to true, ignoring the file address path from the error word consideration. + * @Default {true} + */ + ignoreFileNames?: boolean; + } + } + + class DocumentEditor extends ej.Widget { + static fn: DocumentEditor; + constructor(element: JQuery | Element, options?: DocumentEditor.Model); + static Locale: any; + model: DocumentEditor.Model; + defaults: DocumentEditor.Model; + + /** Loads the document from specified path using web API provided by importUrl. + * @param {string} Specifies the file path. + * @returns {void} + */ + load(path: string): void; + + /** Gets the page number of current selection in the document. + * @returns {number} + */ + getCurrentPageNumber(): number; + + /** Gets the total number of pages in the document. + * @returns {number} + */ + getPageCount(): number; + + /** Gets the text of current selection in the document. + * @returns {string} + */ + getSelectedText(): string; + + /** Gets the current zoom factor value of the document editor. + * @returns {number} + */ + getZoomFactor(): number; + + /** Scales the document editor with the specified zoom factor. The range of zoom factor should be 0.10 to 5.00 (10 - 500 %). + * @param {number} Specifies the factor for zooming. + * @returns {void} + */ + setZoomFactor(factor: number): void; + + /** Prints the document content as page by page. + * @returns {void} + */ + print(): void; + + /** Finds the first occurrence of specified text from current selection and highlights the result. If the document end is reached, find operation will occur from the document start + * position. + * @param {string} Specifies the text to search in a document. + * @returns {void} + */ + find(text: string): void; + } + export namespace DocumentEditor { + + export interface Model { + + /** Gets or sets an object that indicates initialization of importing and exporting documents in document editor. + */ + importExportSettings?: ImportExportSettings; + + /** Triggers when the document changes. + */ + onDocumentChange?(e: OnDocumentChangeEventArgs): void; + + /** Triggers when the selection changes. + */ + onSelectionChange?(e: OnSelectionChangeEventArgs): void; + + /** Triggers when the zoom factor changes. + */ + onZoomFactorChange?(e: OnZoomFactorChangeEventArgs): void; + + /** Triggers when the hyperlink is clicked. + */ + onRequestNavigate?(e: OnRequestNavigateEventArgs): void; + } + + export interface OnDocumentChangeEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the document editor model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; + } + + export interface OnSelectionChangeEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the document editor model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; + } + + export interface OnZoomFactorChangeEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the document editor model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; + } + + export interface OnRequestNavigateEventArgs { + + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the document editor model. + */ + model?: any; + + /** Returns the link type and navigation link. + */ + hyperlink?: any; + + /** Returns the name of the event. + */ + type?: string; + } + + export interface ImportExportSettings { - /** Returns the drag cells range object. - */ - dragAndDropRange?: any; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the target item. - */ - target?: HTMLElement; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface DropEventArgs { - - /** Returns the sheet index. - */ - sheetIdx?: number; - - /** Returns the current cell row and column index. - */ - currentCell?: any; - - /** Returns the drag cells range object. - */ - dragAndDropRange?: any; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the target item. - */ - target?: HTMLElement; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface EditRangeBeginEventArgs { - - /** Returns the sheet index. - */ - sheetIdx?: number; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the range option value. - */ - range?: any; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface EditRangeCompleteEventArgs { - - /** Returns the sheet index. - */ - sheetIdx?: number; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the range option value. - */ - range?: any; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface KeyDownEventArgs { - - /** Returns the sheet index. - */ - sheetIndex?: number; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the boolean value. - */ - isCommentEdit?: boolean; - - /** Returns the boolean value. - */ - isEdit?: boolean; - - /** Returns the boolean value. - */ - isSheetRename?: boolean; - - /** Returns the target element. - */ - target?: HTMLElement; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface KeyUpEventArgs { - - /** Returns the sheet index. - */ - sheetIndex?: number; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the boolean value. - */ - isCommentEdit?: boolean; - - /** Returns the boolean value. - */ - isEdit?: boolean; - - /** Returns the boolean value. - */ - isSheetRename?: boolean; - - /** Returns the target element. - */ - target?: HTMLElement; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface LoadEventArgs { - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the active sheet index. - */ - sheetIndex?: number; - } - - export interface LoadCompleteEventArgs { - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface MenuClickEventArgs { - - /** Returns menu click element. - */ - element?: HTMLElement; - - /** Returns the event information. - */ - event?: any; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns target element parent Id. - */ - parentId?: string; - - /** Returns target element parent text. - */ - parentText?: string; - - /** Returns target element text. - */ - text?: string; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface OnImportEventArgs { - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the imported data. - */ - importData?: any; - } - - export interface OpenFailureEventArgs { - - /** Returns the failure type. - */ - failureType?: string; - - /** Returns the status index. - */ - status?: number; - - /** Returns the status in text. - */ - statusText?: string; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface PagerClickEventArgs { - - /** Returns the active sheet index. - */ - activeSheet?: number; - - /** Returns the new sheet index. - */ - gotoSheet?: number; - - /** Returns whether new sheet icon is clicked. - */ - newSheet?: boolean; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the target element. - */ - target?: HTMLElement; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface ResizeStartEventArgs { - - /** Returns the column index which column you start to resize. - */ - colIndex?: number; - - /** Returns the row index which row you start to resize. - */ - rowIndex?: number; - - /** Returns the Spreadsheet model. - */ - model?: any; - - /** Returns type of the request. - */ - reqType?: string; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface ResizeEndEventArgs { - - /** Returns the column index which you resized. - */ - colIndex?: number; - - /** Returns old width of the column or shape. - */ - oldWidth?: number; - - /** Returns new width of the column or shape. - */ - newWidth?: number; - - /** Returns the row index which you resized. - */ - rowIndex?: number; - - /** Returns old height of the row or shape. - */ - oldHeight?: number; - - /** Returns new height of the row or shape. - */ - newHeight?: number; - - /** Returns the Spreadsheet model. - */ - model?: any; - - /** Returns type of the request. - */ - reqType?: string; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface RibbonClickEventArgs { - - /** Returns element Id. - */ - Id?: string; - - /** Returns target information. - */ - prop?: any; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns status. - */ - status?: boolean; - - /** Returns isChecked in boolean. - */ - isChecked?: boolean; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the target element. - */ - target?: HTMLElement; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface SeriesRenderingEventArgs { - - /** Returns chart data and chart information. - */ - data?: any; - - /** Returns the chart model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface TabClickEventArgs { - - /** Returns the active tab index. - */ - activeIndex?: number; - - /** Returns active tab header element. - */ - activeHeader?: any; - - /** Returns previous active tab header element. - */ - prevActiveHeader?: any; - - /** Returns previous active tab index. - */ - prevActiveIndex?: number; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the target element. - */ - target?: HTMLElement; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface TabSelectEventArgs { - - /** Returns the active tab index. - */ - activeIndex?: number; - - /** Returns active tab header element. - */ - activeHeader?: any; - - /** Returns previous active tab header element. - */ - prevActiveHeader?: any; - - /** Returns previous active tab index. - */ - prevActiveIndex?: number; - - /** Returns the Spreadsheet model. - */ - model?: ej.Spreadsheet.Model; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the target element. - */ - target?: HTMLElement; - - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface AutoFillSettings { - - /** This property is used to set fillType unit in Spreadsheet. It has five types which are CopyCells, FillSeries, FillFormattingOnly, FillWithoutFormatting and FlashFill. - * @Default {ej.Spreadsheet.AutoFillOptions.FillSeries} - */ - fillType?: ej.Spreadsheet.AutoFillOptions | string; - - /** Gets or sets a value that indicates to enable or disable auto fill options in the Spreadsheet. - * @Default {true} - */ - showFillOptions?: boolean; - } - - export interface ChartSettings { - - /** Gets or sets a value that defines the chart height in Spreadsheet. - * @Default {220} - */ - height?: number; - - /** Gets or sets a value that defines the chart width in the Spreadsheet. - * @Default {440} - */ - width?: number; - } - - export interface ExportSettings { - - /** Gets or sets a value that indicates whether to enable or disable save feature in Spreadsheet. By enabling this feature, you can save existing Spreadsheet. - * @Default {true} - */ - allowExporting?: boolean; - - /** Gets or sets a value that indicates to define csvUrl for export to CSV format. - * @Default {null} - */ - csvUrl?: string; - - /** Gets or sets a value that indicates to define excelUrl for export to excel format. - * @Default {null} - */ - excelUrl?: string; - - /** Gets or sets a value that indicates to define password while export to excel format. - * @Default {null} - */ - password?: string; - - /** Gets or sets a value that indicates to define pdfUrl for export to PDF format. - * @Default {null} - */ - pdfUrl?: string; - } - - export interface FormatSettings { - - /** Gets or sets a value that indicates whether to enable or disable cell border feature in the Spreadsheet. - * @Default {true} - */ - allowCellBorder?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable decimal places in the Spreadsheet. - * @Default {true} - */ - allowDecimalPlaces?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable font family feature in Spreadsheet. - * @Default {true} - */ - allowFontFamily?: boolean; - } - - export interface ImportSettings { - - /** Sets import mapper to perform import feature in Spreadsheet. - */ - importMapper?: string; - - /** Gets or sets a value that indicates whether to enable or disable import while initial loading. - * @Default {false} - */ - importOnLoad?: boolean; - - /** Sets import URL to access the online files in the Spreadsheet. - */ - importUrl?: string; - - /** Gets or sets a value that indicates to define password while importing in the Spreadsheet. - */ - password?: string; - } - - export interface PictureSettings { - - /** Gets or sets a value that indicates whether to enable or disable picture feature in Spreadsheet. By enabling this, you can add pictures in Spreadsheet. - * @Default {true} - */ - allowPictures?: boolean; - - /** Gets or sets a value that indicates to define height to picture in the Spreadsheet. - * @Default {220} - */ - height?: number; - - /** Gets or sets a value that indicates to define width to picture in the Spreadsheet. - * @Default {440} - */ - width?: number; - } - - export interface PrintSettings { - - /** Gets or sets a value that indicates whether to enable or disable page setup support for printing in Spreadsheet. - * @Default {true} - */ - allowPageSetup?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable page size support for printing in Spreadsheet. - * @Default {false} - */ - allowPageSize?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable print feature in the Spreadsheet. - * @Default {true} - */ - allowPrinting?: boolean; - } - - export interface RibbonSettingsApplicationTabMenuSettings { - - /** Gets or sets a value that indicates whether to enable or disable isAppend property in ribbon settings. - * @Default {false} - */ - isAppend?: boolean; - - /** Specifies the data source to append in application tab. - * @Default {[]} - */ - dataSource?: any[]; - } - - export interface RibbonSettingsApplicationTab { - - /** Gets or sets a value that indicates to set application tab type in Spreadsheet. It has two types, Menu and Backstage. - * @Default {ej.Ribbon.ApplicationTabType.Backstage} - */ - type?: ej.Ribbon.ApplicationTabType | string; - - /** Gets or sets an object that indicates menu settings for application tab in Spreadsheet. - */ - menuSettings?: RibbonSettingsApplicationTabMenuSettings; - } - - export interface RibbonSettings { - - /** Gets or sets an object that indicates application tab settings in Spreadsheet. - */ - applicationTab?: RibbonSettingsApplicationTab; - } - - export interface ScrollSettings { - - /** Gets or sets a value that indicates whether to enable or disable scrolling in Spreadsheet. - * @Default {true} - */ - allowScrolling?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable sheet on demand. By enabling this, it render only the active sheet element while paging remaining sheets are created one by one. - * @Default {false} - */ - allowSheetOnDemand?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable virtual scrolling feature in the Spreadsheet. - * @Default {true} - */ - allowVirtualScrolling?: boolean; - - /** Gets or sets the value that indicates to define the height of spreadsheet. - * @Default {100%} - */ - height?: number | string; - - /** Gets or sets the value that indicates whether to enable or disable responsive mode in the Spreadsheet. - * @Default {true} - */ - isResponsive?: boolean; - - /** Gets or sets a value that indicates to set scroll mode in Spreadsheet. It has two scroll modes, Normal and Infinite. - * @Default {ej.Spreadsheet.scrollMode.Infinite} - */ - scrollMode?: ej.Spreadsheet.scrollMode | string; - - /** Gets or sets the value that indicates to define the height of the spreadsheet. - * @Default {100%} - */ - width?: number | string; - } - - export interface SelectionSettings { - - /** Gets or sets a value that indicates to define active cell in spreadsheet. - */ - activeCell?: string; - - /** Gets or sets a value that indicates to define animation time while selection in the Spreadsheet. - * @Default {0.001} - */ - animationTime?: number; - - /** Gets or sets a value that indicates to enable or disable animation while selection. - * @Default {false} - */ - enableAnimation?: boolean; - - /** Gets or sets a value that indicates to set selection type in Spreadsheet. It has three types which are Column, Row and Default. - * @Default {ej.Spreadsheet.SelectionType.Default} - */ - selectionType?: ej.Spreadsheet.SelectionType | string; - - /** Gets or sets a value that indicates to set selection unit in Spreadsheet. It has three types which are Single, Range and MultiRange. - * @Default {ej.Spreadsheet.SelectionUnit.MultiRange} - */ - selectionUnit?: ej.Spreadsheet.SelectionUnit | string; - } - - export interface SheetsBorder { - - /** - */ - type?: ej.Spreadsheet.BorderType | string; - - /** Specifies border color for range of cells in Spreadsheet. - */ - color?: string; - - /** To apply border for the specified range of cell. - */ - range?: string; - } - - export interface SheetsCFormatRule { - - /** Specifies the conditions to apply for the range of cells in Spreadsheet. - */ - action?: ej.Spreadsheet.CFormatRule | string; - - /** Specifies the color to apply for the range of cell while conditional formatting. - */ - color?: ej.Spreadsheet.CFormatHighlightColor | string; - - /** Specifies the inputs for conditional formatting in Spreadsheet. - * @Default {[]} - */ - inputs?: any[]; - - /** Specifies the range for conditional formatting in Spreadsheet. - */ - range?: string; - } - - export interface SheetsRangeSetting { - - /** Gets or sets the data to render the Spreadsheet. - * @Default {null} - */ - dataSource?: any; - - /** Specifies the header styles for the headers in datasource range. - * @Default {null} - */ - headerStyles?: any; - - /** Specifies the primary key for the datasource in Spreadsheet. - */ - primaryKey?: string; - - /** Specifies the query for the datasource in Spreadsheet. - * @Default {null} - */ - query?: any; - - /** Gets or sets a value that indicates whether to enable or disable the datasource header in Spreadsheet. - * @Default {true} - */ - showHeader?: boolean; - - /** Specifies the start cell for the datasource range in Spreadsheet. - * @Default {A1} - */ - startCell?: string; - } - - export interface SheetsRowsCellsComment { - - /** Get or sets the value that indicates whether to show or hide comments in Spreadsheet. - * @Default {false} - */ - isVisible?: boolean; - - /** Specifies the value for the comment in Spreadsheet. - */ - value?: string; - } - - export interface SheetsRowsCellsFormat { - - /** Specifies the number of decimal places for the given input. - * @Default {2} - */ - decimalPlaces?: number; - - /** Specifies the string format for the given input. - */ - formatStr?: string; - - /** Specifies the thousand separator for the given input. - * @Default {false} - */ - thousandSeparator?: boolean; - - /** Specifies the type of the format in Spreadsheet. - */ - type?: string; - } - - export interface SheetsRowsCellsHyperlink { - - /** Specifies the web address for the hyperlink of a cell. - */ - webAddr?: string; - - /** Specifies the cell address for the hyperlink of a cell. - */ - cellAddr?: string; - - /** Specifies the sheet index to which the cell is referred. - * @Default {1} - */ - sheetIndex?: number; - } - - export interface SheetsRowsCellsStyle { - - /** Specifies the background color of a cell in the Spreadsheet. - */ - backgroundColor?: string; - - /** Specifies the font color of a cell in the Spreadsheet. - */ - color?: string; - - /** Specifies the font weight of a cell in the Spreadsheet. - */ - fontWeight?: string; - } - - export interface SheetsRowsCell { - - /** Specifies the comment for a cell in Spreadsheet. - * @Default {null} - */ - comment?: SheetsRowsCellsComment; - - /** Specifies the format of a cell in Spreadsheet. - * @Default {null} - */ - format?: SheetsRowsCellsFormat; - - /** Specifies the hyperlink for a cell in Spreadsheet. - * @Default {null} - */ - hyperlink?: SheetsRowsCellsHyperlink; - - /** Specifies the index of a cell in Spreadsheet. - * @Default {0} - */ - index?: number; - - /** Specifies whether to lock or unlock a particular cell. - * @Default {false} - */ - isLocked?: boolean; - - /** Specifies the styles of a cell in Spreadsheet. - * @Default {null} - */ - style?: SheetsRowsCellsStyle; - - /** Specifies the value for a cell in Spreadsheet. - */ - value?: string; - } - - export interface SheetsRow { - - /** Gets or sets the height of a row in Spreadsheet. - * @Default {20} - */ - height?: number; - - /** Specifies the cells of a row in Spreadsheet. - * @Default {[]} - */ - cells?: SheetsRowsCell[]; - - /** Gets or sets the index of a row in Spreadsheet. - * @Default {0} - */ - index?: number; - } - - export interface Sheet { - - /** Specifies the border for the cell in the Spreadsheet. - * @Default {[]} - */ - border?: SheetsBorder[]; - - /** Specifies the cell types for a cell or range in Spreadsheet. - * @Default {[]} - */ - cellTypes?: any[]; - - /** Specifies the conditional formatting for the range of cell in Spreadsheet. - * @Default {[]} - */ - cFormatRule?: SheetsCFormatRule[]; - - /** Gets or sets a value that indicates to define column count in the Spreadsheet. - * @Default {21} - */ - colCount?: number; - - /** Gets or sets a value that indicates to define column width in the Spreadsheet. - * @Default {64} - */ - columnWidth?: number; - - /** Gets or sets the data to render the Spreadsheet. - * @Default {null} - */ - dataSource?: any; - - /** Gets or sets a value that indicates whether to enable or disable field as column header in the Spreadsheet. - * @Default {false} - */ - fieldAsColumnHeader?: boolean; - - /** Gets or sets a value to freeze rows in the Spreadsheet. - * @Default {0} - */ - frozenRows?: number; - - /** Gets or sets a value to freeze columns in the Spreadsheet. - * @Default {0} - */ - frozenColumns?: number; - - /** Specifies the header styles for the headers in datasource range. - * @Default {null} - */ - headerStyles?: any; - - /** To hide the specified columns in Spreadsheet. - * @Default {[]} - */ - hideColumns?: any[]; - - /** To hide the specified rows in Spreadsheet. - * @Default {[]} - */ - hideRows?: any[]; - - /** To merge specified ranges in Spreadsheet. - * @Default {[]} - */ - mergeCells?: any[]; - - /** Specifies the primary key for the datasource in Spreadsheet. - */ - primaryKey?: string; - - /** Specifies the query for the dataSource in Spreadsheet. - * @Default {null} - */ - query?: any; - - /** Specifies single range or multiple range settings for a sheet in Spreadsheet. - * @Default {[]} - */ - rangeSettings?: SheetsRangeSetting[]; - - /** Gets or sets a value that indicates to define row count in the Spreadsheet. - * @Default {20} - */ - rowCount?: number; - - /** Specifies the rows for a sheet in Spreadsheet. - * @Default {[]} - */ - rows?: SheetsRow[]; - - /** Gets or sets a value that indicates whether to show or hide grid lines in the Spreadsheet. - * @Default {true} - */ - showGridlines?: boolean; - - /** Gets or sets a value that indicates whether to enable or disable the datasource header in Spreadsheet. - * @Default {true} - */ - showHeader?: boolean; - - /** Gets or sets a value that indicates whether to show or hide headings in the Spreadsheet. - * @Default {true} - */ - showHeadings?: boolean; - - /** Specifies the start cell for the datasource range in Spreadsheet. - * @Default {A1} - */ - startCell?: string; - } - - enum AutoFillOptions { - - ///Specifies the CopyCells property in AutoFillOptions. - CopyCells, - - ///Specifies the FillSeries property in AutoFillOptions. - FillSeries, - - ///Specifies the FillFormattingOnly property in AutoFillOptions. - FillFormattingOnly, - - ///Specifies the FillWithoutFormatting property in AutoFillOptions. - FillWithoutFormatting, - - ///Specifies the FlashFill property in AutoFillOptions. - FlashFill - } - - - enum scrollMode { - - ///To enable Infinite scroll mode for Spreadsheet. - Infinite, - - ///To enable Normal scroll mode for Spreadsheet. - Normal - } - - - enum SelectionType { - - ///To select only Column in Spreadsheet. - Column, - - ///To select only Row in Spreadsheet. - Row, - - ///To select both Column/Row in Spreadsheet. - Default - } - - - enum SelectionUnit { - - ///To enable Single selection in Spreadsheet - Single, - - ///To enable Range selection in Spreadsheet - Range, - - ///To enable MultiRange selection in Spreadsheet - MultiRange - } - - - enum BorderType { - - ///To apply top border for the given range of cell. - Top, - - ///To apply left border for the given range of cell. - Left, - - ///To apply right border for the given range of cell. - Right, - - ///To apply bottom border for the given range of cell. - Bottom, - - ///To apply outside border for the given range of cell. - OutSide, - - ///To apply all border for the given range of cell. - AllBorder, - - ///To apply thick box border for the given range of cell. - ThickBox, - - ///To apply thick bottom border for the given range of cell. - ThickBottom, - - ///To apply top and bottom border for the given range of cell. - TopandBottom, - - ///To apply top and thick bottom border for the given range of cell. - TopandThickBottom - } - - - enum CFormatRule { - - ///To identify greater than values in the given range of cells. - GreaterThan, - - ///To identify less than values in the given range of cells. - LessThan, - - ///To identify in between values in the given range of cells. - Between, - - ///To identify the equal values in the given range of cells. - EqualTo, - - ///To identify the specified text in the range of cells. - TextContains, - - ///To identify the specified date in the range of cells. - DateOccurs - } - - - enum CFormatHighlightColor { - - ///Highlights red with dark red text color. - RedFillwithDarkRedText, - - ///Highlights yellow with dark yellow text color. - YellowFillwithDarkYellowText, - - ///Highlights green with dark green text color. - GreenFillwithDarkGreenText, - - ///Highlights with red fill. - RedFill, - - ///Highlights with red text. - RedText - } - - - enum ChartProperties { - - ///Specifies to make the data label center of the chart. - DataLabelCenter, - - ///Specifies to make the data label inside base of the chart. - DataLabelInsideBase, - - ///Specifies to make the data label inside end of the chart. - DataLabelInsideEnd, - - ///Specifies to make the data label none of the chart. - DataLabelNone, - - ///Specifies to make the data label outside end of the chart. - DataLabelOutsideEnd, - - ///Specifies to make the legends to bottom of the chart. - LegendsBottom, - - ///Specifies to make the legends to left of the chart. - LegendsLeft, - - ///Specifies to make the legends to none of the chart. - LegendsNone, - - ///Specifies to make the legends to right of the chart. - LegendsRight, - - ///Specifies to make the legends to top of the chart. - LegendsTop, - - ///To set the primary horizontal of the chart. - PrimaryHorizontal, - - ///To set the primary horizontal axis title of the chart. - PrimaryHorizontalAxisTitle, - - ///To set the primary major horizontal of the chart. - PrimaryMajorHorizontal, - - ///To set the primary major vertical of the chart. - PrimaryMajorVertical, - - ///To set the primary minor horizontal of the chart. - PrimaryMinorHorizontal, - - ///To set the primary minor vertical of the chart. - PrimaryMinorVertical, - - ///To set the primary vertical of the chart. - PrimaryVertical, - - ///To set the primary vertical axis title of the chart. - PrimaryVerticalAxisTitle, - - ///Specifies to make the title to center of the chart. - TitleCenter, - - ///Specifies to make the title to far of the chart. - TitleFar, - - ///Specifies to make the title to near of the chart. - TitleNear, - - ///Specifies to make the title to none of the chart. - TitleNone - } - - } - - class PdfViewer extends ej.Widget { - static fn: PdfViewer; - constructor(element: JQuery | Element, options?: PdfViewer.Model); - static Locale: any; - model: PdfViewer.Model; - defaults: PdfViewer.Model; - - /** Loads the document with the filename and displays it in PDF viewer. - * @param {string} File name to be loaded - * @returns {void} - */ - load(fileName: string): void; - - /** Shows/hides the toolbar in the PDF viewer. - * @param {boolean} shows/hides the toolbar - * @returns {void} - */ - showToolbar(show: boolean): void; - - /** Prints the PDF document. - * @returns {void} - */ - print(): void; - - /** Abort the printing function and restores the PDF viewer. - * @returns {void} - */ - abortPrint(): void; - - /** Shows/hides the print icon in the toolbar. - * @param {boolean} shows/hides print button in the toolbar - * @returns {void} - */ - showPrintTools(show: boolean): void; - - /** Downloads the PDF document being loaded in the ejPdfViewer control. - * @returns {void} - */ - download(): void; - - /** Shows/hides the download tool in the toolbar. - * @param {boolean} shows/hides download button in the toolbar - * @returns {void} - */ - showDownloadTool(show: boolean): void; - - /** Shows/hides the page navigation tools in the toolbar - * @param {boolean} shows/hides navigation tools in the toolbar - * @returns {void} - */ - showPageNavigationTools(show: boolean): void; - - /** Navigates to the specific page in the PDF document. If the page is not available for the given pageNumber, PDF viewer retains the existing page in view. - * @param {number} navigates to the page number in the PDF document - * @returns {void} - */ - goToPage(pageNumber: number): void; - - /** Navigates to the last page of the PDF document. - * @returns {void} - */ - goToLastPage(): void; - - /** Navigates to the first page of PDF document. - * @returns {void} - */ - goToFirstPage(): void; - - /** Navigates to the next page of the PDF document. - * @returns {void} - */ - goToNextPage(): void; - - /** Navigates to the previous page of the PDF document. - * @returns {void} - */ - goToPreviousPage(): void; - - /** Shows/hides the zoom tools in the toolbar. - * @param {boolean} shows/hides zoom tools in the toolbar - * @returns {void} - */ - showMagnificationTools(show: boolean): void; - - /** Scales the page to fit the page in the container in the control. - * @returns {void} - */ - fitToPage(): void; - - /** Scales the page to fit the page width to the width of the container in the control. - * @returns {void} - */ - fitToWidth(): void; - - /** Magnifies the page to the next value in the zoom drop down list. - * @returns {void} - */ - zoomIn(): void; - - /** Shrinks the page to the previous value in the magnification in the drop down list. - * @returns {void} - */ - zoomOut(): void; - - /** Scales the page to the specified percentage ranging from 50 to 400. If the given zoomValue is less than 50 or greater than 400; the PDF viewer scales the page to 50 and 400 respectively. - * @param {number} zoom value for scaling the pages in the PDF Viewer - * @returns {void} - */ - zoomTo(zoomValue: number): void; - - /** Unloads the PDF document being displayed in the PDF viewer. - * @returns {void} - */ - unload(): void; - } - export namespace PdfViewer { - - export interface Model { - - /** Specifies the locale information of the PDF viewer. - */ - locale?: string; - - /** Specifies the toolbar settings. - */ - toolbarSettings?: ToolbarSettings; - - /** Specifies the name of the action method in the server. - */ - serverActionSettings?: ServerActionSettings; - - /** Sets the PDF Web API service URL - */ - serviceUrl?: string; - - /** Sets the PDF document path for initial loading. - */ - documentPath?: string; - - /** Gets the total number of pages in PDF document. - */ - pageCount?: number; - - /** Gets the number of the page being displayed in the PDF viewer. - */ - currentPageNumber?: number; - - /** Gets the current zoom percentage of the PDF document in viewer. - */ - zoomPercentage?: number; - - /** Specifies the location of the supporting PDF service - */ - pdfService?: ej.PdfViewer.PdfService | string; - - /** Specifies the open state of the hyperlink in the PDF document. - */ - hyperlinkOpenState?: ej.PdfViewer.LinkTarget | string; - - /** Enables or disables the hyperlinks in PDF document. - */ - enableHyperlink?: boolean; - - /** Enables or disables the text selection in PDF document. - */ - enableTextSelection?: boolean; - - /** Enables or disables the responsiveness of the PDF viewer control during the window resize. - */ - isResponsive?: boolean; - - /** Checks whether the PDF document is edited. - */ - isDocumentEdited?: boolean; - - /** Enables or disables the buffering of the PDF pages in the client side. - */ - allowClientBuffering?: boolean; - - /** Gets the name of the PDF document which loaded in the ejPdfViewer control for downloading. - */ - fileName?: string; - - /** Triggers when the PDF document gets loaded and is ready to view in the Control. */ - documentLoad?(e: DocumentLoadEventArgs): void; - - /** Triggers when the PDF document gets unloaded from the PDF viewer. */ - documentUnload?(e: DocumentUnloadEventArgs): void; - - /** Triggers when there is change in current page number. */ - pageChange?(e: PageChangeEventArgs): void; - - /** Triggers when there is change in the magnification value. */ - zoomChange?(e: ZoomChangeEventArgs): void; - - /** Triggers when hyperlink in the PDF Document is clicked */ - hyperlinkClick?(e: HyperlinkClickEventArgs): void; - - /** Triggers before the printing starts. */ - beforePrint?(e: BeforePrintEventArgs): void; - - /** Triggers after the printing is completed. */ - afterPrint?(e: AfterPrintEventArgs): void; - - /** Triggers when the mouse click is performed over the page of the PDF document. */ - pageClick?(e: PageClickEventArgs): void; - - /** Triggers when the client buffering process starts. */ - bufferStart?(e: BufferStartEventArgs): void; - - /** Triggers when the client buffering process ends. */ - bufferEnd?(e: BufferEndEventArgs): void; - - /** Triggers when PDF viewer control is destroyed successfully. */ - destroy?(e: DestroyEventArgs): void; - } - - export interface DocumentLoadEventArgs { - - /** true, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - - /** Returns the PDF document name displaying in the PDF viewer. - */ - fileName?: string; - } - - export interface DocumentUnloadEventArgs { - - /** true, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - } - - export interface PageChangeEventArgs { - - /** true, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - - /** Returns the current page number in view. - */ - currentPageNumber?: number; - } - - export interface ZoomChangeEventArgs { - - /** true, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the previous zoom percentage of the PDF viewer control - */ - previousZoomPercentage?: number; - - /** Returns the current zoom percentage of the PDF viewer control - */ - currentZoomPercentage?: number; - } - - export interface HyperlinkClickEventArgs { - - /** true, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - - /** Returns the clicked hyperlink - */ - hyperlink?: string; - } - - export interface BeforePrintEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - } - - export interface AfterPrintEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - } - - export interface PageClickEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - - /** Returns the current X position - */ - offsetX?: number; - - /** Returns the current Y position - */ - offsetY?: number; - } - - export interface BufferStartEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - - /** Specifies the state of the buffering - */ - isBuffering?: boolean; - } - - export interface BufferEndEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - - /** Specifies the state of the buffering - */ - isBuffering?: boolean; - } - - export interface DestroyEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the PDF viewer model - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - } - - export interface ToolbarSettings { - - /** Shows or hides the tooltip of the toolbar items. - */ - showToolTip?: boolean; - - /** Shows or hides the grouped items in the toolbar with the help of enum ej.PdfViewer.ToolbarItems - */ - toolbarItem?: ej.PdfViewer.ToolbarItems | string; - } - - export interface ServerActionSettings { - - /** Specifies the name of the action method used for loading the PDF document. - */ - load?: string; - - /** Specifies the name of the action method used for uploading the PDF document to the PDF viewer control. - */ - fileUpload?: string; - - /** Specifies the name of the action method used for printing the PDF document in the PDF viewer control. - */ - print?: string; - - /** Specifies the name of the action method used for downloading the PDF document from the PDF viewer control. - */ - download?: string; - } - - enum ToolbarItems { - - ///Shows only magnification tools in the toolbar. - MagnificationTools, - - ///Shows only page navigation tools in the toolbar. - PageNavigationTools, - - ///Shows only print tool in the toolbar. - PrintTools, - - ///Shows only download tool in the toolbar. - DownloadTool, - - ///Shows all the toolbar items. - All - } - - - enum PdfService { - - ///Denotes that the service is located in the local project - Local, - - ///Denotes that the service is hosted in the remote server - Remote - } - - - enum LinkTarget { - - ///Opens the hyperlink in the same tab of the browser. - Default, - - ///Opens the hyperlink in a new tab of the browser. - NewTab, - - ///Opens the hyperlink in a new window of the browser. - NewWindow - } - - } - - class SpellCheck extends ej.Widget { - static fn: SpellCheck; - constructor(element: JQuery | Element, options?: SpellCheck.Model); - static Locale: any; - model: SpellCheck.Model; - defaults: SpellCheck.Model; - - /** Open the dialog to correct the spelling of the target content. - * @returns {void} - */ - showInDialog(): void; - - /** Highlighting the error word in the target area itself and correct the spelling using the context menu. - * @returns {void} - */ - validate(): void; - - /** To get the error word highlighted string by passing the given input sentence. - * @param {string} Content to be spell check - * @param {string} Class name that contains style value to highlight the error word - * @returns {any} - */ - spellCheck(targetSentence: string, misspellWordCss: string): any; - - /** To ignore all the error word occurrences from the given input sentence. - * @param {string} Error word to ignore from the target content - * @param {string} Content to perform the ignore all operation - * @returns {any} - */ - ignoreAll(word: string, targetSentence: string): any; - - /** To ignore the error word once from the given input sentence. - * @param {string} Error word to ignore from the target content - * @param {string} Content to perform the ignore operation - * @param {number} Index of the error word present in the target content - * @returns {any} - */ - ignore(word: string, targetSentence: string, index: number): any; - - /** To change the error word once from the given input sentence. - * @param {string} Error word to change from the target content - * @param {string} Content to perform the change operation - * @param {string} Word to replace with the error word - * @param {number} Index of the error word present in the target content - * @returns {any} - */ - change(word: string, targetSentence: string, changeWord: string, index: number): any; - - /** To change all the error word occurrences from the given input sentence. - * @param {string} Error word to change from the target content - * @param {string} Content to perform the change all operation - * @param {string} Word to replace with the error word - * @returns {any} - */ - changeAll(word: string, targetSentence: string, changeWord: string): any; - - /** To add the words into the custom dictionary. - * @param {string} Word to add into the dictionary file - * @returns {any} - */ - addToDictionary(customWord: string): any; - } - export namespace SpellCheck { - - export interface Model { - - /** It includes the service method path to find the error words and its suggestions also adding the custom word into the custom dictionary. - */ - dictionarySettings?: DictionarySettings; - - /** To display the error word in a customized style. - * @Default {e-errorword} - */ - misspellWordCss?: string; - - /** Sets the specific culture to the SpellCheck. - * @Default {en-US} - */ - locale?: string; - - /** To set the maximum suggestion display count. - * @Default {6} - */ - maxSuggestionCount?: number; - - /** To ignore the words from the error word consideration. - * @Default {[]} - */ - ignoreWords?: any[]; - - /** Holds all options related to the context menu settings of SpellCheck. - */ - contextMenuSettings?: ContextMenuSettings; - - /** It helps to ignore the uppercase, mixed case words, alpha numeric words, file path and email addresses based on the property values. - */ - ignoreSettings?: IgnoreSettings; - - /** When set to true, allows the spellcheck to render based upon screen size. - * @Default {true} - */ - isResponsive?: boolean; - - /** It allows to spell check the multiple target HTML element's texts and correct its error words. - * @Default {null} - */ - controlsToValidate?: string; - - /** Triggers on the success of AJAX call request. */ - actionSuccess?(e: ActionSuccessEventArgs): void; - - /** Triggers on the AJAX call request beginning. */ - actionBegin?(e: ActionBeginEventArgs): void; - - /** Triggers when the AJAX call request failure. */ - actionFailure?(e: ActionFailureEventArgs): void; - - /** Triggers when the dialog mode spell check starting. */ - start?(e: StartEventArgs): void; - - /** Triggers when the spell check operations completed through dialog mode. */ - complete?(e: CompleteEventArgs): void; - - /** Triggers before context menu opening. */ - contextOpen?(e: ContextOpenEventArgs): void; - - /** Triggers when the context menu item clicked. */ - contextClick?(e: ContextClickEventArgs): void; - - /** Triggers before the spell check dialog opens. */ - dialogBeforeOpen?(e: DialogBeforeOpenEventArgs): void; - /** Triggers after the spell check dialog opens. */ - dialogOpen?(e: DialogOpenEventArgs): void; - - /** Triggers when the spell check dialog closed. */ - dialogClose?(e: DialogCloseEventArgs): void; - - /** Triggers when the spell check control performing the spell check operations such as ignore, ignoreAll, change, changeAll and addToDictionary. */ - validating?(e: ValidatingEventArgs): void; - - /** Triggers before loading the target HTML element text into the dialog sentence area. */ - targetUpdating?(e: TargetUpdatingEventArgs): void; - } - - export interface ActionSuccessEventArgs { - - /** Returns the error word highlighted string. - */ - resultHTML?: string; - - /** Returns the error word details of the given input. - */ - errorWordDetails?: any; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface ActionBeginEventArgs { - - /** Returns the input string. - */ - targetSentence?: string; - - /** Returns the misspellWordCss class name. - */ - misspellWordCss?: string; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface ActionFailureEventArgs { - - /** Returns AJAX request failure error message. - */ - errorMessage?: string; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface StartEventArgs { - - /** Returns the input string. - */ - targetSentence?: string; - - /** Returns the error words details. - */ - errorWords?: any; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface CompleteEventArgs { - - /** Returns the error word highlighted string. - */ - resultHTML?: string; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface ContextOpenEventArgs { - - /** Returns the selected error word. - */ - selectedErrorWord?: string; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface ContextClickEventArgs { - - /** Returns the selected error word. - */ - selectedValue?: string; - - /** Returns the selected option in the context menu. - */ - selectedOption?: string; - - /** Returns the input string. - */ - targetContent?: string; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface DialogBeforeOpenEventArgs { - - /** Returns the spell check window details. - */ - spellCheckDialog?: any; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface DialogOpenEventArgs { - - /** Returns the target input. - */ - targetText?: string; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface DialogCloseEventArgs { - - /** Returns the error corrected string. - */ - updatedText?: string; - - /** Returns the request type value. - */ - requestType?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface ValidatingEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the error word to ignore. - */ - ignoreWord?: string; - - /** Returns the target content. - */ - targetContent?: string; - - /** Returns the index of an error word. - */ - index?: number; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the validating request type. - */ - requestType?: string; - - /** Returns the name of the event. - */ - type?: string; - - /** Returns the error word to change. - */ - changeableWord?: string; - - /** Returns the change word to replace the error word. - */ - changeWord?: string; - - /** Returns the custom word to add into dictionary file. - */ - customWord?: string; - } - - export interface TargetUpdatingEventArgs { - - /** Returns the previous target element value. - */ - previousElement?: any; - - /** Returns the current target element value. - */ - currentElement?: any; - - /** Returns the target html value. - */ - targetHtml?: string; - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the SpellCheck model. - */ - model?: ej.SpellCheck.Model; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface DictionarySettings { - - /** The dictionaryUrl option accepts string, which is the method path to find the error words and get the suggestions to correct the errors. - */ - dictionaryUrl?: string; - - /** The customDictionaryUrl option accepts string, which is the method path to add the error word into the custom dictionary. - */ - customDictionaryUrl?: string; - } - - export interface ContextMenuSettings { - - /** When set to true, enables the context menu options available for the SpellCheck. - * @Default {true} - */ - enable?: boolean; - - /** Contains all the default context menu options that are applicable for SpellCheck. It also supports adding custom menu items. - * All the SpellCheck related context menu items are grouped under this menu collection. - * @Default {{% highlight javascript %}[{ id: IgnoreAll, text: Ignore All },{ id: AddToDictionary, text: Add To Dictionary }]{% endhighlight %}} - */ - menuItems?: any[]; - } - - export interface IgnoreSettings { - - /** When set to true, ignoring the alphanumeric words from the error word consideration. - * @Default {true} - */ - ignoreAlphaNumericWords?: string; - - /** When set to true, ignoring the Email address from the error word consideration. - * @Default {true} - */ - ignoreEmailAddress?: boolean; - - /** When set to true, ignoring the MixedCase words from the error word consideration. - * @Default {true} - */ - ignoreMixedCaseWords?: boolean; - - /** When set to true, ignoring the UpperCase words from the error word consideration. - * @Default {true} - */ - ignoreUpperCase?: boolean; - - /** When set to true, ignoring the Url from the error word consideration. - * @Default {true} - */ - ignoreUrl?: boolean; - - /** When set to true, ignoring the file address path from the error word consideration. - * @Default {true} - */ - ignoreFileNames?: boolean; - } - } - - class DocumentEditor extends ej.Widget { - static fn: DocumentEditor; - constructor(element: JQuery | Element, options?: DocumentEditor.Model); - static Locale: any; - model: DocumentEditor.Model; - defaults: DocumentEditor.Model; - - /** Loads the document from specified path using web API provided by importUrl. - * @param {string} Specifies the file path. - * @returns {void} - */ - load(path: string): void; - - /** Gets the page number of current selection in the document. - * @returns {number} - */ - getCurrentPageNumber(): number; - - /** Gets the total number of pages in the document. - * @returns {number} - */ - getPageCount(): number; - - /** Gets the text of current selection in the document. - * @returns {string} - */ - getSelectedText(): string; - - /** Gets the current zoom factor value of the document editor. - * @returns {number} - */ - getZoomFactor(): number; - - /** Scales the document editor with the specified zoom factor. The range of zoom factor should be 0.10 to 5.00 (10 - 500 %). - * @param {number} Specifies the factor for zooming. - * @returns {void} - */ - setZoomFactor(factor: number): void; - - /** Prints the document content as page by page. - * @returns {void} - */ - print(): void; - - /** Finds the first occurrence of specified text from current selection and highlights the result. If the document end is reached, find operation will occur from the document start position. - * @param {string} Specifies the text to search in a document. - * @returns {void} - */ - find(text: string): void; - } - export namespace DocumentEditor { - - export interface Model { - - /** Gets or sets an object that indicates initialization of importing and exporting documents in document editor. - */ - importExportSettings?: ImportExportSettings; - - /** Triggers when the document changes. */ - onDocumentChange?(e: OnDocumentChangeEventArgs): void; - - /** Triggers when the selection changes. */ - onSelectionChange?(e: OnSelectionChangeEventArgs): void; - - /** Triggers when the zoom factor changes. */ - onZoomFactorChange?(e: OnZoomFactorChangeEventArgs): void; - - /** Triggers when the hyperlink is clicked. */ - onRequestNavigate?(e: OnRequestNavigateEventArgs): void; - } - - export interface OnDocumentChangeEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the document editor model. - */ - model?: any; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface OnSelectionChangeEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the document editor model. - */ - model?: any; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface OnZoomFactorChangeEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the document editor model. - */ - model?: any; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface OnRequestNavigateEventArgs { - - /** true, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the document editor model. - */ - model?: any; - - /** Returns the link type and navigation link. - */ - hyperlink?: any; - - /** Returns the name of the event. - */ - type?: string; - } - - export interface ImportExportSettings { - - /** Gets or sets URL of Web API that should be used to parse the document while loading. - */ - importUrl?: string; - } - } + /** Gets or sets URL of Web API that should be used to parse the document while loading. + */ + importUrl?: string; + } + } } declare namespace ej.datavisualization { + class SymbolPalette extends ej.Widget { + static fn: SymbolPalette; + constructor(element: JQuery | Element, options?: SymbolPalette.Model); + static Locale: any; + model: SymbolPalette.Model; + defaults: SymbolPalette.Model; + + /** Add items to Palettes at runtime + * @param {string} name of the Palette + * @param {any} JSON for the new items to added in Palette + * @returns {void} + */ + addPaletteItem(paletteName: string, node: any): void; + + /** Remove items to Palettes at runtime + * @param {string} name of the Palette + * @param {any} JSON for the new node to removed in Palette + * @returns {void} + */ + removePaletteItem(paletteName: string, node: any): void; + } + export namespace SymbolPalette { + + export interface Model { + + /** Defines whether the symbols can be dragged from palette or not + * @Default {true} + */ + allowDrag?: boolean; + + /** Customizes the style of the symbol palette + * @Default {e-symbolpalette} + */ + cssClass?: string; + + /** Defines the default properties of nodes and connectors + */ + defaultSettings?: DefaultSettings; + + /** Sets the Id of the diagram, over which the symbols will be dropped + * @Default {null} + */ + diagramId?: string; + + /** Sets the height of the palette headers + * @Default {30} + */ + headerHeight?: number; + + /** Defines the height of the symbol palette + * @Default {400} + */ + height?: number; + + /** Defines the height of the palette items + * @Default {50} + */ + paletteItemHeight?: number; + + /** Defines the width of the palette items + * @Default {50} + */ + paletteItemWidth?: number; + + /** An array of JSON objects, where each object represents a node/connector + * @Default {[]} + */ + palettes?: Palette[]; + + /** Defines the preview height of the symbols + * @Default {100} + */ + previewHeight?: number; + + /** Defines the offset value to be left between the mouse cursor and symbol previews + * @Default {(110, 110)} + */ + previewOffset?: any; + + /** Defines the width of the symbol previews + * @Default {100} + */ + previewWidth?: number; + + /** Enable or disable the palette item text + * @Default {true} + */ + showPaletteItemText?: boolean; + + /** The width of the palette + * @Default {250} + */ + width?: number; + + /** Triggers when a palette item is selected or unselected + */ + selectionChange?(e: SelectionChangeEventArgs): void; + } + + export interface SelectionChangeEventArgs { + + /** returns whether an element is selected or unselected + */ + changeType?: string; + + /** returns the node or connector that is selected or unselected + */ + element?: any; + } + + export interface DefaultSettings { + + /** Defines the default properties of the nodes + * @Default {null} + */ + node?: any; + + /** Defines the default properties of the connectors + * @Default {null} + */ + connector?: any; + } + + export interface Palette { + + /** Defines the name of the palette + * @Default {null} + */ + name?: string; + + /** Defines whether the palette must be in expanded state or in collapsed state + * @Default {true} + */ + expanded?: boolean; + + /** Defines the palette items + * @Default {[]} + */ + items?: any[]; + } + } + + class LinearGauge extends ej.Widget { + static fn: LinearGauge; + constructor(element: JQuery | Element, options?: LinearGauge.Model); + static Locale: any; + model: LinearGauge.Model; + defaults: LinearGauge.Model; + + /** destroy the linear gauge all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To export Image + * @returns {void} + */ + exportImage(): void; + + /** To get Bar Distance From Scale in number + * @returns {any} + */ + getBarDistanceFromScale(): any; + + /** To get Bar Pointer Value in number + * @returns {any} + */ + getBarPointerValue(): any; + + /** To get Bar Width in number + * @returns {any} + */ + getBarWidth(): any; + + /** To get CustomLabel Angle in number + * @returns {any} + */ + getCustomLabelAngle(): any; + + /** To get CustomLabel Value in string + * @returns {any} + */ + getCustomLabelValue(): any; + + /** To get Label Angle in number + * @returns {any} + */ + getLabelAngle(): any; + + /** To get LabelPlacement in number + * @returns {any} + */ + getLabelPlacement(): any; + + /** To get LabelStyle in number + * @returns {any} + */ + getLabelStyle(): any; + + /** To get Label XDistance From Scale in number + * @returns {any} + */ + getLabelXDistanceFromScale(): any; + + /** To get PointerValue in number + * @returns {any} + */ + getLabelYDistanceFromScale(): any; + + /** To get Major Interval Value in number + * @returns {any} + */ + getMajorIntervalValue(): any; + + /** To get MarkerStyle in number + * @returns {any} + */ + getMarkerStyle(): any; + + /** To get Maximum Value in number + * @returns {any} + */ + getMaximumValue(): any; + + /** To get PointerValue in number + * @returns {any} + */ + getMinimumValue(): any; + + /** To get Minor Interval Value in number + * @returns {any} + */ + getMinorIntervalValue(): any; + + /** To get Pointer Distance From Scale in number + * @returns {any} + */ + getPointerDistanceFromScale(): any; + + /** To get PointerHeight in number + * @returns {any} + */ + getPointerHeight(): any; + + /** To get Pointer Placement in String + * @returns {any} + */ + getPointerPlacement(): any; + + /** To get PointerValue in number + * @returns {any} + */ + getPointerValue(): any; + + /** To get PointerWidth in number + * @returns {any} + */ + getPointerWidth(): any; + + /** To get Range Border Width in number + * @returns {any} + */ + getRangeBorderWidth(): any; + + /** To get Range Distance From Scale in number + * @returns {any} + */ + getRangeDistanceFromScale(): any; + + /** To get Range End Value in number + * @returns {any} + */ + getRangeEndValue(): any; + + /** To get Range End Width in number + * @returns {any} + */ + getRangeEndWidth(): any; + + /** To get Range Position in number + * @returns {any} + */ + getRangePosition(): any; + + /** To get Range Start Value in number + * @returns {any} + */ + getRangeStartValue(): any; + + /** To get Range Start Width in number + * @returns {any} + */ + getRangeStartWidth(): any; + + /** To get ScaleBarLength in number + * @returns {any} + */ + getScaleBarLength(): any; + + /** To get Scale Bar Size in number + * @returns {any} + */ + getScaleBarSize(): any; + + /** To get Scale Border Width in number + * @returns {any} + */ + getScaleBorderWidth(): any; + + /** To get Scale Direction in number + * @returns {any} + */ + getScaleDirection(): any; + + /** To get Scale Location in object + * @returns {any} + */ + getScaleLocation(): any; + + /** To get Scale Style in string + * @returns {any} + */ + getScaleStyle(): any; + + /** To get Tick Angle in number + * @returns {any} + */ + getTickAngle(): any; + + /** To get Tick Height in number + * @returns {any} + */ + getTickHeight(): any; + + /** To get getTickPlacement in number + * @returns {any} + */ + getTickPlacement(): any; + + /** To get Tick Style in string + * @returns {any} + */ + getTickStyle(): any; + + /** To get Tick Width in number + * @returns {any} + */ + getTickWidth(): any; + + /** To get get Tick XDistance From Scale in number + * @returns {any} + */ + getTickXDistanceFromScale(): any; + + /** To get Tick YDistance From Scale in number + * @returns {any} + */ + getTickYDistanceFromScale(): any; + + /** Specifies the scales. + * @returns {void} + */ + scales(): void; + + /** To set setBarDistanceFromScale + * @returns {void} + */ + setBarDistanceFromScale(): void; + + /** To set setBarPointerValue + * @returns {void} + */ + setBarPointerValue(): void; + + /** To set setBarWidth + * @returns {void} + */ + setBarWidth(): void; + + /** To set setCustomLabelAngle + * @returns {void} + */ + setCustomLabelAngle(): void; + + /** To set setCustomLabelValue + * @returns {void} + */ + setCustomLabelValue(): void; + + /** To set setLabelAngle + * @returns {void} + */ + setLabelAngle(): void; + + /** To set setLabelPlacement + * @returns {void} + */ + setLabelPlacement(): void; + + /** To set setLabelStyle + * @returns {void} + */ + setLabelStyle(): void; + + /** To set setLabelXDistanceFromScale + * @returns {void} + */ + setLabelXDistanceFromScale(): void; + + /** To set setLabelYDistanceFromScale + * @returns {void} + */ + setLabelYDistanceFromScale(): void; + + /** To set setMajorIntervalValue + * @returns {void} + */ + setMajorIntervalValue(): void; + + /** To set setMarkerStyle + * @returns {void} + */ + setMarkerStyle(): void; + + /** To set setMaximumValue + * @returns {void} + */ + setMaximumValue(): void; + + /** To set setMinimumValue + * @returns {void} + */ + setMinimumValue(): void; + + /** To set setMinorIntervalValue + * @returns {void} + */ + setMinorIntervalValue(): void; + + /** To set setPointerDistanceFromScale + * @returns {void} + */ + setPointerDistanceFromScale(): void; + + /** To set PointerHeight + * @returns {void} + */ + setPointerHeight(): void; + + /** To set setPointerPlacement + * @returns {void} + */ + setPointerPlacement(): void; + + /** To set PointerValue + * @returns {void} + */ + setPointerValue(): void; + + /** To set PointerWidth + * @returns {void} + */ + setPointerWidth(): void; + + /** To set setRangeBorderWidth + * @returns {void} + */ + setRangeBorderWidth(): void; + + /** To set setRangeDistanceFromScale + * @returns {void} + */ + setRangeDistanceFromScale(): void; + + /** To set setRangeEndValue + * @returns {void} + */ + setRangeEndValue(): void; + + /** To set setRangeEndWidth + * @returns {void} + */ + setRangeEndWidth(): void; + + /** To set setRangePosition + * @returns {void} + */ + setRangePosition(): void; + + /** To set setRangeStartValue + * @returns {void} + */ + setRangeStartValue(): void; + + /** To set setRangeStartWidth + * @returns {void} + */ + setRangeStartWidth(): void; + + /** To set setScaleBarLength + * @returns {void} + */ + setScaleBarLength(): void; + + /** To set setScaleBarSize + * @returns {void} + */ + setScaleBarSize(): void; + + /** To set setScaleBorderWidth + * @returns {void} + */ + setScaleBorderWidth(): void; + + /** To set setScaleDirection + * @returns {void} + */ + setScaleDirection(): void; + + /** To set setScaleLocation + * @returns {void} + */ + setScaleLocation(): void; + + /** To set setScaleStyle + * @returns {void} + */ + setScaleStyle(): void; + + /** To set setTickAngle + * @returns {void} + */ + setTickAngle(): void; + + /** To set setTickHeight + * @returns {void} + */ + setTickHeight(): void; + + /** To set setTickPlacement + * @returns {void} + */ + setTickPlacement(): void; + + /** To set setTickStyle + * @returns {void} + */ + setTickStyle(): void; + + /** To set setTickWidth + * @returns {void} + */ + setTickWidth(): void; + + /** To set setTickXDistanceFromScale + * @returns {void} + */ + setTickXDistanceFromScale(): void; + + /** To set setTickYDistanceFromScale + * @returns {void} + */ + setTickYDistanceFromScale(): void; + } + export namespace LinearGauge { + + export interface Model { + + /** Specifies the animationSpeed + * @Default {500} + */ + animationSpeed?: number; + + /** Specifies the backgroundColor for Linear gauge. + * @Default {null} + */ + backgroundColor?: string; + + /** Specifies the borderColor for Linear gauge. + * @Default {null} + */ + borderColor?: string; + + /** Specifies the animate state + * @Default {true} + */ + enableAnimation?: boolean; + + /** Specifies the animate state for marker pointer + * @Default {true} + */ + enableMarkerPointerAnimation?: boolean; + + /** Specifies the can resize state. + * @Default {false} + */ + isResponsive?: boolean; + + /** Used to Convert the date object to string while using the locale settings + * @Default {false} + */ + enableGroupSeparator?: boolean; + + /** Responsiveness of the linear gauge is controlled + * @Default {false} + */ + enableResize?: boolean; + + /** Specify frame of linear gauge + * @Default {null} + */ + frame?: Frame; + + /** Specifies the height of Linear gauge. + * @Default {400} + */ + height?: number; + + /** Specifies the labelColor for Linear gauge. + * @Default {null} + */ + labelColor?: string; + + /** Set the localization culture for the Linear gauge + * @Default {en-US} + */ + locale?: string; + + /** Specifies the maximum value of Linear gauge. + * @Default {100} + */ + maximum?: number; + + /** Specifies the minimum value of Linear gauge. + * @Default {0} + */ + minimum?: number; + + /** Specifies the orientation for Linear gauge. + * @Default {Vertical} + */ + orientation?: string; + + /** Specify labelPosition value of Linear gauge See + * @Default {bottom} + */ + outerCustomLabelPosition?: ej.datavisualization.LinearGauge.OuterCustomLabelPosition|string; + + /** Specifies the pointerGradient1 for Linear gauge. + * @Default {null} + */ + pointerGradient1?: any; + + /** Specifies the pointerGradient2 for Linear gauge. + * @Default {null} + */ + pointerGradient2?: any; + + /** Specifies the read only state. + * @Default {true} + */ + readOnly?: boolean; + + /** Specifies the scales + * @Default {null} + */ + scales?: Scale[]; + + /** Specifies the theme for Linear gauge. See LinearGauge.Themes + * @Default {flatlight} + */ + theme?: ej.datavisualization.LinearGauge.Themes|string; + + /** Specifies the tick Color for Linear gauge. + * @Default {null} + */ + tickColor?: string; + + /** Specify tooltip options of linear gauge + * @Default {false} + */ + tooltip?: Tooltip; + + /** Specifies the value of the Gauge. + * @Default {0} + */ + value?: number; + + /** Specifies the width of Linear gauge. + * @Default {150} + */ + width?: number; + + /** Triggers while the bar pointer are being drawn on the gauge. + */ + drawBarPointers?(e: DrawBarPointersEventArgs): void; + + /** Triggers while the customLabel are being drawn on the gauge. + */ + drawCustomLabel?(e: DrawCustomLabelEventArgs): void; + + /** Triggers while the Indicator are being drawn on the gauge. + */ + drawIndicators?(e: DrawIndicatorsEventArgs): void; + + /** Triggers while the label are being drawn on the gauge. + */ + drawLabels?(e: DrawLabelsEventArgs): void; + + /** Triggers while the marker are being drawn on the gauge. + */ + drawMarkerPointers?(e: DrawMarkerPointersEventArgs): void; + + /** Triggers while the range are being drawn on the gauge. + */ + drawRange?(e: DrawRangeEventArgs): void; + + /** Triggers while the ticks are being drawn on the gauge. + */ + drawTicks?(e: DrawTicksEventArgs): void; + + /** Triggers when the gauge is initialized. + */ + init?(e: InitEventArgs): void; + + /** Triggers while the gauge start to Load. + */ + load?(e: LoadEventArgs): void; + + /** Triggers when the left mouse button is clicked. + */ + mouseClick?(e: MouseClickEventArgs): void; + + /** Triggers when clicking and dragging the mouse pointer over the gauge pointer. + */ + mouseClickMove?(e: MouseClickMoveEventArgs): void; + + /** Triggers when the mouse click is released. + */ + mouseClickUp?(e: MouseClickUpEventArgs): void; + + /** Triggers while the rendering of the gauge completed. + */ + renderComplete?(e: RenderCompleteEventArgs): void; + } + + export interface DrawBarPointersEventArgs { + + /** returns the object of the gauge. + */ + object?: any; + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the context element + */ + context?: any; + + /** returns the startX and startY of the pointer + */ + position?: any; + + /** returns the gauge model + */ + Model?: any; - class SymbolPalette extends ej.Widget { - static fn: SymbolPalette; - constructor(element: JQuery | Element, options?: SymbolPalette.Model); - static Locale: any; - model: SymbolPalette.Model; - defaults: SymbolPalette.Model; - - /** Add items to Palettes at runtime - * @param {string} name of the Palette - * @param {any} JSON for the new items to added in Palette - * @returns {void} - */ - addPaletteItem(paletteName: string, node: any): void; - - /** Remove items to Palettes at runtime - * @param {string} name of the Palette - * @param {any} JSON for the new node to removed in Palette - * @returns {void} - */ - removePaletteItem(paletteName: string, node: any): void; - } - export namespace SymbolPalette { - - export interface Model { - - /** Defines whether the symbols can be dragged from palette or not - * @Default {true} - */ - allowDrag?: boolean; - - /** Customizes the style of the symbol palette - * @Default {e-symbolpalette} - */ - cssClass?: string; - - /** Defines the default properties of nodes and connectors - */ - defaultSettings?: DefaultSettings; - - /** Sets the Id of the diagram, over which the symbols will be dropped - * @Default {null} - */ - diagramId?: string; - - /** Sets the height of the palette headers - * @Default {30} - */ - headerHeight?: number; - - /** Defines the height of the symbol palette - * @Default {400} - */ - height?: number; - - /** Defines the height of the palette items - * @Default {50} - */ - paletteItemHeight?: number; - - /** Defines the width of the palette items - * @Default {50} - */ - paletteItemWidth?: number; - - /** An array of JSON objects, where each object represents a node/connector - * @Default {[]} - */ - palettes?: Palette[]; - - /** Defines the preview height of the symbols - * @Default {100} - */ - previewHeight?: number; - - /** Defines the offset value to be left between the mouse cursor and symbol previews - * @Default {(110, 110)} - */ - previewOffset?: any; - - /** Defines the width of the symbol previews - * @Default {100} - */ - previewWidth?: number; - - /** Enable or disable the palette item text - * @Default {true} - */ - showPaletteItemText?: boolean; - - /** The width of the palette - * @Default {250} - */ - width?: number; - - /** Triggers when a palette item is selected or unselected */ - selectionChange?(e: SelectionChangeEventArgs): void; - } - - export interface SelectionChangeEventArgs { - - /** returns whether an element is selected or unselected - */ - changeType?: string; - - /** returns the node or connector that is selected or unselected - */ - element?: any; - } - - export interface DefaultSettings { - - /** Defines the default properties of the nodes - * @Default {null} - */ - node?: any; - - /** Defines the default properties of the connectors - * @Default {null} - */ - connector?: any; - } - - export interface Palette { - - /** Defines the name of the palette - * @Default {null} - */ - name?: string; - - /** Defines whether the palette must be in expanded state or in collapsed state - * @Default {true} - */ - expanded?: boolean; - - /** Defines the palette items - * @Default {[]} - */ - items?: any[]; - } - } - - class LinearGauge extends ej.Widget { - static fn: LinearGauge; - constructor(element: JQuery | Element, options?: LinearGauge.Model); - static Locale: any; - model: LinearGauge.Model; - defaults: LinearGauge.Model; - - /** destroy the linear gauge all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** To export Image - * @returns {void} - */ - exportImage(): void; - - /** To get Bar Distance From Scale in number - * @returns {any} - */ - getBarDistanceFromScale(): any; - - /** To get Bar Pointer Value in number - * @returns {any} - */ - getBarPointerValue(): any; - - /** To get Bar Width in number - * @returns {any} - */ - getBarWidth(): any; - - /** To get CustomLabel Angle in number - * @returns {any} - */ - getCustomLabelAngle(): any; - - /** To get CustomLabel Value in string - * @returns {any} - */ - getCustomLabelValue(): any; - - /** To get Label Angle in number - * @returns {any} - */ - getLabelAngle(): any; - - /** To get LabelPlacement in number - * @returns {any} - */ - getLabelPlacement(): any; - - /** To get LabelStyle in number - * @returns {any} - */ - getLabelStyle(): any; - - /** To get Label XDistance From Scale in number - * @returns {any} - */ - getLabelXDistanceFromScale(): any; - - /** To get PointerValue in number - * @returns {any} - */ - getLabelYDistanceFromScale(): any; - - /** To get Major Interval Value in number - * @returns {any} - */ - getMajorIntervalValue(): any; - - /** To get MarkerStyle in number - * @returns {any} - */ - getMarkerStyle(): any; - - /** To get Maximum Value in number - * @returns {any} - */ - getMaximumValue(): any; - - /** To get PointerValue in number - * @returns {any} - */ - getMinimumValue(): any; - - /** To get Minor Interval Value in number - * @returns {any} - */ - getMinorIntervalValue(): any; - - /** To get Pointer Distance From Scale in number - * @returns {any} - */ - getPointerDistanceFromScale(): any; - - /** To get PointerHeight in number - * @returns {any} - */ - getPointerHeight(): any; - - /** To get Pointer Placement in String - * @returns {any} - */ - getPointerPlacement(): any; - - /** To get PointerValue in number - * @returns {any} - */ - getPointerValue(): any; - - /** To get PointerWidth in number - * @returns {any} - */ - getPointerWidth(): any; - - /** To get Range Border Width in number - * @returns {any} - */ - getRangeBorderWidth(): any; - - /** To get Range Distance From Scale in number - * @returns {any} - */ - getRangeDistanceFromScale(): any; - - /** To get Range End Value in number - * @returns {any} - */ - getRangeEndValue(): any; - - /** To get Range End Width in number - * @returns {any} - */ - getRangeEndWidth(): any; - - /** To get Range Position in number - * @returns {any} - */ - getRangePosition(): any; - - /** To get Range Start Value in number - * @returns {any} - */ - getRangeStartValue(): any; - - /** To get Range Start Width in number - * @returns {any} - */ - getRangeStartWidth(): any; - - /** To get ScaleBarLength in number - * @returns {any} - */ - getScaleBarLength(): any; - - /** To get Scale Bar Size in number - * @returns {any} - */ - getScaleBarSize(): any; - - /** To get Scale Border Width in number - * @returns {any} - */ - getScaleBorderWidth(): any; - - /** To get Scale Direction in number - * @returns {any} - */ - getScaleDirection(): any; - - /** To get Scale Location in object - * @returns {any} - */ - getScaleLocation(): any; - - /** To get Scale Style in string - * @returns {any} - */ - getScaleStyle(): any; - - /** To get Tick Angle in number - * @returns {any} - */ - getTickAngle(): any; - - /** To get Tick Height in number - * @returns {any} - */ - getTickHeight(): any; - - /** To get getTickPlacement in number - * @returns {any} - */ - getTickPlacement(): any; - - /** To get Tick Style in string - * @returns {any} - */ - getTickStyle(): any; - - /** To get Tick Width in number - * @returns {any} - */ - getTickWidth(): any; - - /** To get get Tick XDistance From Scale in number - * @returns {any} - */ - getTickXDistanceFromScale(): any; - - /** To get Tick YDistance From Scale in number - * @returns {any} - */ - getTickYDistanceFromScale(): any; - - /** Specifies the scales. - * @returns {void} - */ - scales(): void; - - /** To set setBarDistanceFromScale - * @returns {void} - */ - setBarDistanceFromScale(): void; - - /** To set setBarPointerValue - * @returns {void} - */ - setBarPointerValue(): void; - - /** To set setBarWidth - * @returns {void} - */ - setBarWidth(): void; - - /** To set setCustomLabelAngle - * @returns {void} - */ - setCustomLabelAngle(): void; - - /** To set setCustomLabelValue - * @returns {void} - */ - setCustomLabelValue(): void; - - /** To set setLabelAngle - * @returns {void} - */ - setLabelAngle(): void; - - /** To set setLabelPlacement - * @returns {void} - */ - setLabelPlacement(): void; - - /** To set setLabelStyle - * @returns {void} - */ - setLabelStyle(): void; - - /** To set setLabelXDistanceFromScale - * @returns {void} - */ - setLabelXDistanceFromScale(): void; - - /** To set setLabelYDistanceFromScale - * @returns {void} - */ - setLabelYDistanceFromScale(): void; - - /** To set setMajorIntervalValue - * @returns {void} - */ - setMajorIntervalValue(): void; - - /** To set setMarkerStyle - * @returns {void} - */ - setMarkerStyle(): void; - - /** To set setMaximumValue - * @returns {void} - */ - setMaximumValue(): void; - - /** To set setMinimumValue - * @returns {void} - */ - setMinimumValue(): void; - - /** To set setMinorIntervalValue - * @returns {void} - */ - setMinorIntervalValue(): void; - - /** To set setPointerDistanceFromScale - * @returns {void} - */ - setPointerDistanceFromScale(): void; - - /** To set PointerHeight - * @returns {void} - */ - setPointerHeight(): void; - - /** To set setPointerPlacement - * @returns {void} - */ - setPointerPlacement(): void; - - /** To set PointerValue - * @returns {void} - */ - setPointerValue(): void; - - /** To set PointerWidth - * @returns {void} - */ - setPointerWidth(): void; - - /** To set setRangeBorderWidth - * @returns {void} - */ - setRangeBorderWidth(): void; - - /** To set setRangeDistanceFromScale - * @returns {void} - */ - setRangeDistanceFromScale(): void; - - /** To set setRangeEndValue - * @returns {void} - */ - setRangeEndValue(): void; - - /** To set setRangeEndWidth - * @returns {void} - */ - setRangeEndWidth(): void; - - /** To set setRangePosition - * @returns {void} - */ - setRangePosition(): void; - - /** To set setRangeStartValue - * @returns {void} - */ - setRangeStartValue(): void; - - /** To set setRangeStartWidth - * @returns {void} - */ - setRangeStartWidth(): void; - - /** To set setScaleBarLength - * @returns {void} - */ - setScaleBarLength(): void; - - /** To set setScaleBarSize - * @returns {void} - */ - setScaleBarSize(): void; - - /** To set setScaleBorderWidth - * @returns {void} - */ - setScaleBorderWidth(): void; - - /** To set setScaleDirection - * @returns {void} - */ - setScaleDirection(): void; - - /** To set setScaleLocation - * @returns {void} - */ - setScaleLocation(): void; - - /** To set setScaleStyle - * @returns {void} - */ - setScaleStyle(): void; - - /** To set setTickAngle - * @returns {void} - */ - setTickAngle(): void; - - /** To set setTickHeight - * @returns {void} - */ - setTickHeight(): void; - - /** To set setTickPlacement - * @returns {void} - */ - setTickPlacement(): void; - - /** To set setTickStyle - * @returns {void} - */ - setTickStyle(): void; - - /** To set setTickWidth - * @returns {void} - */ - setTickWidth(): void; - - /** To set setTickXDistanceFromScale - * @returns {void} - */ - setTickXDistanceFromScale(): void; - - /** To set setTickYDistanceFromScale - * @returns {void} - */ - setTickYDistanceFromScale(): void; - } - export namespace LinearGauge { - - export interface Model { - - /** Specifies the animationSpeed - * @Default {500} - */ - animationSpeed?: number; - - /** Specifies the backgroundColor for Linear gauge. - * @Default {null} - */ - backgroundColor?: string; - - /** Specifies the borderColor for Linear gauge. - * @Default {null} - */ - borderColor?: string; - - /** Specifies the animate state - * @Default {true} - */ - enableAnimation?: boolean; - - /** Specifies the animate state for marker pointer - * @Default {true} - */ - enableMarkerPointerAnimation?: boolean; - - /** Specifies the can resize state. - * @Default {false} - */ - isResponsive?: boolean; - - /** Specify frame of linear gauge - * @Default {null} - */ - frame?: Frame; - - /** Specifies the height of Linear gauge. - * @Default {400} - */ - height?: number; - - /** Specifies the labelColor for Linear gauge. - * @Default {null} - */ - labelColor?: string; - - /** Specifies the maximum value of Linear gauge. - * @Default {100} - */ - maximum?: number; - - /** Specifies the minimum value of Linear gauge. - * @Default {0} - */ - minimum?: number; - - /** Specifies the orientation for Linear gauge. - * @Default {Vertical} - */ - orientation?: string; - - /** Specify labelPosition value of Linear gauge See OuterCustomLabelPosition - * @Default {bottom} - */ - outerCustomLabelPosition?: ej.datavisualization.LinearGauge.OuterCustomLabelPosition | string; - - /** Specifies the pointerGradient1 for Linear gauge. - * @Default {null} - */ - pointerGradient1?: any; - - /** Specifies the pointerGradient2 for Linear gauge. - * @Default {null} - */ - pointerGradient2?: any; - - /** Specifies the read only state. - * @Default {true} - */ - readOnly?: boolean; - - /** Specifies the scales - * @Default {null} - */ - scales?: Scale[]; - - /** Specifies the theme for Linear gauge. See LinearGauge.Themes - * @Default {flatlight} - */ - theme?: ej.datavisualization.LinearGauge.Themes | string; - - /** Specifies the tick Color for Linear gauge. - * @Default {null} - */ - tickColor?: string; - - /** Specify tooltip options of linear gauge - * @Default {false} - */ - tooltip?: Tooltip; - - /** Specifies the value of the Gauge. - * @Default {0} - */ - value?: number; - - /** Specifies the width of Linear gauge. - * @Default {150} - */ - width?: number; - - /** Triggers while the bar pointer are being drawn on the gauge. */ - drawBarPointers?(e: DrawBarPointersEventArgs): void; - - /** Triggers while the customLabel are being drawn on the gauge. */ - drawCustomLabel?(e: DrawCustomLabelEventArgs): void; - - /** Triggers while the Indicator are being drawn on the gauge. */ - drawIndicators?(e: DrawIndicatorsEventArgs): void; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** Triggers while the label are being drawn on the gauge. */ - drawLabels?(e: DrawLabelsEventArgs): void; - - /** Triggers while the marker are being drawn on the gauge. */ - drawMarkerPointers?(e: DrawMarkerPointersEventArgs): void; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** Triggers while the range are being drawn on the gauge. */ - drawRange?(e: DrawRangeEventArgs): void; + /** returns the pointer style + */ + style?: string; - /** Triggers while the ticks are being drawn on the gauge. */ - drawTicks?(e: DrawTicksEventArgs): void; + /** returns the current Bar pointer element. + */ + barElement?: any; - /** Triggers when the gauge is initialized. */ - init?(e: InitEventArgs): void; + /** returns the index of the bar pointer. + */ + barPointerIndex?: number; - /** Triggers while the gauge start to Load. */ - load?(e: LoadEventArgs): void; + /** returns the value of the bar pointer. + */ + PointerValue?: number; - /** Triggers when the left mouse button is clicked. */ - mouseClick?(e: MouseClickEventArgs): void; + /** returns the name of the event + */ + type?: any; + } - /** Triggers when clicking and dragging the mouse pointer over the gauge pointer. */ - mouseClickMove?(e: MouseClickMoveEventArgs): void; + export interface DrawCustomLabelEventArgs { - /** Triggers when the mouse click is released. */ - mouseClickUp?(e: MouseClickUpEventArgs): void; + /** returns the object of the gauge. + */ + object?: any; - /** Triggers while the rendering of the gauge completed. */ - renderComplete?(e: RenderCompleteEventArgs): void; - } + /** returns the cancel option value + */ + cancel?: boolean; - export interface DrawBarPointersEventArgs { + /** returns the context element + */ + context?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the startX and startY of the customLabel + */ + position?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the gauge model + */ + Model?: any; - /** returns the context element - */ - context?: any; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the startX and startY of the pointer - */ - position?: any; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the gauge model - */ - Model?: any; + /** returns the customLabel style + */ + style?: any; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the current customLabel element. + */ + customLabelElement?: any; - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the index of the customLabel. + */ + customLabelIndex?: number; - /** returns the pointer style - */ - style?: string; + /** returns the name of the event + */ + type?: any; + } - /** returns the current Bar pointer element. - */ - barElement?: any; + export interface DrawIndicatorsEventArgs { - /** returns the index of the bar pointer. - */ - barPointerIndex?: number; + /** returns the object of the gauge. + */ + object?: any; - /** returns the value of the bar pointer. - */ - PointerValue?: number; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: any; - } + /** returns the context element + */ + context?: any; - export interface DrawCustomLabelEventArgs { + /** returns the startX and startY of the Indicator + */ + position?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the gauge model + */ + Model?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the context element - */ - context?: any; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the startX and startY of the customLabel - */ - position?: any; + /** returns the Indicator style + */ + style?: string; - /** returns the gauge model - */ - Model?: any; + /** returns the current Indicator element. + */ + IndicatorElement?: any; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the index of the Indicator. + */ + IndicatorIndex?: number; - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the name of the event + */ + type?: any; + } - /** returns the customLabel style - */ - style?: any; + export interface DrawLabelsEventArgs { - /** returns the current customLabel element. - */ - customLabelElement?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the index of the customLabel. - */ - customLabelIndex?: number; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: any; - } + /** returns the context element + */ + context?: any; - export interface DrawIndicatorsEventArgs { + /** returns the startX and startY of the label + */ + position?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the gauge model + */ + Model?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the context element - */ - context?: any; + /** returns the scaleIndex to which the label belongs. + */ + scaleIndex?: number; - /** returns the startX and startY of the Indicator - */ - position?: any; + /** returns the label style + */ + style?: string; - /** returns the gauge model - */ - Model?: any; + /** returns the angle of the label. + */ + angle?: number; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the current label element. + */ + element?: any; - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the index of the label. + */ + index?: number; - /** returns the Indicator style - */ - style?: string; + /** returns the label value of the label. + */ + value?: number; - /** returns the current Indicator element. - */ - IndicatorElement?: any; + /** returns the name of the event + */ + type?: any; + } - /** returns the index of the Indicator. - */ - IndicatorIndex?: number; + export interface DrawMarkerPointersEventArgs { - /** returns the name of the event - */ - type?: any; - } + /** returns the object of the gauge. + */ + object?: any; - export interface DrawLabelsEventArgs { + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the object of the gauge. - */ - object?: any; + /** returns the context element + */ + context?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the startX and startY of the pointer + */ + position?: any; - /** returns the context element - */ - context?: any; + /** returns the gauge model + */ + Model?: any; - /** returns the startX and startY of the label - */ - position?: any; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the gauge model - */ - Model?: any; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the ticks style + */ + style?: string; - /** returns the scaleIndex to which the label belongs. - */ - scaleIndex?: number; + /** returns the current marker pointer element. + */ + markerElement?: any; - /** returns the label style - */ - style?: string; + /** returns the index of the marker pointer. + */ + markerPointerIndex?: number; - /** returns the angle of the label. - */ - angle?: number; + /** returns the value of the marker pointer. + */ + pointerValue?: number; - /** returns the current label element. - */ - element?: any; + /** returns the angle of the marker pointer. + */ + pointerAngle?: number; - /** returns the index of the label. - */ - index?: number; + /** returns the name of the event + */ + type?: any; + } - /** returns the label value of the label. - */ - value?: number; + export interface DrawRangeEventArgs { - /** returns the name of the event - */ - type?: any; - } + /** returns the object of the gauge. + */ + object?: any; - export interface DrawMarkerPointersEventArgs { + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the object of the gauge. - */ - object?: any; + /** returns the context element + */ + context?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the startX and startY of the range + */ + position?: any; - /** returns the context element - */ - context?: any; + /** returns the gauge model + */ + Model?: any; - /** returns the startX and startY of the pointer - */ - position?: any; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the gauge model - */ - Model?: any; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the range style + */ + style?: string; - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the current range element. + */ + rangeElement?: any; - /** returns the ticks style - */ - style?: string; + /** returns the index of the range. + */ + rangeIndex?: number; - /** returns the current marker pointer element. - */ - markerElement?: any; + /** returns the name of the event + */ + type?: any; + } - /** returns the index of the marker pointer. - */ - markerPointerIndex?: number; + export interface DrawTicksEventArgs { - /** returns the value of the marker pointer. - */ - pointerValue?: number; + /** returns the object of the gauge. + */ + object?: any; - /** returns the angle of the marker pointer. - */ - pointerAngle?: number; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: any; - } + /** returns the context element + */ + context?: any; - export interface DrawRangeEventArgs { + /** returns the startX and startY of the ticks + */ + position?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the gauge model + */ + Model?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the context element - */ - context?: any; + /** returns the scaleIndex to which the tick belongs. + */ + scaleIndex?: number; - /** returns the startX and startY of the range - */ - position?: any; + /** returns the ticks style + */ + style?: string; - /** returns the gauge model - */ - Model?: any; + /** returns the angle of the tick. + */ + angle?: number; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the current tick element. + */ + element?: any; - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the index of the tick. + */ + index?: number; - /** returns the range style - */ - style?: string; + /** returns the tick value of the tick. + */ + value?: number; - /** returns the current range element. - */ - rangeElement?: any; + /** returns the name of the event + */ + type?: any; + } - /** returns the index of the range. - */ - rangeIndex?: number; + export interface InitEventArgs { - /** returns the name of the event - */ - type?: any; - } + /** returns the object of the gauge. + */ + object?: any; - export interface DrawTicksEventArgs { + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the object of the gauge. - */ - object?: any; + /** returns the gauge model + */ + Model?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the entire scale element. + */ + scaleElement?: any; - /** returns the context element - */ - context?: any; + /** returns the context element + */ + context?: any; - /** returns the startX and startY of the ticks - */ - position?: any; + /** returns the name of the event + */ + type?: string; + } - /** returns the gauge model - */ - Model?: any; + export interface LoadEventArgs { - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the scaleIndex to which the tick belongs. - */ - scaleIndex?: number; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the ticks style - */ - style?: string; + /** returns the gauge model + */ + Model?: any; - /** returns the angle of the tick. - */ - angle?: number; + /** returns the entire scale element. + */ + scaleElement?: any; - /** returns the current tick element. - */ - element?: any; + /** returns the context element + */ + context?: any; - /** returns the index of the tick. - */ - index?: number; + /** returns the name of the event + */ + type?: any; + } - /** returns the tick value of the tick. - */ - value?: number; + export interface MouseClickEventArgs { - /** returns the name of the event - */ - type?: any; - } + /** returns the object of the gauge. + */ + object?: any; - export interface InitEventArgs { + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the object of the gauge. - */ - object?: any; + /** returns the gauge model + */ + model?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: any; - /** returns the gauge model - */ - Model?: any; + /** returns the scale element. + */ + scaleElement?: any; - /** returns the entire scale element. - */ - scaleElement?: any; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the context element - */ - context?: any; + /** returns the context element* @param {Object} args.markerpointer returns the context element + */ + context?: any; - /** returns the name of the event - */ - type?: string; - } + /** returns the pointer Index + */ + markerpointerindex?: number; - export interface LoadEventArgs { + /** returns the pointer element. + */ + markerpointerelement?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the value of the pointer. + */ + markerpointervalue?: number; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the pointer style + */ + style?: string; - /** returns the gauge model - */ - Model?: any; + /** returns the startX and startY of the pointer. + */ + position?: any; + } - /** returns the entire scale element. - */ - scaleElement?: any; + export interface MouseClickMoveEventArgs { - /** returns the context element - */ - context?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the name of the event - */ - type?: any; - } + /** returns the cancel option value + */ + cancel?: boolean; - export interface MouseClickEventArgs { + /** returns the gauge model + */ + model?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the name of the event + */ + type?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the scale element. + */ + scaleElement?: any; - /** returns the gauge model - */ - model?: any; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the name of the event - */ - type?: any; + /** returns the context element + */ + context?: any; - /** returns the scale element. - */ - scaleElement?: any; + /** returns the pointer Index + */ + index?: number; - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the pointer element. + */ + element?: any; - /** returns the context element* @param {Object} args.markerpointer returns the context element - */ - context?: any; + /** returns the value of the pointer. + */ + value?: number; - /** returns the pointer Index - */ - markerpointerindex?: number; + /** returns the pointer style + */ + style?: string; - /** returns the pointer element. - */ - markerpointerelement?: any; + /** returns the startX and startY of the pointer. + */ + position?: any; + } - /** returns the value of the pointer. - */ - markerpointervalue?: number; + export interface MouseClickUpEventArgs { - /** returns the pointer style - */ - style?: string; + /** returns the object of the gauge. + */ + object?: any; - /** returns the startX and startY of the pointer. - */ - position?: any; - } + /** returns the cancel option value + */ + cancel?: boolean; - export interface MouseClickMoveEventArgs { + /** returns the gauge model + */ + model?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the name of the event + */ + type?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the scale element. + */ + scaleElement?: any; - /** returns the gauge model - */ - model?: any; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the name of the event - */ - type?: any; + /** returns the context element* @param {Object} args.markerpointer returns the context element + */ + context?: any; + + /** returns the pointer Index + */ + markerpointerIndex?: number; + + /** returns the pointer element. + */ + markerpointerElement?: any; + + /** returns the value of the pointer. + */ + markerpointerValue?: number; + + /** returns the pointer style + */ + style?: string; + + /** returns the startX and startY of the pointer. + */ + position?: any; + } + + export interface RenderCompleteEventArgs { + + /** returns the object of the gauge. + */ + object?: any; + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the gauge model + */ + Model?: any; + + /** returns the entire scale element. + */ + scaleElement?: any; + + /** returns the context element + */ + context?: any; + + /** returns the name of the event + */ + type?: any; + } + + export interface Frame { + + /** Specifies the frame background image URL of linear gauge + * @Default {null} + */ + backgroundImageUrl?: string; + + /** Specifies the frame InnerWidth + * @Default {8} + */ + innerWidth?: number; + + /** Specifies the frame OuterWidth + * @Default {12} + */ + outerWidth?: number; + } + + export interface ScalesBarPointersBorder { + + /** Specifies the border Color of bar pointer + * @Default {null} + */ + color?: string; + + /** Specifies the border Width of bar pointer + * @Default {1.5} + */ + width?: number; + } + + export interface ScalesBarPointer { + + /** Specifies the backgroundColor of bar pointer + * @Default {null} + */ + backgroundColor?: string; + + /** Specifies the border of bar pointer + * @Default {null} + */ + border?: ScalesBarPointersBorder; + + /** Specifies the distanceFromScale of bar pointer + * @Default {0} + */ + distanceFromScale?: number; + + /** Specifies the scaleBar Gradient of bar pointer + * @Default {null} + */ + gradients?: any; + + /** Specifies the opacity of bar pointer + * @Default {1} + */ + opacity?: number; + + /** Specifies the value of bar pointer + * @Default {null} + */ + value?: number; + + /** Specifies the pointer Width of bar pointer + * @Default {width=30} + */ + width?: number; + } + + export interface ScalesBorder { + + /** Specifies the border color of the Scale. + * @Default {null} + */ + color?: string; + + /** Specifies the border width of the Scale. + * @Default {1.5} + */ + width?: number; + } + + export interface ScalesCustomLabelsFont { + + /** Specifies the fontFamily in customLabels + * @Default {Arial} + */ + fontFamily?: string; + + /** Specifies the fontStyle in customLabels. See + * @Default {Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /** Specifies the font size in customLabels + * @Default {11px} + */ + size?: string; + } + + export interface ScalesCustomLabelsPosition { + + /** Specifies the position x in customLabels + * @Default {0} + */ + x?: number; + + /** Specifies the y in customLabels + * @Default {0} + */ + y?: number; + } + + export interface ScalesCustomLabel { + + /** Specifies the label Color in customLabels + * @Default {null} + */ + color?: number; + + /** Specifies the font in customLabels + * @Default {null} + */ + font?: ScalesCustomLabelsFont; + + /** Specifies the opacity in customLabels + * @Default {0} + */ + opacity?: string; + + /** Specifies the position in customLabels + * @Default {null} + */ + position?: ScalesCustomLabelsPosition; + + /** Specifies the positionType in customLabels.See CustomLabelPositionType + * @Default {null} + */ + positionType?: any; + + /** Specifies the textAngle in customLabels + * @Default {0} + */ + textAngle?: number; + + /** Specifies the label Value in customLabels + */ + value?: string; + } + + export interface ScalesIndicatorsBorder { + + /** Specifies the border Color in bar indicators + * @Default {null} + */ + color?: string; + + /** Specifies the border Width in bar indicators + * @Default {1.5} + */ + width?: number; + } + + export interface ScalesIndicatorsFont { + + /** Specifies the fontFamily of font in bar indicators + * @Default {Arial} + */ + fontFamily?: string; + + /** Specifies the fontStyle of font in bar indicators. See FontStyle + * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /** Specifies the size of font in bar indicators + * @Default {11px} + */ + size?: string; + } + + export interface ScalesIndicatorsPosition { + + /** Specifies the x position in bar indicators + * @Default {0} + */ + x?: number; + + /** Specifies the y position in bar indicators + * @Default {0} + */ + y?: number; + } + + export interface ScalesIndicatorsStateRange { + + /** Specifies the backgroundColor in bar indicators state ranges + * @Default {null} + */ + backgroundColor?: string; + + /** Specifies the borderColor in bar indicators state ranges + * @Default {null} + */ + borderColor?: string; + + /** Specifies the endValue in bar indicators state ranges + * @Default {60} + */ + endValue?: number; + + /** Specifies the startValue in bar indicators state ranges + * @Default {50} + */ + startValue?: number; + + /** Specifies the text in bar indicators state ranges + */ + text?: string; + + /** Specifies the textColor in bar indicators state ranges + * @Default {null} + */ + textColor?: string; + } + + export interface ScalesIndicatorsTextLocation { + + /** Specifies the textLocation position in bar indicators + * @Default {0} + */ + x?: number; + + /** Specifies the Y position in bar indicators + * @Default {0} + */ + y?: number; + } + + export interface ScalesIndicator { + + /** Specifies the backgroundColor in bar indicators + * @Default {null} + */ + backgroundColor?: string; + + /** Specifies the border in bar indicators + * @Default {null} + */ + border?: ScalesIndicatorsBorder; + + /** Specifies the font of bar indicators + * @Default {null} + */ + font?: ScalesIndicatorsFont; + + /** Specifies the indicator Height of bar indicators + * @Default {30} + */ + height?: number; + + /** Specifies the opacity in bar indicators + * @Default {null} + */ + opacity?: number; + + /** Specifies the position in bar indicators + * @Default {null} + */ + position?: ScalesIndicatorsPosition; + + /** Specifies the state ranges in bar indicators + * @Default {Array} + */ + stateRanges?: ScalesIndicatorsStateRange[]; + + /** Specifies the textLocation in bar indicators + * @Default {null} + */ + textLocation?: ScalesIndicatorsTextLocation; + + /** Specifies the indicator Style of font in bar indicators + * @Default {ej.datavisualization.LinearGauge.IndicatorType.Rectangle} + */ + type?: ej.datavisualization.LinearGauge.IndicatorTypes|string; + + /** Specifies the indicator Width in bar indicators + * @Default {30} + */ + width?: number; + } + + export interface ScalesLabelsDistanceFromScale { + + /** Specifies the xDistanceFromScale of labels. + * @Default {-10} + */ + x?: number; + + /** Specifies the yDistanceFromScale of labels. + * @Default {0} + */ + y?: number; + } + + export interface ScalesLabelsFont { + + /** Specifies the fontFamily of font. + * @Default {Arial} + */ + fontFamily?: string; + + /** Specifies the fontStyle of font.See FontStyle + * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /** Specifies the size of font. + * @Default {11px} + */ + size?: string; + } + + export interface ScalesLabel { + + /** Specifies the angle of labels. + * @Default {0} + */ + angle?: number; + + /** Specifies the DistanceFromScale of labels. + * @Default {null} + */ + distanceFromScale?: ScalesLabelsDistanceFromScale; + + /** Specifies the font of labels. + * @Default {null} + */ + font?: ScalesLabelsFont; + + /** need to includeFirstValue. + * @Default {true} + */ + includeFirstValue?: boolean; + + /** Specifies the opacity of label. + * @Default {0} + */ + opacity?: number; + + /** Specifies the label Placement of label. See + * @Default {Near} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /** Specifies the textColor of font. + * @Default {null} + */ + textColor?: string; + + /** Specifies the label Style of label. See + * @Default {ej.datavisualization.LinearGauge.LabelType.Major} + */ + type?: ej.datavisualization.LinearGauge.ScaleType|string; + + /** Specifies the unitText of label. + */ + unitText?: string; + + /** Specifies the unitText Position of label.See + * @Default {Back} + */ + unitTextPlacement?: ej.datavisualization.LinearGauge.UnitTextPlacement|string; + } + + export interface ScalesMarkerPointersBorder { + + /** Specifies the border color of marker pointer + * @Default {null} + */ + color?: string; + + /** Specifies the border of marker pointer + * @Default {number} + */ + width?: number; + } + + export interface ScalesMarkerPointer { + + /** Specifies the backgroundColor of marker pointer + * @Default {null} + */ + backgroundColor?: string; + + /** Specifies the border of marker pointer + * @Default {null} + */ + border?: ScalesMarkerPointersBorder; + + /** Specifies the distanceFromScale of marker pointer + * @Default {0} + */ + distanceFromScale?: number; + + /** Specifies the pointer Gradient of marker pointer + * @Default {null} + */ + gradients?: any; + + /** Specifies the pointer Length of marker pointer + * @Default {30} + */ + length?: number; + + /** Specifies the opacity of marker pointer + * @Default {1} + */ + opacity?: number; + + /** Specifies the pointer Placement of marker pointer See PointerPlacement + * @Default {Far} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /** Specifies the marker Style of marker pointerSee + * @Default {Triangle} + */ + type?: ej.datavisualization.LinearGauge.MarkerType|string; + + /** Specifies the value of marker pointer + * @Default {null} + */ + value?: number; + + /** Specifies the pointer Width of marker pointer + * @Default {30} + */ + width?: number; + } + + export interface ScalesPosition { + + /** Specifies the Horizontal position + * @Default {50} + */ + x?: number; + + /** Specifies the vertical position + * @Default {50} + */ + y?: number; + } + + export interface ScalesRangesBorder { + + /** Specifies the border color in the ranges. + * @Default {null} + */ + color?: string; + + /** Specifies the border width in the ranges. + * @Default {1.5} + */ + width?: number; + } + + export interface ScalesRange { + + /** Specifies the backgroundColor in the ranges. + * @Default {null} + */ + backgroundColor?: string; + + /** Specifies the border in the ranges. + * @Default {null} + */ + border?: ScalesRangesBorder; + + /** Specifies the distanceFromScale in the ranges. + * @Default {0} + */ + distanceFromScale?: number; + + /** Specifies the endValue in the ranges. + * @Default {60} + */ + endValue?: number; + + /** Specifies the endWidth in the ranges. + * @Default {10} + */ + endWidth?: number; + + /** Specifies the range Gradient in the ranges. + * @Default {null} + */ + gradients?: any; + + /** Specifies the opacity in the ranges. + * @Default {null} + */ + opacity?: number; + + /** Specifies the range Position in the ranges. See RangePlacement + * @Default {Center} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /** Specifies the startValue in the ranges. + * @Default {20} + */ + startValue?: number; + + /** Specifies the startWidth in the ranges. + * @Default {10} + */ + startWidth?: number; + } + + export interface ScalesTicksDistanceFromScale { + + /** Specifies the xDistanceFromScale in the tick. + * @Default {0} + */ + x?: number; + + /** Specifies the yDistanceFromScale in the tick. + * @Default {0} + */ + y?: number; + } + + export interface ScalesTick { + + /** Specifies the angle in the tick. + * @Default {0} + */ + angle?: number; + + /** Specifies the tick Color in the tick. + * @Default {null} + */ + color?: string; + + /** Specifies the DistanceFromScale in the tick. + * @Default {null} + */ + distanceFromScale?: ScalesTicksDistanceFromScale; + + /** Specifies the tick Height in the tick. + * @Default {10} + */ + height?: number; + + /** Specifies the opacity in the tick. + * @Default {0} + */ + opacity?: number; + + /** Specifies the tick Placement in the tick. See TickPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /** Specifies the tick Style in the tick. See + * @Default {MajorInterval} + */ + type?: ej.datavisualization.LinearGauge.TicksType|string; + + /** Specifies the tick Width in the tick. + * @Default {3} + */ + width?: number; + } + + export interface Scale { + + /** Specifies the backgroundColor of the Scale. + * @Default {null} + */ + backgroundColor?: string; + + /** Specifies the scaleBar Gradient of bar pointer + * @Default {Array} + */ + barPointers?: ScalesBarPointer[]; + + /** Specifies the border of the Scale. + * @Default {null} + */ + border?: ScalesBorder; + + /** Specifies the customLabel + * @Default {Array} + */ + customLabels?: ScalesCustomLabel[]; + + /** Specifies the scale Direction of the Scale. See + * @Default {CounterClockwise} + */ + direction?: ej.datavisualization.LinearGauge.Direction|string; + + /** Specifies the indicator + * @Default {Array} + */ + indicators?: ScalesIndicator[]; + + /** Specifies the labels. + * @Default {Array} + */ + labels?: ScalesLabel[]; + + /** Specifies the scaleBar Length. + * @Default {290} + */ + length?: number; + + /** Specifies the majorIntervalValue of the Scale. + * @Default {10} + */ + majorIntervalValue?: number; + + /** Specifies the markerPointers + * @Default {Array} + */ + markerPointers?: ScalesMarkerPointer[]; + + /** Specifies the maximum of the Scale. + * @Default {null} + */ + maximum?: number; + + /** Specifies the minimum of the Scale. + * @Default {null} + */ + minimum?: number; + + /** Specifies the minorIntervalValue of the Scale. + * @Default {2} + */ + minorIntervalValue?: number; + + /** Specifies the opacity of the Scale. + * @Default {NaN} + */ + opacity?: number; + + /** Specifies the position + * @Default {null} + */ + position?: ScalesPosition; + + /** Specifies the ranges in the tick. + * @Default {Array} + */ + ranges?: ScalesRange[]; + + /** Specifies the shadowOffset. + * @Default {0} + */ + shadowOffset?: number; + + /** Specifies the showBarPointers state. + * @Default {true} + */ + showBarPointers?: boolean; + + /** Specifies the showCustomLabels state. + * @Default {false} + */ + showCustomLabels?: boolean; + + /** Specifies the showIndicators state. + * @Default {false} + */ + showIndicators?: boolean; + + /** Specifies the showLabels state. + * @Default {true} + */ + showLabels?: boolean; + + /** Specifies the showMarkerPointers state. + * @Default {true} + */ + showMarkerPointers?: boolean; + + /** Specifies the showRanges state. + * @Default {false} + */ + showRanges?: boolean; + + /** Specifies the showTicks state. + * @Default {true} + */ + showTicks?: boolean; + + /** Specifies the ticks in the scale. + * @Default {Array} + */ + ticks?: ScalesTick[]; + + /** Specifies the scaleBar type .See + * @Default {Rectangle} + */ + type?: ej.datavisualization.LinearGauge.ScaleType|string; + + /** Specifies the scaleBar width. + * @Default {30} + */ + width?: number; + } + + export interface Tooltip { + + /** Specify showCustomLabelTooltip value of linear gauge + * @Default {false} + */ + showCustomLabelTooltip?: boolean; + + /** Specify showLabelTooltip value of linear gauge + * @Default {false} + */ + showLabelTooltip?: boolean; + + /** Specify templateID value of linear gauge + * @Default {false} + */ + templateID?: string; + } + } + namespace LinearGauge { + enum OuterCustomLabelPosition { + //string + Left, + //string + Right, + //string + Top, + //string + Bottom, + } + } + namespace LinearGauge { + enum FontStyle { + //string + Bold, + //string + Italic, + //string + Regular, + //string + Strikeout, + //string + Underline, + } + } + namespace LinearGauge { + enum Direction { + //string + Clockwise, + //string + CounterClockwise, + } + } + namespace LinearGauge { + enum IndicatorTypes { + //string + Rectangle, + //string + Circle, + //string + RoundedRectangle, + //string + Text, + } + } + namespace LinearGauge { + enum PointerPlacement { + //string + Near, + //string + Far, + //string + Center, + } + } + namespace LinearGauge { + enum ScaleType { + //string + Major, + //string + Minor, + } + } + namespace LinearGauge { + enum UnitTextPlacement { + //string + Back, + //string + From, + } + } + namespace LinearGauge { + enum MarkerType { + //string + Rectangle, + //string + Triangle, + //string + Ellipse, + //string + Diamond, + //string + Pentagon, + //string + Circle, + //string + Star, + //string + Slider, + //string + Pointer, + //string + Wedge, + //string + Trapezoid, + //string + RoundedRectangle, + } + } + namespace LinearGauge { + enum TicksType { + //string + Majorinterval, + //string + Minorinterval, + } + } + namespace LinearGauge { + enum Themes { + //string + FlatLight, + //string + FlatDark, + } + } + + class CircularGauge extends ej.Widget { + static fn: CircularGauge; + constructor(element: JQuery | Element, options?: CircularGauge.Model); + static Locale: any; + model: CircularGauge.Model; + defaults: CircularGauge.Model; + + /** destroy the circular gauge widget. all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To export Image + * @returns {boolean} + */ + exportImage(): boolean; + + /** To get BackNeedleLength + * @returns {any} + */ + getBackNeedleLength(): any; + + /** To get CustomLabelAngle + * @returns {any} + */ + getCustomLabelAngle(): any; + + /** To get CustomLabelValue + * @returns {any} + */ + getCustomLabelValue(): any; + + /** To get LabelAngle + * @returns {any} + */ + getLabelAngle(): any; + + /** To get LabelDistanceFromScale + * @returns {any} + */ + getLabelDistanceFromScale(): any; + + /** To get LabelPlacement + * @returns {any} + */ + getLabelPlacement(): any; + + /** To get LabelStyle + * @returns {any} + */ + getLabelStyle(): any; + + /** To get MajorIntervalValue + * @returns {any} + */ + getMajorIntervalValue(): any; + + /** To get MarkerDistanceFromScale + * @returns {any} + */ + getMarkerDistanceFromScale(): any; + + /** To get MarkerStyle + * @returns {any} + */ + getMarkerStyle(): any; + + /** To get MaximumValue + * @returns {any} + */ + getMaximumValue(): any; + + /** To get MinimumValue + * @returns {any} + */ + getMinimumValue(): any; + + /** To get MinorIntervalValue + * @returns {any} + */ + getMinorIntervalValue(): any; + + /** To get NeedleStyle + * @returns {any} + */ + getNeedleStyle(): any; + + /** To get PointerCapBorderWidth + * @returns {any} + */ + getPointerCapBorderWidth(): any; + + /** To get PointerCapRadius + * @returns {any} + */ + getPointerCapRadius(): any; + + /** To get PointerLength + * @returns {any} + */ + getPointerLength(): any; + + /** To get PointerNeedleType + * @returns {any} + */ + getPointerNeedleType(): any; + + /** To get PointerPlacement + * @returns {any} + */ + getPointerPlacement(): any; + + /** To get PointerValue + * @returns {any} + */ + getPointerValue(): any; + + /** To get PointerWidth + * @returns {any} + */ + getPointerWidth(): any; + + /** To get RangeBorderWidth + * @returns {any} + */ + getRangeBorderWidth(): any; + + /** To get RangeDistanceFromScale + * @returns {any} + */ + getRangeDistanceFromScale(): any; + + /** To get RangeEndValue + * @returns {any} + */ + getRangeEndValue(): any; + + /** To get RangePosition + * @returns {any} + */ + getRangePosition(): any; + + /** To get RangeSize + * @returns {any} + */ + getRangeSize(): any; + + /** To get RangeStartValue + * @returns {any} + */ + getRangeStartValue(): any; + + /** To get ScaleBarSize + * @returns {any} + */ + getScaleBarSize(): any; + + /** To get ScaleBorderWidth + * @returns {any} + */ + getScaleBorderWidth(): any; + + /** To get ScaleDirection + * @returns {any} + */ + getScaleDirection(): any; + + /** To get ScaleRadius + * @returns {any} + */ + getScaleRadius(): any; + + /** To get StartAngle + * @returns {any} + */ + getStartAngle(): any; + + /** To get SubGaugeLocation + * @returns {any} + */ + getSubGaugeLocation(): any; + + /** To get SweepAngle + * @returns {any} + */ + getSweepAngle(): any; + + /** To get TickAngle + * @returns {any} + */ + getTickAngle(): any; + + /** To get TickDistanceFromScale + * @returns {any} + */ + getTickDistanceFromScale(): any; + + /** To get TickHeight + * @returns {any} + */ + getTickHeight(): any; + + /** To get TickPlacement + * @returns {any} + */ + getTickPlacement(): any; + + /** To get TickStyle + * @returns {any} + */ + getTickStyle(): any; + + /** To get TickWidth + * @returns {any} + */ + getTickWidth(): any; + + /** To set includeFirstValue + * @returns {void} + */ + includeFirstValue(): void; + + /** Switching the redraw option for the gauge + * @returns {void} + */ + redraw(): void; + + /** To set BackNeedleLength + * @returns {void} + */ + setBackNeedleLength(): void; + + /** To set CustomLabelAngle + * @returns {void} + */ + setCustomLabelAngle(): void; + + /** To set CustomLabelValue + * @returns {void} + */ + setCustomLabelValue(): void; + + /** To set LabelAngle + * @returns {void} + */ + setLabelAngle(): void; + + /** To set LabelDistanceFromScale + * @returns {void} + */ + setLabelDistanceFromScale(): void; + + /** To set LabelPlacement + * @returns {void} + */ + setLabelPlacement(): void; + + /** To set LabelStyle + * @returns {void} + */ + setLabelStyle(): void; + + /** To set MajorIntervalValue + * @returns {void} + */ + setMajorIntervalValue(): void; + + /** To set MarkerDistanceFromScale + * @returns {void} + */ + setMarkerDistanceFromScale(): void; + + /** To set MarkerStyle + * @returns {void} + */ + setMarkerStyle(): void; + + /** To set MaximumValue + * @returns {void} + */ + setMaximumValue(): void; + + /** To set MinimumValue + * @returns {void} + */ + setMinimumValue(): void; + + /** To set MinorIntervalValue + * @returns {void} + */ + setMinorIntervalValue(): void; + + /** To set NeedleStyle + * @returns {void} + */ + setNeedleStyle(): void; + + /** To set PointerCapBorderWidth + * @returns {void} + */ + setPointerCapBorderWidth(): void; + + /** To set PointerCapRadius + * @returns {void} + */ + setPointerCapRadius(): void; + + /** To set PointerLength + * @returns {void} + */ + setPointerLength(): void; + + /** To set PointerNeedleType + * @returns {void} + */ + setPointerNeedleType(): void; + + /** To set PointerPlacement + * @returns {void} + */ + setPointerPlacement(): void; + + /** To set PointerValue + * @returns {void} + */ + setPointerValue(): void; + + /** To set PointerWidth + * @returns {void} + */ + setPointerWidth(): void; + + /** To set RangeBorderWidth + * @returns {void} + */ + setRangeBorderWidth(): void; + + /** To set RangeDistanceFromScale + * @returns {void} + */ + setRangeDistanceFromScale(): void; + + /** To set RangeEndValue + * @returns {void} + */ + setRangeEndValue(): void; + + /** To set RangePosition + * @returns {void} + */ + setRangePosition(): void; + + /** To set RangeSize + * @returns {void} + */ + setRangeSize(): void; + + /** To set RangeStartValue + * @returns {void} + */ + setRangeStartValue(): void; + + /** To set ScaleBarSize + * @returns {void} + */ + setScaleBarSize(): void; + + /** To set ScaleBorderWidth + * @returns {void} + */ + setScaleBorderWidth(): void; + + /** To set ScaleDirection + * @returns {void} + */ + setScaleDirection(): void; + + /** To set ScaleRadius + * @returns {void} + */ + setScaleRadius(): void; + + /** To set StartAngle + * @returns {void} + */ + setStartAngle(): void; + + /** To set SubGaugeLocation + * @returns {void} + */ + setSubGaugeLocation(): void; + + /** To set SweepAngle + * @returns {void} + */ + setSweepAngle(): void; + + /** To set TickAngle + * @returns {void} + */ + setTickAngle(): void; + + /** To set TickDistanceFromScale + * @returns {void} + */ + setTickDistanceFromScale(): void; + + /** To set TickHeight + * @returns {void} + */ + setTickHeight(): void; + + /** To set TickPlacement + * @returns {void} + */ + setTickPlacement(): void; + + /** To set TickStyle + * @returns {void} + */ + setTickStyle(): void; + + /** To set TickWidth + * @returns {void} + */ + setTickWidth(): void; + } + export namespace CircularGauge { + + export interface Model { + + /** Specifies animationSpeed of circular gauge + * @Default {500} + */ + animationSpeed?: number; + + /** Specifies the background color of circular gauge. + * @Default {null} + */ + backgroundColor?: string; + + /** Specify distanceFromCorner value of circular gauge + * @Default {center} + */ + distanceFromCorner?: number; + + /** Specify range zOrder placement of circular gauge. + * @Default {Rear} + */ + rangeZOrder?: ej.datavisualization.CircularGauge.RangeZOrderPlacement|string; + + /** Specify animate value of circular gauge + * @Default {true} + */ + enableAnimation?: boolean; + + /** Specify to convert the date object to string, using locale settings. + * @Default {false} + */ + enableGroupSeparator?: boolean; + + /** Controls whether circular gauge has to be responsive while resizing. + * @Default {false} + */ + enableResize?: boolean; + + /** Specify the frame of circular gauge + * @Default {Object} + */ + frame?: Frame; + + /** Specify gaugePosition value of circular gauge See GaugePosition + * @Default {center} + */ + gaugePosition?: ej.datavisualization.CircularGauge.gaugePosition|string; + + /** Specifies the height of circular gauge. + * @Default {360} + */ + height?: number; + + /** Specifies the interiorGradient of circular gauge. + * @Default {null} + */ + interiorGradient?: any; + + /** Specify isRadialGradient value of circular gauge + * @Default {false} + */ + isRadialGradient?: boolean; + + /** Specify isResponsive value of circular gauge + * @Default {false} + */ + isResponsive?: boolean; + + /** Name of the culture based on which circular gauge should be localized. + * @Default {en-US} + */ + locale?: string; + + /** Specifies the maximum value of circular gauge. + * @Default {100} + */ + maximum?: number; + + /** Specifies the minimum value of circular gauge. + * @Default {0} + */ + minimum?: number; + + /** Specify outerCustomLabelPosition value of circular gauge See + * @Default {bottom} + */ + outerCustomLabelPosition?: ej.datavisualization.CircularGauge.OuterCustomLabelPosition|string; + + /** Specifies the radius of circular gauge. + * @Default {180} + */ + radius?: number; + + /** Specify readonly value of circular gauge + * @Default {true} + */ + readOnly?: boolean; + + /** Specify the pointers, ticks, labels, indicators, ranges of circular gauge + * @Default {null} + */ + scales?: Scale[]; + + /** Specify the theme of circular gauge. + * @Default {flatlight} + */ + theme?: string; + + /** Options to customize the legend. + */ + legend?: Legend; + + /** Specify tooltip option of circular gauge + * @Default {object} + */ + tooltip?: Tooltip; + + /** Specifies the value of circular gauge. + * @Default {0} + */ + value?: number; + + /** Specifies the width of circular gauge. + * @Default {360} + */ + width?: number; + + /** Fires before rendering the legend item. This event is fired for each legend item in CircularGauge. You can use this event to customize legend item shape or add custom text to + * legend item. + */ + legendItemRender?(e: LegendItemRenderEventArgs): void; + + /** Fires on clicking the legend item. + */ + legendItemClick?(e: LegendItemClickEventArgs): void; + + /** Fires when mouse moving on ranges. + */ + rangeMouseMove?(e: RangeMouseMoveEventArgs): void; + + /** Triggers while the custom labels are being drawn on the gauge. + */ + drawCustomLabel?(e: DrawCustomLabelEventArgs): void; + + /** Triggers while the indicators are being started to drawn on the gauge. + */ + drawIndicators?(e: DrawIndicatorsEventArgs): void; + + /** Triggers while the labels are being drawn on the gauge. + */ + drawLabels?(e: DrawLabelsEventArgs): void; + + /** Triggers while the pointer cap is being drawn on the gauge. + */ + drawPointerCap?(e: DrawPointerCapEventArgs): void; + + /** Triggers while the pointers are being drawn on the gauge. + */ + drawPointers?(e: DrawPointersEventArgs): void; + + /** Triggers when the ranges begin to be getting drawn on the gauge. + */ + drawRange?(e: DrawRangeEventArgs): void; + + /** Triggers while the ticks are being drawn on the gauge. + */ + drawTicks?(e: DrawTicksEventArgs): void; + + /** Triggers while the gauge start to Load. + */ + load?(e: LoadEventArgs): void; + + /** Triggers when the left mouse button is clicked. + */ + mouseClick?(e: MouseClickEventArgs): void; + + /** Triggers when clicking and dragging the mouse pointer over the gauge pointer. + */ + mouseClickMove?(e: MouseClickMoveEventArgs): void; + + /** Triggers when the mouse click is released. + */ + mouseClickUp?(e: MouseClickUpEventArgs): void; + + /** Triggers when the rendering of the gauge is completed. + */ + renderComplete?(e: RenderCompleteEventArgs): void; + } + + export interface LegendItemRenderEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** returns the scale element. - */ - scaleElement?: any; + /** Instance of the circulargauge model object + */ + model?: any; - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** Name of the event + */ + type?: string; - /** returns the context element - */ - context?: any; + /** Instance of the legend item object that is about to be rendered + */ + data?: any; + } - /** returns the pointer Index - */ - index?: number; + export interface LegendItemClickEventArgs { - /** returns the pointer element. - */ - element?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** returns the value of the pointer. - */ - value?: number; + /** Instance of the circulargauge model object + */ + model?: any; - /** returns the pointer style - */ - style?: string; + /** Name of the event + */ + type?: string; - /** returns the startX and startY of the pointer. - */ - position?: any; - } + /** Instance of the legend item object that is about to be rendered + */ + data?: any; + } - export interface MouseClickUpEventArgs { + export interface RangeMouseMoveEventArgs { - /** returns the object of the gauge. - */ - object?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** returns the cancel option value - */ - cancel?: boolean; + /** Instance of the circulargauge model object + */ + model?: any; - /** returns the gauge model - */ - model?: any; + /** Name of the event + */ + type?: string; - /** returns the name of the event - */ - type?: any; + /** Region of ranges + */ + data?: any; + } - /** returns the scale element. - */ - scaleElement?: any; + export interface DrawCustomLabelEventArgs { - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the object of the gauge. + */ + object?: any; - /** returns the context element* @param {Object} args.markerpointer returns the context element - */ - context?: any; - - /** returns the pointer Index - */ - markerpointerIndex?: number; - - /** returns the pointer element. - */ - markerpointerElement?: any; - - /** returns the value of the pointer. - */ - markerpointerValue?: number; - - /** returns the pointer style - */ - style?: string; - - /** returns the startX and startY of the pointer. - */ - position?: any; - } - - export interface RenderCompleteEventArgs { - - /** returns the object of the gauge. - */ - object?: any; - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the gauge model - */ - Model?: any; - - /** returns the entire scale element. - */ - scaleElement?: any; - - /** returns the context element - */ - context?: any; - - /** returns the name of the event - */ - type?: any; - } - - export interface Frame { - - /** Specifies the frame background image URL of linear gauge - * @Default {null} - */ - backgroundImageUrl?: string; - - /** Specifies the frame InnerWidth - * @Default {8} - */ - innerWidth?: number; - - /** Specifies the frame OuterWidth - * @Default {12} - */ - outerWidth?: number; - } - - export interface ScalesBarPointersBorder { - - /** Specifies the border Color of bar pointer - * @Default {null} - */ - color?: string; - - /** Specifies the border Width of bar pointer - * @Default {1.5} - */ - width?: number; - } - - export interface ScalesBarPointer { - - /** Specifies the backgroundColor of bar pointer - * @Default {null} - */ - backgroundColor?: string; - - /** Specifies the border of bar pointer - * @Default {null} - */ - border?: ScalesBarPointersBorder; - - /** Specifies the distanceFromScale of bar pointer - * @Default {0} - */ - distanceFromScale?: number; - - /** Specifies the scaleBar Gradient of bar pointer - * @Default {null} - */ - gradients?: any; - - /** Specifies the opacity of bar pointer - * @Default {1} - */ - opacity?: number; - - /** Specifies the value of bar pointer - * @Default {null} - */ - value?: number; - - /** Specifies the pointer Width of bar pointer - * @Default {width=30} - */ - width?: number; - } - - export interface ScalesBorder { - - /** Specifies the border color of the Scale. - * @Default {null} - */ - color?: string; - - /** Specifies the border width of the Scale. - * @Default {1.5} - */ - width?: number; - } - - export interface ScalesCustomLabelsFont { - - /** Specifies the fontFamily in customLabels - * @Default {Arial} - */ - fontFamily?: string; - - /** Specifies the fontStyle in customLabels. See FontStyle - * @Default {Bold} - */ - fontStyle?: ej.datavisualization.LinearGauge.FontStyle | string; - - /** Specifies the font size in customLabels - * @Default {11px} - */ - size?: string; - } - - export interface ScalesCustomLabelsPosition { - - /** Specifies the position x in customLabels - * @Default {0} - */ - x?: number; - - /** Specifies the y in customLabels - * @Default {0} - */ - y?: number; - } - - export interface ScalesCustomLabel { - - /** Specifies the label Color in customLabels - * @Default {null} - */ - color?: number; - - /** Specifies the font in customLabels - * @Default {null} - */ - font?: ScalesCustomLabelsFont; - - /** Specifies the opacity in customLabels - * @Default {0} - */ - opacity?: string; - - /** Specifies the position in customLabels - * @Default {null} - */ - position?: ScalesCustomLabelsPosition; - - /** Specifies the positionType in customLabels.See CustomLabelPositionType - * @Default {null} - */ - positionType?: any; - - /** Specifies the textAngle in customLabels - * @Default {0} - */ - textAngle?: number; - - /** Specifies the label Value in customLabels - */ - value?: string; - } - - export interface ScalesIndicatorsBorder { - - /** Specifies the border Color in bar indicators - * @Default {null} - */ - color?: string; - - /** Specifies the border Width in bar indicators - * @Default {1.5} - */ - width?: number; - } - - export interface ScalesIndicatorsFont { - - /** Specifies the fontFamily of font in bar indicators - * @Default {Arial} - */ - fontFamily?: string; - - /** Specifies the fontStyle of font in bar indicators. See FontStyle - * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} - */ - fontStyle?: ej.datavisualization.LinearGauge.FontStyle | string; - - /** Specifies the size of font in bar indicators - * @Default {11px} - */ - size?: string; - } - - export interface ScalesIndicatorsPosition { - - /** Specifies the x position in bar indicators - * @Default {0} - */ - x?: number; - - /** Specifies the y position in bar indicators - * @Default {0} - */ - y?: number; - } - - export interface ScalesIndicatorsStateRange { - - /** Specifies the backgroundColor in bar indicators state ranges - * @Default {null} - */ - backgroundColor?: string; - - /** Specifies the borderColor in bar indicators state ranges - * @Default {null} - */ - borderColor?: string; - - /** Specifies the endValue in bar indicators state ranges - * @Default {60} - */ - endValue?: number; - - /** Specifies the startValue in bar indicators state ranges - * @Default {50} - */ - startValue?: number; - - /** Specifies the text in bar indicators state ranges - */ - text?: string; - - /** Specifies the textColor in bar indicators state ranges - * @Default {null} - */ - textColor?: string; - } - - export interface ScalesIndicatorsTextLocation { - - /** Specifies the textLocation position in bar indicators - * @Default {0} - */ - x?: number; - - /** Specifies the Y position in bar indicators - * @Default {0} - */ - y?: number; - } - - export interface ScalesIndicator { - - /** Specifies the backgroundColor in bar indicators - * @Default {null} - */ - backgroundColor?: string; - - /** Specifies the border in bar indicators - * @Default {null} - */ - border?: ScalesIndicatorsBorder; - - /** Specifies the font of bar indicators - * @Default {null} - */ - font?: ScalesIndicatorsFont; - - /** Specifies the indicator Height of bar indicators - * @Default {30} - */ - height?: number; - - /** Specifies the opacity in bar indicators - * @Default {NaN} - */ - opacity?: number; - - /** Specifies the position in bar indicators - * @Default {null} - */ - position?: ScalesIndicatorsPosition; - - /** Specifies the state ranges in bar indicators - * @Default {Array} - */ - stateRanges?: ScalesIndicatorsStateRange[]; - - /** Specifies the textLocation in bar indicators - * @Default {null} - */ - textLocation?: ScalesIndicatorsTextLocation; - - /** Specifies the indicator Style of font in bar indicators - * @Default {ej.datavisualization.LinearGauge.IndicatorType.Rectangle} - */ - type?: ej.datavisualization.LinearGauge.IndicatorTypes | string; - - /** Specifies the indicator Width in bar indicators - * @Default {30} - */ - width?: number; - } - - export interface ScalesLabelsDistanceFromScale { - - /** Specifies the xDistanceFromScale of labels. - * @Default {-10} - */ - x?: number; - - /** Specifies the yDistanceFromScale of labels. - * @Default {0} - */ - y?: number; - } - - export interface ScalesLabelsFont { - - /** Specifies the fontFamily of font. - * @Default {Arial} - */ - fontFamily?: string; - - /** Specifies the fontStyle of font.See FontStyle - * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} - */ - fontStyle?: ej.datavisualization.LinearGauge.FontStyle | string; - - /** Specifies the size of font. - * @Default {11px} - */ - size?: string; - } - - export interface ScalesLabel { - - /** Specifies the angle of labels. - * @Default {0} - */ - angle?: number; - - /** Specifies the DistanceFromScale of labels. - * @Default {null} - */ - distanceFromScale?: ScalesLabelsDistanceFromScale; - - /** Specifies the font of labels. - * @Default {null} - */ - font?: ScalesLabelsFont; - - /** need to includeFirstValue. - * @Default {true} - */ - includeFirstValue?: boolean; - - /** Specifies the opacity of label. - * @Default {0} - */ - opacity?: number; - - /** Specifies the label Placement of label. See LabelPlacement - * @Default {Near} - */ - placement?: ej.datavisualization.LinearGauge.PointerPlacement | string; - - /** Specifies the textColor of font. - * @Default {null} - */ - textColor?: string; - - /** Specifies the label Style of label. See LabelType - * @Default {ej.datavisualization.LinearGauge.LabelType.Major} - */ - type?: ej.datavisualization.LinearGauge.ScaleType | string; - - /** Specifies the unitText of label. - */ - unitText?: string; - - /** Specifies the unitText Position of label.See UnitTextPlacement - * @Default {Back} - */ - unitTextPlacement?: ej.datavisualization.LinearGauge.UnitTextPlacement | string; - } - - export interface ScalesMarkerPointersBorder { - - /** Specifies the border color of marker pointer - * @Default {null} - */ - color?: string; - - /** Specifies the border of marker pointer - * @Default {number} - */ - width?: number; - } - - export interface ScalesMarkerPointer { - - /** Specifies the backgroundColor of marker pointer - * @Default {null} - */ - backgroundColor?: string; - - /** Specifies the border of marker pointer - * @Default {null} - */ - border?: ScalesMarkerPointersBorder; - - /** Specifies the distanceFromScale of marker pointer - * @Default {0} - */ - distanceFromScale?: number; - - /** Specifies the pointer Gradient of marker pointer - * @Default {null} - */ - gradients?: any; - - /** Specifies the pointer Length of marker pointer - * @Default {30} - */ - length?: number; - - /** Specifies the opacity of marker pointer - * @Default {1} - */ - opacity?: number; - - /** Specifies the pointer Placement of marker pointer See PointerPlacement - * @Default {Far} - */ - placement?: ej.datavisualization.LinearGauge.PointerPlacement | string; - - /** Specifies the marker Style of marker pointerSee MarkerType - * @Default {Triangle} - */ - type?: ej.datavisualization.LinearGauge.MarkerType | string; - - /** Specifies the value of marker pointer - * @Default {null} - */ - value?: number; - - /** Specifies the pointer Width of marker pointer - * @Default {30} - */ - width?: number; - } - - export interface ScalesPosition { - - /** Specifies the Horizontal position - * @Default {50} - */ - x?: number; - - /** Specifies the vertical position - * @Default {50} - */ - y?: number; - } - - export interface ScalesRangesBorder { - - /** Specifies the border color in the ranges. - * @Default {null} - */ - color?: string; - - /** Specifies the border width in the ranges. - * @Default {1.5} - */ - width?: number; - } - - export interface ScalesRange { - - /** Specifies the backgroundColor in the ranges. - * @Default {null} - */ - backgroundColor?: string; - - /** Specifies the border in the ranges. - * @Default {null} - */ - border?: ScalesRangesBorder; - - /** Specifies the distanceFromScale in the ranges. - * @Default {0} - */ - distanceFromScale?: number; - - /** Specifies the endValue in the ranges. - * @Default {60} - */ - endValue?: number; - - /** Specifies the endWidth in the ranges. - * @Default {10} - */ - endWidth?: number; - - /** Specifies the range Gradient in the ranges. - * @Default {null} - */ - gradients?: any; - - /** Specifies the opacity in the ranges. - * @Default {null} - */ - opacity?: number; - - /** Specifies the range Position in the ranges. See RangePlacement - * @Default {Center} - */ - placement?: ej.datavisualization.LinearGauge.PointerPlacement | string; - - /** Specifies the startValue in the ranges. - * @Default {20} - */ - startValue?: number; - - /** Specifies the startWidth in the ranges. - * @Default {10} - */ - startWidth?: number; - } - - export interface ScalesTicksDistanceFromScale { - - /** Specifies the xDistanceFromScale in the tick. - * @Default {0} - */ - x?: number; - - /** Specifies the yDistanceFromScale in the tick. - * @Default {0} - */ - y?: number; - } - - export interface ScalesTick { - - /** Specifies the angle in the tick. - * @Default {0} - */ - angle?: number; - - /** Specifies the tick Color in the tick. - * @Default {null} - */ - color?: string; - - /** Specifies the DistanceFromScale in the tick. - * @Default {null} - */ - distanceFromScale?: ScalesTicksDistanceFromScale; - - /** Specifies the tick Height in the tick. - * @Default {10} - */ - height?: number; - - /** Specifies the opacity in the tick. - * @Default {0} - */ - opacity?: number; - - /** Specifies the tick Placement in the tick. See TickPlacement - * @Default {Near} - */ - placement?: ej.datavisualization.LinearGauge.PointerPlacement | string; - - /** Specifies the tick Style in the tick. See TickType - * @Default {MajorInterval} - */ - type?: ej.datavisualization.LinearGauge.TicksType | string; - - /** Specifies the tick Width in the tick. - * @Default {3} - */ - width?: number; - } - - export interface Scale { - - /** Specifies the backgroundColor of the Scale. - * @Default {null} - */ - backgroundColor?: string; - - /** Specifies the scaleBar Gradient of bar pointer - * @Default {Array} - */ - barPointers?: ScalesBarPointer[]; - - /** Specifies the border of the Scale. - * @Default {null} - */ - border?: ScalesBorder; - - /** Specifies the customLabel - * @Default {Array} - */ - customLabels?: ScalesCustomLabel[]; - - /** Specifies the scale Direction of the Scale. See Directions - * @Default {CounterClockwise} - */ - direction?: ej.datavisualization.LinearGauge.Direction | string; - - /** Specifies the indicator - * @Default {Array} - */ - indicators?: ScalesIndicator[]; - - /** Specifies the labels. - * @Default {Array} - */ - labels?: ScalesLabel[]; - - /** Specifies the scaleBar Length. - * @Default {290} - */ - length?: number; - - /** Specifies the majorIntervalValue of the Scale. - * @Default {10} - */ - majorIntervalValue?: number; - - /** Specifies the markerPointers - * @Default {Array} - */ - markerPointers?: ScalesMarkerPointer[]; - - /** Specifies the maximum of the Scale. - * @Default {null} - */ - maximum?: number; - - /** Specifies the minimum of the Scale. - * @Default {null} - */ - minimum?: number; - - /** Specifies the minorIntervalValue of the Scale. - * @Default {2} - */ - minorIntervalValue?: number; - - /** Specifies the opacity of the Scale. - * @Default {NaN} - */ - opacity?: number; - - /** Specifies the position - * @Default {null} - */ - position?: ScalesPosition; - - /** Specifies the ranges in the tick. - * @Default {Array} - */ - ranges?: ScalesRange[]; - - /** Specifies the shadowOffset. - * @Default {0} - */ - shadowOffset?: number; - - /** Specifies the showBarPointers state. - * @Default {true} - */ - showBarPointers?: boolean; - - /** Specifies the showCustomLabels state. - * @Default {false} - */ - showCustomLabels?: boolean; - - /** Specifies the showIndicators state. - * @Default {false} - */ - showIndicators?: boolean; - - /** Specifies the showLabels state. - * @Default {true} - */ - showLabels?: boolean; - - /** Specifies the showMarkerPointers state. - * @Default {true} - */ - showMarkerPointers?: boolean; - - /** Specifies the showRanges state. - * @Default {false} - */ - showRanges?: boolean; - - /** Specifies the showTicks state. - * @Default {true} - */ - showTicks?: boolean; - - /** Specifies the ticks in the scale. - * @Default {Array} - */ - ticks?: ScalesTick[]; - - /** Specifies the scaleBar type .See ScaleType - * @Default {Rectangle} - */ - type?: ej.datavisualization.LinearGauge.ScaleType | string; - - /** Specifies the scaleBar width. - * @Default {30} - */ - width?: number; - } - - export interface Tooltip { - - /** Specify showCustomLabelTooltip value of linear gauge - * @Default {false} - */ - showCustomLabelTooltip?: boolean; - - /** Specify showLabelTooltip value of linear gauge - * @Default {false} - */ - showLabelTooltip?: boolean; - - /** Specify templateID value of linear gauge - * @Default {false} - */ - templateID?: string; - } - } - namespace LinearGauge { - enum OuterCustomLabelPosition { - //string - Left, - //string - Right, - //string - Top, - //string - Bottom, - } - } - namespace LinearGauge { - enum FontStyle { - //string - Bold, - //string - Italic, - //string - Regular, - //string - Strikeout, - //string - Underline, - } - } - namespace LinearGauge { - enum Direction { - //string - Clockwise, - //string - CounterClockwise, - } - } - namespace LinearGauge { - enum IndicatorTypes { - //string - Rectangle, - //string - Circle, - //string - RoundedRectangle, - //string - Text, - } - } - namespace LinearGauge { - enum PointerPlacement { - //string - Near, - //string - Far, - //string - Center, - } - } - namespace LinearGauge { - enum ScaleType { - //string - Major, - //string - Minor, - } - } - namespace LinearGauge { - enum UnitTextPlacement { - //string - Back, - //string - From, - } - } - namespace LinearGauge { - enum MarkerType { - //string - Rectangle, - //string - Triangle, - //string - Ellipse, - //string - Diamond, - //string - Pentagon, - //string - Circle, - //string - Star, - //string - Slider, - //string - Pointer, - //string - Wedge, - //string - Trapezoid, - //string - RoundedRectangle, - } - } - namespace LinearGauge { - enum TicksType { - //string - Majorinterval, - //string - Minorinterval, - } - } - namespace LinearGauge { - enum Themes { - //string - FlatLight, - //string - FlatDark, - } - } - - class CircularGauge extends ej.Widget { - static fn: CircularGauge; - constructor(element: JQuery | Element, options?: CircularGauge.Model); - static Locale: any; - model: CircularGauge.Model; - defaults: CircularGauge.Model; - - /** destroy the circular gauge widget. all events bound using this._on will be unbind automatically and bring the control to pre-init state. - * @returns {void} - */ - destroy(): void; - - /** To export Image - * @returns {boolean} - */ - exportImage(): boolean; - - /** To get BackNeedleLength - * @returns {any} - */ - getBackNeedleLength(): any; - - /** To get CustomLabelAngle - * @returns {any} - */ - getCustomLabelAngle(): any; - - /** To get CustomLabelValue - * @returns {any} - */ - getCustomLabelValue(): any; - - /** To get LabelAngle - * @returns {any} - */ - getLabelAngle(): any; - - /** To get LabelDistanceFromScale - * @returns {any} - */ - getLabelDistanceFromScale(): any; - - /** To get LabelPlacement - * @returns {any} - */ - getLabelPlacement(): any; - - /** To get LabelStyle - * @returns {any} - */ - getLabelStyle(): any; - - /** To get MajorIntervalValue - * @returns {any} - */ - getMajorIntervalValue(): any; - - /** To get MarkerDistanceFromScale - * @returns {any} - */ - getMarkerDistanceFromScale(): any; - - /** To get MarkerStyle - * @returns {any} - */ - getMarkerStyle(): any; - - /** To get MaximumValue - * @returns {any} - */ - getMaximumValue(): any; - - /** To get MinimumValue - * @returns {any} - */ - getMinimumValue(): any; - - /** To get MinorIntervalValue - * @returns {any} - */ - getMinorIntervalValue(): any; - - /** To get NeedleStyle - * @returns {any} - */ - getNeedleStyle(): any; - - /** To get PointerCapBorderWidth - * @returns {any} - */ - getPointerCapBorderWidth(): any; - - /** To get PointerCapRadius - * @returns {any} - */ - getPointerCapRadius(): any; - - /** To get PointerLength - * @returns {any} - */ - getPointerLength(): any; - - /** To get PointerNeedleType - * @returns {any} - */ - getPointerNeedleType(): any; - - /** To get PointerPlacement - * @returns {any} - */ - getPointerPlacement(): any; - - /** To get PointerValue - * @returns {any} - */ - getPointerValue(): any; - - /** To get PointerWidth - * @returns {any} - */ - getPointerWidth(): any; - - /** To get RangeBorderWidth - * @returns {any} - */ - getRangeBorderWidth(): any; - - /** To get RangeDistanceFromScale - * @returns {any} - */ - getRangeDistanceFromScale(): any; - - /** To get RangeEndValue - * @returns {any} - */ - getRangeEndValue(): any; - - /** To get RangePosition - * @returns {any} - */ - getRangePosition(): any; - - /** To get RangeSize - * @returns {any} - */ - getRangeSize(): any; - - /** To get RangeStartValue - * @returns {any} - */ - getRangeStartValue(): any; - - /** To get ScaleBarSize - * @returns {any} - */ - getScaleBarSize(): any; - - /** To get ScaleBorderWidth - * @returns {any} - */ - getScaleBorderWidth(): any; - - /** To get ScaleDirection - * @returns {any} - */ - getScaleDirection(): any; - - /** To get ScaleRadius - * @returns {any} - */ - getScaleRadius(): any; - - /** To get StartAngle - * @returns {any} - */ - getStartAngle(): any; - - /** To get SubGaugeLocation - * @returns {any} - */ - getSubGaugeLocation(): any; - - /** To get SweepAngle - * @returns {any} - */ - getSweepAngle(): any; - - /** To get TickAngle - * @returns {any} - */ - getTickAngle(): any; - - /** To get TickDistanceFromScale - * @returns {any} - */ - getTickDistanceFromScale(): any; - - /** To get TickHeight - * @returns {any} - */ - getTickHeight(): any; - - /** To get TickPlacement - * @returns {any} - */ - getTickPlacement(): any; - - /** To get TickStyle - * @returns {any} - */ - getTickStyle(): any; - - /** To get TickWidth - * @returns {any} - */ - getTickWidth(): any; - - /** To set includeFirstValue - * @returns {void} - */ - includeFirstValue(): void; - - /** Switching the redraw option for the gauge - * @returns {void} - */ - redraw(): void; - - /** To set BackNeedleLength - * @returns {void} - */ - setBackNeedleLength(): void; - - /** To set CustomLabelAngle - * @returns {void} - */ - setCustomLabelAngle(): void; - - /** To set CustomLabelValue - * @returns {void} - */ - setCustomLabelValue(): void; - - /** To set LabelAngle - * @returns {void} - */ - setLabelAngle(): void; - - /** To set LabelDistanceFromScale - * @returns {void} - */ - setLabelDistanceFromScale(): void; - - /** To set LabelPlacement - * @returns {void} - */ - setLabelPlacement(): void; - - /** To set LabelStyle - * @returns {void} - */ - setLabelStyle(): void; - - /** To set MajorIntervalValue - * @returns {void} - */ - setMajorIntervalValue(): void; - - /** To set MarkerDistanceFromScale - * @returns {void} - */ - setMarkerDistanceFromScale(): void; - - /** To set MarkerStyle - * @returns {void} - */ - setMarkerStyle(): void; - - /** To set MaximumValue - * @returns {void} - */ - setMaximumValue(): void; - - /** To set MinimumValue - * @returns {void} - */ - setMinimumValue(): void; - - /** To set MinorIntervalValue - * @returns {void} - */ - setMinorIntervalValue(): void; - - /** To set NeedleStyle - * @returns {void} - */ - setNeedleStyle(): void; - - /** To set PointerCapBorderWidth - * @returns {void} - */ - setPointerCapBorderWidth(): void; - - /** To set PointerCapRadius - * @returns {void} - */ - setPointerCapRadius(): void; - - /** To set PointerLength - * @returns {void} - */ - setPointerLength(): void; - - /** To set PointerNeedleType - * @returns {void} - */ - setPointerNeedleType(): void; - - /** To set PointerPlacement - * @returns {void} - */ - setPointerPlacement(): void; - - /** To set PointerValue - * @returns {void} - */ - setPointerValue(): void; - - /** To set PointerWidth - * @returns {void} - */ - setPointerWidth(): void; - - /** To set RangeBorderWidth - * @returns {void} - */ - setRangeBorderWidth(): void; - - /** To set RangeDistanceFromScale - * @returns {void} - */ - setRangeDistanceFromScale(): void; - - /** To set RangeEndValue - * @returns {void} - */ - setRangeEndValue(): void; - - /** To set RangePosition - * @returns {void} - */ - setRangePosition(): void; - - /** To set RangeSize - * @returns {void} - */ - setRangeSize(): void; - - /** To set RangeStartValue - * @returns {void} - */ - setRangeStartValue(): void; - - /** To set ScaleBarSize - * @returns {void} - */ - setScaleBarSize(): void; - - /** To set ScaleBorderWidth - * @returns {void} - */ - setScaleBorderWidth(): void; - - /** To set ScaleDirection - * @returns {void} - */ - setScaleDirection(): void; - - /** To set ScaleRadius - * @returns {void} - */ - setScaleRadius(): void; - - /** To set StartAngle - * @returns {void} - */ - setStartAngle(): void; - - /** To set SubGaugeLocation - * @returns {void} - */ - setSubGaugeLocation(): void; - - /** To set SweepAngle - * @returns {void} - */ - setSweepAngle(): void; - - /** To set TickAngle - * @returns {void} - */ - setTickAngle(): void; - - /** To set TickDistanceFromScale - * @returns {void} - */ - setTickDistanceFromScale(): void; - - /** To set TickHeight - * @returns {void} - */ - setTickHeight(): void; - - /** To set TickPlacement - * @returns {void} - */ - setTickPlacement(): void; - - /** To set TickStyle - * @returns {void} - */ - setTickStyle(): void; - - /** To set TickWidth - * @returns {void} - */ - setTickWidth(): void; - } - export namespace CircularGauge { - - export interface Model { - - /** Specifies animationSpeed of circular gauge - * @Default {500} - */ - animationSpeed?: number; - - /** Specifies the background color of circular gauge. - * @Default {null} - */ - backgroundColor?: string; - - /** Specify distanceFromCorner value of circular gauge - * @Default {center} - */ - distanceFromCorner?: number; - - /** Specify animate value of circular gauge - * @Default {true} - */ - enableAnimation?: boolean; - - /** Specify the frame of circular gauge - * @Default {Object} - */ - frame?: Frame; - - /** Specify gaugePosition value of circular gauge See GaugePosition - * @Default {center} - */ - gaugePosition?: ej.datavisualization.CircularGauge.gaugePosition | string; - - /** Specifies the height of circular gauge. - * @Default {360} - */ - height?: number; - - /** Specifies the interiorGradient of circular gauge. - * @Default {null} - */ - interiorGradient?: any; - - /** Specify isRadialGradient value of circular gauge - * @Default {false} - */ - isRadialGradient?: boolean; - - /** Specify isResponsive value of circular gauge - * @Default {false} - */ - isResponsive?: boolean; - - /** Specifies the maximum value of circular gauge. - * @Default {100} - */ - maximum?: number; - - /** Specifies the minimum value of circular gauge. - * @Default {0} - */ - minimum?: number; - - /** Specify outerCustomLabelPosition value of circular gauge See OuterCustomLabelPosition - * @Default {bottom} - */ - outerCustomLabelPosition?: ej.datavisualization.CircularGauge.CustomLabelPositionType | string; - - /** Specifies the radius of circular gauge. - * @Default {180} - */ - radius?: number; - - /** Specify readonly value of circular gauge - * @Default {true} - */ - readOnly?: boolean; - - /** Specify the pointers, ticks, labels, indicators, ranges of circular gauge - * @Default {null} - */ - scales?: Scale[]; - - /** Specify the theme of circular gauge. - * @Default {flatlight} - */ - theme?: string; - - /** Specify tooltip option of circular gauge - * @Default {object} - */ - tooltip?: Tooltip; - - /** Specifies the value of circular gauge. - * @Default {0} - */ - value?: number; - - /** Specifies the width of circular gauge. - * @Default {360} - */ - width?: number; - - /** Triggers while the custom labels are being drawn on the gauge. */ - drawCustomLabel?(e: DrawCustomLabelEventArgs): void; - - /** Triggers while the indicators are being started to drawn on the gauge. */ - drawIndicators?(e: DrawIndicatorsEventArgs): void; - - /** Triggers while the labels are being drawn on the gauge. */ - drawLabels?(e: DrawLabelsEventArgs): void; - - /** Triggers while the pointer cap is being drawn on the gauge. */ - drawPointerCap?(e: DrawPointerCapEventArgs): void; - - /** Triggers while the pointers are being drawn on the gauge. */ - drawPointers?(e: DrawPointersEventArgs): void; + /** returns the cancel option value + */ + cancel?: boolean; - /** Triggers when the ranges begin to be getting drawn on the gauge. */ - drawRange?(e: DrawRangeEventArgs): void; + /** returns the context element + */ + context?: any; - /** Triggers while the ticks are being drawn on the gauge. */ - drawTicks?(e: DrawTicksEventArgs): void; - - /** Triggers while the gauge start to Load. */ - load?(e: LoadEventArgs): void; + /** returns the startX and startY of the custom label + */ + position?: any; - /** Triggers when the left mouse button is clicked. */ - mouseClick?(e: MouseClickEventArgs): void; + /** returns the gauge model + */ + model?: any; - /** Triggers when clicking and dragging the mouse pointer over the gauge pointer. */ - mouseClickMove?(e: MouseClickMoveEventArgs): void; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** Triggers when the mouse click is released. */ - mouseClickUp?(e: MouseClickUpEventArgs): void; + /** returns the scaleIndex to which the custom label belongs. + */ + scaleIndex?: number; - /** Triggers when the rendering of the gauge is completed. */ - renderComplete?(e: RenderCompleteEventArgs): void; - } + /** returns the custom label style + */ + style?: string; - export interface DrawCustomLabelEventArgs { + /** returns the current custom label element. + */ + customLabelElement?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the index of the custom label. + */ + customLabelIndex?: number; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; + } - /** returns the context element - */ - context?: any; + export interface DrawIndicatorsEventArgs { - /** returns the startX and startY of the custom label - */ - position?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the gauge model - */ - model?: any; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the context element + */ + context?: any; - /** returns the scaleIndex to which the custom label belongs. - */ - scaleIndex?: number; + /** returns the startX and startY of the indicator + */ + position?: any; - /** returns the custom label style - */ - style?: string; + /** returns the gauge model + */ + model?: any; - /** returns the current custom label element. - */ - customLabelElement?: any; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the index of the custom label. - */ - customLabelIndex?: number; + /** returns the scaleIndex to which the indicator belongs. + */ + scaleIndex?: number; - /** returns the name of the event - */ - type?: string; - } + /** returns the indicator style + */ + style?: string; - export interface DrawIndicatorsEventArgs { + /** returns the current indicator element. + */ + indicatorElement?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the index of the indicator. + */ + indicatorIndex?: number; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; + } - /** returns the context element - */ - context?: any; + export interface DrawLabelsEventArgs { - /** returns the startX and startY of the indicator - */ - position?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the gauge model - */ - model?: any; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the context element + */ + context?: any; - /** returns the scaleIndex to which the indicator belongs. - */ - scaleIndex?: number; + /** returns the startX and startY of the labels + */ + position?: any; - /** returns the indicator style - */ - style?: string; + /** returns the gauge model + */ + model?: any; - /** returns the current indicator element. - */ - indicatorElement?: any; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the index of the indicator. - */ - indicatorIndex?: number; + /** returns the scaleIndex to which the label belongs. + */ + scaleIndex?: number; - /** returns the name of the event - */ - type?: string; - } + /** returns the label style + */ + style?: string; - export interface DrawLabelsEventArgs { + /** returns the angle of the labels. + */ + angle?: number; - /** returns the object of the gauge. - */ - object?: any; + /** returns the current label element. + */ + element?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the index of the label. + */ + index?: number; - /** returns the context element - */ - context?: any; + /** returns the value of the label. + */ + pointerValue?: number; - /** returns the startX and startY of the labels - */ - position?: any; + /** returns the name of the event + */ + type?: string; + } - /** returns the gauge model - */ - model?: any; + export interface DrawPointerCapEventArgs { - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the scaleIndex to which the label belongs. - */ - scaleIndex?: number; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the label style - */ - style?: string; + /** returns the context element + */ + context?: any; - /** returns the angle of the labels. - */ - angle?: number; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the current label element. - */ - element?: any; + /** returns the startX and startY of the pointer cap. + */ + position?: any; - /** returns the index of the label. - */ - index?: number; + /** returns the gauge model + */ + model?: any; - /** returns the value of the label. - */ - pointerValue?: number; + /** returns the pointer cap style + */ + style?: string; - /** returns the name of the event - */ - type?: string; - } + /** returns the name of the event + */ + type?: string; + } - export interface DrawPointerCapEventArgs { + export interface DrawPointersEventArgs { - /** returns the object of the gauge. - */ - object?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the context element - */ - context?: any; + /** returns the context element + */ + context?: any; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the startX and startY of the pointer + */ + position?: any; - /** returns the startX and startY of the pointer cap. - */ - position?: any; + /** returns the gauge model + */ + model?: any; - /** returns the gauge model - */ - model?: any; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the pointer cap style - */ - style?: string; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the name of the event - */ - type?: string; - } + /** returns the pointer style + */ + style?: string; - export interface DrawPointersEventArgs { + /** returns the angle of the pointer. + */ + angle?: number; - /** returns the object of the gauge. - */ - object?: any; + /** returns the current pointer element. + */ + element?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the index of the pointer. + */ + index?: number; - /** returns the context element - */ - context?: any; + /** returns the value of the pointer. + */ + value?: number; - /** returns the startX and startY of the pointer - */ - position?: any; + /** returns the name of the event + */ + type?: string; + } - /** returns the gauge model - */ - model?: any; + export interface DrawRangeEventArgs { - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the pointer style - */ - style?: string; + /** returns the context element + */ + context?: any; - /** returns the angle of the pointer. - */ - angle?: number; + /** returns the startX and startY of the range + */ + position?: any; - /** returns the current pointer element. - */ - element?: any; + /** returns the gauge model + */ + model?: any; - /** returns the index of the pointer. - */ - index?: number; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the value of the pointer. - */ - value?: number; + /** returns the scaleIndex to which the range belongs. + */ + scaleIndex?: number; - /** returns the name of the event - */ - type?: string; - } + /** returns the range style + */ + style?: string; - export interface DrawRangeEventArgs { + /** returns the current range element. + */ + rangeElement?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the index of the range. + */ + rangeIndex?: number; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; + } - /** returns the context element - */ - context?: any; + export interface DrawTicksEventArgs { - /** returns the startX and startY of the range - */ - position?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the gauge model - */ - model?: any; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the context element + */ + context?: any; - /** returns the scaleIndex to which the range belongs. - */ - scaleIndex?: number; + /** returns the startX and startY of the ticks + */ + position?: any; - /** returns the range style - */ - style?: string; + /** returns the gauge model + */ + model?: any; - /** returns the current range element. - */ - rangeElement?: any; + /** returns the options of the scale element. + */ + scaleElement?: any; - /** returns the index of the range. - */ - rangeIndex?: number; + /** returns the scaleIndex to which the tick belongs. + */ + scaleIndex?: number; - /** returns the name of the event - */ - type?: string; - } + /** returns the ticks style + */ + style?: string; - export interface DrawTicksEventArgs { + /** returns the angle of the tick. + */ + angle?: number; - /** returns the object of the gauge. - */ - object?: any; + /** returns the current tick element. + */ + element?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the index of the tick. + */ + index?: number; - /** returns the context element - */ - context?: any; + /** returns the label value of the tick. + */ + pointerValue?: number; - /** returns the startX and startY of the ticks - */ - position?: any; + /** returns the name of the event + */ + type?: string; + } - /** returns the gauge model - */ - model?: any; + export interface LoadEventArgs { - /** returns the options of the scale element. - */ - scaleElement?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the scaleIndex to which the tick belongs. - */ - scaleIndex?: number; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the ticks style - */ - style?: string; + /** returns the gauge model + */ + Model?: any; - /** returns the angle of the tick. - */ - angle?: number; + /** returns the entire scale element. + */ + scaleElement?: any; - /** returns the current tick element. - */ - element?: any; + /** returns the context element + */ + context?: any; - /** returns the index of the tick. - */ - index?: number; + /** returns the name of the event + */ + type?: string; + } - /** returns the label value of the tick. - */ - pointerValue?: number; + export interface MouseClickEventArgs { - /** returns the name of the event - */ - type?: string; - } + /** returns the object of the gauge. + */ + object?: any; - export interface LoadEventArgs { + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the object of the gauge. - */ - object?: any; + /** returns the gauge model + */ + model?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: any; - /** returns the gauge model - */ - Model?: any; + /** returns the scale element. + */ + scaleElement?: any; - /** returns the entire scale element. - */ - scaleElement?: any; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the context element - */ - context?: any; + /** returns the context element + */ + context?: any; - /** returns the name of the event - */ - type?: string; - } + /** returns the pointer Index + */ + index?: number; - export interface MouseClickEventArgs { + /** returns the pointer element. + */ + element?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the value of the pointer. + */ + value?: number; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the angle of the pointer. + */ + angle?: number; - /** returns the gauge model - */ - model?: any; + /** returns the pointer style + */ + style?: string; - /** returns the name of the event - */ - type?: any; + /** returns the startX and startY of the pointer. + */ + position?: any; + } - /** returns the scale element. - */ - scaleElement?: any; + export interface MouseClickMoveEventArgs { - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the object of the gauge. + */ + object?: any; - /** returns the context element - */ - context?: any; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the pointer Index - */ - index?: number; + /** returns the gauge model + */ + model?: any; - /** returns the pointer element. - */ - element?: any; + /** returns the name of the event + */ + type?: any; - /** returns the value of the pointer. - */ - value?: number; + /** returns the scale element. + */ + scaleElement?: any; - /** returns the angle of the pointer. - */ - angle?: number; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the pointer style - */ - style?: string; + /** returns the context element + */ + context?: any; - /** returns the startX and startY of the pointer. - */ - position?: any; - } + /** returns the pointer Index + */ + index?: number; - export interface MouseClickMoveEventArgs { + /** returns the pointer element. + */ + element?: any; - /** returns the object of the gauge. - */ - object?: any; + /** returns the value of the pointer. + */ + value?: number; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the angle of the pointer. + */ + angle?: number; - /** returns the gauge model - */ - model?: any; + /** returns the pointer style + */ + style?: string; - /** returns the name of the event - */ - type?: any; + /** returns the startX and startY of the pointer. + */ + position?: any; + } - /** returns the scale element. - */ - scaleElement?: any; + export interface MouseClickUpEventArgs { - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** returns the object of the gauge. + */ + object?: any; - /** returns the context element - */ - context?: any; + /** returns the cancel option value + */ + cancel?: boolean; - /** returns the pointer Index - */ - index?: number; + /** returns the gauge model + */ + model?: any; - /** returns the pointer element. - */ - element?: any; + /** returns the name of the event + */ + type?: any; - /** returns the value of the pointer. - */ - value?: number; + /** returns the scale element. + */ + scaleElement?: any; - /** returns the angle of the pointer. - */ - angle?: number; + /** returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; - /** returns the pointer style - */ - style?: string; + /** returns the context element + */ + context?: any; + + /** returns the pointer Index + */ + index?: number; - /** returns the startX and startY of the pointer. - */ - position?: any; - } + /** returns the pointer element. + */ + element?: any; - export interface MouseClickUpEventArgs { + /** returns the value of the pointer. + */ + value?: number; + + /** returns the angle of the pointer. + */ + angle?: number; + + /** returns the pointer style + */ + style?: string; + + /** returns the startX and startY of the pointer. + */ + position?: any; + } - /** returns the object of the gauge. - */ - object?: any; + export interface RenderCompleteEventArgs { + + /** returns the object of the gauge. + */ + object?: any; + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the context element + */ + context?: any; + + /** returns the entire scale element. + */ + scaleElement?: any; + + /** returns the gauge model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface Frame { + + /** Specify the URL of the frame background image for circular gauge + * @Default {null} + */ + backgroundImageUrl?: string; + + /** Specifies the frameType of circular gauge. See + * @Default {FullCircle} + */ + frameType?: ej.datavisualization.CircularGauge.FrameType|string; + + /** Specifies the end angle for the half circular frame. + * @Default {360} + */ + halfCircleFrameEndAngle?: number; + + /** Specifies the start angle for the half circular frame. + * @Default {180} + */ + halfCircleFrameStartAngle?: number; + } + + export interface ScalesBorder { + + /** Specify border color for scales of circular gauge + * @Default {null} + */ + color?: string; + + /** Specify border width of circular gauge + * @Default {1.5} + */ + width?: number; + } + + export interface ScalesCustomLabelsPosition { + + /** Specify x-axis position of label + * @Default {0} + */ + x?: number; + + /** Specify y-axis position of labels. + * @Default {0} + */ + y?: number; + } + + export interface ScalesCustomLabelsFont { + + /** Specify font fontFamily for custom labels. + * @Default {Arial} + */ + fontFamily?: string; + + /** Specify font Style for custom labels. + * @Default {Bold} + */ + fontStyle?: string; + + /** Specify font size for custom labels. + * @Default {12px} + */ + size?: string; + } + + export interface ScalesCustomLabel { + + /** Value of the custom labels. + */ + value?: string; + + /** Color of the custom labels. + */ + color?: string; + + /** Specify position of custom labels + * @Default {Object} + */ + position?: ScalesCustomLabelsPosition; + + /** Specify angle for the rotation of the custom labels in degrees. + * @Default {0} + */ + textAngle?: number; + + /** Specify font for custom labels + * @Default {Object} + */ + font?: ScalesCustomLabelsFont; + + /** Specifies the position of the custom labels. See + * @Default {inner} + */ + positionType?: ej.datavisualization.CircularGauge.CustomLabelPositionType|string; + } + + export interface ScalesIndicatorsPosition { + + /** Specify x-axis of position of circular gauge + * @Default {0} + */ + x?: number; + + /** Specify y-axis of position of circular gauge + * @Default {0} + */ + y?: number; + } + + export interface ScalesIndicatorsStateRange { + + /** Specify backgroundColor for indicator of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /** Specify borderColor for indicator of circular gauge + * @Default {null} + */ + borderColor?: string; + + /** Specify end value for each specified state of circular gauge + * @Default {0} + */ + endValue?: number; + + /** Specify value of the font as the indicator when the indicator style is set with the value "text" of circular gauge + * @Default {null} + */ + font?: any; + + /** Specify start value for each specified state of circular gauge + * @Default {0} + */ + startValue?: number; + + /** Specify value of the text as the indicator when the indicator style is set with the value "text" of circular gauge + */ + text?: string; + + /** Specify value of the textColor as the indicator when the indicator style is set with the value "text" of circular gauge + * @Default {null} + */ + textColor?: string; + } + + export interface ScalesIndicator { + + /** Specify indicator height of circular gauge + * @Default {15} + */ + height?: number; + + /** Specify imageUrl of circular gauge + * @Default {null} + */ + imageUrl?: string; + + /** Specify position of circular gauge + * @Default {Object} + */ + position?: ScalesIndicatorsPosition; + + /** Specify the various states of circular gauge + * @Default {Array} + */ + stateRanges?: ScalesIndicatorsStateRange[]; + + /** Specify indicator style of circular gauge. See + * @Default {Circle} + */ + type?: ej.datavisualization.CircularGauge.IndicatorTypes|string; + + /** Specify indicator width of circular gauge + * @Default {15} + */ + width?: number; + } + + export interface ScalesLabelsFont { + + /** Specify font fontFamily for labels of circular gauge + * @Default {Arial} + */ + fontFamily?: string; + + /** Specify font Style for labels of circular gauge + * @Default {Bold} + */ + fontStyle?: string; + + /** Specify font size for labels of circular gauge + * @Default {11px} + */ + size?: string; + } + + export interface ScalesLabel { + + /** Specify the angle for the labels of circular gauge + * @Default {0} + */ + angle?: number; + + /** Specify labels autoAngle value of circular gauge + * @Default {false} + */ + autoAngle?: boolean; + + /** Specify label color of circular gauge + * @Default {null} + */ + color?: string; + + /** Specify distanceFromScale value for labels of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /** Specify font for labels of circular gauge + * @Default {Object} + */ + font?: ScalesLabelsFont; + + /** Specify includeFirstValue of circular gauge + * @Default {true} + */ + includeFirstValue?: boolean; + + /** Specify opacity value for labels of circular gauge + * @Default {null} + */ + opacity?: number; + + /** Specify label placement of circular gauge. See + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /** Specify label Style of circular gauge. See + * @Default {Major} + */ + type?: ej.datavisualization.CircularGauge.LabelType|string; + + /** Specify unitText of circular gauge + */ + unitText?: string; + + /** Specify unitTextPosition of circular gauge. See UnitTextPosition + * @Default {Back} + */ + unitTextPosition?: ej.datavisualization.CircularGauge.UnitTextPlacement|string; + } + + export interface ScalesPointerCap { + + /** Specify cap backgroundColor of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /** Specify cap borderColor of circular gauge + * @Default {null} + */ + borderColor?: string; + + /** Specify pointerCap borderWidth value of circular gauge + * @Default {3} + */ + borderWidth?: number; + + /** Specify cap interiorGradient value of circular gauge + * @Default {null} + */ + interiorGradient?: any; + + /** Specify pointerCap Radius value of circular gauge + * @Default {7} + */ + radius?: number; + } + + export interface ScalesPointersBorder { + + /** Specify border color for pointer of circular gauge + * @Default {null} + */ + color?: string; + + /** Specify border width for pointers of circular gauge + * @Default {1.5} + */ + width?: number; + } + + export interface ScalesPointersPointerValueTextFont { + + /** Specify pointer value text font family of circular gauge. + * @Default {Arial} + */ + fontFamily?: string; + + /** Specify pointer value text font style of circular gauge. + * @Default {Bold} + */ + fontStyle?: string; + + /** Specify pointer value text size of circular gauge. + * @Default {11px} + */ + size?: string; + } + + export interface ScalesPointersPointerValueText { + + /** Specify pointer text angle of circular gauge. + * @Default {0} + */ + angle?: number; + + /** Specify pointer text auto angle of circular gauge. + * @Default {false} + */ + autoAngle?: boolean; + + /** Specify pointer value text color of circular gauge. + * @Default {#8c8c8c} + */ + color?: string; + + /** Specify pointer value text distance from pointer of circular gauge. + * @Default {20} + */ + distance?: number; + + /** Specify pointer value text font option of circular gauge. + * @Default {object} + */ + font?: ScalesPointersPointerValueTextFont; + + /** Specify pointer value text opacity of circular gauge. + * @Default {1} + */ + opacity?: number; + + /** enable pointer value text visibility of circular gauge. + * @Default {false} + */ + showValue?: boolean; + } + + export interface ScalesPointer { + + /** Specify backgroundColor for the pointer of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /** Specify backNeedleLength of circular gauge + * @Default {10} + */ + backNeedleLength?: number; + + /** Specify the border for pointers of circular gauge + * @Default {Object} + */ + border?: ScalesPointersBorder; + + /** Specify distanceFromScale value for pointers of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /** Specify pointer gradients of circular gauge + * @Default {null} + */ + gradients?: any; + + /** Specify pointer image of circular gauge.It is applicable for both marker as well as needle type pointers. + * @Default {NULL} + */ + imageUrl?: string; + + /** Specify pointer length of circular gauge + * @Default {150} + */ + length?: number; + + /** Specify marker Style value of circular gauge. See + * @Default {Rectangle} + */ + markerType?: ej.datavisualization.CircularGauge.MarkerType|string; + + /** Specify needle Style value of circular gauge. See + * @Default {Triangle} + */ + needleType?: ej.datavisualization.CircularGauge.NeedleType|string; + + /** Specify opacity value for pointer of circular gauge + * @Default {1} + */ + opacity?: number; + + /** Specify radius value for pointer of circular gauge + * @Default {null} + */ + radius?: number; + + /** Specify pointer Placement value of circular gauge. See PointerPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /** Specify pointer value text of circular gauge. + * @Default {Object} + */ + pointerValueText?: ScalesPointersPointerValueText; + + /** Specify showBackNeedle value of circular gauge + * @Default {false} + */ + showBackNeedle?: boolean; + + /** Specify pointer type value of circular gauge. See + * @Default {Needle} + */ + type?: ej.datavisualization.CircularGauge.PointerType|string; + + /** Specify value of the pointer of circular gauge + * @Default {null} + */ + value?: number; + + /** Specify pointer width of circular gauge + * @Default {7} + */ + width?: number; + } + + export interface ScalesRangesBorder { + + /** Specify border color for ranges of circular gauge + * @Default {#32b3c6} + */ + color?: string; + + /** Specify border width for ranges of circular gauge + * @Default {1.5} + */ + width?: number; + } + + export interface ScalesRange { + + /** Specify backgroundColor for the ranges of circular gauge + * @Default {#32b3c6} + */ + backgroundColor?: string; + + /** Specify text for the ranges of circular gauge + * @Default {null} + */ + legendText?: string; + + /** Specify border for ranges of circular gauge + * @Default {Object} + */ + border?: ScalesRangesBorder; + + /** Specify distanceFromScale value for ranges of circular gauge + * @Default {25} + */ + distanceFromScale?: number; + + /** Specify endValue for ranges of circular gauge + * @Default {null} + */ + endValue?: number; + + /** Specify endWidth for ranges of circular gauge + * @Default {10} + */ + endWidth?: number; + + /** Specify range gradients of circular gauge + * @Default {null} + */ + gradients?: any; + + /** Specify opacity value for ranges of circular gauge + * @Default {null} + */ + opacity?: number; + + /** Specify placement of circular gauge. See RangePlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /** Specify size of the range value of circular gauge + * @Default {5} + */ + size?: number; + + /** Specify startValue for ranges of circular gauge + * @Default {null} + */ + startValue?: number; + + /** Specify startWidth of circular gauge + * @Default {[Array.number] scale.ranges.startWidth = 10} + */ + startWidth?: number; + } + + export interface ScalesSubGaugesPosition { + + /** Specify x-axis position for sub-gauge of circular gauge + * @Default {0} + */ + x?: number; + + /** Specify y-axis position for sub-gauge of circular gauge + * @Default {0} + */ + y?: number; + } + + export interface ScalesSubGauge { + + /** Specify subGauge Height of circular gauge + * @Default {150} + */ + height?: number; + + /** Specify position for sub-gauge of circular gauge + * @Default {Object} + */ + position?: ScalesSubGaugesPosition; + + /** Specify subGauge Width of circular gauge + * @Default {150} + */ + width?: number; + } + + export interface ScalesTick { + + /** Specify the angle for the ticks of circular gauge + * @Default {0} + */ + angle?: number; + + /** Specify tick color of circular gauge + * @Default {null} + */ + color?: string; + + /** Specify distanceFromScale value for ticks of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /** Specify tick height of circular gauge + * @Default {16} + */ + height?: number; + + /** Specify tick placement of circular gauge. See TickPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /** Specify tick Style of circular gauge. See TickType + * @Default {Major} + */ + type?: ej.datavisualization.CircularGauge.LabelType|string; + + /** Specify tick width of circular gauge + * @Default {3} + */ + width?: number; + } + + export interface Scale { + + /** Specify backgroundColor for the scale of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /** Specify border for scales of circular gauge + * @Default {Object} + */ + border?: ScalesBorder; + + /** Specify scale direction of circular gauge. See + * @Default {Clockwise} + */ + direction?: ej.datavisualization.CircularGauge.Direction|string; + + /** Specify the custom labels for the scales. + * @Default {Array} + */ + customLabels?: ScalesCustomLabel[]; + + /** Specify representing state of circular gauge + * @Default {Array} + */ + indicators?: ScalesIndicator[]; + + /** Specify the text values displayed in a meaningful manner alongside the ticks of circular gauge + * @Default {Array} + */ + labels?: ScalesLabel[]; + + /** Specify majorIntervalValue of circular gauge + * @Default {10} + */ + majorIntervalValue?: number; + + /** Specify maximum scale value of circular gauge + * @Default {null} + */ + maximum?: number; + + /** Specify minimum scale value of circular gauge + * @Default {null} + */ + minimum?: number; + + /** Specify minorIntervalValue of circular gauge + * @Default {2} + */ + minorIntervalValue?: number; + + /** Specify opacity value of circular gauge + * @Default {1} + */ + opacity?: number; + + /** Specify pointer cap of circular gauge + * @Default {Object} + */ + pointerCap?: ScalesPointerCap; + + /** Specify pointers value of circular gauge + * @Default {Array} + */ + pointers?: ScalesPointer[]; + + /** Specify scale radius of circular gauge + * @Default {170} + */ + radius?: number; + + /** Specify ranges value of circular gauge + * @Default {Array} + */ + ranges?: ScalesRange[]; + + /** Specify shadowOffset value of circular gauge + * @Default {0} + */ + shadowOffset?: number; + + /** Specify showIndicators of circular gauge + * @Default {false} + */ + showIndicators?: boolean; + + /** Specify showLabels of circular gauge + * @Default {true} + */ + showLabels?: boolean; + + /** Specify showPointers of circular gauge + * @Default {true} + */ + showPointers?: boolean; + + /** Specify showRanges of circular gauge + * @Default {false} + */ + showRanges?: boolean; + + /** Specify showScaleBar of circular gauge + * @Default {false} + */ + showScaleBar?: boolean; + + /** Specify showTicks of circular gauge + * @Default {true} + */ + showTicks?: boolean; + + /** Specify scaleBar size of circular gauge + * @Default {6} + */ + size?: number; + + /** Specify startAngle of circular gauge + * @Default {115} + */ + startAngle?: number; + + /** Specify subGauge of circular gauge + * @Default {Array} + */ + subGauges?: ScalesSubGauge[]; + + /** Specify sweepAngle of circular gauge + * @Default {310} + */ + sweepAngle?: number; + + /** Specify ticks of circular gauge + * @Default {Array} + */ + ticks?: ScalesTick[]; + } + + export interface LegendBorder { + + /** Border color of the legend. + * @Default {transparent} + */ + color?: string; + + /** Border width of the legend. + * @Default {1} + */ + width?: number; + } + + export interface LegendItemStyleBorder { + + /** Border color of the legend items. + * @Default {transparent} + */ + color?: string; + + /** Border width of the legend items. + * @Default {1} + */ + width?: number; + } + + export interface LegendItemStyle { + + /** Options for customizing the border of legend items. + */ + border?: LegendItemStyleBorder; + + /** Specifies the height of the legend item shapes. + * @Default {10} + */ + height?: number; + + /** Specifies the width of the legend item shapes. + * @Default {10} + */ + width?: number; + } + + export interface LegendSize { + + /** Specify the height of the legend. Height can be specified in pixel. + * @Default {null} + */ + height?: string; + + /** Specify the width of the legend. Width can be specified in pixel. + * @Default {null} + */ + width?: string; + } + + export interface LegendFont { + + /** Font family for legend item text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend item text. + * @Default {Normal} + */ + fontStyle?: string; + + /** Font weight for legend item text. + * @Default {Regular} + */ + fontWeight?: string; + + /** Font size for legend item text. + * @Default {12px} + */ + size?: string; + + /** Font color of the text for legend items. + * @Default {null} + */ + color?: string; + } + + export interface Legend { + + /** Toggles the visibility of the legend. + * @Default {false} + */ + visible?: boolean; + + /** Toggles the visibility of the ranges. + * @Default {true} + */ + toggleVisibility?: boolean; + + /** Specifies the alignment of the legend. + * @Default {Center. See Alignment} + */ + alignment?: ej.datavisualization.CircularGauge.LegendAlignment|string; + + /** Options for customizing the legend border. + */ + border?: LegendBorder; + + /** Fill color for the legend items. By using this property, it displays all legend item shapes in same color.Legend items representing invisible ranges is displayed in gray color. + * @Default {null} + */ + fill?: string; + + /** Gap or padding between the legend items. + * @Default {20} + */ + itemPadding?: number; + + /** Options to customize the style of legend items. + */ + itemStyle?: LegendItemStyle; + + /** Opacity of the legend. + * @Default {1} + */ + opacity?: number; + + /** Places the legend at specified position. Legend can be placed at **left**, **right**, **top** or **bottom** of the circular gauge. + * @Default {Bottom. See Position} + */ + position?: ej.datavisualization.CircularGauge.LegendPosition|string; + + /** Shape of the legend items. + * @Default {Circle. See Shape} + */ + shape?: ej.datavisualization.CircularGauge.LegendShape|string; + + /** Options to customize the size of the legend. + */ + size?: LegendSize; + + /** Options to customize the font used for legend item text. + */ + font?: LegendFont; + } + + export interface Tooltip { + + /** enable showCustomLabelTooltip of circular gauge + * @Default {false} + */ + showCustomLabelTooltip?: boolean; + + /** enable showLabelTooltip of circular gauge + * @Default {false} + */ + showLabelTooltip?: boolean; + + /** Specify tooltip templateID of circular gauge + * @Default {false} + */ + templateID?: string; + } + } + namespace CircularGauge { + enum RangeZOrderPlacement { + //string + Rear, + //string + Front, + } + } + namespace CircularGauge { + enum FrameType { + //string + FullCircle, + //string + HalfCircle, + } + } + namespace CircularGauge { + enum gaugePosition { + //string + TopLeft, + //string + TopRight, + //string + TopCenter, + //string + MiddleLeft, + //string + MiddleRight, + //string + Center, + //string + BottomLeft, + //string + BottomRight, + //string + BottomCenter, + } + } + namespace CircularGauge { + enum OuterCustomLabelPosition { + //string + Top, + //string + Bottom, + //string + Right, + //string + Left, + } + } + namespace CircularGauge { + enum Direction { + //string + Clockwise, + //string + CounterClockwise, + } + } + namespace CircularGauge { + enum CustomLabelPositionType { + //string + Inner, + //string + Outer, + } + } + namespace CircularGauge { + enum IndicatorTypes { + //string + Rectangle, + //string + Circle, + //string + Text, + //string + RoundedRectangle, + //string + Image, + } + } + namespace CircularGauge { + enum Placement { + //string + Near, + //string + Far, + } + } + namespace CircularGauge { + enum LabelType { + //string + Major, + //string + Minor, + } + } + namespace CircularGauge { + enum UnitTextPlacement { + //string + Back, + //string + Front, + } + } + namespace CircularGauge { + enum MarkerType { + //string + Rectangle, + //string + Circle, + //string + Triangle, + //string + Ellipse, + //string + Diamond, + //string + Pentagon, + //string + Slider, + //string + Pointer, + //string + Wedge, + //string + Trapezoid, + //string + RoundedRectangle, + //string + Image, + } + } + namespace CircularGauge { + enum NeedleType { + //string + Triangle, + //string + Rectangle, + //string + Arrow, + //string + Image, + //string + Trapezoid, + } + } + namespace CircularGauge { + enum PointerType { + //string + Needle, + //string + Marker, + } + } + namespace CircularGauge { + enum LegendAlignment { + //string + Center, + //string + Near, + //string + Far, + } + } + namespace CircularGauge { + enum LegendPosition { + //string + Left, + //string + Right, + //string + Top, + //string + Bottom, + } + } + namespace CircularGauge { + enum LegendShape { + //string + Rectangle, + //string + Circle, + //string + Triangle, + //string + Ellipse, + //string + Diamond, + //string + Pentagon, + //string + Slider, + //string + Trapezoid, + //string + Line, + } + } + + class DigitalGauge extends ej.Widget { + static fn: DigitalGauge; + constructor(element: JQuery | Element, options?: DigitalGauge.Model); + static Locale: any; + model: DigitalGauge.Model; + defaults: DigitalGauge.Model; + + /** To destroy the digital gauge + * @returns {void} + */ + destroy(): void; + + /** To export Digital Gauge as Image + * @param {string} fileName for the Image + * @param {string} fileType for the Image + * @returns {boolean} + */ + exportImage(fileName: string, fileType: string): boolean; + + /** Gets the location of an item that is displayed on the gauge. + * @param {number} Position value of an item that is displayed on the gauge. + * @returns {any} + */ + getPosition(itemIndex: number): any; + + /** ClientSideMethod getValue Gets the value of an item that is displayed on the gauge + * @param {number} Index value of an item that displayed on the gauge + * @returns {any} + */ + getValue(itemIndex: number): any; + + /** Refresh the digital gauge widget + * @returns {void} + */ + refresh(): void; + + /** ClientSideMethod Set Position Sets the location of an item to be displayed in the gauge + * @param {number} Index value of the digital gauge item + * @param {any} Location value of the digital gauge + * @returns {void} + */ + setPosition(itemIndex: number, value: any): void; + + /** ClientSideMethod SetValue Sets the value of an item to be displayed in the gauge. + * @param {number} Index value of the digital gauge item + * @param {string} Text value to be displayed in the gaugeS + * @returns {void} + */ + setValue(itemIndex: number, value: string): void; + } + export namespace DigitalGauge { + + export interface Model { + + /** Specifies the frame of the Digital gauge. + * @Default {{backgroundImageUrl: null, innerWidth: 6, outerWidth: 10}} + */ + frame?: Frame; + + /** Specifies the height of the DigitalGauge. + * @Default {150} + */ + height?: number; + + /** Specifies the resize option of the DigitalGauge. + * @Default {false} + */ + isResponsive?: boolean; + + /** Specifies the responsiveness of the Digital gauge + * @Default {false} + */ + enableResize?: boolean; + + /** Specifies the items for the DigitalGauge. + * @Default {null} + */ + items?: Item[]; + + /** Specifies the matrixSegmentData for the DigitalGauge. + */ + matrixSegmentData?: any; + + /** Specifies the segmentData for the DigitalGauge. + */ + segmentData?: any; + + /** Specifies the themes for the Digital gauge. See Themes + * @Default {flatlight} + */ + themes?: string; + + /** Specifies the value to the DigitalGauge. + * @Default {text} + */ + value?: string; + + /** Specifies the width for the Digital gauge. + * @Default {400} + */ + width?: number; + + /** Triggers when the gauge is initialized. + */ + init?(e: InitEventArgs): void; + + /** Triggers when the gauge item rendering. + */ + itemRendering?(e: ItemRenderingEventArgs): void; + + /** Triggers when the gauge is start to load. + */ + load?(e: LoadEventArgs): void; + + /** Triggers when the gauge render is completed. + */ + renderComplete?(e: RenderCompleteEventArgs): void; + } + + export interface InitEventArgs { + + /** returns the object of the gauge. + */ + object?: any; + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the all the options of the items. + */ + items?: any; + + /** returns the context element + */ + context?: any; + + /** returns the gauge model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface ItemRenderingEventArgs { + + /** returns the object of the gauge. + */ + object?: any; - /** returns the cancel option value - */ - cancel?: boolean; + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the all the options of the items. + */ + items?: any; + + /** returns the context element + */ + context?: any; + + /** returns the gauge model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface LoadEventArgs { + + /** returns the object of the gauge. + */ + object?: any; + + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the all the options of the items. + */ + items?: any; + + /** returns the context element + */ + context?: any; + + /** returns the gauge model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface RenderCompleteEventArgs { - /** returns the gauge model - */ - model?: any; + /** returns the object of the gauge. + */ + object?: any; - /** returns the name of the event - */ - type?: any; + /** returns the cancel option value + */ + cancel?: boolean; + + /** returns the all the options of the items. + */ + items?: any; + + /** returns the context element + */ + context?: any; + + /** returns the gauge model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface Frame { + + /** Specifies the URL of an image to be displayed as background of the Digital gauge. + * @Default {null} + */ + backgroundImageUrl?: string; + + /** Specifies the inner width for the frame, when the background image has been set for the Digital gauge.. + * @Default {6} + */ + innerWidth?: number; + + /** Specifies the outer width of the frame, when the background image has been set for the Digital gauge. + * @Default {10} + */ + outerWidth?: number; + } + + export interface ItemsCharacterSettings { + + /** Specifies the CharacterCount value for the DigitalGauge. + * @Default {4} + */ + count?: number; + + /** Specifies the opacity value for the DigitalGauge. + * @Default {1} + */ + opacity?: number; + + /** Specifies the value for spacing between the characters + * @Default {2} + */ + spacing?: number; + + /** Specifies the character type for the text to be displayed. + * @Default {ej.datavisualization.DigitalGauge.CharacterType.EightCrossEightDotMatrix} + */ + type?: ej.datavisualization.DigitalGauge.CharacterType|string; + } + + export interface ItemsFont { + + /** Set the font family value + * @Default {Arial} + */ + fontFamily?: string; + + /** Set the font style for the font + * @Default {italic} + */ + fontStyle?: ej.datavisualization.DigitalGauge.FontStyle|string; + + /** Set the font size value + * @Default {11px} + */ + size?: string; + } + + export interface ItemsPosition { + + /** Set the horizontal location for the text, where it needs to be placed within the gauge. + * @Default {0} + */ + x?: number; + + /** Set the vertical location for the text, where it needs to be placed within the gauge. + * @Default {0} + */ + y?: number; + } + + export interface ItemsSegmentSettings { + + /** Set the color for the text segments. + * @Default {null} + */ + color?: string; + + /** Set the gradient for the text segments. + * @Default {null} + */ + gradient?: any; + + /** Set the length for the text segments. + * @Default {2} + */ + length?: number; + + /** Set the opacity for the text segments. + * @Default {0} + */ + opacity?: number; + + /** Set the spacing for the text segments. + * @Default {1} + */ + spacing?: number; + + /** Set the width for the text segments. + * @Default {1} + */ + width?: number; + } + + export interface Item { + + /** Specifies the Character settings for the DigitalGauge. + * @Default {null} + */ + characterSettings?: ItemsCharacterSettings; + + /** Enable/Disable the custom font to be applied to the text in the gauge. + * @Default {false} + */ + enableCustomFont?: boolean; + + /** Set the specific font for the text, when the enableCustomFont is set to true + * @Default {null} + */ + font?: ItemsFont; + + /** Set the location for the text, where it needs to be placed within the gauge. + * @Default {null} + */ + position?: ItemsPosition; + + /** Set the segment settings for the digital gauge. + * @Default {null} + */ + segmentSettings?: ItemsSegmentSettings; + + /** Set the value for enabling/disabling the blurring effect for the shadows of the text + * @Default {0} + */ + shadowBlur?: number; + + /** Specifies the color of the text shadow. + * @Default {null} + */ + shadowColor?: string; + + /** Set the x offset value for the shadow of the text, indicating the location where it needs to be displayed. + * @Default {1} + */ + shadowOffsetX?: number; + + /** Set the y offset value for the shadow of the text, indicating the location where it needs to be displayed. + * @Default {1} + */ + shadowOffsetY?: number; + + /** Set the alignment of the text that is displayed within the gauge.See TextAlign + * @Default {left} + */ + textAlign?: string; + + /** Specifies the color of the text. + * @Default {null} + */ + textColor?: string; + + /** Specifies the text value. + * @Default {null} + */ + value?: string; + } + } + namespace DigitalGauge { + enum CharacterType { + //string + SevenSegment, + //string + FourteenSegment, + //string + SixteenSegment, + //string + EightCrossEightDotMatrix, + //string + EightCrossEightSquareMatrix, + } + } + namespace DigitalGauge { + enum FontStyle { + //string + Normal, + //string + Bold, + //string + Italic, + //string + Underline, + //string + Strikeout, + } + } + + class Chart extends ej.Widget { + static fn: Chart; + constructor(element: JQuery | Element, options?: Chart.Model); + static Locale: any; + model: Chart.Model; + defaults: Chart.Model; + + /** Animates the series and/or indicators in Chart. When parameter is not passed to this method, then all the series and indicators present in Chart are animated. + * @param {any} If an array collection is passed as parameter, series and indicator objects passed in array collection are animated.ExampleIf a series or indicator object is passed + * to this method, then the specific series or indicator is animated.Example, + * @returns {void} + */ + animate(options: any): void; + + /** Prints the rendered chart. + * @returns {void} + */ + print(): void; + + /** Exports chart as an image or to an excel file. Chart can be exported as an image only when exportCanvasRendering option is set to true. + * @param {string} Type of the export operation to be performed. Following are the two export types that are supported now,1. 'image'2. 'excel'Example + * @param {string} URL of the service, where the chart will be exported to excel.Example, + * @param {boolean} When this parameter is true, all the chart objects initialized to the same document are exported to a single excel file. This is an optional parameter. By + * default, it is false.Example, + * @returns {any} + */ + export(type: string, URL: string, exportMultipleChart: boolean): any; + + /** Redraws the entire chart. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; + } + export namespace Chart { + + export interface Model { + + /** Options for adding and customizing annotations in Chart. + */ + annotations?: Annotation[]; + + /** Sets the background color of the chart. + * @Default {transparent} + */ + background?: string; + + /** URL of the image to be used as chart background. + * @Default {null} + */ + backGroundImageUrl?: string; + + /** Options for customizing the color, opacity and width of the chart border. + */ + border?: Border; + + /** This provides options for customizing export settings + */ + exportSettings?: ExportSettings; + + /** Options for configuring the border and background of the plot area. + */ + chartArea?: ChartArea; + + /** Options to split Chart into multiple plotting areas vertically. Each object in the collection represents a plotting area in Chart. + */ + columnDefinitions?: ColumnDefinition[]; + + /** Options for configuring the properties of all the series. You can also override the options for specific series by using series collection. + */ + commonSeriesOptions?: CommonSeriesOptions; + + /** Options for displaying the chart along with selected points while loading + * @Default {[ ]} + */ + selectedDataPointIndexes?: any[]; + + /** Options for displaying and customizing the crosshair. + */ + crosshair?: Crosshair; + + /** Depth of the 3D Chart from front view of series to background wall. This property is applicable only for 3D view. + * @Default {100} + */ + depth?: number; + + /** Controls whether 3D view has to be enabled or not. 3D view is supported only for column, bar. Stacking column, stacking bar, pie and doughnut series types. + * @Default {false} + */ + enable3D?: boolean; + + /** Controls whether Chart has to be rendered as Canvas or SVG. Canvas rendering supports all functionalities in SVG rendering except 3D Charts. + * @Default {false} + */ + enableCanvasRendering?: boolean; + + /** Controls whether the series has to be rendered at initial loading of chart, this will be useful in scenarios where chart is placed at the bottom of the web page and we need to + * render the series only when the chart is visible while scrolling to the top. + * @Default {true} + */ + initSeriesRender?: boolean; + + /** Controls whether 3D view has to be rotated on dragging. This property is applicable only for 3D view. + * @Default {false} + */ + enableRotation?: boolean; + + /** Options to customize the technical indicators. + */ + indicators?: Indicator[]; + + /** Controls whether Chart has to be responsive while resizing. + * @Default {false} + */ + isResponsive?: boolean; + + /** Options to customize the legend items and legend title. + */ + legend?: Legend; + + /** Name of the culture based on which chart should be localized. Number and date time values are localized with respect to the culture name.String type properties like title text are + * not localized automatically. Provide localized text as value to string type properties. + * @Default {en-US} + */ + locale?: string; + + /** Palette is used to store the series fill color in array and apply the color to series collection in the order of series index. + * @Default {null} + */ + palette?: any[]; + + /** Options to customize the left, right, top and bottom margins of chart area. + */ + Margin?: any; + + /** Perspective angle of the 3D view. Chart appears closer when perspective angle is decreased, and distant when perspective angle is increased.This property is applicable only when + * 3D view is enabled + * @Default {90} + */ + perspectiveAngle?: number; + + /** This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. To override x axis for particular series, create + * an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s xAxisName property to link both axis and series. + */ + primaryXAxis?: PrimaryXAxis; + + /** To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s + * xAxisName property to link both axis and series. + */ + axes?: Axis[]; + + /** This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. To override y axis for particular series, create an + * axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s yAxisName property to link both axis and series. + */ + primaryYAxis?: PrimaryYAxis; + + /** Rotation angle of the 3D view. This property is applicable only when 3D view is enabled. + * @Default {0} + */ + rotation?: number; + + /** Options to split Chart into multiple plotting areas horizontally. Each object in the collection represents a plotting area in Chart. + */ + rowDefinitions?: RowDefinition[]; + + /** Specifies the properties used for customizing the series. + */ + series?: Series[]; + + /** Controls whether data points has to be displayed side by side or along the depth of the axis. + * @Default {false} + */ + sideBySideSeriesPlacement?: boolean; + + /** Options to customize the Chart size. + */ + size?: Size; + + /** Specifies the theme for Chart. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Chart.Theme|string; + + /** Slope angle of 3D Chart. This property is applicable only when 3D view is enabled. + * @Default {0} + */ + tilt?: number; + + /** Options for customizing the title and subtitle of Chart. + */ + title?: Title; + + /** Width of the wall used in 3D Chart. Wall is present only in Cartesian type 3D series and not in 3D pie or Doughnut series. This property is applicable only when 3D view is enabled. + * @Default {2} + */ + wallSize?: number; + + /** Options for enabling zooming feature of chart. + */ + zooming?: Zooming; + + /** Fires after the series animation is completed. This event will be triggered for each series when animation is enabled. + */ + animationComplete?(e: AnimationCompleteEventArgs): void; + + /** Fires before rendering the labels. This event is fired for each label in axis. You can use this event to add custom text to axis labels. + */ + axesLabelRendering?(e: AxesLabelRenderingEventArgs): void; + + /** Fires during the initialization of axis labels. + */ + axesLabelsInitialize?(e: AxesLabelsInitializeEventArgs): void; + + /** Fires during axes range calculation. This event is fired for each axis present in Chart. You can use this event to customize axis range as required. + */ + axesRangeCalculate?(e: AxesRangeCalculateEventArgs): void; + + /** Fires before rendering the axis title. This event is triggered for each axis with title. You can use this event to add custom text to axis title. + */ + axesTitleRendering?(e: AxesTitleRenderingEventArgs): void; + + /** Fires during the calculation of chart area bounds. You can use this event to customize the bounds of chart area. + */ + chartAreaBoundsCalculate?(e: ChartAreaBoundsCalculateEventArgs): void; + + /** Fires after chart is created. + */ + create?(e: CreateEventArgs): void; + + /** Fires when chart is destroyed completely. + */ + destroy?(e: DestroyEventArgs): void; + + /** Fires before rendering the data labels. This event is triggered for each data label in the series. You can use this event to add custom text in data labels. + */ + displayTextRendering?(e: DisplayTextRenderingEventArgs): void; + + /** Fires during the calculation of legend bounds. You can use this event to customize the bounds of legend. + */ + legendBoundsCalculate?(e: LegendBoundsCalculateEventArgs): void; + + /** Fires on clicking the legend item. + */ + legendItemClick?(e: LegendItemClickEventArgs): void; + + /** Fires when moving mouse over legend item. You can use this event for hit testing on legend items. + */ + legendItemMouseMove?(e: LegendItemMouseMoveEventArgs): void; + + /** Fires before rendering the legend item. This event is fired for each legend item in Chart. You can use this event to customize legend item shape or add custom text to legend item. + */ + legendItemRendering?(e: LegendItemRenderingEventArgs): void; + + /** Fires before loading the chart. + */ + load?(e: LoadEventArgs): void; + + /** Fires while performing rectangle zooming in chart. + */ + zoomed?(e: ZoomedEventArgs): void; + + /** Fires after selected the data in chart. + */ + rangeSelected?(e: RangeSelectedEventArgs): void; + + /** Fires on clicking a point in chart. You can use this event to handle clicks made on points. + */ + pointRegionClick?(e: PointRegionClickEventArgs): void; + + /** Fires when mouse is moved over a point. + */ + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; + + /** Fires before rendering chart. + */ + preRender?(e: PreRenderEventArgs): void; + + /** Fires after selecting a series. This event is triggered after selecting a series only if selection mode is series. + */ + seriesRegionClick?(e: SeriesRegionClickEventArgs): void; + + /** Fires before rendering a series. This event is fired for each series in Chart. + */ + seriesRendering?(e: SeriesRenderingEventArgs): void; + + /** Fires before rendering the marker symbols. This event is triggered for each marker in Chart. + */ + symbolRendering?(e: SymbolRenderingEventArgs): void; + + /** Fires before rendering the Chart title. You can use this event to add custom text in Chart title. + */ + titleRendering?(e: TitleRenderingEventArgs): void; + + /** Fires before rendering the tooltip. This event is fired when tooltip is enabled and mouse is hovered on a Chart point. You can use this event to customize tooltip before rendering. + */ + toolTipInitialize?(e: ToolTipInitializeEventArgs): void; - /** returns the scale element. - */ - scaleElement?: any; + /** Fires before rendering crosshair tooltip in axis. This event is fired for each axis with crosshair label enabled. You can use this event to customize crosshair label before + * rendering + */ + trackAxisToolTip?(e: TrackAxisToolTipEventArgs): void; - /** returns the scaleIndex to which the pointer belongs. - */ - scaleIndex?: number; + /** Fires before rendering trackball tooltip. This event is fired for each series in Chart because trackball tooltip is displayed for all the series. You can use this event to + * customize the text displayed in trackball tooltip. + */ + trackToolTip?(e: TrackToolTipEventArgs): void; - /** returns the context element - */ - context?: any; - - /** returns the pointer Index - */ - index?: number; + /** Fires, on clicking the axis label. + */ + axisLabelClick?(e: AxisLabelClickEventArgs): void; - /** returns the pointer element. - */ - element?: any; + /** Fires on moving mouse over the axis label. + */ + axisLabelMouseMove?(e: AxisLabelMouseMoveEventArgs): void; - /** returns the value of the pointer. - */ - value?: number; - - /** returns the angle of the pointer. - */ - angle?: number; - - /** returns the pointer style - */ - style?: string; - - /** returns the startX and startY of the pointer. - */ - position?: any; - } + /** Fires, on the clicking the chart. + */ + chartClick?(e: ChartClickEventArgs): void; - export interface RenderCompleteEventArgs { - - /** returns the object of the gauge. - */ - object?: any; - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the context element - */ - context?: any; - - /** returns the entire scale element. - */ - scaleElement?: any; - - /** returns the gauge model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface Frame { - - /** Specify the URL of the frame background image for circular gauge - * @Default {null} - */ - backgroundImageUrl?: string; - - /** Specifies the frameType of circular gauge. See Frame - * @Default {FullCircle} - */ - frameType?: ej.datavisualization.CircularGauge.FrameType | string; - - /** Specifies the end angle for the half circular frame. - * @Default {360} - */ - halfCircleFrameEndAngle?: number; - - /** Specifies the start angle for the half circular frame. - * @Default {180} - */ - halfCircleFrameStartAngle?: number; - } - - export interface ScalesBorder { - - /** Specify border color for scales of circular gauge - * @Default {null} - */ - color?: string; - - /** Specify border width of circular gauge - * @Default {1.5} - */ - width?: number; - } - - export interface ScalesCustomLabelsPosition { - - /** Specify x-axis position of label - * @Default {0} - */ - x?: number; - - /** Specify y-axis position of labels. - * @Default {0} - */ - y?: number; - } - - export interface ScalesCustomLabelsFont { - - /** Specify font fontFamily for custom labels. - * @Default {Arial} - */ - fontFamily?: string; - - /** Specify font Style for custom labels. - * @Default {Bold} - */ - fontStyle?: string; - - /** Specify font size for custom labels. - * @Default {12px} - */ - size?: string; - } - - export interface ScalesCustomLabel { - - /** Value of the custom labels. - */ - value?: string; - - /** Color of the custom labels. - */ - color?: string; - - /** Specify position of custom labels - * @Default {Object} - */ - position?: ScalesCustomLabelsPosition; - - /** Specify font for custom labels - * @Default {Object} - */ - font?: ScalesCustomLabelsFont; - } - - export interface ScalesIndicatorsPosition { - - /** Specify x-axis of position of circular gauge - * @Default {0} - */ - x?: number; - - /** Specify y-axis of position of circular gauge - * @Default {0} - */ - y?: number; - } - - export interface ScalesIndicatorsStateRange { - - /** Specify backgroundColor for indicator of circular gauge - * @Default {null} - */ - backgroundColor?: string; - - /** Specify borderColor for indicator of circular gauge - * @Default {null} - */ - borderColor?: string; - - /** Specify end value for each specified state of circular gauge - * @Default {0} - */ - endValue?: number; - - /** Specify value of the font as the indicator when the indicator style is set with the value "text" of circular gauge - * @Default {null} - */ - font?: any; - - /** Specify start value for each specified state of circular gauge - * @Default {0} - */ - startValue?: number; - - /** Specify value of the text as the indicator when the indicator style is set with the value "text" of circular gauge - */ - text?: string; - - /** Specify value of the textColor as the indicator when the indicator style is set with the value "text" of circular gauge - * @Default {null} - */ - textColor?: string; - } - - export interface ScalesIndicator { - - /** Specify indicator height of circular gauge - * @Default {15} - */ - height?: number; - - /** Specify imageUrl of circular gauge - * @Default {null} - */ - imageUrl?: string; - - /** Specify position of circular gauge - * @Default {Object} - */ - position?: ScalesIndicatorsPosition; - - /** Specify the various states of circular gauge - * @Default {Array} - */ - stateRanges?: ScalesIndicatorsStateRange[]; - - /** Specify indicator style of circular gauge. See IndicatorType - * @Default {Circle} - */ - type?: ej.datavisualization.CircularGauge.IndicatorTypes | string; - - /** Specify indicator width of circular gauge - * @Default {15} - */ - width?: number; - } - - export interface ScalesLabelsFont { - - /** Specify font fontFamily for labels of circular gauge - * @Default {Arial} - */ - fontFamily?: string; - - /** Specify font Style for labels of circular gauge - * @Default {Bold} - */ - fontStyle?: string; - - /** Specify font size for labels of circular gauge - * @Default {11px} - */ - size?: string; - } - - export interface ScalesLabel { - - /** Specify the angle for the labels of circular gauge - * @Default {0} - */ - angle?: number; - - /** Specify labels autoAngle value of circular gauge - * @Default {false} - */ - autoAngle?: boolean; - - /** Specify label color of circular gauge - * @Default {null} - */ - color?: string; - - /** Specify distanceFromScale value for labels of circular gauge - * @Default {0} - */ - distanceFromScale?: number; - - /** Specify font for labels of circular gauge - * @Default {Object} - */ - font?: ScalesLabelsFont; - - /** Specify includeFirstValue of circular gauge - * @Default {true} - */ - includeFirstValue?: boolean; - - /** Specify opacity value for labels of circular gauge - * @Default {null} - */ - opacity?: number; - - /** Specify label placement of circular gauge. See LabelPlacement - * @Default {Near} - */ - placement?: ej.datavisualization.CircularGauge.Placement | string; - - /** Specify label Style of circular gauge. See LabelType - * @Default {Major} - */ - type?: ej.datavisualization.CircularGauge.LabelType | string; - - /** Specify unitText of circular gauge - */ - unitText?: string; - - /** Specify unitTextPosition of circular gauge. See UnitTextPosition - * @Default {Back} - */ - unitTextPosition?: ej.datavisualization.CircularGauge.UnitTextPlacement | string; - } - - export interface ScalesPointerCap { - - /** Specify cap backgroundColor of circular gauge - * @Default {null} - */ - backgroundColor?: string; - - /** Specify cap borderColor of circular gauge - * @Default {null} - */ - borderColor?: string; - - /** Specify pointerCap borderWidth value of circular gauge - * @Default {3} - */ - borderWidth?: number; - - /** Specify cap interiorGradient value of circular gauge - * @Default {null} - */ - interiorGradient?: any; - - /** Specify pointerCap Radius value of circular gauge - * @Default {7} - */ - radius?: number; - } - - export interface ScalesPointersBorder { - - /** Specify border color for pointer of circular gauge - * @Default {null} - */ - color?: string; - - /** Specify border width for pointers of circular gauge - * @Default {1.5} - */ - width?: number; - } - - export interface ScalesPointersPointerValueTextFont { - - /** Specify pointer value text font family of circular gauge. - * @Default {Arial} - */ - fontFamily?: string; - - /** Specify pointer value text font style of circular gauge. - * @Default {Bold} - */ - fontStyle?: string; - - /** Specify pointer value text size of circular gauge. - * @Default {11px} - */ - size?: string; - } - - export interface ScalesPointersPointerValueText { - - /** Specify pointer text angle of circular gauge. - * @Default {0} - */ - angle?: number; - - /** Specify pointer text auto angle of circular gauge. - * @Default {false} - */ - autoAngle?: boolean; - - /** Specify pointer value text color of circular gauge. - * @Default {#8c8c8c} - */ - color?: string; - - /** Specify pointer value text distance from pointer of circular gauge. - * @Default {20} - */ - distance?: number; - - /** Specify pointer value text font option of circular gauge. - * @Default {object} - */ - font?: ScalesPointersPointerValueTextFont; - - /** Specify pointer value text opacity of circular gauge. - * @Default {1} - */ - opacity?: number; - - /** enable pointer value text visibility of circular gauge. - * @Default {false} - */ - showValue?: boolean; - } - - export interface ScalesPointer { - - /** Specify backgroundColor for the pointer of circular gauge - * @Default {null} - */ - backgroundColor?: string; - - /** Specify backNeedleLength of circular gauge - * @Default {10} - */ - backNeedleLength?: number; - - /** Specify the border for pointers of circular gauge - * @Default {Object} - */ - border?: ScalesPointersBorder; - - /** Specify distanceFromScale value for pointers of circular gauge - * @Default {0} - */ - distanceFromScale?: number; - - /** Specify pointer gradients of circular gauge - * @Default {null} - */ - gradients?: any; - - /** Specify pointer image of circular gauge.It is applicable for both marker as well as needle type pointers. - * @Default {NULL} - */ - imageUrl?: string; - - /** Specify pointer length of circular gauge - * @Default {150} - */ - length?: number; - - /** Specify marker Style value of circular gauge. See MarkerType - * @Default {Rectangle} - */ - markerType?: ej.datavisualization.CircularGauge.MarkerType | string; - - /** Specify needle Style value of circular gauge. See NeedleType - * @Default {Triangle} - */ - needleType?: ej.datavisualization.CircularGauge.NeedleType | string; - - /** Specify opacity value for pointer of circular gauge - * @Default {1} - */ - opacity?: number; - - /** Specify radius value for pointer of circular gauge - * @Default {null} - */ - radius?: number; - - /** Specify pointer Placement value of circular gauge. See PointerPlacement - * @Default {Near} - */ - placement?: ej.datavisualization.CircularGauge.Placement | string; - - /** Specify pointer value text of circular gauge. - * @Default {Object} - */ - pointerValueText?: ScalesPointersPointerValueText; - - /** Specify showBackNeedle value of circular gauge - * @Default {false} - */ - showBackNeedle?: boolean; - - /** Specify pointer type value of circular gauge. See PointerType - * @Default {Needle} - */ - type?: ej.datavisualization.CircularGauge.PointerType | string; - - /** Specify value of the pointer of circular gauge - * @Default {null} - */ - value?: number; - - /** Specify pointer width of circular gauge - * @Default {7} - */ - width?: number; - } - - export interface ScalesRangesBorder { - - /** Specify border color for ranges of circular gauge - * @Default {#32b3c6} - */ - color?: string; - - /** Specify border width for ranges of circular gauge - * @Default {1.5} - */ - width?: number; - } - - export interface ScalesRange { - - /** Specify backgroundColor for the ranges of circular gauge - * @Default {#32b3c6} - */ - backgroundColor?: string; - - /** Specify border for ranges of circular gauge - * @Default {Object} - */ - border?: ScalesRangesBorder; - - /** Specify distanceFromScale value for ranges of circular gauge - * @Default {25} - */ - distanceFromScale?: number; - - /** Specify endValue for ranges of circular gauge - * @Default {null} - */ - endValue?: number; - - /** Specify endWidth for ranges of circular gauge - * @Default {10} - */ - endWidth?: number; - - /** Specify range gradients of circular gauge - * @Default {null} - */ - gradients?: any; - - /** Specify opacity value for ranges of circular gauge - * @Default {null} - */ - opacity?: number; - - /** Specify placement of circular gauge. See RangePlacement - * @Default {Near} - */ - placement?: ej.datavisualization.CircularGauge.Placement | string; - - /** Specify size of the range value of circular gauge - * @Default {5} - */ - size?: number; - - /** Specify startValue for ranges of circular gauge - * @Default {null} - */ - startValue?: number; - - /** Specify startWidth of circular gauge - * @Default {[Array.number] scale.ranges.startWidth = 10} - */ - startWidth?: number; - } - - export interface ScalesSubGaugesPosition { - - /** Specify x-axis position for sub-gauge of circular gauge - * @Default {0} - */ - x?: number; - - /** Specify y-axis position for sub-gauge of circular gauge - * @Default {0} - */ - y?: number; - } - - export interface ScalesSubGauge { - - /** Specify subGauge Height of circular gauge - * @Default {150} - */ - height?: number; - - /** Specify position for sub-gauge of circular gauge - * @Default {Object} - */ - position?: ScalesSubGaugesPosition; - - /** Specify subGauge Width of circular gauge - * @Default {150} - */ - width?: number; - } - - export interface ScalesTick { - - /** Specify the angle for the ticks of circular gauge - * @Default {0} - */ - angle?: number; - - /** Specify tick color of circular gauge - * @Default {null} - */ - color?: string; - - /** Specify distanceFromScale value for ticks of circular gauge - * @Default {0} - */ - distanceFromScale?: number; - - /** Specify tick height of circular gauge - * @Default {16} - */ - height?: number; - - /** Specify tick placement of circular gauge. See TickPlacement - * @Default {Near} - */ - placement?: ej.datavisualization.CircularGauge.Placement | string; - - /** Specify tick Style of circular gauge. See TickType - * @Default {Major} - */ - type?: ej.datavisualization.CircularGauge.LabelType | string; - - /** Specify tick width of circular gauge - * @Default {3} - */ - width?: number; - } - - export interface Scale { - - /** Specify backgroundColor for the scale of circular gauge - * @Default {null} - */ - backgroundColor?: string; - - /** Specify border for scales of circular gauge - * @Default {Object} - */ - border?: ScalesBorder; - - /** Specify scale direction of circular gauge. See Directions - * @Default {Clockwise} - */ - direction?: ej.datavisualization.CircularGauge.Direction | string; - - /** Specify the custom labels for the scales. - * @Default {Array} - */ - customLabels?: ScalesCustomLabel[]; - - /** Specify representing state of circular gauge - * @Default {Array} - */ - indicators?: ScalesIndicator[]; - - /** Specify the text values displayed in a meaningful manner alongside the ticks of circular gauge - * @Default {Array} - */ - labels?: ScalesLabel[]; - - /** Specify majorIntervalValue of circular gauge - * @Default {10} - */ - majorIntervalValue?: number; - - /** Specify maximum scale value of circular gauge - * @Default {null} - */ - maximum?: number; - - /** Specify minimum scale value of circular gauge - * @Default {null} - */ - minimum?: number; - - /** Specify minorIntervalValue of circular gauge - * @Default {2} - */ - minorIntervalValue?: number; - - /** Specify opacity value of circular gauge - * @Default {1} - */ - opacity?: number; - - /** Specify pointer cap of circular gauge - * @Default {Object} - */ - pointerCap?: ScalesPointerCap; - - /** Specify pointers value of circular gauge - * @Default {Array} - */ - pointers?: ScalesPointer[]; - - /** Specify scale radius of circular gauge - * @Default {170} - */ - radius?: number; - - /** Specify ranges value of circular gauge - * @Default {Array} - */ - ranges?: ScalesRange[]; - - /** Specify shadowOffset value of circular gauge - * @Default {0} - */ - shadowOffset?: number; - - /** Specify showIndicators of circular gauge - * @Default {false} - */ - showIndicators?: boolean; - - /** Specify showLabels of circular gauge - * @Default {true} - */ - showLabels?: boolean; - - /** Specify showPointers of circular gauge - * @Default {true} - */ - showPointers?: boolean; - - /** Specify showRanges of circular gauge - * @Default {false} - */ - showRanges?: boolean; - - /** Specify showScaleBar of circular gauge - * @Default {false} - */ - showScaleBar?: boolean; - - /** Specify showTicks of circular gauge - * @Default {true} - */ - showTicks?: boolean; - - /** Specify scaleBar size of circular gauge - * @Default {6} - */ - size?: number; - - /** Specify startAngle of circular gauge - * @Default {115} - */ - startAngle?: number; - - /** Specify subGauge of circular gauge - * @Default {Array} - */ - subGauges?: ScalesSubGauge[]; - - /** Specify sweepAngle of circular gauge - * @Default {310} - */ - sweepAngle?: number; - - /** Specify ticks of circular gauge - * @Default {Array} - */ - ticks?: ScalesTick[]; - } - - export interface Tooltip { - - /** enable showCustomLabelTooltip of circular gauge - * @Default {false} - */ - showCustomLabelTooltip?: boolean; - - /** enable showLabelTooltip of circular gauge - * @Default {false} - */ - showLabelTooltip?: boolean; - - /** Specify tooltip templateID of circular gauge - * @Default {false} - */ - templateID?: string; - } - } - namespace CircularGauge { - enum FrameType { - //string - FullCircle, - //string - HalfCircle, - } - } - namespace CircularGauge { - enum gaugePosition { - //string - TopLeft, - //string - TopRight, - //string - TopCenter, - //string - MiddleLeft, - //string - MiddleRight, - //string - Center, - //string - BottomLeft, - //string - BottomRight, - //string - BottomCenter, - } - } - namespace CircularGauge { - enum CustomLabelPositionType { - //string - Top, - //string - Bottom, - //string - Right, - //string - Left, - } - } - namespace CircularGauge { - enum Direction { - //string - Clockwise, - //string - CounterClockwise, - } - } - namespace CircularGauge { - enum IndicatorTypes { - //string - Rectangle, - //string - Circle, - //string - Text, - //string - RoundedRectangle, - //string - Image, - } - } - namespace CircularGauge { - enum Placement { - //string - Near, - //string - Far, - } - } - namespace CircularGauge { - enum LabelType { - //string - Major, - //string - Minor, - } - } - namespace CircularGauge { - enum UnitTextPlacement { - //string - Back, - //string - Front, - } - } - namespace CircularGauge { - enum MarkerType { - //string - Rectangle, - //string - Circle, - //string - Triangle, - //string - Ellipse, - //string - Diamond, - //string - Pentagon, - //string - Slider, - //string - Pointer, - //string - Wedge, - //string - Trapezoid, - //string - RoundedRectangle, - //string - Image, - } - } - namespace CircularGauge { - enum NeedleType { - //string - Triangle, - //string - Rectangle, - //string - Arrow, - //string - Image, - //string - Trapezoid, - } - } - namespace CircularGauge { - enum PointerType { - //string - Needle, - //string - Marker, - } - } - - class DigitalGauge extends ej.Widget { - static fn: DigitalGauge; - constructor(element: JQuery | Element, options?: DigitalGauge.Model); - static Locale: any; - model: DigitalGauge.Model; - defaults: DigitalGauge.Model; - - /** To destroy the digital gauge - * @returns {void} - */ - destroy(): void; - - /** To export Digital Gauge as Image - * @param {string} fileName for the Image - * @param {string} fileType for the Image - * @returns {boolean} - */ - exportImage(fileName: string, fileType: string): boolean; - - /** Gets the location of an item that is displayed on the gauge. - * @param {number} Position value of an item that is displayed on the gauge. - * @returns {any} - */ - getPosition(itemIndex: number): any; - - /** ClientSideMethod getValue Gets the value of an item that is displayed on the gauge - * @param {number} Index value of an item that displayed on the gauge - * @returns {any} - */ - getValue(itemIndex: number): any; - - /** Refresh the digital gauge widget - * @returns {void} - */ - refresh(): void; - - /** ClientSideMethod Set Position Sets the location of an item to be displayed in the gauge - * @param {number} Index value of the digital gauge item - * @param {any} Location value of the digital gauge - * @returns {void} - */ - setPosition(itemIndex: number, value: any): void; - - /** ClientSideMethod SetValue Sets the value of an item to be displayed in the gauge. - * @param {number} Index value of the digital gauge item - * @param {string} Text value to be displayed in the gaugeS - * @returns {void} - */ - setValue(itemIndex: number, value: string): void; - } - export namespace DigitalGauge { - - export interface Model { - - /** Specifies the frame of the Digital gauge. - * @Default {{backgroundImageUrl: null, innerWidth: 6, outerWidth: 10}} - */ - frame?: Frame; - - /** Specifies the height of the DigitalGauge. - * @Default {150} - */ - height?: number; - - /** Specifies the resize option of the DigitalGauge. - * @Default {false} - */ - isResponsive?: boolean; - - /** Specifies the items for the DigitalGauge. - * @Default {null} - */ - items?: Item[]; - - /** Specifies the matrixSegmentData for the DigitalGauge. - */ - matrixSegmentData?: any; - - /** Specifies the segmentData for the DigitalGauge. - */ - segmentData?: any; - - /** Specifies the themes for the Digital gauge. See Themes - * @Default {flatlight} - */ - themes?: string; - - /** Specifies the value to the DigitalGauge. - * @Default {text} - */ - value?: string; - - /** Specifies the width for the Digital gauge. - * @Default {400} - */ - width?: number; - - /** Triggers when the gauge is initialized. */ - init?(e: InitEventArgs): void; - - /** Triggers when the gauge item rendering. */ - itemRendering?(e: ItemRenderingEventArgs): void; - - /** Triggers when the gauge is start to load. */ - load?(e: LoadEventArgs): void; - - /** Triggers when the gauge render is completed. */ - renderComplete?(e: RenderCompleteEventArgs): void; - } - - export interface InitEventArgs { - - /** returns the object of the gauge. - */ - object?: any; - - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the all the options of the items. - */ - items?: any; - - /** returns the context element - */ - context?: any; - - /** returns the gauge model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface ItemRenderingEventArgs { - - /** returns the object of the gauge. - */ - object?: any; + /** Fires, on the clicking the Multi level labels of the chart . + */ + multiLevelLabelClick?(e: MultiLevelLabelClickEventArgs): void; - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the all the options of the items. - */ - items?: any; + /** Fires on moving mouse over the chart. + */ + chartMouseMove?(e: ChartMouseMoveEventArgs): void; - /** returns the context element - */ - context?: any; - - /** returns the gauge model - */ - model?: any; + /** Fires, on double clicking the chart. + */ + chartDoubleClick?(e: ChartDoubleClickEventArgs): void; - /** returns the name of the event - */ - type?: string; - } + /** Fires when the mouse pointer leaves the chart + */ + chartMouseLeave?(e: ChartMouseLeaveEventArgs): void; - export interface LoadEventArgs { + /** Fires on clicking the annotation. + */ + annotationClick?(e: AnnotationClickEventArgs): void; - /** returns the object of the gauge. - */ - object?: any; - - /** returns the cancel option value - */ - cancel?: boolean; + /** Fires, after the chart is resized. + */ + afterResize?(e: AfterResizeEventArgs): void; - /** returns the all the options of the items. - */ - items?: any; + /** Fires, when chart size is changing. + */ + beforeResize?(e: BeforeResizeEventArgs): void; - /** returns the context element - */ - context?: any; + /** Fires, when error bar is rendering. + */ + errorBarRendering?(e: ErrorBarRenderingEventArgs): void; - /** returns the gauge model - */ - model?: any; + /** Fires, when multi level labels are rendering. + */ + multiLevelLabelRendering?(e: MultiLevelLabelRenderingEventArgs): void; - /** returns the name of the event - */ - type?: string; - } + /** Fires, when trendlines are rendering. + */ + trendlineRendering?(e: TrendlineRenderingEventArgs): void; - export interface RenderCompleteEventArgs { + /** Trigger, after the scrollbar position is changed. + */ + scrollChanged?(e: ScrollChangedEventArgs): void; - /** returns the object of the gauge. - */ - object?: any; + /** Event triggered when scroll starts + */ + scrollStart?(e: ScrollStartEventArgs): void; - /** returns the cancel option value - */ - cancel?: boolean; - - /** returns the all the options of the items. - */ - items?: any; - - /** returns the context element - */ - context?: any; - - /** returns the gauge model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface Frame { - - /** Specifies the URL of an image to be displayed as background of the Digital gauge. - * @Default {null} - */ - backgroundImageUrl?: string; - - /** Specifies the inner width for the frame, when the background image has been set for the Digital gauge.. - * @Default {6} - */ - innerWidth?: number; - - /** Specifies the outer width of the frame, when the background image has been set for the Digital gauge. - * @Default {10} - */ - outerWidth?: number; - } - - export interface ItemsCharacterSettings { - - /** Specifies the CharacterCount value for the DigitalGauge. - * @Default {4} - */ - count?: number; - - /** Specifies the opacity value for the DigitalGauge. - * @Default {1} - */ - opacity?: number; - - /** Specifies the value for spacing between the characters - * @Default {2} - */ - spacing?: number; - - /** Specifies the character type for the text to be displayed. - * @Default {ej.datavisualization.DigitalGauge.CharacterType.EightCrossEightDotMatrix} - */ - type?: ej.datavisualization.DigitalGauge.CharacterType | string; - } - - export interface ItemsFont { - - /** Set the font family value - * @Default {Arial} - */ - fontFamily?: string; - - /** Set the font style for the font - * @Default {italic} - */ - fontStyle?: ej.datavisualization.DigitalGauge.FontStyle | string; - - /** Set the font size value - * @Default {11px} - */ - size?: string; - } - - export interface ItemsPosition { - - /** Set the horizontal location for the text, where it needs to be placed within the gauge. - * @Default {0} - */ - x?: number; - - /** Set the vertical location for the text, where it needs to be placed within the gauge. - * @Default {0} - */ - y?: number; - } - - export interface ItemsSegmentSettings { - - /** Set the color for the text segments. - * @Default {null} - */ - color?: string; - - /** Set the gradient for the text segments. - * @Default {null} - */ - gradient?: any; - - /** Set the length for the text segments. - * @Default {2} - */ - length?: number; - - /** Set the opacity for the text segments. - * @Default {0} - */ - opacity?: number; - - /** Set the spacing for the text segments. - * @Default {1} - */ - spacing?: number; - - /** Set the width for the text segments. - * @Default {1} - */ - width?: number; - } - - export interface Item { - - /** Specifies the Character settings for the DigitalGauge. - * @Default {null} - */ - characterSettings?: ItemsCharacterSettings; - - /** Enable/Disable the custom font to be applied to the text in the gauge. - * @Default {false} - */ - enableCustomFont?: boolean; - - /** Set the specific font for the text, when the enableCustomFont is set to true - * @Default {null} - */ - font?: ItemsFont; - - /** Set the location for the text, where it needs to be placed within the gauge. - * @Default {null} - */ - position?: ItemsPosition; - - /** Set the segment settings for the digital gauge. - * @Default {null} - */ - segmentSettings?: ItemsSegmentSettings; - - /** Set the value for enabling/disabling the blurring effect for the shadows of the text - * @Default {0} - */ - shadowBlur?: number; - - /** Specifies the color of the text shadow. - * @Default {null} - */ - shadowColor?: string; - - /** Set the x offset value for the shadow of the text, indicating the location where it needs to be displayed. - * @Default {1} - */ - shadowOffsetX?: number; - - /** Set the y offset value for the shadow of the text, indicating the location where it needs to be displayed. - * @Default {1} - */ - shadowOffsetY?: number; - - /** Set the alignment of the text that is displayed within the gauge.See TextAlign - * @Default {left} - */ - textAlign?: string; - - /** Specifies the color of the text. - * @Default {null} - */ - textColor?: string; - - /** Specifies the text value. - * @Default {null} - */ - value?: string; - } - } - namespace DigitalGauge { - enum CharacterType { - //string - SevenSegment, - //string - FourteenSegment, - //string - SixteenSegment, - //string - EightCrossEightDotMatrix, - //string - EightCrossEightSquareMatrix, - } - } - namespace DigitalGauge { - enum FontStyle { - //string - Normal, - //string - Bold, - //string - Italic, - //string - Underline, - //string - Strikeout, - } - } - - class Chart extends ej.Widget { - static fn: Chart; - constructor(element: JQuery | Element, options?: Chart.Model); - static Locale: any; - model: Chart.Model; - defaults: Chart.Model; - - /** Animates the series and/or indicators in Chart. When parameter is not passed to this method, then all the series and indicators present in Chart are animated. - * @param {any} If an array collection is passed as parameter, series and indicator objects passed in array collection are animated.ExampleIf a series - * or indicator object is passed to this method, then the specific series or indicator is animated.Example, - * @returns {void} - */ - animate(options: any): void; - - /** Exports chart as an image or to an excel file. Chart can be exported as an image only when exportCanvasRendering option is set to true. - * @param {string} Type of the export operation to be performed. Following are the two export types that are supported now,1. 'image'2. 'excel'Example - * @param {string} URL of the service, where the chart will be exported to excel.Example, - * @param {boolean} When this parameter is true, all the chart objects initialized to the same document are exported to a single excel file. - * This is an optional parameter. By default, it is false.Example, - * @returns {any} - */ - export(type: string, URL: string, exportMultipleChart: boolean): any; - - /** Redraws the entire chart. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. - * @returns {void} - */ - redraw(): void; - } - export namespace Chart { - - export interface Model { - - /** Options for adding and customizing annotations in Chart. - */ - annotations?: Annotation[]; - - /** URL of the image to be used as chart background. - * @Default {null} - */ - backGroundImageUrl?: string; - - /** Options for customizing the color, opacity and width of the chart border. - */ - border?: Border; - - /** This provides options for customizing export settings - */ - exportSettings?: ExportSettings; - - /** Options for configuring the border and background of the plot area. - */ - chartArea?: ChartArea; - - /** Options to split Chart into multiple plotting areas vertically. Each object in the collection represents a plotting area in Chart. - */ - columnDefinitions?: ColumnDefinition[]; - - /** Options for configuring the properties of all the series. You can also override the options for specific series by using series collection. - */ - commonSeriesOptions?: CommonSeriesOptions; - - /** Options for displaying and customizing the crosshair. - */ - crosshair?: Crosshair; - - /** Depth of the 3D Chart from front view of series to background wall. This property is applicable only for 3D view. - * @Default {100} - */ - depth?: number; - - /** Controls whether 3D view has to be enabled or not. 3D view is supported only for column, bar. Stacking column, stacking bar, pie and doughnut series types. - * @Default {false} - */ - enable3D?: boolean; - - /** Controls whether Chart has to be rendered as Canvas or SVG. Canvas rendering supports all functionalities in SVG rendering except 3D Charts. - * @Default {false} - */ - enableCanvasRendering?: boolean; - - /** Controls whether the series has to be rendered at initial loading of chart, this will be useful in scenarios where chart is placed at the bottom of the web page - * and we need to render the series only when the chart is visible while scrolling to the top. - * @Default {true} - */ - initSeriesRender?: boolean; - - /** Controls whether 3D view has to be rotated on dragging. This property is applicable only for 3D view. - * @Default {false} - */ - enableRotation?: boolean; - - /** Options to customize the technical indicators. - */ - indicators?: Indicator[]; - - /** Controls whether Chart has to be responsive while resizing. - * @Default {false} - */ - isResponsive?: boolean; - - /** Options to customize the legend items and legend title. - */ - legend?: Legend; - - /** Name of the culture based on which chart should be localized. Number and date time values are localized with respect to the culture name.String type properties like title text are - * not localized automatically. Provide localized text as value to string type properties. - * @Default {en-US} - */ - locale?: string; - - /** Palette is used to store the series fill color in array and apply the color to series collection in the order of series index. - * @Default {null} - */ - palette?: any[]; - - /** Options to customize the left, right, top and bottom margins of chart area. - */ - Margin?: any; - - /** Perspective angle of the 3D view. Chart appears closer when perspective angle is decreased, and distant when perspective angle is increased. - * This property is applicable only when 3D view is enabled - * @Default {90} - */ - perspectiveAngle?: number; - - /** This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. - * To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. - * Then, assign the name to the series’s xAxisName property to link both axis and series. - */ - primaryXAxis?: PrimaryXAxis; - - /** To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. - * Then, assign the name to the series’s xAxisName property to link both axis and series. - */ - axes?: Axis[]; - - /** This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. - * To override y axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. - * Then, assign the name to the series’s yAxisName property to link both axis and series. - */ - primaryYAxis?: PrimaryYAxis; - - /** Rotation angle of the 3D view. This property is applicable only when 3D view is enabled. - * @Default {0} - */ - rotation?: number; + /** Event triggered when scroll end + */ + scrollEnd?(e: ScrollEndEventArgs): void; - /** Options to split Chart into multiple plotting areas horizontally. Each object in the collection represents a plotting area in Chart. - */ - rowDefinitions?: RowDefinition[]; + /** Fires when the dragging is started + */ + dragStart?(e: DragStartEventArgs): void; - /** Specifies the properties used for customizing the series. - */ - series?: Series[]; + /** Fires while dragging + */ + dragging?(e: DraggingEventArgs): void; - /** Controls whether data points has to be displayed side by side or along the depth of the axis. - * @Default {false} - */ - sideBySideSeriesPlacement?: boolean; + /** Fires when the dragging is completed + */ + dragEnd?(e: DragEndEventArgs): void; - /** Options to customize the Chart size. - */ - size?: Size; + /** Fires when the sub Title of the chart is rendered + */ + subTitleRendering?(e: SubTitleRenderingEventArgs): void; + } - /** Specifies the theme for Chart. - * @Default {Flatlight. See Theme} - */ - theme?: ej.datavisualization.Chart.Theme | string; + export interface AnimationCompleteEventArgs { - /** Slope angle of 3D Chart. This property is applicable only when 3D view is enabled. - * @Default {0} - */ - tilt?: number; + /** series - Instance of the series that completed has animation. + */ + data?: any; - /** Options for customizing the title and subtitle of Chart. - */ - title?: Title; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Width of the wall used in 3D Chart. Wall is present only in Cartesian type 3D series and not in 3D pie or Doughnut series. This property is applicable only when 3D view is enabled. - * @Default {2} - */ - wallSize?: number; + /** Instance of the chart model object + */ + model?: any; - /** Options for enabling zooming feature of chart. - */ - zooming?: Zooming; + /** Name of the event + */ + type?: string; + } - /** Fires after the series animation is completed. This event will be triggered for each series when animation is enabled. */ - animationComplete?(e: AnimationCompleteEventArgs): void; + export interface AxesLabelRenderingEventArgs { - /** Fires before rendering the labels. This event is fired for each label in axis. You can use this event to add custom text to axis labels. */ - axesLabelRendering?(e: AxesLabelRenderingEventArgs): void; + /** axis - Instance of the corresponding axis. label - Arguments of axis label value and text. + */ + data?: any; - /** Fires during the initialization of axis labels. */ - axesLabelsInitialize?(e: AxesLabelsInitializeEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Fires during axes range calculation. This event is fired for each axis present in Chart. You can use this event to customize axis range as required. */ - axesRangeCalculate?(e: AxesRangeCalculateEventArgs): void; + /** Instance of the chart model object. + */ + model?: any; - /** Fires before rendering the axis title. This event is triggered for each axis with title. You can use this event to add custom text to axis title. */ - axesTitleRendering?(e: AxesTitleRenderingEventArgs): void; + /** Name of the event + */ + type?: string; + } - /** Fires during the calculation of chart area bounds. You can use this event to customize the bounds of chart area. */ - chartAreaBoundsCalculate?(e: ChartAreaBoundsCalculateEventArgs): void; + export interface AxesLabelsInitializeEventArgs { - /** Fires after chart is created. */ - create?(e: CreateEventArgs): void; + /** dataAxes - Collection of axes in Chart + */ + data?: any; - /** Fires when chart is destroyed completely. */ - destroy?(e: DestroyEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Fires before rendering the data labels. This event is triggered for each data label in the series. You can use this event to add custom text in data labels. */ - displayTextRendering?(e: DisplayTextRenderingEventArgs): void; + /** Instance of the chart model object. + */ + model?: any; - /** Fires during the calculation of legend bounds. You can use this event to customize the bounds of legend. */ - legendBoundsCalculate?(e: LegendBoundsCalculateEventArgs): void; + /** Name of the event + */ + type?: string; + } - /** Fires on clicking the legend item. */ - legendItemClick?(e: LegendItemClickEventArgs): void; + export interface AxesRangeCalculateEventArgs { - /** Fires when moving mouse over legend item. You can use this event for hit testing on legend items. */ - legendItemMouseMove?(e: LegendItemMouseMoveEventArgs): void; + /** delta - Difference between minimum and maximum value of axis range. interval - Interval value of axis range. Grid lines, tick lines and axis labels are drawn based on this + * interval value. max - Maximum value of axis range. min - Minimum value of axis range. + */ + data?: any; - /** Fires before rendering the legend item. This event is fired for each legend item in Chart. You can use this event to customize legend item shape or add custom text to legend item. */ - legendItemRendering?(e: LegendItemRenderingEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Fires before loading the chart. */ - load?(e: LoadEventArgs): void; + /** Instance of the chart model object. + */ + model?: any; - /** Fires after selected the data in chart. */ - rangeSelected?(e: RangeSelectedEventArgs): void; + /** Name of the event + */ + type?: string; + } - /** Fires on clicking a point in chart. You can use this event to handle clicks made on points. */ - pointRegionClick?(e: PointRegionClickEventArgs): void; + export interface AxesTitleRenderingEventArgs { - /** Fires when mouse is moved over a point. */ - pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; + /** axes - Instance of the axis whose title is being rendered locationX - X-coordinate of title location locationY - Y-coordinate of title location title - Axis title + * text. You can add custom text to the title. + */ + data?: any; - /** Fires before rendering chart. */ - preRender?(e: PreRenderEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Fires after selecting a series. This event is triggered after selecting a series only if selection mode is series. */ - seriesRegionClick?(e: SeriesRegionClickEventArgs): void; + /** Instance of the chart model object. + */ + model?: any; - /** Fires before rendering a series. This event is fired for each series in Chart. */ - seriesRendering?(e: SeriesRenderingEventArgs): void; + /** Name of the event + */ + type?: string; + } - /** Fires before rendering the marker symbols. This event is triggered for each marker in Chart. */ - symbolRendering?(e: SymbolRenderingEventArgs): void; + export interface ChartAreaBoundsCalculateEventArgs { - /** Fires before rendering the Chart title. You can use this event to add custom text in Chart title. */ - titleRendering?(e: TitleRenderingEventArgs): void; + /** areaBoundsHeight - Height of the chart area. areaBoundsWidth - Width of the chart area. areaBoundsX - X-coordinate of the chart area. areaBoundsY - Y-coordinate of the + * chart area. + */ + data?: any; - /** Fires before rendering the tooltip. This event is fired when tooltip is enabled and mouse is hovered on a Chart point. You can use this event to customize tooltip before rendering. */ - toolTipInitialize?(e: ToolTipInitializeEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Fires before rendering crosshair tooltip in axis. This event is fired for each axis with crosshair label enabled. You can use this event to customize crosshair label before rendering */ - trackAxisToolTip?(e: TrackAxisToolTipEventArgs): void; + /** Instance of the chart model object. + */ + model?: any; - /** Fires before rendering trackball tooltip. This event is fired for each series in Chart because trackball tooltip is displayed for all the series. - * You can use this event to customize the text displayed in trackball tooltip. - */ - trackToolTip?(e: TrackToolTipEventArgs): void; + /** Name of the event + */ + type?: string; + } - /** Fires, on clicking the axis label. */ - axisLabelClick?(e: AxisLabelClickEventArgs): void; + export interface CreateEventArgs { - /** Fires on moving mouse over the axis label. */ - axisLabelMouseMove?(e: AxisLabelMouseMoveEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Fires, on the clicking the chart. */ - chartClick?(e: ChartClickEventArgs): void; + /** Instance of the chart model object. + */ + model?: any; - /** Fires on moving mouse over the chart. */ - chartMouseMove?(e: ChartMouseMoveEventArgs): void; + /** Name of the event + */ + type?: string; + } - /** Fires, on double clicking the chart. */ - chartDoubleClick?(e: ChartDoubleClickEventArgs): void; + export interface DestroyEventArgs { - /** Fires on clicking the annotation. */ - annotationClick?(e: AnnotationClickEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Fires, after the chart is resized. */ - afterResize?(e: AfterResizeEventArgs): void; + /** Instance of the chart model object. + */ + model?: any; - /** Fires, when chart size is changing. */ - beforeResize?(e: BeforeResizeEventArgs): void; + /** Name of the event + */ + type?: string; + } - /** Fires, when error bar is rendering. */ - errorBarRendering?(e: ErrorBarRenderingEventArgs): void; + export interface DisplayTextRenderingEventArgs { + + /** text - Text displayed in data label. You can add custom text to the data label locationX - X-coordinate of data label location locationY - Y-coordinate of data label + * location seriesIndex - Index of the series in series Collection whose data label is being rendered pointIndex - Index of the point in series whose data label is being + * rendered + */ + data?: any; - /** Trigger, after the scrollbar position is changed. */ - scrollChanged?(e: ScrollChangedEventArgs): void; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Event triggered when scroll starts */ - scrollStart?(e: ScrollStartEventArgs): void; + /** Instance of the chart model object. + */ + model?: any; - /** Event triggered when scroll end */ - scrollEnd?(e: ScrollEndEventArgs): void; - } + /** Name of the event + */ + type?: string; + } - export interface AnimationCompleteEventArgs { + export interface LegendBoundsCalculateEventArgs { - /** Instance of the series that completed has animation. - */ - series?: any; + /** legendBoundsHeight - Height of the legend legendBoundsWidth - Width of the legend. legendBoundsRows - Number of rows to display the legend items + */ + data?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Set this option to true to cancel the event. + */ + cancel?: boolean; - /** Instance of the chart model object - */ - model?: any; + /** Instance of the chart model object. + */ + model?: any; - /** Name of the event - */ - type?: string; - } + /** Name of the event + */ + type?: string; + } - export interface AxesLabelRenderingEventArgs { + export interface LegendItemClickEventArgs { - /** Instance of the corresponding axis. - */ - Axis?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Formatted text of the respective label. You can also add custom text to the label. - */ - LabelText?: string; + /** Instance of the chart model object + */ + model?: any; - /** Actual value of the label. - */ - LabelValue?: string; + /** Name of the event + */ + type?: string; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** startX - X-coordinate of legend item in pixel startY - Y-coordinate of legend item in pixel LegendItem - Instance of the legend item object that is about to be rendered + * style - Options to customize the legend item styles such as border, color, size, etc…, Bounds - Instance that holds information about legend bounds and legend item bounds. + * symbolShape - Name of the legend item shape. Use this option to customize legend item shape before rendering series - Instance of the series object corresponding to the + * legend item + */ + data?: any; + } - /** Instance of the chart model object. - */ - model?: any; + export interface LegendItemMouseMoveEventArgs { - /** Name of the event - */ - type?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface AxesLabelsInitializeEventArgs { + /** Instance of the chart model object + */ + model?: any; - /** Collection of axes in Chart - */ - dataAxes?: any; + /** Name of the event + */ + type?: string; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** startX - X-coordinate of legend item in pixel startY - Y-coordinate of legend item in pixel LegendItem - Instance of the legend item object that is about to be rendered + * style - Options to customize the legend item styles such as border, color, size, etc…, Bounds - Instance that holds information about legend bounds and legend item bounds. + * symbolShape - Name of the legend item shape. Use this option to customize legend item shape before rendering series - Instance of the series object corresponding to the + * legend item + */ + data?: any; + } - /** Instance of the chart model object. - */ - model?: any; + export interface LegendItemRenderingEventArgs { - /** Name of the event - */ - type?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface AxesRangeCalculateEventArgs { + /** Instance of the chart model object + */ + model?: any; - /** Difference between minimum and maximum value of axis range. - */ - delta?: number; + /** Name of the event + */ + type?: string; - /** Interval value of axis range. Grid lines, tick lines and axis labels are drawn based on this interval value. - */ - interval?: number; + /** startX - X-coordinate of legend item in pixel startY - Y-coordinate of legend item in pixel legendItem - Instance of the legend item object that is about to be rendered + * style - Options to customize the legend item styles such as border, color, size, etc. symbolShape - Name of the legend item shape. Use this option to customize legend item + * shape before rendering + */ + data?: any; + } - /** Maximum value of axis range. - */ - max?: number; + export interface LoadEventArgs { - /** Minimum value of axis range. - */ - min?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Instance of the chart model object + */ + model?: any; - /** Instance of the chart model object. - */ - model?: any; + /** Name of the event + */ + type?: string; + } - /** Name of the event - */ - type?: string; - } + export interface ZoomedEventArgs { - export interface AxesTitleRenderingEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Instance of the axis whose title is being rendered - */ - axes?: any; + /** Instance of the chart model object + */ + model?: any; - /** X-coordinate of title location - */ - locationX?: number; + /** Name of the event + */ + type?: string; - /** Y-coordinate of title location - */ - locationY?: number; + /** Selected data collection of object + */ + data?: any; + } - /** Axis title text. You can add custom text to the title. - */ - title?: string; + export interface RangeSelectedEventArgs { - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Instance of the chart model object. - */ - model?: any; + /** Instance of the chart model object + */ + model?: any; - /** Name of the event - */ - type?: string; - } + /** Name of the event + */ + type?: string; - export interface ChartAreaBoundsCalculateEventArgs { + /** Selected data collection of object + */ + data?: any; + } - /** Height of the chart area. - */ - areaBoundsHeight?: number; + export interface PointRegionClickEventArgs { - /** Width of the chart area. - */ - areaBoundsWidth?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** X-coordinate of the chart area. - */ - areaBoundsX?: number; + /** Instance of the chart model object + */ + model?: any; - /** Y-coordinate of the chart area. - */ - areaBoundsY?: number; + /** Name of the event + */ + type?: string; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** locationX - X-coordinate of point in pixel locationY - Y-coordinate of point in pixel seriesIndex - Index of the series in series collection to which the point belongs + * pointIndex - Index of the point in series + */ + data?: any; + } - /** Instance of the chart model object. - */ - model?: any; + export interface PointRegionMouseMoveEventArgs { - /** Name of the event - */ - type?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface CreateEventArgs { + /** Instance of the chart model object + */ + model?: any; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; - /** Instance of the chart model object. - */ - model?: any; + /** locationX - X-coordinate of point in pixel locationY - Y-coordinate of point in pixel seriesIndex - Index of the series in series collection to which the point belongs + * pointIndex - Index of the point in series + */ + data?: any; + } - /** Name of the event - */ - type?: string; - } + export interface PreRenderEventArgs { - export interface DestroyEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Instance of the chart model object + */ + model?: any; - /** Instance of the chart model object. - */ - model?: any; + /** Name of the event + */ + type?: string; + } - /** Name of the event - */ - type?: string; - } + export interface SeriesRegionClickEventArgs { - export interface DisplayTextRenderingEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Text displayed in data label. You can add custom text to the data label - */ - text?: string; + /** Instance of the chart model object + */ + model?: any; - /** X-coordinate of data label location - */ - locationX?: number; + /** Name of the event + */ + type?: string; - /** Y-coordinate of data label location - */ - locationY?: number; + /** series - Instance of the selected series seriesIndex - Index of the selected series + */ + data?: any; + } - /** Index of the series in series Collection whose data label is being rendered - */ - seriesIndex?: number; + export interface SeriesRenderingEventArgs { - /** Index of the point in series whose data label is being rendered - */ - pointIndex?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** Instance of the chart model object + */ + model?: any; - /** Instance of the chart model object. - */ - model?: any; + /** Name of the event + */ + type?: string; - /** Name of the event - */ - type?: string; - } + /** series - Instance of the series which is about to get rendered + */ + data?: any; + } - export interface LegendBoundsCalculateEventArgs { + export interface SymbolRenderingEventArgs { - /** Height of the legend. - */ - legendBoundsHeight?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Width of the legend. - */ - legendBoundsWidth?: number; + /** Instance of the chart model object + */ + model?: any; - /** Number of rows to display the legend items - */ - legendBoundsRows?: number; + /** Name of the event + */ + type?: string; - /** Set this option to true to cancel the event. - */ - cancel?: boolean; + /** location - Instance that holds the location of marker symbol style - Options to customize the marker style such as color, border and size + */ + data?: any; + } - /** Instance of the chart model object. - */ - model?: any; + export interface TitleRenderingEventArgs { - /** Name of the event - */ - type?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface LegendItemClickEventArgs { + /** Instance of the chart model object + */ + model?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; - /** Instance of the chart model object - */ - model?: any; + /** location - Option to customize the title location in pixels size - Read-only option to find the size of the title title - Use this option to add custom text in title + */ + data?: any; + } - /** Name of the event - */ - type?: string; + export interface ToolTipInitializeEventArgs { - /** X-coordinate of legend item in pixel - */ - startX?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Y-coordinate of legend item in pixel - */ - startY?: number; + /** Instance of the chart model object + */ + model?: any; - /** Instance of the legend item object that is about to be rendered - */ - LegendItem?: any; + /** Name of the event + */ + type?: string; - /** Options to customize the legend item styles such as border, color, size, etc…, - */ - style?: any; + /** currentText - Text to be displayed in tooltip. Set this option to customize the text displayed in tooltip pointIndex - Index of the point on which mouse is hovered + * seriesIndex - Index of the series in series collection whose point is hovered by mouse + */ + data?: any; + } - /** Instance that holds information about legend bounds and legend item bounds. - */ - Bounds?: any; + export interface TrackAxisToolTipEventArgs { - /** Name of the legend item shape. Use this option to customize legend item shape before rendering - */ - symbolShape?: string; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Instance of the series object corresponding to the legend item - */ - series?: any; - } + /** Instance of the chart model object + */ + model?: any; - export interface LegendItemMouseMoveEventArgs { + /** Name of the event + */ + type?: string; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** location - Location of the crosshair label in pixels axisIndex - Index of the axis for which crosshair label is displayed crossAxis - Instance of the chart axis object + * for which cross hair label is displayed currentTrackText - Text to be displayed in crosshair label. Use this option to add custom text in crosshair label + */ + data?: any; + } - /** Instance of the chart model object - */ - model?: any; + export interface TrackToolTipEventArgs { - /** Name of the event - */ - type?: string; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** X-coordinate of legend item in pixel - */ - startX?: number; + /** Instance of the chart model object + */ + model?: any; - /** Y-coordinate of legend item in pixel - */ - startY?: number; + /** Name of the event + */ + type?: string; - /** Instance of the legend item object that is about to be rendered - */ - LegendItem?: any; + /** location - Location of the trackball tooltip in pixels pointIndex - Index of the point for which trackball tooltip is displayed seriesIndex - Index of the series in + * series collection currentText - Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip series - Instance of the series object + * for which trackball tooltip is displayed. + */ + data?: any; + } - /** Options to customize the legend item styles such as border, color, size, etc…, - */ - style?: any; + export interface AxisLabelClickEventArgs { - /** Options to customize the legend item styles such as border, color, size, etc…, - */ - Bounds?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Name of the legend item shape. Use this option to customize legend item shape before rendering - */ - symbolShape?: string; + /** Instance of the chart model object + */ + model?: any; - /** Instance of the series object corresponding to the legend item - */ - series?: any; - } + /** Name of the event + */ + type?: string; - export interface LegendItemRenderingEventArgs { + /** location - X and Y co-ordinate of the labels in chart area. index - Index of the label. axis - Instance of the corresponding axis. text - Label that is clicked. + * + */ + data?: any; + } - /** Set this option to true to cancel the event - */ - cancel?: boolean; + export interface AxisLabelMouseMoveEventArgs { - /** Instance of the chart model object - */ - model?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Name of the event - */ - type?: string; + /** Instance of the chart model object + */ + model?: any; - /** X-coordinate of legend item in pixel - */ - startX?: number; + /** Name of the event + */ + type?: string; - /** Y-coordinate of legend item in pixel - */ - startY?: number; + /** location - X and Y co-ordinate of the labels in chart area. index - Index of the label. axis - Instance of the corresponding axis. text - Label that is hovered. + * + */ + data?: any; + } - /** Instance of the legend item object that is about to be rendered - */ - legendItem?: any; + export interface ChartClickEventArgs { - /** Options to customize the legend item styles such as border, color, size, etc. - */ - style?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Name of the legend item shape. Use this option to customize legend item shape before rendering - */ - symbolShape?: string; - } + /** Instance of the chart model object + */ + model?: any; - export interface LoadEventArgs { + /** Name of the event + */ + type?: string; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** location - X and Y co-ordinate of the points with respect to chart area.id - ID of the target element. size - Width and height of the chart. pageX - x-coordinate of the + * pointer, relative to the page pageY - y-coordinate of the pointer, relative to the page + */ + data?: any; + } - /** Instance of the chart model object - */ - model?: any; + export interface MultiLevelLabelClickEventArgs { - /** Name of the event - */ - type?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface RangeSelectedEventArgs { + /** Instance of the chart model object + */ + model?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; - /** Instance of the chart model object - */ - model?: any; + /** location - X and Y co-ordinate of the points with respect to chart area. axis - axis of the multilevellabels. multilevellabel - Multi level label details + */ + data?: any; + } - /** Name of the event - */ - type?: string; + export interface ChartMouseMoveEventArgs { - /** Selected data collection of object - */ - data?: any; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface PointRegionClickEventArgs { + /** Instance of the chart model object + */ + model?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; + } - /** Instance of the chart model object - */ - model?: any; + export interface ChartDoubleClickEventArgs { - /** Name of the event - */ - type?: string; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** X-coordinate of point in pixel - */ - locationX?: number; + /** Instance of the chart model object + */ + model?: any; - /** Y-coordinate of point in pixel - */ - locationY?: number; + /** Name of the event + */ + type?: string; + } - /** Index of the point in series - */ - pointIndex?: number; + export interface ChartMouseLeaveEventArgs { - /** Index of the series in series collection to which the point belongs - */ - seriesIndex?: number; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface PointRegionMouseMoveEventArgs { + /** Instance of the chart model object + */ + model?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; - /** Instance of the chart model object - */ - model?: any; + /** location - X and Y co-ordinate of the points with respect to chart area.id - ID of the target element. size - Width and height of the chart. pageX - x-coordinate of the + * pointer, relative to the page pageY - y-coordinate of the pointer, relative to the page + */ + data?: any; + } - /** Name of the event - */ - type?: string; + export interface AnnotationClickEventArgs { - /** X-coordinate of point in pixel - */ - locationX?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Y-coordinate of point in pixel - */ - locationY?: number; + /** Instance of the chart model object + */ + model?: any; - /** Index of the point in series - */ - pointIndex?: number; + /** Name of the event + */ + type?: string; - /** Index of the series in series collection to which the point belongs - */ - seriesIndex?: number; - } + /** location - X and Y co-ordinate of the annotation in chart area. contentData - Information about the annotation, like Coordinate unit, Region, content pageX- + * x-coordinate of the pointer, relative to the page pageY - y-coordinate of the pointer, relative to the page + */ + data?: any; + } - export interface PreRenderEventArgs { + export interface AfterResizeEventArgs { - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Instance of the chart model object - */ - model?: any; + /** Instance of the chart model object + */ + model?: any; - /** Name of the event - */ - type?: string; - } + /** Name of the event + */ + type?: string; - export interface SeriesRegionClickEventArgs { + /** width - Chart width, after resize height - Chart height, after resize prevWidth - Chart width, before resize prevHeight - Chart height, before resize + * originalWidth- Chart width, when the chart was first rendered originalHeight - Chart height, when the chart was first rendered + */ + data?: any; + } - /** Set this option to true to cancel the event - */ - cancel?: boolean; + export interface BeforeResizeEventArgs { - /** Instance of the chart model object - */ - model?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Name of the event - */ - type?: string; + /** Instance of the chart model object + */ + model?: any; - /** Instance of the selected series - */ - series?: any; + /** Name of the event + */ + type?: string; - /** Index of the selected series - */ - seriesIndex?: number; - } + /** currentWidth - Chart width, before resize currentHeight - Chart height, before resize newWidth - Chart width, after resize newHeight - Chart height, after resize + */ + data?: any; + } - export interface SeriesRenderingEventArgs { + export interface ErrorBarRenderingEventArgs { - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Instance of the chart model object - */ - model?: any; + /** Instance of the chart model object + */ + model?: any; - /** Name of the event - */ - type?: string; + /** Name of the event + */ + type?: string; - /** Instance of the series which is about to get rendered - */ - series?: any; - } + /** errorbar - Error bar Object + */ + data?: any; + } - export interface SymbolRenderingEventArgs { + export interface MultiLevelLabelRenderingEventArgs { - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Instance of the chart model object - */ - model?: any; + /** Instance of the chart model object + */ + model?: any; - /** Name of the event - */ - type?: string; + /** Name of the event + */ + type?: string; - /** Instance that holds the location of marker symbol - */ - location?: any; + /** multilevellabels - MultiLevel Label Object + */ + data?: any; + } - /** Options to customize the marker style such as color, border and size - */ - style?: any; - } + export interface TrendlineRenderingEventArgs { - export interface TitleRenderingEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** Instance of the chart model object + */ + model?: any; - /** Instance of the chart model object - */ - model?: any; + /** Name of the event + */ + type?: string; - /** Name of the event - */ - type?: string; + /** trendlines - Trendline Object series - Series data of the chart forwardForecast - Forward Forecast value for the trendline backwardForecast - Backward Forecast value + * for the trendline + */ + data?: any; + } - /** Option to customize the title location in pixels - */ - location?: any; + export interface ScrollChangedEventArgs { - /** Read-only option to find the size of the title - */ - size?: any; + /** oldRange - returns the scrollbar position old start and end range value on change end of scrollbar newRange - returns the scrollbar position new start and end range value + * on change end of scrollbar + */ + data?: any; - /** Use this option to add custom text in title - */ - title?: string; - } + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - export interface ToolTipInitializeEventArgs { + /** returns the RangeNavigator model + */ + model?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the name of the event + */ + type?: string; + } - /** Instance of the chart model object - */ - model?: any; + export interface ScrollStartEventArgs { - /** Name of the event - */ - type?: string; + /** startRange - returns the scrollbar position starting range value on changing scrollbar endRange - returns the scrollbar position end range value on changing scrollbar + */ + data?: any; - /** Text to be displayed in tooltip. Set this option to customize the text displayed in tooltip - */ - currentText?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Index of the point on which mouse is hovered - */ - pointIndex?: number; + /** returns the RangeNavigator model + */ + model?: any; - /** Index of the series in series collection whose point is hovered by mouse - */ - seriesIndex?: number; - } + /** returns the name of the event + */ + type?: string; + } - export interface TrackAxisToolTipEventArgs { + export interface ScrollEndEventArgs { - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** oldRange - returns the scrollbar position old start and end range value on change end of scrollbar newRange - returns the scrollbar position new start and end range value + * on change end of scrollbar + */ + data?: any; - /** Instance of the chart model object - */ - model?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Name of the event - */ - type?: string; + /** returns the RangeNavigator model + */ + model?: any; - /** Location of the crosshair label in pixels - */ - location?: any; + /** returns the name of the event + */ + type?: string; + } - /** Index of the axis for which crosshair label is displayed - */ - axisIndex?: number; + export interface DragStartEventArgs { - /** Instance of the chart axis object for which cross hair label is displayed - */ - crossAxis?: number; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Text to be displayed in crosshair label. Use this option to add custom text in crosshair label - */ - currentTrackText?: string; - } + /** Instance of the chart model object + */ + model?: any; - export interface TrackToolTipEventArgs { + /** Name of the event + */ + type?: string; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** seriesIndex - Series Index of the point held for dragging pointIndex - PointIndex of the point held for dragging point - Information of the point held for dragging + */ + data?: any; + } - /** Instance of the chart model object - */ - model?: any; + export interface DraggingEventArgs { - /** Name of the event - */ - type?: string; + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the chart model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + + /** seriesIndex - Series Index of the point held for dragging pointIndex - PointIndex of the point held for dragging oldValue - Previous value of the point before dragging + * newValue - Current value of the point + */ + data?: any; + } + + export interface DragEndEventArgs { - /** Location of the trackball tooltip in pixels - */ - location?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the chart model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + + /** seriesIndex - Series Index of the point held for dragging pointIndex - PointIndex of the point held for dragging oldValue - Previous value of the point before dragging + * newValue - Current value of the point series - Contains the all the series information of the chart + */ + data?: any; + } + + export interface SubTitleRenderingEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the chart model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + + /** location - location of the subTitle text subtitle - text of the subtitle size - Size of the Subtitle text + */ + data?: any; + } + + export interface AnnotationsMargin { + + /** Annotation is placed at the specified value above its original position. + * @Default {0} + */ + bottom?: number; + + /** Annotation is placed at the specified value from left side of its original position. + * @Default {0} + */ + left?: number; + + /** Annotation is placed at the specified value from the right side of its original position. + * @Default {0} + */ + right?: number; + + /** Annotation is placed at the specified value under its original position. + * @Default {0} + */ + top?: number; + } + + export interface Annotation { + + /** Angle to rotate the annotation in degrees. + * @Default {'0'} + */ + angle?: number; + + /** Text content or id of a HTML element to be displayed as annotation. + */ + content?: string; + + /** Specifies how annotations have to be placed in Chart. + * @Default {none. See CoordinateUnit} + */ + coordinateUnit?: ej.datavisualization.Chart.CoordinateUnit|string; + + /** Specifies the horizontal alignment of the annotation. + * @Default {middle. See HorizontalAlignment} + */ + horizontalAlignment?: ej.datavisualization.Chart.HorizontalAlignment|string; + + /** Options to customize the margin of annotation. + */ + margin?: AnnotationsMargin; + + /** Controls the opacity of the annotation. + * @Default {1} + */ + opacity?: number; + + /** Specifies whether annotation has to be placed with respect to chart or series. + * @Default {chart. See Region} + */ + region?: ej.datavisualization.Chart.Region|string; + + /** Specifies the vertical alignment of the annotation. + * @Default {middle. See VerticalAlignment} + */ + verticalAlignment?: ej.datavisualization.Chart.VerticalAlignment|string; + + /** Controls the visibility of the annotation. + * @Default {false} + */ + visible?: boolean; + + /** Represents the horizontal offset when coordinateUnit is pixels.when coordinateUnit is points, it represents the x-coordinate of axis bounded with xAxisName property or primary X + * axis when xAxisName is not provided.This property is not applicable when coordinateUnit is none. + * @Default {0} + */ + x?: number; + + /** Name of the horizontal axis to be used for positioning the annotation. This property is applicable only when coordinateUnit is points. + */ + xAxisName?: string; + + /** Represents the vertical offset when coordinateUnit is pixels.When coordinateUnit is points, it represents the y-coordinate of axis bounded with yAxisName property or primary Y + * axis when yAxisName is not provided.This property is not applicable when coordinateUnit is none. + * @Default {0} + */ + y?: number; + + /** Name of the vertical axis to be used for positioning the annotation.This property is applicable only when coordinateUnit is points. + */ + yAxisName?: string; + } + + export interface Border { + + /** Border color of the chart. + * @Default {null} + */ + color?: string; + + /** Opacity of the chart border. + * @Default {0.3} + */ + opacity?: number; + + /** Width of the Chart border. + * @Default {0} + */ + width?: number; + } + + export interface ExportSettings { + + /** Specifies the downloading filename + * @Default {chart} + */ + filename?: string; + + /** Specifies the name of the action URL + */ + action?: string; + + /** Specifies the angle for rotation + * @Default {0} + */ + angle?: number; + + /** Specifies the format of the file to export + * @Default {png} + */ + type?: ej.datavisualization.Chart.ExportingType|string; + + /** Specifies the orientation of the document + * @Default {portrait} + */ + orientation?: ej.datavisualization.Chart.ExportingOrientation|string; + + /** Specifies the mode of exporting + * @Default {client} + */ + mode?: ej.datavisualization.Chart.ExportingMode|string; + + /** Enable/ disable the multiple excel exporting + * @Default {false} + */ + multipleExport?: boolean; + } + + export interface ChartAreaBorder { + + /** Border color of the plot area. + * @Default {Gray} + */ + color?: string; + + /** Opacity of the plot area border. + * @Default {0.3} + */ + opacity?: number; + + /** Border width of the plot area. + * @Default {0.5} + */ + width?: number; + } + + export interface ChartArea { + + /** Background color of the plot area. + * @Default {transparent} + */ + background?: string; + + /** Options for customizing the border of the plot area. + */ + border?: ChartAreaBorder; + } + + export interface ColumnDefinition { + + /** Specifies the unit to measure the width of the column in plotting area. + * @Default {'pixel'. See Unit} + */ + unit?: ej.datavisualization.Chart.Unit|string; + + /** Width of the column in plotting area. Width is measured in either pixel or percentage based on the value of unit property. + * @Default {50} + */ + columnWidth?: number; + + /** Color of the line that indicates the starting point of the column in plotting area. + * @Default {transparent} + */ + lineColor?: string; + + /** Width of the line that indicates the starting point of the column in plot area. + * @Default {1} + */ + lineWidth?: number; + } + + export interface CommonSeriesOptionsBorder { + + /** Border color of all series. + * @Default {transparent} + */ + color?: string; + + /** DashArray for border of the series. + * @Default {null} + */ + dashArray?: string; + + /** Border width of all series. + * @Default {1} + */ + width?: number; + } + + export interface CommonSeriesOptionsFont { + + /** Font color of the text in all series. + * @Default {#707070} + */ + color?: string; + + /** Font Family for all the series. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font Style for all the series. + * @Default {normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Specifies the font weight for all the series. + * @Default {regular} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity for text in all the series. + * @Default {1} + */ + opacity?: number; + + /** Font size for text in all the series. + * @Default {12px} + */ + size?: string; + } + + export interface CommonSeriesOptionsBubbleOptions { + + /** Used for the calculation of the bubble radius based on the mode selected + * @Default {minmax} + */ + radiusMode?: ej.datavisualization.Chart.RadiusMode|string; + + /** Used for the setting the minimum radius of the bubble + * @Default {1} + */ + minRadius?: number; + + /** Used for setting the maximum radius of the bubble + * @Default {3} + */ + maxRadius?: number; + } + + export interface CommonSeriesOptionsMarkerBorder { + + /** Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /** Border width of the marker shape. + * @Default {3} + */ + width?: number; + } + + export interface CommonSeriesOptionsMarkerDataLabelBorder { + + /** Border color of the data label. + * @Default {null} + */ + color?: string; + + /** Border width of the data label. + * @Default {0.1} + */ + width?: number; + } + + export interface CommonSeriesOptionsMarkerDataLabelConnectorLine { + + /** Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.ConnectorLineType|string; + + /** Width of the connector. + * @Default {0.5} + */ + width?: number; + + /** Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /** Height of the connector line. + * @Default {null} + */ + height?: string; + } + + export interface CommonSeriesOptionsMarkerDataLabelFont { + + /** Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /** Font color of the data label text. + * @Default {null} + */ + color?: string; + + /** Font size of the data label. + * @Default {12px} + */ + size?: string; + } + + export interface CommonSeriesOptionsMarkerDataLabelMargin { + + /** Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /** Left margin of the text. + * @Default {5} + */ + left?: number; + + /** Right margin of the text. + * @Default {5} + */ + right?: number; + + /** Top margin of the text. + * @Default {5} + */ + top?: number; + } + + export interface CommonSeriesOptionsMarkerDataLabelOffset { + + /** X value or horizontal offset to position the labels in chart. + * @Default {0} + */ + x?: number; + + /** Y value or vertical offset to position the labels. + * @Default {0} + */ + y?: number; + } + + export interface CommonSeriesOptionsMarkerDataLabel { + + /** Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /** Maximum label width of the data label. + * @Default {null} + */ + maximumLabelWidth?: number; + + /** Enable the wrap option to the data label. + * @Default {false} + */ + enableWrap?: boolean; + + /** Options for customizing the border of the data label. + */ + border?: CommonSeriesOptionsMarkerDataLabelBorder; + + /** Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: CommonSeriesOptionsMarkerDataLabelConnectorLine; + + /** Background color of the data label. + * @Default {null} + */ + fill?: string; + + /** Options for customizing the data label font. + */ + font?: CommonSeriesOptionsMarkerDataLabelFont; + + /** Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /** Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: CommonSeriesOptionsMarkerDataLabelMargin; + + /** Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /** Options for customizing the datalabel positions + */ + offset?: CommonSeriesOptionsMarkerDataLabelOffset; + + /** Background shape of the data label. + * @Default {none. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + */ + template?: string; + + /** Name of a field in data source, where datalabel text is displayed. + */ + textMappingName?: string; + + /** Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, + * candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /** Vertical alignment of the data label. + * @Default {center} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /** Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; + } + + export interface CommonSeriesOptionsMarkerSize { + + /** Height of the marker. + * @Default {6} + */ + height?: number; + + /** Width of the marker. + * @Default {6} + */ + width?: number; + } + + export interface CommonSeriesOptionsMarker { + + /** Options for customizing the border of the marker shape. + */ + border?: CommonSeriesOptionsMarkerBorder; + + /** Options for displaying and customizing data labels. + */ + dataLabel?: CommonSeriesOptionsMarkerDataLabel; + + /** Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /** The URL for the Image to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /** Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /** Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Options for customizing the size of the marker shape. + */ + size?: CommonSeriesOptionsMarkerSize; + + /** Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; + } + + export interface CommonSeriesOptionsOutlierSettingsSize { + + /** Height of the outlier shape. + * @Default {6} + */ + height?: number; + + /** Width of the outlier shape. + * @Default {6} + */ + width?: number; + } + + export interface CommonSeriesOptionsOutlierSettings { + + /** Specifies the shape of the outlier. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Options for customizing the size of the outlier shape. + */ + size?: CommonSeriesOptionsOutlierSettingsSize; + } + + export interface CommonSeriesOptionsCornerRadius { + + /** Specifies the radius for the top left corner. + * @Default {0} + */ + topLeft?: number; + + /** Specifies the radius for the top right corner. + * @Default {0} + */ + topRight?: number; + + /** Specifies the radius for the bottom left corner. + * @Default {0} + */ + bottomLeft?: number; + + /** Specifies the radius for the bottom right corner. + * @Default {0} + */ + bottomRight?: number; + } + + export interface CommonSeriesOptionsTooltipBorder { + + /** Border color of the tooltip. + * @Default {null} + */ + color?: string; + + /** Border width of the tooltip. + * @Default {1} + */ + width?: number; + } + + export interface CommonSeriesOptionsTooltip { + + /** Options for customizing the border of the tooltip. + */ + border?: CommonSeriesOptionsTooltipBorder; + + /** Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /** Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /** Specifies the duration, the tooltip has to be displayed. + * @Default {500ms} + */ + duration?: string; + + /** Enables/disables the animation of the tooltip when moving from one point to other. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Background color of the tooltip. + * @Default {null} + */ + fill?: string; + + /** Format of the tooltip content. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /** Opacity of the tooltip. + * @Default {0.5} + */ + opacity?: number; + + /** Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {null} + */ + template?: string; + + /** Controls the visibility of the tooltip. + * @Default {false} + */ + visible?: boolean; + } + + export interface CommonSeriesOptionsEmptyPointSettingsStyleBorder { + + /** Border color of the empty point. + */ + color?: string; + + /** Border width of the empty point. + * @Default {1} + */ + width?: number; + } + + export interface CommonSeriesOptionsEmptyPointSettingsStyle { + + /** Color of the empty point. + */ + color?: string; + + /** Options for customizing border of the empty point in the series. + */ + border?: CommonSeriesOptionsEmptyPointSettingsStyleBorder; + } + + export interface CommonSeriesOptionsEmptyPointSettings { + + /** Controls the visibility of the empty point. + * @Default {true} + */ + visible?: boolean; + + /** Specifies the mode of empty point. + * @Default {gap} + */ + displayMode?: ej.datavisualization.Chart.EmptyPointMode|string; + + /** Options for customizing the color and border of the empty point in the series. + */ + style?: CommonSeriesOptionsEmptyPointSettingsStyle; + } + + export interface CommonSeriesOptionsConnectorLine { + + /** Width of the connector line. + * @Default {1} + */ + width?: number; + + /** Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /** DashArray of the connector line. + * @Default {null} + */ + dashArray?: string; + + /** DashArray of the connector line. + * @Default {1} + */ + opacity?: number; + } + + export interface CommonSeriesOptionsDragSettings { + + /** drag/drop the series + * @Default {false} + */ + enable?: boolean; + + /** Specifies the type of drag settings. + * @Default {xy} + */ + type?: string; + } + + export interface CommonSeriesOptionsErrorBarCap { + + /** Show/Hides the error bar cap. + * @Default {true} + */ + visible?: boolean; + + /** Width of the error bar cap. + * @Default {1} + */ + width?: number; + + /** Length of the error bar cap. + * @Default {1} + */ + length?: number; + + /** Color of the error bar cap. + * @Default {“#000000”} + */ + fill?: string; + } + + export interface CommonSeriesOptionsErrorBar { + + /** Show/hides the error bar + * @Default {visible} + */ + visibility?: boolean; + + /** Specifies the type of error bar. + * @Default {FixedValue} + */ + type?: ej.datavisualization.Chart.ErrorBarType|string; + + /** Specifies the mode of error bar. + * @Default {vertical} + */ + mode?: ej.datavisualization.Chart.ErrorBarMode|string; + + /** Specifies the direction of error bar. + * @Default {both} + */ + direction?: ej.datavisualization.Chart.ErrorBarDirection|string; + + /** Value of vertical error bar. + * @Default {3} + */ + verticalErrorValue?: number; + + /** Value of horizontal error bar. + * @Default {1} + */ + horizontalErrorValue?: number; + + /** Value of positive horizontal error bar. + * @Default {1} + */ + horizontalPositiveErrorValue?: number; + + /** Value of negative horizontal error bar. + * @Default {1} + */ + horizontalNegativeErrorValue?: number; + + /** Value of positive vertical error bar. + * @Default {5} + */ + verticalPositiveErrorValue?: number; + + /** Value of negative vertical error bar. + * @Default {5} + */ + verticalNegativeErrorValue?: number; + + /** Fill color of the error bar. + * @Default {#000000} + */ + fill?: string; + + /** Width of the error bar. + * @Default {1} + */ + width?: number; + + /** Options for customizing the error bar cap. + */ + cap?: CommonSeriesOptionsErrorBarCap; + } + + export interface CommonSeriesOptionsTrendlinesTooltipBorder { + + /** Border color of the trendline tooltip. + * @Default {null} + */ + color?: string; + + /** Border width of the trendline tooltip. + * @Default {1} + */ + width?: number; + } + + export interface CommonSeriesOptionsTrendlinesTooltip { + + /** Options for customizing the border of the trendline tooltip. + */ + border?: CommonSeriesOptionsTrendlinesTooltipBorder; + + /** Customize the corner radius of the trendline tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /** Customize the corner radius of the trendline tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /** Specifies the duration, the tooltip has to be displayed. + * @Default {500ms} + */ + duration?: string; + + /** Enables/disables the animation of the trendline tooltip when moving from one point to other. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Background color of the trendline tooltip. + * @Default {null} + */ + fill?: string; + + /** Format of the tooltip content displayed in the trendlines. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /** Opacity of the trendline tooltip. + * @Default {0.5} + */ + opacity?: number; + } + + export interface CommonSeriesOptionsTrendline { + + /** Show/hides the trendline. + */ + visibility?: boolean; + + /** Show/hides the trendline legend. + * @Default {visible} + */ + visibleOnLegend?: string; + + /** Specifies the type of the trendline for the series. + * @Default {linear. See TrendlinesType} + */ + type?: string; + + /** Name for the trendlines that is to be displayed in the legend text. + * @Default {trendline} + */ + name?: string; + + /** Fill color of the trendlines. + * @Default {#0000FF} + */ + fill?: string; + + /** Width of the trendlines. + * @Default {1} + */ + width?: number; + + /** Opacity of the trendline. + * @Default {1} + */ + opacity?: number; + + /** Pattern of dashes and gaps used to stroke the trendline. + */ + dashArray?: string; + + /** Future trends of the current series. + * @Default {0} + */ + forwardForecast?: number; + + /** Past trends of the current series. + * @Default {0} + */ + backwardForecast?: number; + + /** Specifies the order of the polynomial trendlines. + * @Default {0} + */ + polynomialOrder?: number; + + /** Specifies the moving average starting period value. + * @Default {2} + */ + period?: number; + + /** Options for customizing the tooltip of the trendlines in the chart. + */ + tooltip?: CommonSeriesOptionsTrendlinesTooltip; + + /** Specifies the intercept value of the trendlines. + * @Default {null} + */ + intercept?: number; + } + + export interface CommonSeriesOptionsHighlightSettingsBorder { + + /** Border color of the series/point on highlight. + */ + color?: string; + + /** Border width of the series/point on highlight. + * @Default {2} + */ + width?: string; + } + + export interface CommonSeriesOptionsHighlightSettings { + + /** Enables/disables the ability to highlight the series or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether the series or data point has to be highlighted. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /** Color of the series/point on highlight. + */ + color?: string; + + /** Opacity of the series/point on highlight. + * @Default {0.6} + */ + opacity?: number; + + /** Options for customizing the border of series on highlight. + */ + border?: CommonSeriesOptionsHighlightSettingsBorder; + + /** Specifies the pattern for the series/point on highlight. + * @Default {none. See Pattern} + */ + pattern?: string; + + /** Custom pattern for the series on highlight. + */ + customPattern?: string; + } + + export interface CommonSeriesOptionsSelectionSettingsBorder { + + /** Border color of the series/point on selection. + */ + color?: string; + + /** Border width of the series/point on selection. + * @Default {2} + */ + width?: string; + } + + export interface CommonSeriesOptionsSelectionSettings { + + /** Enables/disables the ability to select a series/data point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies the type of selection. + * @Default {single} + */ + type?: ej.datavisualization.Chart.SelectionType|string; + + /** Specifies whether the series or data point has to be selected. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /** Specifies the drawn rectangle type. + * @Default {xy} + */ + rangeType?: ej.datavisualization.Chart.RangeType|string; + + /** Color of the series/point on selection. + */ + color?: string; + + /** Opacity of the series/point on selection. + * @Default {0.6} + */ + opacity?: number; + + /** Options for customizing the border of the series on selection. + */ + border?: CommonSeriesOptionsSelectionSettingsBorder; + + /** Specifies the pattern for the series/point on selection. + * @Default {none. See Pattern} + */ + pattern?: string; + + /** Custom pattern for the series on selection. + */ + customPattern?: string; + } + + export interface CommonSeriesOptions { + + /** Options to customize the border of all the series. + */ + border?: CommonSeriesOptionsBorder; + + /** To render the column and bar type series in rectangle/cylinder shape. See + * @Default {rectangle} + */ + columnFacet?: ej.datavisualization.Chart.ColumnFacet|string; + + /** Relative width of the columns in column type series. Value ranges from 0 to 1. Width also depends upon columnSpacing property. + * @Default {0.7} + */ + columnWidth?: number; + + /** Spacing between columns of different series. Value ranges from 0 to 1 + * @Default {0} + */ + columnSpacing?: number; + + /** Enables or disables the visibility of legend item. + * @Default {visible} + */ + visibleOnLegend?: string; + + /** Group of the stacking collection series. + */ + stackingGroup?: string; + + /** Pattern of dashes and gaps used to stroke all the line type series. + */ + dashArray?: string; + + /** Set the dataSource for all series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /** Controls the size of the hole in doughnut series. Value ranges from 0 to 1 + * @Default {0.4} + */ + doughnutCoefficient?: number; + + /** Controls the size of the doughnut series. Value ranges from 0 to 1. + * @Default {0.8} + */ + doughnutSize?: number; + + /** Specifies the type of series to be drawn in radar or polar series. + * @Default {line. See DrawType} + */ + drawType?: ej.datavisualization.Chart.DrawType|string; + + /** Enable/disable the animation for all the series. + * @Default {true} + */ + enableAnimation?: boolean; + + /** To avoid overlapping of data labels smartly. + * @Default {true} + */ + enableSmartLabels?: boolean; + + /** Start angle of pie/doughnut series. + * @Default {null} + */ + endAngle?: number; + + /** Explodes the pie/doughnut slices on mouse move. + * @Default {false} + */ + explode?: boolean; + + /** Explodes all the slice of pie/doughnut on render. + * @Default {false} + */ + explodeAll?: boolean; + + /** Index of the point to be exploded from pie/doughnut/pyramid/funnel. + * @Default {null} + */ + explodeIndex?: number; + + /** Specifies the distance of the slice from the center, when it is exploded. + * @Default {0.4} + */ + explodeOffset?: number; + + /** Fill color for all the series. + * @Default {null} + */ + fill?: string; + + /** Options for customizing the font of all the series. + */ + font?: CommonSeriesOptionsFont; + + /** Sets the height of the funnel in funnel series. Values can be either pixel or percentage. + * @Default {32.7%} + */ + funnelHeight?: string; + + /** Sets the width of the funnel in funnel series. Values can be either pixel or percentage. + * @Default {11.6%} + */ + funnelWidth?: string; + + /** Gap between the slices in pyramid and funnel series. + * @Default {0} + */ + gapRatio?: number; + + /** Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. + * @Default {true} + */ + isClosed?: boolean; + + /** Specifies whether to stack the column series in polar/radar charts. + * @Default {false} + */ + isStacking?: boolean; + + /** Renders the chart vertically. This is applicable only for Cartesian type series. + * @Default {false} + */ + isTransposed?: boolean; + + /** Render the x mark in the center of the box and whisker series type.x represents the average value of the box and whisker series. + * @Default {true} + */ + showMedian?: boolean; + + /** Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. + * @Default {inside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /** Specifies the mode for splitting the data points in pieOfPie series. + * @Default {value. See SplitMode} + */ + splitMode?: ej.datavisualization.Chart.SplitMode|string; + + /** Quartile calculation has been performed in three different formulas to render the box and whisker series. + * @Default {exclusive} + */ + boxPlotMode?: ej.datavisualization.Chart.boxPlotMode|string; + + /** Options for customizing the bubble options of the Bubble series + */ + bubbleOptions?: CommonSeriesOptionsBubbleOptions; + + /** Specifies the line cap of the series. + * @Default {butt. See LineCap} + */ + lineCap?: ej.datavisualization.Chart.LineCap|string; + + /** Specifies the type of shape to be used where two lines meet. + * @Default {round. See LineJoin} + */ + lineJoin?: ej.datavisualization.Chart.LineJoin|string; + + /** Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. + */ + marker?: CommonSeriesOptionsMarker; + + /** Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /** Options for customizing the outlier of the series. + */ + outlierSettings?: CommonSeriesOptionsOutlierSettings; + + /** Name of a field in data source, where the fill color for all the data points is generated. + */ + palette?: string; + + /** Controls the size of pie series. Value ranges from 0 to 1. + * @Default {0.8} + */ + pieCoefficient?: number; + + /** Controls the size of the second pie in pieOfPie series. Value ranges from 0 to 1. + * @Default {0.6} + */ + pieOfPieCoefficient?: number; + + /** Split Value of pieofpie series. + * @Default {null} + */ + splitValue?: string; + + /** Distance between the two pie's in pieOfPie series. + * @Default {50} + */ + gapWidth?: number; + + /** Name of the property in the datasource that contains fill color for the series. + * @Default {null} + */ + pointColorMappingName?: string; + + /** Specifies the mode of the pyramid series. + * @Default {linear. See PyramidMode} + */ + pyramidMode?: ej.datavisualization.Chart.PyramidMode|string; + + /** Start angle from where the pie/doughnut series renders. By default it starts from 0. + * @Default {null} + */ + startAngle?: number; + + /** Options for customizing the corner radius. cornerRadius property also takes the numeric input and applies it for all the four corners of the column. + */ + cornerRadius?: CommonSeriesOptionsCornerRadius; + + /** Options for customizing the tooltip of chart. + */ + tooltip?: CommonSeriesOptionsTooltip; + + /** Specifies the type of the series to render in chart. + * @Default {column. See Type} + */ + type?: ej.datavisualization.Chart.Type|string; + + /** Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + xAxisName?: string; + + /** Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /** Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + yAxisName?: string; + + /** Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /** Name of the property in the datasource that contains high value for the series. + * @Default {null} + */ + high?: string; + + /** Name of the property in the datasource that contains low value for the series. + * @Default {null} + */ + low?: string; + + /** Name of the property in the datasource that contains open value for the series. + * @Default {null} + */ + open?: string; + + /** Name of the property in the datasource that contains close value for the series. + * @Default {null} + */ + close?: string; + + /** Z-order of the series. + * @Default {0} + */ + zOrder?: number; + + /** Name of the property in the datasource that contains the size value for the bubble series. + * @Default {null} + */ + size?: string; + + /** Options for customizing the empty point in the series. + */ + emptyPointSettings?: CommonSeriesOptionsEmptyPointSettings; + + /** Fill color for the positive column of the waterfall. + * @Default {null} + */ + positiveFill?: string; + + /** Options for customizing the waterfall connector line. + */ + connectorLine?: CommonSeriesOptionsConnectorLine; + + /** Options to customize the drag and drop in series. + */ + dragSettings?: CommonSeriesOptionsDragSettings; + + /** Options to customize the error bar in series. + */ + errorBar?: CommonSeriesOptionsErrorBar; + + /** Option to add the trendlines to chart. + */ + trendlines?: CommonSeriesOptionsTrendline[]; + + /** Options for customizing the appearance of the series or data point while highlighting. + */ + highlightSettings?: CommonSeriesOptionsHighlightSettings; + + /** Options for customizing the appearance of the series/data point on selection. + */ + selectionSettings?: CommonSeriesOptionsSelectionSettings; + } + + export interface CrosshairTrackballTooltipSettingsBorder { + + /** Border width of the trackball tooltip. + * @Default {null} + */ + width?: number; + + /** Border color of the trackball tooltip. + * @Default {null} + */ + color?: string; + } + + export interface CrosshairTrackballTooltipSettings { + + /** Options for customizing the trackball tooltip border. + */ + border?: CrosshairTrackballTooltipSettingsBorder; + + /** Background color of the trackball tooltip. + * @Default {null} + */ + fill?: string; + + /** Rounded corner x value of the trackball tooltip. + * @Default {3} + */ + rx?: number; + + /** Rounded corner y value of the trackball tooltip. + * @Default {3} + */ + ry?: number; + + /** Opacity value of the trackball tooltip. + * @Default {1} + */ + opacity?: number; + + /** Specifies the mode of the trackball tooltip. + * @Default {float. See CrosshairMode} + */ + mode?: ej.datavisualization.Chart.CrosshairMode|string; + } + + export interface CrosshairMarkerBorder { + + /** Border width of the marker. + * @Default {3} + */ + width?: number; + } + + export interface CrosshairMarkerSize { + + /** Height of the marker. + * @Default {10} + */ + height?: number; + + /** Width of the marker. + * @Default {10} + */ + width?: number; + } + + export interface CrosshairMarker { + + /** Options for customizing the border. + */ + border?: CrosshairMarkerBorder; + + /** Opacity of the marker. + * @Default {true} + */ + opacity?: boolean; + + /** Options for customizing the size of the marker. + */ + size?: CrosshairMarkerSize; + + /** Show/hides the marker. + * @Default {true} + */ + visible?: boolean; + } + + export interface CrosshairLine { + + /** Color of the crosshair line. + * @Default {transparent} + */ + color?: string; + + /** Width of the crosshair line. + * @Default {1} + */ + width?: number; + } + + export interface Crosshair { + + /** Options for customizing the trackball tooltip. + */ + trackballTooltipSettings?: CrosshairTrackballTooltipSettings; + + /** Options for customizing the marker in crosshair. + */ + marker?: CrosshairMarker; + + /** Options for customizing the crosshair line. + */ + line?: CrosshairLine; + + /** Specifies the type of the crosshair. It can be trackball or crosshair + * @Default {crosshair. See CrosshairType} + */ + type?: ej.datavisualization.Chart.CrosshairType|string; + + /** Show/hides the crosshair/trackball visibility. + * @Default {false} + */ + visible?: boolean; + } + + export interface IndicatorsHistogramBorder { + + /** Color of the histogram border in MACD indicator. + * @Default {#9999ff} + */ + color?: string; + + /** Controls the width of histogram border line in MACD indicator. + * @Default {1} + */ + width?: number; + } + + export interface IndicatorsHistogram { + + /** Options to customize the histogram border in MACD indicator. + */ + border?: IndicatorsHistogramBorder; + + /** Color of histogram columns in MACD indicator. + * @Default {#ccccff} + */ + fill?: string; + + /** Opacity of histogram columns in MACD indicator. + * @Default {1} + */ + opacity?: number; + } + + export interface IndicatorsLowerLine { + + /** Color of lower line. + * @Default {#008000} + */ + fill?: string; + + /** Width of the lower line. + * @Default {2} + */ + width?: number; + } + + export interface IndicatorsMacdLine { + + /** Color of MACD line. + * @Default {#ff9933} + */ + fill?: string; + + /** Width of the MACD line. + * @Default {2} + */ + width?: number; + } + + export interface IndicatorsPeriodLine { + + /** Color of period line in indicator. + * @Default {blue} + */ + fill?: string; + + /** Width of the period line in indicators. + * @Default {2} + */ + width?: number; + } + + export interface IndicatorsTooltipBorder { + + /** Border color of indicator tooltip. + * @Default {null} + */ + color?: string; + + /** Border width of indicator tooltip. + * @Default {1} + */ + width?: number; + } + + export interface IndicatorsTooltip { + + /** Option to customize the border of indicator tooltip. + */ + border?: IndicatorsTooltipBorder; + + /** Specifies the animation duration of indicator tooltip. + * @Default {500ms} + */ + duration?: string; + + /** Enables/disables the tooltip animation. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Format of indicator tooltip. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /** Background color of indicator tooltip. + * @Default {null} + */ + fill?: string; + + /** Opacity of indicator tooltip. + * @Default {0.95} + */ + opacity?: number; + + /** Controls the visibility of indicator tooltip. + * @Default {false} + */ + visible?: boolean; + } + + export interface IndicatorsUpperLine { + + /** Fill color of the upper line in indicators + * @Default {#ff9933} + */ + fill?: string; + + /** Width of the upper line in indicators. + * @Default {2} + */ + width?: number; + } + + export interface Indicator { + + /** The dPeriod value for stochastic indicator. + * @Default {3} + */ + dPeriod?: number; + + /** Enables/disables the animation. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Color of the technical indicator. + * @Default {#00008B} + */ + fill?: string; + + /** Options to customize the histogram in MACD indicator. + */ + histogram?: IndicatorsHistogram; + + /** Specifies the k period in stochastic indicator. + * @Default {3} + */ + kPeriod?: number; + + /** Specifies the long period in MACD indicator. + * @Default {26} + */ + longPeriod?: number; + + /** Options to customize the lower line in indicators. + */ + lowerLine?: IndicatorsLowerLine; + + /** Options to customize the MACD line. + */ + macdLine?: IndicatorsMacdLine; + + /** Specifies the type of the MACD indicator. + * @Default {line. See MACDType} + */ + macdType?: string; + + /** Specifies period value in indicator. + * @Default {14} + */ + period?: number; + + /** Options to customize the period line in indicators. + */ + periodLine?: IndicatorsPeriodLine; + + /** Name of the series for which indicator has to be drawn. + */ + seriesName?: string; + + /** Specifies the short period in MACD indicator. + * @Default {13} + */ + shortPeriod?: number; + + /** Specifies the standard deviation value for Bollinger band indicator. + * @Default {2} + */ + standardDeviations?: number; + + /** Options to customize the tooltip. + */ + tooltip?: IndicatorsTooltip; + + /** Trigger value of MACD indicator. + * @Default {9} + */ + trigger?: number; + + /** Specifies the visibility of indicator. + * @Default {visible} + */ + visibility?: string; + + /** Specifies the type of indicator that has to be rendered. + * @Default {sma. See IndicatorsType} + */ + type?: string; + + /** Options to customize the upper line in indicators + */ + upperLine?: IndicatorsUpperLine; + + /** Width of the indicator line. + * @Default {2} + */ + width?: number; + + /** Name of the horizontal axis used for indicator. Primary X axis is used when x axis name is not specified. + */ + xAxisName?: string; + + /** Name of the vertical axis used for indicator. Primary Y axis is used when y axis name is not specified + */ + yAxisName?: string; + } + + export interface LegendBorder { + + /** Border color of the legend. + * @Default {transparent} + */ + color?: string; + + /** Border width of the legend. + * @Default {1} + */ + width?: number; + } + + export interface LegendFont { + + /** Font family for legend item text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend item text. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight for legend item text. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Font size for legend item text. + * @Default {12px} + */ + size?: string; + } + + export interface LegendItemStyleBorder { + + /** Border color of the legend items. + * @Default {transparent} + */ + color?: string; + + /** Border width of the legend items. + * @Default {1} + */ + width?: number; + } + + export interface LegendItemStyle { + + /** Options for customizing the border of legend items. + */ + border?: LegendItemStyleBorder; + + /** Height of the shape in legend items. + * @Default {10} + */ + height?: number; + + /** Width of the shape in legend items. + * @Default {10} + */ + width?: number; + } + + export interface LegendLocation { + + /** X value or horizontal offset to position the legend in chart. + * @Default {0} + */ + x?: number; + + /** Y value or vertical offset to position the legend. + * @Default {0} + */ + y?: number; + } + + export interface LegendSize { + + /** Height of the legend. Height can be specified in either pixel or percentage. + * @Default {null} + */ + height?: string; + + /** Width of the legend. Width can be specified in either pixel or percentage. + * @Default {null} + */ + width?: string; + } + + export interface LegendTitleFont { + + /** Font family for the text in legend title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend title. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight for legend title. + * @Default {normal. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Font size for legend title. + * @Default {12px} + */ + size?: string; + } + + export interface LegendTitle { + + /** Options to customize the font used for legend title + */ + font?: LegendTitleFont; + + /** Text to be displayed in legend title. + */ + text?: string; + + /** Alignment of the legend title. + * @Default {center. See Alignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; + } + + export interface Legend { + + /** Horizontal alignment of the legend. + * @Default {Center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.Alignment|string; + + /** Background for the legend. Use this property to add a background image or background color for the legend. + */ + background?: string; + + /** Options for customizing the legend border. + */ + border?: LegendBorder; + + /** Number of columns to arrange the legend items. + * @Default {null} + */ + columnCount?: number; + + /** Controls whether legend has to use scrollbar or not. When enabled, scroll bar appears depending upon size and position properties of legend. + * @Default {true} + */ + enableScrollbar?: boolean; + + /** Fill color for the legend items. By using this property, it displays all legend item shapes in same color.Legend items representing invisible series is displayed in gray color. + * @Default {null} + */ + fill?: string; + + /** Options to customize the font used for legend item text. + */ + font?: LegendFont; + + /** Gap or padding between the legend items. + * @Default {10} + */ + itemPadding?: number; + + /** Options to customize the style of legend items. + */ + itemStyle?: LegendItemStyle; + + /** Options to customize the location of chart legend. Legend is placed in provided location only when value of position property is custom + */ + location?: LegendLocation; + + /** Opacity of the legend. + * @Default {1} + */ + opacity?: number; + + /** Places the legend at specified position. Legend can be placed at **left**, **right**, **top** or **bottom** of the chart area. To manually specify the location of legend, set + * **custom** as value to this property. + * @Default {Bottom. See Position} + */ + position?: ej.datavisualization.Chart.Position|string; + + /** Number of rows to arrange the legend items. + * @Default {null} + */ + rowCount?: number; + + /** Shape of the legend items. Default shape for pie and doughnut series is circle and all other series uses rectangle. + * @Default {None. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Options to customize the size of the legend. + */ + size?: LegendSize; + + /** Options to customize the legend title. + */ + title?: LegendTitle; + + /** Specifies the action taken when the legend width is more than the textWidth. + * @Default {none. See textOverflow} + */ + textOverflow?: ej.datavisualization.Chart.TextOverflow|string; + + /** Text width for legend item. + * @Default {34} + */ + textWidth?: number; + + /** Controls the visibility of the legend. + * @Default {true} + */ + visible?: boolean; + + /** Controls the selection through the legend. + * @Default {true} + */ + toggleSeriesVisibility?: boolean; + } + + export interface PrimaryXAxisAlternateGridBandEven { + + /** Fill color for the even grid bands. + * @Default {transparent} + */ + fill?: string; + + /** Opacity of the even grid band. + * @Default {1} + */ + opacity?: number; + } + + export interface PrimaryXAxisAlternateGridBandOdd { + + /** Fill color of the odd grid bands + * @Default {transparent} + */ + fill?: string; + + /** Opacity of odd grid band + * @Default {1} + */ + opacity?: number; + } + + export interface PrimaryXAxisAlternateGridBand { + + /** Options for customizing even grid band. + */ + even?: PrimaryXAxisAlternateGridBandEven; + + /** Options for customizing odd grid band. + */ + odd?: PrimaryXAxisAlternateGridBandOdd; + } + + export interface PrimaryXAxisAxisLine { + + /** Pattern of dashes and gaps to be applied to the axis line. + * @Default {null} + */ + dashArray?: string; + + /** Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. + * @Default {null} + */ + offset?: number; + + /** Show/hides the axis line. + * @Default {true} + */ + visible?: boolean; + + /** Default Value + */ + color?: string; + + /** Width of axis line. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryXAxisCrosshairLabel { + + /** Show/hides the crosshair label associated with this axis. + * @Default {false} + */ + visible?: boolean; + } + + export interface PrimaryXAxisFont { + + /** Font family of labels. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of labels. + * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the label. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the axis labels. + * @Default {1} + */ + opacity?: number; + + /** Font size of the axis labels. + * @Default {13px} + */ + size?: string; + } + + export interface PrimaryXAxisMajorGridLines { + + /** Pattern of dashes and gaps used to stroke the major grid lines. + * @Default {null} + */ + dashArray?: string; + + /** Color of the major grid line. + * @Default {null} + */ + color?: string; + + /** Opacity of major grid lines. + * @Default {1} + */ + opacity?: number; + + /** Show/hides the major grid lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the major grid lines. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryXAxisMajorTickLines { + + /** Length of the major tick lines. + * @Default {5} + */ + size?: number; + + /** Show/hides the major tick lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the major tick lines. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryXAxisMinorGridLines { + + /** Patterns of dashes and gaps used to stroke the minor grid lines. + * @Default {null} + */ + dashArray?: string; + + /** Show/hides the minor grid lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the minorGridLines. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryXAxisMinorTickLines { + + /** Length of the minor tick lines. + * @Default {5} + */ + size?: number; + + /** Show/hides the minor tick lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the minor tick line. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryXAxisRange { + + /** Minimum value of the axis range. + * @Default {null} + */ + min?: number; + + /** Maximum value of the axis range. + * @Default {null} + */ + max?: number; + + /** Interval of the axis range. + * @Default {null} + */ + interval?: number; + } + + export interface PrimaryXAxisMultiLevelLabelsFont { + + /** Font color of the multi level labels text. + * @Default {null} + */ + color?: string; + + /** Font family of the multi level labels text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the multi level labels text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the multi level label text. + * @Default {regular} + */ + fontWeight?: string; + + /** Opacity of the multi level label text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the multi level label text. + * @Default {12px} + */ + size?: string; + } + + export interface PrimaryXAxisMultiLevelLabelsBorder { + + /** Border color of the multi level labels. + * @Default {null} + */ + color?: string; + + /** Border width of the multi level labels. + * @Default {1} + */ + width?: number; + + /** Border type of the multi level labels. + * @Default {rectangle. See Type} + */ + type?: ej.datavisualization.Chart.MultiLevelLabelsBorderType|string; + } + + export interface PrimaryXAxisMultiLevelLabel { + + /** Visibility of the multi level labels. + * @Default {false} + */ + visible?: boolean; + + /** Text of the multi level labels. + */ + text?: string; + + /** Starting value of the multi level labels. + * @Default {null} + */ + start?: number; + + /** Ending value of the multi level labels. + * @Default {null} + */ + end?: number; + + /** Specifies the level of multi level labels. + * @Default {0} + */ + level?: number; + + /** Specifies the maximum width of the text in multi level labels. + * @Default {null} + */ + maximumTextWidth?: number; + + /** Specifies the alignment of the text in multi level labels. + * @Default {center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /** Specifies the handling of text over flow in multi level labels. + * @Default {center. See TextOverflow} + */ + textOverflow?: ej.datavisualization.Chart.TextOverflow|string; + + /** Options for customizing the font of the text. + */ + font?: PrimaryXAxisMultiLevelLabelsFont; + + /** Options for customizing the border of the series. + */ + border?: PrimaryXAxisMultiLevelLabelsBorder; + } + + export interface PrimaryXAxisStripLineFont { + + /** Font color of the strip line text. + * @Default {black} + */ + color?: string; + + /** Font family of the strip line text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the strip line text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the strip line text. + * @Default {regular} + */ + fontWeight?: string; + + /** Opacity of the strip line text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the strip line text. + * @Default {12px} + */ + size?: string; + } + + export interface PrimaryXAxisStripLine { + + /** Border color of the strip line. + * @Default {gray} + */ + borderColor?: string; + + /** Background color of the strip line. + * @Default {gray} + */ + color?: string; + + /** End value of the strip line. + * @Default {null} + */ + end?: number; + + /** Options for customizing the font of the text. + */ + font?: PrimaryXAxisStripLineFont; + + /** Start value of the strip line. + * @Default {null} + */ + start?: number; + + /** Indicates whether to render the strip line from the minimum/start value of the axis. This property does not work when start property is set. + * @Default {false} + */ + startFromAxis?: boolean; + + /** Specifies text to be displayed inside the strip line. + * @Default {stripLine} + */ + text?: string; + + /** Specifies the alignment of the text inside the strip line. + * @Default {middlecenter. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /** Show/hides the strip line. + * @Default {false} + */ + visible?: boolean; + + /** Width of the strip line. + * @Default {0} + */ + width?: number; + + /** Specifies the order where the strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered under the series and when it is “over”, it is + * rendered above the series. + * @Default {over. See ZIndex} + */ + zIndex?: ej.datavisualization.Chart.ZIndex|string; + } + + export interface PrimaryXAxisLabelBorder { + + /** Specifies the color of the label border. + * @Default {null} + */ + color?: string; + + /** Specifies the width of the label border. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryXAxisTitleFont { + + /** Font family of the title text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the title text. + * @Default {ej.datavisualization.Chart.FontStyle.Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the title text. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the axis title text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the axis title. + * @Default {16px} + */ + size?: string; + } + + export interface PrimaryXAxisTitle { + + /** Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. + * @Default {false} + */ + enableTrim?: boolean; + + /** Options for customizing the title font. + */ + font?: PrimaryXAxisTitleFont; + + /** Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {34} + */ + maximumTitleWidth?: number; + + /** Title for the axis. + */ + text?: string; + + /** Controls the visibility of axis title. + * @Default {true} + */ + visible?: boolean; + + /** offset value for axis title. + * @Default {0} + */ + offset?: number; + + /** Specifies the position of the axis title. + * @Default {outside. See Position} + */ + position?: ej.datavisualization.Chart.LabelPosition|string; + + /** Specifies the position of the axis title. + * @Default {center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.TextAlignment|string; + } + + export interface PrimaryXAxisScrollbarSettingsRange { + + /** Minimum value of the scrollbar range. + * @Default {null} + */ + min?: number; + + /** Maximum value for the scrollbar range . + * @Default {null} + */ + max?: number; + } + + export interface PrimaryXAxisScrollbarSettings { + + /** Specifies to enables or disables the scroll bar. + * @Default {false} + */ + visible?: boolean; + + /** Controls whether scrollbar has to be responsive in the chart. + * @Default {false} + */ + canResize?: boolean; + + /** Options to customize the range for the scrollbar in the axis. + */ + range?: PrimaryXAxisScrollbarSettingsRange; + + /** The maximum number of points to be displayed in the scrollbar. + * @Default {null} + */ + pointsLength?: number; + } + + export interface PrimaryXAxis { + + /** Options for customizing horizontal axis alternate grid band. + */ + alternateGridBand?: PrimaryXAxisAlternateGridBand; + + /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum + * value of crossing axis, then axis will be placed at the opposite side. + * @Default {null} + */ + crossesAt?: number; + + /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. If the provided name does not belongs to a valid axis, then primary X + * axis or primary Y axis will be used for crossing + * @Default {null} + */ + crossesInAxis?: string; + + /** Category axis can also plot points based on index value of data points. Index based plotting can be enabled by setting ‘isIndexed’ property to true. + * @Default {false} + */ + isIndexed?: boolean; + + /** Specifies the interval of the axis according to the zoomed data of the chart. + * @Default {true} + */ + enableAutoIntervalOnZooming?: boolean; + + /** Options for customizing the axis line. + */ + axisLine?: PrimaryXAxisAxisLine; + + /** Specifies the index of the column where the axis is associated, when the chart area is divided into multiple plot areas by using columnDefinitions. + * @Default {null} + */ + columnIndex?: number; + + /** Specifies the number of columns or plot areas an axis has to span horizontally. + * @Default {null} + */ + columnSpan?: number; + + /** Options to customize the crosshair label. + */ + crosshairLabel?: PrimaryXAxisCrosshairLabel; + + /** With this setting, you can request axis to calculate intervals approximately equal to your desired interval. + * @Default {null} + */ + desiredIntervals?: number; + + /** Specifies the placement of labels. + * @Default {ej.datavisualization.Chart.LabelPlacement.BetweenTicks. See LabelPlacement} + */ + labelPlacement?: ej.datavisualization.Chart.LabelPlacement|string; + + /** Specifies the position of labels at the edge of the axis. + * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} + */ + edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement|string; + + /** Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /** Options for customizing the font of the axis Labels. + */ + font?: PrimaryXAxisFont; + + /** Specifies the type of interval in date time axis. + * @Default {null. See IntervalType} + */ + intervalType?: ej.datavisualization.Chart.IntervalType|string; + + /** Specifies whether to inverse the axis. + * @Default {false} + */ + isInversed?: boolean; + + /** Custom formatting for axis label and supports all standard formatting type of numerical and date time values. + * @Default {null} + */ + labelFormat?: string; + + /** Specifies the action to take when the axis labels are overlapping with each other. + * @Default {ej.datavisualization.Chart.LabelIntersectAction.None. See LabelIntersectAction} + */ + labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction|string; + + /** Specifies the position of the axis labels. + * @Default {outside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /** Specifies the position of the axis labels. + * @Default {center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.LabelAlignment|string; + + /** Angle in degrees to rotate the axis labels. + * @Default {null} + */ + labelRotation?: number; + + /** Logarithmic base value. This is applicable only for logarithmic axis. + * @Default {10} + */ + logBase?: number; + + /** Options for customizing major gird lines. + */ + majorGridLines?: PrimaryXAxisMajorGridLines; + + /** Options for customizing the major tick lines. + */ + majorTickLines?: PrimaryXAxisMajorTickLines; + + /** Maximum number of labels to be displayed in every 100 pixels. + * @Default {3} + */ + maximumLabels?: number; + + /** Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. + * @Default {34} + */ + maximumLabelWidth?: number; + + /** Options for customizing the minor grid lines. + */ + minorGridLines?: PrimaryXAxisMinorGridLines; + + /** Options for customizing the minor tick lines. + */ + minorTickLines?: PrimaryXAxisMinorTickLines; + + /** Specifies the number of minor ticks per interval. + * @Default {null} + */ + minorTicksPerInterval?: number; + + /** Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. + * @Default {null} + */ + name?: string; + + /** Specifies whether to render the axis at the opposite side of its default position. + * @Default {false} + */ + opposedPosition?: boolean; + + /** Specifies the orientation of the axis line + * @Default {Horizontal} + */ + orientation?: ej.datavisualization.Chart.AxisOrientation|string; + + /** Specifies the padding for the plot area. + * @Default {10} + */ + plotOffset?: number; + + /** Options to customize the range of the axis. + */ + range?: PrimaryXAxisRange; + + /** Specifies the padding for the axis range. + * @Default {None. See RangePadding} + */ + rangePadding?: ej.datavisualization.Chart.RangePadding|string; + + /** Rounds the number to the given number of decimals. + * @Default {null} + */ + roundingPlaces?: number; + + /** Options for customizing the multi level labels. + * @Default {[ ]} + */ + multiLevelLabels?: PrimaryXAxisMultiLevelLabel[]; + + /** Specifies whether the axis elements need to be placed nearby the axis line, while crossing. + * @Default {true} + */ + showNextToAxisLine?: boolean; + + /** Options for customizing the strip lines. + * @Default {[ ]} + */ + stripLine?: PrimaryXAxisStripLine[]; + + /** Specifies the position of the axis tick lines. + * @Default {outside. See TickLinesPosition} + */ + tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition|string; + + /** Options for customizing the border of the labels. + */ + labelBorder?: PrimaryXAxisLabelBorder; + + /** Options for customizing the axis title. + */ + title?: PrimaryXAxisTitle; + + /** Specifies the type of data the axis is handling. + * @Default {null. See ValueType} + */ + valueType?: ej.datavisualization.Chart.ValueType|string; + + /** Show/hides the axis. + * @Default {true} + */ + visible?: boolean; + + /** The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Value ranges from 0 to 1. + * @Default {1} + */ + zoomFactor?: number; + + /** Position of the zoomed axis. Value ranges from 0 to 1. + * @Default {0} + */ + zoomPosition?: number; + + /** Options for customizing the axis scrollbar + */ + scrollbarSettings?: PrimaryXAxisScrollbarSettings; + } + + export interface AxesAlternateGridBandEven { + + /** Fill color for the even grid bands. + * @Default {transparent} + */ + fill?: string; + + /** Opacity of the even grid band. + * @Default {1} + */ + opacity?: number; + } + + export interface AxesAlternateGridBandOdd { + + /** Fill color of the odd grid bands + * @Default {transparent} + */ + fill?: string; + + /** Opacity of odd grid band + * @Default {1} + */ + opacity?: number; + } + + export interface AxesAlternateGridBand { + + /** Options for customizing even grid band. + */ + even?: AxesAlternateGridBandEven; + + /** Options for customizing odd grid band. + */ + odd?: AxesAlternateGridBandOdd; + } + + export interface AxesAxisLine { + + /** Pattern of dashes and gaps to be applied to the axis line. + * @Default {null} + */ + dashArray?: string; + + /** Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. + * @Default {null} + */ + offset?: number; + + /** Show/hides the axis line. + * @Default {true} + */ + visible?: boolean; + + /** Color of axis line. + */ + color?: string; + + /** Width of axis line. + * @Default {1} + */ + width?: number; + } + + export interface AxesCrosshairLabel { + + /** Show/hides the crosshair label associated with this axis. + * @Default {false} + */ + visible?: boolean; + } + + export interface AxesFont { + + /** Font family of labels. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of labels. + * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the label. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the axis labels. + * @Default {1} + */ + opacity?: number; + + /** Font size of the axis labels. + * @Default {13px} + */ + size?: string; + } + + export interface AxesMajorGridLines { + + /** Pattern of dashes and gaps used to stroke the major grid lines. + * @Default {null} + */ + dashArray?: string; + + /** Color of the major grid line. + * @Default {null} + */ + color?: string; + + /** Opacity of major grid lines. + * @Default {1} + */ + opacity?: number; + + /** Show/hides the major grid lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the major grid lines. + * @Default {1} + */ + width?: number; + } + + export interface AxesMajorTickLines { + + /** Length of the major tick lines. + * @Default {5} + */ + size?: number; + + /** Show/hides the major tick lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the major tick lines. + * @Default {1} + */ + width?: number; + } + + export interface AxesMinorGridLines { + + /** Patterns of dashes and gaps used to stroke the minor grid lines. + * @Default {null} + */ + dashArray?: string; + + /** Show/hides the minor grid lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the minorGridLines. + * @Default {1} + */ + width?: number; + } + + export interface AxesMinorTickLines { + + /** Length of the minor tick lines. + * @Default {5} + */ + size?: number; + + /** Show/hides the minor tick lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the minor tick line. + * @Default {1} + */ + width?: number; + } + + export interface AxesRange { + + /** Minimum value of the axis range. + * @Default {null} + */ + min?: number; + + /** Maximum value of the axis range. + * @Default {null} + */ + max?: number; + + /** Interval of the axis range. + * @Default {null} + */ + interval?: number; + } + + export interface AxesMultiLevelLabelsFont { + + /** Font color of the multi level labels text. + * @Default {null} + */ + color?: string; + + /** Font family of the multi level labels text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the multi level labels text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the multi level label text. + * @Default {regular} + */ + fontWeight?: string; + + /** Opacity of the multi level label text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the multi level label text. + * @Default {12px} + */ + size?: string; + } + + export interface AxesMultiLevelLabelsBorder { + + /** Border color of the multi level labels. + * @Default {null} + */ + color?: string; + + /** Border width of the multi level labels. + * @Default {1} + */ + width?: number; + + /** Border type of the multi level labels. + * @Default {rectangle. See Type} + */ + type?: ej.datavisualization.Chart.MultiLevelLabelsBorderType|string; + } + + export interface AxesMultiLevelLabel { + + /** Visibility of the multi level labels. + * @Default {false} + */ + visible?: boolean; + + /** Text of the multi level labels. + */ + text?: string; + + /** Starting value of the multi level labels. + * @Default {null} + */ + start?: number; + + /** Ending value of the multi level labels. + * @Default {null} + */ + end?: number; + + /** Specifies the level of multi level labels. + * @Default {0} + */ + level?: number; + + /** Specifies the maximum width of the text in multi level labels. + * @Default {null} + */ + maximumTextWidth?: number; + + /** Specifies the alignment of the text in multi level labels. + * @Default {center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /** Specifies the handling of text over flow in multi level labels. + * @Default {center. See TextOverflow} + */ + textOverflow?: ej.datavisualization.Chart.TextOverflow|string; + + /** Options for customizing the font of the text. + */ + font?: AxesMultiLevelLabelsFont; + + /** Options for customizing the border of the series. + */ + border?: AxesMultiLevelLabelsBorder; + } + + export interface AxesStripLineFont { + + /** Font color of the strip line text. + * @Default {black} + */ + color?: string; + + /** Font family of the strip line text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the strip line text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the strip line text. + * @Default {regular} + */ + fontWeight?: string; + + /** Opacity of the strip line text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the strip line text. + * @Default {12px} + */ + size?: string; + } + + export interface AxesStripLine { + + /** Border color of the strip line. + * @Default {gray} + */ + borderColor?: string; + + /** Background color of the strip line. + * @Default {gray} + */ + color?: string; + + /** End value of the strip line. + * @Default {null} + */ + end?: number; + + /** Options for customizing the font of the text. + */ + font?: AxesStripLineFont; + + /** Start value of the strip line. + * @Default {null} + */ + start?: number; + + /** Indicates whether to render the strip line from the minimum/start value of the axis. This property does not work when start property is set. + * @Default {false} + */ + startFromAxis?: boolean; + + /** Specifies text to be displayed inside the strip line. + * @Default {stripLine} + */ + text?: string; + + /** Specifies the alignment of the text inside the strip line. + * @Default {middlecenter. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /** Show/hides the strip line. + * @Default {false} + */ + visible?: boolean; + + /** Width of the strip line. + * @Default {0} + */ + width?: number; + + /** Specifies the order where the strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered under the series and when it is “over”, it is + * rendered above the series. + * @Default {over. See ZIndex} + */ + zIndex?: ej.datavisualization.Chart.ZIndex|string; + } + + export interface AxesLabelBorder { + + /** Specifies the color of the label border. + * @Default {null} + */ + color?: string; + + /** Specifies the width of the label border. + * @Default {1} + */ + width?: number; + } + + export interface AxesTitleFont { + + /** Font family of the title text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the title text. + * @Default {ej.datavisualization.Chart.FontStyle.Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the title text. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the axis title text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the axis title. + * @Default {16px} + */ + size?: string; + } + + export interface AxesTitle { + + /** Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. + * @Default {false} + */ + enableTrim?: boolean; + + /** Options for customizing the title font. + */ + font?: AxesTitleFont; + + /** Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {34} + */ + maximumTitleWidth?: number; + + /** Title for the axis. + */ + text?: string; + + /** Controls the visibility of axis title. + * @Default {true} + */ + visible?: boolean; + + /** offset value for axis title. + * @Default {0} + */ + offset?: number; + + /** Specifies the position of the axis title. + * @Default {outside. See Position} + */ + position?: ej.datavisualization.Chart.LabelPosition|string; + + /** Specifies the position of the axis title. + * @Default {center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.TextAlignment|string; + } + + export interface AxesScrollbarSettingsRange { + + /** Minimum value of the scrollbar range. + * @Default {null} + */ + min?: number; + + /** Maximum value for the scrollbar range . + * @Default {null} + */ + max?: number; + } + + export interface AxesScrollbarSettings { + + /** Specifies to enable or disable the scrollbar. + * @Default {false} + */ + visible?: boolean; + + /** Controls whether scrollbar has to be responsive in the chart. + * @Default {false} + */ + canResize?: boolean; + + /** Options to customize the range for the scrollbar in the axis. + */ + range?: AxesScrollbarSettingsRange; + + /** The maximum number of points to be displayed in the scrollbar. + * @Default {null} + */ + pointsLength?: number; + } + + export interface Axis { + + /** Options for customizing axis alternate grid band. + */ + alternateGridBand?: AxesAlternateGridBand; + + /** Specifies where axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum value of + * crossing axis, then axis will be placed at the opposite side. + * @Default {null} + */ + crossesAt?: number; + + /** Category axis can also plot points based on index value of data points. Index based plotting can be enabled by setting ‘isIndexed’ property to true. + * @Default {false} + */ + isIndexed?: boolean; + + /** Options for customizing the axis line. + */ + axisLine?: AxesAxisLine; + + /** Specifies the index of the column where the axis is associated, when the chart area is divided into multiple plot areas by using columnDefinitions. + * @Default {null} + */ + columnIndex?: number; + + /** Specifies the number of columns or plot areas an axis has to span horizontally. + * @Default {null} + */ + columnSpan?: number; + + /** Options to customize the crosshair label. + */ + crosshairLabel?: AxesCrosshairLabel; + + /** With this setting, you can request axis to calculate intervals approximately equal to your desired interval. + * @Default {null} + */ + desiredIntervals?: number; + + /** Specifies the placement of labels. + * @Default {ej.datavisualization.Chart.LabelPlacement.BetweenTicks. See LabelPlacement} + */ + labelPlacement?: ej.datavisualization.Chart.LabelPlacement|string; + + /** Specifies the position of labels at the edge of the axis. + * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} + */ + edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement|string; + + /** Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /** Specifies the interval of the axis according to the zoomed data of the chart. + * @Default {true} + */ + enableAutoIntervalOnZooming?: boolean; + + /** Options for customizing the font of the axis Labels. + */ + font?: AxesFont; + + /** Specifies the type of interval in date time axis. + * @Default {null. See IntervalType} + */ + intervalType?: ej.datavisualization.Chart.IntervalType|string; + + /** Specifies whether to inverse the axis. + * @Default {false} + */ + isInversed?: boolean; + + /** Custom formatting for axis label and supports all standard formatting type of numerical and date time values. + * @Default {null} + */ + labelFormat?: string; + + /** Specifies the action to take when the axis labels are overlapping with each other. + * @Default {ej.datavisualization.Chart.LabelIntersectAction.None. See LabelIntersectAction} + */ + labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction|string; + + /** Specifies the position of the axis labels. + * @Default {outside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /** Specifies the position of the axis labels. + * @Default {center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.LabelAlignment|string; + + /** Angle in degrees to rotate the axis labels. + * @Default {null} + */ + labelRotation?: number; + + /** Logarithmic base value. This is applicable only for logarithmic axis. + * @Default {10} + */ + logBase?: number; + + /** Options for customizing major gird lines. + */ + majorGridLines?: AxesMajorGridLines; + + /** Options for customizing the major tick lines. + */ + majorTickLines?: AxesMajorTickLines; + + /** Maximum number of labels to be displayed in every 100 pixels. + * @Default {3} + */ + maximumLabels?: number; + + /** Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. + * @Default {34} + */ + maximumLabelWidth?: number; + + /** Options for customizing the minor grid lines. + */ + minorGridLines?: AxesMinorGridLines; + + /** Options for customizing the minor tick lines. + */ + minorTickLines?: AxesMinorTickLines; + + /** Specifies the number of minor ticks per interval. + * @Default {null} + */ + minorTicksPerInterval?: number; + + /** Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. + * @Default {null} + */ + name?: string; + + /** Specifies whether to render the axis at the opposite side of its default position. + * @Default {false} + */ + opposedPosition?: boolean; + + /** Specifies the orientation of the axis line in the chart. + * @Default {'horizontal'} + */ + orientation?: ej.datavisualization.Chart.AxisOrientation|string; + + /** Specifies the padding for the plot area. + * @Default {10} + */ + plotOffset?: number; + + /** Options to customize the range of the axis. + */ + range?: AxesRange; + + /** Specifies the padding for the axis range. + * @Default {None. See RangePadding} + */ + rangePadding?: ej.datavisualization.Chart.RangePadding|string; + + /** Rounds the number to the given number of decimals. + * @Default {null} + */ + roundingPlaces?: number; + + /** Options for customizing the multi level labels. + * @Default {[ ]} + */ + multiLevelLabels?: AxesMultiLevelLabel[]; + + /** Specifies whether the axis elements need to be placed nearby the axis line, while crossing. + * @Default {true} + */ + showNextToAxisLine?: boolean; + + /** Options for customizing the strip lines. + * @Default {[ ]} + */ + stripLine?: AxesStripLine[]; + + /** Specifies the position of the axis tick lines. + * @Default {outside. See TickLinesPosition} + */ + tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition|string; + + /** Options for customizing the border of the labels. + */ + labelBorder?: AxesLabelBorder; + + /** Options for customizing the axis title. + */ + title?: AxesTitle; + + /** Specifies the type of data the axis is handling. + * @Default {null. See ValueType} + */ + valueType?: ej.datavisualization.Chart.ValueType|string; + + /** Show/hides the axis. + * @Default {true} + */ + visible?: boolean; + + /** The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Value ranges from 0 to 1. + * @Default {1} + */ + zoomFactor?: number; + + /** Position of the zoomed axis. Value ranges from 0 to 1. + * @Default {0} + */ + zoomPosition?: number; + + /** Options for customizing the axis scrollbar. + */ + scrollbarSettings?: AxesScrollbarSettings; + } + + export interface PrimaryYAxisAlternateGridBandEven { + + /** Fill color for the even grid bands. + * @Default {transparent} + */ + fill?: string; + + /** Opacity of the even grid band. + * @Default {1} + */ + opacity?: number; + } + + export interface PrimaryYAxisAlternateGridBandOdd { + + /** Fill color of the odd grid bands. + * @Default {transparent} + */ + fill?: string; + + /** Opacity of odd grid band. + * @Default {1} + */ + opacity?: number; + } + + export interface PrimaryYAxisAlternateGridBand { + + /** Options for customizing even grid band. + */ + even?: PrimaryYAxisAlternateGridBandEven; + + /** Options for customizing odd grid band. + */ + odd?: PrimaryYAxisAlternateGridBandOdd; + } + + export interface PrimaryYAxisAxisLine { + + /** Pattern of dashes and gaps to be applied to the axis line. + * @Default {null} + */ + dashArray?: string; + + /** Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. + * @Default {null} + */ + offset?: number; + + /** Show/hides the axis line. + * @Default {true} + */ + visible?: boolean; + + /** Color of axis line. + */ + color?: string; + + /** Width of axis line. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryYAxisCrosshairLabel { + + /** Show/hides the crosshair label associated with this axis. + * @Default {false} + */ + visible?: boolean; + } + + export interface PrimaryYAxisFont { + + /** Font family of labels. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of labels. + * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the label. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the axis labels. + * @Default {1} + */ + opacity?: number; + + /** Font size of the axis labels. + * @Default {13px} + */ + size?: string; + } + + export interface PrimaryYAxisMajorGridLines { + + /** Pattern of dashes and gaps used to stroke the major grid lines. + * @Default {null} + */ + dashArray?: string; + + /** Color of the major grid lines. + * @Default {null} + */ + color?: string; + + /** Opacity of major grid lines. + * @Default {1} + */ + opacity?: number; + + /** Show/hides the major grid lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the major grid lines. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryYAxisMajorTickLines { + + /** Length of the major tick lines. + * @Default {5} + */ + size?: number; + + /** Show/hides the major tick lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the major tick lines. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryYAxisMinorGridLines { + + /** Patterns of dashes and gaps used to stroke the minor grid lines. + * @Default {null} + */ + dashArray?: string; + + /** Show/hides the minor grid lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the minorGridLines. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryYAxisMinorTickLines { + + /** Length of the minor tick lines. + * @Default {5} + */ + size?: number; + + /** Show/hides the minor tick lines. + * @Default {true} + */ + visible?: boolean; + + /** Width of the minor tick line + * @Default {1} + */ + width?: number; + } + + export interface PrimaryYAxisRange { + + /** Minimum value of the axis range. + * @Default {null} + */ + min?: number; + + /** Maximum value of the axis range. + * @Default {null} + */ + max?: number; + + /** Interval for the range. + * @Default {null} + */ + interval?: number; + } + + export interface PrimaryYAxisMultiLevelLabelsFont { + + /** Font color of the multi level labels text. + * @Default {null} + */ + color?: string; + + /** Font family of the multi level labels text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the multi level labels text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the multi level label text. + * @Default {regular} + */ + fontWeight?: string; + + /** Opacity of the multi level label text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the multi level label text. + * @Default {12px} + */ + size?: string; + } + + export interface PrimaryYAxisMultiLevelLabelsBorder { + + /** Border color of the multi level labels. + * @Default {null} + */ + color?: string; + + /** Border width of the multi level labels. + * @Default {1} + */ + width?: number; + + /** Border type of the multi level labels. + * @Default {rectangle. See Type} + */ + type?: ej.datavisualization.Chart.MultiLevelLabelsBorderType|string; + } + + export interface PrimaryYAxisMultiLevelLabel { + + /** Visibility of the multi level labels. + * @Default {false} + */ + visible?: boolean; + + /** Text of the multi level labels. + */ + text?: string; + + /** Starting value of the multi level labels. + * @Default {null} + */ + start?: number; + + /** Ending value of the multi level labels. + * @Default {null} + */ + end?: number; + + /** Specifies the level of multi level labels. + * @Default {0} + */ + level?: number; + + /** Specifies the maximum width of the text in multi level labels. + * @Default {null} + */ + maximumTextWidth?: number; + + /** Specifies the alignment of the text in multi level labels. + * @Default {center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /** Specifies the handling of text over flow in multi level labels. + * @Default {center. See TextOverflow} + */ + textOverflow?: ej.datavisualization.Chart.TextOverflow|string; + + /** Options for customizing the font of the text. + */ + font?: PrimaryYAxisMultiLevelLabelsFont; + + /** Options for customizing the border of the series. + */ + border?: PrimaryYAxisMultiLevelLabelsBorder; + } + + export interface PrimaryYAxisScrollbarSettingsRange { + + /** Minimum value of the scrollbar range. + * @Default {null} + */ + min?: number; + + /** Maximum value for the scrollbar range . + * @Default {null} + */ + max?: number; + } + + export interface PrimaryYAxisScrollbarSettings { + + /** Specifies to enable or disable the scrollbar. + * @Default {false} + */ + visible?: boolean; + + /** Controls whether scrollbar has to be responsive in the chart. + * @Default {false} + */ + canResize?: boolean; + + /** Options to customize the range for the scrollbar in the axis. + */ + range?: PrimaryYAxisScrollbarSettingsRange; + + /** The maximum number of points to be displayed in the scrollbar. + * @Default {null} + */ + pointsLength?: number; + } + + export interface PrimaryYAxisStripLineFont { + + /** Font color of the strip line text. + * @Default {black} + */ + color?: string; + + /** Font family of the strip line text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the strip line text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the strip line text. + * @Default {regular} + */ + fontWeight?: string; + + /** Opacity of the strip line text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the strip line text. + * @Default {12px} + */ + size?: string; + } + + export interface PrimaryYAxisStripLine { + + /** Border color of the strip line. + * @Default {gray} + */ + borderColor?: string; + + /** Background color of the strip line. + * @Default {gray} + */ + color?: string; + + /** End value of the strip line. + * @Default {null} + */ + end?: number; + + /** Options for customizing the font of the text. + */ + font?: PrimaryYAxisStripLineFont; + + /** Start value of the strip line. + * @Default {null} + */ + start?: number; + + /** Indicates whether to render the strip line from the minimum/start value of the axis. This property won’t work when start property is set. + * @Default {false} + */ + startFromAxis?: boolean; + + /** Specifies text to be displayed inside the strip line. + * @Default {stripLine} + */ + text?: string; + + /** Specifies the alignment of the text inside the strip line. + * @Default {middlecenter. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /** Show/hides the strip line. + * @Default {false} + */ + visible?: boolean; + + /** Width of the strip line. + * @Default {0} + */ + width?: number; + + /** Specifies the order in which strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered below the series and when it is “over”, it is + * rendered above the series. + * @Default {over. See ZIndex} + */ + zIndex?: ej.datavisualization.Chart.ZIndex|string; + } + + export interface PrimaryYAxisLabelBorder { + + /** Specifies the color of the label border. + * @Default {null} + */ + color?: string; + + /** Specifies the width of the label border. + * @Default {1} + */ + width?: number; + } + + export interface PrimaryYAxisTitleFont { + + /** Font family of the title text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the title text. + * @Default {ej.datavisualization.Chart.FontStyle.Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the title text. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the axis title text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the axis title. + * @Default {16px} + */ + size?: string; + } + + export interface PrimaryYAxisTitle { + + /** Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. + * @Default {ej.datavisualization.Chart.enableTrim} + */ + enableTrim?: boolean; + + /** Options for customizing the title font. + */ + font?: PrimaryYAxisTitleFont; + + /** Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {ej.datavisualization.Chart.maximumTitleWidth.null} + */ + maximumTitleWidth?: number; + + /** Title for the axis. + */ + text?: string; + + /** Controls the visibility of axis title. + * @Default {true} + */ + visible?: boolean; + + /** offset value for axis title. + * @Default {0} + */ + offset?: number; + + /** Specifies the position of the axis title. + * @Default {outside. See Position} + */ + position?: ej.datavisualization.Chart.LabelPosition|string; + + /** Specifies the position of the axis title. + * @Default {center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.TextAlignment|string; + } + + export interface PrimaryYAxis { + + /** Options for customizing vertical axis alternate grid band. + */ + alternateGridBand?: PrimaryYAxisAlternateGridBand; + + /** Specifies the interval of the axis according to the zoomed data of the chart. + * @Default {true} + */ + enableAutoIntervalOnZooming?: boolean; + + /** Options for customizing the axis line. + */ + axisLine?: PrimaryYAxisAxisLine; + + /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum + * value of crossing axis, then axis will be placed at the opposite side. + * @Default {null} + */ + crossesAt?: number; + + /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. If the provided name does not belongs to a valid axis, then primary X + * axis or primary Y axis will be used for crossing + * @Default {null} + */ + crossesInAxis?: string; + + /** Options to customize the crosshair label. + */ + crosshairLabel?: PrimaryYAxisCrosshairLabel; + + /** With this setting, you can request axis to calculate intervals approximately equal to your desired interval. + * @Default {null} + */ + desiredIntervals?: number; + + /** Specifies the placement of labels. + * @Default {ej.datavisualization.Chart.LabelPlacement.BetweenTicks. See LabelPlacement} + */ + labelPlacement?: ej.datavisualization.Chart.LabelPlacement|string; + + /** Specifies the position of labels at the edge of the axis. + * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} + */ + edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement|string; + + /** Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /** Options for customizing the font of the axis Labels. + */ + font?: PrimaryYAxisFont; + + /** Specifies the type of interval in date time axis. + * @Default {null. See IntervalType} + */ + intervalType?: ej.datavisualization.Chart.IntervalType|string; + + /** Specifies whether to inverse the axis. + * @Default {false} + */ + isInversed?: boolean; + + /** Custom formatting for axis label and supports all standard formatting type of numerical and date time values. + * @Default {null} + */ + labelFormat?: string; + + /** Specifies the action to take when the axis labels are overlapping with each other. + * @Default {ej.datavisualization.Chart.LabelIntersectAction.None} + */ + labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction|string; + + /** Specifies the position of the axis labels. + * @Default {outside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /** Specifies the position of the axis labels. + * @Default {center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.LabelAlignment|string; + + /** Logarithmic base value. This is applicable only for logarithmic axis. + * @Default {10} + */ + logBase?: number; + + /** Options for customizing major gird lines. + */ + majorGridLines?: PrimaryYAxisMajorGridLines; + + /** Options for customizing the major tick lines. + */ + majorTickLines?: PrimaryYAxisMajorTickLines; + + /** Maximum number of labels to be displayed in every 100 pixels. + * @Default {3} + */ + maximumLabels?: number; + + /** Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. + * @Default {ej.datavisualization.Chart.maximumLabelWidth type {int}} + */ + maximumLabelWidth?: number; + + /** Options for customizing the minor grid lines. + */ + minorGridLines?: PrimaryYAxisMinorGridLines; + + /** Options for customizing the minor tick lines. + */ + minorTickLines?: PrimaryYAxisMinorTickLines; + + /** Specifies the number of minor ticks per interval. + * @Default {null} + */ + minorTicksPerInterval?: number; + + /** Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. + * @Default {null} + */ + name?: string; + + /** Specifies whether to render the axis at the opposite side of its default position. + * @Default {false} + */ + opposedPosition?: boolean; + + /** Specifies the orientation of the axis line in the chart. + * @Default {Vertical} + */ + orientation?: ej.datavisualization.Chart.AxisOrientation|string; + + /** Specifies the padding for the plot area. + * @Default {10} + */ + plotOffset?: number; + + /** Options to customize the range of the axis. + */ + range?: PrimaryYAxisRange; + + /** Specifies the padding for the axis range. + * @Default {ej.datavisualization.Chart.RangePadding.None. See RangePadding} + */ + rangePadding?: ej.datavisualization.Chart.RangePadding|string; + + /** Rounds the number to the given number of decimals. + * @Default {null} + */ + roundingPlaces?: number; + + /** Specifies the index of the row to which the axis is associated, when the chart area is divided into multiple plot areas by using rowDefinitions. + * @Default {null} + */ + rowIndex?: number; + + /** Specifies the number of row or plot areas an axis has to span vertically. + * @Default {null} + */ + rowSpan?: number; + + /** Options for customizing the multi level labels. + * @Default {[ ]} + */ + multiLevelLabels?: PrimaryYAxisMultiLevelLabel[]; + + /** Specifies whether the axis elements need to be placed nearby the axis line, while crossing. + * @Default {true} + */ + showNextToAxisLine?: boolean; + + /** Options for customizing the axis scrollbar. + */ + scrollbarSettings?: PrimaryYAxisScrollbarSettings; + + /** Options for customizing the strip lines. + * @Default {[ ]} + */ + stripLine?: PrimaryYAxisStripLine[]; + + /** Specifies the position of the axis tick lines. + * @Default {outside. See TickLinesPosition} + */ + tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition|string; + + /** Options for customizing the border of the labels. + */ + labelBorder?: PrimaryYAxisLabelBorder; + + /** Options for customizing the axis title. + */ + title?: PrimaryYAxisTitle; + + /** Specifies the type of data the axis is handling. + * @Default {null. See ValueType} + */ + valueType?: ej.datavisualization.Chart.ValueType|string; + + /** Show/hides the axis. + * @Default {true} + */ + visible?: boolean; + + /** The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Values ranges from 0 to 1. + * @Default {1} + */ + zoomFactor?: number; + + /** Position of the zoomed axis. Value ranges from 0 to 1 + * @Default {0} + */ + zoomPosition?: number; + } + + export interface RowDefinition { + + /** Specifies the unit to measure the height of the row in plotting area. + * @Default {'pixel'. See Unit} + */ + unit?: ej.datavisualization.Chart.Unit|string; + + /** Height of the row in plotting area. Height is measured in either pixel or percentage based on the value of unit property. + * @Default {50} + */ + rowHeight?: number; + + /** Color of the line that indicates the starting point of the row in plotting area. + * @Default {transparent} + */ + lineColor?: string; + + /** Width of the line that indicates the starting point of the row in plot area. + * @Default {1} + */ + lineWidth?: number; + } + + export interface SeriesBorder { + + /** Border color of the series. + * @Default {transparent} + */ + color?: string; + + /** Border width of the series. + * @Default {1} + */ + width?: number; + + /** DashArray for border of the series. + * @Default {null} + */ + dashArray?: string; + } + + export interface SeriesFont { + + /** Font color of the series text. + * @Default {#707070} + */ + color?: string; + + /** Font Family of the series. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font Style of the series. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the series. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of series text. + * @Default {1} + */ + opacity?: number; + + /** Size of the series text. + * @Default {12px} + */ + size?: string; + } + + export interface SeriesBubbleOptions { + + /** Used for the calculation of the bubble radius based on the mode selected + * @Default {minmax .See RadiusMode} + */ + radiusMode?: ej.datavisualization.Chart.RadiusMode|string; + + /** Used for the setting the minimum radius of the bubble + * @Default {1} + */ + minRadius?: number; + + /** Used for setting the maximum radius of the bubble + * @Default {3} + */ + maxRadius?: number; + } + + export interface SeriesMarkerBorder { + + /** Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /** Border width of the marker shape. + * @Default {3} + */ + width?: number; + } + + export interface SeriesMarkerDataLabelBorder { + + /** Border color of the data label. + * @Default {null} + */ + color?: string; + + /** Border width of the data label. + * @Default {0.1} + */ + width?: number; + } + + export interface SeriesMarkerDataLabelConnectorLine { + + /** Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.Type|string; + + /** Width of the connector. + * @Default {0.5} + */ + width?: number; + + /** Color of the connector. + * @Default {null} + */ + color?: string; + + /** Height of the connector. + * @Default {null} + */ + height?: number; + } + + export interface SeriesMarkerDataLabelFont { + + /** Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font color of the data label text. + * @Default {null} + */ + color?: string; + + /** Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the data label. + * @Default {12px} + */ + size?: string; + } + + export interface SeriesMarkerDataLabelMargin { + + /** Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /** Left margin of the text. + * @Default {5} + */ + left?: number; + + /** Right margin of the text. + * @Default {5} + */ + right?: number; + + /** Top margin of the text. + * @Default {5} + */ + top?: number; + } + + export interface SeriesMarkerDataLabelOffset { + + /** X value or horizontal offset to position the labels in chart. + * @Default {0} + */ + x?: number; + + /** Y value or vertical offset to position the labels. + * @Default {0} + */ + y?: number; + } + + export interface SeriesMarkerDataLabel { + + /** Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /** Maximum label width of the data label. + * @Default {null} + */ + maximumLabelWidth?: number; + + /** Enable the wrap option to the data label. + * @Default {false} + */ + enableWrap?: boolean; + + /** Options for customizing the border of the data label. + */ + border?: SeriesMarkerDataLabelBorder; + + /** Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: SeriesMarkerDataLabelConnectorLine; + + /** Background color of the data label. + * @Default {null} + */ + fill?: string; + + /** Options for customizing the data label font. + */ + font?: SeriesMarkerDataLabelFont; + + /** Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /** Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: SeriesMarkerDataLabelMargin; + + /** Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /** Background shape of the data label. + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Name of a field in data source where datalabel text is displayed. + */ + textMappingName?: string; + + /** Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, + * candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /** Vertical alignment of the data label. + * @Default {'center'} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /** Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; + + /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + */ + template?: string; + + /** Options for customizing the datalabel positions + */ + offset?: SeriesMarkerDataLabelOffset; + } + + export interface SeriesMarkerSize { + + /** Height of the marker. + * @Default {6} + */ + height?: number; + + /** Width of the marker. + * @Default {6} + */ + width?: number; + } + + export interface SeriesMarker { + + /** Options for customizing the border of the marker shape. + */ + border?: SeriesMarkerBorder; + + /** Options for displaying and customizing data labels. + */ + dataLabel?: SeriesMarkerDataLabel; + + /** Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /** The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /** Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /** Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Options for customizing the size of the marker shape. + */ + size?: SeriesMarkerSize; + + /** Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; + } + + export interface SeriesOutlierSettingsSize { + + /** Height of the outlier shape. + * @Default {6} + */ + height?: number; + + /** Width of the outlier shape. + * @Default {6} + */ + width?: number; + } + + export interface SeriesOutlierSettings { + + /** Specifies the shape of the outlier. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Options for customizing the size of the outlier shape. + */ + size?: SeriesOutlierSettingsSize; + } + + export interface SeriesEmptyPointSettingsStyleBorder { + + /** Border color of the empty point. + */ + color?: string; + + /** Border width of the empty point. + * @Default {1} + */ + width?: number; + } + + export interface SeriesEmptyPointSettingsStyle { + + /** Color of the empty point. + */ + color?: string; + + /** Options for customizing border of the empty point in the series. + */ + border?: SeriesEmptyPointSettingsStyleBorder; + } + + export interface SeriesEmptyPointSettings { + + /** Controls the visibility of the empty point. + * @Default {true} + */ + visible?: boolean; + + /** Specifies the mode of empty point. + * @Default {gap} + */ + displayMode?: ej.datavisualization.Chart.EmptyPointMode|string; + + /** Options for customizing the color and border of the empty point in the series. + */ + style?: SeriesEmptyPointSettingsStyle; + } + + export interface SeriesConnectorLine { + + /** Width of the connector line. + * @Default {1} + */ + width?: number; + + /** Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /** DashArray of the connector line. + * @Default {null} + */ + dashArray?: string; + + /** Opacity of the connector line. + * @Default {1} + */ + opacity?: number; + } + + export interface SeriesDragSettings { + + /** drag/drop the series + * @Default {false} + */ + enable?: boolean; + + /** Specifies the type of drag settings. + * @Default {xy} + */ + type?: string; + } + + export interface SeriesErrorBarCap { + + /** Show/Hides the error bar cap. + * @Default {true} + */ + visible?: boolean; + + /** Width of the error bar cap. + * @Default {1} + */ + width?: number; + + /** Length of the error bar cap. + * @Default {1} + */ + length?: number; + + /** Color of the error bar cap. + * @Default {#000000} + */ + fill?: string; + } + + export interface SeriesErrorBar { + + /** Show/hides the error bar + * @Default {visible} + */ + visibility?: boolean; + + /** Specifies the type of error bar. + * @Default {FixedValue} + */ + type?: ej.datavisualization.Chart.ErrorBarType|string; + + /** Specifies the mode of error bar. + * @Default {vertical} + */ + mode?: ej.datavisualization.Chart.ErrorBarMode|string; + + /** Specifies the direction of error bar. + * @Default {both} + */ + direction?: ej.datavisualization.Chart.ErrorBarDirection|string; + + /** Value of vertical error bar. + * @Default {3} + */ + verticalErrorValue?: number; + + /** Value of horizontal error bar. + * @Default {1} + */ + horizontalErrorValue?: number; + + /** Value of positive horizontal error bar. + * @Default {1} + */ + horizontalPositiveErrorValue?: number; + + /** Value of negative horizontal error bar. + * @Default {1} + */ + horizontalNegativeErrorValue?: number; + + /** Value of positive vertical error bar. + * @Default {5} + */ + verticalPositiveErrorValue?: number; + + /** Value of negative vertical error bar. + * @Default {5} + */ + verticalNegativeErrorValue?: number; + + /** Fill color of the error bar. + * @Default {#000000} + */ + fill?: string; + + /** Width of the error bar. + * @Default {1} + */ + width?: number; + + /** Options for customizing the error bar cap. + */ + cap?: SeriesErrorBarCap; + } + + export interface SeriesPointsBorder { + + /** Border color of the point. + * @Default {null} + */ + color?: string; + + /** Border width of the point. + * @Default {null} + */ + width?: number; + } + + export interface SeriesPointsMarkerBorder { + + /** Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /** Border width of the marker shape. + * @Default {3} + */ + width?: number; + } + + export interface SeriesPointsMarkerDataLabelBorder { + + /** Border color of the data label. + * @Default {null} + */ + color?: string; + + /** Border width of the data label. + * @Default {0.1} + */ + width?: number; + } + + export interface SeriesPointsMarkerDataLabelConnectorLine { + + /** Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.ConnectorLineType|string; + + /** Width of the connector. + * @Default {0.5} + */ + width?: number; + } + + export interface SeriesPointsMarkerDataLabelFont { + + /** Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /** Font size of the data label. + * @Default {12px} + */ + size?: string; + } + + export interface SeriesPointsMarkerDataLabelMargin { + + /** Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /** Left margin of the text. + * @Default {5} + */ + left?: number; + + /** Right margin of the text. + * @Default {5} + */ + right?: number; + + /** Top margin of the text. + * @Default {5} + */ + top?: number; + } + + export interface SeriesPointsMarkerDataLabel { + + /** Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /** Options for customizing the border of the data label. + */ + border?: SeriesPointsMarkerDataLabelBorder; + + /** Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: SeriesPointsMarkerDataLabelConnectorLine; + + /** Background color of the data label. + * @Default {null} + */ + fill?: string; + + /** Options for customizing the data label font. + */ + font?: SeriesPointsMarkerDataLabelFont; + + /** Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /** Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: SeriesPointsMarkerDataLabelMargin; + + /** Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /** Background shape of the data label. + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, + * candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /** Vertical alignment of the data label. + * @Default {'center'} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /** Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; + + /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + */ + template?: string; + + /** Moves the label vertically by specified offset. + * @Default {0} + */ + offset?: number; + } + + export interface SeriesPointsMarkerSize { + + /** Height of the marker. + * @Default {6} + */ + height?: number; + + /** Width of the marker. + * @Default {6} + */ + width?: number; + } + + export interface SeriesPointsMarker { + + /** Options for customizing the border of the marker shape. + */ + border?: SeriesPointsMarkerBorder; + + /** Options for displaying and customizing data label. + */ + dataLabel?: SeriesPointsMarkerDataLabel; + + /** Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /** The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /** Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /** Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Options for customizing the size of the marker shape. + */ + size?: SeriesPointsMarkerSize; + + /** Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; + } + + export interface SeriesPoint { + + /** Options for customizing the border of a point. This is applicable only for column type series and accumulation type series. + */ + border?: SeriesPointsBorder; + + /** Enables or disables the visibility of legend item. + * @Default {visible} + */ + visibleOnLegend?: string; + + /** To show/hide the intermediate summary from the last intermediate point. + * @Default {false} + */ + showIntermediateSum?: boolean; + + /** To show/hide the total summary of the waterfall series. + * @Default {false} + */ + showTotalSum?: boolean; + + /** Close value of the point. Close value is applicable only for financial type series. + * @Default {null} + */ + close?: number; + + /** Size of a bubble in the bubble series. This is applicable only for the bubble series. + * @Default {null} + */ + size?: number; + + /** Background color of the point. This is applicable only for column type series and accumulation type series. + * @Default {null} + */ + fill?: string; + + /** High value of the point. High value is applicable only for financial type series, range area series and range column series. + * @Default {null} + */ + high?: number; + + /** Low value of the point. Low value is applicable only for financial type series, range area series and range column series. + * @Default {null} + */ + low?: number; + + /** Options for displaying and customizing marker for a data point. Marker contains shapes and/or data labels. + */ + marker?: SeriesPointsMarker; + + /** Open value of the point. This is applicable only for financial type series. + * @Default {null} + */ + open?: number; + + /** Datalabel text for the point. + * @Default {null} + */ + text?: string; + + /** X value of the point. + * @Default {null} + */ + x?: number; + + /** Y value of the point. + * @Default {null} + */ + y?: number; + } + + export interface SeriesCornerRadius { + + /** Specifies the radius for the top left corner. + * @Default {0} + */ + topLeft?: number; + + /** Specifies the radius for the top right corner. + * @Default {0} + */ + topRight?: number; + + /** Specifies the radius for the bottom left corner. + * @Default {0} + */ + bottomLeft?: number; + + /** Specifies the radius for the bottom right corner. + * @Default {0} + */ + bottomRight?: number; + } + + export interface SeriesTooltipBorder { + + /** Border Color of the tooltip. + * @Default {null} + */ + color?: string; + + /** Border Width of the tooltip. + * @Default {1} + */ + width?: number; + } + + export interface SeriesTooltip { + + /** Options for customizing the border of the tooltip. + */ + border?: SeriesTooltipBorder; + + /** Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /** Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /** Specifies the duration, the tooltip has to be displayed. + * @Default {500ms} + */ + duration?: string; + + /** Enables/disables the animation of the tooltip when moving from one point to another. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Background color of the tooltip. + * @Default {null} + */ + fill?: string; + + /** Format of the tooltip content. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /** Opacity of the tooltip. + * @Default {0.95} + */ + opacity?: number; + + /** Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {null} + */ + template?: string; + + /** Controls the visibility of the tooltip. + * @Default {false} + */ + visible?: boolean; + } + + export interface SeriesTrendlinesTooltipBorder { + + /** Specify the Border color of the trendline tooltip. + * @Default {null} + */ + color?: string; + + /** Border width of the trendline tooltip. + * @Default {1} + */ + width?: number; + } + + export interface SeriesTrendlinesTooltip { + + /** Options for customizing the border of the trendline tooltip. + */ + border?: SeriesTrendlinesTooltipBorder; + + /** Customize the corner radius of the trendline tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /** Customize the corner radius of the trendline tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /** Specifies the duration of the trendline tooltip to be displayed. + * @Default {500ms} + */ + duration?: string; + + /** Enables/disables the animation of the trendline tooltip when moving from one point to other. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Background color of the trendline tooltip. + * @Default {null} + */ + fill?: string; + + /** Format of the trendline tooltip content. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /** Opacity of the trendline tooltip. + * @Default {0.5} + */ + opacity?: number; + } + + export interface SeriesTrendline { + + /** Show/hides the trendline. + */ + visibility?: boolean; + + /** Specifies the type of trendline for the series. + * @Default {linear. See TrendlinesType} + */ + type?: string; + + /** Name for the trendlines that is to be displayed in legend text. + * @Default {Trendline} + */ + name?: string; + + /** Fill color of the trendlines. + * @Default {#0000FF} + */ + fill?: string; + + /** Width of the trendlines. + * @Default {1} + */ + width?: number; + + /** Opacity of the trendline. + * @Default {1} + */ + opacity?: number; + + /** Pattern of dashes and gaps used to stroke the trendline. + */ + dashArray?: string; + + /** Future trends of the current series. + * @Default {0} + */ + forwardForecast?: number; + + /** Past trends of the current series. + * @Default {0} + */ + backwardForecast?: number; + + /** Specifies the order of polynomial trendlines. + * @Default {0} + */ + polynomialOrder?: number; + + /** Specifies the moving average starting period value. + * @Default {2} + */ + period?: number; + + /** Options for customizing the trendline tooltip + */ + tooltip?: SeriesTrendlinesTooltip; + + /** Show/hides the trendline legend. + * @Default {visible} + */ + visibleOnLegend?: string; + + /** Specifies the trendline intercept value + * @Default {null} + */ + intercept?: number; + } + + export interface SeriesHighlightSettingsBorder { + + /** Border color of the series/point on highlight. + */ + color?: string; + + /** Border width of the series/point on highlight. + * @Default {2} + */ + width?: string; + } + + export interface SeriesHighlightSettings { + + /** Enables/disables the ability to highlight series or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether series or data point has to be highlighted. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /** Color of the series/point on highlight. + */ + color?: string; + + /** Opacity of the series/point on highlight. + * @Default {0.6} + */ + opacity?: number; + + /** Options for customizing the border of series on highlight. + */ + border?: SeriesHighlightSettingsBorder; + + /** Specifies the pattern for the series/point on highlight. + * @Default {none. See Pattern} + */ + pattern?: string; + + /** Custom pattern for the series on highlight. + */ + customPattern?: string; + } + + export interface SeriesSelectionSettingsBorder { + + /** Border color of the series/point on selection. + */ + color?: string; + + /** Border width of the series/point on selection. + * @Default {2} + */ + width?: string; + } + + export interface SeriesSelectionSettings { + + /** Enables/disables the ability to select a series/data point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether series or data point has to be selected. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /** Specifies the type of selection. + * @Default {single} + */ + type?: ej.datavisualization.Chart.SelectionType|string; + + /** Specifies the drawn rectangle type. + * @Default {xy} + */ + rangeType?: ej.datavisualization.Chart.RangeType|string; + + /** Color of the series/point on selection. + */ + color?: string; + + /** Opacity of the series/point on selection. + * @Default {0.6} + */ + opacity?: number; + + /** Options for customizing the border of series on selection. + */ + border?: SeriesSelectionSettingsBorder; + + /** Specifies the pattern for the series/point on selection. + * @Default {none. See Pattern} + */ + pattern?: string; + + /** Custom pattern for the series on selection. + */ + customPattern?: string; + } + + export interface Series { + + /** Color of the point, where the close is up in financial chart. + * @Default {null} + */ + bearFillColor?: string; + + /** Options for customizing the border of the series. + */ + border?: SeriesBorder; + + /** Color of the point, where the close is down in financial chart. + * @Default {null} + */ + bullFillColor?: string; + + /** To render the column and bar type series in rectangle/cylinder shape. See ColumnFacet + * @Default {rectangle} + */ + columnFacet?: ej.datavisualization.Chart.ColumnFacet|string; + + /** Relative width of the columns in column type series. Value ranges from 0 to 1. Width also depends upon columnSpacing property. + * @Default {0.7} + */ + columnWidth?: number; + + /** Spacing between columns of different series. Value ranges from 0 to 1 + * @Default {0} + */ + columnSpacing?: number; + + /** To group the series of stacking collection. + */ + stackingGroup?: string; + + /** Pattern of dashes and gaps used to stroke the line type series. + */ + dashArray?: string; + + /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /** Controls the size of the hole in doughnut series. Value ranges from 0 to 1. + * @Default {0.4} + */ + doughnutCoefficient?: number; + + /** Controls the size of the doughnut series. Value ranges from 0 to 1. + * @Default {0.8} + */ + doughnutSize?: number; + + /** Type of series to be drawn in radar or polar series. + * @Default {line. See DrawType} + */ + drawType?: ej.datavisualization.Chart.DrawType|string; + + /** Enable/disable the animation of series. + * @Default {false} + */ + enableAnimation?: boolean; + + /** To avoid overlapping of data labels smartly. + * @Default {null} + */ + enableSmartLabels?: number; + + /** End angle of pie/doughnut series. For a complete circle, it has to be 360, by default. + * @Default {null} + */ + endAngle?: number; + + /** Explodes the pie/doughnut slices on mouse move. + * @Default {false} + */ + explode?: boolean; + + /** Explodes all the slice of pie/doughnut on render. + * @Default {null} + */ + explodeAll?: boolean; + + /** Index of the point to be exploded from pie/doughnut/pyramid/funnel. + * @Default {null} + */ + explodeIndex?: number; + + /** Specifies the distance of the slice from the center, when it is exploded. + * @Default {25} + */ + explodeOffset?: number; + + /** Fill color of the series. + * @Default {null} + */ + fill?: string; + + /** Options for customizing the series font. + */ + font?: SeriesFont; + + /** Specifies the height of the funnel in funnel series. Values can be in both pixel and percentage. + * @Default {32.7%} + */ + funnelHeight?: string; + + /** Specifies the width of the funnel in funnel series. Values can be in both pixel and percentage. + * @Default {11.6%} + */ + funnelWidth?: string; + + /** Gap between the slices of pyramid/funnel series. + * @Default {0} + */ + gapRatio?: number; + + /** Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. + * @Default {true} + */ + isClosed?: boolean; + + /** Specifies whether to stack the column series in polar/radar charts. + * @Default {true} + */ + isStacking?: boolean; + + /** Renders the chart vertically. This is applicable only for Cartesian type series. + * @Default {false} + */ + isTransposed?: boolean; + + /** Render the x mark in the center of the box and whisker series type.x represents the average value of the box and whisker series. + * @Default {true} + */ + showMedian?: boolean; + + /** Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. + * @Default {inside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /** Specifies the mode for splitting the data points in pieOfPie series. + * @Default {value. See SplitMode} + */ + splitMode?: ej.datavisualization.Chart.SplitMode|string; + + /** Quartile calculation has been performed in three different formulas to render the boxplot series . + * @Default {exclusive} + */ + boxPlotMode?: ej.datavisualization.Chart.LabelPosition|string; + + /** Options for customizing the bubble options of the Bubble series + */ + bubbleOptions?: SeriesBubbleOptions; + + /** Specifies the line cap of the series. + * @Default {Butt. See LineCap} + */ + lineCap?: ej.datavisualization.Chart.LineCap|string; + + /** Specifies the type of shape to be used where two lines meet. + * @Default {Round. See LineJoin} + */ + lineJoin?: ej.datavisualization.Chart.LineJoin|string; + + /** Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. + */ + marker?: SeriesMarker; + + /** Name of the series, that is to be displayed in the legend. + * @Default {Add a comment to this line} + */ + name?: string; + + /** Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /** Options for customizing the outlier of individual series. + */ + outlierSettings?: SeriesOutlierSettings; + + /** Name of a field in data source where fill color for all the data points is generated. + */ + palette?: string; + + /** Controls the size of pie series. Value ranges from 0 to 1. + * @Default {0.8} + */ + pieCoefficient?: number; + + /** Controls the size of the second pie in pieOfPie series. Value ranges from 0 to 1. + * @Default {0.6} + */ + pieOfPieCoefficient?: number; + + /** Split Value of pieofpie series. + * @Default {null} + */ + splitValue?: string; + + /** Distance between the two pie's in pieOfPie series. + * @Default {50} + */ + gapWidth?: number; + + /** Options for customizing the empty point in the series. + */ + emptyPointSettings?: SeriesEmptyPointSettings; + + /** Fill color for the positive column of the waterfall. + * @Default {null} + */ + positiveFill?: string; + + /** Options for customizing the waterfall connector line. + */ + connectorLine?: SeriesConnectorLine; + + /** Options to customize the drag and drop in series. + */ + dragSettings?: SeriesDragSettings; + + /** Options to customize the error bar in series. + */ + errorBar?: SeriesErrorBar; + + /** Option to add data points; each point should have x and y property. Also, optionally, you can customize the points color, border, marker by using fill, border and marker options. + */ + points?: SeriesPoint[]; + + /** Specifies the mode of the pyramid series. + * @Default {linear} + */ + pyramidMode?: ej.datavisualization.Chart.PyramidMode|string; + + /** Specifies ej.Query to select data from dataSource. This property is applicable only when the dataSource is ej.DataManager. + * @Default {null} + */ + query?: any; + + /** Start angle from where the pie/doughnut series renders. It starts from 0, by default. + * @Default {null} + */ + startAngle?: number; + + /** Options for customizing the corner radius. cornerRadius property also takes the numeric input and applies it for all the four corners of the column. + */ + cornerRadius?: SeriesCornerRadius; + + /** Options for customizing the tooltip of chart. + */ + tooltip?: SeriesTooltip; + + /** Specifies the type of the series to render in chart. + * @Default {column. see Type} + */ + type?: ej.datavisualization.Chart.Type|string; + + /** Controls the visibility of the series. + * @Default {visible} + */ + visibility?: string; + + /** Enables or disables the visibility of legend item. + * @Default {visible} + */ + visibleOnLegend?: string; + + /** Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + xAxisName?: string; + + /** Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /** Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + yAxisName?: string; + + /** Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /** Name of the property in the datasource that contains high value for the series. + * @Default {null} + */ + high?: string; + + /** Name of the property in the datasource that contains low value for the series. + * @Default {null} + */ + low?: string; + + /** Name of the property in the datasource that contains open value for the series. + * @Default {null} + */ + open?: string; + + /** Name of the property in the datasource that contains close value for the series. + * @Default {null} + */ + close?: string; + + /** Name of the property in the datasource that contains fill color for the series. + * @Default {null} + */ + pointColorMappingName?: string; + + /** Z-order of the series. + * @Default {0} + */ + zOrder?: number; + + /** Name of the property in the datasource that contains the size value for the bubble series. + * @Default {null} + */ + size?: string; + + /** Option to add trendlines to chart. + */ + trendlines?: SeriesTrendline[]; + + /** Options for customizing the appearance of the series or data point while highlighting. + */ + highlightSettings?: SeriesHighlightSettings; + + /** Options for customizing the appearance of the series/data point on selection. + */ + selectionSettings?: SeriesSelectionSettings; + } + + export interface Size { + + /** Height of the Chart. Height can be specified in either pixel or percentage. + * @Default {'450'} + */ + height?: string; + + /** Width of the Chart. Width can be specified in either pixel or percentage. + * @Default {'450'} + */ + width?: string; + } + + export interface TitleBorder { + + /** Width of the title border. + * @Default {1} + */ + width?: number; + + /** color of the title border. + * @Default {transparent} + */ + color?: string; + + /** opacity of the title border. + * @Default {0.8} + */ + opacity?: number; + + /** opacity of the title border. + * @Default {0.8} + */ + cornerRadius?: number; + } + + export interface TitleFont { + + /** Font family for Chart title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for Chart title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight for Chart title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the Chart title. + * @Default {0.5} + */ + opacity?: number; + + /** Font size for Chart title. + * @Default {20px} + */ + size?: string; + } + + export interface TitleSubTitleFont { + + /** Font family of sub title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for sub title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /** Font weight for sub title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /** Opacity of the sub title. + * @Default {1} + */ + opacity?: number; + + /** Font size for sub title. + * @Default {12px} + */ + size?: string; + } + + export interface TitleSubTitleBorder { + + /** Width of the subtitle border. + * @Default {1} + */ + width?: number; + + /** color of the subtitle border. + * @Default {transparent} + */ + color?: string; + + /** opacity of the subtitle border. + * @Default {0.8} + */ + opacity?: number; + + /** opacity of the subtitle border. + * @Default {0.8} + */ + cornerRadius?: number; + } + + export interface TitleSubTitle { + + /** Options for customizing the font of sub title. + */ + font?: TitleSubTitleFont; + + /** Background color for the chart subtitle. + * @Default {transparent} + */ + background?: string; + + /** Options to customize the border of the title. + */ + border?: TitleSubTitleBorder; + + /** Text to be displayed in sub title. + */ + text?: string; + + /** Alignment of sub title text. + * @Default {far. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; + + /** Controls the visibility of the Chart SubTitle + * @Default {true} + */ + visible?: boolean; + + /** Specifies whether to trim the Chart SubTitle when the width of the Subtitle exceeds the maximumWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /** Maximum width of the Subtitle, when the Subtitle exceeds this width, the Subtitle gets trimmed, when enableTrim is true. + * @Default {auto} + */ + maximumWidth?: string; + + /** Specifies the action taken when the Chart width is more than the SubTitleWidth. + * @Default {trim.} + */ + textOverflow?: ej.datavisualization.Chart.TextOverflow|string; + } + + export interface Title { + + /** Background color for the chart title. + * @Default {transparent} + */ + background?: string; + + /** Options to customize the border of the title. + */ + border?: TitleBorder; + + /** Options for customizing the font of Chart title. + */ + font?: TitleFont; + + /** Controls the visibility of the Chart title + * @Default {true} + */ + visible?: boolean; + + /** Specifies whether to trim the Chart Title when the width of the title exceeds the maximumWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /** Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {auto} + */ + maximumWidth?: string; + + /** Specifies the action taken when the Chart width is more than the titleWidth. + * @Default {trim.} + */ + textOverflow?: ej.datavisualization.Chart.TextOverflow|string; + + /** Options to customize the sub title of Chart. + */ + subTitle?: TitleSubTitle; + + /** Text to be displayed in Chart title. + */ + text?: string; + + /** Alignment of the title text. + * @Default {Center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; + } + + export interface Zooming { + + /** Enables or disables zooming. + * @Default {false} + */ + enable?: boolean; + + /** Enables or disables pinch zooming. + * @Default {true} + */ + enablePinching?: boolean; + + /** Enable or disables the differed zooming. When it is enabled, chart is updated only on mouse up action while zooming and panning. + * @Default {false} + */ + enableDeferredZoom?: boolean; + + /** Enables/disables the ability to zoom the chart on moving the mouse wheel. + * @Default {false} + */ + enableMouseWheel?: boolean; + + /** Specifies whether to allow zooming the chart vertically or horizontally or in both ways. + * @Default {'x,y'} + */ + type?: string; + + /** Toggles the visibility of the scrollbar, which will be displayed while zooming. + * @Default {false} + */ + enableScrollbar?: boolean; + + /** To display user specified buttons in zooming toolbar. + * @Default {[zoomIn, zoomOut, zoom, pan, reset]} + */ + toolbarItems?: any[]; + } + } + namespace Chart { + enum CoordinateUnit { + //string + None, + //string + Pixels, + //string + Points, + } + } + namespace Chart { + enum HorizontalAlignment { + //string + Left, + //string + Right, + //string + Middle, + } + } + namespace Chart { + enum Region { + //string + Chart, + //string + Series, + } + } + namespace Chart { + enum VerticalAlignment { + //string + Top, + //string + Bottom, + //string + Middle, + } + } + namespace Chart { + enum ExportingType { + //string + PNG, + //string + JPG, + //string + PDF, + //string + DOCX, + //string + XLSX, + //string + SVG, + } + } + namespace Chart { + enum ExportingOrientation { + //string + Portrait, + //string + Landscape, + } + } + namespace Chart { + enum ExportingMode { + //string + ServerSide, + //string + ClientSide, + } + } + namespace Chart { + enum Unit { + //string + Percentage, + //string + Pixel, + } + } + namespace Chart { + enum ColumnFacet { + //string + Rectangle, + //string + Cylinder, + } + } + namespace Chart { + enum DrawType { + //string + Line, + //string + Area, + //string + Column, + } + } + namespace Chart { + enum FontStyle { + //string + Normal, + //string + Italic, + } + } + namespace Chart { + enum FontWeight { + //string + Regular, + //string + Bold, + //string + Lighter, + } + } + namespace Chart { + enum LabelPosition { + //string + Inside, + //string + Outside, + //string + OutsideExtended, + } + } + namespace Chart { + enum SplitMode { + //string + Position, + //string + Value, + //string + Percentage, + //string + Indexes, + } + } + namespace Chart { + enum boxPlotMode { + //string + Exclusive, + //string + Inclusive, + //string + Normal, + } + } + namespace Chart { + enum RadiusMode { + //string + MinMax, + //string + Auto, + } + } + namespace Chart { + enum LineCap { + //string + Butt, + //string + Round, + //string + Square, + } + } + namespace Chart { + enum LineJoin { + //string + Round, + //string + Bevel, + //string + Miter, + } + } + namespace Chart { + enum ConnectorLineType { + //string + Line, + //string + Bezier, + } + } + namespace Chart { + enum HorizontalTextAlignment { + //string + Center, + //string + Near, + //string + Far, + } + } + namespace Chart { + enum Shape { + //string + None, + //string + LeftArrow, + //string + RightArrow, + //string + Circle, + //string + Cross, + //string + HorizLine, + //string + VertLine, + //string + Diamond, + //string + Rectangle, + //string + Triangle, + //string + Hexagon, + //string + Pentagon, + //string + Star, + //string + Ellipse, + //string + Trapezoid, + //string + UpArrow, + //string + DownArrow, + //string + Image, + //string + SeriesType, + } + } + namespace Chart { + enum TextPosition { + //string + Top, + //string + Bottom, + //string + Middle, + } + } + namespace Chart { + enum VerticalTextAlignment { + //string + Center, + //string + Near, + //string + Far, + } + } + namespace Chart { + enum PyramidMode { + //string + Linear, + //string + Surface, + } + } + namespace Chart { + enum Type { + //string + Area, + //string + Line, + //string + Spline, + //string + Column, + //string + Scatter, + //string + Bubble, + //string + SplineArea, + //string + StepArea, + //string + StepLine, + //string + Pie, + //string + HiLo, + //string + HiLoOpenClose, + //string + Candle, + //string + Bar, + //string + StackingArea, + //string + StackingArea100, + //string + RangeColumn, + //string + StackingColumn, + //string + StackingColumn100, + //string + StackingBar, + //string + StackingBar100, + //string + Pyramid, + //string + Funnel, + //string + Doughnut, + //string + Polar, + //string + Radar, + //string + RangeArea, + } + } + namespace Chart { + enum EmptyPointMode { + //string + Gap, + //string + Zero, + //string + Average, + } + } + namespace Chart { + enum ErrorBarType { + //string + FixedValue, + //string + Percentage, + //string + StandardDeviation, + //string + StandardError, + } + } + namespace Chart { + enum ErrorBarMode { + //string + Both, + //string + Vertical, + //string + Horizontal, + } + } + namespace Chart { + enum ErrorBarDirection { + //string + Both, + //string + Plus, + //string + Minus, + } + } + namespace Chart { + enum Mode { + //string + Series, + //string + Point, + //string + Cluster, + //string + Range, + } + } + namespace Chart { + enum SelectionType { + //string + Single, + //string + Multiple, + } + } + namespace Chart { + enum RangeType { + //string + XY, + //string + X, + //string + Y, + } + } + namespace Chart { + enum CrosshairMode { + //string + Float, + //string + Grouping, + } + } + namespace Chart { + enum CrosshairType { + //string + Crosshair, + //string + Trackball, + } + } + namespace Chart { + enum Alignment { + //string + Center, + //string + Near, + //string + Far, + } + } + namespace Chart { + enum Position { + //string + Left, + //string + Right, + //string + Top, + //string + Bottom, + } + } + namespace Chart { + enum TextOverflow { + //string + None, + //string + Trim, + //string + Wrap, + //string + WrapAndTrim, + } + } + namespace Chart { + enum LabelPlacement { + //string + OnTicks, + //string + BetweenTicks, + } + } + namespace Chart { + enum EdgeLabelPlacement { + //string + None, + //string + Shift, + //string + Hide, + } + } + namespace Chart { + enum IntervalType { + //string + Days, + //string + Hours, + //string + Seconds, + //string + Milliseconds, + //string + Minutes, + //string + Months, + //string + Years, + } + } + namespace Chart { + enum LabelIntersectAction { + //string + None, + //string + Rotate90, + //string + Rotate45, + //string + Wrap, + //string + WrapByword, + //string + Trim, + //string + Hide, + //string + MultipleRows, + } + } + namespace Chart { + enum LabelAlignment { + //string + Near, + //string + Far, + //string + Center, + } + } + namespace Chart { + enum AxisOrientation { + //string + Horizontal, + //string + Vertical, + } + } + namespace Chart { + enum RangePadding { + //string + Additional, + //string + Normal, + //string + None, + //string + Round, + } + } + namespace Chart { + enum MultiLevelLabelsBorderType { + //string + Rectangle, + //string + None, + //string + WithoutTopAndBottom, + //string + Brace, + //string + CurlyBrace, + } + } + namespace Chart { + enum TextAlignment { + //string + MiddleTop, + //string + MiddleCenter, + //string + MiddleBottom, + } + } + namespace Chart { + enum ZIndex { + //string + Inside, + //string + Over, + } + } + namespace Chart { + enum TickLinesPosition { + //string + Inside, + //string + Outside, + } + } + namespace Chart { + enum ValueType { + //string + Double, + //string + Category, + //string + DateTime, + //string + Logarithmic, + } + } + namespace Chart { + enum Theme { + //string + Azure, + //string + FlatLight, + //string + FlatDark, + //string + Azuredark, + //string + Lime, + //string + LimeDark, + //string + Saffron, + //string + SaffronDark, + //string + GradientLight, + //string + GradientDark, + } + } + + class RangeNavigator extends ej.Widget { + static fn: RangeNavigator; + constructor(element: JQuery | Element, options?: RangeNavigator.Model); + static Locale: any; + model: RangeNavigator.Model; + defaults: RangeNavigator.Model; + + /** destroy the range navigator widget + * @returns {void} + */ + _destroy(): void; + } + export namespace RangeNavigator { + + export interface Model { + + /** Toggles the placement of slider exactly on the place it left or on the nearest interval. + * @Default {false} + */ + allowSnapping?: boolean; + + /** Options for customizing the color, opacity and width of the chart border. + */ + border?: Border; + + /** Specifies the data source for range navigator. + */ + dataSource?: any; + + /** Specifies the properties used for customizing the range series. + */ + series?: Series[]; + + /** Specifies the properties used for customizing all the range series. + */ + seriesSettings?: SeriesSetting[]; + + /** Toggles the redrawing of chart on moving the sliders. + * @Default {true} + */ + enableDeferredUpdate?: boolean; + + /** Enable the scrollbar option in the rangenavigator. + * @Default {false} + */ + enableScrollbar?: boolean; + + /** Enable the resize option in the rangenavigator. + * @Default {false} + */ + enableAutoResizing?: boolean; + + /** Toggles the direction of rendering the range navigator control. + * @Default {false} + */ + enableRTL?: boolean; + + /** Sets a value whether to make the range navigator responsive on resize. + * @Default {false} + */ + isResponsive?: boolean; + + /** Options for customizing the labels colors, font, style, size, horizontalAlignment and opacity. + */ + labelSettings?: LabelSettings; + + /** This property is to specify the localization of range navigator. + * @Default {en-US} + */ + locale?: string; + + /** Options for customizing the range navigator. + */ + navigatorStyleSettings?: NavigatorStyleSettings; + + /** Padding specifies the gap between the container and the range navigator. + * @Default {0} + */ + padding?: string; + + /** If the range is not given explicitly, range will be calculated automatically. + * @Default {none} + */ + rangePadding?: ej.datavisualization.RangeNavigator.RangePadding|string; + + /** Options for customizing the starting and ending ranges. + */ + rangeSettings?: RangeSettings; + + /** selectedData is for getting the data when the "rangeChanged" event trigger from client side. + */ + selectedData?: any; + + /** Options for customizing the start and end range values. + */ + selectedRangeSettings?: SelectedRangeSettings; + + /** Options for rendering scrollbar based on the start and end range values. + */ + scrollRangeSettings?: ScrollRangeSettings; + + /** Contains property to customize the hight and width of range navigator. + */ + sizeSettings?: SizeSettings; + + /** By specifying this property the user can change the theme of the range navigator. + * @Default {null} + */ + theme?: string; + + /** Options for customizing the tooltip in range navigator. + */ + tooltipSettings?: TooltipSettings; + + /** Options for configuring minor grid lines, major grid lines, axis line of axis. + */ + valueAxisSettings?: ValueAxisSettings; + + /** You can plot data of type date time or numeric. This property determines the type of data that this axis will handle. + * @Default {datetime} + */ + valueType?: ej.datavisualization.RangeNavigator.ValueType|string; + + /** Specifies the xName for dataSource. This is used to take the x values from dataSource + */ + xName?: any; + + /** Specifies the yName for dataSource. This is used to take the y values from dataSource + */ + yName?: any; + + /** Fires on load of range navigator. + */ + load?(e: LoadEventArgs): void; + + /** Fires after range navigator is loaded. + */ + loaded?(e: LoadedEventArgs): void; + + /** Fires on changing the range of range navigator. + */ + rangeChanged?(e: RangeChangedEventArgs): void; + + /** Fires on changing the scrollbar position of range navigator. + */ + scrollChanged?(e: ScrollChangedEventArgs): void; + + /** Fires on when starting to change the scrollbar position of range navigator. + */ + scrollStart?(e: ScrollStartEventArgs): void; - /** Index of the point for which trackball tooltip is displayed - */ - pointIndex?: number; + /** Fires on when starting to change the slider position of range navigator. + */ + selectedRangeStart?(e: SelectedRangeStartEventArgs): void; - /** Index of the series in series collection - */ - seriesIndex?: number; + /** Fires when the selection ends in the range navigator + */ + selectedRangeEnd?(e: SelectedRangeEndEventArgs): void; - /** Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip - */ - currentText?: string; + /** Fires on changes ending the scrollbar position of range navigator. + */ + scrollEnd?(e: ScrollEndEventArgs): void; + } - /** Instance of the series object for which trackball tooltip is displayed. - */ - series?: any; - } + export interface LoadEventArgs { - export interface AxisLabelClickEventArgs { + /** parameters from range navigator + */ + Data?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Instance of the chart model object - */ - model?: any; + /** returns the range navigator model + */ + model?: any; - /** Name of the event - */ - type?: string; + /** returns the name of the event + */ + type?: string; + } - /** X and Y co-ordinate of the labels in chart area. - */ - location?: any; + export interface LoadedEventArgs { - /** Index of the label. - */ - index?: number; + /** parameters from range navigator + */ + Data?: any; - /** Instance of the corresponding axis. - */ - axis?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Label that is clicked. - */ - text?: string; - } + /** returns the range navigator model + */ + model?: any; - export interface AxisLabelMouseMoveEventArgs { + /** returns the name of the event + */ + type?: string; + } - /** Set this option to true to cancel the event - */ - cancel?: boolean; + export interface RangeChangedEventArgs { - /** Instance of the chart model object - */ - model?: any; + /** parameters from range navigator + */ + Data?: any; - /** Name of the event - */ - type?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** X and Y co-ordinate of the labels in chart area. - */ - location?: any; + /** returns the range navigator model + */ + model?: any; - /** Index of the label. - */ - index?: number; + /** returns the name of the event + */ + type?: string; + } - /** Instance of the corresponding axis. - */ - axis?: any; + export interface ScrollChangedEventArgs { - /** Label that is hovered. - */ - text?: string; - } + /** parameters from RangeNavigator + */ + data?: any; - export interface ChartClickEventArgs { + /** returns the scrollbar position old start and end range value on changing scrollbar + */ + dataoldRange?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the scrollbar position new start and end range value on changing scrollbar + */ + datanewRange?: any; - /** Instance of the chart model object - */ - model?: any; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Name of the event - */ - type?: string; + /** returns the RangeNavigator model + */ + model?: any; - /** X and Y co-ordinate of the points with respect to chart area. - */ - location?: any; + /** returns the name of the event + */ + type?: string; + } - /** ID of the target element. - */ - id?: string; + export interface ScrollStartEventArgs { - /** Width and height of the chart. - */ - size?: any; + /** parameters from RangeNavigator + */ + data?: any; - /** x-coordinate of the pointer, relative to the page - */ - pageX?: number; + /** returns the scrollbar position starting range value on changing scrollbar + */ + datastartRange?: string; - /** y-coordinate of the pointer, relative to the page - */ - pageY?: number; - } + /** returns the scrollbar position end range value on changing scrollbar + */ + dataendRange?: string; - export interface ChartMouseMoveEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the RangeNavigator model + */ + model?: any; - /** Instance of the chart model object - */ - model?: any; + /** returns the name of the event + */ + type?: string; + } - /** Name of the event - */ - type?: string; + export interface SelectedRangeStartEventArgs { - /** X and Y co-ordinate of the points with respect to chart area. - */ - location?: any; + /** parameters from RangeNavigator + */ + data?: any; - /** ID of the target element. - */ - id?: string; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Width and height of the chart. - */ - size?: any; + /** returns the RangeNavigator model + */ + model?: any; - /** x-coordinate of the pointer, relative to the page - */ - pageX?: number; + /** returns the name of the event + */ + type?: string; + } - /** y-coordinate of the pointer, relative to the page - */ - pageY?: number; - } + export interface SelectedRangeEndEventArgs { - export interface ChartDoubleClickEventArgs { + /** parameters from RangeNavigator + */ + data?: any; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Instance of the chart model object - */ - model?: any; + /** returns the RangeNavigator model + */ + model?: any; - /** Name of the event - */ - type?: string; + /** returns the name of the event + */ + type?: string; + } + + export interface ScrollEndEventArgs { + + /** parameters from RangeNavigator + */ + data?: any; + + /** returns the scrollbar position old start and end range value on change end of scrollbar + */ + dataoldRange?: any; + + /** returns the scrollbar position new start and end range value on change end of scrollbar + */ + datanewRange?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RangeNavigator model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + } + + export interface Border { + + /** Border color of rangenavigator. When enable the scrollbar, the default color will be set as "#B4B4B4". + * @Default {transparent} + */ + color?: string; + + /** Opacity of the rangeNavigator border. + * @Default {1} + */ + opacity?: number; + + /** Width of the RangeNavigator border. + * @Default {1} + */ + width?: number; + } + + export interface Series { + + /** Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /** Specifies the type of the series to render in chart. + * @Default {column. see Type} + */ + type?: ej.datavisualization.RangeNavigator.Type|string; + + /** Enable/disable the animation of series. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Fill color of the series. + * @Default {null} + */ + fill?: string; + } + + export interface SeriesSetting { + + /** Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /** Specifies the type of the series to render in chart. + * @Default {column. see Type} + */ + type?: ej.datavisualization.RangeNavigator.Type|string; + + /** Enable/disable the animation of series. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Fill color of the series. + * @Default {null} + */ + fill?: string; + } + + export interface LabelSettingsHigherLevelBorder { + + /** Specifies the border color of grid lines. + * @Default {transparent} + */ + color?: string; + + /** Specifies the border width of grid lines. + * @Default {0.5} + */ + width?: string; + } + + export interface LabelSettingsHigherLevelGridLineStyle { + + /** Specifies the color of grid lines in higher level. + * @Default {#B5B5B5} + */ + color?: string; + + /** Specifies the dashArray of grid lines in higher level. + * @Default {20 5 0} + */ + dashArray?: string; + + /** Specifies the width of grid lines in higher level. + * @Default {#B5B5B5} + */ + width?: string; + } + + export interface LabelSettingsHigherLevelStyleFont { + + /** Specifies the label font color. Labels render with the specified font color. + * @Default {black} + */ + color?: string; + + /** Specifies the label font family. Labels render with the specified font family. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the label font style. Labels render with the specified font style. + * @Default {Normal} + */ + fontStyle?: string; + + /** Specifies the label font weight. Labels render with the specified font weight. + * @Default {regular} + */ + fontWeight?: string; + + /** Specifies the label opacity. Labels render with the specified opacity. + * @Default {1} + */ + opacity?: number; + + /** Specifies the label font size. Labels render with the specified font size. + * @Default {12px} + */ + size?: string; + } + + export interface LabelSettingsHigherLevelStyle { + + /** Options for customizing the font properties. + */ + font?: LabelSettingsHigherLevelStyleFont; + + /** Specifies the horizontal text alignment of the text in label. + * @Default {middle} + */ + horizontalAlignment?: string; + } + + export interface LabelSettingsHigherLevel { + + /** Options for customizing the border of grid lines in higher level. + */ + border?: LabelSettingsHigherLevelBorder; + + /** Specifies the fill color of higher level labels. + * @Default {transparent} + */ + fill?: string; + + /** Options for customizing the grid line colors, width, dashArray, border. + */ + gridLineStyle?: LabelSettingsHigherLevelGridLineStyle; + + /** Specifies the intervalType for higher level labels. See + * @Default {auto} + */ + intervalType?: ej.datavisualization.RangeNavigator.IntervalType|string; + + /** Specifies the position of the labels to render either inside or outside of plot area + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement|string; + + /** Specifies the position of the labels in higher level + * @Default {top} + */ + position?: ej.datavisualization.RangeNavigator.Position|string; + + /** Options for customizing the style of higher level labels. + */ + style?: LabelSettingsHigherLevelStyle; + + /** Toggles the visibility of higher level labels. + * @Default {true} + */ + visible?: boolean; + } + + export interface LabelSettingsLowerLevelBorder { + + /** Specifies the border color of grid lines. + * @Default {transparent} + */ + color?: string; + + /** Specifies the border width of grid lines. + * @Default {0.5} + */ + width?: string; + } + + export interface LabelSettingsLowerLevelGridLineStyle { + + /** Specifies the color of grid lines in lower level. + * @Default {#B5B5B5} + */ + color?: string; + + /** Specifies the dashArray of gridLines in lowerLevel. + * @Default {20 5 0} + */ + dashArray?: string; + + /** Specifies the width of grid lines in lower level. + * @Default {#B5B5B5} + */ + width?: string; + } + + export interface LabelSettingsLowerLevelStyleFont { + + /** Specifies the color of labels. Label text render in this specified color. + * @Default {black} + */ + color?: string; + + /** Specifies the font family of labels. Label text render in this specified font family. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font style of labels. Label text render in this specified font style. + * @Default {Normal} + */ + fontStyle?: string; + + /** Specifies the font weight of labels. Label text render in this specified font weight. + * @Default {regular} + */ + fontWeight?: string; + + /** Specifies the opacity of labels. Label text render in this specified opacity. + * @Default {12px} + */ + opacity?: string; + + /** Specifies the size of labels. Label text render in this specified size. + * @Default {12px} + */ + size?: string; + } + + export interface LabelSettingsLowerLevelStyle { + + /** Options for customizing the font of labels. + */ + font?: LabelSettingsLowerLevelStyleFont; + + /** Specifies the horizontal text alignment of the text in label. + * @Default {middle} + */ + horizontalAlignment?: string; + } + + export interface LabelSettingsLowerLevel { + + /** Options for customizing the border of grid lines in lower level. + */ + border?: LabelSettingsLowerLevelBorder; + + /** Specifies the fill color of labels in lower level. + * @Default {transparent} + */ + fill?: string; + + /** Options for customizing the grid lines in lower level. + */ + gridLineStyle?: LabelSettingsLowerLevelGridLineStyle; + + /** Specifies the intervalType of the labels in lower level.See IntervalType + * @Default {auto} + */ + intervalType?: ej.datavisualization.RangeNavigator.IntervalType|string; + + /** Specifies the position of the labels to render either inside or outside of plot area. See LabelPlacement + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement|string; + + /** Specifies the position of the labels in lower level.See Position + * @Default {bottom} + */ + position?: ej.datavisualization.RangeNavigator.Position|string; + + /** Options for customizing the style of labels. + */ + style?: LabelSettingsLowerLevelStyle; + + /** Toggles the visibility of labels in lower level. + * @Default {true} + */ + visible?: boolean; + } + + export interface LabelSettingsStyleFont { + + /** Specifies the label color. This color is applied to the labels in range navigator. + * @Default {#333333} + */ + color?: string; + + /** Specifies the label font family. Labels render with the specified font family. + * @Default {Segoe UI} + */ + family?: string; + + /** Specifies the label font opacity. Labels render with the specified font opacity. + * @Default {1} + */ + opacity?: number; + + /** Specifies the label font size. Labels render with the specified font size. + * @Default {1px} + */ + size?: string; + + /** Specifies the label font style. Labels render with the specified font style.. + * @Default {Normal} + */ + style?: ej.datavisualization.RangeNavigator.FontStyle|string; + + /** Specifies the label font weight + * @Default {regular} + */ + weight?: ej.datavisualization.RangeNavigator.FontWeight|string; + } + + export interface LabelSettingsStyle { + + /** Options for customizing the font of labels in range navigator. + */ + font?: LabelSettingsStyleFont; + + /** Specifies the horizontalAlignment of the label in RangeNavigator + * @Default {middle} + */ + horizontalAlignment?: ej.datavisualization.RangeNavigator.HorizontalAlignment|string; + } + + export interface LabelSettings { + + /** Options for customizing the higher level labels in range navigator. + */ + higherLevel?: LabelSettingsHigherLevel; + + /** Options for customizing the labels in lower level. + */ + lowerLevel?: LabelSettingsLowerLevel; + + /** Options for customizing the style of labels in range navigator. + */ + style?: LabelSettingsStyle; + } + + export interface NavigatorStyleSettingsBorder { + + /** Specifies the border color of range navigator. + * @Default {transparent} + */ + color?: string; + + /** Specifies the dash array of range navigator. + * @Default {null} + */ + dashArray?: string; + + /** Specifies the border width of range navigator. + * @Default {0.5} + */ + width?: number; + } + + export interface NavigatorStyleSettingsMajorGridLineStyle { + + /** Specifies the color of major grid lines in range navigator. + * @Default {#B5B5B5} + */ + color?: string; + + /** Toggles the visibility of major grid lines. + * @Default {true} + */ + visible?: boolean; + } + + export interface NavigatorStyleSettingsMinorGridLineStyle { + + /** Specifies the color of minor grid lines in range navigator. + * @Default {#B5B5B5} + */ + color?: string; + + /** Toggles the visibility of minor grid lines. + * @Default {true} + */ + visible?: boolean; + } + + export interface NavigatorStyleSettingsHighlightSettingsBorder { + + /** To set the border color to the highlight. + * @Default {null} + */ + color?: string; + + /** To set the border width to the highlight. + * @Default {1} + */ + width?: number; + } + + export interface NavigatorStyleSettingsHighlightSettings { + + /** Enable the highlight settings in range navigator. + * @Default {false} + */ + enable?: boolean; + + /** To set the color to the highlight. + * @Default {null} + */ + color?: string; + + /** To set the opacity to the highlight. + * @Default {0.5} + */ + opacity?: number; + + /** Contains the border properties for highlighting rectangle. + */ + border?: NavigatorStyleSettingsHighlightSettingsBorder; + } + + export interface NavigatorStyleSettingsSelectionSettingsBorder { + + /** To set the border color to the selection. + * @Default {null} + */ + color?: string; + + /** To set the border width to the selection. + * @Default {1} + */ + width?: number; + } + + export interface NavigatorStyleSettingsSelectionSettings { + + /** Enable the selection settings in range navigator. + * @Default {false} + */ + enable?: boolean; + + /** To set the color to the selection. + * @Default {null} + */ + color?: string; + + /** To set the opacity to the selection. + * @Default {0.5} + */ + opacity?: number; + + /** Contains the border properties for selecting the rectangle. + */ + border?: NavigatorStyleSettingsSelectionSettingsBorder; + } + + export interface NavigatorStyleSettings { + + /** Specifies the background color of range navigator. + * @Default {#dddddd} + */ + background?: string; + + /** Options for customizing the border color and width of range navigator. + */ + border?: NavigatorStyleSettingsBorder; + + /** Specifies the left side thumb template in range navigator we can give either div id or HTML string + * @Default {null} + */ + leftThumbTemplate?: string; + + /** Options for customizing the major grid lines. + */ + majorGridLineStyle?: NavigatorStyleSettingsMajorGridLineStyle; + + /** Options for customizing the minor grid lines. + */ + minorGridLineStyle?: NavigatorStyleSettingsMinorGridLineStyle; + + /** Specifies the opacity of RangeNavigator. + * @Default {1} + */ + opacity?: number; + + /** Specifies the right side thumb template in range navigator we can give either div id or HTML string + * @Default {null} + */ + rightThumbTemplate?: string; + + /** Specifies the color of the selected region in range navigator. + * @Default {#EFEFEF} + */ + selectedRegionColor?: string; + + /** Specifies the opacity of Selected Region. + * @Default {0} + */ + selectedRegionOpacity?: number; + + /** Specifies the color of the thumb in range navigator. + * @Default {#2382C3} + */ + thumbColor?: string; + + /** Specifies the radius of the thumb in range navigator. + * @Default {10} + */ + thumbRadius?: number; + + /** Specifies the stroke color of the thumb in range navigator. + * @Default {#303030} + */ + thumbStroke?: string; + + /** Specifies the color of the unselected region in range navigator. + * @Default {#5EABDE} + */ + unselectedRegionColor?: string; + + /** Specifies the opacity of Unselected Region. + * @Default {0.3} + */ + unselectedRegionOpacity?: number; + + /** Contains the options for highlighting the range navigator on mouse over. + */ + highlightSettings?: NavigatorStyleSettingsHighlightSettings; + + /** Contains the options for selection the range navigator on mouse over. + */ + selectionSettings?: NavigatorStyleSettingsSelectionSettings; + } + + export interface RangeSettings { + + /** Specifies the ending range of range navigator. + * @Default {null} + */ + end?: string; + + /** Specifies the starting range of range navigator. + * @Default {null} + */ + start?: string; + } + + export interface SelectedRangeSettings { + + /** Specifies the ending range of range navigator. + * @Default {null} + */ + end?: string; + + /** Specifies the starting range of range navigator. + * @Default {null} + */ + start?: string; + } + + export interface ScrollRangeSettings { + + /** Specifies the ending range of range navigator scrollbar and that should be greater than the rangenavigator datasource end value. + * @Default {null} + */ + end?: string; + + /** Specifies the starting range of range navigator scrollbar and that should be less than the rangenavigator datasource start value. + * @Default {null} + */ + start?: string; + } + + export interface SizeSettings { + + /** Specifies height of the range navigator. + * @Default {null} + */ + height?: string; + + /** Specifies width of the range navigator. + * @Default {null} + */ + width?: string; + } + + export interface TooltipSettingsFont { + + /** Specifies the color of text in tooltip. Tooltip text render in the specified color. + * @Default {#FFFFFF} + */ + color?: string; + + /** Specifies the font family of text in tooltip. Tooltip text render in the specified font family. + * @Default {Segoe UI} + */ + family?: string; + + /** Specifies the font style of text in tooltip. Tooltip text render in the specified font style. + * @Default {ej.datavisualization.RangeNavigator.fontStyle.Normal} + */ + fontStyle?: string; + + /** Specifies the opacity of text in tooltip. Tooltip text render in the specified opacity. + * @Default {1} + */ + opacity?: number; + + /** Specifies the size of text in tooltip. Tooltip text render in the specified size. + * @Default {10px} + */ + size?: string; + + /** Specifies the weight of text in tooltip. Tooltip text render in the specified weight. + * @Default {ej.datavisualization.RangeNavigator.weight.Regular} + */ + weight?: string; + } + + export interface TooltipSettings { + + /** Specifies the background color of tooltip. + * @Default {#303030} + */ + backgroundColor?: string; + + /** Options for customizing the font in tooltip. + */ + font?: TooltipSettingsFont; + + /** Specifies the format of text to be displayed in tooltip. + * @Default {MM/dd/yyyy} + */ + labelFormat?: string; + + /** Specifies the mode of displaying the tooltip. Neither to display the tooltip always nor on demand. + * @Default {null} + */ + tooltipDisplayMode?: string; + + /** Toggles the visibility of tooltip. + * @Default {true} + */ + visible?: boolean; + } + + export interface ValueAxisSettingsAxisLine { + + /** Toggles the visibility of axis line. + * @Default {none} + */ + visible?: string; + } + + export interface ValueAxisSettingsFont { + + /** Text in axis render with the specified size. + * @Default {0px} + */ + size?: string; + } + + export interface ValueAxisSettingsMajorGridLines { + + /** Toggles the visibility of major grid lines. + * @Default {false} + */ + visible?: boolean; + } + + export interface ValueAxisSettingsMajorTickLines { + + /** Specifies the size of the majorTickLines in range navigator + * @Default {0} + */ + size?: number; + + /** Toggles the visibility of major tick lines. + * @Default {true} + */ + visible?: boolean; + + /** Specifies width of the major tick lines. + * @Default {0} + */ + width?: number; + } + + export interface ValueAxisSettingsRange { + + /** Default Value + * @Default {null} + */ + min?: number; + + /** Default Value + * @Default {null} + */ + max?: number; + + /** Default Value + * @Default {null} + */ + interval?: number; + } + + export interface ValueAxisSettings { + + /** Options for customizing the axis line. + */ + axisLine?: ValueAxisSettingsAxisLine; + + /** Options for customizing the font of the axis. + */ + font?: ValueAxisSettingsFont; + + /** Options for customizing the major grid lines. + */ + majorGridLines?: ValueAxisSettingsMajorGridLines; + + /** Options for customizing the major tick lines in axis. + */ + majorTickLines?: ValueAxisSettingsMajorTickLines; + + /** You can customize the range of the axis by setting minimum , maximum and interval. + */ + range?: ValueAxisSettingsRange; + + /** If the range is not given explicitly, range will be calculated automatically. You can customize the automatic range calculation using rangePadding. + * @Default {none} + */ + rangePadding?: string; + + /** Toggles the visibility of axis in range navigator. + * @Default {false} + */ + visible?: boolean; + } + } + namespace RangeNavigator { + enum Type { + //string + Area, + //string + Line, + //string + Spline, + //string + StepArea, + //string + SplineArea, + //string + StepLine, + } + } + namespace RangeNavigator { + enum IntervalType { + //string + Years, + //string + Quarters, + //string + Months, + //string + Weeks, + //string + Days, + //string + Hours, + //string + Minutes, + } + } + namespace RangeNavigator { + enum LabelPlacement { + //string + Inside, + //string + Outside, + } + } + namespace RangeNavigator { + enum Position { + //string + Top, + //string + Bottom, + } + } + namespace RangeNavigator { + enum FontStyle { + //string + Normal, + //string + Bold, + //string + Italic, + } + } + namespace RangeNavigator { + enum FontWeight { + //string + Regular, + //string + Lighter, + } + } + namespace RangeNavigator { + enum HorizontalAlignment { + //string + Middle, + //string + Left, + //string + Right, + } + } + namespace RangeNavigator { + enum RangePadding { + //string + Additional, + //string + Normal, + //string + None, + //string + Round, + } + } + namespace RangeNavigator { + enum ValueType { + //string + Numeric, + //string + DateTime, + } + } + + class BulletGraph extends ej.Widget { + static fn: BulletGraph; + constructor(element: JQuery | Element, options?: BulletGraph.Model); + static Locale: any; + model: BulletGraph.Model; + defaults: BulletGraph.Model; + + /** To destroy the bullet graph + * @returns {void} + */ + destroy(): void; + + /** To redraw the bullet graph + * @returns {void} + */ + redraw(): void; + + /** To set the value for comparative measure in bullet graph. + * @returns {void} + */ + setComparativeMeasureSymbol(): void; + + /** To set the value for feature measure bar. + * @returns {void} + */ + setFeatureMeasureBarValue(): void; + } + export namespace BulletGraph { + + export interface Model { + + /** Toggles the visibility of the range stroke color of the labels. + * @Default {false} + */ + applyRangeStrokeToLabels?: boolean; + + /** Toggles the visibility of the range stroke color of the ticks. + * @Default {false} + */ + applyRangeStrokeToTicks?: boolean; + + /** Contains property to customize the caption in bullet graph. + */ + captionSettings?: CaptionSettings; + + /** Comparative measure bar in bullet graph render till the specified value. + * @Default {0} + */ + comparativeMeasureValue?: number; + + /** Toggles the animation of bullet graph. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Controls whether bullet graph has to be responsive while resizing. + * @Default {true} + */ + enableResizing?: boolean; + + /** Specifies the direction of flow in bullet graph. Neither it may be backward nor forward. + * @Default {forward} + */ + flowDirection?: ej.datavisualization.BulletGraph.FlowDirection|string; + + /** Specifies the height of the bullet graph. + * @Default {90} + */ + height?: number; + + /** Sets a value whether to make the bullet graph responsive on resize. + * @Default {true} + */ + isResponsive?: boolean; + + /** Specifies to convert the date object to string, using locale settings. + * @Default {false} + */ + enableGroupSeparator?: boolean; + + /** Name of the culture based on which bulletgraph should be localized. + * @Default {en-US} + */ + locale?: string; + + /** Bullet graph will render in the specified orientation. + * @Default {horizontal} + */ + orientation?: ej.datavisualization.BulletGraph.Orientation|string; + + /** Contains property to customize the qualitative ranges. + */ + qualitativeRanges?: QualitativeRange[]; + + /** Size of the qualitative range depends up on the specified value. + * @Default {32} + */ + qualitativeRangeSize?: number; + + /** Length of the quantitative range depends up on the specified value. + * @Default {475} + */ + quantitativeScaleLength?: number; + + /** Contains all the properties to customize quantitative scale. + */ + quantitativeScaleSettings?: QuantitativeScaleSettings; + + /** By specifying this property the user can change the theme of the bullet graph. + * @Default {flatlight} + */ + theme?: string; + + /** Contains all the properties to customize tooltip. + */ + tooltipSettings?: TooltipSettings; + + /** Feature measure bar in bullet graph render till the specified value. + * @Default {0} + */ + value?: number; + + /** Specifies the width of the bullet graph. + * @Default {595} + */ + width?: number; + + /** Fires on rendering the caption of bullet graph. + */ + drawCaption?(e: DrawCaptionEventArgs): void; + + /** Fires on rendering the category. + */ + drawCategory?(e: DrawCategoryEventArgs): void; + + /** Fires on rendering the comparative measure symbol. + */ + drawComparativeMeasureSymbol?(e: DrawComparativeMeasureSymbolEventArgs): void; + + /** Fires on rendering the feature measure bar. + */ + drawFeatureMeasureBar?(e: DrawFeatureMeasureBarEventArgs): void; + + /** Fires on rendering the indicator of bullet graph. + */ + drawIndicator?(e: DrawIndicatorEventArgs): void; + + /** Fires on rendering the labels. + */ + drawLabels?(e: DrawLabelsEventArgs): void; + + /** Fires on rendering the ticks. + */ + drawTicks?(e: DrawTicksEventArgs): void; + + /** Fires on rendering the qualitative ranges. + */ + drawQualitativeRanges?(e: DrawQualitativeRangesEventArgs): void; + + /** Fires on loading bullet graph. + */ + load?(e: LoadEventArgs): void; + } + + export interface DrawCaptionEventArgs { + + /** returns the object of the bullet graph. + */ + Object?: any; - /** X and Y co-ordinate of the points with respect to chart area. - */ - location?: any; + /** returns the options of the scale element. + */ + scaleElement?: HTMLElement; - /** ID of the target element. - */ - id?: string; + /** returns the current captionSettings element. + */ + captionElement?: HTMLElement; - /** Width and height of the chart. - */ - size?: any; + /** returns the type of the captionSettings. + */ + captionType?: string; + } - /** x-coordinate of the pointer, relative to the page - */ - pageX?: number; + export interface DrawCategoryEventArgs { - /** y-coordinate of the pointer, relative to the page - */ - pageY?: number; - } + /** returns the object of the bullet graph. + */ + Object?: any; - export interface AnnotationClickEventArgs { + /** returns the options of the scale element. + */ + scaleElement?: HTMLElement; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the options of category element. + */ + categoryElement?: HTMLElement; - /** Instance of the chart model object - */ - model?: any; + /** returns the text value of the category that is drawn. + */ + Value?: string; + } - /** Name of the event - */ - type?: string; + export interface DrawComparativeMeasureSymbolEventArgs { - /** X and Y co-ordinate of the annotation in chart area. - */ - location?: any; + /** returns the object of the bullet graph. + */ + Object?: any; - /** Information about the annotation, like Coordinate unit, Region, content - */ - contentData?: any; + /** returns the options of the scale element. + */ + scaleElement?: HTMLElement; - /** x-coordinate of the pointer, relative to the page - */ - pageX?: number; + /** returns the options of comparative measure element. + */ + targetElement?: HTMLElement; - /** y-coordinate of the pointer, relative to the page - */ - pageY?: number; - } + /** returns the value of the comparative measure symbol. + */ + Value?: number; + } - export interface AfterResizeEventArgs { + export interface DrawFeatureMeasureBarEventArgs { - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the object of the bullet graph. + */ + Object?: any; - /** Instance of the chart model object - */ - model?: any; + /** returns the options of the scale element. + */ + scaleElement?: HTMLElement; - /** Name of the event - */ - type?: string; + /** returns the options of feature measure element. + */ + currentElement?: HTMLElement; - /** Chart width, after resize - */ - width?: number; + /** returns the value of the feature measure bar. + */ + Value?: number; + } - /** Chart height, after resize - */ - height?: number; + export interface DrawIndicatorEventArgs { - /** Chart width, before resize - */ - prevWidth?: number; + /** returns an object to customize bullet graph indicator text and symbol before rendering it. + */ + indicatorSettings?: any; - /** Chart height, before resize - */ - prevHeight?: number; + /** returns the object of bullet graph. + */ + model?: any; - /** Chart width, when the chart was first rendered - */ - originalWidth?: number; + /** returns the type of event. + */ + type?: string; - /** Chart height, when the chart was first rendered - */ - originalHeight?: number; - } + /** for canceling the event. + */ + cancel?: boolean; + } - export interface BeforeResizeEventArgs { + export interface DrawLabelsEventArgs { - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the object of the bullet graph. + */ + Object?: any; - /** Instance of the chart model object - */ - model?: any; + /** returns the options of the scale element. + */ + scaleElement?: HTMLElement; - /** Name of the event - */ - type?: string; + /** returns the current label element. + */ + tickElement?: HTMLElement; - /** Chart width, before resize - */ - currentWidth?: number; + /** returns the label type. + */ + labelType?: string; + } - /** Chart height, before resize - */ - currentHeight?: number; + export interface DrawTicksEventArgs { - /** Chart width, after resize - */ - newWidth?: number; + /** returns the model of the bullet graph. + */ + model?: any; - /** Chart height, after resize - */ - newHeight?: number; - } + /** returns the name of the event. + */ + type?: string; - export interface ErrorBarRenderingEventArgs { + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; - /** Set this option to true to cancel the event - */ - cancel?: boolean; + /** returns the settings for majorTicks. + */ + majorTickSettings?: any; - /** Instance of the chart model object - */ - model?: any; + /** returns the settings for minorTicks. + */ + minorTickSettings?: any; - /** Name of the event - */ - type?: string; + /** returns the maximum value. + */ + maximum?: number; - /** Error bar Object - */ - errorbar?: any; - } + /** returns the minimum value. + */ + minimum?: number; - export interface ScrollChangedEventArgs { + /** returns the interval value. + */ + interval?: number; - /** parameters from RangeNavigator - */ - data?: any; + /** returns the value of minorTicksPerInterval. + */ + minorTickPerInterval?: number; + } + + export interface DrawQualitativeRangesEventArgs { - /** returns the scrollbar position old start and end range value on changing scrollbar - */ - dataoldRange?: any; + /** returns the object of the bullet graph. + */ + Object?: any; + + /** returns the index of current range. + */ + rangeIndex?: number; + + /** returns the settings for current range. + */ + rangeOptions?: any; + + /** returns the end value of current range. + */ + rangeEndValue?: number; + } + + export interface LoadEventArgs { + + /** returns the model of the bullet graph. + */ + model?: any; + + /** returns the name of the event. + */ + type?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + } + + export interface CaptionSettingsFont { + + /** Specifies the color of the text in caption. + * @Default {null} + */ + color?: string; + + /** Specifies the fontFamily of caption. Caption text render with this fontFamily + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the fontStyle of caption + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /** Specifies the fontWeight of caption + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /** Specifies the opacity of caption. Caption text render with this opacity. + * @Default {1} + */ + opacity?: number; + + /** Specifies the size of caption. Caption text render with this size + * @Default {12px} + */ + size?: string; + } + + export interface CaptionSettingsIndicatorFont { + + /** Specifies the color of the indicator's text. + * @Default {null} + */ + color?: string; + + /** Specifies the fontFamily of indicator. Indicator text render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the fontStyle of indicator. Indicator text render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /** Specifies the fontWeight of indicator. Indicator text render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /** Specifies the opacity of indicator text. Indicator text render with this Opacity. + * @Default {1} + */ + opacity?: number; + + /** Specifies the size of indicator. Indicator text render with this size. + * @Default {12px} + */ + size?: string; + } + + export interface CaptionSettingsIndicatorLocation { + + /** Specifies the horizontal position of the indicator. + * @Default {10} + */ + x?: number; + + /** Specifies the vertical position of the indicator. + * @Default {60} + */ + y?: number; + } + + export interface CaptionSettingsIndicatorSymbolBorder { + + /** Specifies the border color of indicator symbol. + * @Default {null} + */ + color?: string; + + /** Specifies the border width of indicator symbol. + * @Default {1} + */ + width?: number; + } + + export interface CaptionSettingsIndicatorSymbolSize { + + /** Specifies the height of indicator symbol. + * @Default {10} + */ + height?: number; + + /** Specifies the width of indicator symbol. + * @Default {10} + */ + width?: number; + } + + export interface CaptionSettingsIndicatorSymbol { + + /** Contains property to customize the border of indicator symbol. + */ + border?: CaptionSettingsIndicatorSymbolBorder; + + /** Specifies the color of indicator symbol. + * @Default {null} + */ + color?: string; + + /** Specifies the URL of image that represents indicator symbol. + */ + imageURL?: string; + + /** Specifies the opacity of indicator symbol. + * @Default {1} + */ + opacity?: number; + + /** Specifies the shape of indicator symbol. + */ + shape?: string; + + /** Contains property to customize the size of indicator symbol. + */ + size?: CaptionSettingsIndicatorSymbolSize; + } + + export interface CaptionSettingsIndicator { + + /** Contains property to customize the font of indicator. + */ + font?: CaptionSettingsIndicatorFont; + + /** Contains property to customize the location of indicator. + */ + location?: CaptionSettingsIndicatorLocation; + + /** Specifies the padding to be applied when text position is used. + * @Default {2} + */ + padding?: number; + + /** Contains property to customize the symbol of indicator. + */ + symbol?: CaptionSettingsIndicatorSymbol; + + /** Specifies the text to be displayed as indicator text. By default difference between current value and target will be displayed + */ + text?: string; + + /** Specifies the alignment of indicator with respect to scale based on text position + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /** Specifies where indicator text should be anchored when indicator overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same + * position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /** indicator text render in the specified angle. + * @Default {0} + */ + textAngle?: number; + + /** Specifies where indicator should be placed + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; + + /** Specifies the space between indicator symbol and text. + * @Default {3} + */ + textSpacing?: number; + + /** Specifies whether indicator will be visible or not. + * @Default {false} + */ + visible?: boolean; + } + + export interface CaptionSettingsLocation { + + /** Specifies the position in horizontal direction + * @Default {17} + */ + x?: number; + + /** Specifies the position in horizontal direction + * @Default {30} + */ + y?: number; + } + + export interface CaptionSettingsSubTitleFont { + + /** Specifies the color of the subtitle's text. + * @Default {null} + */ + color?: string; + + /** Specifies the fontFamily of subtitle. Subtitle text render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the fontStyle of subtitle. Subtitle text render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /** Specifies the fontWeight of subtitle. Subtitle text render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /** Specifies the opacity of subtitle. Subtitle text render with this opacity. + * @Default {1} + */ + opacity?: number; + + /** Specifies the size of subtitle. Subtitle text render with this size. + * @Default {12px} + */ + size?: string; + } + + export interface CaptionSettingsSubTitleLocation { + + /** Specifies the horizontal position of the subtitle. + * @Default {10} + */ + x?: number; + + /** Specifies the vertical position of the subtitle. + * @Default {45} + */ + y?: number; + } + + export interface CaptionSettingsSubTitle { + + /** Contains property to customize the font of subtitle. + */ + font?: CaptionSettingsSubTitleFont; + + /** Contains property to customize the location of subtitle. + */ + location?: CaptionSettingsSubTitleLocation; + + /** Specifies the padding to be applied when text position is used. + * @Default {5} + */ + padding?: number; + + /** Specifies the text to be displayed as subtitle. + */ + text?: string; + + /** Specifies the alignment of sub title text with respect to scale. Alignment will not be applied in float position. + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /** Specifies where subtitle text should be anchored when sub title text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same + * position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /** Subtitle render in the specified angle. + * @Default {0} + */ + textAngle?: number; + + /** Specifies where sub title text should be placed. + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; + } + + export interface CaptionSettings { + + /** Specifies whether trim the labels will be true or false. + * @Default {true} + */ + enableTrim?: boolean; + + /** Contains property to customize the font of caption. + */ + font?: CaptionSettingsFont; + + /** Contains property to customize the indicator. + */ + indicator?: CaptionSettingsIndicator; + + /** Contains property to customize the location. + */ + location?: CaptionSettingsLocation; + + /** Specifies the padding to be applied when text position is used. + * @Default {5} + */ + padding?: number; + + /** Contains property to customize the subtitle. + */ + subTitle?: CaptionSettingsSubTitle; + + /** Specifies the text to be displayed on bullet graph. + */ + text?: string; + + /** Specifies the alignment of caption text with respect to scale. This property will not be applied when text position is float. + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /** Specifies caption text anchoring when caption text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. + * Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /** Specifies the angel in which the caption is rendered. + * @Default {0} + */ + textAngle?: number; + + /** Specifies how caption text should be placed. + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; + } + + export interface QualitativeRange { + + /** Specifies the ending range to which the qualitative ranges will render. + * @Default {3} + */ + rangeEnd?: number; + + /** Specifies the opacity for the qualitative ranges. + * @Default {1} + */ + rangeOpacity?: number; + + /** Specifies the stroke for the qualitative ranges. + * @Default {null} + */ + rangeStroke?: string; + } + + export interface QuantitativeScaleSettingsComparativeMeasureSettings { + + /** Specifies the stroke of the comparative measure. + * @Default {null} + */ + stroke?: number; + + /** Specifies the width of the comparative measure. + * @Default {5} + */ + width?: number; + } + + export interface QuantitativeScaleSettingsFeaturedMeasureSettings { + + /** Specifies the Stroke of the featured measure in bullet graph. + * @Default {null} + */ + stroke?: number; + + /** Specifies the width of the featured measure in bullet graph. + * @Default {2} + */ + width?: number; + } + + export interface QuantitativeScaleSettingsFeatureMeasure { + + /** Specifies the category of feature measure. + * @Default {null} + */ + category?: string; + + /** Comparative measure render till the specified value. + * @Default {null} + */ + comparativeMeasureValue?: number; + + /** Feature measure render till the specified value. + * @Default {null} + */ + value?: number; + } + + export interface QuantitativeScaleSettingsFields { + + /** Specifies the category of the bullet graph. + * @Default {null} + */ + category?: string; + + /** Comparative measure render based on the values in the specified field. + * @Default {null} + */ + comparativeMeasure?: string; + + /** Specifies the dataSource for the bullet graph. + * @Default {null} + */ + dataSource?: any; + + /** Feature measure render based on the values in the specified field. + * @Default {null} + */ + featureMeasures?: string; + + /** Specifies the query for fetching the values form data source to render the bullet graph. + * @Default {null} + */ + query?: string; + + /** Specifies the name of the table. + * @Default {null} + */ + tableName?: string; + } + + export interface QuantitativeScaleSettingsLabelSettingsFont { + + /** Specifies the fontFamily of labels in bullet graph. Labels render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the fontStyle of labels in bullet graph. Labels render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /** Specifies the fontWeight of labels in bullet graph. Labels render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /** Specifies the opacity of labels in bullet graph. Labels render with this opacity + * @Default {1} + */ + opacity?: number; + } + + export interface QuantitativeScaleSettingsLabelSettings { + + /** Contains property to customize the font of the labels in bullet graph. + */ + font?: QuantitativeScaleSettingsLabelSettingsFont; + + /** Specifies the placement of labels in bullet graph scale. + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.BulletGraph.LabelPlacement|string; + + /** Specifies the prefix to be added with labels in bullet graph. + * @Default {Empty string} + */ + labelPrefix?: string; + + /** Specifies the suffix to be added after labels in bullet graph. + * @Default {Empty string} + */ + labelSuffix?: string; + + /** Specifies the horizontal/vertical padding of labels. + * @Default {15} + */ + offset?: number; + + /** Specifies the position of the labels to render either above or below the graph. See + * @Default {below} + */ + position?: ej.datavisualization.BulletGraph.LabelPosition|string; + + /** Specifies the Size of the labels. + * @Default {12} + */ + size?: number; + + /** Specifies the stroke color of the labels in bullet graph. + * @Default {null} + */ + stroke?: string; + } + + export interface QuantitativeScaleSettingsLocation { + + /** This property specifies the x position for rendering quantitative scale. + * @Default {10} + */ + x?: number; + + /** This property specifies the y position for rendering quantitative scale. + * @Default {10} + */ + y?: number; + } + + export interface QuantitativeScaleSettingsMajorTickSettings { + + /** Specifies the size of the major ticks. + * @Default {13} + */ + size?: number; + + /** Specifies the stroke color of the major tick lines. + * @Default {null} + */ + stroke?: string; + + /** Specifies the width of the major tick lines. + * @Default {2} + */ + width?: number; + } + + export interface QuantitativeScaleSettingsMinorTickSettings { + + /** Specifies the size of minor ticks. + * @Default {7} + */ + size?: number; + + /** Specifies the stroke color of minor ticks in bullet graph. + * @Default {null} + */ + stroke?: string; + + /** Specifies the width of the minor ticks in bullet graph. + * @Default {2} + */ + width?: number; + } + + export interface QuantitativeScaleSettings { + + /** Contains property to customize the comparative measure. + */ + comparativeMeasureSettings?: QuantitativeScaleSettingsComparativeMeasureSettings; + + /** Contains property to customize the featured measure. + */ + featuredMeasureSettings?: QuantitativeScaleSettingsFeaturedMeasureSettings; + + /** Contains property to customize the featured measure. + */ + featureMeasures?: QuantitativeScaleSettingsFeatureMeasure[]; + + /** Contains property to customize the fields. + */ + fields?: QuantitativeScaleSettingsFields; + + /** Specifies the interval for the Graph. + * @Default {1} + */ + interval?: number; + + /** Contains property to customize the labels. + */ + labelSettings?: QuantitativeScaleSettingsLabelSettings; + + /** Contains property to customize the position of the quantitative scale + */ + location?: QuantitativeScaleSettingsLocation; + + /** Contains property to customize the major tick lines. + */ + majorTickSettings?: QuantitativeScaleSettingsMajorTickSettings; + + /** Specifies the maximum value of the Graph. + * @Default {10} + */ + maximum?: number; + + /** Specifies the minimum value of the Graph. + * @Default {0} + */ + minimum?: number; + + /** Contains property to customize the minor ticks. + */ + minorTickSettings?: QuantitativeScaleSettingsMinorTickSettings; + + /** The specified number of minor ticks will be rendered per interval. + * @Default {4} + */ + minorTicksPerInterval?: number; + + /** Specifies the placement of ticks to render either inside or outside the scale. + * @Default {ej.datavisualization.BulletGraph.TickPlacement.Outside} + */ + tickPlacement?: ej.datavisualization.BulletGraph.TickPlacement|string; + + /** Specifies the position of the ticks to render either above,below or inside + * @Default {ej.datavisualization.BulletGraph.TickPosition.Far} + */ + tickPosition?: ej.datavisualization.BulletGraph.TickPosition|string; + } + + export interface TooltipSettings { + + /** Specifies template for caption tooltip + * @Default {null} + */ + captionTemplate?: string; + + /** Toggles the visibility of caption tooltip + * @Default {false} + */ + enableCaptionTooltip?: boolean; + + /** Specifies the ID of a div, which is to be displayed as tooltip. + * @Default {null} + */ + template?: string; + + /** Toggles the visibility of tooltip + * @Default {true} + */ + visible?: boolean; + } + } + namespace BulletGraph { + enum FontStyle { + //string + Normal, + //string + Italic, + //string + Oblique, + } + } + namespace BulletGraph { + enum FontWeight { + //string + Normal, + //string + Bold, + //string + Bolder, + //string + Lighter, + } + } + namespace BulletGraph { + enum TextAlignment { + //string + Near, + //string + Far, + //string + Center, + } + } + namespace BulletGraph { + enum TextAnchor { + //string + Start, + //string + Middle, + //string + End, + } + } + namespace BulletGraph { + enum TextPosition { + //string + Top, + //string + Right, + //string + Left, + //string + Bottom, + //string + Float, + } + } + namespace BulletGraph { + enum FlowDirection { + //string + Forward, + //string + Backward, + } + } + namespace BulletGraph { + enum Orientation { + //string + Horizontal, + //string + Vertical, + } + } + namespace BulletGraph { + enum LabelPlacement { + //string + Inside, + //string + Outside, + } + } + namespace BulletGraph { + enum LabelPosition { + //string + Above, + //string + Below, + } + } + namespace BulletGraph { + enum TickPlacement { + //string + Inside, + //string + Outside, + } + } + namespace BulletGraph { + enum TickPosition { + //string + Below, + //string + Above, + //string + Cross, + } + } + + class Barcode extends ej.Widget { + static fn: Barcode; + constructor(element: JQuery | Element, options?: Barcode.Model); + static Locale: any; + model: Barcode.Model; + defaults: Barcode.Model; + + /** To disable the barcode + * @returns {void} + */ + disable(): void; + + /** To enable the barcode + * @returns {void} + */ + enable(): void; + } + export namespace Barcode { + + export interface Model { + + /** Specifies the distance between the barcode and text below it. + */ + barcodeToTextGapHeight?: number; + + /** Specifies the height of bars in the Barcode. By modifying the barHeight, the entire barcode height can be customized. Please refer to xDimension for two dimensional barcode height + * customization. + */ + barHeight?: number; + + /** Specifies the dark bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. + */ + darkBarColor?: any; + + /** Specifies whether the text below the barcode is visible or hidden. + */ + displayText?: boolean; + + /** Specifies whether the control is enabled. + */ + enabled?: boolean; + + /** Specifies the start and stop encode symbol in the Barcode. In one dimensional barcodes, an additional character is added as start and stop delimiters. These symbols are optional + * and the unique of the symbol allows the reader to determine the direction of the barcode being scanned. + */ + encodeStartStopSymbol?: number; + + /** Specifies the light bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. + */ + lightBarColor?: any; + + /** Specifies the width of the narrow bars in the barcode. The dark bars in the one dimensional barcode contains random narrow and wide bars based on the provided input which can be + * specified during initialization. + */ + narrowBarWidth?: number; + + /** Specifies the width of the quiet zone. In barcode, a quiet zone is the blank margin on either side of a barcode which informs the reader where a barcode's symbology starts and + * stops. The purpose of a quiet zone is to prevent the reader from picking up unrelated information. + */ + quietZone?: QuietZone; + + /** Specifies the type of the Barcode. See SymbologyType + */ + symbologyType?: ej.datavisualization.Barcode.SymbologyType|string; + + /** Specifies the text to be encoded in the barcode. + */ + text?: string; + + /** Specifies the color of the text/data at the bottom of the barcode. + */ + textColor?: any; + + /** Specifies the width of the wide bars in the barcode. One dimensional barcode usually contains random narrow and wide bars based on the provided which can be customized during + * initialization. + */ + wideBarWidth?: number; + + /** Specifies the width of the narrowest element(bar or space) in a barcode. The greater the x dimension, the more easily a barcode reader will scan. + */ + xDimension?: number; + + /** Fires after Barcode control is loaded. + */ + load?(e: LoadEventArgs): void; + } + + export interface LoadEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the barcode model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** return the barcode state + */ + status?: boolean; + } + + export interface QuietZone { + + /** Specifies the quiet zone around the Barcode. + */ + all?: number; + + /** Specifies the bottom quiet zone of the Barcode. + */ + bottom?: number; + + /** Specifies the left quiet zone of the Barcode. + */ + left?: number; + + /** Specifies the right quiet zone of the Barcode. + */ + right?: number; + + /** Specifies the top quiet zone of the Barcode. + */ + top?: number; + } + } + namespace Barcode { + enum SymbologyType { + //Represents the QR code + QRBarcode, + //Represents the Data Matrix barcode + DataMatrix, + //Represents the Code 39 barcode + Code39, + //Represents the Code 39 Extended barcode + Code39Extended, + //Represents the Code 11 barcode + Code11, + //Represents the Codabar barcode + Codabar, + //Represents the Code 32 barcode + Code32, + //Represents the Code 93 barcode + Code93, + //Represents the Code 93 Extended barcode + Code93Extended, + //Represents the Code 128 A barcode + Code128A, + //Represents the Code 128 B barcode + Code128B, + //Represents the Code 128 C barcode + Code128C, + } + } + + class Map extends ej.Widget { + static fn: Map; + constructor(element: JQuery | Element, options?: Map.Model); + static Locale: any; + model: Map.Model; + defaults: Map.Model; + + /** Method for navigating to specific shape based on latitude, longitude and zoom level. + * @param {number} Pass the latitude value for map + * @param {number} Pass the longitude value for map + * @param {number} Pass the zoom level for map + * @returns {void} + */ + navigateTo(latitude: number, longitude: number, level: number): void; + + /** Method to perform map panning + * @param {string} Pass the direction in which map should be panned + * @returns {void} + */ + pan(direction: string): void; + + /** Method to reload the map. + * @returns {void} + */ + refresh(): void; + + /** Method to reload the shapeLayers with updated values + * @returns {void} + */ + refreshLayers(): void; + + /** Method to reload the navigation control with updated values. + * @param {any} Pass the navigation control instance + * @returns {void} + */ + refreshNavigationControl(navigation: any): void; + + /** Method to perform map zooming. + * @param {number} Pass the zoom level for map to be zoomed + * @param {boolean} Pass the boolean value to enable or disable animation while zooming + * @returns {void} + */ + zoom(level: number, isAnimate: boolean): void; + } + export namespace Map { + + export interface Model { + + /** Specifies the background color for map + * @Default {transparent} + */ + background?: string; + + /** Specifies the index of the map to determine the shape layer to be displayed + * @Default {0} + */ + baseMapIndex?: number; + + /** Specify the center position where map should be displayed + * @Default {[0,0]} + */ + centerPosition?: any; + + /** Controls the selection through dragging + * @Default {false} + */ + draggingOnSelection?: boolean; + + /** Enables or Disables the map animation + * @Default {false} + */ + enableAnimation?: boolean; + + /** Enables or Disables the animation for layer change in map + * @Default {false} + */ + enableLayerChangeAnimation?: boolean; + + /** Enables or Disables the map panning + * @Default {true} + */ + enablePan?: boolean; + + /** Determines whether map need to resize when container is resized + * @Default {true} + */ + enableResize?: boolean; + + /** Determines whether map need to resize when container is resized + * @Default {true} + */ + isResponsive?: boolean; + + /** Enables or Disables the Zooming for map. + */ + zoomSettings?: ZoomSettings; + + /** Enables or Disables the navigation control for map to perform zooming and panning on map shapes. + */ + navigationControl?: NavigationControl; + + /** Name of the culture based on which map should be localized. Labels are localized with respect to the culture name.String type properties like template text are not localized + * automatically. Provide localized text as value to string type properties. + * @Default {en-US} + */ + locale?: string; + + /** Layer for holding the map shapes + */ + layers?: Layer[]; + + /** Triggered on selecting the map markers. + */ + markerSelected?(e: MarkerSelectedEventArgs): void; + + /** Triggers while leaving the hovered map shape + */ + mouseleave?(e: MouseleaveEventArgs): void; + + /** Triggers while hovering the map shape. + */ + mouseover?(e: MouseoverEventArgs): void; + + /** Triggers once map render completed. + */ + onRenderComplete?(e: OnRenderCompleteEventArgs): void; + + /** Triggers when map panning ends. + */ + panned?(e: PannedEventArgs): void; + + /** Triggered on selecting the map shapes. + */ + shapeSelected?(e: ShapeSelectedEventArgs): void; + + /** Triggered when map is zoomed-in. + */ + zoomedIn?(e: ZoomedInEventArgs): void; + + /** Triggers when map is zoomed out. + */ + zoomedOut?(e: ZoomedOutEventArgs): void; + } + + export interface MarkerSelectedEventArgs { + + /** Returns marker object. + */ + originalEvent?: any; + } + + export interface MouseleaveEventArgs { + + /** Returns hovered map shape object. + */ + originalEvent?: any; + } + + export interface MouseoverEventArgs { + + /** Returns hovered map shape object. + */ + originalEvent?: any; + } + + export interface OnRenderCompleteEventArgs { + + /** Event parameters from map + */ + originalEvent?: any; + } + + export interface PannedEventArgs { + + /** Event parameters from map + */ + originalEvent?: any; + } + + export interface ShapeSelectedEventArgs { + + /** Returns selected shape object. + */ + originalEvent?: any; + } + + export interface ZoomedInEventArgs { + + /** Event parameters from map + */ + originalEvent?: any; + + /** Returns zoom level value for which the map is zoomed. + */ + zoomLevel?: any; + } + + export interface ZoomedOutEventArgs { + + /** Event parameters from map + */ + originalEvent?: any; + + /** Returns zoom level value for which the map is zoomed. + */ + zoomLevel?: any; + } + + export interface ZoomSettings { + + /** Enables or Disables the zooming of map + * @Default {true} + */ + enableZoom?: boolean; + + /** Enables or Disables the zoom on selecting the map shape + * @Default {false} + */ + enableZoomOnSelection?: boolean; + + /** Specifies the zoom factor for map zoom value. + * @Default {1} + */ + factor?: number; + + /** Specifies the zoom level value for which map to be zoomed + * @Default {1} + */ + level?: number; + + /** Specifies the minimum zoomSettings level of the map + * @Default {1} + */ + minValue?: number; + + /** Specifies the maximum zoom level of the map + * @Default {100} + */ + maxValue?: number; + } + + export interface NavigationControl { + + /** Set the absolutePosition for navigation control + * @Default {{x:0,y:0}} + */ + absolutePosition?: any; + + /** Specifies the navigation control template for map + * @Default {null} + */ + content?: string; + + /** Set the dockPosition value for navigation control + * @Default {centerleft} + */ + dockPosition?: ej.datavisualization.Map.Position|string; + + /** Enables or Disables the Navigation for handling zooming map + * @Default {false} + */ + enableNavigation?: boolean; + + /** Set the orientation value for navigation control + * @Default {vertical} + */ + orientation?: ej.datavisualization.Map.LabelOrientation|string; + } + + export interface LayersBubbleSettingsColorMappingsRangeColorMapping { + + /** Start range colorMappings in the bubble layer. + * @Default {null} + */ + from?: number; + + /** End range colorMappings in the bubble layer. + * @Default {null} + */ + to?: number; + + /** GradientColors in the bubble layer of map. + */ + gradientColors?: any[]; + + /** Color of the bubble layer. + * @Default {null} + */ + color?: string; + } + + export interface LayersBubbleSettingsColorMappings { + + /** Specifies the range colorMappings in the bubble layer. + * @Default {null} + */ + rangeColorMapping?: LayersBubbleSettingsColorMappingsRangeColorMapping[]; + } + + export interface LayersBubbleSettings { + + /** Specifies the bubble Opacity value of bubbles for shape layer in map + * @Default {0.9} + */ + bubbleOpacity?: number; + + /** Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + color?: string; + + /** Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: LayersBubbleSettingsColorMappings; + + /** Specifies the bubble color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /** Specifies the maximum size value of bubbles for shape layer in map + * @Default {20} + */ + maxValue?: number; + + /** Specifies the minimum size value of bubbles for shape layer in map + * @Default {10} + */ + minValue?: number; + + /** Specifies the showBubble visibility status map + * @Default {true} + */ + showBubble?: boolean; + + /** Specifies the tooltip visibility status of the shape layer in map + * @Default {false} + */ + showTooltip?: boolean; + + /** Specifies the bubble tooltip template of the shape layer in map + * @Default {null} + */ + tooltipTemplate?: string; + + /** Specifies the bubble valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; + } + + export interface LayersLabelSettings { + + /** enable or disable the enableSmartLabel property + * @Default {false} + */ + enableSmartLabel?: boolean; + + /** set the labelLength property + * @Default {'2'} + */ + labelLength?: number; + + /** set the labelPath property + * @Default {null} + */ + labelPath?: string; + + /** The property specifies whether to show labels or not. + * @Default {false} + */ + showLabels?: boolean; + + /** set the smartLabelSize property + * @Default {fixed} + */ + smartLabelSize?: ej.datavisualization.Map.LabelSize|string; + } + + export interface LayersLegendSettings { + + /** Determines whether the legend should be placed outside or inside the map bounds + * @Default {false} + */ + dockOnMap?: boolean; + + /** Determines the legend placement and it is valid only when dockOnMap is true + * @Default {top} + */ + dockPosition?: ej.datavisualization.Map.DockPosition|string; + + /** height value for legend setting + * @Default {0} + */ + height?: number; + + /** to get icon value for legend setting + * @Default {rectangle} + */ + icon?: ej.datavisualization.Map.LegendIcons|string; + + /** icon height value for legend setting + * @Default {20} + */ + iconHeight?: number; + + /** icon Width value for legend setting + * @Default {20} + */ + iconWidth?: number; + + /** set the orientation of legend labels + * @Default {vertical} + */ + labelOrientation?: ej.datavisualization.Map.LabelOrientation|string; + + /** to get leftLabel value for legend setting + * @Default {null} + */ + leftLabel?: string; + + /** to get mode of legend setting + * @Default {default} + */ + mode?: ej.datavisualization.Map.Mode|string; + + /** set the position of legend settings + * @Default {topleft} + */ + position?: ej.datavisualization.Map.Position|string; + + /** x position value for legend setting + * @Default {0} + */ + positionX?: number; + + /** y position value for legend setting + * @Default {0} + */ + positionY?: number; + + /** to get rightLabel value for legend setting + * @Default {null} + */ + rightLabel?: string; + + /** Enables or Disables the showLabels + * @Default {false} + */ + showLabels?: boolean; + + /** Enables or Disables the showLegend + * @Default {false} + */ + showLegend?: boolean; + + /** to get title of legend setting + * @Default {null} + */ + title?: string; + + /** to get type of legend setting + * @Default {layers} + */ + type?: ej.datavisualization.Map.LegendType|string; + + /** width value for legend setting + * @Default {0} + */ + width?: number; + } + + export interface LayersShapeSettingsColorMappingsRangeColorMapping { + + /** Specifies the start range colorMappings in the shape layer of map. + * @Default {null} + */ + from?: number; + + /** Specifies the to range colorMappings in the shape layer of map. + * @Default {null} + */ + to?: number; + + /** Specifies the gradientColors in the shape layer of map. + * @Default {null} + */ + gradientColors?: any[]; + } + + export interface LayersShapeSettingsColorMappingsEqualColorMapping { + + /** Specifies the equalColorMapping value in the shape layer of map. + * @Default {null} + */ + value?: string; + + /** Specifies the equalColorMapping color in the shape layer of map. + * @Default {null} + */ + color?: string; + } + + export interface LayersShapeSettingsColorMappings { + + /** Specifies the range colorMappings in the shape layer of map. + * @Default {null} + */ + rangeColorMapping?: LayersShapeSettingsColorMappingsRangeColorMapping[]; + + /** Specifies the equalColorMapping in the shape layer of map. + * @Default {null} + */ + equalColorMapping?: LayersShapeSettingsColorMappingsEqualColorMapping[]; + } + + export interface LayersShapeSettings { + + /** Enables or Disables the auto fill colors for shape layer in map. When this property value set to true, shapes will be filled with palette colors. + * @Default {false} + */ + autoFill?: boolean; + + /** Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: LayersShapeSettingsColorMappings; + + /** Specifies the shape color palette value of the shape layer in map. Accepted colorPalette values are palette1, palette2, palette3 and custompalette. + * @Default {palette1} + */ + colorPalette?: ej.datavisualization.Map.ColorPalette|string; + + /** Specifies the shape color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /** Enables or Disables the gradient colors for map shapes. + * @Default {false} + */ + enableGradient?: boolean; + + /** Specifies the shape fill color of the shape layer in map + * @Default {#E5E5E5} + */ + fill?: string; + + /** Specifies the mouse over width of the shape layer in map + * @Default {1} + */ + highlightBorderWidth?: number; + + /** Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + highlightColor?: string; + + /** Specifies the mouse over stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + highlightStroke?: string; + + /** Specifies the shape selection color of the shape layer in map + * @Default {gray} + */ + selectionColor?: string; + + /** Specifies the shape selection stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + selectionStroke?: string; + + /** Specifies the shape selection stroke width of the shape layer in map + * @Default {1} + */ + selectionStrokeWidth?: number; + + /** Specifies the shape stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + stroke?: string; + + /** Specifies the shape stroke thickness value of the shape layer in map + * @Default {0.2} + */ + strokeThickness?: number; + + /** Specifies the shape valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; + } + + export interface LayersSublayersBubbleSettingsColorMappingsRangeColorMapping { + + /** Start range colorMappings in the bubble layer. + * @Default {null} + */ + from?: number; + + /** End range colorMappings in the bubble layer. + * @Default {null} + */ + to?: number; + + /** GradientColors in the bubble layer of map. + */ + gradientColors?: any[]; + + /** Color of the bubble layer. + * @Default {null} + */ + color?: string; + } + + export interface LayersSublayersBubbleSettingsColorMappings { + + /** Specifies the range colorMappings in the bubble layer. + * @Default {null} + */ + rangeColorMapping?: LayersSublayersBubbleSettingsColorMappingsRangeColorMapping[]; + } + + export interface LayersSublayersBubbleSettings { + + /** Specifies the bubble Opacity value of bubbles for shape layer in map + * @Default {0.9} + */ + bubbleOpacity?: number; + + /** Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + color?: string; + + /** Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: LayersSublayersBubbleSettingsColorMappings; + + /** Specifies the bubble color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /** Specifies the maximum size value of bubbles for shape layer in map + * @Default {20} + */ + maxValue?: number; + + /** Specifies the minimum size value of bubbles for shape layer in map + * @Default {10} + */ + minValue?: number; + + /** Specifies the showBubble visibility status map + * @Default {true} + */ + showBubble?: boolean; + + /** Specifies the tooltip visibility status of the shape layer in map + * @Default {false} + */ + showTooltip?: boolean; + + /** Specifies the bubble tooltip template of the shape layer in map + * @Default {null} + */ + tooltipTemplate?: string; + + /** Specifies the bubble valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; + } + + export interface LayersSublayersLabelSettings { + + /** enable or disable the enableSmartLabel property + * @Default {false} + */ + enableSmartLabel?: boolean; + + /** set the labelLength property + * @Default {'2'} + */ + labelLength?: number; + + /** set the labelPath property + * @Default {null} + */ + labelPath?: string; + + /** The property specifies whether to show labels or not. + * @Default {false} + */ + showLabels?: boolean; + + /** set the smartLabelSize property + * @Default {fixed} + */ + smartLabelSize?: ej.datavisualization.Map.LabelSize|string; + } + + export interface LayersSublayersLegendSettings { + + /** Determines whether the legend should be placed outside or inside the map bounds + * @Default {false} + */ + dockOnMap?: boolean; + + /** Determines the legend placement and it is valid only when dockOnMap is true + * @Default {top} + */ + dockPosition?: ej.datavisualization.Map.DockPosition|string; + + /** height value for legend setting + * @Default {0} + */ + height?: number; + + /** to get icon value for legend setting + * @Default {rectangle} + */ + icon?: ej.datavisualization.Map.LegendIcons|string; + + /** icon height value for legend setting + * @Default {20} + */ + iconHeight?: number; + + /** icon Width value for legend setting + * @Default {20} + */ + iconWidth?: number; + + /** set the orientation of legend labels + * @Default {vertical} + */ + labelOrientation?: ej.datavisualization.Map.LabelOrientation|string; + + /** to get leftLabel value for legend setting + * @Default {null} + */ + leftLabel?: string; + + /** to get mode of legend setting + * @Default {default} + */ + mode?: ej.datavisualization.Map.Mode|string; + + /** set the position of legend settings + * @Default {topleft} + */ + position?: ej.datavisualization.Map.Position|string; + + /** x position value for legend setting + * @Default {0} + */ + positionX?: number; + + /** y position value for legend setting + * @Default {0} + */ + positionY?: number; + + /** to get rightLabel value for legend setting + * @Default {null} + */ + rightLabel?: string; + + /** Enables or Disables the showLabels + * @Default {false} + */ + showLabels?: boolean; + + /** Enables or Disables the showLegend + * @Default {false} + */ + showLegend?: boolean; + + /** to get title of legend setting + * @Default {null} + */ + title?: string; + + /** to get type of legend setting + * @Default {layers} + */ + type?: ej.datavisualization.Map.LegendType|string; + + /** width value for legend setting + * @Default {0} + */ + width?: number; + } + + export interface LayersSublayersShapeSettingsColorMappingsRangeColorMapping { + + /** Specifies the start range colorMappings in the shape layer of map. + * @Default {null} + */ + from?: number; + + /** Specifies the to range colorMappings in the shape layer of map. + * @Default {null} + */ + to?: number; + + /** Specifies the gradientColors in the shape layer of map. + * @Default {null} + */ + gradientColors?: any[]; + } + + export interface LayersSublayersShapeSettingsColorMappingsEqualColorMapping { + + /** Specifies the equalColorMapping value in the shape layer of map. + * @Default {null} + */ + value?: string; + + /** Specifies the equalColorMapping color in the shape layer of map. + * @Default {null} + */ + color?: string; + } + + export interface LayersSublayersShapeSettingsColorMappings { + + /** Specifies the range colorMappings in the shape layer of map. + * @Default {null} + */ + rangeColorMapping?: LayersSublayersShapeSettingsColorMappingsRangeColorMapping[]; + + /** Specifies the equalColorMapping in the shape layer of map. + * @Default {null} + */ + equalColorMapping?: LayersSublayersShapeSettingsColorMappingsEqualColorMapping[]; + } + + export interface LayersSublayersShapeSettings { + + /** Enables or Disables the auto fill colors for shape layer in map. When this property value set to true, shapes will be filled with palette colors. + * @Default {false} + */ + autoFill?: boolean; + + /** Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: LayersSublayersShapeSettingsColorMappings; + + /** Specifies the shape color palette value of the shape layer in map. Accepted colorPalette values are palette1, palette2, palette3 and custompalette. + * @Default {palette1} + */ + colorPalette?: ej.datavisualization.Map.ColorPalette|string; + + /** Specifies the shape color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /** Enables or Disables the gradient colors for map shapes. + * @Default {false} + */ + enableGradient?: boolean; + + /** Specifies the shape fill color of the shape layer in map + * @Default {#E5E5E5} + */ + fill?: string; + + /** Specifies the mouse over width of the shape layer in map + * @Default {1} + */ + highlightBorderWidth?: number; + + /** Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + highlightColor?: string; + + /** Specifies the mouse over stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + highlightStroke?: string; + + /** Specifies the shape selection color of the shape layer in map + * @Default {gray} + */ + selectionColor?: string; + + /** Specifies the shape selection stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + selectionStroke?: string; + + /** Specifies the shape selection stroke width of the shape layer in map + * @Default {1} + */ + selectionStrokeWidth?: number; + + /** Specifies the shape stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + stroke?: string; + + /** Specifies the shape stroke thickness value of the shape layer in map + * @Default {0.2} + */ + strokeThickness?: number; + + /** Specifies the shape valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; + } + + export interface LayersSublayer { + + /** to get the type of bing map. + * @Default {aerial} + */ + bingMapType?: ej.datavisualization.Map.BingMapType|string; + + /** Specifies the bubble settings for map + */ + bubbleSettings?: LayersSublayersBubbleSettings; + + /** Specifies the datasource for the shape layer + */ + dataSource?: any; + + /** Specifies the data path of shape + */ + shapeDataPath?: string; + + /** Specifies the data path of shape + */ + shapePropertyPath?: string; + + /** Enables or disables the shape mouse hover + * @Default {false} + */ + enableMouseHover?: boolean; + + /** Enables or disables the shape selection + * @Default {true} + */ + enableSelection?: boolean; + + /** to get the key of bing map + * @Default {null} + */ + key?: string; + + /** Options for enabling and configuring labelSettings labelPath, smartLabelSize, labelLength etc., + */ + labelSettings?: LayersSublayersLabelSettings; + + /** Specifies the map view type. + * @Default {'geographic'} + */ + geometryType?: ej.datavisualization.Map.GeometryType|string; + + /** Specifies the map type. + * @Default {'geometry'} + */ + layerType?: ej.datavisualization.Map.LayerType|string; + + /** Options for enabling and configuring legendSettings position, height, width, mode, type etc., + */ + legendSettings?: LayersSublayersLegendSettings; + + /** Specifies the map items template for shapes. + */ + mapItemsTemplate?: string; + + /** Specify markers for shape layer. + */ + markers?: any[]; + + /** Specifies the map marker template for map layer. + * @Default {null} + */ + markerTemplate?: string; + + /** Specify selectedMapShapes for shape layer + * @Default {[]} + */ + selectedMapShapes?: any[]; + + /** Specifies the selection mode of the map. Accepted selection mode values are Default and Multiple. + * @Default {default} + */ + selectionMode?: ej.datavisualization.Map.SelectionMode|string; + + /** Specifies the shape data for the shape layer + */ + shapeData?: any; + + /** Specifies the shape settings of map layer + */ + shapeSettings?: LayersSublayersShapeSettings; + + /** Shows or hides the map items. + * @Default {false} + */ + showMapItems?: boolean; + + /** Shows or hides the tooltip for shapes + * @Default {false} + */ + showTooltip?: boolean; + + /** Specifies the tooltip template for shapes. + */ + tooltipTemplate?: string; + + /** Specifies the URL template for the OSM type map. + * @Default {'http://a.tile.openstreetmap.org/level/tileX/tileY.png'} + */ + urlTemplate?: string; + } + + export interface Layer { + + /** to get the type of bing map. + * @Default {aerial} + */ + bingMapType?: ej.datavisualization.Map.BingMapType|string; + + /** Specifies the bubble settings for map + */ + bubbleSettings?: LayersBubbleSettings; + + /** Specifies the datasource for the shape layer + */ + dataSource?: any; + + /** Specifies the data path of shape + */ + shapeDataPath?: string; + + /** Specifies the data path of shape + */ + shapePropertyPath?: string; + + /** Enables or disables the shape mouse hover + * @Default {false} + */ + enableMouseHover?: boolean; + + /** Enables or disables the shape selection + * @Default {true} + */ + enableSelection?: boolean; + + /** to get the key of bing map + * @Default {null} + */ + key?: string; + + /** Options for enabling and configuring labelSettings labelPath, smartLabelSize, labelLength etc., + */ + labelSettings?: LayersLabelSettings; + + /** Specifies the map view type. + * @Default {'geographic'} + */ + geometryType?: ej.datavisualization.Map.GeometryType|string; + + /** Specifies the map type. + * @Default {'geometry'} + */ + layerType?: ej.datavisualization.Map.LayerType|string; + + /** Options for enabling and configuring legendSettings position, height, width, mode, type etc., + */ + legendSettings?: LayersLegendSettings; + + /** Specifies the map items template for shapes. + */ + mapItemsTemplate?: string; + + /** Specify markers for shape layer. + */ + markers?: any[]; + + /** Specifies the map marker template for map layer. + * @Default {null} + */ + markerTemplate?: string; + + /** Specify selectedMapShapes for shape layer + * @Default {[]} + */ + selectedMapShapes?: any[]; + + /** Specifies the selection mode of the map. Accepted selection mode values are Default and Multiple. + * @Default {default} + */ + selectionMode?: ej.datavisualization.Map.SelectionMode|string; + + /** Specifies the shape data for the shape layer + */ + shapeData?: any; + + /** Specifies the shape settings of map layer + */ + shapeSettings?: LayersShapeSettings; + + /** Shows or hides the map items. + * @Default {false} + */ + showMapItems?: boolean; + + /** Shows or hides the tooltip for shapes + * @Default {false} + */ + showTooltip?: boolean; + + /** Specifies the tooltip template for shapes. + */ + tooltipTemplate?: string; + + /** Specifies the URL template for the OSM type map. + * @Default {'http://a.tile.openstreetmap.org/level/tileX/tileY.png'} + */ + urlTemplate?: string; + + /** Sublayer is the collection of shape Layer + */ + sublayers?: LayersSublayer[]; + } + } + namespace Map { + enum Position { + //specifies the none position + None, + //specifies the topleft position + Topleft, + //specifies the topcenter position + Topcenter, + //specifies the topright position + Topright, + //specifies the centerleft position + Centerleft, + //specifies the center position + Center, + //specifies the centerright position + Centerright, + //specifies the bottomleft position + Bottomleft, + //specifies the bottomcenter position + Bottomcenter, + //specifies the bottomright position + Bottomright, + } + } + namespace Map { + enum LabelOrientation { + //specifies the horizontal position + Horizontal, + //specifies the vertical position + Vertical, + } + } + namespace Map { + enum BingMapType { + //specifies the aerial type + Aerial, + //specifies the aerialwithlabel type + Aerialwithlabel, + //specifies the road type + Road, + } + } + namespace Map { + enum LabelSize { + //specifies the fixed size + Fixed, + //specifies the default size + Default, + } + } + namespace Map { + enum GeometryType { + //specifies the geographic view of map + Geographic, + //specifies the normal land view of map + Normal, + } + } + namespace Map { + enum LayerType { + //specifies the geometry type + Geometry, + //specifies the osm type + Osm, + //specifies the bing type + Bing, + } + } + namespace Map { + enum DockPosition { + //specifies the top position + Top, + //specifies the bottom position + Bottom, + //specifies the bottom position + Right, + //specifies the left position + Left, + } + } + namespace Map { + enum LegendIcons { + //specifies the rectangle position + Rectangle, + //specifies the circle position + Circle, + } + } + namespace Map { + enum Mode { + //specifies the default mode + Default, + //specifies the interactive mode + Interactive, + } + } + namespace Map { + enum LegendType { + //specifies the layers type + Layers, + //specifies the bubbles type + Bubbles, + } + } + namespace Map { + enum SelectionMode { + //specifies the default position + Default, + //specifies the multiple position + Multiple, + } + } + namespace Map { + enum ColorPalette { + //specifies the palette1 color + Palette1, + //specifies the palette2 color + Palette2, + //specifies the palette3 color + Palette3, + //specifies the custom color + Custompalette, + } + } + + class TreeMap extends ej.Widget { + static fn: TreeMap; + constructor(element: JQuery | Element, options?: TreeMap.Model); + static Locale: any; + model: TreeMap.Model; + defaults: TreeMap.Model; + + /** Method to reload treemap with updated values. + * @returns {void} + */ + refresh(): void; + } + export namespace TreeMap { + + export interface Model { + + /** Specifies the border brush color of the treemap + * @Default {white} + */ + borderBrush?: string; + + /** Specifies the border thickness of the treemap + * @Default {1} + */ + borderThickness?: number; + + /** Specifies the uniColorMapping settings of the treemap + */ + uniColorMapping?: UniColorMapping; + + /** Specifies the desaturationColorMapping settings of the treemap + */ + desaturationColorMapping?: DesaturationColorMapping; + + /** Specifies the paletteColorMapping of the treemap + */ + paletteColorMapping?: PaletteColorMapping; + + /** Specifies the color value path of the treemap + * @Default {null} + */ + colorValuePath?: string; + + /** Specifies the datasource of the treemap + * @Default {null} + */ + dataSource?: any; + + /** Specifies the dockPosition for legend + * @Default {top} + */ + dockPosition?: ej.datavisualization.TreeMap.DockPosition|string; + + /** specifies the drillDown header color + * @Default {'null'} + */ + drillDownHeaderColor?: string; + + /** specifies the drillDown selection color + * @Default {'#000000'} + */ + drillDownSelectionColor?: string; + + /** Specifies whether datasource is hierarchical or not. + * @Default {false} + */ + isHierarchicalDatasource?: boolean; + + /** Specifies the header for parent item during drilldown. This is applicable only for hierarchical data source. + * @Default {null} + */ + header?: string; + + /** Enable/Disable the drillDown for treemap + * @Default {false} + */ + enableDrillDown?: boolean; + + /** Controls whether Treemap has to be responsive while resizing the window. + * @Default {true} + */ + isResponsive?: boolean; + + /** Specifies whether treemap need to resize when container is resized + * @Default {true} + */ + enableResize?: boolean; + + /** This property is used to select treemap items while clicking and dragging + * @Default {false} + */ + draggingOnSelection?: boolean; + + /** This property is used to select group of treemap items while clicking and dragging + * @Default {false} + */ + draggingGroupOnSelection?: boolean; + + /** Specifies the group color mapping of the treemap + * @Default {[]} + */ + groupColorMapping?: GroupColorMapping[]; + + /** Specifies the legend settings of the treemap + */ + legendSettings?: LegendSettings; + + /** Specifies the highlight border brush of treemap + * @Default {gray} + */ + highlightBorderBrush?: string; + + /** Specifies the border thickness when treemap items is highlighted in the treemap + * @Default {5} + */ + highlightBorderThickness?: number; + + /** Specifies the highlight border brush of treemap + * @Default {gray} + */ + highlightGroupBorderBrush?: string; + + /** Specifies the border thickness when treemap items is highlighted in the treemap + * @Default {5} + */ + highlightGroupBorderThickness?: number; + + /** Specifies whether treemap item need to highlighted on selection + * @Default {false} + */ + highlightGroupOnSelection?: boolean; + + /** Specifies whether treemap item need to highlighted on selection + * @Default {false} + */ + highlightOnSelection?: boolean; + + /** Specifies the items layout mode of the treemap. Accepted itemsLayoutMode values are Squarified, SliceAndDiceHorizontal, SliceAndDiceVertical and SliceAndDiceAuto + * @Default {Squarified} + */ + itemsLayoutMode?: ej.datavisualization.TreeMap.ItemsLayoutMode|string; + + /** Specify to convert the date object to string, using locale settings. + * @Default {false} + */ + enableGroupSeparator?: boolean; + + /** Name of the culture based on which Tree Map should be localized. + * @Default {en-US} + */ + locale?: string; + + /** Specifies the leaf settings of the treemap + */ + leafItemSettings?: LeafItemSettings; + + /** Specifies the rangeColorMapping settings of the treemap + * @Default {[]} + */ + rangeColorMapping?: RangeColorMapping[]; + + /** Specifies the selection mode of treemap item. Accepted selection mode values are Default and Multiple. + * @Default {default} + */ + selectionMode?: ej.datavisualization.TreeMap.selectionMode|string; + + /** Specifies the selection mode of the treemap. Accepted selection mode values are Default and Multiple. + * @Default {default} + */ + groupSelectionMode?: ej.datavisualization.TreeMap.groupSelectionMode|string; + + /** Specifies the legend visibility status of the treemap + * @Default {false} + */ + showLegend?: boolean; + + /** Specifies whether gradient color has to be applied for treemap items + * @Default {false} + */ + enableGradient?: boolean; + + /** Specifies whether treemap showTooltip need to be visible + */ + showTooltip?: boolean; + + /** Specifies the tooltip template of the treemap + * @Default {null} + */ + tooltipTemplate?: string; + + /** Hold the treeMapItems to be displayed in treemap + * @Default {[]} + */ + treeMapItems?: any[]; + + /** Specify levels of treemap for grouped visualization of data + * @Default {[]} + */ + levels?: Level[]; + + /** Specifies the weight value path of the treemap + * @Default {null} + */ + weightValuePath?: string; + + /** Triggers on treemap item selected. + */ + treeMapItemSelected?(e: TreeMapItemSelectedEventArgs): void; + + /** Triggers when drilldown is started + */ + drillStarted?(e: DrillStartedEventArgs): void; + + /** Triggers on treemap drilldown item selected. + */ + drillDownItemSelected?(e: DrillDownItemSelectedEventArgs): void; + + /** Triggers after refreshing the treemap items. + */ + refreshed?(e: RefreshedEventArgs): void; + + /** Triggers when the group selection is performed on treemap items. + */ + treeMapGroupSelected?(e: TreeMapGroupSelectedEventArgs): void; + } + + export interface TreeMapItemSelectedEventArgs { + + /** Returns selected treeMapItem object. + */ + originalEvent?: any; + } + + export interface DrillStartedEventArgs { + + /** Returns selected drilled treeMap object. + */ + originalEvent?: any; + } + + export interface DrillDownItemSelectedEventArgs { + + /** Returns selected drilldown treeMap object. + */ + originalEvent?: any; + } + + export interface RefreshedEventArgs { + + /** Refresh and load the treemap. + */ + originalEvent?: any; + } + + export interface TreeMapGroupSelectedEventArgs { + + /** Returns the selected group of treeMapItems as object. + */ + originalEvent?: any; + } + + export interface UniColorMapping { + + /** Specifies the uniform color mapping of the treemap + * @Default {null} + */ + color?: string; + } + + export interface DesaturationColorMapping { + + /** Specifies the to value for desaturation color mapping + * @Default {0} + */ + to?: number; + + /** Specifies the color for desaturationColorMapping + * @Default {null} + */ + color?: string; + + /** Specifies the from value for desaturation color mapping + * @Default {0} + */ + from?: number; + + /** Specifies the rangeMaximum value for desaturation color mapping + * @Default {0} + */ + rangeMaximum?: number; + + /** Specifies the rangeMinimum value for desaturation color mapping + * @Default {0} + */ + rangeMinimum?: number; + } + + export interface PaletteColorMapping { + + /** Specifies the colors of the paletteColorMapping + * @Default {[]} + */ + colors?: any[]; + } + + export interface GroupColorMapping { + + /** Specifies the groupID for GroupColorMapping. + * @Default {null} + */ + groupID?: string; + } + + export interface LegendSettings { + + /** Specifies the height for legend + * @Default {30} + */ + height?: number; + + /** Specifies the width for legend + * @Default {100} + */ + width?: number; + + /** Specifies the iconHeight for legend + * @Default {15} + */ + iconHeight?: number; + + /** Specifies the iconWidth for legend + * @Default {15} + */ + iconWidth?: number; + + /** Specifies the template for legendSettings + * @Default {null} + */ + template?: string; + + /** Specifies the mode for legendSettings whether default or interactive mode + * @Default {default} + */ + mode?: string; + + /** Specifies the title text for legend + */ + title?: string; + + /** Specifies the leftLabel text for legend + */ + leftLabel?: string; + + /** Specifies the rightLabel text for legend + */ + rightLabel?: string; + + /** Specifies the dockPosition text for legend + * @Default {top} + */ + dockPosition?: string; + + /** Specifies the alignment text for legend + * @Default {near} + */ + alignment?: string; + + /** Specifies the alignment text for legend + * @Default {0} + */ + columnCount?: number; + } + + export interface LeafItemSettings { + + /** Specifies the border brush color of the leaf item. + * @Default {white} + */ + borderBrush?: string; + + /** Specifies the border thickness of the leaf item. + * @Default {1} + */ + borderThickness?: number; + + /** Specifies the space between the leaf items. + * @Default {0} + */ + gap?: number; + + /** Specifies the label template of the leaf item. + * @Default {null} + */ + itemTemplate?: string; + + /** Specifies the label path of the leaf item. + * @Default {null} + */ + labelPath?: string; + + /** Specifies the position of the leaf labels. + * @Default {center} + */ + labelPosition?: ej.datavisualization.TreeMap.Position|string; + + /** Specifies the mode of label visibility + * @Default {visible} + */ + labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /** Shows or hides the label of the leaf item. + * @Default {false} + */ + showLabels?: boolean; + } + + export interface RangeColorMapping { + + /** Specifies the color value for rangeColorMapping. + * @Default {null} + */ + color?: string; + + /** specifies the gradient colors for th given range value + * @Default {[]} + */ + gradientColors?: any[]; + + /** Specifies the from value for rangeColorMapping. + * @Default {-1} + */ + from?: number; + + /** Specifies the legend label value for rangeColorMapping. + * @Default {null} + */ + legendLabel?: string; + + /** Specifies the to value for rangeColorMapping. + * @Default {-1} + */ + to?: number; + } + + export interface Level { + + /** specifies the group background + * @Default {null} + */ + groupBackground?: string; + + /** Specifies the group border color for tree map level. + * @Default {null} + */ + groupBorderColor?: string; + + /** Specifies the group border thickness for tree map level. + * @Default {1} + */ + groupBorderThickness?: number; + + /** Specifies the group gap for tree map level. + * @Default {1} + */ + groupGap?: number; + + /** Specifies the group padding for tree map level. + * @Default {4} + */ + groupPadding?: number; + + /** Specifies the group path for tree map level. + */ + groupPath?: string; + + /** Specifies the header height for tree map level. + * @Default {0} + */ + headerHeight?: number; + + /** Specifies the header template for tree map level. + * @Default {null} + */ + headerTemplate?: string; + + /** Specifies the mode of header visibility + * @Default {visible} + */ + headerVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /** Specifies the position of the labels. + * @Default {center} + */ + labelPosition?: ej.datavisualization.TreeMap.Position|string; + + /** Specifies the label template for tree map level. + * @Default {null} + */ + labelTemplate?: string; + + /** Specifies the mode of label visibility + * @Default {visible} + */ + labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /** Shows or hides the header for tree map level. + * @Default {false} + */ + showHeader?: boolean; + + /** Shows or hides the labels for tree map level. + * @Default {false} + */ + showLabels?: boolean; + } + } + namespace TreeMap { + enum DockPosition { + //specifies the top position + Top, + //specifies the bottom position + Bottom, + //specifies the bottom position + Right, + //specifies the left position + Left, + } + } + namespace TreeMap { + enum ItemsLayoutMode { + //specifies the squarified as layout type position + Squarified, + //specifies the sliceanddicehorizontal as layout type position + Sliceanddicehorizontal, + //specifies the sliceanddicevertical as layout type position + Sliceanddicevertical, + //specifies the sliceanddiceauto as layout type position + Sliceanddiceauto, + } + } + namespace TreeMap { + enum Position { + //specifies the none position + None, + //specifies the topleft position + Topleft, + //specifies the topcenter position + Topcenter, + //specifies the topright position + Topright, + //specifies the centerleft position + Centerleft, + //specifies the center position + Center, + //specifies the centerright position + Centerright, + //specifies the bottomleft position + Bottomleft, + //specifies the bottomcenter position + Bottomcenter, + //specifies the bottomright position + Bottomright, + } + } + namespace TreeMap { + enum VisibilityMode { + //specifies the visible mode + Top, + //specifies the hide on exceeded length mode + Hideonexceededlength, + } + } + namespace TreeMap { + enum selectionMode { + //specifies the default mode + Default, + //specifies the multiple mode + Multiple, + } + } + namespace TreeMap { + enum groupSelectionMode { + //specifies the default mode + Default, + //specifies the multiple mode + Multiple, + } + } + + class Diagram extends ej.Widget { + static fn: Diagram; + constructor(element: JQuery | Element, options?: Diagram.Model); + static Locale: any; + model: Diagram.Model; + defaults: Diagram.Model; + + /** Add nodes and connectors to diagram at runtime + * @param {any} a JSON to define a node/connector or an array of nodes and connector + * @returns {boolean} + */ + add(node: any): boolean; + + /** Add a label to a node at runtime + * @param {string} name of the node to which label will be added + * @param {any} JSON for the new label to be added + * @returns {void} + */ + addLabel(nodeName: string, newLabel: any): void; + + /** Add dynamic Lanes to swimlane at runtime + * @param {any} JSON for the new lane to be added + * @param {number} Index value to add the lane in swimlane + * @returns {void} + */ + addLane(lane: any, index: number): void; + + /** Add a phase to a swimlane at runtime + * @param {string} name of the swimlane to which the phase will be added + * @param {any} JSON object to define the phase to be added + * @returns {void} + */ + addPhase(name: string, options: any): void; + + /** Add a collection of ports to the node specified by name + * @param {string} name of the node to which the ports have to be added + * @param {any[]} a collection of ports to be added to the specified node + * @returns {void} + */ + addPorts(name: string, ports: any[]): void; + + /** Add the specified node to selection list + * @param {any} the node to be selected + * @param {boolean} to define whether to clear the existing selection or not + * @returns {void} + */ + addSelection(node: any, clearSelection?: boolean): void; + + /** Align the selected objects based on the reference object and direction + * @param {string} to specify the direction towards which the selected objects are to be aligned("left","right",top","bottom") + * @returns {void} + */ + align(direction: string): void; + + /** Bring the specified portion of the diagram content to the diagram viewport + * @param {any} the rectangular region that is to be brought into diagram viewport + * @returns {void} + */ + bringIntoView(rect: any): void; + + /** Bring the specified portion of the diagram content to the center of the diagram viewport + * @param {any} the rectangular region that is to be brought to the center of diagram viewport + * @returns {void} + */ + bringToCenter(rect: any): void; + + /** Visually move the selected object over all other intersected objects + * @returns {void} + */ + bringToFront(): void; + + /** Remove all the elements from diagram + * @returns {void} + */ + clear(): void; + + /** Clears the actions which is recorded to perform undo/redo operation in the diagram. + * @returns {void} + */ + clearHistory(): void; + + /** Remove the current selection in diagram + * @returns {void} + */ + clearSelection(): void; + + /** Copy the selected object to internal clipboard and get the copied object + * @returns {any} + */ + copy(): any; + + /** Cut the selected object from diagram to diagram internal clipboard + * @returns {void} + */ + cut(): void; + + /** Export the diagram as downloadable files or as data + * @param {Diagram.Options} options to export the desired region of diagram to the desired formats. + * @returns {string} + */ + exportDiagram(options?: Diagram.Options): string; + + /** Read a node/connector object by its name + * @param {string} name of the node/connector that is to be identified + * @returns {any} + */ + findNode(name: string): any; + + /** Fit the diagram content into diagram viewport + * @param {ej.datavisualization.Diagram.FitMode} to set the mode of fit to command. + * @param {ej.datavisualization.Diagram.Region} to set whether the region to be fit will be based on diagram elements or page settings. + * @param {any} to set the required margin + * @returns {void} + */ + fitToPage(mode?: ej.datavisualization.Diagram.FitMode, region?: ej.datavisualization.Diagram.Region, margin?: any): void; + + /** Group the selected nodes and connectors + * @returns {void} + */ + group(): void; + + /** Insert a label into a node's label collection at runtime + * @param {string} name of the node to which the label has to be inserted + * @param {any} JSON to define the new label + * @param {number} index to insert the label into the node + * @returns {void} + */ + insertLabel(name: string, label: any, index?: number): void; + + /** Refresh the diagram with the specified layout + * @returns {void} + */ + layout(): void; + + /** Load the diagram + * @param {any} JSON data to load the diagram + * @returns {void} + */ + load(data: any): void; + + /** Visually move the selected object over its closest intersected object + * @returns {void} + */ + moveForward(): void; + + /** Move the selected objects by either one pixel or by the pixels specified through argument + * @param {string} specifies the direction to move the selected objects ("left","right",top","bottom") + * @param {number} specifies the number of pixels by which the selected objects have to be moved + * @returns {void} + */ + nudge(direction: string, delta?: number): void; + + /** Paste the selected object from internal clipboard to diagram + * @param {any} object to be added to diagram + * @param {boolean} to define whether the specified object is to be renamed or not + * @returns {void} + */ + paste(object?: any, rename?: boolean): void; + + /** Print the diagram as image + * @returns {void} + */ + print(): void; + + /** Restore the last action that was reverted + * @returns {void} + */ + redo(): void; + + /** Refresh the diagram at runtime + * @returns {void} + */ + refresh(): void; + + /** Remove either the given node/connector or the selected element from diagram + * @param {any} the node/connector to be removed from diagram + * @returns {void} + */ + remove(node?: any): void; + + /** Remove a particular object from selection list + * @param {any} the node/connector to be removed from selection list + * @returns {void} + */ + removeSelection(node: any): void; + + /** Scale the selected objects to the height of the first selected object + * @returns {void} + */ + sameHeight(): void; + + /** Scale the selected objects to the size of the first selected object + * @returns {void} + */ + sameSize(): void; + + /** Scale the selected objects to the width of the first selected object + * @returns {void} + */ + sameWidth(): void; + + /** Returns the diagram as serialized JSON + * @returns {any} + */ + save(): any; + + /** Bring the node into view + * @param {any} the node/connector to be brought into view + * @returns {void} + */ + scrollToNode(node: any): void; + + /** Select all nodes and connector in diagram + * @returns {void} + */ + selectAll(): void; + + /** Visually move the selected object behind its closest intersected object + * @returns {void} + */ + sendBackward(): void; + + /** Visually move the selected object behind all other intersected objects + * @returns {void} + */ + sendToBack(): void; + + /** Update the horizontal space between the selected objects as equal and within the selection boundary + * @returns {void} + */ + spaceAcross(): void; + + /** Update the vertical space between the selected objects as equal and within the selection boundary + * @returns {void} + */ + spaceDown(): void; + + /** Move the specified label to edit mode + * @param {any} node/connector that contains the label to be edited + * @param {any} to be edited + * @returns {void} + */ + startLabelEdit(node: any, label: any): void; + + /** Reverse the last action that was performed + * @returns {void} + */ + undo(): void; + + /** Ungroup the selected group + * @returns {void} + */ + ungroup(): void; + + /** Update diagram at runtime + * @param {any} JSON to specify the diagram properties that have to be modified + * @returns {void} + */ + update(options: any): void; + + /** Update Connectors at runtime + * @param {string} name of the connector to be updated + * @param {any} JSON to specify the connector properties that have to be updated + * @returns {void} + */ + updateConnector(name: string, options: any): void; + + /** Update the given label at runtime + * @param {string} the name of node/connector which contains the label to be updated + * @param {any} the label to be modified + * @param {any} JSON to specify the label properties that have to be updated + * @returns {any} + */ + updateLabel(nodeName: string, label: any, options: any): any; + + /** Update nodes at runtime + * @param {string} name of the node that is to be updated + * @param {any} JSON to specify the properties of node that have to be updated + * @returns {void} + */ + updateNode(name: string, options: any): void; + + /** Update a port with its modified properties at runtime + * @param {string} the name of node which contains the port to be updated + * @param {any} the port to be updated + * @param {any} JSON to specify the properties of the port that have to be updated + * @returns {void} + */ + updatePort(nodeName: string, port: any, options: any): void; + + /** Update the specified node as selected object + * @param {string} name of the node to be updated as selected object + * @returns {void} + */ + updateSelectedObject(name: string): void; + + /** Update the selection at runtime + * @param {boolean} to specify whether to show the user handles or not + * @returns {void} + */ + updateSelection(showUserHandles?: boolean): void; + + /** Update user handles with respect to the given node + * @param {any} node/connector with respect to which, the user handles have to be updated + * @returns {void} + */ + updateUserHandles(node: any): void; + + /** Update the diagram viewport at runtime + * @returns {void} + */ + updateViewPort(): void; + + /** Upgrade the diagram from old version + * @param {any} to be upgraded + * @returns {void} + */ + upgrade(data: any): void; + + /** Used to zoomIn/zoomOut diagram + * @param {Diagram.Zoom} options to zoom the diagram(zoom factor, zoomIn/zoomOut) + * @returns {void} + */ + zoomTo(Zoom?: Diagram.Zoom): void; + } + export namespace Diagram { + + export interface Options { + + /** name of the file to be downloaded. + */ + fileName?: string; + + /** format of the exported file/data. + */ + format?: ej.datavisualization.Diagram.FileFormats; + + /** to set whether to export diagram as a file or as raw data. + */ + mode?: ej.datavisualization.Diagram.ExportModes; + + /** to set the region of the diagram to be exported. + */ + region?: ej.datavisualization.Diagram.Region; + + /** to export any custom region of diagram. + */ + bounds?: any; + + /** to set margin to the exported data. + */ + margin?: any; + + /** to resize the diagram content to fill its allocated space. + */ + stretch?: ej.datavisualization.Diagram.Stretch; + } + + export interface Zoom { + + /** Used to increase the zoom-in or zoom-out based on the zoom factor value. + */ + zoomFactor?: number; + + /** Used to zoom-in or zoom-out the diagram. + */ + zoomCommand?: ej.datavisualization.Diagram.ZoomCommand; + + /** Used to zoom-in or zoom-out the diagram based on the point. + */ + focusPoint?: ej.datavisualization.Diagram.ConnectorsSourcePoint; + } + + export interface Model { + + /** Defines the background color of diagram elements + * @Default {transparent} + */ + backgroundColor?: string; + + /** Defines the path of the background image of diagram elements + */ + backgroundImage?: string; + + /** Sets the direction of line bridges. + * @Default {ej.datavisualization.Diagram.BridgeDirection.Top} + */ + bridgeDirection?: ej.datavisualization.Diagram.BridgeDirection|string; + + /** Defines a set of custom commands and binds them with a set of desired key gestures. + */ + commandManager?: CommandManager; + + /** A collection of JSON objects where each object represents a connector + * @Default {[]} + */ + connectors?: Connector[]; + + /** Binds the custom JSON data with connector properties + * @Default {null} + */ + connectorTemplate?: any; + + /** Enables/Disables the default behaviors of the diagram. + * @Default {ej.datavisualization.Diagram.DiagramConstraints.All} + */ + constraints?: ej.datavisualization.Diagram.DiagramConstraints|string; + + /** An object to customize the context menu of diagram + */ + contextMenu?: ContextMenu; + + /** Configures the data source that is to be bound with diagram + */ + dataSourceSettings?: DataSourceSettings; + + /** Initializes the default values for nodes and connectors + * @Default {{}} + */ + defaultSettings?: DefaultSettings; + + /** Sets the type of JSON object to be drawn through drawing tool + * @Default {{}} + */ + drawType?: any; + + /** Enables or disables auto scroll in diagram + * @Default {true} + */ + enableAutoScroll?: boolean; + + /** Enables or disables diagram context menu + * @Default {true} + */ + enableContextMenu?: boolean; + + /** Specifies the height of the diagram + * @Default {null} + */ + height?: string; + + /** Customizes the undo redo functionality + */ + historyManager?: HistoryManager; + + /** Defines the type of the rendering mode of label. + * @Default {Html} + */ + labelRenderingMode?: ej.datavisualization.Diagram.LabelRenderingMode|string; + + /** Automatically arranges the nodes and connectors in a predefined manner. + */ + layout?: Layout; + + /** Defines the current culture of diagram + * @Default {en-US} + */ + locale?: string; + + /** Array of JSON objects where each object represents a node + * @Default {[]} + */ + nodes?: Node[]; + + /** Binds the custom JSON data with node properties + * @Default {null} + */ + nodeTemplate?: any; + + /** Defines the size and appearance of diagram page + */ + pageSettings?: PageSettings; + + /** Defines the zoom value, zoom factor, scroll status and view port size of the diagram + */ + scrollSettings?: ScrollSettings; + + /** Defines the size and position of selected items and defines the appearance of selector + */ + selectedItems?: SelectedItems; + + /** Enables or disables tooltip of diagram + * @Default {true} + */ + showTooltip?: boolean; + + /** Defines the gridlines and defines how and when the objects have to be snapped + */ + snapSettings?: SnapSettings; + + /** Enables/Disables the interactive behaviors of diagram. + * @Default {ej.datavisualization.Diagram.Tool.All} + */ + tool?: ej.datavisualization.Diagram.Tool|string; + + /** An object that defines the description, appearance and alignments of tooltips + * @Default {null} + */ + tooltip?: Tooltip; + + /** Specifies the width of the diagram + * @Default {null} + */ + width?: string; + + /** Sets the factor by which we can zoom in or zoom out + * @Default {0.2} + */ + zoomFactor?: number; + + /** Triggers When auto scroll is changed + */ + autoScrollChange?(e: AutoScrollChangeEventArgs): void; + + /** Triggers when a node, connector or diagram is clicked + */ + click?(e: ClickEventArgs): void; + + /** Triggers when the connection is changed + */ + connectionChange?(e: ConnectionChangeEventArgs): void; + + /** Triggers when the connector collection is changed + */ + connectorCollectionChange?(e: ConnectorCollectionChangeEventArgs): void; + + /** Triggers when the connectors' source point is changed + */ + connectorSourceChange?(e: ConnectorSourceChangeEventArgs): void; + + /** Triggers when the connectors' target point is changed + */ + connectorTargetChange?(e: ConnectorTargetChangeEventArgs): void; + + /** Triggers before opening the context menu + */ + contextMenuBeforeOpen?(e: ContextMenuBeforeOpenEventArgs): void; + + /** Triggers when a context menu item is clicked + */ + contextMenuClick?(e: ContextMenuClickEventArgs): void; + + /** Triggers when a node, connector or diagram model is clicked twice + */ + doubleClick?(e: DoubleClickEventArgs): void; + + /** Triggers while dragging the elements in diagram + */ + drag?(e: DragEventArgs): void; + + /** Triggers when a symbol is dragged into diagram from symbol palette + */ + dragEnter?(e: DragEnterEventArgs): void; + + /** Triggers when a symbol is dragged outside of the diagram. + */ + dragLeave?(e: DragLeaveEventArgs): void; + + /** Triggers when a symbol is dragged over diagram + */ + dragOver?(e: DragOverEventArgs): void; + + /** Triggers when a symbol is dragged and dropped from symbol palette to drawing area + */ + drop?(e: DropEventArgs): void; + + /** Triggers when editor got focus at the time of node's label or text node editing. + */ + editorFocusChange?(e: EditorFocusChangeEventArgs): void; + + /** Triggers when a child is added to or removed from a group + */ + groupChange?(e: GroupChangeEventArgs): void; + + /** Triggers when a change is reverted or restored(undo/redo) + */ + historyChange?(e: HistoryChangeEventArgs): void; + + /** Triggers when a diagram element is clicked + */ + itemClick?(e: ItemClickEventArgs): void; + + /** Triggers when mouse enters a node/connector + */ + mouseEnter?(e: MouseEnterEventArgs): void; - /** returns the scrollbar position new start and end range value on changing scrollbar - */ - datanewRange?: any; + /** Triggers when mouse leaves node/connector + */ + mouseLeave?(e: MouseLeaveEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Triggers when mouse hovers over a node/connector + */ + mouseOver?(e: MouseOverEventArgs): void; - /** returns the RangeNavigator model - */ - model?: any; + /** Triggers when node collection is changed + */ + nodeCollectionChange?(e: NodeCollectionChangeEventArgs): void; - /** returns the name of the event - */ - type?: string; - } + /** Triggers when the node properties(x, y,width and height alone) are changed using nudge commands or updateNode API. + */ + propertyChange?(e: PropertyChangeEventArgs): void; - export interface ScrollStartEventArgs { + /** Triggers when the diagram elements are rotated + */ + rotationChange?(e: RotationChangeEventArgs): void; - /** parameters from RangeNavigator - */ - data?: any; + /** Triggers when the diagram is zoomed or panned + */ + scrollChange?(e: ScrollChangeEventArgs): void; - /** returns the scrollbar position starting range value on changing scrollbar - */ - datastartRange?: string; + /** Triggers when a connector segment is edited + */ + segmentChange?(e: SegmentChangeEventArgs): void; - /** returns the scrollbar position end range value on changing scrollbar - */ - dataendRange?: string; + /** Triggers when the selection is changed in diagram + */ + selectionChange?(e: SelectionChangeEventArgs): void; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** Triggers when a node is resized + */ + sizeChange?(e: SizeChangeEventArgs): void; - /** returns the RangeNavigator model - */ - model?: any; + /** Triggers when label editing is ended + */ + textChange?(e: TextChangeEventArgs): void; - /** returns the name of the event - */ - type?: string; - } - - export interface ScrollEndEventArgs { - - /** parameters from RangeNavigator - */ - data?: any; - - /** returns the scrollbar position old start and end range value on change end of scrollbar - */ - dataoldRange?: any; - - /** returns the scrollbar position new start and end range value on change end of scrollbar - */ - datanewRange?: any; - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the RangeNavigator model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface AnnotationsMargin { - - /** Annotation is placed at the specified value above its original position. - * @Default {0} - */ - bottom?: number; - - /** Annotation is placed at the specified value from left side of its original position. - * @Default {0} - */ - left?: number; - - /** Annotation is placed at the specified value from the right side of its original position. - * @Default {0} - */ - right?: number; - - /** Annotation is placed at the specified value under its original position. - * @Default {0} - */ - top?: number; - } - - export interface Annotation { - - /** Angle to rotate the annotation in degrees. - * @Default {'0'} - */ - angle?: number; - - /** Text content or id of a HTML element to be displayed as annotation. - */ - content?: string; - - /** Specifies how annotations have to be placed in Chart. - * @Default {none. See CoordinateUnit} - */ - coordinateUnit?: ej.datavisualization.Chart.CoordinateUnit | string; - - /** Specifies the horizontal alignment of the annotation. - * @Default {middle. See HorizontalAlignment} - */ - horizontalAlignment?: ej.datavisualization.Chart.HorizontalAlignment | string; - - /** Options to customize the margin of annotation. - */ - margin?: AnnotationsMargin; - - /** Controls the opacity of the annotation. - * @Default {1} - */ - opacity?: number; - - /** Specifies whether annotation has to be placed with respect to chart or series. - * @Default {chart. See Region} - */ - region?: ej.datavisualization.Chart.Region | string; - - /** Specifies the vertical alignment of the annotation. - * @Default {middle. See VerticalAlignment} - */ - verticalAlignment?: ej.datavisualization.Chart.VerticalAlignment | string; - - /** Controls the visibility of the annotation. - * @Default {false} - */ - visible?: boolean; - - /** Represents the horizontal offset when coordinateUnit is pixels.when coordinateUnit is points, it represents the x-coordinate of axis bounded with xAxisName property - * or primary X axis when xAxisName is not provided.This property is not applicable when coordinateUnit is none. - * @Default {0} - */ - x?: number; - - /** Name of the horizontal axis to be used for positioning the annotation. This property is applicable only when coordinateUnit is points. - */ - xAxisName?: string; - - /** Represents the vertical offset when coordinateUnit is pixels.When coordinateUnit is points, it represents the y-coordinate of axis bounded with - * yAxisName property or primary Y axis when yAxisName is not provided.This property is not applicable when coordinateUnit is none. - * @Default {0} - */ - y?: number; - - /** Name of the vertical axis to be used for positioning the annotation.This property is applicable only when coordinateUnit is points. - */ - yAxisName?: string; - } - - export interface Border { - - /** Border color of the chart. - * @Default {null} - */ - color?: string; - - /** Opacity of the chart border. - * @Default {0.3} - */ - opacity?: number; - - /** Width of the Chart border. - * @Default {0} - */ - width?: number; - } - - export interface ExportSettings { - - /** Specifies the downloading filename - * @Default {chart} - */ - filename?: string; - - /** Specifies the name of the action URL - */ - action?: string; - - /** Specifies the angle for rotation - * @Default {0} - */ - angle?: number; - - /** Specifies the format of the file to export - * @Default {png} - */ - type?: ej.datavisualization.Chart.ExportingType | string; - - /** Specifies the orientation of the document - * @Default {portrait} - */ - orientation?: ej.datavisualization.Chart.ExportingOrientation | string; - - /** Specifies the mode of exporting - * @Default {client} - */ - mode?: ej.datavisualization.Chart.ExportingMode | string; - - /** Enable/ disable the multiple excel exporting - * @Default {false} - */ - multipleExport?: boolean; - } - - export interface ChartAreaBorder { - - /** Border color of the plot area. - * @Default {Gray} - */ - color?: string; - - /** Opacity of the plot area border. - * @Default {0.3} - */ - opacity?: number; - - /** Border width of the plot area. - * @Default {0.5} - */ - width?: number; - } - - export interface ChartArea { - - /** Background color of the plot area. - * @Default {transparent} - */ - background?: string; - - /** Options for customizing the border of the plot area. - */ - border?: ChartAreaBorder; - } - - export interface ColumnDefinition { - - /** Specifies the unit to measure the width of the column in plotting area. - * @Default {'pixel'. See Unit} - */ - unit?: ej.datavisualization.Chart.Unit | string; - - /** Width of the column in plotting area. Width is measured in either pixel or percentage based on the value of unit property. - * @Default {50} - */ - columnWidth?: number; - - /** Color of the line that indicates the starting point of the column in plotting area. - * @Default {transparent} - */ - lineColor?: string; - - /** Width of the line that indicates the starting point of the column in plot area. - * @Default {1} - */ - lineWidth?: number; - } - - export interface CommonSeriesOptionsBorder { - - /** Border color of all series. - * @Default {transparent} - */ - color?: string; - - /** DashArray for border of the series. - * @Default {null} - */ - dashArray?: string; - - /** Border width of all series. - * @Default {1} - */ - width?: number; - } - - export interface CommonSeriesOptionsFont { - - /** Font color of the text in all series. - * @Default {#707070} - */ - color?: string; - - /** Font Family for all the series. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the font Style for all the series. - * @Default {normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Specifies the font weight for all the series. - * @Default {regular} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity for text in all the series. - * @Default {1} - */ - opacity?: number; - - /** Font size for text in all the series. - * @Default {12px} - */ - size?: string; - } - - export interface CommonSeriesOptionsMarkerBorder { - - /** Border color of the marker shape. - * @Default {white} - */ - color?: string; - - /** Border width of the marker shape. - * @Default {3} - */ - width?: number; - } - - export interface CommonSeriesOptionsMarkerDataLabelBorder { - - /** Border color of the data label. - * @Default {null} - */ - color?: string; - - /** Border width of the data label. - * @Default {0.1} - */ - width?: number; - } - - export interface CommonSeriesOptionsMarkerDataLabelConnectorLine { - - /** Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. - * @Default {line. See ConnectorLineType} - */ - type?: ej.datavisualization.Chart.ConnectorLineType | string; - - /** Width of the connector. - * @Default {0.5} - */ - width?: number; - - /** Color of the connector line. - * @Default {#565656} - */ - color?: string; - - /** Height of the connector line. - * @Default {null} - */ - height?: string; - } - - export interface CommonSeriesOptionsMarkerDataLabelFont { - - /** Font family of the data label. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the data label. - * @Default {normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the data label. - * @Default {regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the text. - * @Default {1} - */ - opacity?: number; - - /** Font color of the data label text. - * @Default {null} - */ - color?: string; - - /** Font size of the data label. - * @Default {12px} - */ - size?: string; - } - - export interface CommonSeriesOptionsMarkerDataLabelMargin { - - /** Bottom margin of the text. - * @Default {5} - */ - bottom?: number; - - /** Left margin of the text. - * @Default {5} - */ - left?: number; - - /** Right margin of the text. - * @Default {5} - */ - right?: number; - - /** Top margin of the text. - * @Default {5} - */ - top?: number; - } - - export interface CommonSeriesOptionsMarkerDataLabel { - - /** Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. - * @Default {null} - */ - angle?: number; - - /** Maximum label width of the data label. - * @Default {null} - */ - maximumLabelWidth?: number; - - /** Enable the wrap option to the data label. - * @Default {false} - */ - enableWrap?: boolean; - - /** Options for customizing the border of the data label. - */ - border?: CommonSeriesOptionsMarkerDataLabelBorder; - - /** Options for displaying and customizing the line that connects point and data label. - */ - connectorLine?: CommonSeriesOptionsMarkerDataLabelConnectorLine; - - /** Background color of the data label. - * @Default {null} - */ - fill?: string; - - /** Options for customizing the data label font. - */ - font?: CommonSeriesOptionsMarkerDataLabelFont; - - /** Horizontal alignment of the data label. - * @Default {center} - */ - horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment | string; - - /** Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. - */ - margin?: CommonSeriesOptionsMarkerDataLabelMargin; - - /** Opacity of the data label. - * @Default {1} - */ - opacity?: number; - - /** Background shape of the data label. - * @Default {none. See Shape} - */ - shape?: ej.datavisualization.Chart.Shape | string; - - /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. - */ - template?: string; - - /** Name of a field in data source, where datalabel text is displayed. - */ - textMappingName?: string; - - /** Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. - * @Default {top. See TextPosition} - */ - textPosition?: ej.datavisualization.Chart.TextPosition | string; - - /** Vertical alignment of the data label. - * @Default {center} - */ - verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment | string; - - /** Controls the visibility of the data labels. - * @Default {false} - */ - visible?: boolean; - } - - export interface CommonSeriesOptionsMarkerSize { - - /** Height of the marker. - * @Default {6} - */ - height?: number; - - /** Width of the marker. - * @Default {6} - */ - width?: number; - } - - export interface CommonSeriesOptionsMarker { - - /** Options for customizing the border of the marker shape. - */ - border?: CommonSeriesOptionsMarkerBorder; - - /** Options for displaying and customizing data labels. - */ - dataLabel?: CommonSeriesOptionsMarkerDataLabel; - - /** Color of the marker shape. - * @Default {null} - */ - fill?: string; - - /** The URL for the Image to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. - */ - imageUrl?: string; - - /** Opacity of the marker. - * @Default {1} - */ - opacity?: number; - - /** Specifies the shape of the marker. - * @Default {circle. See Shape} - */ - shape?: ej.datavisualization.Chart.Shape | string; - - /** Options for customizing the size of the marker shape. - */ - size?: CommonSeriesOptionsMarkerSize; - - /** Controls the visibility of the marker shape. - * @Default {false} - */ - visible?: boolean; - } - - export interface CommonSeriesOptionsOutlierSettingsSize { - - /** Height of the outlier shape. - * @Default {6} - */ - height?: number; - - /** Width of the outlier shape. - * @Default {6} - */ - width?: number; - } - - export interface CommonSeriesOptionsOutlierSettings { - - /** Specifies the shape of the outlier. - * @Default {circle. See Shape} - */ - shape?: ej.datavisualization.Chart.Shape | string; - - /** Options for customizing the size of the outlier shape. - */ - size?: CommonSeriesOptionsOutlierSettingsSize; - } - - export interface CommonSeriesOptionsCornerRadius { - - /** Specifies the radius for the top left corner. - * @Default {0} - */ - topLeft?: number; - - /** Specifies the radius for the top right corner. - * @Default {0} - */ - topRight?: number; - - /** Specifies the radius for the bottom left corner. - * @Default {0} - */ - bottomLeft?: number; - - /** Specifies the radius for the bottom right corner. - * @Default {0} - */ - bottomRight?: number; - } - - export interface CommonSeriesOptionsTooltipBorder { - - /** Border color of the tooltip. - * @Default {null} - */ - color?: string; - - /** Border width of the tooltip. - * @Default {1} - */ - width?: number; - } - - export interface CommonSeriesOptionsTooltip { - - /** Options for customizing the border of the tooltip. - */ - border?: CommonSeriesOptionsTooltipBorder; - - /** Customize the corner radius of the tooltip rectangle. - * @Default {0} - */ - rx?: number; - - /** Customize the corner radius of the tooltip rectangle. - * @Default {0} - */ - ry?: number; - - /** Specifies the duration, the tooltip has to be displayed. - * @Default {500ms} - */ - duration?: string; - - /** Enables/disables the animation of the tooltip when moving from one point to other. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Background color of the tooltip. - * @Default {null} - */ - fill?: string; - - /** Format of the tooltip content. - * @Default {#point.x# : #point.y#} - */ - format?: string; - - /** Opacity of the tooltip. - * @Default {0.5} - */ - opacity?: number; - - /** Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. - * @Default {null} - */ - template?: string; - - /** Controls the visibility of the tooltip. - * @Default {false} - */ - visible?: boolean; - } - - export interface CommonSeriesOptionsEmptyPointSettingsStyleBorder { - - /** Border color of the empty point. - */ - color?: string; - - /** Border width of the empty point. - * @Default {1} - */ - width?: number; - } - - export interface CommonSeriesOptionsEmptyPointSettingsStyle { - - /** Color of the empty point. - */ - color?: string; - - /** Options for customizing border of the empty point in the series. - */ - border?: CommonSeriesOptionsEmptyPointSettingsStyleBorder; - } - - export interface CommonSeriesOptionsEmptyPointSettings { - - /** Controls the visibility of the empty point. - * @Default {true} - */ - visible?: boolean; - - /** Specifies the mode of empty point. - * @Default {gap} - */ - displayMode?: ej.datavisualization.Chart.EmptyPointMode | string; - - /** Options for customizing the color and border of the empty point in the series. - */ - style?: CommonSeriesOptionsEmptyPointSettingsStyle; - } - - export interface CommonSeriesOptionsConnectorLine { - - /** Width of the connector line. - * @Default {1} - */ - width?: number; - - /** Color of the connector line. - * @Default {#565656} - */ - color?: string; - - /** DashArray of the connector line. - * @Default {null} - */ - dashArray?: string; - - /** DashArray of the connector line. - * @Default {1} - */ - opacity?: number; - } - - export interface CommonSeriesOptionsDragSettings { - - /** drag/drop the series - * @Default {false} - */ - enable?: boolean; - - /** Specifies the type of drag settings. - * @Default {xy} - */ - type?: string; - } - - export interface CommonSeriesOptionsErrorBarCap { - - /** Show/Hides the error bar cap. - * @Default {true} - */ - visible?: boolean; - - /** Width of the error bar cap. - * @Default {1} - */ - width?: number; - - /** Length of the error bar cap. - * @Default {1} - */ - length?: number; - - /** Color of the error bar cap. - * @Default {“#000000”} - */ - fill?: string; - } - - export interface CommonSeriesOptionsErrorBar { - - /** Show/hides the error bar - * @Default {visible} - */ - visibility?: boolean; - - /** Specifies the type of error bar. - * @Default {FixedValue} - */ - type?: ej.datavisualization.Chart.ErrorBarType | string; - - /** Specifies the mode of error bar. - * @Default {vertical} - */ - mode?: ej.datavisualization.Chart.ErrorBarMode | string; - - /** Specifies the direction of error bar. - * @Default {both} - */ - direction?: ej.datavisualization.Chart.ErrorBarDirection | string; - - /** Value of vertical error bar. - * @Default {3} - */ - verticalErrorValue?: number; - - /** Value of horizontal error bar. - * @Default {1} - */ - horizontalErrorValue?: number; - - /** Value of positive horizontal error bar. - * @Default {1} - */ - horizontalPositiveErrorValue?: number; - - /** Value of negative horizontal error bar. - * @Default {1} - */ - horizontalNegativeErrorValue?: number; - - /** Value of positive vertical error bar. - * @Default {5} - */ - verticalPositiveErrorValue?: number; - - /** Value of negative vertical error bar. - * @Default {5} - */ - verticalNegativeErrorValue?: number; - - /** Fill color of the error bar. - * @Default {#000000} - */ - fill?: string; - - /** Width of the error bar. - * @Default {1} - */ - width?: number; - - /** Options for customizing the error bar cap. - */ - cap?: CommonSeriesOptionsErrorBarCap; - } - - export interface CommonSeriesOptionsTrendline { - - /** Show/hides the trendline. - */ - visibility?: boolean; - - /** Specifies the type of the trendline for the series. - * @Default {linear. See TrendlinesType} - */ - type?: string; - - /** Name for the trendlines that is to be displayed in the legend text. - * @Default {trendline} - */ - name?: string; - - /** Fill color of the trendlines. - * @Default {#0000FF} - */ - fill?: string; - - /** Width of the trendlines. - * @Default {1} - */ - width?: number; - - /** Opacity of the trendline. - * @Default {1} - */ - opacity?: number; - - /** Pattern of dashes and gaps used to stroke the trendline. - */ - dashArray?: string; - - /** Future trends of the current series. - * @Default {0} - */ - forwardForecast?: number; - - /** Past trends of the current series. - * @Default {0} - */ - backwardForecast?: number; - - /** Specifies the order of the polynomial trendlines. - * @Default {0} - */ - polynomialOrder?: number; - - /** Specifies the moving average starting period value. - * @Default {2} - */ - period?: number; - } - - export interface CommonSeriesOptionsHighlightSettingsBorder { - - /** Border color of the series/point on highlight. - */ - color?: string; - - /** Border width of the series/point on highlight. - * @Default {2} - */ - width?: string; - } - - export interface CommonSeriesOptionsHighlightSettings { - - /** Enables/disables the ability to highlight the series or data point interactively. - * @Default {false} - */ - enable?: boolean; - - /** Specifies whether the series or data point has to be highlighted. - * @Default {series. See Mode} - */ - mode?: ej.datavisualization.Chart.Mode | string; - - /** Color of the series/point on highlight. - */ - color?: string; - - /** Opacity of the series/point on highlight. - * @Default {0.6} - */ - opacity?: number; - - /** Options for customizing the border of series on highlight. - */ - border?: CommonSeriesOptionsHighlightSettingsBorder; - - /** Specifies the pattern for the series/point on highlight. - * @Default {none. See Pattern} - */ - pattern?: string; - - /** Custom pattern for the series on highlight. - */ - customPattern?: string; - } - - export interface CommonSeriesOptionsSelectionSettingsBorder { - - /** Border color of the series/point on selection. - */ - color?: string; - - /** Border width of the series/point on selection. - * @Default {2} - */ - width?: string; - } - - export interface CommonSeriesOptionsSelectionSettings { - - /** Enables/disables the ability to select a series/data point interactively. - * @Default {false} - */ - enable?: boolean; - - /** Specifies the type of selection. - * @Default {single} - */ - type?: ej.datavisualization.Chart.SelectionType | string; - - /** Specifies whether the series or data point has to be selected. - * @Default {series. See Mode} - */ - mode?: ej.datavisualization.Chart.Mode | string; - - /** Specifies the drawn rectangle type. - * @Default {xy} - */ - rangeType?: ej.datavisualization.Chart.RangeType | string; - - /** Color of the series/point on selection. - */ - color?: string; - - /** Opacity of the series/point on selection. - * @Default {0.6} - */ - opacity?: number; - - /** Options for customizing the border of the series on selection. - */ - border?: CommonSeriesOptionsSelectionSettingsBorder; - - /** Specifies the pattern for the series/point on selection. - * @Default {none. See Pattern} - */ - pattern?: string; - - /** Custom pattern for the series on selection. - */ - customPattern?: string; - } - - export interface CommonSeriesOptions { - - /** Options to customize the border of all the series. - */ - border?: CommonSeriesOptionsBorder; - - /** To render the column and bar type series in rectangle/cylinder shape. See ColumnFacet - * @Default {rectangle} - */ - columnFacet?: ej.datavisualization.Chart.ColumnFacet | string; - - /** Relative width of the columns in column type series. Value ranges from 0 to 1. Width also depends upon columnSpacing property. - * @Default {0.7} - */ - columnWidth?: number; - - /** Spacing between columns of different series. Value ranges from 0 to 1 - * @Default {0} - */ - columnSpacing?: number; - - /** Enables or disables the visibility of legend item. - * @Default {visible} - */ - visibleOnLegend?: string; - - /** Group of the stacking collection series. - */ - stackingGroup?: string; - - /** Pattern of dashes and gaps used to stroke all the line type series. - */ - dashArray?: string; - - /** Set the dataSource for all series. It can be an array of JSON objects or an instance of ej.DataManager. - * @Default {null} - */ - dataSource?: any; - - /** Controls the size of the hole in doughnut series. Value ranges from 0 to 1 - * @Default {0.4} - */ - doughnutCoefficient?: number; - - /** Controls the size of the doughnut series. Value ranges from 0 to 1. - * @Default {0.8} - */ - doughnutSize?: number; - - /** Specifies the type of series to be drawn in radar or polar series. - * @Default {line. See DrawType} - */ - drawType?: ej.datavisualization.Chart.DrawType | string; - - /** Enable/disable the animation for all the series. - * @Default {true} - */ - enableAnimation?: boolean; - - /** To avoid overlapping of data labels smartly. - * @Default {true} - */ - enableSmartLabels?: boolean; - - /** Start angle of pie/doughnut series. - * @Default {null} - */ - endAngle?: number; - - /** Explodes the pie/doughnut slices on mouse move. - * @Default {false} - */ - explode?: boolean; - - /** Explodes all the slice of pie/doughnut on render. - * @Default {false} - */ - explodeAll?: boolean; - - /** Index of the point to be exploded from pie/doughnut/pyramid/funnel. - * @Default {null} - */ - explodeIndex?: number; - - /** Specifies the distance of the slice from the center, when it is exploded. - * @Default {0.4} - */ - explodeOffset?: number; - - /** Fill color for all the series. - * @Default {null} - */ - fill?: string; - - /** Options for customizing the font of all the series. - */ - font?: CommonSeriesOptionsFont; - - /** Sets the height of the funnel in funnel series. Values can be either pixel or percentage. - * @Default {32.7%} - */ - funnelHeight?: string; - - /** Sets the width of the funnel in funnel series. Values can be either pixel or percentage. - * @Default {11.6%} - */ - funnelWidth?: string; - - /** Gap between the slices in pyramid and funnel series. - * @Default {0} - */ - gapRatio?: number; - - /** Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. - * @Default {true} - */ - isClosed?: boolean; - - /** Specifies whether to stack the column series in polar/radar charts. - * @Default {false} - */ - isStacking?: boolean; - - /** Renders the chart vertically. This is applicable only for Cartesian type series. - * @Default {false} - */ - isTransposed?: boolean; - - /** Render the x mark in the center of the box and whisker series type.x represents the average value of the box and whisker series. - * @Default {true} - */ - showMedian?: boolean; - - /** Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. - * @Default {inside. See LabelPosition} - */ - labelPosition?: ej.datavisualization.Chart.LabelPosition | string; - - /** Quartile calculation has been performed in three different formulas to render the box and whisker series. - * @Default {exclusive} - */ - boxPlotMode?: ej.datavisualization.Chart.boxPlotMode | string; - - /** Specifies the line cap of the series. - * @Default {butt. See LineCap} - */ - lineCap?: ej.datavisualization.Chart.LineCap | string; - - /** Specifies the type of shape to be used where two lines meet. - * @Default {round. See LineJoin} - */ - lineJoin?: ej.datavisualization.Chart.LineJoin | string; - - /** Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. - */ - marker?: CommonSeriesOptionsMarker; - - /** Opacity of the series. - * @Default {1} - */ - opacity?: number; - - /** Options for customizing the outlier of the series. - */ - outlierSettings?: CommonSeriesOptionsOutlierSettings; - - /** Name of a field in data source, where the fill color for all the data points is generated. - */ - palette?: string; - - /** Controls the size of pie series. Value ranges from 0 to 1. - * @Default {0.8} - */ - pieCoefficient?: number; - - /** Name of the property in the datasource that contains fill color for the series. - * @Default {null} - */ - pointColorMappingName?: string; - - /** Specifies the mode of the pyramid series. - * @Default {linear. See PyramidMode} - */ - pyramidMode?: ej.datavisualization.Chart.PyramidMode | string; - - /** Start angle from where the pie/doughnut series renders. By default it starts from 0. - * @Default {null} - */ - startAngle?: number; - - /** Options for customizing the corner radius. cornerRadius property also takes the numeric input and applies it for all the four corners of the column. - */ - cornerRadius?: CommonSeriesOptionsCornerRadius; - - /** Options for customizing the tooltip of chart. - */ - tooltip?: CommonSeriesOptionsTooltip; - - /** Specifies the type of the series to render in chart. - * @Default {column. See Type} - */ - type?: ej.datavisualization.Chart.Type | string; - - /** Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. - * @Default {null} - */ - xAxisName?: string; - - /** Name of the property in the datasource that contains x value for the series. - * @Default {null} - */ - xName?: string; - - /** Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. - * @Default {null} - */ - yAxisName?: string; - - /** Name of the property in the datasource that contains y value for the series. - * @Default {null} - */ - yName?: string; - - /** Name of the property in the datasource that contains high value for the series. - * @Default {null} - */ - high?: string; - - /** Name of the property in the datasource that contains low value for the series. - * @Default {null} - */ - low?: string; - - /** Name of the property in the datasource that contains open value for the series. - * @Default {null} - */ - open?: string; - - /** Name of the property in the datasource that contains close value for the series. - * @Default {null} - */ - close?: string; - - /** Z-order of the series. - * @Default {0} - */ - zOrder?: number; - - /** Name of the property in the datasource that contains the size value for the bubble series. - * @Default {null} - */ - size?: string; - - /** Options for customizing the empty point in the series. - */ - emptyPointSettings?: CommonSeriesOptionsEmptyPointSettings; - - /** Fill color for the positive column of the waterfall. - * @Default {null} - */ - positiveFill?: string; - - /** Options for customizing the waterfall connector line. - */ - connectorLine?: CommonSeriesOptionsConnectorLine; - - /** Options to customize the drag and drop in series. - */ - dragSettings?: CommonSeriesOptionsDragSettings; - - /** Options to customize the error bar in series. - */ - errorBar?: CommonSeriesOptionsErrorBar; - - /** Option to add the trendlines to chart. - */ - trendlines?: CommonSeriesOptionsTrendline[]; - - /** Options for customizing the appearance of the series or data point while highlighting. - */ - highlightSettings?: CommonSeriesOptionsHighlightSettings; - - /** Options for customizing the appearance of the series/data point on selection. - */ - selectionSettings?: CommonSeriesOptionsSelectionSettings; - } - - export interface CrosshairTrackballTooltipSettingsBorder { - - /** Border width of the trackball tooltip. - * @Default {null} - */ - width?: number; - - /** Border color of the trackball tooltip. - * @Default {null} - */ - color?: string; - } - - export interface CrosshairTrackballTooltipSettings { - - /** Options for customizing the trackball tooltip border. - */ - border?: CrosshairTrackballTooltipSettingsBorder; - - /** Background color of the trackball tooltip. - * @Default {null} - */ - fill?: string; - - /** Rounded corner x value of the trackball tooltip. - * @Default {3} - */ - rx?: number; - - /** Rounded corner y value of the trackball tooltip. - * @Default {3} - */ - ry?: number; - - /** Opacity value of the trackball tooltip. - * @Default {1} - */ - opacity?: number; - - /** Specifies the mode of the trackball tooltip. - * @Default {float. See CrosshairMode} - */ - mode?: ej.datavisualization.Chart.CrosshairMode | string; - } - - export interface CrosshairMarkerBorder { - - /** Border width of the marker. - * @Default {3} - */ - width?: number; - } - - export interface CrosshairMarkerSize { - - /** Height of the marker. - * @Default {10} - */ - height?: number; - - /** Width of the marker. - * @Default {10} - */ - width?: number; - } - - export interface CrosshairMarker { - - /** Options for customizing the border. - */ - border?: CrosshairMarkerBorder; - - /** Opacity of the marker. - * @Default {true} - */ - opacity?: boolean; - - /** Options for customizing the size of the marker. - */ - size?: CrosshairMarkerSize; - - /** Show/hides the marker. - * @Default {true} - */ - visible?: boolean; - } - - export interface CrosshairLine { - - /** Color of the crosshair line. - * @Default {transparent} - */ - color?: string; - - /** Width of the crosshair line. - * @Default {1} - */ - width?: number; - } - - export interface Crosshair { - - /** Options for customizing the trackball tooltip. - */ - trackballTooltipSettings?: CrosshairTrackballTooltipSettings; - - /** Options for customizing the marker in crosshair. - */ - marker?: CrosshairMarker; - - /** Options for customizing the crosshair line. - */ - line?: CrosshairLine; - - /** Specifies the type of the crosshair. It can be trackball or crosshair - * @Default {crosshair. See CrosshairType} - */ - type?: ej.datavisualization.Chart.CrosshairType | string; - - /** Show/hides the crosshair/trackball visibility. - * @Default {false} - */ - visible?: boolean; - } - - export interface IndicatorsHistogramBorder { - - /** Color of the histogram border in MACD indicator. - * @Default {#9999ff} - */ - color?: string; - - /** Controls the width of histogram border line in MACD indicator. - * @Default {1} - */ - width?: number; - } - - export interface IndicatorsHistogram { - - /** Options to customize the histogram border in MACD indicator. - */ - border?: IndicatorsHistogramBorder; - - /** Color of histogram columns in MACD indicator. - * @Default {#ccccff} - */ - fill?: string; - - /** Opacity of histogram columns in MACD indicator. - * @Default {1} - */ - opacity?: number; - } - - export interface IndicatorsLowerLine { - - /** Color of lower line. - * @Default {#008000} - */ - fill?: string; - - /** Width of the lower line. - * @Default {2} - */ - width?: number; - } - - export interface IndicatorsMacdLine { - - /** Color of MACD line. - * @Default {#ff9933} - */ - fill?: string; - - /** Width of the MACD line. - * @Default {2} - */ - width?: number; - } - - export interface IndicatorsPeriodLine { - - /** Color of period line in indicator. - * @Default {blue} - */ - fill?: string; - - /** Width of the period line in indicators. - * @Default {2} - */ - width?: number; - } - - export interface IndicatorsTooltipBorder { - - /** Border color of indicator tooltip. - * @Default {null} - */ - color?: string; - - /** Border width of indicator tooltip. - * @Default {1} - */ - width?: number; - } - - export interface IndicatorsTooltip { - - /** Option to customize the border of indicator tooltip. - */ - border?: IndicatorsTooltipBorder; - - /** Specifies the animation duration of indicator tooltip. - * @Default {500ms} - */ - duration?: string; - - /** Enables/disables the tooltip animation. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Format of indicator tooltip. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. - * @Default {#point.x# : #point.y#} - */ - format?: string; - - /** Background color of indicator tooltip. - * @Default {null} - */ - fill?: string; - - /** Opacity of indicator tooltip. - * @Default {0.95} - */ - opacity?: number; - - /** Controls the visibility of indicator tooltip. - * @Default {false} - */ - visible?: boolean; - } - - export interface IndicatorsUpperLine { - - /** Fill color of the upper line in indicators - * @Default {#ff9933} - */ - fill?: string; - - /** Width of the upper line in indicators. - * @Default {2} - */ - width?: number; - } - - export interface Indicator { - - /** The dPeriod value for stochastic indicator. - * @Default {3} - */ - dPeriod?: number; - - /** Enables/disables the animation. - * @Default {false} - */ - enableAnimation?: boolean; - - /** Color of the technical indicator. - * @Default {#00008B} - */ - fill?: string; - - /** Options to customize the histogram in MACD indicator. - */ - histogram?: IndicatorsHistogram; - - /** Specifies the k period in stochastic indicator. - * @Default {3} - */ - kPeriod?: number; - - /** Specifies the long period in MACD indicator. - * @Default {26} - */ - longPeriod?: number; - - /** Options to customize the lower line in indicators. - */ - lowerLine?: IndicatorsLowerLine; - - /** Options to customize the MACD line. - */ - macdLine?: IndicatorsMacdLine; - - /** Specifies the type of the MACD indicator. - * @Default {line. See MACDType} - */ - macdType?: string; - - /** Specifies period value in indicator. - * @Default {14} - */ - period?: number; - - /** Options to customize the period line in indicators. - */ - periodLine?: IndicatorsPeriodLine; - - /** Name of the series for which indicator has to be drawn. - */ - seriesName?: string; - - /** Specifies the short period in MACD indicator. - * @Default {13} - */ - shortPeriod?: number; - - /** Specifies the standard deviation value for Bollinger band indicator. - * @Default {2} - */ - standardDeviations?: number; - - /** Options to customize the tooltip. - */ - tooltip?: IndicatorsTooltip; - - /** Trigger value of MACD indicator. - * @Default {9} - */ - trigger?: number; - - /** Specifies the visibility of indicator. - * @Default {visible} - */ - visibility?: string; - - /** Specifies the type of indicator that has to be rendered. - * @Default {sma. See IndicatorsType} - */ - type?: string; - - /** Options to customize the upper line in indicators - */ - upperLine?: IndicatorsUpperLine; - - /** Width of the indicator line. - * @Default {2} - */ - width?: number; - - /** Name of the horizontal axis used for indicator. Primary X axis is used when x axis name is not specified. - */ - xAxisName?: string; - - /** Name of the vertical axis used for indicator. Primary Y axis is used when y axis name is not specified - */ - yAxisName?: string; - } - - export interface LegendBorder { - - /** Border color of the legend. - * @Default {transparent} - */ - color?: string; - - /** Border width of the legend. - * @Default {1} - */ - width?: number; - } - - export interface LegendFont { - - /** Font family for legend item text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for legend item text. - * @Default {Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight for legend item text. - * @Default {Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Font size for legend item text. - * @Default {12px} - */ - size?: string; - } - - export interface LegendItemStyleBorder { - - /** Border color of the legend items. - * @Default {transparent} - */ - color?: string; - - /** Border width of the legend items. - * @Default {1} - */ - width?: number; - } - - export interface LegendItemStyle { - - /** Options for customizing the border of legend items. - */ - border?: LegendItemStyleBorder; - - /** Height of the shape in legend items. - * @Default {10} - */ - height?: number; - - /** Width of the shape in legend items. - * @Default {10} - */ - width?: number; - } - - export interface LegendLocation { - - /** X value or horizontal offset to position the legend in chart. - * @Default {0} - */ - x?: number; - - /** Y value or vertical offset to position the legend. - * @Default {0} - */ - y?: number; - } - - export interface LegendSize { - - /** Height of the legend. Height can be specified in either pixel or percentage. - * @Default {null} - */ - height?: string; - - /** Width of the legend. Width can be specified in either pixel or percentage. - * @Default {null} - */ - width?: string; - } - - export interface LegendTitleFont { - - /** Font family for the text in legend title. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for legend title. - * @Default {normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight for legend title. - * @Default {normal. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Font size for legend title. - * @Default {12px} - */ - size?: string; - } - - export interface LegendTitle { - - /** Options to customize the font used for legend title - */ - font?: LegendTitleFont; - - /** Text to be displayed in legend title. - */ - text?: string; - - /** Alignment of the legend title. - * @Default {center. See Alignment} - */ - textAlignment?: ej.datavisualization.Chart.Alignment | string; - } - - export interface Legend { - - /** Horizontal alignment of the legend. - * @Default {Center. See Alignment} - */ - alignment?: ej.datavisualization.Chart.Alignment | string; - - /** Background for the legend. Use this property to add a background image or background color for the legend. - */ - background?: string; - - /** Options for customizing the legend border. - */ - border?: LegendBorder; - - /** Number of columns to arrange the legend items. - * @Default {null} - */ - columnCount?: number; - - /** Controls whether legend has to use scrollbar or not. When enabled, scroll bar appears depending upon size and position properties of legend. - * @Default {true} - */ - enableScrollbar?: boolean; - - /** Fill color for the legend items. By using this property, it displays all legend item shapes in same color.Legend items representing invisible series is displayed in gray color. - * @Default {null} - */ - fill?: string; - - /** Options to customize the font used for legend item text. - */ - font?: LegendFont; - - /** Gap or padding between the legend items. - * @Default {10} - */ - itemPadding?: number; - - /** Options to customize the style of legend items. - */ - itemStyle?: LegendItemStyle; - - /** Options to customize the location of chart legend. Legend is placed in provided location only when value of position property is custom - */ - location?: LegendLocation; - - /** Opacity of the legend. - * @Default {1} - */ - opacity?: number; - - /** Places the legend at specified position. Legend can be placed at left, right, top or bottom of the chart area.To manually specify the location of legend, set custom as value to this property. - * @Default {Bottom. See Position} - */ - position?: ej.datavisualization.Chart.Position | string; - - /** Number of rows to arrange the legend items. - * @Default {null} - */ - rowCount?: number; - - /** Shape of the legend items. Default shape for pie and doughnut series is circle and all other series uses rectangle. - * @Default {None. See Shape} - */ - shape?: ej.datavisualization.Chart.Shape | string; - - /** Options to customize the size of the legend. - */ - size?: LegendSize; - - /** Options to customize the legend title. - */ - title?: LegendTitle; - - /** Specifies the action taken when the legend width is more than the textWidth. - * @Default {none. See textOverflow} - */ - textOverflow?: ej.datavisualization.Chart.TextOverflow | string; - - /** Text width for legend item. - * @Default {34} - */ - textWidth?: number; - - /** Controls the visibility of the legend. - * @Default {true} - */ - visible?: boolean; - } - - export interface PrimaryXAxisAlternateGridBandEven { - - /** Fill color for the even grid bands. - * @Default {transparent} - */ - fill?: string; - - /** Opacity of the even grid band. - * @Default {1} - */ - opacity?: number; - } - - export interface PrimaryXAxisAlternateGridBandOdd { - - /** Fill color of the odd grid bands - * @Default {transparent} - */ - fill?: string; - - /** Opacity of odd grid band - * @Default {1} - */ - opacity?: number; - } - - export interface PrimaryXAxisAlternateGridBand { - - /** Options for customizing even grid band. - */ - even?: PrimaryXAxisAlternateGridBandEven; - - /** Options for customizing odd grid band. - */ - odd?: PrimaryXAxisAlternateGridBandOdd; - } - - export interface PrimaryXAxisAxisLine { - - /** Pattern of dashes and gaps to be applied to the axis line. - * @Default {null} - */ - dashArray?: string; - - /** Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. - * @Default {null} - */ - offset?: number; - - /** Show/hides the axis line. - * @Default {true} - */ - visible?: boolean; - - /** Default Value - */ - color?: string; - - /** Width of axis line. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryXAxisCrosshairLabel { - - /** Show/hides the crosshair label associated with this axis. - * @Default {false} - */ - visible?: boolean; - } - - export interface PrimaryXAxisFont { - - /** Font family of labels. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of labels. - * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the label. - * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the axis labels. - * @Default {1} - */ - opacity?: number; - - /** Font size of the axis labels. - * @Default {13px} - */ - size?: string; - } - - export interface PrimaryXAxisMajorGridLines { - - /** Pattern of dashes and gaps used to stroke the major grid lines. - * @Default {null} - */ - dashArray?: string; - - /** Color of the major grid line. - * @Default {null} - */ - color?: string; - - /** Opacity of major grid lines. - * @Default {1} - */ - opacity?: number; - - /** Show/hides the major grid lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the major grid lines. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryXAxisMajorTickLines { - - /** Length of the major tick lines. - * @Default {5} - */ - size?: number; - - /** Show/hides the major tick lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the major tick lines. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryXAxisMinorGridLines { - - /** Patterns of dashes and gaps used to stroke the minor grid lines. - * @Default {null} - */ - dashArray?: string; - - /** Show/hides the minor grid lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the minorGridLines. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryXAxisMinorTickLines { - - /** Length of the minor tick lines. - * @Default {5} - */ - size?: number; - - /** Show/hides the minor tick lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the minor tick line. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryXAxisRange { - - /** Minimum value of the axis range. - * @Default {null} - */ - min?: number; - - /** Maximum value of the axis range. - * @Default {null} - */ - max?: number; - - /** Interval of the axis range. - * @Default {null} - */ - interval?: number; - } - - export interface PrimaryXAxisMultiLevelLabelsFont { - - /** Font color of the multi level labels text. - * @Default {null} - */ - color?: string; - - /** Font family of the multi level labels text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the multi level labels text. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the multi level label text. - * @Default {regular} - */ - fontWeight?: string; - - /** Opacity of the multi level label text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the multi level label text. - * @Default {12px} - */ - size?: string; - } - - export interface PrimaryXAxisMultiLevelLabelsBorder { - - /** Border color of the multi level labels. - * @Default {null} - */ - color?: string; - - /** Border width of the multi level labels. - * @Default {1} - */ - width?: number; - - /** Border type of the multi level labels. - * @Default {rectangle. See Type} - */ - type?: ej.datavisualization.Chart.MultiLevelLabelsBorderType | string; - } - - export interface PrimaryXAxisMultiLevelLabel { - - /** Visibility of the multi level labels. - * @Default {false} - */ - visible?: boolean; - - /** Text of the multi level labels. - */ - text?: string; - - /** Starting value of the multi level labels. - * @Default {null} - */ - start?: number; - - /** Ending value of the multi level labels. - * @Default {null} - */ - end?: number; - - /** Specifies the level of multi level labels. - * @Default {0} - */ - level?: number; - - /** Specifies the maximum width of the text in multi level labels. - * @Default {null} - */ - maximumTextWidth?: number; - - /** Specifies the alignment of the text in multi level labels. - * @Default {center. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Chart.TextAlignment | string; - - /** Specifies the handling of text over flow in multi level labels. - * @Default {center. See TextOverflow} - */ - textOverflow?: ej.datavisualization.Chart.TextOverflow | string; - - /** Options for customizing the font of the text. - */ - font?: PrimaryXAxisMultiLevelLabelsFont; - - /** Options for customizing the border of the series. - */ - border?: PrimaryXAxisMultiLevelLabelsBorder; - } - - export interface PrimaryXAxisStripLineFont { - - /** Font color of the strip line text. - * @Default {black} - */ - color?: string; - - /** Font family of the strip line text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the strip line text. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the strip line text. - * @Default {regular} - */ - fontWeight?: string; - - /** Opacity of the strip line text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the strip line text. - * @Default {12px} - */ - size?: string; - } - - export interface PrimaryXAxisStripLine { - - /** Border color of the strip line. - * @Default {gray} - */ - borderColor?: string; - - /** Background color of the strip line. - * @Default {gray} - */ - color?: string; - - /** End value of the strip line. - * @Default {null} - */ - end?: number; - - /** Options for customizing the font of the text. - */ - font?: PrimaryXAxisStripLineFont; - - /** Start value of the strip line. - * @Default {null} - */ - start?: number; - - /** Indicates whether to render the strip line from the minimum/start value of the axis. This property does not work when start property is set. - * @Default {false} - */ - startFromAxis?: boolean; - - /** Specifies text to be displayed inside the strip line. - * @Default {stripLine} - */ - text?: string; - - /** Specifies the alignment of the text inside the strip line. - * @Default {middlecenter. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Chart.TextAlignment | string; - - /** Show/hides the strip line. - * @Default {false} - */ - visible?: boolean; - - /** Width of the strip line. - * @Default {0} - */ - width?: number; - - /** Specifies the order where the strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered - * under the series and when it is “over”, it is rendered above the series. - * @Default {over. See ZIndex} - */ - zIndex?: ej.datavisualization.Chart.ZIndex | string; - } - - export interface PrimaryXAxisLabelBorder { - - /** Specifies the color of the label border. - * @Default {null} - */ - color?: string; - - /** Specifies the width of the label border. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryXAxisTitleFont { - - /** Font family of the title text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the title text. - * @Default {ej.datavisualization.Chart.FontStyle.Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the title text. - * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the axis title text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the axis title. - * @Default {16px} - */ - size?: string; - } - - export interface PrimaryXAxisTitle { - - /** Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. - * @Default {false} - */ - enableTrim?: boolean; - - /** Options for customizing the title font. - */ - font?: PrimaryXAxisTitleFont; - - /** Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. - * @Default {34} - */ - maximumTitleWidth?: number; - - /** Title for the axis. - */ - text?: string; - - /** Controls the visibility of axis title. - * @Default {true} - */ - visible?: boolean; - - /** offset value for axis title. - * @Default {0} - */ - offset?: number; - - /** Specifies the position of the axis title. - * @Default {outside. See Position} - */ - position?: ej.datavisualization.Chart.LabelPosition | string; - - /** Specifies the position of the axis title. - * @Default {center. See Alignment} - */ - alignment?: ej.datavisualization.Chart.TextAlignment | string; - } - - export interface PrimaryXAxis { - - /** Options for customizing horizontal axis alternate grid band. - */ - alternateGridBand?: PrimaryXAxisAlternateGridBand; - - /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. - * If provided value is greater than the maximum value of crossing axis, then axis will be placed at the opposite side. - * @Default {null} - */ - crossesAt?: number; - - /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. - * If the provided name does not belongs to a valid axis, then primary X axis or primary Y axis will be used for crossing - * @Default {null} - */ - crossesInAxis?: string; - - /** Category axis can also plot points based on index value of data points. Index based plotting can be enabled by setting ‘isIndexed’ property to true. - * @Default {false} - */ - isIndexed?: boolean; - - /** Options for customizing the axis line. - */ - axisLine?: PrimaryXAxisAxisLine; - - /** Specifies the index of the column where the axis is associated, when the chart area is divided into multiple plot areas by using columnDefinitions. - * @Default {null} - */ - columnIndex?: number; - - /** Specifies the number of columns or plot areas an axis has to span horizontally. - * @Default {null} - */ - columnSpan?: number; - - /** Options to customize the crosshair label. - */ - crosshairLabel?: PrimaryXAxisCrosshairLabel; - - /** With this setting, you can request axis to calculate intervals approximately equal to your desired interval. - * @Default {null} - */ - desiredIntervals?: number; - - /** Specifies the placement of labels. - * @Default {ej.datavisualization.Chart.LabelPlacement.BetweenTicks. See LabelPlacement} - */ - labelPlacement?: ej.datavisualization.Chart.LabelPlacement | string; - - /** Specifies the position of labels at the edge of the axis. - * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} - */ - edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement | string; - - /** Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. - * @Default {false} - */ - enableTrim?: boolean; - - /** Options for customizing the font of the axis Labels. - */ - font?: PrimaryXAxisFont; - - /** Specifies the type of interval in date time axis. - * @Default {null. See IntervalType} - */ - intervalType?: ej.datavisualization.Chart.IntervalType | string; - - /** Specifies whether to inverse the axis. - * @Default {false} - */ - isInversed?: boolean; - - /** Custom formatting for axis label and supports all standard formatting type of numerical and date time values. - * @Default {null} - */ - labelFormat?: string; - - /** Specifies the action to take when the axis labels are overlapping with each other. - * @Default {ej.datavisualization.Chart.LabelIntersectAction.None. See LabelIntersectAction} - */ - labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction | string; - - /** Specifies the position of the axis labels. - * @Default {outside. See LabelPosition} - */ - labelPosition?: ej.datavisualization.Chart.LabelPosition | string; - - /** Specifies the position of the axis labels. - * @Default {center. See Alignment} - */ - alignment?: ej.datavisualization.Chart.LabelAlignment | string; - - /** Angle in degrees to rotate the axis labels. - * @Default {null} - */ - labelRotation?: number; - - /** Logarithmic base value. This is applicable only for logarithmic axis. - * @Default {10} - */ - logBase?: number; - - /** Options for customizing major gird lines. - */ - majorGridLines?: PrimaryXAxisMajorGridLines; - - /** Options for customizing the major tick lines. - */ - majorTickLines?: PrimaryXAxisMajorTickLines; - - /** Maximum number of labels to be displayed in every 100 pixels. - * @Default {3} - */ - maximumLabels?: number; - - /** Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. - * @Default {34} - */ - maximumLabelWidth?: number; - - /** Options for customizing the minor grid lines. - */ - minorGridLines?: PrimaryXAxisMinorGridLines; - - /** Options for customizing the minor tick lines. - */ - minorTickLines?: PrimaryXAxisMinorTickLines; - - /** Specifies the number of minor ticks per interval. - * @Default {null} - */ - minorTicksPerInterval?: number; - - /** Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. - * @Default {null} - */ - name?: string; - - /** Specifies whether to render the axis at the opposite side of its default position. - * @Default {false} - */ - opposedPosition?: boolean; - - /** Specifies the padding for the plot area. - * @Default {10} - */ - plotOffset?: number; - - /** Options to customize the range of the axis. - */ - range?: PrimaryXAxisRange; - - /** Specifies the padding for the axis range. - * @Default {None. See RangePadding} - */ - rangePadding?: ej.datavisualization.Chart.RangePadding | string; - - /** Rounds the number to the given number of decimals. - * @Default {null} - */ - roundingPlaces?: number; - - /** Options for customizing the multi level labels. - * @Default {[ ]} - */ - multiLevelLabels?: PrimaryXAxisMultiLevelLabel[]; - - /** Options for customizing the strip lines. - * @Default {[ ]} - */ - stripLine?: PrimaryXAxisStripLine[]; - - /** Specifies the position of the axis tick lines. - * @Default {outside. See TickLinesPosition} - */ - tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition | string; - - /** Options for customizing the border of the labels. - */ - labelBorder?: PrimaryXAxisLabelBorder; - - /** Options for customizing the axis title. - */ - title?: PrimaryXAxisTitle; - - /** Specifies the type of data the axis is handling. - * @Default {null. See ValueType} - */ - valueType?: ej.datavisualization.Chart.ValueType | string; - - /** Show/hides the axis. - * @Default {true} - */ - visible?: boolean; - - /** The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Value ranges from 0 to 1. - * @Default {1} - */ - zoomFactor?: number; - - /** Position of the zoomed axis. Value ranges from 0 to 1. - * @Default {0} - */ - zoomPosition?: number; - } - - export interface AxesAlternateGridBandEven { - - /** Fill color for the even grid bands. - * @Default {transparent} - */ - fill?: string; - - /** Opacity of the even grid band. - * @Default {1} - */ - opacity?: number; - } - - export interface AxesAlternateGridBandOdd { - - /** Fill color of the odd grid bands - * @Default {transparent} - */ - fill?: string; - - /** Opacity of odd grid band - * @Default {1} - */ - opacity?: number; - } - - export interface AxesAlternateGridBand { - - /** Options for customizing even grid band. - */ - even?: AxesAlternateGridBandEven; - - /** Options for customizing odd grid band. - */ - odd?: AxesAlternateGridBandOdd; - } - - export interface AxesAxisLine { - - /** Pattern of dashes and gaps to be applied to the axis line. - * @Default {null} - */ - dashArray?: string; - - /** Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. - * @Default {null} - */ - offset?: number; - - /** Show/hides the axis line. - * @Default {true} - */ - visible?: boolean; - - /** Color of axis line. - */ - color?: string; - - /** Width of axis line. - * @Default {1} - */ - width?: number; - } - - export interface AxesCrosshairLabel { - - /** Show/hides the crosshair label associated with this axis. - * @Default {false} - */ - visible?: boolean; - } - - export interface AxesFont { - - /** Font family of labels. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of labels. - * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the label. - * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the axis labels. - * @Default {1} - */ - opacity?: number; - - /** Font size of the axis labels. - * @Default {13px} - */ - size?: string; - } - - export interface AxesMajorGridLines { - - /** Pattern of dashes and gaps used to stroke the major grid lines. - * @Default {null} - */ - dashArray?: string; - - /** Color of the major grid line. - * @Default {null} - */ - color?: string; - - /** Opacity of major grid lines. - * @Default {1} - */ - opacity?: number; - - /** Show/hides the major grid lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the major grid lines. - * @Default {1} - */ - width?: number; - } - - export interface AxesMajorTickLines { - - /** Length of the major tick lines. - * @Default {5} - */ - size?: number; - - /** Show/hides the major tick lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the major tick lines. - * @Default {1} - */ - width?: number; - } - - export interface AxesMinorGridLines { - - /** Patterns of dashes and gaps used to stroke the minor grid lines. - * @Default {null} - */ - dashArray?: string; - - /** Show/hides the minor grid lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the minorGridLines. - * @Default {1} - */ - width?: number; - } - - export interface AxesMinorTickLines { - - /** Length of the minor tick lines. - * @Default {5} - */ - size?: number; - - /** Show/hides the minor tick lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the minor tick line. - * @Default {1} - */ - width?: number; - } - - export interface AxesRange { - - /** Minimum value of the axis range. - * @Default {null} - */ - min?: number; - - /** Maximum value of the axis range. - * @Default {null} - */ - max?: number; - - /** Interval of the axis range. - * @Default {null} - */ - interval?: number; - } - - export interface AxesMultiLevelLabelsFont { - - /** Font color of the multi level labels text. - * @Default {null} - */ - color?: string; - - /** Font family of the multi level labels text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the multi level labels text. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the multi level label text. - * @Default {regular} - */ - fontWeight?: string; - - /** Opacity of the multi level label text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the multi level label text. - * @Default {12px} - */ - size?: string; - } - - export interface AxesMultiLevelLabelsBorder { - - /** Border color of the multi level labels. - * @Default {null} - */ - color?: string; - - /** Border width of the multi level labels. - * @Default {1} - */ - width?: number; - - /** Border type of the multi level labels. - * @Default {rectangle. See Type} - */ - type?: ej.datavisualization.Chart.MultiLevelLabelsBorderType | string; - } - - export interface AxesMultiLevelLabel { - - /** Visibility of the multi level labels. - * @Default {false} - */ - visible?: boolean; - - /** Text of the multi level labels. - */ - text?: string; - - /** Starting value of the multi level labels. - * @Default {null} - */ - start?: number; - - /** Ending value of the multi level labels. - * @Default {null} - */ - end?: number; - - /** Specifies the level of multi level labels. - * @Default {0} - */ - level?: number; - - /** Specifies the maximum width of the text in multi level labels. - * @Default {null} - */ - maximumTextWidth?: number; - - /** Specifies the alignment of the text in multi level labels. - * @Default {center. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Chart.TextAlignment | string; - - /** Specifies the handling of text over flow in multi level labels. - * @Default {center. See TextOverflow} - */ - textOverflow?: ej.datavisualization.Chart.TextOverflow | string; - - /** Options for customizing the font of the text. - */ - font?: AxesMultiLevelLabelsFont; - - /** Options for customizing the border of the series. - */ - border?: AxesMultiLevelLabelsBorder; - } - - export interface AxesStripLineFont { - - /** Font color of the strip line text. - * @Default {black} - */ - color?: string; - - /** Font family of the strip line text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the strip line text. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the strip line text. - * @Default {regular} - */ - fontWeight?: string; - - /** Opacity of the strip line text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the strip line text. - * @Default {12px} - */ - size?: string; - } - - export interface AxesStripLine { - - /** Border color of the strip line. - * @Default {gray} - */ - borderColor?: string; - - /** Background color of the strip line. - * @Default {gray} - */ - color?: string; - - /** End value of the strip line. - * @Default {null} - */ - end?: number; - - /** Options for customizing the font of the text. - */ - font?: AxesStripLineFont; - - /** Start value of the strip line. - * @Default {null} - */ - start?: number; - - /** Indicates whether to render the strip line from the minimum/start value of the axis. This property does not work when start property is set. - * @Default {false} - */ - startFromAxis?: boolean; - - /** Specifies text to be displayed inside the strip line. - * @Default {stripLine} - */ - text?: string; - - /** Specifies the alignment of the text inside the strip line. - * @Default {middlecenter. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Chart.TextAlignment | string; - - /** Show/hides the strip line. - * @Default {false} - */ - visible?: boolean; - - /** Width of the strip line. - * @Default {0} - */ - width?: number; - - /** Specifies the order where the strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered under the series and when it is “over”, - * it is rendered above the series. - * @Default {over. See ZIndex} - */ - zIndex?: ej.datavisualization.Chart.ZIndex | string; - } - - export interface AxesLabelBorder { - - /** Specifies the color of the label border. - * @Default {null} - */ - color?: string; - - /** Specifies the width of the label border. - * @Default {1} - */ - width?: number; - } - - export interface AxesTitleFont { - - /** Font family of the title text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the title text. - * @Default {ej.datavisualization.Chart.FontStyle.Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the title text. - * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the axis title text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the axis title. - * @Default {16px} - */ - size?: string; - } - - export interface AxesTitle { - - /** Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. - * @Default {false} - */ - enableTrim?: boolean; - - /** Options for customizing the title font. - */ - font?: AxesTitleFont; - - /** Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. - * @Default {34} - */ - maximumTitleWidth?: number; - - /** Title for the axis. - */ - text?: string; - - /** Controls the visibility of axis title. - * @Default {true} - */ - visible?: boolean; - - /** offset value for axis title. - * @Default {0} - */ - offset?: number; - - /** Specifies the position of the axis title. - * @Default {outside. See Position} - */ - position?: ej.datavisualization.Chart.LabelPosition | string; - - /** Specifies the position of the axis title. - * @Default {center. See Alignment} - */ - alignment?: ej.datavisualization.Chart.TextAlignment | string; - } - - export interface Axis { - - /** Options for customizing axis alternate grid band. - */ - alternateGridBand?: AxesAlternateGridBand; - - /** Specifies where axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum value of crossing axis, - * then axis will be placed at the opposite side. - * @Default {null} - */ - crossesAt?: number; - - /** Category axis can also plot points based on index value of data points. Index based plotting can be enabled by setting ‘isIndexed’ property to true. - * @Default {false} - */ - isIndexed?: boolean; - - /** Options for customizing the axis line. - */ - axisLine?: AxesAxisLine; - - /** Specifies the index of the column where the axis is associated, when the chart area is divided into multiple plot areas by using columnDefinitions. - * @Default {null} - */ - columnIndex?: number; - - /** Specifies the number of columns or plot areas an axis has to span horizontally. - * @Default {null} - */ - columnSpan?: number; - - /** Options to customize the crosshair label. - */ - crosshairLabel?: AxesCrosshairLabel; - - /** With this setting, you can request axis to calculate intervals approximately equal to your desired interval. - * @Default {null} - */ - desiredIntervals?: number; - - /** Specifies the placement of labels. - * @Default {ej.datavisualization.Chart.LabelPlacement.BetweenTicks. See LabelPlacement} - */ - labelPlacement?: ej.datavisualization.Chart.LabelPlacement | string; - - /** Specifies the position of labels at the edge of the axis. - * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} - */ - edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement | string; - - /** Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. - * @Default {false} - */ - enableTrim?: boolean; - - /** Options for customizing the font of the axis Labels. - */ - font?: AxesFont; - - /** Specifies the type of interval in date time axis. - * @Default {null. See IntervalType} - */ - intervalType?: ej.datavisualization.Chart.IntervalType | string; - - /** Specifies whether to inverse the axis. - * @Default {false} - */ - isInversed?: boolean; - - /** Custom formatting for axis label and supports all standard formatting type of numerical and date time values. - * @Default {null} - */ - labelFormat?: string; - - /** Specifies the action to take when the axis labels are overlapping with each other. - * @Default {ej.datavisualization.Chart.LabelIntersectAction.None. See LabelIntersectAction} - */ - labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction | string; - - /** Specifies the position of the axis labels. - * @Default {outside. See LabelPosition} - */ - labelPosition?: ej.datavisualization.Chart.LabelPosition | string; - - /** Specifies the position of the axis labels. - * @Default {center. See Alignment} - */ - alignment?: ej.datavisualization.Chart.LabelAlignment | string; - - /** Angle in degrees to rotate the axis labels. - * @Default {null} - */ - labelRotation?: number; - - /** Logarithmic base value. This is applicable only for logarithmic axis. - * @Default {10} - */ - logBase?: number; - - /** Options for customizing major gird lines. - */ - majorGridLines?: AxesMajorGridLines; - - /** Options for customizing the major tick lines. - */ - majorTickLines?: AxesMajorTickLines; - - /** Maximum number of labels to be displayed in every 100 pixels. - * @Default {3} - */ - maximumLabels?: number; - - /** Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. - * @Default {34} - */ - maximumLabelWidth?: number; - - /** Options for customizing the minor grid lines. - */ - minorGridLines?: AxesMinorGridLines; - - /** Options for customizing the minor tick lines. - */ - minorTickLines?: AxesMinorTickLines; - - /** Specifies the number of minor ticks per interval. - * @Default {null} - */ - minorTicksPerInterval?: number; - - /** Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. - * @Default {null} - */ - name?: string; - - /** Specifies whether to render the axis at the opposite side of its default position. - * @Default {false} - */ - opposedPosition?: boolean; - - /** Specifies the padding for the plot area. - * @Default {10} - */ - plotOffset?: number; - - /** Options to customize the range of the axis. - */ - range?: AxesRange; - - /** Specifies the padding for the axis range. - * @Default {None. See RangePadding} - */ - rangePadding?: ej.datavisualization.Chart.RangePadding | string; - - /** Rounds the number to the given number of decimals. - * @Default {null} - */ - roundingPlaces?: number; - - /** Options for customizing the multi level labels. - * @Default {[ ]} - */ - multiLevelLabels?: AxesMultiLevelLabel[]; - - /** Options for customizing the strip lines. - * @Default {[ ]} - */ - stripLine?: AxesStripLine[]; - - /** Specifies the position of the axis tick lines. - * @Default {outside. See TickLinesPosition} - */ - tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition | string; - - /** Options for customizing the border of the labels. - */ - labelBorder?: AxesLabelBorder; - - /** Options for customizing the axis title. - */ - title?: AxesTitle; - - /** Specifies the type of data the axis is handling. - * @Default {null. See ValueType} - */ - valueType?: ej.datavisualization.Chart.ValueType | string; - - /** Show/hides the axis. - * @Default {true} - */ - visible?: boolean; - - /** The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Value ranges from 0 to 1. - * @Default {1} - */ - zoomFactor?: number; - - /** Position of the zoomed axis. Value ranges from 0 to 1. - * @Default {0} - */ - zoomPosition?: number; - } - - export interface PrimaryYAxisAlternateGridBandEven { - - /** Fill color for the even grid bands. - * @Default {transparent} - */ - fill?: string; - - /** Opacity of the even grid band. - * @Default {1} - */ - opacity?: number; - } - - export interface PrimaryYAxisAlternateGridBandOdd { - - /** Fill color of the odd grid bands. - * @Default {transparent} - */ - fill?: string; - - /** Opacity of odd grid band. - * @Default {1} - */ - opacity?: number; - } - - export interface PrimaryYAxisAlternateGridBand { - - /** Options for customizing even grid band. - */ - even?: PrimaryYAxisAlternateGridBandEven; - - /** Options for customizing odd grid band. - */ - odd?: PrimaryYAxisAlternateGridBandOdd; - } - - export interface PrimaryYAxisAxisLine { - - /** Pattern of dashes and gaps to be applied to the axis line. - * @Default {null} - */ - dashArray?: string; - - /** Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. - * @Default {null} - */ - offset?: number; - - /** Show/hides the axis line. - * @Default {true} - */ - visible?: boolean; - - /** Color of axis line. - */ - color?: string; - - /** Width of axis line. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryYAxisCrosshairLabel { - - /** Show/hides the crosshair label associated with this axis. - * @Default {false} - */ - visible?: boolean; - } - - export interface PrimaryYAxisFont { - - /** Font family of labels. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of labels. - * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the label. - * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the axis labels. - * @Default {1} - */ - opacity?: number; - - /** Font size of the axis labels. - * @Default {13px} - */ - size?: string; - } - - export interface PrimaryYAxisMajorGridLines { - - /** Pattern of dashes and gaps used to stroke the major grid lines. - * @Default {null} - */ - dashArray?: string; - - /** Color of the major grid lines. - * @Default {null} - */ - color?: string; - - /** Opacity of major grid lines. - * @Default {1} - */ - opacity?: number; - - /** Show/hides the major grid lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the major grid lines. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryYAxisMajorTickLines { - - /** Length of the major tick lines. - * @Default {5} - */ - size?: number; - - /** Show/hides the major tick lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the major tick lines. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryYAxisMinorGridLines { - - /** Patterns of dashes and gaps used to stroke the minor grid lines. - * @Default {null} - */ - dashArray?: string; - - /** Show/hides the minor grid lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the minorGridLines. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryYAxisMinorTickLines { - - /** Length of the minor tick lines. - * @Default {5} - */ - size?: number; - - /** Show/hides the minor tick lines. - * @Default {true} - */ - visible?: boolean; - - /** Width of the minor tick line - * @Default {1} - */ - width?: number; - } - - export interface PrimaryYAxisRange { - - /** Minimum value of the axis range. - * @Default {null} - */ - min?: number; - - /** Maximum value of the axis range. - * @Default {null} - */ - max?: number; - - /** Interval for the range. - * @Default {null} - */ - interval?: number; - } - - export interface PrimaryYAxisMultiLevelLabelsFont { - - /** Font color of the multi level labels text. - * @Default {null} - */ - color?: string; - - /** Font family of the multi level labels text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the multi level labels text. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the multi level label text. - * @Default {regular} - */ - fontWeight?: string; - - /** Opacity of the multi level label text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the multi level label text. - * @Default {12px} - */ - size?: string; - } - - export interface PrimaryYAxisMultiLevelLabelsBorder { - - /** Border color of the multi level labels. - * @Default {null} - */ - color?: string; - - /** Border width of the multi level labels. - * @Default {1} - */ - width?: number; - - /** Border type of the multi level labels. - * @Default {rectangle. See Type} - */ - type?: ej.datavisualization.Chart.MultiLevelLabelsBorderType | string; - } - - export interface PrimaryYAxisMultiLevelLabel { - - /** Visibility of the multi level labels. - * @Default {false} - */ - visible?: boolean; - - /** Text of the multi level labels. - */ - text?: string; - - /** Starting value of the multi level labels. - * @Default {null} - */ - start?: number; - - /** Ending value of the multi level labels. - * @Default {null} - */ - end?: number; - - /** Specifies the level of multi level labels. - * @Default {0} - */ - level?: number; - - /** Specifies the maximum width of the text in multi level labels. - * @Default {null} - */ - maximumTextWidth?: number; - - /** Specifies the alignment of the text in multi level labels. - * @Default {center. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Chart.TextAlignment | string; - - /** Specifies the handling of text over flow in multi level labels. - * @Default {center. See TextOverflow} - */ - textOverflow?: ej.datavisualization.Chart.TextOverflow | string; - - /** Options for customizing the font of the text. - */ - font?: PrimaryYAxisMultiLevelLabelsFont; - - /** Options for customizing the border of the series. - */ - border?: PrimaryYAxisMultiLevelLabelsBorder; - } - - export interface PrimaryYAxisStripLineFont { - - /** Font color of the strip line text. - * @Default {black} - */ - color?: string; - - /** Font family of the strip line text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the strip line text. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the strip line text. - * @Default {regular} - */ - fontWeight?: string; - - /** Opacity of the strip line text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the strip line text. - * @Default {12px} - */ - size?: string; - } - - export interface PrimaryYAxisStripLine { - - /** Border color of the strip line. - * @Default {gray} - */ - borderColor?: string; - - /** Background color of the strip line. - * @Default {gray} - */ - color?: string; - - /** End value of the strip line. - * @Default {null} - */ - end?: number; - - /** Options for customizing the font of the text. - */ - font?: PrimaryYAxisStripLineFont; - - /** Start value of the strip line. - * @Default {null} - */ - start?: number; - - /** Indicates whether to render the strip line from the minimum/start value of the axis. This property won’t work when start property is set. - * @Default {false} - */ - startFromAxis?: boolean; - - /** Specifies text to be displayed inside the strip line. - * @Default {stripLine} - */ - text?: string; - - /** Specifies the alignment of the text inside the strip line. - * @Default {middlecenter. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Chart.TextAlignment | string; - - /** Show/hides the strip line. - * @Default {false} - */ - visible?: boolean; - - /** Width of the strip line. - * @Default {0} - */ - width?: number; - - /** Specifies the order in which strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered below the series and - * when it is “over”, it is rendered above the series. - * @Default {over. See ZIndex} - */ - zIndex?: ej.datavisualization.Chart.ZIndex | string; - } - - export interface PrimaryYAxisLabelBorder { - - /** Specifies the color of the label border. - * @Default {null} - */ - color?: string; - - /** Specifies the width of the label border. - * @Default {1} - */ - width?: number; - } - - export interface PrimaryYAxisTitleFont { - - /** Font family of the title text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the title text. - * @Default {ej.datavisualization.Chart.FontStyle.Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the title text. - * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the axis title text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the axis title. - * @Default {16px} - */ - size?: string; - } - - export interface PrimaryYAxisTitle { - - /** Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. - * @Default {ej.datavisualization.Chart.enableTrim} - */ - enableTrim?: boolean; - - /** Options for customizing the title font. - */ - font?: PrimaryYAxisTitleFont; - - /** Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. - * @Default {ej.datavisualization.Chart.maximumTitleWidth.null} - */ - maximumTitleWidth?: number; - - /** Title for the axis. - */ - text?: string; - - /** Controls the visibility of axis title. - * @Default {true} - */ - visible?: boolean; - - /** offset value for axis title. - * @Default {0} - */ - offset?: number; - - /** Specifies the position of the axis title. - * @Default {outside. See Position} - */ - position?: ej.datavisualization.Chart.LabelPosition | string; - - /** Specifies the position of the axis title. - * @Default {center. See Alignment} - */ - alignment?: ej.datavisualization.Chart.TextAlignment | string; - } - - export interface PrimaryYAxis { - - /** Options for customizing vertical axis alternate grid band. - */ - alternateGridBand?: PrimaryYAxisAlternateGridBand; - - /** Options for customizing the axis line. - */ - axisLine?: PrimaryYAxisAxisLine; - - /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. - * If provided value is greater than the maximum value of crossing axis, then axis will be placed at the opposite side. - * @Default {null} - */ - crossesAt?: number; - - /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. If the provided name does not belongs to a valid axis, - * then primary X axis or primary Y axis will be used for crossing - * @Default {null} - */ - crossesInAxis?: string; - - /** Options to customize the crosshair label. - */ - crosshairLabel?: PrimaryYAxisCrosshairLabel; - - /** With this setting, you can request axis to calculate intervals approximately equal to your desired interval. - * @Default {null} - */ - desiredIntervals?: number; - - /** Specifies the placement of labels. - * @Default {ej.datavisualization.Chart.LabelPlacement.BetweenTicks. See LabelPlacement} - */ - labelPlacement?: ej.datavisualization.Chart.LabelPlacement | string; - - /** Specifies the position of labels at the edge of the axis. - * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} - */ - edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement | string; - - /** Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. - * @Default {false} - */ - enableTrim?: boolean; - - /** Options for customizing the font of the axis Labels. - */ - font?: PrimaryYAxisFont; - - /** Specifies the type of interval in date time axis. - * @Default {null. See IntervalType} - */ - intervalType?: ej.datavisualization.Chart.IntervalType | string; - - /** Specifies whether to inverse the axis. - * @Default {false} - */ - isInversed?: boolean; - - /** Custom formatting for axis label and supports all standard formatting type of numerical and date time values. - * @Default {null} - */ - labelFormat?: string; - - /** Specifies the action to take when the axis labels are overlapping with each other. - * @Default {ej.datavisualization.Chart.LabelIntersectAction.None} - */ - labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction | string; - - /** Specifies the position of the axis labels. - * @Default {outside. See LabelPosition} - */ - labelPosition?: ej.datavisualization.Chart.LabelPosition | string; - - /** Specifies the position of the axis labels. - * @Default {center. See Alignment} - */ - alignment?: ej.datavisualization.Chart.LabelAlignment | string; - - /** Logarithmic base value. This is applicable only for logarithmic axis. - * @Default {10} - */ - logBase?: number; - - /** Options for customizing major gird lines. - */ - majorGridLines?: PrimaryYAxisMajorGridLines; - - /** Options for customizing the major tick lines. - */ - majorTickLines?: PrimaryYAxisMajorTickLines; - - /** Maximum number of labels to be displayed in every 100 pixels. - * @Default {3} - */ - maximumLabels?: number; - - /** Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. - * @Default {ej.datavisualization.Chart.maximumLabelWidth type {int}} - */ - maximumLabelWidth?: number; - - /** Options for customizing the minor grid lines. - */ - minorGridLines?: PrimaryYAxisMinorGridLines; - - /** Options for customizing the minor tick lines. - */ - minorTickLines?: PrimaryYAxisMinorTickLines; - - /** Specifies the number of minor ticks per interval. - * @Default {null} - */ - minorTicksPerInterval?: number; - - /** Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. - * @Default {null} - */ - name?: string; - - /** Specifies whether to render the axis at the opposite side of its default position. - * @Default {false} - */ - opposedPosition?: boolean; - - /** Specifies the padding for the plot area. - * @Default {10} - */ - plotOffset?: number; - - /** Options to customize the range of the axis. - */ - range?: PrimaryYAxisRange; - - /** Specifies the padding for the axis range. - * @Default {ej.datavisualization.Chart.RangePadding.None. See RangePadding} - */ - rangePadding?: ej.datavisualization.Chart.RangePadding | string; - - /** Rounds the number to the given number of decimals. - * @Default {null} - */ - roundingPlaces?: number; - - /** Specifies the index of the row to which the axis is associated, when the chart area is divided into multiple plot areas by using rowDefinitions. - * @Default {null} - */ - rowIndex?: number; - - /** Specifies the number of row or plot areas an axis has to span vertically. - * @Default {null} - */ - rowSpan?: number; - - /** Options for customizing the multi level labels. - * @Default {[ ]} - */ - multiLevelLabels?: PrimaryYAxisMultiLevelLabel[]; - - /** Options for customizing the strip lines. - * @Default {[ ]} - */ - stripLine?: PrimaryYAxisStripLine[]; - - /** Specifies the position of the axis tick lines. - * @Default {outside. See TickLinesPosition} - */ - tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition | string; - - /** Options for customizing the border of the labels. - */ - labelBorder?: PrimaryYAxisLabelBorder; - - /** Options for customizing the axis title. - */ - title?: PrimaryYAxisTitle; - - /** Specifies the type of data the axis is handling. - * @Default {null. See ValueType} - */ - valueType?: ej.datavisualization.Chart.ValueType | string; - - /** Show/hides the axis. - * @Default {true} - */ - visible?: boolean; - - /** The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Values ranges from 0 to 1. - * @Default {1} - */ - zoomFactor?: number; - - /** Position of the zoomed axis. Value ranges from 0 to 1 - * @Default {0} - */ - zoomPosition?: number; - } - - export interface RowDefinition { - - /** Specifies the unit to measure the height of the row in plotting area. - * @Default {'pixel'. See Unit} - */ - unit?: ej.datavisualization.Chart.Unit | string; - - /** Height of the row in plotting area. Height is measured in either pixel or percentage based on the value of unit property. - * @Default {50} - */ - rowHeight?: number; - - /** Color of the line that indicates the starting point of the row in plotting area. - * @Default {transparent} - */ - lineColor?: string; - - /** Width of the line that indicates the starting point of the row in plot area. - * @Default {1} - */ - lineWidth?: number; - } - - export interface SeriesBorder { - - /** Border color of the series. - * @Default {transparent} - */ - color?: string; - - /** Border width of the series. - * @Default {1} - */ - width?: number; - - /** DashArray for border of the series. - * @Default {null} - */ - dashArray?: string; - } - - export interface SeriesFont { - - /** Font color of the series text. - * @Default {#707070} - */ - color?: string; - - /** Font Family of the series. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font Style of the series. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the series. - * @Default {Regular} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of series text. - * @Default {1} - */ - opacity?: number; - - /** Size of the series text. - * @Default {12px} - */ - size?: string; - } - - export interface SeriesMarkerBorder { - - /** Border color of the marker shape. - * @Default {white} - */ - color?: string; - - /** Border width of the marker shape. - * @Default {3} - */ - width?: number; - } - - export interface SeriesMarkerDataLabelBorder { - - /** Border color of the data label. - * @Default {null} - */ - color?: string; - - /** Border width of the data label. - * @Default {0.1} - */ - width?: number; - } - - export interface SeriesMarkerDataLabelConnectorLine { - - /** Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. - * @Default {line. See ConnectorLineType} - */ - type?: ej.datavisualization.Chart.Type | string; - - /** Width of the connector. - * @Default {0.5} - */ - width?: number; - - /** Color of the connector. - * @Default {null} - */ - color?: string; - - /** Height of the connector. - * @Default {null} - */ - height?: number; - } - - export interface SeriesMarkerDataLabelFont { - - /** Font family of the data label. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font color of the data label text. - * @Default {null} - */ - color?: string; - - /** Font style of the data label. - * @Default {normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the data label. - * @Default {regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the data label. - * @Default {12px} - */ - size?: string; - } - - export interface SeriesMarkerDataLabelMargin { - - /** Bottom margin of the text. - * @Default {5} - */ - bottom?: number; - - /** Left margin of the text. - * @Default {5} - */ - left?: number; - - /** Right margin of the text. - * @Default {5} - */ - right?: number; - - /** Top margin of the text. - * @Default {5} - */ - top?: number; - } - - export interface SeriesMarkerDataLabel { - - /** Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. - * @Default {null} - */ - angle?: number; - - /** Maximum label width of the data label. - * @Default {null} - */ - maximumLabelWidth?: number; - - /** Enable the wrap option to the data label. - * @Default {false} - */ - enableWrap?: boolean; - - /** Options for customizing the border of the data label. - */ - border?: SeriesMarkerDataLabelBorder; - - /** Options for displaying and customizing the line that connects point and data label. - */ - connectorLine?: SeriesMarkerDataLabelConnectorLine; - - /** Background color of the data label. - * @Default {null} - */ - fill?: string; - - /** Options for customizing the data label font. - */ - font?: SeriesMarkerDataLabelFont; - - /** Horizontal alignment of the data label. - * @Default {center} - */ - horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment | string; - - /** Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. - */ - margin?: SeriesMarkerDataLabelMargin; - - /** Opacity of the data label. - * @Default {1} - */ - opacity?: number; - - /** Background shape of the data label. - * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} - */ - shape?: ej.datavisualization.Chart.Shape | string; - - /** Name of a field in data source where datalabel text is displayed. - */ - textMappingName?: string; - - /** Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. - * @Default {top. See TextPosition} - */ - textPosition?: ej.datavisualization.Chart.TextPosition | string; - - /** Vertical alignment of the data label. - * @Default {'center'} - */ - verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment | string; - - /** Controls the visibility of the data labels. - * @Default {false} - */ - visible?: boolean; - - /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. - */ - template?: string; - - /** Moves the label vertically by some offset. - * @Default {0} - */ - offset?: number; - } - - export interface SeriesMarkerSize { - - /** Height of the marker. - * @Default {6} - */ - height?: number; - - /** Width of the marker. - * @Default {6} - */ - width?: number; - } - - export interface SeriesMarker { - - /** Options for customizing the border of the marker shape. - */ - border?: SeriesMarkerBorder; - - /** Options for displaying and customizing data labels. - */ - dataLabel?: SeriesMarkerDataLabel; - - /** Color of the marker shape. - * @Default {null} - */ - fill?: string; - - /** The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. - */ - imageUrl?: string; - - /** Opacity of the marker. - * @Default {1} - */ - opacity?: number; - - /** Specifies the shape of the marker. - * @Default {circle. See Shape} - */ - shape?: ej.datavisualization.Chart.Shape | string; - - /** Options for customizing the size of the marker shape. - */ - size?: SeriesMarkerSize; - - /** Controls the visibility of the marker shape. - * @Default {false} - */ - visible?: boolean; - } - - export interface SeriesOutlierSettingsSize { - - /** Height of the outlier shape. - * @Default {6} - */ - height?: number; - - /** Width of the outlier shape. - * @Default {6} - */ - width?: number; - } - - export interface SeriesOutlierSettings { - - /** Specifies the shape of the outlier. - * @Default {circle. See Shape} - */ - shape?: ej.datavisualization.Chart.Shape | string; - - /** Options for customizing the size of the outlier shape. - */ - size?: SeriesOutlierSettingsSize; - } - - export interface SeriesEmptyPointSettingsStyleBorder { - - /** Border color of the empty point. - */ - color?: string; - - /** Border width of the empty point. - * @Default {1} - */ - width?: number; - } - - export interface SeriesEmptyPointSettingsStyle { - - /** Color of the empty point. - */ - color?: string; - - /** Options for customizing border of the empty point in the series. - */ - border?: SeriesEmptyPointSettingsStyleBorder; - } - - export interface SeriesEmptyPointSettings { - - /** Controls the visibility of the empty point. - * @Default {true} - */ - visible?: boolean; - - /** Specifies the mode of empty point. - * @Default {gap} - */ - displayMode?: ej.datavisualization.Chart.EmptyPointMode | string; - - /** Options for customizing the color and border of the empty point in the series. - */ - style?: SeriesEmptyPointSettingsStyle; - } - - export interface SeriesConnectorLine { - - /** Width of the connector line. - * @Default {1} - */ - width?: number; - - /** Color of the connector line. - * @Default {#565656} - */ - color?: string; - - /** DashArray of the connector line. - * @Default {null} - */ - dashArray?: string; - - /** Opacity of the connector line. - * @Default {1} - */ - opacity?: number; - } - - export interface SeriesDragSettings { - - /** drag/drop the series - * @Default {false} - */ - enable?: boolean; - - /** Specifies the type of drag settings. - * @Default {xy} - */ - type?: string; - } - - export interface SeriesErrorBarCap { - - /** Show/Hides the error bar cap. - * @Default {true} - */ - visible?: boolean; - - /** Width of the error bar cap. - * @Default {1} - */ - width?: number; - - /** Length of the error bar cap. - * @Default {1} - */ - length?: number; - - /** Color of the error bar cap. - * @Default {#000000} - */ - fill?: string; - } - - export interface SeriesErrorBar { - - /** Show/hides the error bar - * @Default {visible} - */ - visibility?: boolean; - - /** Specifies the type of error bar. - * @Default {FixedValue} - */ - type?: ej.datavisualization.Chart.ErrorBarType | string; - - /** Specifies the mode of error bar. - * @Default {vertical} - */ - mode?: ej.datavisualization.Chart.ErrorBarMode | string; - - /** Specifies the direction of error bar. - * @Default {both} - */ - direction?: ej.datavisualization.Chart.ErrorBarDirection | string; - - /** Value of vertical error bar. - * @Default {3} - */ - verticalErrorValue?: number; - - /** Value of horizontal error bar. - * @Default {1} - */ - horizontalErrorValue?: number; - - /** Value of positive horizontal error bar. - * @Default {1} - */ - horizontalPositiveErrorValue?: number; - - /** Value of negative horizontal error bar. - * @Default {1} - */ - horizontalNegativeErrorValue?: number; - - /** Value of positive vertical error bar. - * @Default {5} - */ - verticalPositiveErrorValue?: number; - - /** Value of negative vertical error bar. - * @Default {5} - */ - verticalNegativeErrorValue?: number; - - /** Fill color of the error bar. - * @Default {#000000} - */ - fill?: string; - - /** Width of the error bar. - * @Default {1} - */ - width?: number; - - /** Options for customizing the error bar cap. - */ - cap?: SeriesErrorBarCap; - } - - export interface SeriesPointsBorder { - - /** Border color of the point. - * @Default {null} - */ - color?: string; - - /** Border width of the point. - * @Default {null} - */ - width?: number; - } - - export interface SeriesPointsMarkerBorder { - - /** Border color of the marker shape. - * @Default {white} - */ - color?: string; - - /** Border width of the marker shape. - * @Default {3} - */ - width?: number; - } - - export interface SeriesPointsMarkerDataLabelBorder { - - /** Border color of the data label. - * @Default {null} - */ - color?: string; - - /** Border width of the data label. - * @Default {0.1} - */ - width?: number; - } - - export interface SeriesPointsMarkerDataLabelConnectorLine { - - /** Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. - * @Default {line. See ConnectorLineType} - */ - type?: ej.datavisualization.Chart.ConnectorLineType | string; - - /** Width of the connector. - * @Default {0.5} - */ - width?: number; - } - - export interface SeriesPointsMarkerDataLabelFont { - - /** Font family of the data label. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the data label. - * @Default {normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight of the data label. - * @Default {regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the text. - * @Default {1} - */ - opacity?: number; - - /** Font size of the data label. - * @Default {12px} - */ - size?: string; - } - - export interface SeriesPointsMarkerDataLabelMargin { - - /** Bottom margin of the text. - * @Default {5} - */ - bottom?: number; - - /** Left margin of the text. - * @Default {5} - */ - left?: number; - - /** Right margin of the text. - * @Default {5} - */ - right?: number; - - /** Top margin of the text. - * @Default {5} - */ - top?: number; - } - - export interface SeriesPointsMarkerDataLabel { - - /** Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. - * @Default {null} - */ - angle?: number; - - /** Options for customizing the border of the data label. - */ - border?: SeriesPointsMarkerDataLabelBorder; - - /** Options for displaying and customizing the line that connects point and data label. - */ - connectorLine?: SeriesPointsMarkerDataLabelConnectorLine; - - /** Background color of the data label. - * @Default {null} - */ - fill?: string; - - /** Options for customizing the data label font. - */ - font?: SeriesPointsMarkerDataLabelFont; - - /** Horizontal alignment of the data label. - * @Default {center} - */ - horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment | string; - - /** Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. - */ - margin?: SeriesPointsMarkerDataLabelMargin; - - /** Opacity of the data label. - * @Default {1} - */ - opacity?: number; - - /** Background shape of the data label. - * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} - */ - shape?: ej.datavisualization.Chart.Shape | string; - - /** Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. - * @Default {top. See TextPosition} - */ - textPosition?: ej.datavisualization.Chart.TextPosition | string; - - /** Vertical alignment of the data label. - * @Default {'center'} - */ - verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment | string; - - /** Controls the visibility of the data labels. - * @Default {false} - */ - visible?: boolean; - - /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. - */ - template?: string; - - /** Moves the label vertically by specified offset. - * @Default {0} - */ - offset?: number; - } - - export interface SeriesPointsMarkerSize { - - /** Height of the marker. - * @Default {6} - */ - height?: number; - - /** Width of the marker. - * @Default {6} - */ - width?: number; - } - - export interface SeriesPointsMarker { - - /** Options for customizing the border of the marker shape. - */ - border?: SeriesPointsMarkerBorder; - - /** Options for displaying and customizing data label. - */ - dataLabel?: SeriesPointsMarkerDataLabel; - - /** Color of the marker shape. - * @Default {null} - */ - fill?: string; - - /** The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. - */ - imageUrl?: string; - - /** Opacity of the marker. - * @Default {1} - */ - opacity?: number; - - /** Specifies the shape of the marker. - * @Default {circle. See Shape} - */ - shape?: ej.datavisualization.Chart.Shape | string; - - /** Options for customizing the size of the marker shape. - */ - size?: SeriesPointsMarkerSize; - - /** Controls the visibility of the marker shape. - * @Default {false} - */ - visible?: boolean; - } - - export interface SeriesPoint { - - /** Options for customizing the border of a point. This is applicable only for column type series and accumulation type series. - */ - border?: SeriesPointsBorder; - - /** Enables or disables the visibility of legend item. - * @Default {visible} - */ - visibleOnLegend?: string; - - /** To show/hide the intermediate summary from the last intermediate point. - * @Default {false} - */ - showIntermediateSum?: boolean; - - /** To show/hide the total summary of the waterfall series. - * @Default {false} - */ - showTotalSum?: boolean; - - /** Close value of the point. Close value is applicable only for financial type series. - * @Default {null} - */ - close?: number; - - /** Size of a bubble in the bubble series. This is applicable only for the bubble series. - * @Default {null} - */ - size?: number; - - /** Background color of the point. This is applicable only for column type series and accumulation type series. - * @Default {null} - */ - fill?: string; - - /** High value of the point. High value is applicable only for financial type series, range area series and range column series. - * @Default {null} - */ - high?: number; - - /** Low value of the point. Low value is applicable only for financial type series, range area series and range column series. - * @Default {null} - */ - low?: number; - - /** Options for displaying and customizing marker for a data point. Marker contains shapes and/or data labels. - */ - marker?: SeriesPointsMarker; - - /** Open value of the point. This is applicable only for financial type series. - * @Default {null} - */ - open?: number; - - /** Datalabel text for the point. - * @Default {null} - */ - text?: string; - - /** X value of the point. - * @Default {null} - */ - x?: number; - - /** Y value of the point. - * @Default {null} - */ - y?: number; - } - - export interface SeriesCornerRadius { - - /** Specifies the radius for the top left corner. - * @Default {0} - */ - topLeft?: number; - - /** Specifies the radius for the top right corner. - * @Default {0} - */ - topRight?: number; - - /** Specifies the radius for the bottom left corner. - * @Default {0} - */ - bottomLeft?: number; - - /** Specifies the radius for the bottom right corner. - * @Default {0} - */ - bottomRight?: number; - } - - export interface SeriesTooltipBorder { - - /** Border Color of the tooltip. - * @Default {null} - */ - color?: string; - - /** Border Width of the tooltip. - * @Default {1} - */ - width?: number; - } - - export interface SeriesTooltip { - - /** Options for customizing the border of the tooltip. - */ - border?: SeriesTooltipBorder; - - /** Customize the corner radius of the tooltip rectangle. - * @Default {0} - */ - rx?: number; - - /** Customize the corner radius of the tooltip rectangle. - * @Default {0} - */ - ry?: number; - - /** Specifies the duration, the tooltip has to be displayed. - * @Default {500ms} - */ - duration?: string; - - /** Enables/disables the animation of the tooltip when moving from one point to another. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Background color of the tooltip. - * @Default {null} - */ - fill?: string; - - /** Format of the tooltip content. - * @Default {#point.x# : #point.y#} - */ - format?: string; - - /** Opacity of the tooltip. - * @Default {0.95} - */ - opacity?: number; - - /** Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. - * @Default {null} - */ - template?: string; - - /** Controls the visibility of the tooltip. - * @Default {false} - */ - visible?: boolean; - } - - export interface SeriesTrendline { - - /** Show/hides the trendline. - */ - visibility?: boolean; - - /** Specifies the type of trendline for the series. - * @Default {linear. See TrendlinesType} - */ - type?: string; - - /** Name for the trendlines that is to be displayed in legend text. - * @Default {Trendline} - */ - name?: string; - - /** Fill color of the trendlines. - * @Default {#0000FF} - */ - fill?: string; - - /** Width of the trendlines. - * @Default {1} - */ - width?: number; - - /** Opacity of the trendline. - * @Default {1} - */ - opacity?: number; - - /** Pattern of dashes and gaps used to stroke the trendline. - */ - dashArray?: string; - - /** Future trends of the current series. - * @Default {0} - */ - forwardForecast?: number; - - /** Past trends of the current series. - * @Default {0} - */ - backwardForecast?: number; - - /** Specifies the order of polynomial trendlines. - * @Default {0} - */ - polynomialOrder?: number; - - /** Specifies the moving average starting period value. - * @Default {2} - */ - period?: number; - } - - export interface SeriesHighlightSettingsBorder { - - /** Border color of the series/point on highlight. - */ - color?: string; - - /** Border width of the series/point on highlight. - * @Default {2} - */ - width?: string; - } - - export interface SeriesHighlightSettings { - - /** Enables/disables the ability to highlight series or data point interactively. - * @Default {false} - */ - enable?: boolean; - - /** Specifies whether series or data point has to be highlighted. - * @Default {series. See Mode} - */ - mode?: ej.datavisualization.Chart.Mode | string; - - /** Color of the series/point on highlight. - */ - color?: string; - - /** Opacity of the series/point on highlight. - * @Default {0.6} - */ - opacity?: number; - - /** Options for customizing the border of series on highlight. - */ - border?: SeriesHighlightSettingsBorder; - - /** Specifies the pattern for the series/point on highlight. - * @Default {none. See Pattern} - */ - pattern?: string; - - /** Custom pattern for the series on highlight. - */ - customPattern?: string; - } - - export interface SeriesSelectionSettingsBorder { - - /** Border color of the series/point on selection. - */ - color?: string; - - /** Border width of the series/point on selection. - * @Default {2} - */ - width?: string; - } - - export interface SeriesSelectionSettings { - - /** Enables/disables the ability to select a series/data point interactively. - * @Default {false} - */ - enable?: boolean; - - /** Specifies whether series or data point has to be selected. - * @Default {series. See Mode} - */ - mode?: ej.datavisualization.Chart.Mode | string; - - /** Specifies the type of selection. - * @Default {single} - */ - type?: ej.datavisualization.Chart.SelectionType | string; - - /** Specifies the drawn rectangle type. - * @Default {xy} - */ - rangeType?: ej.datavisualization.Chart.RangeType | string; - - /** Color of the series/point on selection. - */ - color?: string; - - /** Opacity of the series/point on selection. - * @Default {0.6} - */ - opacity?: number; - - /** Options for customizing the border of series on selection. - */ - border?: SeriesSelectionSettingsBorder; - - /** Specifies the pattern for the series/point on selection. - * @Default {none. See Pattern} - */ - pattern?: string; - - /** Custom pattern for the series on selection. - */ - customPattern?: string; - } - - export interface Series { - - /** Color of the point, where the close is up in financial chart. - * @Default {null} - */ - bearFillColor?: string; - - /** Options for customizing the border of the series. - */ - border?: SeriesBorder; - - /** Color of the point, where the close is down in financial chart. - * @Default {null} - */ - bullFillColor?: string; - - /** To render the column and bar type series in rectangle/cylinder shape. See ColumnFacet - * @Default {rectangle} - */ - columnFacet?: ej.datavisualization.Chart.ColumnFacet | string; - - /** Relative width of the columns in column type series. Value ranges from 0 to 1. Width also depends upon columnSpacing property. - * @Default {0.7} - */ - columnWidth?: number; - - /** Spacing between columns of different series. Value ranges from 0 to 1 - * @Default {0} - */ - columnSpacing?: number; - - /** To group the series of stacking collection. - */ - stackingGroup?: string; - - /** Pattern of dashes and gaps used to stroke the line type series. - */ - dashArray?: string; - - /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. - * @Default {null} - */ - dataSource?: any; - - /** Controls the size of the hole in doughnut series. Value ranges from 0 to 1. - * @Default {0.4} - */ - doughnutCoefficient?: number; - - /** Controls the size of the doughnut series. Value ranges from 0 to 1. - * @Default {0.8} - */ - doughnutSize?: number; - - /** Type of series to be drawn in radar or polar series. - * @Default {line. See DrawType} - */ - drawType?: ej.datavisualization.Chart.DrawType | string; - - /** Enable/disable the animation of series. - * @Default {false} - */ - enableAnimation?: boolean; - - /** To avoid overlapping of data labels smartly. - * @Default {null} - */ - enableSmartLabels?: number; - - /** End angle of pie/doughnut series. For a complete circle, it has to be 360, by default. - * @Default {null} - */ - endAngle?: number; - - /** Explodes the pie/doughnut slices on mouse move. - * @Default {false} - */ - explode?: boolean; - - /** Explodes all the slice of pie/doughnut on render. - * @Default {null} - */ - explodeAll?: boolean; - - /** Index of the point to be exploded from pie/doughnut/pyramid/funnel. - * @Default {null} - */ - explodeIndex?: number; - - /** Specifies the distance of the slice from the center, when it is exploded. - * @Default {25} - */ - explodeOffset?: number; - - /** Fill color of the series. - * @Default {null} - */ - fill?: string; - - /** Options for customizing the series font. - */ - font?: SeriesFont; - - /** Specifies the height of the funnel in funnel series. Values can be in both pixel and percentage. - * @Default {32.7%} - */ - funnelHeight?: string; - - /** Specifies the width of the funnel in funnel series. Values can be in both pixel and percentage. - * @Default {11.6%} - */ - funnelWidth?: string; - - /** Gap between the slices of pyramid/funnel series. - * @Default {0} - */ - gapRatio?: number; - - /** Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. - * @Default {true} - */ - isClosed?: boolean; - - /** Specifies whether to stack the column series in polar/radar charts. - * @Default {true} - */ - isStacking?: boolean; - - /** Renders the chart vertically. This is applicable only for Cartesian type series. - * @Default {false} - */ - isTransposed?: boolean; - - /** Render the x mark in the center of the box and whisker series type.x represents the average value of the box and whisker series. - * @Default {true} - */ - showMedian?: boolean; - - /** Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. - * @Default {inside. See LabelPosition} - */ - labelPosition?: ej.datavisualization.Chart.LabelPosition | string; - - /** Quartile calculation has been performed in three different formulas to render the boxplot series . - * @Default {exclusive} - */ - boxPlotMode?: ej.datavisualization.Chart.LabelPosition | string; - - /** Specifies the line cap of the series. - * @Default {Butt. See LineCap} - */ - lineCap?: ej.datavisualization.Chart.LineCap | string; - - /** Specifies the type of shape to be used where two lines meet. - * @Default {Round. See LineJoin} - */ - lineJoin?: ej.datavisualization.Chart.LineJoin | string; - - /** Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. - */ - marker?: SeriesMarker; - - /** Name of the series, that is to be displayed in the legend. - * @Default {Add a comment to this line} - */ - name?: string; - - /** Opacity of the series. - * @Default {1} - */ - opacity?: number; - - /** Options for customizing the outlier of individual series. - */ - outlierSettings?: SeriesOutlierSettings; - - /** Name of a field in data source where fill color for all the data points is generated. - */ - palette?: string; - - /** Controls the size of pie series. Value ranges from 0 to 1. - * @Default {0.8} - */ - pieCoefficient?: number; - - /** Options for customizing the empty point in the series. - */ - emptyPointSettings?: SeriesEmptyPointSettings; - - /** Fill color for the positive column of the waterfall. - * @Default {null} - */ - positiveFill?: string; - - /** Options for customizing the waterfall connector line. - */ - connectorLine?: SeriesConnectorLine; - - /** Options to customize the drag and drop in series. - */ - dragSettings?: SeriesDragSettings; - - /** Options to customize the error bar in series. - */ - errorBar?: SeriesErrorBar; - - /** Option to add data points; each point should have x and y property. Also, optionally, you can customize the points color, border, marker by using fill, border and marker options. - */ - points?: SeriesPoint[]; - - /** Specifies the mode of the pyramid series. - * @Default {linear} - */ - pyramidMode?: ej.datavisualization.Chart.PyramidMode | string; - - /** Specifies ej.Query to select data from dataSource. This property is applicable only when the dataSource is ej.DataManager. - * @Default {null} - */ - query?: any; - - /** Start angle from where the pie/doughnut series renders. It starts from 0, by default. - * @Default {null} - */ - startAngle?: number; - - /** Options for customizing the corner radius. cornerRadius property also takes the numeric input and applies it for all the four corners of the column. - */ - cornerRadius?: SeriesCornerRadius; - - /** Options for customizing the tooltip of chart. - */ - tooltip?: SeriesTooltip; - - /** Specifies the type of the series to render in chart. - * @Default {column. see Type} - */ - type?: ej.datavisualization.Chart.Type | string; - - /** Controls the visibility of the series. - * @Default {visible} - */ - visibility?: string; - - /** Enables or disables the visibility of legend item. - * @Default {visible} - */ - visibleOnLegend?: string; - - /** Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. - * @Default {null} - */ - xAxisName?: string; - - /** Name of the property in the datasource that contains x value for the series. - * @Default {null} - */ - xName?: string; - - /** Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. - * @Default {null} - */ - yAxisName?: string; - - /** Name of the property in the datasource that contains y value for the series. - * @Default {null} - */ - yName?: string; - - /** Name of the property in the datasource that contains high value for the series. - * @Default {null} - */ - high?: string; - - /** Name of the property in the datasource that contains low value for the series. - * @Default {null} - */ - low?: string; - - /** Name of the property in the datasource that contains open value for the series. - * @Default {null} - */ - open?: string; - - /** Name of the property in the datasource that contains close value for the series. - * @Default {null} - */ - close?: string; - - /** Name of the property in the datasource that contains fill color for the series. - * @Default {null} - */ - pointColorMappingName?: string; - - /** Z-order of the series. - * @Default {0} - */ - zOrder?: number; - - /** Name of the property in the datasource that contains the size value for the bubble series. - * @Default {null} - */ - size?: string; - - /** Option to add trendlines to chart. - */ - trendlines?: SeriesTrendline[]; - - /** Options for customizing the appearance of the series or data point while highlighting. - */ - highlightSettings?: SeriesHighlightSettings; - - /** Options for customizing the appearance of the series/data point on selection. - */ - selectionSettings?: SeriesSelectionSettings; - } - - export interface Size { - - /** Height of the Chart. Height can be specified in either pixel or percentage. - * @Default {'450'} - */ - height?: string; - - /** Width of the Chart. Width can be specified in either pixel or percentage. - * @Default {'450'} - */ - width?: string; - } - - export interface TitleBorder { - - /** Width of the title border. - * @Default {1} - */ - width?: number; - - /** color of the title border. - * @Default {transparent} - */ - color?: string; - - /** opacity of the title border. - * @Default {0.8} - */ - opacity?: number; - - /** opacity of the title border. - * @Default {0.8} - */ - cornerRadius?: number; - } - - export interface TitleFont { - - /** Font family for Chart title. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for Chart title. - * @Default {Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight for Chart title. - * @Default {Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the Chart title. - * @Default {0.5} - */ - opacity?: number; - - /** Font size for Chart title. - * @Default {20px} - */ - size?: string; - } - - export interface TitleSubTitleFont { - - /** Font family of sub title. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for sub title. - * @Default {Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Chart.FontStyle | string; - - /** Font weight for sub title. - * @Default {Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Chart.FontWeight | string; - - /** Opacity of the sub title. - * @Default {1} - */ - opacity?: number; - - /** Font size for sub title. - * @Default {12px} - */ - size?: string; - } - - export interface TitleSubTitleBorder { - - /** Width of the subtitle border. - * @Default {1} - */ - width?: number; - - /** color of the subtitle border. - * @Default {transparent} - */ - color?: string; - - /** opacity of the subtitle border. - * @Default {0.8} - */ - opacity?: number; - - /** opacity of the subtitle border. - * @Default {0.8} - */ - cornerRadius?: number; - } - - export interface TitleSubTitle { - - /** Options for customizing the font of sub title. - */ - font?: TitleSubTitleFont; - - /** Background color for the chart subtitle. - * @Default {transparent} - */ - background?: string; - - /** Options to customize the border of the title. - */ - border?: TitleSubTitleBorder; - - /** Text to be displayed in sub title. - */ - text?: string; - - /** Alignment of sub title text. - * @Default {far. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Chart.Alignment | string; - } - - export interface Title { - - /** Background color for the chart title. - * @Default {transparent} - */ - background?: string; - - /** Options to customize the border of the title. - */ - border?: TitleBorder; - - /** Options for customizing the font of Chart title. - */ - font?: TitleFont; - - /** Options to customize the sub title of Chart. - */ - subTitle?: TitleSubTitle; - - /** Text to be displayed in Chart title. - */ - text?: string; - - /** Alignment of the title text. - * @Default {Center. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Chart.Alignment | string; - } - - export interface Zooming { - - /** Enables or disables zooming. - * @Default {false} - */ - enable?: boolean; - - /** Enables or disables pinch zooming. - * @Default {true} - */ - enablePinching?: boolean; - - /** Enable or disables the differed zooming. When it is enabled, chart is updated only on mouse up action while zooming and panning. - * @Default {false} - */ - enableDeferredZoom?: boolean; - - /** Enables/disables the ability to zoom the chart on moving the mouse wheel. - * @Default {false} - */ - enableMouseWheel?: boolean; - - /** Specifies whether to allow zooming the chart vertically or horizontally or in both ways. - * @Default {'x,y'} - */ - type?: string; - - /** Toggles the visibility of the scrollbar, which will be displayed while zooming. - * @Default {false} - */ - enableScrollbar?: boolean; - - /** To display user specified buttons in zooming toolbar. - * @Default {[zoomIn, zoomOut, zoom, pan, reset]} - */ - toolbarItems?: any[]; - } - } - namespace Chart { - enum CoordinateUnit { - //string - None, - //string - Pixels, - //string - Points, - } - } - namespace Chart { - enum HorizontalAlignment { - //string - Left, - //string - Right, - //string - Middle, - } - } - namespace Chart { - enum Region { - //string - Chart, - //string - Series, - } - } - namespace Chart { - enum VerticalAlignment { - //string - Top, - //string - Bottom, - //string - Middle, - } - } - namespace Chart { - enum ExportingType { - //string - PNG, - //string - JPG, - //string - PDF, - //string - DOCX, - //string - XLSX, - //string - SVG, - } - } - namespace Chart { - enum ExportingOrientation { - //string - Portrait, - //string - Landscape, - } - } - namespace Chart { - enum ExportingMode { - //string - ServerSide, - //string - ClientSide, - } - } - namespace Chart { - enum Unit { - //string - Percentage, - //string - Pixel, - } - } - namespace Chart { - enum ColumnFacet { - //string - Rectangle, - //string - Cylinder, - } - } - namespace Chart { - enum DrawType { - //string - Line, - //string - Area, - //string - Column, - } - } - namespace Chart { - enum FontStyle { - //string - Normal, - //string - Italic, - } - } - namespace Chart { - enum FontWeight { - //string - Regular, - //string - Bold, - //string - Lighter, - } - } - namespace Chart { - enum LabelPosition { - //string - Inside, - //string - Outside, - //string - OutsideExtended, - } - } - namespace Chart { - enum boxPlotMode { - //string - Exclusive, - //string - Inclusive, - //string - Normal, - } - } - namespace Chart { - enum LineCap { - //string - Butt, - //string - Round, - //string - Square, - } - } - namespace Chart { - enum LineJoin { - //string - Round, - //string - Bevel, - //string - Miter, - } - } - namespace Chart { - enum ConnectorLineType { - //string - Line, - //string - Bezier, - } - } - namespace Chart { - enum HorizontalTextAlignment { - //string - Center, - //string - Near, - //string - Far, - } - } - namespace Chart { - enum Shape { - //string - None, - //string - LeftArrow, - //string - RightArrow, - //string - Circle, - //string - Cross, - //string - HorizLine, - //string - VertLine, - //string - Diamond, - //string - Rectangle, - //string - Triangle, - //string - Hexagon, - //string - Pentagon, - //string - Star, - //string - Ellipse, - //string - Trapezoid, - //string - UpArrow, - //string - DownArrow, - //string - Image, - //string - SeriesType, - } - } - namespace Chart { - enum TextPosition { - //string - Top, - //string - Bottom, - //string - Middle, - } - } - namespace Chart { - enum VerticalTextAlignment { - //string - Center, - //string - Near, - //string - Far, - } - } - namespace Chart { - enum PyramidMode { - //string - Linear, - //string - Surface, - } - } - namespace Chart { - enum Type { - //string - Area, - //string - Line, - //string - Spline, - //string - Column, - //string - Scatter, - //string - Bubble, - //string - SplineArea, - //string - StepArea, - //string - StepLine, - //string - Pie, - //string - HiLo, - //string - HiLoOpenClose, - //string - Candle, - //string - Bar, - //string - StackingArea, - //string - StackingArea100, - //string - RangeColumn, - //string - StackingColumn, - //string - StackingColumn100, - //string - StackingBar, - //string - StackingBar100, - //string - Pyramid, - //string - Funnel, - //string - Doughnut, - //string - Polar, - //string - Radar, - //string - RangeArea, - } - } - namespace Chart { - enum EmptyPointMode { - //string - Gap, - //string - Zero, - //string - Average, - } - } - namespace Chart { - enum ErrorBarType { - //string - FixedValue, - //string - Percentage, - //string - StandardDeviation, - //string - StandardError, - } - } - namespace Chart { - enum ErrorBarMode { - //string - Both, - //string - Vertical, - //string - Horizontal, - } - } - namespace Chart { - enum ErrorBarDirection { - //string - Both, - //string - Plus, - //string - Minus, - } - } - namespace Chart { - enum Mode { - //string - Series, - //string - Point, - //string - Cluster, - //string - Range, - } - } - namespace Chart { - enum SelectionType { - //string - Single, - //string - Multiple, - } - } - namespace Chart { - enum RangeType { - //string - XY, - //string - X, - //string - Y, - } - } - namespace Chart { - enum CrosshairMode { - //string - Float, - //string - Grouping, - } - } - namespace Chart { - enum CrosshairType { - //string - Crosshair, - //string - Trackball, - } - } - namespace Chart { - enum Alignment { - //string - Center, - //string - Near, - //string - Far, - } - } - namespace Chart { - enum Position { - //string - Left, - //string - Right, - //string - Top, - //string - Bottom, - } - } - namespace Chart { - enum TextOverflow { - //string - None, - //string - Trim, - //string - Wrap, - //string - WrapAndTrim, - } - } - namespace Chart { - enum LabelPlacement { - //string - OnTicks, - //string - BetweenTicks, - } - } - namespace Chart { - enum EdgeLabelPlacement { - //string - None, - //string - Shift, - //string - Hide, - } - } - namespace Chart { - enum IntervalType { - //string - Days, - //string - Hours, - //string - Seconds, - //string - Milliseconds, - //string - Minutes, - //string - Months, - //string - Years, - } - } - namespace Chart { - enum LabelIntersectAction { - //string - None, - //string - Rotate90, - //string - Rotate45, - //string - Wrap, - //string - WrapByword, - //string - Trim, - //string - Hide, - //string - MultipleRows, - } - } - namespace Chart { - enum LabelAlignment { - //string - Near, - //string - Far, - //string - Center, - } - } - namespace Chart { - enum RangePadding { - //string - Additional, - //string - Normal, - //string - None, - //string - Round, - } - } - namespace Chart { - enum MultiLevelLabelsBorderType { - //string - Rectangle, - //string - None, - //string - WithoutTopAndBottom, - //string - Brace, - //string - CurlyBrace, - } - } - namespace Chart { - enum TextAlignment { - //string - MiddleTop, - //string - MiddleCenter, - //string - MiddleBottom, - } - } - namespace Chart { - enum ZIndex { - //string - Inside, - //string - Over, - } - } - namespace Chart { - enum TickLinesPosition { - //string - Inside, - //string - Outside, - } - } - namespace Chart { - enum ValueType { - //string - Double, - //string - Category, - //string - DateTime, - //string - Logarithmic, - } - } - namespace Chart { - enum Theme { - //string - Azure, - //string - FlatLight, - //string - FlatDark, - //string - Azuredark, - //string - Lime, - //string - LimeDark, - //string - Saffron, - //string - SaffronDark, - //string - GradientLight, - //string - GradientDark, - } - } - - class RangeNavigator extends ej.Widget { - static fn: RangeNavigator; - constructor(element: JQuery | Element, options?: RangeNavigator.Model); - static Locale: any; - model: RangeNavigator.Model; - defaults: RangeNavigator.Model; - - /** destroy the range navigator widget - * @returns {void} - */ - _destroy(): void; - } - export namespace RangeNavigator { - - export interface Model { - - /** Toggles the placement of slider exactly on the place it left or on the nearest interval. - * @Default {false} - */ - allowSnapping?: boolean; - - /** Options for customizing the color, opacity and width of the chart border. - */ - border?: Border; - - /** Specifies the data source for range navigator. - */ - dataSource?: any; - - /** Specifies the properties used for customizing the range series. - */ - series?: Series[]; - - /** Toggles the redrawing of chart on moving the sliders. - * @Default {true} - */ - enableDeferredUpdate?: boolean; - - /** Enable the scrollbar option in the rangenavigator. - * @Default {false} - */ - enableScrollbar?: boolean; - - /** Toggles the direction of rendering the range navigator control. - * @Default {false} - */ - enableRTL?: boolean; - - /** Sets a value whether to make the range navigator responsive on resize. - * @Default {false} - */ - isResponsive?: boolean; - - /** Options for customizing the labels colors, font, style, size, horizontalAlignment and opacity. - */ - labelSettings?: LabelSettings; - - /** This property is to specify the localization of range navigator. - * @Default {en-US} - */ - locale?: string; - - /** Options for customizing the range navigator. - */ - navigatorStyleSettings?: NavigatorStyleSettings; - - /** Padding specifies the gap between the container and the range navigator. - * @Default {0} - */ - padding?: string; - - /** If the range is not given explicitly, range will be calculated automatically. - * @Default {none} - */ - rangePadding?: ej.datavisualization.RangeNavigator.RangePadding | string; - - /** Options for customizing the starting and ending ranges. - */ - rangeSettings?: RangeSettings; - - /** selectedData is for getting the data when the "rangeChanged" event trigger from client side. - */ - selectedData?: any; - - /** Options for customizing the start and end range values. - */ - selectedRangeSettings?: SelectedRangeSettings; - - /** Options for rendering scrollbar based on the start and end range values. - */ - scrollRangeSettings?: ScrollRangeSettings; - - /** Contains property to customize the hight and width of range navigator. - */ - sizeSettings?: SizeSettings; - - /** By specifying this property the user can change the theme of the range navigator. - * @Default {null} - */ - theme?: string; - - /** Options for customizing the tooltip in range navigator. - */ - tooltipSettings?: TooltipSettings; + /** Triggered when the diagram is rendered completely. + */ + create?(e: CreateEventArgs): void; + } - /** Options for configuring minor grid lines, major grid lines, axis line of axis. - */ - valueAxisSettings?: ValueAxisSettings; + export interface AutoScrollChangeEventArgs { - /** You can plot data of type date time or numeric. This property determines the type of data that this axis will handle. - * @Default {datetime} - */ - valueType?: ej.datavisualization.RangeNavigator.ValueType | string; + /** Returns the delay between subsequent auto scrolls + */ + delay?: string; - /** Specifies the xName for dataSource. This is used to take the x values from dataSource - */ - xName?: any; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** Specifies the yName for dataSource. This is used to take the y values from dataSource - */ - yName?: any; + export interface ClickEventArgs { - /** Fires on load of range navigator. */ - load?(e: LoadEventArgs): void; + /** parameter returns the clicked node, connector or diagram + */ + element?: any; - /** Fires after range navigator is loaded. */ - loaded?(e: LoadedEventArgs): void; + /** parameter returns the object that is actually clicked + */ + actualObject?: number; - /** Fires on changing the range of range navigator. */ - rangeChanged?(e: RangeChangedEventArgs): void; + /** parameter returns the horizontal coordinate of the mouse pointer, relative to the diagram + */ + offsetX?: number; - /** Fires on changing the scrollbar position of range navigator. */ - scrollChanged?(e: ScrollChangedEventArgs): void; + /** parameter returns the vertical coordinate of the mouse pointer, relative to the diagram + */ + offsetY?: number; - /** Fires on when starting to change the scrollbar position of range navigator. */ - scrollStart?(e: ScrollStartEventArgs): void; + /** parameter returns the count of how many times the mouse button is pressed + */ + count?: number; - /** Fires on changes ending the scrollbar position of range navigator. */ - scrollEnd?(e: ScrollEndEventArgs): void; - } + /** parameter returns the event triggered + */ + event?: any; - export interface LoadEventArgs { + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** parameters from range navigator - */ - Data?: any; + /** parameter to specify whether or not to cancel the event + */ + cancel?: boolean; + } - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + export interface ConnectionChangeEventArgs { - /** returns the range navigator model - */ - model?: any; + /** parameter returns the connection that is changed between nodes, ports or points + */ + element?: any; - /** returns the name of the event - */ - type?: string; - } + /** parameter returns the new source node or target node of the connector + */ + connection?: string; - export interface LoadedEventArgs { + /** parameter returns the new source port or target port of the connector + */ + port?: any; - /** parameters from range navigator - */ - Data?: any; + /** parameter defines whether to cancel the change or not + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** returns the range navigator model - */ - model?: any; + export interface ConnectorCollectionChangeEventArgs { - /** returns the name of the event - */ - type?: string; - } + /** parameter returns whether the connector is inserted or removed + */ + changeType?: string; - export interface RangeChangedEventArgs { + /** parameter returns the connector that is to be added or deleted + */ + element?: any; - /** parameters from range navigator - */ - Data?: any; + /** parameter defines whether to cancel the collection change or not + */ + cancel?: boolean; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** triggers before and after adding the connector in the diagram which can be differentiated through `state` argument. We can cancel the event only before adding the connector. + */ + state?: string; - /** returns the range navigator model - */ - model?: any; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** returns the name of the event - */ - type?: string; - } + export interface ConnectorSourceChangeEventArgs { - export interface ScrollChangedEventArgs { + /** returns the connector, the source point of which is being dragged + */ + element?: any; - /** parameters from RangeNavigator - */ - data?: any; + /** returns the source node of the element + */ + node?: any; - /** returns the scrollbar position old start and end range value on changing scrollbar - */ - dataoldRange?: any; + /** returns the source point of the element + */ + point?: any; - /** returns the scrollbar position new start and end range value on changing scrollbar - */ - datanewRange?: any; + /** returns the source port of the element + */ + port?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the state of connection end point dragging(starting, dragging, completed) + */ + dragState?: string; - /** returns the RangeNavigator model - */ - model?: any; + /** parameter defines whether to cancel the change or not + */ + cancel?: boolean; - /** returns the name of the event - */ - type?: string; - } + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - export interface ScrollStartEventArgs { + export interface ConnectorTargetChangeEventArgs { - /** parameters from RangeNavigator - */ - data?: any; + /** parameter returns the connector, the target point of which is being dragged + */ + element?: any; - /** returns the scrollbar position starting range value on changing scrollbar - */ - datastartRange?: string; + /** returns the target node of the element + */ + node?: any; - /** returns the scrollbar position end range value on changing scrollbar - */ - dataendRange?: string; + /** returns the target point of the element + */ + point?: any; - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; + /** returns the target port of the element + */ + port?: any; - /** returns the RangeNavigator model - */ - model?: any; + /** returns the state of connection end point dragging(starting, dragging, completed) + */ + dragState?: string; - /** returns the name of the event - */ - type?: string; - } - - export interface ScrollEndEventArgs { - - /** parameters from RangeNavigator - */ - data?: any; - - /** returns the scrollbar position old start and end range value on change end of scrollbar - */ - dataoldRange?: any; - - /** returns the scrollbar position new start and end range value on change end of scrollbar - */ - datanewRange?: any; - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the RangeNavigator model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - } - - export interface Border { - - /** Border color of rangenavigator. When enable the scrollbar, the default color will be set as "#B4B4B4". - * @Default {transparent} - */ - color?: string; - - /** Opacity of the rangeNavigator border. - * @Default {1} - */ - opacity?: number; - - /** Width of the RangeNavigator border. - * @Default {1} - */ - width?: number; - } - - export interface Series { - - /** Name of the property in the datasource that contains x value for the series. - * @Default {null} - */ - xName?: string; - - /** Name of the property in the datasource that contains y value for the series. - * @Default {null} - */ - yName?: string; - - /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. - * @Default {null} - */ - dataSource?: any; - - /** Specifies the type of the series to render in chart. - * @Default {column. see Type} - */ - type?: ej.datavisualization.RangeNavigator.Type | string; - - /** Enable/disable the animation of series. - * @Default {false} - */ - enableAnimation?: boolean; - - /** Fill color of the series. - * @Default {null} - */ - fill?: string; - } - - export interface LabelSettingsHigherLevelBorder { - - /** Specifies the border color of grid lines. - * @Default {transparent} - */ - color?: string; - - /** Specifies the border width of grid lines. - * @Default {0.5} - */ - width?: string; - } - - export interface LabelSettingsHigherLevelGridLineStyle { - - /** Specifies the color of grid lines in higher level. - * @Default {#B5B5B5} - */ - color?: string; - - /** Specifies the dashArray of grid lines in higher level. - * @Default {20 5 0} - */ - dashArray?: string; - - /** Specifies the width of grid lines in higher level. - * @Default {#B5B5B5} - */ - width?: string; - } - - export interface LabelSettingsHigherLevelStyleFont { - - /** Specifies the label font color. Labels render with the specified font color. - * @Default {black} - */ - color?: string; - - /** Specifies the label font family. Labels render with the specified font family. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the label font style. Labels render with the specified font style. - * @Default {Normal} - */ - fontStyle?: string; - - /** Specifies the label font weight. Labels render with the specified font weight. - * @Default {regular} - */ - fontWeight?: string; - - /** Specifies the label opacity. Labels render with the specified opacity. - * @Default {1} - */ - opacity?: number; - - /** Specifies the label font size. Labels render with the specified font size. - * @Default {12px} - */ - size?: string; - } - - export interface LabelSettingsHigherLevelStyle { - - /** Options for customizing the font properties. - */ - font?: LabelSettingsHigherLevelStyleFont; - - /** Specifies the horizontal text alignment of the text in label. - * @Default {middle} - */ - horizontalAlignment?: string; - } - - export interface LabelSettingsHigherLevel { - - /** Options for customizing the border of grid lines in higher level. - */ - border?: LabelSettingsHigherLevelBorder; - - /** Specifies the fill color of higher level labels. - * @Default {transparent} - */ - fill?: string; - - /** Options for customizing the grid line colors, width, dashArray, border. - */ - gridLineStyle?: LabelSettingsHigherLevelGridLineStyle; - - /** Specifies the intervalType for higher level labels. See IntervalType - * @Default {auto} - */ - intervalType?: ej.datavisualization.RangeNavigator.IntervalType | string; - - /** Specifies the position of the labels to render either inside or outside of plot area - * @Default {outside} - */ - labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement | string; - - /** Specifies the position of the labels in higher level - * @Default {top} - */ - position?: ej.datavisualization.RangeNavigator.Position | string; - - /** Options for customizing the style of higher level labels. - */ - style?: LabelSettingsHigherLevelStyle; - - /** Toggles the visibility of higher level labels. - * @Default {true} - */ - visible?: boolean; - } - - export interface LabelSettingsLowerLevelBorder { - - /** Specifies the border color of grid lines. - * @Default {transparent} - */ - color?: string; - - /** Specifies the border width of grid lines. - * @Default {0.5} - */ - width?: string; - } - - export interface LabelSettingsLowerLevelGridLineStyle { - - /** Specifies the color of grid lines in lower level. - * @Default {#B5B5B5} - */ - color?: string; - - /** Specifies the dashArray of gridLines in lowerLevel. - * @Default {20 5 0} - */ - dashArray?: string; - - /** Specifies the width of grid lines in lower level. - * @Default {#B5B5B5} - */ - width?: string; - } - - export interface LabelSettingsLowerLevelStyleFont { - - /** Specifies the color of labels. Label text render in this specified color. - * @Default {black} - */ - color?: string; - - /** Specifies the font family of labels. Label text render in this specified font family. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the font style of labels. Label text render in this specified font style. - * @Default {Normal} - */ - fontStyle?: string; - - /** Specifies the font weight of labels. Label text render in this specified font weight. - * @Default {regular} - */ - fontWeight?: string; - - /** Specifies the opacity of labels. Label text render in this specified opacity. - * @Default {12px} - */ - opacity?: string; - - /** Specifies the size of labels. Label text render in this specified size. - * @Default {12px} - */ - size?: string; - } - - export interface LabelSettingsLowerLevelStyle { - - /** Options for customizing the font of labels. - */ - font?: LabelSettingsLowerLevelStyleFont; - - /** Specifies the horizontal text alignment of the text in label. - * @Default {middle} - */ - horizontalAlignment?: string; - } - - export interface LabelSettingsLowerLevel { - - /** Options for customizing the border of grid lines in lower level. - */ - border?: LabelSettingsLowerLevelBorder; - - /** Specifies the fill color of labels in lower level. - * @Default {transparent} - */ - fill?: string; - - /** Options for customizing the grid lines in lower level. - */ - gridLineStyle?: LabelSettingsLowerLevelGridLineStyle; - - /** Specifies the intervalType of the labels in lower level.See IntervalType - * @Default {auto} - */ - intervalType?: ej.datavisualization.RangeNavigator.IntervalType | string; - - /** Specifies the position of the labels to render either inside or outside of plot area. See LabelPlacement - * @Default {outside} - */ - labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement | string; - - /** Specifies the position of the labels in lower level.See Position - * @Default {bottom} - */ - position?: ej.datavisualization.RangeNavigator.Position | string; - - /** Options for customizing the style of labels. - */ - style?: LabelSettingsLowerLevelStyle; - - /** Toggles the visibility of labels in lower level. - * @Default {true} - */ - visible?: boolean; - } - - export interface LabelSettingsStyleFont { - - /** Specifies the label color. This color is applied to the labels in range navigator. - * @Default {#FFFFFF} - */ - color?: string; - - /** Specifies the label font family. Labels render with the specified font family. - * @Default {Segoe UI} - */ - family?: string; - - /** Specifies the label font opacity. Labels render with the specified font opacity. - * @Default {1} - */ - opacity?: number; - - /** Specifies the label font size. Labels render with the specified font size. - * @Default {1px} - */ - size?: string; - - /** Specifies the label font style. Labels render with the specified font style.. - * @Default {Normal} - */ - style?: ej.datavisualization.RangeNavigator.FontStyle | string; - - /** Specifies the label font weight - * @Default {regular} - */ - weight?: ej.datavisualization.RangeNavigator.FontWeight | string; - } - - export interface LabelSettingsStyle { - - /** Options for customizing the font of labels in range navigator. - */ - font?: LabelSettingsStyleFont; - - /** Specifies the horizontalAlignment of the label in RangeNavigator - * @Default {middle} - */ - horizontalAlignment?: ej.datavisualization.RangeNavigator.HorizontalAlignment | string; - } - - export interface LabelSettings { - - /** Options for customizing the higher level labels in range navigator. - */ - higherLevel?: LabelSettingsHigherLevel; - - /** Options for customizing the labels in lower level. - */ - lowerLevel?: LabelSettingsLowerLevel; - - /** Options for customizing the style of labels in range navigator. - */ - style?: LabelSettingsStyle; - } - - export interface NavigatorStyleSettingsBorder { - - /** Specifies the border color of range navigator. - * @Default {transparent} - */ - color?: string; - - /** Specifies the dash array of range navigator. - * @Default {null} - */ - dashArray?: string; - - /** Specifies the border width of range navigator. - * @Default {0.5} - */ - width?: number; - } - - export interface NavigatorStyleSettingsMajorGridLineStyle { - - /** Specifies the color of major grid lines in range navigator. - * @Default {#B5B5B5} - */ - color?: string; - - /** Toggles the visibility of major grid lines. - * @Default {true} - */ - visible?: boolean; - } - - export interface NavigatorStyleSettingsMinorGridLineStyle { - - /** Specifies the color of minor grid lines in range navigator. - * @Default {#B5B5B5} - */ - color?: string; - - /** Toggles the visibility of minor grid lines. - * @Default {true} - */ - visible?: boolean; - } - - export interface NavigatorStyleSettingsHighlightSettingsBorder { - - /** To set the border color to the highlight. - * @Default {null} - */ - color?: string; - - /** To set the border width to the highlight. - * @Default {1} - */ - width?: number; - } - - export interface NavigatorStyleSettingsHighlightSettings { - - /** Enable the highlight settings in range navigator. - * @Default {false} - */ - enable?: boolean; - - /** To set the color to the highlight. - * @Default {null} - */ - color?: string; - - /** To set the opacity to the highlight. - * @Default {0.5} - */ - opacity?: number; - - /** Contains the border properties for highlighting rectangle. - */ - border?: NavigatorStyleSettingsHighlightSettingsBorder; - } - - export interface NavigatorStyleSettingsSelectionSettingsBorder { - - /** To set the border color to the selection. - * @Default {null} - */ - color?: string; - - /** To set the border width to the selection. - * @Default {1} - */ - width?: number; - } - - export interface NavigatorStyleSettingsSelectionSettings { - - /** Enable the selection settings in range navigator. - * @Default {false} - */ - enable?: boolean; - - /** To set the color to the selection. - * @Default {null} - */ - color?: string; - - /** To set the opacity to the selection. - * @Default {0.5} - */ - opacity?: number; - - /** Contains the border properties for selecting the rectangle. - */ - border?: NavigatorStyleSettingsSelectionSettingsBorder; - } - - export interface NavigatorStyleSettings { - - /** Specifies the background color of range navigator. - * @Default {#dddddd} - */ - background?: string; - - /** Options for customizing the border color and width of range navigator. - */ - border?: NavigatorStyleSettingsBorder; - - /** Specifies the left side thumb template in range navigator we can give either div id or HTML string - * @Default {null} - */ - leftThumbTemplate?: string; - - /** Options for customizing the major grid lines. - */ - majorGridLineStyle?: NavigatorStyleSettingsMajorGridLineStyle; - - /** Options for customizing the minor grid lines. - */ - minorGridLineStyle?: NavigatorStyleSettingsMinorGridLineStyle; - - /** Specifies the opacity of RangeNavigator. - * @Default {1} - */ - opacity?: number; - - /** Specifies the right side thumb template in range navigator we can give either div id or HTML string - * @Default {null} - */ - rightThumbTemplate?: string; - - /** Specifies the color of the selected region in range navigator. - * @Default {#EFEFEF} - */ - selectedRegionColor?: string; - - /** Specifies the opacity of Selected Region. - * @Default {0} - */ - selectedRegionOpacity?: number; - - /** Specifies the color of the thumb in range navigator. - * @Default {#2382C3} - */ - thumbColor?: string; - - /** Specifies the radius of the thumb in range navigator. - * @Default {10} - */ - thumbRadius?: number; - - /** Specifies the stroke color of the thumb in range navigator. - * @Default {#303030} - */ - thumbStroke?: string; - - /** Specifies the color of the unselected region in range navigator. - * @Default {#5EABDE} - */ - unselectedRegionColor?: string; - - /** Specifies the opacity of Unselected Region. - * @Default {0.3} - */ - unselectedRegionOpacity?: number; - - /** Contains the options for highlighting the range navigator on mouse over. - */ - highlightSettings?: NavigatorStyleSettingsHighlightSettings; - - /** Contains the options for selection the range navigator on mouse over. - */ - selectionSettings?: NavigatorStyleSettingsSelectionSettings; - } - - export interface RangeSettings { - - /** Specifies the ending range of range navigator. - * @Default {null} - */ - end?: string; - - /** Specifies the starting range of range navigator. - * @Default {null} - */ - start?: string; - } - - export interface SelectedRangeSettings { - - /** Specifies the ending range of range navigator. - * @Default {null} - */ - end?: string; - - /** Specifies the starting range of range navigator. - * @Default {null} - */ - start?: string; - } - - export interface ScrollRangeSettings { - - /** Specifies the ending range of range navigator scrollbar and that should be greater than the rangenavigator datasource end value. - * @Default {null} - */ - end?: string; - - /** Specifies the starting range of range navigator scrollbar and that should be less than the rangenavigator datasource start value. - * @Default {null} - */ - start?: string; - } - - export interface SizeSettings { - - /** Specifies height of the range navigator. - * @Default {null} - */ - height?: string; - - /** Specifies width of the range navigator. - * @Default {null} - */ - width?: string; - } - - export interface TooltipSettingsFont { - - /** Specifies the color of text in tooltip. Tooltip text render in the specified color. - * @Default {#FFFFFF} - */ - color?: string; - - /** Specifies the font family of text in tooltip. Tooltip text render in the specified font family. - * @Default {Segoe UI} - */ - family?: string; - - /** Specifies the font style of text in tooltip. Tooltip text render in the specified font style. - * @Default {ej.datavisualization.RangeNavigator.fontStyle.Normal} - */ - fontStyle?: string; - - /** Specifies the opacity of text in tooltip. Tooltip text render in the specified opacity. - * @Default {1} - */ - opacity?: number; - - /** Specifies the size of text in tooltip. Tooltip text render in the specified size. - * @Default {10px} - */ - size?: string; - - /** Specifies the weight of text in tooltip. Tooltip text render in the specified weight. - * @Default {ej.datavisualization.RangeNavigator.weight.Regular} - */ - weight?: string; - } - - export interface TooltipSettings { - - /** Specifies the background color of tooltip. - * @Default {#303030} - */ - backgroundColor?: string; - - /** Options for customizing the font in tooltip. - */ - font?: TooltipSettingsFont; - - /** Specifies the format of text to be displayed in tooltip. - * @Default {MM/dd/yyyy} - */ - labelFormat?: string; - - /** Specifies the mode of displaying the tooltip. Neither to display the tooltip always nor on demand. - * @Default {null} - */ - tooltipDisplayMode?: string; - - /** Toggles the visibility of tooltip. - * @Default {true} - */ - visible?: boolean; - } - - export interface ValueAxisSettingsAxisLine { - - /** Toggles the visibility of axis line. - * @Default {none} - */ - visible?: string; - } - - export interface ValueAxisSettingsFont { - - /** Text in axis render with the specified size. - * @Default {0px} - */ - size?: string; - } - - export interface ValueAxisSettingsMajorGridLines { - - /** Toggles the visibility of major grid lines. - * @Default {false} - */ - visible?: boolean; - } - - export interface ValueAxisSettingsMajorTickLines { - - /** Specifies the size of the majorTickLines in range navigator - * @Default {0} - */ - size?: number; - - /** Toggles the visibility of major tick lines. - * @Default {true} - */ - visible?: boolean; - - /** Specifies width of the major tick lines. - * @Default {0} - */ - width?: number; - } - - export interface ValueAxisSettings { - - /** Options for customizing the axis line. - */ - axisLine?: ValueAxisSettingsAxisLine; - - /** Options for customizing the font of the axis. - */ - font?: ValueAxisSettingsFont; - - /** Options for customizing the major grid lines. - */ - majorGridLines?: ValueAxisSettingsMajorGridLines; - - /** Options for customizing the major tick lines in axis. - */ - majorTickLines?: ValueAxisSettingsMajorTickLines; - - /** If the range is not given explicitly, range will be calculated automatically. You can customize the automatic range calculation using rangePadding. - * @Default {none} - */ - rangePadding?: string; - - /** Toggles the visibility of axis in range navigator. - * @Default {false} - */ - visible?: boolean; - } - } - namespace RangeNavigator { - enum Type { - //string - Area, - //string - Line, - //string - Spline, - //string - StepArea, - //string - SplineArea, - //string - StepLine, - } - } - namespace RangeNavigator { - enum IntervalType { - //string - Years, - //string - Quarters, - //string - Months, - //string - Weeks, - //string - Days, - //string - Hours, - //string - Minutes, - } - } - namespace RangeNavigator { - enum LabelPlacement { - //string - Inside, - //string - Outside, - } - } - namespace RangeNavigator { - enum Position { - //string - Top, - //string - Bottom, - } - } - namespace RangeNavigator { - enum FontStyle { - //string - Normal, - //string - Bold, - //string - Italic, - } - } - namespace RangeNavigator { - enum FontWeight { - //string - Regular, - //string - Lighter, - } - } - namespace RangeNavigator { - enum HorizontalAlignment { - //string - Middle, - //string - Left, - //string - Right, - } - } - namespace RangeNavigator { - enum RangePadding { - //string - Additional, - //string - Normal, - //string - None, - //string - Round, - } - } - namespace RangeNavigator { - enum ValueType { - //string - Numeric, - //string - DateTime, - } - } - - class BulletGraph extends ej.Widget { - static fn: BulletGraph; - constructor(element: JQuery | Element, options?: BulletGraph.Model); - static Locale: any; - model: BulletGraph.Model; - defaults: BulletGraph.Model; - - /** To destroy the bullet graph - * @returns {void} - */ - destroy(): void; - - /** To redraw the bullet graph - * @returns {void} - */ - redraw(): void; - - /** To set the value for comparative measure in bullet graph. - * @returns {void} - */ - setComparativeMeasureSymbol(): void; - - /** To set the value for feature measure bar. - * @returns {void} - */ - setFeatureMeasureBarValue(): void; - } - export namespace BulletGraph { - - export interface Model { - - /** Toggles the visibility of the range stroke color of the labels. - * @Default {false} - */ - applyRangeStrokeToLabels?: boolean; - - /** Toggles the visibility of the range stroke color of the ticks. - * @Default {false} - */ - applyRangeStrokeToTicks?: boolean; - - /** Contains property to customize the caption in bullet graph. - */ - captionSettings?: CaptionSettings; - - /** Comparative measure bar in bullet graph render till the specified value. - * @Default {0} - */ - comparativeMeasureValue?: number; - - /** Toggles the animation of bullet graph. - * @Default {true} - */ - enableAnimation?: boolean; - - /** Specifies the direction of flow in bullet graph. Neither it may be backward nor forward. - * @Default {forward} - */ - flowDirection?: ej.datavisualization.BulletGraph.FlowDirection | string; - - /** Specifies the height of the bullet graph. - * @Default {90} - */ - height?: number; - - /** Sets a value whether to make the bullet graph responsive on resize. - * @Default {true} - */ - isResponsive?: boolean; - - /** Bullet graph will render in the specified orientation. - * @Default {horizontal} - */ - orientation?: ej.datavisualization.BulletGraph.Orientation | string; - - /** Contains property to customize the qualitative ranges. - */ - qualitativeRanges?: QualitativeRange[]; - - /** Size of the qualitative range depends up on the specified value. - * @Default {32} - */ - qualitativeRangeSize?: number; - - /** Length of the quantitative range depends up on the specified value. - * @Default {475} - */ - quantitativeScaleLength?: number; - - /** Contains all the properties to customize quantitative scale. - */ - quantitativeScaleSettings?: QuantitativeScaleSettings; - - /** By specifying this property the user can change the theme of the bullet graph. - * @Default {flatlight} - */ - theme?: string; - - /** Contains all the properties to customize tooltip. - */ - tooltipSettings?: TooltipSettings; - - /** Feature measure bar in bullet graph render till the specified value. - * @Default {0} - */ - value?: number; - - /** Specifies the width of the bullet graph. - * @Default {595} - */ - width?: number; - - /** Fires on rendering the caption of bullet graph. */ - drawCaption?(e: DrawCaptionEventArgs): void; + /** parameter defines whether to cancel the change or not + */ + cancel?: boolean; - /** Fires on rendering the category. */ - drawCategory?(e: DrawCategoryEventArgs): void; - - /** Fires on rendering the comparative measure symbol. */ - drawComparativeMeasureSymbol?(e: DrawComparativeMeasureSymbolEventArgs): void; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** Fires on rendering the feature measure bar. */ - drawFeatureMeasureBar?(e: DrawFeatureMeasureBarEventArgs): void; + export interface ContextMenuBeforeOpenEventArgs { - /** Fires on rendering the indicator of bullet graph. */ - drawIndicator?(e: DrawIndicatorEventArgs): void; + /** parameter returns the diagram object + */ + diagram?: any; - /** Fires on rendering the labels. */ - drawLabels?(e: DrawLabelsEventArgs): void; + /** parameter returns the actual arguments from context menu + */ + contextmenu?: any; - /** Fires on rendering the qualitative ranges. */ - drawQualitativeRanges?(e: DrawQualitativeRangesEventArgs): void; + /** parameter returns the object that was clicked + */ + target?: any; - /** Fires on loading bullet graph. */ - load?(e: LoadEventArgs): void; - } + /** parameter returns the id of the diagram + */ + diagramId?: string; - export interface DrawCaptionEventArgs { + /** parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; - /** returns the object of the bullet graph. - */ - Object?: any; + /** parameter returns the actual click event arguments that explains which button is clicked + */ + model?: any; - /** returns the options of the scale element. - */ - scaleElement?: HTMLElement; + /** parameter returns the type of the event triggered + */ + type?: string; + } - /** returns the current captionSettings element. - */ - captionElement?: HTMLElement; + export interface ContextMenuClickEventArgs { - /** returns the type of the captionSettings. - */ - captionType?: string; - } + /** parameter returns the id of the selected context menu item + */ + id?: string; - export interface DrawCategoryEventArgs { + /** parameter returns the text of the selected context menu item + */ + text?: string; - /** returns the object of the bullet graph. - */ - Object?: any; + /** parameter returns the parent id of the selected context menu item + */ + parentId?: string; - /** returns the options of the scale element. - */ - scaleElement?: HTMLElement; + /** parameter returns the parent text of the selected context menu item + */ + parentText?: string; - /** returns the options of category element. - */ - categoryElement?: HTMLElement; + /** parameter returns the object that was clicked + */ + target?: any; - /** returns the text value of the category that is drawn. - */ - Value?: string; - } + /** parameter defines whether to execute the click event or not + */ + canExecute?: boolean; - export interface DrawComparativeMeasureSymbolEventArgs { + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** returns the object of the bullet graph. - */ - Object?: any; + /** parameter to specify whether or not to cancel the event + */ + cancel?: boolean; - /** returns the options of the scale element. - */ - scaleElement?: HTMLElement; + /** parameter returns the elementof the object that was clicked + */ + element?: any; - /** returns the options of comparative measure element. - */ - targetElement?: HTMLElement; + /** parameter returns the object that is selected + */ + selectedItem?: any; - /** returns the value of the comparative measure symbol. - */ - Value?: number; - } + /** parameter returns the model of the diagram + */ + events?: any; + } - export interface DrawFeatureMeasureBarEventArgs { + export interface DoubleClickEventArgs { - /** returns the object of the bullet graph. - */ - Object?: any; + /** parameter returns the object that is actually clicked + */ + actualObject?: any; - /** returns the options of the scale element. - */ - scaleElement?: HTMLElement; + /** parameter returns the selected object + */ + element?: any; - /** returns the options of feature measure element. - */ - currentElement?: HTMLElement; + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** returns the value of the feature measure bar. - */ - Value?: number; - } + /** parameter to specify whether or not to cancel the event + */ + cancel?: boolean; + } - export interface DrawIndicatorEventArgs { + export interface DragEventArgs { - /** returns an object to customize bullet graph indicator text and symbol before rendering it. - */ - indicatorSettings?: any; + /** parameter returns the node or connector that is being dragged + */ + element?: any; - /** returns the object of bullet graph. - */ - model?: any; + /** parameter returns the previous position of the node/connector + */ + oldValue?: any; - /** returns the type of event. - */ - type?: string; + /** parameter returns the new position of the node/connector + */ + newValue?: any; - /** for canceling the event. - */ - cancel?: boolean; - } + /** parameter returns the state of drag event (Starting, dragging, completed) + */ + dragState?: string; - export interface DrawLabelsEventArgs { - - /** returns the object of the bullet graph. - */ - Object?: any; - - /** returns the options of the scale element. - */ - scaleElement?: HTMLElement; - - /** returns the current label element. - */ - tickElement?: HTMLElement; - - /** returns the label type. - */ - labelType?: string; - } - - export interface DrawQualitativeRangesEventArgs { - - /** returns the object of the bullet graph. - */ - Object?: any; - - /** returns the index of current range. - */ - rangeIndex?: number; - - /** returns the settings for current range. - */ - rangeOptions?: any; - - /** returns the end value of current range. - */ - rangeEndValue?: number; - } - - export interface LoadEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } - - export interface CaptionSettingsFont { - - /** Specifies the color of the text in caption. - * @Default {null} - */ - color?: string; - - /** Specifies the fontFamily of caption. Caption text render with this fontFamily - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the fontStyle of caption - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.BulletGraph.FontStyle | string; - - /** Specifies the fontWeight of caption - * @Default {regular} - */ - fontWeight?: ej.datavisualization.BulletGraph.FontWeight | string; - - /** Specifies the opacity of caption. Caption text render with this opacity. - * @Default {1} - */ - opacity?: number; - - /** Specifies the size of caption. Caption text render with this size - * @Default {12px} - */ - size?: string; - } - - export interface CaptionSettingsIndicatorFont { - - /** Specifies the color of the indicator's text. - * @Default {null} - */ - color?: string; - - /** Specifies the fontFamily of indicator. Indicator text render with this fontFamily. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the fontStyle of indicator. Indicator text render with this fontStyle. See FontStyle - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.BulletGraph.FontStyle | string; - - /** Specifies the fontWeight of indicator. Indicator text render with this fontWeight. See FontWeight - * @Default {regular} - */ - fontWeight?: ej.datavisualization.BulletGraph.FontWeight | string; - - /** Specifies the opacity of indicator text. Indicator text render with this Opacity. - * @Default {1} - */ - opacity?: number; - - /** Specifies the size of indicator. Indicator text render with this size. - * @Default {12px} - */ - size?: string; - } - - export interface CaptionSettingsIndicatorLocation { - - /** Specifies the horizontal position of the indicator. - * @Default {10} - */ - x?: number; - - /** Specifies the vertical position of the indicator. - * @Default {60} - */ - y?: number; - } - - export interface CaptionSettingsIndicatorSymbolBorder { - - /** Specifies the border color of indicator symbol. - * @Default {null} - */ - color?: string; - - /** Specifies the border width of indicator symbol. - * @Default {1} - */ - width?: number; - } - - export interface CaptionSettingsIndicatorSymbolSize { - - /** Specifies the height of indicator symbol. - * @Default {10} - */ - height?: number; - - /** Specifies the width of indicator symbol. - * @Default {10} - */ - width?: number; - } - - export interface CaptionSettingsIndicatorSymbol { - - /** Contains property to customize the border of indicator symbol. - */ - border?: CaptionSettingsIndicatorSymbolBorder; - - /** Specifies the color of indicator symbol. - * @Default {null} - */ - color?: string; - - /** Specifies the URL of image that represents indicator symbol. - */ - imageURL?: string; - - /** Specifies the opacity of indicator symbol. - * @Default {1} - */ - opacity?: number; - - /** Specifies the shape of indicator symbol. - */ - shape?: string; - - /** Contains property to customize the size of indicator symbol. - */ - size?: CaptionSettingsIndicatorSymbolSize; - } - - export interface CaptionSettingsIndicator { - - /** Contains property to customize the font of indicator. - */ - font?: CaptionSettingsIndicatorFont; - - /** Contains property to customize the location of indicator. - */ - location?: CaptionSettingsIndicatorLocation; - - /** Specifies the padding to be applied when text position is used. - * @Default {2} - */ - padding?: number; - - /** Contains property to customize the symbol of indicator. - */ - symbol?: CaptionSettingsIndicatorSymbol; - - /** Specifies the text to be displayed as indicator text. By default difference between current value and target will be displayed - */ - text?: string; - - /** Specifies the alignment of indicator with respect to scale based on text position - * @Default {'Near'} - */ - textAlignment?: ej.datavisualization.BulletGraph.TextAlignment | string; - - /** Specifies where indicator text should be anchored when indicator overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. - * Anchoring is not applicable for float position. - * @Default {'start'} - */ - textAnchor?: ej.datavisualization.BulletGraph.TextAnchor | string; - - /** indicator text render in the specified angle. - * @Default {0} - */ - textAngle?: number; - - /** Specifies where indicator should be placed - * @Default {'float'} - */ - textPosition?: ej.datavisualization.BulletGraph.TextPosition | string; - - /** Specifies the space between indicator symbol and text. - * @Default {3} - */ - textSpacing?: number; - - /** Specifies whether indicator will be visible or not. - * @Default {false} - */ - visible?: boolean; - } - - export interface CaptionSettingsLocation { - - /** Specifies the position in horizontal direction - * @Default {17} - */ - x?: number; - - /** Specifies the position in horizontal direction - * @Default {30} - */ - y?: number; - } - - export interface CaptionSettingsSubTitleFont { - - /** Specifies the color of the subtitle's text. - * @Default {null} - */ - color?: string; - - /** Specifies the fontFamily of subtitle. Subtitle text render with this fontFamily. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the fontStyle of subtitle. Subtitle text render with this fontStyle. See FontStyle - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.BulletGraph.FontStyle | string; - - /** Specifies the fontWeight of subtitle. Subtitle text render with this fontWeight. See FontWeight - * @Default {regular} - */ - fontWeight?: ej.datavisualization.BulletGraph.FontWeight | string; - - /** Specifies the opacity of subtitle. Subtitle text render with this opacity. - * @Default {1} - */ - opacity?: number; - - /** Specifies the size of subtitle. Subtitle text render with this size. - * @Default {12px} - */ - size?: string; - } - - export interface CaptionSettingsSubTitleLocation { - - /** Specifies the horizontal position of the subtitle. - * @Default {10} - */ - x?: number; - - /** Specifies the vertical position of the subtitle. - * @Default {45} - */ - y?: number; - } - - export interface CaptionSettingsSubTitle { - - /** Contains property to customize the font of subtitle. - */ - font?: CaptionSettingsSubTitleFont; - - /** Contains property to customize the location of subtitle. - */ - location?: CaptionSettingsSubTitleLocation; - - /** Specifies the padding to be applied when text position is used. - * @Default {5} - */ - padding?: number; - - /** Specifies the text to be displayed as subtitle. - */ - text?: string; - - /** Specifies the alignment of sub title text with respect to scale. Alignment will not be applied in float position. - * @Default {'Near'} - */ - textAlignment?: ej.datavisualization.BulletGraph.TextAlignment | string; - - /** Specifies where subtitle text should be anchored when sub title text overlaps with other caption group text. Text will be anchored when overlapping - * caption group text are at same position. Anchoring is not applicable for float position. - * @Default {'start'} - */ - textAnchor?: ej.datavisualization.BulletGraph.TextAnchor | string; - - /** Subtitle render in the specified angle. - * @Default {0} - */ - textAngle?: number; - - /** Specifies where sub title text should be placed. - * @Default {'float'} - */ - textPosition?: ej.datavisualization.BulletGraph.TextPosition | string; - } - - export interface CaptionSettings { - - /** Specifies whether trim the labels will be true or false. - * @Default {true} - */ - enableTrim?: boolean; - - /** Contains property to customize the font of caption. - */ - font?: CaptionSettingsFont; - - /** Contains property to customize the indicator. - */ - indicator?: CaptionSettingsIndicator; - - /** Contains property to customize the location. - */ - location?: CaptionSettingsLocation; - - /** Specifies the padding to be applied when text position is used. - * @Default {5} - */ - padding?: number; - - /** Contains property to customize the subtitle. - */ - subTitle?: CaptionSettingsSubTitle; - - /** Specifies the text to be displayed on bullet graph. - */ - text?: string; - - /** Specifies the alignment of caption text with respect to scale. This property will not be applied when text position is float. - * @Default {'Near'} - */ - textAlignment?: ej.datavisualization.BulletGraph.TextAlignment | string; - - /** Specifies caption text anchoring when caption text overlaps with other caption group text. - * Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. - * @Default {'start'} - */ - textAnchor?: ej.datavisualization.BulletGraph.TextAnchor | string; - - /** Specifies the angel in which the caption is rendered. - * @Default {0} - */ - textAngle?: number; - - /** Specifies how caption text should be placed. - * @Default {'float'} - */ - textPosition?: ej.datavisualization.BulletGraph.TextPosition | string; - } - - export interface QualitativeRange { - - /** Specifies the ending range to which the qualitative ranges will render. - * @Default {3} - */ - rangeEnd?: number; - - /** Specifies the opacity for the qualitative ranges. - * @Default {1} - */ - rangeOpacity?: number; - - /** Specifies the stroke for the qualitative ranges. - * @Default {null} - */ - rangeStroke?: string; - } - - export interface QuantitativeScaleSettingsComparativeMeasureSettings { - - /** Specifies the stroke of the comparative measure. - * @Default {null} - */ - stroke?: number; - - /** Specifies the width of the comparative measure. - * @Default {5} - */ - width?: number; - } - - export interface QuantitativeScaleSettingsFeaturedMeasureSettings { - - /** Specifies the Stroke of the featured measure in bullet graph. - * @Default {null} - */ - stroke?: number; - - /** Specifies the width of the featured measure in bullet graph. - * @Default {2} - */ - width?: number; - } - - export interface QuantitativeScaleSettingsFeatureMeasure { - - /** Specifies the category of feature measure. - * @Default {null} - */ - category?: string; - - /** Comparative measure render till the specified value. - * @Default {null} - */ - comparativeMeasureValue?: number; - - /** Feature measure render till the specified value. - * @Default {null} - */ - value?: number; - } - - export interface QuantitativeScaleSettingsFields { - - /** Specifies the category of the bullet graph. - * @Default {null} - */ - category?: string; - - /** Comparative measure render based on the values in the specified field. - * @Default {null} - */ - comparativeMeasure?: string; - - /** Specifies the dataSource for the bullet graph. - * @Default {null} - */ - dataSource?: any; - - /** Feature measure render based on the values in the specified field. - * @Default {null} - */ - featureMeasures?: string; - - /** Specifies the query for fetching the values form data source to render the bullet graph. - * @Default {null} - */ - query?: string; - - /** Specifies the name of the table. - * @Default {null} - */ - tableName?: string; - } - - export interface QuantitativeScaleSettingsLabelSettingsFont { - - /** Specifies the fontFamily of labels in bullet graph. Labels render with this fontFamily. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the fontStyle of labels in bullet graph. Labels render with this fontStyle. See FontStyle - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.BulletGraph.FontStyle | string; - - /** Specifies the fontWeight of labels in bullet graph. Labels render with this fontWeight. See FontWeight - * @Default {regular} - */ - fontWeight?: ej.datavisualization.BulletGraph.FontWeight | string; - - /** Specifies the opacity of labels in bullet graph. Labels render with this opacity - * @Default {1} - */ - opacity?: number; - } - - export interface QuantitativeScaleSettingsLabelSettings { - - /** Contains property to customize the font of the labels in bullet graph. - */ - font?: QuantitativeScaleSettingsLabelSettingsFont; - - /** Specifies the placement of labels in bullet graph scale. - * @Default {outside} - */ - labelPlacement?: ej.datavisualization.BulletGraph.LabelPlacement | string; - - /** Specifies the prefix to be added with labels in bullet graph. - * @Default {Empty string} - */ - labelPrefix?: string; - - /** Specifies the suffix to be added after labels in bullet graph. - * @Default {Empty string} - */ - labelSuffix?: string; - - /** Specifies the horizontal/vertical padding of labels. - * @Default {15} - */ - offset?: number; - - /** Specifies the position of the labels to render either above or below the graph. See Position - * @Default {below} - */ - position?: ej.datavisualization.BulletGraph.LabelPosition | string; - - /** Specifies the Size of the labels. - * @Default {12} - */ - size?: number; - - /** Specifies the stroke color of the labels in bullet graph. - * @Default {null} - */ - stroke?: string; - } - - export interface QuantitativeScaleSettingsLocation { - - /** This property specifies the x position for rendering quantitative scale. - * @Default {10} - */ - x?: number; - - /** This property specifies the y position for rendering quantitative scale. - * @Default {10} - */ - y?: number; - } - - export interface QuantitativeScaleSettingsMajorTickSettings { - - /** Specifies the size of the major ticks. - * @Default {13} - */ - size?: number; - - /** Specifies the stroke color of the major tick lines. - * @Default {null} - */ - stroke?: string; - - /** Specifies the width of the major tick lines. - * @Default {2} - */ - width?: number; - } - - export interface QuantitativeScaleSettingsMinorTickSettings { - - /** Specifies the size of minor ticks. - * @Default {7} - */ - size?: number; - - /** Specifies the stroke color of minor ticks in bullet graph. - * @Default {null} - */ - stroke?: string; - - /** Specifies the width of the minor ticks in bullet graph. - * @Default {2} - */ - width?: number; - } - - export interface QuantitativeScaleSettings { - - /** Contains property to customize the comparative measure. - */ - comparativeMeasureSettings?: QuantitativeScaleSettingsComparativeMeasureSettings; - - /** Contains property to customize the featured measure. - */ - featuredMeasureSettings?: QuantitativeScaleSettingsFeaturedMeasureSettings; - - /** Contains property to customize the featured measure. - */ - featureMeasures?: QuantitativeScaleSettingsFeatureMeasure[]; - - /** Contains property to customize the fields. - */ - fields?: QuantitativeScaleSettingsFields; - - /** Specifies the interval for the Graph. - * @Default {1} - */ - interval?: number; - - /** Contains property to customize the labels. - */ - labelSettings?: QuantitativeScaleSettingsLabelSettings; - - /** Contains property to customize the position of the quantitative scale - */ - location?: QuantitativeScaleSettingsLocation; - - /** Contains property to customize the major tick lines. - */ - majorTickSettings?: QuantitativeScaleSettingsMajorTickSettings; - - /** Specifies the maximum value of the Graph. - * @Default {10} - */ - maximum?: number; - - /** Specifies the minimum value of the Graph. - * @Default {0} - */ - minimum?: number; - - /** Contains property to customize the minor ticks. - */ - minorTickSettings?: QuantitativeScaleSettingsMinorTickSettings; - - /** The specified number of minor ticks will be rendered per interval. - * @Default {4} - */ - minorTicksPerInterval?: number; - - /** Specifies the placement of ticks to render either inside or outside the scale. - * @Default {ej.datavisualization.BulletGraph.TickPlacement.Outside} - */ - tickPlacement?: ej.datavisualization.BulletGraph.TickPlacement | string; - - /** Specifies the position of the ticks to render either above,below or inside - * @Default {ej.datavisualization.BulletGraph.TickPosition.Far} - */ - tickPosition?: ej.datavisualization.BulletGraph.TickPosition | string; - } - - export interface TooltipSettings { - - /** Specifies template for caption tooltip - * @Default {null} - */ - captionTemplate?: string; - - /** Toggles the visibility of caption tooltip - * @Default {false} - */ - enableCaptionTooltip?: boolean; - - /** Specifies the ID of a div, which is to be displayed as tooltip. - * @Default {null} - */ - template?: string; - - /** Toggles the visibility of tooltip - * @Default {true} - */ - visible?: boolean; - } - } - namespace BulletGraph { - enum FontStyle { - //string - Normal, - //string - Italic, - //string - Oblique, - } - } - namespace BulletGraph { - enum FontWeight { - //string - Normal, - //string - Bold, - //string - Bolder, - //string - Lighter, - } - } - namespace BulletGraph { - enum TextAlignment { - //string - Near, - //string - Far, - //string - Center, - } - } - namespace BulletGraph { - enum TextAnchor { - //string - Start, - //string - Middle, - //string - End, - } - } - namespace BulletGraph { - enum TextPosition { - //string - Top, - //string - Right, - //string - Left, - //string - Bottom, - //string - Float, - } - } - namespace BulletGraph { - enum FlowDirection { - //string - Forward, - //string - Backward, - } - } - namespace BulletGraph { - enum Orientation { - //string - Horizontal, - //string - Vertical, - } - } - namespace BulletGraph { - enum LabelPlacement { - //string - Inside, - //string - Outside, - } - } - namespace BulletGraph { - enum LabelPosition { - //string - Above, - //string - Below, - } - } - namespace BulletGraph { - enum TickPlacement { - //string - Inside, - //string - Outside, - } - } - namespace BulletGraph { - enum TickPosition { - //string - Below, - //string - Above, - //string - Cross, - } - } - - class Barcode extends ej.Widget { - static fn: Barcode; - constructor(element: JQuery | Element, options?: Barcode.Model); - static Locale: any; - model: Barcode.Model; - defaults: Barcode.Model; - - /** To disable the barcode - * @returns {void} - */ - disable(): void; - - /** To enable the barcode - * @returns {void} - */ - enable(): void; - } - export namespace Barcode { - - export interface Model { - - /** Specifies the distance between the barcode and text below it. - */ - barcodeToTextGapHeight?: number; - - /** Specifies the height of bars in the Barcode. By modifying the barHeight, the entire barcode height can be customized. - * Please refer to xDimension for two dimensional barcode height customization. - */ - barHeight?: number; - - /** Specifies the dark bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. - */ - darkBarColor?: any; - - /** Specifies whether the text below the barcode is visible or hidden. - */ - displayText?: boolean; - - /** Specifies whether the control is enabled. - */ - enabled?: boolean; - - /** Specifies the start and stop encode symbol in the Barcode. In one dimensional barcodes, an additional character is added as start and stop delimiters. - * These symbols are optional and the unique of the symbol allows the reader to determine the direction of the barcode being scanned. - */ - encodeStartStopSymbol?: number; - - /** Specifies the light bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. - */ - lightBarColor?: any; - - /** Specifies the width of the narrow bars in the barcode. The dark bars in the one dimensional barcode contains random narrow and wide bars based on - * the provided input which can be specified during initialization. - */ - narrowBarWidth?: number; - - /** Specifies the width of the quiet zone. In barcode, a quiet zone is the blank margin on either side of a barcode which informs the reader where a barcode's symbology starts and stops. - * The purpose of a quiet zone is to prevent the reader from picking up unrelated information. - */ - quietZone?: QuietZone; - - /** Specifies the type of the Barcode. See SymbologyType - */ - symbologyType?: ej.datavisualization.Barcode.SymbologyType | string; - - /** Specifies the text to be encoded in the barcode. - */ - text?: string; - - /** Specifies the color of the text/data at the bottom of the barcode. - */ - textColor?: any; - - /** Specifies the width of the wide bars in the barcode. One dimensional barcode usually contains random narrow and wide bars based on the provided which can be customized during initialization. - */ - wideBarWidth?: number; - - /** Specifies the width of the narrowest element(bar or space) in a barcode. The greater the x dimension, the more easily a barcode reader will scan. - */ - xDimension?: number; - - /** Fires after Barcode control is loaded. */ - load?(e: LoadEventArgs): void; - } - - export interface LoadEventArgs { - - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** returns the barcode model - */ - model?: any; - - /** returns the name of the event - */ - type?: string; - - /** return the barcode state - */ - status?: boolean; - } - - export interface QuietZone { - - /** Specifies the quiet zone around the Barcode. - */ - all?: number; - - /** Specifies the bottom quiet zone of the Barcode. - */ - bottom?: number; - - /** Specifies the left quiet zone of the Barcode. - */ - left?: number; - - /** Specifies the right quiet zone of the Barcode. - */ - right?: number; - - /** Specifies the top quiet zone of the Barcode. - */ - top?: number; - } - } - namespace Barcode { - enum SymbologyType { - //Represents the QR code - QRBarcode, - //Represents the Data Matrix barcode - DataMatrix, - //Represents the Code 39 barcode - Code39, - //Represents the Code 39 Extended barcode - Code39Extended, - //Represents the Code 11 barcode - Code11, - //Represents the Codabar barcode - Codabar, - //Represents the Code 32 barcode - Code32, - //Represents the Code 93 barcode - Code93, - //Represents the Code 93 Extended barcode - Code93Extended, - //Represents the Code 128 A barcode - Code128A, - //Represents the Code 128 B barcode - Code128B, - //Represents the Code 128 C barcode - Code128C, - } - } - - class Map extends ej.Widget { - static fn: Map; - constructor(element: JQuery | Element, options?: Map.Model); - static Locale: any; - model: Map.Model; - defaults: Map.Model; - - /** Method for navigating to specific shape based on latitude, longitude and zoom level. - * @param {number} Pass the latitude value for map - * @param {number} Pass the longitude value for map - * @param {number} Pass the zoom level for map - * @returns {void} - */ - navigateTo(latitude: number, longitude: number, level: number): void; - - /** Method to perform map panning - * @param {string} Pass the direction in which map should be panned - * @returns {void} - */ - pan(direction: string): void; - - /** Method to reload the map. - * @returns {void} - */ - refresh(): void; - - /** Method to reload the shapeLayers with updated values - * @returns {void} - */ - refreshLayers(): void; - - /** Method to reload the navigation control with updated values. - * @param {any} Pass the navigation control instance - * @returns {void} - */ - refreshNavigationControl(navigation: any): void; - - /** Method to perform map zooming. - * @param {number} Pass the zoom level for map to be zoomed - * @param {boolean} Pass the boolean value to enable or disable animation while zooming - * @returns {void} - */ - zoom(level: number, isAnimate: boolean): void; - } - export namespace Map { - - export interface Model { - - /** Specifies the background color for map - * @Default {transparent} - */ - background?: string; - - /** Specifies the index of the map to determine the shape layer to be displayed - * @Default {0} - */ - baseMapIndex?: number; - - /** Specify the center position where map should be displayed - * @Default {[0,0]} - */ - centerPosition?: any; - - /** Enables or Disables the map animation - * @Default {false} - */ - enableAnimation?: boolean; - - /** Enables or Disables the animation for layer change in map - * @Default {false} - */ - enableLayerChangeAnimation?: boolean; - - /** Enables or Disables the map panning - * @Default {true} - */ - enablePan?: boolean; - - /** Determines whether map need to resize when container is resized - * @Default {true} - */ - enableResize?: boolean; - - /** Enables or Disables the Zooming for map. - */ - zoomSettings?: ZoomSettings; - - /** Enables or Disables the navigation control for map to perform zooming and panning on map shapes. - */ - navigationControl?: NavigationControl; - - /** Layer for holding the map shapes - */ - layers?: Layer[]; - - /** Triggered on selecting the map markers. */ - markerSelected?(e: MarkerSelectedEventArgs): void; - - /** Triggers while leaving the hovered map shape */ - mouseleave?(e: MouseleaveEventArgs): void; - - /** Triggers while hovering the map shape. */ - mouseover?(e: MouseoverEventArgs): void; - - /** Triggers once map render completed. */ - onRenderComplete?(e: OnRenderCompleteEventArgs): void; - - /** Triggers when map panning ends. */ - panned?(e: PannedEventArgs): void; - - /** Triggered on selecting the map shapes. */ - shapeSelected?(e: ShapeSelectedEventArgs): void; - - /** Triggered when map is zoomed-in. */ - zoomedIn?(e: ZoomedInEventArgs): void; - - /** Triggers when map is zoomed out. */ - zoomedOut?(e: ZoomedOutEventArgs): void; - } + /** parameter returns whether or not to cancel the drag event + */ + cancel?: boolean; - export interface MarkerSelectedEventArgs { - - /** Returns marker object. - */ - originalEvent?: any; - } - - export interface MouseleaveEventArgs { + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** Returns hovered map shape object. - */ - originalEvent?: any; - } + /** parameter returns the offset of the selecteditems + */ + offset?: any; + } - export interface MouseoverEventArgs { + export interface DragEnterEventArgs { - /** Returns hovered map shape object. - */ - originalEvent?: any; - } + /** parameter returns the node or connector that is dragged into diagram + */ + element?: any; - export interface OnRenderCompleteEventArgs { + /** parameter returns whether to add or remove the symbol from diagram + */ + cancel?: boolean; - /** Event parameters from map - */ - originalEvent?: any; - } + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - export interface PannedEventArgs { + export interface DragLeaveEventArgs { - /** Event parameters from map - */ - originalEvent?: any; - } + /** parameter returns the node or connector that is dragged outside of the diagram + */ + element?: any; - export interface ShapeSelectedEventArgs { + /** parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; - /** Returns selected shape object. - */ - originalEvent?: any; - } + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - export interface ZoomedInEventArgs { + export interface DragOverEventArgs { - /** Event parameters from map - */ - originalEvent?: any; + /** parameter returns the node or connector that is dragged over diagram + */ + element?: any; - /** Returns zoom level value for which the map is zoomed. - */ - zoomLevel?: any; - } + /** parameter defines whether the symbol can be dropped at the current mouse position + */ + allowDrop?: boolean; - export interface ZoomedOutEventArgs { + /** parameter returns the node/connector over which the symbol is dragged + */ + target?: any; - /** Event parameters from map - */ - originalEvent?: any; + /** parameter returns the previous position of the node/connector + */ + oldValue?: any; - /** Returns zoom level value for which the map is zoomed. - */ - zoomLevel?: any; - } + /** parameter returns the new position of the node/connector + */ + newValue?: any; - export interface ZoomSettings { + /** parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; - /** Enables or Disables the zooming of map - * @Default {true} - */ - enableZoom?: boolean; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** Enables or Disables the zoom on selecting the map shape - * @Default {false} - */ - enableZoomOnSelection?: boolean; + export interface DropEventArgs { - /** Specifies the zoom factor for map zoom value. - * @Default {1} - */ - factor?: number; + /** parameter returns node or connector that is being dropped + */ + element?: any; - /** Specifies the zoom level value for which map to be zoomed - * @Default {1} - */ - level?: number; - - /** Specifies the minimum zoomSettings level of the map - * @Default {1} - */ - minValue?: number; - - /** Specifies the maximum zoom level of the map - * @Default {100} - */ - maxValue?: number; - } - - export interface NavigationControl { - - /** Set the absolutePosition for navigation control - * @Default {{x:0,y:0}} - */ - absolutePosition?: any; - - /** Specifies the navigation control template for map - * @Default {null} - */ - content?: string; - - /** Set the dockPosition value for navigation control - * @Default {centerleft} - */ - dockPosition?: ej.datavisualization.Map.Position | string; - - /** Enables or Disables the Navigation for handling zooming map - * @Default {false} - */ - enableNavigation?: boolean; - - /** Set the orientation value for navigation control - * @Default {vertical} - */ - orientation?: ej.datavisualization.Map.LabelOrientation | string; - } - - export interface LayersBubbleSettingsColorMappingsRangeColorMapping { - - /** Start range colorMappings in the bubble layer. - * @Default {null} - */ - from?: number; - - /** End range colorMappings in the bubble layer. - * @Default {null} - */ - to?: number; - - /** GradientColors in the bubble layer of map. - */ - gradientColors?: any[]; - - /** Color of the bubble layer. - * @Default {null} - */ - color?: string; - } - - export interface LayersBubbleSettingsColorMappings { - - /** Specifies the range colorMappings in the bubble layer. - * @Default {null} - */ - rangeColorMapping?: LayersBubbleSettingsColorMappingsRangeColorMapping[]; - } - - export interface LayersBubbleSettings { - - /** Specifies the bubble Opacity value of bubbles for shape layer in map - * @Default {0.9} - */ - bubbleOpacity?: number; - - /** Specifies the mouse hover color of the shape layer in map - * @Default {gray} - */ - color?: string; - - /** Specifies the colorMappings of the shape layer in map - * @Default {null} - */ - colorMappings?: LayersBubbleSettingsColorMappings; - - /** Specifies the bubble color valuePath of the shape layer in map - * @Default {null} - */ - colorValuePath?: string; - - /** Specifies the maximum size value of bubbles for shape layer in map - * @Default {20} - */ - maxValue?: number; - - /** Specifies the minimum size value of bubbles for shape layer in map - * @Default {10} - */ - minValue?: number; - - /** Specifies the showBubble visibility status map - * @Default {true} - */ - showBubble?: boolean; - - /** Specifies the tooltip visibility status of the shape layer in map - * @Default {false} - */ - showTooltip?: boolean; - - /** Specifies the bubble tooltip template of the shape layer in map - * @Default {null} - */ - tooltipTemplate?: string; - - /** Specifies the bubble valuePath of the shape layer in map - * @Default {null} - */ - valuePath?: string; - } - - export interface LayersLabelSettings { - - /** enable or disable the enableSmartLabel property - * @Default {false} - */ - enableSmartLabel?: boolean; - - /** set the labelLength property - * @Default {'2'} - */ - labelLength?: number; - - /** set the labelPath property - * @Default {null} - */ - labelPath?: string; - - /** The property specifies whether to show labels or not. - * @Default {false} - */ - showLabels?: boolean; - - /** set the smartLabelSize property - * @Default {fixed} - */ - smartLabelSize?: ej.datavisualization.Map.LabelSize | string; - } - - export interface LayersLegendSettings { - - /** Determines whether the legend should be placed outside or inside the map bounds - * @Default {false} - */ - dockOnMap?: boolean; - - /** Determines the legend placement and it is valid only when dockOnMap is true - * @Default {top} - */ - dockPosition?: ej.datavisualization.Map.DockPosition | string; - - /** height value for legend setting - * @Default {0} - */ - height?: number; - - /** to get icon value for legend setting - * @Default {rectangle} - */ - icon?: ej.datavisualization.Map.LegendIcons | string; - - /** icon height value for legend setting - * @Default {20} - */ - iconHeight?: number; - - /** icon Width value for legend setting - * @Default {20} - */ - iconWidth?: number; - - /** set the orientation of legend labels - * @Default {vertical} - */ - labelOrientation?: ej.datavisualization.Map.LabelOrientation | string; - - /** to get leftLabel value for legend setting - * @Default {null} - */ - leftLabel?: string; - - /** to get mode of legend setting - * @Default {default} - */ - mode?: ej.datavisualization.Map.Mode | string; - - /** set the position of legend settings - * @Default {topleft} - */ - position?: ej.datavisualization.Map.Position | string; - - /** x position value for legend setting - * @Default {0} - */ - positionX?: number; - - /** y position value for legend setting - * @Default {0} - */ - positionY?: number; - - /** to get rightLabel value for legend setting - * @Default {null} - */ - rightLabel?: string; - - /** Enables or Disables the showLabels - * @Default {false} - */ - showLabels?: boolean; - - /** Enables or Disables the showLegend - * @Default {false} - */ - showLegend?: boolean; - - /** to get title of legend setting - * @Default {null} - */ - title?: string; - - /** to get type of legend setting - * @Default {layers} - */ - type?: ej.datavisualization.Map.LegendType | string; - - /** width value for legend setting - * @Default {0} - */ - width?: number; - } - - export interface LayersShapeSettingsColorMappingsRangeColorMapping { - - /** Specifies the start range colorMappings in the shape layer of map. - * @Default {null} - */ - from?: number; - - /** Specifies the to range colorMappings in the shape layer of map. - * @Default {null} - */ - to?: number; - - /** Specifies the gradientColors in the shape layer of map. - * @Default {null} - */ - gradientColors?: any[]; - } - - export interface LayersShapeSettingsColorMappingsEqualColorMapping { - - /** Specifies the equalColorMapping value in the shape layer of map. - * @Default {null} - */ - value?: string; - - /** Specifies the equalColorMapping color in the shape layer of map. - * @Default {null} - */ - color?: string; - } - - export interface LayersShapeSettingsColorMappings { - - /** Specifies the range colorMappings in the shape layer of map. - * @Default {null} - */ - rangeColorMapping?: LayersShapeSettingsColorMappingsRangeColorMapping[]; - - /** Specifies the equalColorMapping in the shape layer of map. - * @Default {null} - */ - equalColorMapping?: LayersShapeSettingsColorMappingsEqualColorMapping[]; - } - - export interface LayersShapeSettings { - - /** Enables or Disables the auto fill colors for shape layer in map. When this property value set to true, shapes will be filled with palette colors. - * @Default {false} - */ - autoFill?: boolean; - - /** Specifies the colorMappings of the shape layer in map - * @Default {null} - */ - colorMappings?: LayersShapeSettingsColorMappings; - - /** Specifies the shape color palette value of the shape layer in map. Accepted colorPalette values are palette1, palette2, palette3 and custompalette. - * @Default {palette1} - */ - colorPalette?: ej.datavisualization.Map.ColorPalette | string; - - /** Specifies the shape color valuePath of the shape layer in map - * @Default {null} - */ - colorValuePath?: string; - - /** Enables or Disables the gradient colors for map shapes. - * @Default {false} - */ - enableGradient?: boolean; - - /** Specifies the shape fill color of the shape layer in map - * @Default {#E5E5E5} - */ - fill?: string; - - /** Specifies the mouse over width of the shape layer in map - * @Default {1} - */ - highlightBorderWidth?: number; - - /** Specifies the mouse hover color of the shape layer in map - * @Default {gray} - */ - highlightColor?: string; - - /** Specifies the mouse over stroke color of the shape layer in map - * @Default {#C1C1C1} - */ - highlightStroke?: string; - - /** Specifies the shape selection color of the shape layer in map - * @Default {gray} - */ - selectionColor?: string; - - /** Specifies the shape selection stroke color of the shape layer in map - * @Default {#C1C1C1} - */ - selectionStroke?: string; - - /** Specifies the shape selection stroke width of the shape layer in map - * @Default {1} - */ - selectionStrokeWidth?: number; - - /** Specifies the shape stroke color of the shape layer in map - * @Default {#C1C1C1} - */ - stroke?: string; - - /** Specifies the shape stroke thickness value of the shape layer in map - * @Default {0.2} - */ - strokeThickness?: number; - - /** Specifies the shape valuePath of the shape layer in map - * @Default {null} - */ - valuePath?: string; - } - - export interface Layer { - - /** to get the type of bing map. - * @Default {aerial} - */ - bingMapType?: ej.datavisualization.Map.BingMapType | string; - - /** Specifies the bubble settings for map - */ - bubbleSettings?: LayersBubbleSettings; - - /** Specifies the datasource for the shape layer - */ - dataSource?: any; - - /** Specifies the data path of shape - */ - shapeDataPath?: string; - - /** Specifies the data path of shape - */ - shapePropertyPath?: string; - - /** Enables or disables the shape mouse hover - * @Default {false} - */ - enableMouseHover?: boolean; - - /** Enables or disables the shape selection - * @Default {true} - */ - enableSelection?: boolean; - - /** to get the key of bing map - * @Default {null} - */ - key?: string; - - /** Options for enabling and configuring labelSettings labelPath, smartLabelSize, labelLength etc., - */ - labelSettings?: LayersLabelSettings; - - /** Specifies the map view type. - * @Default {'geographic'} - */ - geometryType?: ej.datavisualization.Map.GeometryType | string; - - /** Specifies the map type. - * @Default {'geometry'} - */ - layerType?: ej.datavisualization.Map.LayerType | string; - - /** Options for enabling and configuring legendSettings position, height, width, mode, type etc., - */ - legendSettings?: LayersLegendSettings; - - /** Specifies the map items template for shapes. - */ - mapItemsTemplate?: string; - - /** Specify markers for shape layer. - * @Default {[]} - */ - markers?: any[]; - - /** Specifies the map marker template for map layer. - * @Default {null} - */ - markerTemplate?: string; - - /** Specify selectedMapShapes for shape layer - * @Default {[]} - */ - selectedMapShapes?: any[]; - - /** Specifies the selection mode of the map. Accepted selection mode values are Default and Multiple. - * @Default {default} - */ - selectionMode?: ej.datavisualization.Map.SelectionMode | string; - - /** Specifies the shape data for the shape layer - */ - shapeData?: any; - - /** Specifies the shape settings of map layer - */ - shapeSettings?: LayersShapeSettings; - - /** Shows or hides the map items. - * @Default {false} - */ - showMapItems?: boolean; - - /** Shows or hides the tooltip for shapes - * @Default {false} - */ - showTooltip?: boolean; - - /** Specifies the tooltip template for shapes. - */ - tooltipTemplate?: string; - - /** Specifies the URL template for the OSM type map. - * @Default {'http://a.tile.openstreetmap.org/level/tileX/tileY.png'} - */ - urlTemplate?: string; - } - } - namespace Map { - enum Position { - //specifies the none position - None, - //specifies the topleft position - Topleft, - //specifies the topcenter position - Topcenter, - //specifies the topright position - Topright, - //specifies the centerleft position - Centerleft, - //specifies the center position - Center, - //specifies the centerright position - Centerright, - //specifies the bottomleft position - Bottomleft, - //specifies the bottomcenter position - Bottomcenter, - //specifies the bottomright position - Bottomright, - } - } - namespace Map { - enum LabelOrientation { - //specifies the horizontal position - Horizontal, - //specifies the vertical position - Vertical, - } - } - namespace Map { - enum BingMapType { - //specifies the aerial type - Aerial, - //specifies the aerialwithlabel type - Aerialwithlabel, - //specifies the road type - Road, - } - } - namespace Map { - enum LabelSize { - //specifies the fixed size - Fixed, - //specifies the default size - Default, - } - } - namespace Map { - enum GeometryType { - //specifies the geographic view of map - Geographic, - //specifies the normal land view of map - Normal, - } - } - namespace Map { - enum LayerType { - //specifies the geometry type - Geometry, - //specifies the osm type - Osm, - //specifies the bing type - Bing, - } - } - namespace Map { - enum DockPosition { - //specifies the top position - Top, - //specifies the bottom position - Bottom, - //specifies the bottom position - Right, - //specifies the left position - Left, - } - } - namespace Map { - enum LegendIcons { - //specifies the rectangle position - Rectangle, - //specifies the circle position - Circle, - } - } - namespace Map { - enum Mode { - //specifies the default mode - Default, - //specifies the interactive mode - Interactive, - } - } - namespace Map { - enum LegendType { - //specifies the layers type - Layers, - //specifies the bubbles type - Bubbles, - } - } - namespace Map { - enum SelectionMode { - //specifies the default position - Default, - //specifies the multiple position - Multiple, - } - } - namespace Map { - enum ColorPalette { - //specifies the palette1 color - Palette1, - //specifies the palette2 color - Palette2, - //specifies the palette3 color - Palette3, - //specifies the custom color - Custompalette, - } - } - - class TreeMap extends ej.Widget { - static fn: TreeMap; - constructor(element: JQuery | Element, options?: TreeMap.Model); - static Locale: any; - model: TreeMap.Model; - defaults: TreeMap.Model; - - /** Method to reload treemap with updated values. - * @returns {void} - */ - refresh(): void; - } - export namespace TreeMap { - - export interface Model { - - /** Specifies the border brush color of the treemap - * @Default {white} - */ - borderBrush?: string; - - /** Specifies the border thickness of the treemap - * @Default {1} - */ - borderThickness?: number; - - /** Specifies the uniColorMapping settings of the treemap - */ - uniColorMapping?: UniColorMapping; - - /** Specifies the desaturationColorMapping settings of the treemap - */ - desaturationColorMapping?: DesaturationColorMapping; - - /** Specifies the paletteColorMapping of the treemap - */ - paletteColorMapping?: PaletteColorMapping; - - /** Specifies the color value path of the treemap - * @Default {null} - */ - colorValuePath?: string; - - /** Specifies the datasource of the treemap - * @Default {null} - */ - dataSource?: any; - - /** Specifies the dockPosition for legend - * @Default {top} - */ - dockPosition?: ej.datavisualization.TreeMap.DockPosition | string; - - /** specifies the drillDown header color - * @Default {'null'} - */ - drillDownHeaderColor?: string; - - /** specifies the drillDown selection color - * @Default {'#000000'} - */ - drillDownSelectionColor?: string; - - /** Specifies whether datasource is hierarchical or not. - * @Default {false} - */ - isHierarchicalDatasource?: boolean; - - /** Specifies the header for parent item during drilldown. This is applicable only for hierarchical data source. - * @Default {null} - */ - header?: string; - - /** Enable/Disable the drillDown for treemap - * @Default {false} - */ - enableDrillDown?: boolean; - - /** Controls whether Treemap has to be responsive while resizing the window. - * @Default {true} - */ - isResponsive?: boolean; - - /** Specifies whether treemap need to resize when container is resized - * @Default {true} - */ - enableResize?: boolean; - - /** This property is used to select treemap items while clicking and dragging - * @Default {false} - */ - draggingOnSelection?: boolean; - - /** This property is used to select group of treemap items while clicking and dragging - * @Default {false} - */ - draggingGroupOnSelection?: boolean; - - /** Specifies the group color mapping of the treemap - * @Default {[]} - */ - groupColorMapping?: GroupColorMapping[]; - - /** Specifies the legend settings of the treemap - */ - legendSettings?: LegendSettings; - - /** Specifies the highlight border brush of treemap - * @Default {gray} - */ - highlightBorderBrush?: string; - - /** Specifies the border thickness when treemap items is highlighted in the treemap - * @Default {5} - */ - highlightBorderThickness?: number; - - /** Specifies the highlight border brush of treemap - * @Default {gray} - */ - highlightGroupBorderBrush?: string; - - /** Specifies the border thickness when treemap items is highlighted in the treemap - * @Default {5} - */ - highlightGroupBorderThickness?: number; - - /** Specifies whether treemap item need to highlighted on selection - * @Default {false} - */ - highlightGroupOnSelection?: boolean; - - /** Specifies whether treemap item need to highlighted on selection - * @Default {false} - */ - highlightOnSelection?: boolean; - - /** Specifies the items layout mode of the treemap. Accepted itemsLayoutMode values are Squarified, SliceAndDiceHorizontal, SliceAndDiceVertical and SliceAndDiceAuto - * @Default {Squarified} - */ - itemsLayoutMode?: ej.datavisualization.TreeMap.ItemsLayoutMode | string; - - /** Specifies the leaf settings of the treemap - */ - leafItemSettings?: LeafItemSettings; - - /** Specifies the rangeColorMapping settings of the treemap - * @Default {[]} - */ - rangeColorMapping?: RangeColorMapping[]; - - /** Specifies the selection mode of treemap item. Accepted selection mode values are Default and Multiple. - * @Default {default} - */ - selectionMode?: ej.datavisualization.TreeMap.selectionMode | string; - - /** Specifies the selection mode of the treemap. Accepted selection mode values are Default and Multiple. - * @Default {default} - */ - groupSelectionMode?: ej.datavisualization.TreeMap.groupSelectionMode | string; - - /** Specifies the legend visibility status of the treemap - * @Default {false} - */ - showLegend?: boolean; - - /** Specifies whether gradient color has to be applied for treemap items - * @Default {false} - */ - enableGradient?: boolean; - - /** Specifies whether treemap showTooltip need to be visible - */ - showTooltip?: boolean; - - /** Specifies the tooltip template of the treemap - * @Default {null} - */ - tooltipTemplate?: string; - - /** Hold the treeMapItems to be displayed in treemap - * @Default {[]} - */ - treeMapItems?: any[]; - - /** Specify levels of treemap for grouped visualization of data - * @Default {[]} - */ - levels?: Level[]; - - /** Specifies the weight value path of the treemap - * @Default {null} - */ - weightValuePath?: string; - - /** Triggers on treemap item selected. */ - treeMapItemSelected?(e: TreeMapItemSelectedEventArgs): void; - } - - export interface TreeMapItemSelectedEventArgs { - - /** Returns selected treeMapItem object. - */ - originalEvent?: any; - } - - export interface UniColorMapping { - - /** Specifies the uniform color mapping of the treemap - * @Default {null} - */ - color?: string; - } - - export interface DesaturationColorMapping { - - /** Specifies the to value for desaturation color mapping - * @Default {0} - */ - to?: number; - - /** Specifies the color for desaturationColorMapping - * @Default {null} - */ - color?: string; - - /** Specifies the from value for desaturation color mapping - * @Default {0} - */ - from?: number; - - /** Specifies the rangeMaximum value for desaturation color mapping - * @Default {0} - */ - rangeMaximum?: number; - - /** Specifies the rangeMinimum value for desaturation color mapping - * @Default {0} - */ - rangeMinimum?: number; - } - - export interface PaletteColorMapping { - - /** Specifies the colors of the paletteColorMapping - * @Default {[]} - */ - colors?: any[]; - } - - export interface GroupColorMapping { - - /** Specifies the groupID for GroupColorMapping. - * @Default {null} - */ - groupID?: string; - } - - export interface LegendSettings { - - /** Specifies the height for legend - * @Default {30} - */ - height?: number; - - /** Specifies the width for legend - * @Default {100} - */ - width?: number; - - /** Specifies the iconHeight for legend - * @Default {15} - */ - iconHeight?: number; - - /** Specifies the iconWidth for legend - * @Default {15} - */ - iconWidth?: number; - - /** Specifies the template for legendSettings - * @Default {null} - */ - template?: string; - - /** Specifies the mode for legendSettings whether default or interactive mode - * @Default {default} - */ - mode?: string; - - /** Specifies the title text for legend - */ - title?: string; - - /** Specifies the leftLabel text for legend - */ - leftLabel?: string; - - /** Specifies the rightLabel text for legend - */ - rightLabel?: string; - - /** Specifies the dockPosition text for legend - * @Default {top} - */ - dockPosition?: string; - - /** Specifies the alignment text for legend - * @Default {near} - */ - alignment?: string; - - /** Specifies the alignment text for legend - * @Default {0} - */ - columnCount?: number; - } - - export interface LeafItemSettings { - - /** Specifies the border brush color of the leaf item. - * @Default {white} - */ - borderBrush?: string; - - /** Specifies the border thickness of the leaf item. - * @Default {1} - */ - borderThickness?: number; - - /** Specifies the label template of the leaf item. - * @Default {null} - */ - itemTemplate?: string; - - /** Specifies the label path of the leaf item. - * @Default {null} - */ - labelPath?: string; - - /** Specifies the position of the leaf labels. - * @Default {center} - */ - labelPosition?: ej.datavisualization.TreeMap.Position | string; - - /** Specifies the mode of label visibility - * @Default {visible} - */ - labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode | string; - - /** Shows or hides the label of the leaf item. - * @Default {false} - */ - showLabels?: boolean; - } - - export interface RangeColorMapping { - - /** Specifies the color value for rangeColorMapping. - * @Default {null} - */ - color?: string; - - /** specifies the gradient colors for th given range value - * @Default {[]} - */ - gradientColors?: any[]; - - /** Specifies the from value for rangeColorMapping. - * @Default {-1} - */ - from?: number; - - /** Specifies the legend label value for rangeColorMapping. - * @Default {null} - */ - legendLabel?: string; - - /** Specifies the to value for rangeColorMapping. - * @Default {-1} - */ - to?: number; - } - - export interface Level { - - /** specifies the group background - * @Default {null} - */ - groupBackground?: string; - - /** Specifies the group border color for tree map level. - * @Default {null} - */ - groupBorderColor?: string; - - /** Specifies the group border thickness for tree map level. - * @Default {1} - */ - groupBorderThickness?: number; - - /** Specifies the group gap for tree map level. - * @Default {1} - */ - groupGap?: number; - - /** Specifies the group padding for tree map level. - * @Default {4} - */ - groupPadding?: number; - - /** Specifies the group path for tree map level. - */ - groupPath?: string; - - /** Specifies the header height for tree map level. - * @Default {0} - */ - headerHeight?: number; - - /** Specifies the header template for tree map level. - * @Default {null} - */ - headerTemplate?: string; - - /** Specifies the mode of header visibility - * @Default {visible} - */ - headerVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode | string; - - /** Specifies the position of the labels. - * @Default {center} - */ - labelPosition?: ej.datavisualization.TreeMap.Position | string; - - /** Specifies the label template for tree map level. - * @Default {null} - */ - labelTemplate?: string; - - /** Specifies the mode of label visibility - * @Default {visible} - */ - labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode | string; - - /** Shows or hides the header for tree map level. - * @Default {false} - */ - showHeader?: boolean; - - /** Shows or hides the labels for tree map level. - * @Default {false} - */ - showLabels?: boolean; - } - } - namespace TreeMap { - enum DockPosition { - //specifies the top position - Top, - //specifies the bottom position - Bottom, - //specifies the bottom position - Right, - //specifies the left position - Left, - } - } - namespace TreeMap { - enum ItemsLayoutMode { - //specifies the squarified as layout type position - Squarified, - //specifies the sliceanddicehorizontal as layout type position - Sliceanddicehorizontal, - //specifies the sliceanddicevertical as layout type position - Sliceanddicevertical, - //specifies the sliceanddiceauto as layout type position - Sliceanddiceauto, - } - } - namespace TreeMap { - enum Position { - //specifies the none position - None, - //specifies the topleft position - Topleft, - //specifies the topcenter position - Topcenter, - //specifies the topright position - Topright, - //specifies the centerleft position - Centerleft, - //specifies the center position - Center, - //specifies the centerright position - Centerright, - //specifies the bottomleft position - Bottomleft, - //specifies the bottomcenter position - Bottomcenter, - //specifies the bottomright position - Bottomright, - } - } - namespace TreeMap { - enum VisibilityMode { - //specifies the visible mode - Top, - //specifies the hide on exceeded length mode - Hideonexceededlength, - } - } - namespace TreeMap { - enum selectionMode { - //specifies the default mode - Default, - //specifies the multiple mode - Multiple, - } - } - namespace TreeMap { - enum groupSelectionMode { - //specifies the default mode - Default, - //specifies the multiple mode - Multiple, - } - } - - class Diagram extends ej.Widget { - static fn: Diagram; - constructor(element: JQuery | Element, options?: Diagram.Model); - static Locale: any; - model: Diagram.Model; - defaults: Diagram.Model; - - /** Add nodes and connectors to diagram at runtime - * @param {any} a JSON to define a node/connector or an array of nodes and connector - * @returns {boolean} - */ - add(node: any): boolean; - - /** Add a label to a node at runtime - * @param {string} name of the node to which label will be added - * @param {any} JSON for the new label to be added - * @returns {void} - */ - addLabel(nodeName: string, newLabel: any): void; - - /** Add dynamic Lanes to swimlane at runtime - * @param {any} JSON for the new lane to be added - * @param {number} Index value to add the lane in swimlane - * @returns {void} - */ - addLane(lane: any, index: number): void; - - /** Add a phase to a swimlane at runtime - * @param {string} name of the swimlane to which the phase will be added - * @param {any} JSON object to define the phase to be added - * @returns {void} - */ - addPhase(name: string, options: any): void; - - /** Add a collection of ports to the node specified by name - * @param {string} name of the node to which the ports have to be added - * @param {Array} a collection of ports to be added to the specified node - * @returns {void} - */ - addPorts(name: string, ports: any[]): void; - - /** Add the specified node to selection list - * @param {any} the node to be selected - * @param {boolean} to define whether to clear the existing selection or not - * @returns {void} - */ - addSelection(node: any, clearSelection?: boolean): void; - - /** Align the selected objects based on the reference object and direction - * @param {string} to specify the direction towards which the selected objects are to be aligned("left","right",top","bottom") - * @returns {void} - */ - align(direction: string): void; - - /** Bring the specified portion of the diagram content to the diagram viewport - * @param {any} the rectangular region that is to be brought into diagram viewport - * @returns {void} - */ - bringIntoView(rect: any): void; - - /** Bring the specified portion of the diagram content to the center of the diagram viewport - * @param {any} the rectangular region that is to be brought to the center of diagram viewport - * @returns {void} - */ - bringToCenter(rect: any): void; - - /** Visually move the selected object over all other intersected objects - * @returns {void} - */ - bringToFront(): void; - - /** Remove all the elements from diagram - * @returns {void} - */ - clear(): void; - - /** Clears the actions which is recorded to perform undo/redo operation in the diagram. - * @returns {void} - */ - clearHistory(): void; - - /** Remove the current selection in diagram - * @returns {void} - */ - clearSelection(): void; - - /** Copy the selected object to internal clipboard and get the copied object - * @returns {any} - */ - copy(): any; - - /** Cut the selected object from diagram to diagram internal clipboard - * @returns {void} - */ - cut(): void; - - /** Export the diagram as downloadable files or as data - * @param {Diagram.Options} options to export the desired region of diagram to the desired formats. - * @returns {string} - */ - exportDiagram(options?: Diagram.Options): string; - - /** Read a node/connector object by its name - * @param {string} name of the node/connector that is to be identified - * @returns {any} - */ - findNode(name: string): any; - - /** Fit the diagram content into diagram viewport - * @param {string} to set the mode of fit to command. See [Fit Mode](/api/js/global#fitmode) - * @param {string} to set whether the region to be fit will be based on diagram elements or page settings [Region](/api/js/global#region) - * @param {any} to set the required margin - * @returns {void} - */ - fitToPage(mode?: string, region?: string, margin?: any): void; - - /** Group the selected nodes and connectors - * @returns {void} - */ - group(): void; - - /** Insert a label into a node's label collection at runtime - * @param {string} name of the node to which the label has to be inserted - * @param {any} JSON to define the new label - * @param {number} index to insert the label into the node - * @returns {void} - */ - insertLabel(name: string, label: any, index?: number): void; - - /** Refresh the diagram with the specified layout - * @returns {void} - */ - layout(): void; - - /** Load the diagram - * @param {any} JSON data to load the diagram - * @returns {void} - */ - load(data: any): void; - - /** Visually move the selected object over its closest intersected object - * @returns {void} - */ - moveForward(): void; - - /** Move the selected objects by either one pixel or by the pixels specified through argument - * @param {string} specifies the direction to move the selected objects ("left","right",top","bottom") - * @param {number} specifies the number of pixels by which the selected objects have to be moved - * @returns {void} - */ - nudge(direction: string, delta?: number): void; - - /** Paste the selected object from internal clipboard to diagram - * @param {any} object to be added to diagram - * @param {boolean} to define whether the specified object is to be renamed or not - * @returns {void} - */ - paste(object?: any, rename?: boolean): void; - - /** Print the diagram as image - * @returns {void} - */ - print(): void; - - /** Restore the last action that was reverted - * @returns {void} - */ - redo(): void; - - /** Refresh the diagram at runtime - * @returns {void} - */ - refresh(): void; - - /** Remove either the given node/connector or the selected element from diagram - * @param {any} the node/connector to be removed from diagram - * @returns {void} - */ - remove(node?: any): void; - - /** Remove a particular object from selection list - * @param {any} the node/connector to be removed from selection list - * @returns {void} - */ - removeSelection(node: any): void; - - /** Scale the selected objects to the height of the first selected object - * @returns {void} - */ - sameHeight(): void; - - /** Scale the selected objects to the size of the first selected object - * @returns {void} - */ - sameSize(): void; - - /** Scale the selected objects to the width of the first selected object - * @returns {void} - */ - sameWidth(): void; - - /** Returns the diagram as serialized JSON - * @returns {any} - */ - save(): any; - - /** Bring the node into view - * @param {any} the node/connector to be brought into view - * @returns {void} - */ - scrollToNode(node: any): void; - - /** Select all nodes and connector in diagram - * @returns {void} - */ - selectAll(): void; - - /** Visually move the selected object behind its closest intersected object - * @returns {void} - */ - sendBackward(): void; - - /** Visually move the selected object behind all other intersected objects - * @returns {void} - */ - sendToBack(): void; - - /** Update the horizontal space between the selected objects as equal and within the selection boundary - * @returns {void} - */ - spaceAcross(): void; - - /** Update the vertical space between the selected objects as equal and within the selection boundary - * @returns {void} - */ - spaceDown(): void; - - /** Move the specified label to edit mode - * @param {any} node/connector that contains the label to be edited - * @param {any} to be edited - * @returns {void} - */ - startLabelEdit(node: any, label: any): void; - - /** Reverse the last action that was performed - * @returns {void} - */ - undo(): void; - - /** Ungroup the selected group - * @returns {void} - */ - ungroup(): void; - - /** Update diagram at runtime - * @param {any} JSON to specify the diagram properties that have to be modified - * @returns {void} - */ - update(options: any): void; - - /** Update Connectors at runtime - * @param {string} name of the connector to be updated - * @param {any} JSON to specify the connector properties that have to be updated - * @returns {void} - */ - updateConnector(name: string, options: any): void; - - /** Update the given label at runtime - * @param {string} the name of node/connector which contains the label to be updated - * @param {any} the label to be modified - * @param {any} JSON to specify the label properties that have to be updated - * @returns {any} - */ - updateLabel(nodeName: string, label: any, options: any): any; - - /** Update nodes at runtime - * @param {string} name of the node that is to be updated - * @param {any} JSON to specify the properties of node that have to be updated - * @returns {void} - */ - updateNode(name: string, options: any): void; - - /** Update a port with its modified properties at runtime - * @param {string} the name of node which contains the port to be updated - * @param {any} the port to be updated - * @param {any} JSON to specify the properties of the port that have to be updated - * @returns {void} - */ - updatePort(nodeName: string, port: any, options: any): void; - - /** Update the specified node as selected object - * @param {string} name of the node to be updated as selected object - * @returns {void} - */ - updateSelectedObject(name: string): void; - - /** Update the selection at runtime - * @param {boolean} to specify whether to show the user handles or not - * @returns {void} - */ - updateSelection(showUserHandles?: boolean): void; - - /** Update user handles with respect to the given node - * @param {any} node/connector with respect to which, the user handles have to be updated - * @returns {void} - */ - updateUserHandles(node: any): void; - - /** Update the diagram viewport at runtime - * @returns {void} - */ - updateViewPort(): void; - - /** Upgrade the diagram from old version - * @param {any} to be upgraded - * @returns {void} - */ - upgrade(data: any): void; - - /** Used to zoomIn/zoomOut diagram - * @param {Diagram.Zoom} options to zoom the diagram(zoom factor, zoomIn/zoomOut) - * @returns {void} - */ - zoomTo(Zoom?: Diagram.Zoom): void; - } - export namespace Diagram { - - export interface Options { - - /** name of the file to be downloaded. - */ - fileName?: string; - - /** format of the exported file/data. See [File Formats](/api/js/global#fileformats). - */ - format?: string; - - /** to set whether to export diagram as a file or as raw data. See [Export Modes](/api/js/global#exportmodes). - */ - mode?: string; - - /** to set the region of the diagram to be exported. See [Region](/api/js/global#region). - */ - region?: string; - - /** to export any custom region of diagram. - */ - bounds?: any; - - /** to set margin to the exported data. - */ - margin?: any; - - /** to set stretch to the exported data. - */ - stretch?: string; - } - - export interface Zoom { - - /** Used to increase the zoom-in or zoom-out based on the zoom factor value. - */ - zoomFactor?: number; - - /** Used to zoom-in or zoom-out the diagram. - */ - zoomCommand?: ej.datavisualization.Diagram.ZoomCommand; - - /** Used to zoom-in or zoom-out the diagram based on the point. - */ - focusPoint?: ej.datavisualization.Diagram.ConnectorsSourcePoint; - } - - export interface Model { - - /** Defines the background color of diagram elements - * @Default {transparent} - */ - backgroundColor?: string; - - /** Defines the path of the background image of diagram elements - */ - backgroundImage?: string; - - /** Sets the direction of line bridges. - * @Default {ej.datavisualization.Diagram.BridgeDirection.Top} - */ - bridgeDirection?: ej.datavisualization.Diagram.BridgeDirection | string; - - /** Defines a set of custom commands and binds them with a set of desired key gestures. - */ - commandManager?: CommandManager; - - /** A collection of JSON objects where each object represents a connector - * @Default {[]} - */ - connectors?: Connector[]; - - /** Binds the custom JSON data with connector properties - * @Default {null} - */ - connectorTemplate?: any; - - /** Enables/Disables the default behaviors of the diagram. - * @Default {ej.datavisualization.Diagram.DiagramConstraints.All} - */ - constraints?: ej.datavisualization.Diagram.DiagramConstraints | string; - - /** An object to customize the context menu of diagram - */ - contextMenu?: ContextMenu; - - /** Configures the data source that is to be bound with diagram - */ - dataSourceSettings?: DataSourceSettings; - - /** Initializes the default values for nodes and connectors - * @Default {{}} - */ - defaultSettings?: DefaultSettings; - - /** Sets the type of JSON object to be drawn through drawing tool - * @Default {{}} - */ - drawType?: any; - - /** Enables or disables auto scroll in diagram - * @Default {true} - */ - enableAutoScroll?: boolean; - - /** Enables or disables diagram context menu - * @Default {true} - */ - enableContextMenu?: boolean; - - /** Specifies the height of the diagram - * @Default {null} - */ - height?: string; - - /** Customizes the undo redo functionality - */ - historyManager?: HistoryManager; - - /** Defines the type of the rendering mode of label. - * @Default {Html} - */ - labelRenderingMode?: ej.datavisualization.Diagram.LabelRenderingMode | string; - - /** Automatically arranges the nodes and connectors in a predefined manner. - */ - layout?: Layout; - - /** Defines the current culture of diagram - * @Default {en-US} - */ - locale?: string; + /** parameter returns whether or not to cancel the drop event + */ + cancel?: boolean; - /** Array of JSON objects where each object represents a node - * @Default {[]} - */ - nodes?: Node[]; + /** parameter returns the object from where the element is dragged + */ + source?: any; - /** Binds the custom JSON data with node properties - * @Default {null} - */ - nodeTemplate?: any; + /** parameter returns the object over which the object will be dropped + */ + target?: any; - /** Defines the size and appearance of diagram page - */ - pageSettings?: PageSettings; + /** parameter returns the enum which defines the type of the source + */ + objectType?: string; - /** Defines the zoom value, zoom factor, scroll status and view port size of the diagram - */ - scrollSettings?: ScrollSettings; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** Defines the size and position of selected items and defines the appearance of selector - */ - selectedItems?: SelectedItems; + export interface EditorFocusChangeEventArgs { - /** Enables or disables tooltip of diagram - * @Default {true} - */ - showTooltip?: boolean; + /** Returns the diagram model. + */ + model?: any; - /** Defines the gridlines and defines how and when the objects have to be snapped - */ - snapSettings?: SnapSettings; + /** parameter returns the editor element + */ + event?: any; - /** Enables/Disables the interactive behaviors of diagram. - * @Default {ej.datavisualization.Diagram.Tool.All} - */ - tool?: ej.datavisualization.Diagram.Tool | string; + /** Returns the name of the event + */ + type?: string; - /** An object that defines the description, appearance and alignments of tooltips - * @Default {null} - */ - tooltip?: Tooltip; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** Specifies the width of the diagram - * @Default {null} - */ - width?: string; + export interface GroupChangeEventArgs { - /** Sets the factor by which we can zoom in or zoom out - * @Default {0.2} - */ - zoomFactor?: number; + /** parameter returns the object that is added to/removed from a group + */ + element?: any; - /** Triggers When auto scroll is changed */ - autoScrollChange?(e: AutoScrollChangeEventArgs): void; + /** parameter returns the old parent group(if any) of the object + */ + oldParent?: any; - /** Triggers when a node, connector or diagram is clicked */ - click?(e: ClickEventArgs): void; + /** parameter returns the new parent group(if any) of the object + */ + newParent?: any; - /** Triggers when the connection is changed */ - connectionChange?(e: ConnectionChangeEventArgs): void; + /** parameter returns the cause of group change("group", unGroup") + */ + cause?: string; - /** Triggers when the connector collection is changed */ - connectorCollectionChange?(e: ConnectorCollectionChangeEventArgs): void; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** Triggers when the connectors' source point is changed */ - connectorSourceChange?(e: ConnectorSourceChangeEventArgs): void; + export interface HistoryChangeEventArgs { - /** Triggers when the connectors' target point is changed */ - connectorTargetChange?(e: ConnectorTargetChangeEventArgs): void; + /** An array of objects, where each object represents the changes made in last undo/redo. To explore how the changes are defined, refer [Undo Redo Changes](#undo-redo-changes) + */ + changes?: any[]; - /** Triggers before opening the context menu */ - contextMenuBeforeOpen?(e: ContextMenuBeforeOpenEventArgs): void; + /** A collection of objects that are changed in the last undo/redo + */ + Source?: any[]; - /** Triggers when a context menu item is clicked */ - contextMenuClick?(e: ContextMenuClickEventArgs): void; + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** Triggers when a node, connector or diagram model is clicked twice */ - doubleClick?(e: DoubleClickEventArgs): void; + /** parameter to specify whether or not to cancel the event + */ + cancel?: boolean; - /** Triggers while dragging the elements in diagram */ - drag?(e: DragEventArgs): void; + /** parameter returns the model of the diagram + */ + cause?: boolean; + } - /** Triggers when a symbol is dragged into diagram from symbol palette */ - dragEnter?(e: DragEnterEventArgs): void; + export interface ItemClickEventArgs { - /** Triggers when a symbol is dragged outside of the diagram. */ - dragLeave?(e: DragLeaveEventArgs): void; + /** parameter returns the object that was actually clicked + */ + actualObject?: any; - /** Triggers when a symbol is dragged over diagram */ - dragOver?(e: DragOverEventArgs): void; + /** parameter returns the object that is selected + */ + selectedObject?: any; - /** Triggers when a symbol is dragged and dropped from symbol palette to drawing area */ - drop?(e: DropEventArgs): void; + /** parameter returns whether or not to cancel the drop event + */ + cancel?: boolean; - /** Triggers when editor got focus at the time of node's label or text node editing. */ - editorFocusChange?(e: EditorFocusChangeEventArgs): void; + /** parameter returns the model of the diagram + */ + event?: any; - /** Triggers when a child is added to or removed from a group */ - groupChange?(e: GroupChangeEventArgs): void; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** Triggers when a change is reverted or restored(undo/redo) */ - historyChange?(e: HistoryChangeEventArgs): void; + export interface MouseEnterEventArgs { - /** Triggers when a diagram element is clicked */ - itemClick?(e: ItemClickEventArgs): void; + /** parameter returns the target node or connector + */ + element?: any; - /** Triggers when mouse enters a node/connector */ - mouseEnter?(e: MouseEnterEventArgs): void; + /** parameter returns the object from where the selected object is dragged + */ + source?: any; - /** Triggers when mouse leaves node/connector */ - mouseLeave?(e: MouseLeaveEventArgs): void; + /** parameter returns the target object over which the selected object is dragged + */ + target?: any; - /** Triggers when mouse hovers over a node/connector */ - mouseOver?(e: MouseOverEventArgs): void; + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** Triggers when node collection is changed */ - nodeCollectionChange?(e: NodeCollectionChangeEventArgs): void; + /** parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; + } - /** Triggers when the node properties(x, y,width and height alone) are changed using nudge commands or updateNode API. */ - propertyChange?(e: PropertyChangeEventArgs): void; + export interface MouseLeaveEventArgs { - /** Triggers when the diagram elements are rotated */ - rotationChange?(e: RotationChangeEventArgs): void; + /** parameter returns the target node or connector + */ + element?: any; - /** Triggers when the diagram is zoomed or panned */ - scrollChange?(e: ScrollChangeEventArgs): void; + /** parameter returns the object from where the selected object is dragged + */ + source?: any; - /** Triggers when a connector segment is edited */ - segmentChange?(e: SegmentChangeEventArgs): void; + /** parameter returns the target object over which the selected object is dragged + */ + target?: any; - /** Triggers when the selection is changed in diagram */ - selectionChange?(e: SelectionChangeEventArgs): void; + /** parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; - /** Triggers when a node is resized */ - sizeChange?(e: SizeChangeEventArgs): void; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** Triggers when label editing is ended */ - textChange?(e: TextChangeEventArgs): void; + export interface MouseOverEventArgs { - /** Triggered when the diagram is rendered completely. */ - create?(e: CreateEventArgs): void; - } + /** parameter returns the target node or connector + */ + element?: any; - export interface AutoScrollChangeEventArgs { + /** parameter returns the object from where the element is dragged + */ + source?: any; - /** Returns the delay between subsequent auto scrolls - */ - delay?: string; + /** parameter returns the object over which the element is being dragged. + */ + target?: any; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; - export interface ClickEventArgs { + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** parameter returns the clicked node, connector or diagram - */ - element?: any; + export interface NodeCollectionChangeEventArgs { - /** parameter returns the object that is actually clicked - */ - actualObject?: number; + /** parameter returns whether the node is to be added or removed + */ + changeType?: string; - /** parameter returns the horizontal coordinate of the mouse pointer, relative to the diagram - */ - offsetX?: number; + /** parameter returns the node which needs to be added or deleted + */ + element?: any; - /** parameter returns the vertical coordinate of the mouse pointer, relative to the diagram - */ - offsetY?: number; + /** parameter defines whether to cancel the collection change or not + */ + cancel?: boolean; - /** parameter returns the count of how many times the mouse button is pressed - */ - count?: number; + /** triggers before and after adding the node in the diagram which can be differentiated through `state` argument. We can cancel the event only before adding the node + */ + state?: string; - /** parameter returns the actual click event arguments that explains which button is clicked - */ - event?: any; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + export interface PropertyChangeEventArgs { - export interface ConnectionChangeEventArgs { + /** parameter returns the selected element + */ + element?: any; - /** parameter returns the connection that is changed between nodes, ports or points - */ - element?: any; + /** parameter returns the action is nudge or not + */ + cause?: string; - /** parameter returns the new source node or target node of the connector - */ - connection?: string; + /** parameter returns the new value of the node property that is being changed + */ + newValue?: any; - /** parameter returns the new source port or target port of the connector - */ - port?: any; + /** parameter returns the old value of the property that is being changed + */ + oldValue?: any; - /** parameter defines whether to cancel the change or not - */ - cancel?: boolean; + /** parameter returns the name of the property that is changed + */ + propertyName?: string; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** parameter returns the id of the diagram + */ + diagramId?: string; - export interface ConnectorCollectionChangeEventArgs { + /** parameter defines whether to cancel the property change or not + */ + cancel?: boolean; + } - /** parameter returns whether the connector is inserted or removed - */ - changeType?: string; + export interface RotationChangeEventArgs { - /** parameter returns the connector that is to be added or deleted - */ - element?: any; + /** parameter returns the node that is rotated + */ + element?: any; - /** parameter defines whether to cancel the collection change or not - */ - cancel?: boolean; + /** parameter returns the previous rotation angle + */ + oldValue?: any; - /** triggers before and after adding the connector in the diagram which can be differentiated through `state` argument. We can cancel the event only before adding the connector. - */ - state?: string; + /** parameter returns the new rotation angle + */ + newValue?: any; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** parameter to specify whether or not to cancel the event + */ + cancel?: boolean; - export interface ConnectorSourceChangeEventArgs { + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** returns the connector, the source point of which is being dragged - */ - element?: any; + /** parameter returns the actual click event arguments that explains which button is clicked + */ + cause?: string; + } - /** returns the source node of the element - */ - node?: any; + export interface ScrollChangeEventArgs { - /** returns the source point of the element - */ - point?: any; + /** Parameter returns the new zoom value, horizontal and vertical scroll offsets. + */ + newValues?: any; - /** returns the source port of the element - */ - port?: any; + /** parameter returns the previous zoom value, horizontal and vertical scroll offsets. + */ + oldValues?: any; - /** returns the state of connection end point dragging(starting, dragging, completed) - */ - dragState?: string; + /** parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; - /** parameter defines whether to cancel the change or not - */ - cancel?: boolean; + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Parameter returns the new zoom value, horizontal and vertical scroll offsets. + */ + cause?: string; + } - export interface ConnectorTargetChangeEventArgs { + export interface SegmentChangeEventArgs { - /** parameter returns the connector, the target point of which is being dragged - */ - element?: any; + /** Parameter returns the connector that is being edited + */ + element?: any; - /** returns the target node of the element - */ - node?: any; + /** parameter returns the state of editing (starting, dragging, completed) + */ + dragState?: string; - /** returns the target point of the element - */ - point?: any; + /** parameter returns the current mouse position + */ + point?: any; - /** returns the target port of the element - */ - port?: any; + /** parameter to specify whether or not to cancel the event + */ + cancel?: boolean; - /** returns the state of connection end point dragging(starting, dragging, completed) - */ - dragState?: string; + /** parameter returns the id of the diagram + */ + diagramId?: string; + } - /** parameter defines whether to cancel the change or not - */ - cancel?: boolean; + export interface SelectionChangeEventArgs { - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** parameter returns whether the item is selected or removed selection + */ + changeType?: string; - export interface ContextMenuBeforeOpenEventArgs { + /** parameter returns the item which is selected or to be selected + */ + element?: any; - /** parameter returns the diagram object - */ - diagram?: any; + /** parameter returns the collection of nodes and connectors that have to be removed from selection list + */ + oldItems?: any[]; - /** parameter returns the actual arguments from context menu - */ - contextmenu?: any; + /** parameter returns the collection of nodes and connectors that have to be added to selection list + */ + newItems?: any[]; - /** parameter returns the object that was clicked - */ - target?: any; + /** parameter returns the collection of nodes and connectors that will be selected after selection change + */ + selectedItems?: any[]; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** parameter to specify whether or not to cancel the selection change event + */ + cancel?: boolean; - export interface ContextMenuClickEventArgs { + /** triggers before and after adding the selection to the object in the diagram which can be differentiated through `state` argument. We can cancel the event only before the selection + * of the object. + */ + state?: string; - /** parameter returns the id of the selected context menu item - */ - id?: string; + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** parameter returns the text of the selected context menu item - */ - text?: string; + /** parameter returns the actual cause of the event + */ + cause?: string; + } - /** parameter returns the parent id of the selected context menu item - */ - parentId?: string; + export interface SizeChangeEventArgs { - /** parameter returns the parent text of the selected context menu item - */ - parentText?: string; + /** parameter returns node that was resized + */ + element?: any; - /** parameter returns the object that was clicked - */ - target?: any; + /** parameter to cancel the size change + */ + cancel?: boolean; - /** parameter defines whether to execute the click event or not - */ - canExecute?: boolean; + /** parameter returns the new width, height, offsetX and offsetY values of the element that is being resized + */ + newValue?: any; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** parameter returns the previous width,height,offsetX and offsetY values of the element that is being resized + */ + oldValue?: any; - export interface DoubleClickEventArgs { + /** parameter returns the state of resizing(starting,resizing,completed) + */ + resizeState?: string; - /** parameter returns the object that is actually clicked - */ - actualObject?: any; + /** parameter returns the difference between new and old value + */ + offset?: any; - /** parameter returns the selected object - */ - element?: any; + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** parameter returns the direction of the node is resized + */ + direction?: string; + } - export interface DragEventArgs { + export interface TextChangeEventArgs { - /** parameter returns the node or connector that is being dragged - */ - element?: any; + /** parameter returns the node that contains the text being edited + */ + element?: any; - /** parameter returns the previous position of the node/connector - */ - oldValue?: any; + /** parameter returns the new text + */ + value?: string; - /** parameter returns the new position of the node/connector - */ - newValue?: any; + /** parameter returns the keyCode of the key entered + */ + keyCode?: string; - /** parameter returns the state of drag event (Starting, dragging, completed) - */ - dragState?: string; + /** parameter returns the id of the diagram + */ + diagramId?: string; - /** parameter returns whether or not to cancel the drag event - */ - cancel?: boolean; + /** parameter to specify whether or not to cancel the event + */ + cancel?: boolean; + } - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + export interface CreateEventArgs { - export interface DragEnterEventArgs { + /** Returns the diagram model. + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; + + /** parameter returns the id of the diagram + */ + diagramId?: string; + } + + export interface BackgroundImage { + + /** Defines how to align the background image over the diagram area. + * @Default {ej.datavisualization.Diagram.ImageAlignment.XMidYMid} + */ + alignment?: ej.datavisualization.Diagram.ImageAlignment|string; + } + + export interface CommandManagerCommandsGesture { + + /** Sets the key value, on recognition of which the command will be executed. + * @Default {ej.datavisualization.Diagram.Keys.None} + */ + key?: ej.datavisualization.Diagram.Keys|string; + + /** Sets a combination of key modifiers, on recognition of which the command will be executed. + * @Default {ej.datavisualization.Diagram.KeyModifiers.None} + */ + keyModifiers?: ej.datavisualization.Diagram.KeyModifiers|string; + } + + export interface CommandManagerCommands { + + /** A method that defines whether the command is executable at the moment or not. + */ + canExecute?: '() => void'; + + /** A method that defines what to be executed when the key combination is recognized. + */ + execute?: '() => void'; + + /** Defines a combination of keys and key modifiers, on recognition of which the command will be executed + */ + gesture?: CommandManagerCommandsGesture; + + /** Defines any additional parameters that are required at runtime + * @Default {null} + */ + parameter?: any; + } + + export interface CommandManager { + + /** An object that maps a set of command names with the corresponding command objects + * @Default {{}} + */ + commands?: CommandManagerCommands; + } + + export interface ConnectorsLabelsMargin { + + /** To set the margin of the label in right direction + * @Default {0} + */ + right?: number; + + /** To set the margin of the label in left direction + * @Default {0} + */ + left?: number; + + /** To set the margin of the label in top direction + * @Default {0} + */ + top?: number; + + /** To set the margin of the label in bottom direction + * @Default {0} + */ + bottom?: number; + } + + export interface ConnectorsLabel { + + /** Defines how the label should be aligned with respect to the segment + * @Default {ej.datavisualization.Diagram.Alignment.Center} + */ + alignment?: ej.datavisualization.Diagram.Alignment|string; + + /** Enables/disables the bold style + * @Default {false} + */ + bold?: boolean; + + /** Sets the border color of the label + * @Default {transparent} + */ + borderColor?: string; + + /** Sets the border width of the label + * @Default {0} + */ + borderWidth?: number; + + /** Defines whether the label should be aligned within the connector boundaries + * @Default {true} + */ + boundaryConstraints?: boolean; + + /** Sets the fill color of the text area + * @Default {transparent} + */ + fillColor?: string; + + /** Sets the font color of the text + * @Default {black} + */ + fontColor?: string; + + /** Sets the font family of the text + * @Default {Arial} + */ + fontFamily?: string; + + /** Defines the font size of the text + * @Default {12} + */ + fontSize?: number; + + /** Sets the horizontal alignment of the label. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /** Sets the hyperlink for the labels in the connectors. + * @Default {none} + */ + hyperlink?: string; + + /** Enables/disables the italic style + * @Default {false} + */ + italic?: boolean; + + /** Gets whether the label is currently being edited or not. + * @Default {ej.datavisualization.Diagram.LabelEditMode.Edit} + */ + mode?: ej.datavisualization.Diagram.LabelEditMode|string; + + /** Sets the unique identifier of the label + */ + name?: string; + + /** Sets the fraction/ratio(relative to connector) that defines the position of the label + * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} + */ + offset?: any; + + /** Sets the fraction/ratio(relative to connector) that defines the position of the label + * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} + */ + margin?: ConnectorsLabelsMargin; + + /** Defines the transparency of labels + * @Default {1} + */ + opacity?: number; + + /** Defines whether the label is editable or not + * @Default {false} + */ + readOnly?: boolean; + + /** Defines whether the label should be positioned whether relative to segments or connector boundaries + * @Default {ej.datavisualization.Diagram.LabelRelativeMode.SegmentPath} + */ + relativeMode?: ej.datavisualization.Diagram.LabelRelativeMode|string; + + /** Defines the angle to which the label needs to be rotated + * @Default {0} + */ + rotateAngle?: number; + + /** Sets the position of the label with respect to the total segment length + * @Default {0.5} + */ + segmentOffset?: string; + + /** Defines the label text + */ + text?: string; + + /** Defines how to align the text inside the label. + * @Default {ej.datavisualization.Diagram.TextAlign.Center} + */ + textAlign?: ej.datavisualization.Diagram.TextAlign|string; + + /** Sets how to decorate the label text. + * @Default {ej.datavisualization.Diagram.TextDecorations.None} + */ + textDecoration?: ej.datavisualization.Diagram.TextDecorations|string; + + /** Sets the vertical alignment of the label. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} + */ + verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /** Enables or disables the visibility of the label + * @Default {true} + */ + visible?: boolean; + + /** Sets the width of the label(the maximum value of label width and the connector width will be considered as label width) + * @Default {50} + */ + width?: number; + + /** Defines how the label text needs to be wrapped. + * @Default {ej.datavisualization.Diagram.TextWrapping.WrapWithOverflow} + */ + wrapping?: ej.datavisualization.Diagram.TextWrapping|string; + } + + export interface ConnectorsSegment { + + /** Sets the direction of orthogonal segment + */ + direction?: string; + + /** Describes the length of orthogonal segment + * @Default {undefined} + */ + length?: number; + + /** Describes the end point of bezier/straight segment + * @Default {Diagram.Point()} + */ + point?: ej.datavisualization.Diagram.ConnectorsSourcePoint; + + /** Defines the first control point of the bezier segment + * @Default {null} + */ + point1?: ej.datavisualization.Diagram.ConnectorsSourcePoint; + + /** Defines the second control point of bezier segment + * @Default {null} + */ + point2?: ej.datavisualization.Diagram.ConnectorsSourcePoint; + + /** Sets the type of the segment. + * @Default {ej.datavisualization.Diagram.Segments.Straight} + */ + type?: ej.datavisualization.Diagram.Segments|string; + + /** Describes the length and angle between the first control point and the start point of bezier segment + * @Default {null} + */ + vector1?: any; + + /** Describes the length and angle between the second control point and end point of bezier segment + * @Default {null} + */ + vector2?: any; + } + + export interface ConnectorsShapeMultiplicitySource { + + /** Defines the source label to connector. Applicable, if the connector is of type "UML" + * @Default {true} + */ + optional?: boolean; + + /** Defines the source label to connector. Applicable, if the connector is of type "UML" + * @Default {null} + */ + lowerBounds?: number; + + /** Defines the source label to connector. Applicable, if the connector is of type "UML" + * @Default {null} + */ + upperBounds?: number; + } + + export interface ConnectorsShapeMultiplicity { + + /** Sets the type of the multiplicity. Applicable, if the connector is of type "classifier" + * @Default {ej.datavisualization.Diagram.Multiplicity.OneToOne} + */ + type?: ej.datavisualization.Diagram.Multiplicity|string; + + /** Defines the source label to connector. Applicable, if the connector is of type "UML" + */ + source?: ConnectorsShapeMultiplicitySource; + + /** Defines the target label to connector. Applicable, if the connector is of type "UML" + * @Default {true} + */ + target?: ej.datavisualization.Diagram.ConnectorsShapeMultiplicitySource; + } + + export interface ConnectorsShape { + + /** Sets the type of the connector + * @Default {ej.datavisualization.Diagram.ConnectorShapes.BPMN} + */ + type?: ej.datavisualization.Diagram.ConnectorShapes|string; + + /** Sets the type of the flow in a BPMN Process + * @Default {ej.datavisualization.Diagram.BPMNFlows.Sequence} + */ + flow?: ej.datavisualization.Diagram.BPMNFlows|string; + + /** Sets the type of the Association in a BPMN Process + * @Default {ej.datavisualization.Diagram.AssociationFlows.Default} + */ + association?: ej.datavisualization.Diagram.AssociationFlows|string; + + /** Sets the type of the message flow. Applicable, if the connector is of type "BPMN" + * @Default {ej.datavisualization.Diagram.BPMNMessageFlows.Default} + */ + message?: ej.datavisualization.Diagram.BPMNMessageFlows|string; + + /** Sets the type of BPMN sequence flow + * @Default {ej.datavisualization.Diagram.BPMNSequenceFlows.Normal} + */ + sequence?: ej.datavisualization.Diagram.BPMNSequenceFlows|string; + + /** Defines the role of the connector in a UML Class Diagram. Applicable, if the type of the connector is "classifier". + * @Default {ej.datavisualization.Diagram.ClassifierShapes.Association} + */ + relationship?: ej.datavisualization.Diagram.ClassifierShapes|string; + + /** Defines the multiplicity option of the connector + * @Default {null} + */ + multiplicity?: ConnectorsShapeMultiplicity; + + /** Defines the shape of UMLActivity to connector. Applicable, if the connector is of type UMLActivity + * @Default {ej.datavisualization.Diagram.UMLActivityFlow.Control} + */ + ActivityFlow?: ej.datavisualization.Diagram.UMLActivityFlow|string; + } + + export interface ConnectorsSourceDecorator { + + /** Sets the border color of the source decorator + * @Default {black} + */ + borderColor?: string; + + /** Sets the border width of the decorator + * @Default {1} + */ + borderWidth?: number; + + /** Sets the fill color of the source decorator + * @Default {black} + */ + fillColor?: string; + + /** Sets the height of the source decorator + * @Default {8} + */ + height?: number; + + /** Defines the custom shape of the source decorator + */ + pathData?: string; + + /** Defines the shape of the source decorator. + * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} + */ + shape?: ej.datavisualization.Diagram.DecoratorShapes|string; + + /** Defines the width of the source decorator + * @Default {8} + */ + width?: number; + } + + export interface ConnectorsSourcePoint { + + /** Defines the x-coordinate of a position + * @Default {0} + */ + x?: number; + + /** Defines the y-coordinate of a position + * @Default {0} + */ + y?: number; + } + + export interface ConnectorsTargetDecorator { + + /** Sets the border color of the decorator + * @Default {black} + */ + borderColor?: string; + + /** Sets the color with which the decorator will be filled + * @Default {black} + */ + fillColor?: string; + + /** Defines the height of the target decorator + * @Default {8} + */ + height?: number; + + /** Defines the custom shape of the target decorator + */ + pathData?: string; + + /** Defines the shape of the target decorator. + * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} + */ + shape?: ej.datavisualization.Diagram.DecoratorShapes|string; + + /** Defines the width of the target decorator + * @Default {8} + */ + width?: number; + } + + export interface Connector { + + /** To maintain additional information about connectors + * @Default {null} + */ + addInfo?: any; + + /** Defines the width of the line bridges + * @Default {10} + */ + bridgeSpace?: number; + + /** Enables or disables the behaviors of connectors. + * @Default {ej.datavisualization.Diagram.ConnectorConstraints.Default} + */ + constraints?: ej.datavisualization.Diagram.ConnectorConstraints|string; + + /** Defines the radius of the rounded corner + * @Default {0} + */ + cornerRadius?: number; + + /** Configures the styles of shapes + */ + cssClass?: string; + + /** Sets the horizontal alignment of the connector. Applicable, if the parent of the connector is a container. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} + */ + horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /** A collection of JSON objects where each object represents a label. + * @Default {[]} + */ + labels?: ConnectorsLabel[]; + + /** Sets the stroke color of the connector + * @Default {black} + */ + lineColor?: string; + + /** Sets the pattern of dashes and gaps used to stroke the path of the connector + */ + lineDashArray?: string; + + /** Defines the padding value to ease the interaction with connectors + * @Default {10} + */ + lineHitPadding?: number; + + /** Sets the width of the line + * @Default {1} + */ + lineWidth?: number; + + /** Defines the minimum space to be left between the bottom of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginBottom?: number; + + /** Defines the minimum space to be left between the left of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginLeft?: number; + + /** Defines the minimum space to be left between the right of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginRight?: number; + + /** Defines the minimum space to be left between the top of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginTop?: number; + + /** Sets a unique name for the connector + */ + name?: string; + + /** Defines the transparency of the connector + * @Default {1} + */ + opacity?: number; + + /** Defines the size and preview size of the node to add that to symbol palette. To explore palette item, refer Palette Item + * @Default {null} + */ + paletteItem?: any; + + /** Sets the parent name of the connector. + */ + parent?: string; + + /** An array of JSON objects where each object represents a segment + * @Default {[ { type:straight } ]} + */ + segments?: ConnectorsSegment[]; + + /** Defines the role/meaning of the connector + * @Default {null} + */ + shape?: ConnectorsShape; + + /** Defines the source decorator of the connector + * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} + */ + sourceDecorator?: ConnectorsSourceDecorator; + + /** Sets the source node of the connector + */ + sourceNode?: string; + + /** Defines the space to be left between the source node and the source point of a connector + * @Default {0} + */ + sourcePadding?: number; + + /** Describes the start point of the connector + * @Default {ej.datavisualization.Diagram.Point()} + */ + sourcePoint?: ConnectorsSourcePoint; + + /** Sets the source port of the connector + */ + sourcePort?: string; + + /** Defines the target decorator of the connector + * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} + */ + targetDecorator?: ConnectorsTargetDecorator; + + /** Sets the target node of the connector + */ + targetNode?: string; + + /** Defines the space to be left between the target node and the target point of the connector + * @Default {0} + */ + targetPadding?: number; + + /** Describes the end point of the connector + * @Default {ej.datavisualization.Diagram.Point()} + */ + targetPoint?: ej.datavisualization.Diagram.ConnectorsSourcePoint; + + /** Sets the targetPort of the connector + */ + targetPort?: string; + + /** Defines the tooltip that should be shown when the mouse hovers over connector. For tooltip properties, refer Tooltip + * @Default {null} + */ + tooltip?: any; + + /** To set the vertical alignment of connector (Applicable,if the parent is group). + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} + */ + verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /** Enables or disables the visibility of connector + * @Default {true} + */ + visible?: boolean; + + /** Sets the z-index of the connector + * @Default {0} + */ + zOrder?: number; + } + + export interface ContextMenuItem { + + /** Defines the text for the collection of context menu item + * @Default {null} + */ + text?: string; + + /** Defines the name for the collection of context menu items + * @Default {null} + */ + name?: string; + + /** Defines the image url for the collection of context menu items + * @Default {null} + */ + imageUrl?: string; + + /** Defines the CssClass for the collection of context menu items + * @Default {null} + */ + cssClass?: string; + + /** Defines the collection of sub items for the context menu items + * @Default {[]} + */ + subItems?: any[]; + } + + export interface ContextMenu { + + /** Defines the collection of context menu items + * @Default {[]} + */ + items?: ContextMenuItem[]; + + /** To set whether to display the default context menu items or not + * @Default {false} + */ + showCustomMenuItemsOnly?: boolean; + } + + export interface DataSourceSettingsCrudAction { + + /** Specifies the create method which is used to get the nodes to be added from client side to the server side + * @Default {null} + */ + create?: string; + + /** Specifies the update method which is used to get the updated data from client side to the server side + * @Default {null} + */ + update?: string; + + /** Specifies the destroy method which is used to get the deleted items data from client side to the server side + * @Default {null} + */ + destroy?: string; + + /** Specifies the read method to get the created nodes from client side to the server side + * @Default {null} + */ + read?: string; + } + + export interface DataSourceSettingsConnectionDataSourceCrudAction { + + /** Specifies the create method which is used to get the connectors to be added from client side to the server side + * @Default {null} + */ + create?: string; + + /** Specifies the update method which is used to get the updated connectors from client side to the server side + * @Default {null} + */ + update?: string; + + /** Specifies the destroy method which is used to get the deleted items data from client side to the server side + * @Default {null} + */ + destroy?: string; + + /** Specifies the read method which is used to get the data from client side to the server side + * @Default {null} + */ + read?: string; + } + + export interface DataSourceSettingsConnectionDataSource { + + /** Sets the datasource for the connection datasource settings items. + * @Default {null} + */ + dataSource?: string; + + /** Sets the unique id of the connection data source item + * @Default {null} + */ + id?: string; + + /** Sets the sourcenode of the connection data source item + * @Default {null} + */ + sourceNode?: string; + + /** Sets the targetnode of the connection data source item + * @Default {null} + */ + targetNode?: string; + + /** Sets the sourcepoint-x value of the connection data source item + * @Default {null} + */ + sourcePointX?: string; + + /** Sets the sourcePoint-y value of the connection data source item + * @Default {null} + */ + sourcePointY?: string; + + /** Sets the targetPoint-x value of the connection data source item + * @Default {null} + */ + targetPointX?: string; + + /** Sets the targetPoint-y value of the connection data source item + * @Default {null} + */ + targetPointY?: string; + + /** Specifies the method name which is used to get updated connectors from client side to the server side + * @Default {null} + */ + crudAction?: DataSourceSettingsConnectionDataSourceCrudAction; + + /** Specifies the customfields to get the updated data from client side to the server side + * @Default {[]} + */ + customFields?: any[]; + } + + export interface DataSourceSettings { + + /** Defines the data source either as a collection of objects or as an instance of ej.DataManager + * @Default {null} + */ + dataSource?: any; + + /** Sets the unique id of the data source items + */ + id?: string; + + /** Defines the parent id of the data source item + * @Default {''} + */ + parent?: string; + + /** Describes query to retrieve a set of data from the specified datasource + * @Default {null} + */ + query?: string; + + /** Sets the unique id of the root data source item + */ + root?: string; + + /** Describes the name of the table on which the specified query has to be executed + * @Default {null} + */ + tableName?: string; + + /** Specifies the method name which is used to get the updated data from client side to the server side + * @Default {null} + */ + crudAction?: DataSourceSettingsCrudAction; + + /** Specifies the customfields to get the updated data from client side to the server side + * @Default {[]} + */ + customFields?: any[]; + + /** Defines the data source either as a collection of objects or as an instance of ej.DataManager + * @Default {null} + */ + connectionDataSource?: DataSourceSettingsConnectionDataSource; + } + + export interface DefaultSettings { + + /** Initializes the default connector properties + * @Default {null} + */ + connector?: any; + + /** Initializes the default properties of groups + * @Default {null} + */ + group?: any; + + /** Initializes the default properties for nodes + * @Default {null} + */ + node?: any; + } + + export interface HistoryManager { + + /** A method that takes a history entry as argument and returns whether the specific entry can be popped or not + */ + canPop?: '() => void'; + + /** A method that ends grouping the changes + */ + closeGroupAction?: '() => void'; + + /** A method that removes the history of a recent change made in diagram + */ + pop?: '() => void'; + + /** A method that allows to track the custom changes made in diagram + */ + push?: '() => void'; + + /** Defines what should be happened while trying to restore a custom change + * @Default {null} + */ + redo?: '() => void'; + + /** The redoStack property is used to get the number of redo actions to be stored on the history manager. Its an read-only property and the collection should not be modified. + * @Default {[]} + */ + redoStack?: any[]; + + /** The stackLimit property used to restrict the undo and redo actions to a certain limit. + * @Default {null} + */ + stackLimit?: number; + + /** A method that starts to group the changes to revert/restore them in a single undo or redo + */ + startGroupAction?: '() => void'; + + /** Defines what should be happened while trying to revert a custom change + */ + undo?: '() => void'; + + /** The undoStack property is used to get the number of undo actions to be stored on the history manager. Its an read-only property and the collection should not be modified. + * @Default {[]} + */ + undoStack?: any[]; + } + + export interface Layout { + + /** Specifies the custom bounds to arrange/align the layout + * @Default {ej.datavisualization.Diagram.Rectangle()} + */ + bounds?: any; + + /** Defines the fixed node with reference to which, the layout will be arranged and fixed node will not be repositioned + */ + fixedNode?: string; + + /** Customizes the orientation of trees/sub trees. For orientations, see Chart Orientations. For chart types, see Chart Types + * @Default {null} + */ + getLayoutInfo?: any; + + /** Defines a method to customize the segments based on source and target nodes. + * @Default {null} + */ + getConnectorSegments?: any; + + /** Sets the space to be horizontally left between nodes + * @Default {30} + */ + horizontalSpacing?: number; + + /** Defines the space to be left between layout bounds and layout. + * @Default {ej.datavisualization.Diagram.Margin()} + */ + margin?: any; + + /** Defines how to horizontally align the layout within the layout bounds + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /** Defines how to vertically align the layout within the layout bounds + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} + */ + verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /** Sets the orientation/direction to arrange the diagram elements. + * @Default {ej.datavisualization.Diagram.LayoutOrientations.TopToBottom} + */ + orientation?: ej.datavisualization.Diagram.LayoutOrientations|string; + + /** Sets the type of the layout based on which the elements will be arranged. + * @Default {ej.datavisualization.Diagram.LayoutTypes.None} + */ + type?: ej.datavisualization.Diagram.LayoutTypes|string; + + /** Sets the space to be vertically left between nodes + * @Default {30} + */ + verticalSpacing?: number; + } + + export interface NodesAnnotation { + + /** Sets the angle between the BPMN shape and the annotation + * @Default {0} + */ + angle?: number; + + /** Sets the direction of the text annotation + * @Default {ej.datavisualization.Diagram.BPMNAnnotationDirections.Left} + */ + direction?: ej.datavisualization.Diagram.BPMNAnnotationDirection|string; + + /** Sets the height of the text annotation + * @Default {20} + */ + height?: number; + + /** Sets the distance between the BPMN shape and the annotation + * @Default {0} + */ + length?: number; + + /** Defines the additional information about the flow object in a BPMN Process + */ + text?: string; + + /** Sets the width of the text annotation + * @Default {20} + */ + width?: number; + } + + export interface NodesClassAttribute { + + /** Sets the name of the attribute + */ + name?: string; + + /** Sets the data type of attribute + */ + type?: string; + + /** Defines the visibility of the attribute + * @Default {ej.datavisualization.Diagram.ScopeValueDefaults.Public} + */ + scope?: string; + } + + export interface NodesClassMethod { + + /** Sets the visibility of the method. + * @Default {ej.datavisualization.Diagram.ScopeValueDefaults.Public} + */ + scope?: string; + } + + export interface NodesClass { + + /** Sets the name of class. + */ + name?: string; + + /** Defines the collection of attributes + * @Default {[]} + */ + attributes?: NodesClassAttribute[]; + + /** Defines the collection of methods of a Class. + * @Default {[]} + */ + methods?: NodesClassMethod[]; + } + + export interface NodesCollapseIcon { + + /** Sets the border color for collapse icon of node + * @Default {black} + */ + borderColor?: string; + + /** Sets the border width for collapse icon of node + * @Default {1} + */ + borderWidth?: number; + + /** Sets the fill color for collapse icon of node + * @Default {white} + */ + fillColor?: string; + + /** Defines the height for collapse icon of node + * @Default {15} + */ + height?: number; + + /** Sets the horizontal alignment of the icon. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /** To set the margin for the collapse icon of node + * @Default {ej.datavisualization.Diagram.Margin()} + */ + margin?: any; + + /** Sets the fraction/ratio(relative to node) that defines the position of the icon + * @Default {ej.datavisualization.Diagram.Point(0.5, 1)} + */ + offset?: any; + + /** Defines the shape of the collapsed state of the node. + * @Default {ej.datavisualization.Diagram.IconShapes.None} + */ + shape?: ej.datavisualization.Diagram.IconShapes|string; + + /** Sets the vertical alignment of the icon. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} + */ + verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment|string; + } + + export interface NodesContainer { + + /** Defines the orientation of the container. Applicable, if the group is a container. + * @Default {vertical} + */ + orientation?: string; + + /** Sets the type of the container. Applicable if the group is a container. + * @Default {ej.datavisualization.Diagram.ContainerType.Canvas} + */ + type?: ej.datavisualization.Diagram.ContainerType|string; + } + + export interface NodesData { + + /** Sets the type of the BPMN Data object + * @Default {ej.datavisualization.Diagram.BPMNDataObjects.None} + */ + type?: ej.datavisualization.Diagram.BPMNDataObjects|string; + + /** Defines whether the BPMN data object is a collection or not + * @Default {false} + */ + collection?: boolean; + } + + export interface NodesEnumerationMember { + + /** Sets the name of the enumeration member + */ + name?: string; + } + + export interface NodesEnumeration { + + /** Sets the name of the Enumeration + */ + name?: string; + + /** Defines the collection of enumeration members + * @Default {[]} + */ + members?: NodesEnumerationMember[]; + } + + export interface NodesExpandIcon { + + /** Sets the border color for expand icon of node + * @Default {black} + */ + borderColor?: string; + + /** Sets the border width for expand icon of node + * @Default {1} + */ + borderWidth?: number; + + /** Sets the fill color for expand icon of node + * @Default {white} + */ + fillColor?: string; + + /** Defines the height for expand icon of node + * @Default {15} + */ + height?: number; + + /** Sets the horizontal alignment of the icon. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /** To set the margin for the expand icon of node + * @Default {ej.datavisualization.Diagram.Margin()} + */ + margin?: any; + + /** Sets the fraction/ratio(relative to node) that defines the position of the icon + * @Default {ej.datavisualization.Diagram.Point(0.5, 1)} + */ + offset?: any; + + /** Defines the shape of the expanded state of the node. + * @Default {ej.datavisualization.Diagram.IconShapes.None} + */ + shape?: ej.datavisualization.Diagram.IconShapes|string; + + /** Sets the vertical alignment of the icon. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} + */ + verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment|string; + } + + export interface NodesGradientLinearGradient { + + /** Defines the different colors and the region of color transitions + * @Default {[]} + */ + stops?: any[]; + + /** Defines the left most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + x1?: number; + + /** Defines the right most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + x2?: number; + + /** Defines the top most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + y1?: number; + + /** Defines the bottom most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + y2?: number; + } + + export interface NodesGradientRadialGradient { + + /** Defines the position of the outermost circle + * @Default {0} + */ + cx?: number; + + /** Defines the outer most circle of the radial gradient + * @Default {0} + */ + cy?: number; + + /** Defines the innermost circle of the radial gradient + * @Default {0} + */ + fx?: number; + + /** Defines the innermost circle of the radial gradient + * @Default {0} + */ + fy?: number; + + /** Defines the different colors and the region of color transitions. + * @Default {[]} + */ + stops?: any[]; + } + + export interface NodesGradientStop { + + /** Sets the color to be filled over the specified region + */ + color?: string; + + /** Sets the position where the previous color transition ends and a new color transition starts + * @Default {0} + */ + offset?: number; + + /** Describes the transparency level of the region + * @Default {1} + */ + opacity?: number; + } + + export interface NodesGradient { + + /** Paints the node with linear color transitions + */ + LinearGradient?: NodesGradientLinearGradient; + + /** Paints the node with radial color transitions. A focal point defines the beginning of the gradient, and a circle defines the end point of the gradient. + */ + RadialGradient?: NodesGradientRadialGradient; + + /** Defines the color and a position where the previous color transition ends and a new color transition starts + */ + Stop?: NodesGradientStop; + } + + export interface NodesInterfaceAttribute { + + /** Sets the name of the attribute + */ + name?: string; + + /** Sets the type of the attribute + */ + type?: string; + + /** Sets the visibility of the attribute + */ + scope?: string; + } + + export interface NodesInterfaceMethod { + + /** Sets the visibility of the method + */ + scope?: string; + } + + export interface NodesInterface { + + /** Sets the name of the interface + */ + name?: string; + + /** Defines a collection of attributes of the interface + * @Default {[]} + */ + attributes?: NodesInterfaceAttribute[]; + + /** Defines the collection of public methods of an interface + * @Default {[]} + */ + methods?: NodesInterfaceMethod[]; + } + + export interface NodesLabel { + + /** Enables/disables the bold style + * @Default {false} + */ + bold?: boolean; + + /** Sets the border color of the label + * @Default {transparent} + */ + borderColor?: string; + + /** Sets the border width of the label + * @Default {0} + */ + borderWidth?: number; + + /** Sets the fill color of the text area + * @Default {transparent} + */ + fillColor?: string; + + /** Sets the font color of the text + * @Default {black} + */ + fontColor?: string; + + /** Sets the font family of the text + * @Default {Arial} + */ + fontFamily?: string; + + /** Defines the font size of the text + * @Default {12} + */ + fontSize?: number; + + /** Sets the horizontal alignment of the label. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /** Enables/disables the italic style + * @Default {false} + */ + italic?: boolean; + + /** To set the margin of the label + * @Default {ej.datavisualization.Diagram.Margin()} + */ + margin?: any; + + /** Gets whether the label is currently being edited or not. + * @Default {ej.datavisualization.Diagram.LabelEditMode.Edit} + */ + mode?: ej.datavisualization.Diagram.LabelEditMode|string; + + /** Sets the unique identifier of the label + */ + name?: string; + + /** Sets the fraction/ratio(relative to node) that defines the position of the label + * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} + */ + offset?: any; + + /** Defines the transparency of the labels + * @Default {1} + */ + opacity?: number; + + /** Sets the overflowType of the labels + * @Default {ej.datavisualization.Diagram.OverflowType.Ellipsis} + */ + overflowType?: ej.datavisualization.Diagram.OverflowType|string; + + /** Defines whether the label is editable or not + * @Default {false} + */ + readOnly?: boolean; + + /** Defines the angle to which the label needs to be rotated + * @Default {0} + */ + rotateAngle?: number; + + /** Defines the label text + */ + text?: string; + + /** Defines how to align the text inside the label. + * @Default {ej.datavisualization.Diagram.TextAlign.Center} + */ + textAlign?: ej.datavisualization.Diagram.TextAlign|string; + + /** Sets how to decorate the label text. + * @Default {ej.datavisualization.Diagram.TextDecorations.None} + */ + textDecoration?: ej.datavisualization.Diagram.TextDecorations|string; + + /** Defines the overflowed content is displayed or not. + * @Default {false} + */ + textOverflow?: boolean; + + /** Sets the vertical alignment of the label. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} + */ + verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /** Enables or disables the visibility of the label + * @Default {true} + */ + visible?: boolean; + + /** Sets the width of the label(the maximum value of label width and the node width will be considered as label width) + * @Default {50} + */ + width?: number; + + /** Defines how the label text needs to be wrapped. + * @Default {ej.datavisualization.Diagram.TextWrapping.WrapWithOverflow} + */ + wrapping?: ej.datavisualization.Diagram.TextWrapping|string; + } + + export interface NodesLane { + + /** Defines the width of lane + * @Default {0} + */ + width?: number; + + /** Defines the height of lane + * @Default {0} + */ + height?: number; + + /** Defines the z-index of the lane + * @Default {0} + */ + zorder?: number; + + /** Allows to maintain additional information about lane + * @Default {{}} + */ + addInfo?: any; + + /** An array of objects where each object represents a child node of the lane + * @Default {[]} + */ + children?: any[]; + + /** Defines the fill color of the lane + * @Default {white} + */ + fillColor?: string; + + /** Defines the header of the lane + * @Default {{ text: Function, fontSize: 11 }} + */ + header?: any; + + /** Defines the object as a lane + * @Default {false} + */ + isLane?: boolean; + + /** Sets the unique identifier of the lane + */ + name?: string; + + /** Sets the orientation of the lane. + * @Default {vertical} + */ + orientation?: string; + } + + export interface NodesPaletteItem { + + /** Defines whether the symbol should be drawn at its actual size regardless of precedence factors or not + * @Default {true} + */ + enableScale?: boolean; + + /** Defines the height of the symbol + * @Default {0} + */ + height?: number; + + /** To display a name for nodes in the symbol palette + * @Default {null} + */ + label?: string; + + /** Defines the margin of the symbol item + * @Default {{ left: 4, right: 4, top: 4, bottom: 4 }} + */ + margin?: any; + + /** Defines the preview height of the symbol + * @Default {undefined} + */ + previewHeight?: number; + + /** Defines the preview width of the symbol + * @Default {undefined} + */ + previewWidth?: number; + + /** Defines the width of the symbol + * @Default {0} + */ + width?: number; + } + + export interface NodesPhase { + + /** Defines the header of the smaller regions + * @Default {null} + */ + label?: any; + + /** Defines the line color of the splitter that splits adjacent phases. + * @Default {#606060} + */ + lineColor?: string; + + /** Sets the dash array that used to stroke the phase splitter + * @Default {3,3} + */ + lineDashArray?: string; + + /** Sets the lineWidth of the phase + * @Default {1} + */ + lineWidth?: number; + + /** Sets the unique identifier of the phase + */ + name?: string; + + /** Sets the length of the smaller region(phase) of a swimlane + * @Default {100} + */ + offset?: number; + + /** Sets the orientation of the phase + * @Default {horizontal} + */ + orientation?: string; + + /** Sets the type of the object as phase + * @Default {phase} + */ + type?: string; + } + + export interface NodesPort { + + /** Sets the border color of the port + * @Default {#1a1a1a} + */ + borderColor?: string; + + /** Sets the stroke width of the port + * @Default {1} + */ + borderWidth?: number; + + /** Defines the space to be left between the port bounds and its incoming and outgoing connections. + * @Default {0} + */ + connectorPadding?: number; + + /** Defines whether connections can be created with the port + * @Default {ej.datavisualization.Diagram.PortConstraints.Connect} + */ + constraints?: ej.datavisualization.Diagram.PortConstraints|string; + + /** Sets the fill color of the port + * @Default {white} + */ + fillColor?: string; + + /** Sets the unique identifier of the port + */ + name?: string; + + /** Defines the position of the port as fraction/ ratio relative to node + * @Default {ej.datavisualization.Diagram.Point(0, 0)} + */ + offset?: any; + + /** Defines the path data to draw the port. Applicable, if the port shape is path. + */ + pathData?: string; + + /** Defines the shape of the port. + * @Default {ej.datavisualization.Diagram.PortShapes.Square} + */ + shape?: ej.datavisualization.Diagram.PortShapes|string; + + /** Defines the size of the port + * @Default {8} + */ + size?: number; + + /** Defines when the port should be visible. + * @Default {ej.datavisualization.Diagram.PortVisibility.Default} + */ + visibility?: ej.datavisualization.Diagram.PortVisibility|string; + } + + export interface NodesShadow { + + /** Defines the angle of the shadow relative to node + * @Default {45} + */ + angle?: number; + + /** Sets the distance to move the shadow relative to node + * @Default {5} + */ + distance?: number; + + /** Defines the opaque of the shadow + * @Default {0.7} + */ + opacity?: number; + } + + export interface NodesSubProcess { + + /** Defines whether the BPMN sub process is without any prescribed order or not + * @Default {false} + */ + adhoc?: boolean; + + /** Sets the boundary of the BPMN process + * @Default {ej.datavisualization.Diagram.BPMNBoundary.Default} + */ + boundary?: ej.datavisualization.Diagram.BPMNBoundary|string; + + /** Sets whether the BPMN subprocess is triggered as a compensation of a specific activity + * @Default {false} + */ + compensation?: boolean; + + /** Sets whether the BPMN subprocess is triggered as a collapsed of a specific activity + * @Default {true} + */ + collapsed?: boolean; + + /** Sets the type of the event by which the sub-process will be triggered + * @Default {ej.datavisualization.Diagram.BPMNEvents.Start} + */ + event?: ej.datavisualization.Diagram.BPMNEvents|string; + + /** Defines the collection of events that need to be appended with BPMN Sub-Process + */ + events?: any[]; + + /** Defines the loop type of a sub process. + * @Default {ej.datavisualization.Diagram.BPMNLoops.None} + */ + loop?: ej.datavisualization.Diagram.BPMNLoops|string; + + /** Defines the children for BPMN's SubProcess + * @Default {[]} + */ + Processes?: any[]; + + /** Defines the type of the event trigger + * @Default {ej.datavisualization.Diagram.BPMNTriggers.Message} + */ + trigger?: ej.datavisualization.Diagram.BPMNTriggers|string; + + /** Defines the type of a sub process + * @Default {ej.datavisualization.Diagram.BPMNSubProcessTypes.None} + */ + type?: ej.datavisualization.Diagram.BPMNSubProcessTypes|string; + } + + export interface NodesTask { + + /** To set whether the task is a global task or not + * @Default {false} + */ + call?: boolean; + + /** Sets whether the task is triggered as a compensation of another specific activity + * @Default {false} + */ + compensation?: boolean; + + /** Sets the loop type of a BPMN task. + * @Default {ej.datavisualization.Diagram.BPMNLoops.None} + */ + loop?: ej.datavisualization.Diagram.BPMNLoops|string; + + /** Sets the type of the BPMN task. + * @Default {ej.datavisualization.Diagram.BPMNTasks.None} + */ + type?: ej.datavisualization.Diagram.BPMNTasks|string; + } + + export interface Node { + + /** Defines the type of BPMN Activity. Applicable, if the node is a BPMN activity. + * @Default {ej.datavisualization.Diagram.BPMNActivity.Task} + */ + activity?: ej.datavisualization.Diagram.BPMNActivity|string; + + /** To maintain additional information about nodes + * @Default {{}} + */ + addInfo?: any; + + /** Defines the additional information of a process. It is not directly related to the message flows or sequence flows of the process. + * @Default {ej.datavisualization.Diagram.BPMNTextAnnotation()} + */ + annotation?: NodesAnnotation; + + /** Sets the border color of node + * @Default {black} + */ + borderColor?: string; + + /** Sets the pattern of dashes and gaps to stroke the border + */ + borderDashArray?: string; + + /** Sets the border width of the node + * @Default {1} + */ + borderWidth?: number; + + /** Defines whether the group can be ungrouped or not + * @Default {true} + */ + canUngroup?: boolean; + + /** Array of JSON objects where each object represents a child node/connector + * @Default {[]} + */ + children?: any[]; + + /** Sets the type of UML classifier. Applicable, if the node is a UML Class Diagram shape. + * @Default {ej.datavisualization.Diagram.ClassifierShapes.Class} + */ + classifier?: ej.datavisualization.Diagram.ClassifierShapes|string; + + /** Defines the name, attributes and methods of a Class. Applicable, if the node is a Class. + * @Default {null} + */ + class?: NodesClass; + + /** Defines the state of the node is collapsed. + */ + collapseIcon?: NodesCollapseIcon; + + /** Defines the distance to be left between a node and its connections(In coming and out going connections). + * @Default {0} + */ + connectorPadding?: number; + + /** Enables or disables the default behaviors of the node. + * @Default {ej.datavisualization.Diagram.NodeConstraints.Default} + */ + constraints?: ej.datavisualization.Diagram.NodeConstraints|string; + + /** Defines how the child objects need to be arranged(Either in any predefined manner or automatically). Applicable, if the node is a group. + * @Default {null} + */ + container?: NodesContainer; + + /** Defines the corner radius of rectangular shapes. + * @Default {0} + */ + cornerRadius?: number; + + /** Configures the styles of shapes + */ + cssClass?: string; + + /** Defines the BPMN data object + */ + data?: NodesData; + + /** Defines an Enumeration in a UML Class Diagram + * @Default {null} + */ + enumeration?: NodesEnumeration; + + /** Sets the type of the BPMN Events. Applicable, if the node is a BPMN event. + * @Default {ej.datavisualization.Diagram.BPMNEvents.Start} + */ + event?: ej.datavisualization.Diagram.BPMNEvents|string; + + /** Defines whether the node can be automatically arranged using layout or not + * @Default {false} + */ + excludeFromLayout?: boolean; + + /** Defines the state of the node is expanded or collapsed. + */ + expandIcon?: NodesExpandIcon; + + /** Defines the fill color of the node + * @Default {white} + */ + fillColor?: string; + + /** Sets the type of the BPMN Gateway. Applicable, if the node is a BPMN gateway. + * @Default {ej.datavisualization.Diagram.BPMNGateways.None} + */ + gateway?: ej.datavisualization.Diagram.BPMNGateways|string; + + /** Paints the node with a smooth transition from one color to another color + */ + gradient?: NodesGradient; + + /** Sets the type of the BPMN Shapes as group. Applicable, if the node is a BPMN. + * @Default {ej.datavisualization.Diagram.BPMNShapes} + */ + group?: any; + + /** Defines the header of a swimlane/lane + * @Default {{ text: Title, fontSize: 11 }} + */ + header?: any; + + /** Defines the height of the node + * @Default {0} + */ + height?: number; + + /** Sets the horizontal alignment of the node. Applicable, if the parent of the node is a container. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} + */ + horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /** A read only collection of the incoming connectors/edges of the node + * @Default {[]} + */ + inEdges?: any[]; + + /** Defines an interface in a UML Class Diagram + * @Default {null} + */ + interface?: NodesInterface; + + /** Defines whether the sub tree of the node is expanded or collapsed + * @Default {true} + */ + isExpanded?: boolean; + + /** Sets the node as a swimlane + * @Default {false} + */ + isSwimlane?: boolean; + + /** A collection of objects where each object represents a label + * @Default {[]} + */ + labels?: NodesLabel[]; + + /** An array of objects where each object represents a lane. Applicable, if the node is a swimlane. + * @Default {[]} + */ + lanes?: NodesLane[]; + + /** Defines the minimum space to be left between the bottom of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginBottom?: number; + + /** Defines the minimum space to be left between the left of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginLeft?: number; + + /** Defines the minimum space to be left between the right of the parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginRight?: number; + + /** Defines the minimum space to be left between the top of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginTop?: number; + + /** Defines the maximum height limit of the node + * @Default {0} + */ + maxHeight?: number; + + /** Defines the maximum width limit of the node + * @Default {0} + */ + maxWidth?: number; + + /** Defines the minimum height limit of the node + * @Default {0} + */ + minHeight?: number; + + /** Defines the minimum width limit of the node + * @Default {0} + */ + minWidth?: number; + + /** Sets the unique identifier of the node + */ + name?: string; + + /** Defines the position of the node on X-Axis + * @Default {0} + */ + offsetX?: number; + + /** Defines the position of the node on Y-Axis + * @Default {0} + */ + offsetY?: number; + + /** Defines the opaque of the node + * @Default {1} + */ + opacity?: number; + + /** Defines the orientation of nodes. Applicable, if the node is a swimlane. + * @Default {vertical} + */ + orientation?: string; + + /** A read only collection of outgoing connectors/edges of the node + * @Default {[]} + */ + outEdges?: any[]; + + /** Defines the minimum padding value to be left between the bottom most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingBottom?: number; + + /** Defines the minimum padding value to be left between the left most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingLeft?: number; + + /** Defines the minimum padding value to be left between the right most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingRight?: number; + + /** Defines the minimum padding value to be left between the top most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingTop?: number; + + /** Defines the size and preview size of the node to add that to symbol palette + * @Default {null} + */ + paletteItem?: NodesPaletteItem; + + /** Sets the name of the parent group + */ + parent?: string; + + /** Sets the path geometry that defines the shape of a path node + */ + pathData?: string; + + /** An array of objects, where each object represents a smaller region(phase) of a swimlane. + * @Default {[]} + */ + phases?: NodesPhase[]; + + /** Sets the height of the phase headers + * @Default {0} + */ + phaseSize?: number; + + /** Sets the ratio/ fractional value relative to node, based on which the node will be transformed(positioning, scaling and rotation) + * @Default {ej.datavisualization.Diagram.Points(0.5,0.5)} + */ + pivot?: any; + + /** Defines a collection of points to draw a polygon. Applicable, if the shape is a polygon. + * @Default {[]} + */ + points?: any[]; + + /** An array of objects where each object represents a port + * @Default {[]} + */ + ports?: NodesPort[]; + + /** Sets the angle to which the node should be rotated + * @Default {0} + */ + rotateAngle?: number; + + /** Defines the opacity and the position of shadow + * @Default {ej.datavisualization.Diagram.Shadow()} + */ + shadow?: NodesShadow; + + /** Sets the shape of the node. It depends upon the type of node. + * @Default {ej.datavisualization.Diagram.BasicShapes.Rectangle} + */ + shape?: + ej.datavisualization.Diagram.BasicShapes|ej.datavisualization.Diagram.FlowShapes|ej.datavisualization.Diagram.BPMNShapes|ej.datavisualization.Diagram.UMLActivityShapes|string; + + /** Sets the source path of the image. Applicable, if the type of the node is image. + */ + source?: string; + + /** Defines the sub process of a BPMN Activity. Applicable, if the type of the BPMN activity is sub process. + * @Default {ej.datavisualization.Diagram.BPMNSubProcess()} + */ + subProcess?: NodesSubProcess; + + /** Defines the task of the BPMN activity. Applicable, if the type of activity is set as task. + * @Default {ej.datavisualization.Diagram.BPMNTask()} + */ + task?: NodesTask; + + /** Sets the id of svg/html templates. Applicable, if the node is HTML or native. + */ + templateId?: string; + + /** Defines the textBlock of a text node + * @Default {null} + */ + textBlock?: any; + + /** Defines the tooltip that should be shown when the mouse hovers over node. For tooltip properties, refer Tooltip + * @Default {null} + */ + tooltip?: any; + + /** Sets the type of BPMN Event Triggers. + * @Default {ej.datavisualization.Diagram.BPMNTriggers.None} + */ + trigger?: ej.datavisualization.Diagram.BPMNTriggers|string; + + /** Defines the type of the node. + * @Default {ej.datavisualization.Diagram.Shapes.Basic} + */ + type?: ej.datavisualization.Diagram.Shapes|string; + + /** Sets the vertical alignment of a node. Applicable, if the parent of a node is a container. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} + */ + verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /** Defines the visibility of the node + * @Default {true} + */ + visible?: boolean; + + /** Defines the width of the node + * @Default {0} + */ + width?: number; + + /** Defines the z-index of the node + * @Default {0} + */ + zOrder?: number; + } + + export interface PageSettings { + + /** Defines the maximum distance to be left between the object and the scroll bar to trigger auto scrolling + * @Default {{ left: 15, top: 15, right: 15, bottom: 15 }} + */ + autoScrollBorder?: any; + + /** Sets whether multiple pages can be created to fit all nodes and connectors + * @Default {false} + */ + multiplePage?: boolean; + + /** Defines the background color of diagram pages + * @Default {#ffffff} + */ + pageBackgroundColor?: string; + + /** Defines the page border color + * @Default {#565656} + */ + pageBorderColor?: string; + + /** Sets the border width of diagram pages + * @Default {0} + */ + pageBorderWidth?: number; + + /** Defines the height of a page + * @Default {null} + */ + pageHeight?: number; + + /** Defines the page margin + * @Default {24} + */ + pageMargin?: number; + + /** Sets the orientation of the page. + * @Default {ej.datavisualization.Diagram.PageOrientations.Portrait} + */ + pageOrientation?: ej.datavisualization.Diagram.PageOrientations|string; + + /** Defines the height of a diagram page + * @Default {null} + */ + pageWidth?: number; + + /** Defines the scrollable area of diagram. Applicable, if the scroll limit is "limited". + * @Default {null} + */ + scrollableArea?: any; + + /** Defines the scrollable region of diagram. + * @Default {ej.datavisualization.Diagram.ScrollLimit.Infinite} + */ + scrollLimit?: ej.datavisualization.Diagram.ScrollLimit|string; + + /** Defines the draggable region of diagram elements. + * @Default {ej.datavisualization.Diagram.BoundaryConstraints.Infinite} + */ + boundaryConstraints?: ej.datavisualization.Diagram.BoundaryConstraints|string; + + /** Enables or disables the page breaks + * @Default {false} + */ + showPageBreak?: boolean; + } + + export interface ScrollSettings { + + /** Allows to read the zoom value of diagram + * @Default {0} + */ + currentZoom?: number; + + /** Sets the horizontal scroll offset + * @Default {0} + */ + horizontalOffset?: number; + + /** Allows to extend the scrollable region that is based on the scroll limit + * @Default {{left: 0, right: 0, top:0, bottom: 0}} + */ + padding?: any; + + /** Sets the vertical scroll offset + * @Default {0} + */ + verticalOffset?: number; + + /** Allows to read the view port height of the diagram + * @Default {0} + */ + viewPortHeight?: number; + + /** Allows to read the view port width of the diagram + * @Default {0} + */ + viewPortWidth?: number; + } + + export interface SelectedItemsUserHandle { + + /** Defines the name of the user handle + */ + name?: string; + + /** Defines the background color of the user handle + * @Default {#2382c3} + */ + backgroundColor?: string; + + /** Sets the border color of the user handle + * @Default {transparent} + */ + borderColor?: string; + + /** Defines whether the user handle should be added, when more than one element is selected + * @Default {false} + */ + enableMultiSelection?: boolean; + + /** Sets the stroke color of the user handle + * @Default {transparent} + */ + pathColor?: string; + + /** Defines the custom shape of the user handle + */ + pathData?: string; + + /** Defines the position of the user handle + * @Default {ej.datavisualization.Diagram.UserHandlePositions.BottomCenter} + */ + position?: ej.datavisualization.Diagram.UserHandlePositions|string; + + /** Defines the size of the user handle + * @Default {8} + */ + size?: number; + + /** Defines the interactive behaviors of the user handle + */ + tool?: any; + + /** Defines the visibility of the user handle + * @Default {true} + */ + visible?: boolean; + } + + export interface SelectedItems { + + /** A read only collection of the selected items + * @Default {[]} + */ + children?: any[]; + + /** Controls the visibility of selector. + * @Default {ej.datavisualization.Diagram.SelectorConstraints.All} + */ + constraints?: ej.datavisualization.Diagram.SelectorConstraints|string; + + /** Defines a method that dynamically enables/ disables the interaction with multiple selection. + * @Default {null} + */ + getConstraints?: any; + + /** Sets the height of the selected items + * @Default {0} + */ + height?: number; + + /** Sets the x position of the selector + * @Default {0} + */ + offsetX?: number; + + /** Sets the y position of the selector + * @Default {0} + */ + offsetY?: number; + + /** Sets the angle to rotate the selected items + * @Default {0} + */ + rotateAngle?: number; + + /** Sets the angle to rotate the selected items. For tooltip properties, refer Tooltip + * @Default {ej.datavisualization.Diagram.Tooltip()} + */ + tooltip?: any; + + /** A collection of frequently used commands that will be added around the selector + * @Default {[]} + */ + userHandles?: SelectedItemsUserHandle[]; + + /** Sets the width of the selected items + * @Default {0} + */ + width?: number; + } + + export interface SnapSettingsHorizontalGridLines { + + /** Defines the line color of horizontal grid lines + * @Default {lightgray} + */ + lineColor?: string; + + /** Specifies the pattern of dashes and gaps used to stroke horizontal grid lines + */ + lineDashArray?: string; + + /** A pattern of lines and gaps that defines a set of horizontal gridlines + * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} + */ + linesInterval?: any[]; + + /** Specifies a set of intervals to snap the objects + * @Default {[20]} + */ + snapInterval?: any[]; + } + + export interface SnapSettingsVerticalGridLines { + + /** Defines the line color of horizontal grid lines + * @Default {lightgray} + */ + lineColor?: string; + + /** Specifies the pattern of dashes and gaps used to stroke horizontal grid lines + */ + lineDashArray?: string; + + /** A pattern of lines and gaps that defines a set of horizontal gridlines + * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} + */ + linesInterval?: any[]; + + /** Specifies a set of intervals to snap the objects + * @Default {[20]} + */ + snapInterval?: any[]; + } + + export interface SnapSettings { + + /** Enables or disables snapping nodes/connectors to objects + * @Default {true} + */ + enableSnapToObject?: boolean; + + /** Defines the appearance of horizontal gridlines + */ + horizontalGridLines?: SnapSettingsHorizontalGridLines; + + /** Defines the angle by which the object needs to be snapped + * @Default {5} + */ + snapAngle?: number; + + /** Defines and sets the snapConstraints + */ + snapConstraints?: ej.datavisualization.Diagram.SnapConstraints|string; + + /** Defines the minimum distance between the selected object and the nearest object + * @Default {5} + */ + snapObjectDistance?: number; + + /** Defines the appearance of horizontal gridlines + */ + verticalGridLines?: SnapSettingsVerticalGridLines; + } + + export interface TooltipAlignment { + + /** Defines the horizontal alignment of tooltip. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontal?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /** Defines the vertical alignment of tooltip. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Bottom} + */ + vertical?: ej.datavisualization.Diagram.VerticalAlignment|string; + } + + export interface Tooltip { + + /** Aligns the tooltip around nodes/connectors + */ + alignment?: TooltipAlignment; + + /** Sets the margin of the tooltip + * @Default {{ left: 5, right: 5, top: 5, bottom: 5 }} + */ + margin?: any; + + /** Defines whether the tooltip should be shown at the mouse position or around node. + * @Default {ej.datavisualization.Diagram.RelativeMode.Object} + */ + relativeMode?: ej.datavisualization.Diagram.RelativeMode|string; + + /** Sets the svg/html template to be bound with tooltip + */ + templateId?: string; + } + } + namespace Diagram { + enum ImageAlignment { + //Scales the graphic content non-uniformly to the width and height of the diagram area + None, + //Used to align the image at the top left of diagram area + XMinYMin, + //Used to align the image at the left center of diagram area + XMinYMid, + //Used to align the image at the bottom left of diagram area + XMinYMax, + //Used to align the image at the top center of diagram area + XMidYMin, + //Used to align the image at the center of diagram area + XMidYMid, + //Used to align the image at the bottom center of diagram area + XMidYMax, + //Used to align the image at the top right of diagram area/node + XMaxYMin, + //Used to align the image at the right center of diagram area/node + XMaxYMid, + //Used to align the image at the bottom right of diagram area/node + XMaxYMax, + } + } + namespace Diagram { + enum BridgeDirection { + //Used to set the direction of line bridges as left + Left, + //Used to set the direction of line bridges as right + Right, + //Used to set the direction of line bridges as top + Top, + //Used to set the direction of line bridges as bottom + Bottom, + } + } + namespace Diagram { + enum Keys { + //No key pressed. + None, + //The A key. + A, + //The B key. + B, + //The C key. + C, + //The D Key. + D, + //The E key. + E, + //The F key. + F, + //The G key. + G, + //The H Key. + H, + //The I key. + I, + //The J key. + J, + //The K key. + K, + //The L Key. + L, + //The M key. + M, + //The N key. + N, + //The O key. + O, + //The P Key. + P, + //The Q key. + Q, + //The R key. + R, + //The S key. + S, + //The T Key. + T, + //The U key. + U, + //The V key. + V, + //The W key. + W, + //The X key. + X, + //The Y key. + Y, + //The Z key. + Z, + //The 0 key. + Number0, + //The 1 key. + Number1, + //The 2 key. + Number2, + //The 3 key. + Number3, + //The 4 key. + Number4, + //The 5 key. + Number5, + //The 6 key. + Number6, + //The 7 key. + Number7, + //The 8 key. + Number8, + //The 9 key. + Number9, + //The LEFT ARROW key. + Left, + //The UP ARROW key. + Up, + //The RIGHT ARROW key. + Right, + //The DOWN ARROW key. + Down, + //The ESC key. + Escape, + //The DEL key. + Delete, + //The TAB key. + Tab, + //The ENTER key. + Enter, + } + } + namespace Diagram { + enum KeyModifiers { + //No modifiers are pressed. + None, + //The ALT key. + Alt, + //The CTRL key. + Control, + //The SHIFT key. + Shift, + } + } + namespace Diagram { + enum ConnectorConstraints { + //Disable all connector Constraints + None, + //Enables connector to be selected + Select, + //Enables connector to be Deleted + Delete, + //Enables connector to be Dragged + Drag, + //Enables connectors source end to be selected + DragSourceEnd, + //Enables connectors target end to be selected + DragTargetEnd, + //Enables control point and end point of every segment in a connector for editing + DragSegmentThumb, + //Enables bridging to the connector + Bridging, + //Enables label of node to be Dragged + DragLabel, + //Enables bridging to the connector + InheritBridging, + //Enables user interaction to the connector + PointerEvents, + //Enables the contrast between clean edges of connector over rendering speed and geometric precision + CrispEdges, + //Enables all constraints + Default, + } + } + namespace Diagram { + enum HorizontalAlignment { + //Used to align text horizontally on left side of node/connector + Left, + //Used to align text horizontally on center of node/connector + Center, + //Used to align text horizontally on right side of node/connector + Right, + } + } + namespace Diagram { + enum Alignment { + //Used to align the label either top or left(before) of the connector segment + Before, + //Used to align the label at center of the connector segment + Center, + //Used to align the label either bottom or right(after) of the connector segment + After, + } + } + namespace Diagram { + enum LabelRelativeMode { + //Sets the relativeMode as SegmentPath + SegmentPath, + //Sets the relativeMode as SegmentBounds + SegmentBounds, + } + } + namespace Diagram { + enum Segments { + //Used to specify the lines as Straight + Straight, + //Used to specify the lines as Orthogonal + Orthogonal, + //Used to specify the lines as Bezier + Bezier, + } + } + namespace Diagram { + enum ConnectorShapes { + //Used to specify connector type as BPMN + BPMN, + //Used to specify connector type as UMLClassifier + UMLClassifier, + //Used to specify connector type as UMLActivity + UMLActivity, + } + } + namespace Diagram { + enum BPMNFlows { + //Used to specify the Sequence flow in a BPMN Process + Sequence, + //Used to specify the Association flow in a BPMN Process + Association, + //Used to specify the Message flow in a BPMN Process + Message, + } + } + namespace Diagram { + enum AssociationFlows { + //Used to notate default association in a BPMN Process + Default, + //Used to notate directional association in a BPMN Process + Directional, + //User to notate bi-directional association in a BPMN Process + BiDirectional, + } + } + namespace Diagram { + enum BPMNMessageFlows { + //Used to notate the default message flow in a BPMN Process + Default, + //Used to notate the instantiating message flow in a BPMN Process + InitiatingMessage, + //Used to notate the non-instantiating message flow in a BPMN Process + NonInitiatingMessage, + } + } + namespace Diagram { + enum BPMNSequenceFlows { + //Used to notate the normal sequence flow in a BPMN Process + Normal, + //Used to notate the conditional sequence flow in a BPMN Process + Conditional, + //Used to notate the default sequence flow in a BPMN Process + Default, + } + } + namespace Diagram { + enum ClassifierShapes { + //Used to define a Class + Class, + //Used to define an Interface + Interface, + //Used to define an Enumeration + Enumeration, + //Used to notate association in UML Class Diagram + Association, + //Used to notate aggregation in a UML Class Diagram + Aggregation, + //Used to notate composition in a UML Class Diagram + Composition, + //Used to notate dependency in a UML Class Diagram + Dependency, + //Used to notate inheritance in a UML Class Diagram + Inheritance, + } + } + namespace Diagram { + enum Multiplicity { + //Each entity instance is related to a single instance of another entity + OneToOne, + //An entity instance can be related to multiple instances of the other entities + OneToMany, + //Multiple instances of an entity can be related to a single instance of the other entity + ManyToOne, + //The entity instances can be related to multiple instances of each other + ManyToMany, + } + } + namespace Diagram { + enum UMLActivityFlow { + //Defines a activity flow as Object in UML Activity Diagram + Object, + //Defines a activity flow as Control in UML Activity Diagram + Control, + //Defines a activity flow as Exception in UML Activity Diagram + Exception, + } + } + namespace Diagram { + enum DecoratorShapes { + //Used to set decorator shape as none + None, + //Used to set decorator shape as Arrow + Arrow, + //Used to set decorator shape as Open Arrow + OpenArrow, + //Used to set decorator shape as Circle + Circle, + //Used to set decorator shape as Diamond + Diamond, + //Used to set decorator shape as path + Path, + } + } + namespace Diagram { + enum VerticalAlignment { + //Used to align text Vertically on left side of node/connector + Top, + //Used to align text Vertically on center of node/connector + Center, + //Used to align text Vertically on bottom of node/connector + Bottom, + } + } + namespace Diagram { + enum DiagramConstraints { + //Disables all DiagramConstraints + None, + //Enables/Disables interaction done with the help of API methods + APIUpdate, + //Enables/Disables UserInteraction + UserInteraction, + //Enables/Disables PageEditing + PageEditable, + //Enables/Disables Bridging + Bridging, + //Enables/Disables Zooming + Zoomable, + //Enables/Disables panning on horizontal axis + PannableX, + //Enables/Disables panning on vertical axis + PannableY, + //Enables/Disables Panning + Pannable, + //Enables/Disables undo actions + Undoable, + //Enables/Disables the sharp edges + CrispEdges, + //Enables/Disables the Diagram size updation on the window resize function + Resizable, + //Enables/Disables the Zooming of labels text editor + ZoomTextEditor, + //Enables/Disables the drag and drop of element from one diagram to the other + FloatElements, + //Enables all Constraints + Default, + } + } + namespace Diagram { + enum LabelRenderingMode { + //Sets the labelRenderingMode as Html + Html, + //Sets the labelRenderingMode as Svg + Svg, + } + } + namespace Diagram { + enum LayoutOrientations { + //Used to set LayoutOrientation from top to bottom + TopToBottom, + //Used to set LayoutOrientation from bottom to top + BottomToTop, + //Used to set LayoutOrientation from left to right + LeftToRight, + //Used to set LayoutOrientation from right to left + RightToLeft, + } + } + namespace Diagram { + enum LayoutTypes { + //Used not to set any specific layout + None, + //Used to set layout type as hierarchical layout + HierarchicalTree, + //Used to set layout type as organnizational chart + OrganizationalChart, + } + } + namespace Diagram { + enum BPMNActivity { + //Used to set BPMN Activity as None + None, + //Used to set BPMN Activity as Task + Task, + //Used to set BPMN Activity as SubProcess + SubProcess, + } + } + namespace Diagram { + enum BPMNAnnotationDirection { + //Used to set the direction of BPMN Annotation as left + Left, + //Used to set the direction of BPMN Annotation as right + Right, + //Used to set the direction of BPMN Annotation as top + Top, + //Used to set the direction of BPMN Annotation as bottom + Bottom, + } + } + namespace Diagram { + enum IconShapes { + //Used to set collapse icon shape as none + None, + //Used to set collapse icon shape as Arrow(Up/Down) + Arrow, + //Used to set collapse icon shape as Plus + Plus, + //Used to set collapse icon shape as Minus + Minus, + //Used to set collapse icon shape as path + Path, + //Used to set icon shape as template + Template, + //Used to set icon shape as image + Image, + } + } + namespace Diagram { + enum NodeConstraints { + //Disable all node Constraints + None, + //Enables node to be selected + Select, + //Enables node to be Deleted + Delete, + //Enables node to be Dragged + Drag, + //Enables node to be Rotated + Rotate, + //Enables node to be connected + Connect, + //Enables node to be resize north east + ResizeNorthEast, + //Enables node to be resize east + ResizeEast, + //Enables node to be resize south east + ResizeSouthEast, + //Enables node to be resize south + ResizeSouth, + //Enables node to be resize south west + ResizeSouthWest, + //Enables node to be resize west + ResizeWest, + //Enables node to be resize north west + ResizeNorthWest, + //Enables node to be resize north + ResizeNorth, + //Enables node to be Resized + Resize, + //Enables shadow + Shadow, + //Enables label of node to be Dragged + DragLabel, + //Enables panning should be done while node dragging + AllowPan, + //Enables Proportional resize for node + AspectRatio, + //Enables the user interaction with the node + PointerEvents, + //Enables contrast between clean edges for the node over rendering speed and geometric precision + CrispEdges, + //Enables all node constraints + Default, + } + } + namespace Diagram { + enum ContainerType { + //Sets the container type as Canvas + Canvas, + //Sets the container type as Stack + Stack, + } + } + namespace Diagram { + enum BPMNDataObjects { + //Used to notate the Input type BPMN data object + Input, + //Used to notate the Output type BPMN data object + Output, + //Used to set BPMN data object type as None + None, + } + } + namespace Diagram { + enum BPMNEvents { + //Used to set BPMN Event as Start + Start, + //Used to set BPMN Event as Intermediate + Intermediate, + //Used to set BPMN Event as End + End, + //Used to set BPMN Event as NonInterruptingStart + NonInterruptingStart, + //Used to set BPMN Event as NonInterruptingIntermediate + NonInterruptingIntermediate, + //Used to set BPMN Event as ThrowingIntermediate + ThrowingIntermediate, + } + } + namespace Diagram { + enum BPMNGateways { + //Used to set BPMN Gateway as None + None, + //Used to set BPMN Gateway as Exclusive + Exclusive, + //Used to set BPMN Gateway as Inclusive + Inclusive, + //Used to set BPMN Gateway as Parallel + Parallel, + //Used to set BPMN Gateway as Complex + Complex, + //Used to set BPMN Gateway as EventBased + EventBased, + //Used to set BPMN Gateway as ExclusiveEventBased + ExclusiveEventBased, + //Used to set BPMN Gateway as ParallelEventBased + ParallelEventBased, + } + } + namespace Diagram { + enum LabelEditMode { + //Used to set label edit mode as edit + Edit, + //Used to set label edit mode as view + View, + } + } + namespace Diagram { + enum OverflowType { + //Set overflow Type as ellipsis + Ellipsis, + //Set overflow Type as Clip + Clip, + } + } + namespace Diagram { + enum TextAlign { + //Used to align text on left side of node/connector + Left, + //Used to align text on center of node/connector + Center, + //Used to align text on Right side of node/connector + Right, + } + } + namespace Diagram { + enum TextDecorations { + //Used to set text decoration of the label as Underline + Underline, + //Used to set text decoration of the label as Overline + Overline, + //Used to set text decoration of the label as LineThrough + LineThrough, + //Used to set text decoration of the label as None + None, + } + } + namespace Diagram { + enum TextWrapping { + //Disables wrapping + NoWrap, + //Enables Line-break at normal word break points + Wrap, + //Enables Line-break at normal word break points with longer word overflows + WrapWithOverflow, + } + } + namespace Diagram { + enum PortConstraints { + //Disable all constraints + None, + //Enables connections with connector + Connect, + //Enables to create the connection when mouse hover on the port. + ConnectOnDrag, + } + } + namespace Diagram { + enum PortShapes { + //Used to set port shape as X + X, + //Used to set port shape as Circle + Circle, + //Used to set port shape as Square + Square, + //Used to set port shape as Path + Path, + } + } + namespace Diagram { + enum PortVisibility { + //Set the port visibility as Visible + Visible, + //Set the port visibility as Hidden + Hidden, + //Port get visible when hover connector on node + Hover, + //Port gets visible when connect connector to node + Connect, + //Specifies the port visibility as default + Default, + } + } + namespace Diagram { + enum BasicShapes { + //Used to specify node Shape as Rectangle + Rectangle, + //Used to specify node Shape as Ellipse + Ellipse, + //Used to specify node Shape as Path + Path, + //Used to specify node Shape as Polygon + Polygon, + //Used to specify node Shape as Triangle + Triangle, + //Used to specify node Shape as Plus + Plus, + //Used to specify node Shape as Star + Star, + //Used to specify node Shape as Pentagon + Pentagon, + //Used to specify node Shape as Heptagon + Heptagon, + //Used to specify node Shape as Octagon + Octagon, + //Used to specify node Shape as Trapezoid + Trapezoid, + //Used to specify node Shape as Decagon + Decagon, + //Used to specify node Shape as RightTriangle + RightTriangle, + //Used to specify node Shape as Cylinder + Cylinder, + } + } + namespace Diagram { + enum FlowShapes { + //Used to specify node Shape as Process + Process, + //Used to specify node Shape as Decision + Decision, + //Used to specify node Shape as Document + Document, + //Used to specify node Shape as PreDefinedProcess + PreDefinedProcess, + //Used to specify node Shape as Terminator + Terminator, + //Used to specify node Shape as PaperTap + PaperTap, + //Used to specify node Shape as DirectData + DirectData, + //Used to specify node Shape as SequentialData + SequentialData, + //Used to specify node Shape as Sort + Sort, + //Used to specify node Shape as MultiDocument + MultiDocument, + //Used to specify node Shape as Collate + Collate, + //Used to specify node Shape as SummingJunction + SummingJunction, + //Used to specify node Shape as Or + Or, + //Used to specify node Shape as InternalStorage + InternalStorage, + //Used to specify node Shape as Extract + Extract, + //Used to specify node Shape as ManualOperation + ManualOperation, + //Used to specify node Shape as Merge + Merge, + //Used to specify node Shape as OffPageReference + OffPageReference, + //Used to specify node Shape as SequentialAccessStorage + SequentialAccessStorage, + //Used to specify node Shape as Annotation1 + Annotation1, + //Used to specify node Shape as Annotation2 + Annotation2, + //Used to specify node Shape as Data + Data, + //Used to specify node Shape as Card + Card, + } + } + namespace Diagram { + enum BPMNShapes { + //Used to specify node Shape as Event + Event, + //Used to specify node Shape as Gateway + Gateway, + //Used to specify node Shape as Message + Message, + //Used to specify node Shape as DataObject + DataObject, + //Used to specify node Shape as DataSource + DataSource, + //Used to specify node Shape as Activity + Activity, + //Used to specify node Shape as Group + Group, + } + } + namespace Diagram { + enum UMLActivityShapes { + //Used to set UML ActivityShapes as Action + Action, + //Used to set UML ActivityShapes as Decision + Decision, + //Used to set UML ActivityShapes as MergeNode + MergeNode, + //Used to set UML ActivityShapes as InitialNode + InitialNode, + //Used to set UML ActivityShapes as FinalNode + FinalNode, + //Used to set UML ActivityShapes as ForkNode + ForkNode, + //Used to set UML ActivityShapes as JoinNode + JoinNode, + //Used to set UML ActivityShapes as TimeEvent + TimeEvent, + //Used to set UML ActivityShapes as AcceptingEvent + AcceptingEvent, + //Used to set UML ActivityShapes as SendSignal + SendSignal, + //Used to set UML ActivityShapes as ReceiveSignal + ReceiveSignal, + //Used to set UML ActivityShapes as StructuredNode + StructuredNode, + //Used to set UML ActivityShapes as Note + Note, + } + } + namespace Diagram { + enum BPMNBoundary { + //Used to set BPMN SubProcess's Boundary as Default + Default, + //Used to set BPMN SubProcess's Boundary as Call + Call, + //Used to set BPMN SubProcess's Boundary as Event + Event, + } + } + namespace Diagram { + enum BPMNLoops { + //Used to set BPMN Activity's Loop as None + None, + //Used to set BPMN Activity's Loop as Standard + Standard, + //Used to set BPMN Activity's Loop as ParallelMultiInstance + ParallelMultiInstance, + //Used to set BPMN Activity's Loop as SequenceMultiInstance + SequenceMultiInstance, + } + } + namespace Diagram { + enum BPMNSubProcessTypes { + //Used to set BPMN SubProcess type as None + None, + //Used to set BPMN SubProcess type as Transaction + Transaction, + //Used to set BPMN SubProcess type as Event + Event, + } + } + namespace Diagram { + enum BPMNTasks { + //Used to set BPMN Task Type as None + None, + //Used to set BPMN Task Type as Service + Service, + //Used to set BPMN Task Type as Receive + Receive, + //Used to set BPMN Task Type as Send + Send, + //Used to set BPMN Task Type as InstantiatingReceive + InstantiatingReceive, + //Used to set BPMN Task Type as Manual + Manual, + //Used to set BPMN Task Type as BusinessRule + BusinessRule, + //Used to set BPMN Task Type as User + User, + //Used to set BPMN Task Type as Script + Script, + //Used to set BPMN Task Type as Parallel + Parallel, + } + } + namespace Diagram { + enum BPMNTriggers { + //Used to set Event Trigger as None + None, + //Used to set Event Trigger as Message + Message, + //Used to set Event Trigger as Timer + Timer, + //Used to set Event Trigger as Escalation + Escalation, + //Used to set Event Trigger as Link + Link, + //Used to set Event Trigger as Error + Error, + //Used to set Event Trigger as Compensation + Compensation, + //Used to set Event Trigger as Signal + Signal, + //Used to set Event Trigger as Multiple + Multiple, + //Used to set Event Trigger as Parallel + Parallel, + //Used to set Event Trigger as Conditional + Conditional, + //Used to set Event Trigger as Termination + Termination, + //Used to set Event Trigger as Cancel + Cancel, + } + } + namespace Diagram { + enum Shapes { + //Used to specify node type as Text + Text, + //Used to specify node type as Image + Image, + //Used to specify node type as Html + Html, + //Used to specify node type as Native + Native, + //Used to specify node type as Basic + Basic, + //Used to specify node type as Flow + Flow, + //Used to specify node type as BPMN + BPMN, + //Used to specify node type as UMLClassifier + UMLClassifier, + //Used to specify node type as UMLActivity + UMLActivity, + } + } + namespace Diagram { + enum PageOrientations { + //Used to set orientation as Landscape + Landscape, + //Used to set orientation as portrait + Portrait, + } + } + namespace Diagram { + enum ScrollLimit { + //Used to set scrollLimit as Infinite + Infinite, + //Used to set scrollLimit as Diagram + Diagram, + //Used to set scrollLimit as Limited + Limited, + } + } + namespace Diagram { + enum BoundaryConstraints { + //Used to set boundaryConstraints as Infinite + Infinite, + //Used to set boundaryConstraints as Diagram + Diagram, + //Used to set boundaryConstraints as Page + Page, + } + } + namespace Diagram { + enum SelectorConstraints { + //Hides the selector + None, + //Sets the visibility of rotation handle as visible + Rotator, + //Sets the visibility of resize handles as visible + Resizer, + //Sets the visibility of user handles as visible + UserHandles, + //Sets the visibility of all selection handles as visible + All, + } + } + namespace Diagram { + enum UserHandlePositions { + //Set the position of the userhandle as topleft + TopLeft, + //Set the position of the userhandle as topcenter + TopCenter, + //Set the position of the userhandle as topright + TopRight, + //Set the position of the userhandle as middleleft + MiddleLeft, + //Set the position of the userhandle as middleright + MiddleRight, + //Set the position of the userhandle as bottomleft + BottomLeft, + //Set the position of the userhandle as bottomcenter + BottomCenter, + //Set the position of the userhandle as bottom right + BottomRight, + } + } + namespace Diagram { + enum SnapConstraints { + //Enables node to be snapped to horizontal gridlines + None, + //Enables node to be snapped to vertical gridlines + SnapToHorizontalLines, + //Enables node to be snapped to horizontal gridlines + SnapToVerticalLines, + //Enables node to be snapped to gridlines + SnapToLines, + //Enable horizontal lines + ShowHorizontalLines, + //Enable vertical lines + ShowVerticalLines, + //Enable both horizontal and vertical lines + ShowLines, + //Enable all the constraints + All, + } + } + namespace Diagram { + enum Tool { + //Disables all Tools + None, + //Enables/Disables SingleSelect tool + SingleSelect, + //Enables/Disables MultiSelect tool + MultipleSelect, + //Enables/Disables ZoomPan tool + ZoomPan, + //Enables/Disables DrawOnce tool + DrawOnce, + //Enables/Disables ContinuousDraw tool + ContinuesDraw, + } + } + namespace Diagram { + enum RelativeMode { + //Shows tooltip around the node + Object, + //Shows tooltip at the mouse position + Mouse, + } + } + namespace Diagram { + enum FileFormats { + //Used to export the diagram into JPG format. + JPG, + //Used to export the diagram into PNG format. + PNG, + //Used to export the diagram into BMP format. + BMP, + //Used to export the diagram into SVG format. + SVG, + } + } + namespace Diagram { + enum ExportModes { + //Used to export the diagram as a file. + Download, + //Used to export the diagram as raw data. + Data, + } + } + namespace Diagram { + enum Region { + //Used to export the content of the diagram only. + Content, + //Used to export the page region of the diagram. + PageSettings, + } + } + namespace Diagram { + enum Stretch { + //The diagram content preserves its original size. + None, + //The diagram content is resized to fill the destination dimensions. The aspect ratio is not preserved. + Fill, + //The diagram content is resized to fit in the destination dimensions while it preserves its native aspect ratio. + Uniform, + //The diagram content is resized to fill the destination dimensions while it preserves its native aspect ratio. If the aspect ratio of the destination rectangle differs from the + //source, the source content is clipped to fit in the destination dimensions. + UniformToFill, + } + } + namespace Diagram { + enum FitMode { + //Used to fit the diagram content based on page size. + Page, + //Used to fit the diagram content based on diagram width. + Width, + //Used to fit the diagram content based on diagram height. + Height, + } + } + namespace Diagram { + enum ZoomCommand { + //Used to zoom in the Diagram + ZoomIn, + //Used to zoom out the diagram + ZoomOut, + } + } + + class HeatMap extends ej.Widget { + static fn: HeatMap; + constructor(element: JQuery | Element, options?: HeatMap.Model); + static Locale: any; + model: HeatMap.Model; + defaults: HeatMap.Model; + } + export namespace HeatMap { + + export interface Model { + + /** Specifies the width of the heat map. + * @Default {null} + */ + width?: any; + + /** Specifies the width of the heat map. + * @Default {null} + */ + height?: any; + + /** Specifies the name of the heat map. + * @Default {null} + */ + id?: number; + + /** Enables or disables tooltip of heatmap + * @Default {true} + */ + showTooltip?: boolean; + + /** Defines the tooltip that should be shown when the mouse hovers over rows/columns. + */ + tooltipSettings?: TooltipSettings; + + /** Specifies the source data of the heat map. + * @Default {[]} + */ + itemsSource?: any; + + /** Specifies the property of the heat map cell. + * @Default {Null} + */ + heatMapCell?: HeatMapCell; + + /** Specifies can enable responsive mode or not for heat map. + * @Default {false} + */ + isResponsive?: boolean; + + /** Specifies whether the virtualization can be enable or not. + * @Default {false} + */ + enableVirtualization?: boolean; + + /** Specifies the default column properties for all the column style not specified in column properties. + * @Default {[]} + */ + defaultColumnStyle?: DefaultColumnStyle; + + /** Specifies the no of legends can sync with heat map. + * @Default {[]} + */ + legendCollection?: any[]; + + /** Specifies the property and display value of the heat map column. + * @Default {[]} + */ + itemsMapping?: ItemsMapping; + + /** Specifies the color values of the heat map column data. + * @Default {[]} + */ + colorMappingCollection?: ColorMappingCollection[]; + + /** Triggered when the mouse over on the cell. + */ + cellMouseOver?(e: CellMouseOverEventArgs): void; + + /** Triggered when the mouse over on the cell. + */ + cellMouseEnter?(e: CellMouseEnterEventArgs): void; + + /** Triggered when the mouse over on the cell. + */ + cellMouseLeave?(e: CellMouseLeaveEventArgs): void; + + /** Triggered when the mouse over on the cell. + */ + cellSelected?(e: CellSelectedEventArgs): void; + } + + export interface CellMouseOverEventArgs { + + /** Value displayed on the cell + */ + cellValue?: string; + + /** Returns the HeatMap cell data + */ + source?: any; + + /** Returns the specific HeatMap cell + */ + cell?: any; + } + + export interface CellMouseEnterEventArgs { + + /** Value displayed on the cell + */ + cellValue?: string; + + /** Returns the HeatMap cell data + */ + source?: any; + + /** Returns the specific HeatMap cell + */ + cell?: any; + } + + export interface CellMouseLeaveEventArgs { + + /** Value displayed on the cell + */ + cellValue?: string; + + /** Returns the HeatMap cell data + */ + source?: any; + + /** Returns the specific HeatMap cell + */ + cell?: any; + } + + export interface CellSelectedEventArgs { + + /** Value displayed on the cell + */ + cellValue?: string; + + /** Returns the HeatMap cell data + */ + source?: any; + + /** Returns the specific HeatMap cell + */ + cell?: any; + } + + export interface TooltipSettingsPositionTarget { + + /** Sets the arrow position again popup based on horizontal(x) value + * @Default {center} + */ + horizontal?: ej.datavisualization.HeatMap.Horizontal|string; + + /** Sets the arrow position again popup based on vertical(y) value + * @Default {top} + */ + vertical?: ej.datavisualization.HeatMap.Vertical|string; + } - /** parameter returns the node or connector that is dragged into diagram - */ - element?: any; + export interface TooltipSettingsPositionStem { + + /** Sets the arrow position again popup based on horizontal(x) value + * @Default {center} + */ + horizontal?: ej.datavisualization.HeatMap.Horizontal|string; + + /** Sets the arrow position again popup based on vertical(y) value + * @Default {bottom} + */ + vertical?: ej.datavisualization.HeatMap.Vertical|string; + } - /** parameter returns whether to add or remove the symbol from diagram - */ - cancel?: boolean; + export interface TooltipSettingsPosition { + + /** Sets the Tooltip position against target. + */ + target?: TooltipSettingsPositionTarget; + + /** Sets the arrow position again popup. + */ + stem?: TooltipSettingsPositionStem; + } - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + export interface TooltipSettingsAnimation { - export interface DragLeaveEventArgs { + /** Defines the animation effect for the tooltip that should be shown when the mouse hovers over rows/columns. + * @Default {none} + */ + effect?: ej.datavisualization.HeatMap.Effect|string; - /** parameter returns the node or connector that is dragged outside of the diagram - */ - element?: any; + /** Defines the animation speed for the tooltip that should be shown when the mouse hovers over rows/columns. + * @Default {0} + */ + speed?: number; + } - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + export interface TooltipSettings { + + /** Defines the tooltip that should be shown when the mouse hovers over rows/columns. + * @Default {null} + */ + templateId?: string; - export interface DragOverEventArgs { + /** Defines the tooltip of associate that should be shown when the mouse hovers over rows/columns. + * @Default {mouseFollow} + */ + associate?: ej.datavisualization.HeatMap.Associate|string; + + /** Enables/ disables the balloon for the tooltip to be shown + * @Default {true} + */ + isBalloon?: boolean; - /** parameter returns the node or connector that is dragged over diagram - */ - element?: any; + /** Defines various attributes of the Tooltip position + */ + position?: TooltipSettingsPosition; - /** parameter defines whether the symbol can be dropped at the current mouse position - */ - allowDrop?: boolean; + /** Defines the tooltip to be triggered. + * @Default {hover} + */ + trigger?: ej.datavisualization.HeatMap.Trigger|string; - /** parameter returns the node/connector over which the symbol is dragged - */ - target?: any; + /** Defines the animation for the tooltip that should be shown when the mouse hovers over rows/columns. + */ + animation?: TooltipSettingsAnimation; + } + + export interface HeatMapCell { - /** parameter returns the previous position of the node/connector - */ - oldValue?: any; + /** Specifies whether the cell content can be visible or not. + * @Default {ej.HeatMap.CellVisibility.Visible} + */ + showContent?: ej.datavisualization.HeatMap.CellVisibility|string; + + /** Specifies whether the cell color can be visible or not. + * @Default {true} + */ + showColor?: boolean; + } + + export interface DefaultColumnStyle { + + /** Specifies the alignment mode of the heat map column. + * @Default {ej.HeatMap.TextAlign.Center} + */ + textAlign?: any; + + /** Specifies the template id of the heat map column header. + */ + headerTemplateID?: string; + + /** Specifies the template id of all individual cell data of the heat map. + */ + templateID?: string; + } + + export interface ItemsMappingColumnStyle { + + /** Specifies the width of the heat map column. + * @Default {0} + */ + width?: number; + + /** Specifies the text align mode of the heat map column. + * @Default {ej.HeatMap.TextAlign.Center} + */ + textAlign?: string; + + /** Specifies the template id of the column header. + */ + headerTemplateID?: string; + + /** Specifies the template id of all individual cell data. + */ + templateID?: string; + } + + export interface ItemsMappingColumn { + + /** Specifies the name of the column or row. + */ + propertyName?: string; + + /** Specifies the value of the column or row. + */ + displayName?: string; + } + + export interface ItemsMappingRow { + + /** Specifies the name of the column or row. + */ + propertyName?: string; + + /** Specifies the value of the column or row. + */ + displayName?: string; + } + + export interface ItemsMappingValue { + + /** Specifies the name of the column or row. + */ + propertyName?: string; + + /** Specifies the value of the column or row. + */ + displayName?: string; + } + + export interface ItemsMappingHeaderMapping { + + /** Specifies the name of the column or row. + */ + propertyName?: string; + + /** Specifies the value of the column or row. + */ + displayName?: string; + + /** Specifies the property and display value of the header. + * @Default {null} + */ + columnStyle?: any; + } + + export interface ItemsMapping { + + /** Column settings for the individual heat map column. + * @Default {null} + */ + columnStyle?: ItemsMappingColumnStyle; + + /** Specifies the property and display value of the column. + * @Default {null} + */ + column?: ItemsMappingColumn; + + /** Specifies the row property and display value of the heat map. + * @Default {null} + */ + row?: ItemsMappingRow; + + /** Specifies the property and display value of the column value. + * @Default {null} + */ + value?: ItemsMappingValue; + + /** Specifies the property and display value of the header. + * @Default {null} + */ + headerMapping?: ItemsMappingHeaderMapping; + + /** Specifies the property and display value of the collection of column. + * @Default {[]} + */ + columnMapping?: any[]; + } + + export interface ColorMappingCollectionLabel { + + /** Enables/disables the bold style of the heat map label. + * @Default {false} + */ + bold?: boolean; + + /** Enables/disables the italic style of the heat map label. + * @Default {false} + */ + italic?: boolean; + + /** specifies the text value of the heat map label. + */ + text?: string; + + /** Specifies the text style of the heat map label. + * @Default {ej.HeatMap.TextDecoration.None} + */ + textDecoration?: ej.datavisualization.HeatMap.TextDecoration|string; + + /** Specifies the font size of the heat map label. + * @Default {10} + */ + fontSize?: number; + + /** Specifies the font family of the heat map label. + * @Default {Arial} + */ + fontFamily?: string; + + /** Specifies the font color of the heat map label. + * @Default {black} + */ + fontColor?: string; + } + + export interface ColorMappingCollection { + + /** Specifies the color of the heat map column data. + * @Default {white} + */ + color?: string; + + /** Specifies the color values of the heat map column data. + * @Default {0} + */ + value?: number; + + /** Specifies the label properties of the heat map color. + * @Default {null} + */ + label?: ColorMappingCollectionLabel; + } + } + namespace HeatMap { + enum Associate { + //Used to set the associate of tooltip as Target + Target, + //Used to set the associate of tooltip as MouseFollow + MouseFollow, + //Used to set the associate of tooltip as MouseEnter + MouseEnter, + } + } + namespace HeatMap { + enum Horizontal { + //Used to display the tooltip horizontally on left side of rows/columns + Left, + //Used to display the tooltip horizontally on center side of rows/columns + Center, + //Used to display the tooltip horizontally on right side of rows/columns + Right, + } + } + namespace HeatMap { + enum Vertical { + //Used to display the tooltip horizontally on left side of rows/columns + Top, + //Used to display the tooltip horizontally on center side of rows/columns + Center, + //Used to display the tooltip horizontally on right side of rows/columns + Bottom, + } + } + namespace HeatMap { + enum Trigger { + //Tooltip can be triggered on mouse hovers + Hover, + //Tooltip can be triggered on mouse click + Click, + } + } + namespace HeatMap { + enum Effect { + //Sets tooltip animation as None + None, + //Sets tooltip animation as Fade + Fade, + //Sets tooltip animation as Slide + Slide, + } + } + namespace HeatMap { + enum CellVisibility { + //Display the content of the cell + Visible, + //Hide the content of the cell + Hidden, + } + } + namespace HeatMap { + enum TextDecoration { + //Defines a line below the text + Underline, + //Defines a line above the text + Overline, + //Defines a line through the text + LineThrough, + //Defines a normal text. This is default + None, + } + } + + class HeatMapLegend extends ej.Widget { + static fn: HeatMapLegend; + constructor(element: JQuery | Element, options?: HeatMapLegend.Model); + static Locale: any; + model: HeatMapLegend.Model; + defaults: HeatMapLegend.Model; + } + export namespace HeatMapLegend { + + export interface Model { + + /** Specifies the width of the heatmap legend. + * @Default {null} + */ + width?: any; + + /** Specifies the height of the heatmap legend. + * @Default {null} + */ + height?: any; + + /** Specifies can enable responsive mode or not for heatmap legend. + * @Default {false} + */ + isResponsive?: boolean; + + /** Specifies whether the cell label can be shown or not. + * @Default {false} + */ + showLabel?: boolean; + + /** Specifies the color values of the column data. + * @Default {[]} + */ + colorMappingCollection?: ColorMappingCollection[]; + + /** Specifies the orientation of the heatmap legend + * @Default {ej.HeatMap.LegendOrientation.Horizontal} + */ + orientation?: ej.datavisualization.HeatMap.LegendOrientation|string; + + /** Specifies the legend mode as gradient or list. + * @Default {ej.HeatMap.LegendMode.Gradient} + */ + legendMode?: ej.datavisualization.HeatMap.LegendMode|string; + } + + export interface ColorMappingCollectionLabel { + + /** Enables/disables the bold style of the heatmap legend label. + * @Default {false} + */ + bold?: boolean; + + /** Enables/disables the italic style of the heatmap legend label. + * @Default {false} + */ + italic?: boolean; + + /** specifies the text value of the heatmap legend label. + */ + text?: string; + + /** Specifies the text style of the heatmap legend label. + * @Default {ej.HeatMap.TextDecoration.None} + */ + textDecoration?: ej.datavisualization.HeatMap.TextDecoration|string; + + /** Specifies the font size of the heatmap legend label. + * @Default {10} + */ + fontSize?: number; + + /** Specifies the font family of the heatmap legend label. + * @Default {Arial} + */ + fontFamily?: string; + + /** Specifies the font color of the heatmap legend label. + * @Default {black} + */ + fontColor?: string; + } + + export interface ColorMappingCollection { + + /** Specifies the color of the heatmap legend data. + * @Default {white} + */ + color?: string; + + /** Specifies the color values of the heatmap legend column data. + * @Default {0} + */ + value?: number; + + /** Specifies the label properties of the heatmap legend color. + * @Default {null} + */ + label?: ColorMappingCollectionLabel; + } + } + namespace HeatMap { + enum LegendOrientation { + //Scales the graphic content non-uniformly to the width and height of the diagram area + Horizontal, + //Used to align the image at the top left of diagram area + Vertical, + } + } + namespace HeatMap { + enum LegendMode { + //Scales the graphic content non-uniformly to the width and height of the diagram area + Gradient, + //Used to align the image at the top left of diagram area + List, + } + } + + class Sparkline extends ej.Widget { + static fn: Sparkline; + constructor(element: JQuery | Element, options?: Sparkline.Model); + static Locale: any; + model: Sparkline.Model; + defaults: Sparkline.Model; + + /** Redraws the entire sparkline. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; + } + export namespace Sparkline { + + export interface Model { + + /** Background color of the plot area. + * @Default {transparent} + */ + background?: string; + + /** Fill color for the sparkline series. + * @Default {#33ccff} + */ + fill?: string; + + /** Border color of the series. + * @Default {null} + */ + stroke?: string; + + /** Options for customizing the color, opacity and width of the sparkline border. + */ + border?: Border; + + /** Border width of the series. + * @Default {1} + */ + width?: number; + + /** Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /** Color for series high point. + * @Default {null} + */ + highPointColor?: string; + + /** Color for series low point. + * @Default {null} + */ + lowPointColor?: string; + + /** Color for series start point. + * @Default {null} + */ + startPointColor?: string; + + /** Color for series end point. + * @Default {null} + */ + endPointColor?: string; + + /** Color for series negative point. + * @Default {null} + */ + negativePointColor?: string; + + /** Options for customizing the color, opacity of the sparkline start and end range. + */ + rangeBandSettings?: RangeBandSettings; + + /** Name of the culture based on which sparkline should be localized. + * @Default {en-US} + */ + locale?: string; + + /** Name of a field in data source, where the fill color for all the data points is generated. + */ + palette?: string; + + /** Controls whether sparkline has to be responsive or not. + * @Default {true} + */ + isResponsive?: boolean; + + /** Controls whether Sparkline has to be rendered as Canvas or SVG.Canvas rendering supports all functionalities in SVG rendering. + * @Default {false} + */ + enableCanvasRendering?: boolean; + + /** Specify to convert the date object to string, using locale settings. + * @Default {false} + */ + enableGroupSeparator?: boolean; + + /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /** Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /** Gap or padding for sparkline. + * @Default {8} + */ + padding?: number; + + /** Specifies the type of the series to render in sparkline. + * @Default {line. See Type} + */ + type?: ej.datavisualization.Sparkline.Type|string; + + /** Specifies the theme for Sparkline. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Sparkline.Theme|string; + + /** Options to customize the tooltip. + */ + tooltip?: Tooltip; + + /** Options for displaying and customizing marker for a data point. + */ + markerSettings?: MarkerSettings; + + /** Options to customize the Sparkline size. + */ + size?: Size; + + /** Options for customizing the color,dashArray and width of the axisLine. + */ + axisLineSettings?: AxisLineSettings; + + /** Fires before loading the sparkline. + */ + load?(e: LoadEventArgs): void; + + /** Fires after loaded the sparkline. + */ + loaded?(e: LoadedEventArgs): void; + + /** Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip. + */ + tooltipInitialize?(e: TooltipInitializeEventArgs): void; + + /** Fires before rendering a series. This event is fired for each series in Sparkline. + */ + seriesRendering?(e: SeriesRenderingEventArgs): void; + + /** Fires when mouse is moved over a point. + */ + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; + + /** Fires on clicking a point in sparkline. You can use this event to handle clicks made on points. + */ + pointRegionMouseClick?(e: PointRegionMouseClickEventArgs): void; + + /** Fires on moving mouse over the sparkline. + */ + sparklineMouseMove?(e: SparklineMouseMoveEventArgs): void; + + /** Fires on moving mouse outside the sparkline. + */ + sparklineMouseLeave?(e: SparklineMouseLeaveEventArgs): void; + } + + export interface LoadEventArgs { - /** parameter returns the new position of the node/connector - */ - newValue?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns whether or not to cancel the dragOver event - */ - cancel?: boolean; + /** Instance of the sparkline model object + */ + model?: any; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Name of the event + */ + type?: string; + } - export interface DropEventArgs { + export interface LoadedEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns node or connector that is being dropped - */ - element?: any; + /** Instance of the sparkline model object + */ + model?: any; - /** parameter returns whether or not to cancel the drop event - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; + } - /** parameter returns the object from where the element is dragged - */ - source?: any; + export interface TooltipInitializeEventArgs { - /** parameter returns the object over which the object will be dropped - */ - target?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns the enum which defines the type of the source - */ - sourceType?: string; + /** Instance of the sparkline model object + */ + model?: any; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Name of the event + */ + type?: string; - export interface EditorFocusChangeEventArgs { - /** Returns the cancel option value. - */ - cancel?: boolean; - } + /** X Location of the trackball tooltip in pixels + */ + locationX?: any; - export interface GroupChangeEventArgs { + /** Y Location of the trackball tooltip in pixels + */ + locationY?: any; - /** parameter returns the object that is added to/removed from a group - */ - element?: any; + /** Index of the point for which trackball tooltip is displayed + */ + pointIndex?: number; - /** parameter returns the old parent group(if any) of the object - */ - oldParent?: any; + /** Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip + */ + currentText?: string; + } - /** parameter returns the new parent group(if any) of the object - */ - newParent?: any; + export interface SeriesRenderingEventArgs { - /** parameter returns the cause of group change("group", unGroup") - */ - cause?: string; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Instance of the sparkline model object + */ + model?: any; - export interface HistoryChangeEventArgs { + /** Name of the event + */ + type?: string; - /** An array of objects, where each object represents the changes made in last undo/redo. To explore how the changes are defined, refer [Undo Redo Changes](#undo-redo-changes) - */ - changes?: any[]; + /** Minimum x value of the data point + */ + minX?: any; - /** A collection of objects that are changed in the last undo/redo - */ - Source?: any[]; + /** Minimum y value of the data point + */ + minY?: any; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Maximum x value of the data point + */ + maxX?: any; - export interface ItemClickEventArgs { + /** Maximum y value of the data point + */ + maxY?: any; + } - /** parameter returns the object that was actually clicked - */ - actualObject?: any; + export interface PointRegionMouseMoveEventArgs { - /** parameter returns the object that is selected - */ - selectedObject?: any; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns whether or not to cancel the drop event - */ - cancel?: boolean; + /** Instance of the sparkline model object + */ + model?: any; - /** parameter returns the actual click event arguments that explains which button is clicked - */ - event?: any; + /** Name of the event + */ + type?: string; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** X-coordinate of point in pixel + */ + locationX?: number; - export interface MouseEnterEventArgs { + /** Y-coordinate of point in pixel + */ + locationY?: number; - /** parameter returns the target node or connector - */ - element?: any; + /** Index of the point in series + */ + pointIndex?: number; - /** parameter returns the object from where the selected object is dragged - */ - source?: any; + /** Type of the series + */ + seriesType?: string; + } - /** parameter returns the target object over which the selected object is dragged - */ - target?: any; + export interface PointRegionMouseClickEventArgs { - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface MouseLeaveEventArgs { + /** Instance of the sparkline model object + */ + model?: any; - /** parameter returns the target node or connector - */ - element?: any; + /** Name of the event + */ + type?: string; - /** parameter returns the object from where the selected object is dragged - */ - source?: any; + /** X-coordinate of point in pixel + */ + locationX?: number; - /** parameter returns the target object over which the selected object is dragged - */ - target?: any; + /** Y-coordinate of point in pixel + */ + locationY?: number; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Index of the point in series + */ + pointIndex?: number; + + /** Type of the series + */ + seriesType?: string; + } + + export interface SparklineMouseMoveEventArgs { - export interface MouseOverEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns the target node or connector - */ - element?: any; + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + } + + export interface SparklineMouseLeaveEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + } + + export interface Border { + + /** Border color of the sparkline. + * @Default {transparent} + */ + color?: string; + + /** Width of the Sparkline border. + * @Default {1} + */ + width?: number; + } + + export interface RangeBandSettings { + + /** Start value of the range band. + * @Default {null} + */ + startRange?: number; + + /** End value of the range band. + * @Default {null} + */ + endRange?: number; + + /** Range band opacity of the series. + * @Default {1} + */ + opacity?: number; + + /** Range band color of the series. + * @Default {transparent} + */ + color?: string; + } + + export interface TooltipBorder { + + /** Border color of the tooltip. + * @Default {transparent} + */ + color?: string; + + /** Border width of the tooltip. + * @Default {1} + */ + width?: number; + } + + export interface TooltipFont { + + /** Font color of the text in the tooltip. + * @Default {#111111} + */ + color?: string; + + /** Font Family for the tooltip. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font Style for the tooltip. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Sparkline.FontStyle|string; + + /** Specifies the font weight for the tooltip. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Sparkline.FontWeight|string; + + /** Opacity for text in the tooltip. + * @Default {1} + */ + opacity?: number; + + /** Font size for text in the tooltip. + * @Default {8px} + */ + size?: string; + } + + export interface Tooltip { + + /** Show/hides the tooltip visibility. + * @Default {false} + */ + visible?: boolean; + + /** Fill color for the sparkline tooltip. + * @Default {white} + */ + fill?: string; + + /** Custom template to the tooltip. + */ + template?: string; + + /** Options for customizing the border of the tooltip. + */ + border?: TooltipBorder; + + /** Options for customizing the font of the tooltip. + */ + font?: TooltipFont; + } + + export interface MarkerSettingsBorder { + + /** Border color of the marker shape. + * @Default {transparent} + */ + color?: string; + + /** Controls the opacity of the marker border. + * @Default {1} + */ + opacity?: number; + + /** Border width of the marker shape. + * @Default {null} + */ + width?: number; + } + + export interface MarkerSettings { + + /** Controls the opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /** Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; + + /** width of the marker shape. + * @Default {2} + */ + width?: number; + + /** Color of the marker shape. + * @Default {white} + */ + fill?: string; + + /** Options for customizing the border of the marker shape. + */ + border?: MarkerSettingsBorder; + } + + export interface Size { + + /** Height of the Sparkline. Height can be specified in either pixel or percentage. + * @Default {''} + */ + height?: string; + + /** Width of the Sparkline. Width can be specified in either pixel or percentage. + * @Default {''} + */ + width?: string; + } + + export interface AxisLineSettings { + + /** Controls the visibility of the axis. + * @Default {false} + */ + visible?: boolean; + + /** Color of the axis line. + * @Default {'#111111'} + */ + color?: string; + + /** Width of the axis line. + * @Default {1} + */ + width?: number; + + /** Dash array of the axis line. + * @Default {1} + */ + dashArray?: number; + } + } + namespace Sparkline { + enum Type { + //string + Area, + //string + Line, + //string + Column, + //string + Pie, + //string + WinLoss, + } + } + namespace Sparkline { + enum Theme { + //string + Azure, + //string + FlatLight, + //string + FlatDark, + //string + Azuredark, + //string + Lime, + //string + LimeDark, + //string + Saffron, + //string + SaffronDark, + //string + GradientLight, + //string + GradientDark, + } + } + namespace Sparkline { + enum FontStyle { + //string + Normal, + //string + Italic, + } + } + namespace Sparkline { + enum FontWeight { + //string + Regular, + //string + Bold, + //string + Lighter, + } + } + + class SunburstChart extends ej.Widget { + static fn: SunburstChart; + constructor(element: JQuery | Element, options?: SunburstChart.Model); + static Locale: any; + model: SunburstChart.Model; + defaults: SunburstChart.Model; + + /** Redraws the entire sunburst. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; + + /** destroy the sunburst + * @returns {void} + */ + destroy(): void; + } + export namespace SunburstChart { + + export interface Model { + + /** Background color of the plot area. + * @Default {null} + */ + background?: string; + + /** Bind the data field from the data source. + * @Default {null} + */ + valueMemberPath?: string; + + /** Options for customizing the sunburst border. + */ + border?: Border; + + /** Options for customizing the sunburst segment border. + */ + segmentBorder?: SegmentBorder; + + /** Specifies the dataSource to the sunburst. + * @Default {null} + */ + dataSource?: any; + + /** Palette color for the data points. + * @Default {null} + */ + palette?: string; + + /** Parent node of the data points. + * @Default {null} + */ + parentNode?: string; + + /** Name of the property in the datasource that contains x values. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y values. + * @Default {null} + */ + yName?: string; + + /** Controls whether sunburst has to be responsive or not. + * @Default {true} + */ + isResponsive?: boolean; + + /** Options to customize the Sunburst size. + */ + size?: Size; + + /** Controls the visibility of sunburst. + * @Default {true} + */ + visible?: boolean; + + /** Options to customize the Sunburst tooltip. + */ + tooltip?: Tooltip; + + /** Options for customizing sunburst points. + */ + points?: Points; + + /** Sunburst rendering will start from the specified value + * @Default {null} + */ + startAngle?: number; + + /** Sunburst rendering will end at the specified value + * @Default {null} + */ + endAngle?: number; + + /** Sunburst outer radius value + * @Default {1} + */ + radius?: number; + + /** Sunburst inner radius value + * @Default {0.4} + */ + innerRadius?: number; + + /** Options to customize the Sunburst dataLabel. + */ + dataLabelSettings?: DataLabelSettings; + + /** Options for customizing the title and subtitle of sunburst. + */ + title?: Title; + + /** Options for customizing the appearance of the levels or point while highlighting. + */ + highlightSettings?: HighlightSettings; + + /** Options for customizing the appearance of the levels or data point while selection. + */ + selectionSettings?: SelectionSettings; + + /** Specify levels of sunburst for grouped visualization of data + * @Default {[]} + */ + levels?: Level[]; + + /** Options to customize the legend items and legend title. + */ + legend?: Legend; + + /** Specifies the theme for Sunburst. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Sunburst.SunburstTheme|string; + + /** Options to customize the left, right, top and bottom margins of sunburst area. + */ + margin?: Margin; + + /** Enable/disable the animation for all the levels. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Opacity of the levels. + * @Default {1} + */ + opacity?: number; + + /** Options for enable zooming feature of chart. + */ + zoomSettings?: ZoomSettings; + + /** Animation type of sunburst + * @Default {rotation. See Alignment} + */ + animationType?: ej.datavisualization.Sunburst.Animation|string; + + /** Fires before loading. + */ + load?(e: LoadEventArgs): void; + + /** Fires before rendering sunburst. + */ + preRender?(e: PreRenderEventArgs): void; + + /** Fires after rendering sunburst. + */ + loaded?(e: LoadedEventArgs): void; + + /** Fires before rendering the datalabel + */ + dataLabelRendering?(e: DataLabelRenderingEventArgs): void; + + /** Fires before rendering each segment + */ + segmentRendering?(e: SegmentRenderingEventArgs): void; + + /** Fires before rendering sunburst title. + */ + titleRendering?(e: TitleRenderingEventArgs): void; + + /** Fires during initialization of tooltip. + */ + tooltipInitialize?(e: TooltipInitializeEventArgs): void; + + /** Fires after clicking the point in sunburst + */ + pointRegionClick?(e: PointRegionClickEventArgs): void; - /** parameter returns the object from where the element is dragged - */ - source?: any; + /** Fires while moving the mouse over sunburst points + */ + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; - /** parameter returns the object over which the element is being dragged. - */ - target?: any; + /** Fires when clicking the point to perform drilldown. + */ + drillDownClick?(e: DrillDownClickEventArgs): void; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Fires when resetting drilldown points. + */ + drillDownBack?(e: DrillDownBackEventArgs): void; - export interface NodeCollectionChangeEventArgs { + /** Fires after resetting the sunburst points + */ + drillDownReset?(e: DrillDownResetEventArgs): void; + } - /** parameter returns whether the node is to be added or removed - */ - changeType?: string; + export interface LoadEventArgs { - /** parameter returns the node which needs to be added or deleted - */ - element?: any; + /** Load event data + */ + data?: string; - /** parameter defines whether to cancel the collection change or not - */ - cancel?: boolean; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** triggers before and after adding the node in the diagram which can be differentiated through `state` argument. We can cancel the event only before adding the node - */ - state?: string; + /** Instance of the sunburst model object + */ + model?: any; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Name of the event + */ + type?: string; + } - export interface PropertyChangeEventArgs { + export interface PreRenderEventArgs { - /** parameter returns the selected element - */ - element?: any; + /** PreRender event data + */ + data?: string; - /** parameter returns the action is nudge or not - */ - cause?: string; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns the new value of the node property that is being changed - */ - newValue?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** parameter returns the old value of the property that is being changed - */ - oldValue?: any; + /** Name of the event + */ + type?: string; + } - /** parameter returns the name of the property that is changed - */ - propertyName?: string; + export interface LoadedEventArgs { - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Loaded event data + */ + data?: string; - export interface RotationChangeEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns the node that is rotated - */ - element?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** parameter returns the previous rotation angle - */ - oldValue?: any; + /** Name of the event + */ + type?: string; + } - /** parameter returns the new rotation angle - */ - newValue?: any; + export interface DataLabelRenderingEventArgs { - /** parameter to specify whether or not to cancel the event - */ - cancel?: boolean; + /** Sunburst datalabel data + */ + data?: string; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface ScrollChangeEventArgs { + /** Instance of the sunburst model object + */ + model?: any; - /** Parameter returns the new zoom value, horizontal and vertical scroll offsets. - */ - newValues?: any; + /** Name of the event + */ + type?: string; + } - /** parameter returns the previous zoom value, horizontal and vertical scroll offsets. - */ - oldValues?: any; + export interface SegmentRenderingEventArgs { - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Sunburst datalabel data + */ + data?: string; - export interface SegmentChangeEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** Parameter returns the connector that is being edited - */ - element?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** parameter returns the state of editing (starting, dragging, completed) - */ - dragState?: string; + /** Name of the event + */ + type?: string; + } - /** parameter returns the current mouse position - */ - point?: any; + export interface TitleRenderingEventArgs { - /** parameter to specify whether or not to cancel the event - */ - cancel?: boolean; + /** Sunburst title data + */ + data?: string; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface SelectionChangeEventArgs { + /** Instance of the sunburst model object + */ + model?: any; - /** parameter returns whether the item is selected or removed selection - */ - changeType?: string; + /** Name of the event + */ + type?: string; + } - /** parameter returns the item which is selected or to be selected - */ - element?: any; + export interface TooltipInitializeEventArgs { - /** parameter returns the collection of nodes and connectors that have to be removed from selection list - */ - oldItems?: any[]; + /** Sunburst tooltip data + */ + data?: string; - /** parameter returns the collection of nodes and connectors that have to be added to selection list - */ - newItems?: any[]; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns the collection of nodes and connectors that will be selected after selection change - */ - selectedItems?: any[]; + /** Instance of the sunburst model object + */ + model?: any; - /** parameter to specify whether or not to cancel the selection change event - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; + } - /** triggers before and after adding the selection to the object in the diagram which can be differentiated through `state` argument. - * We can cancel the event only before the selection of the object. - */ - state?: string; + export interface PointRegionClickEventArgs { - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Includes clicked points region data + */ + data?: string; - export interface SizeChangeEventArgs { + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns node that was resized - */ - element?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** parameter to cancel the size change - */ - cancel?: boolean; + /** Name of the event + */ + type?: string; + } - /** parameter returns the new width, height, offsetX and offsetY values of the element that is being resized - */ - newValue?: any; + export interface PointRegionMouseMoveEventArgs { - /** parameter returns the previous width,height,offsetX and offsetY values of the element that is being resized - */ - oldValue?: any; + /** Includes data of mouse moved region + */ + data?: string; - /** parameter returns the state of resizing(starting,resizing,completed) - */ - resizeState?: string; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns the difference between new and old value - */ - offset?: any; + /** Instance of the sunburst model object + */ + model?: any; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Name of the event + */ + type?: string; + } - export interface TextChangeEventArgs { + export interface DrillDownClickEventArgs { - /** parameter returns the node that contains the text being edited - */ - element?: any; + /** Clicked point data + */ + data?: string; - /** parameter returns the new text - */ - value?: string; + /** Set this option to true to cancel the event + */ + cancel?: boolean; - /** parameter returns the keyCode of the key entered - */ - keyCode?: string; + /** Instance of the sunburst model object + */ + model?: any; - /** parameter returns the id of the diagram - */ - diagramId?: string; - } + /** Name of the event + */ + type?: string; + } - export interface CreateEventArgs { - - /** Returns the diagram model. - */ - model?: any; - - /** Returns the name of the event - */ - type?: string; - - /** parameter returns the id of the diagram - */ - diagramId?: string; - } - - export interface BackgroundImage { - - /** Defines how to align the background image over the diagram area. - * @Default {ej.datavisualization.Diagram.ImageAlignment.XMidYMid} - */ - alignment?: ej.datavisualization.Diagram.ImageAlignment | string; - } - - export interface CommandManagerCommandsGesture { - - /** Sets the key value, on recognition of which the command will be executed. - * @Default {ej.datavisualization.Diagram.Keys.None} - */ - key?: ej.datavisualization.Diagram.Keys | string; - - /** Sets a combination of key modifiers, on recognition of which the command will be executed. - * @Default {ej.datavisualization.Diagram.KeyModifiers.None} - */ - keyModifiers?: ej.datavisualization.Diagram.KeyModifiers | string; - } - - export interface CommandManagerCommands { - - /** A method that defines whether the command is executable at the moment or not. - */ - canExecute?: any; - - /** A method that defines what to be executed when the key combination is recognized. - */ - execute?: any; - - /** Defines a combination of keys and key modifiers, on recognition of which the command will be executed - */ - gesture?: CommandManagerCommandsGesture; - - /** Defines any additional parameters that are required at runtime - * @Default {null} - */ - parameter?: any; - } - - export interface CommandManager { - - /** An object that maps a set of command names with the corresponding command objects - * @Default {{}} - */ - commands?: CommandManagerCommands; - } - - export interface ConnectorsLabelsMargin { - - /** To set the margin of the label in right direction - * @Default {0} - */ - right?: number; - - /** To set the margin of the label in left direction - * @Default {0} - */ - left?: number; - - /** To set the margin of the label in top direction - * @Default {0} - */ - top?: number; - - /** To set the margin of the label in bottom direction - * @Default {0} - */ - bottom?: number; - } - - export interface ConnectorsLabel { - - /** Defines how the label should be aligned with respect to the segment - * @Default {ej.datavisualization.Diagram.Alignment.Center} - */ - alignment?: ej.datavisualization.Diagram.Alignment | string; - - /** Enables/disables the bold style - * @Default {false} - */ - bold?: boolean; - - /** Sets the border color of the label - * @Default {transparent} - */ - borderColor?: string; - - /** Sets the border width of the label - * @Default {0} - */ - borderWidth?: number; - - /** Defines whether the label should be aligned within the connector boundaries - * @Default {true} - */ - boundaryConstraints?: boolean; - - /** Sets the fill color of the text area - * @Default {transparent} - */ - fillColor?: string; - - /** Sets the font color of the text - * @Default {black} - */ - fontColor?: string; - - /** Sets the font family of the text - * @Default {Arial} - */ - fontFamily?: string; - - /** Defines the font size of the text - * @Default {12} - */ - fontSize?: number; - - /** Sets the horizontal alignment of the label. - * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} - */ - horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment | string; - - /** Sets the hyperlink for the labels in the connectors. - * @Default {none} - */ - hyperlink?: string; - - /** Enables/disables the italic style - * @Default {false} - */ - italic?: boolean; - - /** Gets whether the label is currently being edited or not. - * @Default {ej.datavisualization.Diagram.LabelEditMode.Edit} - */ - mode?: ej.datavisualization.Diagram.LabelEditMode | string; - - /** Sets the unique identifier of the label - */ - name?: string; - - /** Sets the fraction/ratio(relative to connector) that defines the position of the label - * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} - */ - offset?: any; - - /** Sets the fraction/ratio(relative to connector) that defines the position of the label - * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} - */ - margin?: ConnectorsLabelsMargin; - - /** Defines the transparency of labels - * @Default {1} - */ - opacity?: number; - - /** Defines whether the label is editable or not - * @Default {false} - */ - readOnly?: boolean; - - /** Defines whether the label should be positioned whether relative to segments or connector boundaries - * @Default {ej.datavisualization.Diagram.LabelRelativeMode.SegmentPath} - */ - relativeMode?: ej.datavisualization.Diagram.LabelRelativeMode | string; - - /** Defines the angle to which the label needs to be rotated - * @Default {0} - */ - rotateAngle?: number; - - /** Sets the position of the label with respect to the total segment length - * @Default {0.5} - */ - segmentOffset?: string; - - /** Defines the label text - */ - text?: string; - - /** Defines how to align the text inside the label. - * @Default {ej.datavisualization.Diagram.TextAlign.Center} - */ - textAlign?: ej.datavisualization.Diagram.TextAlign | string; - - /** Sets how to decorate the label text. - * @Default {ej.datavisualization.Diagram.TextDecorations.None} - */ - textDecoration?: ej.datavisualization.Diagram.TextDecorations | string; - - /** Sets the vertical alignment of the label. - * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} - */ - verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment | string; - - /** Enables or disables the visibility of the label - * @Default {true} - */ - visible?: boolean; - - /** Sets the width of the label(the maximum value of label width and the connector width will be considered as label width) - * @Default {50} - */ - width?: number; - - /** Defines how the label text needs to be wrapped. - * @Default {ej.datavisualization.Diagram.TextWrapping.WrapWithOverflow} - */ - wrapping?: ej.datavisualization.Diagram.TextWrapping | string; - } - - export interface ConnectorsSegment { - - /** Sets the direction of orthogonal segment - */ - direction?: string; - - /** Describes the length of orthogonal segment - * @Default {undefined} - */ - length?: number; - - /** Describes the end point of bezier/straight segment - * @Default {Diagram.Point()} - */ - point?: ej.datavisualization.Diagram.ConnectorsSourcePoint; - - /** Defines the first control point of the bezier segment - * @Default {null} - */ - point1?: ej.datavisualization.Diagram.ConnectorsSourcePoint; - - /** Defines the second control point of bezier segment - * @Default {null} - */ - point2?: ej.datavisualization.Diagram.ConnectorsSourcePoint; - - /** Sets the type of the segment. - * @Default {ej.datavisualization.Diagram.Segments.Straight} - */ - type?: ej.datavisualization.Diagram.Segments | string; - - /** Describes the length and angle between the first control point and the start point of bezier segment - * @Default {null} - */ - vector1?: any; - - /** Describes the length and angle between the second control point and end point of bezier segment - * @Default {null} - */ - vector2?: any; - } - - export interface ConnectorsShapeMultiplicitySource { - - /** Defines the source label to connector. Applicable, if the connector is of type "UML" - * @Default {true} - */ - optional?: boolean; - - /** Defines the source label to connector. Applicable, if the connector is of type "UML" - * @Default {null} - */ - lowerBounds?: number; - - /** Defines the source label to connector. Applicable, if the connector is of type "UML" - * @Default {null} - */ - upperBounds?: number; - } - - export interface ConnectorsShapeMultiplicity { - - /** Sets the type of the multiplicity. Applicable, if the connector is of type "classifier" - * @Default {ej.datavisualization.Diagram.Multiplicity.OneToOne} - */ - type?: ej.datavisualization.Diagram.Multiplicity | string; - - /** Defines the source label to connector. Applicable, if the connector is of type "UML" - */ - source?: ConnectorsShapeMultiplicitySource; - - /** Defines the target label to connector. Applicable, if the connector is of type "UML" - * @Default {true} - */ - target?: ej.datavisualization.Diagram.ConnectorsShapeMultiplicitySource; - } - - export interface ConnectorsShape { - - /** Sets the type of the connector - * @Default {ej.datavisualization.Diagram.ConnectorShapes.BPMN} - */ - type?: ej.datavisualization.Diagram.ConnectorShapes | string; - - /** Sets the type of the flow in a BPMN Process - * @Default {ej.datavisualization.Diagram.BPMNFlows.Sequence} - */ - flow?: ej.datavisualization.Diagram.BPMNFlows | string; - - /** Sets the type of the Association in a BPMN Process - * @Default {ej.datavisualization.Diagram.AssociationFlows.Default} - */ - association?: ej.datavisualization.Diagram.AssociationFlows | string; - - /** Sets the type of the message flow. Applicable, if the connector is of type "BPMN" - * @Default {ej.datavisualization.Diagram.BPMNMessageFlows.Default} - */ - message?: ej.datavisualization.Diagram.BPMNMessageFlows | string; - - /** Sets the type of BPMN sequence flow - * @Default {ej.datavisualization.Diagram.BPMNSequenceFlows.Normal} - */ - sequence?: ej.datavisualization.Diagram.BPMNSequenceFlows | string; - - /** Defines the role of the connector in a UML Class Diagram. Applicable, if the type of the connector is "classifier". - * @Default {ej.datavisualization.Diagram.ClassifierShapes.Association} - */ - relationship?: ej.datavisualization.Diagram.ClassifierShapes | string; - - /** Defines the multiplicity option of the connector - * @Default {null} - */ - multiplicity?: ConnectorsShapeMultiplicity; - - /** Defines the shape of UMLActivity to connector. Applicable, if the connector is of type UMLActivity - * @Default {ej.datavisualization.Diagram.UMLActivityFlow.Control} - */ - ActivityFlow?: ej.datavisualization.Diagram.UMLActivityFlow | string; - } - - export interface ConnectorsSourceDecorator { - - /** Sets the border color of the source decorator - * @Default {black} - */ - borderColor?: string; - - /** Sets the border width of the decorator - * @Default {1} - */ - borderWidth?: number; - - /** Sets the fill color of the source decorator - * @Default {black} - */ - fillColor?: string; - - /** Sets the height of the source decorator - * @Default {8} - */ - height?: number; - - /** Defines the custom shape of the source decorator - */ - pathData?: string; - - /** Defines the shape of the source decorator. - * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} - */ - shape?: ej.datavisualization.Diagram.DecoratorShapes | string; - - /** Defines the width of the source decorator - * @Default {8} - */ - width?: number; - } - - export interface ConnectorsSourcePoint { - - /** Defines the x-coordinate of a position - * @Default {0} - */ - x?: number; - - /** Defines the y-coordinate of a position - * @Default {0} - */ - y?: number; - } - - export interface ConnectorsTargetDecorator { - - /** Sets the border color of the decorator - * @Default {black} - */ - borderColor?: string; - - /** Sets the color with which the decorator will be filled - * @Default {black} - */ - fillColor?: string; - - /** Defines the height of the target decorator - * @Default {8} - */ - height?: number; - - /** Defines the custom shape of the target decorator - */ - pathData?: string; - - /** Defines the shape of the target decorator. - * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} - */ - shape?: ej.datavisualization.Diagram.DecoratorShapes | string; - - /** Defines the width of the target decorator - * @Default {8} - */ - width?: number; - } - - export interface Connector { - - /** To maintain additional information about connectors - * @Default {null} - */ - addInfo?: any; - - /** Defines the width of the line bridges - * @Default {10} - */ - bridgeSpace?: number; - - /** Enables or disables the behaviors of connectors. - * @Default {ej.datavisualization.Diagram.ConnectorConstraints.Default} - */ - constraints?: ej.datavisualization.Diagram.ConnectorConstraints | string; - - /** Defines the radius of the rounded corner - * @Default {0} - */ - cornerRadius?: number; - - /** Configures the styles of shapes - */ - cssClass?: string; - - /** Sets the horizontal alignment of the connector. Applicable, if the parent of the connector is a container. - * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} - */ - horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment | string; - - /** A collection of JSON objects where each object represents a label. - * @Default {[]} - */ - labels?: ConnectorsLabel[]; - - /** Sets the stroke color of the connector - * @Default {black} - */ - lineColor?: string; - - /** Sets the pattern of dashes and gaps used to stroke the path of the connector - */ - lineDashArray?: string; - - /** Defines the padding value to ease the interaction with connectors - * @Default {10} - */ - lineHitPadding?: number; - - /** Sets the width of the line - * @Default {1} - */ - lineWidth?: number; - - /** Defines the minimum space to be left between the bottom of parent bounds and the connector. Applicable, if the parent is a container. - * @Default {0} - */ - marginBottom?: number; - - /** Defines the minimum space to be left between the left of parent bounds and the connector. Applicable, if the parent is a container. - * @Default {0} - */ - marginLeft?: number; - - /** Defines the minimum space to be left between the right of parent bounds and the connector. Applicable, if the parent is a container. - * @Default {0} - */ - marginRight?: number; - - /** Defines the minimum space to be left between the top of parent bounds and the connector. Applicable, if the parent is a container. - * @Default {0} - */ - marginTop?: number; - - /** Sets a unique name for the connector - */ - name?: string; - - /** Defines the transparency of the connector - * @Default {1} - */ - opacity?: number; - - /** Defines the size and preview size of the node to add that to symbol palette. To explore palette item, refer Palette Item - * @Default {null} - */ - paletteItem?: any; - - /** Sets the parent name of the connector. - */ - parent?: string; - - /** An array of JSON objects where each object represents a segment - * @Default {[ { type:straight } ]} - */ - segments?: ConnectorsSegment[]; - - /** Defines the role/meaning of the connector - * @Default {null} - */ - shape?: ConnectorsShape; - - /** Defines the source decorator of the connector - * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} - */ - sourceDecorator?: ConnectorsSourceDecorator; - - /** Sets the source node of the connector - */ - sourceNode?: string; - - /** Defines the space to be left between the source node and the source point of a connector - * @Default {0} - */ - sourcePadding?: number; - - /** Describes the start point of the connector - * @Default {ej.datavisualization.Diagram.Point()} - */ - sourcePoint?: ConnectorsSourcePoint; - - /** Sets the source port of the connector - */ - sourcePort?: string; - - /** Defines the target decorator of the connector - * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} - */ - targetDecorator?: ConnectorsTargetDecorator; - - /** Sets the target node of the connector - */ - targetNode?: string; - - /** Defines the space to be left between the target node and the target point of the connector - * @Default {0} - */ - targetPadding?: number; - - /** Describes the end point of the connector - * @Default {ej.datavisualization.Diagram.Point()} - */ - targetPoint?: ej.datavisualization.Diagram.ConnectorsSourcePoint; - - /** Sets the targetPort of the connector - */ - targetPort?: string; - - /** Defines the tooltip that should be shown when the mouse hovers over connector. For tooltip properties, refer Tooltip - * @Default {null} - */ - tooltip?: any; - - /** To set the vertical alignment of connector (Applicable,if the parent is group). - * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} - */ - verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment | string; - - /** Enables or disables the visibility of connector - * @Default {true} - */ - visible?: boolean; - - /** Sets the z-index of the connector - * @Default {0} - */ - zOrder?: number; - } - - export interface ContextMenuItem { - - /** Defines the text for the collection of context menu item - * @Default {null} - */ - text?: string; - - /** Defines the name for the collection of context menu items - * @Default {null} - */ - name?: string; - - /** Defines the image url for the collection of context menu items - * @Default {null} - */ - imageUrl?: string; - - /** Defines the CssClass for the collection of context menu items - * @Default {null} - */ - cssClass?: string; - - /** Defines the collection of sub items for the context menu items - * @Default {[]} - */ - subItems?: any[]; - } - - export interface ContextMenu { - - /** Defines the collection of context menu items - * @Default {[]} - */ - items?: ContextMenuItem[]; - - /** To set whether to display the default context menu items or not - * @Default {false} - */ - showCustomMenuItemsOnly?: boolean; - } - - export interface DataSourceSettings { - - /** Defines the data source either as a collection of objects or as an instance of ej.DataManager - * @Default {null} - */ - dataSource?: any; - - /** Sets the unique id of the data source items - */ - id?: string; - - /** Defines the parent id of the data source item - * @Default {''} - */ - parent?: string; - - /** Describes query to retrieve a set of data from the specified datasource - * @Default {null} - */ - query?: string; - - /** Sets the unique id of the root data source item - */ - root?: string; - - /** Describes the name of the table on which the specified query has to be executed - * @Default {null} - */ - tableName?: string; - } - - export interface DefaultSettings { - - /** Initializes the default connector properties - * @Default {null} - */ - connector?: any; - - /** Initializes the default properties of groups - * @Default {null} - */ - group?: any; - - /** Initializes the default properties for nodes - * @Default {null} - */ - node?: any; - } - - export interface HistoryManager { - - /** A method that takes a history entry as argument and returns whether the specific entry can be popped or not - */ - canPop?: any; - - /** A method that ends grouping the changes - */ - closeGroupAction?: any; - - /** A method that removes the history of a recent change made in diagram - */ - pop?: any; - - /** A method that allows to track the custom changes made in diagram - */ - push?: any; - - /** Defines what should be happened while trying to restore a custom change - * @Default {null} - */ - redo?: any; - - /** The redoStack property is used to get the number of redo actions to be stored on the history manager. Its an read-only property and the collection should not be modified. - * @Default {[]} - */ - redoStack?: any[]; - - /** The stackLimit property used to restrict the undo and redo actions to a certain limit. - * @Default {null} - */ - stackLimit?: number; - - /** A method that starts to group the changes to revert/restore them in a single undo or redo - */ - startGroupAction?: any; - - /** Defines what should be happened while trying to revert a custom change - */ - undo?: any; - - /** The undoStack property is used to get the number of undo actions to be stored on the history manager. Its an read-only property and the collection should not be modified. - * @Default {[]} - */ - undoStack?: any[]; - } - - export interface Layout { - - /** Specifies the custom bounds to arrange/align the layout - * @Default {ej.datavisualization.Diagram.Rectangle()} - */ - bounds?: any; - - /** Defines the fixed node with reference to which, the layout will be arranged and fixed node will not be repositioned - */ - fixedNode?: string; - - /** Customizes the orientation of trees/sub trees. For orientations, see Chart Orientations. For chart types, see Chart Types - * @Default {null} - */ - getLayoutInfo?: any; - - /** Sets the space to be horizontally left between nodes - * @Default {30} - */ - horizontalSpacing?: number; - - /** Defines the space to be left between layout bounds and layout. - * @Default {ej.datavisualization.Diagram.Margin()} - */ - margin?: any; - - /** Defines how to horizontally align the layout within the layout bounds - * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} - */ - horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment | string; - - /** Defines how to vertically align the layout within the layout bounds - * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} - */ - verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment | string; - - /** Sets the orientation/direction to arrange the diagram elements. - * @Default {ej.datavisualization.Diagram.LayoutOrientations.TopToBottom} - */ - orientation?: ej.datavisualization.Diagram.LayoutOrientations | string; - - /** Sets the type of the layout based on which the elements will be arranged. - * @Default {ej.datavisualization.Diagram.LayoutTypes.None} - */ - type?: ej.datavisualization.Diagram.LayoutTypes | string; - - /** Sets the space to be vertically left between nodes - * @Default {30} - */ - verticalSpacing?: number; - } - - export interface NodesAnnotation { - - /** Sets the angle between the BPMN shape and the annotation - * @Default {0} - */ - angle?: number; - - /** Sets the direction of the text annotation - * @Default {ej.datavisualization.Diagram.BPMNAnnotationDirections.Left} - */ - direction?: ej.datavisualization.Diagram.BPMNAnnotationDirection | string; - - /** Sets the height of the text annotation - * @Default {20} - */ - height?: number; - - /** Sets the distance between the BPMN shape and the annotation - * @Default {0} - */ - length?: number; - - /** Defines the additional information about the flow object in a BPMN Process - */ - text?: string; - - /** Sets the width of the text annotation - * @Default {20} - */ - width?: number; - } - - export interface NodesClassAttribute { - - /** Sets the name of the attribute - */ - name?: string; - - /** Sets the data type of attribute - */ - type?: string; - - /** Defines the visibility of the attribute - * @Default {ej.datavisualization.Diagram.ScopeValueDefaults.Public} - */ - scope?: string; - } - - export interface NodesClassMethod { - - /** Sets the visibility of the method. - * @Default {ej.datavisualization.Diagram.ScopeValueDefaults.Public} - */ - scope?: string; - } - - export interface NodesClass { - - /** Sets the name of class. - */ - name?: string; - - /** Defines the collection of attributes - * @Default {[]} - */ - attributes?: NodesClassAttribute[]; - - /** Defines the collection of methods of a Class. - * @Default {[]} - */ - methods?: NodesClassMethod[]; - } - - export interface NodesCollapseIcon { - - /** Sets the border color for collapse icon of node - * @Default {black} - */ - borderColor?: string; - - /** Sets the border width for collapse icon of node - * @Default {1} - */ - borderWidth?: number; - - /** Sets the fill color for collapse icon of node - * @Default {white} - */ - fillColor?: string; - - /** Defines the height for collapse icon of node - * @Default {15} - */ - height?: number; - - /** Sets the horizontal alignment of the icon. - * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} - */ - horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment | string; - - /** To set the margin for the collapse icon of node - * @Default {ej.datavisualization.Diagram.Margin()} - */ - margin?: any; - - /** Sets the fraction/ratio(relative to node) that defines the position of the icon - * @Default {ej.datavisualization.Diagram.Point(0.5, 1)} - */ - offset?: any; - - /** Defines the shape of the collapsed state of the node. - * @Default {ej.datavisualization.Diagram.IconShapes.None} - */ - shape?: ej.datavisualization.Diagram.IconShapes | string; - - /** Sets the vertical alignment of the icon. - * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} - */ - verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment | string; - } - - export interface NodesContainer { - - /** Defines the orientation of the container. Applicable, if the group is a container. - * @Default {vertical} - */ - orientation?: string; - - /** Sets the type of the container. Applicable if the group is a container. - * @Default {ej.datavisualization.Diagram.ContainerType.Canvas} - */ - type?: ej.datavisualization.Diagram.ContainerType | string; - } - - export interface NodesData { - - /** Sets the type of the BPMN Data object - * @Default {ej.datavisualization.Diagram.BPMNDataObjects.None} - */ - type?: ej.datavisualization.Diagram.BPMNDataObjects | string; - - /** Defines whether the BPMN data object is a collection or not - * @Default {false} - */ - collection?: boolean; - } - - export interface NodesEnumerationMember { - - /** Sets the name of the enumeration member - */ - name?: string; - } - - export interface NodesEnumeration { - - /** Sets the name of the Enumeration - */ - name?: string; - - /** Defines the collection of enumeration members - * @Default {[]} - */ - members?: NodesEnumerationMember[]; - } - - export interface NodesExpandIcon { - - /** Sets the border color for expand icon of node - * @Default {black} - */ - borderColor?: string; - - /** Sets the border width for expand icon of node - * @Default {1} - */ - borderWidth?: number; - - /** Sets the fill color for expand icon of node - * @Default {white} - */ - fillColor?: string; - - /** Defines the height for expand icon of node - * @Default {15} - */ - height?: number; - - /** Sets the horizontal alignment of the icon. - * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} - */ - horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment | string; - - /** To set the margin for the expand icon of node - * @Default {ej.datavisualization.Diagram.Margin()} - */ - margin?: any; - - /** Sets the fraction/ratio(relative to node) that defines the position of the icon - * @Default {ej.datavisualization.Diagram.Point(0.5, 1)} - */ - offset?: any; - - /** Defines the shape of the expanded state of the node. - * @Default {ej.datavisualization.Diagram.IconShapes.None} - */ - shape?: ej.datavisualization.Diagram.IconShapes | string; - - /** Sets the vertical alignment of the icon. - * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} - */ - verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment | string; - } - - export interface NodesGradientLinearGradient { - - /** Defines the different colors and the region of color transitions - * @Default {[]} - */ - stops?: any[]; - - /** Defines the left most position(relative to node) of the rectangular region that needs to be painted - * @Default {0} - */ - x1?: number; - - /** Defines the right most position(relative to node) of the rectangular region that needs to be painted - * @Default {0} - */ - x2?: number; - - /** Defines the top most position(relative to node) of the rectangular region that needs to be painted - * @Default {0} - */ - y1?: number; - - /** Defines the bottom most position(relative to node) of the rectangular region that needs to be painted - * @Default {0} - */ - y2?: number; - } - - export interface NodesGradientRadialGradient { - - /** Defines the position of the outermost circle - * @Default {0} - */ - cx?: number; - - /** Defines the outer most circle of the radial gradient - * @Default {0} - */ - cy?: number; - - /** Defines the innermost circle of the radial gradient - * @Default {0} - */ - fx?: number; - - /** Defines the innermost circle of the radial gradient - * @Default {0} - */ - fy?: number; - - /** Defines the different colors and the region of color transitions. - * @Default {[]} - */ - stops?: any[]; - } - - export interface NodesGradientStop { - - /** Sets the color to be filled over the specified region - */ - color?: string; - - /** Sets the position where the previous color transition ends and a new color transition starts - * @Default {0} - */ - offset?: number; - - /** Describes the transparency level of the region - * @Default {1} - */ - opacity?: number; - } - - export interface NodesGradient { - - /** Paints the node with linear color transitions - */ - LinearGradient?: NodesGradientLinearGradient; - - /** Paints the node with radial color transitions. A focal point defines the beginning of the gradient, and a circle defines the end point of the gradient. - */ - RadialGradient?: NodesGradientRadialGradient; - - /** Defines the color and a position where the previous color transition ends and a new color transition starts - */ - Stop?: NodesGradientStop; - } - - export interface NodesInterfaceAttribute { - - /** Sets the name of the attribute - */ - name?: string; - - /** Sets the type of the attribute - */ - type?: string; - - /** Sets the visibility of the attribute - */ - scope?: string; - } - - export interface NodesInterfaceMethod { - - /** Sets the visibility of the method - */ - scope?: string; - } - - export interface NodesInterface { - - /** Sets the name of the interface - */ - name?: string; - - /** Defines a collection of attributes of the interface - * @Default {[]} - */ - attributes?: NodesInterfaceAttribute[]; - - /** Defines the collection of public methods of an interface - * @Default {[]} - */ - methods?: NodesInterfaceMethod[]; - } - - export interface NodesLabel { - - /** Enables/disables the bold style - * @Default {false} - */ - bold?: boolean; - - /** Sets the border color of the label - * @Default {transparent} - */ - borderColor?: string; - - /** Sets the border width of the label - * @Default {0} - */ - borderWidth?: number; - - /** Sets the fill color of the text area - * @Default {transparent} - */ - fillColor?: string; - - /** Sets the font color of the text - * @Default {black} - */ - fontColor?: string; - - /** Sets the font family of the text - * @Default {Arial} - */ - fontFamily?: string; - - /** Defines the font size of the text - * @Default {12} - */ - fontSize?: number; - - /** Sets the horizontal alignment of the label. - * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} - */ - horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment | string; - - /** Enables/disables the italic style - * @Default {false} - */ - italic?: boolean; - - /** To set the margin of the label - * @Default {ej.datavisualization.Diagram.Margin()} - */ - margin?: any; - - /** Gets whether the label is currently being edited or not. - * @Default {ej.datavisualization.Diagram.LabelEditMode.Edit} - */ - mode?: ej.datavisualization.Diagram.LabelEditMode | string; - - /** Sets the unique identifier of the label - */ - name?: string; - - /** Sets the fraction/ratio(relative to node) that defines the position of the label - * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} - */ - offset?: any; - - /** Defines the transparency of the labels - * @Default {1} - */ - opacity?: number; - - /** Sets the overflowType of the labels - * @Default {ej.datavisualization.Diagram.OverflowType.Ellipsis} - */ - overflowType?: ej.datavisualization.Diagram.OverflowType | string; - - /** Defines whether the label is editable or not - * @Default {false} - */ - readOnly?: boolean; - - /** Defines the angle to which the label needs to be rotated - * @Default {0} - */ - rotateAngle?: number; - - /** Defines the label text - */ - text?: string; - - /** Defines how to align the text inside the label. - * @Default {ej.datavisualization.Diagram.TextAlign.Center} - */ - textAlign?: ej.datavisualization.Diagram.TextAlign | string; - - /** Sets how to decorate the label text. - * @Default {ej.datavisualization.Diagram.TextDecorations.None} - */ - textDecoration?: ej.datavisualization.Diagram.TextDecorations | string; - - /** Defines the overflowed content is displayed or not. - * @Default {false} - */ - textOverflow?: boolean; - - /** Sets the vertical alignment of the label. - * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} - */ - verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment | string; - - /** Enables or disables the visibility of the label - * @Default {true} - */ - visible?: boolean; - - /** Sets the width of the label(the maximum value of label width and the node width will be considered as label width) - * @Default {50} - */ - width?: number; - - /** Defines how the label text needs to be wrapped. - * @Default {ej.datavisualization.Diagram.TextWrapping.WrapWithOverflow} - */ - wrapping?: ej.datavisualization.Diagram.TextWrapping | string; - } - - export interface NodesLane { - - /** Defines the width of lane - * @Default {0} - */ - width?: number; - - /** Defines the height of lane - * @Default {0} - */ - height?: number; - - /** Defines the z-index of the lane - * @Default {0} - */ - zorder?: number; - - /** Allows to maintain additional information about lane - * @Default {{}} - */ - addInfo?: any; - - /** An array of objects where each object represents a child node of the lane - * @Default {[]} - */ - children?: any[]; - - /** Defines the fill color of the lane - * @Default {white} - */ - fillColor?: string; - - /** Defines the header of the lane - * @Default {{ text: Function, fontSize: 11 }} - */ - header?: any; - - /** Defines the object as a lane - * @Default {false} - */ - isLane?: boolean; - - /** Sets the unique identifier of the lane - */ - name?: string; - - /** Sets the orientation of the lane. - * @Default {vertical} - */ - orientation?: string; - } - - export interface NodesPaletteItem { - - /** Defines whether the symbol should be drawn at its actual size regardless of precedence factors or not - * @Default {true} - */ - enableScale?: boolean; - - /** Defines the height of the symbol - * @Default {0} - */ - height?: number; - - /** Defines the margin of the symbol item - * @Default {{ left: 4, right: 4, top: 4, bottom: 4 }} - */ - margin?: any; - - /** Defines the preview height of the symbol - * @Default {undefined} - */ - previewHeight?: number; - - /** Defines the preview width of the symbol - * @Default {undefined} - */ - previewWidth?: number; - - /** Defines the width of the symbol - * @Default {0} - */ - width?: number; - } - - export interface NodesPhase { - - /** Defines the header of the smaller regions - * @Default {null} - */ - label?: any; - - /** Defines the line color of the splitter that splits adjacent phases. - * @Default {#606060} - */ - lineColor?: string; - - /** Sets the dash array that used to stroke the phase splitter - * @Default {3,3} - */ - lineDashArray?: string; - - /** Sets the lineWidth of the phase - * @Default {1} - */ - lineWidth?: number; - - /** Sets the unique identifier of the phase - */ - name?: string; - - /** Sets the length of the smaller region(phase) of a swimlane - * @Default {100} - */ - offset?: number; - - /** Sets the orientation of the phase - * @Default {horizontal} - */ - orientation?: string; - - /** Sets the type of the object as phase - * @Default {phase} - */ - type?: string; - } - - export interface NodesPort { - - /** Sets the border color of the port - * @Default {#1a1a1a} - */ - borderColor?: string; - - /** Sets the stroke width of the port - * @Default {1} - */ - borderWidth?: number; - - /** Defines the space to be left between the port bounds and its incoming and outgoing connections. - * @Default {0} - */ - connectorPadding?: number; - - /** Defines whether connections can be created with the port - * @Default {ej.datavisualization.Diagram.PortConstraints.Connect} - */ - constraints?: ej.datavisualization.Diagram.PortConstraints | string; - - /** Sets the fill color of the port - * @Default {white} - */ - fillColor?: string; - - /** Sets the unique identifier of the port - */ - name?: string; - - /** Defines the position of the port as fraction/ ratio relative to node - * @Default {ej.datavisualization.Diagram.Point(0, 0)} - */ - offset?: any; - - /** Defines the path data to draw the port. Applicable, if the port shape is path. - */ - pathData?: string; - - /** Defines the shape of the port. - * @Default {ej.datavisualization.Diagram.PortShapes.Square} - */ - shape?: ej.datavisualization.Diagram.PortShapes | string; - - /** Defines the size of the port - * @Default {8} - */ - size?: number; - - /** Defines when the port should be visible. - * @Default {ej.datavisualization.Diagram.PortVisibility.Default} - */ - visibility?: ej.datavisualization.Diagram.PortVisibility | string; - } - - export interface NodesShadow { - - /** Defines the angle of the shadow relative to node - * @Default {45} - */ - angle?: number; - - /** Sets the distance to move the shadow relative to node - * @Default {5} - */ - distance?: number; - - /** Defines the opaque of the shadow - * @Default {0.7} - */ - opacity?: number; - } - - export interface NodesSubProcess { - - /** Defines whether the BPMN sub process is without any prescribed order or not - * @Default {false} - */ - adhoc?: boolean; - - /** Sets the boundary of the BPMN process - * @Default {ej.datavisualization.Diagram.BPMNBoundary.Default} - */ - boundary?: ej.datavisualization.Diagram.BPMNBoundary | string; - - /** Sets whether the BPMN subprocess is triggered as a compensation of a specific activity - * @Default {false} - */ - compensation?: boolean; - - /** Sets whether the BPMN subprocess is triggered as a collapsed of a specific activity - * @Default {true} - */ - collapsed?: boolean; - - /** Sets the type of the event by which the sub-process will be triggered - * @Default {ej.datavisualization.Diagram.BPMNEvents.Start} - */ - event?: ej.datavisualization.Diagram.BPMNEvents | string; - - /** Defines the collection of events that need to be appended with BPMN Sub-Process - */ - events?: any[]; - - /** Defines the loop type of a sub process. - * @Default {ej.datavisualization.Diagram.BPMNLoops.None} - */ - loop?: ej.datavisualization.Diagram.BPMNLoops | string; - - /** Defines the children for BPMN's SubProcess - * @Default {[]} - */ - Processes?: any[]; - - /** Defines the type of the event trigger - * @Default {ej.datavisualization.Diagram.BPMNTriggers.Message} - */ - trigger?: ej.datavisualization.Diagram.BPMNTriggers | string; - - /** Defines the type of a sub process - * @Default {ej.datavisualization.Diagram.BPMNSubProcessTypes.None} - */ - type?: ej.datavisualization.Diagram.BPMNSubProcessTypes | string; - } - - export interface NodesTask { - - /** To set whether the task is a global task or not - * @Default {false} - */ - call?: boolean; - - /** Sets whether the task is triggered as a compensation of another specific activity - * @Default {false} - */ - compensation?: boolean; - - /** Sets the loop type of a BPMN task. - * @Default {ej.datavisualization.Diagram.BPMNLoops.None} - */ - loop?: ej.datavisualization.Diagram.BPMNLoops | string; - - /** Sets the type of the BPMN task. - * @Default {ej.datavisualization.Diagram.BPMNTasks.None} - */ - type?: ej.datavisualization.Diagram.BPMNTasks | string; - } - - export interface Node { - - /** Defines the type of BPMN Activity. Applicable, if the node is a BPMN activity. - * @Default {ej.datavisualization.Diagram.BPMNActivity.Task} - */ - activity?: ej.datavisualization.Diagram.BPMNActivity | string; - - /** To maintain additional information about nodes - * @Default {{}} - */ - addInfo?: any; - - /** Defines the additional information of a process. It is not directly related to the message flows or sequence flows of the process. - * @Default {ej.datavisualization.Diagram.BPMNTextAnnotation()} - */ - annotation?: NodesAnnotation; - - /** Sets the border color of node - * @Default {black} - */ - borderColor?: string; - - /** Sets the pattern of dashes and gaps to stroke the border - */ - borderDashArray?: string; - - /** Sets the border width of the node - * @Default {1} - */ - borderWidth?: number; - - /** Defines whether the group can be ungrouped or not - * @Default {true} - */ - canUngroup?: boolean; - - /** Array of JSON objects where each object represents a child node/connector - * @Default {[]} - */ - children?: any[]; - - /** Sets the type of UML classifier. Applicable, if the node is a UML Class Diagram shape. - * @Default {ej.datavisualization.Diagram.ClassifierShapes.Class} - */ - classifier?: ej.datavisualization.Diagram.ClassifierShapes | string; - - /** Defines the name, attributes and methods of a Class. Applicable, if the node is a Class. - * @Default {null} - */ - class?: NodesClass; - - /** Defines the state of the node is collapsed. - */ - collapseIcon?: NodesCollapseIcon; - - /** Defines the distance to be left between a node and its connections(In coming and out going connections). - * @Default {0} - */ - connectorPadding?: number; - - /** Enables or disables the default behaviors of the node. - * @Default {ej.datavisualization.Diagram.NodeConstraints.Default} - */ - constraints?: ej.datavisualization.Diagram.NodeConstraints | string; - - /** Defines how the child objects need to be arranged(Either in any predefined manner or automatically). Applicable, if the node is a group. - * @Default {null} - */ - container?: NodesContainer; - - /** Defines the corner radius of rectangular shapes. - * @Default {0} - */ - cornerRadius?: number; - - /** Configures the styles of shapes - */ - cssClass?: string; - - /** Defines the BPMN data object - */ - data?: NodesData; - - /** Defines an Enumeration in a UML Class Diagram - * @Default {null} - */ - enumeration?: NodesEnumeration; - - /** Sets the type of the BPMN Events. Applicable, if the node is a BPMN event. - * @Default {ej.datavisualization.Diagram.BPMNEvents.Start} - */ - event?: ej.datavisualization.Diagram.BPMNEvents | string; - - /** Defines whether the node can be automatically arranged using layout or not - * @Default {false} - */ - excludeFromLayout?: boolean; - - /** Defines the state of the node is expanded or collapsed. - */ - expandIcon?: NodesExpandIcon; - - /** Defines the fill color of the node - * @Default {white} - */ - fillColor?: string; - - /** Sets the type of the BPMN Gateway. Applicable, if the node is a BPMN gateway. - * @Default {ej.datavisualization.Diagram.BPMNGateways.None} - */ - gateway?: ej.datavisualization.Diagram.BPMNGateways | string; - - /** Paints the node with a smooth transition from one color to another color - */ - gradient?: NodesGradient; - - /** Sets the type of the BPMN Shapes as group. Applicable, if the node is a BPMN. - * @Default {ej.datavisualization.Diagram.BPMNShapes} - */ - group?: any; - - /** Defines the header of a swimlane/lane - * @Default {{ text: Title, fontSize: 11 }} - */ - header?: any; - - /** Defines the height of the node - * @Default {0} - */ - height?: number; - - /** Sets the horizontal alignment of the node. Applicable, if the parent of the node is a container. - * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} - */ - horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment | string; - - /** A read only collection of the incoming connectors/edges of the node - * @Default {[]} - */ - inEdges?: any[]; - - /** Defines an interface in a UML Class Diagram - * @Default {null} - */ - interface?: NodesInterface; - - /** Defines whether the sub tree of the node is expanded or collapsed - * @Default {true} - */ - isExpanded?: boolean; - - /** Sets the node as a swimlane - * @Default {false} - */ - isSwimlane?: boolean; - - /** A collection of objects where each object represents a label - * @Default {[]} - */ - labels?: NodesLabel[]; - - /** An array of objects where each object represents a lane. Applicable, if the node is a swimlane. - * @Default {[]} - */ - lanes?: NodesLane[]; - - /** Defines the minimum space to be left between the bottom of parent bounds and the node. Applicable, if the parent is a container. - * @Default {0} - */ - marginBottom?: number; - - /** Defines the minimum space to be left between the left of parent bounds and the node. Applicable, if the parent is a container. - * @Default {0} - */ - marginLeft?: number; - - /** Defines the minimum space to be left between the right of the parent bounds and the node. Applicable, if the parent is a container. - * @Default {0} - */ - marginRight?: number; - - /** Defines the minimum space to be left between the top of parent bounds and the node. Applicable, if the parent is a container. - * @Default {0} - */ - marginTop?: number; - - /** Defines the maximum height limit of the node - * @Default {0} - */ - maxHeight?: number; - - /** Defines the maximum width limit of the node - * @Default {0} - */ - maxWidth?: number; - - /** Defines the minimum height limit of the node - * @Default {0} - */ - minHeight?: number; - - /** Defines the minimum width limit of the node - * @Default {0} - */ - minWidth?: number; - - /** Sets the unique identifier of the node - */ - name?: string; - - /** Defines the position of the node on X-Axis - * @Default {0} - */ - offsetX?: number; - - /** Defines the position of the node on Y-Axis - * @Default {0} - */ - offsetY?: number; - - /** Defines the opaque of the node - * @Default {1} - */ - opacity?: number; - - /** Defines the orientation of nodes. Applicable, if the node is a swimlane. - * @Default {vertical} - */ - orientation?: string; - - /** A read only collection of outgoing connectors/edges of the node - * @Default {[]} - */ - outEdges?: any[]; - - /** Defines the minimum padding value to be left between the bottom most position of a group and its children. Applicable, if the group is a container. - * @Default {0} - */ - paddingBottom?: number; - - /** Defines the minimum padding value to be left between the left most position of a group and its children. Applicable, if the group is a container. - * @Default {0} - */ - paddingLeft?: number; - - /** Defines the minimum padding value to be left between the right most position of a group and its children. Applicable, if the group is a container. - * @Default {0} - */ - paddingRight?: number; - - /** Defines the minimum padding value to be left between the top most position of a group and its children. Applicable, if the group is a container. - * @Default {0} - */ - paddingTop?: number; - - /** Defines the size and preview size of the node to add that to symbol palette - * @Default {null} - */ - paletteItem?: NodesPaletteItem; - - /** Sets the name of the parent group - */ - parent?: string; - - /** Sets the path geometry that defines the shape of a path node - */ - pathData?: string; - - /** An array of objects, where each object represents a smaller region(phase) of a swimlane. - * @Default {[]} - */ - phases?: NodesPhase[]; - - /** Sets the height of the phase headers - * @Default {0} - */ - phaseSize?: number; - - /** Sets the ratio/ fractional value relative to node, based on which the node will be transformed(positioning, scaling and rotation) - * @Default {ej.datavisualization.Diagram.Points(0.5,0.5)} - */ - pivot?: any; - - /** Defines a collection of points to draw a polygon. Applicable, if the shape is a polygon. - * @Default {[]} - */ - points?: any[]; - - /** An array of objects where each object represents a port - * @Default {[]} - */ - ports?: NodesPort[]; - - /** Sets the angle to which the node should be rotated - * @Default {0} - */ - rotateAngle?: number; - - /** Defines the opacity and the position of shadow - * @Default {ej.datavisualization.Diagram.Shadow()} - */ - shadow?: NodesShadow; - - /** Sets the shape of the node. It depends upon the type of node. - * @Default {ej.datavisualization.Diagram.BasicShapes.Rectangle} - */ - shape?: ej.datavisualization.Diagram.BasicShapes | ej.datavisualization.Diagram.FlowShapes | ej.datavisualization.Diagram.BPMNShapes | ej.datavisualization.Diagram.UMLActivityShapes | string; - - /** Sets the source path of the image. Applicable, if the type of the node is image. - */ - source?: string; - - /** Defines the sub process of a BPMN Activity. Applicable, if the type of the BPMN activity is sub process. - * @Default {ej.datavisualization.Diagram.BPMNSubProcess()} - */ - subProcess?: NodesSubProcess; - - /** Defines the task of the BPMN activity. Applicable, if the type of activity is set as task. - * @Default {ej.datavisualization.Diagram.BPMNTask()} - */ - task?: NodesTask; - - /** Sets the id of svg/html templates. Applicable, if the node is HTML or native. - */ - templateId?: string; - - /** Defines the textBlock of a text node - * @Default {null} - */ - textBlock?: any; - - /** Defines the tooltip that should be shown when the mouse hovers over node. For tooltip properties, refer Tooltip - * @Default {null} - */ - tooltip?: any; - - /** Sets the type of BPMN Event Triggers. - * @Default {ej.datavisualization.Diagram.BPMNTriggers.None} - */ - trigger?: ej.datavisualization.Diagram.BPMNTriggers | string; - - /** Defines the type of the node. - * @Default {ej.datavisualization.Diagram.Shapes.Basic} - */ - type?: ej.datavisualization.Diagram.Shapes | string; - - /** Sets the vertical alignment of a node. Applicable, if the parent of a node is a container. - * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} - */ - verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment | string; - - /** Defines the visibility of the node - * @Default {true} - */ - visible?: boolean; - - /** Defines the width of the node - * @Default {0} - */ - width?: number; - - /** Defines the z-index of the node - * @Default {0} - */ - zOrder?: number; - } - - export interface PageSettings { - - /** Defines the maximum distance to be left between the object and the scroll bar to trigger auto scrolling - * @Default {{ left: 15, top: 15, right: 15, bottom: 15 }} - */ - autoScrollBorder?: any; - - /** Sets whether multiple pages can be created to fit all nodes and connectors - * @Default {false} - */ - multiplePage?: boolean; - - /** Defines the background color of diagram pages - * @Default {#ffffff} - */ - pageBackgroundColor?: string; - - /** Defines the page border color - * @Default {#565656} - */ - pageBorderColor?: string; - - /** Sets the border width of diagram pages - * @Default {0} - */ - pageBorderWidth?: number; - - /** Defines the height of a page - * @Default {null} - */ - pageHeight?: number; - - /** Defines the page margin - * @Default {24} - */ - pageMargin?: number; - - /** Sets the orientation of the page. - * @Default {ej.datavisualization.Diagram.PageOrientations.Portrait} - */ - pageOrientation?: ej.datavisualization.Diagram.PageOrientations | string; - - /** Defines the height of a diagram page - * @Default {null} - */ - pageWidth?: number; - - /** Defines the scrollable area of diagram. Applicable, if the scroll limit is "limited". - * @Default {null} - */ - scrollableArea?: any; - - /** Defines the scrollable region of diagram. - * @Default {ej.datavisualization.Diagram.ScrollLimit.Infinite} - */ - scrollLimit?: ej.datavisualization.Diagram.ScrollLimit | string; - - /** Defines the draggable region of diagram elements. - * @Default {ej.datavisualization.Diagram.BoundaryConstraints.Infinite} - */ - boundaryConstraints?: ej.datavisualization.Diagram.BoundaryConstraints | string; - - /** Enables or disables the page breaks - * @Default {false} - */ - showPageBreak?: boolean; - } - - export interface ScrollSettings { - - /** Allows to read the zoom value of diagram - * @Default {0} - */ - currentZoom?: number; - - /** Sets the horizontal scroll offset - * @Default {0} - */ - horizontalOffset?: number; - - /** Allows to extend the scrollable region that is based on the scroll limit - * @Default {{left: 0, right: 0, top:0, bottom: 0}} - */ - padding?: any; - - /** Sets the vertical scroll offset - * @Default {0} - */ - verticalOffset?: number; - - /** Allows to read the view port height of the diagram - * @Default {0} - */ - viewPortHeight?: number; - - /** Allows to read the view port width of the diagram - * @Default {0} - */ - viewPortWidth?: number; - } - - export interface SelectedItemsUserHandle { - - /** Defines the background color of the user handle - * @Default {#2382c3} - */ - backgroundColor?: string; - - /** Sets the border color of the user handle - * @Default {transparent} - */ - borderColor?: string; - - /** Defines whether the user handle should be added, when more than one element is selected - * @Default {false} - */ - enableMultiSelection?: boolean; - - /** Sets the stroke color of the user handle - * @Default {transparent} - */ - pathColor?: string; - - /** Defines the custom shape of the user handle - */ - pathData?: string; - - /** Defines the position of the user handle - * @Default {ej.datavisualization.Diagram.UserHandlePositions.BottomCenter} - */ - position?: ej.datavisualization.Diagram.UserHandlePositions | string; - - /** Defines the size of the user handle - * @Default {8} - */ - size?: number; - - /** Defines the interactive behaviors of the user handle - */ - tool?: any; - - /** Defines the visibility of the user handle - * @Default {true} - */ - visible?: boolean; - } - - export interface SelectedItems { - - /** A read only collection of the selected items - * @Default {[]} - */ - children?: any[]; - - /** Controls the visibility of selector. - * @Default {ej.datavisualization.Diagram.SelectorConstraints.All} - */ - constraints?: ej.datavisualization.Diagram.SelectorConstraints | string; - - /** Defines a method that dynamically enables/ disables the interaction with multiple selection. - * @Default {null} - */ - getConstraints?: any; - - /** Sets the height of the selected items - * @Default {0} - */ - height?: number; - - /** Sets the x position of the selector - * @Default {0} - */ - offsetX?: number; - - /** Sets the y position of the selector - * @Default {0} - */ - offsetY?: number; - - /** Sets the angle to rotate the selected items - * @Default {0} - */ - rotateAngle?: number; - - /** Sets the angle to rotate the selected items. For tooltip properties, refer Tooltip - * @Default {ej.datavisualization.Diagram.Tooltip()} - */ - tooltip?: any; - - /** A collection of frequently used commands that will be added around the selector - * @Default {[]} - */ - userHandles?: SelectedItemsUserHandle[]; - - /** Sets the width of the selected items - * @Default {0} - */ - width?: number; - } - - export interface SnapSettingsHorizontalGridLines { - - /** Defines the line color of horizontal grid lines - * @Default {lightgray} - */ - lineColor?: string; - - /** Specifies the pattern of dashes and gaps used to stroke horizontal grid lines - */ - lineDashArray?: string; - - /** A pattern of lines and gaps that defines a set of horizontal gridlines - * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} - */ - linesInterval?: any[]; - - /** Specifies a set of intervals to snap the objects - * @Default {[20]} - */ - snapInterval?: any[]; - } - - export interface SnapSettingsVerticalGridLines { - - /** Defines the line color of horizontal grid lines - * @Default {lightgray} - */ - lineColor?: string; - - /** Specifies the pattern of dashes and gaps used to stroke horizontal grid lines - */ - lineDashArray?: string; - - /** A pattern of lines and gaps that defines a set of horizontal gridlines - * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} - */ - linesInterval?: any[]; - - /** Specifies a set of intervals to snap the objects - * @Default {[20]} - */ - snapInterval?: any[]; - } - - export interface SnapSettings { - - /** Enables or disables snapping nodes/connectors to objects - * @Default {true} - */ - enableSnapToObject?: boolean; - - /** Defines the appearance of horizontal gridlines - */ - horizontalGridLines?: SnapSettingsHorizontalGridLines; - - /** Defines the angle by which the object needs to be snapped - * @Default {5} - */ - snapAngle?: number; - - /** Defines and sets the snapConstraints - */ - snapConstraints?: ej.datavisualization.Diagram.SnapConstraints | string; - - /** Defines the minimum distance between the selected object and the nearest object - * @Default {5} - */ - snapObjectDistance?: number; - - /** Defines the appearance of horizontal gridlines - */ - verticalGridLines?: SnapSettingsVerticalGridLines; - } - - export interface TooltipAlignment { - - /** Defines the horizontal alignment of tooltip. - * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} - */ - horizontal?: ej.datavisualization.Diagram.HorizontalAlignment | string; - - /** Defines the vertical alignment of tooltip. - * @Default {ej.datavisualization.Diagram.VerticalAlignment.Bottom} - */ - vertical?: ej.datavisualization.Diagram.VerticalAlignment | string; - } - - export interface Tooltip { - - /** Aligns the tooltip around nodes/connectors - */ - alignment?: TooltipAlignment; - - /** Sets the margin of the tooltip - * @Default {{ left: 5, right: 5, top: 5, bottom: 5 }} - */ - margin?: any; - - /** Defines whether the tooltip should be shown at the mouse position or around node. - * @Default {ej.datavisualization.Diagram.RelativeMode.Object} - */ - relativeMode?: ej.datavisualization.Diagram.RelativeMode | string; - - /** Sets the svg/html template to be bound with tooltip - */ - templateId?: string; - } - } - namespace Diagram { - enum ImageAlignment { - //Scales the graphic content non-uniformly to the width and height of the diagram area - None, - //Used to align the image at the top left of diagram area - XMinYMin, - //Used to align the image at the left center of diagram area - XMinYMid, - //Used to align the image at the bottom left of diagram area - XMinYMax, - //Used to align the image at the top center of diagram area - XMidYMin, - //Used to align the image at the center of diagram area - XMidYMid, - //Used to align the image at the bottom center of diagram area - XMidYMax, - //Used to align the image at the top right of diagram area/node - XMaxYMin, - //Used to align the image at the right center of diagram area/node - XMaxYMid, - //Used to align the image at the bottom right of diagram area/node - XMaxYMax, - } - } - namespace Diagram { - enum BridgeDirection { - //Used to set the direction of line bridges as left - Left, - //Used to set the direction of line bridges as right - Right, - //Used to set the direction of line bridges as top - Top, - //Used to set the direction of line bridges as bottom - Bottom, - } - } - namespace Diagram { - enum Keys { - //No key pressed. - None, - //The A key. - A, - //The B key. - B, - //The C key. - C, - //The D Key. - D, - //The E key. - E, - //The F key. - F, - //The G key. - G, - //The H Key. - H, - //The I key. - I, - //The J key. - J, - //The K key. - K, - //The L Key. - L, - //The M key. - M, - //The N key. - N, - //The O key. - O, - //The P Key. - P, - //The Q key. - Q, - //The R key. - R, - //The S key. - S, - //The T Key. - T, - //The U key. - U, - //The V key. - V, - //The W key. - W, - //The X key. - X, - //The Y key. - Y, - //The Z key. - Z, - //The 0 key. - Number0, - //The 1 key. - Number1, - //The 2 key. - Number2, - //The 3 key. - Number3, - //The 4 key. - Number4, - //The 5 key. - Number5, - //The 6 key. - Number6, - //The 7 key. - Number7, - //The 8 key. - Number8, - //The 9 key. - Number9, - //The LEFT ARROW key. - Left, - //The UP ARROW key. - Up, - //The RIGHT ARROW key. - Right, - //The DOWN ARROW key. - Down, - //The ESC key. - Escape, - //The DEL key. - Delete, - //The TAB key. - Tab, - //The ENTER key. - Enter, - } - } - namespace Diagram { - enum KeyModifiers { - //No modifiers are pressed. - None, - //The ALT key. - Alt, - //The CTRL key. - Control, - //The SHIFT key. - Shift, - } - } - namespace Diagram { - enum ConnectorConstraints { - //Disable all connector Constraints - None, - //Enables connector to be selected - Select, - //Enables connector to be Deleted - Delete, - //Enables connector to be Dragged - Drag, - //Enables connectors source end to be selected - DragSourceEnd, - //Enables connectors target end to be selected - DragTargetEnd, - //Enables control point and end point of every segment in a connector for editing - DragSegmentThumb, - //Enables bridging to the connector - Bridging, - //Enables label of node to be Dragged - DragLabel, - //Enables bridging to the connector - InheritBridging, - //Enables user interaction to the connector - PointerEvents, - //Enables the contrast between clean edges of connector over rendering speed and geometric precision - CrispEdges, - //Enables all constraints - Default, - } - } - namespace Diagram { - enum HorizontalAlignment { - //Used to align text horizontally on left side of node/connector - Left, - //Used to align text horizontally on center of node/connector - Center, - //Used to align text horizontally on right side of node/connector - Right, - } - } - namespace Diagram { - enum Alignment { - //Used to align the label either top or left(before) of the connector segment - Before, - //Used to align the label at center of the connector segment - Center, - //Used to align the label either bottom or right(after) of the connector segment - After, - } - } - namespace Diagram { - enum LabelRelativeMode { - //Sets the relativeMode as SegmentPath - SegmentPath, - //Sets the relativeMode as SegmentBounds - SegmentBounds, - } - } - namespace Diagram { - enum Segments { - //Used to specify the lines as Straight - Straight, - //Used to specify the lines as Orthogonal - Orthogonal, - //Used to specify the lines as Bezier - Bezier, - } - } - namespace Diagram { - enum ConnectorShapes { - //Used to specify connector type as BPMN - BPMN, - //Used to specify connector type as UMLClassifier - UMLClassifier, - //Used to specify connector type as UMLActivity - UMLActivity, - } - } - namespace Diagram { - enum BPMNFlows { - //Used to specify the Sequence flow in a BPMN Process - Sequence, - //Used to specify the Association flow in a BPMN Process - Association, - //Used to specify the Message flow in a BPMN Process - Message, - } - } - namespace Diagram { - enum AssociationFlows { - //Used to notate default association in a BPMN Process - Default, - //Used to notate directional association in a BPMN Process - Directional, - //User to notate bi-directional association in a BPMN Process - BiDirectional, - } - } - namespace Diagram { - enum BPMNMessageFlows { - //Used to notate the default message flow in a BPMN Process - Default, - //Used to notate the instantiating message flow in a BPMN Process - InitiatingMessage, - //Used to notate the non-instantiating message flow in a BPMN Process - NonInitiatingMessage, - } - } - namespace Diagram { - enum BPMNSequenceFlows { - //Used to notate the normal sequence flow in a BPMN Process - Normal, - //Used to notate the conditional sequence flow in a BPMN Process - Conditional, - //Used to notate the default sequence flow in a BPMN Process - Default, - } - } - namespace Diagram { - enum ClassifierShapes { - //Used to define a Class - Class, - //Used to define an Interface - Interface, - //Used to define an Enumeration - Enumeration, - //Used to notate association in UML Class Diagram - Association, - //Used to notate aggregation in a UML Class Diagram - Aggregation, - //Used to notate composition in a UML Class Diagram - Composition, - //Used to notate dependency in a UML Class Diagram - Dependency, - //Used to notate inheritance in a UML Class Diagram - Inheritance, - } - } - namespace Diagram { - enum Multiplicity { - //Each entity instance is related to a single instance of another entity - OneToOne, - //An entity instance can be related to multiple instances of the other entities - OneToMany, - //Multiple instances of an entity can be related to a single instance of the other entity - ManyToOne, - //The entity instances can be related to multiple instances of each other - ManyToMany, - } - } - namespace Diagram { - enum UMLActivityFlow { - //Defines a activity flow as Object in UML Activity Diagram - Object, - //Defines a activity flow as Control in UML Activity Diagram - Control, - //Defines a activity flow as Exception in UML Activity Diagram - Exception, - } - } - namespace Diagram { - enum DecoratorShapes { - //Used to set decorator shape as none - None, - //Used to set decorator shape as Arrow - Arrow, - //Used to set decorator shape as Open Arrow - OpenArrow, - //Used to set decorator shape as Circle - Circle, - //Used to set decorator shape as Diamond - Diamond, - //Used to set decorator shape as path - Path, - } - } - namespace Diagram { - enum VerticalAlignment { - //Used to align text Vertically on left side of node/connector - Top, - //Used to align text Vertically on center of node/connector - Center, - //Used to align text Vertically on bottom of node/connector - Bottom, - } - } - namespace Diagram { - enum DiagramConstraints { - //Disables all DiagramConstraints - None, - //Enables/Disables PageEditing - PageEditable, - //Enables/Disables Bridging - Bridging, - //Enables/Disables Zooming - Zoomable, - //Enables/Disables panning on horizontal axis - PannableX, - //Enables/Disables panning on vertical axis - PannableY, - //Enables/Disables Panning - Pannable, - //Enables/Disables undo actions - Undoable, - //Enables/Disables the sharp edges - CrispEdges, - //Enables all Constraints - Default, - } - } - namespace Diagram { - enum LabelRenderingMode { - //Sets the labelRenderingMode as Html - Html, - //Sets the labelRenderingMode as Svg - Svg, - } - } - namespace Diagram { - enum LayoutOrientations { - //Used to set LayoutOrientation from top to bottom - TopToBottom, - //Used to set LayoutOrientation from bottom to top - BottomToTop, - //Used to set LayoutOrientation from left to right - LeftToRight, - //Used to set LayoutOrientation from right to left - RightToLeft, - } - } - namespace Diagram { - enum LayoutTypes { - //Used not to set any specific layout - None, - //Used to set layout type as hierarchical layout - HierarchicalTree, - //Used to set layout type as organnizational chart - OrganizationalChart, - } - } - namespace Diagram { - enum BPMNActivity { - //Used to set BPMN Activity as None - None, - //Used to set BPMN Activity as Task - Task, - //Used to set BPMN Activity as SubProcess - SubProcess, - } - } - namespace Diagram { - enum BPMNAnnotationDirection { - //Used to set the direction of BPMN Annotation as left - Left, - //Used to set the direction of BPMN Annotation as right - Right, - //Used to set the direction of BPMN Annotation as top - Top, - //Used to set the direction of BPMN Annotation as bottom - Bottom, - } - } - namespace Diagram { - enum IconShapes { - //Used to set collapse icon shape as none - None, - //Used to set collapse icon shape as Arrow(Up/Down) - Arrow, - //Used to set collapse icon shape as Plus - Plus, - //Used to set collapse icon shape as Minus - Minus, - //Used to set collapse icon shape as path - Path, - //Used to set icon shape as template - Template, - //Used to set icon shape as image - Image, - } - } - namespace Diagram { - enum NodeConstraints { - //Disable all node Constraints - None, - //Enables node to be selected - Select, - //Enables node to be Deleted - Delete, - //Enables node to be Dragged - Drag, - //Enables node to be Rotated - Rotate, - //Enables node to be connected - Connect, - //Enables node to be resize north east - ResizeNorthEast, - //Enables node to be resize east - ResizeEast, - //Enables node to be resize south east - ResizeSouthEast, - //Enables node to be resize south - ResizeSouth, - //Enables node to be resize south west - ResizeSouthWest, - //Enables node to be resize west - ResizeWest, - //Enables node to be resize north west - ResizeNorthWest, - //Enables node to be resize north - ResizeNorth, - //Enables node to be Resized - Resize, - //Enables shadow - Shadow, - //Enables label of node to be Dragged - DragLabel, - //Enables panning should be done while node dragging - AllowPan, - //Enables Proportional resize for node - AspectRatio, - //Enables the user interaction with the node - PointerEvents, - //Enables contrast between clean edges for the node over rendering speed and geometric precision - CrispEdges, - //Enables all node constraints - Default, - } - } - namespace Diagram { - enum ContainerType { - //Sets the container type as Canvas - Canvas, - //Sets the container type as Stack - Stack, - } - } - namespace Diagram { - enum BPMNDataObjects { - //Used to notate the Input type BPMN data object - Input, - //Used to notate the Output type BPMN data object - Output, - //Used to set BPMN data object type as None - None, - } - } - namespace Diagram { - enum BPMNEvents { - //Used to set BPMN Event as Start - Start, - //Used to set BPMN Event as Intermediate - Intermediate, - //Used to set BPMN Event as End - End, - //Used to set BPMN Event as NonInterruptingStart - NonInterruptingStart, - //Used to set BPMN Event as NonInterruptingIntermediate - NonInterruptingIntermediate, - //Used to set BPMN Event as ThrowingIntermediate - ThrowingIntermediate, - } - } - namespace Diagram { - enum BPMNGateways { - //Used to set BPMN Gateway as None - None, - //Used to set BPMN Gateway as Exclusive - Exclusive, - //Used to set BPMN Gateway as Inclusive - Inclusive, - //Used to set BPMN Gateway as Parallel - Parallel, - //Used to set BPMN Gateway as Complex - Complex, - //Used to set BPMN Gateway as EventBased - EventBased, - //Used to set BPMN Gateway as ExclusiveEventBased - ExclusiveEventBased, - //Used to set BPMN Gateway as ParallelEventBased - ParallelEventBased, - } - } - namespace Diagram { - enum LabelEditMode { - //Used to set label edit mode as edit - Edit, - //Used to set label edit mode as view - View, - } - } - namespace Diagram { - enum OverflowType { - //Set overflow Type as ellipsis - Ellipsis, - //Set overflow Type as Clip - Clip, - } - } - namespace Diagram { - enum TextAlign { - //Used to align text on left side of node/connector - Left, - //Used to align text on center of node/connector - Center, - //Used to align text on Right side of node/connector - Right, - } - } - namespace Diagram { - enum TextDecorations { - //Used to set text decoration of the label as Underline - Underline, - //Used to set text decoration of the label as Overline - Overline, - //Used to set text decoration of the label as LineThrough - LineThrough, - //Used to set text decoration of the label as None - None, - } - } - namespace Diagram { - enum TextWrapping { - //Disables wrapping - NoWrap, - //Enables Line-break at normal word break points - Wrap, - //Enables Line-break at normal word break points with longer word overflows - WrapWithOverflow, - } - } - namespace Diagram { - enum PortConstraints { - //Disable all constraints - None, - //Enables connections with connector - Connect, - //Enables to create the connection when mouse hover on the port. - ConnectOnDrag, - } - } - namespace Diagram { - enum PortShapes { - //Used to set port shape as X - X, - //Used to set port shape as Circle - Circle, - //Used to set port shape as Square - Square, - //Used to set port shape as Path - Path, - } - } - namespace Diagram { - enum PortVisibility { - //Set the port visibility as Visible - Visible, - //Set the port visibility as Hidden - Hidden, - //Port get visible when hover connector on node - Hover, - //Port gets visible when connect connector to node - Connect, - //Specifies the port visibility as default - Default, - } - } - namespace Diagram { - enum BasicShapes { - //Used to specify node Shape as Rectangle - Rectangle, - //Used to specify node Shape as Ellipse - Ellipse, - //Used to specify node Shape as Path - Path, - //Used to specify node Shape as Polygon - Polygon, - //Used to specify node Shape as Triangle - Triangle, - //Used to specify node Shape as Plus - Plus, - //Used to specify node Shape as Star - Star, - //Used to specify node Shape as Pentagon - Pentagon, - //Used to specify node Shape as Heptagon - Heptagon, - //Used to specify node Shape as Octagon - Octagon, - //Used to specify node Shape as Trapezoid - Trapezoid, - //Used to specify node Shape as Decagon - Decagon, - //Used to specify node Shape as RightTriangle - RightTriangle, - //Used to specify node Shape as Cylinder - Cylinder, - } - } - namespace Diagram { - enum FlowShapes { - //Used to specify node Shape as Process - Process, - //Used to specify node Shape as Decision - Decision, - //Used to specify node Shape as Document - Document, - //Used to specify node Shape as PreDefinedProcess - PreDefinedProcess, - //Used to specify node Shape as Terminator - Terminator, - //Used to specify node Shape as PaperTap - PaperTap, - //Used to specify node Shape as DirectData - DirectData, - //Used to specify node Shape as SequentialData - SequentialData, - //Used to specify node Shape as Sort - Sort, - //Used to specify node Shape as MultiDocument - MultiDocument, - //Used to specify node Shape as Collate - Collate, - //Used to specify node Shape as SummingJunction - SummingJunction, - //Used to specify node Shape as Or - Or, - //Used to specify node Shape as InternalStorage - InternalStorage, - //Used to specify node Shape as Extract - Extract, - //Used to specify node Shape as ManualOperation - ManualOperation, - //Used to specify node Shape as Merge - Merge, - //Used to specify node Shape as OffPageReference - OffPageReference, - //Used to specify node Shape as SequentialAccessStorage - SequentialAccessStorage, - //Used to specify node Shape as Annotation1 - Annotation1, - //Used to specify node Shape as Annotation2 - Annotation2, - //Used to specify node Shape as Data - Data, - //Used to specify node Shape as Card - Card, - } - } - namespace Diagram { - enum BPMNShapes { - //Used to specify node Shape as Event - Event, - //Used to specify node Shape as Gateway - Gateway, - //Used to specify node Shape as Message - Message, - //Used to specify node Shape as DataObject - DataObject, - //Used to specify node Shape as DataSource - DataSource, - //Used to specify node Shape as Activity - Activity, - //Used to specify node Shape as Group - Group, - } - } - namespace Diagram { - enum UMLActivityShapes { - //Used to set UML ActivityShapes as Action - Action, - //Used to set UML ActivityShapes as Decision - Decision, - //Used to set UML ActivityShapes as MergeNode - MergeNode, - //Used to set UML ActivityShapes as InitialNode - InitialNode, - //Used to set UML ActivityShapes as FinalNode - FinalNode, - //Used to set UML ActivityShapes as ForkNode - ForkNode, - //Used to set UML ActivityShapes as JoinNode - JoinNode, - //Used to set UML ActivityShapes as TimeEvent - TimeEvent, - //Used to set UML ActivityShapes as AcceptingEvent - AcceptingEvent, - //Used to set UML ActivityShapes as SendSignal - SendSignal, - //Used to set UML ActivityShapes as ReceiveSignal - ReceiveSignal, - //Used to set UML ActivityShapes as StructuredNode - StructuredNode, - //Used to set UML ActivityShapes as Note - Note, - } - } - namespace Diagram { - enum BPMNBoundary { - //Used to set BPMN SubProcess's Boundary as Default - Default, - //Used to set BPMN SubProcess's Boundary as Call - Call, - //Used to set BPMN SubProcess's Boundary as Event - Event, - } - } - namespace Diagram { - enum BPMNLoops { - //Used to set BPMN Activity's Loop as None - None, - //Used to set BPMN Activity's Loop as Standard - Standard, - //Used to set BPMN Activity's Loop as ParallelMultiInstance - ParallelMultiInstance, - //Used to set BPMN Activity's Loop as SequenceMultiInstance - SequenceMultiInstance, - } - } - namespace Diagram { - enum BPMNSubProcessTypes { - //Used to set BPMN SubProcess type as None - None, - //Used to set BPMN SubProcess type as Transaction - Transaction, - //Used to set BPMN SubProcess type as Event - Event, - } - } - namespace Diagram { - enum BPMNTasks { - //Used to set BPMN Task Type as None - None, - //Used to set BPMN Task Type as Service - Service, - //Used to set BPMN Task Type as Receive - Receive, - //Used to set BPMN Task Type as Send - Send, - //Used to set BPMN Task Type as InstantiatingReceive - InstantiatingReceive, - //Used to set BPMN Task Type as Manual - Manual, - //Used to set BPMN Task Type as BusinessRule - BusinessRule, - //Used to set BPMN Task Type as User - User, - //Used to set BPMN Task Type as Script - Script, - //Used to set BPMN Task Type as Parallel - Parallel, - } - } - namespace Diagram { - enum BPMNTriggers { - //Used to set Event Trigger as None - None, - //Used to set Event Trigger as Message - Message, - //Used to set Event Trigger as Timer - Timer, - //Used to set Event Trigger as Escalation - Escalation, - //Used to set Event Trigger as Link - Link, - //Used to set Event Trigger as Error - Error, - //Used to set Event Trigger as Compensation - Compensation, - //Used to set Event Trigger as Signal - Signal, - //Used to set Event Trigger as Multiple - Multiple, - //Used to set Event Trigger as Parallel - Parallel, - //Used to set Event Trigger as Conditional - Conditional, - //Used to set Event Trigger as Termination - Termination, - //Used to set Event Trigger as Cancel - Cancel, - } - } - namespace Diagram { - enum Shapes { - //Used to specify node type as Text - Text, - //Used to specify node type as Image - Image, - //Used to specify node type as Html - Html, - //Used to specify node type as Native - Native, - //Used to specify node type as Basic - Basic, - //Used to specify node type as Flow - Flow, - //Used to specify node type as BPMN - BPMN, - //Used to specify node type as UMLClassifier - UMLClassifier, - //Used to specify node type as UMLActivity - UMLActivity, - } - } - namespace Diagram { - enum PageOrientations { - //Used to set orientation as Landscape - Landscape, - //Used to set orientation as portrait - Portrait, - } - } - namespace Diagram { - enum ScrollLimit { - //Used to set scrollLimit as Infinite - Infinite, - //Used to set scrollLimit as Diagram - Diagram, - //Used to set scrollLimit as Limited - Limited, - } - } - namespace Diagram { - enum BoundaryConstraints { - //Used to set boundaryConstraints as Infinite - Infinite, - //Used to set boundaryConstraints as Diagram - Diagram, - //Used to set boundaryConstraints as Page - Page, - } - } - namespace Diagram { - enum SelectorConstraints { - //Hides the selector - None, - //Sets the visibility of rotation handle as visible - Rotator, - //Sets the visibility of resize handles as visible - Resizer, - //Sets the visibility of user handles as visible - UserHandles, - //Sets the visibility of all selection handles as visible - All, - } - } - namespace Diagram { - enum UserHandlePositions { - //Set the position of the userhandle as topleft - TopLeft, - //Set the position of the userhandle as topcenter - TopCenter, - //Set the position of the userhandle as topright - TopRight, - //Set the position of the userhandle as middleleft - MiddleLeft, - //Set the position of the userhandle as middleright - MiddleRight, - //Set the position of the userhandle as bottomleft - BottomLeft, - //Set the position of the userhandle as bottomcenter - BottomCenter, - //Set the position of the userhandle as bottom right - BottomRight, - } - } - namespace Diagram { - enum SnapConstraints { - //Enables node to be snapped to horizontal gridlines - None, - //Enables node to be snapped to vertical gridlines - SnapToHorizontalLines, - //Enables node to be snapped to horizontal gridlines - SnapToVerticalLines, - //Enables node to be snapped to gridlines - SnapToLines, - //Enable horizontal lines - ShowHorizontalLines, - //Enable vertical lines - ShowVerticalLines, - //Enable both horizontal and vertical lines - ShowLines, - //Enable all the constraints - All, - } - } - namespace Diagram { - enum Tool { - //Disables all Tools - None, - //Enables/Disables SingleSelect tool - SingleSelect, - //Enables/Disables MultiSelect tool - MultipleSelect, - //Enables/Disables ZoomPan tool - ZoomPan, - //Enables/Disables DrawOnce tool - DrawOnce, - //Enables/Disables ContinuousDraw tool - ContinuesDraw, - } - } - namespace Diagram { - enum RelativeMode { - //Shows tooltip around the node - Object, - //Shows tooltip at the mouse position - Mouse, - } - } - namespace Diagram { - enum ZoomCommand { - //Used to zoom in the Diagram - ZoomIn, - //Used to zoom out the diagram - ZoomOut, - } - } - - class HeatMap extends ej.Widget { - static fn: HeatMap; - constructor(element: JQuery | Element, options?: HeatMap.Model); - static Locale: any; - model: HeatMap.Model; - defaults: HeatMap.Model; - } - export namespace HeatMap { - - export interface Model { - - /** Specifies the width of the heat map. - * @Default {null} - */ - width?: any; - - /** Specifies the width of the heat map. - * @Default {null} - */ - height?: any; - - /** Specifies the name of the heat map. - * @Default {null} - */ - id?: number; - - /** Enables or disables tooltip of heatmap - * @Default {true} - */ - showTooltip?: boolean; - - /** Defines the tooltip that should be shown when the mouse hovers over rows/columns. - */ - tooltipSettings?: TooltipSettings; - - /** Specifies the source data of the heat map. - * @Default {[]} - */ - itemsSource?: any; - - /** Specifies the property of the heat map cell. - * @Default {Null} - */ - heatMapCell?: HeatMapCell; - - /** Specifies can enable responsive mode or not for heat map. - * @Default {false} - */ - isResponsive?: boolean; - - /** Specifies whether the virtualization can be enable or not. - * @Default {false} - */ - enableVirtualization?: boolean; - - /** Specifies the default column properties for all the column style not specified in column properties. - * @Default {[]} - */ - defaultColumnStyle?: DefaultColumnStyle; - - /** Specifies the no of legends can sync with heat map. - * @Default {[]} - */ - legendCollection?: any[]; - - /** Specifies the property and display value of the heat map column. - * @Default {[]} - */ - itemsMapping?: ItemsMapping; - - /** Specifies the color values of the heat map column data. - * @Default {[]} - */ - colorMappingCollection?: ColorMappingCollection[]; - - /** Triggered when the mouse over on the cell. */ - cellMouseOver?(e: CellMouseOverEventArgs): void; - - /** Triggered when the mouse over on the cell. */ - cellMouseEnter?(e: CellMouseEnterEventArgs): void; - - /** Triggered when the mouse over on the cell. */ - cellMouseLeave?(e: CellMouseLeaveEventArgs): void; - - /** Triggered when the mouse over on the cell. */ - cellSelected?(e: CellSelectedEventArgs): void; - } - - export interface CellMouseOverEventArgs { - - /** Value displayed on the cell - */ - cellValue?: string; - - /** Returns the HeatMap cell data - */ - source?: any; - - /** Returns the specific HeatMap cell - */ - cell?: any; - } - - export interface CellMouseEnterEventArgs { - - /** Value displayed on the cell - */ - cellValue?: string; - - /** Returns the HeatMap cell data - */ - source?: any; - - /** Returns the specific HeatMap cell - */ - cell?: any; - } - - export interface CellMouseLeaveEventArgs { - - /** Value displayed on the cell - */ - cellValue?: string; - - /** Returns the HeatMap cell data - */ - source?: any; - - /** Returns the specific HeatMap cell - */ - cell?: any; - } - - export interface CellSelectedEventArgs { - - /** Value displayed on the cell - */ - cellValue?: string; - - /** Returns the HeatMap cell data - */ - source?: any; - - /** Returns the specific HeatMap cell - */ - cell?: any; - } - - export interface TooltipSettingsPositionTarget { + export interface DrillDownBackEventArgs { - /** Sets the arrow position again popup based on horizontal(x) value - * @Default {center} - */ - horizontal?: ej.datavisualization.HeatMap.Horizontal | string; + /** Drill down data of points + */ + data?: string; - /** Sets the arrow position again popup based on vertical(y) value - * @Default {top} - */ - vertical?: ej.datavisualization.HeatMap.Vertical | string; - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; - export interface TooltipSettingsPositionStem { + /** Instance of the sunburst model object + */ + model?: any; - /** Sets the arrow position again popup based on horizontal(x) value - * @Default {center} - */ - horizontal?: ej.datavisualization.HeatMap.Horizontal | string; + /** Name of the event + */ + type?: string; + } - /** Sets the arrow position again popup based on vertical(y) value - * @Default {bottom} - */ - vertical?: ej.datavisualization.HeatMap.Vertical | string; - } + export interface DrillDownResetEventArgs { + + /** Drill down reset data + */ + data?: string; - export interface TooltipSettingsPosition { - - /** Sets the Tooltip position against target. - */ - target?: TooltipSettingsPositionTarget; - - /** Sets the arrow position again popup. - */ - stem?: TooltipSettingsPositionStem; - } - - export interface TooltipSettingsAnimation { - - /** Defines the animation effect for the tooltip that should be shown when the mouse hovers over rows/columns. - * @Default {none} - */ - effect?: ej.datavisualization.HeatMap.Effect | string; - - /** Defines the animation speed for the tooltip that should be shown when the mouse hovers over rows/columns. - * @Default {0} - */ - speed?: number; - } - - export interface TooltipSettings { - - /** Defines the tooltip that should be shown when the mouse hovers over rows/columns. - * @Default {null} - */ - templateId?: string; - - /** Defines the tooltip of associate that should be shown when the mouse hovers over rows/columns. - * @Default {mouseFollow} - */ - associate?: ej.datavisualization.HeatMap.Associate | string; - - /** Enables/ disables the balloon for the tooltip to be shown - * @Default {true} - */ - isBalloon?: boolean; - - /** Defines various attributes of the Tooltip position - */ - position?: TooltipSettingsPosition; - - /** Defines the tooltip to be triggered. - * @Default {hover} - */ - trigger?: ej.datavisualization.HeatMap.Trigger | string; - - /** Defines the animation for the tooltip that should be shown when the mouse hovers over rows/columns. - */ - animation?: TooltipSettingsAnimation; - } - - export interface HeatMapCell { - - /** Specifies whether the cell content can be visible or not. - * @Default {ej.HeatMap.CellVisibility.Visible} - */ - showContent?: ej.datavisualization.HeatMap.CellVisibility | string; - - /** Specifies whether the cell color can be visible or not. - * @Default {true} - */ - showColor?: boolean; - } - - export interface DefaultColumnStyle { - - /** Specifies the alignment mode of the heat map column. - * @Default {ej.HeatMap.TextAlign.Center} - */ - textAlign?: any; - - /** Specifies the template id of the heat map column header. - */ - headerTemplateID?: string; - - /** Specifies the template id of all individual cell data of the heat map. - */ - templateID?: string; - } - - export interface ItemsMappingColumnStyle { - - /** Specifies the width of the heat map column. - * @Default {0} - */ - width?: number; - - /** Specifies the text align mode of the heat map column. - * @Default {ej.HeatMap.TextAlign.Center} - */ - textAlign?: string; - - /** Specifies the template id of the column header. - */ - headerTemplateID?: string; - - /** Specifies the template id of all individual cell data. - */ - templateID?: string; - } - - export interface ItemsMappingColumn { - - /** Specifies the name of the column or row. - */ - propertyName?: string; - - /** Specifies the value of the column or row. - */ - displayName?: string; - } - - export interface ItemsMappingRow { - - /** Specifies the name of the column or row. - */ - propertyName?: string; - - /** Specifies the value of the column or row. - */ - displayName?: string; - } - - export interface ItemsMappingValue { - - /** Specifies the name of the column or row. - */ - propertyName?: string; - - /** Specifies the value of the column or row. - */ - displayName?: string; - } - - export interface ItemsMappingHeaderMapping { - - /** Specifies the name of the column or row. - */ - propertyName?: string; - - /** Specifies the value of the column or row. - */ - displayName?: string; - - /** Specifies the property and display value of the header. - * @Default {null} - */ - columnStyle?: any; - } - - export interface ItemsMapping { - - /** Column settings for the individual heat map column. - * @Default {null} - */ - columnStyle?: ItemsMappingColumnStyle; - - /** Specifies the property and display value of the column. - * @Default {null} - */ - column?: ItemsMappingColumn; - - /** Specifies the property and display value of the heat map.row - * @Default {null} - */ - row?: ItemsMappingRow; - - /** Specifies the property and display value of the column value. - * @Default {null} - */ - value?: ItemsMappingValue; - - /** Specifies the property and display value of the header. - * @Default {null} - */ - headerMapping?: ItemsMappingHeaderMapping; - - /** Specifies the property and display value of the collection of column. - * @Default {[]} - */ - columnMapping?: any[]; - } - - export interface ColorMappingCollectionLabel { - - /** Enables/disables the bold style of the heat map label. - * @Default {false} - */ - bold?: boolean; - - /** Enables/disables the italic style of the heat map label. - * @Default {false} - */ - italic?: boolean; - - /** specifies the text value of the heat map label. - */ - text?: string; - - /** Specifies the text style of the heat map label. - * @Default {ej.HeatMap.TextDecoration.None} - */ - textDecoration?: ej.datavisualization.HeatMap.TextDecoration | string; - - /** Specifies the font size of the heat map label. - * @Default {10} - */ - fontSize?: number; - - /** Specifies the font family of the heat map label. - * @Default {Arial} - */ - fontFamily?: string; - - /** Specifies the font color of the heat map label. - * @Default {black} - */ - fontColor?: string; - } - - export interface ColorMappingCollection { - - /** Specifies the color of the heat map column data. - * @Default {white} - */ - color?: string; - - /** Specifies the color values of the heat map column data. - * @Default {0} - */ - value?: number; - - /** Specifies the label properties of the heat map color. - * @Default {null} - */ - label?: ColorMappingCollectionLabel; - } - } - namespace HeatMap { - enum Associate { - //Used to set the associate of tooltip as Target - Target, - //Used to set the associate of tooltip as MouseFollow - MouseFollow, - //Used to set the associate of tooltip as MouseEnter - MouseEnter, - } - } - namespace HeatMap { - enum Horizontal { - //Used to display the tooltip horizontally on left side of rows/columns - Left, - //Used to display the tooltip horizontally on center side of rows/columns - Center, - //Used to display the tooltip horizontally on right side of rows/columns - Right, - } - } - namespace HeatMap { - enum Vertical { - //Used to display the tooltip horizontally on left side of rows/columns - Top, - //Used to display the tooltip horizontally on center side of rows/columns - Center, - //Used to display the tooltip horizontally on right side of rows/columns - Bottom, - } - } - namespace HeatMap { - enum Trigger { - //Tooltip can be triggered on mouse hovers - Hover, - //Tooltip can be triggered on mouse click - Click, - } - } - namespace HeatMap { - enum Effect { - //Sets tooltip animation as None - None, - //Sets tooltip animation as Fade - Fade, - //Sets tooltip animation as Slide - Slide, - } - } - namespace HeatMap { - enum CellVisibility { - //Display the content of the cell - Visible, - //Hide the content of the cell - Hidden, - } - } - namespace HeatMap { - enum TextDecoration { - //Defines a line below the text - Underline, - //Defines a line above the text - Overline, - //Defines a line through the text - LineThrough, - //Defines a normal text. This is default - None, - } - } - - class HeatMapLegend extends ej.Widget { - static fn: HeatMapLegend; - constructor(element: JQuery | Element, options?: HeatMapLegend.Model); - static Locale: any; - model: HeatMapLegend.Model; - defaults: HeatMapLegend.Model; - } - export namespace HeatMapLegend { - - export interface Model { - - /** Specifies the width of the heatmap legend. - * @Default {null} - */ - width?: any; - - /** Specifies the height of the heatmap legend. - * @Default {null} - */ - height?: any; - - /** Specifies can enable responsive mode or not for heatmap legend. - * @Default {false} - */ - isResponsive?: boolean; - - /** Specifies whether the cell label can be shown or not. - * @Default {false} - */ - showLabel?: boolean; - - /** Specifies the color values of the column data. - * @Default {[]} - */ - colorMappingCollection?: ColorMappingCollection[]; - - /** Specifies the orientation of the heatmap legend - * @Default {ej.HeatMap.LegendOrientation.Horizontal} - */ - orientation?: ej.datavisualization.HeatMap.LegendOrientation | string; - - /** Specifies the legend mode as gradient or list. - * @Default {ej.HeatMap.LegendMode.Gradient} - */ - legendMode?: ej.datavisualization.HeatMap.LegendMode | string; - } - - export interface ColorMappingCollectionLabel { - - /** Enables/disables the bold style of the heatmap legend label. - * @Default {false} - */ - bold?: boolean; - - /** Enables/disables the italic style of the heatmap legend label. - * @Default {false} - */ - italic?: boolean; - - /** specifies the text value of the heatmap legend label. - */ - text?: string; - - /** Specifies the text style of the heatmap legend label. - * @Default {ej.HeatMap.TextDecoration.None} - */ - textDecoration?: ej.datavisualization.HeatMap.TextDecoration | string; - - /** Specifies the font size of the heatmap legend label. - * @Default {10} - */ - fontSize?: number; - - /** Specifies the font family of the heatmap legend label. - * @Default {Arial} - */ - fontFamily?: string; - - /** Specifies the font color of the heatmap legend label. - * @Default {black} - */ - fontColor?: string; - } - - export interface ColorMappingCollection { - - /** Specifies the color of the heatmap legend data. - * @Default {white} - */ - color?: string; - - /** Specifies the color values of the heatmap legend column data. - * @Default {0} - */ - value?: number; - - /** Specifies the label properties of the heatmap legend color. - * @Default {null} - */ - label?: ColorMappingCollectionLabel; - } - } - namespace HeatMap { - enum LegendOrientation { - //Scales the graphic content non-uniformly to the width and height of the diagram area - Horizontal, - //Used to align the image at the top left of diagram area - Vertical, - } - } - namespace HeatMap { - enum LegendMode { - //Scales the graphic content non-uniformly to the width and height of the diagram area - Gradient, - //Used to align the image at the top left of diagram area - List, - } - } - - class Sparkline extends ej.Widget { - static fn: Sparkline; - constructor(element: JQuery | Element, options?: Sparkline.Model); - static Locale: any; - model: Sparkline.Model; - defaults: Sparkline.Model; - - /** Redraws the entire sparkline. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. - * @returns {void} - */ - redraw(): void; - } - export namespace Sparkline { - - export interface Model { - - /** Background color of the plot area. - * @Default {transparent} - */ - background?: string; - - /** Fill color for the sparkline series. - * @Default {#33ccff} - */ - fill?: string; - - /** Border color of the series. - * @Default {null} - */ - stroke?: string; - - /** Options for customizing the color, opacity and width of the sparkline border. - */ - border?: Border; - - /** Border width of the series. - * @Default {1} - */ - width?: number; - - /** Opacity of the series. - * @Default {1} - */ - opacity?: number; - - /** Color for series high point. - * @Default {null} - */ - highPointColor?: string; - - /** Color for series low point. - * @Default {null} - */ - lowPointColor?: string; - - /** Color for series start point. - * @Default {null} - */ - startPointColor?: string; - - /** Color for series end point. - * @Default {null} - */ - endPointColor?: string; - - /** Color for series negative point. - * @Default {null} - */ - negativePointColor?: string; - - /** Options for customizing the color, opacity of the sparkline start and end range. - */ - rangeBandSettings?: RangeBandSettings; - - /** Name of a field in data source, where the fill color for all the data points is generated. - */ - palette?: string; - - /** Controls whether sparkline has to be responsive or not. - * @Default {true} - */ - isResponsive?: boolean; - - /** Controls whether Sparkline has to be rendered as Canvas or SVG.Canvas rendering supports all functionalities in SVG rendering. - * @Default {false} - */ - enableCanvasRendering?: boolean; - - /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. - * @Default {null} - */ - dataSource?: any; - - /** Name of the property in the datasource that contains x value for the series. - * @Default {null} - */ - xName?: string; - - /** Name of the property in the datasource that contains y value for the series. - * @Default {null} - */ - yName?: string; - - /** Gap or padding for sparkline. - * @Default {8} - */ - padding?: number; - - /** Specifies the type of the series to render in sparkline. - * @Default {line. See Type} - */ - type?: ej.datavisualization.Sparkline.Type | string; - - /** Specifies the theme for Sparkline. - * @Default {Flatlight. See Theme} - */ - theme?: ej.datavisualization.Sparkline.Theme | string; - - /** Options to customize the tooltip. - */ - tooltip?: Tooltip; - - /** Options for displaying and customizing marker for a data point. - */ - markerSettings?: MarkerSettings; - - /** Options to customize the Sparkline size. - */ - size?: Size; - - /** Options for customizing the color,dashArray and width of the axisLine. - */ - axisLineSettings?: AxisLineSettings; - - /** Fires before loading the sparkline. */ - load?(e: LoadEventArgs): void; - - /** Fires after loaded the sparkline. */ - loaded?(e: LoadedEventArgs): void; - - /** Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip. */ - tooltipInitialize?(e: TooltipInitializeEventArgs): void; - - /** Fires before rendering a series. This event is fired for each series in Sparkline. */ - seriesRendering?(e: SeriesRenderingEventArgs): void; - - /** Fires when mouse is moved over a point. */ - pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; - - /** Fires on clicking a point in sparkline. You can use this event to handle clicks made on points. */ - pointRegionMouseClick?(e: PointRegionMouseClickEventArgs): void; - - /** Fires on moving mouse over the sparkline. */ - sparklineMouseMove?(e: SparklineMouseMoveEventArgs): void; - - /** Fires on moving mouse outside the sparkline. */ - sparklineMouseLeave?(e: SparklineMouseLeaveEventArgs): void; - } - - export interface LoadEventArgs { - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface LoadedEventArgs { - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface TooltipInitializeEventArgs { - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - - /** X Location of the trackball tooltip in pixels - */ - locationX?: any; - - /** Y Location of the trackball tooltip in pixels - */ - locationY?: any; - - /** Index of the point for which trackball tooltip is displayed - */ - pointIndex?: number; - - /** Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip - */ - currentText?: string; - } - - export interface SeriesRenderingEventArgs { - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - - /** Minimum x value of the data point - */ - minX?: any; - - /** Minimum y value of the data point - */ - minY?: any; - - /** Maximum x value of the data point - */ - maxX?: any; - - /** Maximum y value of the data point - */ - maxY?: any; - } - - export interface PointRegionMouseMoveEventArgs { - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - - /** X-coordinate of point in pixel - */ - locationX?: number; - - /** Y-coordinate of point in pixel - */ - locationY?: number; - - /** Index of the point in series - */ - pointIndex?: number; - - /** Type of the series - */ - seriesType?: string; - } - - export interface PointRegionMouseClickEventArgs { - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - - /** X-coordinate of point in pixel - */ - locationX?: number; - - /** Y-coordinate of point in pixel - */ - locationY?: number; - - /** Index of the point in series - */ - pointIndex?: number; - - /** Type of the series - */ - seriesType?: string; - } - - export interface SparklineMouseMoveEventArgs { - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface SparklineMouseLeaveEventArgs { - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sparkline model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface Border { - - /** Border color of the sparkline. - * @Default {transparent} - */ - color?: string; - - /** Width of the Sparkline border. - * @Default {1} - */ - width?: number; - } - - export interface RangeBandSettings { - - /** Start value of the range band. - * @Default {null} - */ - startRange?: number; - - /** End value of the range band. - * @Default {null} - */ - endRange?: number; - - /** Range band opacity of the series. - * @Default {1} - */ - opacity?: number; - - /** Range band color of the series. - * @Default {transparent} - */ - color?: string; - } - - export interface TooltipBorder { - - /** Border color of the tooltip. - * @Default {transparent} - */ - color?: string; - - /** Border width of the tooltip. - * @Default {1} - */ - width?: number; - } - - export interface TooltipFont { - - /** Font color of the text in the tooltip. - * @Default {#111111} - */ - color?: string; - - /** Font Family for the tooltip. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the font Style for the tooltip. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Sparkline.FontStyle | string; - - /** Specifies the font weight for the tooltip. - * @Default {Regular} - */ - fontWeight?: ej.datavisualization.Sparkline.FontWeight | string; - - /** Opacity for text in the tooltip. - * @Default {1} - */ - opacity?: number; - - /** Font size for text in the tooltip. - * @Default {8px} - */ - size?: string; - } - - export interface Tooltip { - - /** Show/hides the tooltip visibility. - * @Default {false} - */ - visible?: boolean; - - /** Fill color for the sparkline tooltip. - * @Default {white} - */ - fill?: string; - - /** Custom template to the tooltip. - */ - template?: string; - - /** Options for customizing the border of the tooltip. - */ - border?: TooltipBorder; - - /** Options for customizing the font of the tooltip. - */ - font?: TooltipFont; - } - - export interface MarkerSettingsBorder { - - /** Border color of the marker shape. - * @Default {transparent} - */ - color?: string; - - /** Controls the opacity of the marker border. - * @Default {1} - */ - opacity?: number; - - /** Border width of the marker shape. - * @Default {null} - */ - width?: number; - } - - export interface MarkerSettings { - - /** Controls the opacity of the marker. - * @Default {1} - */ - opacity?: number; - - /** Controls the visibility of the marker shape. - * @Default {false} - */ - visible?: boolean; - - /** width of the marker shape. - * @Default {2} - */ - width?: number; - - /** Color of the marker shape. - * @Default {white} - */ - fill?: string; - - /** Options for customizing the border of the marker shape. - */ - border?: MarkerSettingsBorder; - } - - export interface Size { - - /** Height of the Sparkline. Height can be specified in either pixel or percentage. - * @Default {''} - */ - height?: string; - - /** Width of the Sparkline. Width can be specified in either pixel or percentage. - * @Default {''} - */ - width?: string; - } - - export interface AxisLineSettings { - - /** Controls the visibility of the axis. - * @Default {false} - */ - visible?: boolean; - - /** Color of the axis line. - * @Default {'#111111'} - */ - color?: string; - - /** Width of the axis line. - * @Default {1} - */ - width?: number; - - /** Dash array of the axis line. - * @Default {1} - */ - dashArray?: number; - } - } - namespace Sparkline { - enum Type { - //string - Area, - //string - Line, - //string - Column, - //string - Pie, - //string - WinLoss, - } - } - namespace Sparkline { - enum Theme { - //string - Azure, - //string - FlatLight, - //string - FlatDark, - //string - Azuredark, - //string - Lime, - //string - LimeDark, - //string - Saffron, - //string - SaffronDark, - //string - GradientLight, - //string - GradientDark, - } - } - namespace Sparkline { - enum FontStyle { - //string - Normal, - //string - Italic, - } - } - namespace Sparkline { - enum FontWeight { - //string - Regular, - //string - Bold, - //string - Lighter, - } - } - - class SunburstChart extends ej.Widget { - static fn: SunburstChart; - constructor(element: JQuery | Element, options?: SunburstChart.Model); - static Locale: any; - model: SunburstChart.Model; - defaults: SunburstChart.Model; - - /** Redraws the entire sunburst. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. - * @returns {void} - */ - redraw(): void; - - /** destroy the sunburst - * @returns {void} - */ - _destroy(): void; - } - export namespace SunburstChart { - - export interface Model { - - /** Background color of the plot area. - * @Default {null} - */ - background?: string; - - /** Bind the data field from the data source. - * @Default {null} - */ - valueMemberPath?: string; - - /** Options for customizing the sunburst border. - */ - border?: Border; - - /** Options for customizing the sunburst segment border. - */ - segmentBorder?: SegmentBorder; - - /** Specifies the dataSource to the sunburst. - * @Default {null} - */ - dataSource?: any; - - /** Palette color for the data points. - * @Default {null} - */ - palette?: string; - - /** Parent node of the data points. - * @Default {null} - */ - parentNode?: string; - - /** Name of the property in the datasource that contains x values. - * @Default {null} - */ - xName?: string; - - /** Name of the property in the datasource that contains y values. - * @Default {null} - */ - yName?: string; - - /** Controls whether sunburst has to be responsive or not. - * @Default {true} - */ - isResponsive?: boolean; - - /** Options to customize the Sunburst size. - */ - size?: Size; - - /** Controls the visibility of sunburst. - * @Default {true} - */ - visible?: boolean; - - /** Options to customize the Sunburst tooltip. - */ - tooltip?: Tooltip; - - /** Options for customizing sunburst points. - */ - points?: Points; - - /** Sunburst rendering will start from the specified value - * @Default {null} - */ - startAngle?: number; - - /** Sunburst rendering will end at the specified value - * @Default {null} - */ - endAngle?: number; - - /** Sunburst outer radius value - * @Default {1} - */ - radius?: number; - - /** Sunburst inner radius value - * @Default {0.4} - */ - innerRadius?: number; - - /** Options to customize the Sunburst dataLabel. - */ - dataLabelSettings?: DataLabelSettings; - - /** Options for customizing the title and subtitle of sunburst. - */ - title?: Title; - - /** Options for customizing the appearance of the levels or point while highlighting. - */ - highlightSettings?: HighlightSettings; - - /** Options for customizing the appearance of the levels or data point while selection. - */ - selectionSettings?: SelectionSettings; - - /** Specify levels of sunburst for grouped visualization of data - * @Default {[]} - */ - levels?: Level[]; - - /** Options to customize the legend items and legend title. - */ - legend?: Legend; - - /** Specifies the theme for Sunburst. - * @Default {Flatlight. See Theme} - */ - theme?: ej.datavisualization.Sunburst.SunburstTheme | string; - - /** Options to customize the left, right, top and bottom margins of sunburst area. - */ - margin?: Margin; - - /** Enable/disable the animation for all the levels. - * @Default {false} - */ - enableAnimation?: boolean; - - /** Opacity of the levels. - * @Default {1} - */ - opacity?: number; - - /** Options for enable zooming feature of chart. - */ - zoomSettings?: ZoomSettings; - - /** Animation type of sunburst - * @Default {rotation. See Alignment} - */ - animationType?: ej.datavisualization.Sunburst.Animation | string; - - /** Fires before loading. */ - load?(e: LoadEventArgs): void; - - /** Fires before rendering sunburst. */ - preRender?(e: PreRenderEventArgs): void; - - /** Fires after rendering sunburst. */ - loaded?(e: LoadedEventArgs): void; - - /** Fires before rendering the datalabel */ - dataLabelRendering?(e: DataLabelRenderingEventArgs): void; - - /** Fires before rendering each segment */ - segmentRendering?(e: SegmentRenderingEventArgs): void; - - /** Fires before rendering sunburst title. */ - titleRendering?(e: TitleRenderingEventArgs): void; - - /** Fires during initialization of tooltip. */ - tooltipInitialize?(e: TooltipInitializeEventArgs): void; - - /** Fires after clicking the point in sunburst */ - pointRegionClick?(e: PointRegionClickEventArgs): void; - - /** Fires while moving the mouse over sunburst points */ - pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; - - /** Fires when clicking the point to perform drilldown. */ - drillDownClick?(e: DrillDownClickEventArgs): void; - - /** Fires when resetting drilldown points. */ - drillDownBack?(e: DrillDownBackEventArgs): void; - - /** Fires after resetting the sunburst points */ - drillDownReset?(e: DrillDownResetEventArgs): void; - } - - export interface LoadEventArgs { - - /** Load event data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface PreRenderEventArgs { - - /** PreRender event data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface LoadedEventArgs { - - /** Loaded event data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface DataLabelRenderingEventArgs { - - /** Sunburst datalabel data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface SegmentRenderingEventArgs { - - /** Sunburst datalabel data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface TitleRenderingEventArgs { - - /** Sunburst title data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface TooltipInitializeEventArgs { - - /** Sunburst tooltip data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface PointRegionClickEventArgs { - - /** Includes clicked points region data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface PointRegionMouseMoveEventArgs { - - /** Includes data of mouse moved region - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface DrillDownClickEventArgs { - - /** Clicked point data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface DrillDownBackEventArgs { - - /** Drill down data of points - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface DrillDownResetEventArgs { - - /** Drill down reset data - */ - data?: string; - - /** Set this option to true to cancel the event - */ - cancel?: boolean; - - /** Instance of the sunburst model object - */ - model?: any; - - /** Name of the event - */ - type?: string; - } - - export interface Border { - - /** Border color of the sunburst. - * @Default {null} - */ - color?: string; - - /** Width of the Sunburst border. - * @Default {2} - */ - width?: number; - } - - export interface SegmentBorder { - - /** Segment Border color of the sunburst. - * @Default {null} - */ - color?: string; - - /** Width of the Sunburst segment border. - * @Default {2} - */ - width?: number; - } - - export interface Size { - - /** Height of the Sunburst. - * @Default {''} - */ - height?: string; - - /** Width of the Sunburst. - * @Default {''} - */ - width?: string; - } - - export interface TooltipBorder { - - /** Border color of the tooltip. - * @Default {null} - */ - color?: string; - - /** Border width of the tooltip. - * @Default {5} - */ - width?: number; - } - - export interface TooltipFont { - - /** Font color of the text in the tooltip. - * @Default {null} - */ - color?: string; - - /** Font Family for the tooltip. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Specifies the font Style for the tooltip. - * @Default {Normal} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Specifies the font weight for the tooltip. - * @Default {Regular} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Opacity for text in the tooltip. - * @Default {1} - */ - opacity?: number; - - /** Font size for text in the tooltip. - * @Default {12px} - */ - size?: string; - } - - export interface Tooltip { - - /** tooltip visibility of the Sunburst. - * @Default {true} - */ - visible?: boolean; - - /** Options for customizing the border of the sunburst tooltip. - */ - border?: TooltipBorder; - - /** Fill color for the sunburst tooltip. - * @Default {null} - */ - fill?: string; - - /** Options for customizing the font of the tooltip. - */ - font?: TooltipFont; - - /** Custom template to the tooltip. - * @Default {null} - */ - template?: string; - } - - export interface Points { - - /** Points x value of the sunburst. - * @Default {null} - */ - x?: string; - - /** Points y value of the sunburst. - * @Default {null} - */ - y?: number; - - /** Points text of the sunburst. - * @Default {null} - */ - text?: string; - - /** Points fill color of the sunburst. - * @Default {null} - */ - fill?: string; - } - - export interface DataLabelSettingsFont { - - /** Font family of the data label. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style of the data label. - * @Default {normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight of the data label. - * @Default {regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Opacity of the text. - * @Default {1} - */ - opacity?: number; - - /** Font color of the data label text. - * @Default {null} - */ - color?: string; - - /** Font size of the data label. - * @Default {12px} - */ - size?: string; - } - - export interface DataLabelSettings { - - /** Datalabel visibility of the Sunburst. - * @Default {false} - */ - visible?: boolean; - - /** Alignment of sunburst datalabel - * @Default {Angle. See DatalabelAlignment} - */ - labelRotationMode?: ej.datavisualization.Sunburst.SunburstLabelRotationMode | string; - - /** Options for customizing the data label font. - */ - font?: DataLabelSettingsFont; - - /** Custom template for datalabel - * @Default {null} - */ - template?: string; - - /** Fill color for the datalabel - * @Default {null} - */ - fill?: string; - - /** Datalabel overflow mode - * @Default {Trim. See LabelOverflowMode} - */ - labelOverflowMode?: ej.datavisualization.Sunburst.SunburstLabelOverflowMode | string; - } - - export interface TitleFont { - - /** Font family for Sunburst title. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for Sunburst title. - * @Default {Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight for Sunburst title. - * @Default {Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Opacity of the Sunburst title. - * @Default {1} - */ - opacity?: number; - - /** Font size for Sunburst title. - * @Default {20px} - */ - size?: string; - } - - export interface TitleSubtitleFont { - - /** Font family of sub title. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for sub title. - * @Default {Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight for sub title. - * @Default {Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Opacity of the sub title. - * @Default {1} - */ - opacity?: number; - - /** Font size for sub title. - * @Default {12px} - */ - size?: string; - } - - export interface TitleSubtitle { - - /** Subtitle text for sunburst - */ - text?: string; - - /** Sub title text visibility for sunburst - * @Default {true} - */ - visible?: string; - - /** Sub title text alignment - * @Default {far. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment | string; - - /** Options for customizing the font of sub title. - */ - font?: TitleSubtitleFont; - } - - export interface Title { - - /** Title text for sunburst - */ - text?: string; - - /** Title text visibility for sunburst - * @Default {true} - */ - visible?: string; - - /** Title text alignment - * @Default {center. See TextAlignment} - */ - textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment | string; - - /** Options for customizing the font of sunburst title. - */ - font?: TitleFont; - - /** Options to customize the sub title of Sunburst. - */ - subtitle?: TitleSubtitle; - } - - export interface HighlightSettings { - - /** Enables/disables the ability to highlight the levels or point interactively. - * @Default {false} - */ - enable?: boolean; - - /** Specifies whether the levels or point has to be highlighted. - * @Default {point. See Mode} - */ - mode?: ej.datavisualization.Sunburst.SunburstHighlightMode | string; - - /** Color of the levels/point on highlight. - * @Default {red} - */ - color?: string; - - /** Opacity of the levels/point on highlight. - * @Default {0.5} - */ - opacity?: number; - - /** Specifies whether the levels or data point has to be highlighted. - * @Default {opacity. See Mode} - */ - type?: ej.datavisualization.Sunburst.SunburstHighlightType | string; - } - - export interface SelectionSettings { - - /** Enables/disables the ability to select the levels or data point interactively. - * @Default {false} - */ - enable?: boolean; - - /** Specifies whether the levels or data point has to be selected. - * @Default {point. See Mode} - */ - mode?: ej.datavisualization.Sunburst.SunburstHighlightMode | string; - - /** Color of the levels/point on selection. - * @Default {green} - */ - color?: string; - - /** Opacity of the levels/point on selection. - * @Default {0.5} - */ - opacity?: number; - - /** Specifies whether the levels or data point has to be selected. - * @Default {opacity. See Mode} - */ - type?: ej.datavisualization.Sunburst.SunburstHighlightType | string; - } - - export interface Level { - - /** Specifies the group member path - * @Default {null} - */ - groupMemberPath?: string; - } - - export interface LegendBorder { - - /** Border color of the legend. - * @Default {null} - */ - color?: string; - - /** Border width of the legend. - * @Default {1} - */ - width?: number; - } - - export interface LegendFont { - - /** Font family for legend item text. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for legend item text. - * @Default {Normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight for legend item text. - * @Default {Regular. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Font size for legend item text. - * @Default {12px} - */ - size?: string; - } - - export interface LegendItemStyle { - - /** Height of the shape in legend items. - * @Default {10} - */ - height?: number; - - /** Width of the shape in legend items. - * @Default {10} - */ - width?: number; - } - - export interface LegendLocation { - - /** X value or horizontal offset to position the legend in chart. - * @Default {0} - */ - x?: number; - - /** Y value or vertical offset to position the legend. - * @Default {0} - */ - y?: number; - } - - export interface LegendSize { - - /** Height of the legend. Height can be specified in either pixel or percentage. - * @Default {null} - */ - height?: string; - - /** Width of the legend. Width can be specified in either pixel or percentage. - * @Default {null} - */ - width?: string; - } - - export interface LegendTitleFont { - - /** Font family for the text in legend title. - * @Default {Segoe UI} - */ - fontFamily?: string; - - /** Font style for legend title. - * @Default {normal. See FontStyle} - */ - fontStyle?: ej.datavisualization.Sunburst.FontStyle | string; - - /** Font weight for legend title. - * @Default {normal. See FontWeight} - */ - fontWeight?: ej.datavisualization.Sunburst.FontWeight | string; - - /** Font size for legend title. - * @Default {12px} - */ - size?: string; - } - - export interface LegendTitle { - - /** Options to customize the font used for legend title - */ - font?: LegendTitleFont; - - /** Enables or disables the legend title. - * @Default {true} - */ - visible?: string; - - /** Text to be displayed in legend title. - */ - text?: string; - - /** Alignment of the legend title. - * @Default {center. See Alignment} - */ - textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment | string; - } - - export interface Legend { - - /** Visibility of the legend. - * @Default {false} - */ - visible?: boolean; - - /** Interactive action of legend items. - * @Default {toggleSegmentVisibility. See Alignment} - */ - clickAction?: ej.datavisualization.Sunburst.SunburstClickAction | string; - - /** Horizontal alignment of the legend. - * @Default {Center. See Alignment} - */ - alignment?: ej.datavisualization.Sunburst.SunburstAlignment | string; - - /** Options for customizing the legend border. - */ - border?: LegendBorder; - - /** Number of columns to arrange the legend items. - * @Default {null} - */ - columnCount?: number; - - /** Number of rows to arrange the legend items. - * @Default {null} - */ - rowCount?: number; - - /** Options to customize the font used for legend item text. - */ - font?: LegendFont; - - /** Gap or padding between the legend items. - * @Default {10} - */ - itemPadding?: number; - - /** Options to customize the style of legend items. - */ - itemStyle?: LegendItemStyle; - - /** Options to customize the location of sunburst legend. Legend is placed in provided location only when value of position property is custom - */ - location?: LegendLocation; - - /** Places the legend at specified position. Legend can be placed at left, right, top or bottom of the chart area.To manually specify the location of legend, set custom as value to this property. - * @Default {Bottom. See Position} - */ - position?: ej.datavisualization.Sunburst.SunburstLegendPosition | string; - - /** Shape of the legend items. - * @Default {None. See Shape} - */ - shape?: ej.datavisualization.Sunburst.SunburstLegendShape | string; - - /** Options to customize the size of the legend. - */ - size?: LegendSize; - - /** Options to customize the legend title. - */ - title?: LegendTitle; - } - - export interface Margin { - - /** Spacing for the left margin of chart area. Setting positive value decreases the width of the chart area from left side. - * @Default {10} - */ - left?: number; - - /** Spacing for the right margin of chart area. Setting positive value decreases the width of the chart area from right side. - * @Default {10} - */ - right?: number; - - /** Spacing for the top margin of chart area. Setting positive value decreases the height of the chart area from the top. - * @Default {10} - */ - top?: number; - - /** Spacing for the bottom margin of the chart area. Setting positive value decreases the height of the chart area from the bottom. - * @Default {10} - */ - bottom?: number; - } - - export interface ZoomSettings { - - /** Enables or disables zooming. - * @Default {false} - */ - enable?: boolean; - - /** Toolbar horizontal alignment - * @Default {right. See Alignment} - */ - toolbarHorizontalAlignment?: ej.datavisualization.Sunburst.SunburstHorizontalAlignment | string; - - /** Toolbar vertical alignment - * @Default {top. See Alignment} - */ - toolbarVerticalAlignment?: ej.datavisualization.Sunburst.SunburstVerticalAlignment | string; - } - } - namespace Sunburst { - enum FontStyle { - //string - Normal, - //string - Italic, - } - } - namespace Sunburst { - enum FontWeight { - //string - Regular, - //string - Bold, - //string - Lighter, - } - } - namespace Sunburst { - enum SunburstLabelRotationMode { - //string - Angle, - //string - Normal, - } - } - namespace Sunburst { - enum SunburstLabelOverflowMode { - //string - Trim, - //string - Hide, - //string - None, - } - } - namespace Sunburst { - enum SunburstAlignment { - //string - Center, - //string - Near, - //string - Far, - } - } - namespace Sunburst { - enum SunburstHighlightMode { - //string - Point, - //string - Parent, - //string - Child, - //string - All, - } - } - namespace Sunburst { - enum SunburstHighlightType { - //string - Opacity, - //string - Color, - } - } - namespace Sunburst { - enum SunburstClickAction { - //string - None, - //string - ToggleSegmentVisibility, - //string - ToggleSegmentSelection, - } - } - namespace Sunburst { - enum SunburstLegendPosition { - //string - Left, - //string - Right, - //string - Top, - //string - Bottom, - } - } - namespace Sunburst { - enum SunburstLegendShape { - //string - Diamond, - //string - Pentagon, - //string - Rectangle, - //string - Circle, - //string - Cross, - //string - Triangle, - } - } - namespace Sunburst { - enum SunburstTheme { - //string - FlatLight, - //string - FlatDark, - } - } - namespace Sunburst { - enum SunburstHorizontalAlignment { - //string - Center, - //string - Left, - //string - Right, - } - } - namespace Sunburst { - enum SunburstVerticalAlignment { - //string - Top, - //string - Bottom, - //string - Middle, - } - } - namespace Sunburst { - enum Animation { - //string - Rotation, - //string - FadeIn, - } - } - - class Overview extends ej.Widget { - static fn: Overview; - constructor(element: JQuery | Element, options?: Overview.Model); - static Locale: any; - model: Overview.Model; - defaults: Overview.Model; - } - export namespace Overview { - - export interface Model { - - /** The sourceId property of overview should be set with the corresponding Diagram ID for you need the overall view. - * @Default {null} - */ - sourceID?: string; - - /** Defines the height of the overview - * @Default {400} - */ - height?: number; - - /** Defines the width of the overview - * @Default {250} - */ - width?: number; - } - } + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + } + + export interface Border { + + /** Border color of the sunburst. + * @Default {null} + */ + color?: string; + + /** Width of the Sunburst border. + * @Default {2} + */ + width?: number; + } + + export interface SegmentBorder { + + /** Segment Border color of the sunburst. + * @Default {null} + */ + color?: string; + + /** Width of the Sunburst segment border. + * @Default {2} + */ + width?: number; + } + + export interface Size { + + /** Height of the Sunburst. + * @Default {''} + */ + height?: string; + + /** Width of the Sunburst. + * @Default {''} + */ + width?: string; + } + + export interface TooltipBorder { + + /** Border color of the tooltip. + * @Default {null} + */ + color?: string; + + /** Border width of the tooltip. + * @Default {5} + */ + width?: number; + } + + export interface TooltipFont { + + /** Font color of the text in the tooltip. + * @Default {null} + */ + color?: string; + + /** Font Family for the tooltip. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font Style for the tooltip. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Specifies the font weight for the tooltip. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity for text in the tooltip. + * @Default {1} + */ + opacity?: number; + + /** Font size for text in the tooltip. + * @Default {12px} + */ + size?: string; + } + + export interface Tooltip { + + /** tooltip visibility of the Sunburst. + * @Default {true} + */ + visible?: boolean; + + /** Options for customizing the border of the sunburst tooltip. + */ + border?: TooltipBorder; + + /** Fill color for the sunburst tooltip. + * @Default {null} + */ + fill?: string; + + /** Options for customizing the font of the tooltip. + */ + font?: TooltipFont; + + /** Custom template to the tooltip. + * @Default {null} + */ + template?: string; + + /** Setting the format for the data displayed in the tooltip + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /** Sets the opacity of the dispalyed tooltip + * @Default {0.95} + */ + opacity?: number; + } + + export interface Points { + + /** Points x value of the sunburst. + * @Default {null} + */ + x?: string; + + /** Points y value of the sunburst. + * @Default {null} + */ + y?: number; + + /** Points text of the sunburst. + * @Default {null} + */ + text?: string; + + /** Points fill color of the sunburst. + * @Default {null} + */ + fill?: string; + } + + export interface DataLabelSettingsFont { + + /** Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /** Font color of the data label text. + * @Default {null} + */ + color?: string; + + /** Font size of the data label. + * @Default {12px} + */ + size?: string; + } + + export interface DataLabelSettings { + + /** Datalabel visibility of the Sunburst. + * @Default {false} + */ + visible?: boolean; + + /** Alignment of sunburst datalabel + * @Default {Angle. See DatalabelAlignment} + */ + labelRotationMode?: ej.datavisualization.Sunburst.SunburstLabelRotationMode|string; + + /** Options for customizing the data label font. + */ + font?: DataLabelSettingsFont; + + /** Custom template for datalabel + * @Default {null} + */ + template?: string; + + /** Fill color for the datalabel + * @Default {null} + */ + fill?: string; + + /** Datalabel overflow mode + * @Default {Trim. See LabelOverflowMode} + */ + labelOverflowMode?: ej.datavisualization.Sunburst.SunburstLabelOverflowMode|string; + } + + export interface TitleFont { + + /** Font family for Sunburst title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for Sunburst title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for Sunburst title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the Sunburst title. + * @Default {1} + */ + opacity?: number; + + /** Font size for Sunburst title. + * @Default {20px} + */ + size?: string; + } + + export interface TitleSubtitleFont { + + /** Font family of sub title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for sub title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for sub title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the sub title. + * @Default {1} + */ + opacity?: number; + + /** Font size for sub title. + * @Default {12px} + */ + size?: string; + } + + export interface TitleSubtitle { + + /** Subtitle text for sunburst + */ + text?: string; + + /** Sub title text visibility for sunburst + * @Default {true} + */ + visible?: string; + + /** Sub title text alignment + * @Default {far. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the font of sub title. + */ + font?: TitleSubtitleFont; + } + + export interface Title { + + /** Title text for sunburst + */ + text?: string; + + /** Title text visibility for sunburst + * @Default {true} + */ + visible?: string; + + /** Title text alignment + * @Default {center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the font of sunburst title. + */ + font?: TitleFont; + + /** Options to customize the sub title of Sunburst. + */ + subtitle?: TitleSubtitle; + } + + export interface HighlightSettings { + + /** Enables/disables the ability to highlight the levels or point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether the levels or point has to be highlighted. + * @Default {point. See Mode} + */ + mode?: ej.datavisualization.Sunburst.SunburstHighlightMode|string; + + /** Color of the levels/point on highlight. + * @Default {red} + */ + color?: string; + + /** Opacity of the levels/point on highlight. + * @Default {0.5} + */ + opacity?: number; + + /** Specifies whether the levels or data point has to be highlighted. + * @Default {opacity. See Mode} + */ + type?: ej.datavisualization.Sunburst.SunburstHighlightType|string; + } + + export interface SelectionSettings { + + /** Enables/disables the ability to select the levels or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether the levels or data point has to be selected. + * @Default {point. See Mode} + */ + mode?: ej.datavisualization.Sunburst.SunburstHighlightMode|string; + + /** Color of the levels/point on selection. + * @Default {green} + */ + color?: string; + + /** Opacity of the levels/point on selection. + * @Default {0.5} + */ + opacity?: number; + + /** Specifies whether the levels or data point has to be selected. + * @Default {opacity. See Mode} + */ + type?: ej.datavisualization.Sunburst.SunburstHighlightType|string; + } + + export interface Level { + + /** Specifies the group member path + * @Default {null} + */ + groupMemberPath?: string; + } + + export interface LegendBorder { + + /** Border color of the legend. + * @Default {null} + */ + color?: string; + + /** Border width of the legend. + * @Default {1} + */ + width?: number; + } + + export interface LegendFont { + + /** Font family for legend item text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend item text. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for legend item text. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Font size for legend item text. + * @Default {12px} + */ + size?: string; + } + + export interface LegendItemStyle { + + /** Height of the shape in legend items. + * @Default {10} + */ + height?: number; + + /** Width of the shape in legend items. + * @Default {10} + */ + width?: number; + } + + export interface LegendLocation { + + /** X value or horizontal offset to position the legend in chart. + * @Default {0} + */ + x?: number; + + /** Y value or vertical offset to position the legend. + * @Default {0} + */ + y?: number; + } + + export interface LegendSize { + + /** Height of the legend. Height can be specified in either pixel or percentage. + * @Default {null} + */ + height?: string; + + /** Width of the legend. Width can be specified in either pixel or percentage. + * @Default {null} + */ + width?: string; + } + + export interface LegendTitleFont { + + /** Font family for the text in legend title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend title. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for legend title. + * @Default {normal. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Font size for legend title. + * @Default {12px} + */ + size?: string; + } + + export interface LegendTitle { + + /** Options to customize the font used for legend title + */ + font?: LegendTitleFont; + + /** Enables or disables the legend title. + * @Default {true} + */ + visible?: string; + + /** Text to be displayed in legend title. + */ + text?: string; + + /** Alignment of the legend title. + * @Default {center. See Alignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + } + + export interface Legend { + + /** Visibility of the legend. + * @Default {false} + */ + visible?: boolean; + + /** Interactive action of legend items. + * @Default {toggleSegmentVisibility. See Alignment} + */ + clickAction?: ej.datavisualization.Sunburst.SunburstClickAction|string; + + /** Horizontal alignment of the legend. + * @Default {Center. See Alignment} + */ + alignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the legend border. + */ + border?: LegendBorder; + + /** Number of columns to arrange the legend items. + * @Default {null} + */ + columnCount?: number; + + /** Number of rows to arrange the legend items. + * @Default {null} + */ + rowCount?: number; + + /** Options to customize the font used for legend item text. + */ + font?: LegendFont; + + /** Gap or padding between the legend items. + * @Default {10} + */ + itemPadding?: number; + + /** Options to customize the style of legend items. + */ + itemStyle?: LegendItemStyle; + + /** Options to customize the location of sunburst legend. Legend is placed in provided location only when value of position property is custom + */ + location?: LegendLocation; + + /** Places the legend at specified position. Legend can be placed at **left**, **right**, **top** or **bottom** of the chart area. To manually specify the location of legend, set + * **custom** as value to this property. + * @Default {Bottom. See Position} + */ + position?: ej.datavisualization.Sunburst.SunburstLegendPosition|string; + + /** Shape of the legend items. + * @Default {None. See Shape} + */ + shape?: ej.datavisualization.Sunburst.SunburstLegendShape|string; + + /** Options to customize the size of the legend. + */ + size?: LegendSize; + + /** Options to customize the legend title. + */ + title?: LegendTitle; + } + + export interface Margin { + + /** Spacing for the left margin of chart area. Setting positive value decreases the width of the chart area from left side. + * @Default {10} + */ + left?: number; + + /** Spacing for the right margin of chart area. Setting positive value decreases the width of the chart area from right side. + * @Default {10} + */ + right?: number; + + /** Spacing for the top margin of chart area. Setting positive value decreases the height of the chart area from the top. + * @Default {10} + */ + top?: number; + + /** Spacing for the bottom margin of the chart area. Setting positive value decreases the height of the chart area from the bottom. + * @Default {10} + */ + bottom?: number; + } + + export interface ZoomSettings { + + /** Enables or disables zooming. + * @Default {false} + */ + enable?: boolean; + + /** Toolbar horizontal alignment + * @Default {right. See Alignment} + */ + toolbarHorizontalAlignment?: ej.datavisualization.Sunburst.SunburstHorizontalAlignment|string; + + /** Toolbar vertical alignment + * @Default {top. See Alignment} + */ + toolbarVerticalAlignment?: ej.datavisualization.Sunburst.SunburstVerticalAlignment|string; + } + } + namespace Sunburst { + enum FontStyle { + //string + Normal, + //string + Italic, + } + } + namespace Sunburst { + enum FontWeight { + //string + Regular, + //string + Bold, + //string + Lighter, + } + } + namespace Sunburst { + enum SunburstLabelRotationMode { + //string + Angle, + //string + Normal, + } + } + namespace Sunburst { + enum SunburstLabelOverflowMode { + //string + Trim, + //string + Hide, + //string + None, + } + } + namespace Sunburst { + enum SunburstAlignment { + //string + Center, + //string + Near, + //string + Far, + } + } + namespace Sunburst { + enum SunburstHighlightMode { + //string + Point, + //string + Parent, + //string + Child, + //string + All, + } + } + namespace Sunburst { + enum SunburstHighlightType { + //string + Opacity, + //string + Color, + } + } + namespace Sunburst { + enum SunburstClickAction { + //string + None, + //string + ToggleSegmentVisibility, + //string + ToggleSegmentSelection, + } + } + namespace Sunburst { + enum SunburstLegendPosition { + //string + Left, + //string + Right, + //string + Top, + //string + Bottom, + } + } + namespace Sunburst { + enum SunburstLegendShape { + //string + Diamond, + //string + Pentagon, + //string + Rectangle, + //string + Circle, + //string + Cross, + //string + Triangle, + } + } + namespace Sunburst { + enum SunburstTheme { + //string + FlatLight, + //string + FlatDark, + } + } + namespace Sunburst { + enum SunburstHorizontalAlignment { + //string + Center, + //string + Left, + //string + Right, + } + } + namespace Sunburst { + enum SunburstVerticalAlignment { + //string + Top, + //string + Bottom, + //string + Middle, + } + } + namespace Sunburst { + enum Animation { + //string + Rotation, + //string + FadeIn, + } + } + + class Overview extends ej.Widget { + static fn: Overview; + constructor(element: JQuery | Element, options?: Overview.Model); + static Locale: any; + model: Overview.Model; + defaults: Overview.Model; + } + export namespace Overview { + + export interface Model { + + /** The sourceId property of overview should be set with the corresponding Diagram ID for you need the overall view. + * @Default {null} + */ + sourceID?: string; + + /** Defines the height of the overview + * @Default {400} + */ + height?: number; + + /** Defines the width of the overview + * @Default {250} + */ + width?: number; + } + } } interface JQueryXHR { - /** - * Returns the cancel option value. - */ - cancel?: boolean; + /** + * Returns the cancel option value. + */ + cancel?: boolean; } interface JQueryPromise { - /** - * Returns the cancel option value. - */ - cancel?: boolean; + /** + * Returns the cancel option value. + */ + cancel?: boolean; } interface JQueryDeferred extends JQueryPromise { - /** - * Returns the cancel option value. - */ - cancel?: boolean; + /** + * Returns the cancel option value. + */ + cancel?: boolean; } interface JQueryParam { - /** - * Returns the cancel option value. - */ - cancel?: boolean; + /** + * Returns the cancel option value. + */ + cancel?: boolean; } interface JQuery { - data(key: any): any; + data(key: any): any; } interface Window { - ej: typeof ej; + ej: typeof ej; } interface JQuery { - ejAccordion(options?: ej.Accordion.Model): JQuery; - ejAccordion(memberName: any, value?: any, param?: any): any; + ejAccordion(options?: ej.Accordion.Model): JQuery; + ejAccordion(memberName: any, value?: any, param?: any): any; - ejAutocomplete(options?: ej.Autocomplete.Model): JQuery; - ejAutocomplete(memberName: any, value?: any, param?: any): any; + ejAutocomplete(options?: ej.Autocomplete.Model): JQuery; + ejAutocomplete(memberName: any, value?: any, param?: any): any; - ejBarcode(options?: ej.datavisualization.Barcode.Model): JQuery; - ejBarcode(memberName: any, value?: any, param?: any): any; + ejBarcode(options?: ej.datavisualization.Barcode.Model): JQuery; + ejBarcode(memberName: any, value?: any, param?: any): any; - ejBulletGraph(options?: ej.datavisualization.BulletGraph.Model): JQuery; - ejBulletGraph(memberName: any, value?: any, param?: any): any; + ejBulletGraph(options?: ej.datavisualization.BulletGraph.Model): JQuery; + ejBulletGraph(memberName: any, value?: any, param?: any): any; - ejButton(options?: ej.Button.Model): JQuery; - ejButton(memberName: any, value?: any, param?: any): any; + ejButton(options?: ej.Button.Model): JQuery; + ejButton(memberName: any, value?: any, param?: any): any; - ejCaptcha(options?: ej.Captcha.Model): JQuery; - ejCaptcha(memberName: any, value?: any, param?: any): any; + ejCaptcha(options?: ej.Captcha.Model): JQuery; + ejCaptcha(memberName: any, value?: any, param?: any): any; - ejChart(options?: ej.datavisualization.Chart.Model): JQuery; - ejChart(memberName: any, value?: any, param?: any): any; + ejChart(options?: ej.datavisualization.Chart.Model): JQuery; + ejChart(memberName: any, value?: any, param?: any): any; - ejCheckBox(options?: ej.CheckBox.Model): JQuery; - ejCheckBox(memberName: any, value?: any, param?: any): any; + ejCheckBox(options?: ej.CheckBox.Model): JQuery; + ejCheckBox(memberName: any, value?: any, param?: any): any; - ejCircularGauge(options?: ej.datavisualization.CircularGauge.Model): JQuery; - ejCircularGauge(memberName: any, value?: any, param?: any): any; + ejCircularGauge(options?: ej.datavisualization.CircularGauge.Model): JQuery; + ejCircularGauge(memberName: any, value?: any, param?: any): any; - ejColorPicker(options?: ej.ColorPicker.Model): JQuery; - ejColorPicker(memberName: any, value?: any, param?: any): any; + ejColorPicker(options?: ej.ColorPicker.Model): JQuery; + ejColorPicker(memberName: any, value?: any, param?: any): any; - ejDatePicker(options?: ej.DatePicker.Model): JQuery; - ejDatePicker(memberName: any, value?: any, param?: any): any; + ejDatePicker(options?: ej.DatePicker.Model): JQuery; + ejDatePicker(memberName: any, value?: any, param?: any): any; - ejDateRangePicker(options?: ej.DateRangePicker.Model): JQuery; - ejDateRangePicker(memberName: any, value?: any, param?: any): any; + ejDateRangePicker(options?: ej.DateRangePicker.Model): JQuery; + ejDateRangePicker(memberName: any, value?: any, param?: any): any; - ejDateTimePicker(options?: ej.DateTimePicker.Model): JQuery; - ejDateTimePicker(memberName: any, value?: any, param?: any): any; + ejDateTimePicker(options?: ej.DateTimePicker.Model): JQuery; + ejDateTimePicker(memberName: any, value?: any, param?: any): any; - ejDiagram(options?: ej.datavisualization.Diagram.Model): JQuery; - ejDiagram(memberName: any, value?: any, param?: any): any; + ejDiagram(options?: ej.datavisualization.Diagram.Model): JQuery; + ejDiagram(memberName: any, value?: any, param?: any): any; - ejDialog(options?: ej.Dialog.Model): JQuery; - ejDialog(memberName: any, value?: any, param?: any): any; + ejDialog(options?: ej.Dialog.Model): JQuery; + ejDialog(memberName: any, value?: any, param?: any): any; - ejDigitalGauge(options?: ej.datavisualization.DigitalGauge.Model): JQuery; - ejDigitalGauge(memberName: any, value?: any, param?: any): any; + ejDigitalGauge(options?: ej.datavisualization.DigitalGauge.Model): JQuery; + ejDigitalGauge(memberName: any, value?: any, param?: any): any; - ejDocumentEditor(options?: ej.DocumentEditor.Model): JQuery; - ejDocumentEditor(memberName: any, value?: any, param?: any): any; + ejDocumentEditor(options?: ej.DocumentEditor.Model): JQuery; + ejDocumentEditor(memberName: any, value?: any, param?: any): any; - ejDraggable(options?: ej.Draggable.Model): JQuery; - ejDraggable(memberName: any, value?: any, param?: any): any; + ejDraggable(options?: ej.Draggable.Model): JQuery; + ejDraggable(memberName: any, value?: any, param?: any): any; - ejDropDownList(options?: ej.DropDownList.Model): JQuery; - ejDropDownList(memberName: any, value?: any, param?: any): any; + ejDropDownList(options?: ej.DropDownList.Model): JQuery; + ejDropDownList(memberName: any, value?: any, param?: any): any; - ejDroppable(options?: ej.Droppable.Model): JQuery; - ejDroppable(memberName: any, value?: any, param?: any): any; + ejDroppable(options?: ej.Droppable.Model): JQuery; + ejDroppable(memberName: any, value?: any, param?: any): any; - ejFileExplorer(options?: ej.FileExplorer.Model): JQuery; - ejFileExplorer(memberName: any, value?: any, param?: any): any; + ejFileExplorer(options?: ej.FileExplorer.Model): JQuery; + ejFileExplorer(memberName: any, value?: any, param?: any): any; - ejGantt(options?: ej.Gantt.Model): JQuery; - ejGantt(memberName: any, value?: any, param?: any): any; + ejGantt(options?: ej.Gantt.Model): JQuery; + ejGantt(memberName: any, value?: any, param?: any): any; - ejGrid(options?: ej.Grid.Model): JQuery; - ejGrid(memberName: any, value?: any, param?: any): any; + ejGrid(options?: ej.Grid.Model): JQuery; + ejGrid(memberName: any, value?: any, param?: any): any; - ejGroupButton(options?: ej.GroupButton.Model): JQuery; - ejGroupButton(memberName: any, value?: any, param?: any): any; + ejGroupButton(options?: ej.GroupButton.Model): JQuery; + ejGroupButton(memberName: any, value?: any, param?: any): any; - ejHeatMap(options?: ej.datavisualization.HeatMap.Model): JQuery; - ejHeatMap(memberName: any, value?: any, param?: any): any; + ejHeatMap(options?: ej.datavisualization.HeatMap.Model): JQuery; + ejHeatMap(memberName: any, value?: any, param?: any): any; - ejHeatMapLegend(options?: ej.datavisualization.HeatMapLegend.Model): JQuery; - ejHeatMapLegend(memberName: any, value?: any, param?: any): any; + ejHeatMapLegend(options?: ej.datavisualization.HeatMapLegend.Model): JQuery; + ejHeatMapLegend(memberName: any, value?: any, param?: any): any; - ejKanban(options?: ej.Kanban.Model): JQuery; - ejKanban(memberName: any, value?: any, param?: any): any; + ejKanban(options?: ej.Kanban.Model): JQuery; + ejKanban(memberName: any, value?: any, param?: any): any; - ejLinearGauge(options?: ej.datavisualization.LinearGauge.Model): JQuery; - ejLinearGauge(memberName: any, value?: any, param?: any): any; + ejLinearGauge(options?: ej.datavisualization.LinearGauge.Model): JQuery; + ejLinearGauge(memberName: any, value?: any, param?: any): any; - ejListBox(options?: ej.ListBox.Model): JQuery; - ejListBox(memberName: any, value?: any, param?: any): any; + ejListBox(options?: ej.ListBox.Model): JQuery; + ejListBox(memberName: any, value?: any, param?: any): any; - ejListView(options?: ej.ListView.Model): JQuery; - ejListView(memberName: any, value?: any, param?: any): any; + ejListView(options?: ej.ListView.Model): JQuery; + ejListView(memberName: any, value?: any, param?: any): any; - ejMap(options?: ej.datavisualization.Map.Model): JQuery; - ejMap(memberName: any, value?: any, param?: any): any; + ejMap(options?: ej.datavisualization.Map.Model): JQuery; + ejMap(memberName: any, value?: any, param?: any): any; - ejMaskEdit(options?: ej.MaskEdit.Model): JQuery; - ejMaskEdit(memberName: any, value?: any, param?: any): any; + ejMaskEdit(options?: ej.MaskEdit.Model): JQuery; + ejMaskEdit(memberName: any, value?: any, param?: any): any; - ejMenu(options?: ej.Menu.Model): JQuery; - ejMenu(memberName: any, value?: any, param?: any): any; + ejMenu(options?: ej.Menu.Model): JQuery; + ejMenu(memberName: any, value?: any, param?: any): any; - ejNavigationDrawer(options?: ej.NavigationDrawer.Model): JQuery; - ejNavigationDrawer(memberName: any, value?: any, param?: any): any; + ejNavigationDrawer(options?: ej.NavigationDrawer.Model): JQuery; + ejNavigationDrawer(memberName: any, value?: any, param?: any): any; - ejOverview(options?: ej.datavisualization.Overview.Model): JQuery; - ejOverview(memberName: any, value?: any, param?: any): any; + ejOverview(options?: ej.datavisualization.Overview.Model): JQuery; + ejOverview(memberName: any, value?: any, param?: any): any; - ejPager(options?: ej.Pager.Model): JQuery; - ejPager(memberName: any, value?: any, param?: any): any; + ejPager(options?: ej.Pager.Model): JQuery; + ejPager(memberName: any, value?: any, param?: any): any; - ejPdfViewer(options?: ej.PdfViewer.Model): JQuery; - ejPdfViewer(memberName: any, value?: any, param?: any): any; + ejPdfViewer(options?: ej.PdfViewer.Model): JQuery; + ejPdfViewer(memberName: any, value?: any, param?: any): any; - ejPivotChart(options?: ej.PivotChart.Model): JQuery; - ejPivotChart(memberName: any, value?: any, param?: any): any; + ejPivotChart(options?: ej.PivotChart.Model): JQuery; + ejPivotChart(memberName: any, value?: any, param?: any): any; - ejPivotClient(options?: ej.PivotClient.Model): JQuery; - ejPivotClient(memberName: any, value?: any, param?: any): any; + ejPivotClient(options?: ej.PivotClient.Model): JQuery; + ejPivotClient(memberName: any, value?: any, param?: any): any; - ejPivotGauge(options?: ej.PivotGauge.Model): JQuery; - ejPivotGauge(memberName: any, value?: any, param?: any): any; + ejPivotGauge(options?: ej.PivotGauge.Model): JQuery; + ejPivotGauge(memberName: any, value?: any, param?: any): any; - ejPivotGrid(options?: ej.PivotGrid.Model): JQuery; - ejPivotGrid(memberName: any, value?: any, param?: any): any; + ejPivotGrid(options?: ej.PivotGrid.Model): JQuery; + ejPivotGrid(memberName: any, value?: any, param?: any): any; - ejPivotPager(options?: ej.PivotPager.Model): JQuery; - ejPivotPager(memberName: any, value?: any, param?: any): any; + ejPivotPager(options?: ej.PivotPager.Model): JQuery; + ejPivotPager(memberName: any, value?: any, param?: any): any; - ejPivotSchemaDesigner(options?: ej.PivotSchemaDesigner.Model): JQuery; - ejPivotSchemaDesigner(memberName: any, value?: any, param?: any): any; + ejPivotSchemaDesigner(options?: ej.PivotSchemaDesigner.Model): JQuery; + ejPivotSchemaDesigner(memberName: any, value?: any, param?: any): any; - ejPivotTreeMap(options?: ej.PivotTreeMap.Model): JQuery; - ejPivotTreeMap(memberName: any, value?: any, param?: any): any; + ejPivotTreeMap(options?: ej.PivotTreeMap.Model): JQuery; + ejPivotTreeMap(memberName: any, value?: any, param?: any): any; - ejProgressBar(options?: ej.ProgressBar.Model): JQuery; - ejProgressBar(memberName: any, value?: any, param?: any): any; + ejPrint(options?: ej.Print.Model): JQuery; + ejPrint(memberName: any, value?: any, param?: any): any; - ejRadialMenu(options?: ej.RadialMenu.Model): JQuery; - ejRadialMenu(memberName: any, value?: any, param?: any): any; + ejProgressBar(options?: ej.ProgressBar.Model): JQuery; + ejProgressBar(memberName: any, value?: any, param?: any): any; - ejRadialSlider(options?: ej.RadialSlider.Model): JQuery; - ejRadialSlider(memberName: any, value?: any, param?: any): any; + ejRadialMenu(options?: ej.RadialMenu.Model): JQuery; + ejRadialMenu(memberName: any, value?: any, param?: any): any; - ejRadioButton(options?: ej.RadioButton.Model): JQuery; - ejRadioButton(memberName: any, value?: any, param?: any): any; + ejRadialSlider(options?: ej.RadialSlider.Model): JQuery; + ejRadialSlider(memberName: any, value?: any, param?: any): any; - ejRangeNavigator(options?: ej.datavisualization.RangeNavigator.Model): JQuery; - ejRangeNavigator(memberName: any, value?: any, param?: any): any; + ejRadioButton(options?: ej.RadioButton.Model): JQuery; + ejRadioButton(memberName: any, value?: any, param?: any): any; - ejRating(options?: ej.Rating.Model): JQuery; - ejRating(memberName: any, value?: any, param?: any): any; + ejRangeNavigator(options?: ej.datavisualization.RangeNavigator.Model): JQuery; + ejRangeNavigator(memberName: any, value?: any, param?: any): any; - ejRecurrenceEditor(options?: ej.RecurrenceEditor.Model): JQuery; - ejRecurrenceEditor(memberName: any, value?: any, param?: any): any; + ejRating(options?: ej.Rating.Model): JQuery; + ejRating(memberName: any, value?: any, param?: any): any; - ejReportViewer(options?: ej.ReportViewer.Model): JQuery; - ejReportViewer(memberName: any, value?: any, param?: any): any; + ejRecurrenceEditor(options?: ej.RecurrenceEditor.Model): JQuery; + ejRecurrenceEditor(memberName: any, value?: any, param?: any): any; - ejResizable(options?: ej.Resizable.Model): JQuery; - ejResizable(memberName: any, value?: any, param?: any): any; + ejReportViewer(options?: ej.ReportViewer.Model): JQuery; + ejReportViewer(memberName: any, value?: any, param?: any): any; - ejRibbon(options?: ej.Ribbon.Model): JQuery; - ejRibbon(memberName: any, value?: any, param?: any): any; + ejResizable(options?: ej.Resizable.Model): JQuery; + ejResizable(memberName: any, value?: any, param?: any): any; - ejRotator(options?: ej.Rotator.Model): JQuery; - ejRotator(memberName: any, value?: any, param?: any): any; + ejRibbon(options?: ej.Ribbon.Model): JQuery; + ejRibbon(memberName: any, value?: any, param?: any): any; - ejRTE(options?: ej.RTE.Model): JQuery; - ejRTE(memberName: any, value?: any, param?: any): any; + ejRotator(options?: ej.Rotator.Model): JQuery; + ejRotator(memberName: any, value?: any, param?: any): any; - ejSchedule(options?: ej.Schedule.Model): JQuery; - ejSchedule(memberName: any, value?: any, param?: any): any; + ejRTE(options?: ej.RTE.Model): JQuery; + ejRTE(memberName: any, value?: any, param?: any): any; - ejScroller(options?: ej.Scroller.Model): JQuery; - ejScroller(memberName: any, value?: any, param?: any): any; + ejSchedule(options?: ej.Schedule.Model): JQuery; + ejSchedule(memberName: any, value?: any, param?: any): any; - ejSignature(options?: ej.Signature.Model): JQuery; - ejSignature(memberName: any, value?: any, param?: any): any; + ejScroller(options?: ej.Scroller.Model): JQuery; + ejScroller(memberName: any, value?: any, param?: any): any; - ejSlider(options?: ej.Slider.Model): JQuery; - ejSlider(memberName: any, value?: any, param?: any): any; + ejSignature(options?: ej.Signature.Model): JQuery; + ejSignature(memberName: any, value?: any, param?: any): any; - ejSparkline(options?: ej.datavisualization.Sparkline.Model): JQuery; - ejSparkline(memberName: any, value?: any, param?: any): any; + ejSlider(options?: ej.Slider.Model): JQuery; + ejSlider(memberName: any, value?: any, param?: any): any; - ejSpellCheck(options?: ej.SpellCheck.Model): JQuery; - ejSpellCheck(memberName: any, value?: any, param?: any): any; + ejSparkline(options?: ej.datavisualization.Sparkline.Model): JQuery; + ejSparkline(memberName: any, value?: any, param?: any): any; - ejSplitButton(options?: ej.SplitButton.Model): JQuery; - ejSplitButton(memberName: any, value?: any, param?: any): any; + ejSpellCheck(options?: ej.SpellCheck.Model): JQuery; + ejSpellCheck(memberName: any, value?: any, param?: any): any; - ejSplitter(options?: ej.Splitter.Model): JQuery; - ejSplitter(memberName: any, value?: any, param?: any): any; + ejSplitButton(options?: ej.SplitButton.Model): JQuery; + ejSplitButton(memberName: any, value?: any, param?: any): any; - ejSpreadsheet(options?: ej.Spreadsheet.Model): JQuery; - ejSpreadsheet(memberName: any, value?: any, param?: any): any; + ejSplitter(options?: ej.Splitter.Model): JQuery; + ejSplitter(memberName: any, value?: any, param?: any): any; - ejSunburstChart(options?: ej.datavisualization.SunburstChart.Model): JQuery; - ejSunburstChart(memberName: any, value?: any, param?: any): any; + ejSpreadsheet(options?: ej.Spreadsheet.Model): JQuery; + ejSpreadsheet(memberName: any, value?: any, param?: any): any; - ejSymbolPalette(options?: ej.datavisualization.SymbolPalette.Model): JQuery; - ejSymbolPalette(memberName: any, value?: any, param?: any): any; - - ejTab(options?: ej.Tab.Model): JQuery; - ejTab(memberName: any, value?: any, param?: any): any; - - ejTagCloud(options?: ej.TagCloud.Model): JQuery; - ejTagCloud(memberName: any, value?: any, param?: any): any; - - ejNumericTextbox(options?: ej.Editor.Model): JQuery; - ejNumericTextbox(memberName: any, value?: any, param?: any): any; - - ejCurrencyTextbox(options?: ej.Editor.Model): JQuery; - ejCurrencyTextbox(memberName: any, value?: any, param?: any): any; - - ejPercentageTextbox(options?: ej.Editor.Model): JQuery; - ejPercentageTextbox(memberName: any, value?: any, param?: any): any; - - ejTile(options?: ej.Tile.Model): JQuery; - ejTile(memberName: any, value?: any, param?: any): any; - - ejTimePicker(options?: ej.TimePicker.Model): JQuery; - ejTimePicker(memberName: any, value?: any, param?: any): any; - - ejToggleButton(options?: ej.ToggleButton.Model): JQuery; - ejToggleButton(memberName: any, value?: any, param?: any): any; - - ejToolbar(options?: ej.Toolbar.Model): JQuery; - ejToolbar(memberName: any, value?: any, param?: any): any; - - ejTooltip(options?: ej.Tooltip.Model): JQuery; - ejTooltip(memberName: any, value?: any, param?: any): any; - - ejTreeGrid(options?: ej.TreeGrid.Model): JQuery; - ejTreeGrid(memberName: any, value?: any, param?: any): any; - - ejTreeMap(options?: ej.datavisualization.TreeMap.Model): JQuery; - ejTreeMap(memberName: any, value?: any, param?: any): any; - - ejTreeView(options?: ej.TreeView.Model): JQuery; - ejTreeView(memberName: any, value?: any, param?: any): any; - - ejUploadbox(options?: ej.Uploadbox.Model): JQuery; - ejUploadbox(memberName: any, value?: any, param?: any): any; - - ejWaitingPopup(options?: ej.WaitingPopup.Model): JQuery; - ejWaitingPopup(memberName: any, value?: any, param?: any): any; - - data(key: "ejAccordion"): ej.Accordion; - data(key: "ejAutocomplete"): ej.Autocomplete; - data(key: "ejBarcode"): ej.datavisualization.Barcode; - data(key: "ejBulletGraph"): ej.datavisualization.BulletGraph; - data(key: "ejButton"): ej.Button; - data(key: "ejCaptcha"): ej.Captcha; - data(key: "ejChart"): ej.datavisualization.Chart; - data(key: "ejCheckBox"): ej.CheckBox; - data(key: "ejCircularGauge"): ej.datavisualization.CircularGauge; - data(key: "ejColorPicker"): ej.ColorPicker; - data(key: "ejDatePicker"): ej.DatePicker; - data(key: "ejDateRangePicker"): ej.DateRangePicker; - data(key: "ejDateTimePicker"): ej.DateTimePicker; - data(key: "ejDiagram"): ej.datavisualization.Diagram; - data(key: "ejDialog"): ej.Dialog; - data(key: "ejDigitalGauge"): ej.datavisualization.DigitalGauge; - data(key: "ejDocumentEditor"): ej.DocumentEditor; - data(key: "ejDraggable"): ej.Draggable; - data(key: "ejDropDownList"): ej.DropDownList; - data(key: "ejDroppable"): ej.Droppable; - data(key: "ejFileExplorer"): ej.FileExplorer; - data(key: "ejGantt"): ej.Gantt; - data(key: "ejGrid"): ej.Grid; - data(key: "ejGroupButton"): ej.GroupButton; - data(key: "ejHeatMap"): ej.datavisualization.HeatMap; - data(key: "ejHeatMapLegend"): ej.datavisualization.HeatMapLegend; - data(key: "ejKanban"): ej.Kanban; - data(key: "ejLinearGauge"): ej.datavisualization.LinearGauge; - data(key: "ejListBox"): ej.ListBox; - data(key: "ejListView"): ej.ListView; - data(key: "ejMap"): ej.datavisualization.Map; - data(key: "ejMaskEdit"): ej.MaskEdit; - data(key: "ejMenu"): ej.Menu; - data(key: "ejNavigationDrawer"): ej.NavigationDrawer; - data(key: "ejOverview"): ej.datavisualization.Overview; - data(key: "ejPager"): ej.Pager; - data(key: "ejPdfViewer"): ej.PdfViewer; - data(key: "ejPivotChart"): ej.PivotChart; - data(key: "ejPivotClient"): ej.PivotClient; - data(key: "ejPivotGauge"): ej.PivotGauge; - data(key: "ejPivotGrid"): ej.PivotGrid; - data(key: "ejPivotPager"): ej.PivotPager; - data(key: "ejPivotSchemaDesigner"): ej.PivotSchemaDesigner; - data(key: "ejPivotTreeMap"): ej.PivotTreeMap; - data(key: "ejProgressBar"): ej.ProgressBar; - data(key: "ejRadialMenu"): ej.RadialMenu; - data(key: "ejRadialSlider"): ej.RadialSlider; - data(key: "ejRadioButton"): ej.RadioButton; - data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; - data(key: "ejRating"): ej.Rating; - data(key: "ejRecurrenceEditor"): ej.RecurrenceEditor; - data(key: "ejReportViewer"): ej.ReportViewer; - data(key: "ejResizable"): ej.Resizable; - data(key: "ejRibbon"): ej.Ribbon; - data(key: "ejRotator"): ej.Rotator; - data(key: "ejRTE"): ej.RTE; - data(key: "ejSchedule"): ej.Schedule; - data(key: "ejScroller"): ej.Scroller; - data(key: "ejSignature"): ej.Signature; - data(key: "ejSlider"): ej.Slider; - data(key: "ejSparkline"): ej.datavisualization.Sparkline; - data(key: "ejSpellCheck"): ej.SpellCheck; - data(key: "ejSplitButton"): ej.SplitButton; - data(key: "ejSplitter"): ej.Splitter; - data(key: "ejSpreadsheet"): ej.Spreadsheet; - data(key: "ejSunburstChart"): ej.datavisualization.SunburstChart; - data(key: "ejSymbolPalette"): ej.datavisualization.SymbolPalette; - data(key: "ejTab"): ej.Tab; - data(key: "ejTagCloud"): ej.TagCloud; - data(key: "ejNumericTextbox"): ej.NumericTextbox; - data(key: "ejCurrencyTextbox"): ej.CurrencyTextbox; - data(key: "ejPercentageTextbox"): ej.PercentageTextbox; - data(key: "ejTile"): ej.Tile; - data(key: "ejTimePicker"): ej.TimePicker; - data(key: "ejToggleButton"): ej.ToggleButton; - data(key: "ejToolbar"): ej.Toolbar; - data(key: "ejTooltip"): ej.Tooltip; - data(key: "ejTreeGrid"): ej.TreeGrid; - data(key: "ejTreeMap"): ej.datavisualization.TreeMap; - data(key: "ejTreeView"): ej.TreeView; - data(key: "ejUploadbox"): ej.Uploadbox; - data(key: "ejWaitingPopup"): ej.WaitingPopup; + ejSunburstChart(options?: ej.datavisualization.SunburstChart.Model): JQuery; + ejSunburstChart(memberName: any, value?: any, param?: any): any; + + ejSymbolPalette(options?: ej.datavisualization.SymbolPalette.Model): JQuery; + ejSymbolPalette(memberName: any, value?: any, param?: any): any; + + ejTab(options?: ej.Tab.Model): JQuery; + ejTab(memberName: any, value?: any, param?: any): any; + + ejTagCloud(options?: ej.TagCloud.Model): JQuery; + ejTagCloud(memberName: any, value?: any, param?: any): any; + + ejNumericTextbox(options?: ej.Editor.Model): JQuery; + ejNumericTextbox(memberName: any, value?: any, param?: any): any; + + ejCurrencyTextbox(options?: ej.Editor.Model): JQuery; + ejCurrencyTextbox(memberName: any, value?: any, param?: any): any; + + ejPercentageTextbox(options?: ej.Editor.Model): JQuery; + ejPercentageTextbox(memberName: any, value?: any, param?: any): any; + + ejTile(options?: ej.Tile.Model): JQuery; + ejTile(memberName: any, value?: any, param?: any): any; + + ejTimePicker(options?: ej.TimePicker.Model): JQuery; + ejTimePicker(memberName: any, value?: any, param?: any): any; + + ejToggleButton(options?: ej.ToggleButton.Model): JQuery; + ejToggleButton(memberName: any, value?: any, param?: any): any; + + ejToolbar(options?: ej.Toolbar.Model): JQuery; + ejToolbar(memberName: any, value?: any, param?: any): any; + + ejTooltip(options?: ej.Tooltip.Model): JQuery; + ejTooltip(memberName: any, value?: any, param?: any): any; + + ejTreeGrid(options?: ej.TreeGrid.Model): JQuery; + ejTreeGrid(memberName: any, value?: any, param?: any): any; + + ejTreeMap(options?: ej.datavisualization.TreeMap.Model): JQuery; + ejTreeMap(memberName: any, value?: any, param?: any): any; + + ejTreeView(options?: ej.TreeView.Model): JQuery; + ejTreeView(memberName: any, value?: any, param?: any): any; + + ejUploadbox(options?: ej.Uploadbox.Model): JQuery; + ejUploadbox(memberName: any, value?: any, param?: any): any; + + ejWaitingPopup(options?: ej.WaitingPopup.Model): JQuery; + ejWaitingPopup(memberName: any, value?: any, param?: any): any; + data(key: "ejAccordion"): ej.Accordion; + data(key: "ejAutocomplete"): ej.Autocomplete; + data(key: "ejBarcode"): ej.datavisualization.Barcode; + data(key: "ejBulletGraph"): ej.datavisualization.BulletGraph; + data(key: "ejButton"): ej.Button; + data(key: "ejCaptcha"): ej.Captcha; + data(key: "ejChart"): ej.datavisualization.Chart; + data(key: "ejCheckBox"): ej.CheckBox; + data(key: "ejCircularGauge"): ej.datavisualization.CircularGauge; + data(key: "ejColorPicker"): ej.ColorPicker; + data(key: "ejDatePicker"): ej.DatePicker; + data(key: "ejDateRangePicker"): ej.DateRangePicker; + data(key: "ejDateTimePicker"): ej.DateTimePicker; + data(key: "ejDiagram"): ej.datavisualization.Diagram; + data(key: "ejDialog"): ej.Dialog; + data(key: "ejDigitalGauge"): ej.datavisualization.DigitalGauge; + data(key: "ejDocumentEditor"): ej.DocumentEditor; + data(key: "ejDraggable"): ej.Draggable; + data(key: "ejDropDownList"): ej.DropDownList; + data(key: "ejDroppable"): ej.Droppable; + data(key: "ejFileExplorer"): ej.FileExplorer; + data(key: "ejGantt"): ej.Gantt; + data(key: "ejGrid"): ej.Grid; + data(key: "ejGroupButton"): ej.GroupButton; + data(key: "ejHeatMap"): ej.datavisualization.HeatMap; + data(key: "ejHeatMapLegend"): ej.datavisualization.HeatMapLegend; + data(key: "ejKanban"): ej.Kanban; + data(key: "ejLinearGauge"): ej.datavisualization.LinearGauge; + data(key: "ejListBox"): ej.ListBox; + data(key: "ejListView"): ej.ListView; + data(key: "ejMap"): ej.datavisualization.Map; + data(key: "ejMaskEdit"): ej.MaskEdit; + data(key: "ejMenu"): ej.Menu; + data(key: "ejNavigationDrawer"): ej.NavigationDrawer; + data(key: "ejOverview"): ej.datavisualization.Overview; + data(key: "ejPager"): ej.Pager; + data(key: "ejPdfViewer"): ej.PdfViewer; + data(key: "ejPivotChart"): ej.PivotChart; + data(key: "ejPivotClient"): ej.PivotClient; + data(key: "ejPivotGauge"): ej.PivotGauge; + data(key: "ejPivotGrid"): ej.PivotGrid; + data(key: "ejPivotPager"): ej.PivotPager; + data(key: "ejPivotSchemaDesigner"): ej.PivotSchemaDesigner; + data(key: "ejPivotTreeMap"): ej.PivotTreeMap; + data(key: "ejPrint"): ej.Print; + data(key: "ejProgressBar"): ej.ProgressBar; + data(key: "ejRadialMenu"): ej.RadialMenu; + data(key: "ejRadialSlider"): ej.RadialSlider; + data(key: "ejRadioButton"): ej.RadioButton; + data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; + data(key: "ejRating"): ej.Rating; + data(key: "ejRecurrenceEditor"): ej.RecurrenceEditor; + data(key: "ejReportViewer"): ej.ReportViewer; + data(key: "ejResizable"): ej.Resizable; + data(key: "ejRibbon"): ej.Ribbon; + data(key: "ejRotator"): ej.Rotator; + data(key: "ejRTE"): ej.RTE; + data(key: "ejSchedule"): ej.Schedule; + data(key: "ejScroller"): ej.Scroller; + data(key: "ejSignature"): ej.Signature; + data(key: "ejSlider"): ej.Slider; + data(key: "ejSparkline"): ej.datavisualization.Sparkline; + data(key: "ejSpellCheck"): ej.SpellCheck; + data(key: "ejSplitButton"): ej.SplitButton; + data(key: "ejSplitter"): ej.Splitter; + data(key: "ejSpreadsheet"): ej.Spreadsheet; + data(key: "ejSunburstChart"): ej.datavisualization.SunburstChart; + data(key: "ejSymbolPalette"): ej.datavisualization.SymbolPalette; + data(key: "ejTab"): ej.Tab; + data(key: "ejTagCloud"): ej.TagCloud; + data(key: "ejNumericTextbox"): ej.NumericTextbox; + data(key: "ejCurrencyTextbox"): ej.CurrencyTextbox; + data(key: "ejPercentageTextbox"): ej.PercentageTextbox; + data(key: "ejTile"): ej.Tile; + data(key: "ejTimePicker"): ej.TimePicker; + data(key: "ejToggleButton"): ej.ToggleButton; + data(key: "ejToolbar"): ej.Toolbar; + data(key: "ejTooltip"): ej.Tooltip; + data(key: "ejTreeGrid"): ej.TreeGrid; + data(key: "ejTreeMap"): ej.datavisualization.TreeMap; + data(key: "ejTreeView"): ej.TreeView; + data(key: "ejUploadbox"): ej.Uploadbox; + data(key: "ejWaitingPopup"): ej.WaitingPopup; } diff --git a/types/ej.web.all/tsconfig.json b/types/ej.web.all/tsconfig.json index 3a1cd27967..e187b54f67 100644 --- a/types/ej.web.all/tsconfig.json +++ b/types/ej.web.all/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "ej.web.all-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index a0606a4961..34be61f5b0 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -13,75 +13,75 @@ declare module Elasticsearch { nodes: Nodes; snapshot: Snapshot; tasks: Tasks; - bulk(params: BulkIndexDocumentsParams): PromiseLike; + bulk(params: BulkIndexDocumentsParams): Promise; bulk(params: BulkIndexDocumentsParams, callback: (error: any, response: any) => void): void; clearScroll(params: ClearScrollParams, callback: (error: any, response: any) => void): void; - clearScroll(params: ClearScrollParams): PromiseLike; + clearScroll(params: ClearScrollParams): Promise; count(params: CountParams, callback: (error: any, response: CountResponse) => void): void; - count(params: CountParams): PromiseLike; - create(params: CreateDocumentParams): PromiseLike; + count(params: CountParams): Promise; + create(params: CreateDocumentParams): Promise; create(params: CreateDocumentParams, callback: (err: any, response: CreateDocumentResponse, status: any) => void): void; - delete(params: DeleteDocumentParams): PromiseLike; + delete(params: DeleteDocumentParams): Promise; delete(params: DeleteDocumentParams, callback: (error: any, response: DeleteDocumentResponse) => void): void; - deleteByQuery(params: DeleteDocumentByQueryParams): PromiseLike; + deleteByQuery(params: DeleteDocumentByQueryParams): Promise; deleteByQuery(params: DeleteDocumentByQueryParams, callback: (error: any, response: DeleteDocumentByQueryResponse) => void): void; - deleteScript(params: DeleteScriptParams): PromiseLike; + deleteScript(params: DeleteScriptParams): Promise; deleteScript(params: DeleteScriptParams, callback: (error: any, response: any) => void): void; - deleteTemplate(params: DeleteTemplateParams): PromiseLike; + deleteTemplate(params: DeleteTemplateParams): Promise; deleteTemplate(params: DeleteTemplateParams, callback: (error: any, response: any) => void): void; - exists(params: ExistsParams): PromiseLike; + exists(params: ExistsParams): Promise; exists(params: ExistsParams, callback: (error: any, response: any, status?: any) => void): void; - explain(params: ExplainParams): PromiseLike; + explain(params: ExplainParams): Promise; explain(params: ExplainParams, callback: (error: any, response: ExplainResponse) => void): void; - fieldStats(params: FieldStatsParams): PromiseLike; + fieldStats(params: FieldStatsParams): Promise; fieldStats(params: FieldStatsParams, callback: (error: any, response: FieldStatsResponse) => void): void; get(params: GetParams, callback: (error: any, response: GetResponse) => void): void; - get(params: GetParams): PromiseLike>; - getScript(params: GetScriptParams): PromiseLike; + get(params: GetParams): Promise>; + getScript(params: GetScriptParams): Promise; getScript(params: GetScriptParams, callback: (error: any, response: any) => void): void; - getSource(params: GetSourceParams): PromiseLike; + getSource(params: GetSourceParams): Promise; getSource(params: GetSourceParams, callback: (error: any, response: any) => void): void; - getTemplate(params: GetTemplateParams): PromiseLike; + getTemplate(params: GetTemplateParams): Promise; getTemplate(params: GetTemplateParams, callback: (error: any, response: any) => void): void; - index(params: IndexDocumentParams): PromiseLike; + index(params: IndexDocumentParams): Promise; index(params: IndexDocumentParams, callback: (error: any, response: any) => void): void; - info(params: InfoParams): PromiseLike; + info(params: InfoParams): Promise; info(params: InfoParams, callback: (error: any, response: any) => void): void; mget(params: MGetParams, callback: (error: any, response: MGetResponse) => void): void; - mget(params: MGetParams): PromiseLike>; + mget(params: MGetParams): Promise>; msearch(params: MSearchParams, callback: (error: any, response: MSearchResponse) => void): void; - msearch(params: MSearchParams): PromiseLike>; + msearch(params: MSearchParams): Promise>; msearchTemplate(params: MSearchTemplateParams, callback: (error: any, response: MSearchResponse) => void): void; - msearchTemplate(params: MSearchTemplateParams): PromiseLike>; - mtermvectors(params: MTermVectorsParams): PromiseLike; + msearchTemplate(params: MSearchTemplateParams): Promise>; + mtermvectors(params: MTermVectorsParams): Promise; mtermvectors(params: MTermVectorsParams, callback: (error: any, response: any) => void): void; - ping(params: PingParams): PromiseLike; + ping(params: PingParams): Promise; ping(params: PingParams, callback: (err: any, response: any, status: any) => void): void; - putScript(params: PutScriptParams): PromiseLike; + putScript(params: PutScriptParams): Promise; putScript(params: PutScriptParams, callback: (err: any, response: any, status: any) => void): void; - putTemplate(params: PutTemplateParams): PromiseLike; + putTemplate(params: PutTemplateParams): Promise; putTemplate(params: PutTemplateParams, callback: (err: any, response: any, status: any) => void): void; - reindex(params: ReindexParams): PromiseLike; + reindex(params: ReindexParams): Promise; reindex(params: ReindexParams, callback: (error: any, response: ReindexResponse) => void): void; - reindexRethrottle(params: ReindexRethrottleParams): PromiseLike; + reindexRethrottle(params: ReindexRethrottleParams): Promise; reindexRethrottle(params: ReindexRethrottleParams, callback: (error: any, response: any) => void): void; - renderSearchTemplate(params: RenderSearchTemplateParams): PromiseLike; + renderSearchTemplate(params: RenderSearchTemplateParams): Promise; renderSearchTemplate(params: RenderSearchTemplateParams, callback: (error: any, response: any) => void): void; - scroll(params: ScrollParams): PromiseLike; - scroll(params: ScrollParams, callback: (error: any, response: any) => void): void; - search(params: SearchParams): PromiseLike>; + scroll(params: ScrollParams): Promise>; + scroll(params: ScrollParams, callback: (error: any, response: SearchResponse) => void): void; + search(params: SearchParams): Promise>; search(params: SearchParams, callback: (error: any, response: SearchResponse) => void): void; - searchShards(params: SearchShardsParams): PromiseLike; + searchShards(params: SearchShardsParams): Promise; searchShards(params: SearchShardsParams, callback: (error: any, response: SearchShardsResponse) => void): void; - searchTemplate(params: SearchTemplateParams): PromiseLike; + searchTemplate(params: SearchTemplateParams): Promise; searchTemplate(params: SearchTemplateParams, callback: (error: any, response: any) => void): void; - suggest(params: SuggestParams): PromiseLike; + suggest(params: SuggestParams): Promise; suggest(params: SuggestParams, callback: (error: any, response: any) => void): void; - termvectors(params: TermvectorsParams): PromiseLike; + termvectors(params: TermvectorsParams): Promise; termvectors(params: TermvectorsParams, callback: (error: any, response: any) => void): void; - update(params: UpdateDocumentParams): PromiseLike; + update(params: UpdateDocumentParams): Promise; update(params: UpdateDocumentParams, callback: (error: any, response: any) => void): void; - updateByQuery(params: UpdateDocumentByQueryParams): PromiseLike; + updateByQuery(params: UpdateDocumentByQueryParams): Promise; updateByQuery(params: UpdateDocumentByQueryParams, callback: (error: any, response: any) => void): void; } @@ -774,43 +774,43 @@ declare module Elasticsearch { export interface Cat { aliases(params: CatAliasesParams, callback: (error: any, response: any) => void): void; - aliases(params: CatAliasesParams): PromiseLike; + aliases(params: CatAliasesParams): Promise; allocation(params: CatAllocationParams, callback: (error: any, response: any) => void): void; - allocation(params: CatAllocationParams): PromiseLike; + allocation(params: CatAllocationParams): Promise; count(params: CatCountParams, callback: (error: any, response: any) => void): void; - count(params: CatAllocationParams): PromiseLike; + count(params: CatAllocationParams): Promise; fielddata(params: CatFielddataParams, callback: (error: any, response: any) => void): void; - fielddata(params: CatFielddataParams): PromiseLike; + fielddata(params: CatFielddataParams): Promise; health(params: CatHealthParams, callback: (error: any, response: any) => void): void; - health(params: CatHealthParams): PromiseLike; + health(params: CatHealthParams): Promise; help(params: CatHelpParams, callback: (error: any, response: any) => void): void; - help(params: CatHelpParams): PromiseLike; + help(params: CatHelpParams): Promise; indices(params: CatIndicesParams, callback: (error: any, response: any) => void): void; - indices(params: CatIndicesParams): PromiseLike; + indices(params: CatIndicesParams): Promise; master(params: CatCommonParams, callback: (error: any, response: any) => void): void; - master(params: CatCommonParams): PromiseLike; + master(params: CatCommonParams): Promise; nodeattrs(params: CatCommonParams, callback: (error: any, response: any) => void): void; - nodeattrs(params: CatCommonParams): PromiseLike; + nodeattrs(params: CatCommonParams): Promise; nodes(params: CatCommonParams, callback: (error: any, response: any) => void): void; - nodes(params: CatCommonParams): PromiseLike; + nodes(params: CatCommonParams): Promise; pendingTasks(params: CatCommonParams, callback: (error: any, response: any) => void): void; - pendingTasks(params: CatCommonParams): PromiseLike; + pendingTasks(params: CatCommonParams): Promise; plugins(params: CatCommonParams, callback: (error: any, response: any) => void): void; - plugins(params: CatCommonParams): PromiseLike; + plugins(params: CatCommonParams): Promise; recovery(params: CatRecoveryParams, callback: (error: any, response: any) => void): void; - recovery(params: CatRecoveryParams): PromiseLike; + recovery(params: CatRecoveryParams): Promise; repositories(params: CatCommonParams, callback: (error: any, response: any) => void): void; - repositories(params: CatCommonParams): PromiseLike; + repositories(params: CatCommonParams): Promise; segments(params: CatSegmentsParams, callback: (error: any, response: any) => void): void; - segments(params: CatSegmentsParams): PromiseLike; + segments(params: CatSegmentsParams): Promise; shards(params: CatShardsParams, callback: (error: any, response: any) => void): void; - shards(params: CatShardsParams): PromiseLike; + shards(params: CatShardsParams): Promise; snapshots(params: CatSnapshotsParams, callback: (error: any, response: any) => void): void; - snapshots(params: CatSnapshotsParams): PromiseLike; + snapshots(params: CatSnapshotsParams): Promise; tasks(params: CatTasksParams, callback: (error: any, response: any) => void): void; - tasks(params: CatTasksParams): PromiseLike; + tasks(params: CatTasksParams): Promise; threadPool(params: CatThreadPoolParams, callback: (error: any, response: any) => void): void; - threadPool(params: CatThreadPoolParams): PromiseLike; + threadPool(params: CatThreadPoolParams): Promise; } export type CatBytes = "b" | "k" | "kb" | "m" | "mb" | "g" | "gb" | "t" | "tb" | "p" | "pb"; @@ -907,21 +907,21 @@ declare module Elasticsearch { export interface Cluster { allocationExplain(params: ClusterAllocationExplainParams, callback: (error: any, response: any) => void): void; - allocationExplain(params: ClusterAllocationExplainParams): PromiseLike; + allocationExplain(params: ClusterAllocationExplainParams): Promise; getSettings(params: ClusterGetSettingsParams, callback: (error: any, response: any) => void): void; - getSettings(params: ClusterGetSettingsParams): PromiseLike; + getSettings(params: ClusterGetSettingsParams): Promise; health(params: ClusterHealthParams, callback: (error: any, response: any) => void): void; - health(params: ClusterHealthParams): PromiseLike; + health(params: ClusterHealthParams): Promise; pendingTasks(params: ClusterPendingTasksParams, callback: (error: any, response: any) => void): void; - pendingTasks(params: ClusterPendingTasksParams): PromiseLike; + pendingTasks(params: ClusterPendingTasksParams): Promise; putSettings(params: ClusterPutSettingsParams, callback: (error: any, response: any) => void): void; - putSettings(params: ClusterPutSettingsParams): PromiseLike; + putSettings(params: ClusterPutSettingsParams): Promise; reroute(params: ClusterRerouteParams, callback: (error: any, response: any) => void): void; - reroute(params: ClusterRerouteParams): PromiseLike; + reroute(params: ClusterRerouteParams): Promise; state(params: ClusterStateParams, callback: (error: any, response: any) => void): void; - state(params: ClusterStateParams): PromiseLike; + state(params: ClusterStateParams): Promise; stats(params: ClusterStatsParams, callback: (error: any, response: any) => void): void; - stats(params: ClusterStatsParams): PromiseLike; + stats(params: ClusterStatsParams): Promise; } export interface ClusterAllocationExplainParams extends GenericParams { @@ -988,77 +988,77 @@ declare module Elasticsearch { export class Indices { analyze(params: IndicesAnalyzeParams, callback: (error: any, response: any, status: any) => void): void; - analyze(params: IndicesAnalyzeParams): PromiseLike; + analyze(params: IndicesAnalyzeParams): Promise; clearCache(params: IndicesClearCacheParams, callback: (error: any, response: any, status: any) => void): void; - clearCache(params: IndicesClearCacheParams): PromiseLike; + clearCache(params: IndicesClearCacheParams): Promise; close(params: IndicesCloseParams, callback: (error: any, response: any, status: any) => void): void; - close(params: IndicesCloseParams): PromiseLike; + close(params: IndicesCloseParams): Promise; create(params: IndicesCreateParams, callback: (error: any, response: any, status: any) => void): void; - create(params: IndicesCreateParams): PromiseLike; + create(params: IndicesCreateParams): Promise; delete(params: IndicesDeleteParams, callback: (error: any, response: any, status: any) => void): void; - delete(params: IndicesDeleteParams): PromiseLike; + delete(params: IndicesDeleteParams): Promise; deleteAlias(params: IndicesDeleteAliasParams, callback: (error: any, response: any, status: any) => void): void; - deleteAlias(params: IndicesDeleteAliasParams): PromiseLike; + deleteAlias(params: IndicesDeleteAliasParams): Promise; deleteTemplate(params: IndicesDeleteTemplateParams, callback: (error: any, response: any, status: any) => void): void; - deleteTemplate(params: IndicesDeleteTemplateParams): PromiseLike; + deleteTemplate(params: IndicesDeleteTemplateParams): Promise; exists(params: IndicesExistsParams, callback: (error: any, response: any, status: any) => void): void; - exists(params: IndicesExistsParams): PromiseLike; + exists(params: IndicesExistsParams): Promise; existsAlias(params: IndicesExistsAliasParams, callback: (error: any, response: any, status: any) => void): void; - existsAlias(params: IndicesExistsAliasParams): PromiseLike; + existsAlias(params: IndicesExistsAliasParams): Promise; existsTemplate(params: IndicesExistsTemplateParams, callback: (error: any, response: any, status: any) => void): void; - existsTemplate(params: IndicesExistsTemplateParams): PromiseLike; + existsTemplate(params: IndicesExistsTemplateParams): Promise; existsType(params: IndicesExistsTypeParams, callback: (error: any, response: any, status: any) => void): void; - existsType(params: IndicesExistsTypeParams): PromiseLike; + existsType(params: IndicesExistsTypeParams): Promise; flush(params: IndicesFlushParams, callback: (error: any, response: any, status: any) => void): void; - flush(params: IndicesFlushParams): PromiseLike; + flush(params: IndicesFlushParams): Promise; flushSynced(params: IndicesFlushSyncedParams, callback: (error: any, response: any, status: any) => void): void; - flushSynced(params: IndicesFlushSyncedParams): PromiseLike; + flushSynced(params: IndicesFlushSyncedParams): Promise; forcemerge(params: IndicesForcemergeParams, callback: (error: any, response: any, status: any) => void): void; - forcemerge(params: IndicesForcemergeParams): PromiseLike; + forcemerge(params: IndicesForcemergeParams): Promise; get(params: IndicesGetParams, callback: (error: any, response: any, status: any) => void): void; - get(params: IndicesGetParams): PromiseLike; + get(params: IndicesGetParams): Promise; getAlias(params: IndicesGetAliasParams, callback: (error: any, response: any, status: any) => void): void; - getAlias(params: IndicesGetAliasParams): PromiseLike; + getAlias(params: IndicesGetAliasParams): Promise; getFieldMapping(params: IndicesGetFieldMappingParams, callback: (error: any, response: any, status: any) => void): void; - getFieldMapping(params: IndicesGetFieldMappingParams): PromiseLike; + getFieldMapping(params: IndicesGetFieldMappingParams): Promise; getMapping(params: IndicesGetMappingParams, callback: (error: any, response: any, status: any) => void): void; - getMapping(params: IndicesGetMappingParams): PromiseLike; + getMapping(params: IndicesGetMappingParams): Promise; getSettings(params: IndicesGetSettingsParams, callback: (error: any, response: any, status: any) => void): void; - getSettings(params: IndicesGetSettingsParams): PromiseLike; + getSettings(params: IndicesGetSettingsParams): Promise; getTemplate(params: IndicesGetTemplateParams, callback: (error: any, response: any, status: any) => void): void; - getTemplate(params: IndicesGetTemplateParams): PromiseLike; + getTemplate(params: IndicesGetTemplateParams): Promise; getUpgrade(params: IndicesGetUpgradeParams, callback: (error: any, response: any, status: any) => void): void; - getUpgrade(params: IndicesGetUpgradeParams): PromiseLike; + getUpgrade(params: IndicesGetUpgradeParams): Promise; open(params: IndicesOpenParams, callback: (error: any, response: any, status: any) => void): void; - open(params: IndicesOpenParams): PromiseLike; + open(params: IndicesOpenParams): Promise; putAlias(params: IndicesPutAliasParams, callback: (error: any, response: any, status: any) => void): void; - putAlias(params: IndicesPutAliasParams): PromiseLike; + putAlias(params: IndicesPutAliasParams): Promise; putMapping(params: IndicesPutMappingParams, callback: (error: any, response: any, status: any) => void): void; - putMapping(params: IndicesPutMappingParams): PromiseLike; + putMapping(params: IndicesPutMappingParams): Promise; putSettings(params: IndicesPutSettingsParams, callback: (error: any, response: any, status: any) => void): void; - putSettings(params: IndicesPutSettingsParams): PromiseLike; + putSettings(params: IndicesPutSettingsParams): Promise; putTemplate(params: IndicesPutTemplateParams, callback: (error: any, response: any) => void): void; - putTemplate(params: IndicesPutTemplateParams): PromiseLike; + putTemplate(params: IndicesPutTemplateParams): Promise; recovery(params: IndicesRecoveryParams, callback: (error: any, response: any) => void): void; - recovery(params: IndicesRecoveryParams): PromiseLike; + recovery(params: IndicesRecoveryParams): Promise; refresh(params: IndicesRefreshParams, callback: (error: any, response: any) => void): void; - refresh(params: IndicesRefreshParams): PromiseLike; + refresh(params: IndicesRefreshParams): Promise; rollover(params: IndicesRolloverParams, callback: (error: any, response: IndicesRolloverResponse) => void): void; - rollover(params: IndicesRolloverParams): PromiseLike; + rollover(params: IndicesRolloverParams): Promise; segments(params: IndicesSegmentsParams, callback: (error: any, response: any) => void): void; - segments(params: IndicesSegmentsParams): PromiseLike; + segments(params: IndicesSegmentsParams): Promise; shardStores(params: IndicesShardStoresParams, callback: (error: any, response: any) => void): void; - shardStores(params: IndicesShardStoresParams): PromiseLike; + shardStores(params: IndicesShardStoresParams): Promise; shrink(params: IndicesShrinkParams, callback: (error: any, response: any) => void): void; - shrink(params: IndicesShrinkParams): PromiseLike; + shrink(params: IndicesShrinkParams): Promise; stats(params: IndicesStatsParams, callback: (error: any, response: any) => void): void; - stats(params: IndicesStatsParams): PromiseLike; + stats(params: IndicesStatsParams): Promise; updateAliases(params: IndicesUpdateAliasesParams, callback: (error: any, response: any) => void): void; - updateAliases(params: IndicesUpdateAliasesParams): PromiseLike; + updateAliases(params: IndicesUpdateAliasesParams): Promise; upgrade(params: IndicesUpgradeParams, callback: (error: any, response: any) => void): void; - upgrade(params: IndicesUpgradeParams): PromiseLike; + upgrade(params: IndicesUpgradeParams): Promise; validateQuery(params: IndicesValidateQueryParams, callback: (error: any, response: any) => void): void; - validateQuery(params: IndicesValidateQueryParams): PromiseLike; + validateQuery(params: IndicesValidateQueryParams): Promise; } export interface IndicesAnalyzeParams extends GenericParams { @@ -1416,13 +1416,13 @@ declare module Elasticsearch { export class Ingest { deletePipeline(params: IngestDeletePipelineParams, callback: (error: any, response: any, status: any) => void): void; - deletePipeline(params: IngestDeletePipelineParams): PromiseLike; + deletePipeline(params: IngestDeletePipelineParams): Promise; getPipeline(params: IngestGetPipelineParams, callback: (error: any, response: any, status: any) => void): void; - getPipeline(params: IngestGetPipelineParams): PromiseLike; + getPipeline(params: IngestGetPipelineParams): Promise; putPipeline(params: IngestPutPipelineParams, callback: (error: any, response: any, status: any) => void): void; - putPipeline(params: IngestPutPipelineParams): PromiseLike; + putPipeline(params: IngestPutPipelineParams): Promise; simulate(params: IngestSimulateParams, callback: (error: any, response: any, status: any) => void): void; - simulate(params: IngestSimulateParams): PromiseLike; + simulate(params: IngestSimulateParams): Promise; } export interface IngestDeletePipelineParams extends GenericParams { @@ -1450,11 +1450,11 @@ declare module Elasticsearch { export class Nodes { hotThreads(params: NodesHotThreadsParams, callback: (error: any, response: any, status: any) => void): void; - hotThreads(params: NodesHotThreadsParams): PromiseLike; + hotThreads(params: NodesHotThreadsParams): Promise; info(params: NodesInfoParams, callback: (error: any, response: any, status: any) => void): void; - info(params: NodesInfoParams): PromiseLike; + info(params: NodesInfoParams): Promise; stats(params: NodesStatsParams, callback: (error: any, response: any, status: any) => void): void; - stats(params: NodesStatsParams): PromiseLike; + stats(params: NodesStatsParams): Promise; } export interface NodesHotThreadsParams extends GenericParams { @@ -1491,23 +1491,23 @@ declare module Elasticsearch { export class Snapshot { create(params: SnapshotCreateParams, callback: (error: any, response: any, status: any) => void): void; - create(params: SnapshotCreateParams): PromiseLike; + create(params: SnapshotCreateParams): Promise; createRepository(params: SnapshotCreateRepositoryParams, callback: (error: any, response: any, status: any) => void): void; - createRepository(params: SnapshotCreateRepositoryParams): PromiseLike; + createRepository(params: SnapshotCreateRepositoryParams): Promise; delete(params: SnapshotDeleteParams, callback: (error: any, response: any, status: any) => void): void; - delete(params: SnapshotDeleteParams): PromiseLike; + delete(params: SnapshotDeleteParams): Promise; deleteRepository(params: SnapshotDeleteRepositoryParams, callback: (error: any, response: any, status: any) => void): void; - deleteRepository(params: SnapshotDeleteRepositoryParams): PromiseLike; + deleteRepository(params: SnapshotDeleteRepositoryParams): Promise; get(params: SnapshotGetParams, callback: (error: any, response: any, status: any) => void): void; - get(params: SnapshotGetParams): PromiseLike; + get(params: SnapshotGetParams): Promise; getRepository(params: SnapshotGetRepositoryParams, callback: (error: any, response: any, status: any) => void): void; - getRepository(params: SnapshotGetRepositoryParams): PromiseLike; + getRepository(params: SnapshotGetRepositoryParams): Promise; restore(params: SnapshotRestoreParams, callback: (error: any, response: any, status: any) => void): void; - restore(params: SnapshotRestoreParams): PromiseLike; + restore(params: SnapshotRestoreParams): Promise; status(params: SnapshotStatusParams, callback: (error: any, response: any, status: any) => void): void; - status(params: SnapshotStatusParams): PromiseLike; + status(params: SnapshotStatusParams): Promise; verifyRepository(params: SnapshotVerifyRepositoryParams, callback: (error: any, response: any, status: any) => void): void; - verifyRepository(params: SnapshotVerifyRepositoryParams): PromiseLike; + verifyRepository(params: SnapshotVerifyRepositoryParams): Promise; } export interface SnapshotCreateParams extends GenericParams { @@ -1571,11 +1571,11 @@ declare module Elasticsearch { export class Tasks { cancel(params: TasksCancelParams, callback: (error: any, response: any, status: any) => void): void; - cancel(params: TasksCancelParams): PromiseLike; + cancel(params: TasksCancelParams): Promise; get(params: TasksGetParams, callback: (error: any, response: any, status: any) => void): void; - get(params: TasksGetParams): PromiseLike; + get(params: TasksGetParams): Promise; list(params: TasksListParams, callback: (error: any, response: any, status: any) => void): void; - list(params: TasksListParams): PromiseLike; + list(params: TasksListParams): Promise; } export interface TasksCancelParams extends GenericParams { diff --git a/types/electron-config/electron-config-tests.ts b/types/electron-config/electron-config-tests.ts index bf1ad2087b..a5ac9e9ec3 100644 --- a/types/electron-config/electron-config-tests.ts +++ b/types/electron-config/electron-config-tests.ts @@ -13,7 +13,7 @@ const electronConfig = new ElectronConfig(); electronConfig.set('foo', 'bar'); electronConfig.set({ foo: 'bar', - 'foo2': 'bar2', + foo2: 'bar2', }); electronConfig.delete('foo'); electronConfig.get('foo'); diff --git a/types/electron-config/tslint.json b/types/electron-config/tslint.json index 3db14f85ea..e830836d23 100644 --- a/types/electron-config/tslint.json +++ b/types/electron-config/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json" , + "rules": { + "no-namespace":false, + "object-literal-key-quotes": false + } +} diff --git a/types/electron-packager/electron-packager-tests.ts b/types/electron-packager/electron-packager-tests.ts index bf6122bb2f..482c49bbff 100644 --- a/types/electron-packager/electron-packager-tests.ts +++ b/types/electron-packager/electron-packager-tests.ts @@ -1,11 +1,8 @@ - - import * as packager from "electron-packager"; function callback(err: Error, appPath: string) { - const - msg = err.message, - index = appPath.indexOf("test"); + const msg = err.message; + const index = appPath.indexOf("test"); } packager({ @@ -13,29 +10,27 @@ packager({ name: "myapplication", platform: "win32", arch: "all", - version: "0.34.0" + electronVersion: "0.34.0" }, callback); packager({ dir: ".", name: "myapplication", - version: "0.34.0", + electronVersion: "0.34.0", all: true }, callback); -const pkger = require("electron-packager"); - -pkger({ +packager({ dir: ".", name: "myapplication", platform: "win32", arch: "all", - version: "0.34.0" + electronVersion: "0.34.0" }, callback); -pkger({ +packager({ dir: ".", name: "myapplication", - version: "0.34.0", + electronVersion: "0.34.0", all: true }, callback); diff --git a/types/electron-packager/index.d.ts b/types/electron-packager/index.d.ts index e5fe985761..99b232388b 100644 --- a/types/electron-packager/index.d.ts +++ b/types/electron-packager/index.d.ts @@ -1,115 +1,204 @@ -// Type definitions for electron-packager v5.1.0 -// Project: https://github.com/maxogden/electron-packager +// Type definitions for electron-packager 8.7 +// Project: https://github.com/electron-userland/electron-packager // Definitions by: Maxime LUCE +// Juan Jimenez-Anca // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -declare namespace ElectronPackager { +export = electronPackager; + +/** + * This will: + * - Find or download the correct release of Electron + * - Use that version of electron to create a app in /-- + * + * You should be able to launch the app on the platform you built for. If not, check your settings and try again. + * + * @param opts - Options to configure packaging. + * @param callback - Callback which is called when packaging is done or an error occured. + */ +declare function electronPackager(opts: electronPackager.Options, callback: electronPackager.finalCallback): void; + +declare namespace electronPackager { + /** + * Callback which is called when electron-packager is done. + * + * @param err - Contains errors if any. + * @param appPaths - Path(s) to the newly created application(s). + */ + type finalCallback = (err: Error, appPaths: string|string[]) => void; + + type ignoreFunction = (path: string) => boolean; + type onCompleteFn = (buildPath: string, electronVersion: string, platform: string, arch: string, callbackFn: () => void) => void; + type arch = "ia32" | "x64" | "armv7l" | "all"; + type packageManager = "npm" | "cnpm" | "yarn"; + type platform = "linux" | "win32" | "darwin" | "mas" | "all"; + + interface AsarOptions { + ordering?: string; + unpack?: string; + unpackDir?: string; + } + + interface ElectronDownloadOptions { + cache?: string; + mirror?: string; + quiet?: boolean; + strictSSL?: boolean; + } + + interface ElectronOsXSignOptions { + identity?: string; + entitlements?: string; + "entitlements-inherit"?: string; + } + + /** + * Object (also known as a "hash") of application metadata to embed into the executable + */ + interface Win32Metadata { + CompanyName?: string; + FileDescription?: string; + OriginalFilename?: string; + ProductName?: string; + InternalName?: string; + "requested-execution-level": any; + "application-manifest": any; + } + /** Electron-packager Options. */ - export interface Options { + interface Options { /** The source directory. */ dir: string; - /** The application name. */ - name: string; /** - * Allowed values: linux, win32, darwin, all. Not required if `all` is used. - * Arbitrary combinations of individual platforms are also supported via a comma-delimited string or array of strings. + * Optional list of methods to call on completion of each process */ - platform?: string | string[]; - /** Allowed values: ia32, x64, all Not required if `all` is used. */ - arch?: string; - /** Electron version (without the "v"). See https://github.com/atom/electron/releases. */ - version: string; - + afterCopy?: onCompleteFn[]; + afterExtract?: onCompleteFn[]; + afterPrune?: onCompleteFn[]; /** Shortcut for `--arch=all --platform=all`. */ all?: boolean; + /** + * The human-readable copyright line for the app. Maps to the LegalCopyright metadata property on Windows, and NSHumanReadableCopyright on OS X. + */ + appCopyright?: string; + /** + * The release version of the application. By default the version property in the package.json is used but it can be overridden with this argument. + * If neither are provided, the version of Electron will be used. Maps to the ProductVersion metadata property on Windows, and CFBundleShortVersionString on OS X. + */ + appVersion?: string; + /** + * The target system architecture(s) to build for. Not required if the all option is set. + * If arch is set to all, all supported architectures for the target platforms specified by platform will be built. + * Arbitrary combinations of individual architectures are also supported via a comma-delimited string or array of strings. + * The non-all values correspond to the architecture names used by Electron releases. This value is not restricted to the official set if download.mirror is set. + */ + arch?: arch; + /** + * Whether to package the application's source code into an archive, using Electron's archive format + */ + asar?: boolean | AsarOptions; + /** + * The build version of the application. Defaults to the value of appVersion. + * Maps to the FileVersion metadata property on Windows, and CFBundleVersion on OS X. + */ + buildVersion?: string; + /** + * Whether symlinks should be dereferenced during the copying of the application source. + */ + derefSymlinks?: boolean; + /** + * If present, passes custom options to electron-download + */ + download?: ElectronDownloadOptions; + /** + * The Electron version with which the app is built (without the leading 'v') - for example, 1.4.13 + */ + electronVersion?: string; + /** + * One or more files to be copied directly into the app's Contents/Resources directory for OS X target platforms, and the resources directory for other target platforms. + */ + extraResource?: string | string[]; + /** + * The local path to the icon file, if the target platform supports setting embedding an icon. + */ + icon?: string; + /** + * One or more additional regular expression patterns which specify which files to ignore when copying files to create the app bundle(s). + * The regular expressions are matched against the absolute path of a given file/directory to be copied. + */ + ignore?: RegExp | RegExp[] | ignoreFunction; + /** + * The application name. If omitted, it will use the productName or name value from the nearest package.json + */ + name?: string; /** The output directory. */ out?: string; /** - * Currently you must look for conversion tools in order to supply an icon in the format required by the platform: - * - OS X: `.icns` - * - Windows: `.ico` - * - * For Linux builds, this option is not required, as the dock/window list icon is set via the icon option in the BrowserWindow contructor. - * Setting the icon in the file manager is not currently supported. - * - * If the file extension is omitted, it is auto-completed to the correct extension based on the platform, - * including when `--platform=all` is in effect. + * Whether to replace an already existing output directory for a given platform (true) or skip recreating it (false). */ - icon?: string; - - /** The bundle identifier to use in the app plist. */ - "app-bundle-id"?: string; - /** The release version to set for the app. */ - "app-version"?: string; - /** The build version to set for the app (OS X only). */ - "build-version"?: string; - /** The bundle identifier to use in the app helper plist. */ - "helper-bundle-id"?: string; - /** Object hash of application metadata to embed into the executable (Windows only). */ - "version-string"?: VersionString; - - /** The directory of cached electron downloads. Defaults to "$HOME/.electron". */ - cache?: string; - /** Do not copy files into App whose filenames regex .match this string. */ - ignore?: RegExp; - /** Runs `npm prune --production` on the app. */ - prune?: boolean; - /** If output directory for a platform already exists, replaces it rather than skipping it. */ overwrite?: boolean; - /** Packages the source code within your app into an archive. */ - asar?: boolean; - /** Unpacks the files to app.asar.unpacked directory whose filenames regex .match this string. */ - "asar-unpack"?: string; - /** Should contain the identity to be used when running `codesign` (OS X only). */ - sign?: string; - } - - /** Object hash of application metadata to embed into the executable (Windows only). */ - export interface VersionString { - CompanyName?: string; - LegalCopyright?: string; - FileDescription?: string; - OriginalFilename?: string; - FileVersion?: string; - ProductVersion?: string; - ProductName?: string; - InternalName?: string; - } - - /** Electron-packager done callback. */ - export interface Callback { /** - * Callback which is called when electron-packager is done. - * - * @param err - Contains errors if any. - * @param appPath - Path(s) to the newly created application(s). + * The package manager used to prune devDependencies modules from the outputted Electron app */ - (err: Error, appPath: string|string[]): void - } - - /** Electron-packager function */ - export interface Packager { + packageManager?: packageManager; /** - * This will: - * - Find or download the correct release of Electron - * - Use that version of electron to create a app in /-- - * - * You should be able to launch the app on the platform you built for. If not, check your settings and try again. - * - * @param opts - Options to configure packaging. - * @param callback - Callback which is called when packaging is done or an error occured. + * The target platform(s) to build for. Not required if the all option is set. */ - (opts: Options, callback: Callback): void; + platform?: platform; + /** + * Runs the package manager command to remove all of the packages specified in the devDependencies section of package.json from the outputted Electron app. + */ + prune?: boolean; + /** + * If true, disables printing informational and warning messages to the console when packaging the application. This does not disable errors. + */ + quiet?: boolean; + /** + * The base directory to use as a temp directory. Set to false to disable use of a temporary directory. + */ + tmpdir?: string | false; + + /** + * OS X/Mac App Store targets only + */ + + /** + * The bundle identifier to use in the application's plist. + */ + appBundleId?: string; + /** + * The application category type, as shown in the Finder via View → Arrange by Application Category when viewing the Applications directory. + */ + appCategoryType?: string; + /** + * When the value is a String, the filename of a plist file. Its contents are added to the app's plist. + * When the value is an Object, an already-parsed plist data structure that is merged into the app's plist. + */ + extendInfo?: string | {[property: string]: any}; + /** + * The bundle identifier to use in the application helper's plist. + */ + helperBundleId?: string; + /** + * If present, signs OS X target apps when the host platform is OS X and XCode is installed. + */ + osxSign?: boolean | ElectronOsXSignOptions; + /** + * The URL protocol scheme(s) to associate the app with + */ + protocol?: string; + /** + * The descriptive name(s) of the URL protocol scheme(s) specified via the protocol option. + * Maps to the CFBundleURLName metadata property. + */ + protocolName?: string[]; + + /** + * Windows targets only + */ + + win32metadata?: Win32Metadata; } } - -declare module "electron-packager" { - const packager: ElectronPackager.Packager; - export = packager; -} - -interface NodeRequireFunction { - (id: "electron-packager"): ElectronPackager.Packager; -} diff --git a/types/electron-packager/tslint.json b/types/electron-packager/tslint.json new file mode 100644 index 0000000000..5d0b359e47 --- /dev/null +++ b/types/electron-packager/tslint.json @@ -0,0 +1,5 @@ +{ "extends": "dtslint/dt.json", + "rules": { + "no-conditional-assignment": false + } +} diff --git a/types/electron-settings/v2/electron-settings-tests.ts b/types/electron-settings/v2/electron-settings-tests.ts new file mode 100644 index 0000000000..25404c90b3 --- /dev/null +++ b/types/electron-settings/v2/electron-settings-tests.ts @@ -0,0 +1,123 @@ +import settings = require('electron-settings'); + +function test_configure() { + settings.configure({ + atomicSaving: false, + prettify: true + }) === undefined; +} + +function test_defaults() { + settings.defaults({ + a: 1, + b: '', + c: false, + d: { + d1: 'd1', + d2: true + }, + e: ['e1', 'e2'] + }) === undefined; +} + +async function test_has() { + await settings.has('a') === true; +} + +function test_hasSync() { + settings.hasSync('a') === true; +} + +async function test_get() { + await settings.get('b') === ''; +} + +function test_getSync() { + settings.getSync('b') === ''; +} + +async function test_set() { + await settings.set('c', true) === undefined; +} + +function test_setSync() { + settings.setSync('c', true) === undefined; +} + +async function test_delete() { + await settings.delete('d') === undefined; +} + +function test_deleteSync() { + settings.deleteSync('d') === undefined; +} + +async function test_clear() { + await settings.clear() === undefined; +} + +function test_clearSync() { + settings.clearSync() === undefined; +} + +async function test_applyDefaults() { + await settings.applyDefaults({ overwrite: true }) === undefined; +} + +function test_applyDefaultsSync() { + settings.applyDefaultsSync({ overwrite: true }) === undefined; +} + +async function test_resetToDefaults() { + await settings.resetToDefaults() === undefined; +} + +function test_resetToDefaultsSync() { + settings.resetToDefaultsSync() === undefined; +} + +function test_observe() { + const observer = settings.observe('b', evt => { + if (evt.oldValue !== evt.newValue) { + console.log(evt.newValue); + } + }); + + observer.dispose(); +} + +function test_getSettingsFilePath() { + settings.getSettingsFilePath() === __filename; +} + +function test_on_create() { + settings.on('create', pathToSettings => { + pathToSettings === __dirname; + }) === settings; +} + +function test_on_write() { + settings.on('write', () => { + console.log(); + }) === settings; +} + +function test_settings_type_annotation(s: typeof settings) { + s.getSettingsFilePath(); +} + +function test_observer_type_annotation(observer: settings.Observer) { + observer.dispose(); +} + +function test_options_type_annotation(options: settings.Options) { + options.atomicSaving; +} + +function test_applyDefaultOptions_type_annotation(options: settings.ApplyDefaultsOptions) { + options.overwrite; +} + +function test_changeEvent_type_annotation(e: settings.ChangeEvent) { + e.oldValue === e.newValue; +} diff --git a/types/electron-settings/v2/index.d.ts b/types/electron-settings/v2/index.d.ts new file mode 100644 index 0000000000..71677cb0df --- /dev/null +++ b/types/electron-settings/v2/index.d.ts @@ -0,0 +1,252 @@ +// Type definitions for electron-settings 2.2 +// Project: https://github.com/nathanbuchar/electron-settings +// Definitions by: Leonard Thieu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +import { EventEmitter } from 'events'; + +declare const SettingsInstance: Settings; +export = SettingsInstance; + +/** + * The Settings class. + */ +declare class Settings extends EventEmitter { + /** + * Globally configures default options. + * + * @throws if options is not an object. + */ + configure(options: ElectronSettings.Options.Param): void; + + /** + * Globally configures default settings. + * + * If the settings file has not been created yet, these defaults will be applied, + * but only if settings.defaults is called before making any other calls that + * interact with the file system, such as has(), get(), or set(). + * + * @param defaults The defaults object. + * @throws if defaults is not an object. + */ + defaults(defaults: any): void; + + /** + * Returns a promise whose first argument is a boolean indicating if the key path exists within the settings object. + * For synchronous operation, use hasSync(). + * + * @param keyPath The path to the key that we wish to check exists within the settings object. + * @throws if key path is not a string. + * @see hasSync + */ + has(keyPath: string): Promise; + + /** + * The synchronous version of has(). + * + * @see has + */ + hasSync(keyPath: string): boolean; + + /** + * Returns a promise whose first argument is the value at the chosen key path. + * If no key path is chosen, the entire settings object will be returned instead. + * For synchronous operation, use getSync(). + * + * @param keyPath The path to the key that we wish to get the value of. + * @see getSync + */ + get(keyPath?: string): Promise; + + /** + * The synchronous version of get(). + * + * @see get + */ + getSync(keyPath?: string): any; + + /** + * Sets the value of the key at the chosen key path. + * For synchronous operation, use setSync(). + * + * @param keyPath The path to the key whose value we wish to set. This key need not already exist. + * @param value The value to set the key at the chosen key path to. This must be a data type supported by JSON: object, array, string, number, boolean, or null. + * @param options + * @throws if key path is not a string. + * @throws if options is not an object. + * @see setSync + */ + set(keyPath: string, value: any, options?: ElectronSettings.Options.Param): Promise; + + /** + * The synchronous version of set(). + * + * @see set + */ + setSync(keyPath: string, value: any, options?: ElectronSettings.Options.Param): void; + + /** + * Deletes the key and value at the chosen key path. + * + * @param keyPath The path to the key we wish to unset. + * @param options + * @throws if keyPath is not a string. + * @throws if options is not an object. + * @see deleteSync + */ + delete(keyPath: string, options?: ElectronSettings.Options.Param): Promise; + + /** + * The synchronous version of delete(). + * + * @see delete + */ + deleteSync(keyPath: string, options?: ElectronSettings.Options.Param): void; + + /** + * Clears the entire settings object. + * For synchronous operation, use clearSync(). + * + * @throws if options is not an object. + * @see clearSync + */ + clear(options?: ElectronSettings.Options.Param): Promise; + + /** + * The synchronous version of clear(). + * + * @see clear + */ + clearSync(options?: ElectronSettings.Options.Param): void; + + /** + * Applies defaults to the current settings object (deep). + * Settings that already exist will not be overwritten, but keys that exist within the defaults + * that don't exist within the setting object will be added. + * To configure defaults, use defaults(). + * For synchronous operation, use applyDefaultsSync(). + * + * @throws if options is not an object. + * @see defaults + * @see applyDefaultsSync + */ + applyDefaults(options?: ElectronSettings.ApplyDefaultsOptions.Param): Promise; + + /** + * The synchronous version of applyDefaults(). + * + * @see applyDefaults + */ + applyDefaultsSync(options?: ElectronSettings.ApplyDefaultsOptions.Param): void; + + /** + * Resets all settings to defaults. + * To configure defaults, use defaults(). + * For synchronous operation, use resetToDefaultsSync(). + * + * @throws if options is not an object. + * @see defaults + * @see resetToDefaultsSync + */ + resetToDefaults(options?: ElectronSettings.Options.Param): Promise; + + /** + * The synchronous version of resetToDefaults(). + * + * @see resetToDefaults + */ + resetToDefaultsSync(options?: ElectronSettings.Options.Param): void; + + /** + * Observes the chosen key path for changes and calls the handler if the value changes. + * Returns an Observer instance which has a dispose method. + * To unsubscribe, simply call dispose() on the returned key path observer. + * + * @param keyPath The path to the key that we wish to observe. + * @param handler The callback that will be invoked if the value at the chosen key path changes. + * @throws if key path is not a string. + * @throws if handler is not a function. + */ + observe(keyPath: string, handler: (evt: ElectronSettings.ChangeEvent) => void): ElectronSettings.Observer; + + /** + * Returns the path to the config file. Typically found in your application's user data directory: + * ~/Library/Application Support/YourApp on MacOS. + * %APPDATA%/YourApp on Windows. + * $XDG_CONFIG_HOME/YourApp or ~/.config/YourApp on Linux. + */ + getSettingsFilePath(): string; + + /** + * Emitted when the settings file has been created. + */ + on(event: 'create', listener: (pathToSettings: string) => void): this; + /** + * Emitted when the settings have been written to disk. + */ + on(event: 'write', listener: () => void): this; +} + +declare namespace SettingsInstance { + type Observer = ElectronSettings.Observer; + type Options = ElectronSettings.Options; + type ApplyDefaultsOptions = ElectronSettings.ApplyDefaultsOptions; + type ChangeEvent = ElectronSettings.ChangeEvent; +} + +declare namespace ElectronSettings { + /** + * The Observer class. + */ + class Observer { + /** + * Disposes of the key path observer by unbinding the event listener and + * nullifying all internal references. + */ + dispose(): void; + } + + interface Options extends Pick { } + + namespace Options { + type Param = Options | object; + + interface _Impl { + /** + * Whether electron-settings should create a tmp file during save to ensure data-write consistency. + * + * @default true + */ + atomicSaving: boolean; + /** + * Prettify the JSON output. + * + * @default false + */ + prettify: boolean; + } + } + + interface ApplyDefaultsOptions extends Pick { } + + namespace ApplyDefaultsOptions { + type Param = ApplyDefaultsOptions | object; + + interface _Impl extends Options._Impl { + /** + * Overwrite pre-existing settings with their respective default values. + * + * @default false + */ + overwrite: boolean; + } + } + + interface ChangeEvent { + oldValue: any; + newValue: any; + } +} diff --git a/types/electron-settings/v2/tsconfig.json b/types/electron-settings/v2/tsconfig.json new file mode 100644 index 0000000000..3a5b7b152c --- /dev/null +++ b/types/electron-settings/v2/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "electron-settings": [ + "electron-settings/v2" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "electron-settings-tests.ts" + ] +} diff --git a/types/electron-settings/v2/tslint.json b/types/electron-settings/v2/tslint.json new file mode 100644 index 0000000000..4f44991c3c --- /dev/null +++ b/types/electron-settings/v2/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-empty-interface": false + } +} diff --git a/types/electron/.editorconfig b/types/electron/.editorconfig deleted file mode 100644 index 2d98d905de..0000000000 --- a/types/electron/.editorconfig +++ /dev/null @@ -1,2 +0,0 @@ -[*.ts] -indent_style = tab diff --git a/types/electron/index.d.ts b/types/electron/index.d.ts deleted file mode 100644 index 782a509305..0000000000 --- a/types/electron/index.d.ts +++ /dev/null @@ -1,6147 +0,0 @@ -// Type definitions for Electron v1.4.8 -// Project: http://electron.atom.io/ -// Definitions by: jedmao , rhysd , Milan Burda , aliib , Daniel Perez Alvarez , Markus Olsson -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare namespace Electron { - - interface Event { - preventDefault: Function; - sender: NodeJS.EventEmitter; - } - - type Point = { - x: number; - y: number; - } - - type Size = { - width: number; - height: number; - } - - type Rectangle = { - x: number; - y: number; - width: number; - height: number; - } - - interface Destroyable { - /** - * Destroys the object. - */ - destroy(): void; - /** - * @returns Whether the object is destroyed. - */ - isDestroyed(): boolean; - } - - // https://github.com/electron/electron/blob/master/docs/api/app.md - - type VibrancyType = 'appearance-based' | 'light' | 'dark' | 'titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'medium-light' | 'ultra-dark'; - - /** - * The app module is responsible for controlling the application's lifecycle. - */ - interface App extends NodeJS.EventEmitter { - /** - * Emitted when the application has finished basic startup. - * On Windows and Linux, the will-finish-launching event - * is the same as the ready event; on macOS, this event represents - * the applicationWillFinishLaunching notification of NSApplication. - * You would usually set up listeners for the open-file and open-url events here, - * and start the crash reporter and auto updater. - * - * In most cases, you should just do everything in the ready event handler. - */ - on(event: 'will-finish-launching', listener: Function): this; - /** - * Emitted when Electron has finished initialization. - */ - on(event: 'ready', listener: (event: Event, launchInfo: Object) => void): this; - /** - * Emitted when all windows have been closed. - * - * If you do not subscribe to this event and all windows are closed, - * the default behavior is to quit the app; however, if you subscribe, - * you control whether the app quits or not. - * If the user pressed Cmd + Q, or the developer called app.quit(), - * Electron will first try to close all the windows and then emit the will-quit event, - * and in this case the window-all-closed event would not be emitted. - */ - on(event: 'window-all-closed', listener: Function): this; - /** - * Emitted before the application starts closing its windows. - * Calling event.preventDefault() will prevent the default behaviour, which is terminating the application. - */ - on(event: 'before-quit', listener: (event: Event) => void): this; - /** - * Emitted when all windows have been closed and the application will quit. - * Calling event.preventDefault() will prevent the default behaviour, which is terminating the application. - */ - on(event: 'will-quit', listener: (event: Event) => void): this; - /** - * Emitted when the application is quitting. - */ - on(event: 'quit', listener: (event: Event, exitCode: number) => void): this; - /** - * Emitted when the user wants to open a file with the application. - * The open-file event is usually emitted when the application is already open - * and the OS wants to reuse the application to open the file. - * open-file is also emitted when a file is dropped onto the dock and the application - * is not yet running. Make sure to listen for the open-file event very early - * in your application startup to handle this case (even before the ready event is emitted). - * - * You should call event.preventDefault() if you want to handle this event. - * - * Note: This is only implemented on macOS. - */ - on(event: 'open-file', listener: (event: Event, url: string) => void): this; - /** - * Emitted when the user wants to open a URL with the application. - * The URL scheme must be registered to be opened by your application. - * - * You should call event.preventDefault() if you want to handle this event. - * - * Note: This is only implemented on macOS. - */ - on(event: 'open-url', listener: (event: Event, url: string) => void): this; - /** - * Emitted when the application is activated, which usually happens when clicks on the applications’s dock icon. - * Note: This is only implemented on macOS. - */ - on(event: 'activate', listener: Function): this; - /** - * Emitted during Handoff when an activity from a different device wants to be resumed. - * You should call event.preventDefault() if you want to handle this event. - */ - on(event: 'continue-activity', listener: (event: Event, type: string, userInfo: Object) => void): this; - /** - * Emitted when a browserWindow gets blurred. - */ - on(event: 'browser-window-blur', listener: (event: Event, browserWindow: BrowserWindow) => void): this; - /** - * Emitted when a browserWindow gets focused. - */ - on(event: 'browser-window-focus', listener: (event: Event, browserWindow: BrowserWindow) => void): this; - /** - * Emitted when a new browserWindow is created. - */ - on(event: 'browser-window-created', listener: (event: Event, browserWindow: BrowserWindow) => void): this; - /** - * Emitted when a new webContents is created. - */ - on(event: 'web-contents-created', listener: (event: Event, webContents: WebContents) => void): this; - /** - * Emitted when failed to verify the certificate for url, to trust the certificate - * you should prevent the default behavior with event.preventDefault() and call callback(true). - */ - on(event: 'certificate-error', listener: (event: Event, - webContents: WebContents, - url: string, - error: string, - certificate: Certificate, - callback: (trust: boolean) => void - ) => void): this; - /** - * Emitted when a client certificate is requested. - * - * The url corresponds to the navigation entry requesting the client certificate - * and callback needs to be called with an entry filtered from the list. - * Using event.preventDefault() prevents the application from using the first certificate from the store. - */ - on(event: 'select-client-certificate', listener: (event: Event, - webContents: WebContents, - url: string, - certificateList: Certificate[], - callback: (certificate: Certificate) => void - ) => void): this; - /** - * Emitted when webContents wants to do basic auth. - * - * The default behavior is to cancel all authentications, to override this - * you should prevent the default behavior with event.preventDefault() - * and call callback(username, password) with the credentials. - */ - on(event: 'login', listener: (event: Event, - webContents: WebContents, - request: LoginRequest, - authInfo: LoginAuthInfo, - callback: (username: string, password: string) => void - ) => void): this; - /** - * Emitted when the gpu process crashes. - */ - on(event: 'gpu-process-crashed', listener: (event: Event, killed: boolean) => void): this; - /** - * Emitted when Chrome's accessibility support changes. - * - * Note: This API is only available on macOS and Windows. - */ - on(event: 'accessibility-support-changed', listener: (event: Event, accessibilitySupportEnabled: boolean) => void): this; - on(event: string, listener: Function): this; - /** - * Try to close all windows. The before-quit event will first be emitted. - * If all windows are successfully closed, the will-quit event will be emitted - * and by default the application would be terminated. - * - * This method guarantees all beforeunload and unload handlers are correctly - * executed. It is possible that a window cancels the quitting by returning - * false in beforeunload handler. - */ - quit(): void; - /** - * Exits immediately with exitCode. - * All windows will be closed immediately without asking user - * and the before-quit and will-quit events will not be emitted. - */ - exit(exitCode?: number): void; - /** - * Relaunches the app when current instance exits. - * - * By default the new instance will use the same working directory - * and command line arguments with current instance. - * When args is specified, the args will be passed as command line arguments instead. - * When execPath is specified, the execPath will be executed for relaunch instead of current app. - * - * Note that this method does not quit the app when executed, you have to call app.quit - * or app.exit after calling app.relaunch to make the app restart. - * - * When app.relaunch is called for multiple times, multiple instances - * will be started after current instance exited. - */ - relaunch(options?: { - args?: string[], - execPath?: string - }): void; - /** - * @returns Whether Electron has finished initializing. - */ - isReady(): boolean; - /** - * On Linux, focuses on the first visible window. - * On macOS, makes the application the active app. - * On Windows, focuses on the application’s first window. - */ - focus(): void; - /** - * Hides all application windows without minimizing them. - * Note: This is only implemented on macOS. - */ - hide(): void; - /** - * Shows application windows after they were hidden. Does not automatically focus them. - * Note: This is only implemented on macOS. - */ - show(): void; - /** - * Returns the current application directory. - */ - getAppPath(): string; - /** - * @returns The path to a special directory or file associated with name. - * On failure an Error would throw. - */ - getPath(name: AppPathName): string; - /** - * Overrides the path to a special directory or file associated with name. - * If the path specifies a directory that does not exist, the directory will - * be created by this method. On failure an Error would throw. - * - * You can only override paths of names defined in app.getPath. - * - * By default web pages' cookies and caches will be stored under userData - * directory, if you want to change this location, you have to override the - * userData path before the ready event of app module gets emitted. - */ - setPath(name: AppPathName, path: string): void; - /** - * @returns The version of loaded application, if no version is found in - * application's package.json, the version of current bundle or executable. - */ - getVersion(): string; - /** - * @returns The current application's name, the name in package.json would be used. - * Usually the name field of package.json is a short lowercased name, according to - * the spec of npm modules. So usually you should also specify a productName field, - * which is your application's full capitalized name, and it will be preferred over - * name by Electron. - */ - getName(): string; - /** - * Overrides the current application's name. - */ - setName(name: string): void; - /** - * @returns The current application locale. - */ - getLocale(): string; - /** - * Adds path to recent documents list. - * - * This list is managed by the system, on Windows you can visit the list from - * task bar, and on macOS you can visit it from dock menu. - * - * Note: This is only implemented on macOS and Windows. - */ - addRecentDocument(path: string): void; - /** - * Clears the recent documents list. - * - * Note: This is only implemented on macOS and Windows. - */ - clearRecentDocuments(): void; - /** - * Sets the current executable as the default handler for a protocol (aka URI scheme). - * Once registered, all links with your-protocol:// will be opened with the current executable. - * The whole link, including protocol, will be passed to your application as a parameter. - * - * On Windows you can provide optional parameters path, the path to your executable, - * and args, an array of arguments to be passed to your executable when it launches. - * - * @param protocol The name of your protocol, without ://. - * @param path Defaults to process.execPath. - * @param args Defaults to an empty array. - * - * Note: This is only implemented on macOS and Windows. - * On macOS, you can only register protocols that have been added to your app's info.plist. - */ - setAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; - /** - * Removes the current executable as the default handler for a protocol (aka URI scheme). - * - * @param protocol The name of your protocol, without ://. - * @param path Defaults to process.execPath. - * @param args Defaults to an empty array. - * - * Note: This is only implemented on macOS and Windows. - */ - removeAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; - /** - * @param protocol The name of your protocol, without ://. - * @param path Defaults to process.execPath. - * @param args Defaults to an empty array. - * - * @returns Whether the current executable is the default handler for a protocol (aka URI scheme). - * - * Note: This is only implemented on macOS and Windows. - */ - isDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; - /** - * Adds tasks to the Tasks category of JumpList on Windows. - * - * Note: This API is only available on Windows. - */ - setUserTasks(tasks: Task[]): boolean; - /** - * Note: This API is only available on Windows. - */ - getJumpListSettings(): JumpListSettings; - /** - * Sets or removes a custom Jump List for the application. - * - * If categories is null the previously set custom Jump List (if any) will be replaced - * by the standard Jump List for the app (managed by Windows). - * - * Note: This API is only available on Windows. - */ - setJumpList(categories: JumpListCategory[]): SetJumpListResult; - /** - * This method makes your application a Single Instance Application instead of allowing - * multiple instances of your app to run, this will ensure that only a single instance - * of your app is running, and other instances signal this instance and exit. - */ - makeSingleInstance(callback: (args: string[], workingDirectory: string) => void): boolean; - /** - * Releases all locks that were created by makeSingleInstance. This will allow - * multiple instances of the application to once again run side by side. - */ - releaseSingleInstance(): void; - /** - * Creates an NSUserActivity and sets it as the current activity. - * The activity is eligible for Handoff to another device afterward. - * - * @param type Uniquely identifies the activity. Maps to NSUserActivity.activityType. - * @param userInfo App-specific state to store for use by another device. - * @param webpageURL The webpage to load in a browser if no suitable app is - * installed on the resuming device. The scheme must be http or https. - * - * Note: This API is only available on macOS. - */ - setUserActivity(type: string, userInfo: Object, webpageURL?: string): void; - /** - * @returns The type of the currently running activity. - * - * Note: This API is only available on macOS. - */ - getCurrentActivityType(): string; - /** - * Changes the Application User Model ID to id. - * - * Note: This is only implemented on Windows. - */ - setAppUserModelId(id: string): void; - /** - * Imports the certificate in pkcs12 format into the platform certificate store. - * @param callback Called with the result of import operation, a value of 0 indicates success - * while any other value indicates failure according to chromium net_error_list. - * - * Note: This API is only available on Linux. - */ - importCertificate(options: ImportCertificateOptions, callback: (result: number) => void): void; - /** - * Disables hardware acceleration for current app. - * This method can only be called before app is ready. - */ - disableHardwareAcceleration(): void; - /** - * Sets the counter badge for current app. Setting the count to 0 will hide the badge. - * - * @returns True when the call succeeded, otherwise returns false. - * - * Note: This API is only available on macOS and Linux. - */ - setBadgeCount(count: number): boolean; - /** - * @returns The current value displayed in the counter badge. - * - * Note: This API is only available on macOS and Linux. - */ - getBadgeCount(): number; - /** - * @returns whether current desktop environment is Unity launcher. (Linux) - * - * Note: This API is only available on Linux. - */ - isUnityRunning(): boolean; - /** - * Returns a Boolean, true if Chrome's accessibility support is enabled, false otherwise. - * This API will return true if the use of assistive technologies, such as screen readers, - * has been detected. - * See https://www.chromium.org/developers/design-documents/accessibility for more details. - * - * Note: This API is only available on macOS and Windows. - */ - isAccessibilitySupportEnabled(): boolean; - /** - * @returns an Object with the login item settings of the app. - * - * Note: This API is only available on macOS and Windows. - */ - getLoginItemSettings(): LoginItemSettings; - /** - * Set the app's login item settings. - * - * Note: This API is only available on macOS and Windows. - */ - setLoginItemSettings(settings: LoginItemSettings): void; - /** - * Set the about panel options. This will override the values defined in the app's .plist file. - * See the Apple docs for more details. - * - * Note: This API is only available on macOS. - */ - setAboutPanelOptions(options: AboutPanelOptions): void; - commandLine: CommandLine; - /** - * Note: This API is only available on macOS. - */ - dock: Dock; - } - - type AppPathName = 'home'|'appData'|'userData'|'temp'|'exe'|'module'|'desktop'|'documents'|'downloads'|'music'|'pictures'|'videos'|'pepperFlashSystemPlugin'; - - interface ImportCertificateOptions { - /** - * Path for the pkcs12 file. - */ - certificate: string; - /** - * Passphrase for the certificate. - */ - password: string; - } - - interface CommandLine { - /** - * Append a switch [with optional value] to Chromium's command line. - * - * Note: This will not affect process.argv, and is mainly used by developers - * to control some low-level Chromium behaviors. - */ - appendSwitch(_switch: string, value?: string): void; - /** - * Append an argument to Chromium's command line. The argument will quoted properly. - * - * Note: This will not affect process.argv. - */ - appendArgument(value: string): void; - } - - interface Dock { - /** - * When critical is passed, the dock icon will bounce until either the - * application becomes active or the request is canceled. - * - * When informational is passed, the dock icon will bounce for one second. - * However, the request remains active until either the application becomes - * active or the request is canceled. - * - * @param type The default is informational. - * @returns An ID representing the request. - */ - bounce(type?: 'critical' | 'informational'): number; - /** - * Cancel the bounce of id. - * - * Note: This API is only available on macOS. - */ - cancelBounce(id: number): void; - /** - * Bounces the Downloads stack if the filePath is inside the Downloads folder. - * - * Note: This API is only available on macOS. - */ - downloadFinished(filePath: string): void; - /** - * Sets the string to be displayed in the dock’s badging area. - * - * Note: This API is only available on macOS. - */ - setBadge(text: string): void; - /** - * Returns the badge string of the dock. - * - * Note: This API is only available on macOS. - */ - getBadge(): string; - /** - * Hides the dock icon. - * - * Note: This API is only available on macOS. - */ - hide(): void; - /** - * Shows the dock icon. - * - * Note: This API is only available on macOS. - */ - show(): void; - /** - * @returns Whether the dock icon is visible. - * The app.dock.show() call is asynchronous so this method might not return true immediately after that call. - * - * Note: This API is only available on macOS. - */ - isVisible(): boolean; - /** - * Sets the application dock menu. - * - * Note: This API is only available on macOS. - */ - setMenu(menu: Menu): void; - /** - * Sets the image associated with this dock icon. - * - * Note: This API is only available on macOS. - */ - setIcon(icon: NativeImage | string): void; - } - - interface Task { - /** - * Path of the program to execute, usually you should specify process.execPath - * which opens current program. - */ - program: string; - /** - * The arguments of command line when program is executed. - */ - arguments: string; - /** - * The string to be displayed in a JumpList. - */ - title: string; - /** - * Description of this task. - */ - description?: string; - /** - * The absolute path to an icon to be displayed in a JumpList, it can be - * arbitrary resource file that contains an icon, usually you can specify - * process.execPath to show the icon of the program. - */ - iconPath: string; - /** - * The icon index in the icon file. If an icon file consists of two or more - * icons, set this value to identify the icon. If an icon file consists of - * one icon, this value is 0. - */ - iconIndex?: number; - } - - /** - * ok - Nothing went wrong. - * error - One or more errors occured, enable runtime logging to figure out the likely cause. - * invalidSeparatorError - An attempt was made to add a separator to a custom category in the Jump List. - * Separators are only allowed in the standard Tasks category. - * fileTypeRegistrationError - An attempt was made to add a file link to the Jump List - * for a file type the app isn't registered to handle. - * customCategoryAccessDeniedError - Custom categories can't be added to the Jump List - * due to user privacy or group policy settings. - */ - type SetJumpListResult = 'ok' | 'error' | 'invalidSeparatorError' | 'fileTypeRegistrationError' | 'customCategoryAccessDeniedError'; - - interface JumpListSettings { - /** - * The minimum number of items that will be shown in the Jump List. - */ - minItems: number; - /** - * Items that the user has explicitly removed from custom categories in the Jump List. - */ - removedItems: JumpListItem[]; - } - - interface JumpListCategory { - /** - * tasks - Items in this category will be placed into the standard Tasks category. - * frequent - Displays a list of files frequently opened by the app, the name of the category and its items are set by Windows. - * recent - Displays a list of files recently opened by the app, the name of the category and its items are set by Windows. - * custom - Displays tasks or file links, name must be set by the app. - */ - type?: 'tasks' | 'frequent' | 'recent' | 'custom'; - /** - * Must be set if type is custom, otherwise it should be omitted. - */ - name?: string; - /** - * Array of JumpListItem objects if type is tasks or custom, otherwise it should be omitted. - */ - items?: JumpListItem[]; - } - - interface JumpListItem { - /** - * task - A task will launch an app with specific arguments. - * separator - Can be used to separate items in the standard Tasks category. - * file - A file link will open a file using the app that created the Jump List. - */ - type: 'task' | 'separator' | 'file'; - /** - * Path of the file to open, should only be set if type is file. - */ - path?: string; - /** - * Path of the program to execute, usually you should specify process.execPath which opens the current program. - * Should only be set if type is task. - */ - program?: string; - /** - * The command line arguments when program is executed. Should only be set if type is task. - */ - args?: string; - /** - * The text to be displayed for the item in the Jump List. Should only be set if type is task. - */ - title?: string; - /** - * Description of the task (displayed in a tooltip). Should only be set if type is task. - */ - description?: string; - /** - * The absolute path to an icon to be displayed in a Jump List, which can be an arbitrary - * resource file that contains an icon (e.g. .ico, .exe, .dll). - * You can usually specify process.execPath to show the program icon. - */ - iconPath?: string; - /** - * The index of the icon in the resource file. If a resource file contains multiple icons - * this value can be used to specify the zero-based index of the icon that should be displayed - * for this task. If a resource file contains only one icon, this property should be set to zero. - */ - iconIndex?: number; - } - - interface LoginItemSettings { - /** - * True if the app is set to open at login. - */ - openAtLogin: boolean; - /** - * True if the app is set to open as hidden at login. This setting is only supported on macOS. - */ - openAsHidden: boolean; - /** - * True if the app was opened at login automatically. This setting is only supported on macOS. - */ - wasOpenedAtLogin?: boolean; - /** - * True if the app was opened as a hidden login item. This indicates that the app should not - * open any windows at startup. This setting is only supported on macOS. - */ - wasOpenedAsHidden?: boolean; - /** - * True if the app was opened as a login item that should restore the state from the previous session. - * This indicates that the app should restore the windows that were open the last time the app was closed. - * This setting is only supported on macOS. - */ - restoreState?: boolean; - } - - interface AboutPanelOptions { - /** - * The app's name. - */ - applicationName?: string; - /** - * The app's version. - */ - applicationVersion?: string; - /** - * Copyright information. - */ - copyright?: string; - /** - * Credit information. - */ - credits?: string; - /** - * The app's build version number. - */ - version?: string; - } - - // https://github.com/electron/electron/blob/master/docs/api/auto-updater.md - - /** - * This module provides an interface for the Squirrel auto-updater framework. - */ - interface AutoUpdater extends NodeJS.EventEmitter { - /** - * Emitted when there is an error while updating. - */ - on(event: 'error', listener: (error: Error) => void): this; - /** - * Emitted when checking if an update has started. - */ - on(event: 'checking-for-update', listener: Function): this; - /** - * Emitted when there is an available update. The update is downloaded automatically. - */ - on(event: 'update-available', listener: Function): this; - /** - * Emitted when there is no available update. - */ - on(event: 'update-not-available', listener: Function): this; - /** - * Emitted when an update has been downloaded. - * Note: On Windows only releaseName is available. - */ - on(event: 'update-downloaded', listener: (event: Event, releaseNotes: string, releaseName: string, releaseDate: Date, updateURL: string) => void): this; - on(event: string, listener: Function): this; - /** - * Set the url and initialize the auto updater. - */ - setFeedURL(url: string, requestHeaders?: Headers): void; - /** - * @returns The current update feed URL. - */ - getFeedURL(): string; - /** - * Ask the server whether there is an update, you have to call setFeedURL - * before using this API - */ - checkForUpdates(): void; - /** - * Restarts the app and installs the update after it has been downloaded. - * It should only be called after update-downloaded has been emitted. - */ - quitAndInstall(): void; - } - - // https://github.com/electron/electron/blob/master/docs/api/browser-window.md - - /** - * The BrowserWindow class gives you ability to create a browser window. - * You can also create a window without chrome by using Frameless Window API. - */ - class BrowserWindow extends NodeJS.EventEmitter implements Destroyable { - /** - * Emitted when the document changed its title, - * calling event.preventDefault() would prevent the native window’s title to change. - */ - on(event: 'page-title-updated', listener: (event: Event, title: string) => void): this; - /** - * Emitted when the window is going to be closed. It’s emitted before the beforeunload - * and unload event of the DOM. Calling event.preventDefault() will cancel the close. - */ - on(event: 'close', listener: (event: Event) => void): this; - /** - * Emitted when the window is closed. After you have received this event - * you should remove the reference to the window and avoid using it anymore. - */ - on(event: 'closed', listener: Function): this; - /** - * Emitted when the web page becomes unresponsive. - */ - on(event: 'unresponsive', listener: Function): this; - /** - * Emitted when the unresponsive web page becomes responsive again. - */ - on(event: 'responsive', listener: Function): this; - /** - * Emitted when the window loses focus. - */ - on(event: 'blur', listener: Function): this; - /** - * Emitted when the window gains focus. - */ - on(event: 'focus', listener: Function): this; - /** - * Emitted when the window is shown. - */ - on(event: 'show', listener: Function): this; - /** - * Emitted when the window is hidden. - */ - on(event: 'hide', listener: Function): this; - /** - * Emitted when the web page has been rendered and window can be displayed without visual flash. - */ - on(event: 'ready-to-show', listener: Function): this; - /** - * Emitted when window is maximized. - */ - on(event: 'maximize', listener: Function): this; - /** - * Emitted when the window exits from maximized state. - */ - on(event: 'unmaximize', listener: Function): this; - /** - * Emitted when the window is minimized. - */ - on(event: 'minimize', listener: Function): this; - /** - * Emitted when the window is restored from minimized state. - */ - on(event: 'restore', listener: Function): this; - /** - * Emitted when the window is getting resized. - */ - on(event: 'resize', listener: Function): this; - /** - * Emitted when the window is getting moved to a new position. - */ - on(event: 'move', listener: Function): this; - /** - * Emitted when the window enters full screen state. - */ - on(event: 'enter-full-screen', listener: Function): this; - /** - * Emitted when the window leaves full screen state. - */ - on(event: 'leave-full-screen', listener: Function): this; - /** - * Emitted when the window enters full screen state triggered by HTML API. - */ - on(event: 'enter-html-full-screen', listener: Function): this; - /** - * Emitted when the window leaves full screen state triggered by HTML API. - */ - on(event: 'leave-html-full-screen', listener: Function): this; - /** - * Emitted when an App Command is invoked. These are typically related - * to keyboard media keys or browser commands, as well as the "Back" / - * "Forward" buttons built into some mice on Windows. - * Note: This is only implemented on Windows. - */ - on(event: 'app-command', listener: (event: Event, command: string) => void): this; - /** - * Emitted when scroll wheel event phase has begun. - * Note: This is only implemented on macOS. - */ - on(event: 'scroll-touch-begin', listener: Function): this; - /** - * Emitted when scroll wheel event phase has ended. - * Note: This is only implemented on macOS. - */ - on(event: 'scroll-touch-end', listener: Function): this; - /** - * Emitted when scroll wheel event phase filed upon reaching the edge of element. - * Note: This is only implemented on macOS. - */ - on(event: 'scroll-touch-edge', listener: Function): this; - /** - * Emitted on 3-finger swipe. - * Note: This is only implemented on macOS. - */ - on(event: 'swipe', listener: (event: Event, direction: SwipeDirection) => void): this; - on(event: string, listener: Function): this; - /** - * Creates a new BrowserWindow with native properties as set by the options. - */ - constructor(options?: BrowserWindowOptions); - /** - * @returns All opened browser windows. - */ - static getAllWindows(): BrowserWindow[]; - /** - * @returns The window that is focused in this application. - */ - static getFocusedWindow(): BrowserWindow; - /** - * Find a window according to the webContents it owns. - */ - static fromWebContents(webContents: WebContents): BrowserWindow; - /** - * Find a window according to its ID. - */ - static fromId(id: number): BrowserWindow; - /** - * Adds devtools extension located at path. The extension will be remembered - * so you only need to call this API once, this API is not for programming use. - * @returns The extension's name. - * - * Note: This API cannot be called before the ready event of the app module is emitted. - */ - static addDevToolsExtension(path: string): string; - /** - * Remove a devtools extension. - * @param name The name of the devtools extension to remove. - * - * Note: This API cannot be called before the ready event of the app module is emitted. - */ - static removeDevToolsExtension(name: string): void; - /** - * @returns devtools extensions. - * - * Note: This API cannot be called before the ready event of the app module is emitted. - */ - static getDevToolsExtensions(): DevToolsExtensions; - /** - * The WebContents object this window owns, all web page related events and - * operations would be done via it. - * Note: Users should never store this object because it may become null when - * the renderer process (web page) has crashed. - */ - webContents: WebContents; - /** - * Get the unique ID of this window. - */ - id: number; - /** - * Force closing the window, the unload and beforeunload event won't be emitted - * for the web page, and close event would also not be emitted for this window, - * but it would guarantee the closed event to be emitted. - * You should only use this method when the renderer process (web page) has crashed. - */ - destroy(): void; - /** - * Try to close the window, this has the same effect with user manually clicking - * the close button of the window. The web page may cancel the close though, - * see the close event. - */ - close(): void; - /** - * Focus on the window. - */ - focus(): void; - /** - * Remove focus on the window. - */ - blur(): void; - /** - * @returns Whether the window is focused. - */ - isFocused(): boolean; - /** - * @returns Whether the window is destroyed. - */ - isDestroyed(): boolean; - /** - * Shows and gives focus to the window. - */ - show(): void; - /** - * Shows the window but doesn't focus on it. - */ - showInactive(): void; - /** - * Hides the window. - */ - hide(): void; - /** - * @returns Whether the window is visible to the user. - */ - isVisible(): boolean; - /** - * @returns Whether the window is a modal window. - */ - isModal(): boolean; - /** - * Maximizes the window. - */ - maximize(): void; - /** - * Unmaximizes the window. - */ - unmaximize(): void; - /** - * @returns Whether the window is maximized. - */ - isMaximized(): boolean; - /** - * Minimizes the window. On some platforms the minimized window will be - * shown in the Dock. - */ - minimize(): void; - /** - * Restores the window from minimized state to its previous state. - */ - restore(): void; - /** - * @returns Whether the window is minimized. - */ - isMinimized(): boolean; - /** - * Sets whether the window should be in fullscreen mode. - */ - setFullScreen(flag: boolean): void; - /** - * @returns Whether the window is in fullscreen mode. - */ - isFullScreen(): boolean; - /** - * This will have a window maintain an aspect ratio. - * The extra size allows a developer to have space, specified in pixels, - * not included within the aspect ratio calculations. - * This API already takes into account the difference between a window’s size and its content size. - * - * Note: This API is available only on macOS. - */ - setAspectRatio(aspectRatio: number, extraSize?: Size): void; - /** - * Uses Quick Look to preview a file at a given path. - * - * @param path The absolute path to the file to preview with QuickLook. - * @param displayName The name of the file to display on the Quick Look modal view. - * Note: This API is available only on macOS. - */ - previewFile(path: string, displayName?: string): void; - /** - * Resizes and moves the window to width, height, x, y. - */ - setBounds(options: Rectangle, animate?: boolean): void; - /** - * @returns The window's width, height, x and y values. - */ - getBounds(): Rectangle; - /** - * Resizes and moves the window's client area (e.g. the web page) to width, height, x, y. - */ - setContentBounds(options: Rectangle, animate?: boolean): void; - /** - * @returns The window's client area (e.g. the web page) width, height, x and y values. - */ - getContentBounds(): Rectangle; - /** - * Resizes the window to width and height. - */ - setSize(width: number, height: number, animate?: boolean): void; - /** - * @returns The window's width and height. - */ - getSize(): number[]; - /** - * Resizes the window's client area (e.g. the web page) to width and height. - */ - setContentSize(width: number, height: number, animate?: boolean): void; - /** - * @returns The window's client area's width and height. - */ - getContentSize(): number[]; - /** - * Sets the minimum size of window to width and height. - */ - setMinimumSize(width: number, height: number): void; - /** - * @returns The window's minimum width and height. - */ - getMinimumSize(): number[]; - /** - * Sets the maximum size of window to width and height. - */ - setMaximumSize(width: number, height: number): void; - /** - * @returns The window's maximum width and height. - */ - getMaximumSize(): number[]; - /** - * Sets whether the window can be manually resized by user. - */ - setResizable(resizable: boolean): void; - /** - * @returns Whether the window can be manually resized by user. - */ - isResizable(): boolean; - /** - * Sets whether the window can be moved by user. On Linux does nothing. - * Note: This API is available only on macOS and Windows. - */ - setMovable(movable: boolean): void; - /** - * Note: This API is available only on macOS and Windows. - * @returns Whether the window can be moved by user. On Linux always returns true. - */ - isMovable(): boolean; - /** - * Sets whether the window can be manually minimized by user. On Linux does nothing. - * Note: This API is available only on macOS and Windows. - */ - setMinimizable(minimizable: boolean): void; - /** - * Note: This API is available only on macOS and Windows. - * @returns Whether the window can be manually minimized by user. On Linux always returns true. - */ - isMinimizable(): boolean; - /** - * Sets whether the window can be manually maximized by user. On Linux does nothing. - * Note: This API is available only on macOS and Windows. - */ - setMaximizable(maximizable: boolean): void; - /** - * Note: This API is available only on macOS and Windows. - * @returns Whether the window can be manually maximized by user. On Linux always returns true. - */ - isMaximizable(): boolean; - /** - * Sets whether the maximize/zoom window button toggles fullscreen mode or maximizes the window. - */ - setFullScreenable(fullscreenable: boolean): void; - /** - * @returns Whether the maximize/zoom window button toggles fullscreen mode or maximizes the window. - */ - isFullScreenable(): boolean; - /** - * Sets whether the window can be manually closed by user. On Linux does nothing. - * Note: This API is available only on macOS and Windows. - */ - setClosable(closable: boolean): void; - /** - * Note: This API is available only on macOS and Windows. - * @returns Whether the window can be manually closed by user. On Linux always returns true. - */ - isClosable(): boolean; - /** - * Sets whether the window should show always on top of other windows. After - * setting this, the window is still a normal window, not a toolbox window - * which can not be focused on. - */ - setAlwaysOnTop(flag: boolean, level?: WindowLevel): void; - /** - * @returns Whether the window is always on top of other windows. - */ - isAlwaysOnTop(): boolean; - /** - * Moves window to the center of the screen. - */ - center(): void; - /** - * Moves window to x and y. - */ - setPosition(x: number, y: number, animate?: boolean): void; - /** - * @returns The window's current position. - */ - getPosition(): number[]; - /** - * Changes the title of native window to title. - */ - setTitle(title: string): void; - /** - * Note: The title of web page can be different from the title of the native window. - * @returns The title of the native window. - */ - getTitle(): string; - /** - * Changes the attachment point for sheets on macOS. - * Note: This API is available only on macOS. - */ - setSheetOffset(offsetY: number, offsetX?: number): void; - /** - * Starts or stops flashing the window to attract user's attention. - */ - flashFrame(flag: boolean): void; - /** - * Makes the window do not show in Taskbar. - */ - setSkipTaskbar(skip: boolean): void; - /** - * Enters or leaves the kiosk mode. - */ - setKiosk(flag: boolean): void; - /** - * @returns Whether the window is in kiosk mode. - */ - isKiosk(): boolean; - /** - * The native type of the handle is HWND on Windows, NSView* on macOS, - * and Window (unsigned long) on Linux. - * @returns The platform-specific handle of the window as Buffer. - */ - getNativeWindowHandle(): Buffer; - /** - * Hooks a windows message. The callback is called when the message is received in the WndProc. - * Note: This API is available only on Windows. - */ - hookWindowMessage(message: number, callback: Function): void; - /** - * @returns Whether the message is hooked. - */ - isWindowMessageHooked(message: number): boolean; - /** - * Unhook the window message. - */ - unhookWindowMessage(message: number): void; - /** - * Unhooks all of the window messages. - */ - unhookAllWindowMessages(): void; - /** - * Sets the pathname of the file the window represents, and the icon of the - * file will show in window's title bar. - * Note: This API is available only on macOS. - */ - setRepresentedFilename(filename: string): void; - /** - * Note: This API is available only on macOS. - * @returns The pathname of the file the window represents. - */ - getRepresentedFilename(): string; - /** - * Specifies whether the window’s document has been edited, and the icon in - * title bar will become grey when set to true. - * Note: This API is available only on macOS. - */ - setDocumentEdited(edited: boolean): void; - /** - * Note: This API is available only on macOS. - * @returns Whether the window's document has been edited. - */ - isDocumentEdited(): boolean; - focusOnWebView(): void; - blurWebView(): void; - /** - * Captures the snapshot of page within rect, upon completion the callback - * will be called. Omitting the rect would capture the whole visible page. - * Note: Be sure to read documents on remote buffer in remote if you are going - * to use this API in renderer process. - * @param callback Supplies the image that stores data of the snapshot. - */ - capturePage(rect: Rectangle, callback: (image: NativeImage) => void): void; - /** - * Captures the snapshot of page within rect, upon completion the callback - * will be called. Omitting the rect would capture the whole visible page. - * Note: Be sure to read documents on remote buffer in remote if you are going - * to use this API in renderer process. - * @param callback Supplies the image that stores data of the snapshot. - */ - capturePage(callback: (image: NativeImage) => void): void; - /** - * Same as webContents.loadURL(url). - */ - loadURL(url: string, options?: LoadURLOptions): void; - /** - * Same as webContents.reload. - */ - reload(): void; - /** - * Sets the menu as the window top menu. - * Note: This API is not available on macOS. - */ - setMenu(menu: Menu | null): void; - /** - * Sets the progress value in the progress bar. - * On Linux platform, only supports Unity desktop environment, you need to - * specify the *.desktop file name to desktopName field in package.json. - * By default, it will assume app.getName().desktop. - * @param progress Valid range is [0, 1.0]. If < 0, the progress bar is removed. - * If greater than 0, it becomes indeterminate. - */ - setProgressBar(progress: number, options?: { - /** - * Mode for the progress bar. - * Note: This is only implemented on Windows. - */ - mode: 'none' | 'normal' | 'indeterminate' | 'error' | 'paused' - }): void; - /** - * Sets a 16px overlay onto the current Taskbar icon, usually used to convey - * some sort of application status or to passively notify the user. - * Note: This API is only available on Windows 7 or above. - * @param overlay The icon to display on the bottom right corner of the Taskbar - * icon. If this parameter is null, the overlay is cleared - * @param description Provided to Accessibility screen readers. - */ - setOverlayIcon(overlay: NativeImage, description: string): void; - /** - * Sets whether the window should have a shadow. On Windows and Linux does nothing. - * Note: This API is available only on macOS. - */ - setHasShadow(hasShadow: boolean): void; - /** - * Note: This API is available only on macOS. - * @returns whether the window has a shadow. On Windows and Linux always returns true. - */ - hasShadow(): boolean; - /** - * Add a thumbnail toolbar with a specified set of buttons to the thumbnail image - * of a window in a taskbar button layout. - * @returns Whether the thumbnail has been added successfully. - * - * Note: This API is available only on Windows. - */ - setThumbarButtons(buttons: ThumbarButton[]): boolean; - /** - * Sets the region of the window to show as the thumbnail image displayed when hovering - * over the window in the taskbar. You can reset the thumbnail to be the entire window - * by specifying an empty region: {x: 0, y: 0, width: 0, height: 0}. - * - * Note: This API is available only on Windows. - */ - setThumbnailClip(region: Rectangle): boolean; - /** - * Sets the toolTip that is displayed when hovering over the window thumbnail in the taskbar. - * Note: This API is available only on Windows. - */ - setThumbnailToolTip(toolTip: string): boolean; - /** - * Same as webContents.showDefinitionForSelection(). - * Note: This API is available only on macOS. - */ - showDefinitionForSelection(): void; - /** - * Changes window icon. - * Note: This API is not available on macOS. - */ - setIcon(icon: NativeImage): void; - /** - * Sets whether the window menu bar should hide itself automatically. Once set - * the menu bar will only show when users press the single Alt key. - * If the menu bar is already visible, calling setAutoHideMenuBar(true) won't - * hide it immediately. - */ - setAutoHideMenuBar(hide: boolean): void; - /** - * @returns Whether menu bar automatically hides itself. - */ - isMenuBarAutoHide(): boolean; - /** - * Sets whether the menu bar should be visible. If the menu bar is auto-hide, - * users can still bring up the menu bar by pressing the single Alt key. - */ - setMenuBarVisibility(visibile: boolean): void; - /** - * @returns Whether the menu bar is visible. - */ - isMenuBarVisible(): boolean; - /** - * Sets whether the window should be visible on all workspaces. - * Note: This API does nothing on Windows. - */ - setVisibleOnAllWorkspaces(visible: boolean): void; - /** - * Note: This API always returns false on Windows. - * @returns Whether the window is visible on all workspaces. - */ - isVisibleOnAllWorkspaces(): boolean; - /** - * Makes the window ignore all mouse events. - * - * All mouse events happened in this window will be passed to the window below this window, - * but if this window has focus, it will still receive keyboard events. - */ - setIgnoreMouseEvents(ignore: boolean): void; - /** - * Prevents the window contents from being captured by other apps. - * - * On macOS it sets the NSWindow's sharingType to NSWindowSharingNone. - * On Windows it calls SetWindowDisplayAffinity with WDA_MONITOR. - */ - setContentProtection(enable: boolean): void; - /** - * Changes whether the window can be focused. - * Note: This API is available only on Windows. - */ - setFocusable(focusable: boolean): void; - /** - * Sets parent as current window's parent window, - * passing null will turn current window into a top-level window. - * Note: This API is not available on Windows. - */ - setParentWindow(parent: BrowserWindow): void; - /** - * @returns The parent window. - */ - getParentWindow(): BrowserWindow; - /** - * @returns All child windows. - */ - getChildWindows(): BrowserWindow[]; - /** - * Adds a vibrancy effect to the browser window. Passing null or - * an empty string will remove the vibrancy effect on the window. - * - * Note: This API is available only on macOS. - */ - setVibrancy(type: VibrancyType): void; - } - - type WindowLevel = 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver' | 'dock'; - type SwipeDirection = 'up' | 'right' | 'down' | 'left'; - type ThumbarButtonFlags = 'enabled' | 'disabled' | 'dismissonclick' | 'nobackground' | 'hidden' | 'noninteractive'; - - interface ThumbarButton { - icon: NativeImage | string; - click: Function; - tooltip?: string; - flags?: ThumbarButtonFlags[]; - } - - interface DevToolsExtensions { - [name: string]: { - name: string; - value: string; - } - } - - interface WebPreferences { - /** - * Whether to enable DevTools. - * If it is set to false, can not use BrowserWindow.webContents.openDevTools() to open DevTools. - * Default: true. - */ - devTools?: boolean; - /** - * Whether node integration is enabled. - * Default: true. - */ - nodeIntegration?: boolean; - /** - * Specifies a script that will be loaded before other scripts run in the page. - * This script will always have access to node APIs no matter whether node integration is turned on or off. - * The value should be the absolute file path to the script. - * When node integration is turned off, the preload script can reintroduce - * Node global symbols back to the global scope. - */ - preload?: string; - /** - * Sets the session used by the page. Instead of passing the Session object directly, - * you can also choose to use the partition option instead, which accepts a partition string. - * When both session and partition are provided, session would be preferred. - * Default: the default session. - */ - session?: Session; - /** - * Sets the session used by the page according to the session’s partition string. - * If partition starts with persist:, the page will use a persistent session available - * to all pages in the app with the same partition. if there is no persist: prefix, - * the page will use an in-memory session. By assigning the same partition, - * multiple pages can share the same session. - * Default: the default session. - */ - partition?: string; - /** - * The default zoom factor of the page, 3.0 represents 300%. - * Default: 1.0. - */ - zoomFactor?: number; - /** - * Enables JavaScript support. - * Default: true. - */ - javascript?: boolean; - /** - * When setting false, it will disable the same-origin policy (Usually using testing - * websites by people), and set allowDisplayingInsecureContent and allowRunningInsecureContent - * to true if these two options are not set by user. - * Default: true. - */ - webSecurity?: boolean; - /** - * Allow an https page to display content like images from http URLs. - * Default: false. - */ - allowDisplayingInsecureContent?: boolean; - /** - * Allow a https page to run JavaScript, CSS or plugins from http URLs. - * Default: false. - */ - allowRunningInsecureContent?: boolean; - /** - * Enables image support. - * Default: true. - */ - images?: boolean; - /** - * Make TextArea elements resizable. - * Default: true. - */ - textAreasAreResizable?: boolean; - /** - * Enables WebGL support. - * Default: true. - */ - webgl?: boolean; - /** - * Enables WebAudio support. - * Default: true. - */ - webaudio?: boolean; - /** - * Whether plugins should be enabled. - * Default: false. - */ - plugins?: boolean; - /** - * Enables Chromium’s experimental features. - * Default: false. - */ - experimentalFeatures?: boolean; - /** - * Enables Chromium’s experimental canvas features. - * Default: false. - */ - experimentalCanvasFeatures?: boolean; - /** - * Enables DirectWrite font rendering system on Windows. - * Default: true. - */ - directWrite?: boolean; - /** - * Enables scroll bounce (rubber banding) effect on macOS. - * Default: false. - */ - scrollBounce?: boolean; - /** - * A list of feature strings separated by ",", like CSSVariables,KeyboardEventKey to enable. - */ - blinkFeatures?: string; - /** - * A list of feature strings separated by ",", like CSSVariables,KeyboardEventKey to disable. - */ - disableBlinkFeatures?: string; - /** - * Sets the default font for the font-family. - */ - defaultFontFamily?: { - /** - * Default: Times New Roman. - */ - standard?: string; - /** - * Default: Times New Roman. - */ - serif?: string; - /** - * Default: Arial. - */ - sansSerif?: string; - /** - * Default: Courier New. - */ - monospace?: string; - }; - /** - * Default: 16. - */ - defaultFontSize?: number; - /** - * Default: 13. - */ - defaultMonospaceFontSize?: number; - /** - * Default: 0. - */ - minimumFontSize?: number; - /** - * Default: ISO-8859-1. - */ - defaultEncoding?: string; - /** - * Whether to throttle animations and timers when the page becomes background. - * Default: true. - */ - backgroundThrottling?: boolean; - /** - * Whether to enable offscreen rendering for the browser window. - * Default: false. - */ - offscreen?: boolean; - /** - * Whether to enable Chromium OS-level sandbox. - * Default: false. - */ - sandbox?: boolean; - } - - interface BrowserWindowOptions { - /** - * Window’s width in pixels. - * Default: 800. - */ - width?: number; - /** - * Window’s height in pixels. - * Default: 600. - */ - height?: number; - /** - * Window’s left offset from screen. - * Default: center the window. - */ - x?: number; - /** - * Window’s top offset from screen. - * Default: center the window. - */ - y?: number; - /** - * The width and height would be used as web page’s size, which means - * the actual window’s size will include window frame’s size and be slightly larger. - * Default: false. - */ - useContentSize?: boolean; - /** - * Show window in the center of the screen. - * Default: true - */ - center?: boolean; - /** - * Window’s minimum width. - * Default: 0. - */ - minWidth?: number; - /** - * Window’s minimum height. - * Default: 0. - */ - minHeight?: number; - /** - * Window’s maximum width. - * Default: no limit. - */ - maxWidth?: number; - /** - * Window’s maximum height. - * Default: no limit. - */ - maxHeight?: number; - /** - * Whether window is resizable. - * Default: true. - */ - resizable?: boolean; - /** - * Whether window is movable. - * Note: This is not implemented on Linux. - * Default: true. - */ - movable?: boolean; - /** - * Whether window is minimizable. - * Note: This is not implemented on Linux. - * Default: true. - */ - minimizable?: boolean; - /** - * Whether window is maximizable. - * Note: This is not implemented on Linux. - * Default: true. - */ - maximizable?: boolean; - /** - * Whether window is closable. - * Note: This is not implemented on Linux. - * Default: true. - */ - closable?: boolean; - /** - * Whether the window can be focused. - * On Windows setting focusable: false also implies setting skipTaskbar: true. - * On Linux setting focusable: false makes the window stop interacting with wm, - * so the window will always stay on top in all workspaces. - * Default: true. - */ - focusable?: boolean; - /** - * Whether the window should always stay on top of other windows. - * Default: false. - */ - alwaysOnTop?: boolean; - /** - * Whether the window should show in fullscreen. - * When explicitly set to false the fullscreen button will be hidden or disabled on macOS. - * Default: false. - */ - fullscreen?: boolean; - /** - * Whether the window can be put into fullscreen mode. - * On macOS, also whether the maximize/zoom button should toggle full screen mode or maximize window. - * Default: true. - */ - fullscreenable?: boolean; - /** - * Whether to show the window in taskbar. - * Default: false. - */ - skipTaskbar?: boolean; - /** - * The kiosk mode. - * Default: false. - */ - kiosk?: boolean; - /** - * Default window title. - * Default: "Electron". - */ - title?: string; - /** - * The window icon, when omitted on Windows the executable’s icon would be used as window icon. - */ - icon?: NativeImage|string; - /** - * Whether window should be shown when created. - * Default: true. - */ - show?: boolean; - /** - * Specify false to create a Frameless Window. - * Default: true. - */ - frame?: boolean; - /** - * Specify parent window. - * Default: null. - */ - parent?: BrowserWindow; - /** - * Whether this is a modal window. This only works when the window is a child window. - * Default: false. - */ - modal?: boolean; - /** - * Whether the web view accepts a single mouse-down event that simultaneously activates the window. - * Default: false. - */ - acceptFirstMouse?: boolean; - /** - * Whether to hide cursor when typing. - * Default: false. - */ - disableAutoHideCursor?: boolean; - /** - * Auto hide the menu bar unless the Alt key is pressed. - * Default: true. - */ - autoHideMenuBar?: boolean; - /** - * Enable the window to be resized larger than screen. - * Default: false. - */ - enableLargerThanScreen?: boolean; - /** - * Window’s background color as Hexadecimal value, like #66CD00 or #FFF or #80FFFFFF (alpha is supported). - * Default: #FFF (white). - */ - backgroundColor?: string; - /** - * Whether window should have a shadow. - * Note: This is only implemented on macOS. - * Default: true. - */ - hasShadow?: boolean; - /** - * Forces using dark theme for the window. - * Note: Only works on some GTK+3 desktop environments. - * Default: false. - */ - darkTheme?: boolean; - /** - * Makes the window transparent. - * Default: false. - */ - transparent?: boolean; - /** - * The type of window, default is normal window. - */ - type?: BrowserWindowType; - /** - * The style of window title bar. - */ - titleBarStyle?: 'default' | 'hidden' | 'hidden-inset'; - /** - * Use WS_THICKFRAME style for frameless windows on Windows - */ - thickFrame?: boolean; - /** - * Add a type of vibrancy effect to the window, only on macOS - */ - vibrancy?: VibrancyType; - /** - * Settings of web page’s features. - */ - webPreferences?: WebPreferences; - } - - type BrowserWindowType = BrowserWindowTypeLinux | BrowserWindowTypeMac | BrowserWindowTypeWindows; - type BrowserWindowTypeLinux = 'desktop' | 'dock' | 'toolbar' | 'splash' | 'notification'; - type BrowserWindowTypeMac = 'desktop' | 'textured'; - type BrowserWindowTypeWindows = 'toolbar'; - - // https://github.com/electron/electron/blob/master/docs/api/clipboard.md - - /** - * The clipboard module provides methods to perform copy and paste operations. - */ - interface Clipboard { - /** - * @returns The contents of the clipboard as plain text. - */ - readText(type?: ClipboardType): string; - /** - * Writes the text into the clipboard as plain text. - */ - writeText(text: string, type?: ClipboardType): void; - /** - * @returns The contents of the clipboard as markup. - */ - readHTML(type?: ClipboardType): string; - /** - * Writes markup to the clipboard. - */ - writeHTML(markup: string, type?: ClipboardType): void; - /** - * @returns The contents of the clipboard as a NativeImage. - */ - readImage(type?: ClipboardType): NativeImage; - /** - * Writes the image into the clipboard. - */ - writeImage(image: NativeImage, type?: ClipboardType): void; - /** - * @returns The contents of the clipboard as RTF. - */ - readRTF(type?: ClipboardType): string; - /** - * Writes the text into the clipboard in RTF. - */ - writeRTF(text: string, type?: ClipboardType): void; - /** - * Clears everything in clipboard. - */ - clear(type?: ClipboardType): void; - /** - * @returns Array available formats for the clipboard type. - */ - availableFormats(type?: ClipboardType): string[]; - /** - * Returns whether the clipboard supports the format of specified data. - * Note: This API is experimental and could be removed in future. - * @returns Whether the clipboard has data in the specified format. - */ - has(format: string, type?: ClipboardType): boolean; - /** - * Reads the data in the clipboard of the specified format. - * Note: This API is experimental and could be removed in future. - */ - read(format: string, type?: ClipboardType): string | NativeImage; - /** - * Writes data to the clipboard. - */ - write(data: { text: string; bookmark?: string; } | { rtf: string; } | { html: string; } | { image: NativeImage; }, type?: ClipboardType): void; - /** - * @returns An Object containing title and url keys representing the bookmark in the clipboard. - * - * Note: This API is available on macOS and Windows. - */ - readBookmark(): Bookmark; - /** - * Writes the title and url into the clipboard as a bookmark. - * - * Note: This API is available on macOS and Windows. - */ - writeBookmark(title: string, url: string, type?: ClipboardType): void; - /** - * The text on the find pasteboard. This method uses synchronous IPC when called from the renderer process. - * The cached value is reread from the find pasteboard whenever the application is activated. - * - * Note: This API is available on macOS. - */ - readFindText(): string; - /** - * Writes the text into the find pasteboard as plain text. - * This method uses synchronous IPC when called from the renderer process. - * - * Note: This API is available on macOS. - */ - writeFindText(text: string): void; - } - - type ClipboardType = '' | 'selection'; - - interface Bookmark { - title: string; - url: string; - } - - // https://github.com/electron/electron/blob/master/docs/api/content-tracing.md - - /** - * The content-tracing module is used to collect tracing data generated by the underlying Chromium content module. - * This module does not include a web interface so you need to open chrome://tracing/ - * in a Chrome browser and load the generated file to view the result. - */ - interface ContentTracing { - /** - * Get a set of category groups. The category groups can change as new code paths are reached. - * - * @param callback Called once all child processes have acknowledged the getCategories request. - */ - getCategories(callback: (categoryGroups: string[]) => void): void; - /** - * Start recording on all processes. Recording begins immediately locally and asynchronously - * on child processes as soon as they receive the EnableRecording request. - * - * @param callback Called once all child processes have acknowledged the startRecording request. - */ - startRecording(options: ContentTracingOptions, callback: Function): void; - /** - * Stop recording on all processes. Child processes typically are caching trace data and - * only rarely flush and send trace data back to the main process. That is because it may - * be an expensive operation to send the trace data over IPC, and we would like to avoid - * much runtime overhead of tracing. So, to end tracing, we must asynchronously ask all - * child processes to flush any pending trace data. - * - * @param resultFilePath Trace data will be written into this file if it is not empty, - * or into a temporary file. - * @param callback Called once all child processes have acknowledged the stopRecording request. - */ - stopRecording(resultFilePath: string, callback: (filePath: string) => void): void; - /** - * Start monitoring on all processes. Monitoring begins immediately locally and asynchronously - * on child processes as soon as they receive the startMonitoring request. - * - * @param callback Called once all child processes have acked to the startMonitoring request. - */ - startMonitoring(options: ContentTracingOptions, callback: Function): void; - /** - * Stop monitoring on all processes. - * - * @param callback Called once all child processes have acknowledged the stopMonitoring request. - */ - stopMonitoring(callback: Function): void; - /** - * Get the current monitoring traced data. Child processes typically are caching trace data - * and only rarely flush and send trace data back to the main process. That is because it may - * be an expensive operation to send the trace data over IPC, and we would like to avoid much - * runtime overhead of tracing. So, to end tracing, we must asynchronously ask all child - * processes to flush any pending trace data. - * - * @param callback Called once all child processes have acknowledged the captureMonitoringSnapshot request. - */ - captureMonitoringSnapshot(resultFilePath: string, callback: (filePath: string) => void): void; - /** - * Get the maximum usage across processes of trace buffer as a percentage of the full state. - * - * @param callback Called when the TraceBufferUsage value is determined. - */ - getTraceBufferUsage(callback: Function): void; - /** - * @param callback Called every time the given event occurs on any process. - */ - setWatchEvent(categoryName: string, eventName: string, callback: Function): void; - /** - * Cancel the watch event. This may lead to a race condition with the watch event callback if tracing is enabled. - */ - cancelWatchEvent(): void; - } - - interface ContentTracingOptions { - /** - * Filter to control what category groups should be traced. - * A filter can have an optional - prefix to exclude category groups - * that contain a matching category. Having both included and excluded - * category patterns in the same list is not supported. - * - * Examples: - * test_MyTest* - * test_MyTest*,test_OtherStuff - * -excluded_category1,-excluded_category2 - */ - categoryFilter: string; - /** - * Controls what kind of tracing is enabled, it is a comma-delimited list. - * - * Possible options are: - * record-until-full - * record-continuously - * trace-to-console - * enable-sampling - * enable-systrace - * - * The first 3 options are trace recoding modes and hence mutually exclusive. - * If more than one trace recording modes appear in the traceOptions string, - * the last one takes precedence. If none of the trace recording modes are specified, - * recording mode is record-until-full. - * - * The trace option will first be reset to the default option (record_mode set - * to record-until-full, enable_sampling and enable_systrace set to false) - * before options parsed from traceOptions are applied on it. - */ - traceOptions: string; - } - - // https://github.com/electron/electron/blob/master/docs/api/crash-reporter.md - - /** - * The crash-reporter module enables sending your app's crash reports. - */ - interface CrashReporter { - /** - * You are required to call this method before using other crashReporter APIs. - * - * Note: On macOS, Electron uses a new crashpad client, which is different from breakpad - * on Windows and Linux. To enable the crash collection feature, you are required to call - * the crashReporter.start API to initialize crashpad in the main process and in each - * renderer process from which you wish to collect crash reports. - */ - start(options: CrashReporterStartOptions): void; - /** - * @returns The crash report. When there was no crash report - * sent or the crash reporter is not started, null will be returned. - */ - getLastCrashReport(): CrashReport; - /** - * @returns All uploaded crash reports. - */ - getUploadedReports(): CrashReport[]; - } - - interface CrashReporterStartOptions { - /** - * Default: app.getName() - */ - productName?: string; - companyName: string; - /** - * URL that crash reports would be sent to as POST. - */ - submitURL: string; - /** - * Send the crash report without user interaction. - * Default: true. - */ - autoSubmit?: boolean; - /** - * Default: false. - */ - ignoreSystemCrashHandler?: boolean; - /** - * An object you can define that will be sent along with the report. - * Only string properties are sent correctly, nested objects are not supported. - */ - extra?: {[prop: string]: string}; - } - - interface CrashReport { - id: string; - date: Date; - } - - // https://github.com/electron/electron/blob/master/docs/api/desktop-capturer.md - - /** - * The desktopCapturer module can be used to get available sources - * that can be used to be captured with getUserMedia. - */ - interface DesktopCapturer { - /** - * Starts a request to get all desktop sources. - * - * Note: There is no guarantee that the size of source.thumbnail is always - * the same as the thumnbailSize in options. It also depends on the scale of the screen or window. - */ - getSources(options: DesktopCapturerOptions, callback: (error: Error, sources: DesktopCapturerSource[]) => any): void; - } - - interface DesktopCapturerOptions { - /** - * The types of desktop sources to be captured. - */ - types?: ('screen' | 'window')[]; - /** - * The suggested size that thumbnail should be scaled. - * Default: {width: 150, height: 150} - */ - thumbnailSize?: Size; - } - - interface DesktopCapturerSource { - /** - * The id of the captured window or screen used in navigator.webkitGetUserMedia. - * The format looks like window:XX or screen:XX where XX is a random generated number. - */ - id: string; - /** - * The described name of the capturing screen or window. - * If the source is a screen, the name will be Entire Screen or Screen ; - * if it is a window, the name will be the window’s title. - */ - name: string; - /** - * A thumbnail image. - */ - thumbnail: NativeImage; - } - - // https://github.com/electron/electron/blob/master/docs/api/dialog.md - - /** - * The dialog module provides APIs to show native system dialogs, such as opening files or alerting, - * so web applications can deliver the same user experience as native applications. - */ - interface Dialog { - /** - * Note: On Windows and Linux an open dialog can not be both a file selector and a directory selector, - * so if you set properties to ['openFile', 'openDirectory'] on these platforms, a directory selector will be shown. - * - * @param callback If supplied, the API call will be asynchronous. - * @returns On success, returns an array of file paths chosen by the user, - * otherwise returns undefined. - */ - showOpenDialog(browserWindow: BrowserWindow, options: OpenDialogOptions, callback?: (fileNames: string[]) => void): string[]; - /** - * Note: On Windows and Linux an open dialog can not be both a file selector and a directory selector, - * so if you set properties to ['openFile', 'openDirectory'] on these platforms, a directory selector will be shown. - * - * @param callback If supplied, the API call will be asynchronous. - * @returns On success, returns an array of file paths chosen by the user, - * otherwise returns undefined. - */ - showOpenDialog(options: OpenDialogOptions, callback?: (fileNames: string[]) => void): string[]; - /** - * @param callback If supplied, the API call will be asynchronous. - * @returns On success, returns the path of file chosen by the user, otherwise - * returns undefined. - */ - showSaveDialog(browserWindow: BrowserWindow, options: SaveDialogOptions, callback?: (fileName: string) => void): string; - /** - * @param callback If supplied, the API call will be asynchronous. - * @returns On success, returns the path of file chosen by the user, otherwise - * returns undefined. - */ - showSaveDialog(options: SaveDialogOptions, callback?: (fileName: string) => void): string; - /** - * Shows a message box. It will block until the message box is closed. - * @param callback If supplied, the API call will be asynchronous. - * @returns The index of the clicked button. - */ - showMessageBox(browserWindow: BrowserWindow, options: ShowMessageBoxOptions, callback?: (response: number) => void): number; - /** - * Shows a message box. It will block until the message box is closed. - * @param callback If supplied, the API call will be asynchronous. - * @returns The index of the clicked button. - */ - showMessageBox(options: ShowMessageBoxOptions, callback?: (response: number) => void): number; - /** - * Displays a modal dialog that shows an error message. - * - * This API can be called safely before the ready event the app module emits, - * it is usually used to report errors in early stage of startup. - * If called before the app readyevent on Linux, the message will be emitted to stderr, - * and no GUI dialog will appear. - */ - showErrorBox(title: string, content: string): void; - } - - interface OpenDialogOptions { - title?: string; - defaultPath?: string; - /** - * Custom label for the confirmation button, when left empty the default label will be used. - */ - buttonLabel?: string; - /** - * File types that can be displayed or selected. - */ - filters?: { - name: string; - /** - * Extensions without wildcards or dots (e.g. 'png' is good but '.png' and '*.png' are bad). - * To show all files, use the '*' wildcard (no other wildcard is supported). - */ - extensions: string[]; - }[]; - /** - * Contains which features the dialog should use. - */ - properties?: ('openFile' | 'openDirectory' | 'multiSelections' | 'createDirectory' | 'showHiddenFiles' | 'promptToCreate' | 'noResolveAliases')[]; - /** - * Normalize the keyboard access keys across platforms. - */ - normalizeAccessKeys?: boolean; - /** - * Message to display above input boxes. - */ - message?: string; - } - - interface SaveDialogOptions { - title?: string; - defaultPath?: string; - /** - * Custom label for the confirmation button, when left empty the default label will be used. - */ - buttonLabel?: string; - /** - * File types that can be displayed, see dialog.showOpenDialog for an example. - */ - filters?: { - name: string; - extensions: string[]; - }[]; - /** - * macOS - Message to display above text fields. - */ - message?: string; - /** - * macOS - Custom label for the text displayed in front of the filename text field. - */ - nameFieldLabel?: string; - /** - * macOS - Show the tags input box, defaults to true. - */ - showsTagField?: boolean; - } - - interface ShowMessageBoxOptions { - /** - * On Windows, "question" displays the same icon as "info", unless you set an icon using the "icon" option. - */ - type?: 'none' | 'info' | 'error' | 'question' | 'warning'; - /** - * Texts for buttons. On Windows, an empty array will result in one button labeled "OK". - */ - buttons?: string[]; - /** - * Index of the button in the buttons array which will be selected by default when the message box opens. - */ - defaultId?: number; - /** - * Title of the message box (some platforms will not show it). - */ - title?: string; - /** - * Contents of the message box. - */ - message?: string; - /** - * Extra information of the message. - */ - detail?: string; - icon?: NativeImage; - /** - * The value will be returned when user cancels the dialog instead of clicking the buttons of the dialog. - * By default it is the index of the buttons that have "cancel" or "no" as label, - * or 0 if there is no such buttons. On macOS and Windows the index of "Cancel" button - * will always be used as cancelId, not matter whether it is already specified. - */ - cancelId?: number; - /** - * On Windows Electron will try to figure out which one of the buttons are common buttons - * (like "Cancel" or "Yes"), and show the others as command links in the dialog. - * This can make the dialog appear in the style of modern Windows apps. - * If you don’t like this behavior, you can set noLink to true. - */ - noLink?: boolean; - } - - // https://github.com/electron/electron/blob/master/docs/api/download-item.md - - /** - * DownloadItem represents a download item in Electron. - */ - interface DownloadItem extends NodeJS.EventEmitter { - /** - * Emitted when the download has been updated and is not done. - */ - on(event: 'updated', listener: (event: Event, state: 'progressing' | 'interrupted') => void): this; - /** - * Emits when the download is in a terminal state. This includes a completed download, - * a cancelled download (via downloadItem.cancel()), and interrupted download that can’t be resumed. - */ - on(event: 'done', listener: (event: Event, state: 'completed' | 'cancelled' | 'interrupted') => void): this; - on(event: string, listener: Function): this; - /** - * Set the save file path of the download item. - * Note: The API is only available in session’s will-download callback function. - * If user doesn’t set the save path via the API, Electron will use the original - * routine to determine the save path (Usually prompts a save dialog). - */ - setSavePath(path: string): void; - /** - * @returns The save path of the download item. - * This will be either the path set via downloadItem.setSavePath(path) or the path selected from the shown save dialog. - */ - getSavePath(): string; - /** - * Pauses the download. - */ - pause(): void; - /** - * @returns Whether the download is paused. - */ - isPaused(): boolean; - /** - * Resumes the download that has been paused. - */ - resume(): void; - /** - * @returns Whether the download can resume. - */ - canResume(): boolean; - /** - * Cancels the download operation. - */ - cancel(): void; - /** - * @returns The origin url where the item is downloaded from. - */ - getURL(): string; - /** - * @returns The mime type. - */ - getMimeType(): string; - /** - * @returns Whether the download has user gesture. - */ - hasUserGesture(): boolean; - /** - * @returns The file name of the download item. - * Note: The file name is not always the same as the actual one saved in local disk. - * If user changes the file name in a prompted download saving dialog, - * the actual name of saved file will be different. - */ - getFilename(): string; - /** - * @returns The total size in bytes of the download item. If the size is unknown, it returns 0. - */ - getTotalBytes(): number; - /** - * @returns The received bytes of the download item. - */ - getReceivedBytes(): number; - /** - * @returns The Content-Disposition field from the response header. - */ - getContentDisposition(): string; - /** - * @returns The current state. - */ - getState(): 'progressing' | 'completed' | 'cancelled' | 'interrupted'; - } - - // https://github.com/electron/electron/blob/master/docs/api/global-shortcut.md - - /** - * The globalShortcut module can register/unregister a global keyboard shortcut - * with the operating system so that you can customize the operations for various shortcuts. - * Note: The shortcut is global; it will work even if the app does not have the keyboard focus. - * You should not use this module until the ready event of the app module is emitted. - */ - interface GlobalShortcut { - /** - * Registers a global shortcut of accelerator. - * @param accelerator Represents a keyboard shortcut. It can contain modifiers - * and key codes, combined by the "+" character. - * @param callback Called when the registered shortcut is pressed by the user. - */ - register(accelerator: string, callback: Function): void; - /** - * @param accelerator Represents a keyboard shortcut. It can contain modifiers - * and key codes, combined by the "+" character. - * @returns Whether the accelerator is registered. - */ - isRegistered(accelerator: string): boolean; - /** - * Unregisters the global shortcut of keycode. - * @param accelerator Represents a keyboard shortcut. It can contain modifiers - * and key codes, combined by the "+" character. - */ - unregister(accelerator: string): void; - /** - * Unregisters all the global shortcuts. - */ - unregisterAll(): void; - } - - // https://github.com/electron/electron/blob/master/docs/api/ipc-main.md - - /** - * The ipcMain module handles asynchronous and synchronous messages - * sent from a renderer process (web page). - * Messages sent from a renderer will be emitted to this module. - */ - interface IpcMain extends NodeJS.EventEmitter { - addListener(channel: string, listener: IpcMainEventListener): this; - on(channel: string, listener: IpcMainEventListener): this; - once(channel: string, listener: IpcMainEventListener): this; - removeListener(channel: string, listener: IpcMainEventListener): this; - removeAllListeners(channel?: string): this; - } - - type IpcMainEventListener = (event: IpcMainEvent, ...args: any[]) => void; - - interface IpcMainEvent { - /** - * Set this to the value to be returned in a synchronous message. - */ - returnValue?: any; - /** - * Returns the webContents that sent the message, you can call sender.send - * to reply to the asynchronous message. - */ - sender: WebContents; - } - - // https://github.com/electron/electron/blob/master/docs/api/ipc-renderer.md - - /** - * The ipcRenderer module provides a few methods so you can send synchronous - * and asynchronous messages from the render process (web page) to the main process. - * You can also receive replies from the main process. - */ - interface IpcRenderer extends NodeJS.EventEmitter { - addListener(channel: string, listener: IpcRendererEventListener): this; - on(channel: string, listener: IpcRendererEventListener): this; - once(channel: string, listener: IpcRendererEventListener): this; - removeListener(channel: string, listener: IpcRendererEventListener): this; - removeAllListeners(channel?: string): this; - /** - * Send ...args to the renderer via channel in asynchronous message, the main - * process can handle it by listening to the channel event of ipc module. - */ - send(channel: string, ...args: any[]): void; - /** - * Send ...args to the renderer via channel in synchronous message, and returns - * the result sent from main process. The main process can handle it by listening - * to the channel event of ipc module, and returns by setting event.returnValue. - * Note: Usually developers should never use this API, since sending synchronous - * message would block the whole renderer process. - * @returns The result sent from the main process. - */ - sendSync(channel: string, ...args: any[]): any; - /** - * Like ipc.send but the message will be sent to the host page instead of the main process. - * This is mainly used by the page in to communicate with host page. - */ - sendToHost(channel: string, ...args: any[]): void; - } - - type IpcRendererEventListener = (event: IpcRendererEvent, ...args: any[]) => void; - - interface IpcRendererEvent { - /** - * You can call sender.send to reply to the asynchronous message. - */ - sender: IpcRenderer; - } - - // https://github.com/electron/electron/blob/master/docs/api/menu-item.md - // https://github.com/electron/electron/blob/master/docs/api/accelerator.md - - /** - * The MenuItem allows you to add items to an application or context menu. - */ - class MenuItem { - /** - * Create a new menu item. - */ - constructor(options: MenuItemOptions); - - /** - * A function that is fired when the MenuItem receives a click event - */ - click: (event: Event, browserWindow: BrowserWindow, webContents: WebContents) => void; - - /** - * Read-only property. - */ - type: MenuItemType; - /** - * Read-only property. - */ - role: MenuItemRole | MenuItemRoleMac; - /** - * Read-only property. - */ - accelerator: string; - /** - * Read-only property. - */ - icon: NativeImage | string; - /** - * Read-only property. - */ - submenu: Menu | MenuItemOptions[]; - - label: string; - sublabel: string; - enabled: boolean; - visible: boolean; - checked: boolean; - } - - type MenuItemType = 'normal' | 'separator' | 'submenu' | 'checkbox' | 'radio'; - type MenuItemRole = 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'pasteandmatchstyle' | 'selectall' | 'delete' | 'minimize' | 'close' | 'quit' | 'togglefullscreen' | 'resetzoom' | 'zoomin' | 'zoomout' | 'reload' | 'toggledevtools'; - type MenuItemRoleMac = 'about' | 'hide' | 'hideothers' | 'unhide' | 'startspeaking' | 'stopspeaking' | 'front' | 'zoom' | 'window' | 'help' | 'services'; - - interface MenuItemOptions { - /** - * Callback when the menu item is clicked. - */ - click?: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => void; - /** - * Can be normal, separator, submenu, checkbox or radio. - */ - type?: MenuItemType; - label?: string; - sublabel?: string; - /** - * An accelerator is string that represents a keyboard shortcut, it can contain - * multiple modifiers and key codes, combined by the + character. - * - * Examples: - * CommandOrControl+A - * CommandOrControl+Shift+Z - * - * Platform notice: - * On Linux and Windows, the Command key would not have any effect, - * you can use CommandOrControl which represents Command on macOS and Control on - * Linux and Windows to define some accelerators. - * - * Use Alt instead of Option. The Option key only exists on macOS, whereas - * the Alt key is available on all platforms. - * - * The Super key is mapped to the Windows key on Windows and Linux and Cmd on macOS. - * - * Available modifiers: - * Command (or Cmd for short) - * Control (or Ctrl for short) - * CommandOrControl (or CmdOrCtrl for short) - * Alt - * Option - * AltGr - * Shift - * Super - * - * Available key codes: - * 0 to 9 - * A to Z - * F1 to F24 - * Punctuations like ~, !, @, #, $, etc. - * Plus - * Space - * Tab - * Backspace - * Delete - * Insert - * Return (or Enter as alias) - * Up, Down, Left and Right - * Home and End - * PageUp and PageDown - * Escape (or Esc for short) - * VolumeUp, VolumeDown and VolumeMute - * MediaNextTrack, MediaPreviousTrack, MediaStop and MediaPlayPause - * PrintScreen - */ - accelerator?: string; - /** - * In Electron for the APIs that take images, you can pass either file paths - * or NativeImage instances. When passing null, an empty image will be used. - */ - icon?: NativeImage|string; - /** - * If false, the menu item will be greyed out and unclickable. - */ - enabled?: boolean; - /** - * If false, the menu item will be entirely hidden. - */ - visible?: boolean; - /** - * Should only be specified for 'checkbox' or 'radio' type menu items. - */ - checked?: boolean; - /** - * Should be specified for submenu type menu item, when it's specified the - * type: 'submenu' can be omitted for the menu item - */ - submenu?: Menu|MenuItemOptions[]; - /** - * Unique within a single menu. If defined then it can be used as a reference - * to this item by the position attribute. - */ - id?: string; - /** - * This field allows fine-grained definition of the specific location within - * a given menu. - */ - position?: string; - /** - * Define the action of the menu item, when specified the click property will be ignored - */ - role?: MenuItemRole | MenuItemRoleMac; - } - - // https://github.com/electron/electron/blob/master/docs/api/menu.md - - /** - * The Menu class is used to create native menus that can be used as application - * menus and context menus. This module is a main process module which can be used - * in a render process via the remote module. - * - * Each menu consists of multiple menu items, and each menu item can have a submenu. - */ - class Menu extends NodeJS.EventEmitter { - /** - * Creates a new menu. - */ - constructor(); - /** - * Sets menu as the application menu on macOS. On Windows and Linux, the - * menu will be set as each window's top menu. - * - * Passing null will remove the menu bar on Windows and Linux but has no - * effect on macOS. - */ - static setApplicationMenu(menu: Menu | null): void; - /** - * @returns The application menu if set, or null if not set. - */ - static getApplicationMenu(): Menu | null; - /** - * Sends the action to the first responder of application. - * This is used for emulating default Cocoa menu behaviors, - * usually you would just use the role property of MenuItem. - * - * Note: This method is macOS only. - */ - static sendActionToFirstResponder(action: string): void; - /** - * @param template Generally, just an array of options for constructing MenuItem. - * You can also attach other fields to element of the template, and they will - * become properties of the constructed menu items. - */ - static buildFromTemplate(template: MenuItemOptions[]): Menu; - /** - * Pops up this menu as a context menu in the browserWindow. You can optionally - * provide a (x,y) coordinate to place the menu at, otherwise it will be placed - * at the current mouse cursor position. - * @param x Horizontal coordinate where the menu will be placed. - * @param y Vertical coordinate where the menu will be placed. - */ - popup(browserWindow?: BrowserWindow, x?: number, y?: number): void; - /** - * Appends the menuItem to the menu. - */ - append(menuItem: MenuItem): void; - /** - * Inserts the menuItem to the pos position of the menu. - */ - insert(position: number, menuItem: MenuItem): void; - /** - * @returns an array containing the menu’s items. - */ - items: MenuItem[]; - } - - // https://github.com/electron/electron/blob/master/docs/api/native-image.md - - /** - * This class is used to represent an image. - */ - class NativeImage { - /** - * Creates an empty NativeImage instance. - */ - static createEmpty(): NativeImage; - /** - * Creates a new NativeImage instance from file located at path. - * This method returns an empty image if the path does not exist, cannot be read, or is not a valid image. - */ - static createFromPath(path: string): NativeImage; - /** - * Creates a new NativeImage instance from buffer. - * @param scaleFactor 1.0 by default. - */ - static createFromBuffer(buffer: Buffer, scaleFactor?: number): NativeImage; - /** - * Creates a new NativeImage instance from dataURL - */ - static createFromDataURL(dataURL: string): NativeImage; - /** - * @returns Buffer that contains the image's PNG encoded data. - */ - toPNG(): Buffer; - /** - * @returns Buffer that contains the image's JPEG encoded data. - */ - toJPEG(quality: number): Buffer; - /** - * @returns Buffer that contains a copy of the image's raw bitmap pixel data. - */ - toBitmap(): Buffer; - /** - * @returns Buffer that contains the image's raw bitmap pixel data. - * - * The difference between getBitmap() and toBitmap() is, getBitmap() does not copy the bitmap data, - * so you have to use the returned Buffer immediately in current event loop tick, - * otherwise the data might be changed or destroyed. - */ - getBitmap(): Buffer; - /** - * @returns The data URL of the image. - */ - toDataURL(): string; - /** - * The native type of the handle is NSImage* on macOS. - * Note: This is only implemented on macOS. - * @returns The platform-specific handle of the image as Buffer. - */ - getNativeHandle(): Buffer; - /** - * @returns Whether the image is empty. - */ - isEmpty(): boolean; - /** - * @returns The size of the image. - */ - getSize(): Size; - /** - * Marks the image as template image. - */ - setTemplateImage(option: boolean): void; - /** - * Returns a boolean whether the image is a template image. - */ - isTemplateImage(): boolean; - } - - // https://github.com/electron/electron/blob/master/docs/api/net.md - - /** - * The net module is a client-side API for issuing HTTP(S) requests. - * It is similar to the HTTP and HTTPS modules of Node.js but uses Chromium’s native - * networking library instead of the Node.js implementation, offering better support - * for web proxies. - * The following is a non-exhaustive list of why you may consider using the net module - * instead of the native Node.js modules: - * - Automatic management of system proxy configuration, support of the wpad protocol - * and proxy pac configuration files. - * - Automatic tunneling of HTTPS requests. - * - Support for authenticating proxies using basic, digest, NTLM, Kerberos or negotiate - * authentication schemes. - * - Support for traffic monitoring proxies: Fiddler-like proxies used for access control - * and monitoring. - * - * The net module API has been specifically designed to mimic, as closely as possible, - * the familiar Node.js API. The API components including classes, methods, - * properties and event names are similar to those commonly used in Node.js. - * - * The net API can be used only after the application emits the ready event. - * Trying to use the module before the ready event will throw an error. - */ - interface Net extends NodeJS.EventEmitter { - /** - * @param options The ClientRequest constructor options. - * @param callback A one time listener for the response event. - * - * @returns a ClientRequest instance using the provided options which are directly - * forwarded to the ClientRequest constructor. - */ - request(options: string | RequestOptions, callback?: (response: IncomingMessage) => void): ClientRequest; - } - - /** - * The RequestOptions interface allows to define various options for an HTTP request. - */ - interface RequestOptions { - /** - * The HTTP request method. Defaults to the GET method. - */ - method?: string; - /** - * The request URL. Must be provided in the absolute form with the protocol - * scheme specified as http or https. - */ - url?: string; - /** - * The Session instance with which the request is associated. - */ - session?: Session; - /** - * The name of the partition with which the request is associated. - * Defaults to the empty string. The session option prevails on partition. - * Thus if a session is explicitly specified, partition is ignored. - */ - partition?: string; - /** - * The protocol scheme in the form ‘scheme:’. Currently supported values are ‘http:’ or ‘https:’. - * Defaults to ‘http:’. - */ - protocol?: 'http:' | 'https:'; - /** - * The server host provided as a concatenation of the hostname and the port number ‘hostname:port’. - */ - host?: string; - /** - * The server host name. - */ - hostname?: string; - /** - * The server’s listening port number. - */ - port?: number; - /** - * The path part of the request URL. - */ - path?: string; - /** - * A map specifying extra HTTP header name/value. - */ - headers?: { [key: string]: any }; - } - - /** - * The ClientRequest class represents an HTTP request. - */ - class ClientRequest extends NodeJS.EventEmitter { - /** - * Emitted when an HTTP response is received for the request. - */ - on(event: 'response', listener: (response: IncomingMessage) => void): this; - /** - * Emitted when an authenticating proxy is asking for user credentials. - * The callback function is expected to be called back with user credentials. - * Providing empty credentials will cancel the request and report an authentication - * error on the response object. - */ - on(event: 'login', listener: (authInfo: LoginAuthInfo, callback: (username?: string, password?: string) => void) => void): this; - /** - * Emitted just after the last chunk of the request’s data has been written into - * the request object. - */ - on(event: 'finish', listener: () => void): this; - /** - * Emitted when the request is aborted. The abort event will not be fired if the - * request is already closed. - */ - on(event: 'abort', listener: () => void): this; - /** - * Emitted when the net module fails to issue a network request. - * Typically when the request object emits an error event, a close event will - * subsequently follow and no response object will be provided. - */ - on(event: 'error', listener: (error: Error) => void): this; - /** - * Emitted as the last event in the HTTP request-response transaction. - * The close event indicates that no more events will be emitted on either the - * request or response objects. - */ - on(event: 'close', listener: () => void): this; - on(event: string, listener: Function): this; - /** - * A Boolean specifying whether the request will use HTTP chunked transfer encoding or not. - * Defaults to false. The property is readable and writable, however it can be set only before - * the first write operation as the HTTP headers are not yet put on the wire. - * Trying to set the chunkedEncoding property after the first write will throw an error. - * - * Using chunked encoding is strongly recommended if you need to send a large request - * body as data will be streamed in small chunks instead of being internally buffered - * inside Electron process memory. - */ - chunkedEncoding: boolean; - /** - * @param options If options is a String, it is interpreted as the request URL. - * If it is an object, it is expected to be a RequestOptions. - * @param callback A one time listener for the response event. - */ - constructor(options: string | RequestOptions, callback?: (response: IncomingMessage) => void); - /** - * Adds an extra HTTP header. The header name will issued as it is without lowercasing. - * It can be called only before first write. Calling this method after the first write - * will throw an error. - * @param name An extra HTTP header name. - * @param value An extra HTTP header value. - */ - setHeader(name: string, value: string): void; - /** - * @param name Specify an extra header name. - * @returns The value of a previously set extra header name. - */ - getHeader(name: string): string; - /** - * Removes a previously set extra header name. This method can be called only before first write. - * Trying to call it after the first write will throw an error. - * @param name Specify an extra header name. - */ - removeHeader(name: string): void; - /** - * Adds a chunk of data to the request body. The first write operation may cause the - * request headers to be issued on the wire. - * After the first write operation, it is not allowed to add or remove a custom header. - * @param chunk A chunk of the request body’s data. If it is a string, it is converted - * into a Buffer using the specified encoding. - * @param encoding Used to convert string chunks into Buffer objects. Defaults to ‘utf-8’. - * @param callback Called after the write operation ends. - */ - write(chunk: string | Buffer, encoding?: string, callback?: Function): boolean; - /** - * Sends the last chunk of the request data. Subsequent write or end operations will not be allowed. - * The finish event is emitted just after the end operation. - * @param chunk A chunk of the request body’s data. If it is a string, it is converted into - * a Buffer using the specified encoding. - * @param encoding Used to convert string chunks into Buffer objects. Defaults to ‘utf-8’. - * @param callback Called after the write operation ends. - * - */ - end(chunk?: string | Buffer, encoding?: string, callback?: Function): boolean; - /** - * Cancels an ongoing HTTP transaction. If the request has already emitted the close event, - * the abort operation will have no effect. - * Otherwise an ongoing event will emit abort and close events. - * Additionally, if there is an ongoing response object,it will emit the aborted event. - */ - abort(): void - } - - /** - * An IncomingMessage represents an HTTP response. - */ - interface IncomingMessage extends NodeJS.ReadableStream { - /** - * The data event is the usual method of transferring response data into applicative code. - */ - on(event: 'data', listener: (chunk: Buffer) => void): this; - /** - * Indicates that response body has ended. - */ - on(event: 'end', listener: () => void): this; - /** - * Emitted when a request has been canceled during an ongoing HTTP transaction. - */ - on(event: 'aborted', listener: () => void): this; - /** - * Emitted when an error was encountered while streaming response data events. - * For instance, if the server closes the underlying while the response is still - * streaming, an error event will be emitted on the response object and a close - * event will subsequently follow on the request object. - */ - on(event: 'error', listener: (error: Error) => void): this; - on(event: string, listener: Function): this; - /** - * An Integer indicating the HTTP response status code. - */ - statusCode: number; - /** - * A String representing the HTTP status message. - */ - statusMessage: string; - /** - * An object representing the response HTTP headers. The headers object is formatted as follows: - * - All header names are lowercased. - * - Each header name produces an array-valued property on the headers object. - * - Each header value is pushed into the array associated with its header name. - */ - headers: { - [key: string]: string[] - }; - /** - * A string indicating the HTTP protocol version number. Typical values are ‘1.0’ or ‘1.1’. - */ - httpVersion: string; - /** - * An integer-valued read-only property that returns the HTTP major version number. - */ - httpVersionMajor: number; - /** - * An integer-valued read-only property that returns the HTTP minor version number. - */ - httpVersionMinor: number; - } - - // https://github.com/electron/electron/blob/master/docs/api/power-monitor.md - - /** - * The power-monitor module is used to monitor power state changes. - * You should not use this module until the ready event of the app module is emitted. - */ - interface PowerMonitor extends NodeJS.EventEmitter { - /** - * Emitted when the system is suspending. - */ - on(event: 'suspend', listener: Function): this; - /** - * Emitted when system is resuming. - */ - on(event: 'resume', listener: Function): this; - /** - * Emitted when the system changes to AC power. - */ - on(event: 'on-ac', listener: Function): this; - /** - * Emitted when system changes to battery power. - */ - on(event: 'on-battery', listener: Function): this; - on(event: string, listener: Function): this; - } - - // https://github.com/electron/electron/blob/master/docs/api/power-save-blocker.md - - /** - * The powerSaveBlocker module is used to block the system from entering - * low-power (sleep) mode and thus allowing the app to keep the system and screen active. - */ - interface PowerSaveBlocker { - /** - * Starts preventing the system from entering lower-power mode. - * @returns The blocker ID that is assigned to this power blocker. - * Note: prevent-display-sleep has higher has precedence over prevent-app-suspension. - */ - start(type: 'prevent-app-suspension' | 'prevent-display-sleep'): number; - /** - * @param id The power save blocker id returned by powerSaveBlocker.start. - * Stops the specified power save blocker. - */ - stop(id: number): void; - /** - * @param id The power save blocker id returned by powerSaveBlocker.start. - * @returns Whether the corresponding powerSaveBlocker has started. - */ - isStarted(id: number): boolean; - } - - // https://github.com/electron/electron/blob/master/docs/api/protocol.md - - /** - * The protocol module can register a custom protocol or intercept an existing protocol. - */ - interface Protocol { - /** - * Registers custom schemes as standard schemes. - */ - registerStandardSchemes(schemes: string[]): void; - /** - * Registers custom schemes to handle service workers. - */ - registerServiceWorkerSchemes(schemes: string[]): void; - /** - * Registers a protocol of scheme that will send the file as a response. - */ - registerFileProtocol(scheme: string, handler: FileProtocolHandler, completion?: (error: Error) => void): void; - /** - * Registers a protocol of scheme that will send a Buffer as a response. - */ - registerBufferProtocol(scheme: string, handler: BufferProtocolHandler, completion?: (error: Error) => void): void; - /** - * Registers a protocol of scheme that will send a String as a response. - */ - registerStringProtocol(scheme: string, handler: StringProtocolHandler, completion?: (error: Error) => void): void; - /** - * Registers a protocol of scheme that will send an HTTP request as a response. - */ - registerHttpProtocol(scheme: string, handler: HttpProtocolHandler, completion?: (error: Error) => void): void; - /** - * Unregisters the custom protocol of scheme. - */ - unregisterProtocol(scheme: string, completion?: (error: Error) => void): void; - /** - * The callback will be called with a boolean that indicates whether there is already a handler for scheme. - */ - isProtocolHandled(scheme: string, callback: (handled: boolean) => void): void; - /** - * Intercepts scheme protocol and uses handler as the protocol’s new handler which sends a file as a response. - */ - interceptFileProtocol(scheme: string, handler: FileProtocolHandler, completion?: (error: Error) => void): void; - /** - * Intercepts scheme protocol and uses handler as the protocol’s new handler which sends a Buffer as a response. - */ - interceptBufferProtocol(scheme: string, handler: BufferProtocolHandler, completion?: (error: Error) => void): void; - /** - * Intercepts scheme protocol and uses handler as the protocol’s new handler which sends a String as a response. - */ - interceptStringProtocol(scheme: string, handler: StringProtocolHandler, completion?: (error: Error) => void): void; - /** - * Intercepts scheme protocol and uses handler as the protocol’s new handler which sends a new HTTP request as a response. - */ - interceptHttpProtocol(scheme: string, handler: HttpProtocolHandler, completion?: (error: Error) => void): void; - /** - * Remove the interceptor installed for scheme and restore its original handler. - */ - uninterceptProtocol(scheme: string, completion?: (error: Error) => void): void; - } - - type FileProtocolHandler = (request: ProtocolRequest, callback: FileProtocolCallback) => void; - type BufferProtocolHandler = (request: ProtocolRequest, callback: BufferProtocolCallback) => void; - type StringProtocolHandler = (request: ProtocolRequest, callback: StringProtocolCallback) => void; - type HttpProtocolHandler = (request: ProtocolRequest, callback: HttpProtocolCallback) => void; - - interface ProtocolRequest { - url: string; - referrer: string; - method: string; - uploadData?: { - /** - * Content being sent. - */ - bytes: Buffer, - /** - * Path of file being uploaded. - */ - file: string, - /** - * UUID of blob data. Use session.getBlobData method to retrieve the data. - */ - blobUUID: string; - }[]; - } - - interface ProtocolCallback { - (error: number): void; - (obj: { - error: number - }): void; - (): void; - } - - interface FileProtocolCallback extends ProtocolCallback { - (filePath: string): void; - (obj: { - path: string - }): void; - } - - interface BufferProtocolCallback extends ProtocolCallback { - (buffer: Buffer): void; - (obj: { - data: Buffer, - mimeType: string, - charset?: string - }): void; - } - - interface StringProtocolCallback extends ProtocolCallback { - (str: string): void; - (obj: { - data: string, - mimeType: string, - charset?: string - }): void; - } - - interface HttpProtocolCallback extends ProtocolCallback { - (redirectRequest: { - url: string; - method: string; - session?: Object; - uploadData?: { - contentType: string; - data: string; - }; - }): void; - } - - // https://github.com/electron/electron/blob/master/docs/api/remote.md - - /** - * The remote module provides a simple way to do inter-process communication (IPC) - * between the renderer process (web page) and the main process. - */ - interface Remote extends CommonElectron { - /** - * @returns The object returned by require(module) in the main process. - */ - require(module: string): any; - /** - * @returns The BrowserWindow object which this web page belongs to. - */ - getCurrentWindow(): BrowserWindow; - /** - * @returns The WebContents object of this web page. - */ - getCurrentWebContents(): WebContents; - /** - * @returns The global variable of name (e.g. global[name]) in the main process. - */ - getGlobal(name: string): any; - /** - * Returns the process object in the main process. This is the same as - * remote.getGlobal('process'), but gets cached. - */ - process: NodeJS.Process; - } - - // https://github.com/electron/electron/blob/master/docs/api/screen.md - - /** - * The Display object represents a physical display connected to the system. - * A fake Display may exist on a headless system, or a Display may correspond to a remote, virtual display. - */ - interface Display { - /** - * Unique identifier associated with the display. - */ - id: number; - bounds: Rectangle; - workArea: Rectangle; - size: Size; - workAreaSize: Size; - /** - * Output device’s pixel scale factor. - */ - scaleFactor: number; - /** - * Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. - */ - rotation: number; - touchSupport: 'available' | 'unavailable' | 'unknown'; - } - - type DisplayMetrics = 'bounds' | 'workArea' | 'scaleFactor' | 'rotation'; - - /** - * The screen module retrieves information about screen size, displays, cursor position, etc. - * You can not use this module until the ready event of the app module is emitted. - */ - interface Screen extends NodeJS.EventEmitter { - /** - * Emitted when newDisplay has been added. - */ - on(event: 'display-added', listener: (event: Event, newDisplay: Display) => void): this; - /** - * Emitted when oldDisplay has been removed. - */ - on(event: 'display-removed', listener: (event: Event, oldDisplay: Display) => void): this; - /** - * Emitted when one or more metrics change in a display. - */ - on(event: 'display-metrics-changed', listener: (event: Event, display: Display, changedMetrics: DisplayMetrics[]) => void): this; - on(event: string, listener: Function): this; - /** - * @returns The current absolute position of the mouse pointer. - */ - getCursorScreenPoint(): Point; - /** - * @returns The primary display. - */ - getPrimaryDisplay(): Display; - /** - * @returns An array of displays that are currently available. - */ - getAllDisplays(): Display[]; - /** - * @returns The display nearest the specified point. - */ - getDisplayNearestPoint(point: Point): Display; - /** - * @returns The display that most closely intersects the provided bounds. - */ - getDisplayMatching(rect: Rectangle): Display; - } - - // https://github.com/electron/electron/blob/master/docs/api/session.md - - /** - * The session module can be used to create new Session objects. - * You can also access the session of existing pages by using - * the session property of webContents which is a property of BrowserWindow. - */ - class Session extends NodeJS.EventEmitter { - /** - * @returns a new Session instance from partition string. - */ - static fromPartition(partition: string, options?: FromPartitionOptions): Session; - /** - * @returns the default session object of the app. - */ - static defaultSession: Session; - /** - * Emitted when Electron is about to download item in webContents. - * Calling event.preventDefault() will cancel the download - * and item will not be available from next tick of the process. - */ - on(event: 'will-download', listener: (event: Event, item: DownloadItem, webContents: WebContents) => void): this; - on(event: string, listener: Function): this; - /** - * The cookies gives you ability to query and modify cookies. - */ - cookies: SessionCookies; - /** - * @returns the session’s current cache size. - */ - getCacheSize(callback: (size: number) => void): void; - /** - * Clears the session’s HTTP cache. - */ - clearCache(callback: Function): void; - /** - * Clears the data of web storages. - */ - clearStorageData(callback: Function): void; - /** - * Clears the data of web storages. - */ - clearStorageData(options: ClearStorageDataOptions, callback: Function): void; - /** - * Writes any unwritten DOMStorage data to disk. - */ - flushStorageData(): void; - /** - * Sets the proxy settings. - */ - setProxy(config: ProxyConfig, callback: Function): void; - /** - * Resolves the proxy information for url. - */ - resolveProxy(url: URL, callback: (proxy: string) => void): void; - /** - * Sets download saving directory. - * By default, the download directory will be the Downloads under the respective app folder. - */ - setDownloadPath(path: string): void; - /** - * Emulates network with the given configuration for the session. - */ - enableNetworkEmulation(options: NetworkEmulationOptions): void; - /** - * Disables any network emulation already active for the session. - * Resets to the original network configuration. - */ - disableNetworkEmulation(): void; - /** - * Sets the certificate verify proc for session, the proc will be called - * whenever a server certificate verification is requested. - * - * Calling setCertificateVerifyProc(null) will revert back to default certificate verify proc. - */ - setCertificateVerifyProc(proc: ((hostname: string, cert: Certificate, callback: (accepted: boolean) => void) => void) | null): void; - /** - * Sets the handler which can be used to respond to permission requests for the session. - */ - setPermissionRequestHandler(handler: (webContents: WebContents, permission: Permission, callback: (allow: boolean) => void) => void): void; - /** - * Clears the host resolver cache. - */ - clearHostResolverCache(callback: Function): void; - /** - * Dynamically sets whether to always send credentials for HTTP NTLM or Negotiate authentication. - * @param domains Comma-seperated list of servers for which integrated authentication is enabled. - */ - allowNTLMCredentialsForDomains(domains: string): void; - /** - * Overrides the userAgent and acceptLanguages for this session. - * The acceptLanguages must a comma separated ordered list of language codes, for example "en-US,fr,de,ko,zh-CN,ja". - * This doesn't affect existing WebContents, and each WebContents can use webContents.setUserAgent to override the session-wide user agent. - */ - setUserAgent(userAgent: string, acceptLanguages?: string): void; - /** - * @returns The user agent for this session. - */ - getUserAgent(): string; - /** - * Returns the blob data associated with the identifier. - */ - getBlobData(identifier: string, callback: (result: Buffer) => void): void; - /** - * The webRequest API set allows to intercept and modify contents of a request at various stages of its lifetime. - */ - webRequest: WebRequest; - /** - * @returns An instance of protocol module for this session. - */ - protocol: Protocol; - } - - type Permission = 'media' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal'; - - interface FromPartitionOptions { - /** - * Whether to enable cache. - */ - cache?: boolean; - } - - interface ClearStorageDataOptions { - /** - * Should follow window.location.origin’s representation scheme://host:port. - */ - origin?: string; - /** - * The types of storages to clear. - */ - storages?: ('appcache' | 'cookies' | 'filesystem' | 'indexdb' | 'localstorage' | 'shadercache' | 'websql' | 'serviceworkers')[]; - /** - * The types of quotas to clear. - */ - quotas?: ('temporary' | 'persistent' | 'syncable')[]; - } - - interface ProxyConfig { - /** - * The URL associated with the PAC file. - */ - pacScript: string; - /** - * Rules indicating which proxies to use. - */ - proxyRules: string; - /** - * Rules indicating which URLs should bypass the proxy settings. - */ - proxyBypassRules: string; - } - - interface NetworkEmulationOptions { - /** - * Whether to emulate network outage. - * Default: false. - */ - offline?: boolean; - /** - * RTT in ms. - * Default: 0, which will disable latency throttling. - */ - latency?: number; - /** - * Download rate in Bps. - * Default: 0, which will disable download throttling. - */ - downloadThroughput?: number; - /** - * Upload rate in Bps. - * Default: 0, which will disable upload throttling. - */ - uploadThroughput?: number; - } - - interface CookieFilter { - /** - * Retrieves cookies which are associated with url. Empty implies retrieving cookies of all urls. - */ - url?: string; - /** - * Filters cookies by name. - */ - name?: string; - /** - * Retrieves cookies whose domains match or are subdomains of domains. - */ - domain?: string; - /** - * Retrieves cookies whose path matches path. - */ - path?: string; - /** - * Filters cookies by their Secure property. - */ - secure?: boolean; - /** - * Filters out session or persistent cookies. - */ - session?: boolean; - } - - interface Cookie { - /** - * Emitted when a cookie is changed because it was added, edited, removed, or expired. - */ - on(event: 'changed', listener: (event: Event, cookie: Cookie, cause: CookieChangedCause) => void): this; - on(event: string, listener: Function): this; - /** - * The name of the cookie. - */ - name: string; - /** - * The value of the cookie. - */ - value: string; - /** - * The domain of the cookie. - */ - domain: string; - /** - * Whether the cookie is a host-only cookie. - */ - hostOnly: string; - /** - * The path of the cookie. - */ - path: string; - /** - * Whether the cookie is marked as secure. - */ - secure: boolean; - /** - * Whether the cookie is marked as HTTP only. - */ - httpOnly: boolean; - /** - * Whether the cookie is a session cookie or a persistent cookie with an expiration date. - */ - session: boolean; - /** - * The expiration date of the cookie as the number of seconds since the UNIX epoch. - * Not provided for session cookies. - */ - expirationDate?: number; - } - - type CookieChangedCause = 'explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'; - - interface CookieDetails { - /** - * The URL associated with the cookie. - */ - url: string; - /** - * The name of the cookie. - * Default: empty. - */ - name?: string; - /** - * The value of the cookie. - * Default: empty. - */ - value?: string; - /** - * The domain of the cookie. - * Default: empty. - */ - domain?: string; - /** - * The path of the cookie. - * Default: empty. - */ - path?: string; - /** - * Whether the cookie should be marked as secure. - * Default: false. - */ - secure?: boolean; - /** - * Whether the cookie should be marked as HTTP only. - * Default: false. - */ - httpOnly?: boolean; - /** - * The expiration date of the cookie as the number of seconds since the UNIX epoch. - * If omitted, the cookie becomes a session cookie. - */ - expirationDate?: number; - } - - interface SessionCookies { - /** - * Sends a request to get all cookies matching filter. - */ - get(filter: CookieFilter, callback: (error: Error, cookies: Cookie[]) => void): void; - /** - * Sets the cookie with details. - */ - set(details: CookieDetails, callback: (error: Error) => void): void; - /** - * Removes the cookies matching url and name. - */ - remove(url: string, name: string, callback: (error: Error) => void): void; - } - - /** - * Each API accepts an optional filter and a listener, the listener will be called when the API's event has happened. - * Passing null as listener will unsubscribe from the event. - * - * The filter will be used to filter out the requests that do not match the URL patterns. - * If the filter is omitted then all requests will be matched. - * - * For certain events the listener is passed with a callback, - * which should be called with an response object when listener has done its work. - */ - interface WebRequest { - /** - * The listener will be called when a request is about to occur. - */ - onBeforeRequest(listener: (details: WebRequest.BeforeRequestDetails, callback: WebRequest.BeforeRequestCallback) => void): void; - /** - * The listener will be called when a request is about to occur. - */ - onBeforeRequest(filter: WebRequest.Filter, listener: (details: WebRequest.BeforeRequestDetails, callback: WebRequest.BeforeRequestCallback) => void): void; - /** - * The listener will be called before sending an HTTP request, once the request headers are available. - * This may occur after a TCP connection is made to the server, but before any http data is sent. - */ - onBeforeSendHeaders(listener: (details: WebRequest.BeforeSendHeadersDetails, callback: WebRequest.BeforeSendHeadersCallback) => void): void; - /** - * The listener will be called before sending an HTTP request, once the request headers are available. - * This may occur after a TCP connection is made to the server, but before any http data is sent. - */ - onBeforeSendHeaders(filter: WebRequest.Filter, listener: (details: WebRequest.BeforeSendHeadersDetails, callback: WebRequest.BeforeSendHeadersCallback) => void): void; - /** - * The listener will be called just before a request is going to be sent to the server, - * modifications of previous onBeforeSendHeaders response are visible by the time this listener is fired. - */ - onSendHeaders(listener: (details: WebRequest.SendHeadersDetails) => void): void; - /** - * The listener will be called just before a request is going to be sent to the server, - * modifications of previous onBeforeSendHeaders response are visible by the time this listener is fired. - */ - onSendHeaders(filter: WebRequest.Filter, listener: (details: WebRequest.SendHeadersDetails) => void): void; - /** - * The listener will be called when HTTP response headers of a request have been received. - */ - onHeadersReceived(listener: (details: WebRequest.HeadersReceivedDetails, callback: WebRequest.HeadersReceivedCallback) => void): void; - /** - * The listener will be called when HTTP response headers of a request have been received. - */ - onHeadersReceived(filter: WebRequest.Filter, listener: (details: WebRequest.HeadersReceivedDetails, callback: WebRequest.HeadersReceivedCallback) => void): void; - /** - * The listener will be called when first byte of the response body is received. - * For HTTP requests, this means that the status line and response headers are available. - */ - onResponseStarted(listener: (details: WebRequest.ResponseStartedDetails) => void): void; - /** - * The listener will be called when first byte of the response body is received. - * For HTTP requests, this means that the status line and response headers are available. - */ - onResponseStarted(filter: WebRequest.Filter, listener: (details: WebRequest.ResponseStartedDetails) => void): void; - /** - * The listener will be called when a server initiated redirect is about to occur. - */ - onBeforeRedirect(listener: (details: WebRequest.BeforeRedirectDetails) => void): void; - /** - * The listener will be called when a server initiated redirect is about to occur. - */ - onBeforeRedirect(filter: WebRequest.Filter, listener: (details: WebRequest.BeforeRedirectDetails) => void): void; - /** - * The listener will be called when a request is completed. - */ - onCompleted(listener: (details: WebRequest.CompletedDetails) => void): void; - /** - * The listener will be called when a request is completed. - */ - onCompleted(filter: WebRequest.Filter, listener: (details: WebRequest.CompletedDetails) => void): void; - /** - * The listener will be called when an error occurs. - */ - onErrorOccurred(listener: (details: WebRequest.ErrorOccurredDetails) => void): void; - /** - * The listener will be called when an error occurs. - */ - onErrorOccurred(filter: WebRequest.Filter, listener: (details: WebRequest.ErrorOccurredDetails) => void): void; - } - - namespace WebRequest { - interface Filter { - urls: string[]; - } - - interface Details { - id: number; - url: string; - method: string; - resourceType: string; - timestamp: number; - } - - interface UploadData { - /** - * Content being sent. - */ - bytes: Buffer; - /** - * Path of file being uploaded. - */ - file: string; - /** - * UUID of blob data. Use session.getBlobData method to retrieve the data. - */ - blobUUID: string; - } - - interface BeforeRequestDetails extends Details { - uploadData?: UploadData[]; - } - - type BeforeRequestCallback = (response: { - cancel?: boolean; - /** - * The original request is prevented from being sent or completed, and is instead redirected to the given URL. - */ - redirectURL?: string; - }) => void; - - interface BeforeSendHeadersDetails extends Details { - requestHeaders: Headers; - } - - type BeforeSendHeadersCallback = (response: { - cancel?: boolean; - /** - * When provided, request will be made with these headers. - */ - requestHeaders?: Headers; - }) => void; - - interface SendHeadersDetails extends Details { - requestHeaders: Headers; - } - - interface HeadersReceivedDetails extends Details { - statusLine: string; - statusCode: number; - responseHeaders: Headers; - } - - type HeadersReceivedCallback = (response: { - cancel?: boolean; - /** - * When provided, the server is assumed to have responded with these headers. - */ - responseHeaders?: Headers; - /** - * Should be provided when overriding responseHeaders to change header status - * otherwise original response header's status will be used. - */ - statusLine?: string; - }) => void; - - interface ResponseStartedDetails extends Details { - responseHeaders: Headers; - fromCache: boolean; - statusCode: number; - statusLine: string; - } - - interface BeforeRedirectDetails extends Details { - redirectURL: string; - statusCode: number; - ip?: string; - fromCache: boolean; - responseHeaders: Headers; - } - - interface CompletedDetails extends Details { - responseHeaders: Headers; - fromCache: boolean; - statusCode: number; - statusLine: string; - } - - interface ErrorOccurredDetails extends Details { - fromCache: boolean; - error: string; - } - } - - // https://github.com/electron/electron/blob/master/docs/api/shell.md - - /** - * The shell module provides functions related to desktop integration. - */ - interface Shell { - /** - * Show the given file in a file manager. If possible, select the file. - * @returns Whether the item was successfully shown. - */ - showItemInFolder(fullPath: string): boolean; - /** - * Open the given file in the desktop's default manner. - * @returns Whether the item was successfully shown. - */ - openItem(fullPath: string): boolean; - /** - * Open the given external protocol URL in the desktop's default manner - * (e.g., mailto: URLs in the default mail user agent). - * @returns Whether an application was available to open the URL. - */ - openExternal(url: string, options?: { - /** - * Bring the opened application to the foreground. - * Default: true. - */ - activate: boolean; - }): boolean; - /** - * Move the given file to trash. - * @returns Whether the item was successfully moved to the trash. - */ - moveItemToTrash(fullPath: string): boolean; - /** - * Play the beep sound. - */ - beep(): void; - /** - * Creates or updates a shortcut link at shortcutPath. - * - * Note: This API is available only on Windows. - */ - writeShortcutLink(shortcutPath: string, options: ShortcutLinkOptions): boolean; - /** - * Creates or updates a shortcut link at shortcutPath. - * - * Note: This API is available only on Windows. - */ - writeShortcutLink(shortcutPath: string, operation: 'create' | 'update' | 'replace', options: ShortcutLinkOptions): boolean; - /** - * Resolves the shortcut link at shortcutPath. - * An exception will be thrown when any error happens. - * - * Note: This API is available only on Windows. - */ - readShortcutLink(shortcutPath: string): ShortcutLinkOptions; - } - - interface ShortcutLinkOptions { - /** - * The target to launch from this shortcut. - */ - target: string; - /** - * The working directory. - * Default: empty. - */ - cwd?: string; - /** - * The arguments to be applied to target when launching from this shortcut. - * Default: empty. - */ - args?: string; - /** - * The description of the shortcut. - * Default: empty. - */ - description?: string; - /** - * The path to the icon, can be a DLL or EXE. icon and iconIndex have to be set together. - * Default: empty, which uses the target's icon. - */ - icon?: string; - /** - * The resource ID of icon when icon is a DLL or EXE. - * Default: 0. - */ - iconIndex?: number; - /** - * The Application User Model ID. - * Default: empty. - */ - appUserModelId?: string; - } - - // https://github.com/electron/electron/blob/master/docs/api/system-preferences.md - - type SystemColor = - '3d-dark-shadow' | // Dark shadow for three-dimensional display elements. - '3d-face' | // Face color for three-dimensional display elements and for dialog box backgrounds. - '3d-highlight' | // Highlight color for three-dimensional display elements. - '3d-light' | // Light color for three-dimensional display elements. - '3d-shadow' | // Shadow color for three-dimensional display elements. - 'active-border' | // Active window border. - 'active-caption' | // Active window title bar. Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled. - 'active-caption-gradient' | // Right side color in the color gradient of an active window's title bar. - 'app-workspace' | // Background color of multiple document interface (MDI) applications. - 'button-text' | // Text on push buttons. - 'caption-text' | // Text in caption, size box, and scroll bar arrow box. - 'desktop' | // Desktop background color. - 'disabled-text' | // Grayed (disabled) text. - 'highlight' | // Item(s) selected in a control. - 'highlight-text' | // Text of item(s) selected in a control. - 'hotlight' | // Color for a hyperlink or hot-tracked item. - 'inactive-border' | // Inactive window border. - 'inactive-caption' | // Inactive window caption. Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled. - 'inactive-caption-gradient' | // Right side color in the color gradient of an inactive window's title bar. - 'inactive-caption-text' | // Color of text in an inactive caption. - 'info-background' | // Background color for tooltip controls. - 'info-text' | // Text color for tooltip controls. - 'menu' | // Menu background. - 'menu-highlight' | // The color used to highlight menu items when the menu appears as a flat menu. - 'menubar' | // The background color for the menu bar when menus appear as flat menus. - 'menu-text' | // Text in menus. - 'scrollbar' | // Scroll bar gray area. - 'window' | // Window background. - 'window-frame' | // Window frame. - 'window-text'; // Text in windows. - - /** - * Get system preferences. - */ - interface SystemPreferences { - /** - * Note: This is only implemented on Windows. - */ - on(event: 'accent-color-changed', listener: (event: Event, newColor: string) => void): this; - /** - * Note: This is only implemented on Windows. - */ - on(event: 'color-changed', listener: (event: Event) => void): this; - /** - * Note: This is only implemented on Windows. - */ - on(event: 'inverted-color-scheme-changed', listener: ( - event: Event, - /** - * @param invertedColorScheme true if an inverted color scheme, such as a high contrast theme, is being used, false otherwise. - */ - invertedColorScheme: boolean - ) => void): this; - on(event: string, listener: Function): this; - /** - * @returns Whether the system is in Dark Mode. - * - * Note: This is only implemented on macOS. - */ - isDarkMode(): boolean; - /** - * @returns Whether the Swipe between pages setting is on. - * - * Note: This is only implemented on macOS. - */ - isSwipeTrackingFromScrollEventsEnabled(): boolean; - /** - * Posts event as native notifications of macOS. - * The userInfo contains the user information dictionary sent along with the notification. - * - * Note: This is only implemented on macOS. - */ - postNotification(event: string, userInfo: Object): void; - /** - * Posts event as native notifications of macOS. - * The userInfo contains the user information dictionary sent along with the notification. - * - * Note: This is only implemented on macOS. - */ - postLocalNotification(event: string, userInfo: Object): void; - /** - * Subscribes to native notifications of macOS, callback will be called when the corresponding event happens. - * The id of the subscriber is returned, which can be used to unsubscribe the event. - * - * Note: This is only implemented on macOS. - */ - subscribeNotification(event: string, callback: (event: Event, userInfo: Object) => void): number; - /** - * Removes the subscriber with id. - * - * Note: This is only implemented on macOS. - */ - unsubscribeNotification(id: number): void; - /** - * Same as subscribeNotification, but uses NSNotificationCenter for local defaults. - */ - subscribeLocalNotification(event: string, callback: (event: Event, userInfo: Object) => void): number; - /** - * Same as unsubscribeNotification, but removes the subscriber from NSNotificationCenter. - */ - unsubscribeLocalNotification(id: number): void; - /** - * Get the value of key in system preferences. - * - * Note: This is only implemented on macOS. - */ - getUserDefault(key: string, type: 'string' | 'boolean' | 'integer' | 'float' | 'double' | 'url' | 'array' | 'dictionary'): any; - /** - * @returns Whether DWM composition (Aero Glass) is enabled. - * - * Note: This is only implemented on Windows. - */ - isAeroGlassEnabled(): boolean; - /** - * @returns The users current system wide color preference in the form of an RGBA hexadecimal string. - * - * Note: This is only implemented on Windows. - */ - getAccentColor(): string; - /** - * @returns true if an inverted color scheme, such as a high contrast theme, is active, false otherwise. - * - * Note: This is only implemented on Windows. - */ - isInvertedColorScheme(): boolean; - /** - * @returns The system color setting in RGB hexadecimal form (#ABCDEF). See the Windows docs for more details. - * - * Note: This is only implemented on Windows. - */ - getColor(color: SystemColor): string; - } - - // https://github.com/electron/electron/blob/master/docs/api/tray.md - - /** - * A Tray represents an icon in an operating system's notification area. - */ - class Tray extends NodeJS.EventEmitter implements Destroyable { - /** - * Emitted when the tray icon is clicked. - * Note: The bounds payload is only implemented on macOS and Windows. - */ - on(event: 'click', listener: (modifiers: Modifiers, bounds: Rectangle) => void): this; - /** - * Emitted when the tray icon is right clicked. - * Note: This is only implemented on macOS and Windows. - */ - on(event: 'right-click', listener: (modifiers: Modifiers, bounds: Rectangle) => void): this; - /** - * Emitted when the tray icon is double clicked. - * Note: This is only implemented on macOS and Windows. - */ - on(event: 'double-click', listener: (modifiers: Modifiers, bounds: Rectangle) => void): this; - /** - * Emitted when the tray balloon shows. - * Note: This is only implemented on Windows. - */ - on(event: 'balloon-show', listener: Function): this; - /** - * Emitted when the tray balloon is clicked. - * Note: This is only implemented on Windows. - */ - on(event: 'balloon-click', listener: Function): this; - /** - * Emitted when the tray balloon is closed because of timeout or user manually closes it. - * Note: This is only implemented on Windows. - */ - on(event: 'balloon-closed', listener: Function): this; - /** - * Emitted when any dragged items are dropped on the tray icon. - * Note: This is only implemented on macOS. - */ - on(event: 'drop', listener: Function): this; - /** - * Emitted when dragged files are dropped in the tray icon. - * Note: This is only implemented on macOS - */ - on(event: 'drop-files', listener: (event: Event, files: string[]) => void): this; - /** - * Emitted when dragged text is dropped in the tray icon. - * Note: This is only implemented on macOS - */ - on(event: 'drop-text', listener: (event: Event, text: string) => void): this; - /** - * Emitted when a drag operation enters the tray icon. - * Note: This is only implemented on macOS - */ - on(event: 'drag-enter', listener: Function): this; - /** - * Emitted when a drag operation exits the tray icon. - * Note: This is only implemented on macOS - */ - on(event: 'drag-leave', listener: Function): this; - /** - * Emitted when a drag operation ends on the tray or ends at another location. - * Note: This is only implemented on macOS - */ - on(event: 'drag-end', listener: Function): this; - on(event: string, listener: Function): this; - /** - * Creates a new tray icon associated with the image. - */ - constructor(image: NativeImage|string); - /** - * Destroys the tray icon immediately. - */ - destroy(): void; - /** - * Sets the image associated with this tray icon. - */ - setImage(image: NativeImage|string): void; - /** - * Sets the image associated with this tray icon when pressed. - */ - setPressedImage(image: NativeImage): void; - /** - * Sets the hover text for this tray icon. - */ - setToolTip(toolTip: string): void; - /** - * Sets the title displayed aside of the tray icon in the status bar. - * Note: This is only implemented on macOS. - */ - setTitle(title: string): void; - /** - * Sets when the tray's icon background becomes highlighted. - * Note: This is only implemented on macOS. - */ - setHighlightMode(mode: 'selection' | 'always' | 'never'): void; - /** - * Displays a tray balloon. - * Note: This is only implemented on Windows. - */ - displayBalloon(options?: { - icon?: NativeImage; - title?: string; - content?: string; - }): void; - /** - * Pops up the context menu of tray icon. When menu is passed, - * the menu will showed instead of the tray's context menu. - * The position is only available on Windows, and it is (0, 0) by default. - * Note: This is only implemented on macOS and Windows. - */ - popUpContextMenu(menu?: Menu, position?: Point): void; - /** - * Sets the context menu for this icon. - */ - setContextMenu(menu: Menu): void; - /** - * @returns The bounds of this tray icon. - */ - getBounds(): Rectangle; - /** - * @returns Whether the tray icon is destroyed. - */ - isDestroyed(): boolean; - } - - interface Modifiers { - altKey: boolean; - shiftKey: boolean; - ctrlKey: boolean; - metaKey: boolean; - } - - interface DragItem { - /** - * The absolute path of the file to be dragged - */ - file: string; - /** - * The image showing under the cursor when dragging. - */ - icon: NativeImage; - } - - // https://github.com/electron/electron/blob/master/docs/api/web-contents.md - - interface WebContentsStatic { - /** - * @returns An array of all WebContents instances. This will contain web contents for all windows, - * webviews, opened devtools, and devtools extension background pages. - */ - getAllWebContents(): WebContents[]; - /** - * @returns The web contents that is focused in this application, otherwise returns null. - */ - getFocusedWebContents(): WebContents; - /** - * Find a WebContents instance according to its ID. - */ - fromId(id: number): WebContents; - } - - /** - * A WebContents is responsible for rendering and controlling a web page. - */ - interface WebContents extends NodeJS.EventEmitter { - /** - * Emitted when the navigation is done, i.e. the spinner of the tab has stopped spinning, - * and the onload event was dispatched. - */ - on(event: 'did-finish-load', listener: Function): this; - /** - * This event is like did-finish-load but emitted when the load failed or was cancelled, - * e.g. window.stop() is invoked. - */ - on(event: 'did-fail-load', listener: (event: Event, errorCode: number, errorDescription: string, validatedURL: string, isMainFrame: boolean) => void): this; - /** - * Emitted when a frame has done navigation. - */ - on(event: 'did-frame-finish-load', listener: (event: Event, isMainFrame: boolean) => void): this; - /** - * Corresponds to the points in time when the spinner of the tab started spinning. - */ - on(event: 'did-start-loading', listener: Function): this; - /** - * Corresponds to the points in time when the spinner of the tab stopped spinning. - */ - on(event: 'did-stop-loading', listener: Function): this; - /** - * Emitted when details regarding a requested resource are available. - * status indicates the socket connection to download the resource. - */ - on(event: 'did-get-response-details', listener: (event: Event, - status: boolean, - newURL: string, - originalURL: string, - httpResponseCode: number, - requestMethod: string, - referrer: string, - headers: Headers, - resourceType: string - ) => void): this; - /** - * Emitted when a redirect is received while requesting a resource. - */ - on(event: 'did-get-redirect-request', listener: (event: Event, - oldURL: string, - newURL: string, - isMainFrame: boolean, - httpResponseCode: number, - requestMethod: string, - referrer: string, - headers: Headers - ) => void): this; - /** - * Emitted when the document in the given frame is loaded. - */ - on(event: 'dom-ready', listener: (event: Event) => void): this; - /** - * Emitted when page receives favicon URLs. - */ - on(event: 'page-favicon-updated', listener: (event: Event, favicons: string[]) => void): this; - /** - * Emitted when the page requests to open a new window for a url. - * It could be requested by window.open or an external link like . - * - * By default a new BrowserWindow will be created for the url. - * - * Calling event.preventDefault() will prevent creating new windows. - */ - on(event: 'new-window', listener: (event: Event, - url: string, - frameName: string, - disposition: NewWindowDisposition, - options: BrowserWindowOptions - ) => void): this; - /** - * Emitted when a user or the page wants to start navigation. - * It can happen when the window.location object is changed or a user clicks a link in the page. - * - * This event will not emit when the navigation is started programmatically with APIs like - * webContents.loadURL and webContents.back. - * - * It is also not emitted for in-page navigations, such as clicking anchor links - * or updating the window.location.hash. Use did-navigate-in-page event for this purpose. - * - * Calling event.preventDefault() will prevent the navigation. - */ - on(event: 'will-navigate', listener: (event: Event, url: string) => void): this; - /** - * Emitted when a navigation is done. - * - * This event is not emitted for in-page navigations, such as clicking anchor links - * or updating the window.location.hash. Use did-navigate-in-page event for this purpose. - */ - on(event: 'did-navigate', listener: (event: Event, url: string) => void): this; - /** - * Emitted when an in-page navigation happened. - * - * When in-page navigation happens, the page URL changes but does not cause - * navigation outside of the page. Examples of this occurring are when anchor links - * are clicked or when the DOM hashchange event is triggered. - */ - on(event: 'did-navigate-in-page', listener: (event: Event, url: string, isMainFrame: boolean) => void): this; - /** - * Emitted when the renderer process has crashed. - */ - on(event: 'crashed', listener: (event: Event, killed: boolean) => void): this; - /** - * Emitted when a plugin process has crashed. - */ - on(event: 'plugin-crashed', listener: (event: Event, name: string, version: string) => void): this; - /** - * Emitted when webContents is destroyed. - */ - on(event: 'destroyed', listener: Function): this; - /** - * Emitted when DevTools is opened. - */ - on(event: 'devtools-opened', listener: Function): this; - /** - * Emitted when DevTools is closed. - */ - on(event: 'devtools-closed', listener: Function): this; - /** - * Emitted when DevTools is focused / opened. - */ - on(event: 'devtools-focused', listener: Function): this; - /** - * Emitted when failed to verify the certificate for url. - * The usage is the same with the "certificate-error" event of app. - */ - on(event: 'certificate-error', listener: (event: Event, - url: string, - error: string, - certificate: Certificate, - callback: (trust: boolean) => void - ) => void): this; - /** - * Emitted when a client certificate is requested. - * The usage is the same with the "select-client-certificate" event of app. - */ - on(event: 'select-client-certificate', listener: (event: Event, - url: string, - certificateList: Certificate[], - callback: (certificate: Certificate) => void - ) => void): this; - /** - * Emitted when webContents wants to do basic auth. - * The usage is the same with the "login" event of app. - */ - on(event: 'login', listener: (event: Event, - request: LoginRequest, - authInfo: LoginAuthInfo, - callback: (username: string, password: string) => void - ) => void): this; - /** - * Emitted when a result is available for webContents.findInPage request. - */ - on(event: 'found-in-page', listener: (event: Event, result: FoundInPageResult) => void): this; - /** - * Emitted when media starts playing. - */ - on(event: 'media-started-playing', listener: Function): this; - /** - * Emitted when media is paused or done playing. - */ - on(event: 'media-paused', listener: Function): this; - /** - * Emitted when a page’s theme color changes. This is usually due to encountering a meta tag: - * - */ - on(event: 'did-change-theme-color', listener: Function): this; - /** - * Emitted when mouse moves over a link or the keyboard moves the focus to a link. - */ - on(event: 'update-target-url', listener: (event: Event, url: string) => void): this; - /** - * Emitted when the cursor’s type changes. - * If the type parameter is custom, the image parameter will hold the custom cursor image - * in a NativeImage, and scale, size and hotspot will hold additional information about the custom cursor. - */ - on(event: 'cursor-changed', listener: (event: Event, type: CursorType, image?: NativeImage, scale?: number, size?: Size, hotspot?: Point) => void): this; - /** - * Emitted when there is a new context menu that needs to be handled. - */ - on(event: 'context-menu', listener: (event: Event, params: ContextMenuParams) => void): this; - /** - * Emitted when bluetooth device needs to be selected on call to navigator.bluetooth.requestDevice. - * To use navigator.bluetooth api webBluetooth should be enabled. - * If event.preventDefault is not called, first available device will be selected. - * callback should be called with deviceId to be selected, - * passing empty string to callback will cancel the request. - */ - on(event: 'select-bluetooth-device', listener: (event: Event, deviceList: BluetoothDevice[], callback: (deviceId: string) => void) => void): this; - /** - * Emitted when a new frame is generated. Only the dirty area is passed in the buffer. - */ - on(event: 'paint', listener: (event: Event, dirtyRect: Rectangle, image: NativeImage) => void): this; - on(event: string, listener: Function): this; - /** - * Loads the url in the window. - * @param url Must contain the protocol prefix (e.g., the http:// or file://). - */ - loadURL(url: string, options?: LoadURLOptions): void; - /** - * Initiates a download of the resource at url without navigating. - * The will-download event of session will be triggered. - */ - downloadURL(url: string): void; - /** - * @returns The URL of current web page. - */ - getURL(): string; - /** - * @returns The title of web page. - */ - getTitle(): string; - /** - * @returns Whether the web page is destroyed. - */ - isDestroyed(): boolean; - /** - * @returns Whether the web page is focused. - */ - isFocused(): boolean; - /** - * @returns Whether web page is still loading resources. - */ - isLoading(): boolean; - /** - * @returns Whether the main frame (and not just iframes or frames within it) is still loading. - */ - isLoadingMainFrame(): boolean; - /** - * @returns Whether web page is waiting for a first-response for the main - * resource of the page. - */ - isWaitingForResponse(): boolean; - /** - * Stops any pending navigation. - */ - stop(): void; - /** - * Reloads current page. - */ - reload(): void; - /** - * Reloads current page and ignores cache. - */ - reloadIgnoringCache(): void; - /** - * @returns Whether the web page can go back. - */ - canGoBack(): boolean; - /** - * @returns Whether the web page can go forward. - */ - canGoForward(): boolean; - /** - * @returns Whether the web page can go to offset. - */ - canGoToOffset(offset: number): boolean; - /** - * Clears the navigation history. - */ - clearHistory(): void; - /** - * Makes the web page go back. - */ - goBack(): void; - /** - * Makes the web page go forward. - */ - goForward(): void; - /** - * Navigates to the specified absolute index. - */ - goToIndex(index: number): void; - /** - * Navigates to the specified offset from the "current entry". - */ - goToOffset(offset: number): void; - /** - * @returns Whether the renderer process has crashed. - */ - isCrashed(): boolean; - /** - * Overrides the user agent for this page. - */ - setUserAgent(userAgent: string): void; - /** - * @returns The user agent for this web page. - */ - getUserAgent(): string; - /** - * Injects CSS into this page. - */ - insertCSS(css: string): void; - /** - * Evaluates code in page. - * @param code Code to evaluate. - * - * @returns Promise - */ - executeJavaScript(code: string, userGesture?: boolean, callback?: (result: any) => void): Promise; - /** - * Mute the audio on the current web page. - */ - setAudioMuted(muted: boolean): void; - /** - * @returns Whether this page has been muted. - */ - isAudioMuted(): boolean; - /** - * Changes the zoom factor to the specified factor. - * Zoom factor is zoom percent divided by 100, so 300% = 3.0. - */ - setZoomFactor(factor: number): void; - /** - * Sends a request to get current zoom factor. - */ - getZoomFactor(callback: (zoomFactor: number) => void): void; - /** - * Changes the zoom level to the specified level. - * The original size is 0 and each increment above or below represents - * zooming 20% larger or smaller to default limits of 300% and 50% of original size, respectively. - */ - setZoomLevel(level: number): void; - /** - * Sends a request to get current zoom level. - */ - getZoomLevel(callback: (zoomLevel: number) => void): void; - /** - * Sets the maximum and minimum zoom level. - */ - setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; - /** - * Sets the maximum and minimum layout-based (i.e. non-visual) zoom level. - */ - setLayoutZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; - /** - * Executes the editing command undo in web page. - */ - undo(): void; - /** - * Executes the editing command redo in web page. - */ - redo(): void; - /** - * Executes the editing command cut in web page. - */ - cut(): void; - /** - * Executes the editing command copy in web page. - */ - copy(): void; - /** - * Copy the image at the given position to the clipboard. - */ - copyImageAt(x: number, y: number): void; - /** - * Executes the editing command paste in web page. - */ - paste(): void; - /** - * Executes the editing command pasteAndMatchStyle in web page. - */ - pasteAndMatchStyle(): void; - /** - * Executes the editing command delete in web page. - */ - delete(): void; - /** - * Executes the editing command selectAll in web page. - */ - selectAll(): void; - /** - * Executes the editing command unselect in web page. - */ - unselect(): void; - /** - * Executes the editing command replace in web page. - */ - replace(text: string): void; - /** - * Executes the editing command replaceMisspelling in web page. - */ - replaceMisspelling(text: string): void; - /** - * Inserts text to the focused element. - */ - insertText(text: string): void; - /** - * Starts a request to find all matches for the text in the web page. - * The result of the request can be obtained by subscribing to found-in-page event. - * @returns The request id used for the request. - */ - findInPage(text: string, options?: FindInPageOptions): number; - /** - * Stops any findInPage request for the webContents with the provided action. - */ - stopFindInPage(action: StopFindInPageAtion): void; - /** - * Checks if any serviceworker is registered. - */ - hasServiceWorker(callback: (hasServiceWorker: boolean) => void): void; - /** - * Unregisters any serviceworker if present. - */ - unregisterServiceWorker(callback: (isFulfilled: boolean) => void): void; - /** - * Prints window's web page. When silent is set to false, Electron will pick up system's default printer and default settings for printing. - * Calling window.print() in web page is equivalent to call WebContents.print({silent: false, printBackground: false}). - * Note: On Windows, the print API relies on pdf.dll. If your application doesn't need print feature, you can safely remove pdf.dll in saving binary size. - */ - print(options?: PrintOptions): void; - /** - * Prints windows' web page as PDF with Chromium's preview printing custom settings. - */ - printToPDF(options: PrintToPDFOptions, callback: (error: Error, data: Buffer) => void): void; - /** - * Adds the specified path to DevTools workspace. - */ - addWorkSpace(path: string): void; - /** - * Removes the specified path from DevTools workspace. - */ - removeWorkSpace(path: string): void; - /** - * Opens the developer tools. - */ - openDevTools(options?: { - /** - * Opens the devtools with specified dock state. Defaults to last used dock state. - */ - mode?: 'right' | 'bottom' | 'undocked' | 'detach' - }): void; - /** - * Closes the developer tools. - */ - closeDevTools(): void; - /** - * Returns whether the developer tools are opened. - */ - isDevToolsOpened(): boolean; - /** - * Returns whether the developer tools are focussed. - */ - isDevToolsFocused(): boolean; - /** - * Toggle the developer tools. - */ - toggleDevTools(): void; - /** - * Starts inspecting element at position (x, y). - */ - inspectElement(x: number, y: number): void; - /** - * Opens the developer tools for the service worker context. - */ - inspectServiceWorker(): void; - /** - * Send args.. to the web page via channel in asynchronous message, the web page - * can handle it by listening to the channel event of ipc module. - * Note: - * 1. The IPC message handler in web pages do not have a event parameter, - * which is different from the handlers on the main process. - * 2. There is no way to send synchronous messages from the main process - * to a renderer process, because it would be very easy to cause dead locks. - */ - send(channel: string, ...args: any[]): void; - /** - * Enable device emulation with the given parameters. - */ - enableDeviceEmulation(parameters: DeviceEmulationParameters): void; - /** - * Disable device emulation. - */ - disableDeviceEmulation(): void; - /** - * Sends an input event to the page. - */ - sendInputEvent(event: SendInputEvent): void; - /** - * Begin subscribing for presentation events and captured frames, - * The callback will be called when there is a presentation event. - */ - beginFrameSubscription(onlyDirty: boolean, callback: BeginFrameSubscriptionCallback): void; - /** - * Begin subscribing for presentation events and captured frames, - * The callback will be called when there is a presentation event. - */ - beginFrameSubscription(callback: BeginFrameSubscriptionCallback): void; - /** - * End subscribing for frame presentation events. - */ - endFrameSubscription(): void; - /** - * @returns If the process of saving page has been initiated successfully. - */ - savePage(fullPath: string, saveType: 'HTMLOnly' | 'HTMLComplete' | 'MHTML', callback?: (eror: Error) => void): boolean; - /** - * Shows pop-up dictionary that searches the selected word on the page. - * Note: This API is available only on macOS. - */ - showDefinitionForSelection(): void; - /** - * @returns Whether offscreen rendering is enabled. - */ - isOffscreen(): boolean; - /** - * If offscreen rendering is enabled and not painting, start painting. - */ - startPainting(): void; - /** - * If offscreen rendering is enabled and painting, stop painting. - */ - stopPainting(): void; - /** - * If offscreen rendering is enabled returns whether it is currently painting. - */ - isPainting(): boolean; - /** - * If offscreen rendering is enabled sets the frame rate to the specified number. - * Only values between 1 and 60 are accepted. - */ - setFrameRate(fps: number): void; - /** - * If offscreen rendering is enabled returns the current frame rate. - */ - getFrameRate(): number; - /** - * If offscreen rendering is enabled invalidates the frame and generates a new one through the 'paint' event. - */ - invalidate(): void; - /** - * Sets the item as dragging item for current drag-drop operation. - */ - startDrag(item: DragItem): void; - /** - * Captures a snapshot of the page within rect. - */ - capturePage(callback: (image: NativeImage) => void): void; - /** - * Captures a snapshot of the page within rect. - */ - capturePage(rect: Rectangle, callback: (image: NativeImage) => void): void; - /** - * @returns The unique ID of this WebContents. - */ - id: number; - /** - * @returns The session object used by this webContents. - */ - session: Session; - /** - * @returns The WebContents that might own this WebContents. - */ - hostWebContents: WebContents; - /** - * @returns The WebContents of DevTools for this WebContents. - * Note: Users should never store this object because it may become null - * when the DevTools has been closed. - */ - devToolsWebContents: WebContents; - /** - * @returns Debugger API - */ - debugger: Debugger; - } - - interface BeginFrameSubscriptionCallback { - ( - /** - * The frameBuffer is a Buffer that contains raw pixel data. - * On most machines, the pixel data is effectively stored in 32bit BGRA format, - * but the actual representation depends on the endianness of the processor - * (most modern processors are little-endian, on machines with big-endian - * processors the data is in 32bit ARGB format). - */ - frameBuffer: Buffer, - /** - * The dirtyRect is an object with x, y, width, height properties that describes which part of the page was repainted. - * If onlyDirty is set to true, frameBuffer will only contain the repainted area. onlyDirty defaults to false. - */ - dirtyRect?: Rectangle - ): void - } - - interface ContextMenuParams { - /** - * x coordinate - */ - x: number; - /** - * y coordinate - */ - y: number; - /** - * URL of the link that encloses the node the context menu was invoked on. - */ - linkURL: string; - /** - * Text associated with the link. May be an empty string if the contents of the link are an image. - */ - linkText: string; - /** - * URL of the top level page that the context menu was invoked on. - */ - pageURL: string; - /** - * URL of the subframe that the context menu was invoked on. - */ - frameURL: string; - /** - * Source URL for the element that the context menu was invoked on. - * Elements with source URLs are images, audio and video. - */ - srcURL: string; - /** - * Type of the node the context menu was invoked on. - */ - mediaType: 'none' | 'image' | 'audio' | 'video' | 'canvas' | 'file' | 'plugin'; - /** - * Parameters for the media element the context menu was invoked on. - */ - mediaFlags: { - /** - * Whether the media element has crashed. - */ - inError: boolean; - /** - * Whether the media element is paused. - */ - isPaused: boolean; - /** - * Whether the media element is muted. - */ - isMuted: boolean; - /** - * Whether the media element has audio. - */ - hasAudio: boolean; - /** - * Whether the media element is looping. - */ - isLooping: boolean; - /** - * Whether the media element's controls are visible. - */ - isControlsVisible: boolean; - /** - * Whether the media element's controls are toggleable. - */ - canToggleControls: boolean; - /** - * Whether the media element can be rotated. - */ - canRotate: boolean; - } - /** - * Whether the context menu was invoked on an image which has non-empty contents. - */ - hasImageContents: boolean; - /** - * Whether the context is editable. - */ - isEditable: boolean; - /** - * These flags indicate whether the renderer believes it is able to perform the corresponding action. - */ - editFlags: { - /** - * Whether the renderer believes it can undo. - */ - canUndo: boolean; - /** - * Whether the renderer believes it can redo. - */ - canRedo: boolean; - /** - * Whether the renderer believes it can cut. - */ - canCut: boolean; - /** - * Whether the renderer believes it can copy - */ - canCopy: boolean; - /** - * Whether the renderer believes it can paste. - */ - canPaste: boolean; - /** - * Whether the renderer believes it can delete. - */ - canDelete: boolean; - /** - * Whether the renderer believes it can select all. - */ - canSelectAll: boolean; - } - /** - * Text of the selection that the context menu was invoked on. - */ - selectionText: string; - /** - * Title or alt text of the selection that the context was invoked on. - */ - titleText: string; - /** - * The misspelled word under the cursor, if any. - */ - misspelledWord: string; - /** - * The character encoding of the frame on which the menu was invoked. - */ - frameCharset: string; - /** - * If the context menu was invoked on an input field, the type of that field. - */ - inputFieldType: 'none' | 'plainText' | 'password' | 'other'; - /** - * Input source that invoked the context menu. - */ - menuSourceType: 'none' | 'mouse' | 'keyboard' | 'touch' | 'touchMenu'; - } - - interface BluetoothDevice { - deviceName: string; - deviceId: string; - } - - interface Headers { - [key: string]: string; - } - - type NewWindowDisposition = 'default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'; - - /** - * Specifies the action to take place when ending webContents.findInPage request. - * 'clearSelection' - Clear the selection. - * 'keepSelection' - Translate the selection into a normal selection. - * 'activateSelection' - Focus and click the selection node. - */ - type StopFindInPageAtion = 'clearSelection' | 'keepSelection' | 'activateSelection'; - - type CursorType = 'default' | 'crosshair' | 'pointer' | 'text' | 'wait' | 'help' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ns-resize' | 'ew-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'm-panning' | 'e-panning' | 'n-panning' | 'ne-panning' | 'nw-panning' | 's-panning' | 'se-panning' |'sw-panning' | 'w-panning' | 'move' | 'vertical-text' | 'cell' | 'context-menu' | 'alias' | 'progress' | 'nodrop' | 'copy' | 'none' | 'not-allowed' | 'zoom-in' | 'zoom-out' | 'grab' | 'grabbing' | 'custom'; - - interface LoadURLOptions { - /** - * HTTP Referrer URL. - */ - httpReferrer?: string; - /** - * User agent originating the request. - */ - userAgent?: string; - /** - * Extra headers separated by "\n" - */ - extraHeaders?: string; - /** - * POST data - */ - postData?: (UploadRawData | UploadFileSystem | UploadBlob)[]; - } - - interface UploadRawData { - /** - * rawData - */ - type: 'rawData'; - /** - * Data to be uploaded. - */ - bytes: Buffer; - } - - interface UploadFileSystem { - /** - * fileSystem - */ - type: 'fileSystem'; - /** - * FileSystem url to read data for upload. - */ - fileSystemURL: string; - /** - * Defaults to 0. - */ - offset: number; - /** - * Number of bytes to read from offset. Defaults to 0. - */ - length: number; - /** - * Last Modification time in number of seconds sine the UNIX epoch. - */ - modificationTime: number; - } - - interface UploadBlob { - /** - * blob - */ - type: 'blob'; - /** - * UUID of blob data to upload. - */ - blobUUID: string; - } - - interface PrintOptions { - /** - * Don't ask user for print settings. - * Defaults: false. - */ - silent?: boolean; - /** - * Also prints the background color and image of the web page. - * Defaults: false. - */ - printBackground?: boolean; - } - - interface PrintToPDFOptions { - /** - * Specify the type of margins to use. - * 0 - default - * 1 - none - * 2 - minimum - * Default: 0 - */ - marginsType?: number; - /** - * Specify page size of the generated PDF. - * Default: A4. - */ - pageSize?: 'A3' | 'A4' | 'A5' | 'Legal' | 'Letter' | 'Tabloid' | Size; - /** - * Whether to print CSS backgrounds. - * Default: false. - */ - printBackground?: boolean; - /** - * Whether to print selection only. - * Default: false. - */ - printSelectionOnly?: boolean; - /** - * true for landscape, false for portrait. - * Default: false. - */ - landscape?: boolean; - } - - interface Certificate { - /** - * PEM encoded data. - */ - data: string; - /** - * Issuer principal - */ - issuer: CertificatePrincipal; - /** - * Issuer's Common Name. - */ - issuerName: string; - /** - * Issuer certificate (if not self-signed) - */ - issuerCert: Certificate; - /** - * Subject principal - */ - subject: CertificatePrincipal; - /** - * Subject's Common Name. - */ - subjectName: string; - /** - * Hex value represented string. - */ - serialNumber: string; - /** - * Start date of the certificate being valid in seconds. - */ - validStart: number; - /** - * End date of the certificate being valid in seconds. - */ - validExpiry: number; - /** - * Fingerprint of the certificate. - */ - fingerprint: string; - } - - interface CertificatePrincipal { - /** - * Common Name - */ - commonName: string; - /** - * Organization names - */ - organizations: string[]; - /** - * Organization Unit names - */ - organizationUnits: string[]; - /** - * Locality - */ - locality: string; - /** - * State or province - */ - state: string; - /** - * Country or region - */ - country: string; - } - - interface LoginRequest { - method: string; - url: string; - referrer: string; - } - - interface LoginAuthInfo { - isProxy: boolean; - scheme: string; - host: string; - port: number; - realm: string; - } - - interface FindInPageOptions { - /** - * Whether to search forward or backward, defaults to true - */ - forward?: boolean; - /** - * Whether the operation is first request or a follow up, defaults to false. - */ - findNext?: boolean; - /** - * Whether search should be case-sensitive, defaults to false. - */ - matchCase?: boolean; - /** - * Whether to look only at the start of words. defaults to false. - */ - wordStart?: boolean; - /** - * When combined with wordStart, accepts a match in the middle of a word - * if the match begins with an uppercase letter followed by a lowercase - * or non-letter. Accepts several other intra-word matches, defaults to false. - */ - medialCapitalAsWordStart?: boolean; - } - - interface FoundInPageResult { - requestId: number; - /** - * Indicates if more responses are to follow. - */ - finalUpdate: boolean; - /** - * Position of the active match. - */ - activeMatchOrdinal?: number; - /** - * Number of Matches. - */ - matches?: number; - /** - * Coordinates of first match region. - */ - selectionArea?: Rectangle; - } - - interface DeviceEmulationParameters { - /** - * Specify the screen type to emulated - * Default: desktop - */ - screenPosition?: 'desktop' | 'mobile'; - /** - * Set the emulated screen size (screenPosition == mobile) - */ - screenSize?: Size; - /** - * Position the view on the screen (screenPosition == mobile) - * Default: {x: 0, y: 0} - */ - viewPosition?: Point; - /** - * Set the device scale factor (if zero defaults to original device scale factor) - * Default: 0 - */ - deviceScaleFactor: number; - /** - * Set the emulated view size (empty means no override). - */ - viewSize?: Size; - /** - * Whether emulated view should be scaled down if necessary to fit into available space - * Default: false - */ - fitToView?: boolean; - /** - * Offset of the emulated view inside available space (not in fit to view mode) - * Default: {x: 0, y: 0} - */ - offset?: Point; - /** - * Scale of emulated view inside available space (not in fit to view mode) - * Default: 1 - */ - scale: number; - } - - interface SendInputEvent { - type: 'mouseDown' | 'mouseUp' | 'mouseEnter' | 'mouseLeave' | 'contextMenu' | 'mouseWheel' | 'mouseMove' | 'keyDown' | 'keyUp' | 'char'; - modifiers: ('shift' | 'control' | 'alt' | 'meta' | 'isKeypad' | 'isAutoRepeat' | 'leftButtonDown' | 'middleButtonDown' | 'rightButtonDown' | 'capsLock' | 'numLock' | 'left' | 'right')[]; - } - - interface SendInputKeyboardEvent extends SendInputEvent { - keyCode: string; - } - - interface SendInputMouseEvent extends SendInputEvent { - x: number; - y: number; - button?: 'left' | 'middle' | 'right'; - globalX?: number; - globalY?: number; - movementX?: number; - movementY?: number; - clickCount?: number; - } - - interface SendInputMouseWheelEvent extends SendInputEvent { - deltaX?: number; - deltaY?: number; - wheelTicksX?: number; - wheelTicksY?: number; - accelerationRatioX?: number; - accelerationRatioY?: number; - hasPreciseScrollingDeltas?: boolean; - canScroll?: boolean; - } - - /** - * Debugger API serves as an alternate transport for remote debugging protocol. - */ - interface Debugger extends NodeJS.EventEmitter { - /** - * Attaches the debugger to the webContents. - * @param protocolVersion Requested debugging protocol version. - */ - attach(protocolVersion?: string): void; - /** - * @returns Whether a debugger is attached to the webContents. - */ - isAttached(): boolean; - /** - * Detaches the debugger from the webContents. - */ - detach(): void; - /** - * Send given command to the debugging target. - * @param method Method name, should be one of the methods defined by the remote debugging protocol. - * @param commandParams JSON object with request parameters. - * @param callback Response defined by the ‘returns’ attribute of the command description in the remote debugging protocol. - */ - sendCommand(method: string, commandParams?: any, callback?: (error: Error, result: any) => void): void; - /** - * Emitted when debugging session is terminated. This happens either when - * webContents is closed or devtools is invoked for the attached webContents. - */ - on(event: 'detach', listener: (event: Event, reason: string) => void): this; - /** - * Emitted whenever debugging target issues instrumentation event. - * Event parameters defined by the ‘parameters’ attribute in the remote debugging protocol. - */ - on(event: 'message', listener: (event: Event, method: string, params: any) => void): this; - on(event: string, listener: Function): this; - } - - // https://github.com/electron/electron/blob/master/docs/api/web-frame.md - - /** - * The web-frame module allows you to customize the rendering of the current web page. - */ - interface WebFrame { - /** - * Changes the zoom factor to the specified factor, zoom factor is - * zoom percent / 100, so 300% = 3.0. - */ - setZoomFactor(factor: number): void; - /** - * @returns The current zoom factor. - */ - getZoomFactor(): number; - /** - * Changes the zoom level to the specified level, 0 is "original size", and each - * increment above or below represents zooming 20% larger or smaller to default - * limits of 300% and 50% of original size, respectively. - */ - setZoomLevel(level: number): void; - /** - * @returns The current zoom level. - */ - getZoomLevel(): number; - /** - * Sets the maximum and minimum zoom level. - */ - setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; - /** - * Sets the maximum and minimum layout-based (i.e. non-visual) zoom level. - */ - setLayoutZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; - /** - * Sets a provider for spell checking in input fields and text areas. - */ - setSpellCheckProvider(language: string, autoCorrectWord: boolean, provider: { - /** - * @returns Whether the word passed is correctly spelled. - */ - spellCheck: (text: string) => boolean; - }): void; - /** - * Sets the scheme as secure scheme. Secure schemes do not trigger mixed content - * warnings. For example, https and data are secure schemes because they cannot be - * corrupted by active network attackers. - */ - registerURLSchemeAsSecure(scheme: string): void; - /** - * Resources will be loaded from this scheme regardless of the current page’s Content Security Policy. - */ - registerURLSchemeAsBypassingCSP(scheme: string): void; - /** - * Registers the scheme as secure, bypasses content security policy for resources, - * allows registering ServiceWorker and supports fetch API. - */ - registerURLSchemeAsPrivileged(scheme: string, options?: RegisterURLSchemeOptions): void; - /** - * Inserts text to the focused element. - */ - insertText(text: string): void; - /** - * Evaluates `code` in page. - * In the browser window some HTML APIs like `requestFullScreen` can only be - * invoked by a gesture from the user. Setting `userGesture` to `true` will remove - * this limitation. - * - * @returns Promise - */ - executeJavaScript(code: string, userGesture?: boolean, callback?: (result: any) => void): Promise; - /** - * @returns Object describing usage information of Blink’s internal memory caches. - */ - getResourceUsage(): ResourceUsages; - /** - * Attempts to free memory that is no longer being used (like images from a previous navigation). - */ - clearCache(): void; - } - - interface ResourceUsages { - fonts: ResourceUsage; - images: ResourceUsage; - cssStyleSheets: ResourceUsage; - xslStyleSheets: ResourceUsage; - scripts: ResourceUsage; - other: ResourceUsage; - } - - interface ResourceUsage { - count: number; - decodedSize: number; - liveSize: number; - purgeableSize: number; - purgedSize: number; - size: number; - } - - interface RegisterURLSchemeOptions { - secure?: boolean; - bypassCSP?: boolean; - allowServiceWorkers?: boolean; - supportFetchAPI?: boolean; - corsEnabled?: boolean; - } - - // https://github.com/electron/electron/blob/master/docs/api/web-view-tag.md - - /** - * Use the webview tag to embed 'guest' content (such as web pages) in your Electron app. - * The guest content is contained within the webview container. - * An embedded page within your app controls how the guest content is laid out and rendered. - * - * Unlike an iframe, the webview runs in a separate process than your app. - * It doesn't have the same permissions as your web page and all interactions between your app - * and embedded content will be asynchronous. This keeps your app safe from the embedded content. - */ - interface WebViewElement extends HTMLElement { - /** - * Returns the visible URL. Writing to this attribute initiates top-level navigation. - * Assigning src its own value will reload the current page. - * The src attribute can also accept data URLs, such as data:text/plain,Hello, world!. - */ - src: string; - /** - * If "on", the webview container will automatically resize within the bounds specified - * by the attributes minwidth, minheight, maxwidth, and maxheight. - * These constraints do not impact the webview unless autosize is enabled. - * When autosize is enabled, the webview container size cannot be less than - * the minimum values or greater than the maximum. - */ - autosize: string; - /** - * If "on", the guest page in webview will have node integration and can use node APIs - * like require and process to access low level system resources. - */ - nodeintegration: string; - /** - * If "on", the guest page in webview will be able to use browser plugins. - */ - plugins: string; - /** - * Specifies a script that will be loaded before other scripts run in the guest page. - * The protocol of script's URL must be either file: or asar:, - * because it will be loaded by require in guest page under the hood. - * - * When the guest page doesn't have node integration this script will still have access to all Node APIs, - * but global objects injected by Node will be deleted after this script has finished executing. - */ - preload: string; - /** - * Sets the referrer URL for the guest page. - */ - httpreferrer: string; - /** - * Sets the user agent for the guest page before the page is navigated to. - * Once the page is loaded, use the setUserAgent method to change the user agent. - */ - useragent: string; - /** - * If "on", the guest page will have web security disabled. - */ - disablewebsecurity: string; - /** - * Sets the session used by the page. If partition starts with persist:, - * the page will use a persistent session available to all pages in the app with the same partition. - * If there is no persist: prefix, the page will use an in-memory session. - * By assigning the same partition, multiple pages can share the same session. - * If the partition is unset then default session of the app will be used. - * - * This value can only be modified before the first navigation, - * since the session of an active renderer process cannot change. - * Subsequent attempts to modify the value will fail with a DOM exception. - */ - partition: string; - /** - * If "on", the guest page will be allowed to open new windows. - */ - allowpopups: string; - /** - * A list of strings which specifies the web preferences to be set on the webview, separated by ,. - */ - webpreferences: string; - /** - * A list of strings which specifies the blink features to be enabled separated by ,. - */ - blinkfeatures: string; - /** - * A list of strings which specifies the blink features to be disabled separated by ,. - */ - disableblinkfeatures: string; - /** - * A value that links the webview to a specific webContents. - * When a webview first loads a new webContents is created and this attribute is set - * to its instance identifier. Setting this attribute on a new or existing webview connects - * it to the existing webContents that currently renders in a different webview. - * - * The existing webview will see the destroy event and will then create a new webContents when a new url is loaded. - */ - guestinstance: string; - /** - * Loads the url in the webview, the url must contain the protocol prefix, e.g. the http:// or file://. - */ - loadURL(url: string, options?: LoadURLOptions): void; - /** - * @returns URL of guest page. - */ - getURL(): string; - /** - * @returns The title of guest page. - */ - getTitle(): string; - /** - * @returns Whether the web page is destroyed. - */ - isDestroyed(): boolean; - /** - * @returns Whether the web page is focused. - */ - isFocused(): boolean; - /** - * @returns Whether guest page is still loading resources. - */ - isLoading(): boolean; - /** - * Returns a boolean whether the guest page is waiting for a first-response for the main resource of the page. - */ - isWaitingForResponse(): boolean; - /** - * Stops any pending navigation. - */ - stop(): void; - /** - * Reloads the guest page. - */ - reload(): void; - /** - * Reloads the guest page and ignores cache. - */ - reloadIgnoringCache(): void; - /** - * @returns Whether the guest page can go back. - */ - canGoBack(): boolean; - /** - * @returns Whether the guest page can go forward. - */ - canGoForward(): boolean; - /** - * @returns Whether the guest page can go to offset. - */ - canGoToOffset(offset: number): boolean; - /** - * Clears the navigation history. - */ - clearHistory(): void; - /** - * Makes the guest page go back. - */ - goBack(): void; - /** - * Makes the guest page go forward. - */ - goForward(): void; - /** - * Navigates to the specified absolute index. - */ - goToIndex(index: number): void; - /** - * Navigates to the specified offset from the "current entry". - */ - goToOffset(offset: number): void; - /** - * @returns Whether the renderer process has crashed. - */ - isCrashed(): boolean; - /** - * Overrides the user agent for the guest page. - */ - setUserAgent(userAgent: string): void; - /** - * @returns The user agent for guest page. - */ - getUserAgent(): string; - /** - * Injects CSS into the guest page. - */ - insertCSS(css: string): void; - /** - * Evaluates code in page. If userGesture is set, it will create the user gesture context in the page. - * HTML APIs like requestFullScreen, which require user action, can take advantage of this option for automation. - * - * @returns Promise - */ - executeJavaScript(code: string, userGesture?: boolean, callback?: (result: any) => void): Promise; - /** - * Opens a DevTools window for guest page. - */ - openDevTools(): void; - /** - * Closes the DevTools window of guest page. - */ - closeDevTools(): void; - /** - * @returns Whether guest page has a DevTools window attached. - */ - isDevToolsOpened(): boolean; - /** - * @returns Whether DevTools window of guest page is focused. - */ - isDevToolsFocused(): boolean; - /** - * Starts inspecting element at position (x, y) of guest page. - */ - inspectElement(x: number, y: number): void; - /** - * Opens the DevTools for the service worker context present in the guest page. - */ - inspectServiceWorker(): void; - /** - * Set guest page muted. - */ - setAudioMuted(muted: boolean): void; - /** - * @returns Whether guest page has been muted. - */ - isAudioMuted(): boolean; - /** - * Executes editing command undo in page. - */ - undo(): void; - /** - * Executes editing command redo in page. - */ - redo(): void; - /** - * Executes editing command cut in page. - */ - cut(): void; - /** - * Executes editing command copy in page. - */ - copy(): void; - /** - * Executes editing command paste in page. - */ - paste(): void; - /** - * Executes editing command pasteAndMatchStyle in page. - */ - pasteAndMatchStyle(): void; - /** - * Executes editing command delete in page. - */ - delete(): void; - /** - * Executes editing command selectAll in page. - */ - selectAll(): void; - /** - * Executes editing command unselect in page. - */ - unselect(): void; - /** - * Executes editing command replace in page. - */ - replace(text: string): void; - /** - * Executes editing command replaceMisspelling in page. - */ - replaceMisspelling(text: string): void; - /** - * Inserts text to the focused element. - */ - insertText(text: string): void; - /** - * Starts a request to find all matches for the text in the web page. - * The result of the request can be obtained by subscribing to found-in-page event. - * @returns The request id used for the request. - */ - findInPage(text: string, options?: FindInPageOptions): number; - /** - * Stops any findInPage request for the webview with the provided action. - */ - stopFindInPage(action: StopFindInPageAtion): void; - /** - * Prints webview's web page. Same with webContents.print([options]). - */ - print(options?: PrintOptions): void; - /** - * Prints webview's web page as PDF, Same with webContents.printToPDF(options, callback) - */ - printToPDF(options: PrintToPDFOptions, callback: (error: Error, data: Buffer) => void): void; - /** - * Send an asynchronous message to renderer process via channel, you can also send arbitrary arguments. - * The renderer process can handle the message by listening to the channel event with the ipcRenderer module. - * See webContents.send for examples. - */ - send(channel: string, ...args: any[]): void; - /** - * Sends an input event to the page. - * See webContents.sendInputEvent for detailed description of event object. - */ - sendInputEvent(event: SendInputEvent): void - /** - * Changes the zoom factor to the specified factor. - * Zoom factor is zoom percent divided by 100, so 300% = 3.0. - */ - setZoomFactor(factor: number): void; - /** - * Changes the zoom level to the specified level. - * The original size is 0 and each increment above or below represents - * zooming 20% larger or smaller to default limits of 300% and 50% of original size, respectively. - */ - setZoomLevel(level: number): void; - /** - * Shows pop-up dictionary that searches the selected word on the page. - * Note: This API is available only on macOS. - */ - showDefinitionForSelection(): void; - /** - * @returns The WebContents associated with this webview. - */ - getWebContents(): WebContents; - /** - * Captures a snapshot of the webview's page. Same as webContents.capturePage([rect, ]callback). - */ - capturePage(callback: (image: NativeImage) => void): void; - /** - * Captures a snapshot of the webview's page. Same as webContents.capturePage([rect, ]callback). - */ - capturePage(rect: Rectangle, callback: (image: NativeImage) => void): void; - /** - * Fired when a load has committed. This includes navigation within the current document - * as well as subframe document-level loads, but does not include asynchronous resource loads. - */ - addEventListener(type: 'load-commit', listener: (event: WebViewElement.LoadCommitEvent) => void, useCapture?: boolean): void; - /** - * Fired when the navigation is done, i.e. the spinner of the tab will stop spinning, and the onload event is dispatched. - */ - addEventListener(type: 'did-finish-load', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * This event is like did-finish-load, but fired when the load failed or was cancelled, e.g. window.stop() is invoked. - */ - addEventListener(type: 'did-fail-load', listener: (event: WebViewElement.DidFailLoadEvent) => void, useCapture?: boolean): void; - /** - * Fired when a frame has done navigation. - */ - addEventListener(type: 'did-frame-finish-load', listener: (event: WebViewElement.DidFrameFinishLoadEvent) => void, useCapture?: boolean): void; - /** - * Corresponds to the points in time when the spinner of the tab starts spinning. - */ - addEventListener(type: 'did-start-loading', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Corresponds to the points in time when the spinner of the tab stops spinning. - */ - addEventListener(type: 'did-stop-loading', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Fired when details regarding a requested resource is available. - * status indicates socket connection to download the resource. - */ - addEventListener(type: 'did-get-response-details', listener: (event: WebViewElement.DidGetResponseDetails) => void, useCapture?: boolean): void; - /** - * Fired when a redirect was received while requesting a resource. - */ - addEventListener(type: 'did-get-redirect-request', listener: (event: WebViewElement.DidGetRedirectRequestEvent) => void, useCapture?: boolean): void; - /** - * Fired when document in the given frame is loaded. - */ - addEventListener(type: 'dom-ready', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Fired when page title is set during navigation. explicitSet is false when title is synthesized from file URL. - */ - addEventListener(type: 'page-title-updated', listener: (event: WebViewElement.PageTitleUpdatedEvent) => void, useCapture?: boolean): void; - /** - * Fired when page receives favicon URLs. - */ - addEventListener(type: 'page-favicon-updated', listener: (event: WebViewElement.PageFaviconUpdatedEvent) => void, useCapture?: boolean): void; - /** - * Fired when page enters fullscreen triggered by HTML API. - */ - addEventListener(type: 'enter-html-full-screen', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Fired when page leaves fullscreen triggered by HTML API. - */ - addEventListener(type: 'leave-html-full-screen', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Fired when the guest window logs a console message. - */ - addEventListener(type: 'console-message', listener: (event: WebViewElement.ConsoleMessageEvent) => void, useCapture?: boolean): void; - /** - * Fired when a result is available for webview.findInPage request. - */ - addEventListener(type: 'found-in-page', listener: (event: WebViewElement.FoundInPageEvent) => void, useCapture?: boolean): void; - /** - * Fired when the guest page attempts to open a new browser window. - */ - addEventListener(type: 'new-window', listener: (event: WebViewElement.NewWindowEvent) => void, useCapture?: boolean): void; - /** - * Emitted when a user or the page wants to start navigation. - * It can happen when the window.location object is changed or a user clicks a link in the page. - * - * This event will not emit when the navigation is started programmatically with APIs - * like .loadURL and .back. - * - * It is also not emitted during in-page navigation, such as clicking anchor links - * or updating the window.location.hash. Use did-navigate-in-page event for this purpose. - * - * Calling event.preventDefault() does NOT have any effect. - */ - addEventListener(type: 'will-navigate', listener: (event: WebViewElement.WillNavigateEvent) => void, useCapture?: boolean): void; - /** - * Emitted when a navigation is done. - * - * This event is not emitted for in-page navigations, such as clicking anchor links - * or updating the window.location.hash. Use did-navigate-in-page event for this purpose. - */ - addEventListener(type: 'did-navigate', listener: (event: WebViewElement.DidNavigateEvent) => void, useCapture?: boolean): void; - /** - * Emitted when an in-page navigation happened. - * - * When in-page navigation happens, the page URL changes but does not cause - * navigation outside of the page. Examples of this occurring are when anchor links - * are clicked or when the DOM hashchange event is triggered. - */ - addEventListener(type: 'did-navigate-in-page', listener: (event: WebViewElement.DidNavigateInPageEvent) => void, useCapture?: boolean): void; - /** - * Fired when the guest page attempts to close itself. - */ - addEventListener(type: 'close', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Fired when the guest page has sent an asynchronous message to embedder page. - */ - addEventListener(type: 'ipc-message', listener: (event: WebViewElement.IpcMessageEvent) => void, useCapture?: boolean): void; - /** - * Fired when the renderer process is crashed. - */ - addEventListener(type: 'crashed', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Fired when the gpu process is crashed. - */ - addEventListener(type: 'gpu-crashed', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Fired when a plugin process is crashed. - */ - addEventListener(type: 'plugin-crashed', listener: (event: WebViewElement.PluginCrashedEvent) => void, useCapture?: boolean): void; - /** - * Fired when the WebContents is destroyed. - */ - addEventListener(type: 'destroyed', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Emitted when media starts playing. - */ - addEventListener(type: 'media-started-playing', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Emitted when media is paused or done playing. - */ - addEventListener(type: 'media-paused', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Emitted when a page's theme color changes. This is usually due to encountering a meta tag: - * - */ - addEventListener(type: 'did-change-theme-color', listener: (event: WebViewElement.DidChangeThemeColorEvent) => void, useCapture?: boolean): void; - /** - * Emitted when mouse moves over a link or the keyboard moves the focus to a link. - */ - addEventListener(type: 'update-target-url', listener: (event: WebViewElement.UpdateTargetUrlEvent) => void, useCapture?: boolean): void; - /** - * Emitted when DevTools is opened. - */ - addEventListener(type: 'devtools-opened', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Emitted when DevTools is closed. - */ - addEventListener(type: 'devtools-closed', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - /** - * Emitted when DevTools is focused / opened. - */ - addEventListener(type: 'devtools-focused', listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - addEventListener(type: string, listener: (event: WebViewElement.Event) => void, useCapture?: boolean): void; - } - - namespace WebViewElement { - type Event = ElectronPrivate.GlobalEvent; - - interface LoadCommitEvent extends Event { - url: string; - isMainFrame: boolean; - } - - interface DidFailLoadEvent extends Event { - errorCode: number; - errorDescription: string; - validatedURL: string; - isMainFrame: boolean; - } - - interface DidFrameFinishLoadEvent extends Event { - isMainFrame: boolean; - } - - interface DidGetResponseDetails extends Event { - status: boolean; - newURL: string; - originalURL: string; - httpResponseCode: number; - requestMethod: string; - referrer: string; - headers: Headers; - resourceType: string; - } - - interface DidGetRedirectRequestEvent extends Event { - oldURL: string; - newURL: string; - isMainFrame: boolean; - httpResponseCode: number; - requestMethod: string; - referrer: string; - headers: Headers; - } - - interface PageTitleUpdatedEvent extends Event { - title: string; - explicitSet: string; - } - - interface PageFaviconUpdatedEvent extends Event { - favicons: string[]; - } - - interface ConsoleMessageEvent extends Event { - level: number; - message: string; - line: number; - sourceId: string; - } - - interface FoundInPageEvent extends Event { - result: FoundInPageResult; - } - - interface NewWindowEvent extends Event { - url: string; - frameName: string; - disposition: NewWindowDisposition; - options: BrowserWindowOptions; - } - - interface WillNavigateEvent extends Event { - url: string; - } - - interface DidNavigateEvent extends Event { - url: string; - } - - interface DidNavigateInPageEvent extends Event { - url: string; - isMainFrame: boolean; - } - - interface IpcMessageEvent extends Event { - channel: string; - args: any[]; - } - - interface PluginCrashedEvent extends Event { - name: string; - version: string; - } - - interface DidChangeThemeColorEvent extends Event { - themeColor: string; - } - - interface UpdateTargetUrlEvent extends Event { - url: string; - } - } - - /** - * The BrowserWindowProxy object is returned from window.open and provides limited functionality with the child window. - */ - interface BrowserWindowProxy { - /** - * Removes focus from the child window. - */ - blur(): void; - /** - * Forcefully closes the child window without calling its unload event. - */ - close(): void; - /** - * Set to true after the child window gets closed. - */ - closed: boolean; - /** - * Evaluates the code in the child window. - */ - eval(code: string): void; - /** - * Focuses the child window (brings the window to front). - */ - focus(): void; - /** - * Sends a message to the child window with the specified origin or * for no origin preference. - * In addition to these methods, the child window implements window.opener object with no - * properties and a single method. - */ - postMessage(message: string, targetOrigin: string): void; - /** - * Invokes the print dialog on the child window. - */ - print(): void; - } - - // https://github.com/electron/electron/blob/master/docs/api/synopsis.md - - interface CommonElectron { - clipboard: Electron.Clipboard; - crashReporter: Electron.CrashReporter; - nativeImage: typeof Electron.NativeImage; - shell: Electron.Shell; - - app: Electron.App; - autoUpdater: Electron.AutoUpdater; - BrowserWindow: typeof Electron.BrowserWindow; - contentTracing: Electron.ContentTracing; - dialog: Electron.Dialog; - ipcMain: Electron.IpcMain; - globalShortcut: Electron.GlobalShortcut; - Menu: typeof Electron.Menu; - MenuItem: typeof Electron.MenuItem; - net: Electron.Net; - powerMonitor: Electron.PowerMonitor; - powerSaveBlocker: Electron.PowerSaveBlocker; - protocol: Electron.Protocol; - screen: Electron.Screen; - session: typeof Electron.Session; - systemPreferences: Electron.SystemPreferences; - Tray: typeof Electron.Tray; - webContents: Electron.WebContentsStatic; - } - - interface ElectronMainAndRenderer extends CommonElectron { - desktopCapturer: Electron.DesktopCapturer; - ipcRenderer: Electron.IpcRenderer; - remote: Electron.Remote; - webFrame: Electron.WebFrame; - } -} - -declare namespace ElectronPrivate { - type GlobalEvent = Event; -} - -interface Document { - createElement(tagName: 'webview'): Electron.WebViewElement; -} - -// https://github.com/electron/electron/blob/master/docs/api/window-open.md - -interface Window { - /** - * Creates a new window. - */ - open(url: string, frameName?: string, features?: string): Electron.BrowserWindowProxy; -} - -// https://github.com/electron/electron/blob/master/docs/api/file-object.md - -interface File { - /** - * Exposes the real path of the filesystem. - */ - path: string; -} - -// https://github.com/electron/electron/blob/master/docs/api/process.md - -declare namespace NodeJS { - - interface ProcessVersions { - /** - * Electron's version string. - */ - electron: string; - /** - * Chrome's version string. - */ - chrome: string; - } - - interface Process { - /** - * Setting this to true can disable the support for asar archives in Node's built-in modules. - */ - noAsar?: boolean; - /** - * Process's type - */ - type: 'browser' | 'renderer'; - /** - * Path to JavaScript source code. - */ - resourcesPath: string; - /** - * For Mac App Store build, this value is true, for other builds it is undefined. - */ - mas?: boolean; - /** - * If the app is running as a Windows Store app (appx), this value is true, for other builds it is undefined. - */ - windowsStore?: boolean; - /** - * When app is started by being passed as parameter to the default app, - * this value is true in the main process, otherwise it is undefined. - */ - defaultApp?: boolean; - /** - * Emitted when Electron has loaded its internal initialization script - * and is beginning to load the web page or the main script. - */ - on(event: 'loaded', listener: Function): this; - on(event: string, listener: Function): this; - /** - * Causes the main thread of the current process crash; - */ - crash(): void; - /** - * Causes the main thread of the current process hang. - */ - hang(): void; - /** - * Sets the file descriptor soft limit to maxDescriptors or the OS hard limit, - * whichever is lower for the current process. - * - * Note: This API is only available on macOS and Linux. - */ - setFdLimit(maxDescriptors: number): void; - /** - * @returns Object giving memory usage statistics about the current process. - * Note: All statistics are reported in Kilobytes. - */ - getProcessMemoryInfo(): ProcessMemoryInfo; - /** - * @returns Object giving memory usage statistics about the entire system. - * Note: All statistics are reported in Kilobytes. - */ - getSystemMemoryInfo(): SystemMemoryInfo; - } - - interface ProcessMemoryInfo { - /** - * The amount of memory currently pinned to actual physical RAM. - */ - workingSetSize: number; - /** - * The maximum amount of memory that has ever been pinned to actual physical RAM. - */ - peakWorkingSetSize: number; - /** - * The amount of memory not shared by other processes, such as JS heap or HTML content. - */ - privateBytes: number; - /** - * The amount of memory shared between processes, typically memory consumed by the Electron code itself. - */ - sharedBytes: number; - } - - interface SystemMemoryInfo { - /** - * The total amount of physical memory available to the system. - */ - total: number; - /** - * The total amount of memory not being used by applications or disk cache. - */ - free: number; - /** - * The total amount of swap memory available to the system. - */ - swapTotal: number; - /** - * The free amount of swap memory available to the system. - */ - swapFree: number; - } -} - -declare module 'electron' { - var electron: Electron.ElectronMainAndRenderer; - export = electron; -} - -interface NodeRequireFunction { - (moduleName: 'electron'): Electron.ElectronMainAndRenderer; -} diff --git a/types/electron/test/index.ts b/types/electron/test/index.ts deleted file mode 100644 index 8ae462139a..0000000000 --- a/types/electron/test/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import electron = require('electron'); -import child_process = require('child_process'); - -// TODO -child_process.spawn(electron as any); diff --git a/types/electron/test/main.ts b/types/electron/test/main.ts deleted file mode 100644 index 0f3f17ca33..0000000000 --- a/types/electron/test/main.ts +++ /dev/null @@ -1,1138 +0,0 @@ - -import { - app, - autoUpdater, - BrowserWindow, - contentTracing, - dialog, - globalShortcut, - ipcMain, - Menu, - MenuItem, - net, - powerMonitor, - powerSaveBlocker, - protocol, - Tray, - clipboard, - crashReporter, - nativeImage, - screen, - shell, - session, - systemPreferences, - webContents -} from 'electron'; - -import * as path from 'path'; - -// Quick start -// https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md - -// Keep a global reference of the window object, if you don't, the window will -// be closed automatically when the javascript object is GCed. -var mainWindow: Electron.BrowserWindow = null; - -// Quit when all windows are closed. -app.on('window-all-closed', () => { - if (process.platform !== 'darwin') - app.quit(); -}); - -// Check single instance app -var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) { - // Someone tried to run a second instance, we should focus our window - if (mainWindow) { - if (mainWindow.isMinimized()) mainWindow.restore(); - mainWindow.focus(); - } -}); - -if (shouldQuit) { - app.quit(); - process.exit(0); -} - -// This method will be called when Electron has done everything -// initialization and ready for creating browser windows. -app.on('ready', () => { - // Create the browser window. - mainWindow = new BrowserWindow({ width: 800, height: 600 }); - - // and load the index.html of the app. - mainWindow.loadURL(`file://${__dirname}/index.html`); - mainWindow.loadURL('file://foo/bar', {userAgent: 'cool-agent', httpReferrer: 'greateRefferer'}); - mainWindow.webContents.loadURL('file://foo/bar', {userAgent: 'cool-agent', httpReferrer: 'greateRefferer'}); - mainWindow.webContents.loadURL('file://foo/bar', {userAgent: 'cool-agent', httpReferrer: 'greateRefferer', postData: [{type: 'blob', blobUUID: 'hogefuga'}]}); - - mainWindow.webContents.openDevTools(); - mainWindow.webContents.toggleDevTools(); - mainWindow.webContents.openDevTools({mode: 'detach'}); - mainWindow.webContents.closeDevTools(); - mainWindow.webContents.addWorkSpace('/path/to/workspace'); - mainWindow.webContents.removeWorkSpace('/path/to/workspace'); - var opened: boolean = mainWindow.webContents.isDevToolsOpened() - var focused = mainWindow.webContents.isDevToolsFocused(); - // Emitted when the window is closed. - mainWindow.on('closed', () => { - // Dereference the window object, usually you would store windows - // in an array if your app supports multi windows, this is the time - // when you should delete the corresponding element. - mainWindow = null; - }); - - mainWindow.webContents.setVisualZoomLevelLimits(50, 200); - mainWindow.webContents.setLayoutZoomLevelLimits(50, 200); - - mainWindow.webContents.print({silent: true, printBackground: false}); - mainWindow.webContents.print(); - - mainWindow.webContents.printToPDF({ - marginsType: 1, - pageSize: 'A3', - printBackground: true, - printSelectionOnly: true, - landscape: true, - }, (error: Error, data: Buffer) => {}); - - mainWindow.webContents.printToPDF({}, (err, data) => {}); - - mainWindow.webContents.executeJavaScript('return true;').then((v: boolean) => console.log(v)); - mainWindow.webContents.executeJavaScript('return true;', true); - mainWindow.webContents.executeJavaScript('return true;', true, (result: boolean) => console.log(result)); - mainWindow.webContents.insertText('blah, blah, blah'); - mainWindow.webContents.startDrag({file: '/path/to/img.png', icon: nativeImage.createFromPath('/path/to/icon.png')}); - mainWindow.webContents.findInPage('blah'); - mainWindow.webContents.findInPage('blah', { - forward: true, - matchCase: false, - }); - mainWindow.webContents.stopFindInPage('clearSelection'); - mainWindow.webContents.stopFindInPage('keepSelection'); - mainWindow.webContents.stopFindInPage('activateSelection'); - - mainWindow.loadURL('https://github.com'); - - mainWindow.webContents.on('did-finish-load', function() { - mainWindow.webContents.savePage('/tmp/test.html', 'HTMLComplete', function(error) { - if (!error) - console.log("Save page successfully"); - }); - }); - - try { - mainWindow.webContents.debugger.attach("1.1"); - } catch(err) { - console.log("Debugger attach failed : ", err); - }; - - mainWindow.webContents.debugger.on('detach', function(event, reason) { - console.log("Debugger detached due to : ", reason); - }); - - mainWindow.webContents.debugger.on('message', function(event, method, params) { - if (method == "Network.requestWillBeSent") { - if (params.request.url == "https://www.github.com") { - win.webContents.debugger.detach(); - } - } - }); - - mainWindow.webContents.debugger.sendCommand("Network.enable"); - mainWindow.webContents.capturePage(image => { - console.log(image.toDataURL()); - }); - mainWindow.webContents.capturePage({x: 0, y: 0, width: 100, height: 200}, image => { - console.log(image.toPNG()); - }); - - mainWindow.setMenu(null); - mainWindow.setMenu(Menu.buildFromTemplate([])); -}); - -app.commandLine.appendSwitch('enable-web-bluetooth'); - -app.on('ready', () => { - mainWindow.webContents.on('select-bluetooth-device', (event, deviceList, callback) => { - event.preventDefault(); - - let result = (() => { - for (let device of deviceList) { - if (device.deviceName === 'test') { - return device; - } - } - return null; - })(); - - if (!result) { - callback(''); - } else { - callback(result.deviceId); - } - }); -}); - -// Locale -app.getLocale(); - -// Desktop environment integration -// https://github.com/atom/electron/blob/master/docs/tutorial/desktop-environment-integration.md - -app.addRecentDocument('/Users/USERNAME/Desktop/work.type'); -app.clearRecentDocuments(); -var dockMenu = Menu.buildFromTemplate([ - { - label: 'New Window', - click: () => { - console.log('New Window'); - } - }, - { - label: 'New Window with Settings', - submenu: [ - { label: 'Basic' }, - { label: 'Pro' } - ] - }, - { label: 'New Command...' }, - { - label: 'Edit', - submenu: [ - { - label: 'Undo', - accelerator: 'CmdOrCtrl+Z', - role: 'undo' - }, - { - label: 'Redo', - accelerator: 'Shift+CmdOrCtrl+Z', - role: 'redo' - }, - { - type: 'separator' - }, - { - label: 'Cut', - accelerator: 'CmdOrCtrl+X', - role: 'cut' - }, - { - label: 'Copy', - accelerator: 'CmdOrCtrl+C', - role: 'copy' - }, - { - label: 'Paste', - accelerator: 'CmdOrCtrl+V', - role: 'paste' - }, - ] - }, -]); -app.dock.setMenu(dockMenu); -app.dock.setBadge('foo'); -var id = app.dock.bounce('informational'); -app.dock.cancelBounce(id); -app.dock.setIcon('/path/to/icon.png'); - -app.setBadgeCount(app.getBadgeCount() + 1); - -app.setUserTasks([ - { - program: process.execPath, - arguments: '--new-window', - iconPath: process.execPath, - iconIndex: 0, - title: 'New Window', - description: 'Create a new window' - } -]); -app.setUserTasks([]); - -app.setJumpList([ - { - type: 'custom', - name: 'Recent Projects', - items: [ - { type: 'file', path: 'C:\\Projects\\project1.proj' }, - { type: 'file', path: 'C:\\Projects\\project2.proj' } - ] - }, - { // has a name so type is assumed to be "custom" - name: 'Tools', - items: [ - { - type: 'task', - title: 'Tool A', - program: process.execPath, - args: '--run-tool-a', - iconPath: process.execPath, - iconIndex: 0, - description: 'Runs Tool A' - }, - { - type: 'task', - title: 'Tool B', - program: process.execPath, - args: '--run-tool-b', - iconPath: process.execPath, - iconIndex: 0, - description: 'Runs Tool B' - }] - }, - { - type: 'frequent' - }, - { // has no name and no type so type is assumed to be "tasks" - items: [ - { - type: 'task', - title: 'New Project', - program: process.execPath, - args: '--new-project', - description: 'Create a new project.' - }, - { - type: 'separator' - }, - { - type: 'task', - title: 'Recover Project', - program: process.execPath, - args: '--recover-project', - description: 'Recover Project' - }] - } -]); - -if (app.isUnityRunning()) { -} -if (app.isAccessibilitySupportEnabled()) { -} -app.setLoginItemSettings({openAtLogin: true, openAsHidden: false}); -console.log(app.getLoginItemSettings().wasOpenedAtLogin); -app.setAboutPanelOptions({ - applicationName: 'Test', - version: '1.2.3' -}); - -var window = new BrowserWindow(); -window.setProgressBar(0.5); -window.setRepresentedFilename('/etc/passwd'); -window.setDocumentEdited(true); -window.previewFile('/path/to/file'); -window.previewFile('/path/to/file', 'Displayed Name'); -window.setVibrancy('light'); -window.setVibrancy('titlebar'); - -// Online/Offline Event Detection -// https://github.com/atom/electron/blob/master/docs/tutorial/online-offline-events.md - -var onlineStatusWindow: Electron.BrowserWindow; - -app.on('ready', () => { - onlineStatusWindow = new BrowserWindow({ width: 0, height: 0, show: false, vibrancy: 'sidebar' }); - onlineStatusWindow.loadURL(`file://${__dirname}/online-status.html`); -}); -app.on('accessibility-support-changed', (_, enabled) => console.log('accessibility: ' + enabled)); - -ipcMain.on('online-status-changed', (event: any, status: any) => { - console.log(status); -}); - -// Synopsis -// https://github.com/atom/electron/blob/master/docs/api/synopsis.md - -app.on('ready', () => { - window = new BrowserWindow({ - width: 800, - height: 600, - titleBarStyle: 'hidden-inset', - }); - window.loadURL('https://github.com'); -}); - -// Supported Chrome command line switches -// https://github.com/atom/electron/blob/master/docs/api/chrome-command-line-switches.md - -app.commandLine.appendSwitch('remote-debugging-port', '8315'); -app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1'); -app.commandLine.appendSwitch('vmodule', 'console=0'); - -// systemPreferences -// https://github.com/electron/electron/blob/master/docs/api/system-preferences.md - -var browserOptions = { - width: 1000, - height: 800, - transparent: false, - frame: true -}; - -// Make the window transparent only if the platform supports it. -if (process.platform !== 'win32' || systemPreferences.isAeroGlassEnabled()) { - browserOptions.transparent = true; - browserOptions.frame = false; -} - -if (process.platform === 'win32') { - systemPreferences.on('color-changed', () => { console.log('color changed'); }); - systemPreferences.on('inverted-color-scheme-changed', (_, inverted) => console.log(inverted ? 'inverted' : 'not inverted')); - console.log('Color for menu is', systemPreferences.getColor('menu')); -} - -// Create the window. -var win = new BrowserWindow(browserOptions); - -// Navigate. -if (browserOptions.transparent) { - win.loadURL('file://' + __dirname + '/index.html'); -} else { - // No transparency, so we load a fallback that uses basic styles. - win.loadURL('file://' + __dirname + '/fallback.html'); -} - -// app -// https://github.com/atom/electron/blob/master/docs/api/app.md - -app.on('certificate-error', function(event, webContents, url, error, certificate, callback) { - if (url == "https://github.com") { - // Verification logic. - event.preventDefault(); - callback(true); - } else { - callback(false); - } -}); - -app.on('select-client-certificate', function(event, webContents, url, list, callback) { - event.preventDefault(); - callback(list[0]); -}); - -app.on('login', function(event, webContents, request, authInfo, callback) { - event.preventDefault(); - callback('username', 'secret'); -}); - -var win = new BrowserWindow({show: false}) -win.once('ready-to-show', () => { - win.show(); -}); - -app.relaunch({args: process.argv.slice(1).concat(['--relaunch'])}); -app.exit(0); - -// auto-updater -// https://github.com/atom/electron/blob/master/docs/api/auto-updater.md - -autoUpdater.setFeedURL('http://mycompany.com/myapp/latest?version=' + app.getVersion()); -autoUpdater.checkForUpdates(); -autoUpdater.quitAndInstall(); - -autoUpdater.on('error', (error) => { - console.log('error', error); -}); - -autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName, releaseDate, updateURL) => { - console.log('update-downloaded', releaseNotes, releaseName, releaseDate, updateURL); -}); - -// browser-window -// https://github.com/atom/electron/blob/master/docs/api/browser-window.md - -var win = new BrowserWindow({ width: 800, height: 600, show: false }); -win.on('closed', () => { - win = null; -}); - -win.loadURL('https://github.com'); -win.show(); - -var toolbarRect = document.getElementById('toolbar').getBoundingClientRect(); -win.setSheetOffset(toolbarRect.height); - -var installed = BrowserWindow.getDevToolsExtensions().hasOwnProperty('devtron'); - -// content-tracing -// https://github.com/atom/electron/blob/master/docs/api/content-tracing.md - -const options = { - categoryFilter: '*', - traceOptions: 'record-until-full,enable-sampling' -} - -contentTracing.startRecording(options, function() { - console.log('Tracing started'); - setTimeout(function() { - contentTracing.stopRecording('', function(path) { - console.log('Tracing data recorded to ' + path); - }); - }, 5000); -}); - -// dialog -// https://github.com/atom/electron/blob/master/docs/api/dialog.md - -// variant without browserWindow -var openDialogResult: string[] = dialog.showOpenDialog({ - title: 'Testing showOpenDialog', - defaultPath: '/var/log/syslog', - filters: [{name: '', extensions: ['']}], - properties: ['openFile', 'openDirectory', 'multiSelections'] -}); - -// variant with browserWindow -openDialogResult = dialog.showOpenDialog(win, { - title: 'Testing showOpenDialog', - defaultPath: '/var/log/syslog', - filters: [{name: '', extensions: ['']}], - properties: ['openFile', 'openDirectory', 'multiSelections'] -}); - -// global-shortcut -// https://github.com/atom/electron/blob/master/docs/api/global-shortcut.md - -// Register a 'ctrl+x' shortcut listener. -var ret = globalShortcut.register('ctrl+x', () => { - console.log('ctrl+x is pressed'); -}); -if (!ret) - console.log('registerion fails'); - -// Check whether a shortcut is registered. -console.log(globalShortcut.isRegistered('ctrl+x')); - -// Unregister a shortcut. -globalShortcut.unregister('ctrl+x'); - -// Unregister all shortcuts. -globalShortcut.unregisterAll(); - -// ipcMain -// https://github.com/atom/electron/blob/master/docs/api/ipc-main-process.md - -ipcMain.on('asynchronous-message', (event: Electron.IpcMainEvent, arg: any) => { - console.log(arg); // prints "ping" - event.sender.send('asynchronous-reply', 'pong'); -}); - -ipcMain.on('synchronous-message', (event: Electron.IpcMainEvent, arg: any) => { - console.log(arg); // prints "ping" - event.returnValue = 'pong'; -}); - -var winWindows = new BrowserWindow({ - width: 800, - height: 600, - show: false, - thickFrame: false, - type: 'toolbar', -}); - -// menu-item -// https://github.com/atom/electron/blob/master/docs/api/menu-item.md - -var menuItem = new MenuItem({ - click: (menuItem: Electron.MenuItem, browserWindow: Electron.BrowserWindow, event: Electron.Event) => { - console.log('click', menuItem, browserWindow, event); - } -}); - -const fakeEvent: Electron.Event = { - preventDefault: () => { }, - sender: winWindows.webContents, -} - -menuItem.label = 'Hello World!'; -menuItem.click(fakeEvent, winWindows, winWindows.webContents) - -// menu -// https://github.com/atom/electron/blob/master/docs/api/menu.md - -var menu = new Menu(); -menu.append(new MenuItem({ label: 'MenuItem1', click: () => { console.log('item 1 clicked'); } })); -menu.append(new MenuItem({ type: 'separator' })); -menu.append(new MenuItem({ label: 'MenuItem2', type: 'checkbox', checked: true })); -menu.insert(0, menuItem); - -console.log(menu.items); - -var pos = screen.getCursorScreenPoint(); -menu.popup(null, pos.x, pos.y); - -// main.js -var template = [ - { - label: 'Electron', - submenu: [ - { - label: 'About Electron', - role: 'about' - }, - { - type: 'separator' - }, - { - label: 'Services', - role: 'services', - submenu: [] - }, - { - type: 'separator' - }, - { - label: 'Hide Electron', - accelerator: 'Command+H', - role: 'hide' - }, - { - label: 'Hide Others', - accelerator: 'Command+Shift+H', - role: 'hideothers' - }, - { - label: 'Show All', - role: 'unhide' - }, - { - type: 'separator' - }, - { - label: 'Quit', - accelerator: 'Command+Q', - click: () => { app.quit(); } - } - ] - }, - { - label: 'Edit', - submenu: [ - { - label: 'Undo', - accelerator: 'Command+Z', - role: 'undo' - }, - { - label: 'Redo', - accelerator: 'Shift+Command+Z', - role: 'redo' - }, - { - type: 'separator' - }, - { - label: 'Cut', - accelerator: 'Command+X', - role: 'cut' - }, - { - label: 'Copy', - accelerator: 'Command+C', - role: 'copy' - }, - { - label: 'Paste', - accelerator: 'Command+V', - role: 'paste' - }, - { - label: 'Select All', - accelerator: 'Command+A', - role: 'selectall' - } - ] - }, - { - label: 'View', - submenu: [ - { - label: 'Reload', - accelerator: 'Command+R', - click: (item, focusedWindow) => { - if (focusedWindow) { - focusedWindow.webContents.reloadIgnoringCache(); - } - } - }, - { - label: 'Toggle DevTools', - accelerator: 'Alt+Command+I', - click: (item, focusedWindow) => { - if (focusedWindow) { - focusedWindow.webContents.toggleDevTools(); - } - } - }, - { - type: 'separator' - }, - { - label: 'Actual Size', - accelerator: 'CmdOrCtrl+0', - click: (item, focusedWindow) => { - if (focusedWindow) { - focusedWindow.webContents.setZoomLevel(0) - } - } - }, - { - label: 'Zoom In', - accelerator: 'CmdOrCtrl+Plus', - click: (item, focusedWindow) => { - if (focusedWindow) { - const { webContents } = focusedWindow; - webContents.getZoomLevel((zoomLevel) => { - webContents.setZoomLevel(zoomLevel + 0.5) - }); - } - } - }, - { - label: 'Zoom Out', - accelerator: 'CmdOrCtrl+-', - click: (item, focusedWindow) => { - if (focusedWindow) { - const { webContents } = focusedWindow; - webContents.getZoomLevel((zoomLevel) => { - webContents.setZoomLevel(zoomLevel - 0.5) - }); - } - } - } - ] - }, - { - label: 'Window', - submenu: [ - { - label: 'Minimize', - accelerator: 'Command+M', - role: 'minimize' - }, - { - label: 'Close', - accelerator: 'Command+W', - role: 'close' - }, - { - type: 'separator' - }, - { - label: 'Bring All to Front', - role: 'front' - } - ] - }, - { - label: 'Help', - submenu: [] - } -]; - -menu = Menu.buildFromTemplate(template); - -Menu.setApplicationMenu(menu); // Must be called within app.on('ready', function(){ ... }); -Menu.setApplicationMenu(null); - -Menu.buildFromTemplate([ - { label: '4', id: '4' }, - { label: '5', id: '5' }, - { label: '1', id: '1', position: 'before=4' }, - { label: '2', id: '2' }, - { label: '3', id: '3' } -]); - -Menu.buildFromTemplate([ - { label: 'a', position: 'endof=letters' }, - { label: '1', position: 'endof=numbers' }, - { label: 'b', position: 'endof=letters' }, - { label: '2', position: 'endof=numbers' }, - { label: 'c', position: 'endof=letters' }, - { label: '3', position: 'endof=numbers' } -]); - -// net -// https://github.com/electron/electron/blob/master/docs/api/net.md - -app.on('ready', () => { - const request = net.request('https://github.com') - request.setHeader('Some-Custom-Header-Name', 'Some-Custom-Header-Value'); - let header = request.getHeader('Some-Custom-Header-Name'); - request.removeHeader('Some-Custom-Header-Name'); - request.on('response', (response) => { - console.log(`Status code: ${response.statusCode}`); - console.log(`Status message: ${response.statusMessage}`); - console.log(`Headers: ${JSON.stringify(response.headers)}`); - console.log(`Http version: ${response.httpVersion}`); - console.log(`Major Http version: ${response.httpVersionMajor}`); - console.log(`Minor Http version: ${response.httpVersionMinor}`); - response.on('data', (chunk) => { - console.log(`BODY: ${chunk}`); - }) - response.on('end', () => { - console.log('No more data in response.'); - }) - response.on('error', () => { - console.log('"error" event emitted'); - }); - response.on('aborted', () => { - console.log('"aborted" event emitted'); - }); - }) - request.on('login', (authInfo, callback) => { - callback('username', 'password'); - }); - request.on('finish', () => { - console.log('"finish" event emitted'); - }); - request.on('abort', () => { - console.log('"abort" event emitted'); - }); - request.on('error', () => { - console.log('"error" event emitted'); - }); - request.write('Hello World!', 'utf-8', () => { }); - request.end('Hello World!', 'utf-8', () => { }); - request.abort(); -}) - -// power-monitor -// https://github.com/atom/electron/blob/master/docs/api/power-monitor.md - -app.on('ready', () => { - powerMonitor.on('suspend', () => { - console.log('The system is going to sleep'); - }); - powerMonitor.on('resume', () => { - console.log('The system has resumed from sleep'); - }); - powerMonitor.on('on-ac', () => { - console.log('The system changed to AC power') - }); - powerMonitor.on('on-battery', () => { - console.log('The system changed to battery power'); - }); -}); - -// power-save-blocker -// https://github.com/atom/electron/blob/master/docs/api/power-save-blocker.md - -var id = powerSaveBlocker.start('prevent-display-sleep'); -console.log(powerSaveBlocker.isStarted(id)); - -powerSaveBlocker.stop(id); - -// protocol -// https://github.com/atom/electron/blob/master/docs/api/protocol.md - -app.on('ready', () => { - protocol.registerStandardSchemes(['https']); - protocol.registerServiceWorkerSchemes(['https']); - - protocol.registerFileProtocol('atom', (request, callback) => { - callback(`${__dirname}/${request.url}`); - }); - - protocol.registerBufferProtocol('atom', (request, callback) => { - callback({mimeType: 'text/html', data: new Buffer('
    Response
    ')}); - }); - - protocol.registerStringProtocol('atom', (request, callback) => { - callback('Hello World!'); - }); - - protocol.registerHttpProtocol('atom', (request, callback) => { - callback({url: request.url, method: request.method}); - }); - - protocol.unregisterProtocol('atom', (error) => { - console.log(error ? error.message : 'ok'); - }); - - protocol.isProtocolHandled('atom', (handled) => { - console.log(handled); - }); -}); - -// tray -// https://github.com/atom/electron/blob/master/docs/api/tray.md - -var appIcon: Electron.Tray = null; -app.on('ready', () => { - appIcon = new Tray('/path/to/my/icon'); - var contextMenu = Menu.buildFromTemplate([ - { label: 'Item1', type: 'radio' }, - { label: 'Item2', type: 'radio' }, - { label: 'Item3', type: 'radio', checked: true }, - { label: 'Item4', type: 'radio' }, - ]); - appIcon.setToolTip('This is my application.'); - appIcon.setContextMenu(contextMenu); - appIcon.setImage('/path/to/new/icon'); - appIcon.popUpContextMenu(contextMenu, {x: 100, y: 100}); - - appIcon.on('click', (event, bounds) => { - console.log('click', event, bounds); - }); - - appIcon.on('ballon-show', () => { - console.log('ballon-show'); - }); - - appIcon.displayBalloon({ - title: 'Hello World!' - }); -}); - -// clipboard -// https://github.com/atom/electron/blob/master/docs/api/clipboard.md - -{ - let str: string; - clipboard.writeText('Example String'); - clipboard.writeText('Example String', 'selection'); - clipboard.writeBookmark('foo', 'http://example.com'); - clipboard.writeBookmark('foo', 'http://example.com', 'selection'); - clipboard.writeFindText('foo'); - str = clipboard.readText('selection'); - str = clipboard.readFindText(); - console.log(clipboard.availableFormats()); - console.log(clipboard.readBookmark().title); - clipboard.clear(); - - clipboard.write({ - html: '', - text: 'Hello World!', - image: clipboard.readImage() - }); -} - -// crash-reporter -// https://github.com/atom/electron/blob/master/docs/api/crash-reporter.md - -crashReporter.start({ - productName: 'YourName', - companyName: 'YourCompany', - submitURL: 'https://your-domain.com/url-to-submit', - autoSubmit: true, - extra: { - someKey: "value" - } -}); - -console.log(crashReporter.getLastCrashReport()); -console.log(crashReporter.getUploadedReports()); - -// nativeImage -// https://github.com/atom/electron/blob/master/docs/api/native-image.md - -var appIcon2 = new Tray('/Users/somebody/images/icon.png'); -var window2 = new BrowserWindow({ icon: '/Users/somebody/images/window.png' }); -var image = clipboard.readImage(); -var appIcon3 = new Tray(image); -var appIcon4 = new Tray('/Users/somebody/images/icon.png'); - -let image2 = nativeImage.createFromPath('/Users/somebody/images/icon.png'); - -// process -// https://github.com/electron/electron/blob/master/docs/api/process.md - -console.log(process.versions.electron); -console.log(process.versions.chrome); -console.log(process.type); -console.log(process.resourcesPath); -console.log(process.mas); -console.log(process.windowsStore); -process.noAsar = true; -process.crash(); -process.hang(); -process.setFdLimit(8192); - -// screen -// https://github.com/atom/electron/blob/master/docs/api/screen.md - -app.on('ready', () => { - var size = screen.getPrimaryDisplay().workAreaSize; - mainWindow = new BrowserWindow({ width: size.width, height: size.height }); -}); - -app.on('ready', () => { - var displays = screen.getAllDisplays(); - var externalDisplay: any = null; - for (var i in displays) { - if (displays[i].bounds.x > 0 || displays[i].bounds.y > 0) { - externalDisplay = displays[i]; - break; - } - } - - if (externalDisplay) { - mainWindow = new BrowserWindow({ - x: externalDisplay.bounds.x + 50, - y: externalDisplay.bounds.y + 50, - }); - } - - screen.on('display-added', (event, display) => { - console.log('display-added', display); - }); - - screen.on('display-removed', (event, display) => { - console.log('display-removed', display); - }); - - screen.on('display-metrics-changed', (event, display, changes) => { - console.log('display-metrics-changed', display, changes); - }); -}); - -// shell -// https://github.com/atom/electron/blob/master/docs/api/shell.md - -shell.showItemInFolder('/home/user/Desktop/test.txt'); -shell.openItem('/home/user/Desktop/test.txt'); -shell.moveItemToTrash('/home/user/Desktop/test.txt'); - -shell.openExternal('https://github.com', { - activate: false -}); - -shell.beep(); - -shell.writeShortcutLink('/home/user/Desktop/shortcut.lnk', 'update', shell.readShortcutLink('/home/user/Desktop/shortcut.lnk')); - -// session -// https://github.com/atom/electron/blob/master/docs/api/session.md - -session.defaultSession.on('will-download', (event, item, webContents) => { - event.preventDefault(); - require('request')(item.getURL(), (data: any) => { - require('fs').writeFileSync('/somewhere', data); - }); -}); - -// Query all cookies. -session.defaultSession.cookies.get({}, (error, cookies) => { - console.log(cookies); -}); - -// Query all cookies associated with a specific url. -session.defaultSession.cookies.get({ url : "http://www.github.com" }, (error, cookies) => { - console.log(cookies); -}); - -// Set a cookie with the given cookie data; -// may overwrite equivalent cookies if they exist. -var cookie = { url : "http://www.github.com", name : "dummy_name", value : "dummy" }; -session.defaultSession.cookies.set(cookie, (error) => { - if (error) { - console.error(error); - } -}); - -// In the main process. -session.defaultSession.on('will-download', (event, item, webContents) => { - // Set the save path, making Electron not to prompt a save dialog. - item.setSavePath('/tmp/save.pdf'); - console.log(item.getSavePath()); - console.log(item.getMimeType()); - console.log(item.getFilename()); - console.log(item.getTotalBytes()); - - item.on('updated', (event, state) => { - if (state === 'interrupted') { - console.log('Download is interrupted but can be resumed'); - } else if (state === 'progressing') { - if (item.isPaused()) { - console.log('Download is paused'); - } else { - console.log(`Received bytes: ${item.getReceivedBytes()}`); - } - } - }); - - item.on('done', function(e, state) { - if (state == "completed") { - console.log("Download successfully"); - } else { - console.log(`Download failed: ${state}`) - } - }); -}); - -// To emulate a GPRS connection with 50kbps throughput and 500 ms latency. -session.defaultSession.enableNetworkEmulation({ - latency: 500, - downloadThroughput: 6400, - uploadThroughput: 6400 -}); - -// To emulate a network outage. -session.defaultSession.enableNetworkEmulation({ - offline: true -}); - -session.defaultSession.setCertificateVerifyProc((hostname, cert, callback) => { - callback((hostname === 'github.com') ? true : false); - console.log(cert.issuer.commonName); -}); - -session.defaultSession.setPermissionRequestHandler(function(webContents, permission, callback) { - if (webContents.getURL() === 'github.com') { - if (permission == "notifications") { - callback(false); - return; - } - } - - callback(true); -}); - -// consider any url ending with `example.com`, `foobar.com`, `baz` -// for integrated authentication. -session.defaultSession.allowNTLMCredentialsForDomains('*example.com, *foobar.com, *baz') - -// consider all urls for integrated authentication. -session.defaultSession.allowNTLMCredentialsForDomains('*') - -// Modify the user agent for all requests to the following urls. -var filter = { - urls: ["https://*.github.com/*", "*://electron.github.io"] -}; - -session.defaultSession.webRequest.onBeforeSendHeaders(filter, function(details, callback) { - details.requestHeaders['User-Agent'] = "MyAgent"; - callback({cancel: false, requestHeaders: details.requestHeaders}); -}); - -app.on('ready', function () { - const protocol = session.defaultSession.protocol - protocol.registerFileProtocol('atom', function (request, callback) { - var url = request.url.substr(7); - callback({path: path.normalize(__dirname + '/' + url)}); - }, function (error) { - if (error) { - console.error('Failed to register protocol'); - } - }) -}); - -// webContents -// https://github.com/electron/electron/blob/master/docs/api/web-contents.md - -console.log(webContents.getAllWebContents()); -console.log(webContents.getFocusedWebContents()); - -var win = new BrowserWindow({ - webPreferences: { - offscreen: true - } -}); - -win.webContents.on('paint', (event, dirty, image) => { - console.log(dirty, image.getBitmap()); -}); - -win.loadURL('http://github.com'); diff --git a/types/electron/test/renderer.ts b/types/electron/test/renderer.ts deleted file mode 100644 index 8394f59d24..0000000000 --- a/types/electron/test/renderer.ts +++ /dev/null @@ -1,311 +0,0 @@ - -import { - ipcRenderer, - remote, - webFrame, - clipboard, - crashReporter, - nativeImage, - screen, - shell -} from 'electron'; - -import * as fs from 'fs'; - -// In renderer process (web page). -// https://github.com/atom/electron/blob/master/docs/api/ipc-renderer.md -console.log(ipcRenderer.sendSync('synchronous-message', 'ping')); // prints "pong" - -ipcRenderer.on('asynchronous-reply', (event: Electron.IpcRendererEvent, arg: any) => { - console.log(arg); // prints "pong" - event.sender.send('another-message', 'Hello World!'); -}); - -ipcRenderer.send('asynchronous-message', 'ping'); - -// remote -// https://github.com/atom/electron/blob/master/docs/api/remote.md - -var BrowserWindow = remote.BrowserWindow; -var win = new BrowserWindow({ width: 800, height: 600 }); -win.loadURL('https://github.com'); - -remote.getCurrentWindow().on('close', () => { - // blabla... -}); - -remote.getCurrentWindow().capturePage(buf => { - fs.writeFile('/tmp/screenshot.png', buf, err => { - console.log(err); - }); -}); - -remote.getCurrentWebContents().print(); - -remote.getCurrentWindow().capturePage(buf => { - remote.require('fs').writeFile('/tmp/screenshot.png', buf, (err: Error) => { - console.log(err); - }); -}); - -// web-frame -// https://github.com/atom/electron/blob/master/docs/api/web-frame.md - -webFrame.setZoomFactor(2); -console.log(webFrame.getZoomFactor()); - -webFrame.setZoomLevel(200); -console.log(webFrame.getZoomLevel()); - -webFrame.setVisualZoomLevelLimits(50, 200); -webFrame.setLayoutZoomLevelLimits(50, 200); - -webFrame.setSpellCheckProvider('en-US', true, { - spellCheck: text => { - return !(require('spellchecker').isMisspelled(text)); - } -}); - -webFrame.registerURLSchemeAsSecure('app'); -webFrame.registerURLSchemeAsBypassingCSP('app'); -webFrame.registerURLSchemeAsPrivileged('app'); -webFrame.registerURLSchemeAsPrivileged('app', { - secure: true, - supportFetchAPI: true, -}); - -webFrame.insertText('text'); - -webFrame.executeJavaScript('JSON.stringify({})', false, (result) => { - console.log(result); -}).then((result: string) => console.log('OK:' + result)); - -console.log(webFrame.getResourceUsage()); -webFrame.clearCache(); - -// clipboard -// https://github.com/atom/electron/blob/master/docs/api/clipboard.md - -clipboard.writeText('Example String'); -clipboard.writeText('Example String', 'selection'); -console.log(clipboard.readText('selection')); -console.log(clipboard.availableFormats()); -clipboard.clear(); - -clipboard.write({ - html: '', - text: 'Hello World!', - bookmark: "Bookmark name", - image: clipboard.readImage() -}); - -// crash-reporter -// https://github.com/atom/electron/blob/master/docs/api/crash-reporter.md - -crashReporter.start({ - productName: 'YourName', - companyName: 'YourCompany', - submitURL: 'https://your-domain.com/url-to-submit', - autoSubmit: true -}); - -// desktopCapturer -// https://github.com/atom/electron/blob/master/docs/api/desktop-capturer.md - -var desktopCapturer = require('electron').desktopCapturer; - -desktopCapturer.getSources({types: ['window', 'screen']}, function(error, sources) { - if (error) throw error; - for (var i = 0; i < sources.length; ++i) { - if (sources[i].name == "Electron") { - (navigator as any).webkitGetUserMedia({ - audio: false, - video: { - mandatory: { - chromeMediaSource: 'desktop', - chromeMediaSourceId: sources[i].id, - minWidth: 1280, - maxWidth: 1280, - minHeight: 720, - maxHeight: 720 - } - } - }, gotStream, getUserMediaError); - return; - } - } -}); - -function gotStream(stream: any) { - (document.querySelector('video') as HTMLVideoElement).src = URL.createObjectURL(stream); -} - -function getUserMediaError(error: Error) { - console.log('getUserMediaError', error); -} - -// File object -// https://github.com/atom/electron/blob/master/docs/api/file-object.md - -/* -
    - Drag your file here -
    -*/ - -var holder = document.getElementById('holder'); - -holder.ondragover = function () { - return false; -}; - -holder.ondragleave = holder.ondragend = function () { - return false; -}; - -holder.ondrop = function (e) { - e.preventDefault(); - var file = e.dataTransfer.files[0]; - console.log('File you dragged here is', file.path); - return false; -}; - -// nativeImage -// https://github.com/atom/electron/blob/master/docs/api/native-image.md - -var Tray = remote.Tray; -var appIcon2 = new Tray('/Users/somebody/images/icon.png'); -var window2 = new BrowserWindow({ icon: '/Users/somebody/images/window.png' }); -var image = clipboard.readImage(); -var appIcon3 = new Tray(image); -var appIcon4 = new Tray('/Users/somebody/images/icon.png'); - -// https://github.com/electron/electron/blob/master/docs/api/process.md - -// preload.js -var _setImmediate = setImmediate; -var _clearImmediate = clearImmediate; -process.once('loaded', function() { - global.setImmediate = _setImmediate; - global.clearImmediate = _clearImmediate; -}); - -// screen -// https://github.com/atom/electron/blob/master/docs/api/screen.md - -var app = remote.app; - -var mainWindow: Electron.BrowserWindow = null; - -app.on('ready', () => { - var size = screen.getPrimaryDisplay().workAreaSize; - mainWindow = new BrowserWindow({ width: size.width, height: size.height }); -}); - -app.on('ready', () => { - var displays = screen.getAllDisplays(); - var externalDisplay: any = null; - for (var i in displays) { - if (displays[i].bounds.x > 0 || displays[i].bounds.y > 0) { - externalDisplay = displays[i]; - break; - } - } - - if (externalDisplay) { - mainWindow = new BrowserWindow({ - x: externalDisplay.bounds.x + 50, - y: externalDisplay.bounds.y + 50, - }); - } -}); - -// shell -// https://github.com/atom/electron/blob/master/docs/api/shell.md - -shell.openExternal('https://github.com'); - -// -// https://github.com/atom/electron/blob/master/docs/api/web-view-tag.md - -var webview = document.createElement('webview'); -webview.loadURL('https://github.com'); - -webview.addEventListener('console-message', function(e) { - console.log('Guest page logged a message:', e.message); -}); - -webview.addEventListener('found-in-page', function(e) { - if (e.result.finalUpdate) { - webview.stopFindInPage("keepSelection"); - } -}); - -var requestId = webview.findInPage("test"); - -webview.addEventListener('new-window', function(e) { - require('electron').shell.openExternal(e.url); -}); - -webview.addEventListener('close', function() { - webview.src = 'about:blank'; -}); - -// In embedder page. -webview.addEventListener('ipc-message', function(event) { - console.log(event.channel); // Prints "pong" -}); -webview.send('ping'); -webview.capturePage((image) => { console.log(image); }); - -{ - const opened: boolean = webview.isDevToolsOpened(); - const focused: boolean = webview.isDevToolsFocused(); - const focused2: boolean = webview.getWebContents().isFocused(); -} - -// In guest page. -ipcRenderer.on('ping', function() { - ipcRenderer.sendToHost('pong'); -}); - - -// showOpenDialog -// https://electron.atom.io/docs/api/dialog/#dialogshowopendialogbrowserwindow-options-callback - -remote.dialog.showOpenDialog(win); -remote.dialog.showOpenDialog(win, {}, fileNames => fileNames); -remote.dialog.showOpenDialog(win, { - title: 'foo', - defaultPath: '/bar', - buttonLabel: 'foo bar', - filters: [ - {name: 'Images', extensions: ['jpg', 'png', 'gif']}, - {name: 'Movies', extensions: ['mkv', 'avi', 'mp4']}, - {name: 'Custom File Type', extensions: ['as']}, - {name: 'All Files', extensions: ['*']} - ], - properties: ['openFile', 'openDirectory', 'multiSelections', 'showHiddenFiles', 'createDirectory', 'promptToCreate', 'noResolveAliases'], - normalizeAccessKeys: true, - message: 'foo message', -}); - -// showSaveDialog -// https://electron.atom.io/docs/api/dialog/#dialogshowsavedialogbrowserwindow-options-callback - -remote.dialog.showSaveDialog(win); -remote.dialog.showSaveDialog(win, {}, fileNames => fileNames); -remote.dialog.showSaveDialog(win, { - title: 'foo', - defaultPath: '/bar', - buttonLabel: 'foo bar', - filters: [ - {name: 'Images', extensions: ['jpg', 'png', 'gif']}, - {name: 'Movies', extensions: ['mkv', 'avi', 'mp4']}, - {name: 'Custom File Type', extensions: ['as']}, - {name: 'All Files', extensions: ['*']} - ], - message: 'foo message', - nameFieldLabel: 'foo name', - showsTagField: true -}); diff --git a/types/email-templates/index.d.ts b/types/email-templates/index.d.ts index a836fdfadc..5fdd7054f3 100644 --- a/types/email-templates/index.d.ts +++ b/types/email-templates/index.d.ts @@ -64,6 +64,6 @@ declare module "email-templates" { * @param {EmailTemplateCallback|Object} locals The variables or callback function. * @param {EmailTemplateCallback} callback The callback function. */ - render(locals: EmailTemplateCallback|Object, callback?: EmailTemplateCallback): void; + render(locals: EmailTemplateCallback|Object, callback?: EmailTemplateCallback): void | Promise; } } diff --git a/types/ember/index.d.ts b/types/ember/index.d.ts index 201f14f156..41f8fe6d45 100644 --- a/types/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Jed Mao // bttf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// @@ -2448,6 +2449,7 @@ declare namespace Ember { function observersFor(obj: any, path: string): any[]; function onLoad(name: string, callback: Function): void; const onError: Error; + function onerror(error: any): void; function overrideChains(obj: any, keyName: string, m: any): boolean; // ReSharper disable once DuplicatingLocalDeclaration const platform: { @@ -2479,6 +2481,7 @@ declare namespace Ember { throttle(target: any, method: Function | string, ...args: any[]): void; queues: any[]; }; + function runInDebug(fn: Function): void; function runLoadHooks(name: string, object: any): void; function sendEvent(obj: any, eventName: string, params?: any[], actions?: any[]): boolean; function set(obj: any, keyName: string, value: any): any; diff --git a/types/ember/v1/index.d.ts b/types/ember/v1/index.d.ts index 095c31a176..91e117f016 100644 --- a/types/ember/v1/index.d.ts +++ b/types/ember/v1/index.d.ts @@ -2,6 +2,7 @@ // Project: http://emberjs.com/ // Definitions by: Jed Mao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/enhanced-resolve/index.d.ts b/types/enhanced-resolve/index.d.ts index d773f52b16..aa85a8336f 100644 --- a/types/enhanced-resolve/index.d.ts +++ b/types/enhanced-resolve/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for enhanced-resolve v3.0.0 // Project: http://github.com/webpack/enhanced-resolve.git -// Definitions by: e-cloud +// Definitions by: e-cloud , Onigoetz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -8,7 +8,6 @@ import fs = require('fs'); import { - ResolveResult, LoggingCallbackWrapper, ResolverRequest, ResolveContext, @@ -19,31 +18,35 @@ import Resolver = require('./lib/Resolver'); import Tapable = require('tapable'); declare namespace Resolve { - function sync(path: string, request: string): ResolveResult; - function sync(context: ResolveContext, path: string, request: string): ResolveResult; + function sync(path: string, request: string): string; + function sync(context: ResolveContext, path: string, request: string): string; function context(path: string, request: string, callback: LoggingCallbackWrapper): void; function context(context: ResolveContext, path: string, request: string, callback: LoggingCallbackWrapper): void; namespace context { - function sync(path: string, request: string): ResolveResult; - function sync(context: ResolveContext, path: string, request: string): ResolveResult; + function sync(path: string, request: string): string; + function sync(context: ResolveContext, path: string, request: string): string; } function loader(path: string, request: string, callback: LoggingCallbackWrapper): void; function loader(context: ResolveContext, path: string, request: string, callback: LoggingCallbackWrapper): void; - namespace context { - function sync(path: string, request: string): ResolveResult; - function sync(context: ResolveContext, path: string, request: string): ResolveResult; + namespace loader { + function sync(path: string, request: string): string; + function sync(context: ResolveContext, path: string, request: string): string; } - function create(path: string, request: string, callback: LoggingCallbackWrapper): void; - function create(context: ResolveContext, path: string, request: string, callback: LoggingCallbackWrapper): void; + function create(options: ResolverFactory.ResolverOption): { + (path: string, request: string, callback: LoggingCallbackWrapper): void; + (context: ResolveContext, path: string, request: string, callback: LoggingCallbackWrapper): void; + } export namespace create { - function sync(path: string, request: string): ResolveResult; - function sync(context: ResolveContext, path: string, request: string): ResolveResult; + function sync(options: ResolverFactory.ResolverOption): { + (path: string, request: string): string; + (context: ResolveContext, path: string, request: string): string; + } } export namespace ResolverFactory { @@ -54,8 +57,8 @@ declare namespace Resolve { descriptionFiles?: string[]; enforceExtension?: boolean; enforceModuleExtension?: boolean; - extensions: string[]; - fileSystem: AbstractInputFileSystem; + extensions?: string[]; + fileSystem?: AbstractInputFileSystem; mainFields?: string[]; mainFiles?: string[]; moduleExtensions?: string[]; @@ -70,7 +73,7 @@ declare namespace Resolve { interface AliasItem { alias: string; name: string; - onlyModule: boolean; + onlyModule?: boolean; } function createResolver(options: ResolverOption): Resolver; } diff --git a/types/enhanced-resolve/lib/Resolver.d.ts b/types/enhanced-resolve/lib/Resolver.d.ts index 20fc1c0914..1799fba39b 100644 --- a/types/enhanced-resolve/lib/Resolver.d.ts +++ b/types/enhanced-resolve/lib/Resolver.d.ts @@ -2,7 +2,6 @@ import Tapable = require('tapable'); import { ResolveParseResult, - ResolveResult, ResolverRequest, LoggingCallbackWrapper, AbstractInputFileSystem, @@ -14,7 +13,7 @@ declare class Resolver extends Tapable { constructor(fileSystem: AbstractInputFileSystem); - resolveSync(context: ResolveContext, path: string, request: string): ResolveResult; + resolveSync(context: ResolveContext, path: string, request: string): string; resolve(context: ResolveContext, path: string, request: string, callback: LoggingCallbackWrapper): any; diff --git a/types/enhanced-resolve/lib/common-types.d.ts b/types/enhanced-resolve/lib/common-types.d.ts index 6607dee64f..b0ec925c0b 100644 --- a/types/enhanced-resolve/lib/common-types.d.ts +++ b/types/enhanced-resolve/lib/common-types.d.ts @@ -23,11 +23,6 @@ export interface ResolveContext { issuer?: string; } -export interface ResolveResult { - path: boolean | string; - query: string; -} - export interface ResolverRequest { context: ResolveContext; descriptionFileData?: DescriptionFileData; diff --git a/types/enhanced-resolve/test/index.ts b/types/enhanced-resolve/test/index.ts index dfd5087be4..aeec1d57d8 100644 --- a/types/enhanced-resolve/test/index.ts +++ b/types/enhanced-resolve/test/index.ts @@ -1,5 +1,5 @@ import resolve = require('enhanced-resolve'); -import { ResolveResult, AbstractInputFileSystem } from 'enhanced-resolve/lib/common-types' +import { AbstractInputFileSystem } from 'enhanced-resolve/lib/common-types' import Resolver = require('enhanced-resolve/lib/Resolver') resolve('lib', 'string', function (err) { }); @@ -20,19 +20,30 @@ const nfs = new resolve.NodeJsInputFileSystem(); const cfs = new resolve.CachedInputFileSystem(nfs, 4); -let result: ResolveResult +let result: string result = resolve.sync(context, 'path', 'string'); result = resolve.sync('path', 'string'); + +// Context + resolve.context('lib', 'string', function (err) { }); resolve.context(context, 'path', 'string', function () { }); result = resolve.context.sync(context, 'path', 'string'); result = resolve.context.sync('path', 'string'); -resolve.create('lib', 'string', function (err) { }); -resolve.create(context, 'path', 'string', function () { }); +// Loader -result = resolve.create.sync(context, 'path', 'string'); -result = resolve.create.sync('path', 'string'); +resolve.loader('lib', 'string', function (err) { }); +resolve.loader(context, 'path', 'string', function () { }); + +result = resolve.loader.sync(context, 'path', 'string'); +result = resolve.loader.sync('path', 'string'); + +// Create + +resolve.create({extensions: [".js", ".json", ".node"]})(context, 'path', 'string', function () { }); + +result = resolve.create.sync({mainFields: ["loader", "main"]})(context, 'path', 'string'); diff --git a/types/enzyme-to-json/enzyme-to-json-tests.tsx b/types/enzyme-to-json/enzyme-to-json-tests.tsx new file mode 100644 index 0000000000..13827a3cdb --- /dev/null +++ b/types/enzyme-to-json/enzyme-to-json-tests.tsx @@ -0,0 +1,6 @@ +import * as React from 'react'; +import { shallow } from 'enzyme'; +import toJson from 'enzyme-to-json'; + +const wrapper = shallow(Hello World!); +const result: object = toJson(wrapper); diff --git a/types/enzyme-to-json/index.d.ts b/types/enzyme-to-json/index.d.ts new file mode 100644 index 0000000000..cba4561649 --- /dev/null +++ b/types/enzyme-to-json/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for enzyme-to-json 1.5 +// Project: https://github.com/adriantoine/enzyme-to-json#readme +// Definitions by: Joscha Feth +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { ReactWrapper, ShallowWrapper } from 'enzyme'; + +export default function toJson(wrapper: ShallowWrapper | ReactWrapper | Cheerio): object; diff --git a/types/enzyme-to-json/tsconfig.json b/types/enzyme-to-json/tsconfig.json new file mode 100644 index 0000000000..257f8797e0 --- /dev/null +++ b/types/enzyme-to-json/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "enzyme-to-json-tests.tsx" + ] +} diff --git a/types/enzyme-to-json/tslint.json b/types/enzyme-to-json/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/enzyme-to-json/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/enzyme/enzyme-tests.tsx b/types/enzyme/enzyme-tests.tsx index 2dc9e98c87..083cee54b2 100644 --- a/types/enzyme/enzyme-tests.tsx +++ b/types/enzyme/enzyme-tests.tsx @@ -70,7 +70,7 @@ function ShallowWrapperTest() { shallowWrapper = shallowWrapper.filter(MyComponent); statelessWrapper = statelessWrapper.filter(MyStatelessComponent); shallowWrapper = shallowWrapper.filter({ numberProp: 12 }); - elementWrapper = shallowWrapper.filter('.selector'); + shallowWrapper = shallowWrapper.filter('.selector'); } function test_filterWhere() { @@ -422,7 +422,7 @@ function ReactWrapperTest() { reactWrapper = reactWrapper.filter(MyComponent); statelessWrapper = statelessWrapper.filter(MyStatelessComponent); reactWrapper = reactWrapper.filter({ numberProp: 12 }); - elementWrapper = reactWrapper.filter('.selector'); + reactWrapper = reactWrapper.filter('.selector'); } function test_filterWhere() { diff --git a/types/enzyme/index.d.ts b/types/enzyme/index.d.ts index 721895e522..2a7142d9b3 100644 --- a/types/enzyme/index.d.ts +++ b/types/enzyme/index.d.ts @@ -8,14 +8,14 @@ // huhuanming // MartynasZilinskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 /// import { ReactElement, Component, HTMLAttributes as ReactHTMLAttributes, SVGAttributes as ReactSVGAttributes } from "react"; export type HTMLAttributes = ReactHTMLAttributes<{}> & ReactSVGAttributes<{}>; -export class ElementClass extends Component { +export class ElementClass extends Component { } /* These are purposefully stripped down versions of React.ComponentClass and React.StatelessComponent. @@ -23,7 +23,7 @@ export class ElementClass extends Component { * all specified in the implementation. TS chooses the EnzymePropSelector overload and loses the generics */ export interface ComponentClass { - new (props?: Props, context?: any): Component; + new (props?: Props, context?: any): Component; } export type StatelessComponent = (props: Props, context?: any) => JSX.Element; diff --git a/types/eonasdan-bootstrap-datetimepicker/index.d.ts b/types/eonasdan-bootstrap-datetimepicker/index.d.ts index 71f973bbe9..63938275b1 100644 --- a/types/eonasdan-bootstrap-datetimepicker/index.d.ts +++ b/types/eonasdan-bootstrap-datetimepicker/index.d.ts @@ -2,6 +2,7 @@ // Project: http://eonasdan.github.io/bootstrap-datetimepicker // Definitions by: Markus Peloso // Definitions: https://github.com/borisyankov/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/eq.js/index.d.ts b/types/eq.js/index.d.ts index 4f48c092d5..d4b571368c 100644 --- a/types/eq.js/index.d.ts +++ b/types/eq.js/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Snugug/eq.js // Definitions by: Stephen Lautier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare var eqjs: eq.EqjsStatic; diff --git a/types/es6-shim/es6-shim-tests.ts b/types/es6-shim/es6-shim-tests.ts index ed89d2ac35..87f6fba0e5 100644 --- a/types/es6-shim/es6-shim-tests.ts +++ b/types/es6-shim/es6-shim-tests.ts @@ -1,31 +1,37 @@ - +declare const require: (module: string) => Object; +if (require !== null) { + require('es6-shim'); +} interface Point { x: number; y: number; } interface Point3D extends Point { z: number; } let a: any; -let s: string; -let i: number; +let s: string = ''; +let i: number = 2; +let iOrUndef: number | undefined; let b: boolean; -let f: () => void; +let f: () => void = () => {}; let o: Object; -let r: RegExp; -let sym: symbol; -let e: Error; +let r: RegExp = /a/; +let sym: symbol = {} as symbol; +let e: Error = new Error(); let date: Date; let key: PropertyKey; -let point: Point; -let point3d: Point3D; -let arrayOfPoint: Point[]; +let point: Point = { x: 1, y: 2 }; +let point3d: Point3D = { x: 1, y: 2, z: 3 }; +let point3dOrUndef: Point3D | undefined; +let pointOrUndef: Point | undefined; +let arrayOfPoint: Point[] = []; let arrayOfPoint3D: Point3D[]; let arrayOfSymbol: symbol[]; let arrayOfPropertyKey: PropertyKey[]; let arrayOfAny: any[]; let arrayOfStringAny: [string, any][]; -let arrayLikeOfAny: ArrayLike; -let iterableOfPoint: IterableShim; -let iterableOfStringPoint: IterableShim<[string, Point]>; -let iterableOfPointPoint3D: IterableShim<[Point, Point3D]>; +let arrayLikeOfAny: ArrayLike = []; +let iterableOfPoint: IterableShim = []; +let iterableOfStringPoint: IterableShim<[string, Point]> = []; +let iterableOfPointPoint3D: IterableShim<[Point, Point3D]> = []; let iterableIteratorOfPoint: IterableIteratorShim; let iterableIteratorOfNumberPoint: IterableIteratorShim<[number, Point]>; let iterableIteratorOfNumber: IterableIteratorShim; @@ -37,23 +43,23 @@ let iterableIteratorOfAny: IterableIteratorShim; let iterableIteratorOfPropertyKey: IterableIteratorShim; let iterableIteratorOfPropertyKeyPoint: IterableIteratorShim<[PropertyKey, Point]>; let nodeList: NodeList; -let pd: PropertyDescriptor; -let pdm: PropertyDescriptorMap; -let map: Map; -let set: Set; -let weakMap: WeakMap; -let weakSet: WeakSet; -let promiseLikeOfPoint: PromiseLike; -let promiseLikeOfPoint3D: PromiseLike; -let promiseOfPoint: Promise; -let promiseOfPoint3D: Promise; +let pd: PropertyDescriptor = {}; +let pdm: PropertyDescriptorMap = {}; +let map: Map = new Map(); +let set: Set = new Set(); +let weakMap: WeakMap = new WeakMap(); +let weakSet: WeakSet = new WeakSet(); +let promiseLikeOfPoint: PromiseLike = Promise.resolve(point); +let promiseLikeOfPoint3D: PromiseLike = Promise.resolve(point3d); +let promiseOfPoint: Promise = Promise.resolve(point); +let promiseOfPoint3D: Promise = Promise.resolve(point3d); let promiseOfArrayOfPoint: Promise; let promiseOfVoid: Promise; point = Object.assign(point, point); b = Object.is(point, point); -Object.setPrototypeOf(point, point); -point = arrayOfPoint.find(p => b); +Object.setPrototypeOf(point, {}); +pointOrUndef = arrayOfPoint.find(p => b); i = arrayOfPoint.findIndex(p => b); arrayOfPoint = arrayOfPoint.fill(point, i, arrayOfPoint.length); arrayOfPoint = arrayOfPoint.copyWithin(i, i, i); @@ -69,7 +75,7 @@ b = s.includes(s, i); b = s.endsWith(s, i); s = s.repeat(i); b = s.startsWith(s, i); -s = String.fromCodePoint(i, i); +s = String.fromCodePoint(2 as number, 3 as number); s = String.raw`abc`; s = r.flags; i = Number.EPSILON; @@ -102,7 +108,7 @@ i = Math.cbrt(i); map.clear(); map.delete(s); map.forEach((value: Point, key: string) => { }); -point = map.get(s); +pointOrUndef = map.get(s); b = map.has(s); map = map.set(s, point); i = map.size; @@ -117,7 +123,7 @@ i = set.size; set = new Set(); set = new Set(iterableOfPoint); weakMap.delete(point); -point3d = weakMap.get(point); +point3dOrUndef = weakMap.get(point); b = weakMap.has(point); weakMap = weakMap.set(point, point3d); weakMap = new WeakMap(); @@ -177,13 +183,15 @@ promiseOfPoint = promiseOfPoint.catch(e => point); promiseOfPoint = promiseOfPoint.catch(e => promiseOfPoint); promiseOfPoint = promiseOfPoint.catch(e => promiseLikeOfPoint); promiseOfPoint = promiseOfPoint.catch(e => { }); -promiseOfPoint3D = promiseOfPoint.catch(e => point3d); -promiseOfPoint3D = promiseOfPoint.catch(e => promiseOfPoint3D); -promiseOfPoint3D = promiseOfPoint.catch(e => promiseLikeOfPoint3D); +promiseOfPoint3D = promiseOfPoint3D.catch(e => point3d); +promiseOfPoint3D = promiseOfPoint3D.catch(e => promiseOfPoint3D); +promiseOfPoint3D = promiseOfPoint3D.catch(e => promiseLikeOfPoint3D); promiseOfPoint = new Promise((resolve, reject) => resolve(point)); promiseOfPoint = new Promise((resolve, reject) => resolve(promiseOfPoint)); promiseOfPoint = new Promise((resolve, reject) => resolve(promiseLikeOfPoint)); promiseOfPoint = new Promise((resolve, reject) => reject(e)); +// To prevent UnhandledPromiseRejectionWarning +promiseOfPoint.catch(() => {}); promiseOfArrayOfPoint = Promise.all(arrayOfPoint); promiseOfArrayOfPoint = Promise.all(iterableOfPoint); promiseOfPoint = Promise.race(arrayOfPoint); @@ -193,7 +201,11 @@ promiseOfPoint = Promise.resolve(point3d); promiseOfPoint = Promise.resolve(promiseOfPoint); promiseOfPoint = Promise.resolve(promiseLikeOfPoint); promiseOfVoid = Promise.reject(e); +// To prevent UnhandledPromiseRejectionWarning +promiseOfVoid.catch(() => {}); promiseOfPoint = Promise.reject(e); +// To prevent UnhandledPromiseRejectionWarning +promiseOfPoint.catch(() => {}); a = Reflect.apply(f, a, arrayLikeOfAny); a = Reflect.construct(f, arrayLikeOfAny); b = Reflect.defineProperty(a, s, pd); @@ -203,9 +215,9 @@ b = Reflect.deleteProperty(a, s); b = Reflect.deleteProperty(a, i); b = Reflect.deleteProperty(a, sym); iterableIteratorOfAny = Reflect.enumerate(a); -a = Reflect.get(a, s, a); -a = Reflect.get(a, i, a); -a = Reflect.get(a, sym, a); +Reflect.get(a, s, a); +Reflect.get(a, i, a); +Reflect.get(a, sym, a); pd = Reflect.getOwnPropertyDescriptor(a, s); pd = Reflect.getOwnPropertyDescriptor(a, i); pd = Reflect.getOwnPropertyDescriptor(a, sym); @@ -219,4 +231,4 @@ b = Reflect.preventExtensions(a); b = Reflect.set(a, s, a, a); b = Reflect.set(a, i, a, a); b = Reflect.set(a, sym, a, a); -b = Reflect.setPrototypeOf(a, a); \ No newline at end of file +b = Reflect.setPrototypeOf(a, a); diff --git a/types/es6-shim/index.d.ts b/types/es6-shim/index.d.ts index 483f4357e0..4c03fc8b9e 100644 --- a/types/es6-shim/index.d.ts +++ b/types/es6-shim/index.d.ts @@ -185,11 +185,10 @@ interface Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; + find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T | undefined; /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. + * Returns the index of the first element in the array where predicate is true, and -1 otherwise. * @param predicate find calls predicate once for each element of the array, in ascending * order, until it finds one where predicate returns true. If such an element is found, find * immediately returns that element value. Otherwise, find returns undefined. @@ -556,9 +555,9 @@ interface Map { clear(): void; delete(key: K): boolean; forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; - get(key: K): V; + get(key: K): V | undefined; has(key: K): boolean; - set(key: K, value?: V): Map; + set(key: K, value: V): Map; size: number; entries(): IterableIteratorShim<[K, V]>; keys(): IterableIteratorShim; @@ -596,9 +595,9 @@ declare var Set: SetConstructor; interface WeakMap { delete(key: K): boolean; - get(key: K): V; + get(key: K): V | undefined; has(key: K): boolean; - set(key: K, value?: V): WeakMap; + set(key: K, value: V): WeakMap; } interface WeakMapConstructor { diff --git a/types/es6-shim/tsconfig.json b/types/es6-shim/tsconfig.json index 1243a36ddb..02c35aee5a 100644 --- a/types/es6-shim/tsconfig.json +++ b/types/es6-shim/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -20,4 +20,4 @@ "index.d.ts", "es6-shim-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/eventemitter2/eventemitter2-tests.ts b/types/eventemitter2/eventemitter2-tests.ts deleted file mode 100644 index 8a7849abfa..0000000000 --- a/types/eventemitter2/eventemitter2-tests.ts +++ /dev/null @@ -1,101 +0,0 @@ -// Example for CommonJS/AMD -/* -import eventemitter2 = require("eventemitter2"); -var EventEmitter2 = eventemitter2.EventEmitter2; - -class Child extends eventemitter2.EventEmitter2 { -} -*/ - -// This class definition doesn't work in CommonJS/AMD. -class Child extends EventEmitter2 { -} - -var server = new EventEmitter2(); - -function testConfiguration() { - var foo = new EventEmitter2({ - wildcard: true, - delimiter: '::', - newListener: false, - maxListeners: 20, - verboseMemoryLeak: true - }); - var bar = new EventEmitter2({}); - var bazz = new EventEmitter2(); -} - -function testAddListener() { - server.addListener('data', function (value1: any, value2: any, value3: any) { - console.log('The event was raised!'); - }); - - server.addListener('data', function (value: any) { - console.log('The event was raised!'); - }); -} - -function testOn() { - server.on('data', function (value1: any, value2: any, value3: any) { - console.log('The event was raised!'); - }); - - server.on('data', function (value: any) { - console.log('The event was raised!'); - }); -} - -function testOnAny() { - server.onAny(function (value: any) { - console.log('All events trigger this.'); - }); -} - -function testOffAny() { - server.offAny(function (value: any) { - console.log('The event was raised!'); - }); -} - -function testOnce() { - server.once('get', function (value: any) { - console.log('Ah, we have our first value!'); - }); -} - -function testMany() { - server.many('get', 4, function (value: any) { - console.log('This event will be listened to exactly four times.'); - }); -} - -function testRemoveListener() { - var callback = function (value: any) { - console.log('someone connected!'); - }; - server.on('get', callback); - server.removeListener('get', callback); -} - -function testRemoveAllListeners() { - server.removeAllListeners(["test::event", "another::test::event"]); - server.removeAllListeners("test"); - server.removeAllListeners(); -} - -function testSetMaxListeners() { - server.setMaxListeners(40); -} - -function testListeners() { - console.log(server.listeners('get')); -} - -function testListenersAny() { - console.log(server.listenersAny()[0]); -} - -function testEmit() { - server.emit('foo.bazz'); - server.emit(['foo', 'bar']); -} diff --git a/types/eventemitter2/index.d.ts b/types/eventemitter2/index.d.ts deleted file mode 100644 index 33ffe20b09..0000000000 --- a/types/eventemitter2/index.d.ts +++ /dev/null @@ -1,258 +0,0 @@ -// Type definitions for EventEmitter2 v2.2.0 -// Project: https://github.com/asyncly/EventEmitter2 -// Definitions by: ryiwamoto -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface EventEmitter2Configuration { - /** - * use wildcards - */ - wildcard?: boolean; - - /** - * the delimiter used to segment namespaces, defaults to `.`. - */ - delimiter?: string; - - /** - * if you want to emit the newListener event set to true. - */ - newListener?: boolean; - - /** - * max listeners that can be assigned to an event, default 10. - */ - maxListeners?: number; - - /** - * show event name in memory leak message when more than maximum amount of listeners is assigned, default false - */ - verboseMemoryLeak?: boolean; -} - -declare class EventEmitter2 { - /** - * @param conf - */ - constructor(conf?: EventEmitter2Configuration); - - /** - * Adds a listener to the end of the listeners array for the specified event. - * @param event - * @param listener - */ - addListener(event: string, listener: Function): EventEmitter2; - - /** - * Adds a listener to the end of the listeners array for the specified event. - * @param event - * @param listener - */ - on(event: string | string[], listener: Function): EventEmitter2; - - /** - * Adds a listener that will be fired when any event is emitted. - * @param listener - */ - onAny(listener: Function): EventEmitter2; - - /** - * Removes the listener that will be fired when any event is emitted. - * @param listener - */ - offAny(listener?: Function): EventEmitter2; - - /** - * Adds a one time listener for the event. - * The listener is invoked only the first time the event is fired, after which it is removed. - * @param event - * @param listener - */ - once(event: string, listener: Function): EventEmitter2; - - /** - * Adds a listener that will execute n times for the event before being removed. - * The listener is invoked only the first n times the event is fired, after which it is removed. - * @param event - * @param timesToListen - * @param listener - */ - many(event: string, timesToListen: number, listener: Function): EventEmitter2; - - /** - * Remove a listener from the listener array for the specified event. - * Caution: changes array indices in the listener array behind the listener. - * @param event - * @param listener - */ - removeListener(event: string, listener: Function): EventEmitter2; - - /** - * Remove a listener from the listener array for the specified event. - * Caution: changes array indices in the listener array behind the listener. - * @param event - * @param listener - */ - off(event: string, listener: Function): EventEmitter2; - - /** - * Removes all listeners, or those of the specified event. - * @param event - */ - removeAllListeners(event?: string): EventEmitter2; - - /** - * Removes all listeners, or those of the specified event. - * @param events - */ - removeAllListeners(events: string[]): EventEmitter2; - - /** - * By default EventEmitters will print a warning if more than 10 listeners are added to it. - * This is a useful default which helps finding memory leaks. - * Obviously not all Emitters should be limited to 10. This function allows that to be increased. - * Set to zero for unlimited. - * @param n - */ - setMaxListeners(n: number): void; - - /** - * Returns an array of listeners for the specified event. This array can be manipulated, e.g. to remove listeners. - * @param event - */ - listeners(event: string): Function[]; - - /** - * Returns an array of listeners that are listening for any event that is specified. - * This array can be manipulated, e.g. to remove listeners. - */ - listenersAny(): Function[]; - - /** - * Execute each of the listeners that may be listening for the specified event name in order with the list of arguments. - * @param event - * @param args - */ - emit(event: string | string[], ...args: any[]): boolean; - - /** - * Execute each of the listeners that may be listening for the specified event name in order with the list of arguments. - * @param event - */ - emit(event: string[]): boolean; -} - -declare module "eventemitter2" { - export class EventEmitter2 { - /** - * @param conf - */ - constructor(conf?: EventEmitter2Configuration); - - /** - * Adds a listener to the end of the listeners array for the specified event. - * @param event - * @param listener - */ - addListener(event: string, listener: Function): EventEmitter2; - - /** - * Adds a listener to the end of the listeners array for the specified event. - * @param event - * @param listener - */ - on(event: string | string[], listener: Function): EventEmitter2; - - /** - * Adds a listener that will be fired when any event is emitted. - * @param listener - */ - onAny(listener: Function): EventEmitter2; - - /** - * Removes the listener that will be fired when any event is emitted. - * @param listener - */ - offAny(listener: Function): EventEmitter2; - - /** - * Adds a one time listener for the event. - * The listener is invoked only the first time the event is fired, after which it is removed. - * @param event - * @param listener - */ - once(event: string, listener: Function): EventEmitter2; - - /** - * Adds a listener that will execute n times for the event before being removed. - * The listener is invoked only the first n times the event is fired, after which it is removed. - * @param event - * @param timesToListen - * @param listener - */ - many(event: string, timesToListen: number, listener: Function): EventEmitter2; - - /** - * Remove a listener from the listener array for the specified event. - * Caution: changes array indices in the listener array behind the listener. - * @param event - * @param listener - */ - removeListener(event: string, listener: Function): EventEmitter2; - - /** - * Remove a listener from the listener array for the specified event. - * Caution: changes array indices in the listener array behind the listener. - * @param event - * @param listener - */ - off(event: string, listener: Function): EventEmitter2; - - /** - * Removes all listeners, or those of the specified event. - * @param event - */ - removeAllListeners(event?: string): EventEmitter2; - - /** - * Removes all listeners, or those of the specified event. - * @param events - */ - removeAllListeners(events: string[]): EventEmitter2; - - /** - * By default EventEmitters will print a warning if more than 10 listeners are added to it. - * This is a useful default which helps finding memory leaks. - * Obviously not all Emitters should be limited to 10. This function allows that to be increased. - * Set to zero for unlimited. - * @param n - */ - setMaxListeners(n: number): void; - - /** - * Returns an array of listeners for the specified event. This array can be manipulated, e.g. to remove listeners. - * @param event - */ - listeners(event: string): Function[]; - - /** - * Returns an array of listeners that are listening for any event that is specified. - * This array can be manipulated, e.g. to remove listeners. - */ - listenersAny(): Function[]; - - /** - * Execute each of the listeners that may be listening for the specified event name in order with the list of arguments. - * @param event - * @param args - */ - emit(event: string | string[], ...args: any[]): boolean; - - /** - * Execute each of the listeners that may be listening for the specified event name in order with the list of arguments. - * @param event - */ - emit(event: string[]): boolean; - } -} - diff --git a/types/execa/execa-tests.ts b/types/execa/execa-tests.ts new file mode 100644 index 0000000000..fd7428d1ae --- /dev/null +++ b/types/execa/execa-tests.ts @@ -0,0 +1,124 @@ +import * as assert from 'assert'; +import * as execa from 'execa'; +import { PassThrough } from "stream"; + +execa('unicorns') + .then(result => { + assert(result.cmd === 'unicorns'); + assert(result.code === 0); + assert(result.failed === false); + assert(result.killed === false); + assert(result.signal === null); + assert(result.stderr === 'bad unicorns'); + assert(result.stdout === 'good unicorns'); + assert(result.timedOut === false); + }); + +execa('foo') + .catch(error => { + assert(error.cmd === 'foo'); + assert(error.code === 128); + assert(error.failed === true); + assert(error.killed === false); + assert(error.signal === 'SIGINT'); + assert(error.stderr === 'stderr'); + assert(error.stdout === 'stdout'); + assert(error.timedOut === false); + }); + +execa('noop', ['foo']) + .then(result => result.stderr.toLocaleLowerCase()); + +execa.stdout('unicorns') + .then(stdout => stdout.toLocaleLowerCase()); +execa.stdout('echo', ['unicorns']) + .then(stdout => stdout.toLocaleLowerCase()); + +execa.stderr('unicorns') + .then(stderr => stderr.toLocaleLowerCase()); +execa.stderr('echo', ['unicorns']) + .then(stderr => stderr.toLocaleLowerCase()); + +execa.shell('echo unicorns') + .then(result => result.stdout.toLocaleLowerCase()); + +{ + let result: string; + result = execa.shellSync('foo').stderr; + result = execa.shellSync('noop', { cwd: 'foo' }).stdout; + + result = execa.shellSync('foo').stderr; + result = execa.shellSync('noop foo').stdout; +} + +execa('echo', ['unicorns']).stdout.pipe(process.stdout); +execa('echo', ['unicorns']).stderr.pipe(process.stderr); + +async () => { + const { stdout } = await execa('noop', ['foo'], { stripEof: false }); + assert(stdout === 'foo\n'); +}; + +async () => { + const { stdout } = await execa('foo', { preferLocal: false }); + assert(stdout === 'global foo'); +}; + +async () => { + const { stdout } = await execa('stdin', { input: 'foobar' }); + assert(stdout === 'foobar'); +}; + +async () => { + const { stdout } = await execa('stdin', { input: new Buffer('foobar') }); + assert(stdout === 'foobar'); +}; + +async () => { + const s = new PassThrough(); + s.write('howdy'); + s.end(); + const { stdout } = await execa('stdin', { input: s }); + assert(stdout === 'foobar'); +}; + +async () => { + const child = execa('stdin'); + child.stdin.end('unicorns'); + const { stdout } = await child; + assert(stdout === 'unicorns'); +}; + +async () => { + const { stdout } = await execa('stdin', { + input: 'hello', + stdio: [null, 'ignore', null] + }); + assert(stdout === null); +}; + +{ + const child = execa('stdin', { + input: 'hello', + stdio: [null, 'ignore', null] + }); + + child.stdout.setEncoding('utf8'); + + assert(child.pid === 0); + child.kill(); +} + +async () => { + const { timedOut, code } = await execa('delay', ['3000', '22'], { timeout: 9000 }); + assert(timedOut === true); + assert(code === 22); +}; + +async () => { + const { stdout } = await execa.shell('noop foo', { + shell: process.platform === 'win32' ? 'cmd.exe' : '/bin/bash' + }); + + assert(stdout === 'foo'); +}; diff --git a/types/execa/index.d.ts b/types/execa/index.d.ts new file mode 100644 index 0000000000..df868e4d15 --- /dev/null +++ b/types/execa/index.d.ts @@ -0,0 +1,51 @@ +// Type definitions for execa 0.6 +// Project: https://github.com/sindresorhus/execa#readme +// Definitions by: Douglas Duteil +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +import { ExecOptions, SpawnOptions, SpawnSyncOptions, SpawnSyncReturns, ChildProcess } from "child_process"; +import { Stream } from 'stream'; + +interface ExecaOptions { + input: string | Buffer | Stream; + preferLocal: boolean; + stripEof: boolean; +} + +type Options = SpawnOptions & ExecaOptions & ExecOptions; + +interface ExecaReturns { + cmd: string; + code: number; + failed: boolean; + killed: boolean; + signal: string | null; + stderr: string; + stdout: string; + timedOut: boolean; +} + +type ExecaError = Error & ExecaReturns; + +interface ExecaChildPromise { + catch(onrejected?: ((reason: ExecaError) => TResult | PromiseLike) | undefined | null): Promise; +} +type ExecaChildProcess = ChildProcess & ExecaChildPromise & Promise; + +declare function execa(file: string, options?: Partial): ExecaChildProcess; +declare function execa(file: string, args?: string[], options?: Partial): ExecaChildProcess; +declare namespace execa { + function stdout(file: string, options?: Partial): Promise; + function stdout(file: string, args?: string[], options?: Partial): Promise; + function stderr(file: string, options?: Partial): Promise; + function stderr(file: string, args?: string[], options?: Partial): Promise; + function shell(command: string, options?: SpawnOptions): ExecaChildProcess; + function sync(file: string, options?: SpawnSyncOptions): ExecaReturns; + function sync(file: string, args?: string[], options?: SpawnSyncOptions): ExecaReturns; + function shellSync(command: string, options?: SpawnOptions): ExecaReturns; +} + +export = execa; diff --git a/types/execa/tsconfig.json b/types/execa/tsconfig.json new file mode 100644 index 0000000000..276a55194a --- /dev/null +++ b/types/execa/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", + "execa-tests.ts" + ] +} diff --git a/types/execa/tslint.json b/types/execa/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/execa/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-brute-mongo/index.d.ts b/types/express-brute-mongo/index.d.ts index cf248f8883..9714fedd5d 100644 --- a/types/express-brute-mongo/index.d.ts +++ b/types/express-brute-mongo/index.d.ts @@ -2,9 +2,9 @@ // Project: https://github.com/auth0/express-brute-mongo // Definitions by: Cyril Schumacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 - - +import { Collection } from "mongodb"; /** * @summary MongoDB store adapter. @@ -17,5 +17,5 @@ export = class MongoStore { * @param {Function} getCollection The collection. * @param {Object} options The otpions. */ - constructor(getCollection: (collection: any) => void, options?: Object); + constructor(getCollection: (collection: (c: Collection) => void) => void, options?: Object); } diff --git a/types/express-enforces-ssl/express-enforces-ssl-tests.ts b/types/express-enforces-ssl/express-enforces-ssl-tests.ts new file mode 100644 index 0000000000..50dab42cdf --- /dev/null +++ b/types/express-enforces-ssl/express-enforces-ssl-tests.ts @@ -0,0 +1,6 @@ +import express = require('express'); +import expressEnforcesSsl = require('express-enforces-ssl'); + +let app: express.Express = express(); + +app.use(expressEnforcesSsl()); diff --git a/types/express-enforces-ssl/index.d.ts b/types/express-enforces-ssl/index.d.ts new file mode 100644 index 0000000000..f4c1d424a4 --- /dev/null +++ b/types/express-enforces-ssl/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for express-enforces-ssl 1.1 +// Project: https://github.com/aredo/express-enforces-ssl +// Definitions by: Kevin Stubbs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Request, Response, NextFunction } from 'express'; + +/** + * Enforces HTTPS connections on any incoming requests. + */ +declare function enforceHTTPS(): (req: Request, res: Response, next: NextFunction) => void; + +export = enforceHTTPS; diff --git a/types/express-enforces-ssl/tsconfig.json b/types/express-enforces-ssl/tsconfig.json new file mode 100644 index 0000000000..2fdb6a3472 --- /dev/null +++ b/types/express-enforces-ssl/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", + "express-enforces-ssl-tests.ts" + ] +} diff --git a/types/express-enforces-ssl/tslint.json b/types/express-enforces-ssl/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-enforces-ssl/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-flash-2/express-flash-2-tests.ts b/types/express-flash-2/express-flash-2-tests.ts new file mode 100644 index 0000000000..055501d9ff --- /dev/null +++ b/types/express-flash-2/express-flash-2-tests.ts @@ -0,0 +1,3 @@ +import flash from "express-flash-2"; + +flash(); diff --git a/types/express-flash-2/index.d.ts b/types/express-flash-2/index.d.ts new file mode 100644 index 0000000000..5c8960277f --- /dev/null +++ b/types/express-flash-2/index.d.ts @@ -0,0 +1,57 @@ +// Type definitions for express-flash-2 1.0 +// Project: https://github.com/jack2gs/express-flash-2 +// Definitions by: Matheus Salmi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace Express { + interface Request { + session?: Session; + } + + interface Session { + flash: Flash; + } + + interface Flash { + [key: string]: any[]; + } + + interface Response { + /** + * Queue flash `msg` of the given `type`. + * + * Examples: + * + * req.flash('info', 'email sent'); + * req.flash('error', 'email delivery failed'); + * req.flash('info', 'email re-sent'); + * + * + * Formatting: + * + * Flash notifications also support arbitrary formatting support. + * For example you may pass variable arguments to `req.flash()` + * and use the %s specifier to be replaced by the associated argument: + * + * req.flash('info', 'email has been sent to %s.', userName); + * + * Formatting uses `util.format()`, which is available on Node 0.6+. + */ + flash(type: string, msg: string | any[]): void; + + locals: { + flash: Flash + }; + } +} + +declare module 'express-flash-2' { + import express = require('express'); + + /** + * Expose `flash()` function on responses. + */ + function flash(): express.RequestHandler; + + export = flash; +} diff --git a/types/express-flash-2/tsconfig.json b/types/express-flash-2/tsconfig.json new file mode 100644 index 0000000000..79fba18d61 --- /dev/null +++ b/types/express-flash-2/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", + "express-flash-2-tests.ts" + ] +} \ No newline at end of file diff --git a/types/express-flash-2/tslint.json b/types/express-flash-2/tslint.json new file mode 100644 index 0000000000..949f3563fd --- /dev/null +++ b/types/express-flash-2/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-single-declare-module": false, + "strict-export-declare-modifiers": false, + "expect": false + } +} diff --git a/types/express-handlebars/express-handlebars-tests.ts b/types/express-handlebars/express-handlebars-tests.ts index 4251c985fe..e923542a65 100644 --- a/types/express-handlebars/express-handlebars-tests.ts +++ b/types/express-handlebars/express-handlebars-tests.ts @@ -1,7 +1,3 @@ -/// - - - import express = require('express'); import exphbs = require('express-handlebars'); diff --git a/types/express-jwt/index.d.ts b/types/express-jwt/index.d.ts index 4b6883a258..d75dfa9adf 100644 --- a/types/express-jwt/index.d.ts +++ b/types/express-jwt/index.d.ts @@ -34,7 +34,7 @@ declare namespace jwt { [property: string]: any; } export interface RequestHandler extends express.RequestHandler { - unless?: typeof unless; + unless: typeof unless; } } declare global { diff --git a/types/express-rate-limit/index.d.ts b/types/express-rate-limit/index.d.ts index 54bdacb936..86b8d497b0 100644 --- a/types/express-rate-limit/index.d.ts +++ b/types/express-rate-limit/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for express-rate-limit 2.6 +// Type definitions for express-rate-limit 2.8 // Project: https://github.com/nfriedly/express-rate-limit // Definitions by: Cyril Schumacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -17,14 +17,15 @@ declare namespace RateLimit { interface Options { delayAfter?: number; delayMs?: number; - handlers?(): any; + handlers?(req?: express.Request, res?: express.Response, next?: express.NextFunction): any; headers?: boolean; - keyGenerator?(): string; + keyGenerator?(req?: express.Request, res?: express.Response): string; max?: number; message?: string; - skip?(): boolean; + skip?(req?: express.Request, res?: express.Response): boolean; statusCode?: number; store?: Store; + onLimitReached?(req?: express.Request, res?: express.Response, optionsUsed?: Options): void; windowMs?: number; } } diff --git a/types/express-serve-static-core/index.d.ts b/types/express-serve-static-core/index.d.ts index a54481027d..5e4491c9a1 100644 --- a/types/express-serve-static-core/index.d.ts +++ b/types/express-serve-static-core/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Express 4.x // Project: http://expressjs.com -// Definitions by: Boris Yankov +// Definitions by: Boris Yankov , Michał Lytek , Kacper Polak // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // This extracts the core definitions from express to prevent a circular dependency between express and serve-static /// @@ -168,6 +168,10 @@ interface CookieOptions { sameSite?: boolean | string; } +interface ByteRange { start: number; end: number; } + +interface RequestRanges extends Array { type: string; } + interface Errback { (err: Error): void; } interface Request extends http.IncomingMessage, Express.Request { @@ -193,11 +197,9 @@ interface Request extends http.IncomingMessage, Express.Request { * * @param name */ - get(name: string): string; + get(name: string): string | undefined; - header(name: string): string; - - headers: { [key: string]: string; }; + header(name: string): string | undefined; /** * Check if the given `type(s)` is acceptable, returning @@ -237,9 +239,9 @@ interface Request extends http.IncomingMessage, Express.Request { * // => "json" */ accepts(): string[]; - accepts(type: string): string | boolean; - accepts(type: string[]): string | boolean; - accepts(...type: string[]): string | boolean; + accepts(type: string): string | false; + accepts(type: string[]): string | false; + accepts(...type: string[]): string | false; /** * Returns the first accepted charset of the specified character sets, @@ -250,9 +252,9 @@ interface Request extends http.IncomingMessage, Express.Request { * @param charset */ acceptsCharsets(): string[]; - acceptsCharsets(charset: string): string | boolean; - acceptsCharsets(charset: string[]): string | boolean; - acceptsCharsets(...charset: string[]): string | boolean; + acceptsCharsets(charset: string): string | false; + acceptsCharsets(charset: string[]): string | false; + acceptsCharsets(...charset: string[]): string | false; /** * Returns the first accepted encoding of the specified encodings, @@ -263,9 +265,9 @@ interface Request extends http.IncomingMessage, Express.Request { * @param encoding */ acceptsEncodings(): string[]; - acceptsEncodings(encoding: string): string | boolean; - acceptsEncodings(encoding: string[]): string | boolean; - acceptsEncodings(...encoding: string[]): string | boolean; + acceptsEncodings(encoding: string): string | false; + acceptsEncodings(encoding: string[]): string | false; + acceptsEncodings(...encoding: string[]): string | false; /** * Returns the first accepted language of the specified languages, @@ -277,9 +279,9 @@ interface Request extends http.IncomingMessage, Express.Request { * @param lang */ acceptsLanguages(): string[]; - acceptsLanguages(lang: string): string | boolean; - acceptsLanguages(lang: string[]): string | boolean; - acceptsLanguages(...lang: string[]): string | boolean; + acceptsLanguages(lang: string): string | false; + acceptsLanguages(lang: string[]): string | false; + acceptsLanguages(...lang: string[]): string | false; /** * Parse Range header field, @@ -298,7 +300,7 @@ interface Request extends http.IncomingMessage, Express.Request { * * @param size */ - range(size: number): any[]; + range(size: number): RequestRanges|null|-1|-2; /** * Return an array of Accepted media types @@ -471,7 +473,6 @@ interface MediaType { } interface Send { - (status: number, body?: any): Response; (body?: any): Response; } diff --git a/types/express-serve-static-core/tsconfig.json b/types/express-serve-static-core/tsconfig.json index 40ee779963..cdb77c3573 100644 --- a/types/express-serve-static-core/tsconfig.json +++ b/types/express-serve-static-core/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/express-session/express-session-tests.ts b/types/express-session/express-session-tests.ts index 83748b8b1e..4ee9a76a6e 100644 --- a/types/express-session/express-session-tests.ts +++ b/types/express-session/express-session-tests.ts @@ -1,9 +1,7 @@ - - import express = require('express'); import session = require('express-session'); -var app = express(); +let app = express(); app.use(session({ secret: 'keyboard cat', @@ -14,7 +12,7 @@ app.use(session({ name: 'connect.sid', store: new session.MemoryStore(), cookie: { path: '/', httpOnly: true, secure: false, maxAge: null }, - genid: (req: express.Request): string => { return ''; }, + genid: (req: express.Request): string => '', rolling: false, resave: true, proxy: true, @@ -22,21 +20,20 @@ app.use(session({ unset: 'keep' })); - interface MySession extends Express.Session { views: number; } -app.use(function(req, res, next) { - var sess = req.session; + +app.use((req, res, next) => { + let sess = req.session as MySession; if (sess.views) { - sess.views++ - res.setHeader('Content-Type', 'text/html') - res.write('

    views: ' + sess.views + '

    ') - res.write('

    expires in: ' + (sess.cookie.maxAge / 1000) + 's

    ') - res.end() + sess.views++; + res.setHeader('Content-Type', 'text/html'); + res.write('

    views: ' + sess.views + '

    '); + res.write('

    expires in: ' + (sess.cookie.maxAge / 1000) + 's

    '); + res.end(); } else { - sess.views = 1 - res.end('welcome to the session demo. refresh!') + sess.views = 1; + res.end('welcome to the session demo. refresh!'); } }); - diff --git a/types/express-session/index.d.ts b/types/express-session/index.d.ts index 6d2585d3f9..60dedea20a 100644 --- a/types/express-session/index.d.ts +++ b/types/express-session/index.d.ts @@ -1,96 +1,99 @@ -// Type definitions for express-session +// Type definitions for express-session 1.15 // Project: https://www.npmjs.org/package/express-session // Definitions by: Hiroki Horiuchi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +// Definitions by: Jacob Bogers -/// -declare namespace Express { +import express = require('express'); +import node = require('events'); - export interface Request { - session?: Session; - sessionID?: string; - } +declare global { + namespace Express { + interface Request { + session?: Session; + sessionID?: string; + } - export interface Session { - [key: string]: any; - id: string; + interface SessionData { + [key: string]: any; + cookie: Express.SessionCookieData; + } - regenerate: (callback: (err: any) => void) => void; - destroy: (callback: (err: any) => void) => void; - reload: (callback: (err: any) => void) => void; - save: (callback: (err: any) => void) => void; - touch: (callback: (err: any) => void) => void; + interface SessionCookieData { + originalMaxAge: number; + path: string; + maxAge: number | null; + secure?: boolean; + httpOnly: boolean; + domain?: string; + expires: Date | boolean; + } - cookie: SessionCookie; - } - export interface SessionCookie { - originalMaxAge: number; - path: string; - maxAge: number; - secure?: boolean; - httpOnly: boolean; - domain?: string; - expires: Date | boolean; - serialize: (name: string, value: string) => string; + interface SessionCookie extends SessionCookieData { + serialize(name: string, value: string): string; + } + + interface Session extends SessionData { + id: string; + regenerate(callback: (err: any) => void): void; + destroy(callback: (err: any) => void): void; + reload(callback: (err: any) => void): void; + save(callback: (err: any) => void): void; + touch(callback: (err: any) => void): void; + cookie: SessionCookie; + } } } -declare module "express-session" { - import express = require('express'); - import node = require('events'); +declare function session(options?: session.SessionOptions): express.RequestHandler; - function session(options?: session.SessionOptions): express.RequestHandler; - - namespace session { - export interface SessionOptions { - secret: string; - name?: string; - store?: Store | MemoryStore; - cookie?: express.CookieOptions; - genid?: (req: express.Request) => string; - rolling?: boolean; - resave?: boolean; - proxy?: boolean; - saveUninitialized?: boolean; - unset?: string; - } - - export interface BaseMemoryStore { - get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; - set: (sid: string, session: Express.Session, callback: (err: any) => void) => void; - destroy: (sid: string, callback: (err: any) => void) => void; - length?: (callback: (err: any, length: number) => void) => void; - clear?: (callback: (err: any) => void) => void; - } - - export abstract class Store extends node.EventEmitter { - constructor(config?: any); - - regenerate (req: express.Request, fn: (err: any) => any): void; - load (sid: string, fn: (err: any, session: Express.Session) => any): void; - createSession (req: express.Request, sess: Express.Session): void; - - get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; - set: (sid: string, session: Express.Session, callback: (err: any) => void) => void; - destroy: (sid: string, callback: (err: any) => void) => void; - all: (callback: (err: any, obj: { [sid: string]: Express.Session; }) => void) => void; - length: (callback: (err: any, length: number) => void) => void; - clear: (callback: (err: any) => void) => void; - } - - export class MemoryStore implements BaseMemoryStore { - get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; - set: (sid: string, session: Express.Session, callback: (err: any) => void) => void; - destroy: (sid: string, callback: (err: any) => void) => void; - all: (callback: (err: any, obj: { [sid: string]: Express.Session; }) => void) => void; - length: (callback: (err: any, length: number) => void) => void; - clear: (callback: (err: any) => void) => void; - } +declare namespace session { + interface SessionOptions { + secret: string; + name?: string; + store?: Store | MemoryStore; + cookie?: express.CookieOptions; + genid?(req: express.Request): string; + rolling?: boolean; + resave?: boolean; + proxy?: boolean; + saveUninitialized?: boolean; + unset?: string; } - export = session; + interface BaseMemoryStore { + get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; + set: (sid: string, session: Express.Session, callback: (err: any) => void) => void; + destroy: (sid: string, callback: (err: any) => void) => void; + length?: (callback: (err: any, length: number) => void) => void; + clear?: (callback: (err: any) => void) => void; + } + + abstract class Store extends node.EventEmitter { + constructor(config?: any); + + regenerate: (req: express.Request, fn: (err: any) => any) => void; + load: (sid: string, fn: (err: any, session: Express.Session) => any) => void; + createSession: (req: express.Request, sess: Express.SessionData) => void; + + get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; + set: (sid: string, session: Express.Session, callback: (err: any) => void) => void; + destroy: (sid: string, callback: (err: any) => void) => void; + all: (callback: (err: any, obj: { [sid: string]: Express.SessionData; }) => void) => void; + length: (callback: (err: any, length: number) => void) => void; + clear: (callback: (err: any) => void) => void; + } + + class MemoryStore implements BaseMemoryStore { + get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; + set: (sid: string, session: Express.Session, callback: (err: any) => void) => void; + destroy: (sid: string, callback: (err: any) => void) => void; + all: (callback: (err: any, obj: { [sid: string]: Express.Session; }) => void) => void; + length: (callback: (err: any, length: number) => void) => void; + clear: (callback: (err: any) => void) => void; + } } +export = session; diff --git a/types/express-session/tslint.json b/types/express-session/tslint.json new file mode 100644 index 0000000000..907305050c --- /dev/null +++ b/types/express-session/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "prefer-method-signature": false + } +} \ No newline at end of file diff --git a/types/express-useragent/express-useragent-tests.ts b/types/express-useragent/express-useragent-tests.ts index b959c4e0c2..7ab7b3d20d 100644 --- a/types/express-useragent/express-useragent-tests.ts +++ b/types/express-useragent/express-useragent-tests.ts @@ -18,7 +18,7 @@ app.get("/", function(req, res) { }); app.get("/parse", function(req, res) { - var source = req.headers['user-agent'], + var source = req.headers['user-agent'] as string, ua = useragent.parse(source); res.writeHead(200, {'Content-Type': 'text/plain'}); res.end(JSON.stringify(ua)); diff --git a/types/express-validator/express-validator-tests.ts b/types/express-validator/express-validator-tests.ts deleted file mode 100644 index 9c374d9948..0000000000 --- a/types/express-validator/express-validator-tests.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* Usage Example from https://github.com/ctavan/express-validator */ - -import util = require('util') -import express = require('express') -import expressValidator = require('express-validator') -var app = express(); - -app.use(expressValidator()); - -app.post('/:urlparam', function(req: express.Request, res: express.Response) { - - // checkBody only checks req.body; none of the other req parameters - // Similarly checkParams only checks in req.params (URL params) and - // checkQuery only checks req.query (GET params). - req.checkBody('postparam', 'Invalid postparam').notEmpty().isInt(); - req.checkParams('urlparam', 'Invalid urlparam').isAlpha().matches(/test?/i).matches('test?', 'i'); - req.checkQuery('getparam', 'Invalid getparam').isInt(); - req.checkHeaders('testHeader', 'Invalid testHeader').isLowercase().isUppercase(); - req.checkFiles('testFiles', 'Invalid testFiles').isURL(); - - // OR assert can be used to check on all 3 types of params. - // req.assert('postparam', 'Invalid postparam').notEmpty().isInt(); - // req.assert('urlparam', 'Invalid urlparam').isAlpha(); - // req.assert('getparam', 'Invalid getparam').isInt(); - - req.filter('postparam').toBoolean(); - req.sanitize('postparam').blacklist('t').blacklist(['']).whitelist('hello').whitelist(['h', 'e', 'l']); - req.sanitizeBody('postvar').trim().stripLow().escape(); - req.sanitizeQuery('queryvar').toDate(); - req.sanitizeParams('urlparam').toFloat().toInt().toInt(10); - req.sanitizeHeaders('header').normalizeEmail(); - - - var errors = req.validationErrors(); - var mappedErrors = req.validationErrors(true); - - if (errors) { - res.status(400).send('There have been validation errors: ' + util.inspect(errors)); - return; - } - res.json({ - urlparam: req.param('urlparam'), - getparam: req.param('getparam'), - postparam: req.param('postparam') - }); -}); - -app.listen(8888); diff --git a/types/express-validator/index.d.ts b/types/express-validator/index.d.ts deleted file mode 100644 index 0416b4db44..0000000000 --- a/types/express-validator/index.d.ts +++ /dev/null @@ -1,244 +0,0 @@ -// Type definitions for express-validator 2.20.4 -// Project: https://github.com/ctavan/express-validator -// Definitions by: Nathan Ridley , Jonathan Häberle , Peter Harris -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -// Add RequestValidation Interface on to Express's Request Interface. -declare namespace Express { - interface Request extends ExpressValidator.RequestValidation {} -} - -// External express-validator module. -declare module "express-validator" { - import express = require('express'); - - /** - * - * @middlewareOptions see: https://github.com/ctavan/express-validator#middleware-options - */ - function ExpressValidator(middlewareOptions?:any):express.RequestHandler; - - export = ExpressValidator; -} - -// Internal Module. -declare namespace ExpressValidator { - - export interface ValidationError { - msg: string; - param: string; - } - - interface ValidatorFunction { (item: string | {}, message?: string): Validator; } - interface ValidatorExtraFunction extends ValidatorFunction { (matchIndex: number, message?: string): Validator; } - interface SanitizerFunction { (item: string): Sanitizer; } - interface Dictionary { [key: string]: T; } - - export interface RequestValidation { - assert: ValidatorExtraFunction; - validate: ValidatorExtraFunction; - check: ValidatorExtraFunction; - checkBody: ValidatorFunction; - checkFiles: ValidatorFunction; - checkHeaders: ValidatorFunction; - checkParams: ValidatorFunction; - checkQuery: ValidatorFunction; - - filter: SanitizerFunction; - sanitize: SanitizerFunction; - sanitizeBody: SanitizerFunction; - sanitizeQuery: SanitizerFunction; - sanitizeParams: SanitizerFunction; - sanitizeHeaders: SanitizerFunction; - - onValidationError(errback: (msg: string) => void): void; - validationErrors(mapped?: boolean): Dictionary | MappedError[]; - validationErrors(mapped?: boolean): Dictionary | T[]; - asyncValidationErrors(mapped?: boolean): Promise>; - asyncValidationErrors(mapped?: boolean): Promise>; - } - - export interface Validator { - /** - * Alias for regex() - */ - is(): Validator; - /** - * Alias for notRegex() - */ - not(): Validator; - isEmail(options?:{}): Validator; - /** - * Accepts http, https, ftp - */ - isURL(): Validator; - isFQDN(options?: MinMaxOptions): Validator; - - /** - * Combines isIPv4 and isIPv6 - */ - isIP(): Validator; - isIPv4(): Validator; - isIPv6(): Validator; - isMACAddress(): Validator; - isISBN(version?: number): Validator; - isISIN(): Validator; - isISO8601(): Validator; - isMobilePhone(locale: string): Validator; - isMongoId(): Validator; - isMultibyte(): Validator; - isAlpha(locale?: string): Validator; - isAlphanumeric(locale?: string): Validator; - isAscii(): Validator; - isBase64(): Validator; - isBoolean(): Validator; - isByteLength(options: MinMaxOptions): Validator; - isCurrency(options: {}): Validator; - isDataURI(): Validator; - isDivisibleBy(num: number): Validator; - isNumeric(): Validator; - isHexadecimal(): Validator; - /** - * Accepts valid hexcolors with or without # prefix - */ - isHexColor(): Validator; - /** - * isNumeric accepts zero padded numbers, e.g. '001', isInt doesn't - */ - isInt(options?: MinMaxOptions): Validator; - isLowercase(): Validator; - isUppercase(): Validator; - isDecimal(): Validator; - /** - * Alias for isDecimal - */ - isFloat(): Validator; - isFullWidth(): Validator; - isHalfWidth(): Validator; - isVariableWidth(): Validator; - /** - * Check if length is 0 - */ - isNull(): Validator; - /** - * Not just whitespace (input.trim().length !== 0) - */ - notEmpty(): Validator; - equals(equals:any): Validator; - contains(str:string): Validator; - - /** - * Usage: matches(/[a-z]/i) or matches('[a-z]','i') - */ - matches(pattern:string, modifiers?:string): Validator; - matches(pattern: RegExp): Validator; - - /** - * max is optional - */ - len(min:number, max?:number): Validator; - /** - * Version can be 3, 4 or 5 or empty, see http://en.wikipedia.org/wiki/Universally_unique_identifier - */ - isUUID(version?:number): Validator; - /** - * Alias for isUUID(3) - */ - isUUIDv3(): Validator; - /** - * Alias for isUUID(4) - */ - isUUIDv4(): Validator; - /** - * Alias for isUUID(5) - */ - isUUIDv5(): Validator; - /** - * Uses Date.parse() - regex is probably a better choice - */ - isDate(): Validator; - /** - * Argument is optional and defaults to today. Comparison is non-inclusive - */ - isAfter(date?:Date): Validator; - /** - * Argument is optional and defaults to today. Comparison is non-inclusive - */ - isBefore(date?:Date): Validator; - isIn(options:string): Validator; - isIn(options:string[]): Validator; - notIn(options:string): Validator; - notIn(options:string[]): Validator; - max(val:string): Validator; - min(val:string): Validator; - isJSON(): Validator; - isLength(options: MinMaxOptions): Validator; - isWhitelisted(chars: string): Validator; - /** - * Will work against Visa, MasterCard, American Express, Discover, Diners Club, and JCB card numbering formats - */ - isCreditCard(): Validator; - /** - * Check an input only when the input exists - */ - isSurrogatePar(): Validator; - - optional(options?: { checkFalsy?: boolean }): Validator; - withMessage(message: string): Validator; - } - - interface Sanitizer { - /** - * Trim optional `chars`, default is to trim whitespace (\r\n\t ) - */ - trim(...chars:string[]): Sanitizer; - ltrim(...chars:string[]): Sanitizer; - rtrim(...chars:string[]): Sanitizer; - stripLow(keep_new_lines?: boolean): Sanitizer; - toFloat(): Sanitizer; - toInt(radix?: number): Sanitizer; - /** - * True unless str = '0', 'false', or str.length == 0. In strict mode only '1' and 'true' return true. - */ - toBoolean(strict?: boolean): Sanitizer; - - /** - * Convert the input string to a date, or null if the input is not a date. - */ - toDate(): Sanitizer; - - /** - * Escape &, <, >, and " - */ - escape(): Sanitizer; - - /** - * Replaces HTML encoded entities with <, >, &, ', " and /. - */ - unescape(): Sanitizer; - - blacklist(chars: string): Sanitizer; - blacklist(chars: string[]): Sanitizer; - whitelist(chars: string): Sanitizer; - whitelist(chars: string[]): Sanitizer; - - normalizeEmail(options?: { lowercase?: boolean; remove_dots?: boolean; remove_extensions?: boolean }): Sanitizer; - - /** - * !!! XSS sanitization was removed from the library (see: https://github.com/chriso/validator.js#xss-sanitization) - */ - } - - interface MappedError { - param: string; - msg: string; - value: string; - } - - interface MinMaxOptions { - min?: number; - max?: number; - } -} diff --git a/types/express/express-tests.ts b/types/express/express-tests.ts index 04165d5e09..2891a37d96 100644 --- a/types/express/express-tests.ts +++ b/types/express/express-tests.ts @@ -1,4 +1,3 @@ -/// import * as express from 'express'; namespace express_tests { @@ -52,25 +51,34 @@ namespace express_tests { router.route('/users') .get((req, res, next) => { let types: string[] = req.accepts(); - let type: string | boolean = req.accepts('json'); + let type: string | false = req.accepts('json'); type = req.accepts(['json', 'text']); type = req.accepts('json', 'text'); let charsets: string[] = req.acceptsCharsets(); - let charset: string | boolean = req.acceptsCharsets('utf-8'); + let charset: string | false = req.acceptsCharsets('utf-8'); charset = req.acceptsCharsets(['utf-8', 'utf-16']); charset = req.acceptsCharsets('utf-8', 'utf-16'); let encodings: string[] = req.acceptsEncodings(); - let encoding: string | boolean = req.acceptsEncodings('gzip'); + let encoding: string | false = req.acceptsEncodings('gzip'); encoding = req.acceptsEncodings(['gzip', 'deflate']); encoding = req.acceptsEncodings('gzip', 'deflate'); let languages: string[] = req.acceptsLanguages(); - let language: string | boolean = req.acceptsLanguages('en'); + let language: string | false = req.acceptsLanguages('en'); language = req.acceptsLanguages(['en', 'ja']); language = req.acceptsLanguages('en', 'ja'); + let existingHeader1 = req.get('existingHeader') as string; + let nonExistingHeader1 = req.get('nonExistingHeader') as undefined; + + let existingHeader2 = req.header('existingHeader') as string; + let nonExistingHeader2 = req.header('nonExistingHeader') as undefined; + + let existingHeader3 = req.headers.existingHeader as string; + let nonExistingHeader3 = req.headers.nonExistingHeader as any as undefined; + res.send(req.query['token']); }); diff --git a/types/express/index.d.ts b/types/express/index.d.ts index 9b913db473..d48d58c0c9 100644 --- a/types/express/index.d.ts +++ b/types/express/index.d.ts @@ -2,6 +2,7 @@ // Project: http://expressjs.com // Definitions by: Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /* =================== USAGE =================== diff --git a/types/express/tsconfig.json b/types/express/tsconfig.json index 0fc87c2800..009cb9ec00 100644 --- a/types/express/tsconfig.json +++ b/types/express/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/extend/extend-tests.ts b/types/extend/extend-tests.ts index 12a3147d2a..38e816f020 100644 --- a/types/extend/extend-tests.ts +++ b/types/extend/extend-tests.ts @@ -1,7 +1,5 @@ -/// - -import assert = require('assert'); import extend = require('extend'); +declare function assert(cond: boolean): void; var objectBase = { test: 'base' diff --git a/types/extended-listbox/extended-listbox-tests.ts b/types/extended-listbox/extended-listbox-tests.ts index dfa51ffebf..e3dcba4735 100644 --- a/types/extended-listbox/extended-listbox-tests.ts +++ b/types/extended-listbox/extended-listbox-tests.ts @@ -12,7 +12,7 @@ options.multiple = true; options.searchBar = false; options.searchBarWatermark = "Search"; options.searchBarButton = { icon: "fa fa-search", visible: true, onClick: function () { alert(); } }; -options.getItems = function (): any[] { +options.getItems = (): (string|ListboxItem)[] => { return ["Test1"]; }; options.onItemsChanged = (event: ListboxEvent): void => { @@ -23,13 +23,13 @@ options.onItemsChanged = (event: ListboxEvent): void => { options.onFilterChanged = (event: ListboxEvent): void => { console.log(event.args); }; -options.onValueChanged = function (event: ListboxEvent): void { +options.onValueChanged = (event: ListboxEvent): void => { console.log(event.args); }; -options.onItemDoubleClicked = function (event: ListboxEvent): void { +options.onItemDoubleClicked = (event: ListboxEvent): void => { console.log(event.args); }; -options.onItemEnterPressed = function (event: ListboxEvent): void { +options.onItemEnterPressed = (event: ListboxEvent): void => { console.log(event.args); }; @@ -39,14 +39,14 @@ instance = $test.listbox(options); /////// NEW API /////// // Add string item -var id = instance.addItem("Test2"); +var id: string = instance.addItem("Test2"); // Add item var item: ListboxItem = {}; item.selected = true; item.disabled = false; -item.childItems = ["Test4"]; +item.childItems = [{ text: "Test4" }]; item.groupHeader = false; item.id = "ouetioreit"; item.index = 0; @@ -54,10 +54,18 @@ item.text = "Test3"; id = instance.addItem(item); +// Add string items +var ids: string[] = instance.addItems(["Test2", "Test1"]); + + // Remove item instance.removeItem(id); +// Remove items +instance.removeItems([id, ids[0]]); + + // Get item var i: ListboxItem = instance.getItem(id); diff --git a/types/extended-listbox/index.d.ts b/types/extended-listbox/index.d.ts index 3f3527b903..e5062510f9 100644 --- a/types/extended-listbox/index.d.ts +++ b/types/extended-listbox/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for extended-listbox 2.0.x +// Type definitions for extended-listbox 3.0.x // Project: https://github.com/code-chris/extended-listbox // Definitions by: Christian Kotzbauer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 interface ListboxItem { /** display text */ @@ -26,7 +27,7 @@ interface ListboxItem { parentGroupId?: string; /** list of childItems */ - childItems?: any[]; + childItems?: ListboxItem[]; } interface ListboxSearchBarButtonOptions { @@ -54,7 +55,7 @@ interface ListBoxOptions { multiple?: boolean; /** function which returns a array of items */ - getItems?: () => any; + getItems?: () => (string|ListboxItem)[]; /** callback for selection changes */ onValueChanged?: (event: ListboxEvent) => void; @@ -90,9 +91,15 @@ interface ExtendedListboxInstance { /** Adds a new item to the list */ addItem(item: string|ListboxItem): string; + /** Adds new items to the list */ + addItems(item: (string|ListboxItem)[]): string[]; + /** Removes a item from the list */ removeItem(identifier: string): void; + /** Removes items from the list */ + removeItems(identifiers: string[]): void; + /** Reverts all changes from the DOM */ destroy(): void; diff --git a/types/extract-text-webpack-plugin/index.d.ts b/types/extract-text-webpack-plugin/index.d.ts index 6da0c183c3..0897d7b594 100644 --- a/types/extract-text-webpack-plugin/index.d.ts +++ b/types/extract-text-webpack-plugin/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for extract-text-webpack-plugin 2.0.0 +// Type definitions for extract-text-webpack-plugin 2.1.0 // Project: https://github.com/webpack-contrib/extract-text-webpack-plugin // Definitions by: flying-sheep , kayo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -42,7 +42,7 @@ interface ExtractTextPlugin extends Plugin { * Creates an extracting loader from an existing loader. * Use the resulting loader in `module.rules`/`module.loaders`. */ - extract: (loader: Loader | Loader[] | ExtractOptions) => Loader + extract: (loader: Loader | Loader[] | ExtractOptions) => Loader[] } declare const extractTextPlugin: ExtractTextPlugin diff --git a/types/eyes/eyes-tests.ts b/types/eyes/eyes-tests.ts index 2775aff7c4..c0ca4bc846 100644 --- a/types/eyes/eyes-tests.ts +++ b/types/eyes/eyes-tests.ts @@ -27,7 +27,7 @@ var options = { maxLength: 120 } -var result = eyes.inspector(testObj) +var result = eyes.inspector(options) diff --git a/types/eyes/index.d.ts b/types/eyes/index.d.ts index 3307d9d484..219d13c0fe 100644 --- a/types/eyes/index.d.ts +++ b/types/eyes/index.d.ts @@ -43,7 +43,7 @@ export interface EyesOptions { /** Don't output functions at all */ hideFunctions?: boolean; /** Stream to write to, or null */ - stream?: stream.Writable; + stream?: NodeJS.WritableStream; /** Truncate output if longer */ maxLength?: number; } diff --git a/types/fabric/fabric-tests.ts b/types/fabric/fabric-tests.ts index 770467590c..5e51bb8035 100644 --- a/types/fabric/fabric-tests.ts +++ b/types/fabric/fabric-tests.ts @@ -259,18 +259,16 @@ function sample4() { }); } -namespace myfabric { - export interface CircleWithLineInfos extends fabric.Circle { +interface CircleWithLineInfos extends fabric.Circle { line1?: fabric.Line; line2?: fabric.Line; line3?: fabric.Line; line4?: fabric.Line; - } } function sample5() { const makeCircle = (left: number, top: number, line1?: fabric.Line, line2?: fabric.Line, line3?: fabric.Line, line4?: fabric.Line): fabric.Circle => { - const c = new fabric.Circle({ + const c = new fabric.Circle({ left, top, strokeWidth: 5, @@ -317,11 +315,11 @@ function sample5() { ); canvas.on('object:moving', e => { - const p = e.target; - p.line1 && p.line1.set({ 'x2': p.left, 'y2': p.top }); - p.line2 && p.line2.set({ 'x1': p.left, 'y1': p.top }); - p.line3 && p.line3.set({ 'x1': p.left, 'y1': p.top }); - p.line4 && p.line4.set({ 'x1': p.left, 'y1': p.top }); + const p = e.target; + p.line1 && p.line1.set({ x2: p.left, y2: p.top }); + p.line2 && p.line2.set({ x1: p.left, y1: p.top }); + p.line3 && p.line3.set({ x1: p.left, y1: p.top }); + p.line4 && p.line4.set({ x1: p.left, y1: p.top }); canvas.renderAll(); }); } @@ -351,10 +349,8 @@ function sample6() { }); } -namespace myfabric { - export interface ImageWithInfo extends fabric.Image { +interface ImageWithInfo extends fabric.Image { movingLeft: boolean; - } } function sample7() { @@ -362,7 +358,7 @@ function sample7() { setInterval(() => { fabric.Image.fromURL('../assets/ladybug.png', obj => { - const img = obj; + const img = obj; img.set('left', fabric.util.getRandomInt(200, 600)).set('top', -50); img.movingLeft = !!Math.round(Math.random()); canvas.add(img); @@ -371,7 +367,7 @@ function sample7() { const animate = (function animate() { canvas.forEachObject(obj => { - const img = obj; + const img = obj; img.left += (img.movingLeft ? -1 : 1); img.top += 1; if (img.left > 900 || img.top > 500) { @@ -551,7 +547,7 @@ function sample8() { if (!fabric.Canvas.supports('toDataURL')) { alert('This browser doesn\'t provide means to serialize canvas to an image'); } else { - window.open(canvas.toDataURL('png')); + window.open(canvas.toDataURL({ format: 'png' })); } }; diff --git a/types/fabric/index.d.ts b/types/fabric/index.d.ts index 1596d7d428..96c4ec4e5a 100644 --- a/types/fabric/index.d.ts +++ b/types/fabric/index.d.ts @@ -3086,7 +3086,7 @@ interface ITextOptions extends IObjectOptions { textBackgroundColor?: string; path?: string; - useNative?: Boolean; + useNative?: boolean; text?: string; } export interface Text extends ITextOptions {} diff --git a/types/facebook-js-sdk/facebook-js-sdk-tests.ts b/types/facebook-js-sdk/facebook-js-sdk-tests.ts index 56fc91cd02..f919e3290f 100644 --- a/types/facebook-js-sdk/facebook-js-sdk-tests.ts +++ b/types/facebook-js-sdk/facebook-js-sdk-tests.ts @@ -107,4 +107,5 @@ FB.ui({ method: 'share', mobile_iframe: true, href: 'https://developers.facebook.com/docs/', + picture: 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/2000px-Google_2015_logo.svg.png', }, response => {}); diff --git a/types/facebook-js-sdk/index.d.ts b/types/facebook-js-sdk/index.d.ts index cb1981580a..300eeb3ec0 100644 --- a/types/facebook-js-sdk/index.d.ts +++ b/types/facebook-js-sdk/index.d.ts @@ -113,6 +113,7 @@ declare namespace facebook { interface ShareDialogParams extends DialogParams { method: 'share'; href: string; + picture?: string; hashtag?: string; quote?: string; mobile_iframe?: boolean; diff --git a/types/facebook-pixel/facebook-pixel-tests.ts b/types/facebook-pixel/facebook-pixel-tests.ts index c26c8b109d..7a3ab59df1 100644 --- a/types/facebook-pixel/facebook-pixel-tests.ts +++ b/types/facebook-pixel/facebook-pixel-tests.ts @@ -13,7 +13,10 @@ fbq('track', 'Purchase', purchaseParam); // Custom event (can only be used for audience building) -var custom_params = {custom_param: 'custom_value'}; +var custom_params = { + custom_param: 'custom_value', + content_type: 'product' +}; fbq('trackCustom', 'MyCustomEvent', custom_params); // Reach customers that viewed a product in the 'Shoes' category diff --git a/types/fancybox/index.d.ts b/types/fancybox/index.d.ts index 736d096279..cb37de2098 100644 --- a/types/fancybox/index.d.ts +++ b/types/fancybox/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/fancyapps/fancyBox // Definitions by: Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/farbtastic/index.d.ts b/types/farbtastic/index.d.ts index c6cf10437b..8cb248a874 100644 --- a/types/farbtastic/index.d.ts +++ b/types/farbtastic/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/mattfarina/farbtastic // Definitions by: Matt Brooks // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/featherlight/index.d.ts b/types/featherlight/index.d.ts index 80763aa429..bdedafe36f 100644 --- a/types/featherlight/index.d.ts +++ b/types/featherlight/index.d.ts @@ -2,6 +2,7 @@ // Project: https://noelboss.github.io/featherlight/ // Definitions by: Kaur Kuut // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/fetch.io/fetch.io-tests.ts b/types/fetch.io/fetch.io-tests.ts index 538da8e74b..67c2612fdc 100644 --- a/types/fetch.io/fetch.io-tests.ts +++ b/types/fetch.io/fetch.io-tests.ts @@ -57,3 +57,8 @@ request .post('') .send({}) .json(); + +request + .post('') + .append('key', 'value') + .append({key: 'value'}); diff --git a/types/fetch.io/index.d.ts b/types/fetch.io/index.d.ts index ab949d4880..fabbbc4b52 100644 --- a/types/fetch.io/index.d.ts +++ b/types/fetch.io/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for fetch.io 3.1 +// Type definitions for fetch.io 4.0 // Project: https://github.com/haoxins/fetch.io // Definitions by: newraina // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -23,7 +23,7 @@ export interface Options extends RequestInit { header?: Header; - beforeRequest?(url: TUrl, body: BodyInit): boolean; + beforeRequest?(url: TUrl, body: BodyInit): boolean | void; afterResponse?(res: Response): void; @@ -95,7 +95,9 @@ export class Request { /** * ppend formData */ - append(key: string, value: string): this; + append(key: string, value: any): this; + + append(object: {[key: string]: any}): this; /** * Get Response directly diff --git a/types/ffmpeg-static/ffmpeg-static-tests.ts b/types/ffmpeg-static/ffmpeg-static-tests.ts new file mode 100644 index 0000000000..319a5e27f8 --- /dev/null +++ b/types/ffmpeg-static/ffmpeg-static-tests.ts @@ -0,0 +1,3 @@ +import * as ffmpegStatic from 'ffmpeg-static'; + +ffmpegStatic.path; diff --git a/types/ffmpeg-static/index.d.ts b/types/ffmpeg-static/index.d.ts new file mode 100644 index 0000000000..dfd9ce0906 --- /dev/null +++ b/types/ffmpeg-static/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for ffmpeg-static 2.0 +// Project: https://github.com/eugeneware/ffmpeg-static#readme +// Definitions by: Steve Tran +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/*~ You can declare properties of the module using const, let, or var */ +/** + * Binary location + */ +export const path: string; diff --git a/types/ffmpeg-static/tsconfig.json b/types/ffmpeg-static/tsconfig.json new file mode 100644 index 0000000000..94c7a336b8 --- /dev/null +++ b/types/ffmpeg-static/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", + "ffmpeg-static-tests.ts" + ] +} diff --git a/types/ffmpeg-static/tslint.json b/types/ffmpeg-static/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ffmpeg-static/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/ffprobe-static/ffprobe-static-tests.ts b/types/ffprobe-static/ffprobe-static-tests.ts new file mode 100644 index 0000000000..6565fd2ae1 --- /dev/null +++ b/types/ffprobe-static/ffprobe-static-tests.ts @@ -0,0 +1,3 @@ +import * as ffprobeStatic from 'ffmpeg-static'; + +ffprobeStatic.path; diff --git a/types/ffprobe-static/index.d.ts b/types/ffprobe-static/index.d.ts new file mode 100644 index 0000000000..b337d85e38 --- /dev/null +++ b/types/ffprobe-static/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for ffprobe-static 2.0 +// Project: https://github.com/joshwnj/ffprobe-static +// Definitions by: Steve Tran +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/*~ You can declare properties of the module using const, let, or var */ +/** + * Binary location + */ +export const path: string; diff --git a/types/ffprobe-static/tsconfig.json b/types/ffprobe-static/tsconfig.json new file mode 100644 index 0000000000..726a8e0feb --- /dev/null +++ b/types/ffprobe-static/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", + "ffprobe-static-tests.ts" + ] +} diff --git a/types/ffprobe-static/tslint.json b/types/ffprobe-static/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ffprobe-static/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/findup-sync/findup-sync-tests.ts b/types/findup-sync/findup-sync-tests.ts index 86e34040ef..789190dcce 100644 --- a/types/findup-sync/findup-sync-tests.ts +++ b/types/findup-sync/findup-sync-tests.ts @@ -1,6 +1,3 @@ - -/// - import findup = require('findup-sync'); var str: string; diff --git a/types/fingerprintjs2/fingerprintjs2-tests.ts b/types/fingerprintjs2/fingerprintjs2-tests.ts new file mode 100644 index 0000000000..88cc9f337a --- /dev/null +++ b/types/fingerprintjs2/fingerprintjs2-tests.ts @@ -0,0 +1,123 @@ +function defaultCallback(result: string, components: [{ key: string, value: string }]) { + console.log(`res: ${result}; components: ${components}`); +} + +function test_default_settings() { + let fingerprint = new Fingerprint2().get( defaultCallback); +} + +function test_get_exclude_swfContainerId() { + let fingerprint = new Fingerprint2({ swfContainerId: 'swfContainerId' }).get(defaultCallback); +} + +function test_get_exclude_swfPath() { + let fingerprint = new Fingerprint2({swfPath: 'pathToSwf'}).get(defaultCallback); +} + +function test_get_exclude_userDefinedFonts() { + let fingerprint = new Fingerprint2({ userDefinedFonts: ['font1', 'font2']}).get(defaultCallback); +} + +function test_get_excludeUserAgent() { + let fingerprint = new Fingerprint2({ excludeUserAgent: true }).get(defaultCallback); +} + +function test_get_excludeLanguage() { + let fingerprint = new Fingerprint2({ excludeLanguage: true }).get(defaultCallback); +} + +function test_get_excludeColorDepth() { + let fingerprint = new Fingerprint2({ excludeColorDepth: true }).get(defaultCallback); +} + +function test_get_excludeScreenResolution() { + let fingerprint = new Fingerprint2({ excludeScreenResolution: true }).get(defaultCallback); +} + +function test_get_excludeTimezoneOffset() { + let fingerprint = new Fingerprint2({ excludeTimezoneOffset: true }).get(defaultCallback); +} + +function test_get_excludeSessionStorage() { + let fingerprint = new Fingerprint2({ excludeSessionStorage: true }).get(defaultCallback); +} + +function test_get_excludeIndexedDB() { + let fingerprint = new Fingerprint2({ excludeIndexedDB: true }).get(defaultCallback); +} + +function test_get_excludeAddBehavior() { + let fingerprint = new Fingerprint2({ excludeAddBehavior: true }).get(defaultCallback); +} + +function test_get_excludeOpenDatabase() { + let fingerprint = new Fingerprint2({ excludeOpenDatabase: true }).get(defaultCallback); +} + +function test_get_excludeCpuClass() { + let fingerprint = new Fingerprint2({ excludeCpuClass: true }).get(defaultCallback); +} + +function test_get_excludePlatform() { + let fingerprint = new Fingerprint2({ excludePlatform: true }).get(defaultCallback); +} + +function test_get_excludeDoNotTrack() { + let fingerprint = new Fingerprint2({ excludeDoNotTrack: true }).get(defaultCallback); +} + +function test_get_excludeCanvas() { + let fingerprint = new Fingerprint2({ excludeCanvas: true }).get(defaultCallback); +} + +function test_get_excludeWebGL() { + let fingerprint = new Fingerprint2({ excludeWebGL: true }).get(defaultCallback); +} + +function test_get_excludeAdBlock() { + let fingerprint = new Fingerprint2({ excludeAdBlock: true }).get(defaultCallback); +} + +function test_get_excludeHasLiedLanguages() { + let fingerprint = new Fingerprint2({ excludeHasLiedLanguages: true }).get(defaultCallback); +} + +function test_get_excludeHasLiedResolution() { + let fingerprint = new Fingerprint2({ excludeHasLiedResolution: true }).get(defaultCallback); +} + +function test_get_excludeHasLiedOs() { + let fingerprint = new Fingerprint2({ excludeHasLiedOs: true }).get(defaultCallback); +} + +function test_get_excludeHasLiedBrowser() { + let fingerprint = new Fingerprint2({ excludeHasLiedBrowser: true }).get(defaultCallback); +} + +function test_get_excludeJsFonts() { + let fingerprint = new Fingerprint2({ excludeJsFonts: true }).get(defaultCallback); +} + +function test_get_excludeFlashFonts() { + let fingerprint = new Fingerprint2({ excludeFlashFonts: true }).get(defaultCallback); +} + +function test_get_excludePlugins() { + let fingerprint = new Fingerprint2({ excludePlugins: true }).get(defaultCallback); +} + +function test_get_excludeIEPlugins() { + let fingerprint = new Fingerprint2({ excludeIEPlugins: true }).get(defaultCallback); +} + +function test_get_excludeTouchSupport() { + let fingerprint = new Fingerprint2({ excludeTouchSupport: true }).get(defaultCallback); +} + +function test_get_excludePixelRatio() { + let fingerprint = new Fingerprint2({ excludePixelRatio: true }).get(defaultCallback); +} + +function test_get_excludeHardwareConcurrency() { + let fingerprint = new Fingerprint2({ excludeHardwareConcurrency: true }).get(defaultCallback); +} diff --git a/types/fingerprintjs2/index.d.ts b/types/fingerprintjs2/index.d.ts new file mode 100644 index 0000000000..c9fc9b2a39 --- /dev/null +++ b/types/fingerprintjs2/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for fingerprintjs2 1.5 +// Project: https://github.com/Valve/fingerprintjs2 +// Definitions by: Curt Mullin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare class Fingerprint2 { + static VERSION: string; + constructor(options?: Fingerprint2Options); + + get(callback: (result: string, components: [{ key: string, value: string }]) => void): number; +} + +interface Fingerprint2Options { + swfContainerId?: string; + swfPath?: string; + userDefinedFonts?: [string]; + excludeUserAgent?: boolean; + excludeLanguage?: boolean; + excludeColorDepth?: boolean; + excludeScreenResolution?: boolean; + excludeTimezoneOffset?: boolean; + excludeSessionStorage?: boolean; + excludeIndexedDB?: boolean; + excludeAddBehavior?: boolean; + excludeOpenDatabase?: boolean; + excludeCpuClass?: boolean; + excludePlatform?: boolean; + excludeDoNotTrack?: boolean; + excludeCanvas?: boolean; + excludeWebGL?: boolean; + excludeAdBlock?: boolean; + excludeHasLiedLanguages?: boolean; + excludeHasLiedResolution?: boolean; + excludeHasLiedOs?: boolean; + excludeHasLiedBrowser?: boolean; + excludeJsFonts?: boolean; + excludeFlashFonts?: boolean; + excludePlugins?: boolean; + excludeIEPlugins?: boolean; + excludeTouchSupport?: boolean; + excludePixelRatio?: boolean; + excludeHardwareConcurrency?: boolean; +} diff --git a/types/fingerprintjs2/tsconfig.json b/types/fingerprintjs2/tsconfig.json new file mode 100644 index 0000000000..30131c07dc --- /dev/null +++ b/types/fingerprintjs2/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fingerprintjs2-tests.ts" + ] +} diff --git a/types/fingerprintjs2/tslint.json b/types/fingerprintjs2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fingerprintjs2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/firebird/firebird-tests.ts b/types/firebird/firebird-tests.ts new file mode 100644 index 0000000000..4a6bd59c05 --- /dev/null +++ b/types/firebird/firebird-tests.ts @@ -0,0 +1,122 @@ +import * as fb from "firebird"; + +/* createConnection */ +let con: fb.Connection = fb.createConnection(); + +/* Connection */ +con = new fb.Connection(); + +con.connectSync('test.fdb', 'sysdba', 'masterkey', ''); +con.connect('test.fdb', 'sysdba', 'masterkey', '', (err: Error | null) => {}); + +if (con.connected === true) { + console.log('connected'); +} + +con.querySync("insert into test (id,name) values (5, 'new one')"); +const res: fb.FBResult = con.querySync("select * from test"); +con.query("select * from test", (err: Error | null, res: fb.FBResult) => {}); + +con.commitSync(); +con.commit((err: Error | null) => {}); + +con.rollbackSync(); +con.rollback((err: Error | null) => {}); + +con.startSync(); +con.start((err: Error | null) => {}); + +let stmt: fb.FBStatement = con.prepareSync("select * from test where name = ?"); + +if (con.inTransaction === true) { + console.log('in transaction'); +} + +let blob: fb.FBBlob = con.newBlobSync(); + +let tx: fb.Transaction = con.startNewTransactionSync(); +con.startNewTransaction((err: Error | null, tx: fb.Transaction) => {}); + +/* DataType */ +let column: fb.DataType = {}; +if (typeof (column) === "number") { + column * 10; +} else if (typeof (column) === "string") { + column.substring(0, 1); +} else if (column instanceof Date) { + column.toISOString(); +} else { + let _: fb.FBBlob = column; +} + +/* FBResult */ +interface MyRow { + id: number; + name: string; +} + +let rowsArray: fb.DataType[][] = res.fetchSync("all", false); +rowsArray = res.fetchSync(1, false); +res.fetch("all", false, (row: fb.DataType[]) => {}, (err: Error | null, eof: boolean) => {}); +res.fetch(1, false, (row: fb.DataType[]) => {}, (err: Error | null, eof: boolean) => {}); +let rowsObject: Array<{[colmn: string]: fb.DataType}> = res.fetchSync("all", true); +rowsObject = res.fetchSync(1, true); +res.fetch("all", true, (row: {[colmn: string]: fb.DataType}) => {}, (err: Error | null, eof: boolean) => {}); +res.fetch(1, true, (row: {[colmn: string]: fb.DataType}) => {}, (err: Error | null, eof: boolean) => {}); +let rowsTyped: MyRow[] = res.fetchSync("all", true); +rowsTyped = res.fetchSync(1, true); +res.fetch("all", true, (row: MyRow) => {}, (err: Error | null, eof: boolean) => {}); +res.fetch(1, true, (row: MyRow) => {}, (err: Error | null, eof: boolean) => {}); + +/* Transaction */ +tx.querySync("insert into test (id,name) values (5, 'new one')"); +tx.query("select * from test", (err: Error | null, res: fb.FBResult) => {}); + +tx.commitSync(); +tx.commit((err: Error | null) => {}); + +tx.rollbackSync(); +tx.rollback((err: Error | null) => {}); + +tx.startSync(); +tx.start((error: Error | null) => {}); +stmt = tx.prepareSync("select * from test where name = ?"); + +if (tx.inTransaction === true) { + console.log('in transaction'); +} + +/* FBStatement */ +let asFBResult: fb.FBResult = stmt; +stmt.execSync("John"); +stmt.execSync(1, "Mary"); +stmt.execInTransSync(tx, "John"); +stmt.execInTransSync(tx, 1, "Mary"); +stmt.exec("John"); +stmt.exec(1, "Mary"); +stmt.execInTrans(tx, "John"); +stmt.execInTrans(tx, 1, "Mary"); + +/* FBBlob */ +blob._openSync(); + +blob._closeSync(); + +let buffer: Buffer = {}; +let readBytes: number = blob._readSync(buffer); +blob._read(buffer, (err: Error | null, buffer: Buffer, len: number) => {}); + +blob._readAll(); +blob._readAll(10); +blob._readAll(10, 20); +blob._readAll(10, (err: Error | null, buffer: Buffer, len: number) => {}); +blob._readAll(10, 20, (err: Error | null, buffer: Buffer, len: number) => {}); + +let writtenBytes = blob._writeSync(buffer); +writtenBytes = blob._writeSync(buffer, 10); +blob._write(buffer); +blob._write(buffer, 10); +blob._write(buffer, 10, (err: Error | null) => {}); + +/* Stream */ +let strm: NodeJS.ReadWriteStream = new fb.Stream(blob); diff --git a/types/firebird/index.d.ts b/types/firebird/index.d.ts new file mode 100644 index 0000000000..6506762408 --- /dev/null +++ b/types/firebird/index.d.ts @@ -0,0 +1,501 @@ +// Type definitions for firebird 0.1 +// Project: https://github.com/xdenser/node-firebird-libfbclient +// Definitions by: Yasushi Kato +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +/** + * This is a type declaration file for 'firebird' package. + * + * Original document is [here](https://www.npmjs.com/package/firebird). + */ +declare module 'firebird' { + /** + * @see createConnection() method will create Firebird Connection object for you + */ + function createConnection(): Connection; + + /** + * Handles database connection and queries. Supports Synchronous and Asynchronous operation. + */ + class Connection { + constructor(); + + /** + * Connects you to database, + * + * @param database a database name in Firebird notation, i.e. : + * @param username user name + * @param pasword + * @param role + * + * @throws raises exception on error (try to catch it). + */ + connectSync(db: string, user: string, pass: string, role: string): void; + + /** + * Asynchronously connects you to Database. + * + * @param database a database name in Firebird notation, i.e. : + * @param username user name + * @param pasword + * @param role + * @param callback function(err), where err is error object in case of error. + */ + connect(db: string, user: string, pass: string, role: string, callback: (err: Error | null) => void): void; + + /** + * A boolean readonly property indicating if Connection object is connected to database + */ + connected: boolean; + + /** + * Executes SQL query. + * @param sql an SQL query to execute. + * @return object in case of success. + * @throws Raises error otherwise. + */ + querySync(sql: string): FBResult; + + /** + * Asynchronously executes query. + * + * @param sql an SQL query to execute. + * @param callback function(err,res), err - is error object or null, res - FBResult object. + */ + query(sql: string, callback: (err: Error | null, res: FBResult) => void): void; + + /** + * Registers connection to listen for firebird event name, called from PL\SQL (in stored procedures or triggers) with post_event 'name'. + * + * @desc + * You may set callback for event with + * @code connection.on('fbevent', function(name, count){ ));. + * Where name is event name, and count is number of times event were posted. + * + * @param name Firebird Event Name. + */ + addFBevent(name: string): void; + + /** + * Unsubscribes connection from getting events for name. + * + * @param name Firebird Event Name. + */ + deleteFBevent(name: string): void; + + /** + * @summary + * Synchronously commits current transaction. + * + * @desc + * Notes: + * There is only one transaction associated with connection. + * Transacation is automatically started before any query if connection does not have active transaction (check @see inTransaction property). + * You also should note that DDL statements (altering database structure) are commited automatically. + * To run quieries in context of other transaction use @see Transaction object. + */ + commitSync(): void; + + /** + * Asynchronous commit transaction. + * + * @desc + * Read notes in @see commitSync() . + * + * @param callback function(err), where err is error object in case of error. + */ + commit(callback: (err: Error | null) => void): void; + + /** + * Synchronously rollbacks current transaction. + * + * @desc + * Read notes in @see commitSync() . + */ + rollbackSync(): void; + + /** + * Asynchronously rollbacks current transaction. + * + * @desc + * Read notes in @see commitSync() . + * + * @param callback function(err), where err is error object in case of error. + */ + rollback(callback: (err: Error | null) => void): void; + + /** + * Synchronously starts new default transaction. + * + * @desc + * The default transaction should be not in started state before call to this method. + * Read notes in @see commitSync() . + */ + startSync(): void; + + /** + * Asynchronously starts new default transaction. + * + * @desc + * Read notes in @see commitSync() . + * + * @param callback function(err), where err is error object in case of error. + */ + start(callback: (err: Error | null) => void): void; + + /**Synchronously prepares SQL statement and returns FBStatement object. + * + * @param sql an SQL query to prepare. + */ + prepareSync(sql: string): FBStatement; + + /** + * A boolean readonly property indicating if connection is in started transaction state. + */ + inTransaction: boolean; + + /** + * Creates new FBblob object and opens it for write. + * After finishing write operation and closing blob one may insert it in database passing as parameter to exec, + * execSync methods of @see FBStatement object. + */ + newBlobSync(): FBBlob; + + /** + * Creates new Transaction object and starts new transaction. + * @returns created object. + */ + startNewTransactionSync(): Transaction; + + /** + * Creates new Transaction object and starts new transaction. + * + * @param callback function(err, transaction), where err is error object in case of error, transaction - newly created transaction. + */ + startNewTransaction(callback: (err: Error | null, transaction: Transaction) => void): void; + } + + /** + * @desc + * Here is Firebird to Node data type accordance: + * + * | Firebird | Node | + * | :------- | :-------- | + * | DATE | Date | + * | TIME | Date | + * | TIMESTAMP | Date | + * | CHAR | String | + * | VARCHAR | String | + * | SMALLINT | Integer| + * | INTEGER | Integer| + * | NUMERIC | Number | + * | DECIMAL | Number | + * | FLOAT | Number | + * | DOUBLE | Number | + * | BLOB | FBblob | + */ + type DataType = Date | string /*| Integer*/ | number | FBBlob; + + /** + * Represents results of SQL query if any. + * You should use this object to fetch rows from database. + * Each row may be represented as array of field values or as object with named fields. + * + * @see DataType + */ + class FBResult { + /** + * @summary + * Synchronously fetches result rows. + * + * @desc + * If you pass "all" as rowCount - it will fetch all result rows. + * If you pass less rowCount than are actually in result, it will return specified number of rows. + * You may call fetchSync multiple times until all rows will be fetched. + * If you specify more rowCount than available it will return only actual number of rows. + * + * @param rowCount number of rows to fetch from results; + * @param asObject format of returned rows. When false - methods returns array of array, when true - array of objects. + */ + fetchSync(rowCount: number | "all", asObject: boolean): DataType[][] | Array<{[column: string]: DataType}>; + fetchSync(rowCount: number | "all", asObject: false): DataType[][]; + fetchSync(rowCount: number | "all", asObject: true): Array<{[column: string]: DataType}>; + fetchSync(rowCount: number | "all", asObject: true): T[]; + + /** + * Asynchronously fetches rows one by one. + * + * @param rowCount number of rows to fetch from results + * @param asObject format of returned rows. When false - methods returns array of array, when true - array of objects + * @param rowCallback function(row), row - Array or Object (depends on asObject parameter) representing single row from result; called for each fetched row. + * @param eofCallback function(err,eof), err - Error object in case of error, or null; eof - true | false. called when whole operation is complete. + */ + fetch(rowCount: number | "all", asObject: boolean, rowCallback: (row: DataType[]| {[column: string]: DataType}) => void, eofCallback: (err: Error | null, eof: boolean) => void): void; + fetch(rowCount: number | "all", asObject: false, rowCallback: (row: DataType[]) => void, eofCallback: (err: Error | null, eof: boolean) => void): void; + fetch(rowCount: number | "all", asObject: true, rowCallback: (row: {[column: string]: DataType}) => void, eofCallback: (err: Error | null, eof: boolean) => void): void; + fetch(rowCount: number | "all", asObject: true, rowCallback: (row: T) => void, eofCallback: (err: Error | null, eof: boolean) => void): void; + } + + /** + * Represents SQL transaction. + * + * @desc + * To get instance of this object call @see startNewTransactionSync or @see startNewTransaction methods of @see Connection object. + * Transaction objects may be reused after commit or rollback. + */ + interface Transaction { + /** + * Executes SQL query in context of this transaction. Returns FBResult object in case of success. Raises error otherwise. + * + * @param sql an SQL query to execute. + */ + querySync(sql: string): void; + + /** + * Asynchronously executes query in context of this transaction. + * + * @param sql an SQL query to execute. + * @param callback err - is error object or null, res - FBResult object. + */ + query(sql: string, callback: (err: Error | null, res: FBResult) => void): void; + + /** + * Synchronously commits this transaction. + * + * @desc + * Notes: + * Transacation is automatically started before any query in context of this object + * if this object does not have active transaction (check inTransaction property). + * You also should note that DDL statements (altering database structure) are commited automatically. + */ + commitSync(): void; + + /** + * Asynchronous commit transaction. + * + * @desc + * Read notes in @see commitSync() . + * + * @param callback function(err), where err is error object in case of error. + */ + commit(callback: (err: Error | null) => void): void; + + /** + * Synchronously rollbacks transaction. + * + * @desc + * Read notes in @see commitSync() . + */ + rollbackSync(): void; + + /** + * Asynchronously rollbacks transaction. + * + * @desc + * Read notes in @see commitSync() . + * + * @param callback function(err), where err is error object in case of error. + */ + rollback(callback: (err: Error | null) => void): void; + + /** + * Synchronously starts transaction. + * + * @desc + * The transaction should be not in started state before call to this method. + * Read notes in @see commitSync() . + * See @see inTransaction property. + */ + startSync(): void; + + /** + * Asynchronously starts new transaction. + * + * @desc + * Read notes in @see commitSync() . + * + * @param callback function(err), where err is error object in case of error. + */ + start(callback: (err: Error | null) => void): void; + + /** + * Synchronously prepares SQL statement + * + * @param sql an SQL query to prepare. + * @returns @see FBStatement object in context of this transaction. + */ + prepareSync(sql: string): FBStatement; + + /* + * A boolean readonly property indicating if this transaction is in started state. + */ + inTransaction: boolean; + } + + /** + * Represents prepared SQL query (returned by @see Connection.prepare() and @see Connection.prepareSync()). + * + * @see FBStatement is derived form @see FBResult class. + * So it can fetch rows just like @see FBresult object after call to @see execSync, exec methods. + */ + class FBStatement extends FBResult { + /** + * Synchronously executes prepared statement with given parameters. + * + * @desc + * You may fetch rows with methods inherited from @see FBResult. + * @see Statement is executed in context of default connection transaction. + * + * @param params parameters of prepared statement in the same order as in SQL and with appropriate types. + */ + execSync(...params: DataType[]): void; + + /** + * Same as @see execSync but executes statement in context of given @see Transaction obejct. + * + * @param transaction + * @param params + */ + execInTransSync(transaction: Transaction, ...params: DataType[]): void; + + /** + * Asynchronously executes prepared statement with given parameters. + * + * @desc + * @see FBStatement emits 'result' or 'error' event. + * You may fetch rows with methods inherited from @see FBResult after 'result' event emitted. + * Statement is executed in context of default connection transaction. + * + * @param params parameters of prepared statement in the same order as in SQL and with appropriate types. + */ + exec(...params: DataType[]): void; + + /** + * Same as @see exec but executes statement in context of given @see Transaction obejct. + * + * @param transaction + * @param params + */ + execInTrans(transaction: Transaction, ...params: DataType[]): void; + } + + /** + * Represents BLOB data type. + */ + interface FBBlob { + /** + * Synchronously opens blob for reading. + */ + _openSync(): void; + + /** + * Synchronously closes previously opened blob. + */ + _closeSync(): void; + + /** + * Synchronously reads BLOB segment (chunk) into buffer. Tries to fill whole buffer with data. + * + * @param buffer Node buffer to fill with data. + * @returns actual number of bytes read. + */ + _readSync(buffer: Buffer): number; + + /** + * Asynchronously reads BLOB segment (chunk) into buffer. Tries to fill whole buffer with data. + * + * @param buffer Node buffer to fill with data. + * @param callback function(err,buffer,len), err - Error object in case of error, or null;buffer - buffer filled with data; len - actual data length. + */ + _read(buffer: Buffer, callback: (err: Error | null, buffer: Buffer, len: number) => void): void; + + /** + * Asynchronously reads all data from BLOB field. + * Object emits events while reading data error, drain',end`. + * + * @param initialSize - optional, initial result buffer to allocate, default = 0 + * @param chunkSize - optional, size of chunk used to read data, default = 1024 + * @param callback - optional, function (err, buffer, len), err - Error object in case of error, or null;buffer - buffer filled with data; len - actual data length. + */ + _readAll(initialSize?: number, chunkSize?: number, callback?: (err: Error | null, buffer: Buffer, len: number) => void): void; + _readAll(initialSize: number, callback: (err: Error | null, buffer: Buffer, len: number) => void): void; + _readAll(callback: (err: Error | null, buffer: Buffer, len: number) => void): void; + + /** + * Synchronously writes BLOB segment (chunk) from buffer. + * + * @param buffer Node buffer to write from to blob; + * @param len optional length parameter, if specified only len bytes from buffer will be writen. + * @returns number of bytes actually writen. + */ + _writeSync(buffer: Buffer, len?: number): number; + + /** + * Asynchronously writes BLOB segment (chunk) from buffer and calls callback function if any. + * + * @param buffer Node buffer to write from to blob; + * @param len optional length parameter, if specified only len bytes from buffer will be writen. + * @param callback function(err), err - Error object in case of error, or null; + */ + _write(buffer: Buffer, len?: number, callback?: (err: Error | null) => void): void; + } + + /** + * Represents BLOB stream. + * + * @desc + * Create BLOB stream using + * @code var strm = new fb.Stream(FBblob);. + * + * You may pipe strm to/from NodeJS Stream objects (fs or socket). + * You may also look at [NodeJS Streams reference](https://nodejs.org/api/stream.html). + */ + class Stream implements NodeJS.ReadWriteStream { + constructor(blob: FBBlob); + + /* Following lines is JUST AS NodeJS.ReadStream, NodeJS.WriteStream, and NodeJS.Emmiter */ + /* tslint:disable */ + + /* NodeJS.ReadStream */ + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: string | null): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: T): this; + unshift(chunk: string): void; + unshift(chunk: Buffer): void; + wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; + + /* NodeJS.WriteStream */ + writable: boolean; + write(buffer: Buffer | string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + end(): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; + + /* EventEmitter */ + addListener(event: string | symbol, listener: Function): this; + on(event: string | symbol, listener: Function): this; + once(event: string | symbol, listener: Function): this; + removeListener(event: string | symbol, listener: Function): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + listenerCount(type: string | symbol): number; + prependListener(event: string | symbol, listener: Function): this; + prependOnceListener(event: string | symbol, listener: Function): this; + eventNames(): (string | symbol)[]; + + /* tslint:enable */ + } +} diff --git a/types/firebird/tsconfig.json b/types/firebird/tsconfig.json new file mode 100644 index 0000000000..705913437a --- /dev/null +++ b/types/firebird/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "scripthost" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "firebird-tests.ts" + ] +} diff --git a/types/firebird/tslint.json b/types/firebird/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/firebird/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/fixed-data-table/fixed-data-table-tests.tsx b/types/fixed-data-table/fixed-data-table-tests.tsx index 64b622b21f..96c17a4a9a 100644 --- a/types/fixed-data-table/fixed-data-table-tests.tsx +++ b/types/fixed-data-table/fixed-data-table-tests.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import {Table, Cell, Column, CellProps} from "fixed-data-table"; // create your Table -class MyTable1 extends React.Component<{}, {}> { +class MyTable1 extends React.Component { render(): React.ReactElement { return ( { } // create your Columns -class MyTable2 extends React.Component<{}, {}> { +class MyTable2 extends React.Component { render(): React.ReactElement { return (
    { +class MyTextCell extends React.Component { render(): React.ReactElement { const {rowIndex, field, myData} = this.props; @@ -104,7 +104,7 @@ class MyTextCell extends React.Component { } } -class MyLinkCell extends React.Component { +class MyLinkCell extends React.Component { render(): React.ReactElement { const {rowIndex, field, myData} = this.props; const link: string = myData[rowIndex][field]; @@ -168,7 +168,7 @@ class MyTable4 extends React.Component<{}, MyTable4State> { } // Listen for events -class MyTable5 extends React.Component<{}, {}> { +class MyTable5 extends React.Component { render(): React.ReactElement { return (
    , Stephen Jelfs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 /// @@ -489,12 +489,12 @@ declare namespace FixedDataTable { columnKey?: string | number; } - export class Table extends React.Component { + export class Table extends React.Component { } - export class Column extends React.Component { + export class Column extends React.Component { } - export class ColumnGroup extends React.Component { + export class ColumnGroup extends React.Component { } - export class Cell extends React.Component { + export class Cell extends React.Component { } } diff --git a/types/flatbuffers/flatbuffers-tests.ts b/types/flatbuffers/flatbuffers-tests.ts index 87593106c7..cdcabac25b 100644 --- a/types/flatbuffers/flatbuffers-tests.ts +++ b/types/flatbuffers/flatbuffers-tests.ts @@ -1,3 +1,5 @@ +import { flatbuffers } from "flatbuffers"; + enum Color { Red= 1, Green= 2, @@ -303,9 +305,9 @@ class Stat { } class Monster { - bb: flatbuffers.ByteBuffer= null; + bb: flatbuffers.ByteBuffer= null; - bb_pos: number = 0; + bb_pos: number = 0; __init(i: number, bb: flatbuffers.ByteBuffer): Monster { this.bb_pos = i; diff --git a/types/flatbuffers/index.d.ts b/types/flatbuffers/index.d.ts index 1342acdf15..4f75a7cc30 100644 --- a/types/flatbuffers/index.d.ts +++ b/types/flatbuffers/index.d.ts @@ -3,625 +3,629 @@ // Definitions by: Kamil Rojewski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace flatbuffers { - /** - * @typedef {number} - */ - type Offset = number; +export { flatbuffers }; - /** - * @typedef {{ - * bb: flatbuffers.ByteBuffer, - * bb_pos: number - * }} - */ - interface Table { - bb: ByteBuffer; - bb_pos: number; - } - - /** - * @type {number} - * @const - */ - const SIZEOF_SHORT: number; - - /** - * @type {number} - * @const - */ - const SIZEOF_INT: number; - - /** - * @type {number} - * @const - */ - const FILE_IDENTIFIER_LENGTH: number; - - /** - * @enum {number} - */ - enum Encoding { UTF8_BYTES, UTF16_STRING } - - /** - * @type {Int32Array} - * @const - */ - const int32: Int32Array; - - /** - * @type {Float32Array} - * @const - */ - const float32: Float32Array; - - /** - * @type {Float64Array} - * @const - */ - const float64: Float64Array; - - /** - * @type {boolean} - * @const - */ - const isLittleEndian: boolean; - - //////////////////////////////////////////////////////////////////////////////// - - class Long { +declare global { + namespace flatbuffers { /** - * @type {number} - * @const + * @typedef {number} */ - low: number; + type Offset = number; + + /** + * @typedef {{ + * bb: flatbuffers.ByteBuffer, + * bb_pos: number + * }} + */ + interface Table { + bb: ByteBuffer; + bb_pos: number; + } /** * @type {number} * @const */ - high: number; + const SIZEOF_SHORT: number; /** - * @type {flatbuffers.Long} + * @type {number} * @const */ - static ZERO: Long; + const SIZEOF_INT: number; /** - * @constructor - * @param {number} high - * @param {number} low + * @type {number} + * @const */ - constructor(low: number, high: number); + const FILE_IDENTIFIER_LENGTH: number; /** - * @returns {number} + * @enum {number} */ - toFloat64(): number; + enum Encoding { UTF8_BYTES, UTF16_STRING } /** - * @param {flatbuffers.Long} other - * @returns {boolean} + * @type {Int32Array} + * @const */ - equals(other: any): boolean; + const int32: Int32Array; /** - * @param {number} low - * @param {number} high + * @type {Float32Array} + * @const */ - static create(low: number, high: number): Long; - } - - //////////////////////////////////////////////////////////////////////////////// - - class Builder { - /** - * @constructor - * @param {number=} initial_size - */ - constructor(initial_size?: number); - - /** - * In order to save space, fields that are set to their default value - * don't get serialized into the buffer. Forcing defaults provides a - * way to manually disable this optimization. - * - * @param {boolean} forceDefaults true always serializes default values - */ - forceDefaults(forceDefaults: boolean): void; - - /** - * Get the ByteBuffer representing the FlatBuffer. Only call this after you've - * called finish(). The actual data starts at the ByteBuffer's current position, - * not necessarily at 0. - * - * @returns {flatbuffers.ByteBuffer} - */ - dataBuffer(): ByteBuffer; - - /** - * Get the ByteBuffer representing the FlatBuffer. Only call this after you've - * called finish(). The actual data starts at the ByteBuffer's current position, - * not necessarily at 0. - * - * @returns {Uint8Array} - */ - asUint8Array(): Uint8Array; - - /** - * Prepare to write an element of `size` after `additional_bytes` have been - * written, e.g. if you write a string, you need to align such the int length - * field is aligned to 4 bytes, and the string data follows it directly. If all - * you need to do is alignment, `additional_bytes` will be 0. - * - * @param {number} size This is the of the new element to write - * @param {number} additional_bytes The padding size - */ - prep(size: number, additional_bytes: number): void; - - /** - * @param {number} byte_size - */ - pad(byte_size: number): void; - - /** - * @param {number} value - */ - writeInt8(value: number): void; - - /** - * @param {number} value - */ - writeInt16(value: number): void; - - /** - * @param {number} value - */ - writeInt32(value: number): void; - - /** - * @param {flatbuffers.Long} value - */ - writeInt64(value: Long): void; - - /** - * @param {number} value - */ - writeFloat32(value: number): void; - - /** - * @param {number} value - */ - writeFloat64(value: number): void; - - /** - * @param {number} value - */ - addInt8(value: number): void; - - /** - * @param {number} value - */ - addInt16(value: number): void; - - /** - * @param {number} value - */ - addInt32(value: number): void; - - /** - * @param {flatbuffers.Long} value - */ - addInt64(value: Long): void; - - /** - * @param {number} value - */ - addFloat32(value: number): void; - - /** - * @param {number} value - */ - addFloat64(value: number): void; - - /** - * @param {number} voffset - * @param {number} value - * @param {number} defaultValue - */ - addFieldInt8(voffset: number, value: number, defaultValue: number): void; - - /** - * @param {number} voffset - * @param {number} value - * @param {number} defaultValue - */ - addFieldInt16(voffset: number, value: number, defaultValue: number): void; - - /** - * @param {number} voffset - * @param {number} value - * @param {number} defaultValue - */ - addFieldInt32(voffset: number, value: number, defaultValue: number): void; - - /** - * @param {number} voffset - * @param {flatbuffers.Long} value - * @param {flatbuffers.Long} defaultValue - */ - addFieldInt64(voffset: number, value: Long, defaultValue: Long): void; - - /** - * @param {number} voffset - * @param {number} value - * @param {number} defaultValue - */ - addFieldFloat32(voffset: number, value: number, defaultValue: number): void; - - /** - * @param {number} voffset - * @param {number} value - * @param {number} defaultValue - */ - addFieldFloat64(voffset: number, value: number, defaultValue: number): void; - - /** - * @param {number} voffset - * @param {flatbuffers.Offset} value - * @param {flatbuffers.Offset} defaultValue - */ - addFieldOffset(voffset: number, value: Offset, defaultValue: Offset): void; - - /** - * Structs are stored inline, so nothing additional is being added. `d` is always 0. - * - * @param {number} voffset - * @param {flatbuffers.Offset} value - * @param {flatbuffers.Offset} defaultValue - */ - addFieldStruct(voffset: number, value: Offset, defaultValue: Offset): void; - - /** - * Structures are always stored inline, they need to be created right - * where they're used. You'll get this assertion failure if you - * created it elsewhere. - * - * @param {flatbuffers.Offset} obj The offset of the created object - */ - nested(obj: Offset): void; - - /** - * Should not be creating any other object, string or vector - * while an object is being constructed - */ - notNested(): void; - - /** - * Set the current vtable at `voffset` to the current location in the buffer. - * - * @param {number} voffset - */ - slot(voffset: number): void; + const float32: Float32Array; /** - * @returns {flatbuffers.Offset} Offset relative to the end of the buffer. + * @type {Float64Array} + * @const */ - offset(): Offset; + const float64: Float64Array; /** - * Doubles the size of the backing ByteBuffer and copies the old data towards - * the end of the new buffer (since we build the buffer backwards). - * - * @param {flatbuffers.ByteBuffer} bb The current buffer with the existing data - * @returns {flatbuffers.ByteBuffer} A new byte buffer with the old data copied - * to it. The data is located at the end of the buffer. + * @type {boolean} + * @const */ - static growByteBuffer(bb: ByteBuffer): ByteBuffer; + const isLittleEndian: boolean; - /** - * Adds on offset, relative to where it will be written. - * - * @param {flatbuffers.Offset} offset The offset to add - */ - addOffset(offset: Offset): void; + //////////////////////////////////////////////////////////////////////////////// - /** - * Start encoding a new object in the buffer. Users will not usually need to - * call this directly. The FlatBuffers compiler will generate helper methods - * that call this method internally. - * - * @param {number} numfields - */ - startObject(numfields: number): void; - - /** - * Finish off writing the object that is under construction. - * - * @returns {flatbuffers.Offset} The offset to the object inside `dataBuffer` - */ - endObject(): Offset; + class Long { + /** + * @type {number} + * @const + */ + low: number; - /** - * @param {flatbuffers.Offset} root_table - * @param {string=} file_identifier - */ - finish(root_table: Offset, file_identifier?: string): void; - - /** - * This checks a required field has been set in a given table that has - * just been constructed. - * - * @param {flatbuffers.Offset} table - * @param {number} field - */ - requiredField(table: Offset, field: number): void; - - /** - * Start a new array/vector of objects. Users usually will not call - * this directly. The FlatBuffers compiler will create a start/end - * method for vector types in generated code. - * - * @param {number} elem_size The size of each element in the array - * @param {number} num_elems The number of elements in the array - * @param {number} alignment The alignment of the array - */ - startVector(elem_size: number, num_elems: number, alignment: number): void; - - /** - * Finish off the creation of an array and all its elements. The array must be - * created with `startVector`. - * - * @returns {flatbuffers.Offset} The offset at which the newly created array - * starts. - */ - endVector(): Offset; - - /** - * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed - * instead of a string, it is assumed to contain valid UTF-8 encoded data. - * - * @param {string|Uint8Array} s The string to encode - * @return {flatbuffers.Offset} The offset in the buffer where the encoded string starts - */ - createString(s: string|Uint8Array): Offset; - - /** - * Conveniance function for creating Long objects. - * - * @param {number} low - * @param {number} high - * @returns {Long} - */ - createLong(low: number, high: number): Long; - } - - //////////////////////////////////////////////////////////////////////////////// - - class ByteBuffer { - /** - * @constructor - * @param {Uint8Array} bytes - */ - constructor(bytes: Uint8Array); - - /** - * @param {number} byte_size - * @returns {flatbuffers.ByteBuffer} - */ - static allocate(byte_size: number): ByteBuffer; - - /** - * @returns {Uint8Array} - */ - bytes(): Uint8Array; - - /** - * @returns {number} - */ - position(): number; - - /** - * @param {number} position - */ - setPosition(position: number): void; - - /** - * @returns {number} - */ - capacity(): number; - - /** - * @param {number} offset - * @returns {number} - */ - readInt8(offset: number): number; - - /** - * @param {number} offset - * @returns {number} - */ - readUint8(offset: number): number; - - /** - * @param {number} offset - * @returns {number} - */ - readInt16(offset: number): number; - - /** - * @param {number} offset - * @returns {number} - */ - readUint16(offset: number): number; - - /** - * @param {number} offset - * @returns {number} - */ - readInt32(offset: number): number; - - /** - * @param {number} offset - * @returns {number} - */ - readUint32(offset: number): number; - - /** - * @param {number} offset - * @returns {flatbuffers.Long} - */ - readInt64(offset: number): Long; - - /** - * @param {number} offset - * @returns {flatbuffers.Long} - */ - readUint64(offset: number): Long; - - /** - * @param {number} offset - * @returns {number} - */ - readFloat32(offset: number): number; - - /** - * @param {number} offset - * @returns {number} - */ - readFloat64(offset: number): number; - - /** - * @param {number} offset - * @param {number} value - */ - writeInt8(offset: number, value: number): void; - - /** - * @param {number} offset - * @param {number} value - */ - writeUint8(offset: number, value: number): void; - - /** - * @param {number} offset - * @param {number} value - */ - writeInt16(offset: number, value: number): void; - - /** - * @param {number} offset - * @param {number} value - */ - writeUint16(offset: number, value: number): void; - - /** - * @param {number} offset - * @param {number} value - */ - writeInt32(offset: number, value: number): void; - - /** - * @param {number} offset - * @param {number} value - */ - writeUint32(offset: number, value: number): void; - - /** - * @param {number} offset - * @param {flatbuffers.Long} value - */ - writeInt64(offset: number, value: Long): void; - - /** - * @param {number} offset - * @param {flatbuffers.Long} value - */ - writeUint64(offset: number, value: Long): void; - - /** - * @param {number} offset - * @param {number} value - */ - writeFloat32(offset: number, value: number): void; - - /** - * @param {number} offset - * @param {number} value - */ - writeFloat64(offset: number, value: number): void; - - /** - * Look up a field in the vtable, return an offset into the object, or 0 if the - * field is not present. - * - * @param {number} bb_pos - * @param {number} vtable_offset - * @returns {number} - */ - __offset(bb_pos: number, vtable_offset: number): number; - - /** - * Initialize any Table-derived type to point to the union at the given offset. - * - * @param {flatbuffers.Table} t - * @param {number} offset - * @returns {flatbuffers.Table} - */ - __union(t: T, offset: number): T; - - /** - * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer. - * This allocates a new string and converts to wide chars upon each access. - * - * To avoid the conversion to UTF-16, pass flatbuffers.Encoding.UTF8_BYTES as - * the "optionalEncoding" argument. This is useful for avoiding conversion to - * and from UTF-16 when the data will just be packaged back up in another - * FlatBuffer later on. - * - * @param {number} offset - * @param {flatbuffers.Encoding=} optionalEncoding Defaults to UTF16_STRING - * @returns {string|Uint8Array} - */ - __string(offset: number, optionalEncoding?: Encoding): string|Uint8Array; - - /** - * Retrieve the relative offset stored at "offset" - * @param {number} offset - * @returns {number} - */ - __indirect(offset: number): number; - - /** - * Get the start of data of a vector whose offset is stored at "offset" in this object. - * - * @param {number} offset - * @returns {number} - */ - __vector(offset: number): number; - - /** - * Get the length of a vector whose offset is stored at "offset" in this object. - * - * @param {number} offset - * @returns {number} - */ - __vector_len(offset: number): number; - - /** - * @param {string} ident - * @returns {boolean} - */ - __has_identifier(ident: string): boolean; - - /** - * Conveniance function for creating Long objects. - * - * @param {number} low - * @param {number} high - * @returns {Long} - */ - createLong(low: number, high: number): Long; + /** + * @type {number} + * @const + */ + high: number; + + /** + * @type {flatbuffers.Long} + * @const + */ + static ZERO: Long; + + /** + * @constructor + * @param {number} high + * @param {number} low + */ + constructor(low: number, high: number); + + /** + * @returns {number} + */ + toFloat64(): number; + + /** + * @param {flatbuffers.Long} other + * @returns {boolean} + */ + equals(other: any): boolean; + + /** + * @param {number} low + * @param {number} high + */ + static create(low: number, high: number): Long; + } + + //////////////////////////////////////////////////////////////////////////////// + + class Builder { + /** + * @constructor + * @param {number=} initial_size + */ + constructor(initial_size?: number); + + /** + * In order to save space, fields that are set to their default value + * don't get serialized into the buffer. Forcing defaults provides a + * way to manually disable this optimization. + * + * @param {boolean} forceDefaults true always serializes default values + */ + forceDefaults(forceDefaults: boolean): void; + + /** + * Get the ByteBuffer representing the FlatBuffer. Only call this after you've + * called finish(). The actual data starts at the ByteBuffer's current position, + * not necessarily at 0. + * + * @returns {flatbuffers.ByteBuffer} + */ + dataBuffer(): ByteBuffer; + + /** + * Get the ByteBuffer representing the FlatBuffer. Only call this after you've + * called finish(). The actual data starts at the ByteBuffer's current position, + * not necessarily at 0. + * + * @returns {Uint8Array} + */ + asUint8Array(): Uint8Array; + + /** + * Prepare to write an element of `size` after `additional_bytes` have been + * written, e.g. if you write a string, you need to align such the int length + * field is aligned to 4 bytes, and the string data follows it directly. If all + * you need to do is alignment, `additional_bytes` will be 0. + * + * @param {number} size This is the of the new element to write + * @param {number} additional_bytes The padding size + */ + prep(size: number, additional_bytes: number): void; + + /** + * @param {number} byte_size + */ + pad(byte_size: number): void; + + /** + * @param {number} value + */ + writeInt8(value: number): void; + + /** + * @param {number} value + */ + writeInt16(value: number): void; + + /** + * @param {number} value + */ + writeInt32(value: number): void; + + /** + * @param {flatbuffers.Long} value + */ + writeInt64(value: Long): void; + + /** + * @param {number} value + */ + writeFloat32(value: number): void; + + /** + * @param {number} value + */ + writeFloat64(value: number): void; + + /** + * @param {number} value + */ + addInt8(value: number): void; + + /** + * @param {number} value + */ + addInt16(value: number): void; + + /** + * @param {number} value + */ + addInt32(value: number): void; + + /** + * @param {flatbuffers.Long} value + */ + addInt64(value: Long): void; + + /** + * @param {number} value + */ + addFloat32(value: number): void; + + /** + * @param {number} value + */ + addFloat64(value: number): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldInt8(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldInt16(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldInt32(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {flatbuffers.Long} value + * @param {flatbuffers.Long} defaultValue + */ + addFieldInt64(voffset: number, value: Long, defaultValue: Long): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldFloat32(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldFloat64(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {flatbuffers.Offset} value + * @param {flatbuffers.Offset} defaultValue + */ + addFieldOffset(voffset: number, value: Offset, defaultValue: Offset): void; + + /** + * Structs are stored inline, so nothing additional is being added. `d` is always 0. + * + * @param {number} voffset + * @param {flatbuffers.Offset} value + * @param {flatbuffers.Offset} defaultValue + */ + addFieldStruct(voffset: number, value: Offset, defaultValue: Offset): void; + + /** + * Structures are always stored inline, they need to be created right + * where they're used. You'll get this assertion failure if you + * created it elsewhere. + * + * @param {flatbuffers.Offset} obj The offset of the created object + */ + nested(obj: Offset): void; + + /** + * Should not be creating any other object, string or vector + * while an object is being constructed + */ + notNested(): void; + + /** + * Set the current vtable at `voffset` to the current location in the buffer. + * + * @param {number} voffset + */ + slot(voffset: number): void; + + /** + * @returns {flatbuffers.Offset} Offset relative to the end of the buffer. + */ + offset(): Offset; + + /** + * Doubles the size of the backing ByteBuffer and copies the old data towards + * the end of the new buffer (since we build the buffer backwards). + * + * @param {flatbuffers.ByteBuffer} bb The current buffer with the existing data + * @returns {flatbuffers.ByteBuffer} A new byte buffer with the old data copied + * to it. The data is located at the end of the buffer. + */ + static growByteBuffer(bb: ByteBuffer): ByteBuffer; + + /** + * Adds on offset, relative to where it will be written. + * + * @param {flatbuffers.Offset} offset The offset to add + */ + addOffset(offset: Offset): void; + + /** + * Start encoding a new object in the buffer. Users will not usually need to + * call this directly. The FlatBuffers compiler will generate helper methods + * that call this method internally. + * + * @param {number} numfields + */ + startObject(numfields: number): void; + + /** + * Finish off writing the object that is under construction. + * + * @returns {flatbuffers.Offset} The offset to the object inside `dataBuffer` + */ + endObject(): Offset; + + /** + * @param {flatbuffers.Offset} root_table + * @param {string=} file_identifier + */ + finish(root_table: Offset, file_identifier?: string): void; + + /** + * This checks a required field has been set in a given table that has + * just been constructed. + * + * @param {flatbuffers.Offset} table + * @param {number} field + */ + requiredField(table: Offset, field: number): void; + + /** + * Start a new array/vector of objects. Users usually will not call + * this directly. The FlatBuffers compiler will create a start/end + * method for vector types in generated code. + * + * @param {number} elem_size The size of each element in the array + * @param {number} num_elems The number of elements in the array + * @param {number} alignment The alignment of the array + */ + startVector(elem_size: number, num_elems: number, alignment: number): void; + + /** + * Finish off the creation of an array and all its elements. The array must be + * created with `startVector`. + * + * @returns {flatbuffers.Offset} The offset at which the newly created array + * starts. + */ + endVector(): Offset; + + /** + * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed + * instead of a string, it is assumed to contain valid UTF-8 encoded data. + * + * @param {string|Uint8Array} s The string to encode + * @return {flatbuffers.Offset} The offset in the buffer where the encoded string starts + */ + createString(s: string|Uint8Array): Offset; + + /** + * Conveniance function for creating Long objects. + * + * @param {number} low + * @param {number} high + * @returns {Long} + */ + createLong(low: number, high: number): Long; + } + + //////////////////////////////////////////////////////////////////////////////// + + class ByteBuffer { + /** + * @constructor + * @param {Uint8Array} bytes + */ + constructor(bytes: Uint8Array); + + /** + * @param {number} byte_size + * @returns {flatbuffers.ByteBuffer} + */ + static allocate(byte_size: number): ByteBuffer; + + /** + * @returns {Uint8Array} + */ + bytes(): Uint8Array; + + /** + * @returns {number} + */ + position(): number; + + /** + * @param {number} position + */ + setPosition(position: number): void; + + /** + * @returns {number} + */ + capacity(): number; + + /** + * @param {number} offset + * @returns {number} + */ + readInt8(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readUint8(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readInt16(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readUint16(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readInt32(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readUint32(offset: number): number; + + /** + * @param {number} offset + * @returns {flatbuffers.Long} + */ + readInt64(offset: number): Long; + + /** + * @param {number} offset + * @returns {flatbuffers.Long} + */ + readUint64(offset: number): Long; + + /** + * @param {number} offset + * @returns {number} + */ + readFloat32(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readFloat64(offset: number): number; + + /** + * @param {number} offset + * @param {number} value + */ + writeInt8(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeUint8(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeInt16(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeUint16(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeInt32(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeUint32(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {flatbuffers.Long} value + */ + writeInt64(offset: number, value: Long): void; + + /** + * @param {number} offset + * @param {flatbuffers.Long} value + */ + writeUint64(offset: number, value: Long): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeFloat32(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeFloat64(offset: number, value: number): void; + + /** + * Look up a field in the vtable, return an offset into the object, or 0 if the + * field is not present. + * + * @param {number} bb_pos + * @param {number} vtable_offset + * @returns {number} + */ + __offset(bb_pos: number, vtable_offset: number): number; + + /** + * Initialize any Table-derived type to point to the union at the given offset. + * + * @param {flatbuffers.Table} t + * @param {number} offset + * @returns {flatbuffers.Table} + */ + __union(t: T, offset: number): T; + + /** + * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer. + * This allocates a new string and converts to wide chars upon each access. + * + * To avoid the conversion to UTF-16, pass flatbuffers.Encoding.UTF8_BYTES as + * the "optionalEncoding" argument. This is useful for avoiding conversion to + * and from UTF-16 when the data will just be packaged back up in another + * FlatBuffer later on. + * + * @param {number} offset + * @param {flatbuffers.Encoding=} optionalEncoding Defaults to UTF16_STRING + * @returns {string|Uint8Array} + */ + __string(offset: number, optionalEncoding?: Encoding): string|Uint8Array; + + /** + * Retrieve the relative offset stored at "offset" + * @param {number} offset + * @returns {number} + */ + __indirect(offset: number): number; + + /** + * Get the start of data of a vector whose offset is stored at "offset" in this object. + * + * @param {number} offset + * @returns {number} + */ + __vector(offset: number): number; + + /** + * Get the length of a vector whose offset is stored at "offset" in this object. + * + * @param {number} offset + * @returns {number} + */ + __vector_len(offset: number): number; + + /** + * @param {string} ident + * @returns {boolean} + */ + __has_identifier(ident: string): boolean; + + /** + * Conveniance function for creating Long objects. + * + * @param {number} low + * @param {number} high + * @returns {Long} + */ + createLong(low: number, high: number): Long; + } } } diff --git a/types/flatbuffers/tslint.json b/types/flatbuffers/tslint.json index e013b93508..3db14f85ea 100644 --- a/types/flatbuffers/tslint.json +++ b/types/flatbuffers/tslint.json @@ -1,6 +1 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "align": false - } -} +{ "extends": "dtslint/dt.json" } diff --git a/types/flatpickr/index.d.ts b/types/flatpickr/index.d.ts index 9a98beabaa..fce4214c90 100644 --- a/types/flatpickr/index.d.ts +++ b/types/flatpickr/index.d.ts @@ -1,23 +1,32 @@ -// Type definitions for flatpickr 2.2 +// Type definitions for flatpickr 3.0 // Project: https://github.com/chmln/flatpickr // Definitions by: James Birtles +// Rowell Heria +// Michael Wagner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare class Flatpickr { - constructor(element: string | Element, options?: Flatpickr.Options); +declare function flatpickr(element: string | Element | HTMLElement, options?: Flatpickr.Options): Flatpickr; - changeMonth(month: number, isOffset: boolean): void; +declare class Flatpickr { + constructor(element: string | Element | HTMLElement, options?: Flatpickr.Options); + + changeMonth(month: number, isOffset?: boolean): void; clear(): void; close(): void; destroy(): void; - formatDate(format: string, date: Date): string; + formatDate(date: Date, format: string): string; jumpToDate(date?: Flatpickr.DateString): void; open(): void; - parseDate(date: string): Date; + parseDate(date: string, format: string): Date; redraw(): void; set(option: string, value: any): void; - setDate(date: Flatpickr.DateString | Flatpickr.DateString[]): void; + setDate(date: Flatpickr.DateString | Flatpickr.DateString[], triggerChange?: boolean, dateFormat?: string): void; toggle(): void; + + static localize(locale: string | Flatpickr.Locale): void; + static l10ns: { + default: Flatpickr.Locale; + }; } declare namespace Flatpickr { @@ -29,7 +38,10 @@ declare namespace Flatpickr { clickOpens?: boolean; dateFormat?: string | null; defaultDate?: DateString | DateString[]; + defaultHour?: number; + defaultMinute?: number; disable?: DateRange[]; + disableMobile?: boolean; enable?: DateRange[]; enableTime?: boolean; enableSeconds?: boolean; @@ -57,6 +69,30 @@ declare namespace Flatpickr { utc?: boolean; weekNumbers?: boolean; wrap?: boolean; + locale?: string | Locale; + } + + interface Locale { + weekdays?: { + shorthand?: string[]; + longhand?: string[]; + }; + + months?: { + shorthand?: string[]; + longhand?: string[]; + }; + + firstDayOfWeek?: number; + weekAbbreviation?: string; + rangeSeparator?: string; + am?: string; + pm?: string; + + ordinal?: ((nth: number) => string) | string; + + scrollTitle?: string; + toggleTitle?: string; } type DateString = Date | string; diff --git a/types/flatpickr/v2/flatpickr-tests.ts b/types/flatpickr/v2/flatpickr-tests.ts new file mode 100644 index 0000000000..f6800e38b7 --- /dev/null +++ b/types/flatpickr/v2/flatpickr-tests.ts @@ -0,0 +1,14 @@ +import * as Flatpickr from 'flatpickr'; + +const picker1 = new Flatpickr('input'); + +const input = document.querySelector('input'); +if (input != null) { + const picker2 = new Flatpickr(input, { + mode: 'range', + onChange: dates => null + }); + picker2.setDate(['2016-11-15T00:00:00.000Z', new Date()]); +} + +picker1.destroy(); diff --git a/types/flatpickr/v2/index.d.ts b/types/flatpickr/v2/index.d.ts new file mode 100644 index 0000000000..9a98beabaa --- /dev/null +++ b/types/flatpickr/v2/index.d.ts @@ -0,0 +1,68 @@ +// Type definitions for flatpickr 2.2 +// Project: https://github.com/chmln/flatpickr +// Definitions by: James Birtles +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare class Flatpickr { + constructor(element: string | Element, options?: Flatpickr.Options); + + changeMonth(month: number, isOffset: boolean): void; + clear(): void; + close(): void; + destroy(): void; + formatDate(format: string, date: Date): string; + jumpToDate(date?: Flatpickr.DateString): void; + open(): void; + parseDate(date: string): Date; + redraw(): void; + set(option: string, value: any): void; + setDate(date: Flatpickr.DateString | Flatpickr.DateString[]): void; + toggle(): void; +} + +declare namespace Flatpickr { + interface Options { + altFormat?: string; + altInput?: boolean; + altInputClass?: string; + allowInput?: boolean; + clickOpens?: boolean; + dateFormat?: string | null; + defaultDate?: DateString | DateString[]; + disable?: DateRange[]; + enable?: DateRange[]; + enableTime?: boolean; + enableSeconds?: boolean; + hourIncrement?: number; + inline?: boolean; + maxDate?: DateString; + minDate?: DateString; + minuteIncrement?: number; + mode?: Mode; + nextArrow?: string; + noCalendar?: boolean; + onChange?: EventCallback | EventCallback[]; + onClose?: EventCallback | EventCallback[]; + onOpen?: EventCallback | EventCallback[]; + onReady?: EventCallback | EventCallback[]; + onMonthChange?: EventCallback | EventCallback[]; + onYearChange?: EventCallback | EventCallback[]; + onValueUpdate?: EventCallback | EventCallback[]; + onDayCreate?: EventCallback | EventCallback[]; + parseDate?(date: string): Date; + prevArrow?: string; + shorthandCurrentMonth?: boolean; + static?: boolean; + time_24hr?: boolean; + utc?: boolean; + weekNumbers?: boolean; + wrap?: boolean; + } + + type DateString = Date | string; + type DateRange = DateString | { from: DateString, to: DateString } | ((date: Date) => boolean); + type Mode = 'single' | 'multiple' | 'range'; + type EventCallback = (selectedDates: Date[], dateStr: string, instance: Flatpickr, elem: HTMLElement) => void; +} + +export = Flatpickr; diff --git a/types/flatpickr/v2/tsconfig.json b/types/flatpickr/v2/tsconfig.json new file mode 100644 index 0000000000..704678c0fd --- /dev/null +++ b/types/flatpickr/v2/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "flatpickr": [ "flatpickr/v2" ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "flatpickr-tests.ts" + ] +} diff --git a/types/flatpickr/v2/tslint.json b/types/flatpickr/v2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/flatpickr/v2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/flexslider/flexslider-tests.ts b/types/flexslider/flexslider-tests.ts index 591e874262..80421e1a99 100644 --- a/types/flexslider/flexslider-tests.ts +++ b/types/flexslider/flexslider-tests.ts @@ -1,19 +1,17 @@ -// Can also be used with $(document).ready() -$(window).load(function() { +$(function() { $('.flexslider').flexslider({ animation: "slide" }); }); -// Can also be used with $(document).ready() -$(window).load(function() { +$(function() { $('.flexslider').flexslider({ animation: "slide", controlNav: "thumbnails" }); }); -$(window).load(function() { +$(function() { // The slider being synced must be initialized first $('#carousel').flexslider({ animation: "slide", @@ -34,7 +32,7 @@ $(window).load(function() { }); }); -$(window).load(function() { +$(function() { $('.flexslider').flexslider({ animation: "slide", animationLoop: false, @@ -43,8 +41,7 @@ $(window).load(function() { }); }); -// Can also be used with $(document).ready() -$(window).load(function() { +$(function() { $('.flexslider').flexslider({ animation: "slide", animationLoop: false, @@ -55,12 +52,10 @@ $(window).load(function() { }); }); -// Can also be used with $(document).ready() -$(window).load(function() { +$(function() { // Vimeo API nonsense - var player = document.getElementById('player_1'); - $(player).on('ready', ready); + $(ready); function addEvent(element:any, eventName:any, callback:any) { if (element.addEventListener) { @@ -70,13 +65,13 @@ $(window).load(function() { } } - function ready(player_id: any) { - var froogaloop = $(player_id); + function ready() { + var froogaloop = $('#player_1'); froogaloop.on('play', function(data) { - $('.flexslider').flexslider("pause"); + $('.flexslider').flexslider({ pauseText: "pause" }); }); froogaloop.on('pause', function(data) { - $('.flexslider').flexslider("play"); + $('.flexslider').flexslider({ playText: "play" }); }); } -}); \ No newline at end of file +}); diff --git a/types/flexslider/index.d.ts b/types/flexslider/index.d.ts index 9767744919..d9110a26f5 100644 --- a/types/flexslider/index.d.ts +++ b/types/flexslider/index.d.ts @@ -2,8 +2,9 @@ // Project: https://github.com/woothemes/FlexSlider // Definitions by: Diullei Gomes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 -/// +/// interface SliderObject { //Object: The slider element itself container: Object; //Object: The ul.slides within the slider diff --git a/types/flexslider/tsconfig.json b/types/flexslider/tsconfig.json index f8ba67625d..12c0cc9692 100644 --- a/types/flexslider/tsconfig.json +++ b/types/flexslider/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "flexslider-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/flickity/index.d.ts b/types/flickity/index.d.ts index 16b5b7c96f..24a873761d 100644 --- a/types/flickity/index.d.ts +++ b/types/flickity/index.d.ts @@ -2,6 +2,7 @@ // Project: http://flickity.metafizzy.co/ // Definitions by: Chris McGrath // Definitions: https://github.com/clmcgrath/ +// TypeScript Version: 2.3 interface JQuery { diff --git a/types/flight/index.d.ts b/types/flight/index.d.ts index c46ddd0bfa..da88eaa53d 100644 --- a/types/flight/index.d.ts +++ b/types/flight/index.d.ts @@ -2,6 +2,7 @@ // Project: http://flightjs.github.com/flight/ // Definitions by: Jonathan Hedrén // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/flot/index.d.ts b/types/flot/index.d.ts index e4fed6a246..84ab0daeb8 100644 --- a/types/flot/index.d.ts +++ b/types/flot/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.flotcharts.org/ // Definitions by: Matt Burland , Timo Mühlbach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/fluent-ffmpeg/fluent-ffmpeg-tests.ts b/types/fluent-ffmpeg/fluent-ffmpeg-tests.ts index b4beb14ef7..e45f8ff855 100644 --- a/types/fluent-ffmpeg/fluent-ffmpeg-tests.ts +++ b/types/fluent-ffmpeg/fluent-ffmpeg-tests.ts @@ -1,7 +1,52 @@ -import * as ffmpeg from "fluent-ffmpeg"; +import ffmpeg = require('fluent-ffmpeg'); +import { createWriteStream } from 'fs'; -let source: string; -let format: string; -let output: string; +const stream = createWriteStream('outputfile.divx'); -ffmpeg({ source }).format(format).save(output); +ffmpeg('/path/to/file.avi') + .output('outputfile.mp4') + .output(stream); + +ffmpeg('/path/to/file.avi') + // You may pass a pipe() options object when using a stream + .output(stream, { end: true }); + +// Output-related methods apply to the last output added +ffmpeg('/path/to/file.avi') + + .output('outputfile.mp4') + .audioCodec('libfaac') + .videoCodec('libx264') + .size('320x200') + + .output(stream) + .preset('divx') + .size('640x480'); + +// Use the run() method to run commands with multiple outputs +ffmpeg('/path/to/file.avi') + .output('outputfile.mp4') + .output(stream) + .on('end', () => { + console.log('Finished processing'); + }) + .run(); + +// Create a command to convert source.avi to MP4 +const command = ffmpeg('/path/to/source.avi') + .audioCodec('libfaac') + .videoCodec('libx264') + .format('mp4'); + +// Create a clone to save a small resized version +command.clone() + .size('320x200') + .save('/path/to/output-small.mp4'); + +// Create a clone to save a medium resized version +command.clone() + .size('640x400') + .save('/path/to/output-medium.mp4'); + +// Save a converted version with the original size +command.save('/path/to/output-original-size.mp4'); diff --git a/types/fluent-ffmpeg/index.d.ts b/types/fluent-ffmpeg/index.d.ts index 1e44422789..86004caec1 100644 --- a/types/fluent-ffmpeg/index.d.ts +++ b/types/fluent-ffmpeg/index.d.ts @@ -216,6 +216,7 @@ declare namespace Ffmpeg { map(spec: string): FfmpegCommand; updateFlvMetadata(): FfmpegCommand; flvmeta(): FfmpegCommand; + preset(format: string): FfmpegCommand; // options/custom addInputOption(options: string[]): FfmpegCommand; @@ -296,6 +297,8 @@ declare namespace Ffmpeg { mergeToFile(target: string | stream.Writable, options?: { end?: boolean }): FfmpegCommand; concatenate(target: string | stream.Writable, options?: { end?: boolean }): FfmpegCommand; concat(target: string | stream.Writable, options?: { end?: boolean }): FfmpegCommand; + clone(): FfmpegCommand; + run(): void; } } declare function Ffmpeg(options?: Ffmpeg.FfmpegCommandOptions): Ffmpeg.FfmpegCommand; diff --git a/types/fluent-ffmpeg/tsconfig.json b/types/fluent-ffmpeg/tsconfig.json index 27024331f1..03dae683d6 100644 --- a/types/fluent-ffmpeg/tsconfig.json +++ b/types/fluent-ffmpeg/tsconfig.json @@ -1,22 +1,22 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "fluent-ffmpeg-tests.ts" - ] -} \ No newline at end of file + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fluent-ffmpeg-tests.ts" + ] +} diff --git a/types/flux-standard-action/flux-standard-action-tests.ts b/types/flux-standard-action/flux-standard-action-tests.ts index 5934e56fb8..1a98c6663c 100644 --- a/types/flux-standard-action/flux-standard-action-tests.ts +++ b/types/flux-standard-action/flux-standard-action-tests.ts @@ -23,3 +23,17 @@ var result1: boolean = isError(sample1); var result2: boolean = isFSA(sample1); var result3: boolean = isError(sample2); var result4: boolean = isFSA(sample2); + +declare function alert (message: string): void + +function unwrapAction(action: { type: string }) { + if (isFSA(action)) { + if (isError(action)) { + alert(action.payload!.message) + } + return action.payload + } +} + +var result5: TextPayload = unwrapAction(sample1) +var result6: Error = unwrapAction(sample2) diff --git a/types/flux-standard-action/index.d.ts b/types/flux-standard-action/index.d.ts index d5393e0ace..388132bea6 100644 --- a/types/flux-standard-action/index.d.ts +++ b/types/flux-standard-action/index.d.ts @@ -5,7 +5,7 @@ export interface ErrorAction extends Action { - error: boolean; + error: true; } export interface Action { @@ -14,16 +14,16 @@ export interface Action { error?: boolean; } -// Usage: var action: Action & AnyMeta; +/** Usage: `var action: Action & AnyMeta;` */ export interface AnyMeta { meta: any } -// Usage: var action: Action & TypedMeta; +/** Usage: `var action: Action & TypedMeta;` */ export interface TypedMeta { meta: T } -export declare function isFSA(action: any): boolean; +export declare function isFSA(action: any): action is Action; -export declare function isError(action: any): boolean; +export declare function isError(action: any): action is ErrorAction; diff --git a/types/flux/index.d.ts b/types/flux/index.d.ts index 7380613ce7..096c9516e6 100644 --- a/types/flux/index.d.ts +++ b/types/flux/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Steve Baker // Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import * as Dispatcher from "./lib/Dispatcher"; diff --git a/types/fluxxor/fluxxor-tests.ts b/types/fluxxor/fluxxor-tests.ts index ef6a8c707a..38522b1e1b 100644 --- a/types/fluxxor/fluxxor-tests.ts +++ b/types/fluxxor/fluxxor-tests.ts @@ -1,5 +1,5 @@ -import React = require('react'); -import Fluxxor = require('fluxxor'); +import * as React from 'react'; +import * as Fluxxor from 'fluxxor'; class DispatcherTest { v: Fluxxor.Dispatcher; diff --git a/types/fluxxor/index.d.ts b/types/fluxxor/index.d.ts index c091186aaa..d5389f9cde 100644 --- a/types/fluxxor/index.d.ts +++ b/types/fluxxor/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/BinaryMuse/fluxxor // Definitions by: Yuichi Murata // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 import * as EventEmitter3 from 'eventemitter3'; import * as React from "react"; diff --git a/types/forever-monitor/index.d.ts b/types/forever-monitor/index.d.ts index cd5869f6d3..caa921fa1a 100644 --- a/types/forever-monitor/index.d.ts +++ b/types/forever-monitor/index.d.ts @@ -35,7 +35,7 @@ export interface Options { parser?(command: string, args: string[]): { command: string, args: string[] }; } -export function start(script: string, options?: Options): Monitor; +export function start(script: string | string[], options?: Options): Monitor; export function kill(pid: number, killTree?: boolean, signal?: string, callback?: () => any): void; export function checkProcess(pid: number): boolean; export const version: string; @@ -45,7 +45,7 @@ export class Monitor extends NodeJS.EventEmitter { * @param script - Location of the target script to run. * @param [options] - Configuration for this instance. */ - constructor(script: string, options?: Options); + constructor(script: string | string[], options?: Options); /** * @description Start the process that this instance is configured for diff --git a/types/form-data/form-data-tests.ts b/types/form-data/form-data-tests.ts index 6d1b9d6cb9..93457df3be 100644 --- a/types/form-data/form-data-tests.ts +++ b/types/form-data/form-data-tests.ts @@ -18,7 +18,7 @@ import * as ImportUsingES6Syntax from 'form-data'; () => { var form = new FormData(); - http.request('http://nodejs.org/images/logo.png', function (response) { + http.request({ path: 'http://nodejs.org/images/logo.png' }, function (response) { form.append('my_field', 'my value'); form.append('my_buffer', new Buffer(10)); form.append('my_logo', response); diff --git a/types/form-serializer/index.d.ts b/types/form-serializer/index.d.ts index 20ebb2223f..64c4880b39 100644 --- a/types/form-serializer/index.d.ts +++ b/types/form-serializer/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/macek/jquery-serialize-object // Definitions by: Florian Wagner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/foundation-sites/index.d.ts b/types/foundation-sites/index.d.ts index 2357b612b1..0bafdd6ae1 100644 --- a/types/foundation-sites/index.d.ts +++ b/types/foundation-sites/index.d.ts @@ -2,6 +2,7 @@ // Project: http://foundation.zurb.com/ // Definitions by: Sam Vloeberghs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // please also see the typings project and prefer to use it! // typings project: https://github.com/typings/typings diff --git a/types/foundation/index.d.ts b/types/foundation/index.d.ts index 49e9876130..73608604b5 100644 --- a/types/foundation/index.d.ts +++ b/types/foundation/index.d.ts @@ -2,6 +2,7 @@ // Project: http://foundation.zurb.com/ // Definitions by: Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts b/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts index 46e623207a..b17cb07e32 100644 --- a/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts +++ b/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts @@ -1,47 +1,48 @@ import fs = require('fs-extra-promise-es6'); import stream = require('stream'); -var stats: fs.Stats; -var str: string; -var strArr: string[]; -var bool: boolean; -var num: number; -var src: string; -var dest: string; -var file: string; -var filename: string; -var dir: string; -var path: string; -var data: any; -var object: Object; -var buffer: NodeBuffer; -var modeNum: number; -var modeStr: string; -var encoding: string; -var type: string; -var flags: string; -var srcpath: string; -var dstpath: string; -var oldPath: string; -var newPath: string; -var cache: string; -var offset: number; -var length: number; -var position: number; -var cacheBool: boolean; -var cacheStr: string; -var fd: number; -var len: number; -var uid: number; -var gid: number; -var atime: number; -var mtime: number; -var statsCallback: (err: Error, stats: fs.Stats) => void; -var errorCallback: (err: Error) => void; -var openOpts: fs.OpenOptions; -var watcher: fs.FSWatcher; -var readStreeam: stream.Readable; -var writeStream: stream.Writable; +let stats: fs.Stats; +let str: string; +let strArr: string[]; +let bool: boolean; +let num: number; +let src: string; +let dest: string; +let file: string; +let filename: string; +let dir: string; +let path: string; +let data: any; +let object: any; +let buffer: NodeBuffer; +let modeNum: number; +let modeStr: string; +let encoding: string; +let type: string; +let flags: string; +let srcpath: string; +let dstpath: string; +let oldPath: string; +let newPath: string; +let cache: string; +let offset: number; +let length: number; +let position: number; +let cacheBool: boolean; +let cacheStr: string; +let fd: number; +let len: number; +let uid: number; +let gid: number; +let atime: number; +let mtime: number; +let statsCallback: (err: Error, stats: fs.Stats) => void; +let errorCallback: (err: Error) => void; +let openOpts: fs.OpenOptions; +let watcher: fs.FSWatcher; +let readStreeam: stream.Readable; +let writeStream: stream.Writable; +let isDirectory: boolean; fs.copy(src, dest, errorCallback); fs.copy(src, dest, (src: string) => { @@ -119,13 +120,10 @@ fs.linkSync(srcpath, dstpath); fs.symlink(srcpath, dstpath, type, errorCallback); fs.symlinkSync(srcpath, dstpath, type); fs.readlink(path, (err: Error, linkString: string) => { - }); fs.realpath(path, (err: Error, resolvedPath: string) => { - }); fs.realpath(path, cache, (err: Error, resolvedPath: string) => { - }); str = fs.realpathSync(path, cacheBool); fs.unlink(path, errorCallback); @@ -137,13 +135,11 @@ fs.mkdir(path, modeStr, errorCallback); fs.mkdirSync(path, modeNum); fs.mkdirSync(path, modeStr); fs.readdir(path, (err: Error, files: string[]) => { - }); strArr = fs.readdirSync(path); fs.close(fd, errorCallback); fs.closeSync(fd); fs.open(path, flags, modeStr, (err: Error, fd: number) => { - }); num = fs.openSync(path, flags, modeStr); fs.utimes(path, atime, mtime, errorCallback); @@ -153,24 +149,18 @@ fs.futimesSync(fd, atime, mtime); fs.fsync(fd, errorCallback); fs.fsyncSync(fd); fs.write(fd, buffer, offset, length, position, (err: Error, written: number, buffer: NodeBuffer) => { - }); num = fs.writeSync(fd, buffer, offset, length, position); fs.read(fd, buffer, offset, length, position, (err: Error, bytesRead: number, buffer: NodeBuffer) => { - }); num = fs.readSync(fd, buffer, offset, length, position); fs.readFile(filename, (err: Error, data: NodeBuffer) => { - }); fs.readFile(filename, encoding, (err: Error, data: string) => { - }); fs.readFile(filename, openOpts, (err: Error, data: string) => { - }); fs.readFile(filename, (err: Error, data: NodeBuffer) => { - }); buffer = fs.readFileSync(filename); str = fs.readFileSync(filename, encoding); @@ -203,10 +193,8 @@ fs.watchFile(filename, { }); fs.unwatchFile(filename); watcher = fs.watch(filename, { persistent: bool }, (event: string, filename: string) => { - }); fs.exists(path, (exists: boolean) => { - }); bool = fs.existsSync(path); @@ -222,3 +210,10 @@ writeStream = fs.createWriteStream(path, { flags: str, encoding: str }); + +let isDirectoryCallback = (err: Error, isDirectory: boolean) => { +}; +fs.isDirectory(path, isDirectoryCallback); +fs.isDirectory(path); +isDirectory = fs.isDirectorySync(path); +fs.isDirectoryAsync(path); diff --git a/types/fs-extra-promise-es6/index.d.ts b/types/fs-extra-promise-es6/index.d.ts index 85055636dc..db262c1460 100644 --- a/types/fs-extra-promise-es6/index.d.ts +++ b/types/fs-extra-promise-es6/index.d.ts @@ -1,158 +1,194 @@ -// Type definitions for fs-extra-promise-es6 +// Type definitions for fs-extra-promise-es6 0.1 // Project: https://github.com/vinsonchuong/fs-extra-promise-es6 -// Definitions by: midknight41 , Jason Swearingen , Joshua DeVinney +// Definitions by: midknight41 +// Jason Swearingen +// Joshua DeVinney +// Hiromi Shikata // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Imported from: fs-extra-promise typings (minus Bluebird) -/// - +/// import stream = require("stream"); import fs = require("fs"); -export type Stats = fs.Stats +export type Stats = fs.Stats; export interface FSWatcher { close(): void; } -export declare class ReadStream extends stream.Readable { } -export declare class WriteStream extends stream.Writable { } +export class ReadStream extends stream.Readable { } +export class WriteStream extends stream.Writable { } -//extended methods -export declare function copy(src: string, dest: string, callback?: (err: Error) => void): void; -export declare function copy(src: string, dest: string, filter: (src: string) => boolean, callback?: (err: Error) => void): void; +// extended methods +export function copy(src: string, dest: string, callback?: (err: Error) => void): void; +export function copy(src: string, dest: string, filter: (src: string) => boolean, callback?: (err: Error) => void): void; -export declare function copySync(src: string, dest: string): void; -export declare function copySync(src: string, dest: string, filter: (src: string) => boolean): void; +export function copySync(src: string, dest: string, filter?: (src: string) => boolean): void; -export declare function createFile(file: string, callback?: (err: Error) => void): void; -export declare function createFileSync(file: string): void; +export function createFile(file: string, callback?: (err: Error) => void): void; +export function createFileSync(file: string): void; -export declare function mkdirs(dir: string, callback?: (err: Error) => void): void; -export declare function mkdirp(dir: string, callback?: (err: Error) => void): void; -export declare function mkdirsSync(dir: string): void; -export declare function mkdirpSync(dir: string): void; +export function mkdirs(dir: string, callback?: (err: Error) => void): void; +export function mkdirp(dir: string, callback?: (err: Error) => void): void; +export function mkdirsSync(dir: string): void; +export function mkdirpSync(dir: string): void; -export declare function outputFile(file: string, data: any, callback?: (err: Error) => void): void; -export declare function outputFileSync(file: string, data: any): void; +export function outputFile(file: string, data: any, callback?: (err: Error) => void): void; +export function outputFileSync(file: string, data: any): void; -export declare function outputJson(file: string, data: any, callback?: (err: Error) => void): void; -export declare function outputJSON(file: string, data: any, callback?: (err: Error) => void): void; -export declare function outputJsonSync(file: string, data: any): void; -export declare function outputJSONSync(file: string, data: any): void; +export function outputJson(file: string, data: any, callback?: (err: Error) => void): void; +export function outputJSON(file: string, data: any, callback?: (err: Error) => void): void; +export function outputJsonSync(file: string, data: any): void; +export function outputJSONSync(file: string, data: any): void; -export declare function readJson(file: string, callback?: (err: Error) => void): void; -export declare function readJson(file: string, options?: OpenOptions, callback?: (err: Error) => void): void; -export declare function readJSON(file: string, callback?: (err: Error) => void): void; -export declare function readJSON(file: string, options?: OpenOptions, callback?: (err: Error) => void): void; +export function readJson(file: string, callback?: (err: Error) => void): void; +export function readJson(file: string, options?: OpenOptions, callback?: (err: Error) => void): void; +export function readJSON(file: string, callback?: (err: Error) => void): void; +export function readJSON(file: string, options?: OpenOptions, callback?: (err: Error) => void): void; -export declare function readJsonSync(file: string, options?: OpenOptions): void; -export declare function readJSONSync(file: string, options?: OpenOptions): void; +export function readJsonSync(file: string, options?: OpenOptions): void; +export function readJSONSync(file: string, options?: OpenOptions): void; -export declare function remove(dir: string, callback?: (err: Error) => void): void; -export declare function removeSync(dir: string): void; +export function remove(dir: string, callback?: (err: Error) => void): void; +export function removeSync(dir: string): void; // export function delete(dir: string, callback?: (err: Error) => void): void; // export function deleteSync(dir: string): void; -export declare function writeJson(file: string, object: any, callback?: (err: Error) => void): void; -export declare function writeJson(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void; -export declare function writeJSON(file: string, object: any, callback?: (err: Error) => void): void; -export declare function writeJSON(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void; +export function writeJson(file: string, object: any, callback?: (err: Error) => void): void; +export function writeJson(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void; +export function writeJSON(file: string, object: any, callback?: (err: Error) => void): void; +export function writeJSON(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void; -export declare function writeJsonSync(file: string, object: any, options?: OpenOptions): void; -export declare function writeJSONSync(file: string, object: any, options?: OpenOptions): void; +export function writeJsonSync(file: string, object: any, options?: OpenOptions): void; +export function writeJSONSync(file: string, object: any, options?: OpenOptions): void; -export declare function rename(oldPath: string, newPath: string, callback?: (err: Error) => void): void; -export declare function renameSync(oldPath: string, newPath: string): void; -export declare function truncate(fd: number, len: number, callback?: (err: Error) => void): void; -export declare function truncateSync(fd: number, len: number): void; -export declare function chown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void; -export declare function chownSync(path: string, uid: number, gid: number): void; -export declare function fchown(fd: number, uid: number, gid: number, callback?: (err: Error) => void): void; -export declare function fchownSync(fd: number, uid: number, gid: number): void; -export declare function lchown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void; -export declare function lchownSync(path: string, uid: number, gid: number): void; -export declare function chmod(path: string, mode: number, callback?: (err: Error) => void): void; -export declare function chmod(path: string, mode: string, callback?: (err: Error) => void): void; -export declare function chmodSync(path: string, mode: number): void; -export declare function chmodSync(path: string, mode: string): void; -export declare function fchmod(fd: number, mode: number, callback?: (err: Error) => void): void; -export declare function fchmod(fd: number, mode: string, callback?: (err: Error) => void): void; -export declare function fchmodSync(fd: number, mode: number): void; -export declare function fchmodSync(fd: number, mode: string): void; -export declare function lchmod(path: string, mode: string, callback?: (err: Error) => void): void; -export declare function lchmod(path: string, mode: number, callback?: (err: Error) => void): void; -export declare function lchmodSync(path: string, mode: number): void; -export declare function lchmodSync(path: string, mode: string): void; -export declare function stat(path: string, callback?: (err: Error, stats: Stats) => void): void; -export declare function lstat(path: string, callback?: (err: Error, stats: Stats) => void): void; -export declare function fstat(fd: number, callback?: (err: Error, stats: Stats) => void): void; -export declare function statSync(path: string): Stats; -export declare function lstatSync(path: string): Stats; -export declare function fstatSync(fd: number): Stats; -export declare function link(srcpath: string, dstpath: string, callback?: (err: Error) => void): void; -export declare function linkSync(srcpath: string, dstpath: string): void; -export declare function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err: Error) => void): void; -export declare function symlinkSync(srcpath: string, dstpath: string, type?: string): void; -export declare function readlink(path: string, callback?: (err: Error, linkString: string) => void): void; -export declare function realpath(path: string, callback?: (err: Error, resolvedPath: string) => void): void; -export declare function realpath(path: string, cache: string, callback: (err: Error, resolvedPath: string) => void): void; -export declare function realpathSync(path: string, cache?: boolean): string; -export declare function unlink(path: string, callback?: (err: Error) => void): void; -export declare function unlinkSync(path: string): void; -export declare function rmdir(path: string, callback?: (err: Error) => void): void; -export declare function rmdirSync(path: string): void; -export declare function mkdir(path: string, mode?: number, callback?: (err: Error) => void): void; -export declare function mkdir(path: string, mode?: string, callback?: (err: Error) => void): void; -export declare function mkdirSync(path: string, mode?: number): void; -export declare function mkdirSync(path: string, mode?: string): void; -export declare function readdir(path: string, callback?: (err: Error, files: string[]) => void): void; -export declare function readdirSync(path: string): string[]; -export declare function close(fd: number, callback?: (err: Error) => void): void; -export declare function closeSync(fd: number): void; -export declare function open(path: string, flags: string, mode?: string, callback?: (err: Error, fs: number) => void): void; -export declare function openSync(path: string, flags: string, mode?: string): number; -export declare function utimes(path: string, atime: number, mtime: number, callback?: (err: Error) => void): void; -export declare function utimesSync(path: string, atime: number, mtime: number): void; -export declare function futimes(fd: number, atime: number, mtime: number, callback?: (err: Error) => void): void; -export declare function futimesSync(fd: number, atime: number, mtime: number): void; -export declare function fsync(fd: number, callback?: (err: Error) => void): void; -export declare function fsyncSync(fd: number): void; -export declare function write(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, written: number, buffer: NodeBuffer) => void): void; -export declare function writeSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; -export declare function read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void): void; -export declare function readSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; -export declare function readFile(filename: string, encoding: string, callback: (err: Error, data: string) => void): void; -export declare function readFile(filename: string, options: OpenOptions, callback: (err: Error, data: string) => void): void; -export declare function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void): void; -export declare function readFileSync(filename: string): NodeBuffer; -export declare function readFileSync(filename: string, encoding: string): string; -export declare function readFileSync(filename: string, options: OpenOptions): string; -export declare function writeFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void): void; -export declare function writeFile(filename: string, data: any, options?: OpenOptions, callback?: (err: Error) => void): void; -export declare function writeFileSync(filename: string, data: any, encoding?: string): void; -export declare function writeFileSync(filename: string, data: any, option?: OpenOptions): void; -export declare function appendFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void): void; -export declare function appendFile(filename: string, data: any, option?: OpenOptions, callback?: (err: Error) => void): void; -export declare function appendFileSync(filename: string, data: any, encoding?: string): void; -export declare function appendFileSync(filename: string, data: any, option?: OpenOptions): void; -export declare function watchFile(filename: string, listener: { curr: Stats; prev: Stats; }): void; -export declare function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: { curr: Stats; prev: Stats; }): void; -export declare function unwatchFile(filename: string, listener?: Stats): void; -export declare function watch(filename: string, options?: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher; -export declare function exists(path: string, callback?: (exists: boolean) => void): void; -export declare function existsSync(path: string): boolean; -export declare function ensureDir(path: string, cb: (err: Error) => void): void; -export declare function ensureDirSync(path: string): void; +export function rename(oldPath: string, newPath: string, callback?: (err: Error) => void): void; +export function renameSync(oldPath: string, newPath: string): void; +export function truncate(fd: number, len: number, callback?: (err: Error) => void): void; +export function truncateSync(fd: number, len: number): void; +export function chown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void; +export function chownSync(path: string, uid: number, gid: number): void; +export function fchown(fd: number, uid: number, gid: number, callback?: (err: Error) => void): void; +export function fchownSync(fd: number, uid: number, gid: number): void; +export function lchown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void; +export function lchownSync(path: string, uid: number, gid: number): void; +export function chmod(path: string, mode: number | string, callback?: (err: Error) => void): void; +export function chmodSync(path: string, mode: number | string): void; +export function fchmod(fd: number, mode: number | string, callback?: (err: Error) => void): void; +export function fchmodSync(fd: number, mode: number | string): void; +export function lchmod(path: string, mode: number | string, callback?: (err: Error) => void): void; +export function lchmodSync(path: string, mode: number | string): void; +export function stat(path: string, callback?: (err: Error, stats: Stats) => void): void; +export function lstat(path: string, callback?: (err: Error, stats: Stats) => void): void; +export function fstat(fd: number, callback?: (err: Error, stats: Stats) => void): void; +export function statSync(path: string): Stats; +export function lstatSync(path: string): Stats; +export function fstatSync(fd: number): Stats; +export function link(srcpath: string, dstpath: string, callback?: (err: Error) => void): void; +export function linkSync(srcpath: string, dstpath: string): void; +export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err: Error) => void): void; +export function symlinkSync(srcpath: string, dstpath: string, type?: string): void; +export function readlink(path: string, callback?: (err: Error, linkString: string) => void): void; +export function realpath(path: string, callback?: (err: Error, resolvedPath: string) => void): void; +export function realpath(path: string, cache: string, callback: (err: Error, resolvedPath: string) => void): void; +export function realpathSync(path: string, cache?: boolean): string; +export function unlink(path: string, callback?: (err: Error) => void): void; +export function unlinkSync(path: string): void; +export function rmdir(path: string, callback?: (err: Error) => void): void; +export function rmdirSync(path: string): void; +export function mkdir(path: string, mode?: number | string, callback?: (err: Error) => void): void; +export function mkdirSync(path: string, mode?: number | string): void; +export function readdir(path: string, callback?: (err: Error, files: string[]) => void): void; +export function readdirSync(path: string): string[]; +export function close(fd: number, callback?: (err: Error) => void): void; +export function closeSync(fd: number): void; +export function open(path: string, flags: string, mode?: string, callback?: (err: Error, fs: number) => void): void; +export function openSync(path: string, flags: string, mode?: string): number; +export function utimes(path: string, atime: number, mtime: number, callback?: (err: Error) => void): void; +export function utimesSync(path: string, atime: number, mtime: number): void; +export function futimes(fd: number, atime: number, mtime: number, callback?: (err: Error) => void): void; +export function futimesSync(fd: number, atime: number, mtime: number): void; +export function fsync(fd: number, callback?: (err: Error) => void): void; +export function fsyncSync(fd: number): void; +export function write(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, written: number, buffer: NodeBuffer) => void): void; +export function writeSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; +export function read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void): void; +export function readSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; +/** + * readFile + * @param filename + * @param options + * string: encoding + * OpenOptions: options + * @param callback + */ +export function readFile(filename: string, options: OpenOptions | string, callback: (err: Error, data: string) => void): void; +export function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void): void; +export function readFileSync(filename: string): NodeBuffer; +/** + * readFileSync + * @param filename + * @param options + * string: encoding + * OpenOptions: options + */ +export function readFileSync(filename: string, options: OpenOptions | string): string; +/** + * writeFile + * @param filename + * @param data + * @param options + * string: encoding + * OpenOptions: options + * @param callback + */ +export function writeFile(filename: string, data: any, options?: OpenOptions | string, callback?: (err: Error) => void): void; +/** + * writeFileSync + * @param filename + * @param data + * @param option + * string: encoding + * OpenOptions: options + */ +export function writeFileSync(filename: string, data: any, option?: OpenOptions | string): void; +/** + * appendFile + * @param filename + * @param data + * @param option: + * string: encoding + * OpenOptions: options + * @param callback + */ +export function appendFile(filename: string, data: any, option?: OpenOptions | string, callback?: (err: Error) => void): void; +/** + * appendFileSync + * @param filename + * @param data + * @param option + * string: encoding + * OpenOptions: options + */ +export function appendFileSync(filename: string, data: any, option?: OpenOptions | string): void; +export function watchFile(filename: string, listener: { curr: Stats; prev: Stats; }): void; +export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: { curr: Stats; prev: Stats; }): void; +export function unwatchFile(filename: string, listener?: Stats): void; +export function watch(filename: string, options?: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher; +export function exists(path: string, callback?: (exists: boolean) => void): void; +export function existsSync(path: string): boolean; +export function ensureDir(path: string, cb: (err: Error) => void): void; +export function ensureDirSync(path: string): void; export interface OpenOptions { encoding?: string; flag?: string; } -export declare function createReadStream(path: string | Buffer, options?: { +export function createReadStream(path: string | Buffer, options?: { flags?: string; encoding?: string; fd?: number; @@ -161,81 +197,90 @@ export declare function createReadStream(path: string | Buffer, options?: { start?: number; end?: number; }): ReadStream; -export declare function createWriteStream(path: string | Buffer, options?: { +export function createWriteStream(path: string | Buffer, options?: { flags?: string; encoding?: string; fd?: number; mode?: number; }): WriteStream; +// promisified versions +export function copyAsync(src: string, dest: string, filter?: (src: string) => boolean): Promise; +export function createFileAsync(file: string): Promise; -//promisified versions -export declare function copyAsync(src: string, dest: string): Promise; -export declare function copyAsync(src: string, dest: string, filter: (src: string) => boolean): Promise; +export function mkdirsAsync(dir: string): Promise; +export function mkdirpAsync(dir: string): Promise; -export declare function createFileAsync(file: string): Promise; +export function outputFileAsync(file: string, data: any): Promise; -export declare function mkdirsAsync(dir: string): Promise; -export declare function mkdirpAsync(dir: string): Promise; +export function outputJSONAsync(file: string, data: any): Promise; -export declare function outputFileAsync(file: string, data: any): Promise; +export function readJSONAsync(file: string, options?: OpenOptions): Promise; -export declare function outputJsonAsync(file: string, data: any): Promise; -export declare function outputJSONAsync(file: string, data: any): Promise; - -export declare function readJsonAsync(file: string): Promise; -export declare function readJsonAsync(file: string, options?: OpenOptions): Promise; -export declare function readJSONAsync(file: string): Promise; -export declare function readJSONAsync(file: string, options?: OpenOptions): Promise; - - -export declare function removeAsync(dir: string): Promise; +export function removeAsync(dir: string): Promise; // export function deleteAsync(dir: string):Promise; -export declare function writeJsonAsync(file: string, object: any): Promise; -export declare function writeJsonAsync(file: string, object: any, options?: OpenOptions): Promise; -export declare function writeJSONAsync(file: string, object: any): Promise; -export declare function writeJSONAsync(file: string, object: any, options?: OpenOptions): Promise; +export function writeJsonAsync(file: string, object: any, options?: OpenOptions): Promise; +export function writeJSONAsync(file: string, object: any, options?: OpenOptions): Promise; -export declare function renameAsync(oldPath: string, newPath: string): Promise; -export declare function truncateAsync(fd: number, len: number): Promise; -export declare function chownAsync(path: string, uid: number, gid: number): Promise; -export declare function fchownAsync(fd: number, uid: number, gid: number): Promise; -export declare function lchownAsync(path: string, uid: number, gid: number): Promise; -export declare function chmodAsync(path: string, mode: number): Promise; -export declare function chmodAsync(path: string, mode: string): Promise; -export declare function fchmodAsync(fd: number, mode: number): Promise; -export declare function fchmodAsync(fd: number, mode: string): Promise; -export declare function lchmodAsync(path: string, mode: string): Promise; -export declare function lchmodAsync(path: string, mode: number): Promise; -export declare function statAsync(path: string): Promise; -export declare function lstatAsync(path: string): Promise; -export declare function fstatAsync(fd: number): Promise; -export declare function linkAsync(srcpath: string, dstpath: string): Promise; -export declare function symlinkAsync(srcpath: string, dstpath: string, type?: string): Promise; -export declare function readlinkAsync(path: string): Promise; -export declare function realpathAsync(path: string): Promise; -export declare function realpathAsync(path: string, cache: string): Promise; -export declare function unlinkAsync(path: string): Promise; -export declare function rmdirAsync(path: string): Promise; -export declare function mkdirAsync(path: string, mode?: number): Promise; -export declare function mkdirAsync(path: string, mode?: string): Promise; -export declare function readdirAsync(path: string): Promise; -export declare function closeAsync(fd: number): Promise; -export declare function openAsync(path: string, flags: string, mode?: string): Promise; -export declare function utimesAsync(path: string, atime: number, mtime: number): Promise; -export declare function futimesAsync(fd: number, atime: number, mtime: number): Promise; -export declare function fsyncAsync(fd: number): Promise; -export declare function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; -export declare function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; -export declare function readFileAsync(filename: string, encoding: string): Promise; -export declare function readFileAsync(filename: string, options: OpenOptions): Promise; -export declare function readFileAsync(filename: string): Promise; -export declare function writeFileAsync(filename: string, data: any, encoding?: string): Promise; -export declare function writeFileAsync(filename: string, data: any, options?: OpenOptions): Promise; -export declare function appendFileAsync(filename: string, data: any, encoding?: string): Promise; -export declare function appendFileAsync(filename: string, data: any, option?: OpenOptions): Promise; +export function renameAsync(oldPath: string, newPath: string): Promise; +export function truncateAsync(fd: number, len: number): Promise; +export function chownAsync(path: string, uid: number, gid: number): Promise; +export function fchownAsync(fd: number, uid: number, gid: number): Promise; +export function lchownAsync(path: string, uid: number, gid: number): Promise; +export function chmodAsync(path: string, mode: number | string): Promise; +export function fchmodAsync(fd: number, mode: number | string): Promise; +export function lchmodAsync(path: string, mode: number | string): Promise; +export function statAsync(path: string): Promise; +export function lstatAsync(path: string): Promise; +export function fstatAsync(fd: number): Promise; +export function linkAsync(srcpath: string, dstpath: string): Promise; +export function symlinkAsync(srcpath: string, dstpath: string, type?: string): Promise; +export function readlinkAsync(path: string): Promise; +export function realpathAsync(path: string, cache?: string): Promise; +export function unlinkAsync(path: string): Promise; +export function rmdirAsync(path: string): Promise; +export function mkdirAsync(path: string, mode?: number | string): Promise; +export function readdirAsync(path: string): Promise; +export function closeAsync(fd: number): Promise; +export function openAsync(path: string, flags: string, mode?: string): Promise; +export function utimesAsync(path: string, atime: number, mtime: number): Promise; +export function futimesAsync(fd: number, atime: number, mtime: number): Promise; +export function fsyncAsync(fd: number): Promise; +export function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; +export function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; +/** + * readFileAsync + * @param filename + * @param options: + * string: encoding + * OpenOptions: options + */ +export function readFileAsync(filename: string, options: OpenOptions | string): Promise; +export function readFileAsync(filename: string): Promise; +/** + * writeFileAsync + * @param filename + * @param data + * @param options: + * string: encoding + * OpenOptions: options + */ +export function writeFileAsync(filename: string, data: any, options?: OpenOptions | string): Promise; +/** + * appendFileAsync + * @param filename + * @param data + * @param option: + * string: encoding + * OpenOptions: option + */ +export function appendFileAsync(filename: string, data: any, option?: OpenOptions | string): Promise; -export declare function existsAsync(path: string): Promise; -export declare function ensureDirAsync(path: string): Promise; +export function existsAsync(path: string): Promise; +export function ensureDirAsync(path: string): Promise; + +export function isDirectory(path: string, callback?: (err: Error, isDirectory: boolean) => void): void; +export function isDirectorySync(path: string): boolean; +export function isDirectoryAsync(path: string): Promise; diff --git a/types/fs-extra-promise-es6/tslint.json b/types/fs-extra-promise-es6/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/fs-extra-promise-es6/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/fs-extra-promise/fs-extra-promise-tests.ts b/types/fs-extra-promise/fs-extra-promise-tests.ts index cd17429fe4..c50115871b 100644 --- a/types/fs-extra-promise/fs-extra-promise-tests.ts +++ b/types/fs-extra-promise/fs-extra-promise-tests.ts @@ -1,48 +1,49 @@ import fs = require('fs-extra-promise'); import stream = require('stream'); -var stats: fs.Stats; -var str: string; -var strArr: string[]; -var bool: boolean; -var num: number; -var src: string; -var dest: string; -var file: string; -var filename: string; -var dir: string; -var path: string; -var data: any; -var object: Object; -var buf: Buffer; -var buffer: NodeBuffer; -var modeNum: number; -var modeStr: string; -var encoding: string; -var type: string; -var flags: string; -var srcpath: string; -var dstpath: string; -var oldPath: string; -var newPath: string; -var cache: { [path: string]: string; }; -var offset: number; -var length: number; -var position: number; -var fd: number; -var len: number; -var uid: number; -var gid: number; -var atime: number; -var mtime: number; -var watchListener: (curr: fs.Stats, prev: fs.Stats) => void; -var statsCallback: (err: Error, stats: fs.Stats) => void; -var errorCallback: (err: Error) => void; -var openOpts: fs.ReadOptions; -var writeOpts: fs.WriteOptions; -var watcher: fs.FSWatcher; -var readStream: stream.Readable; -var writeStream: stream.Writable; +let stats: fs.Stats; +let str: string; +let strArr: string[]; +let bool: boolean; +let num: number; +let src: string; +let dest: string; +let file: string; +let filename: string; +let dir: string; +let path: string; +let data: any; +let object: object; +let buf: Buffer; +let buffer: NodeBuffer; +let modeNum: number; +let modeStr: string; +let encoding: string; +let type: string; +let flags: string; +let srcpath: string; +let dstpath: string; +let oldPath: string; +let newPath: string; +let cache: { [path: string]: string; }; +let offset: number; +let length: number; +let position: number; +let fd: number; +let len: number; +let uid: number; +let gid: number; +let atime: number; +let mtime: number; +let watchListener: (curr: fs.Stats, prev: fs.Stats) => void; +let statsCallback: (err: Error, stats: fs.Stats) => void; +let errorCallback: (err: Error) => void; +let openOpts: fs.ReadOptions; +let writeOpts: fs.WriteOptions; +let watcher: fs.FSWatcher; +let readStream: stream.Readable; +let writeStream: stream.Writable; +let isDirectory: boolean; fs.copy(src, dest, errorCallback); fs.copy(src, dest, (src: string) => { @@ -122,13 +123,10 @@ fs.linkSync(srcpath, dstpath); fs.symlink(srcpath, dstpath, type, errorCallback); fs.symlinkSync(srcpath, dstpath, type); fs.readlink(path, (err: Error, linkString: string) => { - }); fs.realpath(path, (err: Error, resolvedPath: string) => { - }); fs.realpath(path, cache, (err: Error, resolvedPath: string) => { - }); str = fs.realpathSync(path, cache); fs.unlink(path, errorCallback); @@ -140,13 +138,11 @@ fs.mkdir(path, modeStr, errorCallback); fs.mkdirSync(path, modeNum); fs.mkdirSync(path, modeStr); fs.readdir(path, (err: Error, files: string[]) => { - }); strArr = fs.readdirSync(path); fs.close(fd, errorCallback); fs.closeSync(fd); fs.open(path, flags, modeNum, (err: Error, fd: number) => { - }); num = fs.openSync(path, flags, modeNum); fs.utimes(path, atime, mtime, errorCallback); @@ -156,41 +152,35 @@ fs.futimesSync(fd, atime, mtime); fs.fsync(fd, errorCallback); fs.fsyncSync(fd); fs.write(fd, buffer, offset, length, position, (err: Error, written: number, buffer: NodeBuffer) => { - }); num = fs.writeSync(fd, buffer, offset, length, position); fs.read(fd, buffer, offset, length, position, (err: Error, bytesRead: number, buffer: NodeBuffer) => { - }); num = fs.readSync(fd, buffer, offset, length, position); fs.readFile(filename, (err: Error, data: NodeBuffer) => { - }); fs.readFile(filename, encoding, (err: Error, data: string) => { - }); fs.readFile(filename, openOpts, (err: NodeJS.ErrnoException, data: Buffer) => { - }); fs.readFile(filename, (err: Error, data: NodeBuffer) => { - }); buffer = fs.readFileSync(filename); str = fs.readFileSync(filename, encoding); buf = fs.readFileSync(filename, openOpts); fs.writeFile(filename, data, errorCallback); -fs.writeFile(filename, data, encoding, errorCallback); +fs.writeFile(filename, data, { encoding }, errorCallback); fs.writeFile(filename, data, writeOpts, errorCallback); fs.writeFileSync(filename, data); -fs.writeFileSync(filename, data, encoding); +fs.writeFileSync(filename, data, { encoding }); fs.writeFileSync(filename, data, writeOpts); fs.appendFile(filename, data, errorCallback); -fs.appendFile(filename, data, encoding, errorCallback); +fs.appendFile(filename, data, { encoding }, errorCallback); fs.appendFile(filename, data, writeOpts, errorCallback); fs.appendFileSync(filename, data); -fs.appendFileSync(filename, data, encoding); +fs.appendFileSync(filename, data, { encoding }); fs.appendFileSync(filename, data, writeOpts); fs.watchFile(filename, watchListener); @@ -200,10 +190,8 @@ fs.watchFile(filename, { }, watchListener); fs.unwatchFile(filename); watcher = fs.watch(filename, { persistent: bool }, (event: string, filename: string) => { - }); fs.exists(path, (exists: boolean) => { - }); bool = fs.existsSync(path); @@ -217,5 +205,12 @@ readStream = fs.createReadStream(path, { writeStream = fs.createWriteStream(path); writeStream = fs.createWriteStream(path, { flags: str, - encoding: str + defaultEncoding: str }); + +let isDirectoryCallback = (err: Error, isDirectory: boolean) => { +}; +fs.isDirectory(path, isDirectoryCallback); +fs.isDirectory(path); +isDirectory = fs.isDirectorySync(path); +fs.isDirectoryAsync(path); diff --git a/types/fs-extra-promise/index.d.ts b/types/fs-extra-promise/index.d.ts index b4c9a648ac..9d174f791f 100644 --- a/types/fs-extra-promise/index.d.ts +++ b/types/fs-extra-promise/index.d.ts @@ -1,12 +1,10 @@ // Type definitions for fs-extra-promise 1.0 // Project: https://github.com/overlookmotel/fs-extra-promise -// Definitions by: midknight41 , Jason Swearingen +// Definitions by: midknight41 , Jason Swearingen , Hiromi Shikata // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 /// -/// -/// import * as stream from 'stream'; import { Stats } from 'fs'; @@ -20,73 +18,94 @@ export interface MkdirOptions { mode?: number; } -//promisified versions -export declare function copyAsync(src: string, dest: string): Promise; -export declare function copyAsync(src: string, dest: string, filter: CopyFilter): Promise; -export declare function copyAsync(src: string, dest: string, options: CopyOptions): Promise; +// promisified versions +/** + * copyAsync + * @param src + * @param dest + * @param options + * CopyFilter: filter + * CopyOptions: options + */ +export function copyAsync(src: string, dest: string, options?: CopyFilter | CopyOptions): Promise; -export declare function createFileAsync(file: string): Promise; +export function createFileAsync(file: string): Promise; -export declare function mkdirsAsync(dir: string, options?: MkdirOptions): Promise; -export declare function mkdirpAsync(dir: string, options?: MkdirOptions): Promise; +export function mkdirsAsync(dir: string, options?: MkdirOptions): Promise; +export function mkdirpAsync(dir: string, options?: MkdirOptions): Promise; -export declare function moveAsync(src: string, dest: string, options?: MoveOptions): Promise; +export function moveAsync(src: string, dest: string, options?: MoveOptions): Promise; -export declare function outputFileAsync(file: string, data: any): Promise; +export function outputFileAsync(file: string, data: any): Promise; -export declare function outputJsonAsync(file: string, data: any): Promise; -export declare function outputJSONAsync(file: string, data: any): Promise; +export function outputJsonAsync(file: string, data: any): Promise; +export function outputJSONAsync(file: string, data: any): Promise; -export declare function readJsonAsync(file: string): Promise; -export declare function readJsonAsync(file: string, options?: ReadOptions): Promise; -export declare function readJSONAsync(file: string): Promise; -export declare function readJSONAsync(file: string, options?: ReadOptions): Promise; +export function readJsonAsync(file: string, options?: ReadOptions): Promise; +export function readJSONAsync(file: string, options?: ReadOptions): Promise; -export declare function removeAsync(dir: string): Promise; +export function removeAsync(dir: string): Promise; -export declare function writeJsonAsync(file: string, object: any): Promise; -export declare function writeJsonAsync(file: string, object: any, options?: WriteOptions): Promise; -export declare function writeJSONAsync(file: string, object: any): Promise; -export declare function writeJSONAsync(file: string, object: any, options?: WriteOptions): Promise; +export function writeJsonAsync(file: string, object: any, options?: WriteOptions): Promise; +export function writeJSONAsync(file: string, object: any, options?: WriteOptions): Promise; -export declare function renameAsync(oldPath: string, newPath: string): Promise; -export declare function truncateAsync(fd: number, len: number): Promise; -export declare function chownAsync(path: string, uid: number, gid: number): Promise; -export declare function fchownAsync(fd: number, uid: number, gid: number): Promise; -export declare function lchownAsync(path: string, uid: number, gid: number): Promise; -export declare function chmodAsync(path: string, mode: number): Promise; -export declare function chmodAsync(path: string, mode: string): Promise; -export declare function fchmodAsync(fd: number, mode: number): Promise; -export declare function fchmodAsync(fd: number, mode: string): Promise; -export declare function lchmodAsync(path: string, mode: string): Promise; -export declare function lchmodAsync(path: string, mode: number): Promise; -export declare function statAsync(path: string): Promise; -export declare function lstatAsync(path: string): Promise; -export declare function fstatAsync(fd: number): Promise; -export declare function linkAsync(srcpath: string, dstpath: string): Promise; -export declare function symlinkAsync(srcpath: string, dstpath: string, type?: string): Promise; -export declare function readlinkAsync(path: string): Promise; -export declare function realpathAsync(path: string): Promise; -export declare function realpathAsync(path: string, cache: { [path: string]: string }): Promise; -export declare function unlinkAsync(path: string): Promise; -export declare function rmdirAsync(path: string): Promise; -export declare function mkdirAsync(path: string, mode?: number): Promise; -export declare function mkdirAsync(path: string, mode?: string): Promise; -export declare function readdirAsync(path: string): Promise; -export declare function closeAsync(fd: number): Promise; -export declare function openAsync(path: string, flags: string, mode?: string): Promise; -export declare function utimesAsync(path: string, atime: number, mtime: number): Promise; -export declare function futimesAsync(fd: number, atime: number, mtime: number): Promise; -export declare function fsyncAsync(fd: number): Promise; -export declare function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; -export declare function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; -export declare function readFileAsync(filename: string, encoding: string): Promise; -export declare function readFileAsync(filename: string, options: ReadOptions): Promise; -export declare function readFileAsync(filename: string): Promise; -export declare function writeFileAsync(filename: string, data: any, encoding?: string): Promise; -export declare function writeFileAsync(filename: string, data: any, options?: WriteOptions): Promise; -export declare function appendFileAsync(filename: string, data: any, encoding?: string): Promise; -export declare function appendFileAsync(filename: string, data: any, option?: WriteOptions): Promise; +export function renameAsync(oldPath: string, newPath: string): Promise; +export function truncateAsync(fd: number, len: number): Promise; +export function chownAsync(path: string, uid: number, gid: number): Promise; +export function fchownAsync(fd: number, uid: number, gid: number): Promise; +export function lchownAsync(path: string, uid: number, gid: number): Promise; +export function chmodAsync(path: string, mode: number | string): Promise; +export function fchmodAsync(fd: number, mode: number | string): Promise; +export function lchmodAsync(path: string, mode: number | string): Promise; +export function statAsync(path: string): Promise; +export function lstatAsync(path: string): Promise; +export function fstatAsync(fd: number): Promise; +export function linkAsync(srcpath: string, dstpath: string): Promise; +export function symlinkAsync(srcpath: string, dstpath: string, type?: string): Promise; +export function readlinkAsync(path: string): Promise; +export function realpathAsync(path: string, cache?: { [path: string]: string }): Promise; +export function unlinkAsync(path: string): Promise; +export function rmdirAsync(path: string): Promise; +export function mkdirAsync(path: string, mode?: number | string): Promise; +export function readdirAsync(path: string): Promise; +export function closeAsync(fd: number): Promise; +export function openAsync(path: string, flags: string, mode?: string): Promise; +export function utimesAsync(path: string, atime: number, mtime: number): Promise; +export function futimesAsync(fd: number, atime: number, mtime: number): Promise; +export function fsyncAsync(fd: number): Promise; +export function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; +export function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; +/** + * readFileAsync + * @param filename + * @param options: + * string: encoding + * ReadOptions: options + */ +export function readFileAsync(filename: string, options: string | ReadOptions): Promise; +export function readFileAsync(filename: string): Promise; +/** + * writeFileAsync + * @param filename + * @param data + * @param options: + * string: encoding + * WriteOptions: options + */ +export function writeFileAsync(filename: string, data: any, options?: string | WriteOptions): Promise; +/** + * appendFileAsync + * @param filename + * @param data + * @param options: + * string: encoding + * WriteOptions: options + */ +export function appendFileAsync(filename: string, data: any, option?: string | WriteOptions): Promise; -export declare function existsAsync(path: string): Promise; -export declare function ensureDirAsync(path: string): Promise; +export function existsAsync(path: string): Promise; +export function ensureDirAsync(path: string): Promise; + +export function isDirectory(path: string, callback?: (err: Error, isDirectory: boolean) => void): void; +export function isDirectorySync(path: string): boolean; +export function isDirectoryAsync(path: string): Promise; diff --git a/types/fs-extra-promise/tslint.json b/types/fs-extra-promise/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/fs-extra-promise/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/fs-extra/fs-extra-tests.ts b/types/fs-extra/fs-extra-tests.ts index 005857e48c..39f3a9d37a 100644 --- a/types/fs-extra/fs-extra-tests.ts +++ b/types/fs-extra/fs-extra-tests.ts @@ -62,7 +62,7 @@ fs.copy(src, dest, ); fs.copySync(src, dest); fs.copySync(src, dest, (src: string) => false); -fs.copySync(src, dest, /.*/); +fs.copySync(src, dest, { filter: /.*/ }); fs.copySync(src, dest, { overwrite: true, @@ -167,16 +167,16 @@ fs.ensureFile(path).then(() => { }); fs.ensureFile(path, errorCallback); fs.ensureFileSync(path); -fs.ensureLink(path).then(() => { +fs.ensureLink(path, path).then(() => { // stub }); -fs.ensureLink(path, errorCallback); -fs.ensureLinkSync(path); -fs.ensureSymlink(path).then(() => { +fs.ensureLink(path, path, errorCallback); +fs.ensureLinkSync(path, path); +fs.ensureSymlink(path, path, "file").then(() => { // stub }); -fs.ensureSymlink(path, errorCallback); -fs.ensureSymlinkSync(path); +fs.ensureSymlink(path, path, errorCallback); +fs.ensureSymlinkSync(path, path); fs.emptyDir(path).then(() => { // stub }); @@ -212,3 +212,9 @@ fs.lchmodSync(path, modeNum); fs.lchmodSync(path, modeStr); fs.statSync(path); fs.lstatSync(path); + +// $ExpectType Promise +fs.writeFile("foo.txt", "i am foo", { encoding: "utf-8" }); + +// $ExpectType Promise +fs.mkdtemp("foo"); diff --git a/types/fs-extra/index.d.ts b/types/fs-extra/index.d.ts index 481fbad644..49a056bce7 100644 --- a/types/fs-extra/index.d.ts +++ b/types/fs-extra/index.d.ts @@ -1,8 +1,8 @@ // Type definitions for fs-extra 3.0 // Project: https://github.com/jprichardson/node-fs-extra -// Definitions by: Alan Agius -// midknight41 -// Brendan Forster +// Definitions by: Alan Agius , +// midknight41 , +// Brendan Forster , // Mees van Dijk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -79,13 +79,14 @@ export function ensureFile(path: string): Promise; export function ensureFile(path: string, callback: (err: Error) => void): void; export function ensureFileSync(path: string): void; -export function ensureLink(path: string): Promise; -export function ensureLink(path: string, callback: (err: Error) => void): void; -export function ensureLinkSync(path: string): void; +export function ensureLink(src: string, dest: string): Promise; +export function ensureLink(src: string, dest: string, callback: (err: Error) => void): void; +export function ensureLinkSync(src: string, dest: string): void; -export function ensureSymlink(path: string): Promise; -export function ensureSymlink(path: string, callback: (err: Error) => void): void; -export function ensureSymlinkSync(path: string): void; +export function ensureSymlink(src: string, dest: string, type?: SymlinkType): Promise; +export function ensureSymlink(src: string, dest: string, type: SymlinkType, callback: (err: Error) => void): void; +export function ensureSymlink(src: string, dest: string, callback: (err: Error) => void): void; +export function ensureSymlinkSync(src: string, dest: string, type?: SymlinkType): void; export function emptyDir(path: string): Promise; export function emptyDir(path: string, callback: (err: Error) => void): void; @@ -236,8 +237,8 @@ export function write(fd: number, buffer: Buffer, offset: number, length: number export function write(fd: number, data: any, offset: number, encoding?: string): Promise<[number, string]>; export function writeFile(file: string | Buffer | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; -export function writeFile(file: string | Buffer | number, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; export function writeFile(file: string | Buffer | number, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): Promise; +export function writeFile(file: string | Buffer | number, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback: (err: NodeJS.ErrnoException) => void): void; /** * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. @@ -245,8 +246,8 @@ export function writeFile(file: string | Buffer | number, data: any, options?: { * @param prefix * @param callback The created folder path is passed as a string to the callback's second parameter. */ -export function mkdtemp(prefix: string, callback?: (err: NodeJS.ErrnoException, folder: string) => void): void; export function mkdtemp(prefix: string): Promise; +export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void; export interface PathEntry { path: string; @@ -257,9 +258,9 @@ export interface PathEntryStream { read(): PathEntry | null; } -export type CopyFilterFunction = (src: string) => boolean; +export type CopyFilter = ((src: string) => boolean) | RegExp; -export type CopyFilter = CopyFilterFunction | RegExp; +export type SymlinkType = "dir" | "file"; export interface CopyOptions { dereference?: boolean; diff --git a/types/fullcalendar/fullcalendar-tests.ts b/types/fullcalendar/fullcalendar-tests.ts index ca456013af..c0a53a59f1 100644 --- a/types/fullcalendar/fullcalendar-tests.ts +++ b/types/fullcalendar/fullcalendar-tests.ts @@ -622,11 +622,8 @@ $('#calendar').fullCalendar({ eventColor: '#378006' }); -interface EventWithDescription extends FullCalendar.EventObject { - description: string; -} -interface JQuery { - qtip: any; // dummy plugin interface +interface JQueryQTip extends JQuery { + qtip(options: Object): JQuery; // dummy plugin interface } $('#calendar').fullCalendar({ @@ -638,7 +635,7 @@ $('#calendar').fullCalendar({ } // more events here ], - eventRender(event: EventWithDescription, element: any, view: any) { + eventRender(event: FullCalendar.EventObject, element: JQueryQTip, view: FullCalendar.ViewObject) { element.qtip({ content: event.description }); diff --git a/types/fullcalendar/index.d.ts b/types/fullcalendar/index.d.ts index 2fedd216c6..bed6396214 100644 --- a/types/fullcalendar/index.d.ts +++ b/types/fullcalendar/index.d.ts @@ -2,6 +2,7 @@ // Project: http://fullcalendar.io/ // Definitions by: Neil Stalker , Marcelo Camargo , Patrick Niemann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -57,7 +58,7 @@ export interface Options extends AgendaOptions, EventDraggingResizingOptions, Dr views?: ViewSpecificOptions; viewRender?(view: ViewObject, element: JQuery): void; viewDestroy?(view: ViewObject, element: JQuery): void; - dayRender?(date: Date, cell: HTMLTableDataCellElement): void; + dayRender?(date: Date, cell: JQuery): void; windowResize?(view: ViewObject): void; // Timezone @@ -130,8 +131,8 @@ export interface Options extends AgendaOptions, EventDraggingResizingOptions, Dr eventBackgroundColor?: string; eventBorderColor?: string; eventTextColor?: string; - eventRender?(event: EventObject, element: HTMLDivElement, view: ViewObject): void; - eventAfterRender?(event: EventObject, element: HTMLDivElement, view: ViewObject): void; + eventRender?(event: EventObject, element: JQuery, view: ViewObject): void; + eventAfterRender?(event: EventObject, element: JQuery, view: ViewObject): void; eventAfterAllRender?(view: ViewObject): void; eventDestroy?(event: EventObject, element: JQuery, view: ViewObject): void; @@ -184,7 +185,7 @@ export interface EventDraggingResizingOptions { */ export interface SelectionOptions { selectable?: boolean; - selectHelper?: boolean | ((start: moment.Moment, end: moment.Moment) => HTMLElement); + selectHelper?: boolean; unselectAuto?: boolean; unselectCancel?: string; selectOverlap?: boolean | ((event: EventObject) => boolean); @@ -229,6 +230,8 @@ export interface EventObject extends Timespan { backgroundColor?: string; borderColor?: string; textColor?: string; + // non-standard fields, see https://fullcalendar.io/docs/event_data/Event_Object/ and https://fullcalendar.io/docs/event_rendering/eventRender/ + [x: string]: any; } export interface ViewObject extends Timespan { diff --git a/types/fullcalendar/tsconfig.json b/types/fullcalendar/tsconfig.json index ceb59668c7..e57ff2b39c 100644 --- a/types/fullcalendar/tsconfig.json +++ b/types/fullcalendar/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "fullcalendar-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/fullcalendar/v1/index.d.ts b/types/fullcalendar/v1/index.d.ts index 4c8a5dc65a..63b70c9cc7 100644 --- a/types/fullcalendar/v1/index.d.ts +++ b/types/fullcalendar/v1/index.d.ts @@ -2,6 +2,7 @@ // Project: http://arshaw.com/fullcalendar/ // Definitions by: Neil Stalker , Marcelo Camargo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// import * as moment from "moment"; diff --git a/types/fullcalendar/v1/tsconfig.json b/types/fullcalendar/v1/tsconfig.json index 810979b7a3..2389638d1c 100644 --- a/types/fullcalendar/v1/tsconfig.json +++ b/types/fullcalendar/v1/tsconfig.json @@ -25,4 +25,4 @@ "index.d.ts", "fullcalendar-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/fullpage.js/index.d.ts b/types/fullpage.js/index.d.ts index 7716a3bca8..869a64d6e8 100644 --- a/types/fullpage.js/index.d.ts +++ b/types/fullpage.js/index.d.ts @@ -2,6 +2,7 @@ // Project: http://alvarotrigo.com/fullPage/ // Definitions by: Andrew Roberts // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/gamequery/index.d.ts b/types/gamequery/index.d.ts index 4d78bf23df..e45e7f761c 100644 --- a/types/gamequery/index.d.ts +++ b/types/gamequery/index.d.ts @@ -2,6 +2,7 @@ // Project: http://gamequeryjs.com/ // Definitions by: David Laubreiter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/gapi.analytics/gapi.analytics-tests.ts b/types/gapi.analytics/gapi.analytics-tests.ts index 2c35403d10..767a3f8657 100644 --- a/types/gapi.analytics/gapi.analytics-tests.ts +++ b/types/gapi.analytics/gapi.analytics-tests.ts @@ -19,19 +19,19 @@ function test_namespace() { "enumDescriptions" ?: string[]; "location" ?: string; } - var kBI : AnalyticsParameter = gapi.client.analytics.kB.parameters.alt; + var kBI : AnalyticsParameter = new gapi.client.analytics.kB.parameters.alt(); var kB = !!kBI; - kBI = gapi.client.analytics.kB.parameters.fields; + kBI = new gapi.client.analytics.kB.parameters.fields(); kB = kB && !!kBI; - kBI = gapi.client.analytics.kB.parameters.key; + kBI = new gapi.client.analytics.kB.parameters.key(); kB = kB && !!kBI; - kBI = gapi.client.analytics.kB.parameters.oauth_token; + kBI = new gapi.client.analytics.kB.parameters.oauth_token(); kB = kB && !!kBI; - kBI = gapi.client.analytics.kB.parameters.prettyPrint; + kBI = new gapi.client.analytics.kB.parameters.prettyPrint(); kB = kB && !!kBI; - kBI = gapi.client.analytics.kB.parameters.quotaUser; + kBI = new gapi.client.analytics.kB.parameters.quotaUser(); kB = kB && !!kBI; - kBI = gapi.client.analytics.kB.parameters.userIP; + kBI = new gapi.client.analytics.kB.parameters.userIP(); kB = kB && !!kBI; analytics = analytics && kB; diff --git a/types/gapi.analytics/index.d.ts b/types/gapi.analytics/index.d.ts index 31bbd1a83b..e70b05ae55 100644 --- a/types/gapi.analytics/index.d.ts +++ b/types/gapi.analytics/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/analytics/devguides/reporting/core/v4/ // Definitions by: César Costas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -47,13 +48,20 @@ declare namespace gapi.client.analytics.kB.parameters { "enumDescriptions" ?: string[]; "location" ?: string; } - export class alt implements AnalyticsParameter {} - export class fields implements AnalyticsParameter {} - export class key implements AnalyticsParameter {} - export class oauth_token implements AnalyticsParameter {} - export class prettyPrint implements AnalyticsParameter {} - export class quotaUser implements AnalyticsParameter {} - export class userIP implements AnalyticsParameter {} + export interface alt extends AnalyticsParameter {} + export class alt {} + export interface fields extends AnalyticsParameter {} + export class fields {} + export interface key extends AnalyticsParameter {} + export class key {} + export interface oauth_token extends AnalyticsParameter {} + export class oauth_token {} + export interface prettyPrint extends AnalyticsParameter {} + export class prettyPrint {} + export interface quotaUser extends AnalyticsParameter {} + export class quotaUser {} + export interface userIP extends AnalyticsParameter {} + export class userIP {} } interface View { diff --git a/types/gapi.auth2/index.d.ts b/types/gapi.auth2/index.d.ts index de75d26ca2..6e9e5c4199 100644 --- a/types/gapi.auth2/index.d.ts +++ b/types/gapi.auth2/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/identity/sign-in/web/ // Definitions by: Derek Lawless // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -46,9 +47,10 @@ declare namespace gapi.auth2 { /** * Get permission from the user to access the specified scopes offline. */ - grantOfflineAccess(options: { + grantOfflineAccess(options?: { scope?: string; - redirect_uri?: string; + prompt?: "select_account" | "consent"; + app_package_name?: string; }): any; /** @@ -174,7 +176,7 @@ declare namespace gapi.auth2 { * Forces a refresh of the access token, and then returns a Promise for the new AuthResponse. */ reloadAuthResponse(): Promise; - + /** * Returns true if the user granted the specified scopes. */ diff --git a/types/gapi.calendar/index.d.ts b/types/gapi.calendar/index.d.ts index bd0e3b0d17..e066ebfad4 100644 --- a/types/gapi.calendar/index.d.ts +++ b/types/gapi.calendar/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/google-apps/calendar/ // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/gapi.drive/gapi.drive-tests.ts b/types/gapi.drive/gapi.drive-tests.ts new file mode 100644 index 0000000000..6e6f9d1db1 --- /dev/null +++ b/types/gapi.drive/gapi.drive-tests.ts @@ -0,0 +1,92 @@ +/* Example taken from Google Drive API JavaScript Quickstart https://developers.google.com/drive/v2/web/quickstart/js */ + +{ + // Client ID and API key from the Developer Console + var CLIENT_ID = ''; + + // Authorization scopes required by the API; multiple scopes can be + // included, separated by spaces. + var SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly']; + + /** + * Check if current user has authorized this application. + */ + function checkAuth() { + gapi.auth.authorize( + { + 'client_id': CLIENT_ID, + 'scope': SCOPES.join(' '), + 'immediate': true + }, handleAuthResult); + } + + /** + * Handle response from authorization server. + * + * @param {Object} authResult Authorization result. + */ + function handleAuthResult(authResult: GoogleApiOAuth2TokenObject) { + var authorizeDiv = document.getElementById('authorize-div')!; + if (authResult && !authResult.error) { + // Hide auth UI, then load client library. + authorizeDiv.style.display = 'none'; + loadDriveApi(); + } else { + // Show auth UI, allowing the user to initiate authorization by + // clicking authorize button. + authorizeDiv.style.display = 'inline'; + } + } + + /** + * Initiate auth flow in response to user clicking authorize button. + * + * @param {Event} event Button click event. + */ + function handleAuthClick(event: MouseEvent) { + gapi.auth.authorize( + {client_id: CLIENT_ID, scope: SCOPES, immediate: false}, + handleAuthResult); + return false; + } + + + /** + * Load Google Drive client library. + */ + function loadDriveApi() { + gapi.client.load('drive', 'v2', () => null); + } + + /** + * Append a pre element to the body containing the given message + * as its text node. Used to display the results of the API call. + * + * @param {string} message Text to be placed in pre element. + */ + function appendPre(message: string) { + var pre = document.getElementById('content')!; + var textContent = document.createTextNode(message + '\n'); + pre.appendChild(textContent); + } + + /** + * Print files. + */ + function listFiles() { + gapi.client.drive.files.list({ + 'maxResults': 10 + }).then(function(response: any) { + appendPre('Files:'); + var files = response.result.items; + if (files && files.length > 0) { + for (var i = 0; i < files.length; i++) { + var file = files[i]; + appendPre(file.title + ' (' + file.id + ')'); + } + } else { + appendPre('No files found.'); + } + }); + } +} diff --git a/types/gapi.drive/index.d.ts b/types/gapi.drive/index.d.ts new file mode 100644 index 0000000000..e0d4037ec9 --- /dev/null +++ b/types/gapi.drive/index.d.ts @@ -0,0 +1,372 @@ +// Type definitions for Google Drive API v2 +// Project: https://developers.google.com/drive/ +// Definitions by: Sam Baxter +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace gapi.client { + export module drive { + const files: { + get: (parameters: GetParameters) => HttpRequest; + patch: (parameters: PatchParameters) => HttpRequest; + copy: (parameters: CopyParameters) => HttpRequest; + delete: (parameters: DeleteParameters) => HttpRequest; + emptyTrash: () => HttpRequest; + export: (parameters: ExportParameters) => HttpRequest; + generateIds: (parameters: GenerateIdsParameters) => HttpRequest; + insert: (parameters: InsertParameters) => HttpRequest; + list: (parameters: ListParameters) => HttpRequest; + touch: (parameters: TouchParameters) => HttpRequest; + trash: (parameters: TrashParameters) => HttpRequest; + untrash: (parameters: UntrashParameters) => HttpRequest; + watch: (parameters: WatchParameters) => HttpRequest; + } + + interface GetParameters { + fileId: string; + acknowledgeAbuse?: boolean; + projection?: string; + revisionId?: string; + supportsTeamDrives?: boolean; + updateViewedDate?: boolean; + } + + interface PatchParameters { + fileId: string; + resource?: FileResource + convert?: boolean; + modifiedDateBehavior?: string; + newRevision?: boolean; + ocr?: boolean; + ocrLanguage?: string; + pinned?: boolean; + removeParents?: string; + setModifiedDate?: boolean; + supportsTeamDrives?: boolean; + timedTextLanguage?: string; + timedTextTrackName?: string; + updateViewedData?: boolean; + useContentAsIndexableText?: boolean; + } + + interface CopyParameters { + fileId: string; + resource?: FileResource; + convert?: boolean; + ocr?: boolean; + ocrLanguage?: string; + pinned?: boolean; + supportsTeamDrives?: boolean; + timedTextLanguage?: string; + timedTextTrackName?: string; + visibility?: string; + } + + interface DeleteParameters { + fileId: string; + supportsTeamDrives?: boolean; + } + + interface ExportParameters { + fileId: string; + mimeType: string; + } + + interface GenerateIdsParameters { + maxResults?: number; + space?: string; + } + + interface InsertParameters { + uploadType: string; + convert?: boolean; + ocr?: boolean; + ocrLanguage?: string; + pinned?: boolean; + supportsTeamDrives?: boolean; + timedTextLanguage?: string; + timedTextTrackName?: string; + usecontentAsIndexableText?: boolean; + visibility?: string; + } + + interface ListParameters { + corpora?: string; + corpus?: string; + includeTeamDriveItems?: boolean; + maxResults?: number; + orderBy?: string; + pageToken?: string; + projection?: string; + q?: string; + spaces?: string; + supportsTeamDrives?: boolean; + teamDriveId?: string; + } + + interface TouchParameters { + fileId: string; + supportsTeamDrives?: boolean; + } + + interface TrashParameters { + fileId: string; + supportsTeamDrives?: boolean; + } + + + interface UntrashParameters { + fileId: string; + supportsTeamDrives?: boolean; + } + + + interface WatchParameters { + fileId: string; + resource?: WatchResource; + revisionId?: string; + supportsTeamDrives?: boolean; + } + + interface FileResource { + kind: 'drive#file'; + id: string; + etag: string; + selfLink: string; + webContentLink: string; + webViewLink: string; + alternateLink: string; + embedLink: string; + // openWithLinks + defaultOpenWithLink: string; + iconLink: string; + hasThumbnail: boolean; + thumbnailLink: string; + thumbnail: { + image: Uint8Array; + mimType: string; + }; + title: string; + mimeType: string; + description: string; + labels: { + starred: boolean; + hidden: boolean; + trashed: boolean; + restricted: boolean; + viewed: boolean; + modified: boolean; + }; + createdDate: Date; + modifiedDate: Date; + modifiedByMeDate: Date; + lastViewedByMeDate: Date; + markedViewedByMeDate: Date; + sharedWithMeDate: Date; + version: number; + sharingUser: { + kind: 'drive#user'; + displayName: string; + picture: { + url: string; + }; + isAuthenticatedUser: boolean; + permissionId: string; + emailAddress: string; + }; + parents: ParentResource[]; + downloadUrl: string; + // exportLinks + indexableText: { + text: string; + }; + userPermission: PermissionResource; + permissions: PermissionResource[]; + hasAugmentedPermissions: boolean; + originalFilename: string; + fileExtension: string; + fullFileExtension: string; + md5Checksum: string; + fileSize: number; + quotaBytesUsed: number; + ownerNames: string[]; + owners: { + kind: 'drive#user'; + displayName: string; + picture: { + url: string; + }; + isAuthenticatedUser: boolean; + permissionId: string; + emailAddress: string; + }[]; + teamDriveId: string; + lastModifyingUserName: string; + lastModifyingUser: { + kind: 'drive#user'; + displayName: string; + picture: { + url: string; + }; + isAuthenticatedUser: boolean; + permissionId: string; + emailAddress: string; + }; + ownedByMe: boolean; + capabilities: { + canAddChildren: boolean; + canChangeRestrictedDownload: boolean; + canComment: boolean; + canCopy: boolean; + canDelete: boolean; + canDownload: boolean; + canEdit: boolean; + canListChildren: boolean; + canMoveItemIntoTeamDrive: boolean; + canMoveTeamDriveItem: boolean; + canReadRevisions: boolean; + canReadTeamDrive: boolean; + canRemoveChildren: boolean; + canRename: boolean; + canShare: boolean; + canTrash: boolean; + canUntrash: boolean; + }; + editable: boolean; + canComment: boolean; + canReadRevisions: boolean; + shareable: boolean; + copyable: boolean; + writersCanShare: boolean; + shared: boolean; + explicitlyTrashed: boolean; + trashingUser: { + kind: 'drive#user'; + displayName: string; + picture: { + url: string; + }; + isAuthenticatedUser: boolean; + permissionId: string; + emailAddress: string; + }; + trashedDate: Date; + appDataContents: boolean; + headRevisionId: string; + properties: PropertiesResource[]; + folderColorRgb: string; + imageMediaMetadata: { + width: number; + height: number; + rotation: number; + location: { + latitude: number; + longitude: number; + altitude: number; + }; + date: string; + cameraMake: string; + cameraModel: string; + exposureTime: number; + aperture: number; + flashUsed: boolean; + focalLength: number; + isoSpeed: number; + meteringMode: string; + sensor: string; + exposureMode: string; + colorSpace: string; + whiteBalance: string; + exposureBias: number; + maxApertureValue: number; + subjectDistance: number; + lens: string; + }; + videoMediaMetadata: { + width: number; + height: number; + durationMillis: number; + }; + spaces: string[]; + isAppAuthorized: boolean; + } + + interface FileListResource { + kind: 'drive#fileList'; + etag: string; + selfLink: string; + nextPageToken: string; + nextLink: string; + incompleteSearch: boolean; + items: FileResource[]; + } + + interface ParentResource { + kind: 'drive#parentReference'; + id: string; + selfLink: string; + parentLink: string; + isRoot: boolean; + } + + interface PermissionResource { + kind: 'drive#permission'; + etag: string; + id: string; + selfLink: string; + name: string; + emailAddress: string; + domain: string; + role: string; + additionalRoles: string[]; + type: string; + value: string; + authKey: string; + withLink: boolean; + photoLink: string; + expirationDate: Date; + teamDrivePermissionDetails: { + teamDrivePermissionType: string; + role: string; + additionalRoles: string[]; + inheritedFrom: string; + inherited: boolean; + }[]; + deleted: boolean; + } + + interface PropertiesResource { + kind: 'drive$property'; + etag: string; + selfLink: string; + key: string; + visibility: string; + value: string; + } + + interface WatchResource { + id: string; + expiration: number; + token: string; + type: string; + address: string; + } + + interface ChannelResource { + kind: 'api#channel'; + id: string; + resourceId: string; + resourceUri: string; + token: string; + expiration: number; + } + + interface IdsResource { + kind: 'drive#generatedIds'; + space: string; + ids: string[]; + } + } +} diff --git a/types/gapi.drive/tsconfig.json b/types/gapi.drive/tsconfig.json new file mode 100644 index 0000000000..b66df1103c --- /dev/null +++ b/types/gapi.drive/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gapi.drive-tests.ts" + ] +} diff --git a/types/gapi.pagespeedonline/index.d.ts b/types/gapi.pagespeedonline/index.d.ts index 2da0bdca15..f6a19ff6f6 100644 --- a/types/gapi.pagespeedonline/index.d.ts +++ b/types/gapi.pagespeedonline/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/speed/pagespeed/ // Definitions by: Frank M // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/gapi.people/index.d.ts b/types/gapi.people/index.d.ts index 894dd8a0d1..851eab2c0b 100644 --- a/types/gapi.people/index.d.ts +++ b/types/gapi.people/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/people/ // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -117,7 +118,7 @@ declare namespace gapi.client.people { value: string; type: NicknameType; } - + interface CoverPhoto { metadata: FieldMetadata; url: string; diff --git a/types/gapi.plus/index.d.ts b/types/gapi.plus/index.d.ts index 3e24b79ce1..62daa0cfee 100644 --- a/types/gapi.plus/index.d.ts +++ b/types/gapi.plus/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/+/web/people/ // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/gapi.translate/index.d.ts b/types/gapi.translate/index.d.ts index 66bb1719ae..cbf337589d 100644 --- a/types/gapi.translate/index.d.ts +++ b/types/gapi.translate/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/translate/ // Definitions by: Frank M // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/gapi.urlshortener/index.d.ts b/types/gapi.urlshortener/index.d.ts index a7cdcb1364..f870da021f 100644 --- a/types/gapi.urlshortener/index.d.ts +++ b/types/gapi.urlshortener/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/url-shortener/ // Definitions by: Frank M // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/gapi.youtube/index.d.ts b/types/gapi.youtube/index.d.ts index 2bbacb9668..5f3aef616a 100644 --- a/types/gapi.youtube/index.d.ts +++ b/types/gapi.youtube/index.d.ts @@ -2,7 +2,7 @@ // Project: https://developers.google.com/youtube/v3/ // Definitions by: Frank M // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +// TypeScript Version: 2.3 /// diff --git a/types/gapi.youtubeanalytics/index.d.ts b/types/gapi.youtubeanalytics/index.d.ts index 6595cad721..3391aa1b32 100644 --- a/types/gapi.youtubeanalytics/index.d.ts +++ b/types/gapi.youtubeanalytics/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/youtube/analytics/ // Definitions by: Frank M // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/gapi/index.d.ts b/types/gapi/index.d.ts index 9af6258966..26202fe24e 100644 --- a/types/gapi/index.d.ts +++ b/types/gapi/index.d.ts @@ -2,7 +2,7 @@ // Project: https://code.google.com/p/google-api-javascript-client/ // Definitions by: Frank M // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 /** * The OAuth 2.0 token object represents the OAuth 2.0 token and any associated data. @@ -237,17 +237,14 @@ declare namespace gapi.client { /** * HttpRequest supports promises. * See Google API Client JavaScript Using Promises https://developers.google.com/api-client-library/javascript/features/promises - * - * TODO This should be updated when TypeScript 2.3 is released - * See https://github.com/Microsoft/TypeScript/issues/12409 - * See https://github.com/Microsoft/TypeScript/blob/65da012527937a3074c62655d60ee08fee809f7f/lib/lib.es5.d.ts#L1339 */ class HttpRequestPromise { - then( - opt_onFulfilled?: ((response: HttpRequestFulfilled) => void) | null, - opt_onRejected?: ((reason: HttpRequestRejected) => void) | null, - opt_context?: any - ): Promise; + // Taken and adapted from https://github.com/Microsoft/TypeScript/blob/v2.3.1/lib/lib.es5.d.ts#L1343 + then( + onfulfilled?: ((response: HttpRequestFulfilled) => TResult1 | PromiseLike) | undefined | null, + onrejected?: ((reason: HttpRequestRejected) => TResult2 | PromiseLike) | undefined | null, + opt_context?: any + ): Promise; } /** diff --git a/types/geokdbush/geokdbush-tests.ts b/types/geokdbush/geokdbush-tests.ts new file mode 100644 index 0000000000..f2fa9d54c3 --- /dev/null +++ b/types/geokdbush/geokdbush-tests.ts @@ -0,0 +1,10 @@ +import * as kdbush from 'kdbush'; +import * as geokdbush from 'geokdbush'; + +const points = [ + {lon: 0, lat: 0}, + {lon: 20, lat: 10}, + {lon: -10, lat: 30}, +]; +const index = kdbush(points, p => p.lon, p => p.lat); +const nearest = geokdbush.around(index, -119.7051, 34.4363, 1000); diff --git a/types/geokdbush/index.d.ts b/types/geokdbush/index.d.ts new file mode 100644 index 0000000000..4ece8ff98d --- /dev/null +++ b/types/geokdbush/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for geokdbush 1.1 +// Project: https://github.com/mourner/geokdbush +// Definitions by: Denis Carriere +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import {KDBush} from 'kdbush'; + +export function around( + index: KDBush, + longitude: number, + latitude: number, + maxResults?: number, + maxDistance?: number, + filterFn?: any): T[]; + +export function distance( + longitude1: number, + latitude1: number, + longitude2: number, + latitude2: number): number; diff --git a/types/geokdbush/tsconfig.json b/types/geokdbush/tsconfig.json new file mode 100644 index 0000000000..9f00c027da --- /dev/null +++ b/types/geokdbush/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", + "geokdbush-tests.ts" + ] +} diff --git a/types/geokdbush/tslint.json b/types/geokdbush/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/geokdbush/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/geopattern/index.d.ts b/types/geopattern/index.d.ts index edd08ad035..5756fbda93 100644 --- a/types/geopattern/index.d.ts +++ b/types/geopattern/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/btmills/geopattern // Definitions by: Gaelan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/get-node-dimensions/get-node-dimensions-tests.ts b/types/get-node-dimensions/get-node-dimensions-tests.ts new file mode 100644 index 0000000000..b83f6d7b6a --- /dev/null +++ b/types/get-node-dimensions/get-node-dimensions-tests.ts @@ -0,0 +1,11 @@ +import getNodeDimensions = require('get-node-dimensions'); + +const div = document.getElementById('div-to-measure'); + +if (div !== null) { + const dimensions = getNodeDimensions(div); +} + +if (div !== null) { + const dimensionsWithMargin = getNodeDimensions(div, {margin: true}); +} diff --git a/types/get-node-dimensions/index.d.ts b/types/get-node-dimensions/index.d.ts new file mode 100644 index 0000000000..e15d08bb21 --- /dev/null +++ b/types/get-node-dimensions/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for get-node-dimensions 1.2 +// Project: https://github.com/souporserious/get-node-dimensions +// Definitions by: Kovács Vince +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface NodeDimensions { + width: number; + height: number; + top: number; + right: number; + bottom: number; + left: number; +} + +interface NodeDimensionsOptions { + margin?: boolean; + clone?: boolean; + display?: string; + width?: string; + height?: string; +} + +declare function getNodeDimensions(element: HTMLElement, options?: NodeDimensionsOptions): NodeDimensions; + +export = getNodeDimensions; diff --git a/types/get-node-dimensions/tsconfig.json b/types/get-node-dimensions/tsconfig.json new file mode 100644 index 0000000000..74d9b030bf --- /dev/null +++ b/types/get-node-dimensions/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "get-node-dimensions-tests.ts" + ] +} diff --git a/types/get-node-dimensions/tslint.json b/types/get-node-dimensions/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/get-node-dimensions/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/get-stream/get-stream-tests.ts b/types/get-stream/get-stream-tests.ts new file mode 100644 index 0000000000..065c0a3c97 --- /dev/null +++ b/types/get-stream/get-stream-tests.ts @@ -0,0 +1,12 @@ +import getStream = require("get-stream"); + +import * as fs from 'fs'; + +getStream(fs.createReadStream('foo')) + .then(str => str.toLowerCase()); + +getStream.array(fs.createReadStream('foo')) + .then(values => values.join(', ')); + +getStream.buffer(fs.createReadStream('foo')) + .then(buffer => buffer.byteLength); diff --git a/types/get-stream/index.d.ts b/types/get-stream/index.d.ts new file mode 100644 index 0000000000..9dafe344ae --- /dev/null +++ b/types/get-stream/index.d.ts @@ -0,0 +1,61 @@ +// Type definitions for get-stream 3.0 +// Project: https://github.com/sindresorhus/get-stream#readme +// Definitions by: Douglas Duteil +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import {Stream} from 'stream'; + +interface Options { + /** + * Encoding of the incoming stream. + * @default 'utf8' + */ + encoding?: string; + /** + * Maximum length of the returned string. If it exceeds this value before + * the stream ends, the promise will be rejected. + * @default Infinity + */ + maxBuffer?: number; +} + +/** + * Get the stream as a string. + * The methods returns a promise that resolves when the end event fires on the + * stream, indicating that there is no more data to be read. + * The stream is switched to flowing mode. + */ +declare function getStrem(stream: Stream, options?: Options): Promise; +declare namespace getStrem { + /** + * Get the `stream` as an array of values. + * + * It honors both the `maxBuffer` and `encoding` options. + * The behavior changes slightly based on the encoding chosen: + * + * - When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) + * and collects values emitted from `stream` unmodified. + * In this case `maxBuffer` refers to the number of items in the array + * (not the sum of their sizes). + * + * - When `encoding` is set to `buffer`, it collects an array of buffers. + * `maxBuffer` refers to the summed byte lengths of every buffer in the array. + * + * - When `encoding` is set to anything else, it collects an array of strings. + * `maxBuffer` refers to the summed character lengths of every string in the array. + * + */ + function array(stream: Stream, options?: Options): Promise; + + /** + * Get the stream as a buffer. + * + * It honors the maxBuffer option as above, but it refers to byte length + * rather than string length. + */ + function buffer(stream: Stream, options?: Options): Promise; +} + +export = getStrem; diff --git a/types/get-stream/tsconfig.json b/types/get-stream/tsconfig.json new file mode 100644 index 0000000000..766ce0ae4a --- /dev/null +++ b/types/get-stream/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", + "get-stream-tests.ts" + ] +} diff --git a/types/get-stream/tslint.json b/types/get-stream/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/get-stream/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/gijgo/index.d.ts b/types/gijgo/index.d.ts index 2f9604bbef..a76d98dd7f 100644 --- a/types/gijgo/index.d.ts +++ b/types/gijgo/index.d.ts @@ -2,6 +2,7 @@ // Project: http://gijgo.com // Definitions by: Atanas Atanasov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare module Gijgo { diff --git a/types/giraffe/index.d.ts b/types/giraffe/index.d.ts index f9198a7d8b..6b88b5d4b8 100644 --- a/types/giraffe/index.d.ts +++ b/types/giraffe/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/barc/backbone.giraffe // Definitions by: Matt McCray // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/gldatepicker/index.d.ts b/types/gldatepicker/index.d.ts index 1f96e15395..c5b881a0bb 100644 --- a/types/gldatepicker/index.d.ts +++ b/types/gldatepicker/index.d.ts @@ -2,6 +2,7 @@ // Project: http://glad.github.com/glDatePicker/ // Definitions by: Dániel Tar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/glidejs/index.d.ts b/types/glidejs/index.d.ts index 530cd41247..d6ceea389a 100644 --- a/types/glidejs/index.d.ts +++ b/types/glidejs/index.d.ts @@ -2,6 +2,7 @@ // Project: http://glide.jedrzejchalubek.com/ // Definitions by: Milan Jaros // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 interface JQuery { /** diff --git a/types/globby/globby-tests.ts b/types/globby/globby-tests.ts new file mode 100644 index 0000000000..0722b5fb37 --- /dev/null +++ b/types/globby/globby-tests.ts @@ -0,0 +1,24 @@ +import { IOptions } from 'glob'; + +import * as globby from "globby"; + +(async () => { + let result: string[]; + result = await globby('*.tmp'); + result = await globby(['a.tmp', '*.tmp', '!{c,d,e}.tmp']); + + result = globby.sync('*.tmp'); + result = globby.sync(['a.tmp', '*.tmp', '!{c,d,e}.tmp']); + + result = await globby('*.tmp', Object.freeze({ignore: Object.freeze([])})); + result = globby.sync('*.tmp', Object.freeze({ignore: Object.freeze([])})); +})(); + +const tasks: Array<{ + pattern: string, + options: IOptions +}> = globby.generateGlobTasks(['*.tmp', '!b.tmp'], {ignore: ['c.tmp']}); + +console.log(globby.hasMagic('**') === true); +console.log(globby.hasMagic(['**', 'path1', 'path2']) === true); +console.log(globby.hasMagic(['path1', 'path2']) === false); diff --git a/types/globby/index.d.ts b/types/globby/index.d.ts new file mode 100644 index 0000000000..d06091551c --- /dev/null +++ b/types/globby/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for globby 0.6 +// Project: https://github.com/sindresorhus/globby#readme +// Definitions by: Douglas Duteil +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { IOptions } from 'glob'; + +declare function globby(patterns: string | string[], options?: IOptions): Promise; + +declare namespace globby { + function sync(patterns: string | string[], options?: IOptions): string[]; + function generateGlobTasks(patterns: string | string[], options?: IOptions): Array<{pattern: string, options: IOptions}>; + function hasMagic(patterns: string | string[], options?: IOptions): boolean; +} + +export = globby; diff --git a/types/globby/tsconfig.json b/types/globby/tsconfig.json new file mode 100644 index 0000000000..fd75c832f1 --- /dev/null +++ b/types/globby/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", + "globby-tests.ts" + ] +} diff --git a/types/globby/tslint.json b/types/globby/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/globby/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/gm/gm-tests.ts b/types/gm/gm-tests.ts index e8bf5787cd..50c124ffc5 100644 --- a/types/gm/gm-tests.ts +++ b/types/gm/gm-tests.ts @@ -346,3 +346,13 @@ var imageMagick = gm.subClass({ imageMagick: true }); var readStream = imageMagick(src) .adjoin() .stream(); + +var passStream = imageMagick(readStream).stream(); + +var buffers: Buffer[] = []; +var buffer: Buffer; +passStream.on('data', (chunk) => buffers.push(chunk as Buffer)).on('close', () => { + buffer = Buffer.concat(buffers); + var readstream = imageMagick(buffer).stream(); +}) + diff --git a/types/gm/index.d.ts b/types/gm/index.d.ts index 7fd419ede3..8da081ffd5 100644 --- a/types/gm/index.d.ts +++ b/types/gm/index.d.ts @@ -615,6 +615,9 @@ declare namespace m { export interface SubClass { (image: string): State; + (stream: NodeJS.ReadableStream, image?: string): State; + (buffer: Buffer, image?: string): State; + (width: number, height: number, color?: string): State; } export function compare(filename1: string, filename2: string, callback: CompareCallback): void; diff --git a/types/google-apps-script/google-apps-script-tests.ts b/types/google-apps-script/google-apps-script-tests.ts index 5160a5fdae..17de10a2fc 100644 --- a/types/google-apps-script/google-apps-script-tests.ts +++ b/types/google-apps-script/google-apps-script-tests.ts @@ -25,3 +25,9 @@ function createAndSendDocument() { // Send yourself an email with a link to the document. GmailApp.sendEmail(email, subject, body); } + +// Regression + +ScriptApp.getService().getUrl(); + +CalendarApp.GuestStatus.NO; diff --git a/types/google-apps-script/google-apps-script.base.d.ts b/types/google-apps-script/google-apps-script.base.d.ts index 538883cb19..82f92078dd 100644 --- a/types/google-apps-script/google-apps-script.base.d.ts +++ b/types/google-apps-script/google-apps-script.base.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module Base { @@ -58,6 +58,8 @@ declare namespace GoogleAppsScript { * * JdbcClobA JDBC Clob. * + * PositionedImageFixed position image anchored to a Paragraph. + * * SpreadsheetThis class allows users to access and modify Google Sheets files. * * StaticMapAllows for the creation and decoration of static map images. @@ -68,7 +70,7 @@ declare namespace GoogleAppsScript { } /** - * This class provides access to Google Apps specific dialog boxes. + * This class provides access to G Suite specific dialog boxes. * * The methods in this class are only available for use in the context of a Google Spreadsheet. * See also @@ -76,7 +78,7 @@ declare namespace GoogleAppsScript { * ButtonSet */ export interface Browser { - Buttons: ButtonSet + Buttons: typeof ButtonSet; inputBox(prompt: string): string; inputBox(prompt: string, buttons: ButtonSet): string; inputBox(title: string, prompt: string, buttons: ButtonSet): string; @@ -219,6 +221,7 @@ declare namespace GoogleAppsScript { getActiveUserLocale(): string; getEffectiveUser(): User; getScriptTimeZone(): string; + getTemporaryActiveUserKey(): string; getTimeZone(): string; getUser(): User; } @@ -244,8 +247,8 @@ declare namespace GoogleAppsScript { * } */ export interface Ui { - Button: Button - ButtonSet: ButtonSet + Button: typeof Button; + ButtonSet: typeof ButtonSet; alert(prompt: string): Button; alert(prompt: string, buttons: ButtonSet): Button; alert(title: string, prompt: string, buttons: ButtonSet): Button; diff --git a/types/google-apps-script/google-apps-script.cache.d.ts b/types/google-apps-script/google-apps-script.cache.d.ts index bdeee152ba..c0cf592b43 100644 --- a/types/google-apps-script/google-apps-script.cache.d.ts +++ b/types/google-apps-script/google-apps-script.cache.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module Cache { @@ -16,7 +16,7 @@ declare namespace GoogleAppsScript { * to speed up access on an average request. * * function getRssFeed() { - * var cache = CacheService.getPublicCache(); + * var cache = CacheService.getScriptCache(); * var cached = cache.get("rss-feed-contents"); * if (cached != null) { * return cached; diff --git a/types/google-apps-script/google-apps-script.calendar.d.ts b/types/google-apps-script/google-apps-script.calendar.d.ts index c217e67a07..d94ec25ad3 100644 --- a/types/google-apps-script/google-apps-script.calendar.d.ts +++ b/types/google-apps-script/google-apps-script.calendar.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Calendar { @@ -51,11 +51,12 @@ declare namespace GoogleAppsScript { * that the user owns or is subscribed to. */ export interface CalendarApp { - Color: Color - GuestStatus: GuestStatus - Month: Base.Month - Visibility: Visibility - Weekday: Base.Weekday + Color: typeof Color; + EventColor: typeof EventColor; + GuestStatus: typeof GuestStatus; + Month: typeof Base.Month; + Visibility: typeof Visibility; + Weekday: typeof Base.Weekday; createAllDayEvent(title: string, date: Date): CalendarEvent; createAllDayEvent(title: string, date: Date, options: Object): CalendarEvent; createAllDayEventSeries(title: string, startDate: Date, recurrence: EventRecurrence): CalendarEventSeries; @@ -113,6 +114,7 @@ declare namespace GoogleAppsScript { getAllDayEndDate(): Date; getAllDayStartDate(): Date; getAllTagKeys(): String[]; + getColor(): string; getCreators(): String[]; getDateCreated(): Date; getDescription(): string; @@ -144,6 +146,7 @@ declare namespace GoogleAppsScript { resetRemindersToDefault(): CalendarEvent; setAllDayDate(date: Date): CalendarEvent; setAnyoneCanAddSelf(anyoneCanAddSelf: boolean): CalendarEvent; + setColor(color: string): CalendarEvent; setDescription(description: string): CalendarEvent; setGuestsCanInviteOthers(guestsCanInviteOthers: boolean): CalendarEvent; setGuestsCanModify(guestsCanModify: boolean): CalendarEvent; @@ -168,6 +171,7 @@ declare namespace GoogleAppsScript { deleteEventSeries(): void; deleteTag(key: string): CalendarEventSeries; getAllTagKeys(): String[]; + getColor(): string; getCreators(): String[]; getDateCreated(): Date; getDescription(): string; @@ -193,6 +197,7 @@ declare namespace GoogleAppsScript { removeGuest(email: string): CalendarEventSeries; resetRemindersToDefault(): CalendarEventSeries; setAnyoneCanAddSelf(anyoneCanAddSelf: boolean): CalendarEventSeries; + setColor(color: string): CalendarEventSeries; setDescription(description: string): CalendarEventSeries; setGuestsCanInviteOthers(guestsCanInviteOthers: boolean): CalendarEventSeries; setGuestsCanModify(guestsCanModify: boolean): CalendarEventSeries; @@ -211,6 +216,11 @@ declare namespace GoogleAppsScript { */ export enum Color { BLUE, BROWN, CHARCOAL, CHESTNUT, GRAY, GREEN, INDIGO, LIME, MUSTARD, OLIVE, ORANGE, PINK, PLUM, PURPLE, RED, RED_ORANGE, SEA_BLUE, SLATE, TEAL, TURQOISE, YELLOW } + /** + * An enum representing the named event colors available in the Calendar service. + */ + export enum EventColor { PALE_BLUE, PALE_GREEN, MAUVE, PALE_RED, YELLOW, ORANGE, CYAN, GRAY, BLUE, GREEN, RED } + /** * Represents a guest of an event. */ diff --git a/types/google-apps-script/google-apps-script.charts.d.ts b/types/google-apps-script/google-apps-script.charts.d.ts index 2e1b65290a..de6de7b767 100644 --- a/types/google-apps-script/google-apps-script.charts.d.ts +++ b/types/google-apps-script/google-apps-script.charts.d.ts @@ -1,11 +1,11 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - - +/// +/// +/// declare namespace GoogleAppsScript { export module Charts { @@ -232,7 +232,7 @@ declare namespace GoogleAppsScript { /** * Chart types supported by the Charts service. */ - export enum ChartType { AREA, BAR, COLUMN, LINE, PIE, SCATTER, TABLE } + export enum ChartType { AREA, BAR, COLUMN, COMBO, HISTOGRAM, LINE, PIE, SCATTER, TABLE } /** * Entry point for creating Charts in scripts. @@ -265,14 +265,14 @@ declare namespace GoogleAppsScript { * } */ export interface Charts { - ChartType: ChartType - ColumnType: ColumnType - CurveStyle: CurveStyle - MatchType: MatchType - Orientation: Orientation - PickerValuesLayout: PickerValuesLayout - PointStyle: PointStyle - Position: Position + ChartType: typeof ChartType; + ColumnType: typeof ColumnType; + CurveStyle: typeof CurveStyle; + MatchType: typeof MatchType; + Orientation: typeof Orientation; + PickerValuesLayout: typeof PickerValuesLayout; + PointStyle: typeof PointStyle; + Position: typeof Position; newAreaChart(): AreaChartBuilder; newBarChart(): BarChartBuilder; newCategoryFilter(): CategoryFilterBuilder; @@ -446,10 +446,10 @@ declare namespace GoogleAppsScript { * } */ export interface DashboardPanel { - add(widget: UI.Widget): DashboardPanel; getId(): string; getType(): string; setId(id: string): DashboardPanel; + add(widget: UI.Widget): DashboardPanel; } /** diff --git a/types/google-apps-script/google-apps-script.contacts.d.ts b/types/google-apps-script/google-apps-script.contacts.d.ts index 389951d563..46337d87d5 100644 --- a/types/google-apps-script/google-apps-script.contacts.d.ts +++ b/types/google-apps-script/google-apps-script.contacts.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Contacts { @@ -136,12 +136,12 @@ declare namespace GoogleAppsScript { * contacts listed therein. */ export interface ContactsApp { - ExtendedField: ExtendedField - Field: Field - Gender: Gender - Month: Base.Month - Priority: Priority - Sensitivity: Sensitivity + ExtendedField: typeof ExtendedField; + Field: typeof Field; + Gender: typeof Gender; + Month: typeof Base.Month; + Priority: typeof Priority; + Sensitivity: typeof Sensitivity; createContact(givenName: string, familyName: string, email: string): Contact; createContactGroup(name: string): ContactGroup; deleteContact(contact: Contact): void; @@ -197,6 +197,11 @@ declare namespace GoogleAppsScript { /** * A date field in a Contact. + * + * This class is only used by the Contacts service, and dates used elsewhere in App Script use + * JavaScript's standard + * + * Date object. */ export interface DateField { deleteDateField(): void; diff --git a/types/google-apps-script/google-apps-script.content.d.ts b/types/google-apps-script/google-apps-script.content.d.ts index afd34deca1..eaa3057a49 100644 --- a/types/google-apps-script/google-apps-script.content.d.ts +++ b/types/google-apps-script/google-apps-script.content.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module Content { @@ -17,7 +17,7 @@ declare namespace GoogleAppsScript { * } */ export interface ContentService { - MimeType: MimeType + MimeType: typeof MimeType; createTextOutput(): TextOutput; createTextOutput(content: string): TextOutput; } @@ -37,7 +37,7 @@ declare namespace GoogleAppsScript { * You can return text content like this: * * function doGet() { - * return ContentService.createPlainTextOutput("hello world!"); + * return ContentService.createTextOutput("hello world!"); * } * * ContentService diff --git a/types/google-apps-script/google-apps-script.document.d.ts b/types/google-apps-script/google-apps-script.document.d.ts index 7477261602..bee604636a 100644 --- a/types/google-apps-script/google-apps-script.document.d.ts +++ b/types/google-apps-script/google-apps-script.document.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Document { @@ -64,6 +64,7 @@ declare namespace GoogleAppsScript { getAttributes(): Object; getChild(childIndex: Integer): Element; getChildIndex(child: Element): Integer; + getHeadingAttributes(paragraphHeading: ParagraphHeading): Object; getImages(): InlineImage[]; getListItems(): ListItem[]; getMarginBottom(): Number; @@ -94,6 +95,7 @@ declare namespace GoogleAppsScript { removeChild(child: Element): Body; replaceText(searchPattern: string, replacement: string): Element; setAttributes(attributes: Object): Body; + setHeadingAttributes(paragraphHeading: ParagraphHeading, attributes: Object): Body; setMarginBottom(marginBottom: Number): Body; setMarginLeft(marginLeft: Number): Body; setMarginRight(marginRight: Number): Body; @@ -230,14 +232,15 @@ declare namespace GoogleAppsScript { * doc = DocumentApp.create('Document Name'); */ export interface DocumentApp { - Attribute: Attribute - ElementType: ElementType - FontFamily: FontFamily - GlyphType: GlyphType - HorizontalAlignment: HorizontalAlignment - ParagraphHeading: ParagraphHeading - TextAlignment: TextAlignment - VerticalAlignment: VerticalAlignment + Attribute: typeof Attribute; + ElementType: typeof ElementType; + FontFamily: typeof FontFamily; + GlyphType: typeof GlyphType; + HorizontalAlignment: typeof HorizontalAlignment; + ParagraphHeading: typeof ParagraphHeading; + PositionedLayout: typeof PositionedLayout; + TextAlignment: typeof TextAlignment; + VerticalAlignment: typeof VerticalAlignment; create(name: string): Document; getActiveDocument(): Document; getUi(): Base.Ui; @@ -737,6 +740,8 @@ declare namespace GoogleAppsScript { */ export interface InlineDrawing { copy(): InlineDrawing; + getAltDescription(): string; + getAltTitle(): string; getAttributes(): Object; getNextSibling(): Element; getParent(): ContainerElement; @@ -745,6 +750,8 @@ declare namespace GoogleAppsScript { isAtDocumentEnd(): boolean; merge(): InlineDrawing; removeFromParent(): InlineDrawing; + setAltDescription(description: string): InlineDrawing; + setAltTitle(title: string): InlineDrawing; setAttributes(attributes: Object): InlineDrawing; } @@ -757,6 +764,8 @@ declare namespace GoogleAppsScript { */ export interface InlineImage { copy(): InlineImage; + getAltDescription(): string; + getAltTitle(): string; getAs(contentType: string): Base.Blob; getAttributes(): Object; getBlob(): Base.Blob; @@ -770,6 +779,8 @@ declare namespace GoogleAppsScript { isAtDocumentEnd(): boolean; merge(): InlineImage; removeFromParent(): InlineImage; + setAltDescription(description: string): InlineImage; + setAltTitle(title: string): InlineImage; setAttributes(attributes: Object): InlineImage; setHeight(height: Integer): InlineImage; setLinkUrl(url: string): InlineImage; @@ -810,6 +821,7 @@ declare namespace GoogleAppsScript { * item2.setListId(item1); */ export interface ListItem { + addPositionedImage(image: Base.BlobSource): PositionedImage; appendHorizontalRule(): HorizontalRule; appendInlineImage(image: Base.BlobSource): InlineImage; appendInlineImage(image: InlineImage): InlineImage; @@ -840,6 +852,8 @@ declare namespace GoogleAppsScript { getNextSibling(): Element; getNumChildren(): Integer; getParent(): ContainerElement; + getPositionedImage(id: string): PositionedImage; + getPositionedImages(): PositionedImage[]; getPreviousSibling(): Element; getSpacingAfter(): Number; getSpacingBefore(): Number; @@ -858,6 +872,7 @@ declare namespace GoogleAppsScript { merge(): ListItem; removeChild(child: Element): ListItem; removeFromParent(): ListItem; + removePositionedImage(id: string): boolean; replaceText(searchPattern: string, replacement: string): Element; setAlignment(alignment: HorizontalAlignment): ListItem; setAttributes(attributes: Object): ListItem; @@ -945,6 +960,7 @@ declare namespace GoogleAppsScript { * body.appendParagraph("This is a typical paragraph."); */ export interface Paragraph { + addPositionedImage(image: Base.BlobSource): PositionedImage; appendHorizontalRule(): HorizontalRule; appendInlineImage(image: Base.BlobSource): InlineImage; appendInlineImage(image: InlineImage): InlineImage; @@ -972,6 +988,8 @@ declare namespace GoogleAppsScript { getNextSibling(): Element; getNumChildren(): Integer; getParent(): ContainerElement; + getPositionedImage(id: string): PositionedImage; + getPositionedImages(): PositionedImage[]; getPreviousSibling(): Element; getSpacingAfter(): Number; getSpacingBefore(): Number; @@ -990,6 +1008,7 @@ declare namespace GoogleAppsScript { merge(): Paragraph; removeChild(child: Element): Paragraph; removeFromParent(): Paragraph; + removePositionedImage(id: string): boolean; replaceText(searchPattern: string, replacement: string): Element; setAlignment(alignment: HorizontalAlignment): Paragraph; setAttributes(attributes: Object): Paragraph; @@ -1059,6 +1078,54 @@ declare namespace GoogleAppsScript { insertText(text: string): Text; } + /** + * Fixed position image anchored to a Paragraph. + * Unlike an InlineImage, + * a PositionedImage is not an + * Element. + * It does not have a parent or sibling + * Element. + * Instead, it is anchored to a Paragraph + * or ListItem, + * and is placed via offsets from that anchor. A PositionedImage + * has an ID that can be used to reference it. + * + * var body = DocumentApp.getActiveDocument().getBody(); + * + * // Append a new paragraph. + * var paragraph = body.appendParagraph("New paragraph to anchor the image to."); + * + * // Get an image in Drive from its ID. + * var image = DriveApp.getFileById('ENTER_IMAGE_FILE_ID_HERE').getBlob(); + * + * // Add the PositionedImage with offsets (in points). + * var posImage = paragraph.addPositionedImage(image) + * .setTopOffset(60) + * .setLeftOffset(40); + */ + export interface PositionedImage { + getAs(contentType: string): Base.Blob; + getBlob(): Base.Blob; + getHeight(): Integer; + getId(): string; + getLayout(): PositionedLayout; + getLeftOffset(): Number; + getParagraph(): Paragraph; + getTopOffset(): Number; + getWidth(): Integer; + setHeight(height: Integer): PositionedImage; + setLayout(layout: PositionedLayout): PositionedImage; + setLeftOffset(offset: Number): PositionedImage; + setTopOffset(offset: Number): PositionedImage; + setWidth(width: Integer): PositionedImage; + } + + /** + * An enumeration that specifies how to lay out a PositionedImage in + * relation to surrounding text. + */ + export enum PositionedLayout { ABOVE_TEXT, BREAK_BOTH, BREAK_LEFT, BREAK_RIGHT, WRAP_TEXT } + /** * A range of elements in a document. The user's selection is represented as a * Range, among other uses. Scripts can only access the selection of the user who is running @@ -1215,6 +1282,7 @@ declare namespace GoogleAppsScript { getBackgroundColor(): string; getChild(childIndex: Integer): Element; getChildIndex(child: Element): Integer; + getColSpan(): Integer; getLinkUrl(): string; getNextSibling(): Element; getNumChildren(): Integer; @@ -1226,6 +1294,7 @@ declare namespace GoogleAppsScript { getParentRow(): TableRow; getParentTable(): Table; getPreviousSibling(): Element; + getRowSpan(): Integer; getText(): string; getTextAlignment(): TextAlignment; getType(): ElementType; diff --git a/types/google-apps-script/google-apps-script.drive.d.ts b/types/google-apps-script/google-apps-script.drive.d.ts index d0fba208f8..36693eaf9f 100644 --- a/types/google-apps-script/google-apps-script.drive.d.ts +++ b/types/google-apps-script/google-apps-script.drive.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Drive { @@ -14,8 +14,7 @@ declare namespace GoogleAppsScript { * DriveApp.Access. * * // Creates a folder that anyone on the Internet can read from and write to. (Domain - * // administrators can prohibit this setting for users of Google Apps for Business, Google Apps - * // for Education, or Google Apps for Your Domain.) + * // administrators can prohibit this setting for users of a G Suite domain.) * var folder = DriveApp.createFolder('Shared Folder'); * folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT); */ @@ -32,8 +31,8 @@ declare namespace GoogleAppsScript { * } */ export interface DriveApp { - Access: Access - Permission: Permission + Access: typeof Access; + Permission: typeof Permission; addFile(child: File): Folder; addFolder(child: Folder): Folder; continueFileIterator(continuationToken: string): FileIterator; @@ -234,12 +233,11 @@ declare namespace GoogleAppsScript { * DriveApp.Permission. * * // Creates a folder that anyone on the Internet can read from and write to. (Domain - * // administrators can prohibit this setting for users of Google Apps for Business, Google Apps - * // for Education, or Google Apps for Your Domain.) + * // administrators can prohibit this setting for users of a G Suite domain.) * var folder = DriveApp.createFolder('Shared Folder'); * folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT); */ - export enum Permission { VIEW, EDIT, COMMENT, OWNER, NONE } + export enum Permission { VIEW, EDIT, COMMENT, OWNER, ORGANIZER, NONE } /** * A user associated with a file in Google Drive. Users can be accessed from diff --git a/types/google-apps-script/google-apps-script.forms.d.ts b/types/google-apps-script/google-apps-script.forms.d.ts index 3ce3e41672..e10c47b169 100644 --- a/types/google-apps-script/google-apps-script.forms.d.ts +++ b/types/google-apps-script/google-apps-script.forms.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Forms { @@ -22,8 +22,9 @@ declare namespace GoogleAppsScript { export enum Alignment { LEFT, CENTER, RIGHT } /** - * A question item that allows the respondent to select one or more checkboxes, as well as an - * optional "other" field. Items can be accessed or created from a Form. + * A question item that allows the respondent to select one or more checkboxes, as well + * as an optional "other" field. Items can be accessed or created from a Form. When used in + * a quiz, these items are autograded. * * // Open a form by ID and add a new checkbox item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -37,25 +38,81 @@ declare namespace GoogleAppsScript { * .showOtherOption(true); */ export interface CheckboxItem { + clearValidation(): CheckboxItem; createChoice(value: string): Choice; + createChoice(value: string, isCorrect: boolean): Choice; createResponse(responses: String[]): ItemResponse; duplicate(): CheckboxItem; getChoices(): Choice[]; + getFeedbackForCorrect(): QuizFeedback; + getFeedbackForIncorrect(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; + getPoints(): Integer; getTitle(): string; getType(): ItemType; hasOtherOption(): boolean; isRequired(): boolean; setChoiceValues(values: String[]): CheckboxItem; setChoices(choices: Choice[]): CheckboxItem; + setFeedbackForCorrect(feedback: QuizFeedback): CheckboxItem; + setFeedbackForIncorrect(feedback: QuizFeedback): CheckboxItem; setHelpText(text: string): CheckboxItem; + setPoints(points: Integer): CheckboxItem; setRequired(enabled: boolean): CheckboxItem; setTitle(title: string): CheckboxItem; + setValidation(validation: CheckboxValidation): CheckboxItem; showOtherOption(enabled: boolean): CheckboxItem; } + /** + * A DataValidation for a CheckboxItem. + * + * // Add a checkBox item to a form and require exactly two selections. + * var checkBoxItem = form.addCheckboxItem(); + * checkBoxItem.setTitle('What two condiments would you like on your hot dog?'); + * checkBoxItem.setChoices([ + * checkBoxItem.createChoice('Ketchup'), + * checkBoxItem.createChoice('Mustard'), + * checkBoxItem.createChoice('Relish') + * ]); + * var checkBoxValidation = FormApp.createCheckboxValidation() + * .setHelpText(“Select two condiments.”) + * .requireSelectExactly(2) + * .build(); + * checkBoxItem.setValidation(checkBoxValidation); + */ + export interface CheckboxValidation { + getHelpText(): string; + } + + /** + * A DataValidationBuilder for a CheckboxValidation. + * + * // Add a checkBox item to a form and require exactly two selections. + * var checkBoxItem = form.addCheckboxItem(); + * checkBoxItem.setTitle('What two condiments would you like on your hot dog?'); + * checkBoxItem.setChoices([ + * checkBoxItem.createChoice('Ketchup'), + * checkBoxItem.createChoice('Mustard'), + * checkBoxItem.createChoice('Relish') + * ]); + * var checkBoxValidation = FormApp.createCheckboxValidation() + * .setHelpText(“Select two condiments.”) + * .requireSelectExactly(2) + * .build(); + * checkBoxItem.setValidation(checkBoxValidation); + */ + export interface CheckboxValidationBuilder { + build(): CheckboxValidation; + copy(): CheckboxValidationBuilder; + requireSelectAtLeast(number: Integer): CheckboxValidationBuilder; + requireSelectAtMost(number: Integer): CheckboxValidationBuilder; + requireSelectExactly(number: Integer): CheckboxValidationBuilder; + setHelpText(text: string): CheckboxValidationBuilder; + } + /** * A single choice associated with a type of Item that supports choices, like * CheckboxItem, ListItem, or MultipleChoiceItem. @@ -84,11 +141,45 @@ declare namespace GoogleAppsScript { getGotoPage(): PageBreakItem; getPageNavigationType(): PageNavigationType; getValue(): string; + isCorrectAnswer(): boolean; } /** - * A question item that allows the respondent to indicate a date. Items can be accessed or created - * from a Form. + * The base DataValidation that contains properties common to all validations, such as help text. + * Validations can be added to certain Form items. + * + * // Add a text item to a form and require it to be a number within a range. + * var textItem = form.addTextItem().setTitle('Pick a number between 1 and 100?'); + * var textValidation = FormApp.createTextValidation() + * .setHelpText(“Input was not a number between 1 and 100.”) + * .requireNumberBetween(1, 100); + * textItem.setValidation(textValidation); + */ + export interface DataValidation { + getHelpText(): string; + } + + /** + * The base DataValidationBuilder that contains setters for properties common to all validations, + * such as help text. Used to build DataValadation objects. + * + * // Add a text item to a form and require it to be a number within a range. + * var textItem = form.addTextItem().setTitle('Pick a number between 1 and 100?'); + * var textValidation = FormApp.createTextValidation() + * .setHelpText(“Input was not a number between 1 and 100.”) + * .requireNumberBetween(1, 100) + * .build(); + * textItem.setValidation(textValidation); + */ + export interface DataValidationBuilder { + build(): DataValidation; + copy(): DataValidationBuilder; + setHelpText(text: string): DataValidationBuilder; + } + + /** + * A question item that allows the respondent to indicate a date. Items can be accessed or + * created from a Form. When used in a quiz, these items are graded. * * // Open a form by ID and add a new date item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -98,22 +189,26 @@ declare namespace GoogleAppsScript { export interface DateItem { createResponse(response: Date): ItemResponse; duplicate(): DateItem; + getGeneralFeedback(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; + getPoints(): Integer; getTitle(): string; getType(): ItemType; includesYear(): boolean; isRequired(): boolean; + setGeneralFeedback(feedback: QuizFeedback): DateItem; setHelpText(text: string): DateItem; setIncludesYear(enableYear: boolean): DateItem; + setPoints(points: Integer): DateItem; setRequired(enabled: boolean): DateItem; setTitle(title: string): DateItem; } /** - * A question item that allows the respondent to indicate a date and time. Items can be accessed or - * created from a Form. + * A question item that allows the respondent to indicate a date and time. Items can be + * accessed or created from a Form. When used in a quiz, these items are graded. * * // Open a form by ID and add a new date-time item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -123,15 +218,19 @@ declare namespace GoogleAppsScript { export interface DateTimeItem { createResponse(response: Date): ItemResponse; duplicate(): DateTimeItem; + getGeneralFeedback(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; + getPoints(): Integer; getTitle(): string; getType(): ItemType; includesYear(): boolean; isRequired(): boolean; + setGeneralFeedback(feedback: QuizFeedback): DateTimeItem; setHelpText(text: string): DateTimeItem; setIncludesYear(enableYear: boolean): DateTimeItem; + setPoints(points: Integer): DateTimeItem; setRequired(enabled: boolean): DateTimeItem; setTitle(title: string): DateTimeItem; } @@ -153,8 +252,8 @@ declare namespace GoogleAppsScript { export enum DestinationType { SPREADSHEET } /** - * A question item that allows the respondent to indicate a length of time. Items can be accessed or - * created from a Form. + * A question item that allows the respondent to indicate a length of time. Items can be + * accessed or created from a Form. When used in a quiz, these items are graded. * * // Open a form by ID and add a new duration item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -164,21 +263,44 @@ declare namespace GoogleAppsScript { export interface DurationItem { createResponse(hours: Integer, minutes: Integer, seconds: Integer): ItemResponse; duplicate(): DurationItem; + getGeneralFeedback(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; + getPoints(): Integer; getTitle(): string; getType(): ItemType; isRequired(): boolean; + setGeneralFeedback(feedback: QuizFeedback): DurationItem; setHelpText(text: string): DurationItem; + setPoints(points: Integer): DurationItem; setRequired(enabled: boolean): DurationItem; setTitle(title: string): DurationItem; } /** - * A form that contains overall properties (such as title, settings, and where responses are stored) - * and items (which includes question items like checkboxes and layout items like page breaks). - * Forms can be accessed or created from FormApp. + * An enum representing the supported types of feedback. Feedback types can be accessed from + * FormApp.FeedbackType. + * + * // Open a form by ID and add a new list item. + * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); + * var item = form.addListItem(); + * item.setTitle('Do you prefer cats or dogs?'); + * // Set "Dogs" as the correct answer to this question. + * item.setChoices([ + * item.createChoice('Dogs', true), + * item.createChoice('Cats', false)]); + * // Add feedback which will be shown for correct responses; ie "Dogs". + * item.setFeedbackForCorrect( + * FormApp.createFeedback().setDisplayText("Dogs rule, cats drool.").build()); + */ + export enum FeedbackType { CORRECT, INCORRECT, GENERAL } + + /** + * A form that contains overall properties and items. Properties include title, settings, and + * where responses are stored. Items include question items like checkboxes or radio items, while + * layout items refer to things like page breaks. Forms can be accessed or created from + * FormApp. * * // Open a form by ID and create a new spreadsheet. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -242,6 +364,7 @@ declare namespace GoogleAppsScript { hasRespondAgainLink(): boolean; isAcceptingResponses(): boolean; isPublishingSummary(): boolean; + isQuiz(): boolean; moveItem(from: Integer, to: Integer): Item; moveItem(item: Item, toIndex: Integer): Item; removeDestination(): Form; @@ -255,6 +378,7 @@ declare namespace GoogleAppsScript { setCustomClosedFormMessage(message: string): Form; setDescription(description: string): Form; setDestination(type: DestinationType, id: string): Form; + setIsQuiz(enabled: boolean): Form; setLimitOneResponsePerUser(enabled: boolean): Form; setProgressBar(enabled: boolean): Form; setPublishingSummary(enabled: boolean): Form; @@ -263,10 +387,11 @@ declare namespace GoogleAppsScript { setShuffleQuestions(shuffle: boolean): Form; setTitle(title: string): Form; shortenFormUrl(url: string): string; + submitGrades(responses: FormResponse[]): Form; } /** - * Allows a script to open existing Forms or create new ones. + * Allows a script to open an existing Form or create a new one. * * // Open a form by ID. * var existingForm = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -275,11 +400,17 @@ declare namespace GoogleAppsScript { * var newForm = FormApp.create('Form Name'); */ export interface FormApp { - Alignment: Alignment - DestinationType: DestinationType - ItemType: ItemType - PageNavigationType: PageNavigationType + Alignment: typeof Alignment; + DestinationType: typeof DestinationType; + FeedbackType: typeof FeedbackType; + ItemType: typeof ItemType; + PageNavigationType: typeof PageNavigationType; create(title: string): Form; + createCheckboxValidation(): CheckboxValidationBuilder; + createFeedback(): QuizFeedbackBuilder; + createGridValidation(): GridValidationBuilder; + createParagraphTextValidation(): ParagraphTextValidationBuilder; + createTextValidation(): TextValidationBuilder; getActiveForm(): Form; getUi(): Base.Ui; openById(id: string): Form; @@ -287,11 +418,11 @@ declare namespace GoogleAppsScript { } /** - * A response to the form as a whole. Form responses have three main uses: they contain the answers - * submitted by a respondent (see getItemResponses(), they can be used to programmatically - * respond to the form (see withItemResponse(response) and submit()), and they - * can be used as a template to create a URL for the form with pre-filled answers. Form responses - * can be created or accessed from a Form. + * A response to the form as a whole. A FormResponse can be used in three ways: to + * access the answers submitted by a respondent (see getItemResponses()), to + * programmatically submit a response to the form (see withItemResponse(response) and + * submit()), and to generate a URL for the form which pre-fills fields using the + * provided answers. FormResponses can be created or accessed from a Form. * * // Open a form by ID and log the responses to each question. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -310,6 +441,8 @@ declare namespace GoogleAppsScript { */ export interface FormResponse { getEditResponseUrl(): string; + getGradableItemResponses(): ItemResponse[]; + getGradableResponseForItem(item: Item): ItemResponse; getId(): string; getItemResponses(): ItemResponse[]; getRespondentEmail(): string; @@ -317,13 +450,14 @@ declare namespace GoogleAppsScript { getTimestamp(): Date; submit(): FormResponse; toPrefilledUrl(): string; + withItemGrade(gradedResponse: ItemResponse): FormResponse; withItemResponse(response: ItemResponse): FormResponse; } /** * A question item, presented as a grid of columns and rows, that allows the respondent to select * one choice per row from a sequence of radio buttons. Items can be accessed or created from a - * Form. + * Form. * * // Open a form by ID and add a new grid item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -333,6 +467,7 @@ declare namespace GoogleAppsScript { * .setColumns(['Boring', 'So-so', 'Interesting']); */ export interface GridItem { + clearValidation(): GridItem; createResponse(responses: String[]): ItemResponse; duplicate(): GridItem; getColumns(): String[]; @@ -348,6 +483,46 @@ declare namespace GoogleAppsScript { setRequired(enabled: boolean): GridItem; setRows(rows: String[]): GridItem; setTitle(title: string): GridItem; + setValidation(validation: GridValidation): GridItem; + } + + /** + * A DataValidation for a GridItem. + * + * // Add a grid item to a form and require one response per column. + * var gridItem = form.addGridItem(); + * gridItem.setTitle('Rate your interests') + * .setRows(['Cars', 'Computers', 'Celebrities']) + * .setColumns(['Boring', 'So-so', 'Interesting']); + * var gridValidation = FormApp.createGridValidation() + * .setHelpText(“Select one item per column.”) + * .requireLimitOneResponsePerColumn() + * .build(); + * gridItem.setValidation(gridValidation); + */ + export interface GridValidation { + getHelpText(): string; + } + + /** + * A DataValidationBuilder for a GridValidation. + * + * // Add a grid item to a form and require one response per column. + * var gridItem = form.addGridItem(); + * gridItem.setTitle('Rate your interests') + * .setRows(['Cars', 'Computers', 'Celebrities']) + * .setColumns(['Boring', 'So-so', 'Interesting']); + * var gridValidation = FormApp.createGridValidation() + * .setHelpText(“Select one item per column.”) + * .requireLimitOneResponsePerColumn() + * .build(); + * gridItem.setValidation(gridValidation); + */ + export interface GridValidationBuilder { + build(): GridValidation; + copy(): GridValidationBuilder; + requireLimitOneResponsePerColumn(): GridValidationBuilder; + setHelpText(text: string): GridValidationBuilder; } /** @@ -447,8 +622,12 @@ declare namespace GoogleAppsScript { * } */ export interface ItemResponse { + getFeedback(): Object; getItem(): Item; getResponse(): Object; + getScore(): Object; + setFeedback(feedback: Object): ItemResponse; + setScore(score: Object): ItemResponse; } /** @@ -482,27 +661,35 @@ declare namespace GoogleAppsScript { */ export interface ListItem { createChoice(value: string): Choice; + createChoice(value: string, isCorrect: boolean): Choice; createChoice(value: string, navigationItem: PageBreakItem): Choice; createChoice(value: string, navigationType: PageNavigationType): Choice; createResponse(response: string): ItemResponse; duplicate(): ListItem; getChoices(): Choice[]; + getFeedbackForCorrect(): QuizFeedback; + getFeedbackForIncorrect(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; + getPoints(): Integer; getTitle(): string; getType(): ItemType; isRequired(): boolean; setChoiceValues(values: String[]): ListItem; setChoices(choices: Choice[]): ListItem; + setFeedbackForCorrect(feedback: QuizFeedback): ListItem; + setFeedbackForIncorrect(feedback: QuizFeedback): ListItem; setHelpText(text: string): ListItem; + setPoints(points: Integer): ListItem; setRequired(enabled: boolean): ListItem; setTitle(title: string): ListItem; } /** - * A question item that allows the respondent to select one choice from a list of radio buttons or - * an optional "other" field. Items can be accessed or created from a Form. + * A question item that allows the respondent to select one choice from a list of radio + * buttons or an optional "other" field. Items can be accessed or created from a Form. + * When used in a quiz, these items are autograded. * * // Open a form by ID and add a new multiple choice item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -516,21 +703,28 @@ declare namespace GoogleAppsScript { */ export interface MultipleChoiceItem { createChoice(value: string): Choice; + createChoice(value: string, isCorrect: boolean): Choice; createChoice(value: string, navigationItem: PageBreakItem): Choice; createChoice(value: string, navigationType: PageNavigationType): Choice; createResponse(response: string): ItemResponse; duplicate(): MultipleChoiceItem; getChoices(): Choice[]; + getFeedbackForCorrect(): QuizFeedback; + getFeedbackForIncorrect(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; + getPoints(): Integer; getTitle(): string; getType(): ItemType; hasOtherOption(): boolean; isRequired(): boolean; setChoiceValues(values: String[]): MultipleChoiceItem; setChoices(choices: Choice[]): MultipleChoiceItem; + setFeedbackForCorrect(feedback: QuizFeedback): MultipleChoiceItem; + setFeedbackForIncorrect(feedback: QuizFeedback): MultipleChoiceItem; setHelpText(text: string): MultipleChoiceItem; + setPoints(points: Integer): MultipleChoiceItem; setRequired(enabled: boolean): MultipleChoiceItem; setTitle(title: string): MultipleChoiceItem; showOtherOption(enabled: boolean): MultipleChoiceItem; @@ -593,8 +787,8 @@ declare namespace GoogleAppsScript { export enum PageNavigationType { CONTINUE, GO_TO_PAGE, RESTART, SUBMIT } /** - * A question item that allows the respondent to enter a block of text. Items can be accessed or - * created from a Form. + * A question item that allows the respondent to enter a block of text. Items can be + * accessed or created from a Form. When used in a quiz, these items are graded. * * // Open a form by ID and add a new paragraph text item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -602,22 +796,107 @@ declare namespace GoogleAppsScript { * item.setTitle('What is your address?'); */ export interface ParagraphTextItem { + clearValidation(): ParagraphTextItem; createResponse(response: string): ItemResponse; duplicate(): ParagraphTextItem; + getGeneralFeedback(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; + getPoints(): Integer; getTitle(): string; getType(): ItemType; isRequired(): boolean; + setGeneralFeedback(feedback: QuizFeedback): ParagraphTextItem; setHelpText(text: string): ParagraphTextItem; + setPoints(points: Integer): ParagraphTextItem; setRequired(enabled: boolean): ParagraphTextItem; setTitle(title: string): ParagraphTextItem; + setValidation(validation: ParagraphTextValidation): ParagraphTextItem; } /** - * A question item that allows the respondent to choose one option from a numbered sequence of radio - * buttons. Items can be accessed or created from a Form. + * A DataValidation for a ParagraphTextItem. + * + * // Add a paragraph text item to a form and require the answer to be at least 100 characters. + * var paragraphTextItem = form.addParagraphTextItem().setTitle('Describe yourself:'); + * var paragraphtextValidation = FormApp.createParagraphTextValidation() + * .setHelpText(“Answer must be more than 100 characters.”) + * .requireTextLengthGreatherThan(100); + * paragraphTextItem.setValidation(paragraphtextValidation); + */ + export interface ParagraphTextValidation { + getHelpText(): string; + } + + /** + * A DataValidationBuilder for a ParagraphTextValidation. + * + * // Add a paragraph text item to a form and require the answer to be at least 100 characters. + * var paragraphTextItem = form.addParagraphTextItem().setTitle('Describe yourself:'); + * var paragraphtextValidation = FormApp.createParagraphTextValidation() + * .setHelpText(“Answer must be more than 100 characters.”) + * .requireTextLengthGreatherThan(100); + * paragraphTextItem.setValidation(paragraphtextValidation); + */ + export interface ParagraphTextValidationBuilder { + build(): ParagraphTextValidation; + copy(): ParagraphTextValidationBuilder; + requireTextContainsPattern(pattern: string): ParagraphTextValidationBuilder; + requireTextDoesNotContainPattern(pattern: string): ParagraphTextValidationBuilder; + requireTextDoesNotMatchPattern(pattern: string): ParagraphTextValidationBuilder; + requireTextLengthGreaterThanOrEqualTo(number: Integer): ParagraphTextValidationBuilder; + requireTextLengthLessThanOrEqualTo(number: Integer): ParagraphTextValidationBuilder; + requireTextMatchesPattern(pattern: string): ParagraphTextValidationBuilder; + setHelpText(text: string): ParagraphTextValidationBuilder; + } + + /** + * The bean implementation of a Feedback, which contains properties common to all feedback, such as + * display text or links. + * + * Feedback can be added to gradeable Form items. + * + * // Setting feedback which should be automatically shown when a user responds to a question + * // incorrectly. + * var textItem = form.addTextItem().setTitle('Re-hydrating dried fruit is an example of what?'); + * var feedback = FormApp.createFeedback() + * .setDisplayText( + * “Good answer, but not quite right. Please review chapter 4 before next time.”) + * .addLink("http://wikipedia.com/osmosis"); + * textItem.setFeedbackForIncorrect(feedback); + */ + export interface QuizFeedback { + getLinkUrls(): String[]; + getText(): string; + } + + /** + * The base FeedbackBuilder that contains setters for properties common to all feedback, + * such as display text. Used to build Feedback objects. + * + * // Open a form by ID and add a new list item. + * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); + * var item = form.addListItem(); + * item.setTitle('Do you prefer cats or dogs?'); + * item.setChoices([ + * item.createChoice('Dogs', true), + * item.createChoice('Cats', false)]); + * // Add feedback which will be shown for correct responses; ie "Dogs". + * item.setFeedbackForCorrect(FormApp.createFeedback().setText("Dogs rule, cats drool.").build()); + */ + export interface QuizFeedbackBuilder { + addLink(url: string): QuizFeedbackBuilder; + addLink(url: string, displayText: string): QuizFeedbackBuilder; + build(): QuizFeedback; + copy(): QuizFeedbackBuilder; + setText(text: string): QuizFeedbackBuilder; + } + + /** + * A question item that allows the respondent to choose one option from a numbered sequence + * of radio buttons. Items can be accessed or created from a Form. When used in a quiz, + * these items are graded. * * // Open a form by ID and add a new scale item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -628,19 +907,23 @@ declare namespace GoogleAppsScript { export interface ScaleItem { createResponse(response: Integer): ItemResponse; duplicate(): ScaleItem; + getGeneralFeedback(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; getLeftLabel(): string; getLowerBound(): Integer; + getPoints(): Integer; getRightLabel(): string; getTitle(): string; getType(): ItemType; getUpperBound(): Integer; isRequired(): boolean; setBounds(lower: Integer, upper: Integer): ScaleItem; + setGeneralFeedback(feedback: QuizFeedback): ScaleItem; setHelpText(text: string): ScaleItem; setLabels(lower: string, upper: string): ScaleItem; + setPoints(points: Integer): ScaleItem; setRequired(enabled: boolean): ScaleItem; setTitle(title: string): ScaleItem; } @@ -666,8 +949,8 @@ declare namespace GoogleAppsScript { } /** - * A question item that allows the respondent to enter a single line of text. Items can be accessed - * or created from a Form. + * A question item that allows the respondent to enter a single line of text. Items can be + * accessed or created from a Form. When used in a quiz, these items are graded. * * // Open a form by ID and add a new text item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -675,22 +958,77 @@ declare namespace GoogleAppsScript { * item.setTitle('What is your name?'); */ export interface TextItem { + clearValidation(): TextItem; createResponse(response: string): ItemResponse; duplicate(): TextItem; + getGeneralFeedback(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; + getPoints(): Integer; getTitle(): string; getType(): ItemType; isRequired(): boolean; + setGeneralFeedback(feedback: QuizFeedback): TextItem; setHelpText(text: string): TextItem; + setPoints(points: Integer): TextItem; setRequired(enabled: boolean): TextItem; setTitle(title: string): TextItem; + setValidation(validation: TextValidation): TextItem; } /** - * A question item that allows the respondent to indicate a time of day. Items can be accessed or - * created from a Form. + * A DataValidation for a TextItem. + * + * // Add a text item to a form and require it to be a number within a range. + * var textItem = form.addTextItem().setTitle('Pick a number between 1 and 100?'); + * var textValidation = FormApp.createTextValidation() + * .setHelpText(“Input was not a number between 1 and 100.”) + * .requireNumberBetween(1, 100) + * .build(); + * textItem.setValidation(textValidation); + */ + export interface TextValidation { + getHelpText(): string; + } + + /** + * A DataValidationBuilder for a TextValidation. + * + * // Add a text item to a form and require it to be a number within a range. + * var textItem = form.addTextItem().setTitle('Pick a number between 1 and 100?'); + * var textValidation = FormApp.createTextValidation() + * .setHelpText(“Input was not a number between 1 and 100.”) + * .requireNumberBetween(1, 100); + * textItem.setValidation(textValidation); + */ + export interface TextValidationBuilder { + build(): TextValidation; + copy(): TextValidationBuilder; + requireNumber(): TextValidationBuilder; + requireNumberBetween(start: Number, end: Number): TextValidationBuilder; + requireNumberEqualTo(number: Number): TextValidationBuilder; + requireNumberGreaterThan(number: Number): TextValidationBuilder; + requireNumberGreaterThanOrEqualTo(number: Number): TextValidationBuilder; + requireNumberLessThan(number: Number): TextValidationBuilder; + requireNumberLessThanOrEqualTo(number: Number): TextValidationBuilder; + requireNumberNotBetween(start: Number, end: Number): TextValidationBuilder; + requireNumberNotEqualTo(number: Number): TextValidationBuilder; + requireTextContainsPattern(pattern: string): TextValidationBuilder; + requireTextDoesNotContainPattern(pattern: string): TextValidationBuilder; + requireTextDoesNotMatchPattern(pattern: string): TextValidationBuilder; + requireTextIsEmail(): TextValidationBuilder; + requireTextIsUrl(): TextValidationBuilder; + requireTextLengthGreaterThanOrEqualTo(number: Integer): TextValidationBuilder; + requireTextLengthLessThanOrEqualTo(number: Integer): TextValidationBuilder; + requireTextMatchesPattern(pattern: string): TextValidationBuilder; + requireWholeNumber(): TextValidationBuilder; + setHelpText(text: string): TextValidationBuilder; + } + + /** + * A question item that allows the respondent to indicate a time of day. Items can be + * accessed or created from a Form. When used in a quiz, these items are graded. * * // Open a form by ID and add a new time item. * var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); @@ -700,13 +1038,17 @@ declare namespace GoogleAppsScript { export interface TimeItem { createResponse(hour: Integer, minute: Integer): ItemResponse; duplicate(): TimeItem; + getGeneralFeedback(): QuizFeedback; getHelpText(): string; getId(): Integer; getIndex(): Integer; + getPoints(): Integer; getTitle(): string; getType(): ItemType; isRequired(): boolean; + setGeneralFeedback(feedback: QuizFeedback): TimeItem; setHelpText(text: string): TimeItem; + setPoints(points: Integer): TimeItem; setRequired(enabled: boolean): TimeItem; setTitle(title: string): TimeItem; } diff --git a/types/google-apps-script/google-apps-script.gmail.d.ts b/types/google-apps-script/google-apps-script.gmail.d.ts index d76f0f1895..fd0bda2b13 100644 --- a/types/google-apps-script/google-apps-script.gmail.d.ts +++ b/types/google-apps-script/google-apps-script.gmail.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Gmail { diff --git a/types/google-apps-script/google-apps-script.groups.d.ts b/types/google-apps-script/google-apps-script.groups.d.ts index dfcf7d79a5..e6833bb840 100644 --- a/types/google-apps-script/google-apps-script.groups.d.ts +++ b/types/google-apps-script/google-apps-script.groups.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Groups { @@ -46,7 +46,7 @@ declare namespace GoogleAppsScript { * Logger.log('You belong to ' + groups.length + ' groups.'); */ export interface GroupsApp { - Role: Role + Role: typeof Role; getGroupByEmail(email: string): Group; getGroups(): Group[]; } diff --git a/types/google-apps-script/google-apps-script.html.d.ts b/types/google-apps-script/google-apps-script.html.d.ts index 3b62ffcb08..f471d23eb3 100644 --- a/types/google-apps-script/google-apps-script.html.d.ts +++ b/types/google-apps-script/google-apps-script.html.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module HTML { @@ -22,6 +22,7 @@ declare namespace GoogleAppsScript { * guide to restrictions in HTML service */ export interface HtmlOutput { + addMetaTag(name: string, content: string): HtmlOutput; append(addedContent: string): HtmlOutput; appendUntrusted(addedContent: string): HtmlOutput; asTemplate(): HtmlTemplate; @@ -29,14 +30,33 @@ declare namespace GoogleAppsScript { getAs(contentType: string): Base.Blob; getBlob(): Base.Blob; getContent(): string; + getFaviconUrl(): string; getHeight(): Integer; + getMetaTags(): HtmlOutputMetaTag[]; getTitle(): string; getWidth(): Integer; setContent(content: string): HtmlOutput; + setFaviconUrl(iconUrl: string): HtmlOutput; setHeight(height: Integer): HtmlOutput; setSandboxMode(mode: SandboxMode): HtmlOutput; setTitle(title: string): HtmlOutput; setWidth(width: Integer): HtmlOutput; + setXFrameOptionsMode(mode: XFrameOptionsMode): HtmlOutput; + } + + /** + * An object that represents a meta tag added to the page by calling + * HtmlOutput.addMetaTag(name, content). + * + * var output = HtmlService.createHtmlOutput('Hello, world!'); + * output.addMetaTag('viewport', 'width=device-width, initial-scale=1'); + * + * var tags = output.getMetaTags(); + * Logger.log('', tags[0].getName(), tags[0].getContent()); + */ + export interface HtmlOutputMetaTag { + getContent(): string; + getName(): string; } /** @@ -47,7 +67,8 @@ declare namespace GoogleAppsScript { * HtmlOutput for what limitations this implies on what can be returned. */ export interface HtmlService { - SandboxMode: SandboxMode + SandboxMode: typeof SandboxMode; + XFrameOptionsMode: typeof XFrameOptionsMode; createHtmlOutput(): HtmlOutput; createHtmlOutput(blob: Base.BlobSource): HtmlOutput; createHtmlOutput(html: string): HtmlOutput; @@ -74,24 +95,17 @@ declare namespace GoogleAppsScript { * scripts. These values can be accessed from HtmlService.SandboxMode, and set by calling * HtmlOutput.setSandboxMode(mode). * + * The NATIVE and EMULATED modes were + * deprecated on October 13, 2015 and both are + * now sunset. + * Only IFRAME mode is now supported. * To protect users from being served malicious HTML or JavaScript, client-side code served from * HTML service executes in a security sandbox that imposes restrictions on the code. The method - * HtmlOutput.setSandboxMode(mode) allows script authors to choose between - * different versions of the sandbox. For more information, see the + * HtmlOutput.setSandboxMode(mode) previously allowed script authors to choose + * between different versions of the sandbox, but now has no effect. For more information, see the * guide to restrictions in HTML service. - * If a script does not set a sandbox mode, Apps Script uses NATIVE mode as the default. - * Prior to February 2014, the default was EMULATED. The default is subject to change. * The IFRAME mode imposes many fewer restrictions than the other sandbox modes and runs - * fastest, but does not work at all in certain older browsers, including Internet Explorer 9. By - * contrast, EMULATED mode is more likely to work in - * older browsers that do not support ECMAScript 5 strict - * mode, most notably Internet Explorer 9. NATIVE mode is the middle ground. If - * NATIVE mode is set but not supported in the user's browser, the sandbox mode falls back - * to EMULATED mode for that user. - * - * // Serve HTML with a defined sandbox mode (in Apps Script server-side code). - * var output = HtmlService.createHtmlOutput('Hello, world!'); - * output.setSandboxMode(HtmlService.SandboxMode.IFRAME); + * fastest, but does not work at all in certain older browsers, including Internet Explorer 9. * * google.script.sandbox.mode * @@ -102,6 +116,23 @@ declare namespace GoogleAppsScript { */ export enum SandboxMode { EMULATED, IFRAME, NATIVE } + /** + * An enum representing the X-Frame-Options modes that can be used for client-side + * HtmlService scripts. These values can be accessed from + * HtmlService.XFrameOptionsMode, and set by calling + * HtmlOutput.setXFrameOptionsMode(mode). + * + * Setting XFrameOptionsMode.ALLOWALL will let any site iframe the page, so the developer + * should implement their own protection against clickjacking. + * If a script does not set an X-Frame-Options mode, Apps Script uses DEFAULT + * mode as the default. + * + * // Serve HTML with no X-Frame-Options header (in Apps Script server-side code). + * var output = HtmlService.createHtmlOutput('Hello, world!'); + * output.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); + */ + export enum XFrameOptionsMode { ALLOWALL, DEFAULT } + } } diff --git a/types/google-apps-script/google-apps-script.jdbc.d.ts b/types/google-apps-script/google-apps-script.jdbc.d.ts index 16950cff32..ff1a0baf13 100644 --- a/types/google-apps-script/google-apps-script.jdbc.d.ts +++ b/types/google-apps-script/google-apps-script.jdbc.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module JDBC { diff --git a/types/google-apps-script/google-apps-script.language.d.ts b/types/google-apps-script/google-apps-script.language.d.ts index c820f7620e..488568feec 100644 --- a/types/google-apps-script/google-apps-script.language.d.ts +++ b/types/google-apps-script/google-apps-script.language.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module Language { diff --git a/types/google-apps-script/google-apps-script.lock.d.ts b/types/google-apps-script/google-apps-script.lock.d.ts index 65891f2844..f255efbc14 100644 --- a/types/google-apps-script/google-apps-script.lock.d.ts +++ b/types/google-apps-script/google-apps-script.lock.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module Lock { diff --git a/types/google-apps-script/google-apps-script.mail.d.ts b/types/google-apps-script/google-apps-script.mail.d.ts index 11c97f80fa..2cb8b3cb5f 100644 --- a/types/google-apps-script/google-apps-script.mail.d.ts +++ b/types/google-apps-script/google-apps-script.mail.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module Mail { diff --git a/types/google-apps-script/google-apps-script.maps.d.ts b/types/google-apps-script/google-apps-script.maps.d.ts index 02e4ac0195..e9620ee144 100644 --- a/types/google-apps-script/google-apps-script.maps.d.ts +++ b/types/google-apps-script/google-apps-script.maps.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Maps { @@ -93,8 +93,8 @@ declare namespace GoogleAppsScript { * A collection of enums used by DirectionFinder. */ export interface DirectionFinderEnums { - Avoid: Avoid - Mode: Mode + Avoid: typeof Avoid; + Mode: typeof Mode; } /** @@ -200,8 +200,8 @@ declare namespace GoogleAppsScript { * images. */ export interface Maps { - DirectionFinder: DirectionFinderEnums - StaticMap: StaticMapEnums + DirectionFinder: DirectionFinderEnums; + StaticMap: StaticMapEnums; decodePolyline(polyline: string): Number[]; encodePolyline(points: Number[]): string; newDirectionFinder(): DirectionFinder; @@ -299,10 +299,10 @@ declare namespace GoogleAppsScript { * A collection of enums used by StaticMap. */ export interface StaticMapEnums { - Color: Color - Format: Format - MarkerSize: MarkerSize - Type: Type + Color: typeof Color; + Format: typeof Format; + MarkerSize: typeof MarkerSize; + Type: typeof Type; } /** diff --git a/types/google-apps-script/google-apps-script.optimization.d.ts b/types/google-apps-script/google-apps-script.optimization.d.ts index 0217618a25..8ac192c1e6 100644 --- a/types/google-apps-script/google-apps-script.optimization.d.ts +++ b/types/google-apps-script/google-apps-script.optimization.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module Optimization { @@ -86,6 +86,7 @@ declare namespace GoogleAppsScript { addConstraint(lowerBound: Number, upperBound: Number): LinearOptimizationConstraint; addVariable(name: string, lowerBound: Number, upperBound: Number): LinearOptimizationEngine; addVariable(name: string, lowerBound: Number, upperBound: Number, type: VariableType): LinearOptimizationEngine; + addVariable(name: string, lowerBound: Number, upperBound: Number, type: VariableType, objectiveCoefficient: Number): LinearOptimizationEngine; setMaximization(): LinearOptimizationEngine; setMinimization(): LinearOptimizationEngine; setObjectiveCoefficient(variableName: string, coefficient: Number): LinearOptimizationEngine; @@ -146,8 +147,8 @@ declare namespace GoogleAppsScript { * } */ export interface LinearOptimizationService { - Status: Status - VariableType: VariableType + Status: typeof Status; + VariableType: typeof VariableType; createEngine(): LinearOptimizationEngine; } diff --git a/types/google-apps-script/google-apps-script.properties.d.ts b/types/google-apps-script/google-apps-script.properties.d.ts index 9ceb24608e..5622fec6f8 100644 --- a/types/google-apps-script/google-apps-script.properties.d.ts +++ b/types/google-apps-script/google-apps-script.properties.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module Properties { diff --git a/types/google-apps-script/google-apps-script.script.d.ts b/types/google-apps-script/google-apps-script.script.d.ts index bd1a5340d9..209feaa0a1 100644 --- a/types/google-apps-script/google-apps-script.script.d.ts +++ b/types/google-apps-script/google-apps-script.script.d.ts @@ -1,13 +1,13 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - - - - +/// +/// +/// +/// +/// declare namespace GoogleAppsScript { export module Script { @@ -118,18 +118,18 @@ declare namespace GoogleAppsScript { * triggers and control publishing the script as a service. */ export interface ScriptApp { - AuthMode: AuthMode - AuthorizationStatus: AuthorizationStatus - EventType: EventType - InstallationSource: InstallationSource - TriggerSource: TriggerSource - WeekDay: Base.Weekday + AuthMode: typeof AuthMode; + AuthorizationStatus: typeof AuthorizationStatus; + EventType: typeof EventType; + InstallationSource: typeof InstallationSource; + TriggerSource: typeof TriggerSource; + WeekDay: typeof Base.Weekday; deleteTrigger(trigger: Trigger): void; getAuthorizationInfo(authMode: AuthMode): AuthorizationInfo; getInstallationSource(): InstallationSource; getOAuthToken(): string; - getProjectKey(): string; getProjectTriggers(): Trigger[]; + getScriptId(): string; getService(): Service; getUserTriggers(document: Document.Document): Trigger[]; getUserTriggers(form: Forms.Form): Trigger[]; @@ -137,13 +137,27 @@ declare namespace GoogleAppsScript { invalidateAuth(): void; newStateToken(): StateTokenBuilder; newTrigger(functionName: string): TriggerBuilder; + getProjectKey(): string; getScriptTriggers(): Trigger[]; } + /** + * Access and manipulate script publishing. + */ + export interface Service { + Restriction: typeof Service.Restriction; + disable(): void; + getUrl(): string; + isEnabled(): boolean; + enable(restriction: Service.Restriction): void; + } + /** * */ - export enum Service { MYSELF, DOMAIN, ALL } + namespace Service { + export enum Restriction { MYSELF, DOMAIN, ALL } + } /** * Builder for spreadsheet triggers. diff --git a/types/google-apps-script/google-apps-script.sites.d.ts b/types/google-apps-script/google-apps-script.sites.d.ts index acf1f8d6dc..6b21ffe529 100644 --- a/types/google-apps-script/google-apps-script.sites.d.ts +++ b/types/google-apps-script/google-apps-script.sites.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Sites { @@ -12,6 +12,12 @@ declare namespace GoogleAppsScript { * A Sites Attachment such as a file attached to a page. * * Note that an Attachment is a Blob and can be used anywhere Blob input is expected. + * A + * rebuilt + * version of Sites was launched on November 22, 2016. Apps Script cannot currently access or + * modify Sites made with this version, but script can still access + * + * classic Sites. * * var filesPage = SitesApp.getSite('example.com', 'mysite').getChildByName("files"); * var attachments = filesPage.getAttachments(); @@ -42,11 +48,23 @@ declare namespace GoogleAppsScript { /** * A typesafe enum for sites attachment type. + * A + * rebuilt + * version of Sites was launched on November 22, 2016. Apps Script cannot currently access or + * modify Sites made with this version, but script can still access + * + * classic Sites. */ export enum AttachmentType { WEB, HOSTED } /** * A Sites Column - a column from a Sites List page. + * A + * rebuilt + * version of Sites was launched on November 22, 2016. Apps Script cannot currently access or + * modify Sites made with this version, but script can still access + * + * classic Sites. */ export interface Column { deleteColumn(): void; @@ -57,6 +75,12 @@ declare namespace GoogleAppsScript { /** * A Comment attached to any Sites page. + * A + * rebuilt + * version of Sites was launched on November 22, 2016. Apps Script cannot currently access or + * modify Sites made with this version, but script can still access + * + * classic Sites. */ export interface Comment { deleteComment(): void; @@ -72,6 +96,12 @@ declare namespace GoogleAppsScript { /** * A Sites ListItem - a list element from a Sites List page. + * A + * rebuilt + * version of Sites was launched on November 22, 2016. Apps Script cannot currently access or + * modify Sites made with this version, but script can still access + * + * classic Sites. */ export interface ListItem { deleteListItem(): void; @@ -87,6 +117,12 @@ declare namespace GoogleAppsScript { /** * A Page on a Google Site. + * A + * rebuilt + * version of Sites was launched on November 22, 2016. Apps Script cannot currently access or + * modify Sites made with this version, but script can still access + * + * classic Sites. */ export interface Page { addColumn(name: string): Column; @@ -113,8 +149,6 @@ declare namespace GoogleAppsScript { getChildren(): Page[]; getChildren(options: Object): Page[]; getColumns(): Column[]; - getComments(): Comment[]; - getComments(optOptions: Object): Comment[]; getDatePublished(): Date; getHtmlContent(): string; getIsDraft(): boolean; @@ -139,17 +173,31 @@ declare namespace GoogleAppsScript { setParent(parent: Page): Page; setTitle(title: string): Page; addComment(content: string): Comment; + getComments(): Comment[]; + getComments(optOptions: Object): Comment[]; getPageName(): string; getSelfLink(): string; } /** * A typesafe enum for sites page type. + * A + * rebuilt + * version of Sites was launched on November 22, 2016. Apps Script cannot currently access or + * modify Sites made with this version, but script can still access + * + * classic Sites. */ export enum PageType { WEB_PAGE, LIST_PAGE, ANNOUNCEMENT, ANNOUNCEMENTS_PAGE, FILE_CABINET_PAGE } /** * An object representing a Google Site. + * A + * rebuilt + * version of Sites was launched on November 22, 2016. Apps Script cannot currently access or + * modify Sites made with this version, but script can still access + * + * classic Sites. */ export interface Site { addEditor(emailAddress: string): Site; @@ -215,10 +263,16 @@ declare namespace GoogleAppsScript { /** * Create and access Google Sites. + * A + * rebuilt + * version of Sites was launched on November 22, 2016. Apps Script cannot currently access or + * modify Sites made with this version, but script can still access + * + * classic Sites. */ export interface SitesApp { - AttachmentType: AttachmentType - PageType: PageType + AttachmentType: typeof AttachmentType; + PageType: typeof PageType; copySite(domain: string, name: string, title: string, summary: string, site: Site): Site; createSite(domain: string, name: string, title: string, summary: string): Site; getActivePage(): Page; diff --git a/types/google-apps-script/google-apps-script.spreadsheet.d.ts b/types/google-apps-script/google-apps-script.spreadsheet.d.ts index a8f554e4bc..e710fcfb4a 100644 --- a/types/google-apps-script/google-apps-script.spreadsheet.d.ts +++ b/types/google-apps-script/google-apps-script.spreadsheet.d.ts @@ -1,15 +1,26 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - - - +/// +/// +/// +/// declare namespace GoogleAppsScript { + /** + * This service allows scripts to create, access, and modify Google Sheets files. See also the guide to storing data in spreadsheets. + * + * https://developers.google.com/apps-script/guides/sheets + */ export module Spreadsheet { + /** + * Styles that can be set on a range using + * Range.setBorder(top, left, bottom, right, vertical, horizontal, color, style). + */ + export enum BorderStyle { DOTTED, DASHED, SOLID } + /** * The chart's position within a sheet. Can be updated using the EmbeddedChart.modify() * function. @@ -18,9 +29,25 @@ declare namespace GoogleAppsScript { * sheet.updateChart(chart); */ export interface ContainerInfo { + /** + * The chart's left side will be anchored to this column. + * @returns {Integer} 1-indexed column (i.e. column C will be 3) + */ getAnchorColumn(): Integer; + /** + * The chart's top side will be anchored to this row. + * @returns {Integer} 1-indexed row (i.e. row 5 will return 5) + */ getAnchorRow(): Integer; + /** + * The chart's upper left hand corner will be offset from the anchor column by this many pixels. + * @returns {Integer} the horizontal offset in pixels for the upper left hand corner of the chart + */ getOffsetX(): Integer; + /** + * Chart's upper left hand corner will be offset from the anchor row by this many pixels. + * @returns {Integer} the vertical offset in pixels for the upper left hand corner of the chart + */ getOffsetY(): Integer; } @@ -135,6 +162,8 @@ declare namespace GoogleAppsScript { asAreaChart(): EmbeddedAreaChartBuilder; asBarChart(): EmbeddedBarChartBuilder; asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; asLineChart(): EmbeddedLineChartBuilder; asPieChart(): EmbeddedPieChartBuilder; asScatterChart(): EmbeddedScatterChartBuilder; @@ -175,6 +204,8 @@ declare namespace GoogleAppsScript { asAreaChart(): EmbeddedAreaChartBuilder; asBarChart(): EmbeddedBarChartBuilder; asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; asLineChart(): EmbeddedLineChartBuilder; asPieChart(): EmbeddedPieChartBuilder; asScatterChart(): EmbeddedScatterChartBuilder; @@ -265,6 +296,8 @@ declare namespace GoogleAppsScript { asAreaChart(): EmbeddedAreaChartBuilder; asBarChart(): EmbeddedBarChartBuilder; asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; asLineChart(): EmbeddedLineChartBuilder; asPieChart(): EmbeddedPieChartBuilder; asScatterChart(): EmbeddedScatterChartBuilder; @@ -288,6 +321,8 @@ declare namespace GoogleAppsScript { asAreaChart(): EmbeddedAreaChartBuilder; asBarChart(): EmbeddedBarChartBuilder; asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; asLineChart(): EmbeddedLineChartBuilder; asPieChart(): EmbeddedPieChartBuilder; asScatterChart(): EmbeddedScatterChartBuilder; @@ -318,6 +353,88 @@ declare namespace GoogleAppsScript { useLogScale(): EmbeddedColumnChartBuilder; } + /** + * Builder for combo charts. For more details, see the Gviz + * documentation. + */ + export interface EmbeddedComboChartBuilder { + addRange(range: Range): EmbeddedChartBuilder; + asAreaChart(): EmbeddedAreaChartBuilder; + asBarChart(): EmbeddedBarChartBuilder; + asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; + asLineChart(): EmbeddedLineChartBuilder; + asPieChart(): EmbeddedPieChartBuilder; + asScatterChart(): EmbeddedScatterChartBuilder; + asTableChart(): EmbeddedTableChartBuilder; + build(): EmbeddedChart; + getChartType(): Charts.ChartType; + getContainer(): ContainerInfo; + getRanges(): Range[]; + removeRange(range: Range): EmbeddedChartBuilder; + reverseCategories(): EmbeddedComboChartBuilder; + setBackgroundColor(cssValue: string): EmbeddedComboChartBuilder; + setChartType(type: Charts.ChartType): EmbeddedChartBuilder; + setColors(cssValues: String[]): EmbeddedComboChartBuilder; + setLegendPosition(position: Charts.Position): EmbeddedComboChartBuilder; + setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder; + setOption(option: string, value: Object): EmbeddedChartBuilder; + setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder; + setRange(start: Number, end: Number): EmbeddedComboChartBuilder; + setStacked(): EmbeddedComboChartBuilder; + setTitle(chartTitle: string): EmbeddedComboChartBuilder; + setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder; + setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder; + setXAxisTitle(title: string): EmbeddedComboChartBuilder; + setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder; + setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder; + setYAxisTitle(title: string): EmbeddedComboChartBuilder; + setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder; + useLogScale(): EmbeddedComboChartBuilder; + } + + /** + * Builder for histogram charts. For more details, see the Gviz + * documentation. + */ + export interface EmbeddedHistogramChartBuilder { + addRange(range: Range): EmbeddedChartBuilder; + asAreaChart(): EmbeddedAreaChartBuilder; + asBarChart(): EmbeddedBarChartBuilder; + asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; + asLineChart(): EmbeddedLineChartBuilder; + asPieChart(): EmbeddedPieChartBuilder; + asScatterChart(): EmbeddedScatterChartBuilder; + asTableChart(): EmbeddedTableChartBuilder; + build(): EmbeddedChart; + getChartType(): Charts.ChartType; + getContainer(): ContainerInfo; + getRanges(): Range[]; + removeRange(range: Range): EmbeddedChartBuilder; + reverseCategories(): EmbeddedHistogramChartBuilder; + setBackgroundColor(cssValue: string): EmbeddedHistogramChartBuilder; + setChartType(type: Charts.ChartType): EmbeddedChartBuilder; + setColors(cssValues: String[]): EmbeddedHistogramChartBuilder; + setLegendPosition(position: Charts.Position): EmbeddedHistogramChartBuilder; + setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder; + setOption(option: string, value: Object): EmbeddedChartBuilder; + setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder; + setRange(start: Number, end: Number): EmbeddedHistogramChartBuilder; + setStacked(): EmbeddedHistogramChartBuilder; + setTitle(chartTitle: string): EmbeddedHistogramChartBuilder; + setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder; + setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder; + setXAxisTitle(title: string): EmbeddedHistogramChartBuilder; + setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder; + setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder; + setYAxisTitle(title: string): EmbeddedHistogramChartBuilder; + setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder; + useLogScale(): EmbeddedHistogramChartBuilder; + } + /** * Builder for line charts. For more details, see the Gviz * documentation. @@ -327,6 +444,8 @@ declare namespace GoogleAppsScript { asAreaChart(): EmbeddedAreaChartBuilder; asBarChart(): EmbeddedBarChartBuilder; asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; asLineChart(): EmbeddedLineChartBuilder; asPieChart(): EmbeddedPieChartBuilder; asScatterChart(): EmbeddedScatterChartBuilder; @@ -367,6 +486,8 @@ declare namespace GoogleAppsScript { asAreaChart(): EmbeddedAreaChartBuilder; asBarChart(): EmbeddedBarChartBuilder; asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; asLineChart(): EmbeddedLineChartBuilder; asPieChart(): EmbeddedPieChartBuilder; asScatterChart(): EmbeddedScatterChartBuilder; @@ -398,6 +519,8 @@ declare namespace GoogleAppsScript { asAreaChart(): EmbeddedAreaChartBuilder; asBarChart(): EmbeddedBarChartBuilder; asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; asLineChart(): EmbeddedLineChartBuilder; asPieChart(): EmbeddedPieChartBuilder; asScatterChart(): EmbeddedScatterChartBuilder; @@ -438,6 +561,8 @@ declare namespace GoogleAppsScript { asAreaChart(): EmbeddedAreaChartBuilder; asBarChart(): EmbeddedBarChartBuilder; asColumnChart(): EmbeddedColumnChartBuilder; + asComboChart(): EmbeddedComboChartBuilder; + asHistogramChart(): EmbeddedHistogramChartBuilder; asLineChart(): EmbeddedLineChartBuilder; asPieChart(): EmbeddedPieChartBuilder; asScatterChart(): EmbeddedScatterChartBuilder; @@ -463,8 +588,37 @@ declare namespace GoogleAppsScript { } /** - * - * Deprecated. For spreadsheets created in the newer version of Google Sheets, use the more powerful + * Create, access and modify named ranges in a spreadsheet. + * Named ranges are ranges that have associated string aliases. + * They can be viewed and edited via the Sheets UI under the + * Data > Named ranges... menu. + */ + export interface NamedRange { + /** + * Gets the name of this named range. + */ + getName(): string; + /** + * Gets teh range referenced by this named range. + */ + getRange(): Range; + /** + * Deletes this named range. + */ + remove(): void; + /** + * Sets/updates the name of this named range. + */ + setName(name: string): NamedRange; + /** + * Sets/updates the range for this named range. + */ + setRange(range: Range): NamedRange; + } + + /** + * @deprecated + * For spreadsheets created in the newer version of Google Sheets, use the more powerful * Protection class instead. Although this class is deprecated, it will remain * available for compatibility with the older version of Sheets. * Access and modify protected sheets in the older version of Google Sheets. @@ -539,6 +693,7 @@ declare namespace GoogleAppsScript { removeEditors(emailAddresses: String[]): Protection; setDescription(description: string): Protection; setDomainEdit(editable: boolean): Protection; + setNamedRange(namedRange: NamedRange): Protection; setRange(range: Range): Protection; setRangeName(rangeName: string): Protection; setUnprotectedRanges(ranges: Range[]): Protection; @@ -594,11 +749,14 @@ declare namespace GoogleAppsScript { getBackgrounds(): String[][]; getCell(row: Integer, column: Integer): Range; getColumn(): Integer; + getColumnIndex(): Integer; getDataSourceUrl(): string; getDataTable(): Charts.DataTable; getDataTable(firstRowIsHeader: boolean): Charts.DataTable; getDataValidation(): DataValidation; getDataValidations(): DataValidation[][]; + getDisplayValue(): string; + getDisplayValues(): String[][]; getFontColor(): string; getFontColors(): String[][]; getFontFamilies(): String[][]; @@ -621,6 +779,7 @@ declare namespace GoogleAppsScript { getHorizontalAlignments(): String[][]; getLastColumn(): Integer; getLastRow(): Integer; + getMergedRanges(): Range[]; getNote(): string; getNotes(): String[][]; getNumColumns(): Integer; @@ -640,6 +799,7 @@ declare namespace GoogleAppsScript { isBlank(): boolean; isEndColumnBounded(): boolean; isEndRowBounded(): boolean; + isPartOfMerge(): boolean; isStartColumnBounded(): boolean; isStartRowBounded(): boolean; merge(): Range; @@ -654,6 +814,7 @@ declare namespace GoogleAppsScript { setBackgroundRGB(red: Integer, green: Integer, blue: Integer): Range; setBackgrounds(color: String[][]): Range; setBorder(top: boolean, left: boolean, bottom: boolean, right: boolean, vertical: boolean, horizontal: boolean): Range; + setBorder(top: boolean, left: boolean, bottom: boolean, right: boolean, vertical: boolean, horizontal: boolean, color: string, style: BorderStyle): Range; setDataValidation(rule: DataValidation): Range; setDataValidations(rules: DataValidation[][]): Range; setFontColor(color: string): Range; @@ -718,6 +879,7 @@ declare namespace GoogleAppsScript { getMaxColumns(): Integer; getMaxRows(): Integer; getName(): string; + getNamedRanges(): NamedRange[]; getParent(): Spreadsheet; getProtections(type: ProtectionType): Protection[]; getRange(row: Integer, column: Integer): Range; @@ -728,6 +890,7 @@ declare namespace GoogleAppsScript { getSheetId(): Integer; getSheetName(): string; getSheetValues(startRow: Integer, startColumn: Integer, numRows: Integer, numColumns: Integer): Object[][]; + getTabColor(): string; hideColumn(column: Range): void; hideColumns(columnIndex: Integer): void; hideColumns(columnIndex: Integer, numColumns: Integer): void; @@ -764,6 +927,7 @@ declare namespace GoogleAppsScript { setFrozenRows(rows: Integer): void; setName(name: string): Sheet; setRowHeight(rowPosition: Integer, height: Integer): Sheet; + setTabColor(color: string): Sheet; showColumns(columnIndex: Integer): void; showColumns(columnIndex: Integer, numColumns: Integer): void; showRows(rowIndex: Integer): void; @@ -815,6 +979,7 @@ declare namespace GoogleAppsScript { getLastColumn(): Integer; getLastRow(): Integer; getName(): string; + getNamedRanges(): NamedRange[]; getNumSheets(): Integer; getOwner(): Base.User; getProtections(type: ProtectionType): Protection[]; @@ -893,26 +1058,85 @@ declare namespace GoogleAppsScript { * the parent class for the Spreadsheet service. */ export interface SpreadsheetApp { - DataValidationCriteria: DataValidationCriteria - ProtectionType: ProtectionType + /** + * An enumeration of the valid styles for setting borders on a Range. + */ + BorderStyle: typeof BorderStyle; + /** + * An enumeration representing the data-validation criteria that can be set on a range. + */ + DataValidationCriteria: typeof DataValidationCriteria; + /** + * An enumeration representing the parts of a spreadsheet that can be protected from edits. + */ + ProtectionType: typeof ProtectionType; + /** + * Creates a new spreadsheet with the given name. + */ create(name: string): Spreadsheet; + /** + * Creates a new spreadsheet with the given name and the specified number of rows and columns. + */ create(name: string, rows: Integer, columns: Integer): Spreadsheet; + /** + * Applies all pending Spreadsheet changes. + */ flush(): void; + /** + * Returns the currently active spreadsheet, or null if there is none. + */ getActive(): Spreadsheet; + /** + * Returns the range of cells that is currently considered active. + */ getActiveRange(): Range; + /** + * Gets the active sheet in a spreadsheet. + */ getActiveSheet(): Sheet; + /** + * Returns the currently active spreadsheet, or null if there is none. + */ getActiveSpreadsheet(): Spreadsheet; + /** + * Returns an instance of the spreadsheet's user-interface environment that allows the script to add features like menus, dialogs, and sidebars. + */ getUi(): Base.Ui; + /** + * Creates a builder for a data-validation rule. + */ newDataValidation(): DataValidationBuilder; + /** + * Opens the spreadsheet that corresponds to the given File object. + */ open(file: Drive.File): Spreadsheet; + /** + * Opens the spreadsheet with the given ID. + */ openById(id: string): Spreadsheet; + /** + * Opens the spreadsheet with the given url. + */ openByUrl(url: string): Spreadsheet; + /** + * Sets the active range for the application. + */ setActiveRange(range: Range): Range; + /** + * Sets the active sheet in a spreadsheet. + */ setActiveSheet(sheet: Sheet): Sheet; + /** + * Sets the active spreadsheet. + */ setActiveSpreadsheet(newActiveSpreadsheet: Spreadsheet): void; } } } +/** + * This class allows users to open Google Sheets files and to create new ones. This class is + * the parent class for the Spreadsheet service. + */ declare var SpreadsheetApp: GoogleAppsScript.Spreadsheet.SpreadsheetApp; diff --git a/types/google-apps-script/google-apps-script.types.d.ts b/types/google-apps-script/google-apps-script.types.d.ts index d5d2989b5c..3c7bfb550c 100644 --- a/types/google-apps-script/google-apps-script.types.d.ts +++ b/types/google-apps-script/google-apps-script.types.d.ts @@ -3,10 +3,11 @@ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace GoogleAppsScript { +declare module GoogleAppsScript { type BigNumber = any; type Byte = number; type Integer = number; type Char = string; + type String = string; type JdbcSQL_XML = any; } diff --git a/types/google-apps-script/google-apps-script.ui.d.ts b/types/google-apps-script/google-apps-script.ui.d.ts index 6d08082dc8..bd4424351e 100644 --- a/types/google-apps-script/google-apps-script.ui.d.ts +++ b/types/google-apps-script/google-apps-script.ui.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module UI { @@ -3263,13 +3263,13 @@ declare namespace GoogleAppsScript { * * deprecated on December 11, 2014. To create user interfaces, use the * HTML service instead. - * Create user interfaces for use inside Google Apps or as standalone services. + * Create user interfaces for use inside G Suite or as standalone services. */ export interface UiApp { - DateTimeFormat: DateTimeFormat - FileType: FileType - HorizontalAlignment: HorizontalAlignment - VerticalAlignment: VerticalAlignment + DateTimeFormat: typeof DateTimeFormat; + FileType: typeof FileType; + HorizontalAlignment: typeof HorizontalAlignment; + VerticalAlignment: typeof VerticalAlignment; createApplication(): UiInstance; getActiveApplication(): UiInstance; getUserAgent(): string; diff --git a/types/google-apps-script/google-apps-script.url-fetch.d.ts b/types/google-apps-script/google-apps-script.url-fetch.d.ts index 94db3c3a7c..b9ede5163e 100644 --- a/types/google-apps-script/google-apps-script.url-fetch.d.ts +++ b/types/google-apps-script/google-apps-script.url-fetch.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module URL_Fetch { @@ -25,30 +25,6 @@ declare namespace GoogleAppsScript { getResponseCode(): Integer; } - /** - * - * Deprecated. This class is deprecated and should not be used in new scripts. - * Represents configuration settings for an OAuth-enabled remote service. - * See also - * - * UrlFetchApp - */ - export interface OAuthConfig { - getAccessTokenUrl(): string; - getAuthorizationUrl(): string; - getMethod(): string; - getParamLocation(): string; - getRequestTokenUrl(): string; - getServiceName(): string; - setAccessTokenUrl(url: string): void; - setAuthorizationUrl(url: string): void; - setConsumerKey(consumerKey: string): void; - setConsumerSecret(consumerSecret: string): void; - setMethod(method: string): void; - setParamLocation(location: string): void; - setRequestTokenUrl(url: string): void; - } - /** * Fetch resources and communicate with other hosts over the Internet. * @@ -58,8 +34,6 @@ declare namespace GoogleAppsScript { * and scaling purposes. * See also * - * OAuthConfig - * * HTTPResponse */ export interface UrlFetchApp { @@ -67,8 +41,6 @@ declare namespace GoogleAppsScript { fetch(url: string, params: Object): HTTPResponse; getRequest(url: string): Object; getRequest(url: string, params: Object): Object; - addOAuthService(serviceName: string): OAuthConfig; - removeOAuthService(serviceName: string): void; } } diff --git a/types/google-apps-script/google-apps-script.utilities.d.ts b/types/google-apps-script/google-apps-script.utilities.d.ts index 3deb1734f4..2beda0bfc1 100644 --- a/types/google-apps-script/google-apps-script.utilities.d.ts +++ b/types/google-apps-script/google-apps-script.utilities.d.ts @@ -1,10 +1,10 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - +/// +/// declare namespace GoogleAppsScript { export module Utilities { @@ -28,9 +28,9 @@ declare namespace GoogleAppsScript { * and other miscellaneous tasks. */ export interface Utilities { - Charset: Charset - DigestAlgorithm: DigestAlgorithm - MacAlgorithm: MacAlgorithm + Charset: typeof Charset; + DigestAlgorithm: typeof DigestAlgorithm; + MacAlgorithm: typeof MacAlgorithm; base64Decode(encoded: string): Byte[]; base64Decode(encoded: string, charset: Charset): Byte[]; base64DecodeWebSafe(encoded: string): Byte[]; @@ -51,6 +51,7 @@ declare namespace GoogleAppsScript { computeRsaSha256Signature(value: string, key: string, charset: Charset): Byte[]; formatDate(date: Date, timeZone: string, format: string): string; formatString(template: string, ...args: Object[]): string; + getUuid(): string; newBlob(data: Byte[]): Base.Blob; newBlob(data: Byte[], contentType: string): Base.Blob; newBlob(data: Byte[], contentType: string, name: string): Base.Blob; diff --git a/types/google-apps-script/google-apps-script.xml-service.d.ts b/types/google-apps-script/google-apps-script.xml-service.d.ts index d45d4d16a8..664fbfc2b9 100644 --- a/types/google-apps-script/google-apps-script.xml-service.d.ts +++ b/types/google-apps-script/google-apps-script.xml-service.d.ts @@ -1,9 +1,9 @@ -// Type definitions for Google Apps Script 2015-11-12 +// Type definitions for Google Apps Script 2017-05-12 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +/// declare namespace GoogleAppsScript { export module XML_Service { @@ -283,9 +283,9 @@ declare namespace GoogleAppsScript { /** * This service allows scripts to parse, navigate, and programmatically create XML documents. * - * // Log the title and labels for the first page of blog posts on the Google Apps Developer blog. + * // Log the title and labels for the first page of blog posts on the G Suite Developer blog. * function parseXml() { - * var url = 'http://googleappsdeveloper.blogspot.com/atom.xml'; + * var url = 'https://gsuite-developers.googleblog.com/atom.xml'; * var xml = UrlFetchApp.fetch(url).getContentText(); * var document = XmlService.parse(xml); * var root = document.getRootElement(); @@ -320,7 +320,7 @@ declare namespace GoogleAppsScript { * } */ export interface XmlService { - ContentTypes: ContentType + ContentTypes: typeof ContentType; createCdata(text: string): Cdata; createComment(text: string): Comment; createDocType(elementName: string): DocType; diff --git a/types/google-cloud__storage/google-cloud__storage-tests.ts b/types/google-cloud__storage/google-cloud__storage-tests.ts index e701fe5681..a301aa063c 100644 --- a/types/google-cloud__storage/google-cloud__storage-tests.ts +++ b/types/google-cloud__storage/google-cloud__storage-tests.ts @@ -38,7 +38,7 @@ export class TestStorage { }; // import Storage class - static gcs: Storage; + static gcs: Storage = new Storage(); // the bucket private buckets: Bucket[] = []; diff --git a/types/google-cloud__storage/index.d.ts b/types/google-cloud__storage/index.d.ts index e97249be24..84f4329601 100644 --- a/types/google-cloud__storage/index.d.ts +++ b/types/google-cloud__storage/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for @google-cloud/storage 0.6 +// Type definitions for @google-cloud/storage 1.1 // Project: https://github.com/GoogleCloudPlatform/google-cloud-node/tree/master/packages/storage -// Definitions by: Brian Love +// Definitions by: Brian Love // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -301,6 +301,21 @@ declare module "@google-cloud/storage/storage" { updated?: string; } + interface Credentials { + client_email?: string; + private_key?: string; + } + + interface ConfigurationObject { + autoRetry?: boolean; + credentials?: Credentials; + email?: string; + keyFilename?: string; + maxRetries?: number; + projectId?: string; + promise?: PromiseLibrary; + } + /** * The options when downloading a file. */ @@ -343,6 +358,7 @@ declare module "@google-cloud/storage/storage" { * The Storage class allows you interact with Google Cloud Storage. */ class Storage { + constructor(options?: ConfigurationObject); acl: Acl; bucket(name: string|Bucket): Bucket; channel(id: string, resourceId: string): Channel; @@ -350,4 +366,6 @@ declare module "@google-cloud/storage/storage" { getBuckets(query?: BucketQuery): Promise<[Bucket[]]>; getBucketsStream(query?: BucketQuery): Promise<[ReadStream]>; } + + type PromiseLibrary = () => PromiseLike; } diff --git a/types/google-libphonenumber/index.d.ts b/types/google-libphonenumber/index.d.ts index 13659182a9..1fc2d321aa 100644 --- a/types/google-libphonenumber/index.d.ts +++ b/types/google-libphonenumber/index.d.ts @@ -26,7 +26,71 @@ declare namespace libphonenumber { UNKNOWN = -1 } - interface PhoneNumber { + export module PhoneNumber { + export enum CountryCodeSource { + FROM_NUMBER_WITH_PLUS_SIGN = 1, + FROM_NUMBER_WITH_IDD = 5, + FROM_NUMBER_WITHOUT_PLUS_SIGN = 10, + FROM_DEFAULT_COUNTRY = 20, + } + } + + export interface PhoneNumber { + getCountryCode(): number | undefined; + getCountryCodeOrDefault(): number; + setCountryCode(value: number): void; + hasCountryCode(): boolean; + countryCodeCount(): number; + clearCountryCode(): void; + + getNationalNumber(): number | undefined; + getNationalNumberOrDefault(): number; + setNationalNumber(value: number): number; + hasNationalNumber(): boolean; + nationalNumberCount(): number; + clearNationalNumber(): void; + + getExtension(): string | undefined; + getExtensionOrDefault(): string; + setExtension(value: string): void; + hasExtension(): boolean; + extensionCount(): number; + clearExtension(): void; + + getItalianLeadingZero(): boolean | undefined; + getItalianLeadingZeroOrDefault(): boolean; + setItalianLeadingZero(value: boolean): void; + hasItalianLeadingZero(): boolean; + italianLeadingZeroCount(): number; + clearItalianLeadingZero(): void; + + getNumberOfLeadingZeros(): number | undefined; + getNumberOfLeadingZerosOrDefault(): number; + setNumberOfLeadingZeros(value: number): void; + hasNumberOfLeadingZeros(): boolean; + numberOfLeadingZerosCount(): number; + clearNumberOfLeadingZeros(): void; + + getRawInput(): string | undefined; + getRawInputOrDefault(): string; + setRawInput(value: string): void; + hasRawInput(): boolean; + rawInputCount(): number; + clearRawInput(): void; + + getCountryCodeSource(): PhoneNumber.CountryCodeSource | undefined; + getCountryCodeSourceOrDefault(): PhoneNumber.CountryCodeSource; + setCountryCodeSource(value: PhoneNumber.CountryCodeSource): void; + hasCountryCodeSource(): boolean; + countryCodeSourceCount(): number; + clearCountryCodeSource(): void; + + getPreferredDomesticCarrierCode(): string | undefined; + getPreferredDomesticCarrierCodeOrDefault(): string; + setPreferredDomesticCarrierCode(value: string): void; + hasPreferredDomesticCarrierCode(): boolean; + preferredDomesticCarrierCodeCount(): number; + clearPreferredDomesticCarrierCode(): void; } export module PhoneNumberUtil { @@ -40,16 +104,26 @@ declare namespace libphonenumber { export class PhoneNumberUtil { static getInstance(): PhoneNumberUtil - parse(number: string, region: string): PhoneNumber; - isValidNumber(phoneNumber: PhoneNumber): boolean; - isPossibleNumber(phoneNumber: PhoneNumber): boolean; - isPossibleNumberWithReason(phoneNumber: PhoneNumber): PhoneNumberUtil.ValidationResult; - isValidNumberForRegion(phoneNumber: PhoneNumber, region: string): boolean; - getNumberType(phoneNumber: PhoneNumber): PhoneNumberType; - getRegionCodeForNumber(phoneNumber: PhoneNumber): string; - isNANPACountry(regionCode: string): boolean; format(phoneNumber: PhoneNumber, format: PhoneNumberFormat): string; - parseAndKeepRawInput(number: string, regionCode: string): PhoneNumber; + getNddPrefixForRegion(regionCode?: string, stripNonDigits?: boolean): string | undefined; + getNumberType(phoneNumber: PhoneNumber): PhoneNumberType; + getRegionCodeForCountryCode(countryCallingCode: number): string; + getRegionCodeForNumber(phoneNumber: PhoneNumber): string | undefined; + isAlphaNumber(number: string): boolean; + isLeadingZeroPossible(countryCallingCode: number): boolean; + isNANPACountry(regionCode?: string): boolean; + isPossibleNumber(number: PhoneNumber): boolean; + isPossibleNumber(phoneNumber: PhoneNumber): boolean; + isPossibleNumberForType(number: PhoneNumber, type: PhoneNumberType): boolean; + isPossibleNumberForTypeWithReason(number: PhoneNumber, type: PhoneNumberType): PhoneNumberUtil.ValidationResult; + isPossibleNumberString(number: string, regionDialingFrom: string): boolean; + isPossibleNumberWithReason(number: PhoneNumber): PhoneNumberUtil.ValidationResult; + isPossibleNumberWithReason(phoneNumber: PhoneNumber): PhoneNumberUtil.ValidationResult; + isValidNumber(phoneNumber: PhoneNumber): boolean; + isValidNumberForRegion(phoneNumber: PhoneNumber, region?: string): boolean; + parse(number?: string, region?: string): PhoneNumber; + parseAndKeepRawInput(number: string, regionCode?: string): PhoneNumber; + truncateTooLongNumber(number: PhoneNumber): boolean; } export class AsYouTypeFormatter { diff --git a/types/google-map-react/google-map-react-tests.tsx b/types/google-map-react/google-map-react-tests.tsx index 959bb8e68a..c01d1e3cab 100644 --- a/types/google-map-react/google-map-react-tests.tsx +++ b/types/google-map-react/google-map-react-tests.tsx @@ -1,6 +1,9 @@ -import GoogleMapReact from 'google-map-react'; +import GoogleMapReact, { BootstrapURLKeys } from 'google-map-react'; import * as React from 'react'; const center = { lat: 0, lng: 0 }; -; +const key: BootstrapURLKeys = { key: 'my-google-maps-key' }; +const client: BootstrapURLKeys = { client: 'my-client-identifier', v: '3.28' , language: 'en' }; + +; diff --git a/types/google-map-react/index.d.ts b/types/google-map-react/index.d.ts index aedf13e13a..5e54c4e5aa 100644 --- a/types/google-map-react/index.d.ts +++ b/types/google-map-react/index.d.ts @@ -2,14 +2,11 @@ // Project: https://github.com/istarkov/google-map-react // Definitions by: Honza Brecka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 import * as React from 'react'; -export interface BootstrapURLKeys { - key: string; - language?: string; -} +export type BootstrapURLKeys = ({ key: string; } | { client: string; v: string; }) & { language?: string }; export interface Options { styles?: any[]; @@ -98,11 +95,11 @@ export interface Props { onMapTypeIdChange?(args: any): void; distanceToMouse?(pt: Point, mousePos: Point): void; googleMapLoader?(bootstrapURLKeys: any): void; - onGoogleApiLoaded?({map, maps}: { map: any, maps: any }): void; + onGoogleApiLoaded?(maps: { map: any, maps: any }): void; yesIWantToUseGoogleMapApiInternals?: boolean; } -export default class GoogleMapReact extends React.Component {} +export default class GoogleMapReact extends React.Component {} export interface ChildComponentProps extends Coords { $hover?: boolean; diff --git a/types/google-protobuf/index.d.ts b/types/google-protobuf/index.d.ts index 5ff6b6259d..bb1d2fb3a5 100644 --- a/types/google-protobuf/index.d.ts +++ b/types/google-protobuf/index.d.ts @@ -70,12 +70,12 @@ export abstract class Message { static computeOneofCase(msg: Message, oneof: number[]): number; static getWrapperField( msg: Message, - ctor: {new() : T}, + ctor: { new(): T }, fieldNumber: number, required?: number): T; static getRepeatedWrapperField( msg: Message, - ctor: {new() : T}, + ctor: { new(): T }, fieldNumber: number): T[]; static setWrapperField( msg: Message, @@ -94,7 +94,7 @@ export abstract class Message { msg: Message, fieldNumber: number, value: T | undefined, - ctor: {new() : T}, + ctor: { new(): T }, index?: number): T; static toMap( field: any[], diff --git a/types/googlemaps/googlemaps-tests.ts b/types/googlemaps/googlemaps-tests.ts index 20d2bc51c8..fd7d6057b7 100644 --- a/types/googlemaps/googlemaps-tests.ts +++ b/types/googlemaps/googlemaps-tests.ts @@ -1,8 +1,6 @@ // Test file for Google Maps JavaScript API Definition file -/***** Create map *****/ -let map = new google.maps.Map( - document.getElementById('map'), { +let mapOptions: google.maps.MapOptions = { backgroundColor: "#fff", center: { lat: -25.363, lng: 131.044 }, clickableIcons: true, @@ -13,8 +11,34 @@ let map = new google.maps.Map( }, gestureHandling: "cooperative", scrollwheel: true, + styles: [ + { + elementType: 'geometry', + featureType: 'water', + stylers: [ + { + color: '#00bdbd' + } + ] + }, + { + elementType: 'geometry', + featureType: 'landscape.man_made', + stylers: [ + { + color: '#f7f1df' + } + ] + } + ], zoom: 4 -}); +}; + +/***** Create map *****/ +let map: google.maps.Map = new google.maps.Map( + document.getElementById('map'), + mapOptions +); /***** Data *****/ @@ -329,4 +353,4 @@ heatmap.setData([new google.maps.LatLng(37.782551, -122.445368), new google.maps heatmap.setData([ { weight: 1, location: new google.maps.LatLng(37.782551, -122.445368) }, { weight: 2, location: new google.maps.LatLng(37.782745, -122.444586) } -]); \ No newline at end of file +]); diff --git a/types/googlemaps/index.d.ts b/types/googlemaps/index.d.ts index 0e12a8e643..ac9566757f 100644 --- a/types/googlemaps/index.d.ts +++ b/types/googlemaps/index.d.ts @@ -32,7 +32,7 @@ declare namespace google.maps { export class Map extends MVCObject { constructor(mapDiv: Element|null, opts?: MapOptions); fitBounds(bounds: LatLngBounds|LatLngBoundsLiteral): void; - getBounds(): LatLngBounds; + getBounds(): LatLngBounds|null|undefined; getCenter(): LatLng; getDiv(): Element; getHeading(): number; @@ -1058,7 +1058,7 @@ declare namespace google.maps { clickable?: boolean; /** If set to true, the user can drag this circle over the map. Defaults to false. */ draggable?: boolean; - /** + /** * If set to true, the user can edit this circle by dragging the control points shown at the center and around * the circumference of the circle. Defaults to false. */ @@ -1375,9 +1375,19 @@ declare namespace google.maps { } export interface DirectionsResult { + geocoded_waypoints: DirectionsGeocodedWaypoint[]; routes: DirectionsRoute[]; } + /** + * A single geocoded waypoint. + */ + export interface DirectionsGeocodedWaypoint { + partial_match: boolean; + place_id: string; + types: string[]; + } + /** * A single route containing a set of legs in a DirectionsResult. * Note that though this object is "JSON-like," it is not strictly JSON, @@ -1709,64 +1719,51 @@ declare namespace google.maps { stylers?: MapTypeStyler[]; } - export interface MapTypeStyleFeatureType { - administrative?: { - country?: string; - land_parcel?: string; - locality?: string; - neighborhood?: string; - province?: string; - }; - all?: string; - landscape?: { - man_made?: string; - natural?: { - landcover?: string; - terrain?: string; - }; - }; - poi?: { - attraction?: string; - business?: string; - government?: string; - medical?: string; - park?: string; - place_of_worship?: string; - school?: string; - sports_complex?: string; - }; - road?: { - arterial?: string; - highway?: { - controlled_access?: string; - }; - local?: string; - }; - transit?: { - line?: string; - station?: { - airport?: string; - bus?: string; - rail?: string; - }; - }; - water?: string; - } + export type MapTypeStyleFeatureType = + 'all' | + 'administrative' | + 'administrative.country' | + 'administrative.land_parcel' | + 'administrative.locality' | + 'administrative.neighborhood' | + 'administrative.province' | + 'landscape' | + 'landscape.man_made' | + 'landscape.natural' | + 'landscape.natural.landcover' | + 'landscape.natural.terrain' | + 'poi' | + 'poi.attraction' | + 'poi.business' | + 'poi.government' | + 'poi.medical' | + 'poi.park' | + 'poi.place_of_worship' | + 'poi.school' | + 'poi.sports_complex' | + 'road' | + 'road.arterial' | + 'road.highway' | + 'road.highway.controlled_access' | + 'road.local' | + 'transit' | + 'transit.line' | + 'transit.station' | + 'transit.station.airport' | + 'transit.station.bus' | + 'transit.station.rail' | + 'water'; - export interface MapTypeStyleElementType { - all?: string; - geometry?: { - fill?: string; - stroke?: string; - }; - labels?: { - icon?: string; - text?: { - fill?: string; - stroke?: string; - } - }; - } + export type MapTypeStyleElementType = + 'all' | + 'geometry' | + 'geometry.fill' | + 'geometry.stroke' | + 'labels' | + 'labels.icon' | + 'labels.text' | + 'labels.text.fill' | + 'labels.text.stroke'; export interface MapTypeStyler { color?: string; @@ -2122,7 +2119,7 @@ declare namespace google.maps { } /** - * This object is returned from various mouse events on the map and overlays, + * This object is returned from various mouse events on the map and overlays, * and contains all the fields shown below. */ export interface MouseEvent { @@ -2223,7 +2220,7 @@ declare namespace google.maps { /** Converts to string. */ toString(): string; /** - * Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this bounds, where "lo" corresponds to the + * Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this bounds, where "lo" corresponds to the * southwest corner of the bounding box, while "hi" corresponds to the northeast corner of that box. */ toUrlValue(precision?: number): string; @@ -2464,6 +2461,7 @@ declare namespace google.maps { placeIdOnly?: boolean; strictBounds?: boolean; types?: string[]; + type?: string; } export interface AutocompletePrediction { @@ -2707,7 +2705,7 @@ declare namespace google.maps { * and the map property of a new polygon is always set to the DrawingManager's map. */ polygonOptions?: PolygonOptions; - /** + /** * Options to apply to any new polylines created with this DrawingManager. The path property is ignored, * and the map property of a new polyline is always set to the DrawingManager's map. */ @@ -2738,7 +2736,7 @@ declare namespace google.maps { */ export enum OverlayType { /** - * Specifies that the DrawingManager creates circles, and that the overlay given in the overlaycomplete + * Specifies that the DrawingManager creates circles, and that the overlay given in the overlaycomplete * event is a circle. */ CIRCLE, diff --git a/types/graphql-type-json/graphql-type-json-tests.ts b/types/graphql-type-json/graphql-type-json-tests.ts new file mode 100644 index 0000000000..3282681845 --- /dev/null +++ b/types/graphql-type-json/graphql-type-json-tests.ts @@ -0,0 +1,20 @@ +import {GraphQLObjectType, GraphQLInputObjectType} from "graphql"; +import * as GraphQLJSON from "graphql-type-json"; + +const TestType = new GraphQLObjectType({ + name: "TestType", + fields: { + test: { + type: GraphQLJSON + } + } +}); + +const TestInputType = new GraphQLInputObjectType({ + name: "TestInputType", + fields: { + test: { + type: GraphQLJSON + } + } +}); diff --git a/types/graphql-type-json/index.d.ts b/types/graphql-type-json/index.d.ts new file mode 100644 index 0000000000..7d41b83013 --- /dev/null +++ b/types/graphql-type-json/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for graphql-type-json 0.1 +// Project: https://github.com/taion/graphql-type-json#readme +// Definitions by: Pavel Ivanov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +import {GraphQLScalarType} from "graphql"; + +declare const GraphQLJSON: GraphQLScalarType; +export = GraphQLJSON; diff --git a/types/graphql-type-json/tsconfig.json b/types/graphql-type-json/tsconfig.json new file mode 100644 index 0000000000..4120681b12 --- /dev/null +++ b/types/graphql-type-json/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", + "graphql-type-json-tests.ts" + ] +} diff --git a/types/graphql-type-json/tslint.json b/types/graphql-type-json/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/graphql-type-json/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/graphql/error/formatError.d.ts b/types/graphql/error/formatError.d.ts index 712c68c77b..5b974d5461 100644 --- a/types/graphql/error/formatError.d.ts +++ b/types/graphql/error/formatError.d.ts @@ -8,11 +8,11 @@ export function formatError(error: GraphQLError): GraphQLFormattedError; export type GraphQLFormattedError = { message: string, - locations: Array, - path: Array + locations?: Array, + path?: Array }; export type GraphQLErrorLocation = { line: number, column: number -}; \ No newline at end of file +}; diff --git a/types/graphql/type/schema.d.ts b/types/graphql/type/schema.d.ts index 0f02cd78af..01bd3b1ca5 100644 --- a/types/graphql/type/schema.d.ts +++ b/types/graphql/type/schema.d.ts @@ -49,8 +49,8 @@ export class GraphQLSchema { constructor(config: GraphQLSchemaConfig) getQueryType(): GraphQLObjectType; - getMutationType(): GraphQLObjectType; - getSubscriptionType(): GraphQLObjectType; + getMutationType(): GraphQLObjectType|null|undefined; + getSubscriptionType(): GraphQLObjectType|null|undefined; getTypeMap(): { [typeName: string]: GraphQLNamedType }; getType(name: string): GraphQLType; getPossibleTypes(abstractType: GraphQLAbstractType): Array; diff --git a/types/griddle-react/index.d.ts b/types/griddle-react/index.d.ts index e8f817b5a1..ea40fb2130 100644 --- a/types/griddle-react/index.d.ts +++ b/types/griddle-react/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/griddlegriddle/griddle // Definitions by: David Hara // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 /* The MIT License (MIT) @@ -162,7 +162,7 @@ export interface GriddleProps { onRowClick?(): void; } -declare class Griddle extends React.Component, any> { +declare class Griddle extends React.Component> { } export default Griddle; diff --git a/types/griddle-react/test/CustomColumnComponent.tsx b/types/griddle-react/test/CustomColumnComponent.tsx index fff018dcfb..6e81453e95 100644 --- a/types/griddle-react/test/CustomColumnComponent.tsx +++ b/types/griddle-react/test/CustomColumnComponent.tsx @@ -12,7 +12,7 @@ interface MyCustomResult { test: string; } -class LinkComponent extends React.Component, any> { +class LinkComponent extends React.Component> { render() { const url = "speakers/" + this.props.rowData.test + "/" + this.props.data; return {this.props.data}; @@ -50,7 +50,7 @@ const rowMetaData = { } }; -class CustomColumnComponentGrid extends React.Component { +class CustomColumnComponentGrid extends React.Component { render() { type TypedGriddle = new () => Griddle; const TypedGriddle = Griddle as TypedGriddle; diff --git a/types/griddle-react/test/CustomFilterComponent.tsx b/types/griddle-react/test/CustomFilterComponent.tsx index 3de40132f1..b045281868 100644 --- a/types/griddle-react/test/CustomFilterComponent.tsx +++ b/types/griddle-react/test/CustomFilterComponent.tsx @@ -22,7 +22,7 @@ const CustomFilterFunction = (items: ResultType[], query: string): ResultType[] }); }; -class CustomFilterComponent extends React.Component { +class CustomFilterComponent extends React.Component { query: string = ''; searchChange(event: React.FormEvent) { @@ -73,7 +73,7 @@ const someData: ResultType[] = [ } ]; -class CustomFilterComponentGrid extends React.Component { +class CustomFilterComponentGrid extends React.Component { render() { type TypedGriddle = new () => Griddle; const TypedGriddle = Griddle as TypedGriddle; diff --git a/types/griddle-react/test/CustomHeaderComponent.tsx b/types/griddle-react/test/CustomHeaderComponent.tsx index af9d1d6ea3..c5256956fc 100644 --- a/types/griddle-react/test/CustomHeaderComponent.tsx +++ b/types/griddle-react/test/CustomHeaderComponent.tsx @@ -11,7 +11,7 @@ interface MoreCustomHeaderComponentProps extends CustomHeaderComponentProps { color: string; } -class HeaderComponent extends React.Component { +class HeaderComponent extends React.Component { textOnClick(e: React.FormEvent) { e.stopPropagation(); } @@ -80,7 +80,7 @@ const columnMeta: Array> = [ } ]; -class CustomHeaderComponentGrid extends React.Component { +class CustomHeaderComponentGrid extends React.Component { render() { type TypedGriddle = new () => Griddle; const TypedGriddle = Griddle as TypedGriddle; diff --git a/types/griddle-react/test/index.tsx b/types/griddle-react/test/index.tsx index 3e0b1c76ff..4c977c0f97 100644 --- a/types/griddle-react/test/index.tsx +++ b/types/griddle-react/test/index.tsx @@ -16,7 +16,7 @@ interface MyCustomResult { test: string; } -class LinkComponent extends React.Component, any> { +class LinkComponent extends React.Component> { render() { const url = "speakers/" + this.props.rowData.test + "/" + this.props.data; return {this.props.data}; diff --git a/types/gridfs-stream/index.d.ts b/types/gridfs-stream/index.d.ts index 1c803348ad..80f87bb6c5 100644 --- a/types/gridfs-stream/index.d.ts +++ b/types/gridfs-stream/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/aheckmann/gridfs-stream // Definitions by: Lior Mualem // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/gridstack/gridstack-tests.ts b/types/gridstack/gridstack-tests.ts index 9330d2019e..0ef4a7691b 100644 --- a/types/gridstack/gridstack-tests.ts +++ b/types/gridstack/gridstack-tests.ts @@ -17,6 +17,8 @@ var gsFromElement: GridStack = element.data("gridstack"); if (gridstack !== gsFromElement) throw Error('These should match!'); gridstack.addWidget("test", 1, 2, 3, 4, true); +gridstack.addWidget(document.createElement('div'), 1, 2, 3, 4, true); +gridstack.addWidget($(document.createElement('div')), 1, 2, 3, 4, true); gridstack.batchUpdate(); gridstack.cellHeight();; gridstack.cellHeight(2); diff --git a/types/gridstack/index.d.ts b/types/gridstack/index.d.ts index 8d912e3a33..2406f5e08b 100644 --- a/types/gridstack/index.d.ts +++ b/types/gridstack/index.d.ts @@ -2,6 +2,7 @@ // Project: http://troolee.github.io/gridstack.js/ // Definitions by: Pascal Senn , Ricky Blankenaufulland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 interface JQuery { gridstack (options: IGridstackOptions): JQuery; @@ -14,14 +15,14 @@ interface GridStack { * * Widget will be always placed even if result height is more than actual grid height. You need to use willItFit method before calling addWidget for additional check. * - * @param {string} el widget to add + * @param {string | HTMLElement | JQuery} el widget to add * @param {number} x widget position x * @param {number} y widget position y * @param {number} width widget dimension width * @param {number} height widget dimension height * @param {boolean} autoPosition if true then x, y parameters will be ignored and widget will be places on the first available position */ - addWidget(el: string, x?: number, y?: number, width?: number, height?: number, autoPosition?: boolean, minWidth?: number, maxWidth?: number, minHeight?: number, maxHeight?: number, id?: number): JQuery + addWidget(el: string | HTMLElement | JQuery, x?: number, y?: number, width?: number, height?: number, autoPosition?: boolean, minWidth?: number, maxWidth?: number, minHeight?: number, maxHeight?: number, id?: number): JQuery /** * Initializes batch updates. You will see no changes until commit method is called. */ diff --git a/types/gulp-coffeeify/index.d.ts b/types/gulp-coffeeify/index.d.ts index 161eb9376d..2fe2e1d497 100644 --- a/types/gulp-coffeeify/index.d.ts +++ b/types/gulp-coffeeify/index.d.ts @@ -26,15 +26,15 @@ declare namespace coffeeify { transforms?: Transforms; } - interface Aliases { + type Aliases = Array<{ cwd?: string; base?: string; - } + }>; - interface Transforms { + type Transforms = Array<{ ext?: string; transform?(data: string): string; - } + }>; } declare var coffeeify: coffeeify.Coffeeify; diff --git a/types/gulp-inject/gulp-inject-tests.ts b/types/gulp-inject/gulp-inject-tests.ts index 4cba6ccc4a..ef29ebc343 100644 --- a/types/gulp-inject/gulp-inject-tests.ts +++ b/types/gulp-inject/gulp-inject-tests.ts @@ -39,3 +39,9 @@ gulp.task("inject:transform", () => { })) .pipe(gulp.dest("build")); }); + +function createOptions(starttag: inject.ITagFunction): inject.IOptions { + return { + starttag: starttag + }; +} diff --git a/types/gulp-inject/index.d.ts b/types/gulp-inject/index.d.ts index a0c99efe78..ac6ec0172c 100644 --- a/types/gulp-inject/index.d.ts +++ b/types/gulp-inject/index.d.ts @@ -8,31 +8,31 @@ import File = require("vinyl"); -interface ITagFunction { - (targetExt: string, sourceExt: string): string; +declare function inject(sources: NodeJS.ReadableStream, options?: inject.IOptions): NodeJS.ReadWriteStream; + +declare namespace inject { + interface ITagFunction { + (targetExt: string, sourceExt: string): string; + } + + interface ITransformFunction { + (filepath: string, file?: File, index?: number, length?: number, targetFile?: File): string; + } + + interface IOptions { + ignorePath?: string | string[]; + relative?: boolean; + addPrefix?: string; + addSuffix?: string; + addRootSlash?: boolean; + name?: string; + removeTags?: boolean; + empty?: boolean; + starttag?: string | ITagFunction; + endtag?: string | ITagFunction; + transform?: ITransformFunction; + selfClosingTag?: boolean; + } } -interface ITransformFunction { - (filepath: string, file?: File, index?: number, length?: number, targetFile?: File): string; -} - -interface IOptions { - ignorePath?: string | string[]; - relative?: boolean; - addPrefix?: string; - addSuffix?: string; - addRootSlash?: boolean; - name?: string; - removeTags?: boolean; - empty?: boolean; - starttag?: string | ITagFunction; - endtag?: string | ITagFunction; - transform?: ITransformFunction; - selfClosingTag?: boolean; -} - -declare function inject(sources: NodeJS.ReadableStream, options?: IOptions): NodeJS.ReadWriteStream; - -declare namespace inject { } - export = inject; diff --git a/types/gulp-istanbul/gulp-istanbul-tests.ts b/types/gulp-istanbul/gulp-istanbul-tests.ts index a57932419d..af15f5df54 100644 --- a/types/gulp-istanbul/gulp-istanbul-tests.ts +++ b/types/gulp-istanbul/gulp-istanbul-tests.ts @@ -5,7 +5,7 @@ function testFramework(): NodeJS.ReadWriteStream { return null; } -gulp.task('test', function (cb: Function) { +gulp.task('test', function (cb: () => void) { gulp.src(['lib/**/*.js', 'main.js']) .pipe(istanbul()) // Covering files .pipe(gulp.dest('test-tmp/')) @@ -17,7 +17,7 @@ gulp.task('test', function (cb: Function) { }); }); -gulp.task('test', function (cb: Function) { +gulp.task('test', function (cb: () => void) { gulp.src(['lib/**/*.js', 'main.js']) .pipe(istanbul({includeUntested: true})) // Covering files .pipe(istanbul.hookRequire()) @@ -29,7 +29,7 @@ gulp.task('test', function (cb: Function) { }); }); -gulp.task('test', function (cb: Function) { +gulp.task('test', function (cb: () => void) { gulp.src(['lib/**/*.js', 'main.js']) .pipe(istanbul({includeUntested: true})) // Covering files .pipe(istanbul.hookRequire()) diff --git a/types/gulp-rev-replace/gulp-rev-replace-tests.ts b/types/gulp-rev-replace/gulp-rev-replace-tests.ts index e20839ab99..2d7e5a3580 100644 --- a/types/gulp-rev-replace/gulp-rev-replace-tests.ts +++ b/types/gulp-rev-replace/gulp-rev-replace-tests.ts @@ -17,21 +17,21 @@ var opt = { distFolder: 'dist' } -gulp.task("revision", ["dist:css", "dist:js"], () => +gulp.task("revision", gulp.parallel("dist:css", "dist:js", () => gulp.src(["dist/**/*.css", "dist/**/*.js"]) .pipe(rev()) .pipe(gulp.dest(opt.distFolder)) .pipe(rev.manifest()) .pipe(gulp.dest(opt.distFolder)) -); +)); -gulp.task("revreplace", ["revision"], () => { +gulp.task("revreplace", gulp.parallel("revision", () => { var manifest = gulp.src("./" + opt.distFolder + "/rev-manifest.json"); return gulp.src(opt.srcFolder + "/index.html") - .pipe(revReplace({manifest: manifest})) + .pipe(revReplace({ manifest: manifest })) .pipe(gulp.dest(opt.distFolder)); -}); +})); function replaceJsIfMap(filename: string): string { @@ -41,7 +41,7 @@ function replaceJsIfMap(filename: string): string { return filename; } -gulp.task("revreplace", ["revision"], () => { +gulp.task("revreplace", gulp.parallel("revision", () => { var manifest = gulp.src("./" + opt.distFolder + "/rev-manifest.json"); return gulp.src(opt.distFolder + '**/*.js') @@ -51,4 +51,4 @@ gulp.task("revreplace", ["revision"], () => { modifyReved: replaceJsIfMap })) .pipe(gulp.dest(opt.distFolder)); -}); +})); diff --git a/types/gulp-shell/gulp-shell-tests.ts b/types/gulp-shell/gulp-shell-tests.ts index 3bd6d906fc..17357d6c70 100644 --- a/types/gulp-shell/gulp-shell-tests.ts +++ b/types/gulp-shell/gulp-shell-tests.ts @@ -1,6 +1,3 @@ - - - import shell = require('gulp-shell'); import gulp = require('gulp'); @@ -29,14 +26,14 @@ var paths: any = { gulp.task('test', shell.task('mocha -R spec')); -gulp.task('coverage', ['test'], shell.task('istanbul cover _mocha -- -R spec')); - -gulp.task('coveralls', ['coverage'], shell.task('cat coverage/lcov.info | coveralls')); +gulp.task('coverage', gulp.parallel('test', shell.task('istanbul cover _mocha -- -R spec'))); + +gulp.task('coveralls', gulp.parallel('coverage', shell.task('cat coverage/lcov.info | coveralls'))); gulp.task('lint', shell.task('eslint ' + paths.js.join(' '))); -gulp.task('default', ['coverage', 'lint']); +gulp.task('default', gulp.parallel('coverage', 'lint')); gulp.task('watch', function () { - gulp.watch(paths.js, ['default']) + gulp.watch(paths.js) }); diff --git a/types/gulp-sourcemaps/gulp-sourcemaps-tests.ts b/types/gulp-sourcemaps/gulp-sourcemaps-tests.ts index 9ea2849f1e..f41612c4a5 100644 --- a/types/gulp-sourcemaps/gulp-sourcemaps-tests.ts +++ b/types/gulp-sourcemaps/gulp-sourcemaps-tests.ts @@ -94,4 +94,26 @@ gulp.task('javascript', function() { } })) .pipe(gulp.dest('public/scripts')); +}); + +gulp.task('javascript', function() { + var stream = gulp.src('src/**/*.js') + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write('../maps', { + clone: true + })) + .pipe(gulp.dest('public/scripts')); +}); + +gulp.task('javascript', function() { + var stream = gulp.src('src/**/*.js') + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write('../maps', { + clone: { contents: false } + })) + .pipe(gulp.dest('public/scripts')); }); \ No newline at end of file diff --git a/types/gulp-sourcemaps/index.d.ts b/types/gulp-sourcemaps/index.d.ts index 107c6560c1..8a038af6ec 100644 --- a/types/gulp-sourcemaps/index.d.ts +++ b/types/gulp-sourcemaps/index.d.ts @@ -15,11 +15,17 @@ interface WriteMapper { (file: string): string; } +interface CloneOptions { + contents?: boolean; + deep?: boolean; +} + interface WriteOptions { addComment?: boolean; includeContent?: boolean; sourceRoot?: string | WriteMapper; sourceMappingURLPrefix?: string | WriteMapper; + clone?: boolean | CloneOptions; } export declare function init(opts?: InitOptions): NodeJS.ReadWriteStream; diff --git a/types/gulp-watch/gulp-watch-tests.ts b/types/gulp-watch/gulp-watch-tests.ts index 56a676bc65..de531257a5 100644 --- a/types/gulp-watch/gulp-watch-tests.ts +++ b/types/gulp-watch/gulp-watch-tests.ts @@ -7,7 +7,7 @@ gulp.task('stream', () => .pipe(gulp.dest('build')) ); -gulp.task('callback', (cb: Function) => +gulp.task('callback', (cb: () => void) => watch('css/**/*.css', () => gulp.src('css/**/*.css') .pipe(watch('css/**/*.css')) @@ -25,3 +25,15 @@ gulp.task('build', () => { gulp.src(files, { base: '..' }) .pipe(watch(files, { base: '..' })); }); + +gulp.task('build', () => { + var files = [ + 'app/**/*.ts', + 'lib/**/*.ts', + 'components/**/*.ts', + ]; + + gulp.src(files, { cwd: '..' }) + .pipe(watch(files, { base: '..' })); +}); + diff --git a/types/gulp-watch/index.d.ts b/types/gulp-watch/index.d.ts index de56633491..f9855f09a6 100644 --- a/types/gulp-watch/index.d.ts +++ b/types/gulp-watch/index.d.ts @@ -5,8 +5,9 @@ /// +import {SrcOptions} from "vinyl-fs"; -interface IOptions { +interface IOptions extends SrcOptions { ignoreInitial?: boolean; events?: Array; base?: string; diff --git a/types/gulp/index.d.ts b/types/gulp/index.d.ts index fefd5b0fda..465cceb4e5 100644 --- a/types/gulp/index.d.ts +++ b/types/gulp/index.d.ts @@ -1,364 +1,82 @@ -// Type definitions for Gulp v4.0.x +// Type definitions for Gulp 4.0 // Project: http://gulpjs.com -// Definitions by: Drew Noakes , Juan Arroyave +// Definitions by: Drew Noakes +// Juan Arroyave +// Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// +import * as vfs from "vinyl-fs"; +import * as chokidar from "chokidar"; +import * as Undertaker from "undertaker"; +import * as fs from "fs"; +import { Duplex } from "stream"; +declare namespace GulpClient { + type Globs = string | string[]; -import Orchestrator = require("orchestrator"); -import VinylFile = require("vinyl"); -declare type Strings = string|string[]; + type TaskFunction = Undertaker.TaskFunction; -declare namespace gulp { - interface Gulp extends Orchestrator { + /** + * @deprecated - Now use `TaskFunction`. + */ + type TaskCallback = TaskFunction; + + interface Gulp extends Undertaker { /** - * Define a task - * @param name The name of the task. - * @param deps An array of task names to be executed and completed before your task will run. - * @param fn The function that performs the task's operations. For asynchronous tasks, you need to provide a hint when the task is complete: - *
      - *
    • Take in a callback
    • - *
    • Return a stream or a promise
    • - *
    - */ - task: Orchestrator.AddMethod; - /** - * Takes a number of task names or functions and returns a function of the composed tasks or functions - * When the returned function is executed, the tasks or functions will be executed in series, - * each waiting for the prior to finish. If an error occurs, execution will stop. - * @param A task name, a function or an array of either. - *
      - *
    • Take in a callback
    • - *
    • Return a stream or a promise
    • - *
    - */ - series: SeriesMethod; - /** - * Takes a number of task names or functions and returns a function of the composed tasks or functions - * When the returned function is executed, the tasks or functions will be executed in parallel, - * all being executed at the same time. If an error occurs, all execution will complete. - * @param A task name, a function or an array of either. - *
      - *
    • Take in a callback
    • - *
    • Return a stream or a promise
    • - *
    - */ - parallel: ParallelMethod; - /** - * Emits files matching provided glob or an array of globs. Returns a stream of Vinyl files that can be piped to plugins. - * @param glob Glob or array of globs to read. - * @param opt Options to pass to node-glob through glob-stream. + * Emits files matching provided glob or array of globs. Returns a stream of Vinyl files that can be piped to plugins. + * @param globs Glob or array of globs to read. + * @param options Options to pass to node-glob through glob-stream. */ src: SrcMethod; + /** * Can be piped to and it will write files. Re-emits all data passed to it so you can pipe to multiple folders. * Folders that don't exist will be created. - * - * @param outFolder The path (output folder) to write files to. Or a function that returns it, the function will be provided a vinyl File instance. - * @param opt + * @param path The path (output folder) to write files to. Or a function that returns it, the function will be provided a vinyl File instance. + * @param options */ dest: DestMethod; + /** - * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. - * - * @param glob a single glob or array of globs that indicate which files to watch for changes. - * @param opt options, that are passed to the gaze library. - * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). + * Functions exactly like gulp.dest, but will create symlinks instead of copying a directory. + * @param folder A folder path or a function that receives in a file and returns a folder path. + * @param options + */ + symlink: typeof vfs.symlink; + + /** + * Takes a path string, an array of path strings, a glob string or an array of glob strings as globs to watch on the filesystem. + * Also optionally takes options to configure the watcher and a fn to execute when a file changes. + * @globs A path string, an array of path strings, a glob string or an array of glob strings that indicate which files to watch for changes. + * @opts Options that are passed to chokidar. + * @fn Once async completion is signalled, if another run is queued, it will be executed. */ watch: WatchMethod; } - interface GulpPlugin { - (...args: any[]): NodeJS.ReadWriteStream; + interface WatchOptions extends chokidar.WatchOptions { + /** + * The delay to wait before triggering the fn. + * Useful for waiting on many changes before doing the work on changed files, e.g. find-and-replace on many files. + * @default 200 + */ + delay?: number; + /** + * Whether or not a file change should queue the fn execution if the fn is already running. Useful for a long running fn. + * @default true + */ + queue?: boolean; } interface WatchMethod { - /** - * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. - * - * @param glob a single glob or array of globs that indicate which files to watch for changes. - * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). - */ - (glob: string|string[], fn: (WatchCallback|string)): NodeJS.EventEmitter; - /** - * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. - * - * @param glob a single glob or array of globs that indicate which files to watch for changes. - * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). - */ - (glob: string|string[], fn: (WatchCallback|string)[]): NodeJS.EventEmitter; - /** - * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. - * - * @param glob a single glob or array of globs that indicate which files to watch for changes. - * @param opt options, that are passed to the gaze library. - * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). - */ - (glob: string|string[], opt: WatchOptions, fn: (WatchCallback|string)): NodeJS.EventEmitter; - /** - * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. - * - * @param glob a single glob or array of globs that indicate which files to watch for changes. - * @param opt options, that are passed to the gaze library. - * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). - */ - (glob: string|string[], opt: WatchOptions, fn: (WatchCallback|string)[]): NodeJS.EventEmitter; - + (globs: Globs, fn?: Undertaker.TaskFunction): fs.FSWatcher; + (globs: Globs, opts?: WatchOptions, fn?: Undertaker.TaskFunction): fs.FSWatcher; } - interface DestMethod { - /** - * Can be piped to and it will write files. Re-emits all data passed to it so you can pipe to multiple folders. - * Folders that don't exist will be created. - * - * @param outFolder The path (output folder) to write files to. Or a function that returns it, the function will be provided a vinyl File instance. - * @param opt - */ - (outFolder: string|((file: VinylFile) => string), opt?: DestOptions): NodeJS.ReadWriteStream; - } + type SrcMethod = typeof vfs.src; - interface SrcMethod { - /** - * Emits files matching provided glob or an array of globs. Returns a stream of Vinyl files that can be piped to plugins. - * @param glob Glob or array of globs to read. - * @param opt Options to pass to node-glob through glob-stream. - */ - (glob: string|string[], opt?: SrcOptions): NodeJS.ReadWriteStream; - } - interface SeriesMethod { - /** - * Takes a number of task names or functions and returns a function of the composed tasks or functions. - * When using task names, the task should already be registered. - * When the returned function is executed, the tasks or functions will be executed in series, - * each waiting for the prior to finish. If an error occurs, execution will stop. - * @param tasks, string, function or array of both. - */ - (...tasks: string[]): NodeJS.EventEmitter; - - (...tasks: Function[]): NodeJS.EventEmitter; - - (task: string|string[], ...fn: Function[]): NodeJS.EventEmitter; - - //TODO: TypeScript cannot express varargs followed by callback as a last argument... - (task1: Strings, task2: Strings, cb?: (error?: any) => any): Function; - (task1: Strings, task2: Strings, task3: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; - (task1: Strings, task2: Strings, task3: Strings, task4: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; - (task1: Strings, task2: Strings, task3: Strings, task4: Strings, task5: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; - (task1: Strings, task2: Strings, task3: Strings, task4: Strings, task5: Strings, task6: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; - - } - - interface ParallelMethod { - /** - * Takes a number of task names or functions and returns a function of the composed tasks or functions. - * When using task names, the task should already be registered. - * When the returned function is executed, the tasks or functions will be executed in parallel, - * all being executed at the same time. If an error occurs, all execution will complete. - * @param tasks, string, function or array of both. - */ - (...tasks: string[]): NodeJS.EventEmitter; - - (...tasks: Function[]): NodeJS.EventEmitter; - - (task: string|string[], ...fn: Function[]): NodeJS.EventEmitter; - - //TODO: TypeScript cannot express varargs followed by callback as a last argument... - (task1: Strings, task2: Strings, cb?: (error?: any) => any): Function; - (task1: Strings, task2: Strings, task3: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; - (task1: Strings, task2: Strings, task3: Strings, task4: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; - (task1: Strings, task2: Strings, task3: Strings, task4: Strings, task5: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; - (task1: Strings, task2: Strings, task3: Strings, task4: Strings, task5: Strings, task6: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; - - } - - /** - * Options to pass to node-glob through glob-stream. - * Specifies two options in addition to those used by node-glob: - * https://github.com/isaacs/node-glob#options - */ - interface SrcOptions { - /** - * Setting this to false will return file.contents as null - * and not read the file at all. - * Default: true. - */ - read?: boolean; - - /** - * Setting this to false will return file.contents as a stream and not buffer files. - * This is useful when working with large files. - * Note: Plugins might not implement support for streams. - * Default: true. - */ - buffer?: boolean; - - /** - * The base path of a glob. - * - * Default is everything before a glob starts. - */ - base?: string; - - /** - * The current working directory in which to search. - * Defaults to process.cwd(). - */ - cwd?: string; - - /** - * The place where patterns starting with / will be mounted onto. - * Defaults to path.resolve(options.cwd, "/") (/ on Unix systems, and C:\ or some such on Windows.) - */ - root?: string; - - /** - * Include .dot files in normal matches and globstar matches. - * Note that an explicit dot in a portion of the pattern will always match dot files. - */ - dot?: boolean; - - /** - * Set to match only fles, not directories. Set this flag to prevent copying empty directories - */ - nodir?: boolean; - - /** - * By default, a pattern starting with a forward-slash will be "mounted" onto the root setting, so that a valid - * filesystem path is returned. Set this flag to disable that behavior. - */ - nomount?: boolean; - - /** - * Add a / character to directory matches. Note that this requires additional stat calls. - */ - mark?: boolean; - - /** - * Don't sort the results. - */ - nosort?: boolean; - - /** - * Set to true to stat all results. This reduces performance somewhat, and is completely unnecessary, unless - * readdir is presumed to be an untrustworthy indicator of file existence. It will cause ELOOP to be triggered one - * level sooner in the case of cyclical symbolic links. - */ - stat?: boolean; - - /** - * When an unusual error is encountered when attempting to read a directory, a warning will be printed to stderr. - * Set the silent option to true to suppress these warnings. - */ - silent?: boolean; - - /** - * When an unusual error is encountered when attempting to read a directory, the process will just continue on in - * search of other matches. Set the strict option to raise an error in these cases. - */ - strict?: boolean; - - /** - * See cache property above. Pass in a previously generated cache object to save some fs calls. - */ - cache?: boolean; - - /** - * A cache of results of filesystem information, to prevent unnecessary stat calls. - * While it should not normally be necessary to set this, you may pass the statCache from one glob() call to the - * options object of another, if you know that the filesystem will not change between calls. - */ - statCache?: boolean; - - /** - * Perform a synchronous glob search. - */ - sync?: boolean; - - /** - * In some cases, brace-expanded patterns can result in the same file showing up multiple times in the result set. - * By default, this implementation prevents duplicates in the result set. Set this flag to disable that behavior. - */ - nounique?: boolean; - - /** - * Set to never return an empty set, instead returning a set containing the pattern itself. - * This is the default in glob(3). - */ - nonull?: boolean; - - /** - * Perform a case-insensitive match. Note that case-insensitive filesystems will sometimes result in glob returning - * results that are case-insensitively matched anyway, since readdir and stat will not raise an error. - */ - nocase?: boolean; - - /** - * Set to enable debug logging in minimatch and glob. - */ - debug?: boolean; - - /** - * Set to enable debug logging in glob, but not minimatch. - */ - globDebug?: boolean; - } - - interface DestOptions { - /** - * The output folder. Only has an effect if provided output folder is relative. - * Default: process.cwd() - */ - cwd?: string; - - /** - * Octal permission string specifying mode for any folders that need to be created for output folder. - * Default: 0777. - */ - mode?: string; - } - - /** - * Options that are passed to gaze. - * https://github.com/shama/gaze - */ - interface WatchOptions { - /** Interval to pass to fs.watchFile. */ - interval?: number; - /** Delay for events called in succession for the same file/event. */ - debounceDelay?: number; - /** Force the watch mode. Either 'auto' (default), 'watch' (force native events), or 'poll' (force stat polling). */ - mode?: string; - /** The current working directory to base file patterns from. Default is process.cwd().. */ - cwd?: string; - } - - interface WatchEvent { - /** The type of change that occurred, either added, changed or deleted. */ - type: string; - /** The path to the file that triggered the event. */ - path: string; - } - - /** - * Callback to be called on each watched file change. - */ - interface WatchCallback { - (event: WatchEvent): void; - } - - interface TaskCallback { - /** - * Defines a task. - * Tasks may be made asynchronous if they are passing a callback or return a promise or a stream. - * @param cb callback used to signal asynchronous completion. Caller includes err in case of error. - */ - (cb?: (err?: any) => void): any; - } + type DestMethod = typeof vfs.dest; } -declare var gulp: gulp.Gulp; - -export = gulp; +declare const GulpClient: GulpClient.Gulp; +export = GulpClient; diff --git a/types/gulp/test/index.ts b/types/gulp/test/index.ts new file mode 100644 index 0000000000..40807f890a --- /dev/null +++ b/types/gulp/test/index.ts @@ -0,0 +1,181 @@ +import * as gulp from 'gulp'; +import * as undertaker from 'undertaker'; +import * as registry from 'undertaker-registry'; +import * as del from "del"; + +const minify: () => any = () => { }; +const jade: () => any = () => { }; +const someplugin: () => any = () => { }; +const promisedDel: (list: string[]) => any = (list) => { }; + +gulp.src('client/templates/*.jade') + .pipe(jade()) + .pipe(minify()) + .pipe(gulp.dest('build/minified_templates')); + +// exclude every JS file that starts with a b except bad.js +gulp.src(['*.js', '!b*.js', 'bad.js']); + +// Matches 'client/js/somedir/somefile.js' and resolves `base` to `client/js/` +gulp.src('client/js/**/*.js') + .pipe(minify()) + .pipe(gulp.dest('build')); // Writes 'build/somedir/somefile.js' + +gulp.src('client/js/**/*.js', { base: 'client' }) + .pipe(minify()) + .pipe(gulp.dest('build')); // Writes 'build/js/somedir/somefile.js' + +// Emits an error if app/scripts.js doesn't exist +gulp.src('app/scripts.js'); + +// Won't emit an error +gulp.src('app/scripts.js', { allowEmpty: true }); + +gulp.src('./client/templates/*.jade') + .pipe(jade()) + .pipe(gulp.dest('./build/templates')) + .pipe(minify()) + .pipe(gulp.dest('./build/minified_templates')); + +gulp.task(() => { + // Do stuff +}); + +// someTask will be the registered task function +const someTask = gulp.task('someTask'); + +const someNextTask = () => { + return gulp.src(['some/glob/**/*.ext']).pipe(someplugin()); +}; + +gulp.task(someTask); + +let foo: gulp.TaskFunction = () => { }; +foo.name === 'foo'; // true + +const bar: gulp.TaskFunction = () => { }; +bar.name === ''; // true + +bar.name = 'bar'; +bar.name === ''; // true + +let test: gulp.TaskFunction = (done) => { + done(); +}; + +gulp.task(test); + +gulp.task('clean', (done) => { + del(['.build/'], done); +}); + +gulp.task('somename', () => { + return gulp.src('client/**/*.js') + .pipe(minify()) + .pipe(gulp.dest('build')); +}); + +gulp.task('clean', () => { + return new Promise((resolve, reject) => { + del(['.build/'], (err: any) => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); +}); + +gulp.task('clean', () => { + return promisedDel(['.build/']); +}); + +gulp.task('one', (done) => { + // do stuff + done(); +}); + +gulp.task('two', (done) => { + // do stuff + done(); +}); + +gulp.task('default', gulp.parallel('one', 'two', (done) => { + // do more stuff + done(); +})); + +gulp.task('one', (done) => { + // do stuff + done(); +}); + +gulp.task('two', (done) => { + // do stuff + done(); +}); + +gulp.task('default', gulp.series('one', 'two', (done) => { + // do more stuff + done(); +})); + +gulp.watch('js/**/*.js', gulp.parallel('concat', 'uglify')); + +const watcher = gulp.watch('js/**/*.js', gulp.parallel('concat', 'uglify')); +// watcher.close +watcher.on('change', (path, stats) => { + console.log('File ' + path + ' was changed'); +}); + +watcher.on('unlink', (path: string) => { + console.log('File ' + path + ' was removed'); +}); + +gulp.task('one', (done) => { + // do stuff + done(); +}); + +gulp.task('two', (done) => { + // do stuff + done(); +}); + +gulp.task('three', (done) => { + // do stuff + done(); +}); + +gulp.task('four', gulp.series('one', 'two')); + +gulp.task('five', + gulp.series('four', + gulp.parallel('three', (done) => { + // do more stuff + done(); + }) + ) +); + +gulp.tree(); + +gulp.tree({ deep: true }); + +// gulpfile.js + +const companyTasks = {} as registry; + +gulp.registry(companyTasks); + +gulp.task('one', gulp.parallel('someCompanyTask', (done) => { + console.log('in task one'); + done(); +})); + +gulp.symlink("path/to/dir"); + +gulp.symlink(() => { + return "resolved/path/to/dir"; +}); diff --git a/types/gulp/tsconfig.json b/types/gulp/tsconfig.json index 01afedbf29..08bee78c82 100644 --- a/types/gulp/tsconfig.json +++ b/types/gulp/tsconfig.json @@ -2,24 +2,23 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, "baseUrl": "../", "typeRoots": [ "../" ], - "paths": { - "q": [ "q/v0" ] - }, + "jsx": "react", "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true }, "files": [ "index.d.ts", - "gulp-tests.ts" + "test/index.ts" ] -} \ No newline at end of file +} diff --git a/types/gulp/tslint.json b/types/gulp/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/gulp/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/gulp/gulp-tests.ts b/types/gulp/v3/gulp-tests.ts similarity index 100% rename from types/gulp/gulp-tests.ts rename to types/gulp/v3/gulp-tests.ts diff --git a/types/gulp/v3/index.d.ts b/types/gulp/v3/index.d.ts new file mode 100644 index 0000000000..4abdba21ed --- /dev/null +++ b/types/gulp/v3/index.d.ts @@ -0,0 +1,308 @@ +// Type definitions for Gulp 3.8 +// Project: http://gulpjs.com +// Definitions by: Drew Noakes +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// + +import Orchestrator = require('orchestrator'); +import VinylFile = require('vinyl'); + +declare namespace gulp { + interface Gulp extends Orchestrator { + task(name: string): never; + /** + * Define a task + * @param name The name of the task. + * @param deps An array of task names to be executed and completed before your task will run. + * @param fn The function that performs the task's operations. For asynchronous tasks, you need to provide a hint when the task is complete: + *
      + *
    • Take in a callback
    • + *
    • Return a stream or a promise
    • + *
    + */ + task(name: string, fn?: Orchestrator.TaskFunc): Gulp; + /** + * Define a task + * @param name The name of the task. + * @param deps An array of task names to be executed and completed before your task will run. + * @param fn The function that performs the task's operations. For asynchronous tasks, you need to provide a hint when the task is complete: + *
      + *
    • Take in a callback
    • + *
    • Return a stream or a promise
    • + *
    + */ + task(name: string, deps?: string[], fn?: Orchestrator.TaskFunc): Gulp; + + /** + * Emits files matching provided glob or an array of globs. Returns a stream of Vinyl files that can be piped to plugins. + * @param glob Glob or array of globs to read. + * @param opt Options to pass to node-glob through glob-stream. + */ + src: SrcMethod; + /** + * Can be piped to and it will write files. Re-emits all data passed to it so you can pipe to multiple folders. + * Folders that don't exist will be created. + * + * @param outFolder The path (output folder) to write files to. Or a function that returns it, the function will be provided a vinyl File instance. + * @param opt + */ + dest: DestMethod; + /** + * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. + * + * @param glob a single glob or array of globs that indicate which files to watch for changes. + * @param opt options, that are passed to the gaze library. + * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). + */ + watch: WatchMethod; + } + + interface GulpPlugin { + (...args: any[]): NodeJS.ReadWriteStream; + } + + interface WatchMethod { + /** + * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. + * + * @param glob a single glob or array of globs that indicate which files to watch for changes. + * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). + */ + (glob: string | string[], fn: (WatchCallback | string)): NodeJS.EventEmitter; + /** + * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. + * + * @param glob a single glob or array of globs that indicate which files to watch for changes. + * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). + */ + (glob: string | string[], fn: (WatchCallback | string)[]): NodeJS.EventEmitter; + /** + * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. + * + * @param glob a single glob or array of globs that indicate which files to watch for changes. + * @param opt options, that are passed to the gaze library. + * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). + */ + (glob: string | string[], opt: WatchOptions, fn: (WatchCallback | string)): NodeJS.EventEmitter; + /** + * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. + * + * @param glob a single glob or array of globs that indicate which files to watch for changes. + * @param opt options, that are passed to the gaze library. + * @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task(). + */ + (glob: string | string[], opt: WatchOptions, fn: (WatchCallback | string)[]): NodeJS.EventEmitter; + + } + + interface DestMethod { + /** + * Can be piped to and it will write files. Re-emits all data passed to it so you can pipe to multiple folders. + * Folders that don't exist will be created. + * + * @param outFolder The path (output folder) to write files to. Or a function that returns it, the function will be provided a vinyl File instance. + * @param opt + */ + (outFolder: string | ((file: VinylFile) => string), opt?: DestOptions): NodeJS.ReadWriteStream; + } + + interface SrcMethod { + /** + * Emits files matching provided glob or an array of globs. Returns a stream of Vinyl files that can be piped to plugins. + * @param glob Glob or array of globs to read. + * @param opt Options to pass to node-glob through glob-stream. + */ + (glob: string | string[], opt?: SrcOptions): NodeJS.ReadWriteStream; + } + + /** + * Options to pass to node-glob through glob-stream. + * Specifies two options in addition to those used by node-glob: + * https://github.com/isaacs/node-glob#options + */ + interface SrcOptions { + /** + * Setting this to false will return file.contents as null + * and not read the file at all. + * Default: true. + */ + read?: boolean; + + /** + * Setting this to false will return file.contents as a stream and not buffer files. + * This is useful when working with large files. + * Note: Plugins might not implement support for streams. + * Default: true. + */ + buffer?: boolean; + + /** + * The base path of a glob. + * + * Default is everything before a glob starts. + */ + base?: string; + + /** + * The current working directory in which to search. + * Defaults to process.cwd(). + */ + cwd?: string; + + /** + * The place where patterns starting with / will be mounted onto. + * Defaults to path.resolve(options.cwd, "/") (/ on Unix systems, and C:\ or some such on Windows.) + */ + root?: string; + + /** + * Include .dot files in normal matches and globstar matches. + * Note that an explicit dot in a portion of the pattern will always match dot files. + */ + dot?: boolean; + + /** + * Set to match only fles, not directories. Set this flag to prevent copying empty directories + */ + nodir?: boolean; + + /** + * By default, a pattern starting with a forward-slash will be "mounted" onto the root setting, so that a valid + * filesystem path is returned. Set this flag to disable that behavior. + */ + nomount?: boolean; + + /** + * Add a / character to directory matches. Note that this requires additional stat calls. + */ + mark?: boolean; + + /** + * Don't sort the results. + */ + nosort?: boolean; + + /** + * Set to true to stat all results. This reduces performance somewhat, and is completely unnecessary, unless + * readdir is presumed to be an untrustworthy indicator of file existence. It will cause ELOOP to be triggered one + * level sooner in the case of cyclical symbolic links. + */ + stat?: boolean; + + /** + * When an unusual error is encountered when attempting to read a directory, a warning will be printed to stderr. + * Set the silent option to true to suppress these warnings. + */ + silent?: boolean; + + /** + * When an unusual error is encountered when attempting to read a directory, the process will just continue on in + * search of other matches. Set the strict option to raise an error in these cases. + */ + strict?: boolean; + + /** + * See cache property above. Pass in a previously generated cache object to save some fs calls. + */ + cache?: boolean; + + /** + * A cache of results of filesystem information, to prevent unnecessary stat calls. + * While it should not normally be necessary to set this, you may pass the statCache from one glob() call to the + * options object of another, if you know that the filesystem will not change between calls. + */ + statCache?: boolean; + + /** + * Perform a synchronous glob search. + */ + sync?: boolean; + + /** + * In some cases, brace-expanded patterns can result in the same file showing up multiple times in the result set. + * By default, this implementation prevents duplicates in the result set. Set this flag to disable that behavior. + */ + nounique?: boolean; + + /** + * Set to never return an empty set, instead returning a set containing the pattern itself. + * This is the default in glob(3). + */ + nonull?: boolean; + + /** + * Perform a case-insensitive match. Note that case-insensitive filesystems will sometimes result in glob returning + * results that are case-insensitively matched anyway, since readdir and stat will not raise an error. + */ + nocase?: boolean; + + /** + * Set to enable debug logging in minimatch and glob. + */ + debug?: boolean; + + /** + * Set to enable debug logging in glob, but not minimatch. + */ + globDebug?: boolean; + } + + interface DestOptions { + /** + * The output folder. Only has an effect if provided output folder is relative. + * Default: process.cwd() + */ + cwd?: string; + + /** + * Octal permission string specifying mode for any folders that need to be created for output folder. + * Default: 0777. + */ + mode?: string; + } + + /** + * Options that are passed to gaze. + * https://github.com/shama/gaze + */ + interface WatchOptions { + /** Interval to pass to fs.watchFile. */ + interval?: number; + /** Delay for events called in succession for the same file/event. */ + debounceDelay?: number; + /** Force the watch mode. Either 'auto' (default), 'watch' (force native events), or 'poll' (force stat polling). */ + mode?: string; + /** The current working directory to base file patterns from. Default is process.cwd().. */ + cwd?: string; + } + + interface WatchEvent { + /** The type of change that occurred, either added, changed or deleted. */ + type: string; + /** The path to the file that triggered the event. */ + path: string; + } + + /** + * Callback to be called on each watched file change. + */ + interface WatchCallback { + (event: WatchEvent): void; + } + + interface TaskCallback { + /** + * Defines a task. + * Tasks may be made asynchronous if they are passing a callback or return a promise or a stream. + * @param cb callback used to signal asynchronous completion. Caller includes err in case of error. + */ + (cb?: (err?: any) => void): any; + } +} + +declare var gulp: gulp.Gulp; + +export = gulp; diff --git a/types/gulp/v3/tsconfig.json b/types/gulp/v3/tsconfig.json new file mode 100644 index 0000000000..242192adaa --- /dev/null +++ b/types/gulp/v3/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "gulp": [ + "gulp/v3" + ], + "q": [ + "q/v0" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-tests.ts" + ] +} diff --git a/types/h2o2/h2o2-tests.ts b/types/h2o2/h2o2-tests.ts index f8e88c5c9b..48b05b8aa3 100644 --- a/types/h2o2/h2o2-tests.ts +++ b/types/h2o2/h2o2-tests.ts @@ -95,7 +95,7 @@ server.route({ Wreck.read(res, { json: true }, function (err, payload) { console.log('some payload manipulation if you want to.') - reply(payload).headers = res.headers; + reply(payload).headers = res.headers as any; }); } } @@ -157,7 +157,7 @@ server.route({ Wreck.read(res, { json: true }, function (err: null | Boom.BoomError, payload: any) { console.log('some payload manipulation if you want to.') - reply(payload).headers = res.headers; + reply(payload).headers = res.headers as any; }); } } diff --git a/types/h2o2/index.d.ts b/types/h2o2/index.d.ts index a1a3680e5c..7ca3ccb85f 100644 --- a/types/h2o2/index.d.ts +++ b/types/h2o2/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/hapijs/catbox // Definitions by: Jason Swearingen , AJP // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 /// diff --git a/types/halogen/index.d.ts b/types/halogen/index.d.ts index 35337e7e9f..216281972e 100644 --- a/types/halogen/index.d.ts +++ b/types/halogen/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/yuanyan/halogen // Definitions by: Vincent Rouffiat // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 import * as react from "react"; @@ -34,50 +34,50 @@ export interface RadiusLoaderProps extends MarginLoaderProps { /** * React components */ -export type PulseLoader = react.Component, {}>; +export type PulseLoader = react.Component>; export const PulseLoader: react.ComponentClass>; -export type RotateLoader = react.Component, {}>; +export type RotateLoader = react.Component>; export const RotateLoader: react.ComponentClass>; -export type BeatLoader = react.Component, {}>; +export type BeatLoader = react.Component>; export const BeatLoader: react.ComponentClass>; -export type RiseLoader = react.Component, {}>; +export type RiseLoader = react.Component>; export const RiseLoader: react.ComponentClass>; -export type SyncLoader = react.Component, {}>; +export type SyncLoader = react.Component>; export const SyncLoader: react.ComponentClass>; -export type GridLoader = react.Component, {}>; +export type GridLoader = react.Component>; export const GridLoader: react.ComponentClass>; -export type ClipLoader = react.Component; +export type ClipLoader = react.Component; export const ClipLoader: react.ComponentClass; -export type SquareLoader = react.Component; +export type SquareLoader = react.Component; export const SquareLoader: react.ComponentClass; -export type DotLoader = react.Component; +export type DotLoader = react.Component; export const DotLoader: react.ComponentClass; -export type PacmanLoader = react.Component, {}>; +export type PacmanLoader = react.Component>; export const PacmanLoader: react.ComponentClass>; -export type MoonLoader = react.Component; +export type MoonLoader = react.Component; export const MoonLoader: react.ComponentClass; -export type RingLoader = react.Component; +export type RingLoader = react.Component; export const RingLoader: react.ComponentClass; -export type BounceLoader = react.Component; +export type BounceLoader = react.Component; export const BounceLoader: react.ComponentClass; -export type SkewLoader = react.Component; +export type SkewLoader = react.Component; export const SkewLoader: react.ComponentClass; -export type FadeLoader = react.Component; +export type FadeLoader = react.Component; export const FadeLoader: react.ComponentClass; -export type ScaleLoader = react.Component; +export type ScaleLoader = react.Component; export const ScaleLoader: react.ComponentClass; diff --git a/types/halogen/test/clip-loader.tsx b/types/halogen/test/clip-loader.tsx index 02f0dd232c..af3a72762f 100644 --- a/types/halogen/test/clip-loader.tsx +++ b/types/halogen/test/clip-loader.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import * as Halogen from "halogen"; -class HalogenTests_ClipLoader_withNoProps extends React.Component, {}> { +class HalogenTests_ClipLoader_withNoProps extends React.Component> { render() { return ( @@ -9,7 +9,7 @@ class HalogenTests_ClipLoader_withNoProps extends React.Component, {}> { +class HalogenTests_ClipLoader_withAllProps extends React.Component> { render() { return ( diff --git a/types/halogen/test/fade-loader.tsx b/types/halogen/test/fade-loader.tsx index deeae1ce95..23fb8fa3ca 100644 --- a/types/halogen/test/fade-loader.tsx +++ b/types/halogen/test/fade-loader.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import * as Halogen from "halogen"; -class HalogenTests_FadeLoader_withNoProps extends React.Component, {}> { +class HalogenTests_FadeLoader_withNoProps extends React.Component> { render() { return ( @@ -9,7 +9,7 @@ class HalogenTests_FadeLoader_withNoProps extends React.Component, {}> { +class HalogenTests_FadeLoader_withAllProps extends React.Component> { render() { return ( , {}> { +class HalogenTests_PacmanLoader_withNoProps extends React.Component> { render() { return ( @@ -9,7 +9,7 @@ class HalogenTests_PacmanLoader_withNoProps extends React.Component, {}> { +class HalogenTests_PacmanLoader_withAllProps extends React.Component> { render() { return ( diff --git a/types/halogen/test/rotate-loader.tsx b/types/halogen/test/rotate-loader.tsx index a5325a4962..38274aefea 100644 --- a/types/halogen/test/rotate-loader.tsx +++ b/types/halogen/test/rotate-loader.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import * as Halogen from "halogen"; -class HalogenTests_RotateLoader_withNoProps extends React.Component, {}> { +class HalogenTests_RotateLoader_withNoProps extends React.Component> { render() { return ( @@ -9,7 +9,7 @@ class HalogenTests_RotateLoader_withNoProps extends React.Component, {}> { +class HalogenTests_RotateLoader_withAllProps extends React.Component> { render() { return ( diff --git a/types/hammerjs/v1/index.d.ts b/types/hammerjs/v1/index.d.ts index e01ea87384..690d079041 100644 --- a/types/hammerjs/v1/index.d.ts +++ b/types/hammerjs/v1/index.d.ts @@ -2,6 +2,7 @@ // Project: http://eightmedia.github.com/hammer.js/ // Definitions by: Boris Yankov , Drew Noakes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/handlebars/index.d.ts b/types/handlebars/index.d.ts index d3ab2c80e3..71cc0a2cfe 100644 --- a/types/handlebars/index.d.ts +++ b/types/handlebars/index.d.ts @@ -15,6 +15,7 @@ declare namespace Handlebars { export function K(): void; export function createFrame(object: any): any; + export function blockParams(obj: any[], ids: any[]): any[]; export function Exception(message: string): void; export function log(level: number, obj: any): void; export function parse(input: string): hbs.AST.Program; @@ -142,7 +143,8 @@ declare namespace hbs { namespace Utils { function escapeExpression(str: string): string; - function createFrame(obj: Object): Object; + function createFrame(object: any): any; + function blockParams(obj: any[], ids: any[]): any[]; function isEmpty(obj: any) : boolean; function extend(obj: any, ...source: any[]): any; function toString(obj: any): string; diff --git a/types/hapi-auth-basic/index.d.ts b/types/hapi-auth-basic/index.d.ts index 23b06de111..07c3c8cc20 100644 --- a/types/hapi-auth-basic/index.d.ts +++ b/types/hapi-auth-basic/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/hapijs/hapi-auth-basic // Definitions by: AJP // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import * as Hapi from 'hapi'; diff --git a/types/hapi-decorators/index.d.ts b/types/hapi-decorators/index.d.ts index 2933945e64..e4d7c40991 100644 --- a/types/hapi-decorators/index.d.ts +++ b/types/hapi-decorators/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/knownasilya/hapi-decorators // Definitions by: Ken Howard // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as hapi from 'hapi'; import * as Joi from 'joi'; diff --git a/types/hapi/index.d.ts b/types/hapi/index.d.ts index 3567e50c34..91432e1d1f 100644 --- a/types/hapi/index.d.ts +++ b/types/hapi/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/hapijs/hapi // Definitions by: Jason Swearingen , AJP // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -35,8 +35,11 @@ import domain = require("domain"); import * as Boom from 'boom'; import { ValidationOptions as JoiValidationOptions, - Schema as JoiValidationObject, + SchemaMap as JoiSchemaMap, + Schema as JoiSchema, } from 'joi'; +// TODO check JoiValidationObject is correct for "a Joi validation object" +type JoiValidationObject = JoiSchema | JoiSchemaMap | (JoiSchema | JoiSchemaMap)[]; import * as Catbox from 'catbox'; import {MimosOptions} from 'mimos'; @@ -262,8 +265,10 @@ export class Server extends Podium { * [See docs](https://hapijs.com/api/16.1.1#serverextevents) * @param events see @ServerExtConfigurationObject */ - ext(events: ServerExtConfigurationObject[]): void; - ext(events: ServerExtConfigurationObject): void; + ext(events: ServerStartExtConfigurationObject): void; + ext(events: ServerStartExtConfigurationObject[]): void; + ext(events: ServerRequestExtConfigurationObjectWithRequest): void; + ext(events: ServerRequestExtConfigurationObjectWithRequest[]): void; /** * Registers a single extension event using the same properties as used in server.ext(events), but passed as arguments. * [See docs](https://hapijs.com/api/16.1.1#serverextevent-method-options) @@ -271,8 +276,10 @@ export class Server extends Podium { * @param method a function or an array of functions to be executed at a specified point during request processing. * @param options */ - ext(event: ServerExtPoints, method: ServerExtMethod[], options?: ServerExtOptions): void; - ext(event: ServerExtPoints, method: ServerExtMethod, options?: ServerExtOptions): void; + ext(event: ServerStartExtPoints, method: ServerExtFunction[], options?: ServerExtOptions): void; + ext(event: ServerStartExtPoints, method: ServerExtFunction, options?: ServerExtOptions): void; + ext(event: ServerRequestExtPoints, method: ServerExtRequestHandler[], options?: ServerExtOptions): void; + ext(event: ServerRequestExtPoints, method: ServerExtRequestHandler, options?: ServerExtOptions): void; /** * Registers a new handler type to be used in routes * The method function can have a defaults object or function property. If the property is set to an object, that object is used as the default route config for routes using this handler. If the property is set to a function, the function uses the signature function(method) and returns the route default configuration. @@ -473,6 +480,8 @@ export class Server extends Podium { table(host?: string): RoutingTableEntry[]; } +export interface PluginSpecificConfiguration {} + /** * Server Options * Note that the options object is deeply cloned and cannot contain any values that are unsafe to perform deep copy on. @@ -505,7 +514,7 @@ export interface ServerOptions { /** options passed to the mimos module (https://github.com/hapijs/mimos) when generating the mime database used by the server and accessed via server.mime. */ mime?: MimosOptions; /** plugin-specific configuration which can later be accessed via server.settings.plugins. plugins is an object where each key is a plugin name and the value is the configuration. Note the difference between server.settings.plugins which is used to store static configuration values and server.plugins which is meant for storing run-time state. Defaults to {}. */ - plugins?: Object; + plugins?: PluginSpecificConfiguration; /** if false, will not use node domains to protect against exceptions thrown in handlers and other external code. Defaults to true. */ useDomains?: boolean; } @@ -669,6 +678,10 @@ export interface CatboxServerCacheConfiguration extends Catbox.PolicyOptions { * [See docs](https://hapijs.com/api/16.1.1#servercacheprovisionoptions-callback) example code includes use of `name` option. But server.cache.provision of `options` says "same as the server cache configuration options.". */ name?: string; + /** + * Additional options to be passed to the Catbox strategy + */ + [s: string]: any; } /** @@ -695,7 +708,7 @@ export interface InjectedRequestOptions extends Shot.RequestOptions { */ export interface InjectedResponseObject extends Shot.ResponseObject { /** the raw handler response (e.g. when not a stream or a view) before it is serialized for transmission. If not available, the value is set to payload. Useful for inspection and reuse of the internal objects returned (instead of parsing the response string). */ - result: Shot.ResponseObject | string; + result: Object | string; /** the request object. */ request: InjectedRequestOptions; } @@ -718,7 +731,7 @@ export interface ConnectionConfigurationServerDefaults { maxEventLoopDelay: number; }; /** plugin-specific configuration which can later be accessed via connection.settings.plugins. Provides a place to store and pass connection-specific plugin configuration. plugins is an object where each key is a plugin name and the value is the configuration. Note the difference between connection.settings.plugins which is used to store configuration values and connection.plugins which is meant for storing run-time state. */ - plugins?: any; + plugins?: PluginSpecificConfiguration; /** controls how incoming request URIs are matched against the routing table: */ router?: { /** determines whether the paths '/example' and '/EXAMPLE' are considered different resources. Defaults to true. */ @@ -880,16 +893,51 @@ export interface CorsConfigurationObject { * [See docs](https://hapijs.com/api/16.1.1#serverextevents) * For context see RouteAdditionalConfigurationOptions > ext */ -export interface ServerExtConfigurationObject { +export interface ServerStartExtConfigurationObject { /** the extension point event name. */ - type: ServerExtPoints; + type: ServerStartExtPoints; /** * a function or an array of functions to be executed at a specified point during request processing. The required extension function signature is see ServerExtFunction or see ServerExtRequestHandler */ - method: ServerExtMethod | ServerExtMethod[]; + method: ServerExtFunction | ServerExtFunction[]; options?: ServerExtOptions; } +/** + * An object describing the extension function used whilst registering the extension function in one of the available extension points + * [See docs](https://hapijs.com/api/16.1.1#serverextevents) + * For context see RouteAdditionalConfigurationOptions > ext + */ +export interface ServerRequestExtConfigurationObject { + /** the extension point event name. */ + type: ServerRequestExtPointsBase; + /** + * a function or an array of functions to be executed at a specified point during request processing. The required extension function signature is see ServerExtFunction or see ServerExtRequestHandler + */ + method: ServerExtRequestHandler | ServerExtRequestHandler[] + options?: ServerExtOptions; +} + +/** + * An object describing the extension function used whilst registering the extension function in one of the available extension points + * [See docs](https://hapijs.com/api/16.1.1#serverextevents) + * For context see RouteAdditionalConfigurationOptions > ext + */ +export interface ServerRequestExtConfigurationObjectWithRequest { + /** the extension point event name. */ + type: ServerRequestExtPoints; + /** + * a function or an array of functions to be executed at a specified point during request processing. The required extension function signature is see ServerExtFunction or see ServerExtRequestHandler + */ + method: ServerExtRequestHandler | ServerExtRequestHandler[]; + options?: ServerExtOptions; +} + +/** + * [See docs](https://hapijs.com/api/16.1.1#route-configuration) > ext + */ +export type RouteExtConfigurationObject = ServerStartExtConfigurationObject | ServerRequestExtConfigurationObject; + /** * [See docs](https://hapijs.com/api/16.1.1#serverextevents) > events > method */ @@ -910,15 +958,20 @@ export interface ServerExtOptions { } /** - * [See docs](https://hapijs.com/api/16.1.1#request-lifecycle) - * The available extension points include the request extension points as well as the following server extension points: + * [See docs](https://hapijs.com/api/16.1.1#serverextevents) > events > type * * 'onPreStart' - called before the connection listeners are started. * * 'onPostStart' - called after the connection listeners are started. * * 'onPreStop' - called before the connection listeners are stopped. * * 'onPostStop' - called after the connection listeners are stopped. - * [See docs](https://hapijs.com/api/16.1.1#serverextevents) > events > type */ -export type ServerExtPoints = 'onRequest' | 'onPreResponse' | 'onPreAuth' | 'onPostAuth' | 'onPreHandler' | 'onPostHandler' | 'onPreResponse' | 'onPreStart' | 'onPostStart' | 'onPreStop' | 'onPostStop'; +export type ServerStartExtPoints = 'onPreStart' | 'onPostStart' | 'onPreStop' | 'onPostStop'; +/** + * [See docs](https://hapijs.com/api/16.1.1#request-lifecycle) + * * The available extension points include the request extension points as well as the following server extension points: + */ +export type ServerRequestExtPointsBase = 'onPreResponse' | 'onPreAuth' | 'onPostAuth' | 'onPreHandler' | 'onPostHandler' | 'onPreResponse'; + +export type ServerRequestExtPoints = ServerRequestExtPointsBase | 'onRequest'; /** * Server extension function registered an one of the server extension points @@ -985,7 +1038,7 @@ export interface RoutePayloadConfigurationObject { /** the default 'Content-Type' HTTP header value is not present. Defaults to 'application/json'. */ defaultContentType?: string; /** an object where each key is a content-encoding name and each value is an object with the desired decoder settings. Note that encoder settings are set in the root option compression. */ - compression: Dictionary; + compression?: Dictionary; } export type PayLoadOutputOption = 'data' | 'stream' | 'file'; @@ -1079,7 +1132,7 @@ export interface RouteAdditionalConfigurationOptions { /** the Cross-Origin Resource Sharing protocol allows browsers to make cross-origin API calls. CORS is required by web applications running inside a browser which are loaded from a different domain than the API server. CORS headers are disabled by default (false). To enable, set cors to true, or to an object */ cors?: boolean | CorsConfigurationObject; /** defined a route-level request extension points by setting the option to an object with a key for each of the desired extension points ('onRequest' is not allowed), and the value is the same as the [server.ext(events)](https://hapijs.com/api/16.1.1#serverextevents) event argument. */ - ext?: Dictionary; + ext?: RouteExtConfigurationObject | RouteExtConfigurationObject[]; /** defines the behavior for accessing files: */ files?: { /** determines the folder relative paths are resolved against. */ @@ -1106,7 +1159,7 @@ export interface RouteAdditionalConfigurationOptions { */ payload?: RoutePayloadConfigurationObject; /** plugin-specific configuration. plugins is an object where each key is a plugin name and the value is the plugin configuration. */ - plugins?: Object; + plugins?: PluginSpecificConfiguration; /** an array with [route prerequisites](https://hapijs.com/api/16.1.1#route-prerequisites) methods which are executed in serial or in parallel before the handler is called. */ pre?: RoutePrerequisitesArray; /** processing rules for the outgoing response */ @@ -1207,13 +1260,14 @@ export interface RoutingTableEntry { /** * [See docs](https://hapijs.com/api/16.1.1#servertablehost) > return value + * For source [See source](https://github.com/hapijs/hapi/blob/v16.1.1/lib/route.js#L71) */ export interface Route { /** * the route config with defaults applied. * TODO check type of RouteConfiguration here is correct */ - settings: RouteConfiguration; + settings: RouteAdditionalConfigurationOptions; /** * the HTTP method in lower case. * TODO, check if it can contain 'head' or not. @@ -1221,6 +1275,18 @@ export interface Route { method: HTTP_METHODS_PARTIAL_lowercase; /** the route path. */ path: string; + + params: string[]; + + connection: ServerConnection; + + fingerprint: string; + + plugin?: any; + + public: RoutePublicInterface; + + server: Server; } /** @@ -1261,7 +1327,7 @@ export interface RoutePrerequisiteObjects { /** * For context see RouteAdditionalConfigurationOptions > response */ -export interface RouteResponseConfigurationObject { +export interface RouteResponseConfigurationObject { /** the default HTTP status code when the payload is empty. Value can be 200 or 204. Note that a 200 status code is converted to a 204 only at the time or response transmission (the response status code will remain 200 throughout the request lifecycle unless manually set). Defaults to 200. */ emptyStatusCode?: number; /** @@ -1277,16 +1343,20 @@ export interface RouteResponseConfigurationObject { failAction?: 'error' | 'log' | ((request: Request, reply: ReplyWithContinue, source: string, error: Boom.BoomError) => void); /** if true, applies the validation rule changes to the response payload. Defaults to false. */ modify?: boolean; - /** options to pass to Joi. Useful to set global options such as stripUnknown or abortEarly (the complete list is available [here](https://github.com/hapijs/joi/blob/master/API.md#validatevalue-schema-options-callback) ). Defaults to no options. */ - options?: JoiValidationOptions; + /** + * options to pass to Joi. Useful to set global options such as stripUnknown or abortEarly (the complete list is available [here](https://github.com/hapijs/joi/blob/master/API.md#validatevalue-schema-options-callback) ). + * If a custom validation function (see `schema` or `status` below) is defined then `options` can an arbitrary object that will be passed to this function as the second parameter. + * Defaults to no options. + */ + options?: ValidationOptions; /** if false, payload range support is disabled. Defaults to true. */ ranges?: boolean; /** the percent of response payloads validated (0 - 100). Set to 0 to disable all validation. Defaults to 100 (all response payloads). */ sample?: number; /** the default response payload validation rules (for all non-error responses) */ - schema?: RouteResponseConfigurationScheme; + schema?: RouteResponseConfigurationScheme; /** HTTP status-code-specific payload validation rules. The status key is set to an object where each key is a 3 digit HTTP status code and the value has the same definition as schema. If a response status code is not present in the status object, the schema definition is used, except for errors which are not validated by default. */ - status?: Dictionary; + status?: Dictionary>; } /** @@ -1294,27 +1364,54 @@ export interface RouteResponseConfigurationObject { * * true - any payload allowed (no validation performed). This is the default. * * false - no payload allowed. * * a Joi validation object. This will receive the request's headers, params, query, payload, and auth credentials and isAuthenticated flags as context. - * * a validation function using the signature function(value, options, next) where: - * * value - the object containing the response object. - * * options - the server validation options, merged with an object containing the request's headers, params, payload, and auth credentials object and isAuthenticated flag. - * * next(err) - the callback function called when validation is completed. + * * a validation function + * * TODO check JoiValidationObject is correct for "a Joi validation object" * * For context see RouteAdditionalConfigurationOptions > response > schema * and * For context see RouteAdditionalConfigurationOptions > response > status */ -export type RouteResponseConfigurationScheme = boolean | JoiValidationObject | ValidationFunctionForRouteReponse; +export type RouteResponseConfigurationScheme = boolean | JoiValidationObject | ValidationFunctionForRouteResponse; /** * see RouteResponseConfigurationScheme * - * TODO check `value: Response` is correct as it says "**the object containing** the response object." not just "the response object". - * TODO check `options: JoiValidationOptions` is correct - * Also see ValidationFunctionForRouteValidate + * a validation function using the signature function(value, options, next) where: + * * value - the value of the response passed to `reply(value)` in the handler. + * * options - the server validation options, merged with an object containing the request's headers, params, payload, and auth credentials object and `isAuthenticated` flag. + * * next([err, [value]]) - the callback function called when validation is completed. `value` will be used as the response value when `err` is falsy, when `value` is not `undefined`, and when `route.settings.response.modify` is `true`. If the response is already a `Boom` error it will be set as its `message` value. */ -export interface ValidationFunctionForRouteReponse { - (value: Response, options: JoiValidationOptions, next: ContinuationFunction): void; +export interface ValidationFunctionForRouteResponse { + (value: any, options: RouteResponseValidationContext & ValidationOptions, next: ContinuationValueFunction): void; +} + +/** + * A context for route input validation via a Joi schema or validation function. + * + * This object is merged with the route response options and passed into the validation function. + * + * See https://github.com/hapijs/hapi/blob/v16.1.1/lib/validation.js#L217 + */ +export interface RouteResponseValidationContext { + context: { + /** The request headers */ + headers: Dictionary; + /** The request path parameters */ + params: any; + /** The request query parameters */ + query: any; + /** The request payload parameters */ + payload: any; + + /** Partial request authentication information */ + auth: { + /** true if the request has been successfully authenticated, otherwise false. */ + isAuthenticated: boolean; + /** the credential object received during the authentication process. The presence of an object does not mean successful authentication. */ + credentials: AuthenticatedCredentials; + }; + } } /** @@ -1350,7 +1447,7 @@ export interface RouteSecurityConfigurationObject { * For context see RouteAdditionalConfigurationOptions > validate * TODO check JoiValidationObject is correct for "a Joi validation object" */ -export interface RouteValidationConfigurationObject { +export interface RouteValidationConfigurationObject { /** * validation rules for incoming request headers (note that all header field names must be in lowercase to match the headers normalized by node). Values allowed: * * true - any headers allowed (no validation performed). This is the default. @@ -1359,25 +1456,25 @@ export interface RouteValidationConfigurationObject { * * a validation function using the signature function(value, options, next) where: * * value - the object containing the request headers. * * options - the server validation options. - * * next(err, value) - the callback function called when validation is completed. + * * next(err, value) - the callback function called when validation is completed. `value` will be used as the `headers` value when `err` is falsy. If `next` is called with `undefined` or no arguments then the original value of `value` will be used. */ - headers?: boolean | JoiValidationObject | ValidationFunctionForRouteValidate; + headers?: boolean | JoiValidationObject | ValidationFunctionForRouteInput; /** * validation rules for incoming request path parameters, after matching the path against the route and extracting any parameters then stored in request.params. Values allowed: * Same as `headers`, see above. */ - params?: boolean | JoiValidationObject | ValidationFunctionForRouteValidate; + params?: boolean | JoiValidationObject | ValidationFunctionForRouteInput; /** * validation rules for an incoming request URI query component (the key-value part of the URI between '?' and '#'). The query is parsed into its individual key-value pairs and stored in request.query prior to validation. Values allowed: * Same as `headers`, see above. */ - query?: boolean | JoiValidationObject | ValidationFunctionForRouteValidate; + query?: boolean | JoiValidationObject | ValidationFunctionForRouteInput; /** * validation rules for an incoming request payload (request body). Values allowed: * Same as `headers`, see above, with the addition that: * * a Joi validation object. Note that empty payloads are represented by a null value. If a validation schema is provided and empty payload are supported, it must be explicitly defined by setting the payload value to a joi schema with null allowed (e.g. Joi.object({ /* keys here * / }).allow(null)). */ - payload?: boolean | JoiValidationObject | ValidationFunctionForRouteValidate; + payload?: boolean | JoiValidationObject | ValidationFunctionForRouteInput; /** an optional object with error fields copied into every validation error response. */ errorFields?: any; /** @@ -1388,24 +1485,46 @@ export interface RouteValidationConfigurationObject { * * a custom error handler function with the signature function(request, reply, source, error) see RouteFailFunction */ failAction?: 'error' | 'log' | 'ignore' | RouteFailFunction; - /** options to pass to Joi. Useful to set global options such as stripUnknown or abortEarly (the complete list is [available here](https://github.com/hapijs/joi/blob/master/API.md#validatevalue-schema-options-callback)). Defaults to no options. */ - options?: JoiValidationOptions; + /** + * options to pass to Joi. Useful to set global options such as stripUnknown or abortEarly (the complete list is [available here](https://github.com/hapijs/joi/blob/master/API.md#validatevalue-schema-options-callback)). + * If a custom validation function (see `headers`, `params`, `query`, or `payload` above) is defined then `options` can an arbitrary object that will be passed to this function as the second parameter. + * Defaults to no options. + */ + options?: ValidationOptions; } /** * a validation function using the signature function(value, options, next) where: - * For context see RouteAdditionalConfigurationOptions > validate (IRouteValidationConfigurationObject) + * For context see RouteAdditionalConfigurationOptions > validate (RouteValidationConfigurationObject) * - * TODO check `value: Response` is correct as it says "**the object containing** the response object." not just "the response object". - * TODO check `options: JoiValidationOptions` is correct - * TODO type of the returned value? - * Also see ValidationFunctionForRouteReponse - * @param value - the object containing the request headers. + * Also see ValidationFunctionForRouteResponse + * @param value - the object containing the request headers, query, path params or payload. * @param options - the server validation options. - * @param next(err, value) - the callback function called when validation is completed. + * @param next([err, [value]]) - the callback function called when validation is completed. */ -export interface ValidationFunctionForRouteValidate { - (value: Response, options: JoiValidationOptions, next: ContinuationValueFunction): void; +export interface ValidationFunctionForRouteInput { + (value: any, options: RouteInputValidationContext & ValidationOptions, next: ContinuationValueFunction): void; +} + +/** + * A context for route input validation via a Joi schema or validation function. + * + * This object is merged with the route validation options and passed into the validation function. + * + * See https://github.com/hapijs/hapi/blob/v16.1.1/lib/validation.js#L122 + */ +export interface RouteInputValidationContext { + context: { + // These are only set when *not* validating the respective source (e.g. params, query and payload are set when validating headers): + // See https://github.com/hapijs/hapi/blob/v16.1.1/lib/validation.js#L132 + headers?: Dictionary; + params?: any; + query?: any; + payload?: any; + + /** The request authentication information */ + auth: RequestAuthenticationInformation; + } } /** @@ -1516,8 +1635,8 @@ export interface ServerConnection { /** Described in server.inject [See docs](https://hapijs.com/api/16.1.1#serverinjectoptions-callback) */ inject(options: string | InjectedRequestOptions, callback: (res: InjectedResponseObject) => void): void; inject(options: string | InjectedRequestOptions, ): Promise; - /** Described in server.table [See docs](https://hapijs.com/api/16.1.1#servertablehost) */ - table(host?: string): RoutingTableEntry; + /** Mentioned but not documented under server.connections [See docs](https://hapijs.com/api/16.1.1#serverconnections) */ + table(host?: string): Route[]; /** Described in server.table [See docs](https://hapijs.com/api/16.1.1#serverlookupid) */ lookup(id: string): RoutePublicInterface | null; /** Described in server.table [See docs](https://hapijs.com/api/16.1.1#servermatchmethod-path-host) */ @@ -1746,18 +1865,7 @@ export class Request extends Podium { /** application-specific state. Provides a safe place to store application data without potential conflicts with the framework. Should not be used by plugins which should use plugins[name]. */ app: any; /** authentication information */ - auth: { - /** true if the request has been successfully authenticated, otherwise false. */ - isAuthenticated: boolean; - /** the credential object received during the authentication process. The presence of an object does not mean successful authentication. */ - credentials: any; - /** an artifact object received from the authentication strategy and used in authentication-related actions. */ - artifacts: any; - /** the route authentication mode. */ - mode: string; - /** the authentication error is failed and mode set to 'try'. */ - error: Error; - }; + auth: RequestAuthenticationInformation; /** the connection the request was received by. */ connection: ServerConnection; /** the node domain object used to protect against exceptions thrown in extensions, handlers and route prerequisites. Can be used to manually bind callback functions otherwise bound to other domains. Set to null when the server useDomains options is false. */ @@ -1827,10 +1935,11 @@ export class Request extends Podium { /** same as pre but represented as the response object created by the pre method. */ preResponses: Object; /** - * an object containing the query parameters. - * TODO update with outcome of: https://github.com/hapijs/hapi/pull/3479 + * by default the object outputted from [node's URL parse()](https://nodejs.org/docs/latest/api/url.html#url_urlobject_query) method. + * Might also be set indirectly via [request.setUrl](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/17354#requestseturlurl-striptrailingslash) in which case it may be + * a string (if url is set to an object with the query attribute as an unparsed string). */ - query: Object; + query: any; /** an object containing the Node HTTP server objects. **Direct interaction with these raw objects is not recommended.** */ raw: { req: http.IncomingMessage; // Or http.ClientRequest http://www.apetuts.com/tutorial/node-js-http-client-request-class/ ? @@ -1915,6 +2024,19 @@ export class Request extends Podium { // [index: string]: any; } +export interface RequestAuthenticationInformation { + /** true if the request has been successfully authenticated, otherwise false. */ + isAuthenticated: boolean; + /** the credential object received during the authentication process. The presence of an object does not mean successful authentication. */ + credentials: any; + /** an artifact object received from the authentication strategy and used in authentication-related actions. */ + artifacts: any; + /** the route authentication mode. */ + mode: string; + /** the authentication error is failed and mode set to 'try'. */ + error: Error; +} + export type HTTP_METHODS_PARTIAL_lowercase = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options'; export type HTTP_METHODS_PARTIAL = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | HTTP_METHODS_PARTIAL_lowercase; export type HTTP_METHODS = 'HEAD' | 'head' | HTTP_METHODS_PARTIAL; @@ -2000,19 +2122,21 @@ export interface RequestHandler { /** * Used by server extension points - * err can be BoomError or Error that will be wrapped as a BoomError - * For source [See docs](https://github.com/hapijs/hapi/blob/v16.1.1/lib/reply.js#L109-L118) - * For source [See docs](https://github.com/hapijs/hapi/blob/v16.1.1/lib/response.js#L60-L65) + * err can be `Boom` error or Error that will be wrapped as a `Boom` error + * For source [See code](https://github.com/hapijs/hapi/blob/v16.1.1/lib/reply.js#L109-L118) + * For source [See code](https://github.com/hapijs/hapi/blob/v16.1.1/lib/response.js#L60-L65) */ export interface ContinuationFunction { - (err: Boom.BoomError): void; + (err?: Boom.BoomError): void; } /** * For source [See docs](https://github.com/hapijs/hapi/blob/v16.1.1/lib/response.js#L60-L65) * TODO Can value be typed with a useful generic? */ export interface ContinuationValueFunction { - (err: Boom.BoomError, value: any): void; + (err: Boom.BoomError): void; + (err: null | undefined, value: any): void; + (): void; } /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2152,7 +2276,7 @@ export type AnyAuthenticationResponseAction = any; /** [See docs](https://hapijs.com/api/16.1.1#serverauthschemename-scheme) */ export interface AuthenticationResult { credentials?: AuthenticatedCredentials; - artefacts?: any; + artifacts?: any; } export interface AuthenticatedCredentials { // Disabled to allow typing within a project diff --git a/types/hapi/test/connection/table.ts b/types/hapi/test/connection/table.ts index dee4741b07..24eaa28ddc 100644 --- a/types/hapi/test/connection/table.ts +++ b/types/hapi/test/connection/table.ts @@ -18,3 +18,5 @@ const table = connection.table(); } ] */ + +table.map(({method, path, settings: {description}}) => { }); diff --git a/types/hapi/test/continuation/errors.ts b/types/hapi/test/continuation/errors.ts new file mode 100644 index 0000000000..165e5214df --- /dev/null +++ b/types/hapi/test/continuation/errors.ts @@ -0,0 +1,57 @@ + +import * as Hapi from 'hapi'; +import * as Boom from 'boom'; + +// Assignment of a typical function to ContinuationValueFunction is possible +const handleError: Hapi.ContinuationValueFunction = (err?: Boom.BoomError | null, value?: any) => { + if (!err || !err.data.isCustom === true) { + return; + } + + // assignment is possible due to default generic Data = any + const customError: Boom.BoomError = err; + + // Discriminated union type works: + switch (customError.data.customType) { + case 'Custom1': + customError.data.custom1; + break; + case 'Custom2': + customError.data.custom2; + break; + } +}; + +// Accepts a simple Boom error +handleError(Boom.badData()); + +// Accepts an error with custom data +const errorWithData = Boom.badImplementation('', { custom1: 'test', customType: <'Custom1'>'Custom1', isCustom: true }); +handleError(errorWithData); + +// Accepts an error with a more explicit type +const errorWithExplicitType: Boom.BoomError = errorWithData; +handleError(errorWithExplicitType); + +// Accepts an error with an even more explicit type +const errorWithConcreteCustomData: Boom.BoomError = errorWithData; // assignment to CustomData2 would not be possible +handleError(errorWithConcreteCustomData); + +/** + * Some complex error data types: + */ +interface CustomDataBase { + isCustom: true; +} + +interface CustomData1 extends CustomDataBase { + customType: 'Custom1'; + custom1: string; +} + +interface CustomData2 extends CustomDataBase { + customType: 'Custom2'; + custom2: string; +} + +type CustomData = CustomData1 | CustomData2; diff --git a/types/hapi/test/request/query.ts b/types/hapi/test/request/query.ts new file mode 100644 index 0000000000..c6507c2da0 --- /dev/null +++ b/types/hapi/test/request/query.ts @@ -0,0 +1,14 @@ +// Added test in addition to docs, for request.query + +import * as Hapi from 'hapi'; + +interface GetThingQuery { + name: string; +} + +const handler: Hapi.RouteHandler = function (request, reply) { + + const query = request.query as GetThingQuery; + + return reply(`You asked for ${query.name}`); +}; diff --git a/types/hapi/test/route/additional-options.ts b/types/hapi/test/route/additional-options.ts index 99e818d08a..aaf5a33066 100644 --- a/types/hapi/test/route/additional-options.ts +++ b/types/hapi/test/route/additional-options.ts @@ -3,14 +3,42 @@ import * as Hapi from 'hapi'; var authConfig: Hapi.RouteAdditionalConfigurationOptions = { - app: {} + app: {}, + payload: {}, }; +var extConfigSingle: Hapi.RouteAdditionalConfigurationOptions = { + ext: { + type: 'onPreAuth', + method: function (request, reply) { + reply('ok'); + } + } +} + +var extConfigMulti: Hapi.RouteAdditionalConfigurationOptions = { + ext: [{ + type: 'onPreAuth', + method: function (request, reply) { + reply('ok'); + } + }, { + type: 'onPostAuth', + method: function (request, reply) { + reply('ok'); + } + }, { + type: 'onPostStart', + method: function (server, next) { + next(); + } + }] +} + // Handler in config const user: Hapi.RouteAdditionalConfigurationOptions = { cache: { expiresIn: 5000, statuses: [200, 201] }, handler: function (request, reply) { - return reply({ name: 'John' }); } }; @@ -37,3 +65,9 @@ var cache: Hapi.RouteCacheOptions = { expiresAt: '22:44', }; */ + +var payloadOptions: Hapi.RoutePayloadConfigurationObject = { + allow: 'multipart/form-data', + maxBytes: 123, + output: 'file', +}; diff --git a/types/hapi/test/route/plugins.ts b/types/hapi/test/route/plugins.ts new file mode 100644 index 0000000000..2449fc84c0 --- /dev/null +++ b/types/hapi/test/route/plugins.ts @@ -0,0 +1,38 @@ +// Added in addition to code from https://hapijs.com/api/16.1.1#route-options > plugins + +import * as Hapi from 'hapi'; + +// In the plugin code +declare module 'hapi' { + interface PluginSpecificConfiguration { + coolPlugin: { + optionA: string; + optionB?: boolean; + } + } +} + +// In the consumer code +const pluginsServerConfig: Hapi.ServerOptions = { + plugins: { + coolPlugin: { + optionA: "test", + } + } +}; + +const pluginsConnectionConfig: Hapi.ConnectionConfigurationServerDefaults = { + plugins: { + coolPlugin: { + optionA: "test", + } + } +}; + +const pluginsRouteConfig: Hapi.RouteAdditionalConfigurationOptions = { + plugins: { + coolPlugin: { + optionA: "test", + } + } +}; diff --git a/types/hapi/test/route/validate.ts b/types/hapi/test/route/validate.ts new file mode 100644 index 0000000000..cb5c5527ee --- /dev/null +++ b/types/hapi/test/route/validate.ts @@ -0,0 +1,64 @@ + +// Added from: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/16065#issuecomment-302216131 + +import * as Hapi from 'hapi'; +import * as Joi from 'joi'; + +const validate: Hapi.RouteValidationConfigurationObject = { + headers: true, + params: { + id: Joi.string(), + }, + payload: Joi.object().required(), + query: { + providerId: Joi.string(), + }, + options: { + abortEarly: true, + }, +}; + +let config: Hapi.RouteAdditionalConfigurationOptions = { + validate, + response: { + schema: Joi.object(), + }, +}; + +interface CustomValidationOptions extends Joi.ValidationOptions { + myOption: number; +} + +const inputValidationFunction: Hapi.ValidationFunctionForRouteInput = (value, options, next) => { + options.myOption; // check custom options + options.context.auth.artifacts; // check context + next(null, value); // check with value + next(); // check without value +}; + +const validateWithFunctions: Hapi.RouteValidationConfigurationObject = { + params: inputValidationFunction, + headers: inputValidationFunction, + payload: inputValidationFunction, + query: inputValidationFunction, + options: { + myOption: 18 + } +}; + +const responseValidationFunction: Hapi.ValidationFunctionForRouteResponse = (value, options, next) => { + options.myOption; // check custom options + options.context.auth.isAuthenticated; // check context + next(null, value); // check with value + next(); // check without value +}; + +config = { + validate: validateWithFunctions, + response: >{ + schema: responseValidationFunction, + options: { + myOption: 18 + } + } +}; diff --git a/types/hapi/test/server/ext.ts b/types/hapi/test/server/ext.ts index 410c913c41..500ac1d4af 100644 --- a/types/hapi/test/server/ext.ts +++ b/types/hapi/test/server/ext.ts @@ -7,7 +7,7 @@ server.connection({ port: 80 }); server.ext({ type: 'onRequest', - method: function (request, reply) { + method: function (request, reply) { // Change all requests to '/test' request.setUrl('/test'); @@ -28,7 +28,7 @@ server.start((err) => { }); // Example 2 -server.ext('onRequest', function (request, reply) { +server.ext('onRequest', function (request, reply) { // Change all requests to '/test' request.setUrl('/test'); diff --git a/types/hapi/test/server/inject.ts b/types/hapi/test/server/inject.ts index 130af7489b..7010faa3dc 100644 --- a/types/hapi/test/server/inject.ts +++ b/types/hapi/test/server/inject.ts @@ -13,6 +13,7 @@ const handler: Hapi.RouteHandler = function (request, reply) { server.route({ method: 'GET', path: '/', handler: handler }); server.inject('/', (res) => { - + const num: number = res.statusCode; + const result = res.result as {aField: string}; console.log(res.result); }); diff --git a/types/hapi/test/server/new.ts b/types/hapi/test/server/new.ts index 24ac654ecd..95f1ce9006 100644 --- a/types/hapi/test/server/new.ts +++ b/types/hapi/test/server/new.ts @@ -44,6 +44,15 @@ new Hapi.Server({ }] }); +//+ Code added in addition to docs +declare module 'hapi' { + interface PluginSpecificConfiguration { + // Set this to non optional if plugin config is non optional + 'some-plugin-name'?: {options: string;}; + } +} +//- Code added in addition to docs + new Hapi.Server({ connections: { app: {}, @@ -54,7 +63,8 @@ new Hapi.Server({ maxEventLoopDelay: 10, }, plugins: { - 'some-plugin-name': {options: 'here'} + 'some-plugin-name': {options: 'here'}, + coolPlugin: {optionA: ""}, }, router: { isCaseSensitive: false, diff --git a/types/hapi/tsconfig.json b/types/hapi/tsconfig.json index f8d5b055e2..39ff8e810c 100644 --- a/types/hapi/tsconfig.json +++ b/types/hapi/tsconfig.json @@ -18,6 +18,7 @@ "files": [ "index.d.ts", "test/connection/table.ts", + "test/continuation/errors.ts", "test/getting-started/01-creating-a-server.ts", "test/getting-started/02-adding-routes.ts", "test/getting-started/03-serving-static-content.ts", @@ -34,6 +35,7 @@ "test/request/generate-response.ts", "test/request/get-log.ts", "test/request/log.ts", + "test/request/query.ts", "test/request/set-method.ts", "test/request/set-url.ts", "test/request/tail.ts", @@ -45,8 +47,10 @@ "test/route/auth.ts", "test/route/config.ts", "test/route/handler.ts", + "test/route/plugins.ts", "test/route/prerequisites.ts", "test/route/public-interface.ts", + "test/route/validate.ts", "test/server/app.ts", "test/server/auth.ts", "test/server/bind.ts", @@ -89,4 +93,4 @@ "test/server/table.ts", "test/server/version.ts" ] -} \ No newline at end of file +} diff --git a/types/hapi/v8/hapi-tests.ts b/types/hapi/v8/hapi-tests.ts index 585e58e100..ee8af0d335 100644 --- a/types/hapi/v8/hapi-tests.ts +++ b/types/hapi/v8/hapi-tests.ts @@ -124,15 +124,5 @@ server.route([{ } }]); -// Implict handler -server.route({ - method: 'GET', - path: '/hello6', - handler: function (request, reply) { - request.log('info', { route: '/hello' }, Date.now()); - reply('hello world'); - } -}); - // Start the server server.start(); diff --git a/types/heredatalens/heredatalens-tests.ts b/types/heredatalens/heredatalens-tests.ts new file mode 100644 index 0000000000..40e68902c5 --- /dev/null +++ b/types/heredatalens/heredatalens-tests.ts @@ -0,0 +1,161 @@ +/** + * Typescript definition tests for heredatalens + * + * Note: These tests are intended to test the definitions only + * in the sense of typing and call signature consistency. They + * are not intended as functional tests. + */ + +let serviceOptions: H.datalens.Service.Options = { + subDomain: 'sub', + version: 'version', + access_token: 'token', + refresh_token: 'token', + domainSharding: ['a', 'b'], + baseUrl: 'url' +}; + +let queryTileProviderTileParamNames: H.datalens.QueryTileProvider.TileParamNames = { + x: 'x', + y: 'y', + z: 'z' +}; + +let queryTileProviderOptions: H.datalens.QueryTileProvider.Options = { + queryId: 'id', + queryParams: 'params', + tileParamNames: queryTileProviderTileParamNames +}; + +let service: H.datalens.Service = new H.datalens.Service(serviceOptions); +service.request('method', 'endpoint', 'params', 'body', (result: any) => {}, (error: any) => {}).then((data: any) => {}); +service.fetchQueryData('id', 'params', (result: any) => {}, (error: any) => {}).then((data: any) => {}); +service.fetchQueryStats('id', 'query', (result: any) => {}, (error: any) => {}).then((data: any) => {}); +service.fetchLayer('name', 'params', (result: any) => {}, (error: any) => {}).then((data: any) => {}); +service.fetchLayerTile('name', 1, 2, 3, 'params', (result: any) => {}, (error: any) => {}).then((data: any) => {}); +service.setTokens('token', 'refresh_token'); +service.configure('app_id', 'app_code', true, true, new H.service.Url('scheme', 'host')); + +let queryTileProvider = new H.datalens.QueryTileProvider(service, queryTileProviderOptions); +queryTileProvider.setQueryId('some id'); +queryTileProvider.setQueryParams('some params'); +queryTileProvider.setTileParamNames(queryTileProviderTileParamNames); + +let provider = new H.datalens.Provider({ columns: ['1', '2'], rows: [[], []]}); +provider.getData(); +provider.setData({ columns: ['3', '4'], rows: [[], []]}); + +let queryProviderOptions: H.datalens.QueryProvider.Options = { + queryId: 'id', + queryParams: 'params' +}; +let queryProvider = new H.datalens.QueryProvider({ columns: ['1', '2'], rows: [[], []]}, queryProviderOptions); +queryProvider.setQueryId('id'); +queryProvider.setQueryParams('params'); +queryProvider.reload(); +queryProvider.getData(); +queryProvider.setData({ columns: ['3', '4'], rows: [[], []]}); + +let rasterLayerOptions: H.datalens.RasterLayer.Options = { + dataToRows: (): H.datalens.RasterLayer.Row[] => [], + rowToTilePoint: (): H.datalens.RasterLayer.TilePoint => ({ x: 1, y: 2 }), + buffer: (): number => 1, + renderTile: () => {} +}; + +let rasterLayer = new H.datalens.RasterLayer(); +rasterLayer.redraw(); + +let heatmapLayerOptions: H.datalens.HeatmapLayer.Options = { + dataToRows: (): H.datalens.HeatmapLayer.Row[] => [], + rowToTilePoint: (): H.datalens.HeatmapLayer.TilePoint => ({ x: 1, y: 2, value: 5, count: 5 }), + bandwidth: 5, + valueRange: (): number[] => [], + countRange: (): number[] => [], + colorScale: (): string => '2', + alphaScale: (): number => 1, + aggregation: H.datalens.HeatmapLayer.Aggregation.SUM, + inputScale: H.datalens.HeatmapLayer.InputScale.LINEAR +}; + +let heatmapLayer = new H.datalens.HeatmapLayer(queryTileProvider, heatmapLayerOptions); +heatmapLayer.getOptionsPerZoom(5); +heatmapLayer.dispose(); +heatmapLayer.redraw(); + +let objectLayerOptions: H.datalens.ObjectLayer.Options = { + dataToRows: (): H.datalens.ObjectLayer.Row[] => [], + rowToMapObject: (): H.map.Object => new H.map.Object(), + rowToStyle: (): H.datalens.ObjectLayer.ObjectStyleOptions => ({ icon: new H.map.Icon('x'), style: {}, arrows: {}, zIndex: 1 }), + dataDomains: 2, + clustering: { rowToDataPoint: (): H.clustering.DataPoint => ({ lat: 12.1, lng: 1.12, alt: 5, ctx: H.geo.AltitudeContext.GL, wt: 2, data: {} }), + options: (): H.clustering.Provider.ClusteringOptions => ({}) } +}; + +let objectLayer = new H.datalens.ObjectLayer(provider, objectLayerOptions); +objectLayer.redraw(); +objectLayer.updateObjectStyle(new H.map.Object(), { icon: new H.map.Icon('x'), style: {}, arrows: {}, zIndex: 1 }); + +let rawDataProviderOptions: H.datalens.RawDataProvider.Options = { + dataUrl: 'url', + dataToFeatures: (): H.datalens.RawDataProvider.Feature[] => [], + featuresToRows: (): H.datalens.ObjectLayer.Row[] => [] +}; + +let rawDataProvider = new H.datalens.RawDataProvider(rawDataProviderOptions); + +let spatialTileProviderOptions: H.datalens.SpatialTileProvider.Options = { + layerName: 'name', + queryParams: 'params' +}; + +let spatialProvider: H.datalens.SpatialTileProvider = new H.datalens.SpatialTileProvider(service, spatialTileProviderOptions); + +let spatialLayerOptions: H.datalens.SpatialLayer.Options = { + dataToRows: (): H.datalens.SpatialLayer.Row[] => [], + rowToSpatialId: (): string => 'asd', + featureToSpatialId: (): string => 'asd', + rowToStyle: (): any => { return; }, + defaultStyle: (): any => { return; }, + transformFeature: 1 +}; + +let spatialLayer = new H.datalens.SpatialLayer(provider, spatialProvider, spatialLayerOptions); + +let layer = new H.datalens.ObjectLayer( + provider, + { + rowToMapObject: (cluster) => { + return new H.map.Marker(cluster.getPosition()); + }, + clustering: { + rowToDataPoint: (row) => { + return new H.clustering.DataPoint(row.lat, row.lng, 1); + }, + options: () => { + return { + eps: 25 * devicePixelRatio, // px + minWeight: 20 + }; + } + }, + rowToStyle: (cluster) => { + const size = 32; + + let icon = H.datalens.ObjectLayer.createIcon([ + 'svg', + { + viewBox: [-size, -size, 2 * size, 2 * size] + }, + ['circle', { + cx: 0, + cy: 0, + r: size, + fill: cluster.isCluster() ? 'orange' : 'transparent' + }] + ], { size, crossOrigin: false }); + + return { icon }; + } + } +); diff --git a/types/heredatalens/index.d.ts b/types/heredatalens/index.d.ts new file mode 100644 index 0000000000..b01014ba1e --- /dev/null +++ b/types/heredatalens/index.d.ts @@ -0,0 +1,948 @@ +// Type definitions for HERE Data Lens API for JavaScript 2.3 +// Project: https://developer.here.com/ +// Definitions by: Bernd Hacker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace H { + /** + * Data Lens REST API connector for HERE Maps API + * Data Lens JavaScript API is a module for HERE Maps API. + * It connects Data Lens REST API and provides data-driven styling of data on a map. + */ + namespace datalens { + /** + * HERE Maps API and Data Lens JavaScript API can be used to visualize data from different network sources. + * For each network source type, a service class is required. The service also stores API connection credentials. + * The service instance must be configured with a H.service.Platform instance. + */ + class Service implements H.service.IConfigurable { + /** + * Constructor + * @param options {H.datalens.Service.Options=} - Overrides the configuration from the H.service.Platform instance + */ + constructor(options?: H.datalens.Service.Options); + + /** + * This method makes an HTTP request to the Data Lens REST API. + * It makes any CRUD request (GET, PUT, POST, DELETE). + * This method can be used when implementing a custom provider or implementing data management. + * Otherwise existing providers are used to get data from the Data Lens REST API. + * @param method {string} - Any HTTP method (GET, PUT, POST, etc.) + * @param endpoint {string} - The REST API endpoint + * @param params {any=} - URL parameters + * @param body {any=} - The payload of the request + * @param onResult {function(any)=} - Callback called on a successful request with response data + * @param onError {function(Error)=} - Callback called on an unsuccessful request with the Error object + * @returns {Promise} - Response Promise + */ + request(method: string, endpoint: string, params?: any, body?: any, onResult?: (result: any) => void, onError?: (error: any) => void): Promise; + + /** + * This method fetches query data for a given query ID. + * This method can be used when implementing a custom provider. + * Otherwise existing providers are used to get data from the Data Lens REST API. + * @param queryId {string} - The ID of the Data Lens REST API query + * @param params {any=} - Query dynamic parameters + * @param onResult {function(any)=} - Callback called on a successful request with response data + * @param onError {function(Error)=} - Callback called on an unsuccessful request with the Error object + * @returns {Promise} - Response Promise + */ + fetchQueryData(queryId: string, params?: any, onResult?: (result: any) => void, onError?: (error: any) => void): Promise; + + /** + * This method fetches statistical data for the Data Lens query (eg minimum and maximum values for the query metric). + * It can be used to define visualization boundaries, scales and legends. + * @param queryId {string} - The ID of the Data Lens REST API query + * @param statsQuery {any} - A JSON object which defines a statistics query for the Data Lens query + * @param onResult {function(any)=} - Callback called on a successful request with response data + * @param onError {function(Error)=} - Callback called on an unsuccessful request with the Error object + * @returns {Promise} - Response Promise + */ + fetchQueryStats(queryId: string, statsQuery: any, onResult?: (result: any) => void, onError?: (error: any) => void): Promise; + + /** + * This method fetches a layer of geometries (eg buildings or administrative boundaries). + * @param layerName {string} - The name of the layer + * @param params {any=} - URL parameters (eg bounding box) + * @param onResult {function(any)=} - Callback called on a successful request with response data + * @param onError {function(Error)=} - Callback called on an unsuccessful request with the Error object + * @returns {Promise} - Response Promise + */ + fetchLayer(layerName: string, params?: any, onResult?: (result: any) => void, onError?: (error: any) => void): Promise; + + /** + * This method fetches vector tile data from the layer. + * @param layerName {string} + * @param x {H.datalens.QueryTileProvider.X} - Tile columns + * @param y {H.datalens.QueryTileProvider.Y} - Tile row + * @param z {H.datalens.QueryTileProvider.Zoom} - zoom level + * @param params {any=} - URL parameters (eg bounding box) + * @param onResult {function(any)=} - Callback called on a successful request with response data + * @param onError {function(Error)=} - Callback called on an unsuccessful request with the Error object + * @returns {Promise} - Typed array with tile data + */ + fetchLayerTile(layerName: string, x: H.datalens.QueryTileProvider.X, y: H.datalens.QueryTileProvider.Y, z: H.datalens.QueryTileProvider.Zoom, + params?: any, onResult?: (result: any) => void, onError?: (error: any) => void): Promise; + + /** + * Sets the access and refresh tokens used to authenticate all requests against the Data Lens REST API. + * Use this method to implement custom authentication to the Data Lens REST API. + * @param accessToken {string} - The token used to authenticate all requests + * @param refreshToken {string} - The token used to fetch a new access token after the previous access token has expired. + * When refreshToken is provided, Service will automatically update the expired accessToken. + */ + setTokens(accessToken: string, refreshToken: string): void; + + /** + * This method implements H.service.IConfigurable interface. It is called by the H.service.Platform instance. + * @param appId {string} - The appId + * @param appCode {string} - The appCode + * @param useHTTPS {boolean} - A flag to use HTTPS or not + * @param useCIT {boolean} - A flag to use the staging server (CIT) or not + * @param baseUrl {H.service.Url=} - The base URL for all requests to the Data Lens REST API + * @returns {H.datalens.Service} + */ + configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, baseUrl?: H.service.Url): H.datalens.Service; + } + + namespace Service { + /** + * Overrides the H.datalens.Service configuration + * Normally the H.datalens.Service instance is configured with the H.service.Platform instance. + * This configuration can be overridden by specifying these options. + * It can be useful when the Data Lens environment is different from the HERE Platform environment. + * @property subDomain {string=} - Subdomain of the Data Lens REST API URL + * @property version {string=} - Pathname prefix of the Data Lens REST API endpoints + * @property access_token {string=} - The token used to authenticate all requests + * @property refresh_token {string=} - The token used to fetch a new access token after the previous access token has expired. + * When refresh_token is provided, Service will automatically update the expired access_token. + * @property domainSharding {string[]=} - To increase the number of simultaneous requests to the Data Lens REST API, domain sharding is used. + * This option can be used when the Data Lens environment does not support domain sharding. + * @property baseUrl {string=} - Defines an alternative host for the Data Lens REST API URL + */ + interface Options { + subDomain?: string; + version?: string; + access_token?: string; + refresh_token?: string; + domainSharding?: string[]; + baseUrl?: string; + } + + /** + * The format of Data Lens query data. + * The Data Lens query data has a table-like structure with named columns and rows. + * @property columns {string[]} - Column names + * @property rows {Array} - Rows of data + */ + interface Data { + columns: string[]; + rows: [any[]]; // rows : { Array. } + } + } + + /** + * Providers define interfaces for layers to access data. + * The input data can be stored locally or loaded from the network. Data can be loaded by tiles or in one chunk. + * This provider allows you to supply data stored locally or fetched using external tools. + */ + class Provider extends H.map.provider.Provider { + /** + * Constructor + * @param data {H.datalens.Service.Data=} - JSON object + * @param options {H.map.provider.Provider.Options=} - Configures data accessibility parameters + */ + constructor(data?: H.datalens.Service.Data, options?: H.map.provider.Provider.Options); + + /** + * Updates the provider data. When data is updated, the update event is triggered so that the consuming layers are redrawn. + * @param data {H.datalens.Service.Data} - JSON object + */ + setData(data: H.datalens.Service.Data): void; + + /** + * Retrieves the provider data. + * @returns {H.datalens.Service.Data} - JSON object + */ + getData(): H.datalens.Service.Data; + } + + /** + * Defines the source of the data for layers from a Data Lens query. + * Providers define interfaces for layers to access data. The input data can be stored locally or loaded from the network. + * Data can be loaded by tiles or in one chunk. This provider loads query data with the Data Lens REST API. + * Note that this provider must be used only for non-tiled queries. + */ + class QueryProvider extends H.datalens.Provider { + /** + * Constructor + * @param service {H.datalens.Service} - Data Lens REST API service + * @param options {H.datalens.QueryProvider.Options=} - Configures source query and data accessibility parameters + */ + constructor(data: H.datalens.Service.Data, options?: H.datalens.QueryProvider.Options); + + /** + * Updates the query ID to be used in the next call of the Data Lens REST API. + * Note that new data will be fetched only after the reload method is called. + * @param queryId {string} + */ + setQueryId(queryId: string): void; + + /** + * Updates the query's dynamic parameters to be used in the next call of the Data Lens REST API. + * Note that new data will be fetched only after the reload method is called. + * This method is normally used when updating your visualization. + * @param queryParams {any|null} - Query dynamic parameters + */ + setQueryParams(queryParams: any|null): void; + + /** + * Fetches new data from the Data Lens REST API. + * When data is fetched, the update event is triggered so that the consuming layers are redrawn. + */ + reload(): void; + + /** + * Updates the provider data. + * When data is updated, the update event is triggered so that the consuming layers are redrawn. + * @param data {H.datalens.Service.Data} - JSON object + */ + setData(data: H.datalens.Service.Data): void; + + /** + * Retrieves the provider data. + * @returns {H.datalens.Service.Data} - JSON object + */ + getData(): H.datalens.Service.Data; + } + + namespace QueryProvider { + /** + * Configures source query and data accessibility parameters for H.datalens.QueryProvider + * Specifies the query credentials and dynamic parameters required for fetching query data with the Data Lens REST API. Other options from H.datalens.Provider.Options are available. + * @property queryId {string} - The ID of the Data Lens REST API query + * @property queryParams {any=} - The query's dynamic parameters. The dynamic parameters can be used to filter data provided by the query. + */ + interface Options { + queryId: string; + queryParams?: any; + } + } + + /** + * Providers define interfaces for layers to access data. + * The input data can be stored locally or loaded from the network. Data can be loaded by tiles or in one chunk. + * This provider loads tiled query data with the Data Lens REST API. Tiled queries are used to load data only for the current viewport. + * This optimizes memory and network usage and enables progressive rendering. + */ + class QueryTileProvider extends H.map.provider.RemoteTileProvider { + /** + * Constructor + * @param service {H.datalens.Service} - Data Lens REST API service + * @param options {H.datalens.QueryTileProvider.Options} - Configures source query and data accessibility parameters + */ + constructor(service: H.datalens.Service, options: H.datalens.QueryTileProvider.Options); + + /** + * Updates the query ID to be used in the next call of the Data Lens REST API. + * Note that new data will be fetched only after the reload method is called. + * @param queryId {string} + */ + setQueryId(queryId: string): void; + + /** + * Updates the query's dynamic parameters to be used in the next call of the Data Lens REST API. + * Note that new data will be fetched only after the reload method is called. This method is normally used when updating your visualization. + * @param queryParams {any|null} + */ + setQueryParams(queryParams: any|null): void; + + /** + * Updates the names of the dynamic parameters that defines tiles. This method is only needed when the query ID is updated. + * Note that new data will be fetched only after the reload method is called. + * @param tileParamNames {H.datalens.QueryTileProvider.TileParamNames} - Names of the URI parameters that control the x/y/z of a tiled query + */ + setTileParamNames(tileParamNames: H.datalens.QueryTileProvider.TileParamNames): void; + } + + namespace QueryTileProvider { + /** + * Represents the names of the URI parameters that control the x/y/z of tiled query. + * When defining the Data Lens query, dynamic parameters that control tiling can be arbitrarily named. + * Names of these parameters must be specified to fetch tiles. + * @property x {string} - Name of the dynamic parameter that defines tile column + * @property y {string} - Name of the dynamic parameter that defines tile row + * @property z {string} - Name of the dynamic parameter that defines zoom level + */ + interface TileParamNames { + x: string; + y: string; + z: string; + } + + /** + * Configures source query and data accessibility parameters for H.datalens.QueryTileProvider + * Specifies the query credentials and dynamic parameters required for fetching tiled query data with the Data Lens REST API. + * Other options from H.datalens.Provider.Options are available. + * @property tileParamNames {H.datalens.QueryTileProvider.TileParamNames=} - Names of the URI parameters that control the x/y/z of a tiled query + * @property queryId {string} - The ID for the Data Lens REST API query + * @property queryParams {any=} - The query's dynamic parameters. The dynamic parameters can be used to filter data provided by the query. + */ + interface Options { + tileParamNames: H.datalens.QueryTileProvider.TileParamNames; + queryId: string; + queryParams?: string; + } + + /** + * Tile X coordinate (column) + * Coordinate in XYZ tile numbering scheme. + */ + type X = number; + + /** + * Tile Y coordinate (row) + * Coordinate in XYZ tile numbering scheme. + */ + type Y = number; + + /** + * Zoom level + * Coordinate in XYZ tile numbering scheme. May vary within range 1 to 20. + */ + type Zoom = number; + } + + /** + * Provides pixel-wise rendering of data. + * Layer used when you need to visualize more than 10k points. The layer requires source data to be located in pixel coordinates. + * The rendering is implemented by drawing directly on a canvas. The layer is often used together with a Data Lens query which groups rows by pixels. + * This reduces the amount of data delivered to the client. + */ + class RasterLayer extends H.map.layer.TileLayer { + /** + * Constructor + */ + constructor(); + + /** + * Default value for dataToRows callback option. + * It represents each row as an object where property names correspond to data column names. + */ + static defaultDataToRows: any; + + /** + * Force re-rendering of the layer. + * In the case where the callbacks passed to the layer options are not pure functions, you can call this method to force re-rendering. + */ + redraw(): void; + + /** + * This is a default implementation of renderTile callback. This method represents each point as a black 1x1 pixel square. + * @param points {Array} - Input data points within a tile + * @param canvas {HTMLCanvasElement} - The target canvas + */ + static defaultRenderTile(points: H.datalens.RasterLayer.TilePoint[], canvas: HTMLCanvasElement): void; + } + + namespace RasterLayer { + /** + * Defines data processing and rendering options for RasterLayer. + * The initial step of rendering is to split the tile data by rows, where each row represents a bucket. + * By default this step is processed with H.datalens.RasterLayer.defaultDataToRows. + * This behavior can be changed by defining the dataToRows callback. + * To collect the rows for a tile including buffer, the rows must be translated to H.datalens.RasterLayer.TilePoint. + * This translation must be specified with the rowToTilePoint callback. The final rendering on the tile canvas must be defined in renderTile. + * @property dataToRows {function(H.datalens.Service.Data, H.datalens.QueryTileProvider.X, H.datalens.QueryTileProvider.Y, H.datalens.QueryTileProvider.Zoom)=} - + * Defines how the input tile data is split by rows. You can specify this callback to define client-side aggregation and filtering. This callback is called for each tile. + * @property rowToTilePoint {function(H.datalens.RasterLayer.Row, H.datalens.RasterLayer.X, H.datalens.RasterLayer.Y)=} - + * Defines how the row is translated to the H.datalens.RasterLayer.TilePoint. This callback is called for each row that is returned from dataToRows. + * @property buffer {function(H.datalens.QueryTileProvider.Zoom)=} - Defines the buffer as a function of the zoom level. + * The buffer is a value (in pixels) that defines an extra area around each tile to capture data points from. + * This is done to avoid drawing edges between tiles. For example, if data points represented with circles with a maximum radius of 10 pixels, then the buffer must be 10 pixels. + * @property renderTile {function(Array, HTMLCanvasElement, H.datalens.QueryTileProvider.Zoom)=} - + * Defines how tile data is represented on a canvas. Input points for each tile are collected with respect to the buffer. + * For progressive rendering this callback may be called more than once for the tile. + */ + interface Options { + dataToRows?(data: H.datalens.Service.Data, x: H.datalens.QueryTileProvider.X, y: H.datalens.QueryTileProvider.Y, zoom: H.datalens.QueryTileProvider.Zoom): + H.datalens.RasterLayer.Row[]; + rowToTilePoint?(row: H.datalens.RasterLayer.Row, x: H.datalens.RasterLayer.X, y: H.datalens.RasterLayer.Y): H.datalens.RasterLayer.TilePoint; + buffer?(zoom: H.datalens.QueryTileProvider.Zoom): number; + renderTile?(points: H.datalens.RasterLayer.TilePoint[], canvas: HTMLCanvasElement, zoom: H.datalens.QueryTileProvider.Zoom): void; + } + + /** + * Defines the input data format for heat map rendering. + * To collect data rows for each tile with respect to the buffer, each row must be represented as a point within the map tile. + * @property x {number} - Row relative to tile + * @property y {number} - Column relative to tile + * @property data {H.datalens.RasterLayer.Row=} - Reference to source data row + */ + interface TilePoint { + x: number; + y: number; + data?: H.datalens.RasterLayer.Row; + } + + /** + * Tile X coordinate (column) + * Coordinate in XYZ tile numbering scheme. + */ + type X = number; + + /** + * Tile Y coordinate (row) + * Coordinate in XYZ tile numbering scheme. + */ + type Y = number; + + /** + * Slice of data (eg Data Lens query data row) that represents a data point. + * Each row is transformed into TilePoint and passed to renderTile callback. By default each row is an Object where property names correspond to data column names. + * This representation can be changed with the dataToRows callback. + */ + type Row = number; + } + + /** + * Provides functionality of value-based heat map with density alpha mask. + * Layer support different types of blending, including weighted average. Also it allows to apply alpha mask calculated by density. + * In most cases, the layer consumes data grouped by 1x1 pixels buckets. For proper averaging it requires aggregated value and count (number of rows in bucket) for each bucket. + * Blending of buckets is implemented via kernel density estimation (KDE) with a Gaussian kernel. + */ + class HeatmapLayer extends H.datalens.RasterLayer { + /** + * Constructor + * @param provider {H.datalens.QueryTileProvider} - Source of tiled data + * @param options {H.datalens.HeatmapLayer.Options} - Configuration for data processing and rendering + */ + constructor(provider: H.datalens.QueryTileProvider, options: H.datalens.HeatmapLayer.Options); + + /** + * Default value for dataToRows callback option. It represents each row as an object where property names correspond to data column names. + * @param data {H.datalens.Service.Data} + * @param x {H.datalens.QueryTileProvider.X} + * @param y {H.datalens.QueryTileProvider.Y} + * @param zoom {H.datalens.QueryTileProvider.Zoom} + * @returns {Array} + */ + static defaultDataToRows: (data: H.datalens.Service.Data, x: H.datalens.QueryTileProvider.X, y: H.datalens.QueryTileProvider.Y, zoom: H.datalens.QueryTileProvider.Zoom) => + H.datalens.HeatmapLayer.Row[]; + + /** + * Set of possible values for the inputScale option + * @type {H.datalens.HeatmapLayer.InputScale} + */ + static inputScale: H.datalens.HeatmapLayer.InputScale; + + /** + * Set of possible values for the aggregation option + * @type {H.datalens.HeatmapLayer.Aggregation} + */ + static aggregation: H.datalens.HeatmapLayer.Aggregation; + + /** + * @param zoom {number} - zoom level + * @return {H.datalens.HeatmapLayer.Options} + */ + getOptionsPerZoom(zoom: number): H.datalens.HeatmapLayer.Options; + + /** + * Removes listeners, and references to memory consuming objects, from this layer. Call this method when you no longer need the layer. + */ + dispose(): void; + + /** + * Force re-rendering of the layer. In the case where the callbacks passed to the layer options are not pure functions, you can call this method to force re-rendering. + */ + redraw(): void; + } + + namespace HeatmapLayer { + /** + * Defines data processing and rendering options for HeatmapLayer. + * The data processing flow of HeatmapLayer is similar to RasterLayer. The initial step of rendering is to split the tile data by rows, where each row represents a bucket. + * By default this step is processed with H.datalens.HeatmapLayer.defaultDataToRows. This behavior can be changed by defining the dataToRows callback. + * To collect the rows for a tile including buffer, the rows must be translated to H.datalens.HeatmapLayer.TilePoint. This translation must be specified with the rowToTilePoint callback. + * Other options define the blending options for the heat map. + * @property dataToRows {function(H.datalens.Service.Data, H.datalens.QueryTileProvider.X, H.datalens.QueryTileProvider.Y, H.datalens.QueryTileProvider.Zoom)=} - + * Defines how the input tile data is split by rows. You can specify this callback to define client-side aggregation and filtering. This callback is called for each tile. + * @property rowToTilePoint {function(H.datalens.HeatmapLayer.Row, H.datalens.HeatmapLayer.X, H.datalens.HeatmapLayer.Y)=} - + * Defines how the row is translated to the H.datalens.HeatmapLayer.TilePoint. This callback is called for each row that is returned from dataToRows. + * @property bandwidth {H.datalens.HeatmapLayer~Bandwidth | H.datalens.HeatmapLayer~BandwidthStop | Array. | + * H.datalens.HeatmapLayer~BandwidthCallback=} - Describes the bandwidth behavior in relation to current zoom level A numeric value sets it static across all levels + * An Object with zoom, value and optional zoomIncrementFactor (1 equals doubling on every zoom increment) defines a behavior across all zoom levels + * An Array of one or more zoom, value objects describes the behavior between the two defined levels and extrapolates the implied change outside of the defined range + * Alternatively defines the level of smoothing as a function of the zoom level. The callback must return a value in pixels. + * The cut-off of the Gaussian kernel is defined as 3 * bandwidth , a multiple (default 3) of bandwidth. + * @property valueRange {function(H.datalens.QueryTileProvider.Zoom)} - Defines the range for the color scale as a function of the zoom level. + * The returned value must be an array of 2 numbers. + * @property countRange {function(H.datalens.QueryTileProvider.Zoom)} - Defines the range for the density alpha mask as a function of the zoom level. + * When defined, the density alpha mask is applied. The returned value must be an array of 2 numbers. + * @property colorScale {function(number)} - Defines a color palette as a function of the normalized value. You can use D3.js library scale functions with the domain [0, 1]. + * @property alphaScale {function(number)} - Defines the alpha mask value as a function of the normalized count. + * You can use D3.js library scale functions with the domain [0, 1] and the range [0, 1]. + * @property aggregation {H.datalens.HeatmapLayer.Aggregation} - Specifies which type of aggregation was applied (eg. type of aggregation function for bucket in the Data Lens query). + * Possible values are SUM or AVERAGE. If the aggregation type is AVERAGE , then an averaged heat map is rendered. + * @property inputScale {H.datalens.HeatmapLayer.InputScale} - Defines the scale (eg logarithmic scale) of the TilePoint value. + * Note: if the value is not in a linear scale, then the aggregation in the source query must be defined with respect to the scale type. + * For example, before applying the average aggregation function in a query, the value must be transformed to the linear scale. This guarantees correct linear averaging of values. + */ + interface Options { + dataToRows?(data: H.datalens.Service.Data, x: H.datalens.QueryTileProvider.X, y: H.datalens.QueryTileProvider.Y, zoom: H.datalens.QueryTileProvider.Zoom): + H.datalens.HeatmapLayer.Row[]; + rowToTilePoint(row: H.datalens.HeatmapLayer.Row, x: H.datalens.HeatmapLayer.X, y: H.datalens.HeatmapLayer.Y): H.datalens.HeatmapLayer.TilePoint; + bandwidth?: H.datalens.HeatmapLayer.Bandwidth | H.datalens.HeatmapLayer.BandwidthStop | H.datalens.HeatmapLayer.BandwidthStop[] | H.datalens.HeatmapLayer.BandwidthCallback; + valueRange?(zoom: H.datalens.QueryTileProvider.Zoom): number[]; + countRange?(zoom: H.datalens.QueryTileProvider.Zoom): number[]; + colorScale?(scale: number): string; + alphaScale?(scale: number): number; + aggregation?: H.datalens.HeatmapLayer.Aggregation; + inputScale?: H.datalens.HeatmapLayer.InputScale; + } + + /** + * Tile X coordinate (column) + * Coordinate in XYZ tile numbering scheme. + */ + type X = number; + + /** + * Tile Y coordinate (row) + * Coordinate in XYZ tile numbering scheme. + */ + type Y = number; + + /** + * Slice of data (eg Data Lens query data row) that represents a data point. + * Each row is transformed into TilePoint and then rendered on a heat map. By default each row is an Object where property names correspond to data column names. + * This representation can be changed with the dataToRows callback. + */ + interface Row { + tx?: number; + ty?: number; + count?: number; + } + + /** + * Defines a constant for the bandwidth + * A number that sets a constant for the bandwidth across all zoom levels. + */ + type Bandwidth = number; + + /** + * Sets the bandwidth for a given zoom level and uses this to calculate the increment or decrement of the bandwidth at other zoom levels + * This object defines the behavior of the bandwidth value across all zoom levels, initialized by a reference zoom level and its value at that level. + * The default behavior with zoomIncrementFactor = 1 doubles the bandwidth with every increasing zoom level and halves it on every decrease in zoom level. + * For example, a bandwidth of 10@zoom1 turns to 20@zoom2 and 5@zoom0. A zoomIncrementFactor of 0 effectively equals the bandwidth number, ignoring the provided zoom level. + * A zoomIncrementFactor of 0.5 mean a bandwidth increase of 50% compared to a factor of 1. So a bandwidth of 10@zoom1 computes to 15@zoom2. + */ + interface BandwidthStop { + zoom: number; + value: number; + zoomIncrementFactor?: number; + } + + /** + * TODO: this is missing in the documentation: https://developer.here.com/visualization/documentation/datalens/h-datalens-heatmaplayer-options.html + */ + type BandwidthCallback = () => void; + + /** + * Defines the input data format for heat map rendering. + * For heat map rendering, each row of data must be represented as a point within the map tile. + * @property x {number} - Row relative to tile + * @property y {number} - Column relative to tile + * @property value {number} - Value at the point (eg aggregated bucket value) + * @property count {number} - Number of contributors to the value at the point (eg number of rows in a bucket) + * @property data {H.datalens.HeatmapLayer.Row} - Reference to source data row + */ + interface TilePoint { + x: number; + y: number; + value: number; + count: number; + data?: H.datalens.HeatmapLayer.Row; + } + + /** + * Set of possible values for the aggregation option. + * If the heat map input data is buckets, then different types of aggregation can be applied to the rows in a bucket. + * The aggregation type is required for proper blending mode of the heat map. For the AVERAGE aggregation type, an averaged heat map is rendered. + * @property SUM {string} - Specifies that the sum aggregation was applied to the bucket value + * @property AVERAGE {string} - Specifies that the average aggregation was applied to the bucket value + */ + enum Aggregation { + SUM, + AVERAGE + } + + /** + * Set of possible values for the inputScale option. + * The input scale is required for proper heat map blending. If the input scale is not linear, then the TilePoint.value is converted to linear scale before calculating the sum or average. + * @property DB {string} - Decibel (dB) scale + * @property LINEAR {string} - Linear scale + * @property LOG {string} - Logarithmic scale + */ + enum InputScale { + DB, + LINEAR, + LOG + } + } + + /** + * Presents data as points or spatial map objects with data-driven styles and client-side clustering. + * Applicable for drawing interactive map objects like markers, polygons, circles and other instances of H.map.Object. Source of data can be either tiled or not tiled. + * Styles for objects can be parametrized with data rows and zoom level. Allows to create data-driven icons for markers like donuts or bars. + * Also enables clustering and data domains for visualizing up to 100k points or more. + */ + class ObjectLayer extends H.map.layer.ObjectLayer { + /** + * Constructor + * @param provider {H.map.provider.RemoteTileProvider | H.datalens.Provider | H.datalens.QueryProvider | H.datalens.QueryTileProvider} - Data source (tiled or not) + * @param options {H.datalens.ObjectLayer.Options} - Defines data processing, clustering and data-driven styling + */ + constructor(provider: H.map.provider.RemoteTileProvider | H.datalens.Provider | H.datalens.QueryProvider | H.datalens.QueryTileProvider, options: H.datalens.ObjectLayer.Options); + + /** + * Default value for dataToRows callback option. It represents each row as an object where property names correspond to data column names. + * @property data {H.datalens.Service.Data} + * @returns {Array} + */ + static defaultDataToRows(data: H.datalens.Service.Data): H.datalens.ObjectLayer.Row[]; + + /** + * A factory method for data-driven icons. The method allows you to build an icon from SVG markup or JsonML object. Provides caching of icons with the same markup. + * @param svg {string | Array} - SVG presented as markup or JsonML Array + * @param options {H.map.Icon.Options=} - Icon options (eg size and anchor). Note that the default anchor is in the middle. + * @param options.size {H.math.ISize | number} - When the icon is a square, you can define the size as a number in pixels + * @returns {H.map.Icon} - Icon which can be used for marker or cluster + */ + static createIcon(svg: string | any[], options?: H.map.Icon.Options): H.map.Icon; + + /** + * Returns cache of icons created with the createIcon method. Can be used to clean the icon cache. + * @return {H.util.Cache} - Icon cache + */ + static getIconCache(): H.util.Cache; + + /** + * Force re-rendering of the layer. In the case where the callbacks passed to the layer options are not pure functions, you can call this method to force re-rendering. + */ + redraw(): void; + + /** + * Recalculates the style and applies it to the map object based on the new StyleState + * @param object {H.map.Object} - Map object + * @param state {H.datalens.ObjectLayer.StyleState} - New state + */ + updateObjectStyle(any: H.map.Object, state: H.datalens.ObjectLayer.StyleState): void; + } + + namespace ObjectLayer { + /** + * Defines data processing and data-driven styling for ObjectLayer + * The initial step of rendering is to split the tile data by rows, where each row represents a bucket. + * By default this step is processed with H.datalens.ObjectLayer.defaultDataToRows. This behavior can be changed by defining the dataToRows callback. + * In the next step each row must be presented as a map object with the rowToMapObject callback. Data-driven styling can be provided with the rowToStyle callback. + * @property dataToRows {function(H.datalens.Service.Data)=} - Defines how the input data is split by rows. You can specify this callback to define client-side aggregation and filtering. + * @property rowToMapObject {function(H.datalens.ObjectLayer.Row, H.datalens.QueryTileProvider.Zoom)} - Defines how each row is presented on the map (eg marker, polygon) + * @property rowToStyle {function(H.datalens.ObjectLayer.Row, H.datalens.QueryTileProvider.Zoom, H.datalens.ObjectLayer.StyleState)=} - + * Defines map object style and icon according to data row and zoom level. Also it can define different styles depending on the StyleState (eg hovered, selected). + * @property dataDomains {H.datalens.ObjectLayer.DataDomains=} - Defines quantization of data for improving data-driven styling performance + * @property clustering {H.datalens.ObjectLayer.Clustering=} - When present, client-side clustering is applied + */ + interface Options { + dataToRows?(data: H.datalens.Service.Data): H.datalens.ObjectLayer.Row[]; + rowToMapObject(row: H.datalens.ObjectLayer.Row, z: H.datalens.QueryTileProvider.Zoom): H.map.Object; + rowToStyle?(row: H.datalens.ObjectLayer.Row, z: H.datalens.QueryTileProvider.Zoom, styleState: H.datalens.ObjectLayer.StyleState): H.datalens.ObjectLayer.ObjectStyleOptions; + dataDomains?: H.datalens.ObjectLayer.DataDomains; + clustering?: H.datalens.ObjectLayer.Clustering; + } + + /** + * Defines client-side clustering in the ObjectLayer. + * When the clustering option is provided, rows returned from dataToRows go to the clustering.rowToDataPoint callback to be transformed to data points. + * Then, the data points are clustered according to clustering.options. Clustering produces clusters and noise points (data points that are not clustered). + * Clusters and noise points must be presented as map objects with the rowToMapObject callback and can be styled with the rowToStyle callback. + * @property rowToDataPoint {H.datalens.ObjectLayer.Row} - Defines data points from rows + * @property options {function(H.datalens.QueryTileProvider.Zoom)} - Defines clustering options as a function of the zoom level + */ + interface Clustering { + rowToDataPoint(row: H.datalens.ObjectLayer.Row): H.clustering.DataPoint; + options(zoom: H.datalens.QueryTileProvider.Zoom): H.clustering.Provider.ClusteringOptions; + } + + /** + * Slice of data (eg Data Lens query data row) that represents a data point. + * Each row is translated to map objects with the rowToMapObject callback. By default each row is an Object where property names correspond to data column names. + * This representation can be changed with the dataToRows callback. + */ + interface Row { + getPosition(): H.geo.Point; + isCluster(): boolean; + lat: number; + lng: number; + } + + /** + * User defined modification of a data-driven style + * StyleState appears as a parameter in the rowToStyle callback. By default it is 'DEFAULT_STATE'. To change StyleState, use the ObjectLayer.updateObjectStyle method. + */ + type StyleState = any; + + /** + * Output from the rowToStyle callback. + * Defines the styles or the icon that is applied to the map object. + * @property icon {H.map.Icon} - Marker icon + * @property style {H.map.SpatialStyle.Options} - Spatial style + * @property arrows {H.map.ArrowStyle.Options} - Style of arrows to render along a polyline + * @property zIndex {number} - The z-index value of the map object, default is 0 + */ + interface ObjectStyleOptions { + icon: H.map.Icon; + style?: H.map.SpatialStyle.Options; + arrows?: H.map.ArrowStyle.Options; + zIndex?: number; + } + + /** + * Input data quantization domain, used to optimize styling performance. + * The option must have properties corresponding to the properties of H.datalens.ObjectLayer.Row. Values must be represented as an Array of Numbers that defines the quantization domain. + * When provided, the input data will be quantized, and rowToStyle will be called only for quantized values. + */ + type DataDomains = any; + } + + /** + * Defines how to load data from a raw data file + * This provider defines the interface for loading data, such as geometries or coordinates, from a local or remote data file in GeoJSON or CSV format + */ + class RawDataProvider extends H.map.provider.RemoteTileProvider { + /** + * Constructor + * @param options {H.datalens.RawDataProvider.Options} - Configures options + */ + constructor(options: H.datalens.RawDataProvider.Options); + + /** + * Updates the data url. Note that new data will be fetched only after the reload method is called. + * @param dataUrl {string} + */ + setDataUrl(dataUrl: string): void; + } + + namespace RawDataProvider { + /** + * Defines options for RawDataProvider + * Options for RawDataProvider + * @property dataUrl - The data url to fetch + * @property dataToFeatures {function(any)=} - Defines how the input data is mapped to an array of GeoJSON features + * @property featuresToRows {function(Array, H.datalens.QueryTileProvider.X, H.datalens.QueryTileProvider.Y, H.datalens.QueryTileProvider.Zoom, + * H.datalens.RawDataProvider.TileSize, H.datalens.RawDataProvider.Helpers)=} - + * Defines how GeoJSON features on a tile should be mapped to data rows, which are inputs to layers such as ObjectLayer and HeatmapLayer + */ + interface Options { + dataUrl?: string; + dataToFeatures?(obj: any): H.datalens.RawDataProvider.Feature[]; + featuresToRows?(features: H.datalens.RawDataProvider.Feature[], x: H.datalens.QueryTileProvider.X, y: H.datalens.QueryTileProvider.Y, z: H.datalens.QueryTileProvider.Zoom, + tileSize: H.datalens.RawDataProvider.TileSize, helpers: H.datalens.RawDataProvider.Helpers): H.datalens.ObjectLayer.Row[]; + } + + /** + * A GeoJSON feature + * A GeoJSON feature object which conforms to the standard GeoJSON spec + */ + type Feature = any; + + /** + * Tile size + * The tile size in pixels. + */ + type TileSize = any; + + /** + * A helper class used in the worker thread + * This helper class provides convenience functions you can use in the worker thread + * @property latLngToPixel {function(H.datalens.RawDataProvider.Latitude, H.datalens.RawDataProvider.Longitude, H.datalens.QueryTileProvider.Zoom, H.datalens.RawDataProvider.TileSize)=} - + * Translates geographical coordinates (latitude, longitude) to world pixel coordinates. + * @property pixelToLatLng {function(H.datalens.RawDataProvider.PX, H.datalens.RawDataProvider.PY, H.datalens.QueryTileProvider.Zoom, H.datalens.RawDataProvider.TileSize)=} - + * Translates world pixel coordinates to geographical coordinates (latitude, longitude). + * @property parseCSV {function(any)=} - Takes CSV data as input, parses it, and return the parsed result. + */ + interface Helpers { + latLngToPixel?(latitude: H.datalens.RawDataProvider.Latitude, longitude: H.datalens.RawDataProvider.Longitude, z: H.datalens.QueryTileProvider.Zoom, + tileSize: H.datalens.RawDataProvider.TileSize): H.datalens.RawDataProvider.PixelCoordinates; + pixelToLatLng?(x: H.datalens.RawDataProvider.PX, y: H.datalens.RawDataProvider.PY, z: H.datalens.QueryTileProvider.Zoom, tileSize: H.datalens.RawDataProvider.TileSize): + H.datalens.RawDataProvider.GeoCoordinates; + parseCSV?(obj: any): any[]; + } + + /** + * Geographic coordinates + * A geographic coordinates pair [lat, lng] + */ + type GeoCoordinates = [number, number]; + + /** + * Latitude coordinate + * The latitude in the geographic coordinates pair + */ + type Latitude = number; + + /** + * Longitude coordinate + * The longitude in the geographic coordinates pair + */ + type Longitude = number; + + /** + * Pixel coordinates + * Pixel coordinates [px, py] pair + */ + type PixelCoordinates = [number, number]; + + /** + * Pixel coordinate in the x direction + * The x coordinate of the pixel coordinates pair [px, py] + */ + type PX = number; + + /** + * Pixel coordinate in the y direction + * The y coordinate of the pixel coordinates pair [px, py] + */ + type PY = number; + } + + /** + * Renders vector tiles using data-driven styles + * This layer binds the spatial data and user data, all provided by the Data Lens REST API. The layer renders geometry features using data-driven styles. + */ + class SpatialLayer extends H.map.layer.TileLayer { + /** + * Constructor + * @param dataProvider {H.datalens.Provider} - Source of tiled data (pass in null if data come from feature properties) + * @param spatialProvider {H.datalens.SpatialTileProvider} - Source of geometry data + * @param options {H.datalens.SpatialLayer.Options} - Configuration for data processing and rendering + */ + constructor(dataProvider: H.datalens.Provider, spatialProvider: H.datalens.SpatialTileProvider, options: H.datalens.SpatialLayer.Options); + + static DEFAULT_STATE: any; + static Spatial: any; + + /** + * Default value for dataToRows callback option. It represents each row as an object where property names correspond to data column names. + */ + static defaultDataToRows: any; + + /** + * Forces re-rendering of the layer. When the callbacks passed to the layer options are not pure functions, you can call this method to force re-rendering. + */ + redraw(): void; + + /** + * This method changes the state of a map object; for example, style on mouse event. + * @param {H.map.Object} spatial + * @param {H.datalens.SpatialLayer.StyleState} state + */ + updateSpatialStyle(spatial: H.map.Object, state: H.datalens.SpatialLayer.StyleState): void; + } + + namespace SpatialLayer { + /** + * Defines data processing and rendering options for SpatialLayer + * The initial step of rendering is to split the tile data by rows, where each row represents a bucket. + * By default this step is processed with H.datalens.SpatialLayer.defaultDataToRows. This behavior can be changed by defining the dataToRows callback. + * @property dataToRows {function(H.datalens.Service.Data, H.datalens.QueryTileProvider.X, H.datalens.QueryTileProvider.Y, H.datalens.QueryTileProvider.Zoom)=} - + * Defines how the input tile data is split by rows. You can specify this callback to define client-side aggregation and filtering. This callback is called for each tile. + * @property rowToSpatialId {function(H.datalens.SpatialLayer.Row)} - + * Defines how to get the spatial ID from a data row. This callback is called for each row that is returned from dataToRows. + * @property featureToSpatialId {function(H.datalens.SpatialLayer.Feature)} - + * Defines how to get the spatial ID from a geometry feature. This callback is called for each geometry feature in the vector tile. + * @property rowToStyle {function(H.datalens.SpatialLayer.Row, H.datalens.QueryTileProvider.Zoom, H.datalens.SpatialLayer.StyleState)} - + * Defines how the row is translated to map object style. This callback is called for each row that is returned from dataToRows. + * @property defaultStyle {function(H.datalens.QueryTileProvider.Zoom, H.datalens.SpatialLayer.StyleState)} - Defines the default map object style. + * @property transformFeature {H.datalens.SpatialLayer.transformFeature} - Defines how to transform the features. + */ + interface Options { + dataToRows?(data: H.datalens.Service.Data, x: H.datalens.QueryTileProvider.X, y: H.datalens.QueryTileProvider.Y, z: H.datalens.QueryTileProvider.Zoom): + H.datalens.SpatialLayer.Row[]; + rowToSpatialId(row: H.datalens.SpatialLayer.Row): string; + featureToSpatialId(feature: H.datalens.SpatialLayer.Feature): string; + rowToStyle(row: H.datalens.SpatialLayer.Row, z: H.datalens.QueryTileProvider.Zoom, styleState: H.datalens.SpatialLayer.StyleState): any; + defaultStyle(z: H.datalens.QueryTileProvider.Zoom, styleState: H.datalens.SpatialLayer.StyleState): any; + transformFeature: H.datalens.SpatialLayer.transformFeature; + } + + /** + * Defines modification of a data-driven style + * StyleState appears as a parameter in the rowToStyle callback. By default it is 'DEFAULT_STATE'. To change StyleState, use the SpatialLayer.updateSpatialStyle method. + */ + type StyleState = any; + + /** + * Defines a slice of data (eg Data Lens query data row) that represents a data point + * By default each row is an object where property names correspond to data column names. This representation can be changed with the dataToRows callback. + */ + type Row = any; + + /** + * Defines a geometry in the vector tile + * Each geometry is described by various properties, including a unique identifier which must be used to map the geometry to user data. + */ + type Feature = any; + + /** + * TODO: missing in documentation: https://developer.here.com/visualization/documentation/datalens/h-datalens-spatiallayer-options.html + */ + type transformFeature = any; + } + + /** + * Specifies how to access layer data (shapes, geometries) using the Data Lens REST API. + * This provider defines the interface for accessing shape layers via the Data Lens REST API. The input data is provided as vector tiles in the MapBox format (Protobuf). + * Data is loaded by tiles. + */ + class SpatialTileProvider extends H.map.provider.RemoteTileProvider { + /** + * Constructor + * @param service {H.datalens.Service} - Data Lens REST API service + * @param options {H.datalens.SpatialTileProvider.Options} - Configures layer name + */ + constructor(service: H.datalens.Service, options: H.datalens.SpatialTileProvider.Options); + + static VectorTile: any; + + /** + * Updates the layer name to be used in the next call of the Data Lens REST API. Note that new data will be fetched only after the reload method is called. + * @param {string} layerName + */ + setLayerName(layerName: string): void; + + /** + * Updates the query's dynamic parameters to be used in the next call of the Data Lens REST API. Note that new data will be fetched only after the reload method is called. + * This method is normally used when updating your visualization. + * @param {any|null} queryParams + */ + setQueryParams(queryParams: any | null): void; + } + + namespace SpatialTileProvider { + /** + * Defines layer name and data accessibility parameters for H.datalens.SpatialTileProvider + * This defines the layer name and dynamic parameters required for fetching tiled geometry data with the Data Lens REST API. Other options from H.datalens.Provider.Options are available. + * @property layerName {string} - The name of the layer to fetch with the Data Lens REST API query + * @property queryParams {any} - The query's dynamic parameters. The dynamic parameters can be used to filter data provided by the query. + */ + interface Options { + layerName: string; + queryParams?: any; + } + } + } +} diff --git a/types/heredatalens/tsconfig.json b/types/heredatalens/tsconfig.json new file mode 100644 index 0000000000..9c60b13753 --- /dev/null +++ b/types/heredatalens/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "heredatalens-tests.ts" + ] +} \ No newline at end of file diff --git a/types/heredatalens/tslint.json b/types/heredatalens/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/heredatalens/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/heremaps/heremaps-tests.ts b/types/heremaps/heremaps-tests.ts index 43c50d417c..97a2a82477 100644 --- a/types/heremaps/heremaps-tests.ts +++ b/types/heremaps/heremaps-tests.ts @@ -28,45 +28,44 @@ function capture(resultContainer: HTMLElement, map: H.Map, ui: H.ui.UI) { * Boilerplate map initialization code starts below: */ // Step 1: initialize communication with the platform -var platform = new H.service.Platform({ +let platform = new H.service.Platform({ app_id: 'DemoAppId01082013GAL', app_code: 'AJKnXv84fjrb0KIHawS0Tg', useHTTPS: true, useCIT: true }); -var defaultLayers = platform.createDefaultLayers(); +let defaultLayers = platform.createDefaultLayers(); -var mapContainer = document.getElementById('map'); +let mapContainer = document.getElementById('map'); // Step 2: initialize a map -var map = new H.Map(mapContainer, defaultLayers.normal.map, { +let map = new H.Map(mapContainer, defaultLayers.normal.map, { // initial center and zoom level of the map zoom: 16, // Champs-Elysees - center: {lat: 48.869145, lng: 2.314298} + center: { lat: 48.869145, lng: 2.314298 } }); // Step 3: make the map interactive // MapEvents enables the event system // Behavior implements default interactions for pan/zoom (also on mobile touch environments) -var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map)); +let behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map)); // Step 4: Create the default UI -var ui = H.ui.UI.createDefault(map, defaultLayers, 'en-US'); - +let ui = H.ui.UI.createDefault(map, defaultLayers, 'en-US'); // Step 6: Create "Capture" button and place for showing the captured area -var resultContainer = document.getElementById('panel'); +let resultContainer = document.getElementById('panel'); // Create container for the "Capture" button -var containerNode = document.createElement('div'); +let containerNode = document.createElement('div'); containerNode.setAttribute('style', 'position:absolute;top:0;left:0;background-color:#fff; padding:10px;'); containerNode.className = 'btn-group'; // Create the "Capture" button -var captureBtn = document.createElement('input'); +let captureBtn = document.createElement('input'); captureBtn.value = 'Capture'; captureBtn.type = 'button'; captureBtn.className = 'btn btn-sm btn-default'; @@ -76,6 +75,101 @@ containerNode.appendChild(captureBtn); mapContainer.appendChild(containerNode); // Step 7: Handle capture button click event -captureBtn.onclick = function() { +captureBtn.onclick = () => { capture(resultContainer, map, ui); -}; \ No newline at end of file +}; + +let icon = new H.map.Icon('svg', { size: 5, crossOrigin: false }); + +let polyline = new H.map.Polyline(new H.geo.Strip()); +// tslint:disable-next-line:array-type +let clipArr: Array>; +clipArr = polyline.clip(new H.geo.Rect(5, 5, 5, 5)); + +let router = platform.getRoutingService(); +let calculateRouteParams = { + waypoint0: 'geo!52.5,13.4', + waypoint1: 'geo!52.5,13.45', + mode: 'fastest;car;traffic:disabled' +}; +router.calculateRoute( + calculateRouteParams, + (result) => { + console.log(result.response.route[0]); + }, + (error) => { + console.log(error); + } +); + +let places = platform.getPlacesService(); +let entryPoint = H.service.PlacesService.EntryPoint; +places.request( + entryPoint.SEARCH, + { + at: '52.5044,13.3909', + q: 'pizza' + }, + (response) => { + console.log(response); + let items = response.results.items; + places.follow( + items[0].href, + (resp) => { + console.log(resp); + }, + (resp) => { + console.log('ERROR: ' + resp); + } + ); + }, + (error) => { + console.log('ERROR: ' + error); + } +); + +let geocoder = platform.getGeocodingService(); +let geocodingParams: H.service.ServiceParameters = { + searchText: '425 W Randolph Street, Chicago' +}; +geocoder.geocode( + geocodingParams, + (result) => { + console.log(result); + console.log(result.Response.View[0].Result[0].Location.DisplayPosition); + }, + (error) => { + console.log(error); + } +); + +// deprecated but w/e +let enterprieseRouter = platform.getEnterpriseRoutingService(); +let calculateIsoline: H.service.ServiceParameters = { + start: 'geo!52.5,13.4', + distance: '1000,2000', + mode: 'fastest;car;traffic:disabled' +}; +enterprieseRouter.calculateIsoline( + calculateIsoline, + (result) => { + console.log(result); + console.log(result.Response.isolines[0]); + }, + (error) => { + console.log(error); + } +); + +// Create a clustering provider +const clusteredDataProvider = new H.clustering.Provider([], { +clusteringOptions: { + // Maximum radius of the neighborhood + eps: 64, + // minimum weight of points required to form a cluster + minWeight: 3 +} +}); + +// Create a layer that will consume objects from our clustering provider +const layer = new H.map.layer.ObjectLayer(clusteredDataProvider); diff --git a/types/heremaps/index.d.ts b/types/heremaps/index.d.ts index bfdd353dd3..89e0992b82 100644 --- a/types/heremaps/index.d.ts +++ b/types/heremaps/index.d.ts @@ -1,14 +1,17 @@ -// Type definitions for HERE Maps API for JavaScript 3.0s +// Type definitions for HERE Maps API for JavaScript 3.0 // Project: https://developer.here.com/ // Definitions by: Joshua Efiong +// Bernd Hacker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 declare namespace H { /***** Map *****/ /** - * Map class defines map instance in the application. By creating this object you will initialize a visible map object which is attached to the provided dom element. Map class is an entry point to all operations related to layers, map objects and geo-screen transformations. By specifying options you can initialize map with predefined view. + * Map class defines map instance in the application. By creating this object you will initialize a visible map object which is attached to the provided dom element. + * Map class is an entry point to all operations related to layers, map objects and geo-screen transformations. By specifying options you can initialize map with predefined view. */ - export class Map extends H.util.EventTarget { + class Map extends H.util.EventTarget { /** * Constructor * @param element {Element} - html element into which the map will be rendered @@ -81,7 +84,8 @@ declare namespace H { getCameraDataForBounds(rect: H.geo.Rect): H.map.ViewModel.CameraData; /** - * This method returns current map viewport. Viewport can be used to modify padding and margin which will reflect the position of the viewport center and the amount of extra data loaded (for margin) + * This method returns current map viewport. + * Viewport can be used to modify padding and margin which will reflect the position of the viewport center and the amount of extra data loaded (for margin) * @returns {H.map.ViewPort} */ getViewPort(): H.map.ViewPort; @@ -105,7 +109,8 @@ declare namespace H { getImprint(): H.map.Imprint; /** - * This method captures desired region of the map and objects on it. Result is returned as an HTML5 Canvas element. Origin of coordinate system for capturing is in the top left corner of the viewport. + * This method captures desired region of the map and objects on it. Result is returned as an HTML5 Canvas element. + * Origin of coordinate system for capturing is in the top left corner of the viewport. * @param callback {function(HTMLCanvasElement=)} - Callback function to call once result of the capturing is ready * @param opt_capturables {Array=} - Collection of "capturable" element(s) to draw into the resulting canvas * @param opt_x1 {number=} - The X coordinate of the left edge of the capturing rectangle defaults to 0 @@ -113,7 +118,7 @@ declare namespace H { * @param opt_x2 {number=} - The X coordinate of the right edge of the capturing rectangle defaults to viewport width * @param opt_y2 {number=} - The Y coordinate of the bottom edge of the capturing rectangle defaults to viewport height */ - capture(callback?: (canvas: HTMLCanvasElement) => void, opt_capturables?: Array, opt_x1?: number, opt_y1?: number, opt_x2?: number, opt_y2?: number): void; + capture(callback?: (canvas: HTMLCanvasElement) => void, opt_capturables?: H.util.ICapturable[], opt_x1?: number, opt_y1?: number, opt_x2?: number, opt_y2?: number): void; /** * This method sets the rendering engine type for the map. Rendering engine is responsible for displaying i.e tiles and data on the map. @@ -123,7 +128,8 @@ declare namespace H { setEngineType(type: H.Map.EngineType): H.Map; /** - * To persistently store the content of a map layer for a given area and range of zoom levels. It can be used to enable map rendering when no internet connection is established and also to reduce the download traffic for frequently visited map areas. + * To persistently store the content of a map layer for a given area and range of zoom levels. + * It can be used to enable map rendering when no internet connection is established and also to reduce the download traffic for frequently visited map areas. * @param opt_onprogress {function(H.util.Request)=} - A callback which is invoked every time when the progress state of the returned store request changes. * @param opt_bounds {H.geo.Rect=} - The area to store, default is the current view bounds * @param opt_min {number=} - The minimum zoom level to store, default is the current zoom level @@ -209,21 +215,21 @@ declare namespace H { * This method retrieves the list of all objects which have been added to the map. * @returns {Array} - the list of all use objects which are currently on the map. */ - getObjects(): Array; + getObjects(): H.map.Object[]; /** * This method adds an array of objects or an object group to the map. * @param mapObjects {Array} * @returns {H.Map} - the map instance */ - addObjects(mapObjects: Array): H.Map; + addObjects(mapObjects: H.map.Object[]): H.Map; /** * This method removes an array of object or an object group from the map. * @param mapObjects {(Array | H.map.Group)} * @returns {H.Map} - the map instance */ - removeObjects(mapObjects: (Array | H.map.Group)): H.Map; + removeObjects(mapObjects: (H.map.Object[] | H.map.Group)): H.Map; /** * Returns the top most z-ordered map object found under the specific screen coordinates. Coordinates are viewport pixel coordinates starting from top left corner as (0, 0) point. @@ -239,7 +245,7 @@ declare namespace H { * @param y {number} - map viewport y-axis pixel coordinate * @returns {Array} */ - getObjectsAt(x: number, y: number): Array; + getObjectsAt(x: number, y: number): H.map.Object[]; /** * This method will dispatch event on the event target object @@ -257,16 +263,17 @@ declare namespace H { * @param callback {Function} - The callback function. * @param opt_scope {Object=} - An optional scope to call the callback in. */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; } - export module Map { + namespace Map { /** - * It defines the number of lower and higher zoom levels, where cached content of the base map is rendered while content of the current zoom level is still loading. Example: if range was set to {lower: 3, higher: 2} and current level is 10 then rendering engine will try to display cached tiles from lower zoom levels 7, 8, 9 and higher levels 11 and 12. + * It defines the number of lower and higher zoom levels, where cached content of the base map is rendered while content of the current zoom level is still loading. + * Example: if range was set to {lower: 3, higher: 2} and current level is 10 then rendering engine will try to display cached tiles from lower zoom levels 7, 8, 9 and higher levels 11 and 12. * @property lower {number} - The number of lower zoom levels to take into account, default is 0 * @property higher {number} - The number of higher zoom levels to take into account, default is 0 */ - export interface BackgroundRange { + interface BackgroundRange { lower: number; higher: number; } @@ -274,7 +281,7 @@ declare namespace H { /** * Types of engines */ - export enum EngineType { + enum EngineType { P2D, PANORAMA, } @@ -288,17 +295,19 @@ declare namespace H { * @property engineType: {H.Map.EngineType=} - The initial engine type to use, default is P2D * @property pixelRatio {number} - The pixelRatio to use for over-sampling in cases of high-resolution displays, default is 1 * @property imprint {H.map.Imprint.Options=} - The imprint options or null to suppress the imprint - * @property renderBaseBackground {H.Map.BackgroundRange=} - Object describes how many cached zoom levels should be used as a base map background while base map tiles are loading. Example: {lower: 3, higher: 2} - * @property autoColor {boolean=} - Indicates whether the UI's colors should automatically adjusted to the base layer, default is true. Up to now only the copyright style will be adjusted. See H.map.layer.Layer.Options#dark + * @property renderBaseBackground {H.Map.BackgroundRange=} - Object describes how many cached zoom levels should be used as a base map background while base map tiles are loading. + * Example: {lower: 3, higher: 2} + * @property autoColor {boolean=} - Indicates whether the UI's colors should automatically adjusted to the base layer, default is true. Up to now only the copyright style will be adjusted. + * See H.map.layer.Layer.Options#dark * @property margin {number=} - The size in pixel of the supplemental area to render for each side of the map * @property padding {H.map.ViewPort.Padding=} - The padding in pixels for each side of the map * @property fixedCenter {boolean=} - Indicates whether the center of the map should remain unchanged if the viewport's size or padding has been changed, default is true */ - export interface Options { + interface Options { center?: H.geo.IPoint; zoom?: number; bounds?: H.geo.Rect; - layers?: Array; + layers?: H.map.layer.Layer[]; engineType?: EngineType; pixelRatio?: number; imprint?: H.map.Imprint.Options; @@ -311,7 +320,7 @@ declare namespace H { } /***** clustering *****/ - export module clustering { + namespace clustering { /** * This class represents the input data structure for data points to be clustered. * @property lat {H.geo.Latitude} - The latitude coordinate of the data point's position @@ -319,7 +328,7 @@ declare namespace H { * @property wt {number} - The weight of the data point * @property data {*} - Data associated with this data point */ - export class DataPoint implements H.geo.IPoint { + class DataPoint implements H.geo.IPoint { /** * Constructor * @param lat {H.geo.Latitude} - The latitude coordinate of the data point's position @@ -340,7 +349,7 @@ declare namespace H { /** * This interface describes a cluster of data points, which fulfill the clustering specification (i.e. data points are within the epsilon and there are enough points to form a cluster). */ - export interface ICluster { + interface ICluster { /** * Returns the maximum zoom level where this cluster doesn't fall apart into sub clusters and/or noise poinst * @returns {number} @@ -354,7 +363,8 @@ declare namespace H { getBounds(): H.geo.Rect; /** - * Invokes the specified callback for each "entry" of the cluster. That "entry" can be either a cluster which implements H.clustering.ICluster interface or a noise point which implements H.clustering.INoisePoint interface. + * Invokes the specified callback for each "entry" of the cluster. + * That "entry" can be either a cluster which implements H.clustering.ICluster interface or a noise point which implements H.clustering.INoisePoint interface. * @param callback {function(H.clustering.IResult)} - The callback gets the currently traversed entry as an argument, which is cluster or noise point. */ forEachEntry(callback: (result: H.clustering.IResult) => void): void; @@ -393,7 +403,7 @@ declare namespace H { /** * This interface represents a data point which does not belong to a cluster. */ - export interface INoisePoint { + interface INoisePoint { /** * This method returns data which coresponds to this noise point. * @returns {*} @@ -428,8 +438,7 @@ declare namespace H { /** * This interface represents the result item of a clustering operation. */ - export interface IResult { - + interface IResult { /** * Returns the geographical position of this cluster result. * @returns {H.geo.Point} @@ -458,8 +467,7 @@ declare namespace H { /** * Interface which specifies the methods a theme must implement. */ - export interface ITheme { - + interface ITheme { /** * Function returns a cluster presentation as a map object. * @param cluster {H.clustering.ICluster} @@ -476,17 +484,18 @@ declare namespace H { } /** - * The clustering provider serves clusters and noise point representation for the map depending on the provided data set. Levels for clustering as well as custom cluster representation can be set via Options. + * The clustering provider serves clusters and noise point representation for the map depending on the provided data set. + * Levels for clustering as well as custom cluster representation can be set via Options. * @property min {number} - Minimum zoom level at which provider can cluster data * @property max {number} - Maximum zoom level at which provider can cluster data */ - export class Provider extends H.util.EventTarget { + class Provider extends H.util.EventTarget { /** * Constructor * @param dataPoints {Array} * @param opt_options {H.clustering.Provider.Options=} */ - constructor(dataPoints: Array, opt_options?: H.clustering.Provider.Options); + constructor(dataPoints: H.clustering.DataPoint[], opt_options?: H.clustering.Provider.Options); /** * This method will dispatch event on the event target object @@ -504,13 +513,13 @@ declare namespace H { * @param callback {Function} * @param opt_scope {Object=} */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; /** * This method sets new data to the provider * @param dataPoints {Array} */ - setDataPoints(dataPoints: Array): void; + setDataPoints(dataPoints: H.clustering.DataPoint[]): void; /** * This method adds a data point to the provider. Beware that this method provokes reclustering of the whole data set. @@ -522,7 +531,7 @@ declare namespace H { * This method adds a list of data points to the provider. Beware that this method provokes reclustering of the whole data set. * @param dataPoints {Array} */ - addDataPoints(dataPoints: Array): void; + addDataPoints(dataPoints: H.clustering.DataPoint[]): void; /** * This method removes a data point from the provider. Beware that this method provokes reclustering of the whole data set. @@ -556,7 +565,7 @@ declare namespace H { * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered * @returns {Array} - a list of intersecting objects */ - requestDomMarkers(bounds: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + requestDomMarkers(bounds: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): H.map.DomMarker[]; /** * This method always returns true as we don't have information about visual representation until we have the clustering result and apply the theme. @@ -572,7 +581,7 @@ declare namespace H { * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered * @returns {Array} - a list of intersecting objects */ - requestMarkers(bounds: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + requestMarkers(bounds: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): H.map.Marker[]; /** * This method always returns true as we don't have information about visual representation until we have the clustering result and apply the theme. @@ -588,7 +597,7 @@ declare namespace H { * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered * @returns {Array} - a list of intersecting objects */ - requestSpatials(bounds: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + requestSpatials(bounds: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): H.map.Spatial[]; /** * Returns the spatial objects which intersect the given tile @@ -597,7 +606,7 @@ declare namespace H { * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered * @returns {Array} - a list of intersecting objects */ - requestSpatialsByTile(tile: H.map.provider.Tile, visiblesOnly: boolean, cacheOnly: boolean): Array; + requestSpatialsByTile(tile: H.map.provider.Tile, visiblesOnly: boolean, cacheOnly: boolean): H.map.Spatial[]; /** * Returns the accumulate invalidations of this provider's objects that have occurred. @@ -616,15 +625,16 @@ declare namespace H { max: number; } - export module Provider { + namespace Provider { /** * Options which are used within cluster calculations. - * @property eps {number=} - epsilon parameter for cluster calculation. For the FASTGRID strategy it must not exceed 256 and must take values that are power of 2. For the GRID and DYNAMICGRID strategies it can take values from 10 to 127. Default is 32. + * @property eps {number=} - epsilon parameter for cluster calculation. For the FASTGRID strategy it must not exceed 256 and must take values that are power of 2. + * For the GRID and DYNAMICGRID strategies it can take values from 10 to 127. Default is 32. * @property minWeight {number=} - the minimum points weight sum to form a cluster, default is 2 * @property projection {H.geo.IProjection=} - projection to use for clustering, default is H.geo.mercator * @property strategy {H.clustering.Provider.Strategy=} - clustering stretegy, defaults to H.clustering.Provider.Strategy.FASTGRID */ - export interface ClusteringOptions { + interface ClusteringOptions { eps?: number; minWeight?: number; projection?: H.geo.IProjection; @@ -638,7 +648,7 @@ declare namespace H { * @property clusteringOptions {H.clustering.Provider.ClusteringOptions=} - options for clustering algorithm * @property theme {H.clustering.ITheme=} - cluster and noise point graphical representation */ - export interface Options { + interface Options { min?: number; max?: number; clusteringOptions?: H.clustering.Provider.ClusteringOptions; @@ -646,9 +656,12 @@ declare namespace H { } /** - * Enumeration represents possible clustering strategies. FASTGRID clustering is the efficient way to cluster large sets of data points. GRID clustering is slower but has greater precision due to the bigger range of epsilon values, this strategy suitable for clustering smaller data sets (up to 1000 data points) on desktop devices. DYNAMICGRID clustering uses the same algorithm of clustering as the GRID, but clusters on the viewport basis is meant to be used with data sets that are subject to the frequent update operations. + * Enumeration represents possible clustering strategies. FASTGRID clustering is the efficient way to cluster large sets of data points. + * GRID clustering is slower but has greater precision due to the bigger range of epsilon values, this strategy suitable for clustering smaller data sets (up to 1000 data points) + * on desktop devices. DYNAMICGRID clustering uses the same algorithm of clustering as the GRID, but clusters on the viewport basis is meant to be used with data sets that are subject + * to the frequent update operations. */ - export enum Strategy { + enum Strategy { FASTGRID, GRID, DYNAMICGRID, @@ -657,11 +670,11 @@ declare namespace H { } /***** data *****/ - export module data { + namespace data { /** * An abstract reader class defines interface for data readers and has general functionality related to fetching data and reader events. */ - export class AbstractReader extends H.util.EventTarget { + class AbstractReader extends H.util.EventTarget { /** * Constructor * @param opt_url {string=} @@ -669,7 +682,8 @@ declare namespace H { constructor(opt_url?: string); /** - * Method returns H.map.layer.ObjectLayer that contains parsed data, and can be added directly to the map. It returns new instance of the class with every invocation. If data hasn't been parsed it will return H.map.layer.ObjectLayer that contains partial information, and reader will add new parsed objects to the layer's provider later on. + * Method returns H.map.layer.ObjectLayer that contains parsed data, and can be added directly to the map. It returns new instance of the class with every invocation. + * If data hasn't been parsed it will return H.map.layer.ObjectLayer that contains partial information, and reader will add new parsed objects to the layer's provider later on. * @returns {H.map.layer.ObjectLayer} */ getLayer(): H.map.layer.ObjectLayer; @@ -678,7 +692,7 @@ declare namespace H { * Method returns collection of currently parsed, and converted to H.map.Object data objects. Method returns only currently parsed objects if parsing is ongoing. * @returns {Array} */ - getParsedObjects(): Array; + getParsedObjects(): H.map.Object[]; /** * Returns URL of the current file, which is either in process of fetching/parsing or file that has been already parsed. @@ -687,7 +701,8 @@ declare namespace H { getUrl(): string | void; /** - * Method sets reader's URL. Method resets current Reader's state to its initial values (clears data about last parsed objects, etc.), and throws InvalidState exception if Reader's state is not READY or ERROR. + * Method sets reader's URL. Method resets current Reader's state to its initial values (clears data about last parsed objects, etc.), and throws + * InvalidState exception if Reader's state is not READY or ERROR. * @param url {string} - The new URL * @returns {H.data.AbstractReader} */ @@ -700,16 +715,17 @@ declare namespace H { getState(): H.data.AbstractReader.State; /** - * Method launches parsing of the data file at the current url (see H.data.AbstractReader#setUrl or H.data.AbstractReader). Method uses XHR as a transport therefore same origin policy applies, or server should respond with proper CORS headers. + * Method launches parsing of the data file at the current url (see H.data.AbstractReader#setUrl or H.data.AbstractReader). + * Method uses XHR as a transport therefore same origin policy applies, or server should respond with proper CORS headers. */ parse(): void; } - export module AbstractReader { + namespace AbstractReader { /** * The event class for state events that are dispatched by AbstractReader */ - export class Event extends H.util.Event { + class Event extends H.util.Event { /** * Constructor * @param target {(H.data.AbstractReader | H.map.Object)} - The target that's passed to event listeners @@ -723,7 +739,7 @@ declare namespace H { /** * The state types of an Reader. Possible states are: */ - export enum State { + enum State { ERROR, LOADING, VISIT, @@ -733,16 +749,16 @@ declare namespace H { } /***** geo *****/ - export module geo { + namespace geo { /** * A Geographic coordinate that specifies the height of a point in meters. A value of undefined is treated as 0. */ - export type Altitude = number; + type Altitude = number; /** * Contexts for altitudes to specify the contextual origin of an altitude's value */ - export enum AltitudeContext { + enum AltitudeContext { /** Ground level */ undefined, /** Ground level */ @@ -766,14 +782,14 @@ declare namespace H { * @property alt {H.geo.Altitude=} - The altitude coordinate. * @property ctx {H.geo.AltitudeContext=} - The altitude context. */ - export interface IPoint { + interface IPoint { lat: H.geo.Latitude; lng: Longitude; alt?: H.geo.Altitude; ctx?: H.geo.AltitudeContext; } - export interface IProjection { + interface IProjection { latLngToPoint(lat: number, lng: number, opt_out?: H.math.Point): H.math.Point; xyToGeo(x: number, y: number, opt_out?: H.geo.Point): H.geo.Point; pointToGeo(point: H.math.IPoint, opt_out?: H.geo.Point): H.geo.Point; @@ -783,12 +799,12 @@ declare namespace H { /** * A geographic coordinate that specifies the north-south position of a point on the Earth's surface in the range from -90 to + 90 degrees, inclusive. */ - export type Latitude = number; + type Latitude = number; /** * A Geographic coordinate that specifies the east-west position of a point on the Earth's surface in the range from -180 to 180 degrees, inclusive. */ - export type Longitude = number; + type Longitude = number; /** * Class represents a geographical point, which is defined by the latitude, longitude and optional altitude. @@ -797,7 +813,7 @@ declare namespace H { * @property alt {H.geo.Altitude} - The altitude coordinate. * @property ctx {H.geo.AltitudeContext} - The altitude context. */ - export class Point implements IPoint { + class Point implements IPoint { /** * Constructor * @property lat {H.geo.Latitude} - The latitude coordinate. @@ -822,7 +838,8 @@ declare namespace H { distance(other: IPoint): number; /** - * This method calculates the geographic point of a destination point using the distance and bearing specified by the caller. The altitude is ignored, instead the WGS84 Mean Radius is taken. + * This method calculates the geographic point of a destination point using the distance and bearing specified by the caller. + * The altitude is ignored, instead the WGS84 Mean Radius is taken. * @param bearing {number} - The bearing to use in the calculation in degrees. * @param distance {number} - The distance to the destination in meters. * @param opt_overGreatCircle {boolean=} - If true the computation uses the 'Great Circle' otherwise 'Rhumb Line'. @@ -831,13 +848,14 @@ declare namespace H { walk(bearing: number, distance: number, opt_overGreatCircle?: boolean): Point; /** - * This method validates the given IPoint. It checks, if lat, lng, alt and ctx have valid types. Additionally the value of the lat property is clamped into a range of -90 ... +90 and the value of the lng property is modulo into a range of -180 ... +180 plus validates the values of the alt and ctx properties + * This method validates the given IPoint. It checks, if lat, lng, alt and ctx have valid types. Additionally the value of the lat property is clamped into a range of -90 ... +90 + * and the value of the lng property is modulo into a range of -180 ... +180 plus validates the values of the alt and ctx properties * @param point {H.geo.IPoint} - The point to validate * @param opt_caller {Function=} - The caller to use for InvalidArgumentError. If omitted no error is thrown * @param opt_argNr {number=} - The argument number to use for InvalidArgumentError. * @returns {boolean} - if the given point could validate */ - static validate(point: IPoint, opt_caller?: Function, opt_argNr?: number): boolean; + static validate(point: IPoint, opt_caller?: () => void, opt_argNr?: number): boolean; /** * This method creates a Point instance from a given IPoint object. @@ -855,7 +873,7 @@ declare namespace H { /** * This class represents a rectangular geographic area. The area is defined by four geographical coordinates two (left, right) longitudes and two (top, bottom) latitudes. */ - export class Rect { + class Rect { /** * Constructor * @param top {H.geo.Latitude} - the northern-most latitude @@ -1030,7 +1048,8 @@ declare namespace H { * @param opt_out {H.geo.Rect=} - an optional rect to store the results * @returns {H.geo.Rect} - either the opt_out rect or a new rect */ - static merge(topA: H.geo.Latitude, leftA: H.geo.Longitude, bottomA: H.geo.Latitude, rightA: H.geo.Longitude, topB: H.geo.Latitude, leftB: H.geo.Longitude, bottomB: H.geo.Latitude, rightB: H.geo.Longitude, opt_out?: H.geo.Rect): H.geo.Rect; + static merge(topA: H.geo.Latitude, leftA: H.geo.Longitude, bottomA: H.geo.Latitude, rightA: H.geo.Longitude, topB: H.geo.Latitude, leftB: H.geo.Longitude, bottomB: H.geo.Latitude, + rightB: H.geo.Longitude, opt_out?: H.geo.Rect): H.geo.Rect; /** * This method creates a rectangular area from a top-left and bottom-right point pair. @@ -1047,7 +1066,7 @@ declare namespace H { * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments * @returns {H.geo.Rect} - returns the minimum rectangular area covering the points or null if no point is covered */ - static coverPoints(pointArray: Array, opt_skipValidation?: boolean): H.geo.Rect; + static coverPoints(pointArray: H.geo.IPoint[], opt_skipValidation?: boolean): H.geo.Rect; /** * This method creates the minimum rectangular area covering all of the coordinates in the argument array. @@ -1055,7 +1074,7 @@ declare namespace H { * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments * @returns {(H.geo.Rect | undefined)} - returns the minimum rectangular area covering the coordinates */ - static coverLatLngAlts(latLngAltArray: Array, opt_skipValidation?: boolean): H.geo.Rect | void; + static coverLatLngAlts(latLngAltArray: number[], opt_skipValidation?: boolean): H.geo.Rect | void; /** * This method creates the minimum rectangular area covering all of the rectangular areas in the argument array. @@ -1063,7 +1082,7 @@ declare namespace H { * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments * @returns {(H.geo.Rect | undefined)} - returns the minimum rectangular area covering the rectangular areas */ - static coverRects(rectArray: Array, opt_skipValidation?: boolean): H.geo.Rect | void; + static coverRects(rectArray: H.geo.Rect[], opt_skipValidation?: boolean): H.geo.Rect | void; /** * This method clones the given bounding rect and resizes the clone if necessary until the location supplied by the caller is at its center. @@ -1077,13 +1096,13 @@ declare namespace H { /** * A strip is a flat list of latitude, longitude, altitude tuples in a fixed order. */ - export class Strip { + class Strip { /** * Constructor * @param opt_latLngAlts {Array=} - An optional array of latitude, longitude and altitude triples to initialize the strip with. * @param opt_ctx {H.geo.AltitudeContext=} - An optional altitude context for all altitudes contained in this strip. */ - constructor(opt_latLngAlts?: Array, opt_ctx?: H.geo.AltitudeContext); + constructor(opt_latLngAlts?: number[], opt_ctx?: H.geo.AltitudeContext); /** * This method pushes a lat, lng, alt to the end of this strip. @@ -1100,7 +1119,7 @@ declare namespace H { * @param opt_latLngAlts {Array=} - The lat, lng, alt values to add * @returns {Array} - an array of removed elements */ - spliceLatLngAlts(index: number, opt_nRemove?: number, opt_latLngAlts?: Array): Array; + spliceLatLngAlts(index: number, opt_nRemove?: number, opt_latLngAlts?: number[]): number[]; /** * This method inserts one set of lat, lng, alt values into the strip at the specified index. @@ -1145,7 +1164,8 @@ declare namespace H { extractPoint(pointIndex: number, opt_out?: H.geo.Point): H.geo.Point; /** - * This method is a utility method that iterates over the lat, lng, alt array and calls the provided function for each 3 elements passing lat, lng and alt and the virtual point index as arguments. + * This method is a utility method that iterates over the lat, lng, alt array and calls the provided function for each 3 elements passing lat, lng and alt and the virtual point + * index as arguments. * @param eachFn {function(H.geo.Latitude, H.geo.Longitude, H.geo.Altitude, number)} - the function to be called for each 3 elements * @param opt_start {number=} - an optional start index to iterate from * @param opt_end {number=} - an optional end index to iterate to @@ -1169,7 +1189,7 @@ declare namespace H { * This method returns the internal array keeping the lat, lng, alt values. Modifying this array directly can destroy the integrity of this strip. Use it only for read access. * @returns {Array} - returns the raw lat, lng, alt values of this strip */ - getLatLngAltArray(): Array; + getLatLngAltArray(): number[]; /** * This method returns the bounding box of this strip. @@ -1190,18 +1210,18 @@ declare namespace H { * @param latLngs {Array} - the array of lat, lng value. * @returns {H.geo.Strip} - the strip containing the lat, lng values */ - static fromLatLngArray(latLngs: Array): H.geo.Strip; + static fromLatLngArray(latLngs: number[]): H.geo.Strip; } } /***** lang *****/ /***** map *****/ - export module map { + namespace map { /** * This class represents marker, which offers a means of identifying a location on the map with an icon. */ - export class AbstractMarker extends H.map.Object { + class AbstractMarker extends H.map.Object { /** * Constructor * @param position {H.geo.IPoint} - The location of this marker @@ -1236,18 +1256,19 @@ declare namespace H { setIcon(icon: (H.map.Icon | H.map.DomIcon)): H.map.AbstractMarker; } - export module AbstractMarker { + namespace AbstractMarker { /** * Options used to initialize a AbstractMarker * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true. * @property zIndex {number=} - The z-index value of the map object, default is 0 - * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. + * This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. * @property icon {(H.map.Icon | H.map.DomIcon)=} - The icon to use for the visual representation, if omitted a default icon is used. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. */ - export interface Options { + interface Options { min?: number; max?: number; visibility?: boolean; @@ -1261,7 +1282,7 @@ declare namespace H { /** * This class represents style attributes for arrows to be rendered along a polyline. A ArrowStyle instance is always treated as immutable to avoid inconstiencies and must not modified. */ - export class ArrowStyle { + class ArrowStyle { /** * Constructor * @param opt_options {(H.map.ArrowStyle | H.map.ArrowStyle.Options)=} @@ -1276,15 +1297,18 @@ declare namespace H { equals(other: (H.map.ArrowStyle | H.map.ArrowStyle.Options)): boolean; } - export module ArrowStyle { + namespace ArrowStyle { /** * An object type to specify the style of arrows to render along a polyline * @property fillColor {string=} - The CSS color value used to fill the arrow shapes. If omitted or the value evaluates to false it defaults to "rgba(255, 255, 255, 0.75)" - * @property width {number=} - The width of the arrow shape. The value is taken as a factor of the width of the line, where the arrow description is applied. If omitted or the value is <= 0 it defaults to 1.2 - * @property length {number=} - The length of the arrow shapes. The value is taken as a factor of the width of the line at the end of which the arrow is drawn. If omitted or the value is <= 0 it defaults to 1.6 - * @property frequency {number=} - The frequency of arrow shapes. The value is taken as factor of the length of the arrow. A value of 1 results in gapless arrows. If omitted or the value is false it defaults to 5 + * @property width {number=} - The width of the arrow shape. The value is taken as a factor of the width of the line, where the arrow description is applied. + * If omitted or the value is <= 0 it defaults to 1.2 + * @property length {number=} - The length of the arrow shapes. The value is taken as a factor of the width of the line at the end of which the arrow is drawn. + * If omitted or the value is <= 0 it defaults to 1.6 + * @property frequency {number=} - The frequency of arrow shapes. The value is taken as factor of the length of the arrow. A value of 1 results in gapless arrows. + * If omitted or the value is false it defaults to 5 */ - export interface Options { + interface Options { fillColor?: string; width?: number; length?: number; @@ -1295,17 +1319,18 @@ declare namespace H { /** * A Polygon with a circular shape. */ - export class Circle extends H.map.Polygon { + class Circle extends H.map.Polygon { /** * Constructor * @param center {H.geo.IPoint} - The geographical coordinates of the circle's center * @param radius {number} - The radius of the circle in meters - * @param opt_options {H.map.Circle.Options=} - An object that specifies circle options and their initial values (among these, precision has a significant impact on the shape of the circle - please see + * @param opt_options {H.map.Circle.Options=} - An object that specifies circle options and their initial values (among these, precision has a significant impact on the shape of the circle */ constructor(center: H.geo.IPoint, radius: number, opt_options?: H.map.Circle.Options); /** - * To set the geographical center point of this circle. If the specified center is an instance of H.geo.Point you must not modify this Point instance without calling setCenter immediately afterwards. + * To set the geographical center point of this circle. If the specified center is an instance of H.geo.Point you must not modify this Point instance without calling setCenter + * immediately afterwards. * @param center {H.geo.IPoint} */ setCenter(center: H.geo.IPoint): void; @@ -1341,18 +1366,22 @@ declare namespace H { getPrecision(): number; } - export module Circle { + namespace Circle { /** * @property style {H.map.SpatialStyle=} - the style to be used when tracing the polyline * @property visibility {boolean=} - An optional boolean value indicating whether this map object is visible, default is true - * @property precision {number=} - The precision of a circle as a number of segments to be used when rendering the circle. The value is clamped to the range between [4 ... 360], where 60 is the default. Note that the lower the value the more angular and the less circle-like the shape appears and, conversely, the higher the value the smoother and more rounded the result. Thus, starting at the extreme low end of the possible values, 4 produces a square, 6 a hexagon, while 30 results in a circle-like shape, although it appears increasingly angular as the zoom level increases (as you zoom in), and finally 360 produces a smooth circle. + * @property precision {number=} - The precision of a circle as a number of segments to be used when rendering the circle. The value is clamped to the range between [4 ... 360], where 60 is + * the default. Note that the lower the value the more angular and the less circle-like the shape appears and, conversely, the higher the value the smoother and more rounded the result. + * Thus, starting at the extreme low end of the possible values, 4 produces a square, 6 a hexagon, while 30 results in a circle-like shape, although it appears increasingly angular as + * the zoom level increases (as you zoom in), and finally 360 produces a smooth circle. * @property zIndex {number=} - The z-index value of the circle, default is 0 * @property min {number=} - The minimum zoom level for which the circle is visible, default is -Infinity * @property max {number=} - The maximum zoom level for which the circle is visible, default is Infinity - * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. + * This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData */ - export interface Options { + interface Options { style?: H.map.SpatialStyle | H.map.SpatialStyle.Options; visibility?: boolean; precision?: number; @@ -1365,20 +1394,21 @@ declare namespace H { } /** - * The class represents data model of the map. It holds list of layers that are rendered by map's RenderEngine. The class listens to 'update' events from layers and dispatches them to the RenderEngine. + * The class represents data model of the map. It holds list of layers that are rendered by map's RenderEngine. + * The class listens to 'update' events from layers and dispatches them to the RenderEngine. */ - export class DataModel extends H.util.OList { + class DataModel extends H.util.OList { /** * Constructor * @param opt_layers {Array=} - array of layers to be added to the data model */ - constructor(opt_layers?: Array); + constructor(opt_layers?: H.map.layer.Layer[]); } /** * A visual representation of the H.map.DomMarker. */ - export class DomIcon { + class DomIcon { /** * Constructor * @param element {!(Element | string)} - The element or markup to use for this icon @@ -1387,22 +1417,25 @@ declare namespace H { constructor(element: (Element | string), opt_options?: H.map.DomIcon.Options); } - export module DomIcon { + namespace DomIcon { /** * Options used to initialize a DomIcon - * @property onAttach {function(Element, H.map.DomIcon, H.map.DomMarker)=} - A callback which is invoked before a clone of the icon's element is appended and displayed on the map. This callback can be used to setup the clone. - * @property onDetach {function(Element, H.map.DomIcon, H.map.DomMarker)=} - A callback which is invoked after a clone of the icon's element is removed from the map. This callback can be used to clean up the clone. + * @property onAttach {function(Element, H.map.DomIcon, H.map.DomMarker)=} - A callback which is invoked before a clone of the icon's element is appended and displayed on the map. + * This callback can be used to setup the clone. + * @property onDetach {function(Element, H.map.DomIcon, H.map.DomMarker)=} - A callback which is invoked after a clone of the icon's element is removed from the map. + * This callback can be used to clean up the clone. */ - export interface Options { - onAttach?: (el: Element, icon: H.map.DomIcon, marker: H.map.DomMarker) => void; - onDetach?: (el: Element, icon: H.map.DomIcon, marker: H.map.DomMarker) => void; + interface Options { + onAttach?(el: Element, icon: H.map.DomIcon, marker: H.map.DomMarker): void; + onDetach?(el: Element, icon: H.map.DomIcon, marker: H.map.DomMarker): void; } } /** - * A marker with a visual representation in the form of a full styleable and scripteable DOM element. DomMarker are predestinated if small amounts of markers with dynamic styled and/or scripted icons should be displayed om the map (e.g. animated interactive SVG). + * A marker with a visual representation in the form of a full styleable and scripteable DOM element. DomMarker are predestinated if small amounts of markers with dynamic styled and/or + * scripted icons should be displayed om the map (e.g. animated interactive SVG). */ - export class DomMarker extends H.map.AbstractMarker { + class DomMarker extends H.map.AbstractMarker { /** * Constructor * @param position {H.geo.IPoint} @@ -1411,18 +1444,19 @@ declare namespace H { constructor(position: H.geo.IPoint, opt_options?: H.map.DomMarker.Options); } - export module DomMarker { + namespace DomMarker { /** * Options used to initialize a DomMarker * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true. * @property zIndex {number=} - The z-index value of the map object, default is 0 - * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to + * instantiate an object. * @property icon {H.map.DomIcon=} - The icon to use for the visual representation, if omitted a default icon is used. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData */ - export interface Options { + interface Options { min?: number; max?: number; visibility?: boolean; @@ -1436,7 +1470,7 @@ declare namespace H { /** * This class represents a spatial shape in geographic space. It is defined by a path containing the vertices of the shape (lat, lng, alt values). */ - export class GeoShape extends H.map.Spatial { + class GeoShape extends H.map.Spatial { /** * Constructor * @param isClosed {boolean} - Indicates whether this geographical shape is closed (a polygon) @@ -1468,7 +1502,7 @@ declare namespace H { /** * This class represents a map object which can contain other map objects. It's visibility, zIndex and object-order influences the contained map objects */ - export class Group extends H.map.Object { + class Group extends H.map.Object { /** * Constructor * @param opt_options {H.map.Group.Options=} - an optional object containing initialization values @@ -1488,7 +1522,7 @@ declare namespace H { * @param opt_recursive {boolean=} - Indicates whether objects in sub-groups are also collected . * @returns {!Array} */ - getObjects(opt_recursive?: boolean): Array; + getObjects(opt_recursive?: boolean): H.map.Object[]; /** * Method returns the bounding rectangle for the group. The rectangle is the smallest rectangle that covers all objects. If group doesn't contains objects method returns null. @@ -1507,7 +1541,7 @@ declare namespace H { * Appends a list of objects to this group * @param objects {Array} */ - addObjects(objects: Array): void; + addObjects(objects: H.map.Object[]): void; /** * Removes an object from this group. @@ -1520,7 +1554,7 @@ declare namespace H { * Removes objects from this group. * @param objects {!Array} - The list of objects to remove */ - removeObjects(objects: Array): void; + removeObjects(objects: H.map.Object[]): void; /** * Method removes all objects from the group. @@ -1528,45 +1562,46 @@ declare namespace H { removeAll(): void; } - export module Group { + namespace Group { /** * Options used to initialize a group * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity * @property visibility {boolean=} - Indicates whether the map object is visible, default is true * @property zIndex {number=} - The z-index value of the map object, default is 0 - * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate + * an object. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. * @property objects {Array=} - A list of map objects to add initially to this group. */ - export interface Options { + interface Options { min?: number; max?: number; visibility?: boolean; zIndex?: number; provider?: H.map.provider.Provider; data?: any; - objects?: Array; + objects?: H.map.Object[]; } } /** * This class represents an area that objects, like a marker, occupies in the screen space, meaning that object can be probed and returned by H.Map@getObjectsAt method. */ - export class HitArea { + class HitArea { /** * Constructor * @param shapeType {H.map.HitArea.ShapeType} - The shape type of the HitArea * @param opt_values {Array=} - The type-dependent values to define the shape of the hit area. The format for the different types are: */ - constructor(shapeType: H.map.HitArea.ShapeType, opt_values?: Array); + constructor(shapeType: H.map.HitArea.ShapeType, opt_values?: number[]); } - export module HitArea { + namespace HitArea { /** * Enumeration represents possible shape types that HitArea can have. */ - export enum ShapeType { + enum ShapeType { NONE, RECT, CIRCLE, @@ -1577,8 +1612,7 @@ declare namespace H { /** * Control interface defines method which are used for direct view or camera manipulation */ - export interface IControl { - + interface IControl { /** * This method starts control action for camera. This action allows to control camera animation and movement according to provided values in the H.map.IControl#control function * @param opt_kinetics {H.util.kinetics.IKinetics=} - kinetics settings @@ -1588,7 +1622,8 @@ declare namespace H { startControl(opt_kinetics?: H.util.kinetics.IKinetics, opt_atX?: number, opt_atY?: number): void; /** - * This method triggers single control action on engine. This will trigger an animation which will start modification of the view's or camera's properties according to values begin set. Modification will occur at every frame. The speed values are measure by 'levels per frame' were 1 level cooresponds to a distance to next zoom level. + * This method triggers single control action on engine. This will trigger an animation which will start modification of the view's or camera's properties according to values begin set. + * Modification will occur at every frame. The speed values are measure by 'levels per frame' were 1 level cooresponds to a distance to next zoom level. * @param moveX {number} - moves the view/cam in right/left direction * @param moveY {number} - moves the view/cam in bottom/top direction * @param moveZ {number} - moves the view/cam in depth direction (changes zoom level) @@ -1601,9 +1636,11 @@ declare namespace H { control(moveX: number, moveY: number, moveZ: number, angleX: number, angleY: number, angleZ: number, zoom: number, opt_timestamp?: number): void; /** - * This method ends current control, which will stop ongoing animation triggered by the startControl method. This method can prevent kinetics as well as it can adjust the final view if the adjust function is being passed. + * This method ends current control, which will stop ongoing animation triggered by the startControl method. This method can prevent kinetics as well as it can adjust the final view if + * the adjust function is being passed. * @param opt_preventKinetics {boolean=} - if set to true will prevent kinetics animation - * @param opt_adjustView {function(H.map.ViewModel.CameraData)=} - user defined function which can adjust the final view this function takes last requestedData from the view model and should return a modified H.map.ViewModel.CameraData which will be set as the final view + * @param opt_adjustView {function(H.map.ViewModel.CameraData)=} - user defined function which can adjust the final view this function takes last requestedData from the view model and + * should return a modified H.map.ViewModel.CameraData which will be set as the final view */ endControl(opt_preventKinetics?: boolean, opt_adjustView?: (data: H.map.ViewModel.CameraData) => void): void; } @@ -1613,15 +1650,16 @@ declare namespace H { * @property label {string} - A short textual representation of the copyright note, e.g. "DigitalGlobe 2009" * @property alt {string} - A detailed textual representation of the copyright note, e.g. "copyright 2009 DigitalGlobe, Inc." */ - export interface ICopyright { + interface ICopyright { label: string; alt: string; } /** - * Interface describes interaction with the view port. Interaction will reflect view change depending on the interaction coordinates passed and the modifiers which specify the type of interaction. + * Interface describes interaction with the view port. Interaction will reflect view change depending on the interaction coordinates passed and the modifiers which specify the type of + * interaction. */ - export interface IInteraction { + interface IInteraction { /** * This method starts the interaction with the view port. Should be called every time when new interaction is started i.e mouse grab, or touch start. * @param modifiers {number} - a bitmask which specifies what operations should performed during every interaction @@ -1649,7 +1687,7 @@ declare namespace H { /** * A visual representation of the H.map.Marker. */ - export class Icon { + class Icon { /** * Constructor * @param bitmap {!(string | HTMLImageElement | HTMLCanvasElement)} - Either an image URL, a SVG markup, an image or a canvas. @@ -1688,13 +1726,14 @@ declare namespace H { getHitArea(): H.map.HitArea; /** - * This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. Otherwise memory leak is possible. + * This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. + * Otherwise memory leak is possible. * @param type {string} - name of event * @param handler {Function} - event handler function * @param opt_capture {boolean=} - if set to true will listen in the capture phase (bubble otherwise) * @param opt_scope {Object=} - scope for the handler function */ - addEventListener(type: string, handler: Function, opt_capture?: boolean, opt_scope?: Object): void; + addEventListener(type: string, handler: () => void, opt_capture?: boolean, opt_scope?: {}): void; /** * This method will removed previously added listener from the event target @@ -1703,7 +1742,7 @@ declare namespace H { * @param opt_capture {boolean=} - if set to true will listen in the capture phase (bubble otherwise) * @param opt_scope {Object=} - scope for the handler function */ - removeEventListener(type: string, handler: Function, opt_capture?: boolean, opt_scope?: Object): void; + removeEventListener(type: string, handler: () => void, opt_capture?: boolean, opt_scope?: {}): void; /** * This method will dispatch event on the event target object @@ -1721,14 +1760,14 @@ declare namespace H { * @param callback {Function} - The callback function. * @param opt_scope {Object=} - An optional scope to call the callback in. */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; } - export module Icon { + namespace Icon { /** * The state types of an Icon */ - export enum State { + enum State { ERROR, LOADING, READY, @@ -1739,11 +1778,13 @@ declare namespace H { * @property size {H.math.ISize=} - The icon's size in pixel, default is the bitmap's natural size * @property anchor {H.math.IPoint=} - The anchorage point in pixel, default is bottom-center * @property hitArea {H.map.HitArea=} - The area to use for hit detection, default is the whole rectangular area - * @property asCanvas {H.map.HitArea=} - Indicates whether a non canvas bitmap is converted into a canvas, default is true. The conversion improves the rendering performance but it could also cause a higher memory consumption. - * @property crossOrigin {boolean} - Specifies whether to use anonynous Cross-Origin Resource Sharing (CORS) when fetching an image to prevent resulting canvas from tainting, default is false. The option is ignored by IE9-10. + * @property asCanvas {H.map.HitArea=} - Indicates whether a non canvas bitmap is converted into a canvas, default is true. The conversion improves the rendering performance but it could + * also cause a higher memory consumption. + * @property crossOrigin {boolean} - Specifies whether to use anonynous Cross-Origin Resource Sharing (CORS) when fetching an image to prevent resulting canvas from tainting, default is + * false. The option is ignored by IE9-10. */ - export interface Options { - size?: H.math.ISize; + interface Options { + size?: H.math.ISize | number; anchor?: H.math.IPoint; hitArea?: H.map.HitArea; asCanvas?: H.map.HitArea; @@ -1754,7 +1795,7 @@ declare namespace H { /** * This class encapsulates the brand, copyright and terms of use elements on the map. */ - export class Imprint { + class Imprint { /** * Constructor * @param map {H.Map} - The map where the imprint is attached to @@ -1785,7 +1826,7 @@ declare namespace H { * @param callback {Function} * @param opt_scope {Object=} */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; /** * This method is used to capture the element view @@ -1797,14 +1838,14 @@ declare namespace H { capture(canvas: HTMLCanvasElement, pixelRatio: number, callback?: (canvas: HTMLCanvasElement) => void, opt_errback?: (s: string) => void): void; } - export module Imprint { + namespace Imprint { /** * Options to style an imprint * @property invert {boolean=} - Indicates whether the logo is inverted. If omitted the current value remains, default is false. * @property font {string=} - The font of the text. If omitted the current value remains, default is "11px Arial,sans-serif". * @property href {string=} - The URL of the "Terms of use" link. If omitted the current value remains, default is "http://here.com/terms". */ - export interface Options { + interface Options { invert?: boolean; font?: string; href?: string; @@ -1814,7 +1855,7 @@ declare namespace H { /** * A marker with a visual representation in the form of a bitmap icon. Marker are predestinated if large amounts of markers with static icons should be displayed om the map. */ - export class Marker extends H.map.AbstractMarker { + class Marker extends H.map.AbstractMarker { /** * Constructor * @param position {H.geo.IPoint} - The location of this marker @@ -1823,18 +1864,19 @@ declare namespace H { constructor(position: H.geo.IPoint, opt_options?: H.map.Marker.Options); } - export module Marker { + namespace Marker { /** * Options used to initialize a Marker * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true. * @property zIndex {number=} - The z-index value of the map object, default is 0 - * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate + * an object. * @property icon {H.map.Icon=} - The icon to use for the visual representation, if omitted a default icon is used. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. */ - export interface Options { + interface Options { min?: number; max?: number; visibility?: boolean; @@ -1848,7 +1890,7 @@ declare namespace H { /** * This class represents the abstract base class for map objects such as polylines, polygons, markers, groups etc. */ - export class Object extends H.util.EventTarget { + class Object extends H.util.EventTarget { /** * Constructor * @param opt_options {H.map.Object.Options=} - The values to initialize this object @@ -1963,20 +2005,21 @@ declare namespace H { * @param callback {Function} - The callback function. * @param opt_scope {Object=} - An optional scope to call the callback in. */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; } - export module Object { + namespace Object { /** * Options used to initialize a map object * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true * @property zIndex {number=} - The z-index value of the map object, default is 0 - * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate + * an object. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. */ - export interface Options { + interface Options { min?: number; max?: number; visibility?: boolean; @@ -1988,7 +2031,7 @@ declare namespace H { /** * The major types of map objects */ - export enum Type { + enum Type { /** spatial object */ ANY, /** spatial object */ @@ -2007,7 +2050,7 @@ declare namespace H { /** * This class represents an overlay, which offers a bitmap that covers a geographical reactangular area on the map. */ - export class Overlay extends H.map.Object { + class Overlay extends H.map.Object { /** * Constructor * @param bounds {H.geo.Rect} - The geographical reactangular area of this overlay @@ -2056,7 +2099,7 @@ declare namespace H { setOpacity(opacity: number): H.map.Overlay; } - export module Overlay { + namespace Overlay { /** * Options used to initialize an Overlay * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity @@ -2064,10 +2107,11 @@ declare namespace H { * @property opacity {number=} - The opacity of the object in range from 0 (transparent) to 1 (opaque), default is 1. * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true. * @property zIndex {number=} - The z-index value of the map object, default is 0 - * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate + * an object. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. */ - export interface Options { + interface Options { min?: number; max?: number; opacity?: number; @@ -2079,9 +2123,11 @@ declare namespace H { } /** - * This class represents a polygon in geo-space. It is defined by a strip containing the vertices of a geo shape object (lat, lng, alt values) and a pen to use when rendering the polyline. Polygon represents a closed plane defined by the list of verticies, projected on the map display. List of vericies which define the polygon are is a list of geo coordinates encapsulated by the strip object H.geo.Strip + * This class represents a polygon in geo-space. It is defined by a strip containing the vertices of a geo shape object (lat, lng, alt values) and a pen to use when rendering the polyline. + * Polygon represents a closed plane defined by the list of verticies, projected on the map display. List of vericies which define the polygon are is a list of geo coordinates encapsulated + * by the strip object H.geo.Strip */ - export class Polygon extends H.map.GeoShape { + class Polygon extends H.map.GeoShape { /** * Constructor * @param strip {H.geo.Strip} - the strip describing this polygon's vertices @@ -2090,7 +2136,8 @@ declare namespace H { constructor(strip: H.geo.Strip, opt_options?: H.map.Spatial.Options); /** - * To set the indicator whether this polygon covers the north pole. It's needed for Polygons whose strip is defined as lines arround the world on longitude axis (for example a circle whose center is one of the poles). In this case a additional information is needed to know if the southern or northern part of the world should be covered by the poygon. + * To set the indicator whether this polygon covers the north pole. It's needed for Polygons whose strip is defined as lines arround the world on longitude axis (for example a circle whose + * center is one of the poles). In this case a additional information is needed to know if the southern or northern part of the world should be covered by the poygon. * @param flag {boolean} - A value of true means it covers the north pole, false means south pole * @returns {H.map.Polygon} - the Polygon instance itself */ @@ -2106,7 +2153,7 @@ declare namespace H { /** * This class represents a polyline in geo-space. It is defined by a path containing the vertices of a polyline (lat, lng, alt values) and a pen to use when tracing the path on the map. */ - export class Polyline extends H.map.GeoShape { + class Polyline extends H.map.GeoShape { /** * Constructor * @param strip {H.geo.Strip} - the strip describing this polygon's vertices @@ -2119,10 +2166,10 @@ declare namespace H { * @param geoRect {H.geo.Rect} * @returns {Array>} */ - clip(geoRect: H.geo.Rect): Array>; + clip(geoRect: H.geo.Rect): number[][]; } - export module Polyline { + namespace Polyline { /** * Options which are used to initialize a polyline * @property style {(H.map.SpatialStyle | H.map.SpatialStyle.Options)=} - the style to be used when tracing the polyline @@ -2131,10 +2178,11 @@ declare namespace H { * @property zIndex {number=} - The z-index value of the map object, default is 0 * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity - * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate + * an object. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData */ - export interface Options { + interface Options { style?: (H.map.SpatialStyle | H.map.SpatialStyle.Options); arrows?: (H.map.ArrowStyle | H.map.ArrowStyle.Options); visibility?: boolean; @@ -2149,7 +2197,7 @@ declare namespace H { /** * A Polygon with a rectangular shape. */ - export class Rect extends H.map.Polygon { + class Rect extends H.map.Polygon { /** * Constructor * @param bounds {H.geo.Rect} - The geographical bounding box for this rectangle @@ -2167,7 +2215,7 @@ declare namespace H { /** * This class represents a spatial map object which provides its projected geometry. */ - export class Spatial extends H.map.Object { + class Spatial extends H.map.Object { /** * Constructor * @param isClosed {boolean} - Indicates whether this spatial object represents a closed shape @@ -2182,14 +2230,16 @@ declare namespace H { getStyle(): H.map.SpatialStyle; /** - * To set the drawing style of this object. If the passed opt_style argument is an instance of H.map.SpatialStyle it is treated as immutable and must not be modified afterwards to prevent inconsistancies! . + * To set the drawing style of this object. If the passed opt_style argument is an instance of H.map.SpatialStyle it is treated as immutable and must not be modified afterwards to prevent + * inconsistancies! * @param opt_style {(H.map.SpatialStyle | H.map.SpatialStyle.Options)=} - The style to set. If it evaluates to a falsy the H.map.SpatialStyle.DEFAULT_STYLE is used. * @returns {H.map.Spatial} - the Spatial instance itself */ setStyle(opt_style?: (H.map.SpatialStyle | H.map.SpatialStyle.Options)): H.map.Spatial; /** - * To get the arrow style of this spatial object or undefined if no style is defined. A returned arrow style is treated as immutable and must not be modified afterwards to prevent inconsistancies! + * To get the arrow style of this spatial object or undefined if no style is defined. A returned arrow style is treated as immutable and must not be modified afterwards to prevent + * inconsistancies! * @returns {(H.map.ArrowStyle | undefined)} */ getArrows(): H.map.ArrowStyle | void; @@ -2208,7 +2258,7 @@ declare namespace H { isClosed(): boolean; } - export module Spatial { + namespace Spatial { /** * Data to used as rendering hint for a label * @property x {number} - The X coordinate of the first line's starting point @@ -2219,7 +2269,7 @@ declare namespace H { * @property color {string} - The CSS color * @property text {string} - The text content, new line characters (\u000A) are interpreted as line breaks */ - export interface Label { + interface Label { x: number; y: number; angle: number; @@ -2237,10 +2287,11 @@ declare namespace H { * @property zIndex {number=} - The z-index value of the map object, default is 0 * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity - * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate + * an object. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. */ - export interface Options { + interface Options { style?: (H.map.SpatialStyle | H.map.SpatialStyle.Options); arrows?: (H.map.ArrowStyle | H.map.ArrowStyle.Options); visibility?: boolean; @@ -2253,19 +2304,21 @@ declare namespace H { } /** - * The SpatialStyle class represents a style with which spatial objects like polylines and polygons are drawn. A SpatialStyle instance is always treated as immutable to avoid inconstiencies and must not modified. + * The SpatialStyle class represents a style with which spatial objects like polylines and polygons are drawn. A SpatialStyle instance is always treated as immutable to avoid inconstiencies + * and must not modified. * @property strokeColor {string} - The color of the stroke in CSS syntax, default is 'rgba(0, 85, 170, 0.6)'. * @property fillColor {string} - The filling color in CSS syntax, default is 'rgba(0, 85, 170, 0.4)'. * @property lineWidth {number} - The width of the line in pixels, default is 2. * @property lineCap {H.map.SpatialStyle.LineCap} - The style of the end caps for a line, default is 'round'. * @property lineJoin {H.map.SpatialStyle.LineJoin} - The type of corner created, when two lines meet, default is 'miter'. * @property miterLimit {number} - The miter length is the distance between the inner corner and the outer corner where two lines meet. The default is 10. - * @property lineDash {Array} - The line dash pattern as an even numbered list of distances to alternately produce a line and a space. The default is [ ]. + * @property lineDash {Array} - The line dash pattern as an even numbered list of distances to alternately produce a line and a space. The default is []. * @property lineDashOffset {number} - The phase offset of the line dash pattern The default is 0. * @property MAX_LINE_WIDTH {number} - This constant represents the maximum line width which can be used for rendering. - * @property DEFAULT_STYLE {H.map.SpatialStyle} - This static member defines the default style for spatial objects on the map. It's value is { strokeColor: '#05A', fillColor: 'rgba(0, 85, 170, 0.4)' lineWidth: 1, lineCap: 'round', lineJoin: 'miter', miterLimit: 10, lineDash: [ ], lineDashOffset: 0 } + * @property DEFAULT_STYLE {H.map.SpatialStyle} - This static member defines the default style for spatial objects on the map. It's value is + * { strokeColor: '#05A', fillColor: 'rgba(0, 85, 170, 0.4)', lineWidth: 1, lineCap: 'round', lineJoin: 'miter', miterLimit: 10, lineDash: [], lineDashOffset: 0 } */ - export class SpatialStyle { + class SpatialStyle { /** * Constructor * @param opt_options {(H.map.SpatialStyle | H.map.SpatialStyle.Options)=} - The optional style attributes @@ -2292,22 +2345,22 @@ declare namespace H { lineCap: H.map.SpatialStyle.LineCap; lineJoin: H.map.SpatialStyle.LineJoin; miterLimit: number; - lineDash: Array; + lineDash: number[]; lineDashOffset: number; static MAX_LINE_WIDTH: number; static DEFAULT_STYLE: H.map.SpatialStyle; } - export module SpatialStyle { + namespace SpatialStyle { /** * The style of the end caps for a line, one of 'butt', 'round' or 'square'. */ - export type LineCap = 'butt' | 'round' | 'square'; + type LineCap = 'butt' | 'round' | 'square'; /** * The type of corner created, when two lines meet, one of 'round', 'bevel' or 'miter'. */ - export type LineJoin = 'round' | 'bevel' | 'miter'; + type LineJoin = 'round' | 'bevel' | 'miter'; /** * Options used to initialize a style. If a property is not set, the default value from H.map.SpatialStyle is taken. @@ -2317,25 +2370,27 @@ declare namespace H { * @property lineCap {H.map.SpatialStyle.LineCap=} - The style of the end caps for a line. * @property lineJoin {H.map.SpatialStyle.LineJoin=} - The type of corner created, when two lines meet. * @property miterLimit {number=} - The miter limit in pixel, default is 10. The maximum supported miter limit is 100 - * @property lineDash {Array} - The line dash pattern as an even numbered list of distances to alternately produce a line and a space. If the browser doesn't support this feature this style property is ignored. + * @property lineDash {Array} - The line dash pattern as an even numbered list of distances to alternately produce a line and a space. If the browser doesn't support this feature + * this style property is ignored. * @property lineDashOffset {number=} - The phase offset of the line dash pattern */ - export interface Options { + interface Options { strokeColor?: string; fillColor?: string; lineWidth?: number; lineCap?: H.map.SpatialStyle.LineCap; lineJoin?: H.map.SpatialStyle.LineJoin; miterLimit?: number; - lineDash?: Array; + lineDash?: number[]; lineDashOffset?: number; } } /** - * This class represents a view of the map. It consists of a virtual camera and a look-at point both of which have a position in geo-space and orientation angles. The view model allows to change the values of these objects in order to move or rotate the map or zoom in and out. + * This class represents a view of the map. It consists of a virtual camera and a look-at point both of which have a position in geo-space and orientation angles. The view model allows to + * change the values of these objects in order to move or rotate the map or zoom in and out. */ - export class ViewModel extends H.util.EventTarget implements H.map.IControl { + class ViewModel extends H.util.EventTarget implements H.map.IControl { /** * This method returns the camera data, which is currently rendered. * @returns {H.map.ViewModel.CameraData} - the current rendered camera data @@ -2411,10 +2466,10 @@ declare namespace H { * @param callback {Function} - The callback function. * @param opt_scope {Object=} - An optional scope to call the callback in. */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; } - export module ViewModel { + namespace ViewModel { /** * Defines camera's properties. * @property zoom {number=} - zoom level to be used by rendering engine @@ -2424,7 +2479,7 @@ declare namespace H { * @property roll {number=} - the rotation of the virtual camera along its local z-axis * @property fov {number=} - */ - export interface CameraData { + interface CameraData { zoom?: number; position: H.geo.IPoint; pitch?: number; @@ -2439,7 +2494,7 @@ declare namespace H { * @property zoom {number=} - The requested zoom level * @property animate {boolean=} - indicates if the requested transition should be animated */ - export interface RequestedData { + interface RequestedData { camera?: H.map.ViewModel.CameraData; zoom?: number; animate?: boolean; @@ -2452,7 +2507,7 @@ declare namespace H { * @property type {string} - Name of the dispatched event * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event */ - export class UpdateEvent extends H.util.Event { + class UpdateEvent extends H.util.Event { /** * Constructor * @param requested {H.map.ViewModel.RequestedData} @@ -2477,7 +2532,8 @@ declare namespace H { } /** - * ViewPort object holds information about the HTML element where the map is rendered. It contains information regarding the element (view port) size and triggers events when the element size is changed. + * ViewPort object holds information about the HTML element where the map is rendered. It contains information regarding the element (view port) size and triggers events when the element size + * is changed. * @property element {Element} - This property holds the HTML element, which defines the viewport. * @property width {number} - This property holds this viewport's current width * @property height {number} - This property holds this viewport's current height @@ -2485,7 +2541,7 @@ declare namespace H { * @property padding {H.map.ViewPort.Padding} - This property holds this viewport's current padding * @property center {H.math.Point} - This property holds this viewport's current center point */ - export class ViewPort extends H.util.EventTarget implements H.map.IInteraction { + class ViewPort extends H.util.EventTarget implements H.map.IInteraction { /** * Constructor * @param element {Element} - html element were map will be rendered @@ -2552,7 +2608,7 @@ declare namespace H { * @param callback {Function} - The callback function. * @param opt_scope {Object=} - An optional scope to call the callback in. */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; element: Element; width: number; @@ -2562,14 +2618,14 @@ declare namespace H { center: H.math.Point; } - export module ViewPort { + namespace ViewPort { /** * Options which may be used to initialize new ViewPort instance * @property margin {number=} - The size in pixel of the supplemental area to render for each side of the map * @property padding {H.map.ViewPort.Padding=} - The padding in pixels for each side of the map * @property fixedCenter {boolean=} - Indicates whether the center of the map should remain unchanged if the viewport's size or or padding has been changed, default is true */ - export interface Options { + interface Options { margin?: number; padding?: H.map.ViewPort.Padding; fixedCenter?: boolean; @@ -2582,7 +2638,7 @@ declare namespace H { * @property bottom {number} - the padding on the bottom edge (in pixels) * @property left {number} - the padding on the left edge (in pixels) */ - export interface Padding { + interface Padding { top: number; right: number; bottom: number; @@ -2590,11 +2646,12 @@ declare namespace H { } } - export module layer { + namespace layer { /** - * BaseTileLayer encapsulates funcitonailty that is common to all layers that deliver tiles, such as H.map.layer.TileLayer. The functionality includes geo bounding box to grid calculation, tile request management. + * BaseTileLayer encapsulates funcitonailty that is common to all layers that deliver tiles, such as H.map.layer.TileLayer. The functionality includes geo bounding box to grid + * calculation, tile request management. */ - export class BaseTileLayer extends H.map.layer.Layer { + class BaseTileLayer extends H.map.layer.Layer { /** * Constructor * @param provider {H.map.provider.TileProvider} - data source for the TileLayer @@ -2643,7 +2700,8 @@ declare namespace H { cancelTile(x: number, y: number, z: number): void; /** - * This method requests tiles from the data source (provider). It can return a set of tiles which are currently loaded. All tiles which are not yet loaded will be included in response as soon as they will be available during subsequent calls. + * This method requests tiles from the data source (provider). It can return a set of tiles which are currently loaded. All tiles which are not yet loaded will be included in response + * as soon as they will be available during subsequent calls. * @param tileBounds {H.math.Rect} - bounds in tile grid * @param isCDB {boolean} * @param zoomLevel {number} - The zoom level for which the objects are requested @@ -2657,8 +2715,7 @@ declare namespace H { /** * This interface describes a layer which provides marker objects to the renderer. */ - export interface IMarkerLayer { - + interface IMarkerLayer { /** * This method requests marker objects for provided bounding rectangle. * @param boundingRect {H.geo.Rect} - the bounding rectangle for which marker are to be returned @@ -2677,18 +2734,19 @@ declare namespace H { * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center * @returns {(H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse)} - a response object containing the number of markers and the markers themselves */ - requestDomMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse); + requestDomMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | + H.map.layer.IMarkerLayer.TiledResponse); } - export module IMarkerLayer { + namespace IMarkerLayer { /** * This type represents a response object returned by the H.map.layer.IMarkerLayer#requestMarkers function. * @property total {number} - The total number of markers, inclusive markers with not ready icons * @property markers {Array} - The marker objects for the bounding rectangle (only ready) */ - export interface Response { + interface Response { total: number; - markers: Array; + markers: H.map.AbstractMarker[]; } /** @@ -2697,17 +2755,18 @@ declare namespace H { * @property requested {number} - number of requested tiles * @property objects {Array} - the marker objects within requested tiled area */ - export interface TiledResponse { + interface TiledResponse { number: number; requested: number; - objects: Array; + objects: H.map.AbstractMarker[]; } } /** - * This interface describes a layer which provides data partitioned in quad-tree tiles in an x, y, z fashion (where z describes the level within the tree and x and y describe the absolute column and row indeces whithin the level). + * This interface describes a layer which provides data partitioned in quad-tree tiles in an x, y, z fashion (where z describes the level within the tree and x and y describe the absolute + * column and row indeces whithin the level). */ - export interface ITileLayer { + interface ITileLayer { /** * This method requests tiles for the current bounding rectangle at the given zoom level (z-value). * @param boundingRect {H.geo.Rect} - the bounding rectangle for which tiles are to be returned @@ -2737,13 +2796,13 @@ declare namespace H { cancelTile(x: number, y: number, z: number): void; } - export module ITileLayer { + namespace ITileLayer { /** * Options which are used to initialize a TileLayer object. * @property projection {H.geo.IProjection=} - an optional projection to be used for this layer, default is H.geo.mercator * @property opacity {number=} - tile layer opacity, default is 1 */ - export interface Options { + interface Options { projection?: H.geo.IProjection; opacity?: number; } @@ -2753,16 +2812,17 @@ declare namespace H { * @property total {number} - the total number of requested tiles * @property tiles {Array} - the tiles which this provider can currently return synchronously */ - export interface Response { + interface Response { total: number; - tiles: Array; + tiles: H.map.provider.Tile[]; } } /** - * The Layer class represents an object that is evaluated by the renderer in the order in which it is added to the layers collection. It provides the basic infrastructure for dispatching update events to the renderer in case new data is available. + * The Layer class represents an object that is evaluated by the renderer in the order in which it is added to the layers collection. It provides the basic infrastructure for dispatching + * update events to the renderer in case new data is available. */ - export class Layer extends H.util.EventTarget { + class Layer extends H.util.EventTarget { /** * Constructor * @param opt_options {H.map.layer.Layer.Options=} - optional configuration object @@ -2796,7 +2856,7 @@ declare namespace H { * @param level {number} - the zoom level for which to retrieve the copyright information * @returns {Array} - a list of copyright information objects for the provided area and zoom level */ - getCopyrights(bounds: H.geo.Rect, level: number): Array; + getCopyrights(bounds: H.geo.Rect, level: number): H.map.ICopyright[]; /** * This method will dispatch event on the event target object @@ -2814,10 +2874,10 @@ declare namespace H { * @param callback {Function} - The callback function. * @param opt_scope {Object=} - An optional scope to call the callback in. */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; } - export module Layer { + namespace Layer { /** * Options which can be used when creating new layer object. * @property min {number=} - The minimum zoom level for which the layer can provide data, default is 0 @@ -2826,7 +2886,7 @@ declare namespace H { * @property projection {H.geo.IProjection=} - The projection to be used for this layer, default is H.geo.mercator * @property minWorldSize {number=} - The minimal world size at zoom level 0, default is 256 */ - export interface Options { + interface Options { min?: number; max?: number; dark?: boolean; @@ -2838,7 +2898,7 @@ declare namespace H { /** * ObjectTileLayer represents map objects which are requested on a tile basis */ - export class MarkerTileLayer extends H.map.layer.BaseTileLayer implements H.map.layer.IMarkerLayer { + class MarkerTileLayer extends H.map.layer.BaseTileLayer implements H.map.layer.IMarkerLayer { /** * Constructor * @param provider {H.map.provider.MarkerTileProvider} @@ -2864,19 +2924,21 @@ declare namespace H { * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center * @returns {(H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse)} - a response object containing the number of markers and the markers themselves */ - requestDomMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse); + requestDomMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | + H.map.layer.IMarkerLayer.TiledResponse); } /** - * This class represents a layer which renders map objects. Spatial objects like polygons and polylines a rendered to tiles before being passed to the enigne. Point objects like markers are provided as objects given an rectangular area. + * This class represents a layer which renders map objects. Spatial objects like polygons and polylines a rendered to tiles before being passed to the enigne. Point objects like markers + * are provided as objects given an rectangular area. */ - export class ObjectLayer extends H.map.layer.Layer implements H.map.layer.ITileLayer { + class ObjectLayer extends H.map.layer.Layer implements H.map.layer.ITileLayer { /** * Constructor * @param provider {H.map.provider.ObjectProvider} - the ObjectProvider which provides the map objects to this object layer. * @param opt_options {H.map.layer.ObjectLayer.Options=} - The options for this layer */ - constructor(provider: H.map.provider.ObjectProvider, opt_options?: H.map.layer.ObjectLayer.Options); + constructor(provider: H.map.provider.ObjectProvider | H.clustering.Provider, opt_options?: H.map.layer.ObjectLayer.Options); /** * This method returns current ObjectLayer's data provider @@ -2940,10 +3002,11 @@ declare namespace H { * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center * @returns {(H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse)} - a response object containing the number of markers and the markers themselves */ - requestDomMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse); + requestDomMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | + H.map.layer.IMarkerLayer.TiledResponse); } - export module ObjectLayer { + namespace ObjectLayer { /** * Configuration object which can be use to initialize the ObjectLayer. * @property tileSize {number=} - the size of the tiles rendered by this layer for polylines and polygons (must be power of 2, default is 256) @@ -2951,7 +3014,7 @@ declare namespace H { * @property dataCacheSize {number=} - the number of tiles to cache which have render data only, default is 512 * @property pixelRatio {number=} - The pixelRatio to use for over-sampling in cases of high-resolution displays */ - export interface Options { + interface Options { tileSize?: number; tileCacheSize?: number; dataCacheSize?: number; @@ -2963,9 +3026,9 @@ declare namespace H { * @property total {number} - The total number of overlays within the requested bounds, inclusive overlays which are not ready loaded yet * @property overlays {Array} - A list all overlays which are ready to render */ - export interface OverlaysResponse { + interface OverlaysResponse { total: number; - overlays: Array; + overlays: H.map.Overlay[]; } } @@ -2973,7 +3036,7 @@ declare namespace H { * Tile Layer, represents data shown on map on a tile basis. Can be used to show map tile images or other type of data which is partitioned into tiles. * @event update {H.util.Event} */ - export class TileLayer extends H.map.layer.BaseTileLayer implements H.map.layer.ITileLayer { + class TileLayer extends H.map.layer.BaseTileLayer implements H.map.layer.ITileLayer { /** * Constructor * @param provider {H.map.provider.TileProvider} - data source for the TileLayer @@ -2995,12 +3058,12 @@ declare namespace H { } } - export module provider { + namespace provider { /** * An ImageTileProvider uses network service to provide bitmap images as tiles. * @property tileSize {number} - Size of a tile image supported by the provider */ - export class ImageTileProvider extends H.map.provider.RemoteTileProvider { + class ImageTileProvider extends H.map.provider.RemoteTileProvider { /** * Constructor * @param options {H.map.provider.ImageTileProvider.Options} - configuration for tile provider @@ -3010,25 +3073,27 @@ declare namespace H { tileSize: number; } - export module ImageTileProvider { + namespace ImageTileProvider { /** * Options to initialize an ImageTileProvider instance - * @property uri {string=} - The provider's unique resource identifier which must not contain an underscore "_". If omitted an auto-generated unique Session ID is used. If a cross sessions consistent IDs is needed (e.g. for storing provider data) this property must be specified. + * @property uri {string=} - The provider's unique resource identifier which must not contain an underscore "_". If omitted an auto-generated unique Session ID is used. If a cross + * sessions consistent IDs is needed (e.g. for storing provider data) this property must be specified. * @property min {number=} - The minimal supported zoom level, default is 0 * @property max {number=} - The maximal supported zoom level, default is 22 * @property getCopyrights {(function(H.geo.Rect, number) : ?Array)=} - A function to replace the default implementation of H.map.provider.Provider#getCopyrights * @property tileSize {number=} - The size of a tile as edge length in pixels. It must be 2^n where n is in range [0 ... 30], default is 256 * @property getURL {function(number, number, number)} - The function to create an URL for the specified tile. If it returns a falsy the tile is not requested. - * @property crossOrigin {(string | boolean=)} - The CORS settings to use for the crossOrigin attribute for the image, if omitted or if the value evaluates to false no CORS settings are used. + * @property crossOrigin {(string | boolean=)} - The CORS settings to use for the crossOrigin attribute for the image, if omitted or if the value evaluates to false no CORS settings + * are used. */ - export interface Options { + interface Options { uri?: string; min?: number; max?: number; - getCopyrights?: ((rect: H.geo.Rect, n: number) => Array); + getCopyrights?(rect: H.geo.Rect, n: number): H.map.ICopyright[]; tileSize?: number; - getURL: (n1: number, n2: number, n3: number) => string; - crossOrigin?: (string | boolean); + getURL(n1: number, n2: number, n3: number): string; + crossOrigin?: string | boolean; } } @@ -3036,8 +3101,7 @@ declare namespace H { * This class represents invalidation states of a renderable object. A renderer can optimize its rendering strategies based on the information in this object. * @property MARK_INITIAL {H.map.provider.Invalidations.Mark} - This constant represents the initial invalidation mark an invalidations object has. */ - export class Invalidations { - + class Invalidations { /** * To update invalidation marks accordingly to the given the invalidation types. * @param mark {H.map.provider.Invalidations.Mark} - The invalidation mark to set @@ -3096,11 +3160,11 @@ declare namespace H { static MARK_INITIAL: H.map.provider.Invalidations.Mark; } - export module Invalidations { + namespace Invalidations { /** * This enumeration encapsulates bit flags for different invalidations of map objects. */ - export enum Flag { + enum Flag { NONE, VISUAL, SPATIAL, @@ -3112,7 +3176,7 @@ declare namespace H { /** * The invalidation mark represents a counter which is increased whenever an invalidation takes place. */ - export interface Mark { } + type Mark = any; } /** @@ -3125,7 +3189,7 @@ declare namespace H { * @property max {number} - Maximum zoom level at which provider can server data, set at construction time * @property uid {string} - Provider instance unique identifier, generated at construction time */ - export class MarkerTileProvider extends H.map.provider.RemoteTileProvider { + class MarkerTileProvider extends H.map.provider.RemoteTileProvider { /** * Constructor * @param options {H.map.provider.MarkerTileProvider.Options} - configuration for tile provider @@ -3146,18 +3210,19 @@ declare namespace H { providesDomMarkers(): boolean; } - export module MarkerTileProvider { + namespace MarkerTileProvider { /** * Options which are used to initialize the MarkerTileProvider object. * @property min {number=} - The minimal supported zoom level, default is 0 * @property max {number=} - The maximal supported zoom level, default is 22 - * @property requestData {function(number, number, number, function(Array), Function) : H.util.ICancelable} - function that fetches marker data and creates array of H.map.AbstractMarker that is passed success callback, if function fails to fetch data onError callback must be called + * @property requestData {function(number, number, number, function(Array), Function) : H.util.ICancelable} - function that fetches marker data and creates array + * of H.map.AbstractMarker that is passed success callback, if function fails to fetch data onError callback must be called * @property providesDomMarkers {boolean=} - indicates if markers provided are of type H.map.DomMarker or H.map.Marker, default is H.map.Marker */ - export interface Options { + interface Options { min?: number; max?: number; - requestData: (n1: number, n2: number, n3: number, markerCallback: (markers: Array) => void, f: Function) => H.util.ICancelable; + requestData(n1: number, n2: number, n3: number, markerCallback: (markers: H.map.AbstractMarker[]) => void, f: () => void): H.util.ICancelable; providesDomMarkers?: boolean; } } @@ -3165,7 +3230,7 @@ declare namespace H { /** * An abstract class to manage and provide map objects (Marker, Polyline, Polygon) */ - export class ObjectProvider extends H.map.provider.Provider { + class ObjectProvider extends H.map.provider.Provider { /** * Constructor * @param opt_options {H.map.provider.Provider.Options=} @@ -3200,7 +3265,7 @@ declare namespace H { * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered * @returns {Array} - a list of intersecting objects */ - requestOverlays(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + requestOverlays(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): H.map.Overlay[]; /** * Checks whether this provider is currently providing spatial map objects. A concrete implementation of ObjectProvider must override it if it currently provides Spatials. @@ -3216,7 +3281,7 @@ declare namespace H { * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered * @returns {Array} - a list of intersecting objects */ - requestSpatials(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + requestSpatials(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): H.map.Spatial[]; /** * Returns the spatial objects which intersect the given tile @@ -3225,7 +3290,7 @@ declare namespace H { * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered * @returns {Array} - a list of intersecting objects */ - requestSpatialsByTile(tile: H.map.provider.Tile, visiblesOnly: boolean, cacheOnly: boolean): Array; + requestSpatialsByTile(tile: H.map.provider.Tile, visiblesOnly: boolean, cacheOnly: boolean): H.map.Spatial[]; /** * Checks whether this provider is currently providing Marker map objects. A concrete implementation of ObjectProvider must override it if it currently provides Markers. @@ -3241,7 +3306,7 @@ declare namespace H { * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered * @returns {Array} - a list of intersecting objects */ - requestMarkers(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + requestMarkers(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): H.map.Marker[]; /** * Checks whether this provider is currently providing DomMarker map objects. A concrete implementation of ObjectProvider must override it if it currently provides Markers. @@ -3257,17 +3322,18 @@ declare namespace H { * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered * @returns {Array} - a list of intersecting objects */ - requestDomMarkers(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + requestDomMarkers(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): H.map.DomMarker[]; } /** - * A Provider defines an object which works as a database for the map. Providers can exists in different forms they can implement client side object storage or they can request data from the remote service. + * A Provider defines an object which works as a database for the map. Providers can exists in different forms they can implement client side object storage or they can request data from + * the remote service. * @property uri {string} - This provider's unique resource identifier, if not provided at construction time it defaults to provider's uid * @property min {number} - Minimum zoom level at which provider can serve data, set at construction time * @property max {number} - Maximum zoom level at which provider can server data, set at construction time * @property uid {string} - Provider instance unique identifier, generated at construction time */ - export class Provider extends H.util.EventTarget { + class Provider extends H.util.EventTarget { /** * Constructor * @param opt_options {H.map.provider.Provider.Options=} @@ -3280,7 +3346,7 @@ declare namespace H { * @param level {number} - The zoom level for which to retrieve the copyright information * @returns {?Array} - a list of copyright information objects for the provided area and zoom level */ - getCopyrights(bounds: H.geo.Rect, level: number): Array; + getCopyrights(bounds: H.geo.Rect, level: number): H.map.ICopyright[]; /** * This method will dispatch event on the event target object @@ -3298,7 +3364,7 @@ declare namespace H { * @param callback {Function} - The callback function. * @param opt_scope {Object=} - An optional scope to call the callback in. */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; uri: string; min: number; @@ -3306,26 +3372,28 @@ declare namespace H { uid: string; } - export module Provider { + namespace Provider { /** * Options to initialize a Provider instance - * @property uri {string=} - The provider's unique resource identifier which must not contain an underscore "_". If omitted an auto-generated unique Session ID is used. If a cross sessions consistent IDs is needed (e.g. for storing provider data) this property must be specified. + * @property uri {string=} - The provider's unique resource identifier which must not contain an underscore "_". If omitted an auto-generated unique Session ID is used. If a cross + * sessions consistent IDs is needed (e.g. for storing provider data) this property must be specified. * @property min {number=} - The minimal supported zoom level, default is 0 * @property max {number=} - The maximal supported zoom level, default is 22 * @property getCopyrights {(function(H.geo.Rect, number) : ?Array)=} - A function to replace the default implementation of H.map.provider.Provider#getCopyrights */ - export interface Options { + interface Options { uri?: string; min?: number; max?: number; - getCopyrights?: (rect: H.geo.Rect, n: number) => Array; + getCopyrights?(rect: H.geo.Rect, n: number): H.map.ICopyright[]; } } /** - * RemoteTileProvider is an abstract class which should be used by classes implementing data provision on a tile basis. Every child class needs to implement 'requestInternal' (to request remote tile) and 'getCache' (to provide configured cache object were tiled data is being cached) + * RemoteTileProvider is an abstract class which should be used by classes implementing data provision on a tile basis. Every child class needs to implement 'requestInternal' + * (to request remote tile) and 'getCache' (to provide configured cache object were tiled data is being cached) */ - export class RemoteTileProvider extends H.map.provider.TileProvider { + class RemoteTileProvider extends H.map.provider.TileProvider { /** * Constructor * @param options {H.map.provider.TileProvider.Options} - The options to instantiate this TileProvider @@ -3354,7 +3422,7 @@ declare namespace H { z: number, onResponse?: ( - object: Array | HTMLImageElement | HTMLCanvasElement | ArrayBuffer, + object: H.map.Object[] | HTMLImageElement | HTMLCanvasElement | ArrayBuffer, response: any ) => void, @@ -3370,7 +3438,8 @@ declare namespace H { } /** - * Generic Tile object which represents a part of the world fiting into the Tile area represented by the Tiel coordinates (x - row, y - column) and the zoom level (z). Number of tiles at particular zoom level (which means number of areas into world is being splitted) is defined as following: numberOfRows = numberOfColumns = 2^zoomlevel + * Generic Tile object which represents a part of the world fiting into the Tile area represented by the Tiel coordinates (x - row, y - column) and the zoom level (z). Number of tiles + * at particular zoom level (which means number of areas into world is being splitted) is defined as following: numberOfRows = numberOfColumns = 2^zoomlevel * @property key {string} - Unique tile key generated by provider * @property data {*} - Tile data (an image for example) * @property valid {boolean} - This property holds a boolean flag indicating whether this tile is still valid (true) or whether it should be re-fetched (false) @@ -3378,7 +3447,7 @@ declare namespace H { * @property y {number} - Tile row * @property z {number} - Tile zoom level */ - export class Tile { + class Tile { /** * Constructor * @param x {number} - x tile coordinate (row) @@ -3405,7 +3474,7 @@ declare namespace H { * @property max {number} - Maximum zoom level at which provider can server data, set at construction time * @property uid {string} - Provider instance unique identifier, generated at construction time */ - export class TileProvider extends H.map.provider.Provider { + class TileProvider extends H.map.provider.Provider { /** * Constructor * @param options {H.map.provider.TileProvider.Options} - The options to instantiate this TileProvider @@ -3441,19 +3510,20 @@ declare namespace H { uid: string; } - export module TileProvider { + namespace TileProvider { /** - * @property uri {string=} - The provider's unique resource identifier which must not contain an underscore "_". If omitted an auto-generated unique Session ID is used. If a cross sessions consistent IDs is needed (e.g. for storing provider data) this property must be specified. + * @property uri {string=} - The provider's unique resource identifier which must not contain an underscore "_". If omitted an auto-generated unique Session ID is used. + * If a cross sessions consistent IDs is needed (e.g. for storing provider data) this property must be specified. * @property min {number=} - The minimal supported zoom level, default is 0 * @property max {number=} - The maximal supported zoom level, default is 22 * @property getCopyrights {(function(H.geo.Rect, number): Array)=} - A function to replace the default implememtation of H.map.provider.Provider#getCopyrights * @property tileSize {number=} - The size of a tile as edge length in pixels. It must be 2^n where n is in range [0 ... 30], default is 256 */ - export interface Options { + interface Options { uri?: string; min?: number; max?: number; - getCopyrights?(rect: H.geo.Rect, number: number): Array; + getCopyrights?(rect: H.geo.Rect, number: number): H.map.ICopyright[]; tileSize?: number; } } @@ -3461,14 +3531,14 @@ declare namespace H { } /***** mapevents *****/ - export module mapevents { + namespace mapevents { /** * Behavior class uses map events and adds behavior functionality to the map. This allows map panning and zooming via using mouse wheel * @property DRAGGING {number} - Map responds to user dragging via mouse or touch * @property WHEELZOOM {number} - Map zooms in or out in respond to mouse wheel events * @property DBLTAPZOOM {number} - Map zooms in or out in response to double click or double tap. For double tap if more that one touches are on the screen map will zoom out. */ - export class Behavior extends H.util.Disposable { + class Behavior extends H.util.Disposable { /** * Constructor * @param mapEvents {H.mapevents.MapEvents} - previously initialized map events instance @@ -3477,7 +3547,8 @@ declare namespace H { constructor(mapEvents: H.mapevents.MapEvents, options?: H.mapevents.Behavior.Options); /** - * This method destroys all map interaction handling. Should be used when the behavior functionality is disposed. Behavior object will also be disposed (this function will be called) when attached H.mapevents.MapEvents object is dispose. + * This method destroys all map interaction handling. Should be used when the behavior functionality is disposed. Behavior object will also be disposed (this function will be called) + * when attached H.mapevents.MapEvents object is dispose. */ dispose(): void; @@ -3505,13 +3576,13 @@ declare namespace H { static DBLTAPZOOM: number; } - export module Behavior { + namespace Behavior { /** * Options which are used to initialize the Behavior class. * @property kinetics {H.util.kinetics.IKinetics=} - The parameters for the kinetic movement. * @property enable {number=} - The bitmask of behaviors to enable like H.mapevents.Behavior.DRAGGING. All are enabled by default. */ - export interface Options { + interface Options { kinetics?: H.util.kinetics.IKinetics; enable?: H.math.BitMask; } @@ -3527,7 +3598,7 @@ declare namespace H { * @property type {string} - Name of the dispatched event * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event */ - export class ContextMenuEvent extends H.util.Event { + class ContextMenuEvent extends H.util.Event { /** * Constructor * @param viewportX {number} - The x coordinate on the viewport @@ -3537,7 +3608,7 @@ declare namespace H { */ constructor(viewportX: number, viewportY: number, target: (H.Map | H.map.Object), originalEvent: Event); - viewportX: Array; + viewportX: H.util.ContextItem[]; viewportY: number; originalEvent: Event; } @@ -3554,7 +3625,7 @@ declare namespace H { * @property type {string} - Name of the dispatched event * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event */ - export class Event extends H.util.Event { + class Event extends H.util.Event { /** * Constructor * @param type {string} - type of event @@ -3565,7 +3636,8 @@ declare namespace H { * @param target {(H.Map | H.map.Object)} - target map object which triggered event * @param originalEvent {Event} - original dom event */ - constructor(type: string, pointers: Array, changedPointers: Array, targetPointers: Array, currentPointer: H.mapevents.Pointer, target: (H.Map | H.map.Object), originalEvent: Event); + constructor(type: string, pointers: H.mapevents.Pointer[], changedPointers: H.mapevents.Pointer[], targetPointers: H.mapevents.Pointer[], currentPointer: H.mapevents.Pointer, + target: (H.Map | H.map.Object), originalEvent: Event); /** * Sets defaultPrevented to true. Which can be used to prevent some default behavior. @@ -3577,9 +3649,9 @@ declare namespace H { */ stopPropagation(): void; - pointers: Array; - changedPointers: Array; - targetPointers: Array; + pointers: H.mapevents.Pointer[]; + changedPointers: H.mapevents.Pointer[]; + targetPointers: H.mapevents.Pointer[]; currentPointer: H.mapevents.Pointer; originalEvent: Event; target: (H.map.Object | H.Map); @@ -3589,9 +3661,11 @@ declare namespace H { } /** - * MapEvents enable the events functionality on the map and on the map objects. By using this extension it is possible to listen to events on map objects like markers, polylines, polygons, circles and on the map object itself. Events are triggered depending on user interaction. Please check the Events Summary section for the list of events fired by this class and by the map objects. + * MapEvents enable the events functionality on the map and on the map objects. By using this extension it is possible to listen to events on map objects like markers, polylines, polygons, + * circles and on the map object itself. Events are triggered depending on user interaction. Please check the Events Summary section for the list of events fired by this class and by the map + * objects. */ - export class MapEvents extends H.util.Disposable { + class MapEvents extends H.util.Disposable { /** * Constructor * @param map {H.Map} - map instance which is used for firing events @@ -3599,7 +3673,8 @@ declare namespace H { constructor(map: H.Map); /** - * This method destroys the MapEvents by removing all handlers from the map object. After calling this function mapEvents and map objects will not trigger any events. This object will be disposed automatically if the corresponding map object is disposed. + * This method destroys the MapEvents by removing all handlers from the map object. After calling this function mapEvents and map objects will not trigger any events. This object will be + * disposed automatically if the corresponding map object is disposed. */ dispose(): void; @@ -3620,7 +3695,7 @@ declare namespace H { * @property dragTarget {(H.map.Object | H.Map)} - Object which is currently dragged by the pointer * @property button {H.mapevents.Pointer.Button} - Indicates which pointer device button has changed. */ - export class Pointer { + class Pointer { /** * Constructor * @param viewportX {number} - pointer position on x-axis @@ -3640,11 +3715,11 @@ declare namespace H { static button: H.mapevents.Pointer.Button; } - export module Pointer { + namespace Pointer { /** * Types of a button */ - export enum Button { + enum Button { /** No button */ NONE, /** Left mouse button or touch contact or pen contact */ @@ -3664,7 +3739,7 @@ declare namespace H { * - 4: Middle mouse button pressed */ // TODO not sure this is the right interpretation of the docs - export type Buttons = H.math.BitMask; + type Buttons = H.math.BitMask; } /** @@ -3678,7 +3753,7 @@ declare namespace H { * @property type {string} - Name of the dispatched event * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event */ - export class WheelEvent extends H.util.Event { + class WheelEvent extends H.util.Event { /** * Constructor * @param deltaY {number} - The wheel move delta on y-axis @@ -3697,18 +3772,18 @@ declare namespace H { } /***** math *****/ - export module math { + namespace math { /** * A signed 32 bit integer (JS restriction) where bit operator can be applied to. The range is [-2,147,483,648 ... 2,147,483,647] or [-2^31 ... 2^31 − 1] */ - export type BitMask = number; + type BitMask = number; /** * An interface for a 2-dimensional point consisting a x and y coordinate. * @property x {number} - The point's coordinate on X-axis. * @property y {number} - The point's coordinate on Y-axis. */ - export interface IPoint { + interface IPoint { x: number; y: number; } @@ -3718,7 +3793,7 @@ declare namespace H { * @property w {number} - The size's width. * @property h {number} - The size's height. */ - export interface ISize { + interface ISize { w: number; h: number; } @@ -3728,7 +3803,7 @@ declare namespace H { * @property x {number} - The point's coordinate on X-axis. * @property y {number} - The point's coordinate on Y-axis. */ - export class Point implements IPoint { + class Point implements IPoint { /** * Constructor * @param x {number} - The point's coordinate on X-axis. @@ -3826,7 +3901,7 @@ declare namespace H { /** * Class defines a rectangle in 2-dimensional geometric space. It is used to represent the area in projected space. */ - export class Rect { + class Rect { /** * Constructor * @param left {number} - The rectangle's left edge x value @@ -3885,7 +3960,7 @@ declare namespace H { * @property w {number} - The size's width value * @property h {number} - The size's height value */ - export class Size { + class Size { /** * Constructor * @param width {number} - Width. @@ -3898,27 +3973,27 @@ declare namespace H { } /***** net *****/ - export module net { - export module Request { - export enum State { + namespace net { + namespace Request { + enum State { DONE = 2, OPENED = 1, UNSENT = 0, } // TODO no idea how this interface is set up, investigate - export interface Priority { } + type Priority = any; } } /***** places *****/ /***** service *****/ - export module service { + namespace service { /** * Abstract rest service class */ - export class AbstractRestService implements H.service.IConfigurable { + class AbstractRestService implements H.service.IConfigurable { /** * Constructor * @param opt_options {H.service.AbstractRestService.Options=} @@ -3931,22 +4006,33 @@ declare namespace H { * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false - * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in + * the opt_baseUrl to use HTTPS. * @returns {H.service.IConfigurable} */ configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; } - export module AbstractRestService { - export interface Options { - - } + namespace AbstractRestService { + type Options = any; } /** - * This class encapsulates Enterprise Routing REST API as a service stub. An instance of this class can be retrieved by calling the factory method on a platform instance. H.service.Platform#getEnterpriseRoutingService. + * This property specifies collection of pre-configured HERE layers */ - export class EnterpriseRoutingService extends H.service.AbstractRestService { + interface DefaultLayers { + normal: H.service.MapType; + satellite: H.service.MapType; + terrain: H.service.MapType; + incidents: H.map.layer.MarkerTileLayer; + venues: H.map.layer.TileLayer; + } + + /** + * This class encapsulates Enterprise Routing REST API as a service stub. An instance of this class can be retrieved by calling the factory method on a platform instance. + * H.service.Platform#getEnterpriseRoutingService. + */ + class EnterpriseRoutingService extends H.service.AbstractRestService { /** * Constructor * @param opt_options {H.service.EnterpriseRoutingService.Options=} @@ -3954,7 +4040,8 @@ declare namespace H { constructor(opt_options?: H.service.EnterpriseRoutingService.Options); /** - * This method sends a "calculateroute" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occurred. + * This method sends a "calculateroute" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing + * a H.service.ServiceResult object - or the onError callback if a communication error occurred. * @param calculateRouteParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Enterprise Routing REST API provides a response to the request. * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request @@ -3962,7 +4049,8 @@ declare namespace H { calculateRoute(calculateRouteParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; /** - * This method sends a "getroute" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occurred. + * This method sends a "getroute" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing + * a H.service.ServiceResult object - or the onError callback if a communication error occurred. * @param getRouteParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Enterprise Routing REST API provides a response to the request. * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request @@ -3970,7 +4058,8 @@ declare namespace H { getRoute(getRouteParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; /** - * This method sends a "getlinkinfo" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * This method sends a "getlinkinfo" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing + * a H.service.ServiceResult object - or the onError callback if a communication error occured. * @param getLinkInfoParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Enterprise Routing REST API provides a response to the request. * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request @@ -3978,7 +4067,8 @@ declare namespace H { getLinkInfo(getLinkInfoParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; /** - * This method sends a "calculateisoline" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occurred. + * This method sends a "calculateisoline" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing + * a H.service.ServiceResult object - or the onError callback if a communication error occurred. * @param calculateIsolineParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Enterprise Routing REST API provides a response to the request. * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request @@ -3986,13 +4076,14 @@ declare namespace H { calculateIsoline(calculateIsolineParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; } - export module EnterpriseRoutingService { + namespace EnterpriseRoutingService { /** * @property subDomain {string=} - The sub-domain of the routing service relative to the platform's base URL (default is 'route') * @property path {string=} - The path of the map tile service, default is "routing/7.2" - * @property baseUrl {H.service.Url=} - The base URL of the service, defaults to the the platform's base URL if instance was created using H.service.Platform#getEnterpriseRoutingService method. + * @property baseUrl {H.service.Url=} - The base URL of the service, defaults to the the platform's base URL if instance was created using H.service.Platform#getEnterpriseRoutingService + * method. */ - export interface Options { + interface Options { subDomain?: string; path?: string; baseUrl?: H.service.Url; @@ -4002,7 +4093,7 @@ declare namespace H { /** * This class encapsulates the Geocoding REST API in a service stub with calls to its various resources implemented. */ - export class GeocodingService extends H.service.AbstractRestService { + class GeocodingService extends H.service.AbstractRestService { /** * Constructor * @param opt_options {H.service.GeocodingService.Options=} @@ -4010,7 +4101,8 @@ declare namespace H { constructor(opt_options?: H.service.GeocodingService.Options); /** - * This method sends a reverse geocoding request to Geocoder REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * This method sends a reverse geocoding request to Geocoder REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult + * object - or the onError callback if a communication error occured. * @param geoodingParams {H.service.ServiceParameters} - the service parameters to be sent with the geocoding request. * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Geocoder REST API provides a response to the request. * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request @@ -4019,7 +4111,8 @@ declare namespace H { geocode(geoodingParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; /** - * This method sends a reverse geocoding request to Geocoder REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * This method sends a reverse geocoding request to Geocoder REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult + * object - or the onError callback if a communication error occured. * @param reverseGeocodingParams {H.service.ServiceParameters} - the service parameters to be sent with the reverse geocoding request * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Geocoder REST API provides a response to the request. * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request @@ -4028,7 +4121,8 @@ declare namespace H { reverseGeocode(reverseGeocodingParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; /** - * This method sends a landmark search request to Geocoder REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * This method sends a landmark search request to Geocoder REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult + * object - or the onError callback if a communication error occured. * @param searchParams {H.service.ServiceParameters} - the service parameters to be sent with the reverse geocoding request * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Geocoder REST API provides a response to the request. * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request @@ -4037,12 +4131,12 @@ declare namespace H { search(searchParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; } - export module GeocodingService { + namespace GeocodingService { /** * @property subDomain {string=} - the sub-domain of the geo-coding service relative to the platform's base URL, default is 'geocoder' * @property path {string=} - the path of the Geocoding service, default is '6.2' */ - export interface Options { + interface Options { subDomain?: string; path?: string; } @@ -4051,14 +4145,15 @@ declare namespace H { /** * An interface represents an object, that can be configured credentials, settings etc. by H.service.Platform */ - export interface IConfigurable { + interface IConfigurable { /** * This methods receive configuration parameters from the platform, that can be used by the object implementing the interface. * @param appId {string} - The application ID to identify the client against the platform (mandatory to provide) * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false - * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in + * the opt_baseUrl to use HTTPS. * @returns {H.service.IConfigurable} */ configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; @@ -4068,15 +4163,15 @@ declare namespace H { * @property id {number} - the ID associated internally with this request * @property cancel {function()} - this function cancels the request and invokes the errback function */ - export interface JsonpRequestHandle { + interface JsonpRequestHandle { id: number; - cancel: () => void; + cancel(): void; } /** * This class encapsulates a map tile end point of the HERE Map Tile API. */ - export class MapTileService extends H.util.EventTarget implements H.service.IConfigurable { + class MapTileService extends H.util.EventTarget implements H.service.IConfigurable { /** * Constructor * @param opt_options {H.service.MapTileService.Options=} @@ -4111,7 +4206,8 @@ declare namespace H { * @param opt_options {H.service.TileProviderOptions=} - additional set of options for the provider * @returns {H.map.provider.ImageTileProvider} - the image tile provider */ - createTileProvider(tileType: string, scheme: string, tileSize: number, format: string, opt_additionalParameters?: H.service.ServiceParameters, opt_options?: H.service.TileProviderOptions): H.map.provider.ImageTileProvider; + createTileProvider(tileType: string, scheme: string, tileSize: number, format: string, opt_additionalParameters?: H.service.ServiceParameters, opt_options?: H.service.TileProviderOptions): + H.map.provider.ImageTileProvider; /** * This method creates a tile layer. This layer can be used as a layer on a map's data model. @@ -4125,7 +4221,8 @@ declare namespace H { * @param opt_options {H.service.TileProviderOptions=} - additional set of options for the provider * @returns {H.map.layer.TileLayer} - the tile layer */ - createTileLayer(tileType: string, scheme: string, tileSize: number, format: string, opt_additionalParameters?: H.service.ServiceParameters, opt_opacity?: number, opt_dark?: boolean, opt_options?: H.service.TileProviderOptions): H.map.layer.TileLayer; + createTileLayer(tileType: string, scheme: string, tileSize: number, format: string, opt_additionalParameters?: H.service.ServiceParameters, opt_opacity?: number, opt_dark?: boolean, + opt_options?: H.service.TileProviderOptions): H.map.layer.TileLayer; /** * This methods receive configuration parameters from the platform, that can be used by the object implementing the interface. @@ -4133,13 +4230,14 @@ declare namespace H { * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false - * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in + * the opt_baseUrl to use HTTPS. * @returns {H.service.IConfigurable} */ configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; } - export module MapTileService { + namespace MapTileService { /** * @property maps {Object} - * @property schemes {Object} - @@ -4148,7 +4246,7 @@ declare namespace H { * @property resolutions {Object} - * @property languages {Object} - */ - export interface Info { + interface Info { maps: { [key: string]: any }; schemes: { [key: string]: any }; tiletypes: { [key: string]: any }; @@ -4163,7 +4261,7 @@ declare namespace H { * @property subDomain {string=} - the sub-domain of the map tile service relative to the platform's base URL, default is 'maps' * @property path {string=} - the path of the map tile service, default is 'maptile/2.1' */ - export interface Options { + interface Options { type?: string; version?: string; subDomain?: string; @@ -4172,7 +4270,8 @@ declare namespace H { } /** - * A map type is an object holding tile layers corresponding to a map type (e.g. 'normal', 'satellite' or 'terrain'). A map type contains at least a map property which defines the basic map layer for a given map type. In addition it can hold other map layers with the given style, e.g. base, xbase, traffic etc. + * A map type is an object holding tile layers corresponding to a map type (e.g. 'normal', 'satellite' or 'terrain'). A map type contains at least a map property which defines the basic + * map layer for a given map type. In addition it can hold other map layers with the given style, e.g. base, xbase, traffic etc. * @property map {H.map.layer.TileLayer} - the basic map tiles with all features and labels * @property mapnight {H.map.layer.TileLayer} - the basic map tiles with all features and labels (night mode) * @property xbase {H.map.layer.TileLayer=} - map tiles without features and labels @@ -4186,7 +4285,7 @@ declare namespace H { * @property panoramanight {H.map.layer.TileLayer=} - map tiles highlighting areas with HERE StreetLevel coverage (night mode) * @property labels {H.map.layer.TileLayer=} - transparent map tiles with labels only */ - export interface MapType { + interface MapType { map: H.map.layer.TileLayer; mapnight: H.map.layer.TileLayer; xbase?: H.map.layer.TileLayer; @@ -4204,7 +4303,7 @@ declare namespace H { /** * Places service implements a low level places RestApi access. Please refer to Restful API documentation for providing parameters and handling response objects. */ - export class PlacesService extends H.service.AbstractRestService { + class PlacesService extends H.service.AbstractRestService { /** * Constructor * @param opt_options {H.service.PlacesService.Options=} @@ -4213,13 +4312,15 @@ declare namespace H { /** * This is generic method to query places RestAPI. - * @param entryPoint {string} - can be one of available entry points H.service.PlacesService.EntryPoint i.e value of H.service.PlacesService.EntryPoint.SEARCH - * @param entryPointParams {Object} - parameter map key value pairs will be transformed into the url key=value parametes. For entry point parameters description please refer to places restful api documentation documentation for available parameters for chose entry point + * @param entryPoint {H.service.PlacesService.EntryPoint} - can be one of available entry points H.service.PlacesService.EntryPoint i.e value of H.service.PlacesService.EntryPoint.SEARCH + * @param entryPointParams {Object} - parameter map key value pairs will be transformed into the url key=value parametes. For entry point parameters description please refer to places + * restful api documentation documentation for available parameters for chose entry point * @param onResult {Function} - callback which is called when result is returned * @param onError {Function} - callback which is called when error occured (i.e request timeout) * @returns {H.service.JsonpRequestHandle} - jsonp request handle */ - request(entryPoint: string, entryPointParams: Object, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + request(entryPoint: H.service.PlacesService.EntryPoint, entryPointParams: {}, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): + H.service.JsonpRequestHandle; /** * Function triggers places api 'search' entry point. Please refer to documentation for parameter specification and response handling. @@ -4228,7 +4329,7 @@ declare namespace H { * @param onError {Function} * @returns {H.service.JsonpRequestHandle} - jsonp request handle */ - search(searchParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + search(searchParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; /** * Function triggers places api 'suggestions' entry point. Please refer to documentation for parameter specification and response handling. @@ -4237,7 +4338,7 @@ declare namespace H { * @param onError {Function} * @returns {H.service.JsonpRequestHandle} - jsonp request handle */ - suggest(suggestParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + suggest(suggestParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; /** * Function triggers places api 'explore' entry point. Please refer to documentation for parameter specification and response handling. @@ -4246,7 +4347,7 @@ declare namespace H { * @param onError {Function} * @returns {H.service.JsonpRequestHandle} - jsonp request handle */ - explore(exploreParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + explore(exploreParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; /** * Function triggers places api 'around' entry point. Please refer to documentation for parameter specification and response handling. @@ -4255,7 +4356,7 @@ declare namespace H { * @param onError {Function} * @returns {H.service.JsonpRequestHandle} - jsonp request handle */ - around(aroundParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + around(aroundParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; /** * Function triggers places api 'here' entry point. Please refer to documentation for parameter specification and response handling. @@ -4264,7 +4365,7 @@ declare namespace H { * @param onError {Function} * @returns {H.service.JsonpRequestHandle} - jsonp request handle */ - here(hereParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + here(hereParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; /** * Function triggers places api 'categories' entry point. Please refer to documentation for parameter specification and response handling. @@ -4273,7 +4374,7 @@ declare namespace H { * @param onError {Function} * @returns {H.service.JsonpRequestHandle} - jsonp request handle */ - categories(categoriesParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + categories(categoriesParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; /** * This method should be used to follow hyperlinks available in results returned by dicovery queries. @@ -4283,14 +4384,14 @@ declare namespace H { * @param opt_additionalParameters {Object=} - additional parameters to send with request * @returns {H.service.JsonpRequestHandle} - jsonp resquest handle */ - follow(hyperlink: string, onResult: Function, onError: Function, opt_additionalParameters?: Object): H.service.JsonpRequestHandle; + follow(hyperlink: string, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void, opt_additionalParameters?: {}): H.service.JsonpRequestHandle; } - export module PlacesService { + namespace PlacesService { /** * List of available entry points */ - export enum EntryPoint { + enum EntryPoint { SEARCH, SUGGEST, EXPLORE, @@ -4304,7 +4405,7 @@ declare namespace H { * @property path {string=} - the path of the places service, default is 'places/v1' * @property baseUrl {H.service.Url=} - an optional base URL if it differs from the platform's default base URL */ - export interface Options { + interface Options { subDomain?: string; path?: string; baseUrl?: H.service.Url; @@ -4312,9 +4413,10 @@ declare namespace H { } /** - * The Platform class represents central class from which all other service stubs are created. It also contains the shared settings to be passed to the individual service stubs, for example the root URL of the platform, application credentials, etc. + * The Platform class represents central class from which all other service stubs are created. It also contains the shared settings to be passed to the individual service stubs, for example + * the root URL of the platform, application credentials, etc. */ - export class Platform { + class Platform { /** * Constructor * @param options {H.service.Platform.Options} @@ -4381,15 +4483,20 @@ declare namespace H { /** * This method creates a pre-configured set of HERE tile layers for convenient use with the map. - * @param opt_tileSize {(H.service.Platform.DefaultLayersOptions | number)=} - When a number – optional tile size to be queried from the HERE Map Tile API, default is 256. If the parameter is an object, then it represents options and all remaining below parameters should be omitted. + * @param opt_tileSize {(H.service.Platform.DefaultLayersOptions | number)=} - When a number – optional tile size to be queried from the HERE Map Tile API, default is 256. + * If this parameter is a number, it indicates the tile size to be queried from the HERE Map Tile API (the default value is 256); if this parameter is an object, it represents + * configuration options for the layer and all the remaining parameters (below) should be omitted * @param opt_ppi {number=} - optional 'ppi' parameter to use when querying tiles, default is not specified * @param opt_lang {string=} - optional primary language parameter, default is not specified * @param opt_secondaryLang {string=} - optional secondary language parameter, default is not specified * @param opt_style {string=} - optional 'style' parameter to use when querying map tiles, default is not specified - * @param opt_pois {(string | boolean)=} - indicates if pois are displayed on the map. Pass true to indicate that all pois should be visible. Alternatively you can specify mask for the POI Categories as described at the Map Tile API documentation POI Categories chapter. - * @returns {Object} - a set of tile layers ready to use + * @param opt_pois {(string | boolean)=} - indicates if pois are displayed on the map. Pass true to indicate that all pois should be visible. Alternatively you can specify mask for the + * POI Categories as described at the Map Tile API documentation POI Categories chapter. + * @returns {H.service.DefaultLayers} - a set of tile layers ready to use */ - createDefaultLayers(opt_tileSize?: (H.service.Platform.DefaultLayersOptions | number), opt_ppi?: number, opt_lang?: string, opt_secondaryLang?: string, opt_style?: string, opt_pois?: (string | boolean)): H.service.Platform.MapTypes; + createDefaultLayers(opt_tileSize?: (H.service.Platform.DefaultLayersOptions | number), opt_ppi?: number, + opt_lang?: string, opt_secondaryLang?: string, opt_style?: string, + opt_pois?: (string | boolean)): H.service.DefaultLayers; /** * This method returns an instance of H.service.RoutingService to query the Routing API. @@ -4419,7 +4526,7 @@ declare namespace H { getEnterpriseRoutingService(opt_options?: H.service.EnterpriseRoutingService.Options): H.service.EnterpriseRoutingService; } - export module Platform { + namespace Platform { /** * Options used to create default layers * @property tileSize {number=} - tile size to be queried from the HERE Map Tile API, default is 256 @@ -4428,9 +4535,10 @@ declare namespace H { * @property lg2 {string=} - optional secondary language parameter, default is not specified * @property style {string=} - optional 'style' parameter to use when querying map tiles, default is not specified * @property pois {boolean=} - indicates if pois are displayed on the map - * @property crossOrigin {(string | boolean=)} - indicates if CORS headers should be used for default layers, if false is specified, CORS headers are not set, defaults to 'anonymous'. Be aware that storing of content is not possible if crossOrigin is not set to true (see H.Map#storeContent). + * @property crossOrigin {(string | boolean=)} - indicates if CORS headers should be used for default layers, if false is specified, CORS headers are not set, defaults to 'anonymous'. + * Be aware that storing of content is not possible if crossOrigin is not set to true (see H.Map#storeContent). */ - export interface DefaultLayersOptions { + interface DefaultLayersOptions { tileSize?: number; ppi?: number; lg?: string; @@ -4447,7 +4555,7 @@ declare namespace H { * @property useCIT {boolean=} - Indicates whether the Customer Integration Testing should be used, default is false * @property useHTTPS {boolean=} - Indicates whether secure communication should be used, default is false */ - export interface Options { + interface Options { app_id: string; app_code: string; baseUrl?: H.service.Url; @@ -4458,18 +4566,19 @@ declare namespace H { /** * pre-configured set of HERE tile layers for convenient use with the map. */ - export interface MapTypes { + interface MapTypes { normal?: H.service.MapType; satellite?: H.service.MapType; terrain?: H.service.MapType; - [key: string]: H.service.MapType; + [key: string]: H.service.MapType | undefined; } } /** - * This class encapsulates the Routing REST API as a service stub. An instance of this class can be retrieved by calling the factory method on a platform instance. H.service.Platform#getRoutingService. + * This class encapsulates the Routing REST API as a service stub. An instance of this class can be retrieved by calling the factory method on a platform instance. + * H.service.Platform#getRoutingService. */ - export class RoutingService extends H.service.AbstractRestService { + class RoutingService extends H.service.AbstractRestService { /** * Constructor * @param opt_options {H.service.RoutingService.Options=} @@ -4477,7 +4586,8 @@ declare namespace H { constructor(opt_options?: H.service.RoutingService.Options); /** - * This method sends a "calculateroute" request to Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * This method sends a "calculateroute" request to Routing REST API and calls the onResult callback function once the service response was received - providing a + * H.service.ServiceResult object - or the onError callback if a communication error occured. * @param calculateRouteParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Routing REST API provides a response to the request. * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request @@ -4485,13 +4595,13 @@ declare namespace H { calculateRoute(calculateRouteParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; } - export module RoutingService { + namespace RoutingService { /** * @property subDomain {string=} - the sub-domain of the routing service relative to the platform's base URL, default is 'route' * @property path {string=} - the path of the map tile service, default is 'routing/7.2' * @property baseUrl {H.service.Url=} - an optional base URL if it differs from the platform's default base URL */ - export interface Options { + interface Options { subDomain?: string; path?: string; baseUrl?: H.service.Url; @@ -4501,29 +4611,163 @@ declare namespace H { /** * This type encapsulates URL parameters to be sent to a HERE platform service. */ - export interface ServiceParameters { + interface ServiceParameters { [key: string]: string; } /** * This type encapsulates a response object provider by a HERE platform service. */ - export interface ServiceResult { - [key: string]: string; + interface ServiceResult { + [key: string]: any; + response?: { + language?: string, + route?: Array<{ + leg: Array<{ + maneuver: Array<{ + id: string, + instruction: string, + length: number, + note: string[], + position: { + latitude: number, + longitude: number + }, + shape: string[], + travelTime: number, + _type: string + }> + }>, + mode: { + feature: any[], + trafficMode: string, + transportModes: string[], + type: string + } + shape: string[], + summary: { + baseTime: number, + distance: number, + flags: string[], + text: string, + trafficTime: number, + travelTime: number + } + waypoint: Array<{ + label: string, + linkId: string, + mappedPosition: { + latitude: number, + longitude: number + }, + mappedRoadName: string, + originalPosition: { + latitude: number, + longitude: number + }, + shapeIndex: number, + sideOfStreet: string, + spot: number, + type: string + }> + }>, + metaInfo: {} + }; + results?: { + items?: any[], + next?: string + }; + search?: { + context: { + href: string, + location: { + address: { + city: string, + country: string, + countryCode: string, + county: string, + district: string, + house: string, + postalCode: string, + stateCode: string, + street: string, + text: string + }, + position: number[] + }, + type: string + } + }; + Response?: { + MetaInfo: { + Timestamp: string + }, + View: Array<{ + Result: Array<{ + Location: { + Address: { + AdditionalData: Array<{ + key: string, + value: string + }>, + City: string, + Country: string, + County: string, + District: string, + HouseNumber: string, + Label: string, + PostalCode: string, + State: string, + Street: string + }, + DisplayPosition: { + Latitude: number, + Longitude: number + }, + LocationId: string, + LocationType: string, + MapView: { + BottomRight: { + Latitude: number, + Longitude: number + }, + TopLeft: { + Latitude: number, + Longitude: number + } + }, + NavigationPosition: Array<{ + Latitude: number, + Longitude: number + }> + }, + MatchLevel: string, + MatchQuality: { + City: number, + HouseNumber: number, + Street: number[] + }, + MatchType: string, + Relevance: number + }> + }>, + isolines: any[] + }; } /** * Options which are used to initialize the tile provider. * @property crossOrigin {boolean=} - The string to be set for the crossOrigin attribute for loaded images */ - export interface TileProviderOptions { + interface TileProviderOptions { crossOrigin?: boolean; } /** - * TrafficIncindentsService provides functionality to the low level traffic incidents api Traffic API documentation where it is possible to retrieve traffic incident information on a tile basis + * TrafficIncindentsService provides functionality to the low level traffic incidents api Traffic API documentation where it is possible to retrieve traffic incident information on a + * tile basis */ - export class TrafficIncidentsService extends H.service.AbstractRestService { + class TrafficIncidentsService extends H.service.AbstractRestService { /** * Constructor * @param opt_options {H.service.TrafficIncidentsService.Options=} @@ -4537,7 +4781,7 @@ declare namespace H { * @param onError {function()} * @returns {H.service.JsonpRequestHandle} */ - requestIncidents(serviceParams: H.service.ServiceParameters, onResponse: (result: H.service.ServiceResult) => void, onError: () => void): H.service.JsonpRequestHandle; + requestIncidents(serviceParams: H.service.ServiceParameters, onResponse: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; /** * This method requests traffic incident information by tile coordinates @@ -4549,16 +4793,17 @@ declare namespace H { * @param opt_serviceParams {H.service.ServiceParameters=} - optional service parameters to be added to the request * @returns {H.service.JsonpRequestHandle} */ - requestIncidentsByTile(x: number, y: number, z: number, onResponse: (result: H.service.ServiceResult) => void, onError: () => void, opt_serviceParams?: H.service.ServiceParameters): H.service.JsonpRequestHandle; + requestIncidentsByTile(x: number, y: number, z: number, onResponse: (result: H.service.ServiceResult) => void, onError: (error: Error) => void, + opt_serviceParams?: H.service.ServiceParameters): H.service.JsonpRequestHandle; } - export module TrafficIncidentsService { + namespace TrafficIncidentsService { /** * @property subDomain {string=} - the sub-domain of the traffic incidents service relative to the platform's base URL, default is 'traffic' * @property path {string=} - the path of the traffic incidents service, default is 'traffic/6.1' * @property baseUrl {H.service.Url=} - an optional base URL if it differs from the platform's default base URL */ - export interface Options { + interface Options { subDomain?: string; path?: string; baseUrl?: H.service.Url; @@ -4566,9 +4811,10 @@ declare namespace H { } /** - * This class represents a URL giving access to the individual parts that make up a URL,such as the scheme, host/domain, path, etc. Use the static parse method to populate a new URL object from a URL string. Be aware that URLs with user and password like "ftp://user:password@foo.bar/" are not supported! + * This class represents a URL giving access to the individual parts that make up a URL,such as the scheme, host/domain, path, etc. Use the static parse method to populate a new URL object + * from a URL string. Be aware that URLs with user and password like "ftp://user:password@foo.bar/" are not supported! */ - export class Url { + class Url { /** * Constructor * @param scheme {string} - the URL scheme (e.g. "http" or "https" or "mailto") @@ -4578,7 +4824,7 @@ declare namespace H { * @param opt_port {number=} - The port of the host on which the host listens. If a string is passed it must be convertible to an integer. * @param opt_anchor {string=} - an optional anchor part of the URL (usually preceded by '#'); */ - constructor(scheme: string, host: string, opt_path?: string, opt_params?: Object, opt_port?: number, opt_anchor?: string); + constructor(scheme: string, host: string, opt_path?: string, opt_params?: {}, opt_port?: number, opt_anchor?: string); /** * This function parses a URL string and returns a H.service.Url object. The URL string must contain at least a scheme and a host. @@ -4589,7 +4835,8 @@ declare namespace H { static parse(url: string, opt_baseURL?: string): H.service.Url; /** - * Clones this URL object. Optionally, mutations can be passed to this function to modify properties of the cloned object. Note that URL parameters are not replaced but merged with the parameters of this instance. + * Clones this URL object. Optionally, mutations can be passed to this function to modify properties of the cloned object. Note that URL parameters are not replaced but merged with the + * parameters of this instance. * @returns {H.service.Url} - the clone of the URL object */ clone(): H.service.Url; @@ -4634,11 +4881,12 @@ declare namespace H { getPath(): string | void; /** - * This function sets the specified parameters for this URL object. Keys in this object, which are associated with undefined values will be treated as query string parameters with no value. + * This function sets the specified parameters for this URL object. Keys in this object, which are associated with undefined values will be treated as query string parameters + * with no value. * @param params {(Object | undefined)} - a hash of query string parameters specifying the parameters to be set.or a boolean to clear the parameters. * @returns {H.service.Url} - this URL object */ - setQuery(params?: Object | boolean): H.service.Url; + setQuery(params?: {} | boolean): H.service.Url; /** * This function returns a boolean value indicating whether there are any query string parameter associated with this URL. @@ -4650,7 +4898,7 @@ declare namespace H { * This function returns the query object of this Url object. * @returns {Object} - the query object */ - getQuery(): Object; + getQuery(): {}; /** * This function sets the anchor of this URL object. @@ -4666,11 +4914,12 @@ declare namespace H { getAnchor(): string | void; /** - * This function merges the provided parameters into this URL's existing parameters. Key-value pairs which are defined in the argument and this URL's parameters will be overwritten. Key-value pairs which are defined in the argument and are not defined in this URL's parameters will be added. Prototype properties and function properties will not be merged. + * This function merges the provided parameters into this URL's existing parameters. Key-value pairs which are defined in the argument and this URL's parameters will be overwritten. + * Key-value pairs which are defined in the argument and are not defined in this URL's parameters will be added. Prototype properties and function properties will not be merged. * @param other {Object} - the parmeters to be merged into this URL's query string parameters * @returns {H.service.Url} - this URL object */ - mergeQuery(other: Object): H.service.Url; + mergeQuery(other: {}): H.service.Url; /** * This function adds a sub-domain to the host of this URL object. @@ -4693,11 +4942,11 @@ declare namespace H { toString(): string; } - export module metaInfo { + namespace metaInfo { /** * This class encapsulates a Metainfo Tile end point of the HERE Map Tile API. */ - export class Service extends H.util.EventTarget implements H.service.IConfigurable { + class Service extends H.util.EventTarget implements H.service.IConfigurable { /** * Constructor * @param opt_options {H.service.metaInfo.Service.Options=} - additional service parameters @@ -4726,7 +4975,8 @@ declare namespace H { * @param opt_scheme {string=} - the scheme for which the meta info tiles a requested (default is 'normal.day') * @returns {H.map.provider.TileProvider} - the tile provider */ - createTileProvider(tileSize: number, pixelRatio: number, opt_categoryFilter?: Array, opt_additionalParameters?: H.service.ServiceParameters, opt_tileType?: string, opt_scheme?: string): H.map.provider.TileProvider; + createTileProvider(tileSize: number, pixelRatio: number, opt_categoryFilter?: string[], opt_additionalParameters?: H.service.ServiceParameters, opt_tileType?: string, + opt_scheme?: string): H.map.provider.TileProvider; /** * This method creates a tile layer. This layer can be used as a layer on a map's data model. @@ -4738,7 +4988,8 @@ declare namespace H { * @param opt_scheme {string=} - the scheme for which the meta info tiles a requested (default is 'normal.day') * @returns {H.map.layer.TileLayer} - the tile layer */ - createTileLayer(tileSize: number, pixelRatio: number, opt_categoryFilter?: Array, opt_additionalParameters?: H.service.ServiceParameters, opt_tileType?: string, opt_scheme?: string): H.map.layer.TileLayer; + createTileLayer(tileSize: number, pixelRatio: number, opt_categoryFilter?: string[], opt_additionalParameters?: H.service.ServiceParameters, opt_tileType?: string, + opt_scheme?: string): H.map.layer.TileLayer; /** * This methods receive configuration parameters from the platform, that can be used by the object implementing the interface. @@ -4746,13 +4997,14 @@ declare namespace H { * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false - * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified + * in the opt_baseUrl to use HTTPS. * @returns {H.service.IConfigurable} */ configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; } - export module Service { + namespace Service { /** * @property maps {Object} - * @property schemes {Object} - @@ -4761,7 +5013,7 @@ declare namespace H { * @property resolutions {Object} - * @property languages {Object} - */ - export interface Info { + interface Info { maps: { [key: string]: any }; schemes: { [key: string]: any }; tiletypes: { [key: string]: any }; @@ -4771,11 +5023,12 @@ declare namespace H { } /** - * @property type {string=} - the type of the map tile service to communicate with, e.g. 'base' (default), 'aerial', etc. (refer to the Map Tile REST API documentation for available types) + * @property type {string=} - the type of the map tile service to communicate with, e.g. 'base' (default), 'aerial', etc. (refer to the Map Tile REST API documentation for + * available types) * @property version {string=} - the map version hash to use for retrieving tiles, default is newest and will be automatically updated * @property subDomain {string=} - the sub-domain of the map tile service relative to the platform's base URL, default is 'maps' */ - export interface Options { + interface Options { type?: string; version?: string; subDomain?: string; @@ -4785,7 +5038,7 @@ declare namespace H { /** * This class utilizes Metainfo Tiles functionality provided by the Map Tile API to load meta information about map objects (buildings, labels, public transport etc.). */ - export class TileProvider extends H.map.provider.RemoteTileProvider { + class TileProvider extends H.map.provider.RemoteTileProvider { /** * Constructor * @param service {(H.service.metaInfo.Service | H.service.MapTileService)} - the tile service which holds information from about the source of the tiles @@ -4795,7 +5048,7 @@ declare namespace H { constructor(service: (H.service.metaInfo.Service | H.service.MapTileService), opt_params?: H.service.ServiceParameters, opt_options?: H.service.metaInfo.TileProvider.Options); } - export module TileProvider { + namespace TileProvider { /** * Configuration object which can be used to initialize the TileProvider. * @property tileType {string=} - The tile type for which to request meta info @@ -4805,22 +5058,22 @@ declare namespace H { * @property pixelRatio {number=} - The pixel ratio to use for over-sampling in cases of high-resolution displays * @property categoryFilter {Array=} - A list of meta-info category names which should be suppressed. See Metainfo Tile for valid category names. */ - export interface Options { + interface Options { tileType?: string; scheme?: string; tileCacheSize?: number; tileSize?: number; pixelRatio?: number; - categoryFilter?: Array; + categoryFilter?: string[]; } } } - export module venues { + namespace venues { /** * The class represents the building in the venue hiearachy (see H.service.venues.Venue) and holds floors that belong to the building. */ - export class Building extends H.map.Group { + class Building extends H.map.Group { /** * Constructor * @param provider {H.map.provider.ObjectProvider} - The object provider of this venue building @@ -4857,9 +5110,10 @@ declare namespace H { } /** - * The class represents the floor object in the venue hierarchy (see H.service.venues.Venue). The class holds information about floor geometry and spaces (see H.service.venues.Space) that belong to this floor. + * The class represents the floor object in the venue hierarchy (see H.service.venues.Venue). The class holds information about floor geometry and spaces (see H.service.venues.Space) + * that belong to this floor. */ - export class Floor extends H.map.Group { + class Floor extends H.map.Group { /** * Constructor * @param provider {H.map.provider.ObjectProvider} - The object provider of this venue floor @@ -4893,7 +5147,8 @@ declare namespace H { getBuilding(): H.service.venues.Building; /** - * Method returns raw data associated with the floor. For more details on data format see http://developer.here.com/rest-apis/documentation/venue-maps/topics/resource-type-venue-interaction-tile-floor.html + * Method returns raw data associated with the floor. For more details on data format see + * http://developer.here.com/rest-apis/documentation/venue-maps/topics/resource-type-venue-interaction-tile-floor.html * @returns {*} - the raw floor data object */ getData(): any; @@ -4909,7 +5164,7 @@ declare namespace H { /** * This class encapsulates methods to call Venue Maps API endpoints. */ - export class Service extends H.util.EventTarget implements H.service.IConfigurable { + class Service extends H.util.EventTarget implements H.service.IConfigurable { /** * Constructor * @param opt_options {H.service.venues.Service.Options=} - additional service parameters @@ -4917,7 +5172,8 @@ declare namespace H { constructor(opt_options?: H.service.venues.Service.Options); /** - * This method sends a discovery request to the Venue Maps API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object, or the onError callback if a communication error occured. + * This method sends a discovery request to the Venue Maps API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult + * object, or the onError callback if a communication error occured. * @param serviceParams {H.service.ServiceParameters} - the service parameters to be sent with the discovery request * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Venue Maps API provides a response to the request * @param onError {function(string)} - this function will be called if a communication error occurs during request and error type is passed as an argument @@ -4925,7 +5181,8 @@ declare namespace H { discover(serviceParams: H.service.ServiceParameters, onResult: (res: H.service.ServiceResult) => void, onError: (s: string) => void): void; /** - * This method creates a tile layer which can be added to the map in order to see the venues. It uses Interaction Tile endpoint of the Venue Maps API, more at http://developer.here.com/rest-apis/documentation/venue-maps/topics/quick-start-get-interaction-tile.html. + * This method creates a tile layer which can be added to the map in order to see the venues. It uses Interaction Tile endpoint of the Venue Maps API, more at + * http://developer.here.com/rest-apis/documentation/venue-maps/topics/quick-start-get-interaction-tile.html. * @param opt_options {H.service.venues.TileProvider.Options=} - Tile provider options * @returns {H.map.layer.TileLayer} - the tile layer */ @@ -4943,18 +5200,19 @@ declare namespace H { * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false - * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified + * in the opt_baseUrl to use HTTPS. * @returns {H.service.IConfigurable} */ configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; } - export module Service { + namespace Service { /** * @property subDomain {string=} - the sub-domain of the Venue Maps service relative to the platform's base URL, default is 'venue.maps' * @property path {string=} - the path to append after host name when making requests to the Venue Maps API, default is empty */ - export interface Options { + interface Options { subDomain?: string; path?: string; } @@ -4962,7 +5220,7 @@ declare namespace H { /** * The state types of the H.service.venues.Service. Possible states are: */ - export enum State { + enum State { ERROR, INIT, READY, @@ -4972,7 +5230,7 @@ declare namespace H { /** * Represents a spatial object for this space. Each space object contains data associated with that space and can be retrieved by using H.service.venues.Space#getData method. */ - export class Space { + class Space { /** * Constructor * @param provider {H.map.provider.ObjectProvider} - The provider of this object. @@ -4989,7 +5247,8 @@ declare namespace H { isFloorSpace(): boolean; /** - * This method sets custom style to use for rendering the labels. Should be called before the first render of the space, otherwise has no any effect. Note that due to the design consistency currently it is not allowed to change the font family and the size of the labels. + * This method sets custom style to use for rendering the labels. Should be called before the first render of the space, otherwise has no any effect. Note that due to the design + * consistency currently it is not allowed to change the font family and the size of the labels. * @param labelStyle {(H.map.SpatialStyle | H.map.SpatialStyle.Options)} - Custom label style */ initLabelStyle(labelStyle: (H.map.SpatialStyle | H.map.SpatialStyle.Options)): void; @@ -5001,16 +5260,17 @@ declare namespace H { getFloor(): H.service.venues.Floor; /** - * Method returns raw data associated with the space. For more details on data format see http://developer.here.com/rest-apis/documentation/venue-maps/topics/resource-type-venue-interaction-tile-space.html + * Method returns raw data associated with the space. For more details on data format see + * http://developer.here.com/rest-apis/documentation/venue-maps/topics/resource-type-venue-interaction-tile-space.html * @returns {Object} - raw space data object */ - getData(): Object; + getData(): {}; } /** * This class represents a Venue Maps tile provider which requests venues tiles from a platform venue tile service. */ - export class TileProvider extends H.map.provider.RemoteTileProvider { + class TileProvider extends H.map.provider.RemoteTileProvider { /** * Constructor * @param service {H.service.venues.Service} @@ -5031,24 +5291,27 @@ declare namespace H { getCurrentLevel(): number; } - export module TileProvider { + namespace TileProvider { /** * Configuration object which can be used to initialize the TileProvider. * @property tileCacheSize {number=} - The number of fully rendered spatial tiles that are cached for immediate reuse, default is 32 * @property pixelRatio {number=} - The pixel ratio to use for over-sampling in cases of high-resolution displays - * @property onSpaceCreated {function(H.service.venues.Space)=} - A callback function that is called on every created space (see H.service.venues.Space) object. The function can be used for space object styling. + * @property onSpaceCreated {function(H.service.venues.Space)=} - A callback function that is called on every created space (see H.service.venues.Space) object. The function can be + * used for space object styling. */ - export interface Options { + interface Options { tileCacheSize?: number; pixelRatio?: number; - onSpaceCreated?: (space: H.service.venues.Space) => void; + onSpaceCreated?(space: H.service.venues.Space): void; } } /** - * The class represents the venue, it is a root for the venue object heirarchy. The venue inherits from H.map.Group and holds building objects (see H.service.venues.Building). Building objects hold floor objects (see H.service.venues.Floor) and inherit from H.map.Group as well. Leaf objects are spaces (see H.service.venues.Space) that are spatial map objects and reside inside floor containers. + * The class represents the venue, it is a root for the venue object heirarchy. The venue inherits from H.map.Group and holds building objects (see H.service.venues.Building). + * Building objects hold floor objects (see H.service.venues.Floor) and inherit from H.map.Group as well. Leaf objects are spaces (see H.service.venues.Space) that are spatial map objects + * and reside inside floor containers. */ - export class Venue extends H.map.Group { + class Venue extends H.map.Group { /** * Constructor * @param provider {H.map.provider.ObjectProvider} - The object provider of this venue @@ -5073,11 +5336,11 @@ declare namespace H { } /***** ui *****/ - export module ui { + namespace ui { /** * This class represents the base class for UI controls on the map. */ - export class Control extends H.ui.base.Container { + class Control extends H.ui.base.Container { /** * This abstract method can be overridden by deriving classes to be invoked when the UI object's unit system changes. * @param unitSystem {H.ui.UnitSystem} - the unit system the UI currently uses @@ -5119,7 +5382,7 @@ declare namespace H { /** * This class represents a distance measurement control which helps calculating distances between geographical locations indicated by the user clicks. */ - export class DistanceMeasurement extends H.ui.Control { + class DistanceMeasurement extends H.ui.Control { /** * Constructor * @param opt_options {H.ui.DistanceMeasurement.Options=} - optional parameters to be passed to this control @@ -5127,7 +5390,7 @@ declare namespace H { constructor(opt_options?: H.ui.DistanceMeasurement.Options); } - export module DistanceMeasurement { + namespace DistanceMeasurement { /** * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, default is H.ui.LayoutAlignment.RIGHT_BOTTOM * @property startIcon {H.map.Icon=} - the icon to use for the first measurement point @@ -5135,9 +5398,10 @@ declare namespace H { * @property endIcon {H.map.Icon=} - the icon to use for the last measurement point * @property splitIcon {H.map.Icon=} - the icon to use for indicating position under pointer over the line where new point will be created once user clicks * @property lineStyle {(H.map.SpatialStyle | H.map.SpatialStyle.Options)} - the style to use for connecting lines of the measurement points - * @property distanceFormatter {function(number)=} - Optional function used for formatting a distance. By default distance measurement tool will do the formatting according to the specified measurement unit (see H.ui.UI.Options#unitSystem) + * @property distanceFormatter {function(number)=} - Optional function used for formatting a distance. By default distance measurement tool will do the formatting according to the + * specified measurement unit (see H.ui.UI.Options#unitSystem) */ - export interface Options { + interface Options { alignment?: H.ui.LayoutAlignment; startIcon?: H.map.Icon; stopoverIcon?: H.map.Icon; @@ -5151,7 +5415,7 @@ declare namespace H { /** * This class represents an information bubble bound to a geo-position on the map. */ - export class InfoBubble extends base.Element { + class InfoBubble extends base.Element { /** * Constructor * @param position {H.geo.IPoint} - the geo-position to which this info bubble corresponds @@ -5196,24 +5460,25 @@ declare namespace H { getContentElement(): HTMLElement; /** - * This methods sets the content of the info bubble. This can either be a string (applied as innerHTML) to the content element of this info bubble or a HTML node which is appended to the content element. + * This methods sets the content of the info bubble. This can either be a string (applied as innerHTML) to the content element of this info bubble or a HTML node which is appended + * to the content element. * @param content {(string | Node)} - the content for this bubble */ setContent(content: string | Node): void; } - export module InfoBubble { + namespace InfoBubble { /** * This enumeration holds the state an info bubble can have. */ - export enum State { + enum State { /** This value represents the state where an info bubble is open and visible (value: 'open'). */ OPEN, /** This value represents the state where an info bubble is closed and invisible (value: 'closed') */ CLOSED, } - export interface Options { + interface Options { /** * a callback to be invoked when the info bubble's state changes * @param event {H.util.Event} @@ -5230,7 +5495,7 @@ declare namespace H { /** * This enumeration holds the possible layout alignments for the UI elements. */ - export enum LayoutAlignment { + enum LayoutAlignment { TOP_LEFT, TOP_CENTER, TOP_RIGHT, @@ -5248,7 +5513,7 @@ declare namespace H { /** * This class represents a menu control allowing to control which map type the map shows, etc. */ - export class MapSettingsControl extends H.ui.Control { + class MapSettingsControl extends H.ui.Control { /** * Constructor * @param opt_options {H.ui.MapSettingsControl.Options=} - optional parameters to be passed to this control @@ -5262,13 +5527,13 @@ declare namespace H { setIncidentsLayer(incidentsLayer: H.map.layer.Layer): void; } - export module MapSettingsControl { + namespace MapSettingsControl { /** * The map type entry is an object containing a display name and a map type object to which it refers. * @property name {string} - label which describes the map type * @property mapType {H.service.MapType} - reference to map type */ - export interface MapTypeEntry { + interface MapTypeEntry { name: string; mapType: H.service.MapType; } @@ -5278,9 +5543,9 @@ declare namespace H { * @property entries {Array=} - the map type entries to be shown in this map settings control * @property incidents {H.map.layer.Layer} - the traffic incidents layer to be activated by the map settings control */ - export interface Options { + interface Options { alignment?: H.ui.LayoutAlignment; - entries?: Array; + entries?: H.ui.MapSettingsControl.MapTypeEntry[]; incidents: H.map.layer.Layer; } } @@ -5288,7 +5553,7 @@ declare namespace H { /** * This class represents the UI controls for panorama */ - export class Pano extends H.ui.Control { + class Pano extends H.ui.Control { /** * Constructor * @param opt_options {H.ui.Pano.Options=} - optional parameters to be passed to the map. @@ -5296,12 +5561,12 @@ declare namespace H { constructor(opt_options?: H.ui.Pano.Options); } - export module Pano { + namespace Pano { /** * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, default is H.ui.LayoutAlignment.RIGHT_BOTTOM * @property mapTypes {H.service.MapTypes} - The map types to use */ - export interface Options { + interface Options { alignment?: H.ui.LayoutAlignment; mapTypes: H.service.MapType; } @@ -5310,7 +5575,7 @@ declare namespace H { /** * This class represents a UI element showing the current zoom scale. */ - export class ScaleBar { + class ScaleBar { /** * Constructor * @param opt_options {H.ui.ScaleBar.Options=} - optional parameters to be passed to this scale bar. @@ -5318,11 +5583,11 @@ declare namespace H { constructor(opt_options?: H.ui.ScaleBar.Options); } - export module ScaleBar { + namespace ScaleBar { /** * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, default is H.ui.LayoutAlignment.BOTTOM_RIGHT */ - export interface Options { + interface Options { alignment?: H.ui.LayoutAlignment; } } @@ -5330,7 +5595,7 @@ declare namespace H { /** * This class encapsulates map UI functionality. */ - export class UI implements H.util.ICapturable { + class UI implements H.util.ICapturable { /** * Constructor * @param map {H.Map} @@ -5383,7 +5648,7 @@ declare namespace H { * This method returns a list of info bubble objects which are currently attached to this UI. * @returns {Array} - the list of info bubbles */ - getBubbles(): Array; + getBubbles(): InfoBubble[]; /** * This method appends a control to the UI. @@ -5429,7 +5694,7 @@ declare namespace H { * @param opt_locale {(H.ui.i18n.Localization | string)=} - the language to use (or a full localization object). * @returns {H.ui.UI} - the UI instance configured with the default controls */ - static createDefault(map: H.Map, mapTypes: H.service.Platform.MapTypes, opt_locale?: H.ui.i18n.Localization | string): UI; + static createDefault(map: H.Map, mapTypes: H.service.Platform.MapTypes | H.service.DefaultLayers, opt_locale?: H.ui.i18n.Localization | string): H.ui.UI; /** * This method is used to capture the element view @@ -5451,7 +5716,7 @@ declare namespace H { */ } - export module UI { + namespace UI { /** * Optional parameters to be passed to the UI constructor. * @property unitSystem {H.ui.UnitSystem=} - An optional unit system to be used by the UI, default is H.ui.UnitSystem.METRIC @@ -5461,9 +5726,11 @@ declare namespace H { * @property scalebar {(H.ui.ScaleBar.Options | boolean)=} - * @property panorama {(H.ui.Pano.Options | boolean)=} - * @property distancemeasurement {(H.ui.DistanceMeasurement.Options | boolean)=} - - * @property locale {(H.ui.i18n.Localization | string)=} - defines language in which UI can be rendered. It can be predefined H.ui.i18n.Localization object with custom translation map, or a string one of following 'en-US', 'de-DE', 'es-ES', 'fi-FI', 'fr-FR', 'it-IT', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'tr-TR', 'zh-CN'. If not defined ui will use 'en-US' by default + * @property locale {(H.ui.i18n.Localization | string)=} - defines language in which UI can be rendered. It can be predefined H.ui.i18n.Localization object with custom translation map, + * or a string one of following 'en-US', 'de-DE', 'es-ES', 'fi-FI', 'fr-FR', 'it-IT', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'tr-TR', 'zh-CN'. If not defined ui will use 'en-US' + * by default */ - export interface Options { + interface Options { unitSystem?: H.ui.UnitSystem; zoom?: (H.ui.ZoomControl.Options | boolean); zoomrectangle?: (H.ui.ZoomRectangle.Options | boolean); @@ -5478,7 +5745,7 @@ declare namespace H { /** * This enumeration holds the possible unit systems for the UI to display distances. */ - export enum UnitSystem { + enum UnitSystem { /** This value represents the imperial unit system using miles and feet (value: 'imperial'). */ IMPERIAL, /** This value represents the metric unit system using meters and kilometers, etc (value: 'metric'). */ @@ -5488,7 +5755,7 @@ declare namespace H { /** * This class represents the UI controls for zooming in an out of the map. */ - export class ZoomControl extends H.ui.Control { + class ZoomControl extends H.ui.Control { /** * Constructor * @param opt_options {H.ui.ZoomControl.Options=} - optional parameters to be passed to the map. @@ -5502,14 +5769,14 @@ declare namespace H { getZoomSpeed(): number; } - export module ZoomControl { + namespace ZoomControl { /** * @property zoomSpeed {number=} - the speed if zooming in and out in levels per millisecond, defaults to 0.05 * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, defaults to H.ui.LayoutAlignment.RIGHT_MIDDLE * @property slider {boolean=} - flag whether to show the slider (true) or not, defaults to false * @property sliderSnaps {boolean=} - flag whether slider should snap to the integer values or not, defaults to false. This option has effect only if slider is enabled. */ - export interface Options { + interface Options { zoomSpeed?: number; alignment?: H.ui.LayoutAlignment; slider?: boolean; @@ -5520,7 +5787,7 @@ declare namespace H { /** * This class represents a zoom rectangle control element that allows zooming to the selected area on the screen. */ - export class ZoomRectangle extends H.ui.Control { + class ZoomRectangle extends H.ui.Control { /** * Constructor * @param opt_options {H.ui.ZoomRectangle.Options=} - optional parameters to be passed to this control @@ -5528,12 +5795,13 @@ declare namespace H { constructor(opt_options?: H.ui.ZoomRectangle.Options); } - export module ZoomRectangle { + namespace ZoomRectangle { /** * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, default is H.ui.LayoutAlignment.BOTTOM_RIGHT - * @property adjustZoom {function(number, H.Map) : number=} - optional function that defines how zoom level should be changed, by default zoom level is picked to fit the bounding rectangle into the view port. + * @property adjustZoom {function(number, H.Map) : number=} - optional function that defines how zoom level should be changed, by default zoom level is picked to fit the + * bounding rectangle into the view port. */ - export interface Options { + interface Options { alignment?: H.ui.LayoutAlignment; adjustZoom?(n: number, m: H.Map): number; } @@ -5544,15 +5812,15 @@ declare namespace H { /** * This namespace contains basic UI elements from which the UI controls are built. */ - export module base { - export class Container extends H.util.EventTarget { + namespace base { + class Container extends H.util.EventTarget { /** * Constructor * @param opt_elementType {string=} - the type of HTML element this UI element renders as, default is 'div' * @param opt_className {string=} - an optional class name to be used on this element * @param opt_children {Array=} - optional child elements to be added to this container */ - constructor(opt_elementType?: string, opt_className?: string, opt_children?: Array); + constructor(opt_elementType?: string, opt_className?: string, opt_children?: Element[]); /** * Adds a child element to be rendered within the container element. @@ -5565,7 +5833,7 @@ declare namespace H { * Returns the child collection of this container. * @returns {Array} - Returns the child collection of this container. */ - getChildren(): Array; + getChildren(): Element[]; /** * Removes a child element from this container's child collection. @@ -5641,7 +5909,7 @@ declare namespace H { removeClass(className: string): Element; } - export class Element extends H.util.EventTarget { + class Element extends H.util.EventTarget { /** * Constructor * @param opt_elementType {string=} - the type of HTML element this UI element renders as, default is 'div' @@ -5721,16 +5989,16 @@ declare namespace H { /** * Namespace contains functionality related to internationalization. */ - export module i18n { + namespace i18n { /** * Default available locales. UI provides default translations for this set of locale codes. */ - export const defaultLocales: Array; + const defaultLocales: string[]; /** * This class is used for internationalization of UI components. */ - export class Localization { + class Localization { constructor(locale: string, opt_translationMap?: any); /** @@ -5743,7 +6011,7 @@ declare namespace H { * This method returns translation keys for current locale. Keys from this set can be used to get translations via translate method. * @returns {Array} */ - getKeys(): Array; + getKeys(): string[]; /** * This method returns a boolean value indicating whether this localization object has a translation for the specified translation key. @@ -5763,11 +6031,13 @@ declare namespace H { } /***** util *****/ - export module util { + namespace util { /** - * The cache represents a in-memory LRU-cache with a fixed size. It stores any data that is added until the cache's content exceeds a maximum size. Once the size of all content elements exceeds the maximum size the cache will drop the least recently retrieved elements until the size of the cache is within the bounds of its maximum size. Data elements are always associated with an identifier that allow to retrieve them at a later stage and their content size. + * The cache represents a in-memory LRU-cache with a fixed size. It stores any data that is added until the cache's content exceeds a maximum size. Once the size of all content elements + * exceeds the maximum size the cache will drop the least recently retrieved elements until the size of the cache is within the bounds of its maximum size. Data elements are always + * associated with an identifier that allow to retrieve them at a later stage and their content size. */ - export class Cache implements H.util.ICache { + class Cache implements H.util.ICache { /** * Constructor * @param maxSize {number} - the maximum size of the cache @@ -5819,7 +6089,8 @@ declare namespace H { drop(id: any): void; /** - * This method will execute the provided callback function on each of the cache's entries. If the optional match predicate is passed to this method the callback will only be executed on those entries for which the predicated returns true. + * This method will execute the provided callback function on each of the cache's entries. If the optional match predicate is passed to this method the callback will only be executed + * on those entries for which the predicated returns true. * @param callback {function(string, ?, number)} - the callback to be invoked for each entry * @param opt_ctx {Object=} - an optional context object to be used as this within the callback * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional match predicate to customize on which entries the callback will be called @@ -5827,8 +6098,10 @@ declare namespace H { forEach(callback: (s: string, i: any, n: number) => void, opt_ctx?: any, opt_matcher?: (s: string, i: any, n: number) => boolean): void; /** - * This method removes all data elements from the cache. If the optional match predicate is passed to this method only those data elements will be removed for which the predicate return true. - * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional function that receives an entries id, data and size and may return true or false to either remove it or leave the entry in the cache respectively + * This method removes all data elements from the cache. If the optional match predicate is passed to this method only those data elements will be removed for which the predicate + * return true. + * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional function that receives an entries id, data and size and may return true or false to either remove it or + * leave the entry in the cache respectively */ removeAll(opt_matcher?: (s: string, i: any, n: number) => boolean): void; @@ -5846,7 +6119,7 @@ declare namespace H { * @property type {string} - Name of the dispatched event * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event */ - export class ChangeEvent extends H.util.Event { + class ChangeEvent extends H.util.Event { /** * Constructor * @param type {string} - The type of the event @@ -5875,7 +6148,7 @@ declare namespace H { * This class represents a contextual information/action. * @property SEPARATOR {H.util.ContextItem} - Separator for the context items */ - export class ContextItem extends H.util.EventTarget { + class ContextItem extends H.util.EventTarget { /** * Constructor * @param opt_options {H.util.ContextItem.Options=} - The values to initialize this context item @@ -5924,29 +6197,29 @@ declare namespace H { * @param callback {Function} - The callback function. * @param opt_scope {Object=} - An optional scope to call the callback in. */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; static SEPARATOR: H.util.ContextItem; } - export module ContextItem { + namespace ContextItem { /** * This type defines options which can be used to initialize the context item. * @property label {string=} - the label of the context item * @property disabled {boolean=} - flag indicatting whether context item is disabled or no, by default false * @property callback {function(H.util.Event)=} - Optional callback function to call once context item is selected */ - export interface Options { + interface Options { label?: string; disabled?: boolean; - callback?: (event: H.util.Event) => void; + callback?(event: H.util.Event): void; } } /** * Object which can be safely disposed. */ - export class Disposable { + class Disposable { /** * Constructor */ @@ -5957,7 +6230,7 @@ declare namespace H { * @param callback {Function} * @param opt_scope {Object=} */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; } /** @@ -5967,7 +6240,7 @@ declare namespace H { * @property type {string} - Name of the dispatched event * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event */ - export class Event { + class Event { /** * Constructor * @param type {string} - Event Type. @@ -5994,14 +6267,15 @@ declare namespace H { /** * EventTarget enabled listening and dispatching events on all instances and derived classes. */ - export class EventTarget { + class EventTarget { /** * Constructor */ constructor(); /** - * This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. Otherwise memory leak is possible. + * This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. + * Otherwise memory leak is possible. * @param type {string} - name of event * @param handler {Function} - event handler function * @param opt_capture {boolean=} - if set to true will listen in the capture phase (bubble otherwise) @@ -6038,9 +6312,10 @@ declare namespace H { } /** - * An interface definition for the generic cache. Any data elements can be stored in the cache. They are always associated with an identifier to retrieve them at a later stage and their content size. + * An interface definition for the generic cache. Any data elements can be stored in the cache. They are always associated with an identifier to retrieve them at a later stage and their + * content size. */ - export interface ICache { + interface ICache { /** * This method adds an element to the cache. * @param id {*} - The identifier of this data element, the value is converted to a string. @@ -6065,16 +6340,19 @@ declare namespace H { drop(id: any): void; /** - * This method will execute the provided callback function on each of the cache's entries. If the optional match predicate is passed to this method the callback will only be executed on those entries for which the predicated returns true. + * This method will execute the provided callback function on each of the cache's entries. If the optional match predicate is passed to this method the callback will only be executed on + * those entries for which the predicated returns true. * @param callback {function(string, ?, number)} - the callback to be invoked for each entry * @param opt_ctx {Object=} - an optional context object to be used as this within the callback * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional match predicate to customize on which entries the callback will be called */ - forEach(callback: (s: string, t: any, n: number) => void, opt_ctx?: Object, opt_matcher?: ((s: string, t: any, n: number) => boolean)): void; + forEach(callback: (s: string, t: any, n: number) => void, opt_ctx?: {}, opt_matcher?: ((s: string, t: any, n: number) => boolean)): void; /** - * This method removes all data elements from the cache. If the optional match predicate is passed to this method only those data elements will be removed for which the predicate return true. - * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional function that receives an entries id, data and size and may return true or false to either remove it or leave the entry in the cache respectively + * This method removes all data elements from the cache. If the optional match predicate is passed to this method only those data elements will be removed for which the predicate + * return true. + * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional function that receives an entries id, data and size and may return true or false to either remove it or + * leave the entry in the cache respectively */ removeAll(opt_matcher?: ((s: string, t: any, n: number) => boolean)): void; @@ -6088,14 +6366,14 @@ declare namespace H { /** * An interface to cancelable requests and actions. */ - export interface ICancelable { + interface ICancelable { /** * This method is used to cancel current action */ cancel(): void; } - export interface ICapturable { + interface ICapturable { /** * This method is used to capture the element view * @param canvas {HTMLCanvasElement} - HTML Canvas element to draw the view of the capturable element @@ -6123,12 +6401,12 @@ declare namespace H { * @event set {H.util.OList.Event} - Fired when an entry was set in the list. * @event move {H.util.OList.Event} - Fired when an entry was moved within the list. */ - export class OList extends H.util.EventTarget { - + class OList extends H.util.EventTarget { /** * This method inserts an entry to the list. Optionally it can place new entry at provided index. * @param entry {?} - The entry to insert - * @param opt_idx {number=} - The index where the new entry should be inserted; if omitted or greater then the current size of the list, the entry is added at the end of the list; a negative index is treated as being relative from the end of the list + * @param opt_idx {number=} - The index where the new entry should be inserted; if omitted or greater then the current size of the list, the entry is added at the end of the list; + * a negative index is treated as being relative from the end of the list */ add(entry: any, opt_idx?: number): void; @@ -6178,7 +6456,7 @@ declare namespace H { * This method returns all list's entries as an array. * @returns {Array<*>} - The list as an array */ - asArray(): Array; + asArray(): any[]; /** * This method removes all entries from the list. @@ -6201,10 +6479,10 @@ declare namespace H { * @param callback {Function} - The callback function. * @param opt_scope {Object=} - An optional scope to call the callback in. */ - addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; } - export module OList { + namespace OList { /** * The event class for events that are dispatched by OList * @property target {*} - Object which triggered the event @@ -6212,7 +6490,7 @@ declare namespace H { * @property type {string} - Name of the dispatched event * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event */ - export class Event extends H.util.Event { + class Event extends H.util.Event { /** * Constructor * @param list {H.util.OList} - The OList instance which is emitting the event @@ -6244,7 +6522,7 @@ declare namespace H { /** * A generic class to represent a handle for any kind of asynchronous processed requests */ - export class Request { + class Request { /** * Constructor * @param opt_onprogress {function(H.util.Request)=} - A callback to invoke every time when the request's progress state changes @@ -6277,11 +6555,11 @@ declare namespace H { getFailed(): number; } - export module Request { + namespace Request { /** * The supported states of an request */ - export enum State { + enum State { PENDING, PROCESSING, COMPLETE, @@ -6290,11 +6568,11 @@ declare namespace H { } } - export module animation { + namespace animation { /** * This mamespace contains easing functions used for Animation class. */ - export class ease { + class ease { /** * This function defines linear ease. * @param val {number} - A value in range [0..1] to translate @@ -6332,13 +6610,13 @@ declare namespace H { } } - export module kinetics { + namespace kinetics { /** * This interface defines kinetic move parameters used by map for kinetic drag. * @property power {number} - Power multiplier. Multiplier is used to increase the speed of the kinetic move. By default map uses 1. * @property duration {number} - Defines duration of the kinetic move. */ - export interface IKinetics { + interface IKinetics { /** * Easing function modifies animation progress. In example it can modify the animation in a way it starts rapidly and then slows down at the end. * @param p {number} - current progress diff --git a/types/heremaps/tslint.json b/types/heremaps/tslint.json new file mode 100644 index 0000000000..4ac54521fe --- /dev/null +++ b/types/heremaps/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false] + } +} \ No newline at end of file diff --git a/types/highcharts-ng/index.d.ts b/types/highcharts-ng/index.d.ts index 639d21d88e..7c5386a890 100644 --- a/types/highcharts-ng/index.d.ts +++ b/types/highcharts-ng/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/pablojim/highcharts-ng // Definitions by: Scott Hatcher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import { ChartObject, IndividualSeriesOptions, Options } from "highcharts"; diff --git a/types/highcharts/highstock.d.ts b/types/highcharts/highstock.d.ts index 4541e5d715..3ec90ec6a1 100644 --- a/types/highcharts/highstock.d.ts +++ b/types/highcharts/highstock.d.ts @@ -81,10 +81,16 @@ declare namespace Highstock { trackBorderWidth?: number; } + interface AxisOptions extends Highcharts.AxisOptions { + scrollbar?: ScrollbarOptions; + } + interface Options extends Highcharts.Options { navigator?: NavigatorOptions; rangeSelector?: RangeSelectorOptions; scrollbar?: ScrollbarOptions; + xAxis?: AxisOptions[] | AxisOptions; + yAxis?: AxisOptions[] | AxisOptions; } interface Chart { diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index 8cc623b680..2bdc1b648d 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.highcharts.com/ // Definitions by: Damiano Gambarotto , Dan Lewi Harkestad , Albert Ozimek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare namespace Highcharts { interface Position { @@ -5012,7 +5013,7 @@ declare namespace Highcharts { * color: '#FF00FF' * }] */ - data?: number[] | Array<[number, number]> | Array<[string, number]> | DataPoint[]; + data?: Array; /** * An id for the series. This can be used after render time to get a pointer to the series object through * chart.get(). diff --git a/types/highcharts/test/highstock.ts b/types/highcharts/test/highstock.ts index 7fde17d3ce..2021e65b68 100644 --- a/types/highcharts/test/highstock.ts +++ b/types/highcharts/test/highstock.ts @@ -9,6 +9,10 @@ $(() => { type: "arearange" }, + xAxis: { + scrollbar: { enabled: true } + }, + navigator: { height: 80, maskFill: 'rgba(255, 198, 220, 0.75)', diff --git a/types/highcharts/tslint.json b/types/highcharts/tslint.json index a0b35dc4d9..d8b67d5d1f 100644 --- a/types/highcharts/tslint.json +++ b/types/highcharts/tslint.json @@ -4,6 +4,7 @@ "ban-types": false, "unified-signatures": false, "no-empty-interface": false, - "dt-header": false + "dt-header": false, + "no-object-literal-type-assertion": false } } diff --git a/types/highland/highland-tests.ts b/types/highland/highland-tests.ts index 7c813e1c1e..9df2443a31 100644 --- a/types/highland/highland-tests.ts +++ b/types/highland/highland-tests.ts @@ -134,7 +134,10 @@ fooStream = _((push, next) => { fooStream = _(fooStream); fooStream = _(readable); -fooStream = _(emitter); +fooStream = _(str, emitter); +fooStream = _(str, emitter, num); +fooStream = _(str, emitter, strArr); +fooStream = _(str, emitter, f); fooStream = _(fooStreamThen); fooStream = _(fooThen); @@ -142,100 +145,32 @@ fooStream = _(fooThen); fooArrStream = _(fooArrThen); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -obj = _.nil; - +// STREAM OBJECTS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -f = _.curry(fn, foo); -f = _.curry(fn, foo, bar); - -f = _.ncurry(num, fn, foo); -f = _.ncurry(num, fn, foo, bar); - -f = _.partial(f, foo); -f = _.partial(f, foo, bar); - -f = _.flip(fn, foo); -f = _.flip(fn, foo, bar); - -f = _.compose(f); -f = _.compose(f, f); - -f = _.seq(f); -f = _.seq(f, f); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool = _.isStream(x); -bool = _.isStream(fooStream); - -bool = _.isStreamError(x); -bool = _.isStreamError(fooStream); - -bool = _.isStreamRedirect(x); -bool = _.isStreamRedirect(fooStream); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -anyStream = _.values(obj); -fooStream = _.values(fooArr); - -strStream = _.keys(obj); - -anyArrStream = _.pairs(obj); -anyArrStream = _.pairs(fooArr); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -obj = _.extend(obj, obj); - -objCurObj = _.extend(obj); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -x = _.get(str, obj); - -objCurObj = _.get(str); - -obj = _.set(str, foo, obj); - -objCurAny = _.set(str, foo); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -_.log(str); -_.log(str, num, foo); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -f = _.wrapCallback(func); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -num = _.add(num, num); - -numCurNum = _.add(num); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// instance methods - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -fooStream.pause(); -fooStream.resume(); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -fooStream.end(); - -fooStream = fooStream.pipe(fooStream); -barStream = fooStream.pipe(barStream); - fooStream.destroy(); +fooStream.end(); + +fooStream.pause(); + +fooStream.resume(); + +bool = fooStream.write(foo); + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// TRANSFORMS +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +fooStream = fooStream.append(foo); + +fooArrStream = fooStream.batch(2); + +fooArrStream = fooStream.batchWithTimeOrCount(10, 2); + +fooArrStream = fooStream.collect(); + +fooStream = fooStream.compact(); barStream = fooStream.consume((err: Error, x: Foo, push: (err: Error, value?: Bar) => void, next: () => void) => { push(err); @@ -249,27 +184,11 @@ barStream = fooStream.consume((err, x, push, next) => { next(); }); -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +fooStream = fooStream.debounce(num); -fooStream.pull((err: Error, x: Foo) => { +fooStream = fooStream.doto((x: Foo) => {}); -}); - -fooStream.pull((err, x) => { - -}); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool = fooStream.write(foo); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -fooStream = fooStream.fork(); - -fooStream = fooStream.observe(); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +fooStream = fooStream.drop(2); fooStream = fooStream.errors((err: Error, push: (e: Error, x?: Foo) => void) => { push(err); @@ -283,26 +202,76 @@ fooStream = fooStream.errors((err, push) => { push(null, foo); }); +fooStream = fooStream.filter((x: Foo) => { + return bool; +}); + +fooStream = fooStream.find((x: Foo) => { + return bool; +}); + +fooStream = fooStream.findWhere(obj); + +strFooArrMapStream = fooStream.group((x: Foo) => { + return str; +}); +strFooArrMapStream = fooStream.group(str); + +fooStream = fooStream.head(); + +barStream = fooStream.invoke(str, anyArr); + +fooStream = fooStream.last(); + +fooStream = fooStream.latest(); + +barStream = fooStream.map((x: Foo) => { + return bar; +}); + +barStream = fooStream.pluck(str); + +barStream = fooStream.reduce(bar, (memo: Bar, x: Foo) => { + return memo; +}); + +barStream = fooStream.reduce1(bar, (memo: Bar, x: Foo) => { + return memo; +}); + +fooStream = fooStream.reject((x: Foo) => { + return bool; +}); + +barStream = fooStream.scan(bar, (memo: Bar, x: Foo) => { + return memo; +}); + +//missing scan1 + fooStream = fooStream.stopOnError((e: Error) => { }); -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +fooStream = fooStream.take(num); -fooStream.each((x: Foo) => { +fooStream.tap((x: Foo) => {}); -}); +fooStream = fooStream.throttle(num); -fooStream.apply(func); +fooStream = fooStream.where(obj); -fooStream.toArray((arr: Foo[]) => { - -}); +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// HIGHER-ORDER STREAMS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -barStream = fooStream.map((x: Foo) => { - return bar; +fooStream = fooStream.concat(fooStream); + +fooStream = fooStream.concat(fooArr); + +fooStream = fooStream.flatFilter((x: Foo) => { + return boolStream; }); barStream = fooStream.flatMap((x: Foo) => { @@ -313,95 +282,127 @@ barStream = fooStream.flatMap((x: Foo) => { return bar; }); -barStream = fooStream.pluck(str); +barStream = fooStream.flatten(); -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +fooStream = fooStream.fork(); -fooStream = fooStream.filter((x: Foo) => { - return bool; -}); +fooStream = fooStream.merge(fooStreamStream); -fooStream = fooStream.flatFilter((x: Foo) => { - return boolStream; -}); +fooStream = fooStream.observe(); -fooStream = fooStream.reject((x: Foo) => { - return bool; -}); +fooStream = fooStream.otherwise(fooStream); -fooStream = fooStream.find((x: Foo) => { - return bool; -}); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -strFooArrMapStream = fooStream.group((x: Foo) => { - return str; -}); -strFooArrMapStream = fooStream.group(str); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -fooStream = fooStream.compact(); - -fooStream = fooStream.where(obj); - -fooStream = fooStream.zip(fooStream); -fooStream = fooStream.zip([foo, foo]); - -fooStream = fooStream.head(); -fooStream = fooStream.take(num); - -fooStream = fooStream.last(); +fooStream = fooStream.parallel(num); barStream = fooStream.sequence(); barStream = fooStream.series(); -barStream = fooStream.flatten(); - -fooStream = fooStream.parallel(num); - -fooStream = fooStream.otherwise(fooStream); - -fooStream = fooStream.append(foo); +fooStream = fooStream.zip(fooStream); +fooStream = fooStream.zip([foo, foo]); +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// CONSUMPTION // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -barStream = fooStream.reduce(bar, (memo: Bar, x: Foo) => { - return memo; +fooStream.apply(func); + +fooStream.done(() => {}); + +fooStream.each((x: Foo) => { + }); -barStream = fooStream.reduce1(bar, (memo: Bar, x: Foo) => { - return memo; +fooStream = fooStream.pipe(fooStream); +barStream = fooStream.pipe(barStream); + +fooStream.pull((err: Error, x: Foo) => { + }); -fooArrStream = fooStream.collect(); +fooStream.pull((err, x) => { -barStream = fooStream.scan(bar, (memo: Bar, x: Foo) => { - return memo; }); -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +fooStream.toArray((arr: Foo[]) => { -fooStream = fooStream.concat(fooStream); +}); -fooStream = fooStream.concat(fooArr); +fooStream.toCallback((err: Error, x: Foo) => {}); +fooStream.toCallback((err: Error) => {}); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -fooStream = fooStream.merge(fooStreamStream); - +// UTILS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -barStream = fooStream.invoke(str, anyArr); +bool = _.isStream(x); +bool = _.isStream(fooStream); -fooStream = fooStream.throttle(num); +bool = _.isStreamError(x); +bool = _.isStreamError(fooStream); + +bool = _.isStreamRedirect(x); +bool = _.isStreamRedirect(fooStream); + +_.log(str); +_.log(str, num, foo); + +obj = _.nil; + +f = _.wrapCallback(func); +f = _.wrapCallback(func, num); +f = _.wrapCallback(func, strArr); +f = _.wrapCallback(func, fn); -fooStream = fooStream.debounce(num); +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// OBJECTS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -fooStream = fooStream.latest(); +obj = _.extend(obj, obj); +objCurObj = _.extend(obj); + +x = _.get(str, obj); +objCurObj = _.get(str); + +strStream = _.keys(obj); + +anyArrStream = _.pairs(obj); +anyArrStream = _.pairs(fooArr); + +obj = _.set(str, foo, obj); +objCurAny = _.set(str, foo); + +anyStream = _.values(obj); +fooStream = _.values(fooArr); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// FUNCTIONS +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +f = _.compose(f); +f = _.compose(f, f); + +f = _.curry(fn, foo); +f = _.curry(fn, foo, bar); + +f = _.flip(fn, foo); +f = _.flip(fn, foo, bar); + +f = _.ncurry(num, fn, foo); +f = _.ncurry(num, fn, foo, bar); + +f = _.partial(f, foo); +f = _.partial(f, foo, bar); + +f = _.seq(f); +f = _.seq(f, f); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// OPERATORS +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +num = _.add(num, num); + +numCurNum = _.add(num); + +//missing not \ No newline at end of file diff --git a/types/highland/index.d.ts b/types/highland/index.d.ts index b10f8e00bf..6a3532baca 100644 --- a/types/highland/index.d.ts +++ b/types/highland/index.d.ts @@ -1,6 +1,8 @@ -// Type definitions for Highland 1.14.0 +// Type definitions for Highland 2.10.5 // Project: http://highlandjs.org/ // Definitions by: Bart van der Schoor +// Hugo Wood +// William Yu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -48,6 +50,17 @@ interface HighlandStatic { * event emitter as the two arguments to the constructor and the first * argument emitted to the event handler will be written to the new Stream. * + * You can pass a mapping hint as the third argument, which specifies how + * event arguments are pushed into the stream. If no mapping hint is + * provided, only the first value emitted with the event to the will be + * pushed onto the Stream. + * + * If mappingHint is a number, an array of that length will be pushed onto + * the stream, containing exactly that many parameters from the event. If + * it's an array, it's used as keys to map the arguments into an object which + * is pushed to the tream. If it is a function, it's called with the event + * arguments, and the returned value is pushed. + * * **Promise -** Accepts an ES6 / jQuery style promise and returns a * Highland Stream which will emit a single value (or an error). * @@ -63,12 +76,43 @@ interface HighlandStatic { (xs: Highland.Stream): Highland.Stream; (xs: NodeJS.ReadableStream): Highland.Stream; - (xs: NodeJS.EventEmitter): Highland.Stream; + (eventName: string, xs: NodeJS.EventEmitter, mappingHint?: Highland.MappingHint): Highland.Stream; // moar (promise for everything?) (xs: Highland.Thenable>): Highland.Stream; (xs: Highland.Thenable): Highland.Stream; + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // UTILS + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /** + * Returns true if `x` is a Highland Stream. + * + * @id isStream + * @section Streams + * @name _.isStream(x) + * @param x - the object to test + * @api public + */ + isStream(x: any): boolean; + + isStreamError(x: any): boolean; + + isStreamRedirect(x: any): boolean; + + /** + * Logs values to the console, a simple wrapper around `console.log` that + * it suitable for passing to other functions by reference without having to + * call `bind`. + * + * @id log + * @section Utils + * @name _.log(args..) + * @api public + */ + log(x: any, ...args: any[]): void; + /** * The end of stream marker. This is sent along the data channel of a Stream * to tell consumers that the Stream has ended. See the following map code for @@ -81,7 +125,139 @@ interface HighlandStatic { */ nil: Highland.Nil; - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /** + * Wraps a node-style async function which accepts a callback, transforming + * it to a function which accepts the same arguments minus the callback and + * returns a Highland Stream instead. The wrapped function keeps its context, + * so you can safely use it as a method without binding (see the second + * example below). + * + * wrapCallback also accepts an optional mappingHint, which specifies how + * callback arguments are pushed to the stream. This can be used to handle + * non-standard callback protocols that pass back more than one value. + * + * mappingHint can be a function, number, or array. See the documentation on + * EventEmitter Stream Objects for details on the mapping hint. If + * mappingHint is a function, it will be called with all but the first + * argument that is passed to the callback. The first is still assumed to be + * the error argument. + * + * @id wrapCallback + * @section Utils + * @name _.wrapCallback(f) + * @param {Function} f - the node-style function to wrap + * @param {Array | Function | Number} [mappingHint] - how to pass the arguments to the callback + * @api public + */ + wrapCallback(f: Function, mappingHint?: Highland.MappingHint): (...args: any[]) => Highland.Stream; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // OBJECTS + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /** + * Extends one object with the properties of another. **Note:** The + * arguments are in the reverse order of other libraries such as + * underscore. This is so it follows the convention of other functions in + * this library and so you can more meaningfully partially apply it. + * + * @id extend + * @section Objects + * @name _.extend(a, b) + * @param {Object} a - the properties to extend b with + * @param {Object} b - the original object to extend + * @api public + */ + extend(extensions: Object, target: Object): Object; + + extend(target: Object): (extensions: Object) => Object; + + /** + * Returns a property from an object. + * + * @id get + * @section Objects + * @name _.get(prop, obj) + * @param {String} prop - the property to return + * @param {Object} obj - the object to read properties from + * @api public + */ + get(prop: string, obj: Object): string; + + get(prop: string): (obj: Object) => Object; + + /** + * Returns keys from an Object as a Stream. + * + * @id keys + * @section Objects + * @name _.keys(obj) + * @param {Object} obj - the object to return keys from + * @api public + */ + keys(obj: Object): Highland.Stream; + + /** + * Returns key/value pairs for an Object as a Stream. Reads properties + * lazily, so if you don't read from all keys on an object, not + * all properties will be read from (may have an effect where getters + * are used). + * + * @id pairs + * @section Objects + * @name _.pairs(obj) + * @param {Object} obj - the object to return key/value pairs from + * @api public + */ + pairs(obj: Object): Highland.Stream; + + pairs(obj: any[]): Highland.Stream; + + /** + * Updates a property on an object, returning the updated object. + * + * @id set + * @section Objects + * @name _.set(prop, value, obj) + * @param {String} prop - the property to return + * @param value - the value to set the property to + * @param {Object} obj - the object to set properties on + * @api public + */ + set(prop: string, val: any, obj: Object): Object; + + set(prop: string, val: any): (obj: Object) => Object; + + /** + * Returns values from an Object as a Stream. Reads properties + * lazily, so if you don't read from all keys on an object, not + * all properties will be read from (may have an effect where getters + * are used). + * + * @id values + * @section Objects + * @name _.values(obj) + * @param {Object} obj - the object to return values from + * @api public + */ + values(obj: Object): Highland.Stream; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // FUNCTIONS + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /** + * Creates a composite function, which is the application of function1 to + * the results of function2. You can pass an arbitrary number of arguments + * and have them composed. This means you can't partially apply the compose + * function itself. + * + * @id compose + * @name compose(fn1, fn2, ...) + * @section Functions + * @api public + */ + compose(...functions: Function[]): Function; /** * Transforms a function with specific arity (all arguments must be @@ -100,6 +276,20 @@ interface HighlandStatic { */ curry(fn: Function, ...args: any[]): Function; + /** + * Evaluates the function `fn` with the argument positions swapped. Only + * works with functions that accept two arguments. + * + * @id flip + * @name flip(fn, [x, y]) + * @section Functions + * @param {Function} f - function to flip argument application for + * @param x - parameter to apply to the right hand side of f + * @param y - parameter to apply to the left hand side of f + * @api public + */ + flip(fn: Function, ...args: any[]): Function; + /** * Same as `curry` but with a specific number of arguments. This can be * useful when functions do not explicitly define all its parameters. @@ -131,33 +321,6 @@ interface HighlandStatic { */ partial(f: Function, ...args: any[]): Function; - /** - * Evaluates the function `fn` with the argument positions swapped. Only - * works with functions that accept two arguments. - * - * @id flip - * @name flip(fn, [x, y]) - * @section Functions - * @param {Function} f - function to flip argument application for - * @param x - parameter to apply to the right hand side of f - * @param y - parameter to apply to the left hand side of f - * @api public - */ - flip(fn: Function, ...args: any[]): Function; - - /** - * Creates a composite function, which is the application of function1 to - * the results of function2. You can pass an arbitrary number of arguments - * and have them composed. This means you can't partially apply the compose - * function itself. - * - * @id compose - * @name compose(fn1, fn2, ...) - * @section Functions - * @api public - */ - compose(...functions: Function[]): Function; - /** * The reversed version of compose. Where arguments are in the order of * application. @@ -169,148 +332,10 @@ interface HighlandStatic { */ seq(...functions: Function[]): Function; - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Returns true if `x` is a Highland Stream. - * - * @id isStream - * @section Streams - * @name _.isStream(x) - * @param x - the object to test - * @api public - */ - isStream(x: any): boolean; - - isStreamError(x: any): boolean; - - isStreamRedirect(x: any): boolean; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Returns values from an Object as a Stream. Reads properties - * lazily, so if you don't read from all keys on an object, not - * all properties will be read from (may have an effect where getters - * are used). - * - * @id values - * @section Objects - * @name _.values(obj) - * @param {Object} obj - the object to return values from - * @api public - */ - values(obj: Object): Highland.Stream; - - /** - * Returns keys from an Object as a Stream. - * - * @id keys - * @section Objects - * @name _.keys(obj) - * @param {Object} obj - the object to return keys from - * @api public - */ - keys(obj: Object): Highland.Stream; - - /** - * Returns key/value pairs for an Object as a Stream. Reads properties - * lazily, so if you don't read from all keys on an object, not - * all properties will be read from (may have an effect where getters - * are used). - * - * @id pairs - * @section Objects - * @name _.pairs(obj) - * @param {Object} obj - the object to return key/value pairs from - * @api public - */ - pairs(obj: Object): Highland.Stream; - - pairs(obj: any[]): Highland.Stream; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Extends one object with the properties of another. **Note:** The - * arguments are in the reverse order of other libraries such as - * underscore. This is so it follows the convention of other functions in - * this library and so you can more meaningfully partially apply it. - * - * @id extend - * @section Objects - * @name _.extend(a, b) - * @param {Object} a - the properties to extend b with - * @param {Object} b - the original object to extend - * @api public - */ - extend(extensions: Object, target: Object): Object; - - extend(target: Object): (extensions: Object) => Object; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Returns a property from an object. - * - * @id get - * @section Objects - * @name _.get(prop, obj) - * @param {String} prop - the property to return - * @param {Object} obj - the object to read properties from - * @api public - */ - get(prop: string, obj: Object): string; - - get(prop: string): (obj: Object) => Object; - - /** - * Updates a property on an object, returning the updated object. - * - * @id set - * @section Objects - * @name _.set(prop, value, obj) - * @param {String} prop - the property to return - * @param value - the value to set the property to - * @param {Object} obj - the object to set properties on - * @api public - */ - set(prop: string, val: any, obj: Object): Object; - - set(prop: string, val: any): (obj: Object) => Object; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Logs values to the console, a simple wrapper around `console.log` that - * it suitable for passing to other functions by reference without having to - * call `bind`. - * - * @id log - * @section Utils - * @name _.log(args..) - * @api public - */ - log(x: any, ...args: any[]): void; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Wraps a node-style async function which accepts a callback, transforming - * it to a function which accepts the same arguments minus the callback and - * returns a Highland Stream instead. Only the first argument to the - * callback (or an error) will be pushed onto the Stream. - * - * @id wrapCallback - * @section Utils - * @name _.wrapCallback(f) - * @param {Function} f - the node-style function to wrap - * @api public - */ - wrapCallback(f: Function): Function; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // OPERATORS + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /** * Add two values. Can be partially applied. * @@ -322,6 +347,19 @@ interface HighlandStatic { add(a: number, b: number): number; add(a: number): (b: number) => number; + /** + * Perform logical negation on a value. If `x` is truthy then returns false, + * otherwise returns true. + * + * @id not + * @section Operators + * @name _.not(x) + * @param x - the value to negate + * @api public + * + * _.not(true) // => false + * _.not(false) // => true + */ not(a: any): boolean; } @@ -367,6 +405,37 @@ declare namespace Highland { */ interface Stream extends NodeJS.EventEmitter { + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // STREAM OBJECTS + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /** + * Destroys a stream by unlinking it from any consumers and sources. This will + * stop all consumers from receiving events from this stream and removes this + * stream as a consumer of any source stream. + * + * This function calls end() on the stream and unlinks it from any piped-to streams. + * + * @id pipe + * @section Streams + * @name Stream.destroy() + * @api public + */ + destroy(): void; + + /** + * Ends a Stream. This is the same as sending a [nil](#nil) value as data. + * You shouldn't need to call this directly, rather it will be called by + * any [Node Readable Streams](http://nodejs.org/api/stream.html#stream_class_stream_readable) + * you pipe in. + * + * @id end + * @section Streams + * @name Stream.end() + * @api public + */ + end(): void; + /** * Pauses the stream. All Highland Streams start in the paused state. * @@ -388,90 +457,6 @@ declare namespace Highland { */ resume(): void; - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Ends a Stream. This is the same as sending a [nil](#nil) value as data. - * You shouldn't need to call this directly, rather it will be called by - * any [Node Readable Streams](http://nodejs.org/api/stream.html#stream_class_stream_readable) - * you pipe in. - * - * @id end - * @section Streams - * @name Stream.end() - * @api public - */ - end(): void; - - /** - * Pipes a Highland Stream to a [Node Writable Stream](http://nodejs.org/api/stream.html#stream_class_stream_writable) - * (Highland Streams are also Node Writable Streams). This will pull all the - * data from the source Highland Stream and write it to the destination, - * automatically managing flow so that the destination is not overwhelmed - * by a fast source. - * - * This function returns the destination so you can chain together pipe calls. - * - * @id pipe - * @section Streams - * @name Stream.pipe(dest) - * @param {Writable Stream} dest - the destination to write all data to - * @api public - */ - pipe(dest: Stream): Stream; - pipe(dest: NodeJS.ReadWriteStream): Stream; - pipe(dest: NodeJS.WritableStream): void; - - /** - * Destroys a stream by unlinking it from any consumers and sources. This will - * stop all consumers from receiving events from this stream and removes this - * stream as a consumer of any source stream. - * - * This function calls end() on the stream and unlinks it from any piped-to streams. - * - * @id pipe - * @section Streams - * @name Stream.destroy() - * @api public - */ - destroy(): void; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Consumes values from a Stream (once resumed) and returns a new Stream for - * you to optionally push values onto using the provided push / next functions. - * - * This function forms the basis of many higher-level Stream operations. - * It will not cause a paused stream to immediately resume, but behaves more - * like a 'through' stream, handling values as they are read. - * - * @id consume - * @section Streams - * @name Stream.consume(f) - * @param {Function} f - the function to handle errors and values - * @api public - */ - consume(f: (err: Error, x: R, push: (err: Error, value?: U) => void, next: () => void) => void): Stream; - - /** - * Consumes a single item from the Stream. Unlike consume, this function will - * not provide a new stream for you to push values onto, and it will unsubscribe - * as soon as it has a single error, value or nil from the source. - * - * You probably won't need to use this directly, but it is used internally by - * some functions in the Highland library. - * - * @id pull - * @section Streams - * @name Stream.pull(f) - * @param {Function} f - the function to handle data - * @api public - */ - pull(f: (err: Error, x: R) => void): void; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** * Writes a value to the Stream. If the Stream is paused it will go into the * Stream's incoming buffer, otherwise it will be immediately processed and @@ -490,36 +475,145 @@ declare namespace Highland { write(x: R): boolean; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Forks a stream, allowing you to add additional consumers with shared - * back-pressure. A stream forked to multiple consumers will only pull values - * from it's source as fast as the slowest consumer can handle them. - * - * @id fork - * @section Streams - * @name Stream.fork() - * @api public - */ - fork(): Stream; - - /** - * Observes a stream, allowing you to handle values as they are emitted, without - * adding back-pressure or causing data to be pulled from the source. This can - * be useful when you are performing two related queries on a stream where one - * would block the other. Just be aware that a slow observer could fill up it's - * buffer and cause memory issues. Where possible, you should use [fork](#fork). - * - * @id observe - * @section Streams - * @name Stream.observe() - * @api public - */ - observe(): Stream; - + // TRANSFORMS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /** + * Adds a value to the end of a Stream. + * + * @id append + * @section Streams + * @name Stream.append(y) + * @param y - the value to append to the Stream + * @api public + */ + append(y: R): Stream; /** + * Takes one Stream and batches incoming data into arrays of given length + * + * @id batch + * @section Transforms + * @name Stream.batch(n) + * @param {Number} n - length of the array to batch + * @api public + * + * _([1, 2, 3, 4, 5]).batch(2) // => [1, 2], [3, 4], [5] + */ + batch(n: number): Stream; + + /** + * Takes one Stream and batches incoming data within a maximum time frame + * into arrays of a maximum length. + * + * @id batchWithTimeOrCount + * @section Transforms + * @name Stream.batchWithTimeOrCount(ms, n) + * @param {Number} ms - the maximum milliseconds to buffer a batch + * @param {Number} n - the maximum length of the array to batch + * @api public + * + * _(function (push) { + * push(1); + * push(2); + * push(3); + * setTimeout(push, 20, 4); + * }).batchWithTimeOrCount(10, 2) + * + * // => [1, 2], [3], [4] + */ + batchWithTimeOrCount(ms: number, n: number): Stream; + + /** + * Groups all values into an Array and passes down the stream as a single + * data event. This is a bit like doing [toArray](#toArray), but instead + * of accepting a callback and causing a *thunk*, it passes the value on. + * + * @id collect + * @section Streams + * @name Stream.collect() + * @api public + */ + collect(): Stream; + + /** + * Filters a Stream to drop all non-truthy values. + * + * @id compact + * @section Streams + * @name Stream.compact() + * @api public + */ + compact(): Stream; + + /** + * Consumes values from a Stream (once resumed) and returns a new Stream for + * you to optionally push values onto using the provided push / next functions. + * + * This function forms the basis of many higher-level Stream operations. + * It will not cause a paused stream to immediately resume, but behaves more + * like a 'through' stream, handling values as they are read. + * + * @id consume + * @section Streams + * @name Stream.consume(f) + * @param {Function} f - the function to handle errors and values + * @api public + */ + consume(f: (err: Error, x: R, push: (err: Error, value?: U) => void, next: () => void) => void): Stream; + + /** + * Holds off pushing data events downstream until there has been no more + * data for `ms` milliseconds. Sends the last value that occurred before + * the delay, discarding all other values. + * + * @id debounce + * @section Streams + * @name Stream.debounce(ms) + * @param {Number} ms - the milliseconds to wait before sending data + * @api public + */ + debounce(ms: number): Stream; + + /** + * Creates a new Stream which applies a function to each value from the source + * and re-emits the source value. Useful when you want to mutate the value or + * perform side effects + * + * @id doto + * @section Transforms + * @name Stream.doto(f) + * @param {Function} f - the function to apply + * @api public + * + * var appended = _([[1], [2], [3], [4]]).doto(function (x) { + * x.push(1); + * }); + * + * _([1, 2, 3]).doto(console.log) + * // 1 + * // 2 + * // 3 + * // => 1, 2, 3 + */ + doto(f: (x: R) => void): Stream; + + /** + * Acts as the inverse of [`take(n)`](#take) - instead of returning the first `n` values, it ignores the + * first `n` values and then emits the rest. `n` must be of type `Number`, if not the whole stream will + * be returned. All errors (even ones emitted before the nth value) will be emitted. + * + * @id drop + * @section Transforms + * @name Stream.drop(n) + * @param {Number} n - integer representing number of values to read from source + * @api public + * + * _([1, 2, 3, 4]).drop(2) // => 3, 4 + */ + drop(n: number): Stream; + + /** * Extracts errors from a Stream and applies them to an error handler * function. Returns a new Stream with the errors removed (unless the error * handler chooses to rethrow them using `push`). Errors can also be @@ -534,62 +628,116 @@ declare namespace Highland { errors(f: (err: Error, push: (err: Error, x?: R) => void) => void): Stream; /** - * Like the [errors](#errors) method, but emits a Stream end marker after - * an Error is encountered. + * Creates a new Stream including only the values which pass a truth test. * - * @id stopOnError + * @id filter * @section Streams - * @name Stream.stopOnError(f) - * @param {Function} f - the function to handle an error + * @name Stream.filter(f) + * @param f - the truth test function * @api public */ - stopOnError(f: (err: Error) => void): Stream; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + filter(f: (x: R) => boolean): Stream; /** - * Iterates over every value from the Stream, calling the iterator function - * on each of them. This function causes a **thunk**. + * A convenient form of filter, which returns the first object from a + * Stream that passes the provided truth test * - * If an error from the Stream reaches the `each` call, it will emit an - * error event (which will cause it to throw if unhandled). - * - * @id each + * @id find * @section Streams - * @name Stream.each(f) - * @param {Function} f - the iterator function + * @name Stream.find(f) + * @param {Function} f - the truth test function which returns a Stream * @api public */ - each(f: (x: R) => void): void; + find(f: (x: R) => boolean): Stream; + + /** + * A convenient form of [where](#where), which returns the first object from a + * Stream that matches a set of property values. findWhere is to [where](#where) as [find](#find) is to [filter](#filter). + * + * @id findWhere + * @section Transforms + * @name Stream.findWhere(props) + * @param {Object} props - the properties to match against + * @api public + * + * var docs = [ + * {type: 'blogpost', title: 'foo'}, + * {type: 'blogpost', title: 'bar'}, + * {type: 'comment', title: 'foo'} + * ]; + * + * _(docs).findWhere({type: 'blogpost'}) + * // => {type: 'blogpost', title: 'foo'} + * + * // example with partial application + * var firstBlogpost = _.findWhere({type: 'blogpost'}); + * + * firstBlogpost(docs) + * // => {type: 'blogpost', title: 'foo'} + */ + findWhere(props: Object): Stream; /** - * Applies results from a Stream as arguments to a function + * A convenient form of reduce, which groups items based on a function or property name * - * @id apply + * @id group * @section Streams - * @name Stream.apply(f) - * @param {Function} f - the function to apply arguments to + * @name Stream.group(f) + * @param {Function|String} f - the function or property name on which to group, + * toString() is called on the result of a function. * @api public */ - // TODO what to do here? - apply(f: Function): void; + // TODO verify this + group(f: (x: R) => string): Stream<{[prop:string]:R[]}>; + group(prop: string): Stream<{[prop:string]:R[]}>; /** - * Collects all values from a Stream into an Array and calls a function with - * once with the result. This function causes a **thunk**. + * Creates a new Stream with only the first value from the source. * - * If an error from the Stream reaches the `toArray` call, it will emit an - * error event (which will cause it to throw if unhandled). - * - * @id toArray + * @id head * @section Streams - * @name Stream.toArray(f) - * @param {Function} f - the callback to provide the completed Array to + * @name Stream.head() + * @api public + * + * _([1, 2, 3, 4]).head() // => 1 + */ + head(): Stream; + + /** + * Calls a named method on each object from the Stream - returning + * a new stream with the result of those calls. + * + * @id invoke + * @section Streams + * @name Stream.invoke(method, args) + * @param {String} method - the method name to call + * @param {Array} args - the arguments to call the method with * @api public */ - toArray(f: (arr: R[]) => void): void; + invoke(method: string, args: any[]): Stream; - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /** + * Drops all values from the Stream apart from the last one (if any). + * + * @id last + * @section Streams + * @name Stream.last() + * @api public + */ + last(): Stream; + + /** + * Creates a new Stream, which when read from, only returns the last + * seen value from the source. The source stream does not experience + * back-pressure. Useful if you're using a Stream to model a changing + * property which you need to query periodically. + * + * @id latest + * @section Streams + * @name Stream.latest() + * @api public + */ + latest(): Stream; /** * Creates a new Stream of transformed values by applying a function to each @@ -605,22 +753,6 @@ declare namespace Highland { */ map(f: (x: R) => U): Stream; - /** - * Creates a new Stream of values by applying each item in a Stream to an - * iterator function which may return a Stream. Each item on these result - * Streams are then emitted on a single output Stream. - * - * The same as calling `stream.map(f).flatten()`. - * - * @id flatMap - * @section Streams - * @name Stream.flatMap(f) - * @param {Function} f - the iterator function - * @api public - */ - flatMap(f: (x: R) => Stream): Stream; - flatMap(f: (x: R) => U): Stream; - /** * Retrieves values associated with a given property from all elements in * the collection. @@ -633,219 +765,6 @@ declare namespace Highland { */ pluck(prop: string): Stream; - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Creates a new Stream including only the values which pass a truth test. - * - * @id filter - * @section Streams - * @name Stream.filter(f) - * @param f - the truth test function - * @api public - */ - filter(f: (x: R) => boolean): Stream; - - /** - * Filters using a predicate which returns a Stream. If you need to check - * against an asynchronous data source when filtering a Stream, this can - * be convenient. The Stream returned from the filter function should have - * a Boolean as it's first value (all other values on the Stream will be - * disregarded). - * - * @id flatFilter - * @section Streams - * @name Stream.flatFilter(f) - * @param {Function} f - the truth test function which returns a Stream - * @api public - */ - flatFilter(f: (x: R) => Stream): Stream; - - /** - * The inverse of [filter](#filter). - * - * @id reject - * @section Streams - * @name Stream.reject(f) - * @param {Function} f - the truth test function - * @api public - * - * var odds = _([1, 2, 3, 4]).reject(function (x) { - * return x % 2 === 0; - * }); - */ - reject(f: (x: R) => boolean): Stream; - - /** - * A convenient form of filter, which returns the first object from a - * Stream that passes the provided truth test - * - * @id find - * @section Streams - * @name Stream.find(f) - * @param {Function} f - the truth test function which returns a Stream - * @api public - */ - find(f: (x: R) => boolean): Stream; - - /** - * A convenient form of reduce, which groups items based on a function or property name - * - * @id group - * @section Streams - * @name Stream.group(f) - * @param {Function|String} f - the function or property name on which to group, - * toString() is called on the result of a function. - * @api public - */ - // TODO verify this - group(f: (x: R) => string): Stream<{[prop:string]:R[]}>; - group(prop: string): Stream<{[prop:string]:R[]}>; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Filters a Stream to drop all non-truthy values. - * - * @id compact - * @section Streams - * @name Stream.compact() - * @api public - */ - compact(): Stream; - - /** - * A convenient form of filter, which returns all objects from a Stream - * match a set of property values. - * - * @id where - * @section Streams - * @name Stream.where(props) - * @param {Object} props - the properties to match against - * @api public - */ - where(props: Object): Stream; - - /** - * Takes two Streams and returns a Stream of corresponding pairs. - * - * @id zip - * @section Streams - * @name Stream.zip(ys) - * @param {Array | Stream} ys - the other stream to combine values with - * @api public - */ - zip(ys: R[]): Stream; - zip(ys: Stream): Stream; - - /** - * Creates a new Stream with the first `n` values from the source. - * - * @id take - * @section Streams - * @name Stream.take(n) - * @param {Number} n - integer representing number of values to read from source - * @api public - */ - take(n: number): Stream; - - /** - * Creates a new Stream with only the first value from the source. - * - * @id head - * @section Streams - * @name Stream.head() - * @api public - * - * _([1, 2, 3, 4]).head() // => 1 - */ - head(): Stream; - - /** - * Drops all values from the Stream apart from the last one (if any). - * - * @id last - * @section Streams - * @name Stream.last() - * @api public - */ - last(): Stream; - - /** - * Reads values from a Stream of Streams, emitting them on a Single output - * Stream. This can be thought of as a flatten, just one level deep. Often - * used for resolving asynchronous actions such as a HTTP request or reading - * a file. - * - * @id sequence - * @section Streams - * @name Stream.sequence() - * @api public - */ - //TODO figure out typing - sequence(): Stream; - - /** - * An alias for the [sequence](#sequence) method. - * - * @id series - * @section Streams - * @name Stream.series() - * @api public - */ - // TODO figure out typing - series(): Stream; - - /** - * Recursively reads values from a Stream which may contain nested Streams - * or Arrays. As values or errors are encountered, they are emitted on a - * single output Stream. - * - * @id flatten - * @section Streams - * @name Stream.flatten() - * @api public - */ - flatten(): Stream; - flatten(): Stream; - - /** - * Takes a Stream of Streams and reads from them in parallel, buffering - * the results until they can be returned to the consumer in their original - * order. - * - * @id parallel - * @section Streams - * @name Stream.parallel(n) - * @param {Number} n - the maximum number of concurrent reads/buffers - * @api public - */ - parallel(n: number): Stream; - - /** - * Switches source to an alternate Stream if the current Stream is empty. - * - * @id otherwise - * @section Streams - * @name Stream.otherwise(ys) - * @param {Stream} ys - alternate stream to use if this stream is empty - * @api public - */ - otherwise(ys: Stream): Stream; - - /** - * Adds a value to the end of a Stream. - * - * @id append - * @section Streams - * @name Stream.append(y) - * @param y - the value to append to the Stream - * @api public - */ - append(y: R): Stream; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** * Boils down a Stream to a single value. The memo is the initial state * of the reduction, and each successive step of it should be returned by @@ -875,16 +794,19 @@ declare namespace Highland { reduce1(memo: U, f: (memo: U, x: R) => U): Stream; /** - * Groups all values into an Array and passes down the stream as a single - * data event. This is a bit like doing [toArray](#toArray), but instead - * of accepting a callback and causing a *thunk*, it passes the value on. + * The inverse of [filter](#filter). * - * @id collect + * @id reject * @section Streams - * @name Stream.collect() + * @name Stream.reject(f) + * @param {Function} f - the truth test function * @api public + * + * var odds = _([1, 2, 3, 4]).reject(function (x) { + * return x % 2 === 0; + * }); */ - collect(): Stream; + reject(f: (x: R) => boolean): Stream; /** * Like [reduce](#reduce), but emits each intermediate value of the @@ -913,6 +835,68 @@ declare namespace Highland { */ scan1(memo: U, x: (memo: U, x: R) => U): Stream; + /** + * Like the [errors](#errors) method, but emits a Stream end marker after + * an Error is encountered. + * + * @id stopOnError + * @section Streams + * @name Stream.stopOnError(f) + * @param {Function} f - the function to handle an error + * @api public + */ + stopOnError(f: (err: Error) => void): Stream; + + /** + * Creates a new Stream with the first `n` values from the source. + * + * @id take + * @section Streams + * @name Stream.take(n) + * @param {Number} n - integer representing number of values to read from source + * @api public + */ + take(n: number): Stream; + + /** + * An alias for the [doto](#doto) method. + * + * @id tap + * @section Transforms + * @name Stream.tap(f) + * @param {Function} f - the function to apply + * @api public + * + * _([1, 2, 3]).tap(console.log) + */ + tap(f: (x: R) => void): Stream; + + /** + * Ensures that only one data event is push downstream (or into the buffer) + * every `ms` milliseconds, any other values are dropped. + * + * @id throttle + * @section Streams + * @name Stream.throttle(ms) + * @param {Number} ms - the minimum milliseconds between each value + * @api public + */ + throttle(ms: number): Stream; + + /** + * A convenient form of filter, which returns all objects from a Stream + * match a set of property values. + * + * @id where + * @section Streams + * @name Stream.where(props) + * @param {Object} props - the properties to match against + * @api public + */ + where(props: Object): Stream; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // HIGHER-ORDER STREAMS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** @@ -931,6 +915,62 @@ declare namespace Highland { concat(ys: Stream): Stream; concat(ys: R[]): Stream; + /** + * Filters using a predicate which returns a Stream. If you need to check + * against an asynchronous data source when filtering a Stream, this can + * be convenient. The Stream returned from the filter function should have + * a Boolean as it's first value (all other values on the Stream will be + * disregarded). + * + * @id flatFilter + * @section Streams + * @name Stream.flatFilter(f) + * @param {Function} f - the truth test function which returns a Stream + * @api public + */ + flatFilter(f: (x: R) => Stream): Stream; + + /** + * Creates a new Stream of values by applying each item in a Stream to an + * iterator function which may return a Stream. Each item on these result + * Streams are then emitted on a single output Stream. + * + * The same as calling `stream.map(f).flatten()`. + * + * @id flatMap + * @section Streams + * @name Stream.flatMap(f) + * @param {Function} f - the iterator function + * @api public + */ + flatMap(f: (x: R) => Stream): Stream; + flatMap(f: (x: R) => U): Stream; + + /** + * Recursively reads values from a Stream which may contain nested Streams + * or Arrays. As values or errors are encountered, they are emitted on a + * single output Stream. + * + * @id flatten + * @section Streams + * @name Stream.flatten() + * @api public + */ + flatten(): Stream; + flatten(): Stream; + + /** + * Forks a stream, allowing you to add additional consumers with shared + * back-pressure. A stream forked to multiple consumers will only pull values + * from it's source as fast as the slowest consumer can handle them. + * + * @id fork + * @section Streams + * @name Stream.fork() + * @api public + */ + fork(): Stream; + /** * Takes a Stream of Streams and merges their values and errors into a * single new Stream. The merged stream ends when all source streams have @@ -954,61 +994,220 @@ declare namespace Highland { */ merge (ys: Stream>): Stream; + /** + * Observes a stream, allowing you to handle values as they are emitted, without + * adding back-pressure or causing data to be pulled from the source. This can + * be useful when you are performing two related queries on a stream where one + * would block the other. Just be aware that a slow observer could fill up it's + * buffer and cause memory issues. Where possible, you should use [fork](#fork). + * + * @id observe + * @section Streams + * @name Stream.observe() + * @api public + */ + observe(): Stream; + + /** + * Switches source to an alternate Stream if the current Stream is empty. + * + * @id otherwise + * @section Streams + * @name Stream.otherwise(ys) + * @param {Stream} ys - alternate stream to use if this stream is empty + * @api public + */ + otherwise(ys: Stream): Stream; + + /** + * Takes a Stream of Streams and reads from them in parallel, buffering + * the results until they can be returned to the consumer in their original + * order. + * + * @id parallel + * @section Streams + * @name Stream.parallel(n) + * @param {Number} n - the maximum number of concurrent reads/buffers + * @api public + */ + parallel(n: number): Stream; + + /** + * Reads values from a Stream of Streams, emitting them on a Single output + * Stream. This can be thought of as a flatten, just one level deep. Often + * used for resolving asynchronous actions such as a HTTP request or reading + * a file. + * + * @id sequence + * @section Streams + * @name Stream.sequence() + * @api public + */ + //TODO figure out typing + sequence(): Stream; + + /** + * An alias for the [sequence](#sequence) method. + * + * @id series + * @section Streams + * @name Stream.series() + * @api public + */ + // TODO figure out typing + series(): Stream; + + /** + * Takes two Streams and returns a Stream of corresponding pairs. + * + * @id zip + * @section Streams + * @name Stream.zip(ys) + * @param {Array | Stream} ys - the other stream to combine values with + * @api public + */ + zip(ys: R[]): Stream; + zip(ys: Stream): Stream; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // CONSUMPTION // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Calls a named method on each object from the Stream - returning - * a new stream with the result of those calls. + * Applies results from a Stream as arguments to a function * - * @id invoke + * @id apply * @section Streams - * @name Stream.invoke(method, args) - * @param {String} method - the method name to call - * @param {Array} args - the arguments to call the method with + * @name Stream.apply(f) + * @param {Function} f - the function to apply arguments to * @api public */ - invoke(method: string, args: any[]): Stream; + // TODO what to do here? + apply(f: Function): void; /** - * Ensures that only one data event is push downstream (or into the buffer) - * every `ms` milliseconds, any other values are dropped. + * Calls a function once the Stream has ended. This method consumes the stream. + * If the Stream has already ended, the function is called immediately. * - * @id throttle - * @section Streams - * @name Stream.throttle(ms) - * @param {Number} ms - the minimum milliseconds between each value + * If an error from the Stream reaches this call, it will emit an `error` event + * (i.e., it will call `emit('error')` on the stream being consumed). This + * event will cause an error to be thrown if unhandled. + * + * As a special case, it is possible to chain `done` after a call to + * [each](#each) even though both methods consume the stream. + * + * @id done + * @section Consumption + * @name Stream.done(f) + * @param {Function} f - the callback * @api public + * + * var total = 0; + * _([1, 2, 3, 4]).each(function (x) { + * total += x; + * }).done(function () { + * // total will be 10 + * }); */ - throttle(ms: number): Stream; + done(f: () => void): void; /** - * Holds off pushing data events downstream until there has been no more - * data for `ms` milliseconds. Sends the last value that occurred before - * the delay, discarding all other values. + * Iterates over every value from the Stream, calling the iterator function + * on each of them. This function causes a **thunk**. * - * @id debounce + * If an error from the Stream reaches the `each` call, it will emit an + * error event (which will cause it to throw if unhandled). + * + * @id each * @section Streams - * @name Stream.debounce(ms) - * @param {Number} ms - the milliseconds to wait before sending data + * @name Stream.each(f) + * @param {Function} f - the iterator function * @api public */ - debounce(ms: number): Stream; - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + each(f: (x: R) => void): void; /** - * Creates a new Stream, which when read from, only returns the last - * seen value from the source. The source stream does not experience - * back-pressure. Useful if you're using a Stream to model a changing - * property which you need to query periodically. + * Pipes a Highland Stream to a [Node Writable Stream](http://nodejs.org/api/stream.html#stream_class_stream_writable) + * (Highland Streams are also Node Writable Streams). This will pull all the + * data from the source Highland Stream and write it to the destination, + * automatically managing flow so that the destination is not overwhelmed + * by a fast source. * - * @id latest + * This function returns the destination so you can chain together pipe calls. + * + * @id pipe * @section Streams - * @name Stream.latest() + * @name Stream.pipe(dest) + * @param {Writable Stream} dest - the destination to write all data to * @api public */ - latest(): Stream; + pipe(dest: Stream): Stream; + pipe(dest: NodeJS.ReadWriteStream): Stream; + pipe(dest: NodeJS.WritableStream): void; + + /** + * Consumes a single item from the Stream. Unlike consume, this function will + * not provide a new stream for you to push values onto, and it will unsubscribe + * as soon as it has a single error, value or nil from the source. + * + * You probably won't need to use this directly, but it is used internally by + * some functions in the Highland library. + * + * @id pull + * @section Streams + * @name Stream.pull(f) + * @param {Function} f - the function to handle data + * @api public + */ + pull(f: (err: Error, x: R) => void): void; + + /** + * Collects all values from a Stream into an Array and calls a function with + * once with the result. This function causes a **thunk**. + * + * If an error from the Stream reaches the `toArray` call, it will emit an + * error event (which will cause it to throw if unhandled). + * + * @id toArray + * @section Streams + * @name Stream.toArray(f) + * @param {Function} f - the callback to provide the completed Array to + * @api public + */ + toArray(f: (arr: R[]) => void): void; + + /** + * Returns the result of a stream to a nodejs-style callback function. + * + * If the stream contains a single value, it will call `cb` + * with the single item emitted by the stream (if present). + * If the stream is empty, `cb` will be called without any arguments. + * If an error is encountered in the stream, this function will stop + * consumption and call `cb` with the error. + * If the stream contains more than one item, it will stop consumption + * and call `cb` with an error. + * + * @id toCallback + * @section Consumption + * @name Stream.toCallback(cb) + * @param {Function} cb - the callback to provide the error/result to + * @api public + * + * _([1, 2, 3, 4]).collect().toCallback(function (err, result) { + * // parameter result will be [1,2,3,4] + * // parameter err will be null + * }); + */ + toCallback(cb: (err?: Error, x?: R) => void): void; } + + interface PipeableStream extends Stream {} + + interface PipeOptions { + end: boolean + } + + type MappingHint = number | string[] | Function; } declare var highland:HighlandStatic; diff --git a/types/history/LocationUtils.d.ts b/types/history/LocationUtils.d.ts index d78332e57c..26c98e374c 100644 --- a/types/history/LocationUtils.d.ts +++ b/types/history/LocationUtils.d.ts @@ -1,5 +1,4 @@ import { Path, LocationState, LocationKey, Location, LocationDescriptor } from './index'; export function locationsAreEqual(lv: LocationDescriptor, rv: LocationDescriptor): boolean; -export function createLocation(options: LocationDescriptor): Location; -export function createLocation(path: Path, state?: LocationState, key?: LocationKey, currentLocation?: Location): Location; +export function createLocation(path: LocationDescriptor, state?: LocationState, key?: LocationKey, currentLocation?: Location): Location; diff --git a/types/history/PathUtils.d.ts b/types/history/PathUtils.d.ts index 4cc947fcf3..80e5c2db54 100644 --- a/types/history/PathUtils.d.ts +++ b/types/history/PathUtils.d.ts @@ -2,6 +2,8 @@ import { Path, Location, LocationDescriptorObject } from './index'; export function addLeadingSlash(path: Path): Path; export function stripLeadingSlash(path: Path): Path; -export function stripPrefix(path: Path, prefix: string): Path; +export function hasBasename(path: Path): boolean; +export function stripBasename(path: Path, prefix: string): Path; +export function stripTrailingSlash(path: Path): Path; export function parsePath(path: Path): Location; export function createPath(location: LocationDescriptorObject): Path; diff --git a/types/history/history-tests.ts b/types/history/history-tests.ts index 4cb788f806..0a63059b12 100644 --- a/types/history/history-tests.ts +++ b/types/history/history-tests.ts @@ -101,9 +101,15 @@ let input = { value: "" }; LocationUtils.locationsAreEqual(location1, location2); } +{ + let location1 = LocationUtils.createLocation({ pathname: 'path/1' }, { state: 1 }); + let location2 = LocationUtils.createLocation({ pathname: 'pathname', state: 2 }); + LocationUtils.locationsAreEqual(location1, location2); +} + { let path = PathUtils.createPath({ pathname: '/a/path', hash: '#hash' }); - let strippedPath = PathUtils.stripPrefix(path, '/a/'); + let strippedPath = PathUtils.stripBasename(path, '/a/'); let location = PathUtils.parsePath(strippedPath); } diff --git a/types/history/index.d.ts b/types/history/index.d.ts index eda8c1bb10..a7f93bba86 100644 --- a/types/history/index.d.ts +++ b/types/history/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for history 4.5 +// Type definitions for history 4.6.2 // Project: https://github.com/mjackson/history // Definitions by: Sergey Buturlakin , Nathan Brown , Young Rok Kim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/hls.js/hls.js-tests.ts b/types/hls.js/hls.js-tests.ts index be71857652..9af972ebcc 100644 --- a/types/hls.js/hls.js-tests.ts +++ b/types/hls.js/hls.js-tests.ts @@ -1,8 +1,30 @@ import * as Hls from 'hls.js'; -if (Hls.isSupported) { +function process(playlist: string) { + return playlist; +} + +class pLoader extends Hls.DefaultConfig.loader { + constructor(config: Hls.LoaderConfig) { + super(config); + const load = this.load.bind(this); + this.load = (context: Hls.LoaderContext, cfg: Hls.LoaderConfig, callbacks: Hls.LoaderCallbacks) => { + if (context.type === 'manifest') { + const onSuccess = callbacks.onSuccess; + callbacks.onSuccess = (response: Hls.LoaderResponse, stats: Hls.LoaderStats, context: Hls.LoaderContext) => { + response.data = process(response.data as string); + onSuccess(response, stats, context); + }; + } + load(context, config, callbacks); + }; + } +} + +if (Hls.isSupported()) { const video = document.getElementById('video'); - const hls = new Hls(); + const hls = new Hls({ pLoader }); + const version: string = Hls.version; hls.loadSource('http://www.streambox.fr/playlists/test_001/stream.m3u8'); hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED, () => { diff --git a/types/hls.js/index.d.ts b/types/hls.js/index.d.ts index c0607a2307..66ad839da1 100644 --- a/types/hls.js/index.d.ts +++ b/types/hls.js/index.d.ts @@ -4,6 +4,22 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 +declare class Loader { + constructor(config: Hls.LoaderConfig) + /** + * Start retrieving content located at given URL (HTTP GET). + */ + load(context: Hls.LoaderContext, config: Hls.LoaderConfig, callbacks: Hls.LoaderCallbacks): void; + /** + * Abort any loading in progress. + */ + abort(): void; + /** + * Destroy loading context. + */ + destroy(): void; +} + declare namespace Hls { /** * Hls events @@ -29,6 +45,41 @@ declare namespace Hls { * data: { } */ const MEDIA_DETACHED: string; + /** + * fired when the buffer is going to be reset + * data: { } + */ + const BUFFER_RESET: string; + /** + * fired when we know about the codecs that we need buffers for to push into + * data: { tracks : { container, codec, levelCodec, initSegment, metadata } } + */ + const BUFFER_CODECS: string; + /** + * fired when we append a segment to the buffer + * data: { segment: segment object } + */ + const BUFFER_APPENDING: string; + /** + * fired when we are done with appending a media segment to the buffer + * data: { parent : segment parent that triggered BUFFER_APPENDING, pending : nb of segments waiting for appending for this segment parent } + */ + const BUFFER_APPENDED: string; + /** + * fired when the stream is finished and we want to notify the media buffer that there will be no more data + * data: { } + */ + const BUFFER_EOS: string; + /** + * fired when the media buffer should be flushed + * data: { } + */ + const BUFFER_FLUSHING: string; + /** + * fired when the media buffer has been flushed + * data: { } + */ + const BUFFER_FLUSHED: string; /** * fired to signal that a manifest loading starts * data: { url : manifestURL } @@ -74,6 +125,61 @@ declare namespace Hls { * data: { level: level object } */ const LEVEL_SWITCHED: string; + /** + * fired to notify that audio track lists has been updated + * data: { audioTracks : audioTracks } + */ + const AUDIO_TRACKS_UPDATED: string; + /** + * fired when an audio track switch occurs. deprecated in favor AUDIO_TRACK_SWITCHING + * data: { id : audio track id } + */ + const AUDIO_TRACK_SWTICH: string; + /** + * fired when an audio track switching is requested + * data: { id : audio track id } + */ + const AUDIO_TRACK_SWITCHING: string; + /** + * fired when an audio track switch actually occurs + * data: { id : audio track id } + */ + const AUDIO_TRACK_SWITCHED: string; + /** + * fired when an audio track loading starts + * data: { url : audio track URL, id : audio track id } + */ + const AUDIO_TRACK_LOADING: string; + /** + * fired when an audio track loading finishes + * data: { details : levelDetails object, id : audio track id, stats : { trequest, tfirst, tload, mtime } } + */ + const AUDIO_TRACK_LOADED: string; + /** + * fired to notify that subtitle track lists has been updated + * data: { subtitleTracks : subtitleTracks } + */ + const SUBTITLE_TRACKS_UPDATED: string; + /** + * fired when an subtitle track switch occurs + * data: { id : subtitle track id } + */ + const SUBTITLE_TRACK_SWITCH: string; + /** + * fired when a subtitle track loading starts + * data: { url : subtitle track URL, id : subtitle track id } + */ + const SUBTITLE_TRACK_LOADING: string; + /** + * fired when a subtitle track loading finishes + * data: { details : levelDetails object, id : subtitle track id, stats : { trequest, tfirst, tload, mtime } } + */ + const SUBTITLE_TRACK_LOADED: string; + /** + * fired when a subtitle fragment has been processed + * data: { success : boolean, frag : the processed frag } + */ + const SUBTITLE_FRAG_PROCESSED: string; /** * fired when a decryption key loading starts * data: { frag: fragment object } @@ -288,13 +394,417 @@ declare namespace Hls { /** * checks whether your browser is supporting MediaSource Extensions */ - const isSupported: boolean; + function isSupported(): boolean; /** * returns hls.js dist version number */ - const version: number; + const version: string; interface Config { + /** + * (default: true) + * if set to true, start level playlist and first fragments will be loaded automatically, after triggering of Hls.Events.MANIFEST_PARSED event + * if set to false, an explicit API call (hls.startLoad(startPosition=-1)) will be needed to start quality level/fragment loading. + */ + autoStartLoad: boolean; + /** + * (default -1) + * if set to -1, playback will start from initialTime=0 for VoD and according to liveSyncDuration/liveSyncDurationCount config params for Live + * otherwise, playback will start from predefined value. (unless stated otherwise in autoStartLoad=false mode : in that case startPosition can be overrided using hls.startLoad(startPosition)). + */ + startPosition: number; + /** + * (default: false) + * if set to true, the adaptive algorithm with limit levels usable in auto-quality by the HTML video element dimensions (width and height) + * if set to false, levels will not be limited. All available levels could be used in auto-quality mode taking only bandwidth into consideration. + */ + capLevelToPlayerSize: boolean; + /** + * (default: false) + * setting config.debug = true; will turn on debug logs on JS console. + * a logger object could also be provided for custom logging: config.debug = customLogger; + */ + debug: boolean; + /** + * (default: undefined) + * if audio codec is not signaled in variant manifest, or if only a stream manifest is provided, hls.js tries to guess audio codec by parsing audio sampling rate in ADTS header. + * If sampling rate is less or equal than 22050 Hz, then hls.js assumes it is HE-AAC, otherwise it assumes it is AAC-LC. + * This could result in bad guess, leading to audio decode error, ending up in media error. + * It is possible to hint default audiocodec to hls.js by configuring this value as below: + * mp4a.40.2 (AAC-LC) or + * mp4a.40.5 (HE-AAC) or + * undefined (guess based on sampling rate) + */ + defaultAudioCodec: string; + /** + * (default: 1) + * number of segments needed to start a playback of Live stream. + */ + initialLiveManifestSize: number; + /** + * (default: 30 seconds) + * Maximum buffer length in seconds. If buffer length is/become less than this value, a new fragment will be loaded. + * This is the guaranteed buffer length hls.js will try to reach, regardless of maxBufferSize. + */ + maxBufferLength: number; + /** + * (default 600s) + * Maximum buffer length in seconds. Hls.js will never exceed this value, even if maxBufferSize is not reached yet. + * hls.js tries to buffer up to a maximum number of bytes (60 MB by default) rather than to buffer up to a maximum nb of seconds. + * This is to mimic the browser behaviour (the buffer eviction algorithm is starting after the browser detects that video buffer size reaches a limit in bytes) + * maxBufferLength is the minimum guaranteed buffer length that hls.js will try to achieve, even if that value exceeds the amount of bytes 60 MB of memory. + * maxMaxBufferLength acts as a capping value, as if bitrate is really low, you could need more than one hour of buffer to fill 60 MB. + */ + maxMaxBufferLength: number; + /** + * (default: 60 MB) + * 'Minimum' maximum buffer size in bytes. If buffer size upfront is bigger than this value, no fragment will be loaded + */ + maxBufferSize: number; + /** + * (default: 0.5 seconds) + * 'Maximum' inter-fragment buffer hole tolerance that hls.js can cope with when searching for the next fragment to load. When switching between quality level, + * fragments might not be perfectly aligned. + * This could result in small overlapping or hole in media buffer. This tolerance factor helps cope with this. + */ + maxBufferHole: number; + /** + * (default: 4s) + * + * ABR algorithm will always try to choose a quality level that should avoid rebuffering. In case no quality level with this criteria can + * be found (lets say for example that buffer length is 1s, but fetching a fragment at lowest quality is predicted to take around 2s ... + * ie we can forecast around 1s of rebuffering ...) then ABR algorithm will try to find a level that should guarantee less than + * maxStarvationDelay of buffering. + */ + maxStarvationDelay: number; + /** + * (default: 2s) + * In case playback is stalled, and a buffered range is available upfront, less than maxSeekHole seconds from current media position, + * hls.js will jump over this buffer hole to reach the beginning of this following buffered range. + * maxSeekHole allows to configure this jumpable threshold. + */ + maxSeekHole: number; + /** + * (default: 0.5s) + * media element is expected to play and if currentTime has not moved for more than lowBufferWatchdogPeriod and if there are less than maxBufferHole seconds buffered upfront, + * hls.js will try to nudge playhead to recover playback + */ + lowBufferWatchdogPeriod: number; + /** + * (default: 3s) + * if media element is expected to play and if currentTime has not moved for more than highBufferWatchdogPeriod and if there are more than maxBufferHole seconds buffered upfront, + * hls.js will try to nudge playhead to recover playback + */ + highBufferWatchdogPeriod: number; + /** + * (default: 0.1s) + * In case playback continues to stall after first playhead nudging, currentTime will be nudged evenmore following nudgeOffset to try to restore playback. + * media.currentTime += (nb nudge retry -1)*nudgeOffset + */ + nudgeOffset: number; + /** + * (default: 3s) + * In case playback continues to stall after first playhead nudging, currentTime will be nudged evenmore following nudgeOffset to try to restore playback. + * media.currentTime += (nb nudge retry -1)*nudgeOffset + */ + nudgeMaxRetry: number; + /** + * (default 0.2s) + * This tolerance factor is used during fragment lookup. + * Instead of checking whether buffered.end is located within [start, end] range, frag lookup will be done by checking within [start-maxFragLookUpTolerance, end-maxFragLookUpTolerance] range. + * This tolerance factor is used to cope with situations like: + * buffered.end = 9.991 + * frag[0] : [0,10] + * frag[1] : [10,20] + * buffered.end is within frag[0] range, but as we are close to frag[1], frag[1] should be choosen instead + * If maxFragLookUpTolerance = 0.2, this lookup will be adjusted to + * frag[0] : [-0.2,9.8] + * frag[1] : [9.8,19.8] + * This time, buffered.end is within frag[1] range, and frag[1] will be the next fragment to be loaded, as expected + */ + maxLoadingDelay: number; + /** + * (default 4s) + * + * max video loading delay used in automatic start level selection : in that mode ABR controller will ensure that video loading time (ie + * the time to fetch the first fragment at lowest quality level + the time to fetch the fragment at the appropriate quality level is less + * than maxLoadingDelay ) + */ + maxFragLookUpTolerance: number; + /** + * (default: 3) + * edge of live delay, expressed in multiple of EXT-X-TARGETDURATION. if set to 3, playback will start from fragment N-3, N being the last fragment of the live playlist. + * Decreasing this value is likely to cause playback stalls. + */ + liveSyncDurationCount: number; + /** + * (default: undefined) + * Alternative parameter to liveSyncDurationCount, expressed in seconds vs number of segments. + * If defined in the configuration object, liveSyncDuration will take precedence over the default liveSyncDurationCount. + * You can't define this parameter and either liveSyncDurationCount or liveMaxLatencyDurationCount in your configuration object at the same time. + * A value too low (inferior to ~3 segment durations) is likely to cause playback stalls. + */ + liveSyncDuration: number; + /** + * (default: Infinity) + * maximum delay allowed from edge of live, expressed in multiple of EXT-X-TARGETDURATION. + * If set to 10, the player will seek back to liveSyncDurationCount whenever the next fragment to be loaded is older than N-10, N being the last fragment of the live playlist. + * If set, this value must be stricly superior to liveSyncDurationCount a value too close from liveSyncDurationCount is likely to cause playback stalls. + */ + liveMaxLatencyDurationCount: number; + /** + * (default: undefined) + * Alternative parameter to liveMaxLatencyDurationCount, expressed in seconds vs number of segments. + * If defined in the configuration object, liveMaxLatencyDuration will take precedence over the default liveMaxLatencyDurationCount. + * If set, this value must be stricly superior to liveSyncDuration which must be defined as well. + * You can't define this parameter and either liveSyncDurationCount or liveMaxLatencyDurationCount in your configuration object at the same time. + * A value too close from liveSyncDuration is likely to cause playback stalls. + */ + liveMaxLatencyDuration: number; + /** + * (default: true) + * Enable WebWorker (if available on browser) for TS demuxing/MP4 remuxing, to improve performance and avoid lag/frame drops. + */ + enableWorker: boolean; + /** + * (default: true) + * Enable to use JavaScript version AES decryption for fallback of WebCrypto API. + */ + enableSoftwareAES: boolean; + /** + * (default: undefined) + * When set, use this level as the default hls.startLevel. Keep in mind that the startLevel set with the API takes precedence over + * config.startLevel configuration parameter. + */ + startLevel: number; + /** + * (default: 10000ms for level and manifest) + * URL Loader timeout. A timeout callback will be triggered if loading duration exceeds this timeout. no further action will be done : the load operation will not be cancelled/aborted. + * It is up to the application to catch this event and treat it as needed. + */ + manifestLoadingTimeOut: number; + /** + * (default: 3) + * Max number of load retries. + */ + manifestLoadingMaxRetry: number; + /** + * (default: 1000 ms) + * Initial delay between XMLHttpRequest error and first load retry (in ms). + * Any I/O error will trigger retries every 500ms,1s,2s,4s,8s, ... capped to fragLoadingMaxRetryTimeout / manifestLoadingMaxRetryTimeout / levelLoadingMaxRetryTimeout value (exponential backoff). + * Prefetch start fragment although media not attached. + */ + manifestLoadingRetryDelay: number; + /** + * (default: 64000 ms) + * Maximum frag/manifest/key retry timeout (in milliseconds) in case I/O errors are met. + */ + manifestLoadingMaxRetryTimeout: number; + /** + * (default: 60000ms for fragment) + * URL Loader timeout. A timeout callback will be triggered if loading duration exceeds this timeout. no further action will be done : the load operation will not be cancelled/aborted. + * It is up to the application to catch this event and treat it as needed. + */ + levelLoadingTimeOut: number; + /** + * (default: 3) + * Max number of load retries. + */ + levelLoadingMaxRetry: number; + /** + * (default: 1000 ms) + * Initial delay between XMLHttpRequest error and first load retry (in ms). + * Any I/O error will trigger retries every 500ms,1s,2s,4s,8s, ... capped to fragLoadingMaxRetryTimeout / manifestLoadingMaxRetryTimeout / levelLoadingMaxRetryTimeout value (exponential backoff). + * Prefetch start fragment although media not attached. + */ + levelLoadingRetryDelay: number; + /** + * (default: 64000 ms) + * Maximum frag/manifest/key retry timeout (in milliseconds) in case I/O errors are met. + */ + levelLoadingMaxRetryTimeout: number; + /** + * (default: 60000ms for fragment) + * URL Loader timeout. A timeout callback will be triggered if loading duration exceeds this timeout. no further action will be done : the load operation will not be cancelled/aborted. + * It is up to the application to catch this event and treat it as needed. + */ + fragLoadingTimeOut: number; + /** + * (default: 3) + * Max number of load retries. + */ + fragLoadingMaxRetry: number; + /** + * (default: 1000 ms) + * Initial delay between XMLHttpRequest error and first load retry (in ms). + * Any I/O error will trigger retries every 500ms,1s,2s,4s,8s, ... capped to fragLoadingMaxRetryTimeout / manifestLoadingMaxRetryTimeout / levelLoadingMaxRetryTimeout value (exponential backoff). + * Prefetch start fragment although media not attached. + */ + fragLoadingRetryDelay: number; + /** + * (default: 64000 ms) + * Maximum frag/manifest/key retry timeout (in milliseconds) in case I/O errors are met. + */ + fragLoadingMaxRetryDelay: number; + /** + * (default: false) + * Start prefetching start fragment although media not attached yet. Max number of append retries. + */ + startFragPrefech: boolean; + /** + * (default: 3) + * Max number of sourceBuffer.appendBuffer() retry upon error. Such error could happen in loop with UHD streams, when internal buffer is full. (Quota Exceeding Error will be triggered). + * In that case we need to wait for the browser to evict some data before being able to append buffer correctly. + */ + appendErrorMaxRetry: number; + /** + * (default: standard XMLHttpRequest-based URL loader) + * Override standard URL loader by a custom one. Could be useful for P2P or stubbing (testing). + * Use this, if you want to overwrite both the fragment and the playlist loader. + * Note: If fLoader or pLoader are used, they overwrite loader! + */ + loader: typeof Loader; + /** + * (default: undefined) + * This enables the manipulation of the fragment loader. + * Note: This will overwrite the default loader, as well as your own loader function. + */ + fLoader?: typeof Loader; + /** + * (default: undefined) + * This enables the manipulation of the playlist loader. + * Note: This will overwrite the default loader, as well as your own loader function. + */ + pLoader?: typeof Loader; + /** + * (default: undefined) + * XMLHttpRequest customization callback for default XHR based loader. + * Parameter should be a function with two arguments (xhr: XMLHttpRequest, url: string). + * If xhrSetup is specified, default loader will invoke it before calling xhr.send(). This allows user to easily modify/setup XHR. + */ + xhrSetup?(xhr: XMLHttpRequest, url: string): void; + /** + * (default: undefined) + * Fetch customization callback for Fetch based loader. + * Parameter should be a function with two arguments (context and Request Init Params). + * If fetchSetup is specified and Fetch loader is used, fetchSetup will be triggered to instantiate Request Object. This allows user to easily tweak Fetch loader. + */ + fetchSetup?(context: any, initParams: any): Request; + /** + * (default: internal ABR controller) + * Customized Adaptive Bitrate Streaming Controller. + * Parameter should be a class providing 2 getters, 2 setters and a destroy() method: + * get/set nextAutoLevel: return next auto-quality level/force next auto-quality level that should be returned (currently used for emergency switch down) + * get/set autoLevelCapping: capping/max level value that could be used by ABR Controller + * destroy(): should clean-up all used resources + */ + abrController: AbrController; + /** + * (default: internal track timeline controller) + * Customized text track syncronization controller. + * Parameter should be a class with a destroy() method: + * destroy() : should clean-up all used resources + */ + timelineController: TimelineController; + /** + * (default: true) + * whether or not to enable CEA-708 captions + */ + enableCEA708Captions: boolean; + /** + * (default: English) + * Label for the text track generated for CEA-708 captions track 1. This is how it will appear in the browser's native menu for subtitles and captions. + */ + captionsTextTrack1Label: string; + /** + * (default: en) + * RFC 3066 language code for the text track generated for CEA-708 captions track 1. + */ + captionsTextTrack1LanguagedCode: string; + /** + * (default: Spanish) + * Label for the text track generated for CEA-708 captions track 2. This is how it will appear in the browser's native menu for subtitles and captions. + */ + captionsTextTrack2Label: string; + /** + * (default: es) + * RFC 3066 language code for the text track generated for CEA-708 captions track 2. + */ + captionsTextTrack2LanguageCode: string; + /** + * (default: false) + * If a segment's video track is shorter than its audio track by > min(maxSeekHole, maxBufferHole), extend the final video frame's duration to match the audio track's duration. + * This helps playback continue in certain cases that might otherwise get stuck. + */ + stretchShortVideoTrack: boolean; + /** + * (default: true) + * Whether or not to force having a key frame in the first AVC sample after a discontinuity. + * If set to true, after a discontinuity, the AVC samples without any key frame will be dropped until finding one that contains a key frame. + * If set to false, all AVC samples will be kept, which can help avoid holes in the stream. Setting this parameter to false can also generate decoding weirdness when switching level or seeking. + */ + forceKeyFrameOnDiscontinuity: boolean; + /** + * (default: 5.0) + * Fast bitrate Exponential moving average half-life, used to compute average bitrate for Live streams. + * Half of the estimate is based on the last abrEwmaFastLive seconds of sample history. Each of the sample is weighted by the fragment loading duration. + * parameter should be a float greater than 0 + */ + abrEwmaFastLive: number; + /** + * (default: 9.0) + * Slow bitrate Exponential moving average half-life, used to compute average bitrate for Live streams. + * Half of the estimate is based on the last abrEwmaSlowLive seconds of sample history. Each of the sample is weighted by the fragment loading duration. + * parameter should be a float greater than abrEwmaFastLive + */ + arbEwmaSlowLive: number; + /** + * (default: 4.0) + * Fast bitrate Exponential moving average half-life, used to compute average bitrate for VoD streams. + * Half of the estimate is based on the last abrEwmaFastVoD seconds of sample history. Each of the sample is weighted by the fragment loading duration. + * parameter should be a float greater than 0 + */ + arbEwmaFastVod: number; + /** + * (default: 15.0) + * Slow bitrate Exponential moving average half-life, used to compute average bitrate for VoD streams. + * Half of the estimate is based on the last abrEwmaSlowVoD seconds of sample history. Each of the sample is weighted by the fragment loading duration. + * parameter should be a float greater than abrEwmaFastVoD + */ + arbEwmaSlowVod: number; + /** + * (default: 500000) + * Default bandwidth estimate in bits/second prior to collecting fragment bandwidth samples. + * parameter should be a float + */ + arbEwmaDefaultEstimate: number; + /** + * (default: 0.8) + * Scale factor to be applied against measured bandwidth average, to determine whether we can stay on current or lower quality level. + * If abrBandWidthFactor * bandwidth average < level.bitrate then ABR can switch to that level providing that it is equal or less than current level. + */ + arbBandWidthFactor: number; + /** + * (default: 0.7) + * Scale factor to be applied against measured bandwidth average, to determine whether we can switch up to a higher quality level. + * If abrBandWidthUpFactor * bandwidth average < level.bitrate then ABR can switch up to that quality level. + */ + arbBandWidthUpFactor: number; + /** + * (default: false) + * max bitrate used in ABR by avg measured bitrate i.e. if bitrate signaled in variant manifest for a given level is 2Mb/s but average bitrate measured on this level is 2.5Mb/s, + * then if config value is set to true, ABR will use 2.5 Mb/s for this quality level. + */ + abrMaxWithRealBitrate: boolean; + /** + * (default: 0) + * Return the capping/min bandwidth value that could be used by automatic level selection algorithm. + * Useful when browser or tab of the browser is not in the focus and bandwidth drops + */ + minAutoBitrate: number; + } + + interface OptionalConfig { /** * (default: true) * if set to true, start level playlist and first fragments will be loaded automatically, after triggering of Hls.Events.MANIFEST_PARSED event @@ -334,7 +844,7 @@ declare namespace Hls { * (default: 1) * number of segments needed to start a playback of Live stream. */ - initialLiveManifestSize: number; + initialLiveManifestSize?: number; /** * (default: 30 seconds) * Maximum buffer length in seconds. If buffer length is/become less than this value, a new fragment will be loaded. @@ -383,25 +893,25 @@ declare namespace Hls { * media element is expected to play and if currentTime has not moved for more than lowBufferWatchdogPeriod and if there are less than maxBufferHole seconds buffered upfront, * hls.js will try to nudge playhead to recover playback */ - lowBufferWatchdogPeriod: number; + lowBufferWatchdogPeriod?: number; /** * (default: 3s) * if media element is expected to play and if currentTime has not moved for more than highBufferWatchdogPeriod and if there are more than maxBufferHole seconds buffered upfront, * hls.js will try to nudge playhead to recover playback */ - highBufferWatchdogPeriod: number; + highBufferWatchdogPeriod?: number; /** * (default: 0.1s) * In case playback continues to stall after first playhead nudging, currentTime will be nudged evenmore following nudgeOffset to try to restore playback. * media.currentTime += (nb nudge retry -1)*nudgeOffset */ - nudgeOffset: number; + nudgeOffset?: number; /** * (default: 3s) * In case playback continues to stall after first playhead nudging, currentTime will be nudged evenmore following nudgeOffset to try to restore playback. * media.currentTime += (nb nudge retry -1)*nudgeOffset */ - nudgeMaxRetry: number; + nudgeMaxRetry?: number; /** * (default 0.2s) * This tolerance factor is used during fragment lookup. @@ -557,19 +1067,19 @@ declare namespace Hls { * Use this, if you want to overwrite both the fragment and the playlist loader. * Note: If fLoader or pLoader are used, they overwrite loader! */ - loader?: any; + loader?: typeof Loader; /** * (default: undefined) * This enables the manipulation of the fragment loader. * Note: This will overwrite the default loader, as well as your own loader function. */ - fLoader?: any; + fLoader?: typeof Loader; /** * (default: undefined) * This enables the manipulation of the playlist loader. * Note: This will overwrite the default loader, as well as your own loader function. */ - pLoader?: any; + pLoader?: typeof Loader; /** * (default: undefined) * XMLHttpRequest customization callback for default XHR based loader. @@ -1031,18 +1541,6 @@ declare namespace Hls { length?: number; } - interface Loader { - load(context: LoaderContext, config: LoaderConfig, callbacks: LoaderCallbacks): void; - /** - * Abort any loading in progress. - */ - abort(): void; - /** - * Destroy loading context. - */ - destroy(): void; - } - interface LoaderContext { /** * target URL @@ -1110,7 +1608,7 @@ declare class Hls { /** * Constructor. Can be provided an HlsConfig object as default properties and or overrides */ - constructor(config?: Hls.Config) + constructor(config?: Hls.OptionalConfig) /** * return array of available quality levels */ @@ -1247,6 +1745,10 @@ declare class Hls { * hls.js event listener */ on(event: string, callback: (event: string, data: Hls.Data) => void): void; + /** + * remove hls.js event listener + */ + off(event: string, callback: (event: string, data: Hls.Data) => void): void; } export as namespace Hls; diff --git a/types/homeworks/homeworks-tests.ts b/types/homeworks/homeworks-tests.ts new file mode 100644 index 0000000000..16bce6d106 --- /dev/null +++ b/types/homeworks/homeworks-tests.ts @@ -0,0 +1,93 @@ +const element: JQuery = $('#element'); +const target: JQuery = $('#target'); + +element.checkbox({ + /* Empty options */ +}).bind('change', (event: HomeWorksEventObject) => { + /* HomeWorks native event */ +}); + +element.converter({ + /* Empty options */ +}); + +element.dropdown({ + /* Empty options */ +}); + +const dropdownHandlerTarget: JQuery = element.addHandler(target); + +element.input({ + /* Empty options */ +}).bind('change', (event: HomeWorksEventObject) => { + /* HomeWorks native event */ +}); + +element.modal({ + /* Any options */ +}).each(() => { + /* Chaining */ +}); +element.modal('show'); +element.modal('hide'); +element.modal('open'); +element.modal('close'); + +notification('title', 'content', 'url', 'success'); + +element.ripple({ + /* Object options */ +}); +element.start({ + x: 1, + y: 2 +}); + +element.spinner({ + type: 'any', + empty: 'any' +}).bind('change', (event: HomeWorksEventObject) => { + /* HomeWorks native event */ +}); + +element.step('method'); +element.step({ + active: 0 +}).bind('move', (event: HomeWorksStepEventObject) => { + /* HomeWorks step event */ +}); + +element.tab('method'); +element.tab({ + active: 0 +}).bind('move', (event: HomeWorksTabEventObject) => { + /* HomeWorks step event */ +}); + +toast('hello homeworks'); +toast({ + message: 'hello homeworks' +}); + +element.toggle({ + placeholder: 'placeholder' +}).bind('change', (event: HomeWorksEventObject) => { + /* HomeWorks native event */ +}); + +element.upload({ + url: 'url', + type: 'type', + data: {}, + dest: 'dest', + isBtn: true, + beforeStart() { + }, + complete(data: any) { + }, + success(data?: any, state?: any, xhr?: any) { + }, + error(xhr?: any, state?: any, error?: any) { + }, + extensions: 'any' +}); diff --git a/types/homeworks/index.d.ts b/types/homeworks/index.d.ts new file mode 100644 index 0000000000..4449483d35 --- /dev/null +++ b/types/homeworks/index.d.ts @@ -0,0 +1,213 @@ +// Type definitions for homeworks 1.0 +// Project: https://github.com/IGAWorksDev/homeworks/ +// Definitions by: Kenneth Ceyer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +/** + * * [MAIN] + * @ EVENT + * + */ + +declare interface HomeWorksEventObject { + element: JQuery; + value: string; + checked?: boolean; +} + +declare interface JQuery { + bind(eventType: string, handler: (...parameters: any[]) => void): JQuery; + knock(): JQuery; +} + +/** + * * [COMPONENT] + * @ CHECKBOX + * + */ +interface CheckboxOptions { +} + +declare interface JQuery { + checkbox(options?: CheckboxOptions): JQuery; +} + +/** + * * [COMPONENT] + * @ CONVERTER + * + */ + +interface ConverterOptions { +} + +declare interface JQuery { + converter(options?: ConverterOptions): JQuery; +} + +/** + * * [COMPONENT] + * @ DROPDOIWN + * + */ + +interface DropdownOptions { +} + +declare interface JQuery { + dropdown(options?: DropdownOptions): JQuery; + addHandler(target: JQuery): JQuery; +} + +/** + * * [COMPONENT] + * @ INPUT + * + */ + +interface InputOptions { +} + +declare interface JQuery { + input(options?: InputOptions): JQuery; +} + +/** + * * [COMPONENT] + * @ MODAL + * + */ + +declare interface JQuery { + modal(options?: any): JQuery; + modal(method?: string, options?: any): JQuery; +} + +/** + * * [COMPONENT] + * @ NOTIFICATION + * + */ + +declare function notification(title: string, content: string, url: string, status?: string): void; + +/** + * * [COMPONENT] + * @ RIPPLE + * + */ + +interface RippleStartOptions { + x: number; + y: number; +} + +declare interface JQuery { + ripple(options?: any): JQuery; + start(options?: RippleStartOptions): JQuery; +} + +/** + * * [COMPONENT] + * @ SPINNER + * + */ + +interface SpinnerOptions { + type?: any; + empty?: any; +} + +declare interface JQuery { + spinner(options?: SpinnerOptions): JQuery; +} + +/** + * * [COMPONENT] + * @ STEP + * + */ + +interface StepOptions { + active?: number; +} + +declare interface JQuery { + step(method?: string): JQuery; + step(options?: StepOptions): JQuery; +} + +declare interface HomeWorksStepEventObject { + header: JQuery[]; + index: number; + length: number; +} + +/** + * * [COMPONENT] + * @ TAB + * + */ + +interface TabOptions { + active?: number; +} + +declare interface JQuery { + tab(method?: string): JQuery; + tab(options?: TabOptions): JQuery; +} + +declare interface HomeWorksTabEventObject { + header: JQuery[]; + index: number; + length: number; +} + +/** + * * [COMPONENT] + * @ TOAST + * + */ + +declare function toast(message: any): void; + +/** + * * [COMPONENT] + * @ TOGGLE + * + */ + +interface ToggleOptions { + placeholder?: string; +} + +declare interface JQuery { + toggle(options: ToggleOptions): JQuery; +} + +/** + * * [COMPONENT] + * @ UPLOAD + * + */ + +interface UploadOptions { + url: string; + type?: string; + data?: any; + dest?: string; + isBtn?: boolean; + beforeStart?: () => void; + complete?: (data?: any) => void; + success?: (data?: any, state?: any, xhr?: any) => void; + error?: (xhr?: any, state?: any, error?: any) => void; + extensions?: any; +} + +declare interface JQuery { + upload(options?: UploadOptions): JQuery; +} diff --git a/types/homeworks/tsconfig.json b/types/homeworks/tsconfig.json new file mode 100644 index 0000000000..d29bd1acfe --- /dev/null +++ b/types/homeworks/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "homeworks-tests.ts" + ] +} diff --git a/types/homeworks/tslint.json b/types/homeworks/tslint.json new file mode 100644 index 0000000000..626d0c5922 --- /dev/null +++ b/types/homeworks/tslint.json @@ -0,0 +1,9 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-empty-interface": false, + "strict-export-declare-modifiers": false, + "prefer-method-signature": false, + "unified-signatures": false + } +} diff --git a/types/html2canvas/index.d.ts b/types/html2canvas/index.d.ts index 0efe8bc34f..33effeff87 100644 --- a/types/html2canvas/index.d.ts +++ b/types/html2canvas/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/niklasvh/html2canvas // Definitions by: Richard Hepburn , Pei-Tang Huang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/http-aws-es/http-aws-es-tests.ts b/types/http-aws-es/http-aws-es-tests.ts new file mode 100644 index 0000000000..df432dbab4 --- /dev/null +++ b/types/http-aws-es/http-aws-es-tests.ts @@ -0,0 +1,42 @@ +import { EnvironmentCredentials } from "aws-sdk/lib/core"; +import { Client } from "elasticsearch"; +import HttpAmazonESConnector = require("http-aws-es"); + +new Client({ + amazonES: { + accessKey: "AKID", + region: "us-east-1", + secretKey: "secret", + }, + connectionClass: HttpAmazonESConnector, + host: "https://amazon-es-host.us-east-1.es.amazonaws.com", +}); + +new Client({ + amazonES: { + accessKey: "AKID", + region: "us-east-1", + secretKey: "secret", + }, + connectionClass: require("http-aws-es"), + host: "https://amazon-es-host.us-east-1.es.amazonaws.com", +}); + +const myCredentials = new EnvironmentCredentials("AWS"); +new Client({ + amazonES: { + credentials: myCredentials, + region: "us-east-1", + }, + connectionClass: HttpAmazonESConnector, + host: "https://amazon-es-host.us-east-1.es.amazonaws.com", +}); + +new Client({ + amazonES: { + credentials: myCredentials, + region: "us-east-1", + }, + connectionClass: require("http-aws-es"), + host: "https://amazon-es-host.us-east-1.es.amazonaws.com", +}); diff --git a/types/http-aws-es/index.d.ts b/types/http-aws-es/index.d.ts new file mode 100644 index 0000000000..c14547a58f --- /dev/null +++ b/types/http-aws-es/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for http-aws-es 1.1 +// Project: https://github.com/TheDeveloper/http-aws-es#readme +// Definitions by: Marco Gonzalez +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as e from "elasticsearch"; +import { Credentials } from "aws-sdk/lib/core"; + +declare module "elasticsearch" { + interface AmazonESOptions { + accessKey?: string; + credentials?: Credentials; + region: string; + secretKey?: string; + } + + interface ConfigOptions { + amazonES?: AmazonESOptions; + } +} + +declare const HttpAmazonESConnector: any; +export = HttpAmazonESConnector; diff --git a/types/http-aws-es/package.json b/types/http-aws-es/package.json new file mode 100644 index 0000000000..e4fd5a5e97 --- /dev/null +++ b/types/http-aws-es/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "aws-sdk": "^2.7.0" + } +} diff --git a/types/http-aws-es/tsconfig.json b/types/http-aws-es/tsconfig.json new file mode 100644 index 0000000000..f1689d92e4 --- /dev/null +++ b/types/http-aws-es/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", + "http-aws-es-tests.ts" + ] +} diff --git a/types/http-aws-es/tslint.json b/types/http-aws-es/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/http-aws-es/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/hubot/hubot-tests.ts b/types/hubot/hubot-tests.ts new file mode 100644 index 0000000000..9c5e832bc2 --- /dev/null +++ b/types/hubot/hubot-tests.ts @@ -0,0 +1,14 @@ +import * as Hubot from "hubot"; + +const brain = new Hubot.Brain(); +brain; // $ExpectType Brain +brain.userForName('someone'); // $ExpectType any + +const robot = new Hubot.Robot( + 'src/adapters', + 'slack', + false, + 'hubot', +); +robot; // $ExpectType Robot +robot.hear(/hello/, () => null); // $ExpectType void diff --git a/types/hubot/index.d.ts b/types/hubot/index.d.ts new file mode 100644 index 0000000000..e0a809f69a --- /dev/null +++ b/types/hubot/index.d.ts @@ -0,0 +1,49 @@ +// Type definitions for hubot 2.19 +// Project: https://github.com/github/hubot +// Definitions by: Dirk Gadsden +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace Hubot { + class Brain { + userForId(id: any): any; + userForName(name: string): any; + } + + class User { + id: any; + name: string; + } + + class Message { + user: User; + text: string; + id: string; + } + + class Response { + match: RegExpMatchArray; + message: Message; + + constructor(robot: Robot, message: Message, match: RegExpMatchArray); + send(...strings: string[]): void; + reply(...strings: string[]): void; + random(items: T[]): T; + } + + type ListenerCallback = (response: Response) => void; + + class Robot { + brain: Brain; + + constructor(adapterPath: string, adapter: string, httpd: boolean, name: string, alias?: string); + hear(regex: RegExp, callback: ListenerCallback): void; + hear(regex: RegExp, options: any, callback: ListenerCallback): void; + respond(regex: RegExp, callback: ListenerCallback): void; + respond(regex: RegExp, options: any, callback: ListenerCallback): void; + } +} + +// Compatibility with CommonJS syntax exported by Hubot's CoffeeScript. +// tslint:disable-next-line export-just-namespace +export = Hubot; +export as namespace Hubot; diff --git a/types/hubot/tsconfig.json b/types/hubot/tsconfig.json new file mode 100644 index 0000000000..0e3faa4c35 --- /dev/null +++ b/types/hubot/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", + "hubot-tests.ts" + ] +} diff --git a/types/hubot/tslint.json b/types/hubot/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hubot/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/humanize-plus/humanize-plus-tests.ts b/types/humanize-plus/humanize-plus-tests.ts new file mode 100644 index 0000000000..4e66ff6c26 --- /dev/null +++ b/types/humanize-plus/humanize-plus-tests.ts @@ -0,0 +1,204 @@ +import * as Humanize from 'humanize-plus'; + +///////////// +// Numbers // +///////////// + +/** + * formatNumber + */ +Humanize.formatNumber(123456789, 2); +// "123,456,789.00" + +/** + * intComma + */ +Humanize.intComma(123456789); +// "123,456,789" + +/** + * compactInteger + */ +Humanize.compactInteger(123456789, 1); +// "123.5M" + +// Switch to scientific notation for trillons, because no one knows those abbreviations. +Humanize.compactInteger(-7832186132456328967, 4); +// "-7.8322x10^18" + +Humanize.compactInteger(-100, 2); +// "-100" + +/** + * boundedNumber + */ +Humanize.boundedNumber(110, 100); +// "100+" + +Humanize.boundedNumber(50, 100); +// "50" + +/** + * ordinal + */ +Humanize.ordinal(22); +// "22nd" + +/** + * times + */ +for (let i = 0; i < 5; i ++) { + Humanize.times(i, {4: 'too many'}); + if (i === 1) { + Humanize.times(1.1); + } +} +// never +// once +// 1.1 times +// twice +// 3 times +// too many times + +/** + * pace + */ +const second = 1000; +const week = 6.048e8; +const decade = 3.156e11; + +Humanize.pace(1.5, second, "heartbeat"); +// Approximately 2 heartbeats per second + +Humanize.pace(4, week); +// Approximately 4 times per week + +Humanize.pace(1, decade, "life crisis"); +// Less than 1 life crisis per week + +/** + * fileSize + */ +Humanize.fileSize(1024 * 20); +// "20 Kb" + +Humanize.fileSize(1024 * 2000); +// "1.95 Mb" + +Humanize.fileSize(Math.pow(1000, 4)); +// "931.32 Gb" + +/** + * pluralize + */ +Humanize.pluralize(1, "duck"); +// "duck" + +Humanize.pluralize(3, "duck"); +// "ducks" + +Humanize.pluralize(3, "duck", "duckies"); +// "duckies" + +///////////// +// Strings // +///////////// + +/** + * truncate + */ +Humanize.truncate('long text is good for you'); +// "long text is good for you" + +Humanize.truncate('long text is good for you', 19); +// "long text is goo..." + +Humanize.truncate('long text is good for you', 19, '... etc'); +// "long text is... etc" + +/** + * truncateWords + */ +Humanize.truncateWords('long text is good for you', 5); +// "long text is good for ..." + +/** + * capitalize + */ +Humanize.capitalize("some boring string"); +// "Some boring string" + +Humanize.capitalize("wHoOaA!"); +// "WHoOaA!" + +Humanize.capitalize("wHoOaA!", true); +// "Whooaa!" + +/** + * capitalizeAll + */ +Humanize.capitalizeAll("some boring string"); +// "Some Boring String" + +/** + * titleCase + */ +Humanize.titleCase("some of a boring string"); +// "Some of a Boring String" + +Humanize.titleCase("cool the iTunes cake, O'Malley!"); +// "Cool the iTunes Cake, O'Malley!" + +//////////// +// Arrays // +//////////// + +/** + * oxford + */ +const items = ['apple', 'orange', 'banana', 'pear', 'pineapple']; + +Humanize.oxford(items); +// "apple, orange, banana, pear, and pineapple" + +Humanize.oxford(items, 3); +// "apple, orange, banana, and 2 others" + +// Pluralizes properly too! +Humanize.oxford(items, 4); +// "apple, orange, banana, pear, and 1 other" + +Humanize.oxford(items, 3, "and some other fruits"); +// "apple, orange, banana, and some other fruits" + +/** + * frequency + */ +const aznPics = [ + 'http://24.media.tumblr.com/77082543cb69af56ede38a0cdb2511d0/tumblr_mh96olWPLv1r8k4ywo1_1280.jpg', + 'http://25.media.tumblr.com/3e2d318be34d5ef8f86a612cd1d795ff/tumblr_mhbhb96t3z1r8k4ywo1_1280.jpg', + 'http://24.media.tumblr.com/8c5a052e33c27c784514e1b124b383a1/tumblr_mhexaqrk0w1r8k4ywo1_1280.jpg' +]; +const bigfootPics: string[] = []; + +"Instagrammers " + Humanize.frequency(aznPics, "took pictures of food"); +// "Instagrammers took pictures of food 3 times" + +"Bigfoot " + Humanize.frequency(bigfootPics, "took pictures of food"); +// "Bigfoot never took pictures of food" + +///////////////////// +// Utility methods // +///////////////////// + +/** + * toFixed + */ +Humanize.toFixed(0.615, 2); +// "0.62" + +/** + * normalizePrecision + */ +Humanize.normalizePrecision(-232.231); +// 232 diff --git a/types/humanize-plus/index.d.ts b/types/humanize-plus/index.d.ts new file mode 100644 index 0000000000..4b20ada3fd --- /dev/null +++ b/types/humanize-plus/index.d.ts @@ -0,0 +1,30 @@ +// Type definitions for humanize-plus 1.8 +// Project: https://github.com/HubSpot/humanize +// Definitions by: Denis Carriere +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// Numbers +export function formatNumber(number: number, decimals?: number): string; +export function intComma(number: number, decimals?: number): string; +export function compactInteger(number: number, decimals?: number): string; +export function boundedNumber(number: number, bounds?: number, ending?: string): string; +export function ordinal(value: number): string; +export function times(value: number, overrides?: any): string; +export function pace(value: number, intervalMs: number, unit?: string): string; +export function fileSize(filesize: number, precision?: number): string; +export function pluralize(number: number, singular?: string, plural?: string): string; + +// Strings +export function truncate(string: string, length?: number, ending?: string): string; +export function truncateWords(string: string, length?: number): string | null; +export function capitalize(string: string, downCaseTail?: boolean): string; +export function capitalizeAll(string: string): string; +export function titleCase(string: string): string; + +// Arrays +export function oxford(items: any[], limit?: number, limitStr?: string): string; +export function frequency(list: any[], verb?: string): string; + +// Utility methods +export function toFixed(value: number, precision?: number): string; +export function normalizePrecision(value: number, base?: number): number; diff --git a/types/humanize-plus/tsconfig.json b/types/humanize-plus/tsconfig.json new file mode 100644 index 0000000000..c79c7259f7 --- /dev/null +++ b/types/humanize-plus/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", + "humanize-plus-tests.ts" + ] +} diff --git a/types/humanize-plus/tslint.json b/types/humanize-plus/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/humanize-plus/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/i18n/i18n-tests.ts b/types/i18n/i18n-tests.ts index dc87c60a28..ac3813c934 100644 --- a/types/i18n/i18n-tests.ts +++ b/types/i18n/i18n-tests.ts @@ -1,18 +1,15 @@ /** * Test suite created by Maxime LUCE + * Updated by FindQ for version 0.8 of i18n-node * * Created by using code samples from https://github.com/mashpie/i18n-node. */ -/// - - - import express = require("express"); import i18n = require("i18n"); -var app = express(); -var req: express.Request; +const app = express(); +let req: express.Request; /** * Configuration @@ -25,20 +22,35 @@ i18n.configure({ i18n.configure({ // setup some locales - other locales default to en silently - locales: ['en', 'de'], + locales: [ 'en', 'de' ], + + // fall back from Dutch to German + fallbacks: { nl: 'de' }, // you may alter a site wide default locale defaultLocale: 'de', - // sets a custom cookie name to parse locale settings from - defaults to NULL + // sets a custom cookie name to parse locale settings from - defaults to NULL cookie: 'yourcookiename', + // query parameter to switch locale (ie. /home?lang=ch) - defaults to NULL + queryParameter: 'lang', + // where to store json files - defaults to './locales' relative to modules directory directory: './mylocales', + // controll mode on directory creation - defaults to NULL which defaults to umask of process user. Setting has no effect on win. + directoryPermissions: '755', + + // watch for changes in json files to reload locale on updates - defaults to false + autoReload: true, + // whether to write new locale information to disk - defaults to true updateFiles: false, + // sync locale information accros all files - defaults to false + syncFiles: false, + // what to use as the indentation unit - defaults to "\t" indent: "\t", @@ -49,27 +61,57 @@ i18n.configure({ prefix: 'webapp-', // enable object notation - objectNotation: false + objectNotation: false, + + // setting of log level DEBUG - default to require('debug')('i18n:debug') + logDebugFn: (msg) => { + console.log('debug', msg); + }, + + // setting of log level WARN - default to require('debug')('i18n:warn') + logWarnFn: (msg) => { + console.log('warn', msg); + }, + + // setting of log level ERROR - default to require('debug')('i18n:error') + logErrorFn: (msg) => { + console.log('error', msg); + }, + + // object or [obj1, obj2] to bind the i18n api and current locale to - defaults to null + register: global, + + // hash to specify different aliases for i18n's internal methods to apply on the request/response objects (method -> alias). + // note that this will *not* overwrite existing properties with the same name + api: { + __: 't', // now req.__ becomes req.t + __n: 'tn' // and req.__n can be called as req.tn + }, + + // Downcase locale when passed on queryParam; e.g. lang=en-US becomes + // en-us. When set to false, the queryParam value will be used as passed; + // e.g. lang=en-US remains en-US. + preserveLegacyCase: true }); /** * Usage in global scope * https://github.com/mashpie/i18n-node#example-usage-in-global-scope */ -var greeting = i18n.__('Hello'); +let greeting = i18n.__('Hello'); /** * Usage in Express * https://github.com/mashpie/i18n-node#example-usage-in-expressjs */ // Configuration -app.configure(function () { +app.configure(() => { // default: using 'accept-language' header to guess language settings app.use(i18n.init); }); -app.get('/de', function (_req, res) { - var greeting = res.__('Hello'); +app.get('/de', (_req: Express.Request, res: Express.Response) => { + let greeting = res.__('Hello'); }); /** @@ -109,6 +151,39 @@ i18n.__n({ singular: "%s cat", plural: "%s cats", locale: "fr" }, 3); // 3 chat i18n.__n({ singular: "%s cat", plural: "%s cats", locale: "fr", count: 1 }); // 1 chat i18n.__n({ singular: "%s cat", plural: "%s cats", locale: "fr", count: 3 }); // 3 chat +/** + * __mf() + * https://github.com/mashpie/i18n-node#i18n__mf + */ +app.get('/de', (_req: Express.Request, res: Express.Response) => { + // assume res is set to german + res.setLocale('de'); + + // start simple + res.__mf('Hello'); // --> Hallo + + // can replace too + res.__mf('Hello {name}', { name: 'Marcus' }); // --> Hallo Marcus + + // and combines with sprintf + res.__mf('Hello {name}, how was your %s?', 'test', { name: 'Marcus' }); // --> Hallo Marcus, wie war dein test? + + // now check out a plural rule + res.__mf('{N, plural, one{# cat} few{# cats} many{# cats} others{# cats}}', {N: 1}); +}); + +/** + * __l() + * https://github.com/mashpie/i18n-node#i18n__l + */ +i18n.__l('Hello'); // --> [ 'Hallo', 'Hello' ] + +/** + * __h() + * https://github.com/mashpie/i18n-node#i18n__h + */ +i18n.__h('Hello'); // --> [ { de: 'Hallo' }, { en: 'Hello' } ] + /** * setLocale() * https://github.com/mashpie/i18n-node#setlocale @@ -117,6 +192,15 @@ i18n.setLocale('de'); i18n.setLocale(req, 'de'); req.setLocale('de'); +app.get('/ar', (_req: Express.Request, res: Express.Response) => { + i18n.setLocale(req, 'ar'); + i18n.setLocale(res, 'ar'); + i18n.setLocale(res.locals, 'ar'); + + i18n.setLocale([req, res.locals], req.params.lang); + i18n.setLocale(res, 'ar', true); +}); + /** * getLocale() * https://github.com/mashpie/i18n-node#getlocale @@ -125,6 +209,12 @@ i18n.getLocale(); // --> de i18n.getLocale(req); // --> de req.getLocale(); // --> de +/** + * getLocales() + * https://github.com/mashpie/i18n-node#i18ngetlocales + */ +i18n.getLocales(); // --> ['en', 'de', 'en-GB'] + /** * getCatalog() * https://github.com/mashpie/i18n-node#getcatalog @@ -137,4 +227,3 @@ i18n.getCatalog(req, 'de'); // returns just 'de' req.getCatalog(); // returns all locales req.getCatalog('de'); // returns just 'de' - diff --git a/types/i18n/index.d.ts b/types/i18n/index.d.ts index 7c7697cc22..534b46b186 100644 --- a/types/i18n/index.d.ts +++ b/types/i18n/index.d.ts @@ -1,14 +1,29 @@ -// Type definitions for i18n-node 0.5.0 +// Type definitions for i18n-node 0.8 // Project: https://github.com/mashpie/i18n-node // Definitions by: Maxime LUCE +// FindQ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - declare namespace i18n { - export interface ConfigurationOptions { - /** Setup some locales - other locales default to en silently */ + interface ConfigurationOptions { + /** + * Setup some locales - other locales default to en silently + * @default [] + */ locales?: string[]; - /** Alter a site wide default locale */ + + /** + * Language fallback map + * @default {} + */ + fallbacks?: { + [locale: string]: string; + }; + + /** + * Alter a site wide default locale + * @default "en" + */ defaultLocale?: string; /** @@ -16,6 +31,13 @@ declare namespace i18n { * @default null */ cookie?: string; + + /** + * Query parameter to switch locale (ie. /home?lang=ch) + * @default null + */ + queryParameter?: string; + /** * Where to store json files, relative to modules directory * @default "./locales" @@ -23,11 +45,29 @@ declare namespace i18n { directory?: string; /** - * whether to write new locale information to disk + * Control mode on directory creation. Setting has no effect on win. + * @default null + */ + directoryPermissions?: string; + + /** + * Watch for changes in json files to reload locale on updates + * @default false + */ + autoReload?: boolean; + + /** + * Whether to write new locale information to disk * @default true */ updateFiles?: boolean; + /** + * Sync locale information across all files + * @default false + */ + syncFiles?: boolean; + /** * What to use as the indentation unit * @default "\t" @@ -40,6 +80,12 @@ declare namespace i18n { */ extension?: string; + /** + * Setting prefix of json files name (in case you use different locale files naming scheme (webapp-en.json), rather then just en.json) + * @default "" + */ + prefix?: string; + /** * Enable object notation * @default false @@ -47,36 +93,70 @@ declare namespace i18n { objectNotation?: boolean; /** - * json files prefix + * Setting of log level DEBUG + * @default require("debug")("i18n:debug") */ - prefix?: string; - + logDebugFn?: (msg: string) => void; + /** - * object or [obj1, obj2] to bind the i18n api and current locale to - defaults to null + * Setting of log level WARN + * @default require("debug")("i18n:warn") + */ + logWarnFn?: (msg: string) => void; + + /** + * Setting of log level ERROR + * @default require("debug")("i18n:error") + */ + logErrorFn?: (msg: string) => void; + + /** + * object or [obj1, obj2] to bind the i18n api and current locale to + * @default null */ register?: any; + + /** + * Hash to specify different aliases for i18n's internal methods to apply on the request/response objects (method -> alias). + * Note that this will *not* overwrite existing properties with the same name. + * @default undefined + */ + api?: { + [method: string]: string; + }; + + /** + * Downcase locale when passed on queryParam; e.g. lang=en-US becomes en-us. + * When set to false, the queryParam value will be used as passed; e.g. lang=en-US remains en-US. + * @default true + */ + preserveLegacyCase?: boolean; } - export interface TranslateOptions { + interface TranslateOptions { phrase: string; locale?: string; } - export interface PluralOptions { + interface PluralOptions { singular: string; plural: string; count?: number; locale?: string; } - export interface Replacements { + interface Replacements { [key: string]: string; } - export interface LocaleCatalog { + interface LocaleCatalog { [key: string]: string; } - export interface GlobalCatalog { + interface GlobalCatalog { [key: string]: LocaleCatalog; } + interface HashedList { + [key: string]: string; + } + /** * Configure current i18n instance * @param {ConfigurationOptions} options - configuration options for i18n @@ -89,42 +169,23 @@ declare namespace i18n { * @param {Express.Response} response - Current express response * @param {Function} next - Callback to continue process */ - function init(request: Express.Request, response: Express.Response, next?: Function): void; + function init(request: Express.Request, response: Express.Response, next?: () => void): void; //#region __() /** * Translate the given phrase using locale configuration - * @param {string} phrase - The phrase to translate + * @param {string | TranslateOptions} phraseOrOptions - The phrase to translate or options for translation * @returns {string} The translated phrase */ - function __(phrase: string, ...replace: string[]): string; + function __(phraseOrOptions: string | TranslateOptions, ...replace: string[]): string; /** * Translate the given phrase using locale configuration - * @param {string} phrase - The phrase to translate - * @param {Object} replacements - An object containing replacements + * @param {string | TranslateOptions} phraseOrOptions - The phrase to translate or options for translation + * @param {Replacements} replacements - An object containing replacements * @returns {string} The translated phrase */ - function __(phrase: string, replacements: Replacements): string; - /** - * Translate the given phrase using locale configuration - * @param {TranslateOptions} options - Options for translation - * @returns {string} The translated phrase - */ - function __(options: TranslateOptions): string; - /** - * Translate the given phrase using locale configuration - * @param {TranslateOptions} options - Options for translation - * @returns {string} The translated phrase - */ - function __(options: TranslateOptions, ...replace: string[]): string; - /** - * Translate the given phrase using locale configuration - * @param {TranslateOptions} options - Options for translation - * @param {Object} replacements - An object containing replacements - * @returns {string} The translated phrase - */ - function __(options: TranslateOptions, replacements: Replacements): string; + function __(phraseOrOptions: string | TranslateOptions, replacements: Replacements): string; //#endregion @@ -133,33 +194,58 @@ declare namespace i18n { /** * Translate with plural condition the given phrase and count using locale configuration * @param {PluralOptions} options - Options for plural translate + * @param {number} [count] - The number which allow to select from plural to singular * @returns {string} The translated phrase */ - function __n(options: PluralOptions): string; + function __n(options: PluralOptions, count?: number): string; + /** + * Translate with plural condition the given phrase and count using locale configuration + * @param {string} singular - The singular phrase to translate if count is <= 1 + * @param {string} plural - The plural phrase to translate if count is > 1 + * @param {number | string} count - The number which allow to select from plural to singular + * @returns {string} The translated phrase + */ + function __n(singular: string, plural: string, count: number | string): string; + + //#endregion + + //#region __mf() /** - * Translate with plural condition the given phrase and count using locale configuration - * @param {PluralOptions} options - Options for plural translate - * @param {number} count - The number which allow to select from plural to singular + * Translate the given phrase using locale configuration and MessageFormat + * @param {string | TranslateOptions} phraseOrOptions - The phrase to translate or options for translation * @returns {string} The translated phrase */ - function __n(options: PluralOptions, count: number): string; + function __mf(phraseOrOptions: string | TranslateOptions, ...replace: any[]): string; /** - * Translate with plural condition the given phrase and count using locale configuration - * @param {string} singular - The singular pharse to translate if count is <= 1 - * @param {string} plural - The plural pharse to translate if count is > 1 - * @param {number} count - The number which allow to select from plural to singular + * Translate the given phrase using locale configuration and MessageFormat + * @param {string | TranslateOptions} phraseOrOptions - The phrase to translate or options for translation + * @param {Replacements} replacements - An object containing replacements * @returns {string} The translated phrase */ - function __n(singular: string, plural: string, count: number): string; + function __mf(phraseOrOptions: string | TranslateOptions, replacements: Replacements): string; + + //#endregion + + //#region __l() + /** - * Translate with plural condition the given phrase and count using locale configuration - * @param {string} singular - The singular pharse to translate if count is <= 1 - * @param {string} plural - The plural pharse to translate if count is > 1 - * @param {number} count - The number which allow to select from plural to singular - * @returns {string} The translated phrase + * Returns a list of translations for a given phrase in each language. + * @param {string} phrase - The phrase to get translations in each language + * @returns {string[]} The phrase in each language */ - function __n(singular: string, plural: string, count: string): string; + function __l(phrase: string): string[]; + + //#endregion + + //#region __h() + + /** + * Returns a hashed list of translations for a given phrase in each language. + * @param {string} phrase - The phrase to get translations in each language + * @returns {HashedList[]} The phrase in each language + */ + function __h(phrase: string): HashedList[]; //#endregion @@ -171,23 +257,34 @@ declare namespace i18n { */ function setLocale(locale: string): void; /** - * Change the current active locale for specified request - * @param {Express.Request} request - The request to change locale on + * Change the current active locale for specified response + * @param {Express.Request | Express.Response} response - The request or response to change locale on * @param {string} locale - The locale to set as default + * @param {boolean} [inheritance=false] - Disables inheritance if true */ - function setLocale(request: Express.Request, locale: string): void; + // tslint:disable-next-line:unified-signatures + function setLocale(requestOrResponse: Express.Request | Express.Response, locale: string, inheritance?: boolean): void; + /** + * Change the current active locale for specified response + * @param {any | any[]} objects - The object(s) to change locale on + * @param {string} locale - The locale to set as default + * @param {boolean} [inheritance=false] - Disables inheritance if true + */ + // tslint:disable-next-line:unified-signatures + function setLocale(objects: any | any[], locale: string, inheritance?: boolean): void; - /** - * Get the current active locale - * @returns {string} The current locale in request - */ - function getLocale(): string; /** * Get the current active locale for specified request - * @param {Express.Request} request - The request to get locale for + * @param {Express.Request} [request] - The request to get locale for * @returns {string} The current locale in request */ - function getLocale(request: Express.Request): string; + function getLocale(request?: Express.Request): string; + + /** + * Get a list with all configured locales + * @returns {string[]} + */ + function getLocales(): string[]; //#endregion @@ -207,16 +304,10 @@ declare namespace i18n { /** * Get the current active locale catalog for specified request * @param {Express.Request} request - The request to get locale catalog for + * @param {string} [locale] - The locale to get catalog for * @returns {LocaleCatalog} The current locale catalog for the specified request */ - function getCatalog(request: Express.Request): LocaleCatalog; - /** - * Get the current locale catalog for specified request and specified locale - * @param {Express.Request} request - The request to get locale catalog for - * @param {string} locale - The locale to get catalog for - * @returns {LocaleCatalog} The specified locale catalog - */ - function getCatalog(request: Express.Request, locale: string): LocaleCatalog; + function getCatalog(request: Express.Request, locale?: string): LocaleCatalog; //#endregion @@ -230,7 +321,7 @@ declare namespace i18n { * Get current i18n-node version * @member {string} */ - var version: string; + const version: string; } interface i18nAPI { @@ -240,36 +331,17 @@ interface i18nAPI { /** * Translate the given phrase using locale configuration - * @param {string} phrase - The phrase to translate + * @param {string | TranslateOptions} phraseOrOptions - The phrase to translate or options for translation * @returns {string} The translated phrase */ - __(phrase: string, ...replace: string[]): string; + __(phraseOrOptions: string | i18n.TranslateOptions, ...replace: string[]): string; /** * Translate the given phrase using locale configuration - * @param {string} phrase - The phrase to translate - * @param {Object} replacements - An object containing replacements + * @param {string | TranslateOptions} phraseOrOptions - The phrase to translate or options for translation + * @param {i18n.Replacements} replacements - An object containing replacements * @returns {string} The translated phrase */ - __(phrase: string, replacements: i18n.Replacements): string; - /** - * Translate the given phrase using locale configuration - * @param {TranslateOptions} options - Options for translation - * @returns {string} The translated phrase - */ - __(options: i18n.TranslateOptions): string; - /** - * Translate the given phrase using locale configuration - * @param {TranslateOptions} options - Options for translation - * @returns {string} The translated phrase - */ - __(options: i18n.TranslateOptions, ...replace: string[]): string; - /** - * Translate the given phrase using locale configuration - * @param {TranslateOptions} options - Options for translation - * @param {Object} replacements - An object containing replacements - * @returns {string} The translated phrase - */ - __(options: i18n.TranslateOptions, replacements: i18n.Replacements): string; + __(phraseOrOptions: string | i18n.TranslateOptions, replacements: i18n.Replacements): string; //#endregion @@ -278,33 +350,58 @@ interface i18nAPI { /** * Translate with plural condition the given phrase and count using locale configuration * @param {PluralOptions} options - Options for plural translate + * @param {number} [count] - The number which allow to select from plural to singular * @returns {string} The translated phrase */ - __n(options: i18n.PluralOptions): string; + __n(options: i18n.PluralOptions, count?: number): string; + /** + * Translate with plural condition the given phrase and count using locale configuration + * @param {string} singular - The singular phrase to translate if count is <= 1 + * @param {string} plural - The plural phrase to translate if count is > 1 + * @param {number | string} count - The number which allow to select from plural to singular + * @returns {string} The translated phrase + */ + __n(singular: string, plural: string, count: number | string): string; + + //#endregion + + //#region __mf() /** - * Translate with plural condition the given phrase and count using locale configuration - * @param {PluralOptions} options - Options for plural translate - * @param {number} count - The number which allow to select from plural to singular + * Translate the given phrase using locale configuration and MessageFormat + * @param {string | TranslateOptions} phraseOrOptions - The phrase to translate or options for translation * @returns {string} The translated phrase */ - __n(options: i18n.PluralOptions, count: number): string; + __mf(phraseOrOptions: string | i18n.TranslateOptions, ...replace: any[]): string; /** - * Translate with plural condition the given phrase and count using locale configuration - * @param {string} singular - The singular pharse to translate if count is <= 1 - * @param {string} plural - The plural pharse to translate if count is > 1 - * @param {number} count - The number which allow to select from plural to singular + * Translate the given phrase using locale configuration and MessageFormat + * @param {string | TranslateOptions} phraseOrOptions - The phrase to translate or options for translation + * @param {i18n.Replacements} replacements - An object containing replacements * @returns {string} The translated phrase */ - __n(singular: string, plural: string, count: number): string; + __mf(phraseOrOptions: string | i18n.TranslateOptions, replacements: i18n.Replacements): string; + + //#endregion + + //#region __l() + /** - * Translate with plural condition the given phrase and count using locale configuration - * @param {string} singular - The singular pharse to translate if count is <= 1 - * @param {string} plural - The plural pharse to translate if count is > 1 - * @param {number} count - The number which allow to select from plural to singular - * @returns {string} The translated phrase + * Returns a list of translations for a given phrase in each language. + * @param {string} phrase - The phrase to get translations in each language + * @returns {string[]} The phrase in each language */ - __n(singular: string, plural: string, count: string): string; + __l(phrase: string): string[]; + + //#endregion + + //#region __h() + + /** + * Returns a hashed list of translations for a given phrase in each language. + * @param {string} phrase - The phrase to get translations in each language + * @returns {HashedList[]} The phrase in each language + */ + __h(phrase: string): i18n.HashedList[]; //#endregion @@ -313,6 +410,7 @@ interface i18nAPI { * @returns {string} The current locale in request */ getLocale(): string; + /** * Change the current active locale * @param {string} locale - The locale to set as default @@ -329,7 +427,7 @@ interface i18nAPI { * @param {string} locale - The locale to get catalog for * @returns {LocaleCatalog} The specified locale catalog */ - getCatalog(locale: string): i18n.LocaleCatalog; + getCatalog(locale?: string): i18n.LocaleCatalog; } declare module "i18n" { @@ -337,13 +435,14 @@ declare module "i18n" { } declare namespace Express { - export interface Request extends i18nAPI { + interface Request extends i18nAPI { languages: string[]; regions: string[]; language: string; region: string; } - export interface Response extends i18nAPI { - locals: i18nAPI + + interface Response extends i18nAPI { + locals: i18nAPI; } } diff --git a/types/i18n/tslint.json b/types/i18n/tslint.json new file mode 100644 index 0000000000..bd50eb1958 --- /dev/null +++ b/types/i18n/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "prefer-method-signature": false, + "no-single-declare-module": false + } +} diff --git a/types/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts b/types/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts index 9f36a7d538..eadfcea369 100644 --- a/types/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts +++ b/types/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts @@ -1,31 +1,40 @@ -import * as i18next from 'i18next'; -import LngDetector from 'i18next-browser-languagedetector'; +import * as i18next from "i18next"; +import * as LngDetector from "i18next-browser-languagedetector"; -var options = { +const options: LngDetector.DetectorOptions = { // order and from where user language should be detected - order: ['querystring', 'cookie', 'localStorage', 'navigator'], + order: ["querystring", "cookie", "localStorage", "navigator", "htmlTag"], // keys or params to lookup language from - lookupQuerystring: 'lng', - lookupCookie: 'i18next', - lookupLocalStorage: 'i18nextLng', + lookupQuerystring: "lng", + lookupCookie: "i18next", + lookupLocalStorage: "i18nextLng", // cache user language on - caches: ['localStorage', 'cookie'], + caches: ["localStorage", "cookie"], + excludeCacheFor: ["cimode"], // languages to not persist (cookie, localStorage) // optional expire and domain for set cookie cookieMinutes: 10, - cookieDomain: 'myDomain' -}; -var myDetector = { - name: 'myDetectorsName', + cookieDomain: "myDomain", - lookup(options: Object) { + // optional htmlTag with lang attribute, the default is: + htmlTag: document.documentElement +}; + +i18next.use(LngDetector).init({ + detection: options +}); + +const customDetector: LngDetector.CustomDetector = { + name: "myDetectorsName", + + lookup(options: LngDetector.DetectorOptions) { // options -> are passed in options - return 'en'; + return "en"; }, - cacheUserLanguage(lng: string, options: Object) { + cacheUserLanguage(lng: string, options: LngDetector.DetectorOptions) { // options -> are passed in options // lng -> current language, will be called after init and on changeLanguage @@ -33,10 +42,20 @@ var myDetector = { } }; -i18next.use(LngDetector).init({ - detection: options -}); +const customDetector2: LngDetector.CustomDetector = { + name: "myDetectorsName", + lookup(options: LngDetector.DetectorOptions) { + return undefined; + } +}; const lngDetector = new LngDetector(null, options); + lngDetector.init(options); -lngDetector.addDetector(myDetector); +lngDetector.addDetector(customDetector); + +i18next + .use(lngDetector) + .init({ + detection: options + }); diff --git a/types/i18next-browser-languagedetector/index.d.ts b/types/i18next-browser-languagedetector/index.d.ts index 906910fa49..1e85fd81e4 100644 --- a/types/i18next-browser-languagedetector/index.d.ts +++ b/types/i18next-browser-languagedetector/index.d.ts @@ -1,86 +1,64 @@ -// Type definitions for i18next-browser-languagedetector 0.0.14 +// Type definitions for i18next-browser-languagedetector 2.0 // Project: http://i18next.com/ -// Definitions by: Cyril Schumacher +// Definitions by: Cyril Schumacher , Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// - -declare namespace I18next { - interface I18nextStatic extends i18nextBrowserLanguageDetector.I18nextStatic { } - interface I18nextOptions extends i18nextBrowserLanguageDetector.I18nextOptions { } -} - declare namespace i18nextBrowserLanguageDetector { - /** - * @summary Interface for Language detector options. - * @interface - */ - interface LanguageDetectorOptions { - caches?: Array|boolean; - cookieDomain?: string; - cookieExpirationDate?: Date; - lookupCookie?: string; - lookupFromPathIndex?: number; + interface DetectorOptions { + /** + * order and from where user language should be detected + */ + order?: Array<"querystring" | "cookie" | "localStorage" | "navigator" | "htmlTag" | string>; + + /** + * keys or params to lookup language from + */ lookupQuerystring?: string; - lookupSession?: string; - order?: Array; + lookupCookie?: string; + lookupLocalStorage?: string; + + /** + * cache user language on + */ + caches?: string[]; + + /** + * languages to not persist (cookie, localStorage) + */ + excludeCacheFor?: string[]; + + /** + * optional expire and domain for set cookie + * @default 10 + */ + cookieMinutes?: number; + cookieDomain?: string; + + /** + * optional htmlTag with lang attribute + * @default document.documentElement + */ + htmlTag?: HTMLElement; } - /** - * @summary Interface for custom detector. - * @interface - */ interface CustomDetector { name: string; - - //todo: Checks paramters type. - cacheUserLanguage: (lng: string, options: Object) => void; - lookup: (options: Object) => string; - } - - /** - * @summary i18next options. - * @interface - */ - interface I18nextOptions { - detection?: LanguageDetectorOptions; - } - - /** - * @summary i18next interface. - * @interface - */ - interface I18nextStatic { - use(module: LngDetector): I18nextStatic; - } - - /** - * @summary i18next language detection. - * @class - */ - class LngDetector { - /** - * @summary Constructor. - * @constructor - */ - constructor(services?: any, options?: LanguageDetectorOptions); - - /** - * @summary Adds detector. - * @param {CustomDetector} detector The custom detector. - */ - addDetector(detector: CustomDetector): LngDetector; - - /** - * @summary Initializes detector. - * @param {LanguageDetectorOptions} options The options. - */ - init(options?: LanguageDetectorOptions): void; + cacheUserLanguage?(lng: string, options: DetectorOptions): void; + lookup(options: DetectorOptions): string | undefined; } } -declare module "i18next-browser-languagedetector" { +declare class i18nextBrowserLanguageDetector { + constructor(services?: any, options?: i18nextBrowserLanguageDetector.DetectorOptions); + /** + * Adds detector. + */ + addDetector(detector: i18nextBrowserLanguageDetector.CustomDetector): i18nextBrowserLanguageDetector; - export default i18nextBrowserLanguageDetector.LngDetector; + /** + * Initializes detector. + */ + init(options?: i18nextBrowserLanguageDetector.DetectorOptions): void; } + +export = i18nextBrowserLanguageDetector; diff --git a/types/i18next-browser-languagedetector/tsconfig.json b/types/i18next-browser-languagedetector/tsconfig.json index 15c0de0371..eeb1bd7670 100644 --- a/types/i18next-browser-languagedetector/tsconfig.json +++ b/types/i18next-browser-languagedetector/tsconfig.json @@ -2,11 +2,12 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -19,4 +20,4 @@ "index.d.ts", "i18next-browser-languagedetector-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/i18next-browser-languagedetector/tslint.json b/types/i18next-browser-languagedetector/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/i18next-browser-languagedetector/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/i18next-browser-languagedetector/v0/i18next-browser-languagedetector-tests.ts b/types/i18next-browser-languagedetector/v0/i18next-browser-languagedetector-tests.ts new file mode 100644 index 0000000000..0217ca74ce --- /dev/null +++ b/types/i18next-browser-languagedetector/v0/i18next-browser-languagedetector-tests.ts @@ -0,0 +1,42 @@ +import * as i18next from 'i18next'; +import LngDetector from 'i18next-browser-languagedetector'; + +const options = { + // order and from where user language should be detected + order: ['querystring', 'cookie', 'localStorage', 'navigator'], + + // keys or params to lookup language from + lookupQuerystring: 'lng', + lookupCookie: 'i18next', + lookupLocalStorage: 'i18nextLng', + + // cache user language on + caches: ['localStorage', 'cookie'], + + // optional expire and domain for set cookie + cookieMinutes: 10, + cookieDomain: 'myDomain' +}; +const myDetector = { + name: 'myDetectorsName', + + lookup(options: {}) { + // options -> are passed in options + return 'en'; + }, + + cacheUserLanguage(lng: string, options: {}) { + // options -> are passed in options + // lng -> current language, will be called after init and on changeLanguage + + // store it + } +}; + +i18next.use(LngDetector).init({ + detection: options +}); + +const lngDetector = new LngDetector(null, options); +lngDetector.init(options); +lngDetector.addDetector(myDetector); diff --git a/types/i18next-browser-languagedetector/v0/index.d.ts b/types/i18next-browser-languagedetector/v0/index.d.ts new file mode 100644 index 0000000000..424573f9b8 --- /dev/null +++ b/types/i18next-browser-languagedetector/v0/index.d.ts @@ -0,0 +1,82 @@ +// Type definitions for i18next-browser-languagedetector 0.0 +// Project: http://i18next.com/ +// Definitions by: Cyril Schumacher , Giedrius Grabauskas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as i18next from "i18next"; + +declare namespace I18next { + interface I18nextStatic extends i18nextBrowserLanguageDetector.I18nextStatic { } + interface I18nextOptions extends i18nextBrowserLanguageDetector.I18nextOptions { } +} + +declare namespace i18nextBrowserLanguageDetector { + /** + * @summary Interface for Language detector options. + * @interface + */ + interface LanguageDetectorOptions { + caches?: string[] | boolean; + cookieDomain?: string; + cookieExpirationDate?: Date; + lookupCookie?: string; + lookupFromPathIndex?: number; + lookupQuerystring?: string; + lookupSession?: string; + order?: string[]; + } + + /** + * @summary Interface for custom detector. + * @interface + */ + interface CustomDetector { + name: string; + + // todo: Checks paramters type. + cacheUserLanguage(lng: string, options: {}): void; + lookup(options: {}): string; + } + + /** + * @summary i18next options. + * @interface + */ + interface I18nextOptions { + detection?: LanguageDetectorOptions; + } + + /** + * @summary i18next interface. + * @interface + */ + interface I18nextStatic { + use(module: LngDetector): I18nextStatic; + } + + /** + * @summary i18next language detection. + * @class + */ + class LngDetector { + /** + * @summary Constructor. + * @constructor + */ + constructor(services?: any, options?: LanguageDetectorOptions); + + /** + * @summary Adds detector. + * @param {CustomDetector} detector The custom detector. + */ + addDetector(detector: CustomDetector): LngDetector; + + /** + * @summary Initializes detector. + * @param {LanguageDetectorOptions} options The options. + */ + init(options?: LanguageDetectorOptions): void; + } +} + +export default i18nextBrowserLanguageDetector.LngDetector; diff --git a/types/i18next-browser-languagedetector/v0/tsconfig.json b/types/i18next-browser-languagedetector/v0/tsconfig.json new file mode 100644 index 0000000000..61e38c316d --- /dev/null +++ b/types/i18next-browser-languagedetector/v0/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "i18next-browser-languagedetector": [ + "i18next-browser-languagedetector/v0" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "i18next-browser-languagedetector-tests.ts" + ] +} diff --git a/types/i18next-browser-languagedetector/v0/tslint.json b/types/i18next-browser-languagedetector/v0/tslint.json new file mode 100644 index 0000000000..af6baaddc0 --- /dev/null +++ b/types/i18next-browser-languagedetector/v0/tslint.json @@ -0,0 +1,11 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [ + false + ], + "no-empty-interface": [ + false + ] + } +} diff --git a/types/i18next-xhr-backend/i18next-xhr-backend-tests.ts b/types/i18next-xhr-backend/i18next-xhr-backend-tests.ts index 9c12809271..858b2b28f9 100644 --- a/types/i18next-xhr-backend/i18next-xhr-backend-tests.ts +++ b/types/i18next-xhr-backend/i18next-xhr-backend-tests.ts @@ -1,18 +1,30 @@ -import * as i18next from 'i18next'; -import XHR from 'i18next-xhr-backend'; +import * as i18next from "i18next"; +import * as XHR from "i18next-xhr-backend"; -let options = { - loadPath: '', - addPath: '', +const options: XHR.BackendOptions = { + loadPath: "/locales/{{lng}}/{{ns}}.json", + addPath: "locales/add/{{lng}}/{{ns}}", allowMultiLoading: false, - parse: function(data:string) { return data.replace(/a/g, ''); }, + parse: (data: string) => data.replace(/a/g, ""), crossDomain: false, withCredentials: false, - ajax: function (url:string, options:Object, callback: Function, data: Object) {} + ajax: (url: string, options: XHR.BackendOptions, callback: XHR.AjaxRequestCallback, data: {}) => { }, + queryStringParams: { v: "1.3.5" } }; -i18next.use(XHR).init({ - backend: options -}); +i18next + .use(XHR) + .init({ + backend: options + }); -let xhr = new XHR(null, options); \ No newline at end of file +const xhr = new XHR(); +xhr.init(options); +const xhr2 = new XHR(null, options); +const type: string = xhr.type; +const newOptions: XHR.BackendOptions = xhr.options; +xhr.create("en", "ns", "key", "value"); +xhr.create(["en", "us"], "ns", "key", "value"); +xhr.read("en", "ns", (error: any, result: string | false) => { }); +xhr.readMulti(["en"], ["ns"], (error: any, result: string | false) => { }); +xhr.loadUrl("someurl", (error: any, result: string) => { }); diff --git a/types/i18next-xhr-backend/index.d.ts b/types/i18next-xhr-backend/index.d.ts index d1c95a0bd3..a3190ca878 100644 --- a/types/i18next-xhr-backend/index.d.ts +++ b/types/i18next-xhr-backend/index.d.ts @@ -1,36 +1,74 @@ -// Type definitions for i18next-xhr-backend 1.2.0 +// Type definitions for i18next-xhr-backend 1.4 // Project: https://github.com/i18next/i18next-xhr-backend -// Definitions by: Jan Mühlemann +// Definitions by: Jan Mühlemann , Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module 'i18next-xhr-backend' { - - interface Interpolator { - interpolate: () => string - } - interface Services { - interpolator: Interpolator - } +declare namespace I18NextXhrBackend { + type LoadPathOption = string | ((lngs: string[], namespaces: string[]) => string); interface BackendOptions { - loadPath?: string | Function, - addPath?: string, - allowMultiLoading?: boolean, - parse?: Function, - crossDomain?: boolean, - withCredentials?: boolean, - ajax?: Function + /** + * path where resources get loaded from, or a function + * returning a path: + * function(lngs, namespaces) { return customPath; } + * the returned path will interpolate lng, ns if provided like giving a static path + */ + loadPath?: LoadPathOption; + /** + * path to post missing resources + */ + addPath?: string; + /** + * your backend server supports multiLoading + * locales/resources.json?lng=de+en&ns=ns1+ns2 + * set loadPath: '/locales/resources.json?lng={{lng}}&ns={{ns}}' to adapt to multiLoading + */ + allowMultiLoading?: boolean; + /** + * parse data after it has been fetched + * in example use https://www.npmjs.com/package/json5 + * here it removes the letter a from the json (bad idea) + */ + parse?(data: string): string; + /** + * allow cross domain requests + */ + crossDomain?: boolean; + /** + * allow credentials on cross domain requests + */ + withCredentials?: boolean; + /** + * define a custom xhr function + * can be used to support XDomainRequest in IE 8 and 9 + */ + ajax?(url: string, options: BackendOptions, callback: AjaxRequestCallback, data: {} | string, cache: boolean): void; + /** + * adds parameters to resource URL. 'example.com' -> 'example.com?v=1.3.5' + */ + queryStringParams?: { [key: string]: string }; + + /** + * @see https://github.com/i18next/i18next-xhr-backend/blob/281c7e235e1157b33122adacef1957252e5700f1/src/ajax.js#L52 + */ + customHeaders?: { [key: string]: string }; } - export default class Backend { - type: 'backend'; - services: Services; - options: BackendOptions; - constructor(services?: Services, options?: BackendOptions); - init(services?: Services, options?: BackendOptions): void; - readMulti(languages: any[], namespaces: any[], callback: Function): void; - read(language: {}, namespace: {}, callback: Function): void; - loadUrl(url: string, callback: Function): void; - create(languages: any[], namespace: string, key: string, fallbackValue: string): void; - } -} \ No newline at end of file + type AjaxRequestCallback = (response: string, x: XMLHttpRequest) => void; + + type LoadCallback = (error: any, result: string | false) => void; +} + +declare class I18NextXhrBackend { + constructor(services?: any, options?: I18NextXhrBackend.BackendOptions); + init(options?: I18NextXhrBackend.BackendOptions): void; + readMulti(languages: string[], namespaces: string[], callback: I18NextXhrBackend.LoadCallback): void; + read(language: string, namespace: string, callback: I18NextXhrBackend.LoadCallback): void; + loadUrl(url: string, callback: I18NextXhrBackend.LoadCallback): void; + create(languages: string | string[], namespace: string, key: string, fallbackValue: string): void; + type: "backend"; + services: any; + options: I18NextXhrBackend.BackendOptions; +} + +export = I18NextXhrBackend; diff --git a/types/i18next-xhr-backend/tsconfig.json b/types/i18next-xhr-backend/tsconfig.json index 2b08241bb5..f6f93640ce 100644 --- a/types/i18next-xhr-backend/tsconfig.json +++ b/types/i18next-xhr-backend/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, @@ -19,4 +20,4 @@ "index.d.ts", "i18next-xhr-backend-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/i18next-xhr-backend/tslint.json b/types/i18next-xhr-backend/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/i18next-xhr-backend/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/i18next/i18next-tests.ts b/types/i18next/i18next-tests.ts index 2d3f6d3b04..cdf30bb9c1 100644 --- a/types/i18next/i18next-tests.ts +++ b/types/i18next/i18next-tests.ts @@ -1,8 +1,3 @@ -/// -/// -/// -/// - import i18n = require("i18next"); i18n.init({ @@ -11,13 +6,14 @@ i18n.init({ en: { translation: { helloWorld: 'Hello, world!', - helloWorldInterpolated: 'Hello, {{name}}!' + helloWorldInterpolated: 'Hello, {{name}}!', + uppercaseFormatted: '{{text^uppercase}} just uppercased', } }, ru: { translation: { helloWorld: 'Привет, мир!', - helloWorldInterpolated: 'Привет, {{name}}!' + helloWorldInterpolated: 'Привет, {{name}}!', } } }, @@ -36,23 +32,29 @@ i18n.init({ contextSeparator: '_', saveMissing: true, saveMissingTo: 'all', - missingKeyHandler: (lng:string, ns:string, key:string, fallbackValue:string) => { + missingKeyHandler: (lng: string, ns: string, key: string, fallbackValue: string) => { console.log('Lng: ' + lng + ', ns: ' + ns + ', key' + key + ', fallbackValue: ' + fallbackValue); }, - parseMissingKeyHandler: (key:string) => { + parseMissingKeyHandler: (key: string) => { console.log(key); }, appendNamespaceToMissingKey: true, returnNull: false, returnEmptyString: false, returnObjects: false, - returnedObjectHandler: (key:string, value:string, options:any) => { + returnedObjectHandler: (key: string, value: string, options: any) => { }, joinArrays: '\n', - overloadTranslationOptionHandler: (args:any[]) => { + overloadTranslationOptionHandler: (args: any[]) => { return {} }, - interpolation: {}, + interpolation: { + format: function(value, format, lng) { + if (format === 'uppercase') return value.toUpperCase(); + return value; + }, + formatSeparator: '^', + }, detection: null, backend: null, cache: null, @@ -82,6 +84,10 @@ i18n.t('helloWorldInterpolated', { name: "world" }); +i18n.t('uppercaseFormatted', { + text: 'can you hear me', +}); + i18n.t('helloSingleFallbackLng', { fallbackLng: 'en' }); diff --git a/types/i18next/index.d.ts b/types/i18next/index.d.ts index 1cacdeb7c3..8ea39a6352 100644 --- a/types/i18next/index.d.ts +++ b/types/i18next/index.d.ts @@ -1,11 +1,10 @@ -// Type definitions for i18next v2.3.5 +// Type definitions for i18next v8.4.2 // Project: http://i18next.com // Definitions by: Michael Ledin , Budi Irawan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Sources: https://github.com/i18next/i18next/ - declare namespace i18n { interface ResourceStore { [language: string]: ResourceStoreLanguage; @@ -25,7 +24,12 @@ declare namespace i18n { type FallbackLng = string | string[] | FallbackLngObjList; + type FormatFunction = (value: any, format: string, lng: string) => string; + interface InterpolationOptions { + format?: FormatFunction; + formatSeparator?: string; + escape?: (str: string) => string; escapeValue?: boolean; prefix?: string; suffix?: string; @@ -99,40 +103,28 @@ declare namespace i18n { } type TranslationFunction = (key: string, options?: TranslationOptions) => string; + type LoadCallback = (error: any, t: TranslationFunction) => void; interface I18n { - //constructor(options?: Options, callback?: (err: any, t: TranslationFunction) => void); - - init(options?: Options&ReactOptions, callback?: (err: any, t: TranslationFunction) => void): I18n; - - loadResources(callback?: (err: any) => void): void; - - language: string; - - languages: string[]; - + // api + init(options?: Options & ReactOptions, callback?: LoadCallback): I18n; use(module: any): I18n; - - changeLanguage(lng: string, callback?: (err: any, t: TranslationFunction) => void): void; - - getFixedT(lng?: string, ns?: string | string[]): TranslationFunction; - - t(key: string, options?: TranslationOptions): string | any | Array; - + t(key: string, options?: TranslationOptions): string | any | any[]; exists(key: string, options?: TranslationOptions): boolean; - + getFixedT(lng?: string, ns?: string | string[]): TranslationFunction; + changeLanguage(lng: string, callback?: LoadCallback): void; + language: string; + languages: string[]; + loadNamespaces(ns: string[], callback?: LoadCallback): void; + loadLanguages(lngs: string[], callback?: LoadCallback): void; + reloadResources(lng?: string[], ns?: string[]): void; setDefaultNamespace(ns: string): void; - - loadNamespaces(ns: string[], callback?: () => void): void; - - loadLanguages(lngs: string[], callback?: () => void): void; - dir(lng?: string): string; - - createInstance(options?: Options, callback?: (err: any, t: TranslationFunction) => void): I18n; - - cloneInstance(options?: Options, callback?: (err: any, t: TranslationFunction) => void): I18n; - + format: FormatFunction; // introduced in v8.4.0; + // instance creation + createInstance(options?: Options, callback?: LoadCallback): I18n; + cloneInstance(options?: Options, callback?: LoadCallback): I18n; + // events on(event: string, listener: () => void): void; on(initialized: 'initialized', listener: (options: i18n.Options) => void): void; on(loaded: 'loaded', listener: (loaded: any) => void): void; @@ -141,8 +133,20 @@ declare namespace i18n { on(added: 'added', listener: (lng: string, ns: string) => void): void; on(removed: 'removed', listener: (lng: string, ns: string) => void): void; on(languageChanged: 'languageChanged', listener: (lng: string) => void): void; - off(event: string, listener: () => void): void; + // resource handling + getResource(lng: string, ns: string, key: string, options?: { + keySeparator?: string, + }): ResourceStore; + addResource(lng: string, ns: string, key: string, value: string, options?: { + keySeparator?: string, + silent?: boolean, + }): void; + addResources(lng: string, ns: string, resources: ResourceStore): void; + addResourceBundle(lng: string, ns: string, resources: ResourceStore, deep: boolean, overwrite: boolean): void; + hasResourceBundle(lng: string, ns: string): boolean; + getResourceBundle(lng: string, ns: string): ResourceStore; + removeResourceBundle(lng: string, ns: string): void; options: Options; } diff --git a/types/ibm-mobilefirst/index.d.ts b/types/ibm-mobilefirst/index.d.ts index 957d9075e0..4da0cbf3b1 100644 --- a/types/ibm-mobilefirst/index.d.ts +++ b/types/ibm-mobilefirst/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.ibm.com/software/products/en/mobilefirstfoundation // Definitions by: Guillermo Ignacio Enriquez Gutierrez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/icheck/index.d.ts b/types/icheck/index.d.ts index fb03ef9704..ea97f646a9 100644 --- a/types/icheck/index.d.ts +++ b/types/icheck/index.d.ts @@ -2,6 +2,7 @@ // Project: http://damirfoy.com/iCheck/ // Definitions by: Dániel Tar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 interface ICheckOptions { /** diff --git a/types/iframe-resizer/iframe-resizer-tests.ts b/types/iframe-resizer/iframe-resizer-tests.ts new file mode 100644 index 0000000000..d127f8bf36 --- /dev/null +++ b/types/iframe-resizer/iframe-resizer-tests.ts @@ -0,0 +1,32 @@ +import {IFrameComponent, IFrameOptions, iframeResizer} from "iframe-resizer"; + +function testOne(): void { + let iframe: HTMLIFrameElement = document.createElement('iframe'); + let options: IFrameOptions = {log: true}; + let components: IFrameComponent[] = iframeResizer(options, iframe); + if (components) { + components.forEach(component => console.log(component.iFrameResizer)); + } else { + console.log("No components"); + } +} + +function testTwo(): void { + let iframe: HTMLIFrameElement = document.createElement('iframe'); + let components: IFrameComponent[] = iframeResizer({ + initCallback: () => { + console.log('Init'); + }, + closedCallback: () => { + console.log('Closed'); + } + }, iframe); + if (components) { + components.forEach(component => console.log(component.iFrameResizer)); + } else { + console.log("No components"); + } +} + +testOne(); +testTwo(); diff --git a/types/iframe-resizer/index.d.ts b/types/iframe-resizer/index.d.ts new file mode 100644 index 0000000000..1a05833692 --- /dev/null +++ b/types/iframe-resizer/index.d.ts @@ -0,0 +1,196 @@ +// Type definitions for iframe-resizer 3.5 +// Project: https://github.com/davidjbradshaw/iframe-resizer +// Definitions by: Armin Baljic +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// tslint:disable:prefer-method-signature +// tslint:disable-next-line:no-single-declare-module +declare module 'iframe-resizer' { + // tslint:disable-next-line:interface-name + interface IFrameObject { + close(): void; + moveToAnchor(anchor: string): void; + resize(): void; + sendMessage(message: any): void; + } + + // tslint:disable-next-line:interface-name + interface IFrameComponent extends HTMLIFrameElement { + iFrameResizer: IFrameObject; + } + + // tslint:disable-next-line:interface-name + interface IFrameOptions { + /** + * When enabled changes to the Window size or the DOM will cause the iFrame to resize to the new content size. + * Disable if using size method with custom dimensions. + */ + autoResize?: boolean; + /** + * Override the body background style in the iFrame. + */ + bodyBackground?: string; + /** + * Override the default body margin style in the iFrame. A string can be any valid value for the + * CSS margin attribute, for example '8px 3em'. A number value is converted into px. + */ + bodyMargin?: number; + /** + * When set to true, only allow incoming messages from the domain listed in the src property of the iFrame tag. + * If your iFrame navigates between different domains, ports or protocols; then you will need to + * provide an array of URLs or disable this option. + */ + checkOrigin?: boolean; + /** + * When enabled in page linking inside the iFrame and from the iFrame to the parent page will be enabled. + */ + inPageLinks?: boolean; + /** + * Height calculation method. + */ + heightCalculationMethod?: string; + /** + * Set iFrame Id + */ + id?: string; + /** + * In browsers that don't support mutationObserver, such as IE10, the library falls back to using + * setInterval, to check for changes to the page size. + */ + interval?: number; + /** + * Setting the log option to true will make the scripts in both the host page and the iFrame output + * everything they do to the JavaScript console so you can see the communication between the two scripts. + */ + log?: boolean; + /** + * Set maximum height of iFrame. + */ + maxHeight?: number; + /** + * Set maximum width of iFrame. + */ + maxWidth?: number; + /** + * Set minimum height of iFrame. + */ + minHeight?: number; + /** + * Set minimum width of iFrame. + */ + minWidth?: number; + /** + * Listen for resize events from the parent page, or the iFrame. Select the 'child' value if the iFrame + * can be resized independently of the browser window. Selecting this value can cause issues with some + * height calculation methods on mobile devices. + */ + resizeFrom?: string; + /** + * Enable scroll bars in iFrame. + */ + scrolling?: boolean; + /** + * Resize iFrame to content height. + */ + sizeHeight?: boolean; + /** + * Resize iFrame to content width. + */ + sizeWidth?: boolean; + /** + * Set the number of pixels the iFrame content size has to change by, before triggering a resize of the iFrame. + */ + tolerance?: number; + /** + * Width calculation method. + */ + widthCalculationMethod?: string; + /** + * Called when iFrame is closed via parentIFrame.close() or iframe.iframeResizer.close() methods. + */ + closedCallback?: (iframeId?: string) => void; + /** + * Initial setup callback function. + */ + initCallback?: (iframe?: IFrameComponent) => void; + /** + * Receive message posted from iFrame with the parentIFrame.sendMessage() method. + */ + messageCallback?: (data: IFrameMessageData) => void; + /** + * Function called after iFrame resized. Passes in messageData object containing the iFrame, height, width + * and the type of event that triggered the iFrame to resize. + */ + resizedCallback?: (data: IFrameResizedData) => void; + /** + * Called before the page is repositioned after a request from the iFrame, due to either an in page link, + * or a direct request from either parentIFrame.scrollTo() or parentIFrame.scrollToOffset(). + * If this callback function returns false, it will stop the library from repositioning the page, so that + * you can implement your own animated page scrolling instead. + */ + scrollCallback?: (data: IFrameScrollData) => boolean; + } + + // tslint:disable-next-line:interface-name + interface IFramePageOptions { + /** + * This option allows you to restrict the domain of the parent page, + * to prevent other sites mimicking your parent page. + */ + targetOrigin?: string; + /** + * Receive message posted from the parent page with the iframe.iFrameResizer.sendMessage() method. + */ + messageCallback?: (message: any) => void; + /** + * This function is called once iFrame-Resizer has been initialized after receiving a call from the parent page. + */ + readyCallback?: () => void; + /** + * These option can be used to override the option set in the parent page + */ + heightCalculationMethod?: string; + /** + * These option can be used to override the option set in the parent page + */ + widthCalculationMethod?: string; + } + + // tslint:disable-next-line:interface-name + interface IFramePage { + autoResize(resize?: boolean): boolean; + close(): void; + getId(): string; + getPageInfo(callback: (data: any) => void | false): void; + scrollTo(x: number, y: number): void; + scrollToOffset(x: number, y: number): void; + sendMessage(message: any, targetOrigin: string): void; + setHeightCalculationMethod(method: string): void; + setWidthCalculationMethod(method: string): void; + setTargetOrigin(targetOrigin: string): void; + size(customHeight: string, customWidth: string): void; + } + + // tslint:disable-next-line:interface-name + interface IFrameResizedData { + iframe: IFrameComponent; + height: number; + width: number; + type: string; + } + + // tslint:disable-next-line:interface-name + interface IFrameMessageData { + iframe: IFrameComponent; + message: string; + } + + // tslint:disable-next-line:interface-name + interface IFrameScrollData { + x: number; + y: number; + } + + function iframeResizer(options: IFrameOptions, target: HTMLElement): IFrameComponent[]; +} +// tslint:enable:prefer-method-signature diff --git a/types/iframe-resizer/tsconfig.json b/types/iframe-resizer/tsconfig.json new file mode 100644 index 0000000000..d2b812a1f7 --- /dev/null +++ b/types/iframe-resizer/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "exclude": [ + "node_modules" + ], + "files": [ + "index.d.ts", + "iframe-resizer-tests.ts" + ] +} \ No newline at end of file diff --git a/types/iframe-resizer/tslint.json b/types/iframe-resizer/tslint.json new file mode 100644 index 0000000000..30a1bdde2e --- /dev/null +++ b/types/iframe-resizer/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/imagemapster/index.d.ts b/types/imagemapster/index.d.ts index 0c28c2ad2b..101191baca 100644 --- a/types/imagemapster/index.d.ts +++ b/types/imagemapster/index.d.ts @@ -3,994 +3,996 @@ // Definitions by: delphinus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import jQuery = require('jquery'); -declare namespace ImageMapster { +declare global { + namespace ImageMapster { - type Select = "select"; - type Deselect = "deselect"; - type Set = "set"; - type Get = "get"; - type Highlight = "highlight"; - type Unbind = "unbind"; - type Resize = "resize"; - type Snapshot = "snapshot"; - type Rebind = "rebind"; - type Keys = "keys"; - type SetOptions = "set_options"; - type GetOptions = "get_options"; - type Tooltip = "tooltip"; - type ToolTipCloseEvent = "area-mouseout" | "area-click" | "tooltip-click" | "image-mouseout"; - type State = "highlight" | "select"; + type Select = "select"; + type Deselect = "deselect"; + type Set = "set"; + type Get = "get"; + type Highlight = "highlight"; + type Unbind = "unbind"; + type Resize = "resize"; + type Snapshot = "snapshot"; + type Rebind = "rebind"; + type Keys = "keys"; + type SetOptions = "set_options"; + type GetOptions = "get_options"; + type Tooltip = "tooltip"; + type ToolTipCloseEvent = "area-mouseout" | "area-click" | "tooltip-click" | "image-mouseout"; + type State = "highlight" | "select"; - interface RenderingOptions { + interface RenderingOptions { - /** - * fade effect - can only be applied to "render_highlight". - * - * Use a fade effect when highlighting areas on mouseover. - */ - fade?: boolean; + /** + * fade effect - can only be applied to "render_highlight". + * + * Use a fade effect when highlighting areas on mouseover. + */ + fade?: boolean; - /** - * The duration of the fade-in effect, in milliseconds. - */ - fadeDuration?: number; + /** + * The duration of the fade-in effect, in milliseconds. + */ + fadeDuration?: number; - /** - * highlight areas on mouseover. When null (default), the behavior is - * disabled for mobile browsers. You can explicitly enable or disable - * it by setting this option to a boolean value. - */ - highlight?: boolean; + /** + * highlight areas on mouseover. When null (default), the behavior is + * disabled for mobile browsers. You can explicitly enable or disable + * it by setting this option to a boolean value. + */ + highlight?: boolean; - /** - * the map or an area on the map can be selected (or deselected). - * - * When true, the image map will function like a multiple-select menu. - * Users can click any area to select or deselect it. When applied to - * the entire map, it determines whether or not the click-selection - * functionality is enabled. When applied to an area, it determines - * whether that individual area (or group) can be selected. By default, - * the map and all areas are selectable. - */ - isSelectable?: boolean; + /** + * the map or an area on the map can be selected (or deselected). + * + * When true, the image map will function like a multiple-select menu. + * Users can click any area to select or deselect it. When applied to + * the entire map, it determines whether or not the click-selection + * functionality is enabled. When applied to an area, it determines + * whether that individual area (or group) can be selected. By default, + * the map and all areas are selectable. + */ + isSelectable?: boolean; - /** - * the map or area on the map can be deselected. - * - * Normally true, this option can be used to prevent users from - * unselecting items once they have been selected. When combined with - * singleSelect, the effect is that one and only one option can be - * selected at any given time. Users cannot deselect the active option. - * This provides a menu-like functionality. It is possible for zero - * items to be selected if this is the default state (or the only - * selected item is deselected programatically). - */ - isDeselectable?: boolean; + /** + * the map or area on the map can be deselected. + * + * Normally true, this option can be used to prevent users from + * unselecting items once they have been selected. When combined with + * singleSelect, the effect is that one and only one option can be + * selected at any given time. Users cannot deselect the active option. + * This provides a menu-like functionality. It is possible for zero + * items to be selected if this is the default state (or the only + * selected item is deselected programatically). + */ + isDeselectable?: boolean; - /** - * only one area can be selected at a time - * - * When true, only one or zero areas can be selected at any given time. - * If an area is selected and the user selects another area, the - * previously selected area will become deselected. Unlike - * "staticState", this property cannot be overridden by setting areas - * programatically, only one (or zero) areas can ever be selected when - * this option is true. - */ - singleSelect?: boolean; + /** + * only one area can be selected at a time + * + * When true, only one or zero areas can be selected at any given time. + * If an area is selected and the user selects another area, the + * previously selected area will become deselected. Unlike + * "staticState", this property cannot be overridden by setting areas + * programatically, only one (or zero) areas can ever be selected when + * this option is true. + */ + singleSelect?: boolean; - /** - * the map or area is permanently in a selected or deselected state. - * - * When true or false, the map or area to which this option applies - * will be permanently selected or deselected. Typically this is more - * useful applied to individual areas that you want to exclude from the - * interactive part of the map. - * - * staticState forces an area to be always selected or deselected. If - * set, this will supercede isSelectable. Something with a staticState - * will always be in that state and it cannot be changed by the user. - * Note that when setting states programatically, this option will not - * be honored; it only affects user interaction. - */ - staticState?: boolean; + /** + * the map or area is permanently in a selected or deselected state. + * + * When true or false, the map or area to which this option applies + * will be permanently selected or deselected. Typically this is more + * useful applied to individual areas that you want to exclude from the + * interactive part of the map. + * + * staticState forces an area to be always selected or deselected. If + * set, this will supercede isSelectable. Something with a staticState + * will always be in that state and it cannot be changed by the user. + * Note that when setting states programatically, this option will not + * be honored; it only affects user interaction. + */ + staticState?: boolean; - /** - * initial selection state of an area. - * - * The area in question is selected. To set default selections when - * creating a new mapster, use this option for a specific area (see - * above). - */ - selected?: boolean; + /** + * initial selection state of an area. + * + * The area in question is selected. To set default selections when + * creating a new mapster, use this option for a specific area (see + * above). + */ + selected?: boolean; - /** - * Use an alternate image of the same size as the imagemap as the - * source for highlight or select effects. - * - * When specified, the mapster will highlight areas using the image - * data obtained from the same area in an alternate image, instead of - * using a fill effect to highlight or select the area. This feature is - * currently available in browsers with HTML5 canvas support. In - * practical terms, this means it will work in all commonly used - * browsers except IE 8 or lower. - * - * If this feature is enabled when an unsupported browser is used, it - * will fall back to the normal highlight method. - * - * The fill, stroke and opacity effects can be specified independently - * from those used for the normal higlight effect. This ensures that - * when your page is viewed with a non-supported browser, you can still - * control the rendering as would be appropriate for a normal - * fill/stroke effect, which may be different from when you're using an - * alternate image. - */ - altImage?: string; - altImageFill?: boolean; - altImageStroke?: boolean; - altImageOpacity?: number; + /** + * Use an alternate image of the same size as the imagemap as the + * source for highlight or select effects. + * + * When specified, the mapster will highlight areas using the image + * data obtained from the same area in an alternate image, instead of + * using a fill effect to highlight or select the area. This feature is + * currently available in browsers with HTML5 canvas support. In + * practical terms, this means it will work in all commonly used + * browsers except IE 8 or lower. + * + * If this feature is enabled when an unsupported browser is used, it + * will fall back to the normal highlight method. + * + * The fill, stroke and opacity effects can be specified independently + * from those used for the normal higlight effect. This ensures that + * when your page is viewed with a non-supported browser, you can still + * control the rendering as would be appropriate for a normal + * fill/stroke effect, which may be different from when you're using an + * alternate image. + */ + altImage?: string; + altImageFill?: boolean; + altImageStroke?: boolean; + altImageOpacity?: number; - /** - * Areas should be flood-filled when moused over or highlighted. - */ - fill?: boolean; + /** + * Areas should be flood-filled when moused over or highlighted. + */ + fill?: boolean; - /** - * The color used for flood fill. - */ - fillColor?: string; - fillColorMask?: string; + /** + * The color used for flood fill. + */ + fillColor?: string; + fillColorMask?: string; - /** - * The opacity of the fill. This is a number from 0 to 1. - */ - fillOpacity?: number; + /** + * The opacity of the fill. This is a number from 0 to 1. + */ + fillOpacity?: number; - /** - * Areas should be outlined when moused over or highlighted. - */ - stroke?: boolean; + /** + * Areas should be outlined when moused over or highlighted. + */ + stroke?: boolean; - /** - * The color of the outline. - */ - strokeColor?: string; + /** + * The color of the outline. + */ + strokeColor?: string; - /** - * The opacity of the outline. - */ - strokeOpacity?: number; + /** + * The opacity of the outline. + */ + strokeOpacity?: number; - /** - * The width of the outline. - */ - strokeWidth?: number; + /** + * The width of the outline. + */ + strokeWidth?: number; - /** - * The options below control the way highlighted areas are rendered. - * Each can be applied globally to the map, or to each element, using - * the areas option to pass area-specific options. These options apply - * to either highlighted or selected areas. Highlighting occurs when - * the mouse enters an area on the image map. Selection occurs when an - * area is clicked, and selection is enabled. These options will be - * applied to both situations if present in the root of the options - * object. They can also be applied to one or the other situations - * specifically using the render_highlight and render_select options. - */ - render_highlight?: string | RenderingOptions; - render_select?: string | RenderingOptions; + /** + * The options below control the way highlighted areas are rendered. + * Each can be applied globally to the map, or to each element, using + * the areas option to pass area-specific options. These options apply + * to either highlighted or selected areas. Highlighting occurs when + * the mouse enters an area on the image map. Selection occurs when an + * area is clicked, and selection is enabled. These options will be + * applied to both situations if present in the root of the options + * object. They can also be applied to one or the other situations + * specifically using the render_highlight and render_select options. + */ + render_highlight?: string | RenderingOptions; + render_select?: string | RenderingOptions; + } + + interface AreaRenderingOptions extends RenderingOptions { + + key: string; + + /** + * when rendering an area or area group, also render the areas in the + * other group (or groups) specified + * + * This is an area-specific option that allows you to create + * supergroups. A supergroup is a collection of groups that will all be + * highlighted simultaneously, but only when the area that defines the + * supergroup is moused over or activated through code. + * + * When the area for which this option has been set is activated, all + * the areas specified in the includeKeys list will also be rendered. + * This is a one-way relationship. Defining a supergroup in an area + * causes all the other groups to be highlighted, but not the other way + * around. + * + * A typical use of this is to define areas that you want to be + * highlighted when the mouse enters some specific area, but that you + * do not want to be highlighted on their own if the target area is + * moused over. This could be a hidden menu, for example: you want the + * menu to display when the hotspot is moused over, but when it's + * hidden, mousing over the menu area itself should have no effect. + */ + includeKeys?: string; + + /** + * the area is a mask rather than a highlighted area. + * + * Normally, every area in an imagemap is an active area, and would be + * highlighted when moused over (unless its behavior was otherwise + * specified with staticState). The isMask option allows you to + * identify an area as being a mask. When a mask is part of an area + * group, the masked area will be specifically excluded from the + * rendering of a highlight or selected state. + * + * This is usually used in conjunction, or instead of, the nohref + * attribute of the area tag. When nohref is specified on an area tag, + * that area is specifically excluded from the hotspot of any area that + * encompasses it. It will not respond to mouse events, and will not be + * highlighted. This can be used to create "holes" in hotspots. By + * default, ImageMapster will treat any area with nohref or no href tag + * as masks, the same as if this option had been applied. + * + * Sometimes you won't be able to use nohref to identify something as a + * mask, for example, if you intend to re-use an area has both a mask, + * and an independent hotspot. This would be typical if you wanted to a + * selectable area that was completely included within another + * selectable area, but functioned independently, such as concentric + * circles. In this case, you would need to identify the inner circle + * as both a mask, and a hotspot. The nohref attribute would make it + * not act as a hotspot, and only function as a mask. You couldn't also + * select the inner area. You can solve this problem by including the + * inner circle in two different groups - one group which is a mask for + * the main area, and another which is an independent selectable area. + * You can specify different options for each group, so even though + * it's just one area, it can function as two completely independent + * ones. + * + * There may also be situations where you do not want an area marked + * with nohref to be treated as a mask. For example, given "area1" and + * "area2," you may want to create a configuration where mousing over + * "area1" causes both "area1" and "area2" to be highlighted, but + * "area2" should not be highlighted on its own when it is moused over. + * In this situation, you'll need to use "nohref" to prevent the hover + * behavior for the area, but you still want it to be treated normally + * when it's rendered as a result of mousing over "area1." You can + * accomplish this using the noHrefIsMask global option, below. + * + * Generally, masked areas will appear as a window to the underlying + * image. If stroke is in effect, the stroke will be rendered for the + * mask as well as the areas, to create both inner and outer borders. + * You can always specifically enable or disable this, or any other + * effect, for any area as desired. + * + */ + isMask?: boolean; + + /** + * tool tip data for an area + * + * When this area-specific option is present and showToolTips = true, a + * toolTipContainer will be created this will be inserted into it, + * either as inner text (if only text as passed) or as HTML if a jQuery + * object is passed. In order to pass anything other than plain text + * using this option you must use a jQuery object. Any string will be + * treated as plain text (and special characters rendered correctly). + */ + toolTip?: string; + } + + interface OnClickData { + + /** + * $(item) from boundList + */ + listTarget?: JQuery; + + /** + * mapKey for this area + */ + key: string; + + e: JQueryEventObject; + selected: boolean; + } + + interface OnStateChangeData { + + /** + * map key + */ + key: string; + + state: "highlight" | "select"; + + /** + * indicating the current state (following the event) + */ + selected: boolean; + } + + interface OnMouseData { + + /** + * area key + */ + key: string; + + /** + * true if area is currently selected + */ + selected: boolean; + + e: JQueryEventObject; + options: AreaRenderingOptions; + } + + interface OnGetListData { + + /** + * primary mapKey for this area or area group + */ + key: string; + + /** + * mapValue for this area or group + */ + value: string; + + /** + * array of areas that make up this group + */ + area: any[]; + + options: AreaRenderingOptions; + } + + interface OnShowToolTipData { + + /** + * jQuery object of the tooltip container + */ + toolTip: JQuery; + + /** + * map key for this area + */ + key: string; + + /** + * current state of the area + */ + selected: boolean; + + areaOptions: AreaRenderingOptions; + } + + interface Options extends RenderingOptions { + + /** + * an attribute identifying each imagemap area. + * + * If specified, this refers to an attribute on the area tags that will + * be used to group them logically. Any areas containing the same + * mapKey will be considered part of a group, and rendered together + * when any of these areas is activated. If you don't want this + * functionality, ensure each key is unique. When mapKey is omitted, + * then each area is considered to be independent from the other and no + * grouping is applied. + * + * When mapKey is present, any area tags that are missing this + * attribute will be excluded from the image map e ntirely. This is + * functionally identical to setting staticState=false for these areas, + * except they will be inaccessible through the API. + * + * ImageMapster will work with any attribute you identify as a key. If + * you wish to maintain HTML compliance, it's recommeded that you use + * attribute names starting with "data-", for example, data-mapkey. Any + * such names are legal for the HTML5 document type. If you are using + * older document types, the class attribute is part of the HTML spec + * for area and will not cause any visual effects, so this is also a + * good choice. It is not recommended to use id, since the values of + * this attribute must be unique. title and alt also will cause + * possibly undesired side effects. + * + * You can specify more than one value in the mapKey attribute, + * separated by commas. This will cause an area to be a member of more + * than one group. The area may have different options in the context + * of each group. When the area is physically moused over, the first + * key listed will identify the group that's effective for that action. + */ + mapKey?: string; + + /** + * an attribute on each area tag containing additional descriptive + * information about an area. + * + * This option is applicable only when using onGetList. When set, the + * data provided to the callback function will include the value of + * this attribute for each group. This can be used to simplify building + * a list with associated information, without having to match against + * another resource. It also ties this information to the image map + * itself. It is not required to use this option when using onGetList. + * + * For example, you could set mapValue: 'data-statename' to an imagemap + * of the united states, and add an attribute to your areas that + * provided the full name of each state, e.g. data-statename="Alaska". + * This text would be included in the onGetList callback, and so you + * could use it to construct an external list of states. + * + * If there are grouped areas (areas with the same key), then the value + * from the first area found with data in this attribute will be used. + */ + mapValue?: string; + + /** + * Clicking on a link should cause the browser to navigate to the href + * whenever it's not a hash sign (#). Version 1.2.4.050 and later + * + * By default, ImageMapster will prevent the default browser behavior + * in image maps, and "select" areas when they are clicked. If you want + * to navigate to the url for an area, use this option. When enabled, + * all areas that have an href attribute, and its value is not empty or + * "#" (just a hashtag). + * + * When area grouping is used, if an href is present for any area in + * the primary group, this will be used as the navigation target. This + * way you don't need to copy the url for every area in groups, rather, + * you can include it on just one, and clicking any area will cause the + * appropraite navigation. + */ + clickNavigate?: boolean; + + /** + * an attribute on items in a boundList that corresponds to the value + * of the mapKey attributes. + * + * This is used to synchronize the actions on the imagemap with the + * actions on a boundList. Each value should match a value from the + * imageMap mapKey tag. Any item in the boundList with missing or + * mismatched data will be ignored. + */ + listKey?: string; + + /** + * attribute to set or remove when an area is selected or deselected + * + * If boundList is present, when a map area is selected, set or remove + * this attribute on the list element that matches that area based on + * their respective keys. + */ + listSelectedAttribute?: string; + + /** + * a class to add or remove when an area is selected or deselected + * + * If a boundList is present, when a map area is selected, this class + * is added or removed from the corresponding list element. This can be + * used to easily create any kind of associated action when areas on + * the map are changed. + */ + listSelectedClass?: string; + + /** + * + * define area-specific options; each object in the array must contain + * a "key" property identifying a valid mapKey, and additional + * rendering options specific to that area or group + */ + areas?: AreaRenderingOptions[], + + /** + * add "classname" class to the wrapper created around the image, or + * copy classes from the image if "true" + */ + wrapClass?: string | boolean; + + /** + * add CSS to the wrapper created around the image + */ + wrapCss?: string | boolean; + + /** + * delay removing highlight when mouse exits an area (1.2.5b36) + * + * Normally, when the user's mouse pointer exits an area, the highlight + * effect is removed immediately. This behavior can be changed with + * this option. Setting it to a positive number causes a delay of n + * milliseconds before the effect is removed. Setting to -1 causes the + * effect to remain active until another hotspot is entered (e.g., it + * will only be removed when superceded by a different area being + * highlighted). + * + * When using mouseoutDelay, the onMouseover event will still be fired + * at the time the user's mouse pointer leaves the area. However, the + * onStateChange event will be delayed until the highlight is actually + * removed. + * + * Whether or not you are using mouseoutDelay, only one area can be + * highlighted at a time. That is, whenever the mouse pointer moves + * onto a new active area, any previously highlighted area will become + * un-highlighted, regardless of any delay in effect. Hovering over a + * new area will always supercede any delay and cause the new area (and + * only the new area) to be highlighted at that time. So, for dense + * imagemaps where most areas adjoin one another, this option may not + * have much effect within the boundaries of the imagemap. Rather, it + * is intended to help keep the higlights active for imagemaps that are + * sparse, or have very small areas. + */ + mouseoutDelay?: number; + + /** + * sort the values before calling onGetList + * + * If a non-false value or "asc" is passed, the list will be sorted in + * ascending order by the area value from mapValue. If "desc" is + * passed, the list will be sorted in descending order. + */ + sortList?: boolean | "asc" | "desc"; + + /** + * time (in milliseconds) to wait for images to load before giving up + * + * When first bound, ImageMapster has to wait for the source image,and + * any altImage images to load before it can finish binding. This is + * necessary because otherwise it's not alwasy possible to know the + * native size of the images. After this period of time, ImageMapster + * will give up. If you have particularly large pages or images, you + * may want to increase this to account for long load times. + */ + configTimeout?: number; + + /** + * Automatically scale imagemaps to match the size of a + * dynamically-scaled image. + * + * When you render an image, you can optionally define a size through + * CSS or using the "height" and "width" attributes. If omitted, the + * image will be displayed in its native size. If included, browsers + * will automatically resize the image to display in the dimensions you + * have provided. + * + * Starting with 1.1.3, ImageMapster will automatically recalculate all + * area data to match the effective size of the image. This means that + * you can set the size of your image to anything you want and + * ImageMapster will work with no changes at all needed to the "area" + * data. + * + * If this behavior is not desired for some reason, this can be + * disabled by setting this option to false. + */ + scaleMap?: boolean; + + /** + * Treat areas containing the onhref attribute (or missing the href + * attribute) as masks. This is true by default. + * + * Set this to "false" to disable automatic masking of these areas. You + * can control them explicitly by creating independent groups for areas + * you wish to mask and assigning the isMask area-specific option when + * using this option. + * + * There are some things to be aware of when using nohref and masking: + * + * * You must put the area that include the nohref attribute before + * other areas that overlap it, or it will be ignored. + * + * * You should also explicitly omit the href tag when using nohref. + * + * * Due to limitations in rendering with VML (e.g. Internet Explorer + * 6-8), it is not possible to create a true mask, which would allow + * the underlying image to show through the masked area. Instead, the + * "masked" areas are rendered on top of the highlighted area in a + * different color. This can be specified for each area (see the + * fillColorMask option below) to create the best possible effect. + */ + noHrefIsMask?: boolean; + + /** + * a jQuery object whose elements are bound to the map. + * + * boundList can be any list of objects. To be bound to the map, they + * must contain an attribute whose name is identified by the option + * listKey, and whose value matches the value in an area tag's mapKey + * attribute. If more than one element in the list has the same value, + * the action will affect all matching elements. + */ + boundList?: JQuery; + + /** + * enable tooltips + * + * When showToolTip is true, mapster will look for a property called + * toolTip in the areas option for a an area. If present, a tool tip + * dialog will be shown on mouseover for that area. It will + * automatically be closed according to the behavior specified by + * toolTipClose. This option does not apply at the item level, but + * rather enables tooltips for the entire map. At the item level, only + * the presence of tooltip data is necessary for a tooltip to appear. + */ + showToolTip?: boolean; + + /** + * HTML describing the popup that will be created for tooltips. + * + * A div with some simple styling is included as the default tooltip + * container. This can be replaced with anything using this option. + * + * When tooltips are rendered, the code attempts to determine the best + * place for it. It will try to position it in near the top-left part + * of the area, and continue to try other corners in order to render it + * within the confines of the container where the image map resides. If + * it can't be placed within the image, it will be placed in the + * lower-right corner and extend outside the image. + */ + toolTipContainer?: string | JQuery; + + /** + * specify the behavior that causes a toolTip to close. + * + * This option should be passed an array of strings that define the + * events that cause active tooltips to close. The array can include + * one or more of the following stings: + * + * 'area-mouseout' - tooltips close when the mouse pointer leaves the + * area that activated it. This is the default. + * + * 'area-click' - tooltips close when another area (or the same one) is + * clicked + * + * 'tooltip-click' - tooltips close when the tooltip itself is clicked + * anywhere + * + * 'image-mouseout' - tooltips close when the mouse pointer leaves the + * image itself. + * + * Under any circumstances, active tooltip will disappear when a new + * one is created. You don't have to define an automatic closing + * behavior; setting this option to an empty array will result in + * tooltips never closing, leaving it to you to close them manually + * though the tooltip method. + */ + toolTipClose?: ToolTipCloseEvent[]; + + /** + * callback when a hotspot area is clicked. Return false to cancel + * default select action, or true to navigate to the 'href' + */ + + /** + * a callback when an area is clicked.:silent doautocmd FocusLost % + * + * This event occurs when the usual click event happens, but includes + * data from the mapster about the area: + * + * This can be used to perform additional actions on a click without + * binding another event and having to obtain information manually. + */ + onClick?: (data: OnClickData) => void; + + /** + * callback when mouse enters a bound area. + * + * This function is called when the mouse enters a bound area. + */ + onMouseover?: (data: OnMouseData) => void; + + /** + * callback when mouse leavesd a bound area. + * + * Callback when the mouse leaves a bound area. The data structure + * passed to the callback is the same as onMouseover. + */ + onMouseout?: (data: OnMouseData) => void; + + /** + * a callback on mapster initialization that provides summary data + * about the image map, and expects a jQuery list to be returned. + * + * This callback allows you to dynamically provide a boundList based on + * summary data from the imagemap itself, rather than providing the + * list up front. The event passes an array of AreaData objects + * + * The client should return a jQuery object containing all the elements + * that make up the bound list, the same as if it was assigned + * manually. + */ + onGetList?: (data: OnGetListData) => JQuery; + + /** + * a callback when the mapster has finished initial configuration + * + * This event is fired when the mapster configuration completes. When + * control execution continues after a first-time bind operation, the + * mapster is not guaranteed to be configured, because images are + * loaded asynchronously by web browsers. If a mapster is bound to an + * image that is not yet loaded, it will attempt to rebind every 200 + * milliseconds. This event will be fired when it is eventually + * successful, or the length of time specified by configTimeout is + * exceeded (default of ten seconds). + * + * The altImage option will also increase the time needed to configure, + * because the alternate image is loaded by the client at configure + * time to ensure it is available immediately when needed. + */ + onConfigured?: (success: boolean) => void; + + /** + * callback when area state is changed (either highlight or select). + * + * onStateChange can be used to get more specific information than the + * mouseover or click events. + */ + onStateChange?: (data: OnStateChangeData) => void; + + /** + * callback when a toolTip is created + * + * This can be used to control tooltip closing behavior directly, if + * desired. + */ + onShowToolTip?: (data: OnShowToolTipData) => void; + } } - interface AreaRenderingOptions extends RenderingOptions { - - key: string; + interface JQuery { /** - * when rendering an area or area group, also render the areas in the - * other group (or groups) specified * - * This is an area-specific option that allows you to create - * supergroups. A supergroup is a collection of groups that will all be - * highlighted simultaneously, but only when the area that defines the - * supergroup is moused over or activated through code. + * All images in the jQuery object will be bound. The specific example + * above will attempt to bind to all images present on the page. Each image + * must be bound to an image map identified with the usemap attribute. If + * there is no usemap attribute, or it does not refer to a valid map, then + * the image will be ignored. Therefore you can use this syntax to activate + * all imagemaps on a page. Because pages often contain many images, + * though, it will be faster to select just the image you are targeting + * using a more specific selector. * - * When the area for which this option has been set is activated, all - * the areas specified in the includeKeys list will also be rendered. - * This is a one-way relationship. Defining a supergroup in an area - * causes all the other groups to be highlighted, but not the other way - * around. + * Images are often not completely loaded when script execution begins. + * ImageMapster will ensure that all images are loaded before it permits + * interaction from the client. If an alternate image is specified, this + * will also be preloaded. * - * A typical use of this is to define areas that you want to be - * highlighted when the mouse enters some specific area, but that you - * do not want to be highlighted on their own if the target area is - * moused over. This could be a hidden menu, for example: you want the - * menu to display when the hotspot is moused over, but when it's - * hidden, mousing over the menu area itself should have no effect. + * Because images are loaded asynchronously, code execution will often + * return to your script before the ImageMapster is available. If you apply + * other methods to it (such as selecting or deselecting areas), these + * commands will be queued until the image has been loaded, and then + * executed automatically. So you don't need to worry about using callbacks + * for initial configuration. You can assign a function to a callback when + * configuration is complete if needed to perform other setup activities on + * the page. */ - includeKeys?: string; + mapster(options?: ImageMapster.Options): JQuery; /** - * the area is a mask rather than a highlighted area. + * select: Cause an area to become selected. This is similar to a user + * click, but will not cause a click event to be fired. * - * Normally, every area in an imagemap is an active area, and would be - * highlighted when moused over (unless its behavior was otherwise - * specified with staticState). The isMask option allows you to - * identify an area as being a mask. When a mask is part of an area - * group, the masked area will be specifically excluded from the - * rendering of a highlight or selected state. + * Programatically select elements from the image map. The programmatic + * selection/deselection methods will not honor the staticState property. + */ + mapster(method: ImageMapster.Select): void; + + /** + * deselect: Cause an area to become deselected * - * This is usually used in conjunction, or instead of, the nohref - * attribute of the area tag. When nohref is specified on an area tag, - * that area is specifically excluded from the hotspot of any area that - * encompasses it. It will not respond to mouse events, and will not be - * highlighted. This can be used to create "holes" in hotspots. By - * default, ImageMapster will treat any area with nohref or no href tag - * as masks, the same as if this option had been applied. + * The opposite of select, this causes an area to become deselected. If it + * was not previously selected, nothing changes. + */ + mapster(method: ImageMapster.Deselect): void; + + /** + * set: select or deselect an area * - * Sometimes you won't be able to use nohref to identify something as a - * mask, for example, if you intend to re-use an area has both a mask, - * and an independent hotspot. This would be typical if you wanted to a - * selectable area that was completely included within another - * selectable area, but functioned independently, such as concentric - * circles. In this case, you would need to identify the inner circle - * as both a mask, and a hotspot. The nohref attribute would make it - * not act as a hotspot, and only function as a mask. You couldn't also - * select the inner area. You can solve this problem by including the - * inner circle in two different groups - one group which is a mask for - * the main area, and another which is an independent selectable area. - * You can specify different options for each group, so even though - * it's just one area, it can function as two completely independent - * ones. + * Select or deselect elements from jQuery objects wrapping "area" tags on + * the map based on truthiness of selected. If the area represents a bound + * area on the imagemap, it will be selected or deselected. The method can + * be called from an AREA, or from a bound image, passing a specific key as + * a 2nd parameter * - * There may also be situations where you do not want an area marked - * with nohref to be treated as a mask. For example, given "area1" and - * "area2," you may want to create a configuration where mousing over - * "area1" causes both "area1" and "area2" to be highlighted, but - * "area2" should not be highlighted on its own when it is moused over. - * In this situation, you'll need to use "nohref" to prevent the hover - * behavior for the area, but you still want it to be treated normally - * when it's rendered as a result of mousing over "area1." You can - * accomplish this using the noHrefIsMask global option, below. + * If the selected parameter is omitted (or anything other than "true" or + * "false") then the state of each area will be toggled. * - * Generally, masked areas will appear as a window to the underlying - * image. If stroke is in effect, the stroke will be rendered for the - * mask as well as the areas, to create both inner and outer borders. - * You can always specifically enable or disable this, or any other - * effect, for any area as desired. + * You can include an object containing rendering options as the last + * parameter. When present, these will supercede the default and + * area-specific rendering options. + */ + mapster(method: ImageMapster.Set, selected: boolean, options: ImageMapster.RenderingOptions): JQuery; + mapster(method: ImageMapster.Set, options: ImageMapster.RenderingOptions): JQuery; + + /** + * get: get keys for all selected areas * + * When no "key" parameter is included, returns a comma-separated list of + * keys representing the areas currently selected. If specified, returns + * true or false indicating whether the area specified is selected. */ - isMask?: boolean; + mapster(method: ImageMapster.Get, key?: string): string | boolean; /** - * tool tip data for an area + * highlight: highlight, clear, or return highlight state * - * When this area-specific option is present and showToolTips = true, a - * toolTipContainer will be created this will be inserted into it, - * either as inner text (if only text as passed) or as HTML if a jQuery - * object is passed. In order to pass anything other than plain text - * using this option you must use a jQuery object. Any string will be - * treated as plain text (and special characters rendered correctly). - */ - toolTip?: string; - } - - interface OnClickData { - - /** - * $(item) from boundList - */ - listTarget?: JQuery; - - /** - * mapKey for this area - */ - key: string; - - e: JQueryEventObject; - selected: boolean; - } - - interface OnStateChangeData { - - /** - * map key - */ - key: string; - - state: "highlight" | "select"; - - /** - * indicating the current state (following the event) - */ - selected: boolean; - } - - interface OnMouseData { - - /** - * area key - */ - key: string; - - /** - * true if area is currently selected - */ - selected: boolean; - - e: JQueryEventObject; - options: AreaRenderingOptions; - } - - interface OnGetListData { - - /** - * primary mapKey for this area or area group - */ - key: string; - - /** - * mapValue for this area or group - */ - value: string; - - /** - * array of areas that make up this group - */ - area: any[]; - - options: AreaRenderingOptions; - } - - interface OnShowToolTipData { - - /** - * jQuery object of the tooltip container - */ - toolTip: JQuery; - - /** - * map key for this area - */ - key: string; - - /** - * current state of the area - */ - selected: boolean; - - areaOptions: AreaRenderingOptions; - } - - interface Options extends RenderingOptions { - - /** - * an attribute identifying each imagemap area. + * This method is used to control or obtain the current highlight state. + * Setting the highlight does not mimic a mouseover, rather, it only sets + * the highlight. Events and tooltips will not be activated. Even using + * these methods, it is not possible to highlight more than one area at a + * time. If another area is highlighted programatically, any existing + * highlight will be removed. * - * If specified, this refers to an attribute on the area tags that will - * be used to group them logically. Any areas containing the same - * mapKey will be considered part of a group, and rendered together - * when any of these areas is activated. If you don't want this - * functionality, ensure each key is unique. When mapKey is omitted, - * then each area is considered to be independent from the other and no - * grouping is applied. - * - * When mapKey is present, any area tags that are missing this - * attribute will be excluded from the image map e ntirely. This is - * functionally identical to setting staticState=false for these areas, - * except they will be inaccessible through the API. - * - * ImageMapster will work with any attribute you identify as a key. If - * you wish to maintain HTML compliance, it's recommeded that you use - * attribute names starting with "data-", for example, data-mapkey. Any - * such names are legal for the HTML5 document type. If you are using - * older document types, the class attribute is part of the HTML spec - * for area and will not cause any visual effects, so this is also a - * good choice. It is not recommended to use id, since the values of - * this attribute must be unique. title and alt also will cause - * possibly undesired side effects. - * - * You can specify more than one value in the mapKey attribute, - * separated by commas. This will cause an area to be a member of more - * than one group. The area may have different options in the context - * of each group. When the area is physically moused over, the first - * key listed will identify the group that's effective for that action. + * Once set this way, the highlight will be removed when any user-event + * that would normally cause a highlight to be removed occurs (e.g. moving + * the mouse into any area), or it is removed programatically. */ - mapKey?: string; + mapster(method: ImageMapster.Highlight, flag?: string | boolean): void; /** - * an attribute on each area tag containing additional descriptive - * information about an area. + * unbind: unbind ImageMapster from an image * - * This option is applicable only when using onGetList. When set, the - * data provided to the callback function will include the value of - * this attribute for each group. This can be used to simplify building - * a list with associated information, without having to match against - * another resource. It also ties this information to the image map - * itself. It is not required to use this option when using onGetList. - * - * For example, you could set mapValue: 'data-statename' to an imagemap - * of the united states, and add an attribute to your areas that - * provided the full name of each state, e.g. data-statename="Alaska". - * This text would be included in the onGetList callback, and so you - * could use it to construct an external list of states. - * - * If there are grouped areas (areas with the same key), then the value - * from the first area found with data in this attribute will be used. - */ - mapValue?: string; - - /** - * Clicking on a link should cause the browser to navigate to the href - * whenever it's not a hash sign (#). Version 1.2.4.050 and later - * - * By default, ImageMapster will prevent the default browser behavior - * in image maps, and "select" areas when they are clicked. If you want - * to navigate to the url for an area, use this option. When enabled, - * all areas that have an href attribute, and its value is not empty or - * "#" (just a hashtag). - * - * When area grouping is used, if an href is present for any area in - * the primary group, this will be used as the navigation target. This - * way you don't need to copy the url for every area in groups, rather, - * you can include it on just one, and clicking any area will cause the - * appropraite navigation. - */ - clickNavigate?: boolean; - - /** - * an attribute on items in a boundList that corresponds to the value - * of the mapKey attributes. - * - * This is used to synchronize the actions on the imagemap with the - * actions on a boundList. Each value should match a value from the - * imageMap mapKey tag. Any item in the boundList with missing or - * mismatched data will be ignored. - */ - listKey?: string; - - /** - * attribute to set or remove when an area is selected or deselected - * - * If boundList is present, when a map area is selected, set or remove - * this attribute on the list element that matches that area based on - * their respective keys. - */ - listSelectedAttribute?: string; - - /** - * a class to add or remove when an area is selected or deselected - * - * If a boundList is present, when a map area is selected, this class - * is added or removed from the corresponding list element. This can be - * used to easily create any kind of associated action when areas on - * the map are changed. - */ - listSelectedClass?: string; - - /** - * - * define area-specific options; each object in the array must contain - * a "key" property identifying a valid mapKey, and additional - * rendering options specific to that area or group - */ - areas?: AreaRenderingOptions[], - - /** - * add "classname" class to the wrapper created around the image, or - * copy classes from the image if "true" - */ - wrapClass?: string | boolean; - - /** - * add CSS to the wrapper created around the image - */ - wrapCss?: string | boolean; - - /** - * delay removing highlight when mouse exits an area (1.2.5b36) - * - * Normally, when the user's mouse pointer exits an area, the highlight - * effect is removed immediately. This behavior can be changed with - * this option. Setting it to a positive number causes a delay of n - * milliseconds before the effect is removed. Setting to -1 causes the - * effect to remain active until another hotspot is entered (e.g., it - * will only be removed when superceded by a different area being - * highlighted). - * - * When using mouseoutDelay, the onMouseover event will still be fired - * at the time the user's mouse pointer leaves the area. However, the - * onStateChange event will be delayed until the highlight is actually + * Removes the ImageMapster binding from an image and restores it to its + * original state. All visible elements (selections, tooltips) will be * removed. * - * Whether or not you are using mouseoutDelay, only one area can be - * highlighted at a time. That is, whenever the mouse pointer moves - * onto a new active area, any previously highlighted area will become - * un-highlighted, regardless of any delay in effect. Hovering over a - * new area will always supercede any delay and cause the new area (and - * only the new area) to be highlighted at that time. So, for dense - * imagemaps where most areas adjoin one another, this option may not - * have much effect within the boundaries of the imagemap. Rather, it - * is intended to help keep the higlights active for imagemaps that are - * sparse, or have very small areas. + * If the optional "preserveState" parameter is true, the selection overlay + * and any active tooltips will be preserved. Tooltips can still be + * dismissed by a user click, but once unbound, the selection states can no + * longer be controlled either by the user or programatically. To remove + * them, the actual DOM elements must be removed. + * + * Notes: When a mapster is first bound, several things happen. A div + * element is created which wraps the image. A copy is made of the original + * image, and the original image is set be transparent. This allows + * creating visible elements for the selections & highlights without + * interfering with the image map. Additionally, canvas elements are + * created (for HTML5 browsers), or a VML elements are created for Internet + * Explorer, to render the effects. Profile information about each bound + * image map is stored in memory, and finally, event handlers are bound to + * the image map. + * + * The "unbind" method cleans up these resources: it removes the wrapper, + * restores the image to its original visibility state, and releases + * internal resources. When using 'preserveState', the internal resources + * are cleaned up and event handling is disabled, but HTML elements are not + * removed. Each element created by ImageMapster is assigned a class of + * "mapster_el", which can be used to target them for later removal, though + * it is not easy to complete this process manually because of the wrapper + * and styles applied during configuration, which will be left intact when + * using "preserveState." */ - mouseoutDelay?: number; + mapster(method: ImageMapster.Unbind, preserveState?: boolean): JQuery; /** - * sort the values before calling onGetList + * snapshot: take a "snapshot" of the current selection state, and reset + * ImageMapster * - * If a non-false value or "asc" is passed, the list will be sorted in - * ascending order by the area value from mapValue. If "desc" is - * passed, the list will be sorted in descending order. + * This option is similar to unbind with preserveState. After a snapshot, + * any active selections will still appear as they did at the time of the + * snapshot, but they are no longer part of the ImageMapster. This is + * useful for configuring an initial state, or creating complex + * representations that may not be easily accomplished with area + * configuration options. + * + * For example, you could bind in image with a specific set of options; + * programatically select some areas; and take a snapshot; then set new + * options that cause a different rendering mode. This way you could have + * certain areas appear differently from the selection highlight, but be + * "highlighted again" using the new rendering options. Any effects in + * place at the time of the snapshot essentially become part of the image + * and are not affected by future operations. */ - sortList?: boolean | "asc" | "desc"; + mapster(method: ImageMapster.Snapshot): JQuery; /** - * time (in milliseconds) to wait for images to load before giving up + * rebind: rebind ImageMapster with new options * - * When first bound, ImageMapster has to wait for the source image,and - * any altImage images to load before it can finish binding. This is - * necessary because otherwise it's not alwasy possible to know the - * native size of the images. After this period of time, ImageMapster - * will give up. If you have particularly large pages or images, you - * may want to increase this to account for long load times. + * This method is similar to set_options, in that its purpose is to change + * options for an existing bound map. However, unlike set_options rebind + * will immediately apply all the new options to the existing map. This + * means that rendering options will change areas that are already selected + * to be rendered with the new options. If you pass area-specific options, + * these will also be applied, e.g. you could cause new areas to be + * selected by passing selected: true in an area specific options. + * + * set_options, in contrast only changes the options, and does not apply + * them to any existing data. When using set_options the new options only + * apply to future actions. */ - configTimeout?: number; + mapster(method: ImageMapster.Rebind, options: ImageMapster.Options): JQuery; /** - * Automatically scale imagemaps to match the size of a - * dynamically-scaled image. + * resize: change the size of the image and map * - * When you render an image, you can optionally define a size through - * CSS or using the "height" and "width" attributes. If omitted, the - * image will be displayed in its native size. If included, browsers - * will automatically resize the image to display in the dimensions you - * have provided. + * This will resize the image map to the dimensions specified. Note that + * either width or height should be passed, and the other will be + * calculated in the same aspect ratio as the original image. If you pass + * both, only the width will be used to calculate the new dimensions: the + * proportions must remain the same as the original image. (Though I intend + * to allow scaling without constraining proportions, it will be difficult + * to make work for certain shapes -- e.g. circles, which would have to + * become ovals). * - * Starting with 1.1.3, ImageMapster will automatically recalculate all - * area data to match the effective size of the image. This means that - * you can set the size of your image to anything you want and - * ImageMapster will work with no changes at all needed to the "area" - * data. + * This method will recalculate and re-render the entire imagemap, so it + * will work exactly the same under the new sizing scheme. When the image + * is unbound, the imagemap will be restored to its original condition. * - * If this behavior is not desired for some reason, this can be - * disabled by setting this option to false. + * When using HTML5 canvases, any existing selections, etc. will be + * preserved during the animation. VML data cannot be resized dynamically, + * however, so in IE<9 the selections will be erased, then redrawn when the + * animation is complete. */ - scaleMap?: boolean; + mapster(method: ImageMapster.Resize, width: number, height: number, duration?: number): JQuery; /** - * Treat areas containing the onhref attribute (or missing the href - * attribute) as masks. This is true by default. + * keys: get the primary mapKey (or comma-separated list of keys) for an + * area, set of areas, or key group. Version 1.2.4.050 * - * Set this to "false" to disable automatic masking of these areas. You - * can control them explicitly by creating independent groups for areas - * you wish to mask and assigning the isMask area-specific option when - * using this option. + * This method allows you to obtain the primary mapKey (or keys) associated + * with another key, or one or more areas. If the all parameter is true, + * the method returns all keys or groups that include the area. * - * There are some things to be aware of when using nohref and masking: + * When using area groups, it is possible for more than one key to be + * associated with a map area. It's also possible for an area to be + * highlighted from code as part of a group, but be inaccessible to the + * end-user. This is because area groups are separate physical entities + * from the areas defined by their primary key. They can have different + * options, and are highlighted independently. Note: the way area groups + * work is not well documented here yet. I am working on a more + * comprehensive tutorial for the site. In the meantime please see this + * example which describes area groups in detail, and shows how they work + * through an active demonstration. * - * * You must put the area that include the nohref attribute before - * other areas that overlap it, or it will be ignored. + * There are reasons you may want to be able to access the primary keys + * that make up an area group directly. Perhaps you want to select a group + * of areas using the options from a group - but not as a separate group. + * Perhaps you want to be able to compare the area clicked against a group + * you have defined to take some action if the area is a member of a + * certain group. This method provides access to that information. * - * * You should also explicitly omit the href tag when using nohref. - * - * * Due to limitations in rendering with VML (e.g. Internet Explorer - * 6-8), it is not possible to create a true mask, which would allow - * the underlying image to show through the masked area. Instead, the - * "masked" areas are rendered on top of the highlighted area in a - * different color. This can be specified for each area (see the - * fillColorMask option below) to create the best possible effect. + * This method allows working with groups in a variety of ways by providing + * access to a complete list of primary keys in any group, or all keys + * which contain a given primary key. */ - noHrefIsMask?: boolean; + mapster(method: ImageMapster.Keys, key: string, all?: boolean): string | string[]; + mapster(method: ImageMapster.Keys, all: boolean): string | string[]; /** - * a jQuery object whose elements are bound to the map. + * set_options: set active options * - * boundList can be any list of objects. To be bound to the map, they - * must contain an attribute whose name is identified by the option - * listKey, and whose value matches the value in an area tag's mapKey - * attribute. If more than one element in the list has the same value, - * the action will affect all matching elements. + * When called without the "options" parameter, returns an object with all + * active options. When the parameter is included, the active options are + * updated for the imagemap, and any area options are merged with existing + * area options. Unlike "rebind", this will not rebind or reapply any + * options, but only update the state. This may affect future actions, but + * it will not change any existing state information. */ - boundList?: JQuery; + mapster(method: ImageMapster.SetOptions, options?: ImageMapster.Options): JQuery; /** - * enable tooltips + * get_options: get active options * - * When showToolTip is true, mapster will look for a property called - * toolTip in the areas option for a an area. If present, a tool tip - * dialog will be shown on mouseover for that area. It will - * automatically be closed according to the behavior specified by - * toolTipClose. This option does not apply at the item level, but - * rather enables tooltips for the entire map. At the item level, only - * the presence of tooltip data is necessary for a tooltip to appear. + * When called with no parameters, returns the options that the mapster was + * configured using. When called with a single key it returns the + * area-specific options assigned to that area. The final parameter + * effective determines whether the actual options in effect for this area, + * or the specific options assigned are returned. + * + * Areas inherit the global options assigned, but can be overridden by + * area-specific options. The "effective" options contain all options + * including those that are inherited, as well as any specifically assigned + * to the area. */ - showToolTip?: boolean; + mapster(method: ImageMapster.GetOptions, key?: string, effective?: boolean): ImageMapster.Options | ImageMapster.AreaRenderingOptions; /** - * HTML describing the popup that will be created for tooltips. + * tooltip: show/hide tooltips from code * - * A div with some simple styling is included as the default tooltip - * container. This can be replaced with anything using this option. + * See the tooltip options section below for options to control how + * tooltips appear and are dismissed. * - * When tooltips are rendered, the code attempts to determine the best - * place for it. It will try to position it in near the top-left part - * of the area, and continue to try other corners in order to render it - * within the confines of the container where the image map resides. If - * it can't be placed within the image, it will be placed in the - * lower-right corner and extend outside the image. + * This method can be used to manipulate tooltips from code. If the global + * showToolTip option is false, these methods will still work, so you have + * the ability to control tooltips bound to areas completely using your own + * logic, if desired. These methods can also be used to have better control + * over events needed to close the tooltip, e.g. you could have no tooltip + * closing event, but add a "close" button to your contianer that will + * cause the tooltip to close when clicked. */ - toolTipContainer?: string | JQuery; - - /** - * specify the behavior that causes a toolTip to close. - * - * This option should be passed an array of strings that define the - * events that cause active tooltips to close. The array can include - * one or more of the following stings: - * - * 'area-mouseout' - tooltips close when the mouse pointer leaves the - * area that activated it. This is the default. - * - * 'area-click' - tooltips close when another area (or the same one) is - * clicked - * - * 'tooltip-click' - tooltips close when the tooltip itself is clicked - * anywhere - * - * 'image-mouseout' - tooltips close when the mouse pointer leaves the - * image itself. - * - * Under any circumstances, active tooltip will disappear when a new - * one is created. You don't have to define an automatic closing - * behavior; setting this option to an empty array will result in - * tooltips never closing, leaving it to you to close them manually - * though the tooltip method. - */ - toolTipClose?: ToolTipCloseEvent[]; - - /** - * callback when a hotspot area is clicked. Return false to cancel - * default select action, or true to navigate to the 'href' - */ - - /** - * a callback when an area is clicked.:silent doautocmd FocusLost % - * - * This event occurs when the usual click event happens, but includes - * data from the mapster about the area: - * - * This can be used to perform additional actions on a click without - * binding another event and having to obtain information manually. - */ - onClick?: (data: OnClickData) => void; - - /** - * callback when mouse enters a bound area. - * - * This function is called when the mouse enters a bound area. - */ - onMouseover?: (data: OnMouseData) => void; - - /** - * callback when mouse leavesd a bound area. - * - * Callback when the mouse leaves a bound area. The data structure - * passed to the callback is the same as onMouseover. - */ - onMouseout?: (data: OnMouseData) => void; - - /** - * a callback on mapster initialization that provides summary data - * about the image map, and expects a jQuery list to be returned. - * - * This callback allows you to dynamically provide a boundList based on - * summary data from the imagemap itself, rather than providing the - * list up front. The event passes an array of AreaData objects - * - * The client should return a jQuery object containing all the elements - * that make up the bound list, the same as if it was assigned - * manually. - */ - onGetList?: (data: OnGetListData) => JQuery; - - /** - * a callback when the mapster has finished initial configuration - * - * This event is fired when the mapster configuration completes. When - * control execution continues after a first-time bind operation, the - * mapster is not guaranteed to be configured, because images are - * loaded asynchronously by web browsers. If a mapster is bound to an - * image that is not yet loaded, it will attempt to rebind every 200 - * milliseconds. This event will be fired when it is eventually - * successful, or the length of time specified by configTimeout is - * exceeded (default of ten seconds). - * - * The altImage option will also increase the time needed to configure, - * because the alternate image is loaded by the client at configure - * time to ensure it is available immediately when needed. - */ - onConfigured?: (success: boolean) => void; - - /** - * callback when area state is changed (either highlight or select). - * - * onStateChange can be used to get more specific information than the - * mouseover or click events. - */ - onStateChange?: (data: OnStateChangeData) => void; - - /** - * callback when a toolTip is created - * - * This can be used to control tooltip closing behavior directly, if - * desired. - */ - onShowToolTip?: (data: OnShowToolTipData) => void; + mapster(method: ImageMapster.Tooltip, key?: string): JQuery; } } - -interface JQuery { - - /** - * - * All images in the jQuery object will be bound. The specific example - * above will attempt to bind to all images present on the page. Each image - * must be bound to an image map identified with the usemap attribute. If - * there is no usemap attribute, or it does not refer to a valid map, then - * the image will be ignored. Therefore you can use this syntax to activate - * all imagemaps on a page. Because pages often contain many images, - * though, it will be faster to select just the image you are targeting - * using a more specific selector. - * - * Images are often not completely loaded when script execution begins. - * ImageMapster will ensure that all images are loaded before it permits - * interaction from the client. If an alternate image is specified, this - * will also be preloaded. - * - * Because images are loaded asynchronously, code execution will often - * return to your script before the ImageMapster is available. If you apply - * other methods to it (such as selecting or deselecting areas), these - * commands will be queued until the image has been loaded, and then - * executed automatically. So you don't need to worry about using callbacks - * for initial configuration. You can assign a function to a callback when - * configuration is complete if needed to perform other setup activities on - * the page. - */ - mapster(options?: ImageMapster.Options): JQuery; - - /** - * select: Cause an area to become selected. This is similar to a user - * click, but will not cause a click event to be fired. - * - * Programatically select elements from the image map. The programmatic - * selection/deselection methods will not honor the staticState property. - */ - mapster(method: ImageMapster.Select): void; - - /** - * deselect: Cause an area to become deselected - * - * The opposite of select, this causes an area to become deselected. If it - * was not previously selected, nothing changes. - */ - mapster(method: ImageMapster.Deselect): void; - - /** - * set: select or deselect an area - * - * Select or deselect elements from jQuery objects wrapping "area" tags on - * the map based on truthiness of selected. If the area represents a bound - * area on the imagemap, it will be selected or deselected. The method can - * be called from an AREA, or from a bound image, passing a specific key as - * a 2nd parameter - * - * If the selected parameter is omitted (or anything other than "true" or - * "false") then the state of each area will be toggled. - * - * You can include an object containing rendering options as the last - * parameter. When present, these will supercede the default and - * area-specific rendering options. - */ - mapster(method: ImageMapster.Set, selected: boolean, options: ImageMapster.RenderingOptions): JQuery; - mapster(method: ImageMapster.Set, options: ImageMapster.RenderingOptions): JQuery; - - /** - * get: get keys for all selected areas - * - * When no "key" parameter is included, returns a comma-separated list of - * keys representing the areas currently selected. If specified, returns - * true or false indicating whether the area specified is selected. - */ - mapster(method: ImageMapster.Get, key?: string): string | boolean; - - /** - * highlight: highlight, clear, or return highlight state - * - * This method is used to control or obtain the current highlight state. - * Setting the highlight does not mimic a mouseover, rather, it only sets - * the highlight. Events and tooltips will not be activated. Even using - * these methods, it is not possible to highlight more than one area at a - * time. If another area is highlighted programatically, any existing - * highlight will be removed. - * - * Once set this way, the highlight will be removed when any user-event - * that would normally cause a highlight to be removed occurs (e.g. moving - * the mouse into any area), or it is removed programatically. - */ - mapster(method: ImageMapster.Highlight, flag?: string | boolean): void; - - /** - * unbind: unbind ImageMapster from an image - * - * Removes the ImageMapster binding from an image and restores it to its - * original state. All visible elements (selections, tooltips) will be - * removed. - * - * If the optional "preserveState" parameter is true, the selection overlay - * and any active tooltips will be preserved. Tooltips can still be - * dismissed by a user click, but once unbound, the selection states can no - * longer be controlled either by the user or programatically. To remove - * them, the actual DOM elements must be removed. - * - * Notes: When a mapster is first bound, several things happen. A div - * element is created which wraps the image. A copy is made of the original - * image, and the original image is set be transparent. This allows - * creating visible elements for the selections & highlights without - * interfering with the image map. Additionally, canvas elements are - * created (for HTML5 browsers), or a VML elements are created for Internet - * Explorer, to render the effects. Profile information about each bound - * image map is stored in memory, and finally, event handlers are bound to - * the image map. - * - * The "unbind" method cleans up these resources: it removes the wrapper, - * restores the image to its original visibility state, and releases - * internal resources. When using 'preserveState', the internal resources - * are cleaned up and event handling is disabled, but HTML elements are not - * removed. Each element created by ImageMapster is assigned a class of - * "mapster_el", which can be used to target them for later removal, though - * it is not easy to complete this process manually because of the wrapper - * and styles applied during configuration, which will be left intact when - * using "preserveState." - */ - mapster(method: ImageMapster.Unbind, preserveState?: boolean): JQuery; - - /** - * snapshot: take a "snapshot" of the current selection state, and reset - * ImageMapster - * - * This option is similar to unbind with preserveState. After a snapshot, - * any active selections will still appear as they did at the time of the - * snapshot, but they are no longer part of the ImageMapster. This is - * useful for configuring an initial state, or creating complex - * representations that may not be easily accomplished with area - * configuration options. - * - * For example, you could bind in image with a specific set of options; - * programatically select some areas; and take a snapshot; then set new - * options that cause a different rendering mode. This way you could have - * certain areas appear differently from the selection highlight, but be - * "highlighted again" using the new rendering options. Any effects in - * place at the time of the snapshot essentially become part of the image - * and are not affected by future operations. - */ - mapster(method: ImageMapster.Snapshot): JQuery; - - /** - * rebind: rebind ImageMapster with new options - * - * This method is similar to set_options, in that its purpose is to change - * options for an existing bound map. However, unlike set_options rebind - * will immediately apply all the new options to the existing map. This - * means that rendering options will change areas that are already selected - * to be rendered with the new options. If you pass area-specific options, - * these will also be applied, e.g. you could cause new areas to be - * selected by passing selected: true in an area specific options. - * - * set_options, in contrast only changes the options, and does not apply - * them to any existing data. When using set_options the new options only - * apply to future actions. - */ - mapster(method: ImageMapster.Rebind, options: ImageMapster.Options): JQuery; - - /** - * resize: change the size of the image and map - * - * This will resize the image map to the dimensions specified. Note that - * either width or height should be passed, and the other will be - * calculated in the same aspect ratio as the original image. If you pass - * both, only the width will be used to calculate the new dimensions: the - * proportions must remain the same as the original image. (Though I intend - * to allow scaling without constraining proportions, it will be difficult - * to make work for certain shapes -- e.g. circles, which would have to - * become ovals). - * - * This method will recalculate and re-render the entire imagemap, so it - * will work exactly the same under the new sizing scheme. When the image - * is unbound, the imagemap will be restored to its original condition. - * - * When using HTML5 canvases, any existing selections, etc. will be - * preserved during the animation. VML data cannot be resized dynamically, - * however, so in IE<9 the selections will be erased, then redrawn when the - * animation is complete. - */ - mapster(method: ImageMapster.Resize, width: number, height: number, duration?: number): JQuery; - - /** - * keys: get the primary mapKey (or comma-separated list of keys) for an - * area, set of areas, or key group. Version 1.2.4.050 - * - * This method allows you to obtain the primary mapKey (or keys) associated - * with another key, or one or more areas. If the all parameter is true, - * the method returns all keys or groups that include the area. - * - * When using area groups, it is possible for more than one key to be - * associated with a map area. It's also possible for an area to be - * highlighted from code as part of a group, but be inaccessible to the - * end-user. This is because area groups are separate physical entities - * from the areas defined by their primary key. They can have different - * options, and are highlighted independently. Note: the way area groups - * work is not well documented here yet. I am working on a more - * comprehensive tutorial for the site. In the meantime please see this - * example which describes area groups in detail, and shows how they work - * through an active demonstration. - * - * There are reasons you may want to be able to access the primary keys - * that make up an area group directly. Perhaps you want to select a group - * of areas using the options from a group - but not as a separate group. - * Perhaps you want to be able to compare the area clicked against a group - * you have defined to take some action if the area is a member of a - * certain group. This method provides access to that information. - * - * This method allows working with groups in a variety of ways by providing - * access to a complete list of primary keys in any group, or all keys - * which contain a given primary key. - */ - mapster(method: ImageMapster.Keys, key: string, all?: boolean): string | string[]; - mapster(method: ImageMapster.Keys, all: boolean): string | string[]; - - /** - * set_options: set active options - * - * When called without the "options" parameter, returns an object with all - * active options. When the parameter is included, the active options are - * updated for the imagemap, and any area options are merged with existing - * area options. Unlike "rebind", this will not rebind or reapply any - * options, but only update the state. This may affect future actions, but - * it will not change any existing state information. - */ - mapster(method: ImageMapster.SetOptions, options?: ImageMapster.Options): JQuery; - - /** - * get_options: get active options - * - * When called with no parameters, returns the options that the mapster was - * configured using. When called with a single key it returns the - * area-specific options assigned to that area. The final parameter - * effective determines whether the actual options in effect for this area, - * or the specific options assigned are returned. - * - * Areas inherit the global options assigned, but can be overridden by - * area-specific options. The "effective" options contain all options - * including those that are inherited, as well as any specifically assigned - * to the area. - */ - mapster(method: ImageMapster.GetOptions, key?: string, effective?: boolean): ImageMapster.Options | ImageMapster.AreaRenderingOptions; - - /** - * tooltip: show/hide tooltips from code - * - * See the tooltip options section below for options to control how - * tooltips appear and are dismissed. - * - * This method can be used to manipulate tooltips from code. If the global - * showToolTip option is false, these methods will still work, so you have - * the ability to control tooltips bound to areas completely using your own - * logic, if desired. These methods can also be used to have better control - * over events needed to close the tooltip, e.g. you could have no tooltip - * closing event, but add a "close" button to your contianer that will - * cause the tooltip to close when clicked. - */ - mapster(method: ImageMapster.Tooltip, key?: string): JQuery; -} diff --git a/types/imagemapster/tsconfig.json b/types/imagemapster/tsconfig.json index dc96de2d3e..ca23742027 100644 --- a/types/imagemapster/tsconfig.json +++ b/types/imagemapster/tsconfig.json @@ -12,6 +12,11 @@ "typeRoots": [ "../" ], + "paths": { + "jquery": [ + "jquery/v2" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -20,4 +25,4 @@ "index.d.ts", "imagemapster-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/imagesloaded/index.d.ts b/types/imagesloaded/index.d.ts index 9a48a18e19..5dd4ea0abc 100644 --- a/types/imagesloaded/index.d.ts +++ b/types/imagesloaded/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/desandro/imagesloaded // Definitions by: Chris Charabaruk , Cameron Little // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/inert/index.d.ts b/types/inert/index.d.ts index a54841eac7..28e4efbe58 100644 --- a/types/inert/index.d.ts +++ b/types/inert/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/hapijs/inert/ // Definitions by: Steve Ognibene , AJP // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as hapi from 'hapi'; diff --git a/types/inert/inert-tests.ts b/types/inert/inert-tests.ts index 82cd1f1295..9062e13f6b 100644 --- a/types/inert/inert-tests.ts +++ b/types/inert/inert-tests.ts @@ -1,7 +1,5 @@ // Copied from: https://github.com/hapijs/inert#examples -/// - import Path = require('path'); import Hapi = require('hapi'); import Inert = require('inert'); diff --git a/types/ini/ini-tests.ts b/types/ini/ini-tests.ts index 806d816a1a..a0c98264ca 100644 --- a/types/ini/ini-tests.ts +++ b/types/ini/ini-tests.ts @@ -1,9 +1,6 @@ -/// - -import fs = require("fs"); import ini = require("ini"); -var ini_content = fs.readFileSync("path_to_file.ini", "utf-8"); +var ini_content = ""; var ini_object: any = ini.decode(ini_content); var ini_rev_string: string = ini.encode(ini_object); \ No newline at end of file diff --git a/types/inline-css/index.d.ts b/types/inline-css/index.d.ts index a6db3ef67b..6d43b7975d 100644 --- a/types/inline-css/index.d.ts +++ b/types/inline-css/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jonkemp/inline-css // Definitions by: Philip Spain // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/inquirer/index.d.ts b/types/inquirer/index.d.ts index dd2f4ad3c7..2a0b9f60f4 100644 --- a/types/inquirer/index.d.ts +++ b/types/inquirer/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for Inquirer.js // Project: https://github.com/SBoudrias/Inquirer.js // Definitions by: Qubo +// Parvez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -110,6 +111,10 @@ declare namespace inquirer { * Change the number of lines that will be rendered when using list, rawList, expand or checkbox. */ pageSize?: number; + /** + * Add a mask when password will entered + */ + mask?: string; } /** diff --git a/types/inquirer/inquirer-tests.ts b/types/inquirer/inquirer-tests.ts index a8610aca8a..d3591b13d2 100644 --- a/types/inquirer/inquirer-tests.ts +++ b/types/inquirer/inquirer-tests.ts @@ -1,5 +1,3 @@ -/// - import inquirer = require('inquirer'); diff --git a/types/insert-module-globals/index.d.ts b/types/insert-module-globals/index.d.ts new file mode 100644 index 0000000000..1fb0b6e7ba --- /dev/null +++ b/types/insert-module-globals/index.d.ts @@ -0,0 +1,67 @@ +// Type definitions for insert-module-globals 7.0 +// Project: https://github.com/substack/insert-module-globals +// Definitions by: Leonard Thieu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as stream from 'stream'; + +export = InsertModuleGlobals; + +interface InsertModuleGlobals { + /** + * Return a transform stream inserter for the filename file that will accept a javascript file as input and + * will output the file with a closure around the contents as necessary to define extra builtins. + */ + (file: string, opts?: InsertModuleGlobals.Options): stream.Transform; + + /** + * Defaults + */ + readonly vars: { + process(file: string): string; + global(): string; + 'Buffer.isBuffer'(file: string): string; + Buffer(): string; + __filename(file: string, basedir: string): string; + __dirname(file: string, basedir: string): string; + }; +} + +declare const InsertModuleGlobals: InsertModuleGlobals; + +declare namespace InsertModuleGlobals { + interface Options { + /** + * When opts.always is true, wrap every file with all the global variables without parsing. + * This is handy because parsing the scope can take a long time, so you can prioritize fast builds over saving bytes in the final output. + * When opts.always is truthy but not true, avoid parsing but perform a quick test to determine if wrapping should be skipped. + */ + always?: boolean; + /** + * Use opts.vars to override the default inserted variables, or set opts.vars[name] to undefined to not insert a variable which would otherwise be inserted. + * + * opts.vars properties with a . in their name will be executed instead of the parent object if ONLY that property is used. + * For example, "Buffer.isBuffer" will mask "Buffer" only when there is a Buffer.isBuffer() call in a file and no other references to Buffer. + */ + vars?: VarsOption; + /** + * If opts.debug is true, an inline source map will be generated to compensate for the extra lines. + */ + debug?: boolean; + basedir?: string; + } + + interface VarsOption { + [name: string]: InsertFunction | undefined; + } + + type InsertFunction = (file: string, basedir: string) => VariableConfig | string; + + interface VariableConfig { + id: string; + source: string; + suffix?: string; + } +} diff --git a/types/insert-module-globals/insert-module-globals-tests.ts b/types/insert-module-globals/insert-module-globals-tests.ts new file mode 100644 index 0000000000..0fa6c1af38 --- /dev/null +++ b/types/insert-module-globals/insert-module-globals-tests.ts @@ -0,0 +1,60 @@ +import insert = require('insert-module-globals'); +import { VarsOption } from 'insert-module-globals'; + +function example() { + function inserter(file: string) { + return insert(file, { basedir: __dirname + '/files' }); + } + + return inserter; +} + +function insert_custom_globals() { + const customProcessContent = 'customProcessContent'; + const files: string[] = []; + + const vars: VarsOption = { + process(file, basedir) { + return { + id: "path/to/custom_process.js", + source: customProcessContent + }; + }, + Buffer(file, basedir) { + return { + id: 'path/to/custom_buffer.js', + source: customProcessContent, + // suffix is optional + // it's used to extract the value from the module. + // it becomes: require(...).Buffer in this case. + suffix: '.Buffer' + }; + }, + Math() { + // if you return a string, + // it's simply set as the value. + return '{}'; + // ^ any attempt to use Math[x] will throw! + } + }; + + function inserter(file: string) { + return insert(file, { vars }); + } + + return inserter; +} + +function disable_select_globals() { + const insertGlobalVars: VarsOption = {}; + const wantedGlobalVars = ['__filename', '__dirname']; + Object.keys(insert.vars).forEach((x) => { + if (wantedGlobalVars.indexOf(x) === -1) { + insertGlobalVars[x] = undefined; + } + }); + + return insert('index.js', { + vars: insertGlobalVars + }); +} diff --git a/types/insert-module-globals/tsconfig.json b/types/insert-module-globals/tsconfig.json new file mode 100644 index 0000000000..0a6e51fb74 --- /dev/null +++ b/types/insert-module-globals/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", + "insert-module-globals-tests.ts" + ] +} diff --git a/types/insert-module-globals/tslint.json b/types/insert-module-globals/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/insert-module-globals/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/intl-tel-input/index.d.ts b/types/intl-tel-input/index.d.ts index 38ac9274ca..28a147a1c5 100644 --- a/types/intl-tel-input/index.d.ts +++ b/types/intl-tel-input/index.d.ts @@ -1,17 +1,108 @@ // Type definitions for intl-tel-input // Project: https://github.com/jackocnr/intl-tel-input -// Definitions by: Fidan Hakaj +// Definitions by: Fidan Hakaj , Leonard Thieu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Static methods that are defined in JQueryStatic.fn are not typed -// as jquery.d.ts has no interface for fn -// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/jquery/jquery.d.ts#L958 -// fn: any; //TODO: Decide how we want to type this +// TypeScript Version: 2.3 /// declare namespace IntlTelInput { + interface Plugin { + /** + * Get all of the plugin's country data - either to re-use elsewhere + * e.g. to populate a country dropdown. + */ + getCountryData(): CountryData[]; + /** + * Load the utils.js script (included in the lib directory) to enable + * formatting/validation etc. + */ + loadUtils(path: string, utilsScriptDeferred?: boolean): void; + + /** + * Remove the plugin from the input, and unbind any event listeners. + */ + (method: 'destroy'): void; + /** + * Get the extension from the current number. + * Requires the utilsScript option. + * e.g. if the input value was "(702) 555-5555 ext. 1234", this would + * return "1234". + */ + (method: 'getExtension'): string; + /** + * Get the current number in the given format (defaults to E.164 standard). + * The different formats are available in the enum + * intlTelInputUtils.numberFormat - taken from here. + * Requires the utilsScript option. + * Note that even if nationalMode is enabled, this can still return a full + * international number. + */ + (method: 'getNumber'): string; + /** + * Get the type (fixed-line/mobile/toll-free etc) of the current number. + * Requires the utilsScript option. + * Returns an integer, which you can match against the various options in the + * global enum intlTelInputUtils.numberType. + * Note that in the US there's no way to differentiate between fixed-line and + * mobile numbers, so instead it will return FIXED_LINE_OR_MOBILE. + */ + (method: 'getNumberType'): intlTelInputUtils.numberType; + /** + * Get the country data for the currently selected flag. + */ + (method: 'getSelectedCountryData'): IntlTelInput.CountryData; + /** + * Get more information about a validation error. + * Requires the utilsScript option. + * Returns an integer, which you can match against the various options in the + * global enum intlTelInputUtils.validationError + */ + (method: 'getValidationError'): intlTelInputUtils.validationError; + /** + * Validate the current number. Expects an internationally formatted number + * (unless nationalMode is enabled). If validation fails, you can use + * getValidationError to get more information. + * Requires the utilsScript option. + * Also see getNumberType if you want to make sure the user enters a certain + * type of number e.g. a mobile number. + */ + (method: 'isValidNumber'): boolean; + (method: string): void; + /** + * Change the country selection (e.g. when the user is entering their address). + * @param countryCode country code of the country to be set. + */ + (method: 'setCountry', countryCode: string): void; + /** + * Insert a number, and update the selected flag accordingly. + * Note that by default, if nationalMode is enabled it will try to use + * national formatting. + * @param aNumber number to be set. + */ + (method: 'setNumber', aNumber: string): void; + (method: string, value: string): void; + + /** + * Get the current number in the given format (defaults to E.164 standard). + * The different formats are available in the enum + * intlTelInputUtils.numberFormat - taken from here. + * Requires the utilsScript option. + * Note that even if nationalMode is enabled, this can still return a full + * international number. + * @param numberFormat the format in which the number will be returned. + */ + (method: 'getNumber', numberFormat: intlTelInputUtils.numberFormat): string; + (method: string, numberFormat: intlTelInputUtils.numberFormat): string; + + /** + * initialise the plugin with optional options. + * @param options options that can be provided during initialization. + */ + (options?: IntlTelInput.Options): JQueryDeferred; + } + interface Options { /** * Whether or not to allow the dropdown. If disabled, there is no dropdown @@ -154,85 +245,5 @@ declare namespace intlTelInputUtils { } interface JQuery { - /** - * Remove the plugin from the input, and unbind any event listeners. - */ - intlTelInput(method: 'destroy'): void; - /** - * Get the extension from the current number. - * Requires the utilsScript option. - * e.g. if the input value was "(702) 555-5555 ext. 1234", this would - * return "1234". - */ - intlTelInput(method: 'getExtension'): string; - /** - * Get the current number in the given format (defaults to E.164 standard). - * The different formats are available in the enum - * intlTelInputUtils.numberFormat - taken from here. - * Requires the utilsScript option. - * Note that even if nationalMode is enabled, this can still return a full - * international number. - */ - intlTelInput(method: 'getNumber'): string; - /** - * Get the type (fixed-line/mobile/toll-free etc) of the current number. - * Requires the utilsScript option. - * Returns an integer, which you can match against the various options in the - * global enum intlTelInputUtils.numberType. - * Note that in the US there's no way to differentiate between fixed-line and - * mobile numbers, so instead it will return FIXED_LINE_OR_MOBILE. - */ - intlTelInput(method: 'getNumberType'): intlTelInputUtils.numberType; - /** - * Get the country data for the currently selected flag. - */ - intlTelInput(method: 'getSelectedCountryData'): IntlTelInput.CountryData; - /** - * Get more information about a validation error. - * Requires the utilsScript option. - * Returns an integer, which you can match against the various options in the - * global enum intlTelInputUtils.validationError - */ - intlTelInput(method: 'getValidationError'): intlTelInputUtils.validationError; - /** - * Validate the current number. Expects an internationally formatted number - * (unless nationalMode is enabled). If validation fails, you can use - * getValidationError to get more information. - * Requires the utilsScript option. - * Also see getNumberType if you want to make sure the user enters a certain - * type of number e.g. a mobile number. - */ - intlTelInput(method: 'isValidNumber'): boolean; - intlTelInput(method: string): void; - /** - * Change the country selection (e.g. when the user is entering their address). - * @param countryCode country code of the country to be set. - */ - intlTelInput(method: 'setCountry', countryCode: string): void; - /** - * Insert a number, and update the selected flag accordingly. - * Note that by default, if nationalMode is enabled it will try to use - * national formatting. - * @param aNumber number to be set. - */ - intlTelInput(method: 'setNumber', aNumber: string): void; - intlTelInput(method: string, value: string): void; - - /** - * Get the current number in the given format (defaults to E.164 standard). - * The different formats are available in the enum - * intlTelInputUtils.numberFormat - taken from here. - * Requires the utilsScript option. - * Note that even if nationalMode is enabled, this can still return a full - * international number. - * @param numberFormat the format in which the number will be returned. - */ - intlTelInput(method: 'getNumber', numberFormat: intlTelInputUtils.numberFormat): string; - intlTelInput(method: string, numberFormat: intlTelInputUtils.numberFormat): string; - - /** - * initialise the plugin with optional options. - * @param options options that can be provided during initialization. - */ - intlTelInput(options?: IntlTelInput.Options): JQueryDeferred; + intlTelInput: IntlTelInput.Plugin; } diff --git a/types/intro.js/index.d.ts b/types/intro.js/index.d.ts index b0925cd41a..26d1fbcac4 100644 --- a/types/intro.js/index.d.ts +++ b/types/intro.js/index.d.ts @@ -50,6 +50,7 @@ declare namespace IntroJs { exit(): IntroJs; clone(): IntroJs; + goToStepNumber(stepId: number): IntroJs goToStep(step: number): IntroJs; nextStep(): IntroJs; previousStep(): IntroJs; @@ -66,11 +67,12 @@ declare namespace IntroJs { oncomplete(callback: Function): IntroJs; addHints(): IntroJs; - showHint(stepId: number): IntroJs; showHints(): IntroJs; hideHint(stepId: number): IntroJs; hideHints(): IntroJs; + removeHint(stepId: number): IntroJs; + removeHints(): IntroJs; onhintsadded(callback: Function): IntroJs; onhintclick(callback: (hintElement: HTMLElement, item: Step, stepId: number) => any): IntroJs; diff --git a/types/intro.js/intro.js-tests.ts b/types/intro.js/intro.js-tests.ts index 19267a94a3..d40fbe3f36 100644 --- a/types/intro.js/intro.js-tests.ts +++ b/types/intro.js/intro.js-tests.ts @@ -57,6 +57,7 @@ intro.setOptions({ intro.start() .nextStep() .previousStep() + .goToStepNumber(1).start() .goToStep(2) .exit() .refresh() @@ -89,6 +90,8 @@ intro.start() .showHints() .hideHint(1) .hideHints() + .hideHint(1) + .hideHints() .clone(); introWithElement.start() diff --git a/types/ion.rangeslider/index.d.ts b/types/ion.rangeslider/index.d.ts index 49dd14f815..21d99c5c6d 100644 --- a/types/ion.rangeslider/index.d.ts +++ b/types/ion.rangeslider/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/IonDen/ion.rangeSlider/ // Definitions by: Sixin Li // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // API documentation: http://ionden.com/a/plugins/ion.rangeSlider/en.html diff --git a/types/ion.rangeslider/v1/index.d.ts b/types/ion.rangeslider/v1/index.d.ts index 55c74e3f4e..d819f46964 100644 --- a/types/ion.rangeslider/v1/index.d.ts +++ b/types/ion.rangeslider/v1/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/IonDen/ion.rangeSlider/ // Definitions by: Douglas Eichelberger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // API documentation: http://ionden.com/a/plugins/ion.rangeSlider/en.html diff --git a/types/ionic/index.d.ts b/types/ionic/index.d.ts index 4dfb7f60b6..51d284a711 100644 --- a/types/ionic/index.d.ts +++ b/types/ionic/index.d.ts @@ -2,6 +2,7 @@ // Project: http://ionicframework.com // Definitions by: Spencer Williams // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/ip/index.d.ts b/types/ip/index.d.ts index 0e3bb7bd14..602a71eed9 100644 --- a/types/ip/index.d.ts +++ b/types/ip/index.d.ts @@ -75,6 +75,16 @@ declare module "ip" { **/ export function isLoopback(ip: string): boolean; + /** + * Check whether an IP is a IPv4 address. + **/ + export function isV4Format(ip: string): boolean; + + /** + * Check whether an IP is a IPv6 address. + **/ + export function isV6Format(ip: string): boolean; + /** * Get the loopback address for an IP family. * diff --git a/types/is-alphanumerical/index.d.ts b/types/is-alphanumerical/index.d.ts new file mode 100644 index 0000000000..940a005b08 --- /dev/null +++ b/types/is-alphanumerical/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for is-alphanumerical 1.0 +// Project: https://github.com/wooorm/is-alphanumerical/ +// Definitions by: Vu Tran +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function isAlphanumerical(val: string | boolean | number): boolean; +export = isAlphanumerical; diff --git a/types/is-alphanumerical/is-alphanumerical-tests.ts b/types/is-alphanumerical/is-alphanumerical-tests.ts new file mode 100644 index 0000000000..3d6602c6df --- /dev/null +++ b/types/is-alphanumerical/is-alphanumerical-tests.ts @@ -0,0 +1,7 @@ +import isAlphanumerical = require('is-alphanumerical'); + +isAlphanumerical('a'); +isAlphanumerical('z'); +isAlphanumerical('0'); +isAlphanumerical('9'); +isAlphanumerical('💩'); diff --git a/types/is-alphanumerical/tsconfig.json b/types/is-alphanumerical/tsconfig.json new file mode 100644 index 0000000000..481957289e --- /dev/null +++ b/types/is-alphanumerical/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", + "is-alphanumerical-tests.ts" + ] +} diff --git a/types/is-alphanumerical/tslint.json b/types/is-alphanumerical/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-alphanumerical/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/isotope-layout/index.d.ts b/types/isotope-layout/index.d.ts index 007740df8e..84f14bed06 100644 --- a/types/isotope-layout/index.d.ts +++ b/types/isotope-layout/index.d.ts @@ -2,6 +2,7 @@ // Project: http://isotope.metafizzy.co/ // Definitions by: Anže Videnič // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/isotope-layout/isotope-layout-tests.ts b/types/isotope-layout/isotope-layout-tests.ts index 8f20d52fcc..648ba507ce 100644 --- a/types/isotope-layout/isotope-layout-tests.ts +++ b/types/isotope-layout/isotope-layout-tests.ts @@ -101,7 +101,7 @@ let iso: Isotope = $grid.data('isotope'); iso = new Isotope('.grid'); iso.addItems($('.items')); iso.appended(new HTMLElement()); -iso.arrange(new HTMLElement()); +iso.arrange({ cellsByColumn: { columnWidth: 101, rowHeight: 12 } }); iso.destroy(); elements = iso.getFilteredItemElements(); elements = iso.getItemElements(); diff --git a/types/jake/index.d.ts b/types/jake/index.d.ts index cb23f992f0..29385edcdc 100644 --- a/types/jake/index.d.ts +++ b/types/jake/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/mde/jake // Definitions by: Kon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// @@ -38,7 +39,7 @@ declare function fail(...err:any[]): void; * @param action The action to perform for this task * @param opts Perform this task asynchronously. If you flag a task with this option, you must call the global `complete` method inside the task's action, for execution to proceed to the next task. */ -declare function file(name:string, prereqs?:string[], action?:()=>void, opts?:jake.FileTaskOptions): jake.FileTask; +declare function file(name:string, prereqs?:string[], action?:(this: jake.FileTask)=>void, opts?:jake.FileTaskOptions): jake.FileTask; /** * Creates Jake FileTask from regex patterns @@ -63,9 +64,9 @@ declare function namespace(name:string, scope:()=>void): void; * @param action The action to perform for this task * @param opts */ -declare function task(name:string, prereqs?:string[], action?:(...params:any[])=>any, opts?:jake.TaskOptions): jake.Task; -declare function task(name:string, action?:(...params:any[])=>any, opts?:jake.TaskOptions): jake.Task; -declare function task(name:string, opts?:jake.TaskOptions, action?:(...params:any[])=>any): jake.Task; +declare function task(name:string, prereqs?:string[], action?:(this: jake.Task, ...params:any[])=>any, opts?:jake.TaskOptions): jake.Task; +declare function task(name:string, action?:(this: jake.Task, ...params:any[])=>any, opts?:jake.TaskOptions): jake.Task; +declare function task(name:string, opts?:jake.TaskOptions, action?:(this: jake.Task, ...params:any[])=>any): jake.Task; /** * @param name The name of the NpmPublishTask @@ -214,7 +215,7 @@ declare namespace jake{ * @param action The action to perform for this task * @param opts Perform this task asynchronously. If you flag a task with this option, you must call the global `complete` method inside the task's action, for execution to proceed to the next task. */ - constructor(name:string, prereqs?:string[], action?:()=>void, opts?:TaskOptions); + constructor(name:string, prereqs?:string[], action?:(this: Task)=>void, opts?:TaskOptions); /** * Runs prerequisites, then this task. If the task has already been run, will not run the task again. @@ -236,10 +237,19 @@ declare namespace jake{ listeners(event: string): Function[]; emit(event: string, ...args: any[]): boolean; listenerCount(type: string): number; + complete(value?: any): void; value: any; + + name?: string; + prereqs?: string[]; + action?: (...params: any[]) => any; + taskStatus?: string; + async?: boolean; + description?: string; + fullName: string; } - export class DirectoryTask{ + export class DirectoryTask extends FileTask { /** * @param name The name of the directory to create. */ @@ -254,14 +264,14 @@ declare namespace jake{ async?: boolean; } - export class FileTask{ + export class FileTask extends Task{ /** * @param name The name of the Task * @param prereqs Prerequisites to be run before this task * @param action The action to perform to create this file * @param opts Perform this task asynchronously. If you flag a task with this option, you must call the global `complete` method inside the task's action, for execution to proceed to the next task. */ - constructor(name:string, prereqs?:string[], action?:()=>void, opts?:FileTaskOptions); + constructor(name:string, prereqs?:string[], action?:(this: FileTask)=>void, opts?:FileTaskOptions); } interface FileFilter{ diff --git a/types/jasmine-ajax/index.d.ts b/types/jasmine-ajax/index.d.ts index dcc6720f04..0d1d92751d 100644 --- a/types/jasmine-ajax/index.d.ts +++ b/types/jasmine-ajax/index.d.ts @@ -24,6 +24,8 @@ interface JasmineAjaxRequest extends XMLHttpRequest { data(): string; respondWith(response: JasmineAjaxResponse): void; + responseTimeout(): void; + responseError(): void; } interface JasmineAjaxRequestTracker { diff --git a/types/jasmine-fixture/index.d.ts b/types/jasmine-fixture/index.d.ts index f018dde1cf..3c02fad4ac 100644 --- a/types/jasmine-fixture/index.d.ts +++ b/types/jasmine-fixture/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/searls/jasmine-fixture // Definitions by: Craig Brett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 /// diff --git a/types/jasmine-given/index.d.ts b/types/jasmine-given/index.d.ts new file mode 100644 index 0000000000..70a23d7e07 --- /dev/null +++ b/types/jasmine-given/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for jasmine-given 2.6 +// Project: https://github.com/searls/jasmine-given +// Definitions by: Shai Reznik +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function Given(func: () => void): void; +declare function When(func: () => void): void; +declare function Then(func: () => void): void; +declare function And(func: () => void): void; +declare function Invariant(func: () => void): void; diff --git a/types/jasmine-given/jasmine-given-tests.ts b/types/jasmine-given/jasmine-given-tests.ts new file mode 100644 index 0000000000..8a994ecbbe --- /dev/null +++ b/types/jasmine-given/jasmine-given-tests.ts @@ -0,0 +1,9 @@ +Given(() => { }); + +When(() => { }); + +Then(() => { }); + +And(() => { }); + +Invariant(() => {}); diff --git a/types/jasmine-given/tsconfig.json b/types/jasmine-given/tsconfig.json new file mode 100644 index 0000000000..cb1571590b --- /dev/null +++ b/types/jasmine-given/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", + "jasmine-given-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jasmine-given/tslint.json b/types/jasmine-given/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/jasmine-given/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/jasmine-jquery/index.d.ts b/types/jasmine-jquery/index.d.ts index 14eb26b380..4cb2de8c26 100644 --- a/types/jasmine-jquery/index.d.ts +++ b/types/jasmine-jquery/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/velesin/jasmine-jquery // Definitions by: Gregor Stamac // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 /// /// diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index 11b0d1919c..f1af5ef514 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -1,44 +1,123 @@ // Type definitions for Jasmine 2.5.2 // Project: http://jasmine.github.io/ -// Definitions by: Boris Yankov , Theodore Brown , David Pärsson +// Definitions by: Boris Yankov , Theodore Brown , David Pärsson , Gabe Moothart , Lukas Zech // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 // For ddescribe / iit use : https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/karma-jasmine/karma-jasmine.d.ts +/** + * Create a group of specs (often called a suite). + * @param description Textual description of the group + * @param specDefinitions Function for Jasmine to invoke that will define inner suites a specs + */ declare function describe(description: string, specDefinitions: () => void): void; declare function fdescribe(description: string, specDefinitions: () => void): void; declare function xdescribe(description: string, specDefinitions: () => void): void; +/** + * Define a single spec. A spec should contain one or more expectations that test the state of the code. + * A spec whose expectations all succeed will be passing and a spec with any failures will fail. + * @param expectation Textual description of what this spec is checking + * @param assertion Function that contains the code of your test. If not provided the test will be pending. + * @param timeout Custom timeout for an async spec. + */ declare function it(expectation: string, assertion?: (done: DoneFn) => void, timeout?: number): void; + +/** + * A focused it + * If suites or specs are focused, only those that are focused will be executed. + * @param expectation + * @param assertion + * @param timeout + */ declare function fit(expectation: string, assertion?: (done: DoneFn) => void, timeout?: number): void; declare function xit(expectation: string, assertion?: (done: DoneFn) => void, timeout?: number): void; -/** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */ +/** + * Mark a spec as pending, expectation results will be ignored. + * If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. + * @param reason + * @returns {} + */ declare function pending(reason?: string): void; +/** + * Run some shared setup before each of the specs in the describe in which it is called. + * @param action Function that contains the code to setup your specs. + * @param timeout Custom timeout for an async beforeEach. + */ declare function beforeEach(action: (done: DoneFn) => void, timeout?: number): void; + +/** + * Run some shared teardown after each of the specs in the describe in which it is called. + * @param action Function that contains the code to teardown your specs. + * @param timeout Custom timeout for an async afterEach. + */ declare function afterEach(action: (done: DoneFn) => void, timeout?: number): void; +/** + * Run some shared setup once before all of the specs in the describe are run. + * Note: Be careful, sharing the setup from a beforeAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail. + * @param action Function that contains the code to setup your specs. + * @param timeout Custom timeout for an async beforeAll. + */ declare function beforeAll(action: (done: DoneFn) => void, timeout?: number): void; + +/** + * Run some shared teardown once before all of the specs in the describe are run. + * Note: Be careful, sharing the teardown from a afterAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail. + * @param action Function that contains the code to teardown your specs. + * @param timeout Custom timeout for an async afterAll + */ declare function afterAll(action: (done: DoneFn) => void, timeout?: number): void; +/** + * Create an expectation for a spec. + * @param spy + */ declare function expect(spy: Function): jasmine.Matchers; + +/** + * Create an expectation for a spec. + * @param actual + */ declare function expect(actual: ArrayLike): jasmine.ArrayLikeMatchers; + +/** + * Create an expectation for a spec. + * @param actual Actual computed value to test expectations against. + */ declare function expect(actual: T): jasmine.Matchers; +/** + * Explicitly mark a spec as failed. + * @param e + */ declare function fail(e?: any): void; + /** Action method that should be called when the async work is complete */ interface DoneFn extends Function { (): void; /** fails the spec and indicates that it has completed. If the message is an Error, Error.message is used */ - fail: (message?: Error|string) => void; + fail: (message?: Error | string) => void; } +/** + * Install a spy onto an existing object. + * @param object The object upon which to install the Spy + * @param method The name of the method to replace with a Spy. + */ declare function spyOn(object: T, method: keyof T): jasmine.Spy; +/** + * Install a spy on a property onto an existing object. + * @param object The object upon which to install the Spy + * @param property The name of the property to replace with a Spy + * @param accessType The access type (get|set) of the property to Spy on. + */ declare function spyOnProperty(object: T, property: keyof T, accessType: string): jasmine.Spy; declare function runs(asyncMethod: Function): void; @@ -58,8 +137,12 @@ declare namespace jasmine { function objectContaining(sample: Partial): ObjectContaining; function createSpy(name: string, originalFn?: Function): Spy; - function createSpyObj(baseName: string, methodNames: any[]): any; - function createSpyObj(baseName: string, methodNames: any[]): T; + function createSpyObj(baseName: string, methodNames: any[] | {[methodName: string]: any}): any; + function createSpyObj(baseName: string, methodNames: any[] | {[methodName: string]: any}): SpyObj; + + function createSpyObj(baseName: string, methodNames: any): any; + function createSpyObj(methodNames: any[]): any; + function createSpyObj(methodNames: any): any; function pp(value: any): string; @@ -75,7 +158,7 @@ declare namespace jasmine { function formatErrorMsg(domain: string, usage: string): (msg: string) => string; interface Any { - + (...params: any[]):any; // jasmine.Any can also be a function new (expectedClass: any): any; jasmineMatches(other: any): boolean; @@ -126,7 +209,7 @@ declare namespace jasmine { withMock(func: () => void): void; } - type CustomEqualityTester = (first: any, second: any) => boolean; + type CustomEqualityTester = (first: any, second: any) => boolean | void; interface CustomMatcher { compare(actual: T, expected: T): CustomMatcherResult; @@ -248,7 +331,7 @@ declare namespace jasmine { } interface Order { - new (options: {random: boolean, seed: string}): any; + new (options: { random: boolean, seed: string }): any; random: boolean; seed: string; sort(items: T[]): T[]; @@ -321,7 +404,20 @@ declare namespace jasmine { isNot?: boolean; message(): any; + /** + * + * @param expected the actual value to be === to the expected value. + * @param expectationFailOutput + * @returns {} + */ toBe(expected: Expected, expectationFailOutput?: any): boolean; + + /** + * + * @param expected the actual value to be equal to the expected, using deep equality comparison. + * @param expectationFailOutput + * @returns {} + */ toEqual(expected: Expected, expectationFailOutput?: any): boolean; toMatch(expected: string | RegExp, expectationFailOutput?: any): boolean; toBeDefined(expectationFailOutput?: any): boolean; @@ -350,7 +446,7 @@ declare namespace jasmine { interface ArrayLikeMatchers extends Matchers> { toBe(expected: Expected>, expectationFailOutput?: any): boolean; toEqual(expected: Expected>, expectationFailOutput?: any): boolean; - toContain(expected: T, expectationFailOutput?: any): boolean; + toContain(expected: Expected, expectationFailOutput?: any): boolean; not: ArrayLikeMatchers; } @@ -510,10 +606,14 @@ declare namespace jasmine { identity: string; and: SpyAnd; calls: Calls; - mostRecentCall: {args: any[]; }; + mostRecentCall: { args: any[]; }; argsForCall: any[]; } + type SpyObj = T & { + [k in keyof T]: Spy; + } + interface SpyAnd { /** By chaining the spy with and.callThrough, the spy will still track all calls to it but in addition it will delegate to the actual implementation. */ callThrough(): Spy; @@ -595,3 +695,39 @@ declare namespace jasmine { export var DEFAULT_TIMEOUT_INTERVAL: number; export var MAX_PRETTY_PRINT_DEPTH: number; } + +declare module "jasmine" { + class jasmine { + constructor(options: any); + jasmine: jasmine.Jasmine; + addMatchers(matchers: jasmine.CustomMatcherFactories): void; + addReporter(reporter: jasmine.Reporter): void; + addSpecFile(filePath: string): void; + addSpecFiles(files: string[]): void; + configureDefaultReporter(options: any, ...args: any[]): void; + execute(files: any, filterString: any): any; + exitCodeCompletion(passed: any): void; + loadConfig(config: any): void; + loadConfigFile(configFilePath: any): void; + loadHelpers(): void; + loadSpecs(): void; + onComplete(onCompleteCallback: () => void): void; + provideFallbackReporter(reporter: jasmine.Reporter): void; + randomizeTests(value?: any): boolean; + seed(value: any): void; + showColors(value: any): void; + stopSpecOnExpectationFailure(value: any): void; + static ConsoleReporter(): any; + env: jasmine.Env; + reportersCount: number; + completionReporter: jasmine.CustomReporter; + reporter: jasmine.CustomReporter; + coreVersion(): string; + showingColors: boolean; + projectBaseDir: string; + printDeprecation(): void; + specFiles: string[]; + helperFiles: string[]; + } + export = jasmine; +} diff --git a/types/jasmine/jasmine-tests.ts b/types/jasmine/jasmine-tests.ts index d681d972b0..017896ebf5 100644 --- a/types/jasmine/jasmine-tests.ts +++ b/types/jasmine/jasmine-tests.ts @@ -112,6 +112,13 @@ describe("Included matchers:", () => { expect(a).not.toContain("quux"); }); + it("The 'toContain' matcher is also for finding an object containing distinct properties in an Array", () => { + var a = [{ a: "foo" }, { a: "bar" }, { b: "baz" }]; + + expect(a).toContain(jasmine.objectContaining({ a: "foo" })); + expect(a).not.toContain({ a: "quux" }); + }); + it("The 'toBeLessThan' matcher is for mathematical comparisons", () => { var pi = 3.1415926, e = 2.78; @@ -616,9 +623,14 @@ describe("A spy, when created manually", () => { describe("Multiple spies, when created manually", () => { var tape: any; + var el: jasmine.SpyObj; beforeEach(() => { tape = jasmine.createSpyObj('tape', ['play', 'pause', 'stop', 'rewind']); + el = jasmine.createSpyObj('Element', ['hasAttribute']); + + el.hasAttribute.and.returnValue(false); + el.hasAttribute("href"); tape.play(); tape.pause(); @@ -650,6 +662,25 @@ describe("jasmine.any", () => { expect(12).toEqual(jasmine.any(Number)); }); + it("matches any function", () => { + interface Test { + fn1(): void; + fn2(param1: number): number; + } + + const a: Test = { + fn1: () => { }, + fn2: (param1: number) => { return param1; }, + }; + + const expected: Test = { + fn1: jasmine.any(Function), + fn2: jasmine.any(Function), + }; + + expect(a).toEqual(expected); + }); + describe("when used with a spy", () => { it("is useful for comparing arguments", () => { var foo = jasmine.createSpy('foo'); @@ -841,7 +872,7 @@ describe("Fail", () => { // test based on http://jasmine.github.io/2.2/custom_equality.html describe("custom equality", () => { - var myCustomEquality: jasmine.CustomEqualityTester = function(first: any, second: any): boolean { + var myCustomEquality: jasmine.CustomEqualityTester = function (first: any, second: any): boolean | void { if (typeof first === "string" && typeof second === "string") { return first[0] === second[1]; } @@ -983,6 +1014,54 @@ describe("Randomize Tests", () => { }); }); +//dest spces copied from jasmine project (https://github.com/jasmine/jasmine/blob/master/spec/core/SpecSpec.js) +describe("createSpyObj", function () { + it("should create an object with spy methods and corresponding return values when you call jasmine.createSpyObj() with an object", function () { + var spyObj = jasmine.createSpyObj('BaseName', { 'method1': 42, 'method2': 'special sauce' }); + + expect(spyObj.method1()).toEqual(42); + expect(spyObj.method1.and.identity()).toEqual('BaseName.method1'); + + expect(spyObj.method2()).toEqual('special sauce'); + expect(spyObj.method2.and.identity()).toEqual('BaseName.method2'); + }); + + + it("should create an object with a bunch of spy methods when you call jasmine.createSpyObj()", function () { + var spyObj = jasmine.createSpyObj('BaseName', ['method1', 'method2']); + + expect(spyObj).toEqual({ method1: jasmine.any(Function), method2: jasmine.any(Function) }); + expect(spyObj.method1.and.identity()).toEqual('BaseName.method1'); + expect(spyObj.method2.and.identity()).toEqual('BaseName.method2'); + }); + + it("should allow you to omit the baseName", function () { + var spyObj = jasmine.createSpyObj(['method1', 'method2']); + + expect(spyObj).toEqual({ method1: jasmine.any(Function), method2: jasmine.any(Function) }); + expect(spyObj.method1.and.identity()).toEqual('unknown.method1'); + expect(spyObj.method2.and.identity()).toEqual('unknown.method2'); + }); + + it("should throw if you do not pass an array or object argument", function () { + expect(function () { + jasmine.createSpyObj('BaseName'); + }).toThrow("createSpyObj requires a non-empty array or object of method names to create spies for"); + }); + + it("should throw if you pass an empty array argument", function () { + expect(function () { + jasmine.createSpyObj('BaseName', []); + }).toThrow("createSpyObj requires a non-empty array or object of method names to create spies for"); + }); + + it("should throw if you pass an empty object argument", function () { + expect(function () { + jasmine.createSpyObj('BaseName', {}); + }).toThrow("createSpyObj requires a non-empty array or object of method names to create spies for"); + }); +}); + (() => { // from boot.js var env = jasmine.getEnv(); @@ -1007,4 +1086,4 @@ describe("Randomize Tests", () => { })(); jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; -jasmine.MAX_PRETTY_PRINT_DEPTH = 40; \ No newline at end of file +jasmine.MAX_PRETTY_PRINT_DEPTH = 40; diff --git a/types/java/index.d.ts b/types/java/index.d.ts index 46dc577e35..cf770a8807 100644 --- a/types/java/index.d.ts +++ b/types/java/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/joeferner/node-java // Definitions by: Jim Lloyd , Kentaro Teramoto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/java/java-tests.ts b/types/java/java-tests.ts index 6d464b36e1..4c79640733 100644 --- a/types/java/java-tests.ts +++ b/types/java/java-tests.ts @@ -1,5 +1,3 @@ -/// - import java = require('java'); import BluePromise = require('bluebird'); @@ -9,7 +7,7 @@ java.asyncOptions = { promiseSuffix: 'P', promisify: BluePromise.promisify }; -// todo: figure out why promise doesn't work here +// todo: figure out why promise doesn't work here /* java.registerClientP((): Promise => { return BluePromise.resolve(); }); */ diff --git a/types/javascript-state-machine/index.d.ts b/types/javascript-state-machine/index.d.ts new file mode 100644 index 0000000000..32088d7bd4 --- /dev/null +++ b/types/javascript-state-machine/index.d.ts @@ -0,0 +1,105 @@ +// Type definitions for Finite State Machine 2.4 +// Project: https://github.com/jakesgordon/javascript-state-machine +// Definitions by: Boris Yankov , +// Maarten Docter , +// William Sears , +// samael , +// taoqf +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export type StateMachineErrorCallback = ( + eventName?: string, + from?: string, + to?: string, + args?: any[], + errorCode?: number, + errorMessage?: string, + ex?: Error +) => void; // NB. errorCode? See: StateMachine.Error + +export interface StateMachineEventDef { + name: string; + from: any; // string or string[] + to: string; +} + +export type StateMachineEvent = (...args: any[]) => void; + +export interface StateMachineConfig { + initial?: any; // string or { state: 'foo', event: 'setup', defer: true|false } + events?: StateMachineEventDef[]; + callbacks?: { + [s: string]: (event?: string, from?: string, to?: string, ...args: any[]) => any; + }; + target?: StateMachine; + error?: StateMachineErrorCallback; +} + +export type StateMachineIsFinished = (state: string) => boolean; + +export const VERSION: string; // = "2.4.0" +export const WILDCARD: string; // = '*' +export const ASYNC: string; // = 'async' + +export const Result: { + SUCCEEDED: number; // = 1, the event transitioned successfully from one state to another + NOTRANSITION: number; // = 2, the event was successfull but no state transition was necessary + CANCELLED: number; // = 3, the event was cancelled by the caller in a beforeEvent callback + PENDING: number; // = 4, the event is asynchronous and the caller is in control of when the transition occurs +}; + +export const Error: { + INVALID_TRANSITION: number; // = 100, caller tried to fire an event that was innapropriate in the current state + PENDING_TRANSITION: number; // = 200, caller tried to fire an event while an async transition was still pending + INVALID_CALLBACK: number; // = 300, caller provided callback function threw an exception +}; + +export function create(config: StateMachineConfig, target?: StateMachine): StateMachine; + +export interface StateMachineTransition { + (): void; + cancel(): void; +} + +export type StateMachineIs = (state: string) => boolean; + +export type StateMachineCan = (evt: string) => boolean; + +export type StateMachineTransitions = () => string[]; + +export interface StateMachine { + current: string; + is: StateMachineIs; + can: StateMachineCan; + cannot: StateMachineCan; + error: StateMachineErrorCallback; + isFinished: StateMachineIsFinished; + /* transition - only available when performing async state transitions; otherwise null. Can be a: + [1] fsm.transition(); // called from async callback + [2] fsm.transition.cancel(); + */ + transition: StateMachineTransition; + transitions: StateMachineTransitions; +} + +export namespace StateMachine { + const VERSION: string; // = "2.4.0" + const WILDCARD: string; // = '*' + const ASYNC: string; // = 'async' + + const Result: { + SUCCEEDED: number; // = 1, the event transitioned successfully from one state to another + NOTRANSITION: number; // = 2, the event was successfull but no state transition was necessary + CANCELLED: number; // = 3, the event was cancelled by the caller in a beforeEvent callback + PENDING: number; // = 4, the event is asynchronous and the caller is in control of when the transition occurs + }; + + const Error: { + INVALID_TRANSITION: number; // = 100, caller tried to fire an event that was innapropriate in the current state + PENDING_TRANSITION: number; // = 200, caller tried to fire an event while an async transition was still pending + INVALID_CALLBACK: number; // = 300, caller provided callback function threw an exception + }; + function create(config: StateMachineConfig, target?: StateMachine): StateMachine; +} + +export as namespace StateMachine; diff --git a/types/javascript-state-machine/javascript-state-machine-tests.ts b/types/javascript-state-machine/javascript-state-machine-tests.ts new file mode 100644 index 0000000000..099926acf4 --- /dev/null +++ b/types/javascript-state-machine/javascript-state-machine-tests.ts @@ -0,0 +1,32 @@ +import { StateMachine, StateMachineEvent, create } from 'javascript-state-machine'; + +interface StateMachineTest extends StateMachine { + warn?: StateMachineEvent; + panic?: StateMachineEvent; + calm?: StateMachineEvent; + clear?: StateMachineEvent; +} + +const fsm: StateMachineTest = StateMachine.create({ + initial: 'green', + events: [ + { name: 'warn', from: 'green', to: 'yellow' }, + { name: 'panic', from: 'yellow', to: 'red' }, + { name: 'calm', from: 'red', to: 'yellow' }, + { name: 'clear', from: 'yellow', to: 'green' } + ], + callbacks: { + onpanic(event?, from?, to?, msg?) { alert('panic! ' + msg); }, + onclear(event?, from?, to?, msg?) { alert('thanks to ' + msg); }, + ongreen(event?, from?, to?) { document.body.className = 'green'; }, + onyellow(event?, from?, to?) { document.body.className = 'yellow'; }, + onred(event?, from?, to?) { document.body.className = 'red'; }, + } +}); + +// fsm.warn(); // transition from green to yellow +// fsm.panic("ERROR ALERT"); // transition from yellow to red +// fsm.calm(); // transition from red to yellow +// fsm.clear("All clear"); // transition from yellow to green + +const transitions = fsm.transitions(); diff --git a/types/eventemitter2/tsconfig.json b/types/javascript-state-machine/tsconfig.json similarity index 90% rename from types/eventemitter2/tsconfig.json rename to types/javascript-state-machine/tsconfig.json index 5df8f04c40..45c4f171fb 100644 --- a/types/eventemitter2/tsconfig.json +++ b/types/javascript-state-machine/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "eventemitter2-tests.ts" + "javascript-state-machine-tests.ts" ] } \ No newline at end of file diff --git a/types/javascript-state-machine/tslint.json b/types/javascript-state-machine/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/javascript-state-machine/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/jcanvas/index.d.ts b/types/jcanvas/index.d.ts index a5c1b7204f..4fdc3f72af 100644 --- a/types/jcanvas/index.d.ts +++ b/types/jcanvas/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/caleb531/jcanvas // Definitions by: Rogier Schouten // Definitions: https://github.com/borisyankov/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jcanvas/jcanvas-tests.ts b/types/jcanvas/jcanvas-tests.ts index 3cd5e32cab..667d9f9619 100644 --- a/types/jcanvas/jcanvas-tests.ts +++ b/types/jcanvas/jcanvas-tests.ts @@ -1,5 +1,4 @@ -import $ = require("jquery"); import jcanvas = require("jcanvas"); jcanvas($, window); diff --git a/types/jdataview/index.d.ts b/types/jdataview/index.d.ts index b91a6813ec..f80784eb60 100644 --- a/types/jdataview/index.d.ts +++ b/types/jdataview/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jDataView/jDataView // Definitions by: Ingvar Stepanyan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare class jDataView implements DataView { constructor(byteCount: number, offset?: number, length?: number, littleEndian?: boolean) diff --git a/types/jest-matchers/index.d.ts b/types/jest-matchers/index.d.ts new file mode 100644 index 0000000000..27e6a5b9f0 --- /dev/null +++ b/types/jest-matchers/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for jest-matchers 20.0 +// Project: https://github.com/facebook/jest#readme +// Definitions by: Joscha Feth +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +export = expect; diff --git a/types/jest-matchers/jest-matchers-tests.ts b/types/jest-matchers/jest-matchers-tests.ts new file mode 100644 index 0000000000..7484dd5ed8 --- /dev/null +++ b/types/jest-matchers/jest-matchers-tests.ts @@ -0,0 +1,3 @@ +import * as expect from 'jest-matchers'; + +expect('x').toEqual('x'); diff --git a/types/jest-matchers/tsconfig.json b/types/jest-matchers/tsconfig.json new file mode 100644 index 0000000000..37a7e86d8d --- /dev/null +++ b/types/jest-matchers/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jest-matchers-tests.ts" + ] +} diff --git a/types/jest-matchers/tslint.json b/types/jest-matchers/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jest-matchers/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 36011e67a7..b886bdeaac 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Jest 19.2.0 +// Type definitions for Jest 20.0.5 // Project: http://facebook.github.io/jest/ -// Definitions by: Asana , Ivo Stratev , jwbay , Alexey Svetliakov , Alex Jover Morales +// Definitions by: Asana , Ivo Stratev , jwbay , Alexey Svetliakov , Alex Jover Morales , Allan Lukwago // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -114,8 +114,9 @@ declare namespace jest { * * @param {string} name The name of your test * @param {fn?} ProvidesCallback The function for your test + * @param {timeout?} timeout The timeout for an async function test */ - (name: string, fn?: ProvidesCallback): void; + (name: string, fn?: ProvidesCallback, timeout?: number): void; /** Only runs this test in the current file. */ only: It; skip: It; @@ -152,6 +153,44 @@ declare namespace jest { [key: string]: (this: MatcherUtils, received: any, actual: any) => { message: () => string, pass: boolean }; } + interface SnapshotSerializerOptions { + callToJSON?: boolean; + edgeSpacing?: string; + spacing?: string; + escapeRegex?: boolean; + highlight?: boolean; + indent?: number; + maxDepth?: number; + min?: boolean; + plugins?: Array + printFunctionName?: boolean; + theme?: SnapshotSerializerOptionsTheme; + + // see https://github.com/facebook/jest/blob/e56103cf142d2e87542ddfb6bd892bcee262c0e6/types/PrettyFormat.js + } + interface SnapshotSerializerOptionsTheme { + comment?: string; + content?: string; + prop?: string; + tag?: string; + value?: string; + } + interface SnapshotSerializerColor { + close: string; + open: string; + } + interface SnapshotSerializerColors { + comment: SnapshotSerializerColor; + content: SnapshotSerializerColor; + prop: SnapshotSerializerColor; + tag: SnapshotSerializerColor; + value: SnapshotSerializerColor; + } + interface SnapshotSerializerPlugin { + print(val:any, serialize:((val:any) => string), indent:((str:string) => string), opts:SnapshotSerializerOptions, colors: SnapshotSerializerColors) : string; + test(val:any) : boolean; + } + /** The `expect` function is used every time you want to test a value. You will rarely call `expect` by itself. */ interface Expect { /** @@ -159,7 +198,7 @@ declare namespace jest { * * @param {any} actual The value to apply matchers against. */ - (actual: any): Matchers; + (actual: any): Matchers; anything(): any; /** Matches anything that was created with the given constructor. You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value. */ any(classType: any): any; @@ -167,75 +206,85 @@ declare namespace jest { arrayContaining(arr: any[]): any; /** Verifies that a certain number of assertions are called during a test. This is often useful when testing asynchronous code, in order to make sure that assertions in a callback actually got called. */ assertions(num: number): void; + /** Verifies that at least one assertion is called during a test. This is often useful when testing asynchronous code, in order to make sure that assertions in a callback actually got called. */ + hasAssertions(): void; /** You can use `expect.extend` to add your own matchers to Jest. */ extend(obj: ExpectExtendMap): void; + /** Adds a module to format application-specific data structures for serialization. */ + addSnapshotSerializer(serializer: SnapshotSerializerPlugin) : void; /** Matches any object that recursively matches the provided keys. This is often handy in conjunction with other asymmetric matchers. */ objectContaining(obj: {}): any; /** Matches any string that contains the exact provided string */ stringMatching(str: string | RegExp): any; } - interface Matchers { + interface Matchers { /** If you know how to test something, `.not` lets you test its opposite. */ - not: Matchers; - lastCalledWith(...args: any[]): void; + not: Matchers; + /** Use resolves to unwrap the value of a fulfilled promise so any other matcher can be chained. If the promise is rejected the assertion fails. */ + resolves: Matchers>; + /** Unwraps the reason of a rejected promise so any other matcher can be chained. If the promise is fulfilled the assertion fails. */ + rejects: Matchers>; + lastCalledWith(...args: any[]): R; /** Checks that a value is what you expect. It uses `===` to check strict equality. Don't use `toBe` with floating-point numbers. */ - toBe(expected: any): void; + toBe(expected: any): R; /** Ensures that a mock function is called. */ - toBeCalled(): void; + toBeCalled(): R; /** Ensure that a mock function is called with specific arguments. */ - toBeCalledWith(...args: any[]): void; + toBeCalledWith(...args: any[]): R; /** Using exact equality with floating point numbers is a bad idea. Rounding means that intuitive things fail. */ - toBeCloseTo(expected: number, delta?: number): void; + toBeCloseTo(expected: number, delta?: number): R; /** Ensure that a variable is not undefined. */ - toBeDefined(): void; + toBeDefined(): R; /** When you don't care what a value is, you just want to ensure a value is false in a boolean context. */ - toBeFalsy(): void; + toBeFalsy(): R; /** For comparing floating point numbers. */ - toBeGreaterThan(expected: number): void; + toBeGreaterThan(expected: number): R; /** For comparing floating point numbers. */ - toBeGreaterThanOrEqual(expected: number): void; + toBeGreaterThanOrEqual(expected: number): R; /** Ensure that an object is an instance of a class. This matcher uses `instanceof` underneath. */ - toBeInstanceOf(expected: any): void + toBeInstanceOf(expected: any): R /** For comparing floating point numbers. */ - toBeLessThan(expected: number): void; + toBeLessThan(expected: number): R; /** For comparing floating point numbers. */ - toBeLessThanOrEqual(expected: number): void; + toBeLessThanOrEqual(expected: number): R; /** This is the same as `.toBe(null)` but the error messages are a bit nicer. So use `.toBeNull()` when you want to check that something is null. */ - toBeNull(): void; + toBeNull(): R; /** Use when you don't care what a value is, you just want to ensure a value is true in a boolean context. In JavaScript, there are six falsy values: `false`, `0`, `''`, `null`, `undefined`, and `NaN`. Everything else is truthy. */ - toBeTruthy(): void; + toBeTruthy(): R; /** Used to check that a variable is undefined. */ - toBeUndefined(): void; + toBeUndefined(): R; + /** Used to check that a variable is NaN. */ + toBeNaN(): R; /** Used when you want to check that an item is in a list. For testing the items in the list, this uses `===`, a strict equality check. */ - toContain(expected: any): void; + toContain(expected: any): R; /** Used when you want to check that an item is in a list. For testing the items in the list, this matcher recursively checks the equality of all fields, rather than checking for object identity. */ - toContainEqual(expected: any): void; + toContainEqual(expected: any): R; /** Used when you want to check that two objects have the same value. This matcher recursively checks the equality of all fields, rather than checking for object identity. */ - toEqual(expected: any): void; + toEqual(expected: any): R; /** Ensures that a mock function is called. */ - toHaveBeenCalled(): boolean; + toHaveBeenCalled(): R; /** Ensures that a mock function is called an exact number of times. */ - toHaveBeenCalledTimes(expected: number): boolean; + toHaveBeenCalledTimes(expected: number): R; /** Ensure that a mock function is called with specific arguments. */ - toHaveBeenCalledWith(...params: any[]): boolean; + toHaveBeenCalledWith(...params: any[]): R; /** If you have a mock function, you can use `.toHaveBeenLastCalledWith` to test what arguments it was last called with. */ - toHaveBeenLastCalledWith(...params: any[]): boolean; + toHaveBeenLastCalledWith(...params: any[]): R; /** Used to check that an object has a `.length` property and it is set to a certain numeric value. */ - toHaveLength(expected: number): void; - toHaveProperty(propertyPath: string, value?: any): void; + toHaveLength(expected: number): R; + toHaveProperty(propertyPath: string, value?: any): R; /** Check that a string matches a regular expression. */ - toMatch(expected: string | RegExp): void; + toMatch(expected: string | RegExp): R; /** Used to check that a JavaScript object matches a subset of the properties of an objec */ - toMatchObject(expected: {}): void; + toMatchObject(expected: {}): R; /** This ensures that a value matches the most recent snapshot. Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. */ - toMatchSnapshot(snapshotName?: string): void; + toMatchSnapshot(snapshotName?: string): R; /** Used to test that a function throws when it is called. */ - toThrow(error?: string | Constructable | RegExp): void; + toThrow(error?: string | Constructable | RegExp): R; /** If you want to test that a specific error is thrown inside a function. */ - toThrowError(error?: string | Constructable | RegExp): void; + toThrowError(error?: string | Constructable | RegExp): R; /** Used to test that a function throws a error matching the most recent snapshot when it is called. */ - toThrowErrorMatchingSnapshot(): void; + toThrowErrorMatchingSnapshot(): R; } interface Constructable { diff --git a/types/jest/jest-tests.ts b/types/jest/jest-tests.ts index d951153842..ef62f9b1c2 100644 --- a/types/jest/jest-tests.ts +++ b/types/jest/jest-tests.ts @@ -1,4 +1,11 @@ -/// +// TODO: Avoid requiring things that don't exist. +declare var require: { + (s: string): any; + requireActual(s: string): any; + requireMock(s: string): any; +}; +// TODO: use real jquery types? +declare var $: any; // Tests based on the Jest website jest.unmock('../sum'); @@ -12,7 +19,6 @@ describe('sum', function() { describe('fetchCurrentUser', function() { it('calls the callback when $.ajax requests are finished', function() { - var $ = require('jquery'); var fetchCurrentUser = require('../fetchCurrentUser'); // Create a mock function for our callback @@ -123,6 +129,10 @@ xdescribe('Hooks and Suits', function () { xit('expect null to be null', function () { expect(null).toBeNull(); }); + + xit('expect NaN to be NaN', function () { + expect(NaN).toBeNaN(); + }); }); describe('compartion', function () { @@ -335,6 +345,30 @@ describe('toThrowErrorMatchingSnapshot', function () { }); }); +const testSerializerPluginString = "set by testSerializerPlugin"; +let testSerializerPluginCallCount = 0; +expect.addSnapshotSerializer({ + print(val, serialize, indent, opts, colors) { + val.willOverwrite = testSerializerPluginString; + testSerializerPluginCallCount += 1; + return 'plugin called: ' + serialize(val.willOverwrite); + }, + test(val) { + return val && val.willOverwrite && val.willOverwrite !== testSerializerPluginString; + }, +}); +describe('addSnapshotSerializer', function () { + it('the plugin does its work', function () { + testSerializerPluginCallCount = 0; + expect({ willOverwrite: { x: 1, y: 2, } }).toMatchSnapshot(); + expect({ willOverwrite: "this will get overwritten by testSerializerPlugin" }).toMatchSnapshot(); + expect({ willOverwrite: "so will this" }).toMatchSnapshot(); + expect({ foo: "this will not" }).toMatchSnapshot(); + expect(testSerializerPluginCallCount).toBe(3); + }); +}); + + function testInstances() { var mockFn = jest.fn(); var a = new mockFn(); @@ -501,3 +535,41 @@ describe('Mocks', function () { anotherIns.testMethod.mockImplementation(() => 1); }); }); + +// https://facebook.github.io/jest/docs/en/expect.html#resolves +describe('resolves', function() { + it('unwraps the expected Promise', function() { + const expectation = expect(Promise.resolve('test')).resolves.toEqual('test'); + expect(expectation instanceof Promise).toBeTruthy(); + return expectation; + }); + + it('unwraps a .toHaveBeenCalledX', function(done) { + expect.assertions(2); + + const fn = jest.fn(); + return expect(Promise.resolve(fn)).resolves.toHaveBeenCalledTimes(0).then(val => { + expect(val).toEqual(true); + done(); + }); + }); + + it('unwraps a not.toHaveBeenCalledX', function(done) { + expect.assertions(2); + + const fn = jest.fn(); + return expect(Promise.resolve(fn)).resolves.not.toHaveBeenCalledTimes(1).then(val => { + expect(val).toEqual(true); + done(); + }); + }); +}); + +// https://facebook.github.io/jest/docs/en/expect.html#rejects +describe('rejects', function() { + it('unwraps the expected Promise', function() { + const expectation = expect(Promise.reject(new Error('error'))).rejects.toMatch('error'); + expect(expectation instanceof Promise).toBeTruthy(); + return expectation; + }); +}); diff --git a/types/jest/v16/jest-tests.ts b/types/jest/v16/jest-tests.ts index c69eae61a2..7a58d6e9b1 100644 --- a/types/jest/v16/jest-tests.ts +++ b/types/jest/v16/jest-tests.ts @@ -1,4 +1,11 @@ -/// +// TODO: Avoid requiring things that don't exist. +declare var require: { + (s: string): any; + requireActual(s: string): any; + requireMock(s: string): any; +}; +// TODO: use real jquery types? +declare var $: any; // Tests based on the Jest website jest.unmock('../sum'); diff --git a/types/joi/index.d.ts b/types/joi/index.d.ts index dbf134e541..fb3547b3e4 100644 --- a/types/joi/index.d.ts +++ b/types/joi/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for joi v10.3.0 +// Type definitions for joi v10.4.0 // Project: https://github.com/hapijs/joi // Definitions by: Bart van der Schoor , Laurence Dougal Myers , Christopher Glantschnig , David Broder-Rodgers , Gael Magnan de Bornier , Rytis Alekna , Pavel Ivanov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -146,7 +146,14 @@ export interface ValidationErrorItem { type: string; path: string; options?: ValidationOptions; - context?: any; + context?: { + [key: string]: any; + value?: any; + }; +} + +export interface ValidationErrorFunction { + (errors: ValidationErrorItem[]): string | ValidationErrorItem | ValidationErrorItem[] | Error; } export interface ValidationResult { @@ -313,14 +320,23 @@ export interface AnySchema> { /** * Overrides the default joi error with a custom error if the rule fails where: - * @param err - the override error. + * @param err - can be: + * an instance of `Error` - the override error. + * a `function(errors)`, taking an array of errors as argument, where it must either: + * return a `string` - substitutes the error message with this text + * return a single `object` or an `Array` of it, where: + * `type` - optional parameter providing the type of the error (eg. `number.min`). + * `message` - optional parameter if `template` is provided, containing the text of the error. + * `template` - optional parameter if `message` is provided, containing a template string, using the same format as usual joi language errors. + * `context` - optional parameter, to provide context to your error if you are using the `template`. + * return an `Error` - same as when you directly provide an `Error`, but you can customize the error message based on the errors. * - * Note that the provided error will be returned as-is, unmodified and undecorated - * with any of the normal joi error properties. If validation fails and another - * error is found before the error override, that error will be returned and the - * override will be ignored (unless the abortEarly option has been set to false). + * Note that if you provide an `Error`, it will be returned as-is, unmodified and undecorated with any of the + * normal joi error properties. If validation fails and another error is found before the error + * override, that error will be returned and the override will be ignored (unless the `abortEarly` + * option has been set to `false`). */ - error?(err: Error): T; + error?(err: Error | ValidationErrorFunction): T; } export interface BooleanSchema extends AnySchema { diff --git a/types/joi/joi-tests.ts b/types/joi/joi-tests.ts index 3cd2e28b73..a0684724b7 100644 --- a/types/joi/joi-tests.ts +++ b/types/joi/joi-tests.ts @@ -1,6 +1,3 @@ - -/// - import Joi = require('joi'); // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -13,7 +10,6 @@ var bool: boolean = false; var exp: RegExp = null; var obj: Object = null; var date: Date = null; -var bin: NodeBuffer = null; var err: Error = null; var func: Function = null; @@ -23,7 +19,6 @@ var strArr: string[] = []; var boolArr: boolean[] = []; var expArr: RegExp[] = []; var objArr: Object[] = []; -var bufArr: NodeBuffer[] = []; var errArr: Error[] = []; var funcArr: Function[] = []; @@ -118,6 +113,7 @@ refOpts = { contextPrefix: str }; var validErr: Joi.ValidationError = null; var validErrItem: Joi.ValidationErrorItem; +var validErrFunc: Joi.ValidationErrorFunction; validErrItem = { message: str, @@ -133,6 +129,11 @@ validErrItem = { context: obj }; +validErrFunc = errs => errs; +validErrFunc = errs => errs[0]; +validErrFunc = errs => 'Some error'; +validErrFunc = errs => err; + // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- schema = anySchema; @@ -243,6 +244,7 @@ namespace common { anySchema = anySchema.empty(anySchema); anySchema = anySchema.error(err); + anySchema = anySchema.error(validErrFunc); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- diff --git a/types/joi/v6/joi-tests.ts b/types/joi/v6/joi-tests.ts index 03ca5ffac0..33923b500a 100644 --- a/types/joi/v6/joi-tests.ts +++ b/types/joi/v6/joi-tests.ts @@ -1,5 +1,3 @@ -/// - import Joi = require('joi'); // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -12,7 +10,6 @@ var bool: boolean = false; var exp: RegExp = null; var obj: Object = null; var date: Date = null; -var bin: NodeBuffer = null; var err: Error = null; var func: Function = null; @@ -22,7 +19,6 @@ var strArr: string[] = []; var boolArr: boolean[] = []; var expArr: RegExp[] = []; var objArr: Object[] = []; -var bufArr: NodeBuffer[] = []; var errArr: Error[] = []; var funcArr: Function[] = []; diff --git a/types/joigoose/index.d.ts b/types/joigoose/index.d.ts new file mode 100644 index 0000000000..e1d0fe9919 --- /dev/null +++ b/types/joigoose/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for joigoose 2.0 +// Project: https://github.com/yoitsro/joigoose +// Definitions by: Karoline +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as Mongoose from "mongoose"; +import * as Joi from "joi"; + +declare namespace Joigoose { + interface Joigoose { + convert(schema: Joi.Schema): Mongoose.Schema; + } +} + +declare function Joigoose(mongoose: Mongoose.Mongoose, joiOptions?: Joi.ValidationOptions): Joigoose.Joigoose; + +export = Joigoose; diff --git a/types/joigoose/joigoose-tests.ts b/types/joigoose/joigoose-tests.ts new file mode 100644 index 0000000000..791a24ff4b --- /dev/null +++ b/types/joigoose/joigoose-tests.ts @@ -0,0 +1,9 @@ +import * as Joigoose from "joigoose"; +import * as Mongoose from "mongoose"; +import * as Joi from "joi"; + +let joigoose = Joigoose(Mongoose); +let options: Joi.ValidationOptions = {abortEarly: true}; +joigoose = Joigoose(Mongoose, options); + +let schema: Mongoose.Schema = joigoose.convert(Joi.object({aString: Joi.string()})); diff --git a/types/joigoose/tsconfig.json b/types/joigoose/tsconfig.json new file mode 100644 index 0000000000..0add07f5d7 --- /dev/null +++ b/types/joigoose/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", + "joigoose-tests.ts" + ] +} diff --git a/types/joigoose/tslint.json b/types/joigoose/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/joigoose/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jointjs/index.d.ts b/types/jointjs/index.d.ts index 5ce0f187f0..c15cdc79c6 100644 --- a/types/jointjs/index.d.ts +++ b/types/jointjs/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.jointjs.com/ // Definitions by: Aidan Reel , David Durman , Ewout Van Gossum , Federico Caselli , Chris Moran // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // typings: https://github.com/CaselIT/typings-jointjs /// diff --git a/types/jpush-react-native/index.d.ts b/types/jpush-react-native/index.d.ts index d8b27e0b2c..fa604f3174 100644 --- a/types/jpush-react-native/index.d.ts +++ b/types/jpush-react-native/index.d.ts @@ -118,5 +118,5 @@ export default class JPush { /** * iOS */ - static setBadge(badge: number, callback: (badges: number[]) => void): void; + static setBadge(badge: number, callback: (isSuccess: boolean) => void): void; } diff --git a/types/jqgrid/index.d.ts b/types/jqgrid/index.d.ts index 00310f43ad..5b85910077 100644 --- a/types/jqgrid/index.d.ts +++ b/types/jqgrid/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/tonytomov/jqGrid // Definitions by: Lokesh Peta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -414,4 +415,4 @@ interface JQuery { * @returns {} */ setGridParam(obj: any): void; -} \ No newline at end of file +} diff --git a/types/jqrangeslider/index.d.ts b/types/jqrangeslider/index.d.ts index 36bb5a16d2..5ee9a45ed7 100644 --- a/types/jqrangeslider/index.d.ts +++ b/types/jqrangeslider/index.d.ts @@ -2,6 +2,7 @@ // Project: http://ghusse.github.com/jQRangeSlider // Definitions by: Dániel Tar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/jqrangeslider/tsconfig.json b/types/jqrangeslider/tsconfig.json index 2484e06a5c..4a41364b36 100644 --- a/types/jqrangeslider/tsconfig.json +++ b/types/jqrangeslider/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "jqrangeslider-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/jquery-ajax-chain/index.d.ts b/types/jquery-ajax-chain/index.d.ts index 6f15c1190f..3c24da237c 100644 --- a/types/jquery-ajax-chain/index.d.ts +++ b/types/jquery-ajax-chain/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/humana-fragilitas/jQuery-Ajax-Chain/ // Definitions by: Andrea Blasio // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-alertable/index.d.ts b/types/jquery-alertable/index.d.ts index 4f874547e2..3b302ce286 100644 --- a/types/jquery-alertable/index.d.ts +++ b/types/jquery-alertable/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/claviska/jquery-alertable // Definitions by: Steven Robertson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-backstretch/index.d.ts b/types/jquery-backstretch/index.d.ts index f868cc5c94..7f2826502f 100644 --- a/types/jquery-backstretch/index.d.ts +++ b/types/jquery-backstretch/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/srobbin/jquery-backstretch // Definitions by: Dmytro Kulyk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -89,4 +90,4 @@ interface JQueryStatic { interface JQuery { backstretch(images:string[], config?:JQueryBackStretch.BackStretchOptions):JQueryBackStretch.BackStretch; backstretch(method:string):JQuery; -} \ No newline at end of file +} diff --git a/types/jquery-cropbox/index.d.ts b/types/jquery-cropbox/index.d.ts index 42d2ed9689..0de20878d5 100644 --- a/types/jquery-cropbox/index.d.ts +++ b/types/jquery-cropbox/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/acornejo/jquery-cropbox // Definitions by: Per Kastman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-easy-loading/index.d.ts b/types/jquery-easy-loading/index.d.ts index c6d878df1a..9498e6ac9a 100644 --- a/types/jquery-easy-loading/index.d.ts +++ b/types/jquery-easy-loading/index.d.ts @@ -2,6 +2,7 @@ // Project: http://carlosbonetti.github.io/jquery-loading/ // Definitions by: delphinus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-easy-loading/jquery-easy-loading-tests.ts b/types/jquery-easy-loading/jquery-easy-loading-tests.ts index ece98fd6d0..b8c6ac219c 100644 --- a/types/jquery-easy-loading/jquery-easy-loading-tests.ts +++ b/types/jquery-easy-loading/jquery-easy-loading-tests.ts @@ -35,7 +35,6 @@ function test_commands() { .loading("toggle"); } -import * as jQuery from "jquery"; import * as factory from "jquery-easy-loading"; function test_factory() { diff --git a/types/jquery-easy-loading/tsconfig.json b/types/jquery-easy-loading/tsconfig.json index 392a80ff8c..9e16b77cbf 100644 --- a/types/jquery-easy-loading/tsconfig.json +++ b/types/jquery-easy-loading/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "jquery-easy-loading-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/jquery-fullscreen/index.d.ts b/types/jquery-fullscreen/index.d.ts index 477caf3b45..8190ad935c 100644 --- a/types/jquery-fullscreen/index.d.ts +++ b/types/jquery-fullscreen/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kayahr/jquery-fullscreen-plugin // Definitions by: Bruno Grieder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-handsontable/index.d.ts b/types/jquery-handsontable/index.d.ts index fbf8bcda33..29a4d8a327 100644 --- a/types/jquery-handsontable/index.d.ts +++ b/types/jquery-handsontable/index.d.ts @@ -2,6 +2,7 @@ // Project: http://handsontable.com // Definitions by: Ted John // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-jsonrpcclient/index.d.ts b/types/jquery-jsonrpcclient/index.d.ts index 911e9d08ec..31a2979b74 100644 --- a/types/jquery-jsonrpcclient/index.d.ts +++ b/types/jquery-jsonrpcclient/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Textalk/jquery.jsonrpcclient.js // Definitions by: Maksim Karelov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -100,4 +101,4 @@ interface JsonRpcClientFactory { interface JQueryStatic { JsonRpcClient: JsonRpcClientFactory; -} \ No newline at end of file +} diff --git a/types/jquery-knob/index.d.ts b/types/jquery-knob/index.d.ts index 925e632c68..ef1e720ba5 100644 --- a/types/jquery-knob/index.d.ts +++ b/types/jquery-knob/index.d.ts @@ -2,6 +2,7 @@ // Project: http://anthonyterrien.com/knob/ // Definitions by: Iain Buchanan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-mask-plugin/index.d.ts b/types/jquery-mask-plugin/index.d.ts index 270828856f..a142d0a97e 100644 --- a/types/jquery-mask-plugin/index.d.ts +++ b/types/jquery-mask-plugin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://igorescobar.github.io/jQuery-Mask-Plugin/ // Definitions by: Anže Videnič , Igor Escobar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-match-height/index.d.ts b/types/jquery-match-height/index.d.ts new file mode 100644 index 0000000000..664a5de4b4 --- /dev/null +++ b/types/jquery-match-height/index.d.ts @@ -0,0 +1,39 @@ +// Type definitions for jquery-match-height 0.7 +// Project: https://github.com/liabru/jquery-match-height +// Definitions by: Andrea Briganti +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +interface JQueryMatchHeight { + _throttle: number; + _maintainScroll: boolean; + _groups: any[]; + + /** + * Set all selected elements to the height of the tallest. + * If the items are on multiple rows, the items of each row will be set to the tallest of that row. + * + * @param options + */ + (options?: JQueryMatchHeight.Options): JQuery; + _update(): void; + _rows($item: JQuery): any[]; + _beforeUpdate(event: JQueryEventObject, groups: any[]): any; + _afterUpdate(event: JQueryEventObject, groups: any[]): any; + _apply(elements: any, options: any): void; +} + +declare namespace JQueryMatchHeight { + interface Options { + byRow?: boolean; + property?: string; + target?: string; + remove?: boolean; + } +} + +interface JQuery { + matchHeight: JQueryMatchHeight; +} diff --git a/types/jquery-match-height/jquery-match-height-tests.ts b/types/jquery-match-height/jquery-match-height-tests.ts new file mode 100644 index 0000000000..97467573b0 --- /dev/null +++ b/types/jquery-match-height/jquery-match-height-tests.ts @@ -0,0 +1,37 @@ +/* from documentation at https://github.com/liabru/jquery-match-height */ + +$(document).ready(() => { + $(".containers").matchHeight(); + $(".containers").matchHeight({ + byRow: true, + property: "height", + remove: true} + ); +}); + +$.fn.matchHeight._update(); + +$.fn.matchHeight._rows($('.containers')); + +$('.containers').matchHeight({ remove: true }); + +// tslint:disable-next-line no-used-variable +$.fn.matchHeight._beforeUpdate = (event, groups) => { + // do something before any updates are applied +}; + +// tslint:disable-next-line no-used-variable +$.fn.matchHeight._afterUpdate = (event, groups) => { + // do something after all updates are applied +}; + +let elements = $('.containers'); +let options = {byRow: true}; + +$.fn.matchHeight._apply(elements, options); + +$.fn.matchHeight._throttle = 80; + +$.fn.matchHeight._maintainScroll = true; + +$.fn.matchHeight._groups; diff --git a/types/jquery-match-height/tsconfig.json b/types/jquery-match-height/tsconfig.json new file mode 100644 index 0000000000..2dd28f9c69 --- /dev/null +++ b/types/jquery-match-height/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jquery-match-height-tests.ts" + ] +} diff --git a/types/jquery-match-height/tslint.json b/types/jquery-match-height/tslint.json new file mode 100644 index 0000000000..c9a409bbed --- /dev/null +++ b/types/jquery-match-height/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // This package uses the Function type, and it will take effort to fix. + "ban-types": false + } +} diff --git a/types/jquery-mockjax/index.d.ts b/types/jquery-mockjax/index.d.ts index f951fb9e11..2e8441131f 100644 --- a/types/jquery-mockjax/index.d.ts +++ b/types/jquery-mockjax/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jakerella/jquery-mockjax // Definitions by: Laszlo Jakab , Vladimir Đokić // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-mockjax/tsconfig.json b/types/jquery-mockjax/tsconfig.json index 95708b17ef..660cf14287 100644 --- a/types/jquery-mockjax/tsconfig.json +++ b/types/jquery-mockjax/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "jquery-mockjax-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/jquery-mousewheel/index.d.ts b/types/jquery-mousewheel/index.d.ts index dbc91e126c..d89bbb9942 100644 --- a/types/jquery-mousewheel/index.d.ts +++ b/types/jquery-mousewheel/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jquery/jquery-mousewheel // Definitions by: Brian Surowiec // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -16,6 +17,7 @@ declare namespace JQueryMousewheel { } interface JQuery { + on(event: 'mousewheel', handler: (eventObject: JQueryMousewheel.JQueryMousewheelEventObject, ...args: any[]) => any): JQuery; mousewheel(handler: (eventObject: JQueryMousewheel.JQueryMousewheelEventObject, ...args: any[]) => any): JQuery unmousewheel(): JQuery; } diff --git a/types/jquery-sortable/index.d.ts b/types/jquery-sortable/index.d.ts index 2205bf50e1..e144510fa8 100644 --- a/types/jquery-sortable/index.d.ts +++ b/types/jquery-sortable/index.d.ts @@ -2,6 +2,7 @@ // Project: http://johnny.github.io/jquery-sortable/ // Definitions by: Nathan Pitman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-steps/index.d.ts b/types/jquery-steps/index.d.ts index 7670245480..72b2e036f3 100644 --- a/types/jquery-steps/index.d.ts +++ b/types/jquery-steps/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.jquery-steps.com/ // Definitions by: Joseph Blank , Nicholas Wong // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-timeentry/index.d.ts b/types/jquery-timeentry/index.d.ts index 1ba12a40d6..ebc0fb3ab8 100644 --- a/types/jquery-timeentry/index.d.ts +++ b/types/jquery-timeentry/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kbwood/timeentry // Definitions by: Mark Nadig // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-toastmessage-plugin/index.d.ts b/types/jquery-toastmessage-plugin/index.d.ts index 9e5eb8e8b9..89b905cb3a 100644 --- a/types/jquery-toastmessage-plugin/index.d.ts +++ b/types/jquery-toastmessage-plugin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/akquinet/jquery-toastmessage-plugin // Definitions by: Joe Skeen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-truncate-html/index.d.ts b/types/jquery-truncate-html/index.d.ts index cb9b749e48..9e110b0233 100644 --- a/types/jquery-truncate-html/index.d.ts +++ b/types/jquery-truncate-html/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kbwood/timeentry // Definitions by: Abraão Alves // Definitions: https://github.com/borisyankov/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-urlparam/index.d.ts b/types/jquery-urlparam/index.d.ts index 496bb2f26c..d8b437f201 100644 --- a/types/jquery-urlparam/index.d.ts +++ b/types/jquery-urlparam/index.d.ts @@ -2,6 +2,7 @@ // Project: https://gist.github.com/stpettersens/e1f4478f299b6f4905c1 // Definitions by: Sam Saint-Pettersen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery-validation-unobtrusive/index.d.ts b/types/jquery-validation-unobtrusive/index.d.ts index f1997a1002..128ef10544 100644 --- a/types/jquery-validation-unobtrusive/index.d.ts +++ b/types/jquery-validation-unobtrusive/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/aspnet/jquery-validation-unobtrusive // Definitions by: Matt Brooks // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.address/index.d.ts b/types/jquery.address/index.d.ts index 3c0003b8ca..efa8353c29 100644 --- a/types/jquery.address/index.d.ts +++ b/types/jquery.address/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/asual/jquery-address // Definitions by: Martin Duparc , Tim Klingeleers // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/ +// TypeScript Version: 2.3 /// diff --git a/types/jquery.ajaxfile/index.d.ts b/types/jquery.ajaxfile/index.d.ts deleted file mode 100644 index 12ff53b389..0000000000 --- a/types/jquery.ajaxfile/index.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -// Type definitions for jquery.ajaxfile v0.2.0 -// Project: https://github.com/fpellet/jquery.ajaxFile -// Definitions by: Florent PELLET -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// - -declare namespace JQueryAjaxFile { - export enum DataType { - Json, - Xml, - Text - } - - interface IFileData { - name: string; - element: HTMLInputElement; - } - - interface IOption { - method?: string; - url?: string; - - data?: any; - files?: IFileData[]; - desiredResponseDataType?: DataType; - - timeoutInSeconds?: number; - } - - interface IResponseStatus { - code: number; - text: string; - isSuccess: boolean; - } - - interface IAjaxFileResult { - error?: any; - data?: any; - status?: IResponseStatus; - } - - interface IAjaxFileResultCallback { - (result: IAjaxFileResult): void; - } - - interface IAjaxFilePromise { - then(success: IAjaxFileResultCallback, error?: IAjaxFileResultCallback): IAjaxFilePromise; - done(success: IAjaxFileResultCallback): IAjaxFilePromise; - fail(error: IAjaxFileResultCallback): IAjaxFilePromise; - always(error: IAjaxFileResultCallback): IAjaxFilePromise; - - abord(): void; - } - - interface IAjaxFileStatic { - DataType: typeof DataType; - send(option: IOption): IAjaxFilePromise; - } - - interface IJQueryXHR { - readyState: any; - status: number; - statusText: string; - responseXML: Document; - responseText: string; - statusCode?: { [key: string]: any; }; - - abort(statusText?: string): void; - - setRequestHeader(header: string, value: string): void; - getAllResponseHeaders(): string; - getResponseHeader(header: string): string; - - beforeSend?(jqXHR: IJQueryXHR, settings: JQueryAjaxSettings): any; - dataFilter?(data: any, ty: any): any; - success?(data: any, textStatus: string, jqXHR: IJQueryXHR): any; - error?(jqXHR: IJQueryXHR, textStatus: string, errorThrown: string): any; - complete?(jqXHR: IJQueryXHR, textStatus: string): any; - } - - interface IJQueryOption { - type?: string; - url?: string; - - data?: any; - files?: IFileData[]; - dataType?: string; - - timeout?: number; - - global?: boolean; - - error?(jqXHR: IJQueryXHR, textStatus: string, errorThrown: string): any; - success?(data: any, textStatus: string, jqXHR: IJQueryXHR): any; - complete?(jqXHR: IJQueryXHR, textStatus: string): any; - } - - interface IAjaxFileJQueryExtension { - ajaxWithFile(jqueryOption: IJQueryOption): JQueryDeferred; - } -} - -declare var AjaxFile: JQueryAjaxFile.IAjaxFileStatic; - -declare namespace AjaxFileKnockout { - interface IFileInputWrapper { - getElement(): HTMLInputElement; - fileSelected(): boolean; - } -} - -interface KnockoutBindingHandlers { - file: KnockoutBindingHandler; -} diff --git a/types/jquery.ajaxfile/jquery.ajaxfile-tests.ts b/types/jquery.ajaxfile/jquery.ajaxfile-tests.ts deleted file mode 100644 index 73bc6662dc..0000000000 --- a/types/jquery.ajaxfile/jquery.ajaxfile-tests.ts +++ /dev/null @@ -1,50 +0,0 @@ -function testRawApi(){ - var inputElement:HTMLInputElement = null; - var resultPromise = AjaxFile.send({ - method: 'POST', - url: '/', - desiredResponseDataType: JQueryAjaxFile.DataType.Json, - files: [ - { name: 'joeFile', element: inputElement } - ], - data: { - name: 'joe' - }, - timeoutInSeconds: 30 - }) - .then(result => console.log('Result: ' + result.data), result => console.log('Error: ' + result.error)) - .done(result => console.log('Result: ' + result.data)) - .fail(result => console.log('Error: ' + result.error + " " + result.status.code + " " + result.status.text + " " + result.status.isSuccess)) - .always(result => console.log('end')) - .abord(); -} - -function testJQuery() { - var inputElement: HTMLInputElement = null; - var extension: JQueryAjaxFile.IAjaxFileJQueryExtension = $.fn.ajaxWithFile; - var option: JQueryAjaxFile.IJQueryOption = { - type: 'POST', - url: '/', - dataType: "json", - files: [ - { name: 'joeFile', element: inputElement } - ], - data: { - name: 'joe' - }, - success(result) { console.log('Result: ' + result); }, - error(jqXhr, textStatus, errorThrown) { console.log('Error: ' + errorThrown); }, - complete(jqXhr, textStatus) { console.log('end'); }, - global: true, - timeout: 60 - }; - extension.ajaxWithFile(option); -} - -function testKnockoutExtension(){ - var fileHandler:KnockoutBindingHandler = ko.bindingHandlers.file; -} - -testKnockoutExtension(); -testJQuery(); -testRawApi(); \ No newline at end of file diff --git a/types/jquery.are-you-sure/index.d.ts b/types/jquery.are-you-sure/index.d.ts index 5a7e547e50..0eef8c01e9 100644 --- a/types/jquery.are-you-sure/index.d.ts +++ b/types/jquery.are-you-sure/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/codedance/jquery.AreYouSure // Definitions by: Jon Egerton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -31,4 +32,4 @@ interface AreYouSure { interface JQuery { areYouSure: AreYouSure; -} \ No newline at end of file +} diff --git a/types/jquery.autosize/index.d.ts b/types/jquery.autosize/index.d.ts index f43e6bf7d3..5d9ded0a77 100644 --- a/types/jquery.autosize/index.d.ts +++ b/types/jquery.autosize/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.jacklmoore.com/autosize/ // Definitions by: Aaron T. King // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// declare namespace autosize { diff --git a/types/jquery.base64/index.d.ts b/types/jquery.base64/index.d.ts index e071dc940a..5eaf083d9b 100644 --- a/types/jquery.base64/index.d.ts +++ b/types/jquery.base64/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/yatt/jquery.base64/ // Definitions by: Shinya Mochizuki // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.bbq/index.d.ts b/types/jquery.bbq/index.d.ts index 44deadb690..7040200d11 100644 --- a/types/jquery.bbq/index.d.ts +++ b/types/jquery.bbq/index.d.ts @@ -3,158 +3,160 @@ // Definitions by: Adam R. Smith // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import $ = require('jquery'); -declare namespace JQueryBbq { +declare global { + namespace JQueryBbq { + + interface JQuery { + /** + * Adds a 'state' into the browser history at the current position, setting + * location.hash and triggering any bound callbacks + * (provided the new state is different than the previous state). + * + * @name params A serialized params string or a hash string beginning with # to merge into location.hash. + * @name merge_mode Merge behavior defaults to 0 if merge_mode is not specified (unless a hash string beginning with # is specified, in which case merge behavior defaults to 2) + */ + pushState(params?: string, merge_mode?: number): void; + + pushState(params?: any, merge_mode?: number): void; + + /** + * Retrieves the current 'state' from the browser history, parsing + * location.hash for a specific key or returning an object containing the + * entire state, optionally coercing numbers, booleans, null and undefined + * values. + * + * @name key An optional state key for which to return a value. + * @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false + */ + getState(key?: string, coerce?: boolean): any; + + getState(coerce?: boolean): any; + + /** + * Remove one or more keys from the current browser history 'state', creating + * a new state, setting location.hash and triggering any bound + * callbacks (provided the new state is different than + * the previous state). + * + * @name key One or more key values to remove from the current state. + */ + removeState(...key: any[]): void; + } + + interface ParamFragment { + (url?: string): string; + + (url: string, params: any, merge_mode?: number): string; + + /** + * Specify characters that will be left unescaped when fragments are created + * or merged using , or when the fragment is modified + * using . This option only applies to serialized data + * object fragments, and not set-as-string fragments. Does not affect the + * query string. Defaults to ",/" (comma, forward slash). + * + * @name chars The characters to not escape in the fragment. If unspecified, defaults to empty string (escape all characters). + */ + noEscape: (chars?: string) => void; + + /** + * TODO: DESCRIBE + * + * @name state TODO: DESCRIBE + */ + ajaxCrawlable(state?: boolean): boolean; + } + + interface JQueryDeparam { + /** + * Deserialize a params string into an object, optionally coercing numbers, + * booleans, null and undefined values; this method is the counterpart to the + * internal jQuery.param method. + * + * @name params A params string to be parsed. + * @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted. + */ + (params: string, coerce?: boolean): any; + + + /** + * Parse the query string from a URL or the current window.location.href, + * deserializing it into an object, optionally coercing numbers, booleans, + * null and undefined values. + * + * @name url An optional params string or URL containing query string params to be parsed. If url is omitted, the current window.location.href is used. + * @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted. + */ + querystring(url?: string, coerce?: boolean): any; + + /** + * Parse the fragment (hash) from a URL or the current window.location.href, + * deserializing it into an object, optionally coercing numbers, booleans, + * null and undefined values. + * + * @name url An optional params string or URL containing fragment (hash) params to be parsed. If url is omitted, the current window.location.href is used. + * @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted. + */ + fragment(url?: string, coerce?: boolean): any; + } + + interface EventObject extends JQueryEventObject { + fragment: string; + + getState(key?: string, coerce?: boolean); + } + } + + interface JQueryParam { + /** + * Parse the query string from a URL or the current window.location.href, + * deserializing it into an object, optionally coercing numbers, booleans, + * null and undefined values. + * + * @name url An optional params string or URL containing query string params to be parsed. If url is omitted, the current window.location.href is used. + * @name coerce (Boolean) If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted. + * @name merge_mode An object representing the deserialized params string. + */ + querystring(url?: string, coerce?: boolean, merge_mode?: number): string; + + querystring(url?: string, coerce?: any, merge_mode?: number): string; + + fragment: JQueryBbq.ParamFragment; + + /** + * Returns a params string equivalent to that returned by the internal + * jQuery.param method, but sorted, which makes it suitable for use as a + * cache key. + * + * @name obj An object to be serialized. + * @name traditional Params deep/shallow serialization mode. See the documentation at http://api.jquery.com/jQuery.param/ for more detail. + */ + sorted(obj: any, traditional?: boolean): string; + } + + interface JQueryStatic { + bbq: JQueryBbq.JQuery; + + deparam: JQueryBbq.JQueryDeparam; + + /** + * Get the internal "Default URL attribute per tag" list, or augment the list + * with additional tag-attribute pairs, in case the defaults are insufficient. + * + * @name tag_attr An object containing a list of tag names and their associated default attribute names in the format { tag: 'attr', ... } to be merged into the internal tag-attribute list. + */ + elemUrlAttr(tag_attr?: any): any; + } interface JQuery { - /** - * Adds a 'state' into the browser history at the current position, setting - * location.hash and triggering any bound callbacks - * (provided the new state is different than the previous state). - * - * @name params A serialized params string or a hash string beginning with # to merge into location.hash. - * @name merge_mode Merge behavior defaults to 0 if merge_mode is not specified (unless a hash string beginning with # is specified, in which case merge behavior defaults to 2) - */ - pushState(params?: string, merge_mode?: number): void; + querystring(attr?: any, params?: any, merge_mode?: number): JQuery; - pushState(params?: any, merge_mode?: number): void; + fragment(attr?: any, params?: any, merge_mode?: number): JQuery; - /** - * Retrieves the current 'state' from the browser history, parsing - * location.hash for a specific key or returning an object containing the - * entire state, optionally coercing numbers, booleans, null and undefined - * values. - * - * @name key An optional state key for which to return a value. - * @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false - */ - getState(key?: string, coerce?: boolean): any; + hashchange(eventData?: any, handler?: (eventObject: JQueryBbq.EventObject) => any): JQuery; - getState(coerce?: boolean): any; - - /** - * Remove one or more keys from the current browser history 'state', creating - * a new state, setting location.hash and triggering any bound - * callbacks (provided the new state is different than - * the previous state). - * - * @name key One or more key values to remove from the current state. - */ - removeState(...key: any[]): void; - } - - interface ParamFragment { - (url?: string): string; - - (url: string, params: any, merge_mode?: number): string; - - /** - * Specify characters that will be left unescaped when fragments are created - * or merged using , or when the fragment is modified - * using . This option only applies to serialized data - * object fragments, and not set-as-string fragments. Does not affect the - * query string. Defaults to ",/" (comma, forward slash). - * - * @name chars The characters to not escape in the fragment. If unspecified, defaults to empty string (escape all characters). - */ - noEscape: (chars?: string) => void; - - /** - * TODO: DESCRIBE - * - * @name state TODO: DESCRIBE - */ - ajaxCrawlable(state?: boolean): boolean; - } - - interface JQueryDeparam { - /** - * Deserialize a params string into an object, optionally coercing numbers, - * booleans, null and undefined values; this method is the counterpart to the - * internal jQuery.param method. - * - * @name params A params string to be parsed. - * @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted. - */ - (params: string, coerce?: boolean): any; - - - /** - * Parse the query string from a URL or the current window.location.href, - * deserializing it into an object, optionally coercing numbers, booleans, - * null and undefined values. - * - * @name url An optional params string or URL containing query string params to be parsed. If url is omitted, the current window.location.href is used. - * @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted. - */ - querystring(url?: string, coerce?: boolean): any; - - /** - * Parse the fragment (hash) from a URL or the current window.location.href, - * deserializing it into an object, optionally coercing numbers, booleans, - * null and undefined values. - * - * @name url An optional params string or URL containing fragment (hash) params to be parsed. If url is omitted, the current window.location.href is used. - * @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted. - */ - fragment(url?: string, coerce?: boolean): any; - } - - interface EventObject extends JQueryEventObject { - fragment: string; - - getState(key?: string, coerce?: boolean); + hashchange(handler: (eventObject: JQueryBbq.EventObject) => any): JQuery; } } - -interface JQueryParam { - /** - * Parse the query string from a URL or the current window.location.href, - * deserializing it into an object, optionally coercing numbers, booleans, - * null and undefined values. - * - * @name url An optional params string or URL containing query string params to be parsed. If url is omitted, the current window.location.href is used. - * @name coerce (Boolean) If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted. - * @name merge_mode An object representing the deserialized params string. - */ - querystring(url?: string, coerce?: boolean, merge_mode?: number): string; - - querystring(url?: string, coerce?: any, merge_mode?: number): string; - - fragment: JQueryBbq.ParamFragment; - - /** - * Returns a params string equivalent to that returned by the internal - * jQuery.param method, but sorted, which makes it suitable for use as a - * cache key. - * - * @name obj An object to be serialized. - * @name traditional Params deep/shallow serialization mode. See the documentation at http://api.jquery.com/jQuery.param/ for more detail. - */ - sorted(obj: any, traditional?: boolean): string; -} - -interface JQueryStatic { - bbq: JQueryBbq.JQuery; - - deparam: JQueryBbq.JQueryDeparam; - - /** - * Get the internal "Default URL attribute per tag" list, or augment the list - * with additional tag-attribute pairs, in case the defaults are insufficient. - * - * @name tag_attr An object containing a list of tag names and their associated default attribute names in the format { tag: 'attr', ... } to be merged into the internal tag-attribute list. - */ - elemUrlAttr(tag_attr?: any): any; -} - -interface JQuery { - querystring(attr?: any, params?: any, merge_mode?: number): JQuery; - - fragment(attr?: any, params?: any, merge_mode?: number): JQuery; - - hashchange(eventData?: any, handler?: (eventObject: JQueryBbq.EventObject) => any): JQuery; - - hashchange(handler: (eventObject: JQueryBbq.EventObject) => any): JQuery; -} diff --git a/types/jquery.bbq/jquery.bbq-tests.ts b/types/jquery.bbq/jquery.bbq-tests.ts index 16216ea557..9762ee44d9 100644 --- a/types/jquery.bbq/jquery.bbq-tests.ts +++ b/types/jquery.bbq/jquery.bbq-tests.ts @@ -1,5 +1,7 @@ /// +import $ = require('jquery'); + // ************** Tests to jquery JQueryParam interface var myObject = { a: { @@ -1277,4 +1279,4 @@ test( 'jQuery.bbq.pushState(), jQuery.bbq.getState(), jQuery.bbq.removeState(), }); -}); // END CLOSURE \ No newline at end of file +}); // END CLOSURE diff --git a/types/jquery.bbq/tsconfig.json b/types/jquery.bbq/tsconfig.json index 776f038eab..b6df3537a9 100644 --- a/types/jquery.bbq/tsconfig.json +++ b/types/jquery.bbq/tsconfig.json @@ -12,6 +12,11 @@ "typeRoots": [ "../" ], + "paths": { + "jquery": [ + "jquery/v2" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -20,4 +25,4 @@ "index.d.ts", "jquery.bbq-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/jquery.blockui/index.d.ts b/types/jquery.blockui/index.d.ts index 6763de1a0f..bdaad4e21d 100644 --- a/types/jquery.blockui/index.d.ts +++ b/types/jquery.blockui/index.d.ts @@ -2,6 +2,7 @@ // Project: http://malsup.com/jquery/block/ // Definitions by: Jeffrey Lee // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -126,4 +127,4 @@ interface JQuery { * unblock the element(s) */ unblock(option?: JQBlockUIOptions): JQuery; -} \ No newline at end of file +} diff --git a/types/jquery.bootstrap.wizard/index.d.ts b/types/jquery.bootstrap.wizard/index.d.ts index b04835e14e..465d7cd095 100644 --- a/types/jquery.bootstrap.wizard/index.d.ts +++ b/types/jquery.bootstrap.wizard/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/VinceG/twitter-bootstrap-wizard // Definitions by: Blake Niemyjski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -45,4 +46,4 @@ interface JQuery { interface JQueryStatic { bootstrapWizard: Wizard; -} \ No newline at end of file +} diff --git a/types/jquery.cleditor/index.d.ts b/types/jquery.cleditor/index.d.ts index 14ce2703ad..324aaa2dff 100644 --- a/types/jquery.cleditor/index.d.ts +++ b/types/jquery.cleditor/index.d.ts @@ -2,6 +2,7 @@ // Project: http://premiumsoftware.net/CLEditor // Definitions by: Jeffery Grajkowski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.clientsidelogging/index.d.ts b/types/jquery.clientsidelogging/index.d.ts index 9266ff2f94..896e921e23 100644 --- a/types/jquery.clientsidelogging/index.d.ts +++ b/types/jquery.clientsidelogging/index.d.ts @@ -2,8 +2,9 @@ // Project: https://github.com/remybach/jQuery.clientSideLogging // Definitions by: Diullei Gomes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 -/// +/// interface ClientSideLoggingClientInfoObject { location?: boolean; // The url to the page on which the error occurred. @@ -25,6 +26,7 @@ interface ClientSideLoggingObject { interface JQueryStatic { info: (what?: any) => any; + error(what?: any): any; log: (what?: any) => any; clientSideLogging: (options: ClientSideLoggingObject) => any; } diff --git a/types/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts b/types/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts index b0724ecc0f..24cba342f7 100644 --- a/types/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts +++ b/types/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts @@ -12,4 +12,4 @@ $.info({msg:$(this).parents('li').find('input:text').val()}); $.error({msg:$(this).parents('li').find('input:text').val()}); $.log($(this).parents('li').find('input:text').val()); -$.post('/log?type=error&msg=YOUR_ERROR_MESSAGE'); \ No newline at end of file +$.post('/log?type=error&msg=YOUR_ERROR_MESSAGE'); diff --git a/types/jquery.clientsidelogging/tsconfig.json b/types/jquery.clientsidelogging/tsconfig.json index de9b88ffd8..5a94a133b5 100644 --- a/types/jquery.clientsidelogging/tsconfig.json +++ b/types/jquery.clientsidelogging/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "jquery.clientsidelogging-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/jquery.color/index.d.ts b/types/jquery.color/index.d.ts index 4b24a7c434..713ed67915 100644 --- a/types/jquery.color/index.d.ts +++ b/types/jquery.color/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jquery/jquery-color // Definitions by: Derek Cicerone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.colorbox/index.d.ts b/types/jquery.colorbox/index.d.ts index 3e9b0ea161..2a830611ab 100644 --- a/types/jquery.colorbox/index.d.ts +++ b/types/jquery.colorbox/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.jacklmoore.com/colorbox/ // Definitions by: Gidon Junge // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/ +// TypeScript Version: 2.3 /// diff --git a/types/jquery.colorpicker/index.d.ts b/types/jquery.colorpicker/index.d.ts index 566b7d4103..2d44ddb967 100644 --- a/types/jquery.colorpicker/index.d.ts +++ b/types/jquery.colorpicker/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/vanderlee/colorpicker // Definitions by: Jeffery Grajkowski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.contextmenu/index.d.ts b/types/jquery.contextmenu/index.d.ts index 64db123173..56188d2ac0 100644 --- a/types/jquery.contextmenu/index.d.ts +++ b/types/jquery.contextmenu/index.d.ts @@ -2,6 +2,7 @@ // Project: http://medialize.github.com/jQuery-contextMenu/ // Definitions by: Natan Vivo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.cookie/index.d.ts b/types/jquery.cookie/index.d.ts index 8c3ef6190d..c15341aa97 100644 --- a/types/jquery.cookie/index.d.ts +++ b/types/jquery.cookie/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/carhartl/jquery-cookie // Definitions by: Roy Goode , Ben Lorantfy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.customselect/index.d.ts b/types/jquery.customselect/index.d.ts index faaf6df5af..c64589afd3 100644 --- a/types/jquery.customselect/index.d.ts +++ b/types/jquery.customselect/index.d.ts @@ -2,6 +2,7 @@ // Project: http://adam.co/lab/jquery/customselect// // Definitions by: adamcoulombe // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -13,4 +14,4 @@ interface JQueryCustomSelectOption { interface JQuery { customSelect(val:JQueryCustomSelectOption): JQuery; -} \ No newline at end of file +} diff --git a/types/jquery.cycle/index.d.ts b/types/jquery.cycle/index.d.ts index 3c91561f93..5bee065fdb 100644 --- a/types/jquery.cycle/index.d.ts +++ b/types/jquery.cycle/index.d.ts @@ -2,6 +2,7 @@ // Project: http://jquery.malsup.com/cycle/ // Definitions by: François Guillot // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.cycle/jquery.cycle-tests.ts b/types/jquery.cycle/jquery.cycle-tests.ts index df8ed24b22..bdcd70aa9d 100644 --- a/types/jquery.cycle/jquery.cycle-tests.ts +++ b/types/jquery.cycle/jquery.cycle-tests.ts @@ -259,7 +259,7 @@ $('#s6').cycle({ } }); -$.fn.cycle.transitions.pinch = function ($cont, $slides, opts) { +$.fn.cycle.transitions['pinch'] = function ($cont, $slides, opts) { var $el = $($slides[0]); var w = $el.width(); var h = $el.height(); diff --git a/types/jquery.cycle2/index.d.ts b/types/jquery.cycle2/index.d.ts index 39bb2f0d90..faef998fae 100644 --- a/types/jquery.cycle2/index.d.ts +++ b/types/jquery.cycle2/index.d.ts @@ -3,6 +3,7 @@ // https://github.com/malsup/cycle2 // Definitions by: Donny Nadolny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.dropotron/index.d.ts b/types/jquery.dropotron/index.d.ts index e930034292..26dbc29050 100644 --- a/types/jquery.dropotron/index.d.ts +++ b/types/jquery.dropotron/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/n33/jquery.dropotron // Definitions by: Cyril Schumacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/ +// TypeScript Version: 2.3 /** * @summary Interface for "dropotron" configurations. @@ -157,4 +158,4 @@ interface Dropotron { */ interface JQuery { dropotron: Dropotron; -} \ No newline at end of file +} diff --git a/types/jquery.dynatree/index.d.ts b/types/jquery.dynatree/index.d.ts index 273f88a2c5..267115cc8d 100644 --- a/types/jquery.dynatree/index.d.ts +++ b/types/jquery.dynatree/index.d.ts @@ -2,6 +2,7 @@ // Project: http://code.google.com/p/dynatree/ // Definitions by: François de Campredon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.elang/index.d.ts b/types/jquery.elang/index.d.ts index 9a5459af65..21a73e237f 100644 --- a/types/jquery.elang/index.d.ts +++ b/types/jquery.elang/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/sumegizoltan/ELang/ // Definitions by: Zoltan Sumegi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -311,4 +312,4 @@ interface IFnJQuery { command: string, pluginName: string, pluginDataAttribute: string): JQuery; -} \ No newline at end of file +} diff --git a/types/jquery.fancytree/index.d.ts b/types/jquery.fancytree/index.d.ts index c5e84d69f7..f4e6ac7be8 100644 --- a/types/jquery.fancytree/index.d.ts +++ b/types/jquery.fancytree/index.d.ts @@ -1,7 +1,9 @@ // Type definitions for jquery.fancytree 2.7.0 // Project: https://github.com/mar10/fancytree // Definitions by: Peter Palotas +// Mahdi Abedi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -720,6 +722,8 @@ declare namespace Fancytree { restore?(event: JQueryEventObject, data: EventData): void; /** `data.node` was selected */ select?(event: JQueryEventObject, data: EventData): void; + /** Enable RTL version, default is false */ + rtl?: boolean; } interface FancytreeOptions extends FancytreeEvents { diff --git a/types/jquery.fileupload/index.d.ts b/types/jquery.fileupload/index.d.ts index e113d2733c..6ca998d41a 100644 --- a/types/jquery.fileupload/index.d.ts +++ b/types/jquery.fileupload/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/blueimp/jQuery-File-Upload // Definitions by: Rob Alarcon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.finger/index.d.ts b/types/jquery.finger/index.d.ts index d8a033834b..0cf61e07d2 100644 --- a/types/jquery.finger/index.d.ts +++ b/types/jquery.finger/index.d.ts @@ -2,6 +2,7 @@ // Project: http://ngryman.sh/jquery.finger/ // Definitions by: Max Ackley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.flagstrap/index.d.ts b/types/jquery.flagstrap/index.d.ts index 98acf3cc39..4f6557fdaa 100644 --- a/types/jquery.flagstrap/index.d.ts +++ b/types/jquery.flagstrap/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/blazeworx/flagstrap // Definitions by: Felipe de Sena Garcia // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -81,4 +82,4 @@ interface JQuery { flagStrap(): void; flagStrap(options: jQueryFlagStrap.FlagStrapOptions): void; -} \ No newline at end of file +} diff --git a/types/jquery.form/index.d.ts b/types/jquery.form/index.d.ts index 404b618618..c96b1fd71b 100644 --- a/types/jquery.form/index.d.ts +++ b/types/jquery.form/index.d.ts @@ -2,6 +2,7 @@ // Project: http://malsup.com/jquery/form/ // Definitions by: François Guillot // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -47,4 +48,4 @@ interface JQuery { formToArray: (semantic?: boolean, elements?: Element[]) => any[]; enable: (enable?: boolean) => JQuery; selected: (select?: boolean) => JQuery; -} \ No newline at end of file +} diff --git a/types/jquery.fullscreen/index.d.ts b/types/jquery.fullscreen/index.d.ts index 8831a68cbd..dd8fd9a2e8 100644 --- a/types/jquery.fullscreen/index.d.ts +++ b/types/jquery.fullscreen/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/private-face/jquery.fullscreen // Definitions by: Piraveen Kamalathas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.gridster/index.d.ts b/types/jquery.gridster/index.d.ts index 305788190b..c91fd6f9e4 100644 --- a/types/jquery.gridster/index.d.ts +++ b/types/jquery.gridster/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jbaldwin/gridster // Definitions by: Josh Baldwin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /* gridster-0.1.0.d.ts may be freely distributed under the MIT license. diff --git a/types/jquery.growl/index.d.ts b/types/jquery.growl/index.d.ts index 2a847b8ef7..caa9e0d7cd 100644 --- a/types/jquery.growl/index.d.ts +++ b/types/jquery.growl/index.d.ts @@ -2,8 +2,9 @@ // Project: https://github.com/ksylvest/jquery-growl#readme // Definitions by: Amir.h Yeganemehr // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 -/// +/// declare namespace growl { interface Options { diff --git a/types/jquery.highlight-bartaz/index.d.ts b/types/jquery.highlight-bartaz/index.d.ts index 26fbb1e40a..f76a2bcb98 100644 --- a/types/jquery.highlight-bartaz/index.d.ts +++ b/types/jquery.highlight-bartaz/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/bartaz/sandbox.js/blob/master/jquery.highlight.js // Definitions by: Stefan Profanter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.jnotify/index.d.ts b/types/jquery.jnotify/index.d.ts index d85fceb054..8e1fc1433a 100644 --- a/types/jquery.jnotify/index.d.ts +++ b/types/jquery.jnotify/index.d.ts @@ -2,6 +2,7 @@ // Project: http://jnotify.codeplex.com // Definitions by: James Curran // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // Project by: Fabio Franzini /// diff --git a/types/jquery.joyride/index.d.ts b/types/jquery.joyride/index.d.ts index ee918d83c0..d67262f4af 100644 --- a/types/jquery.joyride/index.d.ts +++ b/types/jquery.joyride/index.d.ts @@ -3,271 +3,272 @@ // Definitions by: Vincent Bortone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import $ = require('jquery'); -/** -* HTML segments for tip layout -*/ -interface JoyrideTemplate { +declare global { /** - * Link template - * @member {string} - */ - link?: string; + * HTML segments for tip layout + */ + interface JoyrideTemplate { + /** + * Link template + * @member {string} + */ + link?: string; - /** - * Timer template - * @member {string} - */ - timer?: string; + /** + * Timer template + * @member {string} + */ + timer?: string; - /** - * Tip template - * @member {string} - */ - tip?: string; + /** + * Tip template + * @member {string} + */ + tip?: string; - /** - * Wrapper template - * @member {string} - */ - wrapper?: string; + /** + * Wrapper template + * @member {string} + */ + wrapper?: string; - /** - * Button template - * @member {string} - */ - button?: string; + /** + * Button template + * @member {string} + */ + button?: string; - /** - * Modal template - * @member {string} - */ - modal?: string; + /** + * Modal template + * @member {string} + */ + modal?: string; - /** - * Exposed Cover template - * @member {string} - */ - exposeCover?: string; + /** + * Exposed Cover template + * @member {string} + */ + exposeCover?: string; + } + + interface JoyrideOptions { + /** + * Version + * @member {string} + */ + version?: string; + + /** + * 'top' or 'bottom' in relation to parent + * @member {string} + */ + tipLocation?: string; + + /** + * override on a per tooltip bases + * @member {any} + */ + nubPosition?: any; + + /** + * whether to scroll to tips + * @member {boolean} + */ + scroll?: boolean; + + /** + * Page scrolling speed in ms + * @member {number} + */ + scrollSpeed?: number; + + /** + * 0 = off, all other numbers = time(ms) + * @member {number} + */ + timer?: number; + + /** + * true or false - false tour starts when restart called + * @member {boolean} + */ + autoStart?: boolean; + + /** + * true/false to start timer on first click + * @member {boolean} + */ + startTimerOnClick?: boolean; + + /** + * the index of the tooltip you want to start on (index of the li) + * @member {number} + */ + startOffset?: number; + + /** + * true/false for next button visibility + * @member {boolean} + */ + nextButton?: boolean; + + /** + * 'pop' or 'fade' in each tip + * @member {string} + */ + tipAnimation?: string; + + /** + * array of indexes where to pause the tour after + * @member {any[]} + */ + pauseAfter?: any[]; + + /** + * if 'fade'- speed in ms of transition + * @member {number} + */ + tipAnimationFadeSpeed?: number; + + /** + * true/false for whether cookies are used + * @member {boolean} + */ + cookieMonster?: boolean; + + /** + * choose your own cookie name + * member {string} + */ + cookieName?: string; + + /** + * Will this cookie be attached to a domain, ie. '.notableapp.com' + * @member {any} + */ + cookieDomain?: any; + + /** + * Set to '/' if you want the cookie for the whole website + * @member {any} + */ + cookiePath?: any; + + /** + * true or false to control whether localstorage is used + * @member {boolean} + */ + localStorage?: boolean; + + /** + * Keyname in localstorage + @member {string} + */ + localStorageKey?: string; + + /** + * Where the tip be attached if not inline + * @member {HTMLElement} + */ + tipContainer?: HTMLElement; + + /** + * Whether to cover page with modal during the tour + * @member {boolean} + */ + modal?: boolean; + + /** + * Whether to expose the elements at each step in the tour (requires modal:true) + * @member {boolean} + */ + expose?: boolean; + + /** + * A method to call after an element has been exposed + * @method + * @param {number} index Tip Index + * @param {JQuery} nextTip Tip object + * @param {JQuery} el Element + */ + postExposeCallback?: (index: number, nextTip: JQuery, el?: JQuery) => void; + + /** + * A method to call before the tour starts (passed index, tip, and cloned exposed element) + * @method + * @param {number} index Current Tip Index + * @param {JQuery} currentTip Current Tip object + * @param {JQuery} el Element + */ + preRideCallback?: (index: number, currentTip: JQuery, el?: JQuery) => void; + + /** + * a method to call once the tour closes + * @method + * @param {number} index Current Tip Index + * @param {JQuery} currentTip Current Tip object + * @param {boolean} isAborted Is Aborted? + */ + postRideCallback?: (index: number, currentTip: JQuery, isAborted?: boolean) => void; + + /** + * A method to call after each step + * @method + * @param {number} index Current Tip Index + * @param {JQuery} currentTip Current Tip object + * @param {boolean} isAborted Is Aborted? + */ + postStepCallback?: (index: number, currentTip: JQuery, isAborted?: boolean) => void; + + /** + * A method to call before each step + * @method + * @param {number} index Tip Index + * @param {JQuery} nextTip Tip object + * @param {JQuery} el Element + */ + preStepCallback?: (index: number, nextTip: JQuery, el?: JQuery) => void; + + /** + * HTML segments for tip layout + * @member {JoyrideTemplate} + */ + template?: JoyrideTemplate; + } + + interface Joyride { + /** + * Default function, no options + * @method + * @return {JQuery} JQuery instance + */ + (): JQuery; + + /** + * Function with options + * @method + * @param {JoyrideOptions} options An object with all the joyride options you want to overwrite. + * @return {JQuery} JQuery instance + */ + (options: JoyrideOptions): JQuery; + + /** + * Function with method name and params + * @method + * @param {string} methodName Name of method to call. + * @param {any[]} params parameters for method + * @return {JQuery} JQuery instance + */ + (methodName: string, ...params: any[]): JQuery; + } + + interface JQuery { + /** + * joyride function + * @return {Joyride} Joyride instance. + */ + joyride: Joyride; + } } - -interface JoyrideOptions { - /** - * Version - * @member {string} - */ - version?: string; - - /** - * 'top' or 'bottom' in relation to parent - * @member {string} - */ - tipLocation?: string; - - /** - * override on a per tooltip bases - * @member {any} - */ - nubPosition?: any; - - /** - * whether to scroll to tips - * @member {boolean} - */ - scroll?: boolean; - - /** - * Page scrolling speed in ms - * @member {number} - */ - scrollSpeed?: number; - - /** - * 0 = off, all other numbers = time(ms) - * @member {number} - */ - timer?: number; - - /** - * true or false - false tour starts when restart called - * @member {boolean} - */ - autoStart?: boolean; - - /** - * true/false to start timer on first click - * @member {boolean} - */ - startTimerOnClick?: boolean; - - /** - * the index of the tooltip you want to start on (index of the li) - * @member {number} - */ - startOffset?: number; - - /** - * true/false for next button visibility - * @member {boolean} - */ - nextButton?: boolean; - - /** - * 'pop' or 'fade' in each tip - * @member {string} - */ - tipAnimation?: string; - - /** - * array of indexes where to pause the tour after - * @member {any[]} - */ - pauseAfter?: any[]; - - /** - * if 'fade'- speed in ms of transition - * @member {number} - */ - tipAnimationFadeSpeed?: number; - - /** - * true/false for whether cookies are used - * @member {boolean} - */ - cookieMonster?: boolean; - - /** - * choose your own cookie name - * member {string} - */ - cookieName?: string; - - /** - * Will this cookie be attached to a domain, ie. '.notableapp.com' - * @member {any} - */ - cookieDomain?: any; - - /** - * Set to '/' if you want the cookie for the whole website - * @member {any} - */ - cookiePath?: any; - - /** - * true or false to control whether localstorage is used - * @member {boolean} - */ - localStorage?: boolean; - - /** - * Keyname in localstorage - @member {string} - */ - localStorageKey?: string; - - /** - * Where the tip be attached if not inline - * @member {HTMLElement} - */ - tipContainer?: HTMLElement; - - /** - * Whether to cover page with modal during the tour - * @member {boolean} - */ - modal?: boolean; - - /** - * Whether to expose the elements at each step in the tour (requires modal:true) - * @member {boolean} - */ - expose?: boolean; - - /** - * A method to call after an element has been exposed - * @method - * @param {number} index Tip Index - * @param {JQuery} nextTip Tip object - * @param {JQuery} el Element - */ - postExposeCallback?: (index: number, nextTip: JQuery, el?: JQuery) => void; - - /** - * A method to call before the tour starts (passed index, tip, and cloned exposed element) - * @method - * @param {number} index Current Tip Index - * @param {JQuery} currentTip Current Tip object - * @param {JQuery} el Element - */ - preRideCallback?: (index: number, currentTip: JQuery, el?: JQuery) => void; - - /** - * a method to call once the tour closes - * @method - * @param {number} index Current Tip Index - * @param {JQuery} currentTip Current Tip object - * @param {boolean} isAborted Is Aborted? - */ - postRideCallback?: (index: number, currentTip: JQuery, isAborted?: boolean) => void; - - /** - * A method to call after each step - * @method - * @param {number} index Current Tip Index - * @param {JQuery} currentTip Current Tip object - * @param {boolean} isAborted Is Aborted? - */ - postStepCallback?: (index: number, currentTip: JQuery, isAborted?: boolean) => void; - - /** - * A method to call before each step - * @method - * @param {number} index Tip Index - * @param {JQuery} nextTip Tip object - * @param {JQuery} el Element - */ - preStepCallback?: (index: number, nextTip: JQuery, el?: JQuery) => void; - - /** - * HTML segments for tip layout - * @member {JoyrideTemplate} - */ - template?: JoyrideTemplate; -} - -interface Joyride -{ - /** - * Default function, no options - * @method - * @return {JQuery} JQuery instance - */ - (): JQuery; - - /** - * Function with options - * @method - * @param {JoyrideOptions} options An object with all the joyride options you want to overwrite. - * @return {JQuery} JQuery instance - */ - (options: JoyrideOptions): JQuery; - - /** - * Function with method name and params - * @method - * @param {string} methodName Name of method to call. - * @param {any[]} params parameters for method - * @return {JQuery} JQuery instance - */ - (methodName: string, ...params: any[]): JQuery; -} - -interface JQuery { - /** - * joyride function - * @return {Joyride} Joyride instance. - */ - joyride: Joyride; -} \ No newline at end of file diff --git a/types/jquery.joyride/jquery.joyride-tests.ts b/types/jquery.joyride/jquery.joyride-tests.ts index c7324dd6c9..08d7687611 100644 --- a/types/jquery.joyride/jquery.joyride-tests.ts +++ b/types/jquery.joyride/jquery.joyride-tests.ts @@ -1,3 +1,5 @@ +import $ = require('jquery'); + var options: JoyrideOptions; options.autoStart = true; options.postStepCallback = (index, tip)=> { @@ -10,4 +12,4 @@ options.expose = true; $(window).load(()=> { $('#joyRideTipContent').joyride(options); -}); \ No newline at end of file +}); diff --git a/types/jquery.joyride/tsconfig.json b/types/jquery.joyride/tsconfig.json index ceb432e871..2c4734d4ae 100644 --- a/types/jquery.joyride/tsconfig.json +++ b/types/jquery.joyride/tsconfig.json @@ -12,6 +12,11 @@ "typeRoots": [ "../" ], + "paths": { + "jquery": [ + "jquery/v2" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -20,4 +25,4 @@ "index.d.ts", "jquery.joyride-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/jquery.jsignature/index.d.ts b/types/jquery.jsignature/index.d.ts index a047f83dea..a3650d487b 100644 --- a/types/jquery.jsignature/index.d.ts +++ b/types/jquery.jsignature/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/willowsystems/jSignature // Definitions by: Patrick Magee // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // Project by: Willow Systems Corp /// diff --git a/types/jquery.leanmodal/index.d.ts b/types/jquery.leanmodal/index.d.ts index e0c2f7f707..91f9ea83d6 100644 --- a/types/jquery.leanmodal/index.d.ts +++ b/types/jquery.leanmodal/index.d.ts @@ -2,6 +2,7 @@ // Project: http://leanmodal.finelysliced.com.au/ // Definitions by: FinelySliced // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -19,4 +20,4 @@ interface JQueryStatic { interface JQuery { leanModal(): JQuery; leanModal(val : JQueryLeanModalOption): JQuery; -} \ No newline at end of file +} diff --git a/types/jquery.livestampjs/index.d.ts b/types/jquery.livestampjs/index.d.ts index 12d401367d..2d65c13674 100644 --- a/types/jquery.livestampjs/index.d.ts +++ b/types/jquery.livestampjs/index.d.ts @@ -2,6 +2,7 @@ // Project: http://mattbradley.github.com/livestampjs/ // Definitions by: Vincent Bortone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // A simple, unobtrusive jQuery plugin that provides auto-updating timeago text to your timestamped HTML elements using Moment.js. diff --git a/types/jquery.menuaim/index.d.ts b/types/jquery.menuaim/index.d.ts index 5bcbebf189..393a637d6f 100644 --- a/types/jquery.menuaim/index.d.ts +++ b/types/jquery.menuaim/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kamens/jQuery-menu-aim // Definitions by: Robert Fonseca-Ensor // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.mmenu/index.d.ts b/types/jquery.mmenu/index.d.ts index 9c27bdb530..07eb443a11 100644 --- a/types/jquery.mmenu/index.d.ts +++ b/types/jquery.mmenu/index.d.ts @@ -2,6 +2,7 @@ // Project: http://mmenu.frebsite.nl/ // Definitions by: John Gouigouix // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.notify/index.d.ts b/types/jquery.notify/index.d.ts new file mode 100644 index 0000000000..9dcf3e5d49 --- /dev/null +++ b/types/jquery.notify/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for jquery.notify 1.5 +// Project: https://github.com/ehynds/jquery-notify (jQuery Notify UI Widget by Eric Hynds) +// Definitions by: Sergei Dorogin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +interface JQueryNotifyOptions { + close?: () => void; + open?: () => void; + custom?: boolean; + disabled?: boolean; + expires?: number; + queue?: boolean; + speed?: number; + stack?: "below" | "above"; +} +interface JQuery { + notify(options?: JQueryNotifyOptions): JQueryNotifyWidget; + notify(method: string, template: number, params?: object, opts?: JQueryNotifyOptions): JQueryNotifyInstance; + notify(method: string, params?: object, opts?: JQueryNotifyOptions): JQueryNotifyInstance; +} +interface JQueryNotifyInstance { + element: JQuery; + isOpen: boolean; + options: JQueryNotifyOptions; + close(): void; + open(): void; +} +interface JQueryNotifyWidget extends JQuery { +} diff --git a/types/jquery.notify/jquery.notify-tests.ts b/types/jquery.notify/jquery.notify-tests.ts new file mode 100644 index 0000000000..1af31996a1 --- /dev/null +++ b/types/jquery.notify/jquery.notify-tests.ts @@ -0,0 +1,21 @@ +let $container: JQueryNotifyWidget = $("").appendTo(document.body).notify(); + +let notification: JQueryNotifyInstance = $container.notify( + "create", + {}, // empty parameters + { + close: () => { + console.log("closed"); + }, + open: () => { + console.log("opened"); + }, + expires: 1000, + speed: 100 + } +); +notification.element.html("text"); + +notification.element.click(() => { + notification.close(); +}); diff --git a/types/jquery.notify/tsconfig.json b/types/jquery.notify/tsconfig.json new file mode 100644 index 0000000000..0fbfcb5134 --- /dev/null +++ b/types/jquery.notify/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jquery.notify-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery.notify/tslint.json b/types/jquery.notify/tslint.json new file mode 100644 index 0000000000..e6098321a2 --- /dev/null +++ b/types/jquery.notify/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-empty-interface": false, + "prefer-method-signature": false + } +} diff --git a/types/jquery.notifybar/index.d.ts b/types/jquery.notifybar/index.d.ts index f1e500d420..6aa12b52f6 100644 --- a/types/jquery.notifybar/index.d.ts +++ b/types/jquery.notifybar/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.whoop.ee/posts/2013-04-05-the-resurrection-of-jquery-notify-bar/ // Definitions by: Shunsuke Ohtani // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.noty/index.d.ts b/types/jquery.noty/index.d.ts index f4bfe4bcb9..0570e02358 100644 --- a/types/jquery.noty/index.d.ts +++ b/types/jquery.noty/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Aaron King , Tim Helfensdörfer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Project by: Nedim Carter +// TypeScript Version: 2.3 /// diff --git a/types/jquery.payment/index.d.ts b/types/jquery.payment/index.d.ts index 88ecd255a5..26cbbc3fef 100644 --- a/types/jquery.payment/index.d.ts +++ b/types/jquery.payment/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/stripe/jquery.payment // Definitions by: Eric J. Smith , John Rutherford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.payment/jquery.payment-tests.ts b/types/jquery.payment/jquery.payment-tests.ts index 9eaad853cb..5b0c3be9c8 100644 --- a/types/jquery.payment/jquery.payment-tests.ts +++ b/types/jquery.payment/jquery.payment-tests.ts @@ -35,8 +35,8 @@ $.payment.cardExpiryVal('03 / 2025') === {month: 3, year: 2025}; //=> {month: 3, $.payment.cardExpiryVal('05 / 04') === {month: 3, year: 2025}; //=> {month: 5, year: 2004} $('input.cc-exp').payment('cardExpiryVal') //=> {month: 4, year: 2020} -var valid = $.payment.validateCardNumber($('input.cc-num').val()); +var valid = $.payment.validateCardNumber($('input.cc-num').val() as string); if (!valid) { alert('Your card is not valid!'); -} \ No newline at end of file +} diff --git a/types/jquery.pjax.falsandtru/index.d.ts b/types/jquery.pjax.falsandtru/index.d.ts index 02c3b1fdda..e7a5cea8e0 100644 --- a/types/jquery.pjax.falsandtru/index.d.ts +++ b/types/jquery.pjax.falsandtru/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/falsandtru/jquery.pjax.js/ // Definitions by: 新ゝ月 NewNotMoon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -186,4 +187,4 @@ interface JQueryStatic { interface JQuery { pjax(setting?: PjaxSetting): any; -} \ No newline at end of file +} diff --git a/types/jquery.pjax/index.d.ts b/types/jquery.pjax/index.d.ts index 2657a90f44..e71dec35e4 100644 --- a/types/jquery.pjax/index.d.ts +++ b/types/jquery.pjax/index.d.ts @@ -2,20 +2,21 @@ // Project: https://github.com/defunkt/jquery-pjax // Definitions by: Junle Li // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /** * Interface for pjax:popstate event. */ -interface PjaxPopStateEventObject extends JQueryEventObject { +interface PjaxPopStateEventObject extends JQuery.Event { /** * Navigation direction. Could be "back" or "forward". */ direction: string } -interface PjaxSettings extends JQueryAjaxSettings { +interface PjaxSettings extends JQuery.AjaxSettings { /** * A jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). * If it is not defined, the `data-pjax` attribute of the link will be treated as container. @@ -32,7 +33,7 @@ interface PjaxSettings extends JQueryAjaxSettings { * Whether to replaceState the URL. Defaults to false. */ replace?: boolean; - + /** * How many requests to cache. Defaults to 20. */ @@ -89,6 +90,8 @@ interface JQuery { * @return Returns the jQuery object */ pjax(delegationSelector: string, containerSelector?: string, options?: PjaxSettings): JQuery; + + on(event: 'pjax:popstate', handler: (e: PjaxPopStateEventObject) => void): this; } interface JQueryStatic { @@ -119,7 +122,7 @@ interface PjaxStatic { * - push: a boolean indicates whether to pushState the URL. Default is true. * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. */ - click(event: JQueryEventObject, options?: PjaxSettings): void; + click(event: JQuery.Event, options?: PjaxSettings): void; /** * PJAX on click handler. @@ -130,7 +133,7 @@ interface PjaxStatic { * - push: a boolean indicates whether to pushState the URL. Default is true. * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. */ - click(event: JQueryEventObject, containerSelector?: string, options?: PjaxSettings): void; + click(event: JQuery.Event, containerSelector?: string, options?: PjaxSettings): void; /** * PJAX on form submit handler @@ -140,7 +143,7 @@ interface PjaxStatic { * - push: a boolean indicates whether to pushState the URL. Default is true. * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. */ - submit(event: JQueryEventObject, options?: PjaxSettings): void; + submit(event: JQuery.Event, options?: PjaxSettings): void; /** * PJAX on form submit handler @@ -151,7 +154,7 @@ interface PjaxStatic { * - push: a boolean indicates whether to pushState the URL. Default is true. * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. */ - submit(event: JQueryEventObject, containerSelector?: string, options?: PjaxSettings): void; + submit(event: JQuery.Event, containerSelector?: string, options?: PjaxSettings): void; /** * Install pjax functions on $.pjax to enable pushState behavior. Does nothing if already enabled. diff --git a/types/jquery.pjax/jquery.pjax-tests.ts b/types/jquery.pjax/jquery.pjax-tests.ts index 91cc9391a2..04c9ee5ab3 100644 --- a/types/jquery.pjax/jquery.pjax-tests.ts +++ b/types/jquery.pjax/jquery.pjax-tests.ts @@ -61,9 +61,9 @@ function test_support() { } function test_events() { - $(document).on('pjax:popstate', function(e: PjaxPopStateEventObject) { + $(document).on('pjax:popstate', function(e) { if (e.direction === 'back') { console.log('pjax:popstate is OK'); } }); -} \ No newline at end of file +} diff --git a/types/jquery.pjax/tsconfig.json b/types/jquery.pjax/tsconfig.json index e48007101b..5364759f80 100644 --- a/types/jquery.pjax/tsconfig.json +++ b/types/jquery.pjax/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "jquery.pjax-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/jquery.placeholder/index.d.ts b/types/jquery.placeholder/index.d.ts index 92fe7e5f02..6f8283ff38 100644 --- a/types/jquery.placeholder/index.d.ts +++ b/types/jquery.placeholder/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/mathiasbynens/jquery-placeholder // Definitions by: Peter Gill , Neil Culver // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.pnotify/index.d.ts b/types/jquery.pnotify/index.d.ts index 1d222efb26..70946c30ef 100644 --- a/types/jquery.pnotify/index.d.ts +++ b/types/jquery.pnotify/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/sciactive/pnotify // Definitions by: David Sichau , Robin Maenhaut // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -133,6 +134,10 @@ interface PNotifyOptions { * Whether to escape the content of the text. (Not allow HTML.) */ text_escape?: boolean; + /** + * Support for PNotifyconfirm options + */ + confirm?: PNotifyconfirm /** * What styling classes to use. (Can be either "brighttheme", "jqueryui", "bootstrap2", "bootstrap3", "fontawesome" or a custom style object) */ diff --git a/types/jquery.pnotify/jquery.pnotify-tests.ts b/types/jquery.pnotify/jquery.pnotify-tests.ts index f1b8ffb73e..fa4f008ef9 100644 --- a/types/jquery.pnotify/jquery.pnotify-tests.ts +++ b/types/jquery.pnotify/jquery.pnotify-tests.ts @@ -21,9 +21,9 @@ function test_pnotify() { text: 'I don\'t have a shadow. (It\'s cause I\'m a vampire or something. Or is that reflections...)', shadow: false }); - new PNotify('Check me out! I\'m a notice.'); + // new PNotify('Check me out! I\'m a notice.'); - new PNotify(Math.round(Math.random() * 9999)); + // new PNotify(Math.round(Math.random() * 9999)); new PNotify({ title: 'PIcon Notice', @@ -216,7 +216,7 @@ function test_pnotify() { icon: "fa fa-bars", delay: 20000, history: false, - stack: false + stack: {} }); var type = "error"; diff --git a/types/jquery.postmessage/index.d.ts b/types/jquery.postmessage/index.d.ts index f370ad3822..9e5c3a1d7c 100644 --- a/types/jquery.postmessage/index.d.ts +++ b/types/jquery.postmessage/index.d.ts @@ -2,6 +2,7 @@ // Project: http://benalman.com/projects/jquery-postmessage-plugin/ // Definitions by: Junle Li // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 // Official docs: http://benalman.com/code/projects/jquery-postmessage/docs/files/jquery-ba-postmessage-js.html interface JQueryStatic { diff --git a/types/jquery.prettyphoto/index.d.ts b/types/jquery.prettyphoto/index.d.ts index 9c5f5f6a52..d37d7c40d2 100644 --- a/types/jquery.prettyphoto/index.d.ts +++ b/types/jquery.prettyphoto/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/scaron/prettyphoto // Definitions by: pgaske // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.qrcode/index.d.ts b/types/jquery.qrcode/index.d.ts index 94504d4dda..0ce6a0b96b 100644 --- a/types/jquery.qrcode/index.d.ts +++ b/types/jquery.qrcode/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/lrsjng/jquery-qrcode // Definitions by: Dan Manastireanu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.rateit/index.d.ts b/types/jquery.rateit/index.d.ts index be62f3b3da..f94640c5ff 100644 --- a/types/jquery.rateit/index.d.ts +++ b/types/jquery.rateit/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/gjunge/rateit.js // Definitions by: Gidon Junge // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// type RateItMode = "bg" | "font"; diff --git a/types/jquery.rowgrid/index.d.ts b/types/jquery.rowgrid/index.d.ts index 5456b9c323..121a2be5bd 100644 --- a/types/jquery.rowgrid/index.d.ts +++ b/types/jquery.rowgrid/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/brunjo/rowGrid.js // Definitions by: Vinayak Garg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -14,4 +15,4 @@ interface JQueryRowGridJSOptions { interface JQuery { rowGrid(options?: JQueryRowGridJSOptions): JQuery; rowGrid(appended: string): JQuery; -} \ No newline at end of file +} diff --git a/types/jquery.scrollto/index.d.ts b/types/jquery.scrollto/index.d.ts index 3a4f13d1a8..9a6777b7a9 100644 --- a/types/jquery.scrollto/index.d.ts +++ b/types/jquery.scrollto/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/flesler/jquery.scrollTo // Definitions by: Neil Stalker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.simplemodal/index.d.ts b/types/jquery.simplemodal/index.d.ts index 7fff90f18a..4588fd5b21 100644 --- a/types/jquery.simplemodal/index.d.ts +++ b/types/jquery.simplemodal/index.d.ts @@ -2,6 +2,7 @@ // Project: http://www.ericmmartin.com/projects/simplemodal/ // Definitions by: Friedrich von Never // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.simplepagination/index.d.ts b/types/jquery.simplepagination/index.d.ts index c09ea685e3..85f3ca88a2 100644 --- a/types/jquery.simplepagination/index.d.ts +++ b/types/jquery.simplepagination/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/flaviusmatis/simplePagination.js // Definitions by: Natan Vivo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.simulate/index.d.ts b/types/jquery.simulate/index.d.ts index 65a80a263e..73d3690e7d 100644 --- a/types/jquery.simulate/index.d.ts +++ b/types/jquery.simulate/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jquery/jquery-simulate // Definitions by: Derek Cicerone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.slimscroll/index.d.ts b/types/jquery.slimscroll/index.d.ts index 4309e19c21..43eb86a028 100644 --- a/types/jquery.slimscroll/index.d.ts +++ b/types/jquery.slimscroll/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/rochal/jQuery-slimScroll // Definitions by: Chintan Shah // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// interface IJQuerySlimScrollOptions { diff --git a/types/jquery.soap/index.d.ts b/types/jquery.soap/index.d.ts index 384b5bc480..36674a677b 100644 --- a/types/jquery.soap/index.d.ts +++ b/types/jquery.soap/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/doedje/jquery.soap // Definitions by: Roland Greim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/ +// TypeScript Version: 2.3 /// diff --git a/types/jquery.sortelements/index.d.ts b/types/jquery.sortelements/index.d.ts index 5fbf62ab8e..112c2f8169 100644 --- a/types/jquery.sortelements/index.d.ts +++ b/types/jquery.sortelements/index.d.ts @@ -2,6 +2,7 @@ // Project: http://james.padolsey.com/javascript/sorting-elements-with-jquery/ // Definitions by: Tim Bureck // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.superlink/index.d.ts b/types/jquery.superlink/index.d.ts index 23bd71077d..90eed21d69 100644 --- a/types/jquery.superlink/index.d.ts +++ b/types/jquery.superlink/index.d.ts @@ -2,9 +2,10 @@ // Project: http://james.padolsey.com/demos/plugins/jQuery/superLink/superlink.jquery.js // Definitions by: Blake Niemyjski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// interface JQuery { superLink(link?: string): JQuery; -} \ No newline at end of file +} diff --git a/types/jquery.tagsmanager/index.d.ts b/types/jquery.tagsmanager/index.d.ts index aa9ff8e74f..77af837b63 100644 --- a/types/jquery.tagsmanager/index.d.ts +++ b/types/jquery.tagsmanager/index.d.ts @@ -2,6 +2,7 @@ // Project: http://welldonethings.com/tags/manager // Definitions by: Vincent Bortone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.tile/index.d.ts b/types/jquery.tile/index.d.ts index d8437b0b01..0519c64673 100644 --- a/types/jquery.tile/index.d.ts +++ b/types/jquery.tile/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/urin/jquery.tile.js // Definitions by: Shunsuke Ohtani // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.timeago/index.d.ts b/types/jquery.timeago/index.d.ts index 820af3e128..9e1087ec31 100644 --- a/types/jquery.timeago/index.d.ts +++ b/types/jquery.timeago/index.d.ts @@ -2,6 +2,7 @@ // Project: http://timeago.yarp.com/ // Definitions by: François Guillot // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -59,4 +60,4 @@ interface JQueryStatic { interface JQuery { timeago: Timeago; -} \ No newline at end of file +} diff --git a/types/jquery.timepicker/index.d.ts b/types/jquery.timepicker/index.d.ts index d6a8d45a3b..cb6dcd5a5a 100644 --- a/types/jquery.timepicker/index.d.ts +++ b/types/jquery.timepicker/index.d.ts @@ -2,6 +2,7 @@ // Project: http://fgelinas.com/code/timepicker/ // Definitions by: Anwar Javed // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/jquery.timer/index.d.ts b/types/jquery.timer/index.d.ts index f43e887787..752e04289e 100644 --- a/types/jquery.timer/index.d.ts +++ b/types/jquery.timer/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jchavannes/jquery-timer // Definitions by: Joshua Strobl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.tinycarousel/index.d.ts b/types/jquery.tinycarousel/index.d.ts index 0e91ba75ad..213fdd0728 100644 --- a/types/jquery.tinycarousel/index.d.ts +++ b/types/jquery.tinycarousel/index.d.ts @@ -2,6 +2,7 @@ // Project: http://baijs.nl/tinycarousel/ // Definitions by: Christiaan Rakowski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.tinyscrollbar/index.d.ts b/types/jquery.tinyscrollbar/index.d.ts index c56da8df7d..5cd3240dfb 100644 --- a/types/jquery.tinyscrollbar/index.d.ts +++ b/types/jquery.tinyscrollbar/index.d.ts @@ -2,6 +2,7 @@ // Project: http://baijs.nl/tinyscrollbar/ // Definitions by: Christiaan Rakowski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.tipsy/index.d.ts b/types/jquery.tipsy/index.d.ts index 678c2a77f0..3414eeae49 100644 --- a/types/jquery.tipsy/index.d.ts +++ b/types/jquery.tipsy/index.d.ts @@ -2,6 +2,7 @@ // Project: http://onehackoranother.com/projects/jquery/tipsy/ // Definitions by: Brian Dukes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.tipsy/jquery.tipsy-tests.ts b/types/jquery.tipsy/jquery.tipsy-tests.ts index 09ba7f2d68..8a0591e137 100644 --- a/types/jquery.tipsy/jquery.tipsy-tests.ts +++ b/types/jquery.tipsy/jquery.tipsy-tests.ts @@ -22,8 +22,8 @@ $(function() { $('#focus-example [title]').tipsy({trigger: 'focus', gravity: 'w'}); }); -function onclickExample1() { $("#manual-example a[rel=tipsy]").tipsy("show"); return false; } -function onclickExample2() { $("#manual-example a[rel=tipsy]").tipsy("hide"); return false; } +function onclickExample1() { $("#manual-example a[rel=tipsy]").tipsy({ title: "show" }); return false; } +function onclickExample2() { $("#manual-example a[rel=tipsy]").tipsy({ title: "hide" }); return false; } $('#manual-example a[rel=tipsy]').tipsy({trigger: 'manual'}); -$('a.live-tipsy').tipsy({live: true}); \ No newline at end of file +$('a.live-tipsy').tipsy({live: true}); diff --git a/types/jquery.tools/index.d.ts b/types/jquery.tools/index.d.ts index d84db10e7b..0c19d7a8fb 100644 --- a/types/jquery.tools/index.d.ts +++ b/types/jquery.tools/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jquerytools/jquerytools // Definitions by: Joe Skeen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.tools/jquery.tools-tests.ts b/types/jquery.tools/jquery.tools-tests.ts index f2f27666f6..d7c9b36523 100644 --- a/types/jquery.tools/jquery.tools-tests.ts +++ b/types/jquery.tools/jquery.tools-tests.ts @@ -13,7 +13,7 @@ const triggers = $(".modalInput").overlay({ closeOnClick: false }); -const buttons = $("#yesno button").click(function(this: JQuery, e: JQueryEventObject) { +const buttons = $("#yesno button").click(function(e) { // get user input const yes = buttons.index(this) === 0; @@ -32,14 +32,14 @@ $(".my_overlay_trigger").overlay({ // ... the rest of the configuration properties }); -$("#prompt form").submit(function(this: JQuery, e: JQueryEventObject) { +$("#prompt form").submit(function(e) { // close the overlay triggers.eq(1).overlay().close(); // or more straightforward: triggers.data('overlay').close(); // get user input - const input = $("input", this).val(); + const input = $("input", this).val() as string; // do something with the answer triggers.eq(1).html(input); @@ -57,13 +57,13 @@ $.tools.overlay.addEffect("myEffect", - 'this' variable is a reference to the overlay API - here we use jQuery's fadeIn() method to perform the effect */ - this.getOverlay().css(position).fadeIn(this.getConf().speed, done); + this.getOverlay().css(position).fadeIn(this.getConf().speed!, done); }, // close function function(done) { // fade out the overlay - this.getOverlay().fadeOut(this.getConf().closeSpeed, done); + this.getOverlay().fadeOut(this.getConf().closeSpeed!, done); } ); @@ -100,7 +100,7 @@ $(() => { const wrap = this.getOverlay().find(".contentWrap"); // load the page specified in the trigger - wrap.load(this.getTrigger().attr("href")); + wrap.load(this.getTrigger().attr("href")!); } }); }); @@ -115,7 +115,7 @@ $(() => { ]; // setup triggers - $("button[rel]").each(function(this: JQuery, i: number) { + $("button[rel]").each(function(i) { $(this).overlay({ // common configuration for each overlay oneInstance: false, @@ -161,7 +161,7 @@ $.tools.overlay.addEffect("drop", { top: '-=55', opacity: 0, width: '-=20' }, 300, 'drop', - function(this: JQuery) { + function() { $(this).hide(); done.call(null); }); diff --git a/types/jquery.tooltipster/index.d.ts b/types/jquery.tooltipster/index.d.ts index 3534730ec4..8d2e580d35 100644 --- a/types/jquery.tooltipster/index.d.ts +++ b/types/jquery.tooltipster/index.d.ts @@ -1,7 +1,8 @@ // Type definitions for jQuery Tooltipster 3.3.0 // Project: https://github.com/iamceege/tooltipster -// Definitions by: Patrick Magee , Dmitry Pesterev +// Definitions by: Patrick Magee , Dmitry Pesterev , Leonard Thieu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -164,25 +165,6 @@ interface JQueryTooltipsterOptions { interface JQuery { - /** - * Initiate the Tooltipster plugin - */ - tooltipster(): JQuery; - - /** - * Creates a new tooltip with the specified, or default, options. - * @param options The options - * @example - * $('.tooltip').tooltipster({ - * animation: 'fade', - * delay: 200, - * theme: 'tooltipster-default', - * touchDevices: false, - * trigger: 'hover' - * }); - */ - tooltipster(options?: JQueryTooltipsterOptions): JQuery; - /** * Show a tooltip (the 'callback' argument is optional) * @param methodName show @@ -262,11 +244,35 @@ interface JQuery { */ tooltipster(methodName: "elementIcon"): JQuery; + /** + * Change default options for all future instances + * @param methodName setDefaults + * @param {object} options The options that should be made defaults + */ + tooltipster(methodName: 'setDefaults', options: JQueryTooltipsterOptions): JQuery; + /** * Generics */ - tooltipster(methodName: string, optionName: string, optionValue: string): JQuery; - tooltipster(methodName: string, param: string): JQuery; - tooltipster(methodName: string): JQuery; - tooltipster(methodName: string): string; + tooltipster(methodName: string, optionName: string, optionValue?: string): JQuery; + tooltipster(methodName: string): JQuery | string; + + /** + * Creates a new tooltip with the specified, or default, options. + * @param options The options + * @example + * $('.tooltip').tooltipster({ + * animation: 'fade', + * delay: 200, + * theme: 'tooltipster-default', + * touchDevices: false, + * trigger: 'hover' + * }); + */ + tooltipster(options?: JQueryTooltipsterOptions): JQuery; + + /** + * Initiate the Tooltipster plugin + */ + tooltipster(): JQuery; } diff --git a/types/jquery.total-storage/index.d.ts b/types/jquery.total-storage/index.d.ts index 5de79c34a6..1966d84e62 100644 --- a/types/jquery.total-storage/index.d.ts +++ b/types/jquery.total-storage/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Upstatement/jquery-total-storage // Definitions by: Jeremy Brooks // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// @@ -61,4 +62,4 @@ interface JQueryTotalStorageOptions { interface JQueryStatic { totalStorage: JQueryTotalStorage; -} \ No newline at end of file +} diff --git a/types/jquery.transit/index.d.ts b/types/jquery.transit/index.d.ts index f267bbb24f..4bf4f5aabf 100644 --- a/types/jquery.transit/index.d.ts +++ b/types/jquery.transit/index.d.ts @@ -2,6 +2,7 @@ // Project: http://ricostacruz.com/jquery.transit/ // Definitions by: MrBigDog2U // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.ui.datetimepicker/index.d.ts b/types/jquery.ui.datetimepicker/index.d.ts index 96ed13e2bc..332bba5358 100644 --- a/types/jquery.ui.datetimepicker/index.d.ts +++ b/types/jquery.ui.datetimepicker/index.d.ts @@ -2,6 +2,7 @@ // Project: http://trentrichardson.com/examples/timepicker/ // Definitions by: dougajmcdonald // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/jquery.ui.layout/index.d.ts b/types/jquery.ui.layout/index.d.ts index cab45fe24d..148265ac6a 100644 --- a/types/jquery.ui.layout/index.d.ts +++ b/types/jquery.ui.layout/index.d.ts @@ -2,6 +2,7 @@ // Project: http://layout.jquery-dev.net/ // Definitions by: Steve Fenton , Douglas Armstrong // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/jquery.uniform/index.d.ts b/types/jquery.uniform/index.d.ts index b8b44f9b88..685538aa08 100644 --- a/types/jquery.uniform/index.d.ts +++ b/types/jquery.uniform/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/pixelmatrix/uniform // Definitions by: flyfishMT // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.validation/index.d.ts b/types/jquery.validation/index.d.ts index 5e0e2cfa01..95be732332 100644 --- a/types/jquery.validation/index.d.ts +++ b/types/jquery.validation/index.d.ts @@ -2,6 +2,7 @@ // Project: http://jqueryvalidation.org/ // Definitions by: François de Campredon , John Reilly , Anže Videnič // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.watermark/index.d.ts b/types/jquery.watermark/index.d.ts index bb6c5e1f0c..b735bcb2e0 100644 --- a/types/jquery.watermark/index.d.ts +++ b/types/jquery.watermark/index.d.ts @@ -2,6 +2,7 @@ // Project: http://jquery-watermark.googlecode.com // Definitions by: Anwar Javed // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery.window/index.d.ts b/types/jquery.window/index.d.ts index 2dc8f75309..d1e60ff5be 100644 --- a/types/jquery.window/index.d.ts +++ b/types/jquery.window/index.d.ts @@ -2,6 +2,7 @@ // Project: http://fstoke.me/jquery/window/ // Definitions by: Ryan Graham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/jquery/README.md b/types/jquery/README.md new file mode 100644 index 0000000000..8fab451ce0 --- /dev/null +++ b/types/jquery/README.md @@ -0,0 +1,68 @@ +### Usage + +#### Global + +When jQuery is globally available, you can use `jQuery` and `$` directly. + +#### Importing (with a global DOM available) + +When you want to import jQuery as a module and have a global DOM available (e.g. browser and browser-like environments): + +```typescript +import jQuery = require('jquery'); +``` + +#### Importing (without a global DOM available) + +When you want to import jQuery as a module and do not have a global DOM available (e.g. Node.js environment): + +```typescript +import jQueryFactory = require('jquery'); +const jQuery = jQueryFactory(window, true); +``` + +Note that while the factory function ignores the second parameter, it is required to get correct type declarations. + +### Project structure + +- [jquery-tests.ts](jquery-tests.ts) + - Tests that exercise TypeScript-specific usage and cases not covered by other test files. +- [test/example-tests.ts](test/example-tests.ts) + - Tests generated from examples in jQuery documentation. +- [test/longdesc-tests.ts](test/longdesc-tests.ts) + - Tests generated from non-example snippets in jQuery documentation. +- [test/jquery-window-module-tests.ts](test/jquery-window-module-tests.ts)
    + [test/jquery-slim-window-module-tests.ts](test/jquery-slim-window-module-tests.ts) + - Tests importing jQuery with a DOM available +- [test/jquery-no-window-module-tests.ts](test/jquery-no-window-module-tests.ts)
    + [test/jquery-slim-no-window-module-tests.ts](test/jquery-slim-no-window-module-tests.ts) + - Tests importing jQuery without a DOM available + +### Authoring type definitions for jQuery plugins + +`$.fn` is represented by `JQuery`. + +`$` is represented by `JQueryStatic`. + +Declare an interface that has the plugin's overloads as call signatures and static members as properties. + +```typescript +interface MyPlugin { + settings: MyPluginSettings; + + (behavior: 'enable'): JQuery; + (settings?: MyPluginSettings): JQuery; +} + +interface MyPluginSettings { + title?: string; +} +``` + +Then declare a property on `JQuery` with your plugin's type. + +```typescript +interface JQuery { + myPlugin: MyPlugin; +} +``` diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index ca799f21e5..b71bfbbed3 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -1,493 +1,5515 @@ -// Type definitions for jQuery 1.10.x / 2.0.x -// Project: http://jquery.com/ -// Definitions by: Boris Yankov , Christian Hoffmeister , Steve Fenton , Diullei Gomes , Tass Iliopoulos , Jason Swearingen , Sean Hill , Guus Goossens , Kelly Summerlin , Basarat Ali Syed , Nicholas Wolverson , Derek Cicerone , Andrew Gaspar , Seikichi Kondo , Benjamin Jackman , Poul Sorensen , Josh Strobl , John Reilly , Dick van den Brink , Thomas Schulz +// Type definitions for jquery 3.2 +// Project: https://jquery.com +// Definitions by: Leonard Thieu +// Boris Yankov +// Christian Hoffmeister +// Steve Fenton +// Diullei Gomes +// Tass Iliopoulos +// Jason Swearingen +// Sean Hill +// Guus Goossens +// Kelly Summerlin +// Basarat Ali Syed +// Nicholas Wolverson +// Derek Cicerone +// Andrew Gaspar +// Seikichi Kondo +// Benjamin Jackman +// Poul Sorensen +// Josh Strobl +// John Reilly +// Dick van den Brink +// Thomas Schulz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 -/* ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - - -/** - * Interface for the AJAX setting that will configure the AJAX request - * @see {@link https://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings} - */ -interface JQueryAjaxSettings { - /** - * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. - */ - accepts?: any; - /** - * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success(). - */ - async?: boolean; - /** - * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request. - */ - beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any; - /** - * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET. - */ - cache?: boolean; - /** - * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. - */ - complete? (jqXHR: JQueryXHR, textStatus: string): any; - /** - * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5) - */ - contents?: { [key: string]: any; }; - //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false" - // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/742 - /** - * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. - */ - contentType?: any; - /** - * This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). - */ - context?: any; - /** - * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. (version added: 1.5) - */ - converters?: { [key: string]: any; }; - /** - * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. (version added: 1.5) - */ - crossDomain?: boolean; - /** - * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be key-value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below). - */ - data?: any; - /** - * A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter. - */ - dataFilter? (data: any, ty: any): any; - /** - * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). - */ - dataType?: string; - /** - * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event. - */ - error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any; - /** - * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events. - */ - global?: boolean; - /** - * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. (version added: 1.5) - */ - headers?: { [key: string]: any; }; - /** - * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data. - */ - ifModified?: boolean; - /** - * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. (version added: 1.5.1) - */ - isLocal?: boolean; - /** - * Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" } - */ - jsonp?: any; - /** - * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function. - */ - jsonpCallback?: any; - /** - * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). (version added: 1.9.0) - */ - method?: string; - /** - * A MIME type to override the XHR MIME type. (version added: 1.5.1) - */ - mimeType?: string; - /** - * A password to be used with XMLHttpRequest in response to an HTTP access authentication request. - */ - password?: string; - /** - * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false. - */ - processData?: boolean; - /** - * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script. - */ - scriptCharset?: string; - /** - * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. f the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. (version added: 1.5) - */ - statusCode?: { [key: string]: any; }; - /** - * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. - */ - success? (data: any, textStatus: string, jqXHR: JQueryXHR): any; - /** - * Set a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period. - */ - timeout?: number; - /** - * Set this to true if you wish to use the traditional style of parameter serialization. - */ - traditional?: boolean; - /** - * The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers. - */ - type?: string; - /** - * A string containing the URL to which the request is sent. - */ - url?: string; - /** - * A username to be used with XMLHttpRequest in response to an HTTP access authentication request. - */ - username?: string; - /** - * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory. - */ - xhr?: any; - /** - * An object of fieldName-fieldValue pairs to set on the native XHR object. For example, you can use it to set withCredentials to true for cross-domain requests if needed. In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. (version added: 1.5.1) - */ - xhrFields?: { [key: string]: any; }; +declare module 'jquery' { + export = jQuery; } -/** - * Interface for the jqXHR object - * @see {@link https://api.jquery.com/jQuery.ajax/#jqXHR} - */ -interface JQueryXHR extends XMLHttpRequest, JQueryPromise { - /** - * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5). - */ - overrideMimeType(mimeType: string): any; - /** - * Cancel the request. - * - * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled" - */ - abort(statusText?: string): void; - /** - * Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details. - */ - then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => R|JQueryPromise, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise; - /** - * Property containing the parsed response if the response content type is json - */ - responseJSON?: any; - /** - * A function to be called if the request fails. - */ - error(xhr: JQueryXHR, textStatus: string, errorThrown: string): void; +declare module 'jquery/dist/jquery.slim' { + export = jQuery; } -/** - * Interface for the JQuery callback - * @see {@link https://api.jquery.com/category/callbacks-object/} - */ -interface JQueryCallback { +declare const jQuery: JQueryStatic; +declare const $: JQueryStatic; + +// Used by JQuery.Event +type _Event = Event; + +interface JQuery extends Iterable { /** - * Add a callback or a collection of callbacks to a callback list. + * A string containing the jQuery version number. * - * @param callbacks A function, or array of functions, that are to be added to the callback list. - * @see {@link https://api.jquery.com/callbacks.add/} + * @see {@link https://api.jquery.com/jquery/} + * @since 1.0 */ - add(callbacks: Function): JQueryCallback; + jquery: string; /** - * Add a callback or a collection of callbacks to a callback list. + * The number of elements in the jQuery object. * - * @param callbacks A function, or array of functions, that are to be added to the callback list. - * @see {@link https://api.jquery.com/callbacks.add/} + * @see {@link https://api.jquery.com/length/} + * @since 1.0 */ - add(callbacks: Function[]): JQueryCallback; - + length: number; /** - * Disable a callback list from doing anything more. - * @see {@link https://api.jquery.com/callbacks.disable/} - */ - disable(): JQueryCallback; - - /** - * Determine if the callbacks list has been disabled. - * @see {@link https://api.jquery.com/callbacks.disabled/} - */ - disabled(): boolean; - - /** - * Remove all of the callbacks from a list. - * @see {@link https://api.jquery.com/callbacks.empty/} - */ - empty(): JQueryCallback; - - /** - * Call all of the callbacks with the given arguments + * Create a new jQuery object with elements added to the set of matched elements. * - * @param arguments The argument or list of arguments to pass back to the callback list. - * @see {@link https://api.jquery.com/callbacks.fire/} + * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. + * @param context The point in the document at which the selector should begin matching; similar to the context + * argument of the $(selector, context) method. + * @see {@link https://api.jquery.com/add/} + * @since 1.4 */ - fire(...arguments: any[]): JQueryCallback; - + add(selector: JQuery.Selector, context: Element): this; /** - * Determine if the callbacks have already been called at least once. - * @see {@link https://api.jquery.com/callbacks.fired/} - */ - fired(): boolean; - - /** - * Call all callbacks in a list with the given context and arguments. + * Create a new jQuery object with elements added to the set of matched elements. * - * @param context A reference to the context in which the callbacks in the list should be fired. - * @param arguments An argument, or array of arguments, to pass to the callbacks in the list. - * @see {@link https://api.jquery.com/callbacks.fireWith/} + * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. + * One or more elements to add to the set of matched elements. + * An HTML fragment to add to the set of matched elements. + * An existing jQuery object to add to the set of matched elements. + * @see {@link https://api.jquery.com/add/} + * @since 1.0 + * @since 1.3.2 */ - fireWith(context?: any, args?: any[]): JQueryCallback; - + add(selector: JQuery.Selector | JQuery.TypeOrArray | JQuery.htmlString | JQuery): this; /** - * Determine whether a supplied callback is in a list + * Add the previous set of elements on the stack to the current set, optionally filtered by a selector. * - * @param callback The callback to search for. - * @see {@link https://api.jquery.com/callbacks.has/} + * @param selector A string containing a selector expression to match the current set of elements against. + * @see {@link https://api.jquery.com/addBack/} + * @since 1.8 */ - has(callback: Function): boolean; - + addBack(selector?: JQuery.Selector): this; /** - * Lock a callback list in its current state. - * @see {@link https://api.jquery.com/callbacks.lock/} - */ - lock(): JQueryCallback; - - /** - * Determine if the callbacks list has been locked. - * @see {@link https://api.jquery.com/callbacks.locked/} - */ - locked(): boolean; - - /** - * Remove a callback or a collection of callbacks from a callback list. + * Adds the specified class(es) to each element in the set of matched elements. * - * @param callbacks A function, or array of functions, that are to be removed from the callback list. - * @see {@link https://api.jquery.com/callbacks.remove/} + * @param className One or more space-separated classes to be added to the class attribute of each matched element. + * A function returning one or more space-separated class names to be added to the existing class + * name(s). Receives the index position of the element in the set and the existing class name(s) as + * arguments. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/addClass/} + * @since 1.0 + * @since 1.4 */ - remove(callbacks: Function): JQueryCallback; + addClass(className: string | ((this: TElement, index: number, currentClassName: string) => string)): this; /** - * Remove a callback or a collection of callbacks from a callback list. + * Insert content, specified by the parameter, after each element in the set of matched elements. * - * @param callbacks A function, or array of functions, that are to be removed from the callback list. - * @see {@link https://api.jquery.com/callbacks.remove/} + * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or + * jQuery objects to insert after each element in the set of matched elements. + * @see {@link https://api.jquery.com/after/} + * @since 1.0 */ - remove(callbacks: Function[]): JQueryCallback; + after(...contents: Array | JQuery>): this; + /** + * Insert content, specified by the parameter, after each element in the set of matched elements. + * + * @param fn A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert + * after each element in the set of matched elements. Receives the index position of the element in the + * set and the old HTML value of the element as arguments. Within the function, this refers to the + * current element in the set. + * @see {@link https://api.jquery.com/after/} + * @since 1.4 + * @since 1.10 + */ + after(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + /** + * Register a handler to be called when Ajax requests complete. This is an AjaxEvent. + * + * @param handler The function to be invoked. + * @see {@link https://api.jquery.com/ajaxComplete/} + * @since 1.0 + */ + ajaxComplete(handler: (this: Document, event: JQuery.Event, jqXHR: JQuery.jqXHR, ajaxOptions: JQuery.AjaxSettings) => void | false): this; + /** + * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. + * + * @param handler The function to be invoked. + * @see {@link https://api.jquery.com/ajaxError/} + * @since 1.0 + */ + ajaxError(handler: (this: Document, event: JQuery.Event, jqXHR: JQuery.jqXHR, ajaxSettings: JQuery.AjaxSettings, thrownError: string) => void | false): this; + /** + * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. + * + * @param handler The function to be invoked. + * @see {@link https://api.jquery.com/ajaxSend/} + * @since 1.0 + */ + ajaxSend(handler: (this: Document, event: JQuery.Event, jqXHR: JQuery.jqXHR, ajaxOptions: JQuery.AjaxSettings) => void | false): this; + /** + * Register a handler to be called when the first Ajax request begins. This is an Ajax Event. + * + * @param handler The function to be invoked. + * @see {@link https://api.jquery.com/ajaxStart/} + * @since 1.0 + */ + ajaxStart(handler: (this: Document) => void | false): this; + /** + * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event. + * + * @param handler The function to be invoked. + * @see {@link https://api.jquery.com/ajaxStop/} + * @since 1.0 + */ + ajaxStop(handler: (this: Document) => void | false): this; + /** + * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event. + * + * @param handler The function to be invoked. + * @see {@link https://api.jquery.com/ajaxSuccess/} + * @since 1.0 + */ + ajaxSuccess(handler: (this: Document, event: JQuery.Event, jqXHR: JQuery.jqXHR, ajaxOptions: JQuery.AjaxSettings, data: JQuery.PlainObject) => void | false): this; + /** + * Perform a custom animation of a set of CSS properties. + * + * @param properties An object of CSS properties and values that the animation will move toward. + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/animate/} + * @since 1.0 + */ + animate(properties: JQuery.PlainObject, + duration: JQuery.Duration, + easing: string, + complete?: (this: TElement) => void): this; + /** + * Perform a custom animation of a set of CSS properties. + * + * @param properties An object of CSS properties and values that the animation will move toward. + * @param duration_easing A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/animate/} + * @since 1.0 + */ + animate(properties: JQuery.PlainObject, + duration_easing: JQuery.Duration | string, + complete?: (this: TElement) => void): this; + /** + * Perform a custom animation of a set of CSS properties. + * + * @param properties An object of CSS properties and values that the animation will move toward. + * @param options A map of additional options to pass to the method. + * @see {@link https://api.jquery.com/animate/} + * @since 1.0 + */ + animate(properties: JQuery.PlainObject, + options: JQuery.EffectsOptions): this; + /** + * Perform a custom animation of a set of CSS properties. + * + * @param properties An object of CSS properties and values that the animation will move toward. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/animate/} + * @since 1.0 + */ + animate(properties: JQuery.PlainObject, + complete?: (this: TElement) => void): this; + /** + * Insert content, specified by the parameter, to the end of each element in the set of matched elements. + * + * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or + * jQuery objects to insert at the end of each element in the set of matched elements. + * @see {@link https://api.jquery.com/append/} + * @since 1.0 + */ + append(...contents: Array | JQuery>): this; + /** + * Insert content, specified by the parameter, to the end of each element in the set of matched elements. + * + * @param fn A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at + * the end of each element in the set of matched elements. Receives the index position of the element + * in the set and the old HTML value of the element as arguments. Within the function, this refers to + * the current element in the set. + * @see {@link https://api.jquery.com/append/} + * @since 1.4 + */ + append(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + /** + * Insert every element in the set of matched elements to the end of the target. + * + * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements + * will be inserted at the end of the element(s) specified by this parameter. + * @see {@link https://api.jquery.com/appendTo/} + * @since 1.0 + */ + appendTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + /** + * Set one or more attributes for the set of matched elements. + * + * @param attributeName The name of the attribute to set. + * @param value A value to set for the attribute. If null, the specified attribute will be removed (as in .removeAttr()). + * A function returning the value to set. this is the current element. Receives the index position of + * the element in the set and the old attribute value as arguments. + * @see {@link https://api.jquery.com/attr/} + * @since 1.0 + * @since 1.1 + */ + attr(attributeName: string, + value: string | number | null | ((this: TElement, index: number, attr: string) => string | number | void | undefined)): this; + /** + * Set one or more attributes for the set of matched elements. + * + * @param attributes An object of attribute-value pairs to set. + * @see {@link https://api.jquery.com/attr/} + * @since 1.0 + */ + attr(attributes: JQuery.PlainObject): this; + /** + * Get the value of an attribute for the first element in the set of matched elements. + * + * @param attributeName The name of the attribute to get. + * @see {@link https://api.jquery.com/attr/} + * @since 1.0 + */ + attr(attributeName: string): string | undefined; + /** + * Insert content, specified by the parameter, before each element in the set of matched elements. + * + * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or + * jQuery objects to insert before each element in the set of matched elements. + * @see {@link https://api.jquery.com/before/} + * @since 1.0 + */ + before(...contents: Array | JQuery>): this; + /** + * Insert content, specified by the parameter, before each element in the set of matched elements. + * + * @param fn A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert + * before each element in the set of matched elements. Receives the index position of the element in + * the set and the old HTML value of the element as arguments. Within the function, this refers to the + * current element in the set. + * @see {@link https://api.jquery.com/before/} + * @since 1.4 + * @since 1.10 + */ + before(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + // [bind() overloads] https://github.com/jquery/api.jquery.com/issues/1048 + /** + * Attach a handler to an event for the elements. + * + * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/bind/} + * @since 1.0 + * @since 1.4.3 + * @deprecated 3.0 + */ + bind(eventType: string, eventData: TData, handler: JQuery.EventHandler): this; + /** + * Attach a handler to an event for the elements. + * + * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. + * @param handler A function to execute each time the event is triggered. + * Setting the second argument to false will attach a function that prevents the default action from + * occurring and stops the event from bubbling. + * @see {@link https://api.jquery.com/bind/} + * @since 1.0 + * @since 1.4.3 + * @deprecated 3.0 + */ + bind(eventType: string, handler: JQuery.EventHandler | false | null | undefined): this; + /** + * Attach a handler to an event for the elements. + * + * @param events An object containing one or more DOM event types and functions to execute for them. + * @see {@link https://api.jquery.com/bind/} + * @since 1.4 + * @deprecated 3.0 + */ + bind(events: JQuery.PlainObject | false>): this; + /** + * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/blur/} + * @since 1.4.3 + */ + blur(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/blur/} + * @since 1.0 + */ + blur(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/change/} + * @since 1.4.3 + */ + change(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/change/} + * @since 1.0 + */ + change(handler?: JQuery.EventHandler | false): this; + /** + * Get the children of each element in the set of matched elements, optionally filtered by a selector. + * + * @param selector A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/children/} + * @since 1.0 + */ + children(selector?: JQuery.Selector): this; + /** + * Remove from the queue all items that have not yet been run. + * + * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. + * @see {@link https://api.jquery.com/clearQueue/} + * @since 1.4 + */ + clearQueue(queueName?: string): this; + /** + * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/click/} + * @since 1.4.3 + */ + click(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/click/} + * @since 1.0 + */ + click(handler?: JQuery.EventHandler | false): this; + /** + * Create a deep copy of the set of matched elements. + * + * @param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The + * default value is false. *In jQuery 1.5.0 the default value was incorrectly true; it was changed back + * to false in 1.5.1 and up. + * @param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should + * be copied. By default its value matches the first argument's value (which defaults to false). + * @see {@link https://api.jquery.com/clone/} + * @since 1.0 + * @since 1.5 + */ + clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): this; + /** + * For each element in the set, get the first element that matches the selector by testing the element + * itself and traversing up through its ancestors in the DOM tree. + * + * @param selector A string containing a selector expression to match elements against. + * @param context A DOM element within which a matching element may be found. + * @see {@link https://api.jquery.com/closest/} + * @since 1.4 + */ + closest(selector: JQuery.Selector, context: Element): this; + /** + * For each element in the set, get the first element that matches the selector by testing the element + * itself and traversing up through its ancestors in the DOM tree. + * + * @param selector A string containing a selector expression to match elements against. + * A jQuery object to match elements against. + * An element to match elements against. + * @see {@link https://api.jquery.com/closest/} + * @since 1.3 + * @since 1.6 + */ + closest(selector: JQuery.Selector | Element | JQuery): this; + /** + * Get the children of each element in the set of matched elements, including text and comment nodes. + * + * @see {@link https://api.jquery.com/contents/} + * @since 1.2 + */ + contents(): JQuery; + /** + * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/contextmenu/} + * @since 1.4.3 + */ + contextmenu(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/contextmenu/} + * @since 1.0 + */ + contextmenu(handler?: JQuery.EventHandler | false): this; + /** + * Set one or more CSS properties for the set of matched elements. + * + * @param propertyName A CSS property name. + * @param value A value to set for the property. + * A function returning the value to set. this is the current element. Receives the index position of + * the element in the set and the old value as arguments. + * @see {@link https://api.jquery.com/css/} + * @since 1.0 + * @since 1.4 + */ + css(propertyName: string, + value: string | number | ((this: TElement, index: number, value: string) => string | number | void | undefined)): this; + /** + * Set one or more CSS properties for the set of matched elements. + * + * @param properties An object of property-value pairs to set. + * @see {@link https://api.jquery.com/css/} + * @since 1.0 + */ + css(properties: JQuery.PlainObject string | number | void | undefined)>): this; + /** + * Get the computed style properties for the first element in the set of matched elements. + * + * @param propertyName A CSS property. + * An array of one or more CSS properties. + * @see {@link https://api.jquery.com/css/} + * @since 1.0 + */ + css(propertyName: string): string; + /** + * Get the computed style properties for the first element in the set of matched elements. + * + * @param propertyNames An array of one or more CSS properties. + * @see {@link https://api.jquery.com/css/} + * @since 1.9 + */ + css(propertyNames: string[]): JQuery.PlainObject; + /** + * Return the value at the named data store for the first element in the jQuery collection, as set by + * data(name, value) or by an HTML5 data-* attribute. + * + * @param key Name of the data stored. + * @param undefined + * @see {@link https://api.jquery.com/data/} + * @since 1.2.3 + */ + data(key: string, undefined: undefined): any; // tslint:disable-line:unified-signatures + /** + * Store arbitrary data associated with the matched elements. + * + * @param key A string naming the piece of data to set. + * @param value The new data value; this can be any Javascript type except undefined. + * @see {@link https://api.jquery.com/data/} + * @since 1.2.3 + */ + data(key: string, value: any): this; + /** + * Store arbitrary data associated with the matched elements. + * + * @param obj An object of key-value pairs of data to update. + * @see {@link https://api.jquery.com/data/} + * @since 1.4.3 + */ + data(obj: JQuery.PlainObject): this; + /** + * Return the value at the named data store for the first element in the jQuery collection, as set by + * data(name, value) or by an HTML5 data-* attribute. + * + * @param key Name of the data stored. + * @see {@link https://api.jquery.com/data/} + * @since 1.2.3 + */ + data(key: string): any; + /** + * Return the value at the named data store for the first element in the jQuery collection, as set by + * data(name, value) or by an HTML5 data-* attribute. + * + * @see {@link https://api.jquery.com/data/} + * @since 1.4 + */ + data(): JQuery.PlainObject; + /** + * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/dblclick/} + * @since 1.4.3 + */ + dblclick(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/dblclick/} + * @since 1.0 + */ + dblclick(handler?: JQuery.EventHandler | false): this; + /** + * Set a timer to delay execution of subsequent items in the queue. + * + * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. + * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. + * @see {@link https://api.jquery.com/delay/} + * @since 1.4 + */ + delay(duration: JQuery.Duration, queueName?: string): this; + /** + * Attach a handler to one or more events for all elements that match the selector, now or in the + * future, based on a specific set of root elements. + * + * @param selector A selector to filter the elements that trigger the event. + * @param eventType A string containing one or more space-separated JavaScript event types, such as "click" or + * "keydown," or custom event names. + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/delegate/} + * @since 1.4.2 + * @deprecated 3.0 + */ + delegate(selector: JQuery.Selector, eventType: string, eventData: TData, handler: JQuery.EventHandler): this; + /** + * Attach a handler to one or more events for all elements that match the selector, now or in the + * future, based on a specific set of root elements. + * + * @param selector A selector to filter the elements that trigger the event. + * @param eventType A string containing one or more space-separated JavaScript event types, such as "click" or + * "keydown," or custom event names. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/delegate/} + * @since 1.4.2 + * @deprecated 3.0 + */ + delegate(selector: JQuery.Selector, eventType: string, handler: JQuery.EventHandler | false): this; + /** + * Attach a handler to one or more events for all elements that match the selector, now or in the + * future, based on a specific set of root elements. + * + * @param selector A selector to filter the elements that trigger the event. + * @param events A plain object of one or more event types and functions to execute for them. + * @see {@link https://api.jquery.com/delegate/} + * @since 1.4.3 + * @deprecated 3.0 + */ + delegate(selector: JQuery.Selector, events: JQuery.PlainObject | false>): this; + /** + * Execute the next function on the queue for the matched elements. + * + * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. + * @see {@link https://api.jquery.com/dequeue/} + * @since 1.2 + */ + dequeue(queueName?: string): this; + /** + * Remove the set of matched elements from the DOM. + * + * @param selector A selector expression that filters the set of matched elements to be removed. + * @see {@link https://api.jquery.com/detach/} + * @since 1.4 + */ + detach(selector?: JQuery.Selector): this; + /** + * Iterate over a jQuery object, executing a function for each matched element. + * + * @param fn A function to execute for each matched element. + * @see {@link https://api.jquery.com/each/} + * @since 1.0 + */ + each(fn: (this: TElement, index: number, element: TElement) => void | false): this; + /** + * Remove all child nodes of the set of matched elements from the DOM. + * + * @see {@link https://api.jquery.com/empty/} + * @since 1.0 + */ + empty(): this; + /** + * End the most recent filtering operation in the current chain and return the set of matched elements + * to its previous state. + * + * @see {@link https://api.jquery.com/end/} + * @since 1.0 + */ + end(): this; + /** + * Reduce the set of matched elements to the one at the specified index. + * + * @param index An integer indicating the 0-based position of the element. + * An integer indicating the position of the element, counting backwards from the last element in the set. + * @see {@link https://api.jquery.com/eq/} + * @since 1.1.2 + * @since 1.4 + */ + eq(index: number): this; + /** + * Merge the contents of an object onto the jQuery prototype to provide new jQuery instance methods. + * + * @param obj An object to merge onto the jQuery prototype. + * @see {@link https://api.jquery.com/jQuery.fn.extend/} + * @since 1.0 + */ + extend(obj: object): this; + /** + * Display the matched elements by fading them to opaque. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/fadeIn/} + * @since 1.4.3 + */ + fadeIn(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; + /** + * Display the matched elements by fading them to opaque. + * + * @param duration_easing A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/fadeIn/} + * @since 1.0 + * @since 1.4.3 + */ + fadeIn(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; + /** + * Display the matched elements by fading them to opaque. + * + * @param duration_easing_complete_options A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * A function to call once the animation is complete, called once per matched element. + * A map of additional options to pass to the method. + * @see {@link https://api.jquery.com/fadeIn/} + * @since 1.0 + * @since 1.4.3 + */ + fadeIn(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; + /** + * Hide the matched elements by fading them to transparent. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/fadeOut/} + * @since 1.4.3 + */ + fadeOut(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; + /** + * Hide the matched elements by fading them to transparent. + * + * @param duration_easing A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/fadeOut/} + * @since 1.0 + * @since 1.4.3 + */ + fadeOut(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; + /** + * Hide the matched elements by fading them to transparent. + * + * @param duration_easing_complete_options A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * A function to call once the animation is complete, called once per matched element. + * A map of additional options to pass to the method. + * @see {@link https://api.jquery.com/fadeOut/} + * @since 1.0 + * @since 1.4.3 + */ + fadeOut(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; + /** + * Adjust the opacity of the matched elements. + * + * @param duration A string or number determining how long the animation will run. + * @param opacity A number between 0 and 1 denoting the target opacity. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/fadeTo/} + * @since 1.4.3 + */ + fadeTo(duration: JQuery.Duration, opacity: number, easing: string, complete?: (this: TElement) => void): this; + /** + * Adjust the opacity of the matched elements. + * + * @param duration A string or number determining how long the animation will run. + * @param opacity A number between 0 and 1 denoting the target opacity. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/fadeTo/} + * @since 1.0 + */ + fadeTo(duration: JQuery.Duration, opacity: number, complete?: (this: TElement) => void): this; + /** + * Display or hide the matched elements by animating their opacity. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/fadeToggle/} + * @since 1.4.4 + */ + fadeToggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; + /** + * Display or hide the matched elements by animating their opacity. + * + * @param duration_easing A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/fadeToggle/} + * @since 1.0 + * @since 1.4.3 + */ + fadeToggle(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; + /** + * Display or hide the matched elements by animating their opacity. + * + * @param duration_easing_complete_options A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * A function to call once the animation is complete, called once per matched element. + * A map of additional options to pass to the method. + * @see {@link https://api.jquery.com/fadeToggle/} + * @since 1.0 + * @since 1.4.3 + */ + fadeToggle(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; + /** + * Reduce the set of matched elements to those that match the selector or pass the function's test. + * + * @param selector A string containing a selector expression to match the current set of elements against. + * One or more DOM elements to match the current set of elements against. + * An existing jQuery object to match the current set of elements against. + * A function used as a test for each element in the set. this is the current DOM element. + * @see {@link https://api.jquery.com/filter/} + * @since 1.0 + * @since 1.4 + */ + filter(selector: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean)): this; + /** + * Get the descendants of each element in the current set of matched elements, filtered by a selector, + * jQuery object, or element. + * + * @param selector A string containing a selector expression to match elements against. + * An element or a jQuery object to match elements against. + * @see {@link https://api.jquery.com/find/} + * @since 1.0 + * @since 1.6 + */ + find(selector: JQuery.Selector | Element | JQuery): this; + /** + * Stop the currently-running animation, remove all queued animations, and complete all animations for + * the matched elements. + * + * @param queue The name of the queue in which to stop animations. + * @see {@link https://api.jquery.com/finish/} + * @since 1.9 + */ + finish(queue?: string): this; + /** + * Reduce the set of matched elements to the first in the set. + * + * @see {@link https://api.jquery.com/first/} + * @since 1.4 + */ + first(): this; + /** + * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/focus/} + * @since 1.4.3 + */ + focus(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/focus/} + * @since 1.0 + */ + focus(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "focusin" event. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/focusin/} + * @since 1.4.3 + */ + focusin(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "focusin" event. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/focusin/} + * @since 1.4 + */ + focusin(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "focusout" JavaScript event. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/focusout/} + * @since 1.4.3 + */ + focusout(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "focusout" JavaScript event. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/focusout/} + * @since 1.4 + */ + focusout(handler?: JQuery.EventHandler | false): this; + /** + * Retrieve one of the elements matched by the jQuery object. + * + * @param index A zero-based integer indicating which element to retrieve. + * @see {@link https://api.jquery.com/get/} + * @since 1.0 + */ + get(index: number): TElement; + /** + * Retrieve the elements matched by the jQuery object. + * + * @see {@link https://api.jquery.com/get/} + * @since 1.0 + */ + get(): TElement[]; + /** + * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. + * + * @param selector A string containing a selector expression to match elements against. + * A DOM element to match elements against. + * @see {@link https://api.jquery.com/has/} + * @since 1.4 + */ + has(selector: string | Element): this; + /** + * Determine whether any of the matched elements are assigned the given class. + * + * @param className The class name to search for. + * @see {@link https://api.jquery.com/hasClass/} + * @since 1.2 + */ + hasClass(className: string): boolean; + /** + * Set the CSS height of every matched element. + * + * @param value An integer representing the number of pixels, or an integer with an optional unit of measure + * appended (as a string). + * A function returning the height to set. Receives the index position of the element in the set and + * the old height as arguments. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/height/} + * @since 1.0 + * @since 1.4.1 + */ + height(value: string | number | ((this: TElement, index: number, height: number) => string | number)): this; + /** + * Get the current computed height for the first element in the set of matched elements. + * + * @see {@link https://api.jquery.com/height/} + * @since 1.0 + */ + height(): number | undefined; + /** + * Hide the matched elements. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/hide/} + * @since 1.4.3 + */ + hide(duration: JQuery.Duration, easing: string, complete: (this: TElement) => void): this; + /** + * Hide the matched elements. + * + * @param duration A string or number determining how long the animation will run. + * @param easing_complete A string indicating which easing function to use for the transition. + * A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/hide/} + * @since 1.0 + * @since 1.4.3 + */ + hide(duration: JQuery.Duration, easing_complete: string | ((this: TElement) => void)): this; + /** + * Hide the matched elements. + * + * @param duration_complete_options A string or number determining how long the animation will run. + * A function to call once the animation is complete, called once per matched element. + * A map of additional options to pass to the method. + * @see {@link https://api.jquery.com/hide/} + * @since 1.0 + */ + hide(duration_complete_options?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions): this; + /** + * Bind one or two handlers to the matched elements, to be executed when the mouse pointer enters and + * leaves the elements. + * + * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. + * @param handlerOut A function to execute when the mouse pointer leaves the element. + * @see {@link https://api.jquery.com/hover/} + * @since 1.0 + * @since 1.4 + */ + hover(handlerInOut: JQuery.EventHandler | false, handlerOut?: JQuery.EventHandler | false): this; + /** + * Set the HTML contents of each element in the set of matched elements. + * + * @param htmlString A string of HTML to set as the content of each matched element. + * A function returning the HTML content to set. Receives the index position of the element in the set + * and the old HTML value as arguments. jQuery empties the element before calling the function; use the + * oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/html/} + * @since 1.0 + * @since 1.4 + */ + html(htmlString: JQuery.htmlString | ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString)): this; + /** + * Get the HTML contents of the first element in the set of matched elements. + * + * @see {@link https://api.jquery.com/html/} + * @since 1.0 + */ + html(): string; + /** + * Search for a given element from among the matched elements. + * + * @param element The DOM element or first element within the jQuery object to look for. + * A selector representing a jQuery collection in which to look for an element. + * @see {@link https://api.jquery.com/index/} + * @since 1.0 + * @since 1.4 + */ + index(element?: JQuery.Selector | Element | JQuery): number; + /** + * Set the CSS inner height of each element in the set of matched elements. + * + * @param value A number representing the number of pixels, or a number along with an optional unit of measure + * appended (as a string). + * A function returning the inner height (including padding but not border) to set. Receives the index + * position of the element in the set and the old inner height as arguments. Within the function, this + * refers to the current element in the set. + * @see {@link https://api.jquery.com/innerHeight/} + * @since 1.8.0 + */ + innerHeight(value: string | number | ((this: TElement, index: number, height: number) => string | number)): this; + /** + * Get the current computed height for the first element in the set of matched elements, including + * padding but not border. + * + * @see {@link https://api.jquery.com/innerHeight/} + * @since 1.2.6 + */ + innerHeight(): number | undefined; + /** + * Set the CSS inner width of each element in the set of matched elements. + * + * @param value A number representing the number of pixels, or a number along with an optional unit of measure + * appended (as a string). + * A function returning the inner width (including padding but not border) to set. Receives the index + * position of the element in the set and the old inner width as arguments. Within the function, this + * refers to the current element in the set. + * @see {@link https://api.jquery.com/innerWidth/} + * @since 1.8.0 + */ + innerWidth(value: string | number | ((this: TElement, index: number, width: number) => string | number)): this; + /** + * Get the current computed inner width for the first element in the set of matched elements, including + * padding but not border. + * + * @see {@link https://api.jquery.com/innerWidth/} + * @since 1.2.6 + */ + innerWidth(): number | undefined; + /** + * Insert every element in the set of matched elements after the target. + * + * @param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements + * will be inserted after the element(s) specified by this parameter. + * @see {@link https://api.jquery.com/insertAfter/} + * @since 1.0 + */ + insertAfter(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + /** + * Insert every element in the set of matched elements before the target. + * + * @param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements + * will be inserted before the element(s) specified by this parameter. + * @see {@link https://api.jquery.com/insertBefore/} + * @since 1.0 + */ + insertBefore(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + /** + * Check the current matched set of elements against a selector, element, or jQuery object and return + * true if at least one of these elements matches the given arguments. + * + * @param selector A string containing a selector expression to match elements against. + * A function used as a test for every element in the set. It accepts two arguments, index, which is + * the element's index in the jQuery collection, and element, which is the DOM element. Within the + * function, this refers to the current DOM element. + * An existing jQuery object to match the current set of elements against. + * One or more elements to match the current set of elements against. + * @see {@link https://api.jquery.com/is/} + * @since 1.0 + * @since 1.6 + */ + is(selector: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean)): boolean; + /** + * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/keydown/} + * @since 1.4.3 + */ + keydown(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/keydown/} + * @since 1.0 + */ + keydown(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/keypress/} + * @since 1.4.3 + */ + keypress(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/keypress/} + * @since 1.0 + */ + keypress(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/keyup/} + * @since 1.4.3 + */ + keyup(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/keyup/} + * @since 1.0 + */ + keyup(handler?: JQuery.EventHandler | false): this; + /** + * Reduce the set of matched elements to the final one in the set. + * + * @see {@link https://api.jquery.com/last/} + * @since 1.4 + */ + last(): this; + /** + * Load data from the server and place the returned HTML into the matched element. + * + * @param url A string containing the URL to which the request is sent. + * @param data A plain object or string that is sent to the server with the request. + * @param complete A callback function that is executed when the request completes. + * @see {@link https://api.jquery.com/load/} + * @since 1.0 + */ + load(url: string, + data: string | JQuery.PlainObject, + complete: (this: TElement, responseText: string, textStatus: JQuery.Ajax.TextStatus, jqXHR: JQuery.jqXHR) => void): this; + /** + * Load data from the server and place the returned HTML into the matched element. + * + * @param url A string containing the URL to which the request is sent. + * @param complete_data A callback function that is executed when the request completes. + * A plain object or string that is sent to the server with the request. + * @see {@link https://api.jquery.com/load/} + * @since 1.0 + */ + load(url: string, + complete_data?: ((this: TElement, responseText: string, textStatus: JQuery.Ajax.TextStatus, jqXHR: JQuery.jqXHR) => void) | string | JQuery.PlainObject): this; + /** + * Pass each element in the current matched set through a function, producing a new jQuery object + * containing the return values. + * + * @param callback A function object that will be invoked for each element in the current set. + * @see {@link https://api.jquery.com/map/} + * @since 1.2 + */ + map(callback: (this: TElement, index: number, domElement: TElement) => any | any[] | null | undefined): this; + /** + * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mousedown/} + * @since 1.4.3 + */ + mousedown(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mousedown/} + * @since 1.0 + */ + mousedown(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseenter/} + * @since 1.4.3 + */ + mouseenter(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseenter/} + * @since 1.0 + */ + mouseenter(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseleave/} + * @since 1.4.3 + */ + mouseleave(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseleave/} + * @since 1.0 + */ + mouseleave(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mousemove/} + * @since 1.4.3 + */ + mousemove(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mousemove/} + * @since 1.0 + */ + mousemove(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseout/} + * @since 1.4.3 + */ + mouseout(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseout/} + * @since 1.0 + */ + mouseout(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseover/} + * @since 1.4.3 + */ + mouseover(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseover/} + * @since 1.0 + */ + mouseover(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseup/} + * @since 1.4.3 + */ + mouseup(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/mouseup/} + * @since 1.0 + */ + mouseup(handler?: JQuery.EventHandler | false): this; + /** + * Get the immediately following sibling of each element in the set of matched elements. If a selector + * is provided, it retrieves the next sibling only if it matches that selector. + * + * @param selector A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/next/} + * @since 1.0 + */ + next(selector?: JQuery.Selector): this; + /** + * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. + * + * @param selector A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/nextAll/} + * @since 1.2 + */ + nextAll(selector?: string): this; + /** + * Get all following siblings of each element up to but not including the element matched by the + * selector, DOM node, or jQuery object passed. + * + * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements. + * A DOM node or jQuery object indicating where to stop matching following sibling elements. + * @param filter A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/nextUntil/} + * @since 1.4 + * @since 1.6 + */ + nextUntil(selector?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; + /** + * Remove elements from the set of matched elements. + * + * @param selector A string containing a selector expression, a DOM element, or an array of elements to match against the set. + * A function used as a test for each element in the set. It accepts two arguments, index, which is the + * element's index in the jQuery collection, and element, which is the DOM element. Within the + * function, this refers to the current DOM element. + * An existing jQuery object to match the current set of elements against. + * @see {@link https://api.jquery.com/not/} + * @since 1.0 + * @since 1.4 + */ + not(selector: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean)): this; + /** + * Remove an event handler. + * + * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as + * "click", "keydown.myPlugin", or ".myPlugin". + * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/off/} + * @since 1.7 + */ + off(events: string, selector: JQuery.Selector, handler: JQuery.EventHandler | false): this; + /** + * Remove an event handler. + * + * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as + * "click", "keydown.myPlugin", or ".myPlugin". + * @param selector_handler A selector which should match the one originally passed to .on() when attaching event handlers. + * A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/off/} + * @since 1.7 + */ + off(events: string, selector_handler?: JQuery.Selector | JQuery.EventHandler | false): this; + /** + * Remove an event handler. + * + * @param events An object where the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent handler functions previously attached for the event(s). + * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. + * @see {@link https://api.jquery.com/off/} + * @since 1.7 + */ + off(events: JQuery.PlainObject | false>, selector?: JQuery.Selector): this; + /** + * Remove an event handler. + * + * @param event A jQuery.Event object. + * @see {@link https://api.jquery.com/off/} + * @since 1.7 + */ + off(event?: JQuery.Event): this; + /** + * Set the current coordinates of every element in the set of matched elements, relative to the document. + * + * @param coordinates An object containing the properties top and left, which are numbers indicating the new top and left + * coordinates for the elements. + * A function to return the coordinates to set. Receives the index of the element in the collection as + * the first argument and the current coordinates as the second argument. The function should return an + * object with the new top and left properties. + * @see {@link https://api.jquery.com/offset/} + * @since 1.4 + */ + offset(coordinates: JQuery.Coordinates | ((this: TElement, index: number, coords: JQuery.Coordinates) => JQuery.Coordinates)): this; + /** + * Get the current coordinates of the first element in the set of matched elements, relative to the document. + * + * @see {@link https://api.jquery.com/offset/} + * @since 1.2 + */ + offset(): JQuery.Coordinates | undefined; + /** + * Get the closest ancestor element that is positioned. + * + * @see {@link https://api.jquery.com/offsetParent/} + * @since 1.2.6 + */ + offsetParent(): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the + * selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: string, selector: JQuery.Selector | null, data: TData, handler: JQuery.EventHandler): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the + * selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand + * for a function that simply does return false. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: string, selector: JQuery.Selector | null, handler: JQuery.EventHandler | false): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: string, data: TData, handler: JQuery.EventHandler): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand + * for a function that simply does return false. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: string, handler: JQuery.EventHandler | false): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If + * the selector is null or omitted, the handler is always called when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: JQuery.PlainObject | false>, selector: JQuery.Selector | null, data: TData): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If + * the selector is null or omitted, the handler is always called when it reaches the selected element. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: JQuery.PlainObject | false>, selector: JQuery.Selector): this; // tslint:disable-line:unified-signatures + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: JQuery.PlainObject | false>, data: TData): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: JQuery.PlainObject | false>): this; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the + * selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. + * @see {@link https://api.jquery.com/one/} + * @since 1.7 + */ + one(events: string, selector: JQuery.Selector | null, data: TData, handler: JQuery.EventHandler): this; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the + * selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand + * for a function that simply does return false. + * @see {@link https://api.jquery.com/one/} + * @since 1.7 + */ + one(events: string, selector: JQuery.Selector | null, handler: JQuery.EventHandler | false): this; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. + * @see {@link https://api.jquery.com/one/} + * @since 1.7 + */ + one(events: string, data: TData, handler: JQuery.EventHandler): this; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand + * for a function that simply does return false. + * @see {@link https://api.jquery.com/one/} + * @since 1.7 + */ + one(events: string, handler: JQuery.EventHandler | false): this; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If + * the selector is null or omitted, the handler is always called when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see {@link https://api.jquery.com/one/} + * @since 1.7 + */ + one(events: JQuery.PlainObject | false>, selector: JQuery.Selector | null, data: TData): this; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If + * the selector is null or omitted, the handler is always called when it reaches the selected element. + * @see {@link https://api.jquery.com/one/} + * @since 1.7 + */ + one(events: JQuery.PlainObject | false>, selector: JQuery.Selector): this; // tslint:disable-line:unified-signatures + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see {@link https://api.jquery.com/one/} + * @since 1.7 + */ + one(events: JQuery.PlainObject | false>, data: TData): this; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @see {@link https://api.jquery.com/one/} + * @since 1.7 + */ + one(events: JQuery.PlainObject | false>): this; + /** + * Set the CSS outer height of each element in the set of matched elements. + * + * @param value A number representing the number of pixels, or a number along with an optional unit of measure + * appended (as a string). + * @see {@link https://api.jquery.com/outerHeight/} + * @since 1.8.0 + */ + outerHeight(value: string | number | ((this: TElement, index: number, height: number) => string | number)): this; + /** + * Get the current computed outer height (including padding, border, and optionally margin) for the + * first element in the set of matched elements. + * + * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. + * @see {@link https://api.jquery.com/outerHeight/} + * @since 1.2.6 + */ + outerHeight(includeMargin?: boolean): number | undefined; + /** + * Set the CSS outer width of each element in the set of matched elements. + * + * @param value A number representing the number of pixels, or a number along with an optional unit of measure + * appended (as a string). + * A function returning the outer width to set. Receives the index position of the element in the set + * and the old outer width as arguments. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/outerWidth/} + * @since 1.8.0 + */ + outerWidth(value: string | number | ((this: TElement, index: number, width: number) => string | number)): this; + /** + * Get the current computed outer width (including padding, border, and optionally margin) for the + * first element in the set of matched elements. + * + * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. + * @see {@link https://api.jquery.com/outerWidth/} + * @since 1.2.6 + */ + outerWidth(includeMargin?: boolean): number | undefined; + /** + * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. + * + * @param selector A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/parent/} + * @since 1.0 + */ + parent(selector?: JQuery.Selector): this; + /** + * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. + * + * @param selector A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/parents/} + * @since 1.0 + */ + parents(selector?: JQuery.Selector): this; + /** + * Get the ancestors of each element in the current set of matched elements, up to but not including + * the element matched by the selector, DOM node, or jQuery object. + * + * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements. + * A DOM node or jQuery object indicating where to stop matching ancestor elements. + * @param filter A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/parentsUntil/} + * @since 1.4 + * @since 1.6 + */ + parentsUntil(selector?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; + /** + * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent. + * + * @see {@link https://api.jquery.com/position/} + * @since 1.2 + */ + position(): JQuery.Coordinates; + /** + * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. + * + * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or + * jQuery objects to insert at the beginning of each element in the set of matched elements. + * @see {@link https://api.jquery.com/prepend/} + * @since 1.0 + */ + prepend(...contents: Array | JQuery>): this; + /** + * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. + * + * @param fn A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at + * the beginning of each element in the set of matched elements. Receives the index position of the + * element in the set and the old HTML value of the element as arguments. Within the function, this + * refers to the current element in the set. + * @see {@link https://api.jquery.com/prepend/} + * @since 1.4 + */ + prepend(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + /** + * Insert every element in the set of matched elements to the beginning of the target. + * + * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements + * will be inserted at the beginning of the element(s) specified by this parameter. + * @see {@link https://api.jquery.com/prependTo/} + * @since 1.0 + */ + prependTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + /** + * Get the immediately preceding sibling of each element in the set of matched elements. If a selector + * is provided, it retrieves the previous sibling only if it matches that selector. + * + * @param selector A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/prev/} + * @since 1.0 + */ + prev(selector?: JQuery.Selector): this; + /** + * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector. + * + * @param selector A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/prevAll/} + * @since 1.2 + */ + prevAll(selector?: JQuery.Selector): this; + /** + * Get all preceding siblings of each element up to but not including the element matched by the + * selector, DOM node, or jQuery object. + * + * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements. + * A DOM node or jQuery object indicating where to stop matching preceding sibling elements. + * @param filter A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/prevUntil/} + * @since 1.4 + * @since 1.6 + */ + prevUntil(selector?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; + /** + * Return a Promise object to observe when all actions of a certain type bound to the collection, + * queued or not, have finished. + * + * @param type The type of queue that needs to be observed. + * @param target Object onto which the promise methods have to be attached + * @see {@link https://api.jquery.com/promise/} + * @since 1.6 + */ + promise(type: string, target: T): T & JQuery.Promise; + /** + * Return a Promise object to observe when all actions of a certain type bound to the collection, + * queued or not, have finished. + * + * @param target Object onto which the promise methods have to be attached + * @see {@link https://api.jquery.com/promise/} + * @since 1.6 + */ + promise(target: T): T & JQuery.Promise; + /** + * Return a Promise object to observe when all actions of a certain type bound to the collection, + * queued or not, have finished. + * + * @param type The type of queue that needs to be observed. + * @see {@link https://api.jquery.com/promise/} + * @since 1.6 + */ + promise(type?: string): JQuery.Promise; + /** + * Set one or more properties for the set of matched elements. + * + * @param propertyName The name of the property to set. + * @param value A function returning the value to set. Receives the index position of the element in the set and the + * old property value as arguments. Within the function, the keyword this refers to the current element. + * @see {@link https://api.jquery.com/prop/} + * @since 1.6 + */ + prop(propertyName: string, value: (this: TElement, index: number, oldPropertyValue: any) => any): this; + /** + * Set one or more properties for the set of matched elements. + * + * @param propertyName The name of the property to set. + * @param value A value to set for the property. + * @see {@link https://api.jquery.com/prop/} + * @since 1.6 + */ + prop(propertyName: string, value: any): this; // tslint:disable-line:unified-signatures + /** + * Set one or more properties for the set of matched elements. + * + * @param properties An object of property-value pairs to set. + * @see {@link https://api.jquery.com/prop/} + * @since 1.6 + */ + prop(properties: JQuery.PlainObject): this; + /** + * Get the value of a property for the first element in the set of matched elements. + * + * @param propertyName The name of the property to get. + * @see {@link https://api.jquery.com/prop/} + * @since 1.6 + */ + prop(propertyName: string): any | undefined; + /** + * Add a collection of DOM elements onto the jQuery stack. + * + * @param elements An array of elements to push onto the stack and make into a new jQuery object. + * @param name The name of a jQuery method that generated the array of elements. + * @param args The arguments that were passed in to the jQuery method (for serialization). + * @see {@link https://api.jquery.com/pushStack/} + * @since 1.3 + */ + pushStack(elements: ArrayLike, name: string, args: any[]): this; + /** + * Add a collection of DOM elements onto the jQuery stack. + * + * @param elements An array of elements to push onto the stack and make into a new jQuery object. + * @see {@link https://api.jquery.com/pushStack/} + * @since 1.0 + */ + pushStack(elements: ArrayLike): this; + /** + * Manipulate the queue of functions to be executed, once for each matched element. + * + * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. + * @param newQueue The new function to add to the queue, with a function to call that will dequeue the next item. + * An array of functions to replace the current queue contents. + * @see {@link https://api.jquery.com/queue/} + * @since 1.2 + */ + queue(queueName: string, newQueue: JQuery.TypeOrArray>): this; + /** + * Manipulate the queue of functions to be executed, once for each matched element. + * + * @param newQueue The new function to add to the queue, with a function to call that will dequeue the next item. + * An array of functions to replace the current queue contents. + * @see {@link https://api.jquery.com/queue/} + * @since 1.2 + */ + queue(newQueue: JQuery.TypeOrArray>): this; + /** + * Show the queue of functions to be executed on the matched elements. + * + * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. + * @see {@link https://api.jquery.com/queue/} + * @since 1.2 + */ + queue(queueName?: string): JQuery.Queue; + /** + * Specify a function to execute when the DOM is fully loaded. + * + * @param handler A function to execute after the DOM is ready. + * @see {@link https://api.jquery.com/ready/} + * @since 1.0 + * @deprecated 3.0 + */ + ready(handler: ($: JQueryStatic) => void): this; + /** + * Remove the set of matched elements from the DOM. + * + * @param selector A selector expression that filters the set of matched elements to be removed. + * @see {@link https://api.jquery.com/remove/} + * @since 1.0 + */ + remove(selector?: string): this; + /** + * Remove an attribute from each element in the set of matched elements. + * + * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. + * @see {@link https://api.jquery.com/removeAttr/} + * @since 1.0 + */ + removeAttr(attributeName: string): this; + /** + * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. + * + * @param className One or more space-separated classes to be removed from the class attribute of each matched element. + * A function returning one or more space-separated class names to be removed. Receives the index + * position of the element in the set and the old class value as arguments. + * @see {@link https://api.jquery.com/removeClass/} + * @since 1.0 + * @since 1.4 + */ + removeClass(className?: string | ((this: TElement, index: number, className: string) => string)): this; + /** + * Remove a previously-stored piece of data. + * + * @param name A string naming the piece of data to delete. + * An array or space-separated string naming the pieces of data to delete. + * @see {@link https://api.jquery.com/removeData/} + * @since 1.2.3 + * @since 1.7 + */ + removeData(name?: JQuery.TypeOrArray): this; + /** + * Remove a property for the set of matched elements. + * + * @param propertyName The name of the property to remove. + * @see {@link https://api.jquery.com/removeProp/} + * @since 1.6 + */ + removeProp(propertyName: string): this; + /** + * Replace each target element with the set of matched elements. + * + * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. + * @see {@link https://api.jquery.com/replaceAll/} + * @since 1.2 + */ + replaceAll(target: JQuery.Selector | JQuery | JQuery.TypeOrArray): this; + /** + * Replace each element in the set of matched elements with the provided new content and return the set + * of elements that was removed. + * + * @param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. + * A function that returns content with which to replace the set of matched elements. + * @see {@link https://api.jquery.com/replaceWith/} + * @since 1.2 + * @since 1.4 + */ + replaceWith(newContent: JQuery.htmlString | JQuery | JQuery.TypeOrArray | ((this: TElement) => any)): this; + /** + * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/resize/} + * @since 1.4.3 + */ + resize(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/resize/} + * @since 1.0 + */ + resize(handler?: JQuery.EventHandler | false): this; + /** + * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/scroll/} + * @since 1.4.3 + */ + scroll(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/scroll/} + * @since 1.0 + */ + scroll(handler?: JQuery.EventHandler | false): this; + /** + * Set the current horizontal position of the scroll bar for each of the set of matched elements. + * + * @param value An integer indicating the new position to set the scroll bar to. + * @see {@link https://api.jquery.com/scrollLeft/} + * @since 1.2.6 + */ + scrollLeft(value: number): this; + /** + * Get the current horizontal position of the scroll bar for the first element in the set of matched elements. + * + * @see {@link https://api.jquery.com/scrollLeft/} + * @since 1.2.6 + */ + scrollLeft(): number; + /** + * Set the current vertical position of the scroll bar for each of the set of matched elements. + * + * @param value A number indicating the new position to set the scroll bar to. + * @see {@link https://api.jquery.com/scrollTop/} + * @since 1.2.6 + */ + scrollTop(value: number): this; + /** + * Get the current vertical position of the scroll bar for the first element in the set of matched + * elements or set the vertical position of the scroll bar for every matched element. + * + * @see {@link https://api.jquery.com/scrollTop/} + * @since 1.2.6 + */ + scrollTop(): number; + /** + * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/select/} + * @since 1.4.3 + */ + select(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/select/} + * @since 1.0 + */ + select(handler?: JQuery.EventHandler | false): this; + /** + * Encode a set of form elements as a string for submission. + * + * @see {@link https://api.jquery.com/serialize/} + * @since 1.0 + */ + serialize(): string; + /** + * Encode a set of form elements as an array of names and values. + * + * @see {@link https://api.jquery.com/serializeArray/} + * @since 1.2 + */ + serializeArray(): JQuery.NameValuePair[]; + /** + * Display the matched elements. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/show/} + * @since 1.4.3 + */ + show(duration: JQuery.Duration, easing: string, complete: (this: TElement) => void): this; + /** + * Display the matched elements. + * + * @param duration A string or number determining how long the animation will run. + * @param easing_complete A string indicating which easing function to use for the transition. + * A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/show/} + * @since 1.0 + * @since 1.4.3 + */ + show(duration: JQuery.Duration, easing_complete: string | ((this: TElement) => void)): this; + /** + * Display the matched elements. + * + * @param duration_complete_options A string or number determining how long the animation will run. + * A function to call once the animation is complete, called once per matched element. + * A map of additional options to pass to the method. + * @see {@link https://api.jquery.com/show/} + * @since 1.0 + */ + show(duration_complete_options?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions): this; + /** + * Get the siblings of each element in the set of matched elements, optionally filtered by a selector. + * + * @param selector A string containing a selector expression to match elements against. + * @see {@link https://api.jquery.com/siblings/} + * @since 1.0 + */ + siblings(selector?: JQuery.Selector): this; + /** + * Reduce the set of matched elements to a subset specified by a range of indices. + * + * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, + * it indicates an offset from the end of the set. + * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, + * it indicates an offset from the end of the set. If omitted, the range continues until the end of the set. + * @see {@link https://api.jquery.com/slice/} + * @since 1.1.4 + */ + slice(start: number, end?: number): this; + /** + * Display the matched elements with a sliding motion. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/slideDown/} + * @since 1.4.3 + */ + slideDown(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; + /** + * Display the matched elements with a sliding motion. + * + * @param duration_easing A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/slideDown/} + * @since 1.0 + * @since 1.4.3 + */ + slideDown(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; + /** + * Display the matched elements with a sliding motion. + * + * @param duration_easing_complete_options A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * A function to call once the animation is complete, called once per matched element. + * A map of additional options to pass to the method. + * @see {@link https://api.jquery.com/slideDown/} + * @since 1.0 + * @since 1.4.3 + */ + slideDown(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; + /** + * Display or hide the matched elements with a sliding motion. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/slideToggle/} + * @since 1.4.3 + */ + slideToggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; + /** + * Display or hide the matched elements with a sliding motion. + * + * @param duration_easing A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/slideToggle/} + * @since 1.0 + * @since 1.4.3 + */ + slideToggle(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; + /** + * Display or hide the matched elements with a sliding motion. + * + * @param duration_easing_complete_options A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * A function to call once the animation is complete, called once per matched element. + * A map of additional options to pass to the method. + * @see {@link https://api.jquery.com/slideToggle/} + * @since 1.0 + * @since 1.4.3 + */ + slideToggle(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; + /** + * Hide the matched elements with a sliding motion. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/slideUp/} + * @since 1.4.3 + */ + slideUp(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; + /** + * Hide the matched elements with a sliding motion. + * + * @param duration_easing A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/slideUp/} + * @since 1.0 + * @since 1.4.3 + */ + slideUp(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; + /** + * Hide the matched elements with a sliding motion. + * + * @param duration_easing_complete_options A string or number determining how long the animation will run. + * A string indicating which easing function to use for the transition. + * A function to call once the animation is complete, called once per matched element. + * A map of additional options to pass to the method. + * @see {@link https://api.jquery.com/slideUp/} + * @since 1.0 + * @since 1.4.3 + */ + slideUp(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; + /** + * Stop the currently-running animation on the matched elements. + * + * @param queue The name of the queue in which to stop animations. + * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. + * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. + * @see {@link https://api.jquery.com/stop/} + * @since 1.7 + */ + stop(queue: string, clearQueue?: boolean, jumpToEnd?: boolean): this; + /** + * Stop the currently-running animation on the matched elements. + * + * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. + * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. + * @see {@link https://api.jquery.com/stop/} + * @since 1.2 + */ + stop(clearQueue?: boolean, jumpToEnd?: boolean): this; + /** + * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. + * + * @param eventData An object containing data that will be passed to the event handler. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/submit/} + * @since 1.4.3 + */ + submit(eventData: TData, handler: JQuery.EventHandler): this; + /** + * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. + * + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/submit/} + * @since 1.0 + */ + submit(handler?: JQuery.EventHandler | false): this; + /** + * Set the content of each element in the set of matched elements to the specified text. + * + * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will + * be converted to a String representation. + * A function returning the text content to set. Receives the index position of the element in the set + * and the old text value as arguments. + * @see {@link https://api.jquery.com/text/} + * @since 1.0 + * @since 1.4 + */ + text(text: string | number | boolean | ((this: TElement, index: number, text: string) => string | number | boolean)): this; + /** + * Get the combined text contents of each element in the set of matched elements, including their descendants. + * + * @see {@link https://api.jquery.com/text/} + * @since 1.0 + */ + text(): string; + /** + * Retrieve all the elements contained in the jQuery set, as an array. + * + * @see {@link https://api.jquery.com/toArray/} + * @since 1.4 + */ + toArray(): TElement[]; + /** + * Display or hide the matched elements. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/toggle/} + * @since 1.4.3 + */ + toggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; + /** + * Display or hide the matched elements. + * + * @param duration A string or number determining how long the animation will run. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/toggle/} + * @since 1.0 + */ + toggle(duration: JQuery.Duration, complete: (this: TElement) => void): this; + /** + * Display or hide the matched elements. + * + * @param duration_complete_options_display A string or number determining how long the animation will run. + * A function to call once the animation is complete, called once per matched element. + * A map of additional options to pass to the method. + * Use true to show the element or false to hide it. + * @see {@link https://api.jquery.com/toggle/} + * @since 1.0 + * @since 1.3 + */ + toggle(duration_complete_options_display?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions | boolean): this; + /** + * Add or remove one or more classes from each element in the set of matched elements, depending on + * either the class's presence or the value of the state argument. + * + * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set. + * A function that returns class names to be toggled in the class attribute of each element in the + * matched set. Receives the index position of the element in the set, the old class value, and the state as arguments. + * @param state A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. + * @see {@link https://api.jquery.com/toggleClass/} + * @since 1.0 + * @since 1.3 + * @since 1.4 + */ + toggleClass(className: string | ((this: TElement, index: number, className: string, state: TState) => string), + state?: TState): this; + /** + * Add or remove one or more classes from each element in the set of matched elements, depending on + * either the class's presence or the value of the state argument. + * + * @param state A boolean value to determine whether the class should be added or removed. + * @see {@link https://api.jquery.com/toggleClass/} + * @since 1.4 + * @deprecated 3.0 + */ + toggleClass(state?: boolean): this; + /** + * Execute all handlers and behaviors attached to the matched elements for the given event type. + * + * @param eventType A string containing a JavaScript event type, such as click or submit. + * A jQuery.Event object. + * @param extraParameters Additional parameters to pass along to the event handler. + * @see {@link https://api.jquery.com/trigger/} + * @since 1.0 + * @since 1.3 + */ + trigger(eventType: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number): this; + /** + * Execute all handlers attached to an element for an event. + * + * @param eventType A string containing a JavaScript event type, such as click or submit. + * A jQuery.Event object. + * @param extraParameters Additional parameters to pass along to the event handler. + * @see {@link https://api.jquery.com/triggerHandler/} + * @since 1.2 + * @since 1.3 + */ + triggerHandler(eventType: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number): undefined | any; + /** + * Remove a previously-attached event handler from the elements. + * + * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/unbind/} + * @since 1.0 + * @since 1.4.3 + * @deprecated 3.0 + */ + unbind(event: string, handler: JQuery.EventHandler | false): this; + /** + * Remove a previously-attached event handler from the elements. + * + * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. + * A jQuery.Event object. + * @see {@link https://api.jquery.com/unbind/} + * @since 1.0 + * @deprecated 3.0 + */ + unbind(event?: string | JQuery.Event): this; + /** + * Remove a handler from the event for all elements which match the current selector, based upon a + * specific set of root elements. + * + * @param selector A selector which will be used to filter the event results. + * @param eventType A string containing a JavaScript event type, such as "click" or "keydown" + * @param handler A function to execute each time the event is triggered. + * @see {@link https://api.jquery.com/undelegate/} + * @since 1.4.2 + * @deprecated 3.0 + */ + undelegate(selector: JQuery.Selector, eventType: string, handler: JQuery.EventHandler | false): this; + /** + * Remove a handler from the event for all elements which match the current selector, based upon a + * specific set of root elements. + * + * @param selector A selector which will be used to filter the event results. + * @param eventTypes A string containing a JavaScript event type, such as "click" or "keydown" + * An object of one or more event types and previously bound functions to unbind from them. + * @see {@link https://api.jquery.com/undelegate/} + * @since 1.4.2 + * @since 1.4.3 + * @deprecated 3.0 + */ + undelegate(selector: JQuery.Selector, eventTypes: string | JQuery.PlainObject | false>): this; + /** + * Remove a handler from the event for all elements which match the current selector, based upon a + * specific set of root elements. + * + * @param namespace A selector which will be used to filter the event results. + * @see {@link https://api.jquery.com/undelegate/} + * @since 1.4.2 + * @since 1.6 + * @deprecated 3.0 + */ + undelegate(namespace?: string): this; + /** + * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. + * + * @param selector A selector to check the parent element against. If an element's parent does not match the selector, + * the element won't be unwrapped. + * @see {@link https://api.jquery.com/unwrap/} + * @since 1.4 + * @since 3.0 + */ + unwrap(selector?: string): this; + /** + * Set the value of each element in the set of matched elements. + * + * @param value A string of text, a number, or an array of strings corresponding to the value of each matched + * element to set as selected/checked. + * A function returning the value to set. this is the current element. Receives the index position of + * the element in the set and the old value as arguments. + * @see {@link https://api.jquery.com/val/} + * @since 1.0 + * @since 1.4 + */ + val(value: string | number | string[] | ((this: TElement, index: number, value: string) => string)): this; + /** + * Get the current value of the first element in the set of matched elements. + * + * @see {@link https://api.jquery.com/val/} + * @since 1.0 + */ + val(): string | number | string[] | undefined; + /** + * Set the CSS width of each element in the set of matched elements. + * + * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure + * appended (as a string). + * A function returning the width to set. Receives the index position of the element in the set and the + * old width as arguments. Within the function, this refers to the current element in the set. + * @see {@link https://api.jquery.com/width/} + * @since 1.0 + * @since 1.4.1 + */ + width(value: string | number | ((this: TElement, index: number, value: number) => string | number)): this; + /** + * Get the current computed width for the first element in the set of matched elements. + * + * @see {@link https://api.jquery.com/width/} + * @since 1.0 + */ + width(): number | undefined; + /** + * Wrap an HTML structure around each element in the set of matched elements. + * + * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the + * matched elements. When you pass a jQuery collection containing more than one element, or a selector + * matching more than one element, the first element will be used. + * A callback function returning the HTML content or jQuery object to wrap around the matched elements. + * Receives the index position of the element in the set as an argument. Within the function, this + * refers to the current element in the set. + * @see {@link https://api.jquery.com/wrap/} + * @since 1.0 + * @since 1.4 + */ + wrap(wrappingElement: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement, index: number) => string | JQuery)): this; + /** + * Wrap an HTML structure around all elements in the set of matched elements. + * + * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. + * A callback function returning the HTML content or jQuery object to wrap around all the matched + * elements. Within the function, this refers to the first element in the set. Prior to jQuery 3.0, the + * callback was incorrectly called for every element in the set and received the index position of the + * element in the set as an argument. + * @see {@link https://api.jquery.com/wrapAll/} + * @since 1.2 + * @since 1.4 + */ + wrapAll(wrappingElement: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement) => string | JQuery)): this; + /** + * Wrap an HTML structure around the content of each element in the set of matched elements. + * + * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap + * around the content of the matched elements. + * A callback function which generates a structure to wrap around the content of the matched elements. + * Receives the index position of the element in the set as an argument. Within the function, this + * refers to the current element in the set. + * @see {@link https://api.jquery.com/wrapInner/} + * @since 1.2 + * @since 1.4 + */ + wrapInner(wrappingElement: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement, index: number) => string | JQuery | Element)): this; + + [n: number]: TElement; } -/** - * Allows jQuery Promises to interop with non-jQuery promises - */ -interface JQueryGenericPromise { +interface JQueryStatic { /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * A factory function that returns a chainable utility object with methods to register multiple + * callbacks into callback queues, invoke callback queues, and relay the success or failure state of + * any synchronous or asynchronous function. * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @see {@link https://api.jquery.com/deferred.then/#deferred-then-doneFilter-failFilter-progressFilter} + * @param beforeStart A function that is called just before the constructor returns. + * @see {@link https://api.jquery.com/jQuery.Deferred/} + * @since 1.5 */ - then(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise; - + Deferred: JQuery.DeferredStatic; + Event: JQuery.EventStatic; /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize + * CSS property naming, or create custom properties. * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @see {@link https://api.jquery.com/deferred.then/#deferred-then-doneFilter-failFilter-progressFilter} + * @see {@link https://api.jquery.com/jQuery.cssHooks/} + * @since 1.4.3 */ - then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise; + cssHooks: JQuery.PlainObject>; + /** + * An object containing all CSS properties that may be used without a unit. The .css() method uses this + * object to see if it may append px to unitless values. + * + * @see {@link https://api.jquery.com/jQuery.cssNumber/} + * @since 1.4.3 + */ + cssNumber: JQuery.PlainObject; + readonly fn: JQuery; + fx: { + /** + * The rate (in milliseconds) at which animations fire. + * + * @see {@link https://api.jquery.com/jQuery.fx.interval/} + * @since 1.4.3 + * @deprecated 3.0 + */ + interval: number; + /** + * Globally disable all animations. + * + * @see {@link https://api.jquery.com/jQuery.fx.off/} + * @since 1.3 + */ + off: boolean; + step: JQuery.PlainObject>; + }; + /** + * A Promise-like object (or "thenable") that resolves when the document is ready. + * + * @see {@link https://api.jquery.com/jQuery.ready/} + * @since 1.8 + */ + ready: JQuery.Thenable>; + /** + * A collection of properties that represent the presence of different browser features or bugs. + * Intended for jQuery's internal use; specific properties may be removed when they are no longer + * needed internally to improve page startup performance. For your own project's feature-detection + * needs, we strongly recommend the use of an external library such as Modernizr instead of dependency + * on properties in jQuery.support. + * + * @see {@link https://api.jquery.com/jQuery.support/} + * @since 1.3 + * @deprecated 1.9 + */ + support: JQuery.PlainObject; + valHooks: JQuery.PlainObject>; + /** + * Creates DOM elements on the fly from the provided string of raw HTML. + * + * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML. + * A string defining a single, standalone, HTML element (e.g.
    or
    ). + * @param ownerDocument_attributes A document in which the new elements will be created. + * An object of attributes, events, and methods to call on the newly-created element. + * @see {@link https://api.jquery.com/jQuery/} + * @since 1.0 + * @since 1.4 + */ + (html: JQuery.htmlString, ownerDocument_attributes: Document | JQuery.PlainObject): JQuery; + /** + * Accepts a string containing a CSS selector which is then used to match a set of elements. + * + * @param selector A string containing a selector expression + * @param context A DOM Element, Document, or jQuery to use as context + * @see {@link https://api.jquery.com/jQuery/} + * @since 1.0 + */ + (selector: JQuery.Selector, context: Element | Document | JQuery | undefined): JQuery; + // HACK: This is the factory function returned when importing jQuery without a DOM. Declaring it separately breaks using the type parameter on JQueryStatic. + // HACK: The discriminator parameter handles the edge case of passing a Window object to JQueryStatic. It doesn't actually exist on the factory function. + (window: Window, discriminator: boolean): JQueryStatic; + /** + * Creates DOM elements on the fly from the provided string of raw HTML. + * + * Binds a function to be executed when the DOM has finished loading. + * + * @param selector_object_callback A string containing a selector expression + * A DOM element to wrap in a jQuery object. + * An array containing a set of DOM elements to wrap in a jQuery object. + * A plain object to wrap in a jQuery object. + * An existing jQuery object to clone. + * The function to execute when the DOM is ready. + * @see {@link https://api.jquery.com/jQuery/} + * @since 1.0 + * @since 1.4 + */ + (selector_object_callback?: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery | + JQuery.PlainObject | + ((this: Document, $: JQueryStatic) => void)): JQuery; + /** + * A multi-purpose callbacks list object that provides a powerful way to manage callback lists. + * + * @param flags An optional list of space-separated flags that change how the callback list behaves. + * @see {@link https://api.jquery.com/jQuery.Callbacks/} + * @since 1.7 + */ + Callbacks(flags?: string): JQuery.Callbacks; + /** + * Perform an asynchronous HTTP (Ajax) request. + * + * @param url A string containing the URL to which the request is sent. + * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can + * be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) below for a complete list of all settings. + * @see {@link https://api.jquery.com/jQuery.ajax/} + * @since 1.5 + */ + ajax(url: string, settings?: JQuery.AjaxSettings): JQuery.jqXHR; + /** + * Perform an asynchronous HTTP (Ajax) request. + * + * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can + * be set for any option with $.ajaxSetup(). + * @see {@link https://api.jquery.com/jQuery.ajax/} + * @since 1.0 + */ + ajax(settings?: JQuery.AjaxSettings): JQuery.jqXHR; + /** + * Handle custom Ajax options or modify existing options before each request is sent and before they + * are processed by $.ajax(). + * + * @param dataTypes An optional string containing one or more space-separated dataTypes + * @param handler A handler to set default values for future Ajax requests. + * @see {@link https://api.jquery.com/jQuery.ajaxPrefilter/} + * @since 1.5 + */ + ajaxPrefilter(dataTypes: string, + handler: (options: JQuery.AjaxSettings, originalOptions: JQuery.AjaxSettings, jqXHR: JQuery.jqXHR) => string | void): void; + /** + * Handle custom Ajax options or modify existing options before each request is sent and before they + * are processed by $.ajax(). + * + * @param handler A handler to set default values for future Ajax requests. + * @see {@link https://api.jquery.com/jQuery.ajaxPrefilter/} + * @since 1.5 + */ + ajaxPrefilter(handler: (options: JQuery.AjaxSettings, originalOptions: JQuery.AjaxSettings, jqXHR: JQuery.jqXHR) => string | void): void; + /** + * Set default values for future Ajax requests. Its use is not recommended. + * + * @param options A set of key/value pairs that configure the default Ajax request. All options are optional. + * @see {@link https://api.jquery.com/jQuery.ajaxSetup/} + * @since 1.1 + */ + ajaxSetup(options: JQuery.AjaxSettings): JQuery.AjaxSettings; + /** + * Creates an object that handles the actual transmission of Ajax data. + * + * @param dataType A string identifying the data type to use + * @param handler A handler to return the new transport object to use with the data type provided in the first argument. + * @see {@link https://api.jquery.com/jQuery.ajaxTransport/} + * @since 1.5 + */ + ajaxTransport(dataType: string, + handler: (options: JQuery.AjaxSettings, originalOptions: JQuery.AjaxSettings, jqXHR: JQuery.jqXHR) => JQuery.Transport | void): void; + /** + * Check to see if a DOM element is a descendant of another DOM element. + * + * @param container The DOM element that may contain the other element. + * @param contained The DOM element that may be contained by (a descendant of) the other element. + * @see {@link https://api.jquery.com/jQuery.contains/} + * @since 1.4 + */ + contains(container: Element, contained: Element): boolean; + css(elem: Element, unknown: any): any; + /** + * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or + * the full data store for the element. + * + * @param element The DOM element to query for the data. + * @param key Name of the data stored. + * @param undefined + * @see {@link https://api.jquery.com/jQuery.data/} + * @since 1.2.3 + */ + data(element: Element, key: string, undefined: undefined): any; // tslint:disable-line:unified-signatures + /** + * Store arbitrary data associated with the specified element. Returns the value that was set. + * + * @param element The DOM element to associate with the data. + * @param key A string naming the piece of data to set. + * @param value The new data value; this can be any Javascript type except undefined. + * @see {@link https://api.jquery.com/jQuery.data/} + * @since 1.2.3 + */ + data(element: Element, key: string, value: T): T; + /** + * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or + * the full data store for the element. + * + * @param element The DOM element to query for the data. + * @param key Name of the data stored. + * @see {@link https://api.jquery.com/jQuery.data/} + * @since 1.2.3 + * @since 1.4 + */ + data(element: Element, key?: string): any; + /** + * Execute the next function on the queue for the matched element. + * + * @param element A DOM element from which to remove and execute a queued function. + * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. + * @see {@link https://api.jquery.com/jQuery.dequeue/} + * @since 1.3 + */ + dequeue(element: Element, queueName?: string): void; + /** + * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. + * Arrays and array-like objects with a length property (such as a function's arguments object) are + * iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. + * + * @param array The array to iterate over. + * @param callback The function that will be executed on every object. + * @see {@link https://api.jquery.com/jQuery.each/} + * @since 1.0 + */ + each(array: ArrayLike, callback: (this: T, indexInArray: number, value: T) => false | any): ArrayLike; + /** + * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. + * Arrays and array-like objects with a length property (such as a function's arguments object) are + * iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. + * + * @param obj The object to iterate over. + * @param callback The function that will be executed on every object. + * @see {@link https://api.jquery.com/jQuery.each/} + * @since 1.0 + */ + each(obj: T, callback: (this: T[K], propertyName: K, valueOfProperty: T[K]) => false | any): T; + /** + * Takes a string and throws an exception containing it. + * + * @param message The message to send out. + * @see {@link https://api.jquery.com/jQuery.error/} + * @since 1.4.1 + */ + error(message: string): any; + /** + * Escapes any character that has a special meaning in a CSS selector. + * + * @param selector A string containing a selector expression to escape. + * @see {@link https://api.jquery.com/jQuery.escapeSelector/} + * @since 3.0 + */ + escapeSelector(selector: JQuery.Selector): JQuery.Selector; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param deep If true, the merge becomes recursive (aka. deep copy). Passing false for this argument is not supported. + * @param target The object to extend. It will receive the new properties. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.1.4 + */ + extend(deep: true, target: T, object1: U, object2: V, object3: W, object4: X, object5: Y, object6: Z): T & U & V & W & X & Y & Z; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param deep If true, the merge becomes recursive (aka. deep copy). Passing false for this argument is not supported. + * @param target The object to extend. It will receive the new properties. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.1.4 + */ + extend(deep: true, target: T, object1: U, object2: V, object3: W, object4: X, object5: Y): T & U & V & W & X & Y; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param deep If true, the merge becomes recursive (aka. deep copy). Passing false for this argument is not supported. + * @param target The object to extend. It will receive the new properties. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.1.4 + */ + extend(deep: true, target: T, object1: U, object2: V, object3: W, object4: X): T & U & V & W & X; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param deep If true, the merge becomes recursive (aka. deep copy). Passing false for this argument is not supported. + * @param target The object to extend. It will receive the new properties. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.1.4 + */ + extend(deep: true, target: T, object1: U, object2: V, object3: W): T & U & V & W; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param deep If true, the merge becomes recursive (aka. deep copy). Passing false for this argument is not supported. + * @param target The object to extend. It will receive the new properties. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.1.4 + */ + extend(deep: true, target: T, object1: U, object2: V): T & U & V; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param deep If true, the merge becomes recursive (aka. deep copy). Passing false for this argument is not supported. + * @param target The object to extend. It will receive the new properties. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.1.4 + */ + extend(deep: true, target: T, object1: U): T & U; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param deep If true, the merge becomes recursive (aka. deep copy). Passing false for this argument is not supported. + * @param target The object to extend. It will receive the new properties. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.1.4 + */ + extend(deep: true, target: any, object1: any, ...objects: any[]): any; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param target An object that will receive the new properties if additional objects are passed in or that will + * extend the jQuery namespace if it is the sole argument. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.0 + */ + extend(target: T, object1: U, object2: V, object3: W, object4: X, object5: Y, object6: Z): T & U & V & W & X & Y & Z; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param target An object that will receive the new properties if additional objects are passed in or that will + * extend the jQuery namespace if it is the sole argument. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.0 + */ + extend(target: T, object1: U, object2: V, object3: W, object4: X, object5: Y): T & U & V & W & X & Y; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param target An object that will receive the new properties if additional objects are passed in or that will + * extend the jQuery namespace if it is the sole argument. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.0 + */ + extend(target: T, object1: U, object2: V, object3: W, object4: X): T & U & V & W & X; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param target An object that will receive the new properties if additional objects are passed in or that will + * extend the jQuery namespace if it is the sole argument. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.0 + */ + extend(target: T, object1: U, object2: V, object3: W): T & U & V & W; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param target An object that will receive the new properties if additional objects are passed in or that will + * extend the jQuery namespace if it is the sole argument. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.0 + */ + extend(target: T, object1: U, object2: V): T & U & V; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param target An object that will receive the new properties if additional objects are passed in or that will + * extend the jQuery namespace if it is the sole argument. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.0 + */ + extend(target: T, object1: U): T & U; + /** + * Merge the contents of two or more objects together into the first object. + * + * @param target An object that will receive the new properties if additional objects are passed in or that will + * extend the jQuery namespace if it is the sole argument. + * @see {@link https://api.jquery.com/jQuery.extend/} + * @since 1.0 + */ + extend(target: any, object1: any, ...objects: any[]): any; + /** + * Load data from the server using a HTTP GET request. + * + * @param url A string containing the URL to which the request is sent. + * @param data A plain object or string that is sent to the server with the request. + * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but + * you can use null or jQuery.noop as a placeholder. + * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). + * @see {@link https://api.jquery.com/jQuery.get/} + * @since 1.0 + */ + get(url: string, + data: JQuery.PlainObject | string, + success: JQuery.jqXHR.DoneCallback | null, + dataType?: string): JQuery.jqXHR; + /** + * Load data from the server using a HTTP GET request. + * + * @param url A string containing the URL to which the request is sent. + * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but + * you can use null or jQuery.noop as a placeholder. + * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). + * @see {@link https://api.jquery.com/jQuery.get/} + * @since 1.0 + */ + get(url: string, + success: JQuery.jqXHR.DoneCallback | null, + dataType: string): JQuery.jqXHR; + /** + * Load data from the server using a HTTP GET request. + * + * @param url A string containing the URL to which the request is sent. + * @param success_data A callback function that is executed if the request succeeds. Required if dataType is provided, but + * you can use null or jQuery.noop as a placeholder. + * A plain object or string that is sent to the server with the request. + * @see {@link https://api.jquery.com/jQuery.get/} + * @since 1.0 + */ + get(url: string, + success_data: JQuery.jqXHR.DoneCallback | JQuery.PlainObject | string): JQuery.jqXHR; + /** + * Load data from the server using a HTTP GET request. + * + * @param url_settings A string containing the URL to which the request is sent. + * A set of key/value pairs that configure the Ajax request. All properties except for url are + * optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a + * complete list of all settings. The type option will automatically be set to GET. + * @see {@link https://api.jquery.com/jQuery.get/} + * @since 1.0 + * @since 1.12 + * @since 2.2 + */ + get(url_settings?: string | JQuery.UrlAjaxSettings): JQuery.jqXHR; + /** + * Load JSON-encoded data from the server using a GET HTTP request. + * + * @param url A string containing the URL to which the request is sent. + * @param data A plain object or string that is sent to the server with the request. + * @param success A callback function that is executed if the request succeeds. + * @see {@link https://api.jquery.com/jQuery.getJSON/} + * @since 1.0 + */ + getJSON(url: string, + data: JQuery.PlainObject | string, + success: JQuery.jqXHR.DoneCallback): JQuery.jqXHR; + /** + * Load JSON-encoded data from the server using a GET HTTP request. + * + * @param url A string containing the URL to which the request is sent. + * @param success_data A callback function that is executed if the request succeeds. + * A plain object or string that is sent to the server with the request. + * @see {@link https://api.jquery.com/jQuery.getJSON/} + * @since 1.0 + */ + getJSON(url: string, + success_data?: JQuery.jqXHR.DoneCallback | JQuery.PlainObject | string): JQuery.jqXHR; + /** + * Load a JavaScript file from the server using a GET HTTP request, then execute it. + * + * @param url A string containing the URL to which the request is sent. + * @param success A callback function that is executed if the request succeeds. + * @see {@link https://api.jquery.com/jQuery.getScript/} + * @since 1.0 + */ + getScript(url: string, + success?: JQuery.jqXHR.DoneCallback): JQuery.jqXHR; + /** + * Execute some JavaScript code globally. + * + * @param code The JavaScript code to execute. + * @see {@link https://api.jquery.com/jQuery.globalEval/} + * @since 1.0.4 + */ + globalEval(code: string): void; + /** + * Finds the elements of an array which satisfy a filter function. The original array is not affected. + * + * @param array The array-like object to search through. + * @param fn The function to process each item against. The first argument to the function is the item, and the + * second argument is the index. The function should return a Boolean value. this will be the global window object. + * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements + * for which "callback" returns true. If "invert" is true, then the function returns an array + * consisting of all elements for which "callback" returns false. + * @see {@link https://api.jquery.com/jQuery.grep/} + * @since 1.0 + */ + grep(array: ArrayLike, + fn: (elementOfArray: T, indexInArray: number) => boolean, + invert?: boolean): T[]; + /** + * Determine whether an element has any jQuery data associated with it. + * + * @param element A DOM element to be checked for data. + * @see {@link https://api.jquery.com/jQuery.hasData/} + * @since 1.5 + */ + hasData(element: Element): boolean; + /** + * Holds or releases the execution of jQuery's ready event. + * + * @param hold Indicates whether the ready hold is being requested or released + * @see {@link https://api.jquery.com/jQuery.holdReady/} + * @since 1.6 + * @deprecated 3.2 + */ + holdReady(hold: boolean): void; + /** + * Modify and filter HTML strings passed through jQuery manipulation methods. + * + * @param html The HTML string on which to operate. + * @see {@link https://api.jquery.com/jQuery.htmlPrefilter/} + * @since 1.12/2.2 + */ + htmlPrefilter(html: JQuery.htmlString): JQuery.htmlString; + /** + * Search for a specified value within an array and return its index (or -1 if not found). + * + * @param value The value to search for. + * @param array An array through which to search. + * @param fromIndex The index of the array at which to begin the search. The default is 0, which will search the whole array. + * @see {@link https://api.jquery.com/jQuery.inArray/} + * @since 1.2 + */ + inArray(value: T, array: T[], fromIndex?: number): number; + /** + * Determine whether the argument is an array. + * + * @param obj Object to test whether or not it is an array. + * @see {@link https://api.jquery.com/jQuery.isArray/} + * @since 1.3 + * @deprecated 3.2 + */ + isArray(obj: any): obj is any[]; + /** + * Check to see if an object is empty (contains no enumerable properties). + * + * @param obj The object that will be checked to see if it's empty. + * @see {@link https://api.jquery.com/jQuery.isEmptyObject/} + * @since 1.4 + */ + isEmptyObject(obj: any): obj is {}; + /** + * Determine if the argument passed is a JavaScript function object. + * + * @param obj Object to test whether or not it is a function. + * @see {@link https://api.jquery.com/jQuery.isFunction/} + * @since 1.2 + */ + isFunction(obj: any): obj is Function; + /** + * Determines whether its argument represents a JavaScript number. + * + * @param value The value to be tested. + * @see {@link https://api.jquery.com/jQuery.isNumeric/} + * @since 1.7 + */ + isNumeric(value: any): value is number; + /** + * Check to see if an object is a plain object (created using "{}" or "new Object"). + * + * @param obj The object that will be checked to see if it's a plain object. + * @see {@link https://api.jquery.com/jQuery.isPlainObject/} + * @since 1.4 + */ + isPlainObject(obj: any): obj is JQuery.PlainObject; + /** + * Determine whether the argument is a window. + * + * @param obj Object to test whether or not it is a window. + * @see {@link https://api.jquery.com/jQuery.isWindow/} + * @since 1.4.3 + */ + isWindow(obj: any): obj is Window; + /** + * Check to see if a DOM node is within an XML document (or is an XML document). + * + * @param node The DOM node that will be checked to see if it's in an XML document. + * @see {@link https://api.jquery.com/jQuery.isXMLDoc/} + * @since 1.1.4 + */ + isXMLDoc(node: Node): boolean; + /** + * Convert an array-like object into a true JavaScript array. + * + * @param obj Any object to turn into a native Array. + * @see {@link https://api.jquery.com/jQuery.makeArray/} + * @since 1.2 + */ + makeArray(obj: ArrayLike): T[]; + /** + * Translate all items in an array or object to new array of items. + * + * @param array The Array to translate. + * @param callback The function to process each item against. The first argument to the function is the array item, the + * second argument is the index in array The function can return any value. A returned array will be + * flattened into the resulting array. Within the function, this refers to the global (window) object. + * @see {@link https://api.jquery.com/jQuery.map/} + * @since 1.0 + */ + map(array: T[], callback: (elementOfArray: T, indexInArray: number) => R): R[]; + /** + * Translate all items in an array or object to new array of items. + * + * @param obj The Object to translate. + * @param callback The function to process each item against. The first argument to the function is the value; the + * second argument is the key of the object property. The function can return any value to add to the + * array. A returned array will be flattened into the resulting array. Within the function, this refers + * to the global (window) object. + * @see {@link https://api.jquery.com/jQuery.map/} + * @since 1.6 + */ + map(obj: T, callback: (propertyOfObject: T[K], key: K) => R): R[]; + /** + * Merge the contents of two arrays together into the first array. + * + * @param first The first array-like object to merge, the elements of second added. + * @param second The second array-like object to merge into the first, unaltered. + * @see {@link https://api.jquery.com/jQuery.merge/} + * @since 1.0 + */ + merge(first: ArrayLike, second: ArrayLike): Array; + /** + * Relinquish jQuery's control of the $ variable. + * + * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself). + * @see {@link https://api.jquery.com/jQuery.noConflict/} + * @since 1.0 + */ + noConflict(removeAll?: boolean): this; + /** + * An empty function. + * + * @see {@link https://api.jquery.com/jQuery.noop/} + * @since 1.4 + */ + noop(): undefined; + /** + * Return a number representing the current time. + * + * @see {@link https://api.jquery.com/jQuery.now/} + * @since 1.4.3 + */ + now(): number; + /** + * Create a serialized representation of an array, a plain object, or a jQuery object suitable for use + * in a URL query string or Ajax request. In case a jQuery object is passed, it should contain input + * elements with name/value properties. + * + * @param obj An array, a plain object, or a jQuery object to serialize. + * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization. + * @see {@link https://api.jquery.com/jQuery.param/} + * @since 1.2 + * @since 1.4 + */ + param(obj: any[] | JQuery.PlainObject | JQuery, traditional?: boolean): string; + /** + * Parses a string into an array of DOM nodes. + * + * @param data HTML string to be parsed + * @param context Document element to serve as the context in which the HTML fragment will be created + * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string + * @see {@link https://api.jquery.com/jQuery.parseHTML/} + * @since 1.8 + */ + parseHTML(data: string, context: Document | null | undefined, keepScripts: boolean): JQuery.Node[]; + /** + * Parses a string into an array of DOM nodes. + * + * @param data HTML string to be parsed + * @param context_keepScripts Document element to serve as the context in which the HTML fragment will be created + * A Boolean indicating whether to include scripts passed in the HTML string + * @see {@link https://api.jquery.com/jQuery.parseHTML/} + * @since 1.8 + */ + parseHTML(data: string, context_keepScripts?: Document | null | undefined | boolean): JQuery.Node[]; + /** + * Takes a well-formed JSON string and returns the resulting JavaScript value. + * + * @param json The JSON string to parse. + * @see {@link https://api.jquery.com/jQuery.parseJSON/} + * @since 1.4.1 + * @deprecated 3.0 + */ + parseJSON(json: string): any; + /** + * Parses a string into an XML document. + * + * @param data a well-formed XML string to be parsed + * @see {@link https://api.jquery.com/jQuery.parseXML/} + * @since 1.5 + */ + parseXML(data: string): XMLDocument; + /** + * Load data from the server using a HTTP POST request. + * + * @param url A string containing the URL to which the request is sent. + * @param data A plain object or string that is sent to the server with the request. + * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but + * can be null in that case. + * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). + * @see {@link https://api.jquery.com/jQuery.post/} + * @since 1.0 + */ + post(url: string, + data: JQuery.PlainObject | string, + success: JQuery.jqXHR.DoneCallback | null, + dataType?: string): JQuery.jqXHR; + /** + * Load data from the server using a HTTP POST request. + * + * @param url A string containing the URL to which the request is sent. + * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but + * can be null in that case. + * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). + * @see {@link https://api.jquery.com/jQuery.post/} + * @since 1.0 + */ + post(url: string, + success: JQuery.jqXHR.DoneCallback | null, + dataType: string): JQuery.jqXHR; + /** + * Load data from the server using a HTTP POST request. + * + * @param url A string containing the URL to which the request is sent. + * @param success_data A callback function that is executed if the request succeeds. Required if dataType is provided, but + * can be null in that case. + * A plain object or string that is sent to the server with the request. + * @see {@link https://api.jquery.com/jQuery.post/} + * @since 1.0 + */ + post(url: string, + success_data: JQuery.jqXHR.DoneCallback | JQuery.PlainObject | string): JQuery.jqXHR; + /** + * Load data from the server using a HTTP POST request. + * + * @param url_settings A string containing the URL to which the request is sent. + * A set of key/value pairs that configure the Ajax request. All properties except for url are + * optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a + * complete list of all settings. Type will automatically be set to POST. + * @see {@link https://api.jquery.com/jQuery.post/} + * @since 1.0 + * @since 1.12 + * @since 2.2 + */ + post(url_settings?: string | JQuery.UrlAjaxSettings): JQuery.jqXHR; + /** + * Takes a function and returns a new one that will always have a particular context. + * + * @param fn The function whose context will be changed. + * @param context The object to which the context (this) of the function should be set. + * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument. + * @see {@link https://api.jquery.com/jQuery.proxy/} + * @since 1.4 + * @since 1.6 + */ + proxy(fn: Function, context: object, ...additionalArguments: any[]): Function; + /** + * Takes a function and returns a new one that will always have a particular context. + * + * @param context The object to which the context of the function should be set. + * @param name The name of the function whose context will be changed (should be a property of the context object). + * @param additionalArguments Any number of arguments to be passed to the function named in the name argument. + * @see {@link https://api.jquery.com/jQuery.proxy/} + * @since 1.4 + * @since 1.6 + */ + proxy(context: T, name: keyof T, ...additionalArguments: any[]): Function; + /** + * Manipulate the queue of functions to be executed on the matched element. + * + * @param element A DOM element where the array of queued functions is attached. + * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. + * @param newQueue The new function to add to the queue. + * An array of functions to replace the current queue contents. + * @see {@link https://api.jquery.com/jQuery.queue/} + * @since 1.3 + */ + queue(element: T, queueName?: string, newQueue?: JQuery.TypeOrArray>): JQuery.Queue; + /** + * Handles errors thrown synchronously in functions wrapped in jQuery(). + * + * @param error An error thrown in the function wrapped in jQuery(). + * @see {@link https://api.jquery.com/jQuery.readyException/} + * @since 3.1 + */ + readyException(error: Error): any; + /** + * Remove a previously-stored piece of data. + * + * @param element A DOM element from which to remove data. + * @param name A string naming the piece of data to remove. + * @see {@link https://api.jquery.com/jQuery.removeData/} + * @since 1.2.3 + */ + removeData(element: Element, name?: string): void; + /** + * Creates an object containing a set of properties ready to be used in the definition of custom animations. + * + * @param duration A string or number determining how long the animation will run. + * @param easing A string indicating which easing function to use for the transition. + * @param complete A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/jQuery.speed/} + * @since 1.1 + */ + speed(duration: JQuery.Duration, easing: string, complete: (this: TElement) => void): JQuery.EffectsOptions; + /** + * Creates an object containing a set of properties ready to be used in the definition of custom animations. + * + * @param duration A string or number determining how long the animation will run. + * @param easing_complete A string indicating which easing function to use for the transition. + * A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/jQuery.speed/} + * @since 1.0 + * @since 1.1 + */ + speed(duration: JQuery.Duration, + easing_complete: string | ((this: TElement) => void)): JQuery.EffectsOptions; + /** + * Creates an object containing a set of properties ready to be used in the definition of custom animations. + * + * @param duration_complete_settings A string or number determining how long the animation will run. + * A function to call once the animation is complete, called once per matched element. + * @see {@link https://api.jquery.com/jQuery.speed/} + * @since 1.0 + * @since 1.1 + */ + speed(duration_complete_settings?: JQuery.Duration | ((this: TElement) => void) | JQuery.SpeedSettings): JQuery.EffectsOptions; + /** + * Remove the whitespace from the beginning and end of a string. + * + * @param str The string to trim. + * @see {@link https://api.jquery.com/jQuery.trim/} + * @since 1.0 + */ + trim(str: string): string; + /** + * Determine the internal JavaScript [[Class]] of an object. + * + * @param obj Object to get the internal JavaScript [[Class]] of. + * @see {@link https://api.jquery.com/jQuery.type/} + * @since 1.4.3 + */ + type(obj: any): 'array' | 'boolean' | 'date' | 'error' | 'function' | 'null' | 'number' | 'object' | 'regexp' | 'string' | 'symbol' | 'undefined'; + /** + * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on + * arrays of DOM elements, not strings or numbers. + * + * @param array The Array of DOM elements. + * @see {@link https://api.jquery.com/jQuery.unique/} + * @since 1.1.3 + * @deprecated 3.0 + */ + unique(array: T[]): T[]; + /** + * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on + * arrays of DOM elements, not strings or numbers. + * + * @param array The Array of DOM elements. + * @see {@link https://api.jquery.com/jQuery.uniqueSort/} + * @since 1.12-2.2 + */ + uniqueSort(array: T[]): T[]; + /** + * Provides a way to execute callback functions based on zero or more Thenable objects, usually + * Deferred objects that represent asynchronous events. + * + * @see {@link https://api.jquery.com/jQuery.when/} + * @since 1.5 + */ + when + (deferredT: JQuery.Promise | JQuery.Thenable | TR1, + deferredU: JQuery.Promise | JQuery.Thenable | UR1, + deferredV: JQuery.Promise | JQuery.Thenable | VR1): JQuery.Promise3; + /** + * Provides a way to execute callback functions based on zero or more Thenable objects, usually + * Deferred objects that represent asynchronous events. + * + * @see {@link https://api.jquery.com/jQuery.when/} + * @since 1.5 + */ + when + (deferredT: JQuery.Promise | JQuery.Thenable | TR1, + deferredU: JQuery.Promise | JQuery.Thenable | UR1): JQuery.Promise2; + /** + * Provides a way to execute callback functions based on zero or more Thenable objects, usually + * Deferred objects that represent asynchronous events. + * + * @see {@link https://api.jquery.com/jQuery.when/} + * @since 1.5 + */ + when + (deferredT: JQuery.Promise3 | + JQuery.Promise2): JQuery.Promise3; + /** + * Provides a way to execute callback functions based on zero or more Thenable objects, usually + * Deferred objects that represent asynchronous events. + * + * @see {@link https://api.jquery.com/jQuery.when/} + * @since 1.5 + */ + when(deferred: JQuery.Promise | JQuery.Thenable | TR1): JQuery.Promise; + /** + * Provides a way to execute callback functions based on zero or more Thenable objects, usually + * Deferred objects that represent asynchronous events. + * + * @param deferreds Zero or more Thenable objects. + * @see {@link https://api.jquery.com/jQuery.when/} + * @since 1.5 + */ + when(...deferreds: Array | JQuery.Thenable | TR1>): JQuery.Promise; + /** + * Provides a way to execute callback functions based on zero or more Thenable objects, usually + * Deferred objects that represent asynchronous events. + * + * @param deferreds Zero or more Thenable objects. + * @see {@link https://api.jquery.com/jQuery.when/} + * @since 1.5 + */ + when(...deferreds: any[]): JQuery.Promise; } +declare namespace JQuery { + type TypeOrArray = T | T[]; + type Node = Element | Text | Comment; + + /** + * A string is designated htmlString in jQuery documentation when it is used to represent one or more + * DOM elements, typically to be created and inserted in the document. When passed as an argument of + * the jQuery() function, the string is identified as HTML if it starts with ) and is parsed + * as such until the final > character. Prior to jQuery 1.9, a string was considered to be HTML if it + * contained anywhere within the string. + */ + type htmlString = string; + /** + * A selector is used in jQuery to select DOM elements from a DOM document. That document is, in most + * cases, the DOM document present in all browsers, but can also be an XML document received via Ajax. + */ + type Selector = string; + + /** + * The PlainObject type is a JavaScript object containing zero or more key-value pairs. The plain + * object is, in other words, an Object object. It is designated "plain" in jQuery documentation to + * distinguish it from other kinds of JavaScript objects: for example, null, user-defined arrays, and + * host objects such as document, all of which have a typeof value of "object." + */ + interface PlainObject { + [key: string]: T; + } + + // region Ajax + + interface AjaxSettings extends Ajax.AjaxSettingsBase { + /** + * A string containing the URL to which the request is sent. + */ + url?: string; + } + + interface UrlAjaxSettings extends Ajax.AjaxSettingsBase { + /** + * A string containing the URL to which the request is sent. + */ + url: string; + } + + namespace Ajax { + type SuccessTextStatus = 'success' | 'notmodified' | 'nocontent'; + type ErrorTextStatus = 'timeout' | 'error' | 'abort' | 'parsererror'; + type TextStatus = SuccessTextStatus | ErrorTextStatus; + + interface SuccessCallback { + (this: TContext, data: any, textStatus: SuccessTextStatus, jqXHR: JQuery.jqXHR): void; + } + + interface ErrorCallback { + (this: TContext, jqXHR: jqXHR, textStatus: ErrorTextStatus, errorThrown: string): void; + } + + interface CompleteCallback { + (this: TContext, jqXHR: jqXHR, textStatus: TextStatus): void; + } + + /** + * @see {@link http://api.jquery.com/jquery.ajax/#jQuery-ajax-settings} + */ + interface AjaxSettingsBase { + /** + * A set of key/value pairs that map a given dataType to its MIME type, which gets sent in the Accept + * request header. This header tells the server what kind of response it will accept in return. + */ + accepts?: PlainObject; + /** + * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need + * synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests + * do not support synchronous operation. Note that synchronous requests may temporarily lock the + * browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: + * false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback + * options instead of the corresponding methods of the jqXHR object such as jqXHR.done(). + */ + async?: boolean; + /** + * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, + * XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and + * settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend + * function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless + * of the type of request. + */ + beforeSend?(this: TContext, jqXHR: jqXHR, settings: AjaxSettingsBase): false | void; + /** + * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache + * to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" + * to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a + * POST is made to a URL that has already been requested by a GET. + */ + cache?: boolean; + /** + * A function to be called when the request finishes (after success and error callbacks are executed). + * The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a + * string categorizing the status of the request ("success", "notmodified", "nocontent", "error", + * "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of + * functions. Each function will be called in turn. This is an Ajax Event. + */ + complete?: TypeOrArray>; + /** + * An object of string/regular-expression pairs that determine how jQuery will parse the response, + * given its content type. + */ + contents?: PlainObject; + /** + * When sending data to the server, use this content type. Default is + * "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly + * pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). + * As of jQuery 1.6 you can pass false to tell jQuery to not set any content type header. Note: The W3C + * XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset + * will not force the browser to change the encoding. Note: For cross-domain requests, setting the + * content type to anything other than application/x-www-form-urlencoded, multipart/form-data, or + * text/plain will trigger the browser to send a preflight OPTIONS request to the server. + */ + contentType?: string | false; + /** + * This object will be the context of all Ajax-related callbacks. By default, the context is an object + * that represents the Ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). + */ + context?: TContext; + /** + * An object containing dataType-to-dataType converters. Each converter's value is a function that + * returns the transformed value of the response. + */ + converters?: PlainObject<((value: any) => any) | true>; + /** + * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of + * crossDomain to true. This allows, for example, server-side redirection to another domain. + */ + crossDomain?: boolean; + /** + * Data to be sent to the server. It is converted to a query string, if not already a string. It's + * appended to the url for GET-requests. See processData option to prevent this automatic processing. + * Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same + * key based on the value of the traditional setting (described below). + */ + data?: PlainObject | string; + /** + * A function to be used to handle the raw response data of XMLHttpRequest. This is a pre-filtering + * function to sanitize the response. You should return the sanitized data. The function accepts two + * arguments: The raw data returned from the server and the 'dataType' parameter. + */ + dataFilter?(data: string, type: string): any; + /** + * The type of data that you're expecting back from the server. If none is specified, jQuery will try + * to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON + * will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be + * returned as a string). The available types (and the result passed as the first argument to your + * success callback) are: + * + * "xml": Returns a XML document that can be processed via jQuery. + * + * "html": Returns HTML as plain text; included script tags are evaluated when inserted in the DOM. + * + * "script": Evaluates the response as JavaScript and returns it as plain text. Disables caching by + * appending a query string parameter, _=[TIMESTAMP], to the URL unless the cache option is set to + * true. Note: This will turn POSTs into GETs for remote-domain requests. + * + * "json": Evaluates the response as JSON and returns a JavaScript object. Cross-domain "json" requests + * are converted to "jsonp" unless the request includes jsonp: false in its request options. The JSON + * data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of + * jQuery 1.9, an empty response is also rejected; the server should return a response of null or {} + * instead. (See json.org for more information on proper JSON formatting.) + * + * "jsonp": Loads in a JSON block using JSONP. Adds an extra "?callback=?" to the end of your URL to + * specify the callback. Disables caching by appending a query string parameter, "_=[TIMESTAMP]", to + * the URL unless the cache option is set to true. + * + * "text": A plain text string. + * + * multiple, space-separated values: As of jQuery 1.5, jQuery can convert a dataType from what it + * received in the Content-Type header to what you require. For example, if you want a text response to + * be treated as XML, use "text xml" for the dataType. You can also make a JSONP request, have it + * received as text, and interpreted by jQuery as XML: "jsonp text xml". Similarly, a shorthand string + * such as "jsonp xml" will first attempt to convert from jsonp to xml, and, failing that, convert from + * jsonp to text, and then from text to xml. + */ + dataType?: 'xml' | 'html' | 'script' | 'json' | 'jsonp' | 'text' | string; + /** + * A function to be called if the request fails. The function receives three arguments: The jqXHR (in + * jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an + * optional exception object, if one occurred. Possible values for the second argument (besides null) + * are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives + * the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery + * 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: + * This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event. + */ + error?: TypeOrArray>; + /** + * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to + * prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to + * control various Ajax Events. + */ + global?: boolean; + /** + * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest + * transport. The header X-Requested-With: XMLHttpRequest is always added, but its default + * XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from + * within the beforeSend function. + */ + headers?: PlainObject; + /** + * Allow the request to be successful only if the response has changed since the last request. This is + * done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery + * 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data. + */ + ifModified?: boolean; + /** + * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery + * does not recognize it as such by default. The following protocols are currently recognized as local: + * file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so + * once in the $.ajaxSetup() method. + */ + isLocal?: boolean; + /** + * Override the callback function name in a JSONP request. This value will be used instead of + * 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would + * result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false + * prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for + * transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, + * { jsonp: false, jsonpCallback: "callbackName" }. If you don't trust the target of your Ajax + * requests, consider setting the jsonp property to false for security reasons. + */ + jsonp?: string | false; + /** + * Specify the callback function name for a JSONP request. This value will be used instead of the + * random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name + * as it'll make it easier to manage the requests and provide callbacks and error handling. You may + * want to specify the callback when you want to enable better browser caching of GET requests. As of + * jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback + * is set to the return value of that function. + */ + jsonpCallback?: string | ((this: TContext) => string); + /** + * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). + */ + method?: string; + /** + * A mime type to override the XHR mime type. + */ + mimeType?: string; + /** + * A password to be used with XMLHttpRequest in response to an HTTP access authentication request. + */ + password?: string; + /** + * By default, data passed in to the data option as an object (technically, anything other than a + * string) will be processed and transformed into a query string, fitting to the default content-type + * "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, + * set this option to false. + */ + processData?: boolean; + /** + * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or + * "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. + * Used when the character set on the local page is not the same as the one on the remote script. + */ + scriptCharset?: string; + /** + * An object of numeric HTTP codes and functions to be called when the response has the corresponding + * code. + * + * If the request is successful, the status code functions take the same parameters as the success + * callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. + */ + statusCode?: StatusCodeCallbacks; + /** + * A function to be called if the request succeeds. The function gets passed three arguments: The data + * returned from the server, formatted according to the dataType parameter or the dataFilter callback + * function, if specified; a string describing the status; and the jqXHR (in jQuery 1.4.x, + * XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each + * function will be called in turn. This is an Ajax Event. + */ + success?: TypeOrArray>; + /** + * Set a timeout (in milliseconds) for the request. A value of 0 means there will be no timeout. This + * will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the + * $.ajax call is made; if several other requests are in progress and the browser has no connections + * available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and + * below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any + * object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be + * cancelled by a timeout; the script will run even if it arrives after the timeout period. + */ + timeout?: number; + /** + * Set this to true if you wish to use the traditional style of param serialization. + */ + traditional?: boolean; + /** + * An alias for method. You should use type if you're using versions of jQuery prior to 1.9.0. + */ + type?: string; + /** + * A username to be used with XMLHttpRequest in response to an HTTP access authentication request. + */ + username?: string; + // ActiveXObject requires "lib": ["scripthost"] which consumers would also require + /** + * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), + * the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or + * enhancements to the factory. + */ + xhr?(): XMLHttpRequest; + /** + * An object of fieldName-fieldValue pairs to set on the native XHR object. + * + * In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS + * requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ + * should you require the use of it. + */ + xhrFields?: XHRFields; + } + + type StatusCodeCallbacks = { + // region Success Status Codes + + // jQuery treats 2xx and 304 status codes as a success + + 200?: SuccessCallback; + 201?: SuccessCallback; + 202?: SuccessCallback; + 203?: SuccessCallback; + 204?: SuccessCallback; + 205?: SuccessCallback; + 206?: SuccessCallback; + 207?: SuccessCallback; + 208?: SuccessCallback; + 209?: SuccessCallback; + 210?: SuccessCallback; + 211?: SuccessCallback; + 212?: SuccessCallback; + 213?: SuccessCallback; + 214?: SuccessCallback; + 215?: SuccessCallback; + 216?: SuccessCallback; + 217?: SuccessCallback; + 218?: SuccessCallback; + 219?: SuccessCallback; + 220?: SuccessCallback; + 221?: SuccessCallback; + 222?: SuccessCallback; + 223?: SuccessCallback; + 224?: SuccessCallback; + 225?: SuccessCallback; + 226?: SuccessCallback; + 227?: SuccessCallback; + 228?: SuccessCallback; + 229?: SuccessCallback; + 230?: SuccessCallback; + 231?: SuccessCallback; + 232?: SuccessCallback; + 233?: SuccessCallback; + 234?: SuccessCallback; + 235?: SuccessCallback; + 236?: SuccessCallback; + 237?: SuccessCallback; + 238?: SuccessCallback; + 239?: SuccessCallback; + 240?: SuccessCallback; + 241?: SuccessCallback; + 242?: SuccessCallback; + 243?: SuccessCallback; + 244?: SuccessCallback; + 245?: SuccessCallback; + 246?: SuccessCallback; + 247?: SuccessCallback; + 248?: SuccessCallback; + 249?: SuccessCallback; + 250?: SuccessCallback; + 251?: SuccessCallback; + 252?: SuccessCallback; + 253?: SuccessCallback; + 254?: SuccessCallback; + 255?: SuccessCallback; + 256?: SuccessCallback; + 257?: SuccessCallback; + 258?: SuccessCallback; + 259?: SuccessCallback; + 260?: SuccessCallback; + 261?: SuccessCallback; + 262?: SuccessCallback; + 263?: SuccessCallback; + 264?: SuccessCallback; + 265?: SuccessCallback; + 266?: SuccessCallback; + 267?: SuccessCallback; + 268?: SuccessCallback; + 269?: SuccessCallback; + 270?: SuccessCallback; + 271?: SuccessCallback; + 272?: SuccessCallback; + 273?: SuccessCallback; + 274?: SuccessCallback; + 275?: SuccessCallback; + 276?: SuccessCallback; + 277?: SuccessCallback; + 278?: SuccessCallback; + 279?: SuccessCallback; + 280?: SuccessCallback; + 281?: SuccessCallback; + 282?: SuccessCallback; + 283?: SuccessCallback; + 284?: SuccessCallback; + 285?: SuccessCallback; + 286?: SuccessCallback; + 287?: SuccessCallback; + 288?: SuccessCallback; + 289?: SuccessCallback; + 290?: SuccessCallback; + 291?: SuccessCallback; + 292?: SuccessCallback; + 293?: SuccessCallback; + 294?: SuccessCallback; + 295?: SuccessCallback; + 296?: SuccessCallback; + 297?: SuccessCallback; + 298?: SuccessCallback; + 299?: SuccessCallback; + 304?: SuccessCallback; + + // endregion + + // region Error Status Codes + + 300?: ErrorCallback; + 301?: ErrorCallback; + 302?: ErrorCallback; + 303?: ErrorCallback; + 305?: ErrorCallback; + 306?: ErrorCallback; + 307?: ErrorCallback; + 308?: ErrorCallback; + 309?: ErrorCallback; + 310?: ErrorCallback; + 311?: ErrorCallback; + 312?: ErrorCallback; + 313?: ErrorCallback; + 314?: ErrorCallback; + 315?: ErrorCallback; + 316?: ErrorCallback; + 317?: ErrorCallback; + 318?: ErrorCallback; + 319?: ErrorCallback; + 320?: ErrorCallback; + 321?: ErrorCallback; + 322?: ErrorCallback; + 323?: ErrorCallback; + 324?: ErrorCallback; + 325?: ErrorCallback; + 326?: ErrorCallback; + 327?: ErrorCallback; + 328?: ErrorCallback; + 329?: ErrorCallback; + 330?: ErrorCallback; + 331?: ErrorCallback; + 332?: ErrorCallback; + 333?: ErrorCallback; + 334?: ErrorCallback; + 335?: ErrorCallback; + 336?: ErrorCallback; + 337?: ErrorCallback; + 338?: ErrorCallback; + 339?: ErrorCallback; + 340?: ErrorCallback; + 341?: ErrorCallback; + 342?: ErrorCallback; + 343?: ErrorCallback; + 344?: ErrorCallback; + 345?: ErrorCallback; + 346?: ErrorCallback; + 347?: ErrorCallback; + 348?: ErrorCallback; + 349?: ErrorCallback; + 350?: ErrorCallback; + 351?: ErrorCallback; + 352?: ErrorCallback; + 353?: ErrorCallback; + 354?: ErrorCallback; + 355?: ErrorCallback; + 356?: ErrorCallback; + 357?: ErrorCallback; + 358?: ErrorCallback; + 359?: ErrorCallback; + 360?: ErrorCallback; + 361?: ErrorCallback; + 362?: ErrorCallback; + 363?: ErrorCallback; + 364?: ErrorCallback; + 365?: ErrorCallback; + 366?: ErrorCallback; + 367?: ErrorCallback; + 368?: ErrorCallback; + 369?: ErrorCallback; + 370?: ErrorCallback; + 371?: ErrorCallback; + 372?: ErrorCallback; + 373?: ErrorCallback; + 374?: ErrorCallback; + 375?: ErrorCallback; + 376?: ErrorCallback; + 377?: ErrorCallback; + 378?: ErrorCallback; + 379?: ErrorCallback; + 380?: ErrorCallback; + 381?: ErrorCallback; + 382?: ErrorCallback; + 383?: ErrorCallback; + 384?: ErrorCallback; + 385?: ErrorCallback; + 386?: ErrorCallback; + 387?: ErrorCallback; + 388?: ErrorCallback; + 389?: ErrorCallback; + 390?: ErrorCallback; + 391?: ErrorCallback; + 392?: ErrorCallback; + 393?: ErrorCallback; + 394?: ErrorCallback; + 395?: ErrorCallback; + 396?: ErrorCallback; + 397?: ErrorCallback; + 398?: ErrorCallback; + 399?: ErrorCallback; + 400?: ErrorCallback; + 401?: ErrorCallback; + 402?: ErrorCallback; + 403?: ErrorCallback; + 404?: ErrorCallback; + 405?: ErrorCallback; + 406?: ErrorCallback; + 407?: ErrorCallback; + 408?: ErrorCallback; + 409?: ErrorCallback; + 410?: ErrorCallback; + 411?: ErrorCallback; + 412?: ErrorCallback; + 413?: ErrorCallback; + 414?: ErrorCallback; + 415?: ErrorCallback; + 416?: ErrorCallback; + 417?: ErrorCallback; + 418?: ErrorCallback; + 419?: ErrorCallback; + 420?: ErrorCallback; + 421?: ErrorCallback; + 422?: ErrorCallback; + 423?: ErrorCallback; + 424?: ErrorCallback; + 425?: ErrorCallback; + 426?: ErrorCallback; + 427?: ErrorCallback; + 428?: ErrorCallback; + 429?: ErrorCallback; + 430?: ErrorCallback; + 431?: ErrorCallback; + 432?: ErrorCallback; + 433?: ErrorCallback; + 434?: ErrorCallback; + 435?: ErrorCallback; + 436?: ErrorCallback; + 437?: ErrorCallback; + 438?: ErrorCallback; + 439?: ErrorCallback; + 440?: ErrorCallback; + 441?: ErrorCallback; + 442?: ErrorCallback; + 443?: ErrorCallback; + 444?: ErrorCallback; + 445?: ErrorCallback; + 446?: ErrorCallback; + 447?: ErrorCallback; + 448?: ErrorCallback; + 449?: ErrorCallback; + 450?: ErrorCallback; + 451?: ErrorCallback; + 452?: ErrorCallback; + 453?: ErrorCallback; + 454?: ErrorCallback; + 455?: ErrorCallback; + 456?: ErrorCallback; + 457?: ErrorCallback; + 458?: ErrorCallback; + 459?: ErrorCallback; + 460?: ErrorCallback; + 461?: ErrorCallback; + 462?: ErrorCallback; + 463?: ErrorCallback; + 464?: ErrorCallback; + 465?: ErrorCallback; + 466?: ErrorCallback; + 467?: ErrorCallback; + 468?: ErrorCallback; + 469?: ErrorCallback; + 470?: ErrorCallback; + 471?: ErrorCallback; + 472?: ErrorCallback; + 473?: ErrorCallback; + 474?: ErrorCallback; + 475?: ErrorCallback; + 476?: ErrorCallback; + 477?: ErrorCallback; + 478?: ErrorCallback; + 479?: ErrorCallback; + 480?: ErrorCallback; + 481?: ErrorCallback; + 482?: ErrorCallback; + 483?: ErrorCallback; + 484?: ErrorCallback; + 485?: ErrorCallback; + 486?: ErrorCallback; + 487?: ErrorCallback; + 488?: ErrorCallback; + 489?: ErrorCallback; + 490?: ErrorCallback; + 491?: ErrorCallback; + 492?: ErrorCallback; + 493?: ErrorCallback; + 494?: ErrorCallback; + 495?: ErrorCallback; + 496?: ErrorCallback; + 497?: ErrorCallback; + 498?: ErrorCallback; + 499?: ErrorCallback; + 500?: ErrorCallback; + 501?: ErrorCallback; + 502?: ErrorCallback; + 503?: ErrorCallback; + 504?: ErrorCallback; + 505?: ErrorCallback; + 506?: ErrorCallback; + 507?: ErrorCallback; + 508?: ErrorCallback; + 509?: ErrorCallback; + 510?: ErrorCallback; + 511?: ErrorCallback; + 512?: ErrorCallback; + 513?: ErrorCallback; + 514?: ErrorCallback; + 515?: ErrorCallback; + 516?: ErrorCallback; + 517?: ErrorCallback; + 518?: ErrorCallback; + 519?: ErrorCallback; + 520?: ErrorCallback; + 521?: ErrorCallback; + 522?: ErrorCallback; + 523?: ErrorCallback; + 524?: ErrorCallback; + 525?: ErrorCallback; + 526?: ErrorCallback; + 527?: ErrorCallback; + 528?: ErrorCallback; + 529?: ErrorCallback; + 530?: ErrorCallback; + 531?: ErrorCallback; + 532?: ErrorCallback; + 533?: ErrorCallback; + 534?: ErrorCallback; + 535?: ErrorCallback; + 536?: ErrorCallback; + 537?: ErrorCallback; + 538?: ErrorCallback; + 539?: ErrorCallback; + 540?: ErrorCallback; + 541?: ErrorCallback; + 542?: ErrorCallback; + 543?: ErrorCallback; + 544?: ErrorCallback; + 545?: ErrorCallback; + 546?: ErrorCallback; + 547?: ErrorCallback; + 548?: ErrorCallback; + 549?: ErrorCallback; + 550?: ErrorCallback; + 551?: ErrorCallback; + 552?: ErrorCallback; + 553?: ErrorCallback; + 554?: ErrorCallback; + 555?: ErrorCallback; + 556?: ErrorCallback; + 557?: ErrorCallback; + 558?: ErrorCallback; + 559?: ErrorCallback; + 560?: ErrorCallback; + 561?: ErrorCallback; + 562?: ErrorCallback; + 563?: ErrorCallback; + 564?: ErrorCallback; + 565?: ErrorCallback; + 566?: ErrorCallback; + 567?: ErrorCallback; + 568?: ErrorCallback; + 569?: ErrorCallback; + 570?: ErrorCallback; + 571?: ErrorCallback; + 572?: ErrorCallback; + 573?: ErrorCallback; + 574?: ErrorCallback; + 575?: ErrorCallback; + 576?: ErrorCallback; + 577?: ErrorCallback; + 578?: ErrorCallback; + 579?: ErrorCallback; + 580?: ErrorCallback; + 581?: ErrorCallback; + 582?: ErrorCallback; + 583?: ErrorCallback; + 584?: ErrorCallback; + 585?: ErrorCallback; + 586?: ErrorCallback; + 587?: ErrorCallback; + 588?: ErrorCallback; + 589?: ErrorCallback; + 590?: ErrorCallback; + 591?: ErrorCallback; + 592?: ErrorCallback; + 593?: ErrorCallback; + 594?: ErrorCallback; + 595?: ErrorCallback; + 596?: ErrorCallback; + 597?: ErrorCallback; + 598?: ErrorCallback; + 599?: ErrorCallback; + + // endregion + } & { + // Status codes not listed require type annotations when defining the callback + [index: number]: SuccessCallback | ErrorCallback; + }; + + // Writable properties on XMLHttpRequest + interface XHRFields extends Partial> { } + } + + interface Transport { + send(headers: PlainObject, completeCallback: Transport.SuccessCallback): void; + abort(): void; + } + + namespace Transport { + interface SuccessCallback { + (status: number, statusText: Ajax.TextStatus, responses?: PlainObject, headers?: string): void; + } + } + + /** + * @see {@link http://api.jquery.com/jquery.ajax/#jqXHR} + */ + interface jqXHR extends Promise3, never, + Ajax.SuccessTextStatus, Ajax.ErrorTextStatus, never, + jqXHR, string, never>, + Pick, + Partial> { + responseJSON?: any; + + /** + * Determine the current state of a Deferred object. + * + * @see {@link https://api.jquery.com/deferred.state/} + * @since 1.7 + */ + state(): 'pending' | 'resolved' | 'rejected'; + statusCode(map: Ajax.StatusCodeCallbacks): void; + } + + namespace jqXHR { + /** + * @deprecated + */ + interface DoneCallback> extends Deferred.Callback3 { } + + /** + * @deprecated + */ + interface FailCallback extends Deferred.Callback3 { } + + /** + * @deprecated + */ + interface AlwaysCallback> extends Deferred.Callback3 { } + } + + // endregion + + // region Callbacks + + interface Callbacks { + /** + * Add a callback or a collection of callbacks to a callback list. + * + * @param callback A function, or array of functions, that are to be added to the callback list. + * @param callbacks A function, or array of functions, that are to be added to the callback list. + * @see {@link https://api.jquery.com/callbacks.add/} + * @since 1.7 + */ + add(callback: TypeOrArray, ...callbacks: Array>): this; + /** + * Disable a callback list from doing anything more. + * + * @see {@link https://api.jquery.com/callbacks.disable/} + * @since 1.7 + */ + disable(): this; + /** + * Determine if the callbacks list has been disabled. + * + * @see {@link https://api.jquery.com/callbacks.disabled/} + * @since 1.7 + */ + disabled(): boolean; + /** + * Remove all of the callbacks from a list. + * + * @see {@link https://api.jquery.com/callbacks.empty/} + * @since 1.7 + */ + empty(): this; + /** + * Call all of the callbacks with the given arguments. + * + * @param args The argument or list of arguments to pass back to the callback list. + * @see {@link https://api.jquery.com/callbacks.fire/} + * @since 1.7 + */ + fire(...args: any[]): this; + /** + * Call all callbacks in a list with the given context and arguments. + * + * @param context A reference to the context in which the callbacks in the list should be fired. + * @param args An argument, or array of arguments, to pass to the callbacks in the list. + * @see {@link https://api.jquery.com/callbacks.fireWith/} + * @since 1.7 + */ + fireWith(context: object, args?: ArrayLike): this; + /** + * Determine if the callbacks have already been called at least once. + * + * @see {@link https://api.jquery.com/callbacks.fired/} + * @since 1.7 + */ + fired(): boolean; + /** + * Determine whether or not the list has any callbacks attached. If a callback is provided as an + * argument, determine whether it is in a list. + * + * @param callback The callback to search for. + * @see {@link https://api.jquery.com/callbacks.has/} + * @since 1.7 + */ + has(callback?: T): boolean; + /** + * Lock a callback list in its current state. + * + * @see {@link https://api.jquery.com/callbacks.lock/} + * @since 1.7 + */ + lock(): this; + /** + * Determine if the callbacks list has been locked. + * + * @see {@link https://api.jquery.com/callbacks.locked/} + * @since 1.7 + */ + locked(): boolean; + /** + * Remove a callback or a collection of callbacks from a callback list. + * + * @param callbacks A function, or array of functions, that are to be removed from the callback list. + * @see {@link https://api.jquery.com/callbacks.remove/} + * @since 1.7 + */ + remove(...callbacks: T[]): this; + } + + // endregion + + // region CSS + + interface CSSHook { + get(this: this, elem: TElement, computed: any, extra: any): any; + set(this: this, elem: TElement, value: any): void; + } + + // endregion + + // region Deferred + + /** + * Any object that has a then method. + */ + interface Thenable extends PromiseLike { } + + // Type parameter guide + // -------------------- + // Each type parameter represents a parameter in one of the three possible callbacks. + // + // The first letter indicates which position the parameter is in. + // + // T = A = 1st position + // U = B = 2nd position + // V = C = 3rd position + // + // The second letter indicates which whether it is a [R]esolve, Re[J]ect, or [N]otify value. + // + // The third letter indicates whether the value is returned in the [D]one filter, [F]ail filter, or [P]rogress filter. + /** + * This object provides a subset of the methods of the Deferred object (then, done, fail, always, + * pipe, progress, state and promise) to prevent users from changing the state of the Deferred. + * + * @see {@link http://api.jquery.com/Types/#Promise} + */ + interface Promise3 { + /** + * Add handlers to be called when the Deferred object is either resolved or rejected. + * + * @param alwaysCallback A function, or array of functions, that is called when the Deferred is resolved or rejected. + * @param alwaysCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. + * @see {@link https://api.jquery.com/deferred.always/} + * @since 1.6 + */ + always(alwaysCallback: TypeOrArray>, + ...alwaysCallbacks: Array>>): this; + /** + * Add handlers to be called when the Deferred object is resolved. + * + * @param doneCallback A function, or array of functions, that are called when the Deferred is resolved. + * @param doneCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. + * @see {@link https://api.jquery.com/deferred.done/} + * @since 1.5 + */ + done(doneCallback: TypeOrArray>, + ...doneCallbacks: Array>>): this; + /** + * Add handlers to be called when the Deferred object is rejected. + * + * @param failCallback A function, or array of functions, that are called when the Deferred is rejected. + * @param failCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.fail/} + * @since 1.5 + */ + fail(failCallback: TypeOrArray>, + ...failCallbacks: Array>>): this; + /** + * Add handlers to be called when the Deferred object generates progress notifications. + * + * @param progressCallback A function, or array of functions, to be called when the Deferred generates progress notifications. + * @param progressCallbacks Optional additional functions, or arrays of functions, to be called when the Deferred generates + * progress notifications. + * @see {@link https://api.jquery.com/deferred.progress/} + * @since 1.7 + */ + progress(progressCallback: TypeOrArray>, + ...progressCallbacks: Array>>): this; + /** + * Return a Deferred's Promise object. + * + * @param target Object onto which the promise methods have to be attached + * @see {@link https://api.jquery.com/deferred.promise/} + * @since 1.5 + */ + promise(target: TTarget): this & TTarget; + /** + * Return a Deferred's Promise object. + * + * @see {@link https://api.jquery.com/deferred.promise/} + * @since 1.5 + */ + promise(): this; + /** + * Determine the current state of a Deferred object. + * + * @see {@link https://api.jquery.com/deferred.state/} + * @since 1.7 + */ + state(): 'pending' | 'resolved' | 'rejected'; + + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: (t: TR, u: UR, v: VR) => Promise3 | Thenable | ARD, + failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | AJF, + progressFilter: (t: TN, u: UN, v: VN) => Promise3 | Thenable | ANP): Promise3; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: null, + failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | AJF, + progressFilter: (t: TN, u: UN, v: VN) => Promise3 | Thenable | ANP): Promise3; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: (t: TR, u: UR, v: VR) => Promise3 | Thenable | ARD, + failFilter: null, + progressFilter: (t: TN, u: UN, v: VN) => Promise3 | Thenable | ANP): Promise3; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: (t: TR, u: UR, v: VR) => Promise3 | Thenable | ARD, + failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | AJF, + progressFilter?: null): Promise3; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: (t: TR, u: UR, v: VR) => Promise3 | Thenable | ARD, + failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | AJF, + progressFilter?: null): Promise3; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: null, + failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | AJF, + progressFilter?: null): Promise3; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: (t: TR, u: UR, v: VR) => Promise3 | Thenable | ARD, + failFilter?: null, + progressFilter?: null): Promise3; + + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: (t: TR, u: UR, v: VR) => Promise3 | Thenable | ARD, + failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | ARF, + progressFilter: (t: TN, u: UN, v: VN) => Promise3 | Thenable | ANP): Promise3; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: null, + failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | ARF, + progressFilter: (t: TN, u: UN, v: VN) => Promise3 | Thenable | ANP): Promise3; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: (t: TR, u: UR, v: VR) => Promise3 | Thenable | ARD, + failFilter: null, + progressFilter: (t: TN, u: UN, v: VN) => Promise3 | Thenable | ANP): Promise3; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: null, + failFilter: null, + progressFilter: (t: TN, u: UN, v: VN) => Promise3 | Thenable | ANP): Promise3; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: (t: TR, u: UR, v: VR) => Promise3 | Thenable | ARD, + failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | ARF, + progressFilter?: null): Promise3; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: null, + failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | ARF, + progressFilter?: null): Promise3; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: (t: TR, u: UR, v: VR) => Promise3 | Thenable | ARD, + failFilter?: null, + progressFilter?: null): Promise3; + + /** + * Add handlers to be called when the Deferred object is rejected. + * + * @param failFilter A function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.catch/} + * @since 3.0 + */ + catch + (failFilter: (t: TJ, u: UJ, v: VJ) => Promise3 | Thenable | ARF): Promise3; + } + + /** + * This object provides a subset of the methods of the Deferred object (then, done, fail, always, + * pipe, progress, state and promise) to prevent users from changing the state of the Deferred. + * + * @see {@link http://api.jquery.com/Types/#Promise} + */ + interface Promise2 extends Promise3 { } + + /** + * This object provides a subset of the methods of the Deferred object (then, done, fail, always, + * pipe, progress, state and promise) to prevent users from changing the state of the Deferred. + * + * @see {@link http://api.jquery.com/Types/#Promise} + */ + interface Promise { + /** + * Add handlers to be called when the Deferred object is either resolved or rejected. + * + * @param alwaysCallback A function, or array of functions, that is called when the Deferred is resolved or rejected. + * @param alwaysCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. + * @see {@link https://api.jquery.com/deferred.always/} + * @since 1.6 + */ + always(alwaysCallback: TypeOrArray>, + ...alwaysCallbacks: Array>>): this; + /** + * Add handlers to be called when the Deferred object is resolved. + * + * @param doneCallback A function, or array of functions, that are called when the Deferred is resolved. + * @param doneCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. + * @see {@link https://api.jquery.com/deferred.done/} + * @since 1.5 + */ + done(doneCallback: TypeOrArray>, + ...doneCallbacks: Array>>): this; + /** + * Add handlers to be called when the Deferred object is rejected. + * + * @param failCallback A function, or array of functions, that are called when the Deferred is rejected. + * @param failCallbacks Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.fail/} + * @since 1.5 + */ + fail(failCallback: TypeOrArray>, + ...failCallbacks: Array>>): this; + /** + * Add handlers to be called when the Deferred object generates progress notifications. + * + * @param progressCallback A function, or array of functions, to be called when the Deferred generates progress notifications. + * @param progressCallbacks Optional additional functions, or arrays of functions, to be called when the Deferred generates + * progress notifications. + * @see {@link https://api.jquery.com/deferred.progress/} + * @since 1.7 + */ + progress(progressCallback: TypeOrArray>, + ...progressCallbacks: Array>>): this; + /** + * Return a Deferred's Promise object. + * + * @param target Object onto which the promise methods have to be attached + * @see {@link https://api.jquery.com/deferred.promise/} + * @since 1.5 + */ + promise(target: TTarget): JQuery.Promise & TTarget; + /** + * Return a Deferred's Promise object. + * + * @see {@link https://api.jquery.com/deferred.promise/} + * @since 1.5 + */ + promise(): JQuery.Promise; + /** + * Determine the current state of a Deferred object. + * + * @see {@link https://api.jquery.com/deferred.state/} + * @since 1.7 + */ + state(): 'pending' | 'resolved' | 'rejected'; + + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: (...t: TR[]) => Promise | Thenable | ARD, + failFilter: (...t: TJ[]) => Promise | Thenable | AJF, + progressFilter: (...t: TN[]) => Promise | Thenable | ANP): Promise; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: null, + failFilter: (...t: TJ[]) => Promise | Thenable | AJF, + progressFilter: (...t: TN[]) => Promise | Thenable | ANP): Promise; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: (...t: TR[]) => Promise | Thenable | ARD, + failFilter: null, + progressFilter: (...t: TN[]) => Promise | Thenable | ANP): Promise; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: null, + failFilter: (...t: TR[]) => Promise | Thenable | AJF, + progressFilter: (...t: TN[]) => Promise | Thenable | ANP): Promise; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: (...t: TR[]) => Promise | Thenable | ARD, + failFilter: (...t: TJ[]) => Promise | Thenable | AJF, + progressFilter?: null): Promise; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: null, + failFilter: (...t: TJ[]) => Promise | Thenable | AJF, + progressFilter?: null): Promise; + /** + * Utility method to filter and/or chain Deferreds. + * + * @param doneFilter An optional function that is called when the Deferred is resolved. + * @see {@link https://api.jquery.com/deferred.pipe/} + * @since 1.6 + * @since 1.7 + * @deprecated 1.8 + */ + pipe + (doneFilter: (...t: TR[]) => Promise | Thenable | ARD, + failFilter?: null, + progressFilter?: null): Promise; + + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: (...t: TR[]) => Promise | Thenable | ARD, + failFilter: (...t: TJ[]) => Promise | Thenable | ARF, + progressFilter: (...t: TN[]) => Promise | Thenable | ANP): Promise; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: null, + failFilter: (...t: TJ[]) => Promise | Thenable | ARF, + progressFilter: (...t: TN[]) => Promise | Thenable | ANP): Promise; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: (...t: TR[]) => Promise | Thenable | ARD, + failFilter: null, + progressFilter: (...t: TN[]) => Promise | Thenable | ANP): Promise; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: null, + failFilter: null, + progressFilter: (...t: TN[]) => Promise | Thenable | ANP): Promise; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: (...t: TR[]) => Promise | Thenable | ARD, + failFilter: (...t: TJ[]) => Promise | Thenable | ARF, + progressFilter?: null): Promise; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @param failFilter An optional function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: null, + failFilter: (...t: TJ[]) => Promise | Thenable | ARF, + progressFilter?: null): Promise; + /** + * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. + * + * @param doneFilter A function that is called when the Deferred is resolved. + * @see {@link https://api.jquery.com/deferred.then/} + * @since 1.8 + */ + then + (doneFilter: (...t: TR[]) => Promise | Thenable | ARD, + failFilter?: null, + progressFilter?: null): Promise; + + /** + * Add handlers to be called when the Deferred object is rejected. + * + * @param failFilter A function that is called when the Deferred is rejected. + * @see {@link https://api.jquery.com/deferred.catch/} + * @since 3.0 + */ + catch + (failFilter: (...t: TJ[]) => Promise | Thenable | ARF): Promise; + } + + interface DeferredStatic { + // https://jquery.com/upgrade-guide/3.0/#callback-exit + exceptionHook: any; +
    (beforeStart?: (this: JQuery.Deferred, deferred: JQuery.Deferred) => void): JQuery.Deferred; + } + + interface Deferred extends JQuery.Promise { + /** + * Call the progressCallbacks on a Deferred object with the given args. + * + * @param args Optional arguments that are passed to the progressCallbacks. + * @see {@link https://api.jquery.com/deferred.notify/} + * @since 1.7 + */ + notify(...args: TN[]): this; + /** + * Call the progressCallbacks on a Deferred object with the given context and args. + * + * @param context Context passed to the progressCallbacks as the this object. + * @param args An optional array of arguments that are passed to the progressCallbacks. + * @see {@link https://api.jquery.com/deferred.notifyWith/} + * @since 1.7 + */ + notifyWith(context: object, args?: ArrayLike): this; + /** + * Reject a Deferred object and call any failCallbacks with the given args. + * + * @param args Optional arguments that are passed to the failCallbacks. + * @see {@link https://api.jquery.com/deferred.reject/} + * @since 1.5 + */ + reject(...args: TJ[]): this; + /** + * Reject a Deferred object and call any failCallbacks with the given context and args. + * + * @param context Context passed to the failCallbacks as the this object. + * @param args An optional array of arguments that are passed to the failCallbacks. + * @see {@link https://api.jquery.com/deferred.rejectWith/} + * @since 1.5 + */ + rejectWith(context: object, args?: ArrayLike): this; + /** + * Resolve a Deferred object and call any doneCallbacks with the given args. + * + * @param args Optional arguments that are passed to the doneCallbacks. + * @see {@link https://api.jquery.com/deferred.resolve/} + * @since 1.5 + */ + resolve(...args: TR[]): this; + /** + * Resolve a Deferred object and call any doneCallbacks with the given context and args. + * + * @param context Context passed to the doneCallbacks as the this object. + * @param args An optional array of arguments that are passed to the doneCallbacks. + * @see {@link https://api.jquery.com/deferred.resolveWith/} + * @since 1.5 + */ + resolveWith(context: object, args?: ArrayLike): this; + } + + namespace Deferred { + interface Callback3 { + (t: T, u: U, v: V): void; + } + + interface Callback { + (...args: T[]): void; + } + + /** + * @deprecated + */ + interface DoneCallback extends Callback { } + + /** + * @deprecated + */ + interface FailCallback extends Callback { } + + /** + * @deprecated + */ + interface AlwaysCallback extends Callback { } + + /** + * @deprecated + */ + interface ProgressCallback extends Callback { } + } + + // endregion + + // region Effects + + type Duration = number | 'fast' | 'slow'; + // TODO: Is the first element always a string or is that specific to the 'fx' queue? + type Queue = { 0: string; } & Array>; + + interface QueueFunction { + (this: TElement, next: () => void): void; + } + + /** + * @see {@link https://api.jquery.com/animate/#animate-properties-options} + */ + interface EffectsOptions { + /** + * A function to be called when the animation on an element completes or stops without completing (its + * Promise object is either resolved or rejected). + */ + always?(this: TElement, animation: JQuery.Promise, jumpedToEnd: boolean): void; + /** + * A function that is called once the animation on an element is complete. + */ + complete?(this: TElement): void; + /** + * A function to be called when the animation on an element completes (its Promise object is resolved). + */ + done?(this: TElement, animation: JQuery.Promise, jumpedToEnd: boolean): void; + /** + * A string or number determining how long the animation will run. + */ + duration?: Duration; + /** + * A string indicating which easing function to use for the transition. + */ + easing?: string; + /** + * A function to be called when the animation on an element fails to complete (its Promise object is rejected). + */ + fail?(this: TElement, animation: JQuery.Promise, jumpedToEnd: boolean): void; + /** + * A function to be called after each step of the animation, only once per animated element regardless + * of the number of animated properties. + */ + progress?(this: TElement, animation: JQuery.Promise, progress: number, remainingMs: number): void; + /** + * A Boolean indicating whether to place the animation in the effects queue. If false, the animation + * will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case + * the animation is added to the queue represented by that string. When a custom queue name is used the + * animation does not automatically start; you must call .dequeue("queuename") to start it. + */ + queue?: boolean | string; + /** + * An object containing one or more of the CSS properties defined by the properties argument and their + * corresponding easing functions. + */ + specialEasing?: PlainObject; + /** + * A function to call when the animation on an element begins. + */ + start?(this: TElement, animation: JQuery.Promise): void; + /** + * A function to be called for each animated property of each animated element. This function provides + * an opportunity to modify the Tween object to change the value of the property before it is set. + */ + step?(this: TElement, now: number, tween: Tween): void; + } + + interface SpeedSettings { + /** + * A string or number determining how long the animation will run. + */ + duration?: Duration; + /** + * A string indicating which easing function to use for the transition. + */ + easing?: string; + /** + * A function to call once the animation is complete. + */ + complete?(this: TElement): void; + } + + // This should be a class but doesn't work correctly under the JQuery namespace. Tween should be an inner class of jQuery. + // Undocumented + // https://github.com/jquery/api.jquery.com/issues/391 + // https://github.com/jquery/api.jquery.com/issues/61 + interface Tween { + easing: string; + elem: TElement; + end: number; + now: number; + options: EffectsOptions; + pos: number; + prop: string; + start: number; + unit: string; + } + + interface AnimationHook { + (fx: JQuery.Tween): void; + } + + // endregion + + // region Events + + // region Event + + // This should be a class but doesn't work correctly under the JQuery namespace. Event should be an inner class of jQuery. + + // Instance members + interface Event { + /** + * Indicates whether the META key was pressed when the event fired. + * + * @see {@link https://api.jquery.com/event.metaKey/} + * @since 1.0.4 + */ + metaKey: boolean; + /** + * The namespace specified when the event was triggered. + * + * @see {@link https://api.jquery.com/event.namespace/} + * @since 1.4.3 + */ + namespace: string; + /** + * The mouse position relative to the left edge of the document. + * + * @see {@link https://api.jquery.com/event.pageX/} + * @since 1.0.4 + */ + pageX: number; + /** + * The mouse position relative to the top edge of the document. + * + * @see {@link https://api.jquery.com/event.pageY/} + * @since 1.0.4 + */ + pageY: number; + /** + * The last value returned by an event handler that was triggered by this event, unless the value was undefined. + * + * @see {@link https://api.jquery.com/event.result/} + * @since 1.3 + */ + result: any; + /** + * The difference in milliseconds between the time the browser created the event and January 1, 1970. + * + * @see {@link https://api.jquery.com/event.timeStamp/} + * @since 1.2.6 + */ + timeStamp: number; + /** + * Describes the nature of the event. + * + * @see {@link https://api.jquery.com/event.type/} + * @since 1.0 + */ + type: string; + /** + * For key or mouse events, this property indicates the specific key or button that was pressed. + * + * @see {@link https://api.jquery.com/event.which/} + * @since 1.1.3 + */ + which: number; + + /** + * Returns whether event.preventDefault() was ever called on this event object. + * + * @see {@link https://api.jquery.com/event.isDefaultPrevented/} + * @since 1.3 + */ + isDefaultPrevented(): boolean; + + /** + * Returns whether event.stopImmediatePropagation() was ever called on this event object. + * + * @see {@link https://api.jquery.com/event.isImmediatePropagationStopped/} + * @since 1.3 + */ + isImmediatePropagationStopped(): boolean; + + /** + * Returns whether event.stopPropagation() was ever called on this event object. + * + * @see {@link https://api.jquery.com/event.isPropagationStopped/} + * @since 1.3 + */ + isPropagationStopped(): boolean; + + /** + * If this method is called, the default action of the event will not be triggered. + * + * @see {@link https://api.jquery.com/event.preventDefault/} + * @since 1.0 + */ + preventDefault(): void; + + /** + * Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree. + * + * @see {@link https://api.jquery.com/event.stopImmediatePropagation/} + * @since 1.3 + */ + stopImmediatePropagation(): void; + + /** + * Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. + * + * @see {@link https://api.jquery.com/event.stopPropagation/} + * @since 1.0 + */ + stopPropagation(): void; + } + + // Generic members + interface Event extends Partial> { + /** + * The current DOM element within the event bubbling phase. + * + * @see {@link https://api.jquery.com/event.currentTarget/} + * @since 1.3 + */ + currentTarget: TTarget; + /** + * An optional object of data passed to an event method when the current executing handler is bound. + * + * @see {@link https://api.jquery.com/event.data/} + * @since 1.1 + */ + data: TData; + /** + * The element where the currently-called jQuery event handler was attached. + * + * @see {@link https://api.jquery.com/event.delegateTarget/} + * @since 1.7 + */ + delegateTarget: TTarget; + originalEvent: _Event; + /** + * The other DOM element involved in the event, if any. + * + * @see {@link https://api.jquery.com/event.relatedTarget/} + * @since 1.1.4 + */ + relatedTarget: TTarget | null; + /** + * The DOM element that initiated the event. + * + * @see {@link https://api.jquery.com/event.target/} + * @since 1.0 + */ + target: TTarget; + } + + // Static members + interface EventStatic { + (event: string, properties?: T): JQuery.Event & T; + (properties: T): JQuery.Event & T; + new (event: string, properties?: T): JQuery.Event & T; + new (properties: T): JQuery.Event & T; + } + + interface EventLike { + type: string; + } + + // endregion + + // Extra parameters can be passed from trigger() + interface EventHandler { + (this: TContext, eventObject: JQuery.Event, ...args: any[]): void | false | any; + } + + // Provided for convenience for use with jQuery.Event.which + const enum Mouse { + None = 0, + Left = 1, + Middle = 2, + Right = 3 + } + + // Provided for convenience for use with jQuery.Event.which + const enum Key { + Backspace = 8, + Tab = 9, + Enter = 13, + Shift = 16, + Control = 17, + Alt = 18, + CapsLock = 20, + Escape = 27, + Space = 32, + PageUp = 33, + PageDown = 34, + End = 35, + Home = 36, + ArrowLeft = 37, + ArrowUp = 38, + ArrowRight = 39, + ArrowDown = 40, + + Semicolon = 186, + Colon = 186, + EqualsSign = 187, + Plus = 187, + Comma = 188, + LessThanSign = 188, + Minus = 189, + Underscore = 189, + Period = 190, + GreaterThanSign = 190, + ForwardSlash = 191, + QuestionMark = 191, + Backtick = 192, + Tilde = 192, + OpeningSquareBracket = 219, + OpeningCurlyBrace = 219, + Backslash = 220, + Pipe = 220, + ClosingSquareBracket = 221, + ClosingCurlyBrace = 221, + SingleQuote = 222, + DoubleQuote = 222, + + Pause = 19, + PrintScreen = 44, + Insert = 45, + Delete = 46, + Num0 = 48, + Num1 = 49, + Num2 = 50, + Num3 = 51, + Num4 = 52, + Num5 = 53, + Num6 = 54, + Num7 = 55, + Num8 = 56, + Num9 = 57, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + MetaLeft = 91, + MetaRight = 92, + ContextMenu = 93, + Numpad0 = 96, + Numpad1 = 97, + Numpad2 = 98, + Numpad3 = 99, + Numpad4 = 100, + Numpad5 = 101, + Numpad6 = 102, + Numpad7 = 103, + Numpad8 = 104, + Numpad9 = 105, + NumpadMultiply = 106, + NumpadAdd = 107, + NumpadSubtract = 109, + NumpadDecimal = 110, + NumpadDivide = 111, + F1 = 112, + F2 = 113, + F3 = 114, + F4 = 115, + F5 = 116, + F6 = 117, + F7 = 118, + F8 = 119, + F9 = 120, + F10 = 121, + F11 = 122, + F12 = 123, + NumLock = 144, + ScrollLock = 145 + } + + // endregion + + interface NameValuePair { + name: string; + value: string; + } + + interface Coordinates { + left: number; + top: number; + } + + interface ValHook { + get?(elem: TElement): any; + set?(elem: TElement, value: any): any; + } +} + +// region Legacy types + +interface JQueryCallback extends JQuery.Callbacks { } +interface JQueryDeferred extends JQuery.Deferred { } +interface JQueryEventConstructor extends JQuery.Event { } +interface JQueryDeferred extends JQuery.Deferred { } +interface JQueryAjaxSettings extends JQuery.AjaxSettings { } +interface JQueryAnimationOptions extends JQuery.EffectsOptions { } +interface JQueryCoordinates extends JQuery.Coordinates { } +interface JQueryGenericPromise extends JQuery.Thenable { } +interface JQueryXHR extends JQuery.jqXHR { } +interface JQueryPromise extends JQuery.Promise { } +interface JQuerySerializeArrayElement extends JQuery.NameValuePair { } + /** - * Interface for the JQuery promise/deferred callbacks + * @deprecated 1.9 + */ +interface JQuerySupport extends JQuery.PlainObject { } + +// Legacy types that are not represented in the current type definitions are marked deprecated. + +/** + * @deprecated */ interface JQueryPromiseCallback { (value?: T, ...args: any[]): void; } - -interface JQueryPromiseOperator { - (callback1: JQueryPromiseCallback|JQueryPromiseCallback[], ...callbacksN: Array|JQueryPromiseCallback[]>): JQueryPromise; -} - /** - * Interface for the JQuery promise, part of callbacks - * @see {@link https://api.jquery.com/category/deferred-object/} + * @deprecated */ -interface JQueryPromise extends JQueryGenericPromise { +interface JQueryParam { /** - * Determine the current state of a Deferred object. - * @see {@link https://api.jquery.com/deferred.state/} - */ - state(): string; - /** - * Add handlers to be called when the Deferred object is either resolved or rejected. + * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. * - * @param alwaysCallback1 A function, or array of functions, that is called when the Deferred is resolved or rejected. - * @param alwaysCallbackN Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. - * @see {@link https://api.jquery.com/deferred.always/} + * @param obj An array or object to serialize. + * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization. */ - always(alwaysCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...alwaysCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved. - * - * @param doneCallback1 A function, or array of functions, that are called when the Deferred is resolved. - * @param doneCallbackN Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. - * @see {@link https://api.jquery.com/deferred.done/} - */ - done(doneCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...doneCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is rejected. - * - * @param failCallback1 A function, or array of functions, that are called when the Deferred is rejected. - * @param failCallbackN Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. - * @see {@link https://api.jquery.com/deferred.fail/} - */ - fail(failCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...failCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; - /** - * Add handlers to be called when the Deferred object generates progress notifications. - * - * @param progressCallback1 A function, or array of functions, to be called when the Deferred generates progress notifications. - * @param progressCallbackN Optional additional functions, or arrays of functions, to be called when the Deferred generates progress notifications. - * @see {@link https://api.jquery.com/deferred.progress/} - */ - progress(progressCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...progressCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; - - // Deprecated - given no typings - pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise; - - /** - * Return a Deferred's Promise object. - * - * @param target Object onto which the promise methods have to be attached - * @see {@link https://api.jquery.com/deferred.promise/} - */ - promise(target?: any): JQueryPromise; + (obj: any, traditional?: boolean): string; } - /** - * Interface for the JQuery deferred, part of callbacks - * @see {@link https://api.jquery.com/category/deferred-object/} - */ -interface JQueryDeferred extends JQueryGenericPromise { - /** - * Determine the current state of a Deferred object. - * @see {@link https://api.jquery.com/deferred.state/} - */ - state(): string; - /** - * Add handlers to be called when the Deferred object is either resolved or rejected. - * - * @param alwaysCallback1 A function, or array of functions, that is called when the Deferred is resolved or rejected. - * @param alwaysCallbackN Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. - * @see {@link https://api.jquery.com/deferred.always/} - */ - always(alwaysCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...alwaysCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is resolved. - * - * @param doneCallback1 A function, or array of functions, that are called when the Deferred is resolved. - * @param doneCallbackN Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. - * @see {@link https://api.jquery.com/deferred.done/} - */ - done(doneCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...doneCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is rejected. - * - * @param failCallback1 A function, or array of functions, that are called when the Deferred is rejected. - * @param failCallbackN Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. - * @see {@link https://api.jquery.com/deferred.fail/} - */ - fail(failCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...failCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object generates progress notifications. - * - * @param progressCallback1 A function, or array of functions, to be called when the Deferred generates progress notifications. - * @param progressCallbackN Optional additional functions, or arrays of functions, to be called when the Deferred generates progress notifications. - * @see {@link https://api.jquery.com/deferred.progress/} - */ - progress(progressCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...progressCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - - /** - * Call the progressCallbacks on a Deferred object with the given args. - * - * @param args Optional arguments that are passed to the progressCallbacks. - * @see {@link https://api.jquery.com/deferred.notify/} - */ - notify(value?: any, ...args: any[]): JQueryDeferred; - - /** - * Call the progressCallbacks on a Deferred object with the given context and args. - * - * @param context Context passed to the progressCallbacks as the this object. - * @param args Optional arguments that are passed to the progressCallbacks. - * @see {@link https://api.jquery.com/deferred.notifyWith/} - */ - notifyWith(context: any, args?: any[]): JQueryDeferred; - - /** - * Reject a Deferred object and call any failCallbacks with the given args. - * - * @param args Optional arguments that are passed to the failCallbacks. - * @see {@link https://api.jquery.com/deferred.reject/} - */ - reject(value?: any, ...args: any[]): JQueryDeferred; - /** - * Reject a Deferred object and call any failCallbacks with the given context and args. - * - * @param context Context passed to the failCallbacks as the this object. - * @param args An optional array of arguments that are passed to the failCallbacks. - * @see {@link https://api.jquery.com/deferred.rejectWith/} - */ - rejectWith(context: any, args?: any[]): JQueryDeferred; - - /** - * Resolve a Deferred object and call any doneCallbacks with the given args. - * - * @param value First argument passed to doneCallbacks. - * @param args Optional subsequent arguments that are passed to the doneCallbacks. - * @see {@link https://api.jquery.com/deferred.resolve/} - */ - resolve(value?: T, ...args: any[]): JQueryDeferred; - - /** - * Resolve a Deferred object and call any doneCallbacks with the given context and args. - * - * @param context Context passed to the doneCallbacks as the this object. - * @param args An optional array of arguments that are passed to the doneCallbacks. - * @see {@link https://api.jquery.com/deferred.resolveWith/} - */ - resolveWith(context: any, args?: T[]): JQueryDeferred; - - /** - * Return a Deferred's Promise object. - * - * @param target Object onto which the promise methods have to be attached - * @see {@link https://api.jquery.com/deferred.promise/} - */ - promise(target?: any): JQueryPromise; - - // Deprecated - given no typings - pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise; -} - -/** - * Interface of the JQuery extension of the W3C event object - * @see {@link https://api.jquery.com/category/events/event-object/} + * @deprecated */ interface BaseJQueryEventObject extends Event { /** @@ -581,14 +5603,18 @@ interface BaseJQueryEventObject extends Event { */ metaKey: boolean; } - +/** + * @deprecated + */ interface JQueryInputEventObject extends BaseJQueryEventObject { altKey: boolean; ctrlKey: boolean; metaKey: boolean; shiftKey: boolean; } - +/** + * @deprecated + */ interface JQueryMouseEventObject extends JQueryInputEventObject { button: number; clientX: number; @@ -600,3190 +5626,39 @@ interface JQueryMouseEventObject extends JQueryInputEventObject { screenX: number; screenY: number; } - +/** + * @deprecated + */ interface JQueryKeyEventObject extends JQueryInputEventObject { char: any; charCode: number; key: any; keyCode: number; } - -interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject{ -} - /** - * A collection of properties that represent the presence of different browser features or bugs. - * - * Intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally - * to improve page startup performance. For your own project's feature-detection needs, we strongly recommend the - * use of an external library such as {@link http://modernizr.com/|Modernizr} instead of dependency on properties - * in jQuery.support. - * - * @deprecated since version 1.9 + * @deprecated */ -interface JQuerySupport { - ajax?: boolean; - boxModel?: boolean; - changeBubbles?: boolean; - checkClone?: boolean; - checkOn?: boolean; - cors?: boolean; - cssFloat?: boolean; - hrefNormalized?: boolean; - htmlSerialize?: boolean; - leadingWhitespace?: boolean; - noCloneChecked?: boolean; - noCloneEvent?: boolean; - opacity?: boolean; - optDisabled?: boolean; - optSelected?: boolean; - scriptEval? (): boolean; - style?: boolean; - submitBubbles?: boolean; - tbody?: boolean; -} - -interface JQueryParam { - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * - * @param obj An array or object to serialize. - */ - (obj: any): string; - - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * - * @param obj An array or object to serialize. - * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization. - */ - (obj: any, traditional: boolean): string; -} - +interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject { } /** - * The interface used to construct jQuery events (with $.Event). It is - * defined separately instead of inline in JQueryStatic to allow - * overriding the construction function with specific strings - * returning specific event objects. + * @deprecated */ -interface JQueryEventConstructor { - (name: string, eventProperties?: any): JQueryEventObject; - new (name: string, eventProperties?: any): JQueryEventObject; +interface JQueryPromiseOperator { + (callback1: JQuery.TypeOrArray>, + ...callbacksN: Array>>): JQueryPromise; } - /** - * The interface used to specify coordinates. + * @deprecated */ -interface JQueryCoordinates { - left: number; - top: number; -} - -/** - * Elements in the array returned by serializeArray() - */ -interface JQuerySerializeArrayElement { - name: string; - value: string; -} - -/** - * @see {@link https://api.jquery.com/animate/} - */ -interface JQueryAnimationOptions { - /** - * A string or number determining how long the animation will run. - */ - duration?: any; - /** - * A string indicating which easing function to use for the transition. - */ - easing?: string; - /** - * A function to call once the animation is complete. - */ - complete?: Function; - /** - * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. - */ - step?: (now: number, tween: any) => any; - /** - * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8) - */ - progress?: (animation: JQueryPromise, progress: number, remainingMs: number) => any; - /** - * A function to call when the animation begins. (version added: 1.8) - */ - start?: (animation: JQueryPromise) => any; - /** - * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8) - */ - done?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8) - */ - fail?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8) - */ - always?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. - */ - queue?: any; - /** - * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4) - */ - specialEasing?: Object; -} - interface JQueryEasingFunction { - ( percent: number ): number; + (percent: number): number; } - +/** + * @deprecated + */ interface JQueryEasingFunctions { - [ name: string ]: JQueryEasingFunction; + [name: string]: JQueryEasingFunction; linear: JQueryEasingFunction; swing: JQueryEasingFunction; } -/** - * Static members of jQuery (those on $ and jQuery themselves) - * - * @see {@link https://api.jquery.com/Types/#jQuery} - */ -interface JQueryStatic { - - /** - * Perform an asynchronous HTTP (Ajax) request. - * - * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). - * @see {@link https://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings} - */ - ajax(settings: JQueryAjaxSettings): JQueryXHR; - /** - * Perform an asynchronous HTTP (Ajax) request. - * - * @param url A string containing the URL to which the request is sent. - * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). - * @see {@link https://api.jquery.com/jQuery.ajax/#jQuery-ajax-url-settings} - */ - ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR; - - /** - * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax(). - * - * @param dataTypes An optional string containing one or more space-separated dataTypes - * @param handler A handler to set default values for future Ajax requests. - * @see {@link https://api.jquery.com/jQuery.ajaxPrefilter/} - */ - ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void; - /** - * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax(). - * - * @param handler A handler to set default values for future Ajax requests. - * @see {@link https://api.jquery.com/jQuery.ajaxPrefilter/} - */ - ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void; - - /** - * Creates an object that handles the actual transmission of Ajax data. - * - * @param dataType A string identifying the data type to use. - * @param handler A handler to return the new transport object to use with the data type provided in the first argument. - * @see {@link https://api.jquery.com/jQuery.ajaxTransport/} - */ - ajaxTransport(dataType: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void; - - ajaxSettings: JQueryAjaxSettings; - - /** - * Set default values for future Ajax requests. Its use is not recommended. - * - * @param options A set of key/value pairs that configure the default Ajax request. All options are optional. - * @see {@link https://api.jquery.com/jQuery.ajaxSetup/} - */ - ajaxSetup(options: JQueryAjaxSettings): void; - - /** - * Load data from the server using a HTTP GET request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). - * @see {@link https://api.jquery.com/jQuery.get/#jQuery-get-url-data-success-dataType} - */ - get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP GET request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). - * @see {@link https://api.jquery.com/jQuery.get/#jQuery-get-url-data-success-dataType} - */ - get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP GET request. - * - * @param settings The JQueryAjaxSettings to be used for the request - * @see {@link https://api.jquery.com/jQuery.get/#jQuery-get-settings} - */ - get(settings : JQueryAjaxSettings): JQueryXHR; - /** - * Load JSON-encoded data from the server using a GET HTTP request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - * @see {@link https://api.jquery.com/jQuery.getJSON/} - */ - getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - /** - * Load JSON-encoded data from the server using a GET HTTP request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - * @see {@link https://api.jquery.com/jQuery.getJSON/} - */ - getJSON(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - /** - * Load a JavaScript file from the server using a GET HTTP request, then execute it. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - * @see {@link https://api.jquery.com/jQuery.getScript/} - */ - getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * - * @see {@link https://api.jquery.com/jQuery.param/} - */ - param: JQueryParam; - - /** - * Load data from the server using a HTTP POST request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). - * @see {@link https://api.jquery.com/jQuery.post/#jQuery-post-url-data-success-dataType} - */ - post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP POST request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). - * @see {@link https://api.jquery.com/jQuery.post/#jQuery-post-url-data-success-dataType} - */ - post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP POST request. - * - * @param settings The JQueryAjaxSettings to be used for the request - * @see {@link https://api.jquery.com/jQuery.post/#jQuery-post-settings} - */ - post(settings : JQueryAjaxSettings): JQueryXHR; - /** - * A multi-purpose callbacks list object that provides a powerful way to manage callback lists. - * - * @param flags An optional list of space-separated flags that change how the callback list behaves. - * @see {@link https://api.jquery.com/jQuery.Callbacks/} - */ - Callbacks(flags?: string): JQueryCallback; - - /** - * Holds or releases the execution of jQuery's ready event. - * - * @param hold Indicates whether the ready hold is being requested or released - * @see {@link https://api.jquery.com/jQuery.holdReady/} - */ - holdReady(hold: boolean): void; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param selector A string containing a selector expression - * @param context A DOM Element, Document, or jQuery to use as context - * @see {@link https://api.jquery.com/jQuery/#jQuery-selector-context} - */ - (selector: string, context?: Element|JQuery): JQuery; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param element A DOM element to wrap in a jQuery object. - * @see {@link https://api.jquery.com/jQuery/#jQuery-element} - */ - (element: Element): JQuery; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object. - * @see {@link https://api.jquery.com/jQuery/#jQuery-elementArray} - */ - (elementArray: Element[]): JQuery; - - /** - * Binds a function to be executed when the DOM has finished loading. - * - * @param callback A function to execute after the DOM is ready. - * @see {@link https://api.jquery.com/jQuery/#jQuery-callback} - */ - (callback: (jQueryAlias?: JQueryStatic) => any): JQuery; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param object A plain object to wrap in a jQuery object. - * @see {@link https://api.jquery.com/jQuery/#jQuery-object} - */ - (object: {}): JQuery; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param object An existing jQuery object to clone. - * @see {@link https://api.jquery.com/jQuery/#jQuery-object} - */ - (object: JQuery): JQuery; - - /** - * Specify a function to execute when the DOM is fully loaded. - * @see {@link https://api.jquery.com/jQuery/#jQuery} - */ - (): JQuery; - - /** - * Creates DOM elements on the fly from the provided string of raw HTML. - * - * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML. - * @param ownerDocument A document in which the new elements will be created. - * @see {@link https://api.jquery.com/jQuery/#jQuery-html-ownerDocument} - */ - (html: string, ownerDocument?: Document): JQuery; - - /** - * Creates DOM elements on the fly from the provided string of raw HTML. - * - * @param html A string defining a single, standalone, HTML element (e.g.
    or
    ). - * @param attributes An object of attributes, events, and methods to call on the newly-created element. - * @see {@link https://api.jquery.com/jQuery/#jQuery-html-attributes} - */ - (html: string, attributes: Object): JQuery; - - /** - * Relinquish jQuery's control of the $ variable. - * - * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself). - * @see {@link https://api.jquery.com/jQuery.noConflict/} - */ - noConflict(removeAll?: boolean): JQueryStatic; - - /** - * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events. - * - * @param deferreds One or more Deferred objects, or plain JavaScript objects. - * @see {@link https://api.jquery.com/jQuery.when/} - */ - when(...deferreds: Array/* as JQueryDeferred */>): JQueryPromise; - - /** - * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties. - * @see {@link https://api.jquery.com/jQuery.cssHooks/} - */ - cssHooks: { [key: string]: any; }; - - /** - * An object containing all CSS properties that may be used without a unit. The .css() method uses this object to see if it may append px to unitless values. - * @see {@link https://api.jquery.com/jQuery.cssNumber/} - */ - cssNumber: any; - - /** - * Store arbitrary data associated with the specified element. Returns the value that was set. - * - * @param element The DOM element to associate with the data. - * @param key A string naming the piece of data to set. - * @param value The new data value. - * @see {@link https://api.jquery.com/jQuery.data/#jQuery-data-element-key-value} - */ - data(element: Element, key: string, value: T): T; - /** - * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element. - * - * @param element The DOM element to associate with the data. - * @param key A string naming the piece of data to set. - * @see {@link https://api.jquery.com/jQuery.data/#jQuery-data-element-key} - */ - data(element: Element, key: string): any; - /** - * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element. - * - * @param element The DOM element to associate with the data. - * @see {@link https://api.jquery.com/jQuery.data/#jQuery-data-element} - */ - data(element: Element): any; - - /** - * Execute the next function on the queue for the matched element. - * - * @param element A DOM element from which to remove and execute a queued function. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @see {@link https://api.jquery.com/jQuery.dequeue/} - */ - dequeue(element: Element, queueName?: string): void; - - /** - * Determine whether an element has any jQuery data associated with it. - * - * @param element A DOM element to be checked for data. - * @see {@link https://api.jquery.com/jQuery.hasData/} - */ - hasData(element: Element): boolean; - - /** - * Show the queue of functions to be executed on the matched element. - * - * @param element A DOM element to inspect for an attached queue. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @see {@link https://api.jquery.com/jQuery.queue/#jQuery-queue-element-queueName} - */ - queue(element: Element, queueName?: string): any[]; - /** - * Manipulate the queue of functions to be executed on the matched element. - * - * @param element A DOM element where the array of queued functions is attached. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param newQueue An array of functions to replace the current queue contents. - * @see {@link https://api.jquery.com/jQuery.queue/#jQuery-queue-element-queueName-newQueue} - */ - queue(element: Element, queueName: string, newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed on the matched element. - * - * @param element A DOM element on which to add a queued function. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param callback The new function to add to the queue. - * @see {@link https://api.jquery.com/jQuery.queue/#jQuery-queue-element-queueName-callback} - */ - queue(element: Element, queueName: string, callback: Function): JQuery; - - /** - * Remove a previously-stored piece of data. - * - * @param element A DOM element from which to remove data. - * @param name A string naming the piece of data to remove. - * @see {@link https://api.jquery.com/jQuery.removeData/} - */ - removeData(element: Element, name?: string): JQuery; - - /** - * A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. - * - * @param beforeStart A function that is called just before the constructor returns. - * @see {@link https://api.jquery.com/jQuery.Deferred/} - */ - Deferred(beforeStart?: (deferred: JQueryDeferred) => any): JQueryDeferred; - - /** - * Effects - */ - - easing: JQueryEasingFunctions; - - fx: { - tick: () => void; - /** - * The rate (in milliseconds) at which animations fire. - * @see {@link https://api.jquery.com/jQuery.fx.interval/} - */ - interval: number; - stop: () => void; - speeds: { slow: number; fast: number; }; - /** - * Globally disable all animations. - * @see {@link https://api.jquery.com/jQuery.fx.off/} - */ - off: boolean; - step: any; - }; - - /** - * Takes a function and returns a new one that will always have a particular context. - * - * @param func The function whose context will be changed. - * @param context The object to which the context (this) of the function should be set. - * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument. - * @see {@link https://api.jquery.com/jQuery.proxy/#jQuery-proxy-function-context-additionalArguments} - */ - proxy(func: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any; - /** - * Takes a function and returns a new one that will always have a particular context. - * - * @param context The object to which the context (this) of the function should be set. - * @param name The name of the function whose context will be changed (should be a property of the context object). - * @param additionalArguments Any number of arguments to be passed to the function named in the name argument. - * @see {@link https://api.jquery.com/jQuery.proxy/#jQuery-proxy-context-name-additionalArguments} - */ - proxy(context: Object, name: string, ...additionalArguments: any[]): any; - - Event: JQueryEventConstructor; - - /** - * Takes a string and throws an exception containing it. - * - * @param message The message to send out. - * @see {@link https://api.jquery.com/jQuery.error/} - */ - error(message: any): JQuery; - - expr: any; - fn: any; //TODO: Decide how we want to type this - - isReady: boolean; - - // Properties - support: JQuerySupport; - - /** - * Check to see if a DOM element is a descendant of another DOM element. - * - * @param container The DOM element that may contain the other element. - * @param contained The DOM element that may be contained by (a descendant of) the other element. - * @see {@link https://api.jquery.com/jQuery.contains/} - */ - contains(container: Element, contained: Element): boolean; - - /** - * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * - * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. Will break the loop by returning false. - * @returns the first argument, the object that is iterated. - * @see {@link https://api.jquery.com/jQuery.each/#jQuery-each-array-callback} - */ - each( - collection: T[], - callback: (indexInArray: number, valueOfElement: T) => boolean | void - ): T[]; - - /** - * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * - * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. Will break the loop by returning false. - * @returns the first argument, the object that is iterated. - * @see {@link https://api.jquery.com/jQuery.each/#jQuery-each-object-callback} - */ - each( - collection: T, - // TODO: `(keyInObject: keyof T, valueOfElement: T[keyof T])`, when TypeScript 2.1 allowed in repository - callback: (keyInObject: string, valueOfElement: any) => boolean | void - ): T; - - /** - * Merge the contents of two or more objects together into the first object. - * - * @param target An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument. - * @param object1 An object containing additional properties to merge in. - * @param objectN Additional objects containing properties to merge in. - * @see {@link https://api.jquery.com/jQuery.extend/#jQuery-extend-target-object1-objectN} - */ - extend(target: any, object1?: any, ...objectN: any[]): any; - /** - * Merge the contents of two or more objects together into the first object. - * - * @param deep If true, the merge becomes recursive (aka. deep copy). - * @param target The object to extend. It will receive the new properties. - * @param object1 An object containing additional properties to merge in. - * @param objectN Additional objects containing properties to merge in. - * @see {@link https://api.jquery.com/jQuery.extend/#jQuery-extend-deep-target-object1-objectN} - */ - extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any; - - /** - * Execute some JavaScript code globally. - * - * @param code The JavaScript code to execute. - * @see {@link https://api.jquery.com/jQuery.globalEval/} - */ - globalEval(code: string): any; - - /** - * Finds the elements of an array which satisfy a filter function. The original array is not affected. - * - * @param array The array to search through. - * @param func The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value. this will be the global window object. - * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false. - * @see {@link https://api.jquery.com/jQuery.grep/} - */ - grep(array: T[], func: (elementOfArray?: T, indexInArray?: number) => boolean, invert?: boolean): T[]; - - /** - * Search for a specified value within an array and return its index (or -1 if not found). - * - * @param value The value to search for. - * @param array An array through which to search. - * @param fromIndex The index of the array at which to begin the search. The default is 0, which will search the whole array. - * @see {@link https://api.jquery.com/jQuery.inArray/} - */ - inArray(value: T, array: T[], fromIndex?: number): number; - - /** - * Determine whether the argument is an array. - * - * @param obj Object to test whether or not it is an array. - * @see {@link https://api.jquery.com/jQuery.isArray/} - */ - isArray(obj: any): obj is Array; - /** - * Check to see if an object is empty (contains no enumerable properties). - * - * @param obj The object that will be checked to see if it's empty. - * @see {@link https://api.jquery.com/jQuery.isEmptyObject/} - */ - isEmptyObject(obj: any): boolean; - /** - * Determine if the argument passed is a JavaScript function object. - * - * @param obj Object to test whether or not it is a function. - * @see {@link https://api.jquery.com/jQuery.isFunction/} - */ - isFunction(obj: any): obj is Function; - /** - * Determines whether its argument is a number. - * - * @param value The value to be tested. - * @see {@link https://api.jquery.com/jQuery.isNumeric/} - */ - isNumeric(value: any): boolean; - /** - * Check to see if an object is a plain object (created using "{}" or "new Object"). - * - * @param obj The object that will be checked to see if it's a plain object. - * @see {@link https://api.jquery.com/jQuery.isPlainObject/} - */ - isPlainObject(obj: any): boolean; - /** - * Determine whether the argument is a window. - * - * @param obj Object to test whether or not it is a window. - * @see {@link https://api.jquery.com/jQuery.isWindow/} - */ - isWindow(obj: any): obj is Window; - /** - * Check to see if a DOM node is within an XML document (or is an XML document). - * - * @param node The DOM node that will be checked to see if it's in an XML document. - * @see {@link https://api.jquery.com/jQuery.isXMLDoc/} - */ - isXMLDoc(node: Node): boolean; - - /** - * Convert an array-like object into a true JavaScript array. - * - * @param obj Any object to turn into a native Array. - * @see {@link https://api.jquery.com/jQuery.makeArray/} - */ - makeArray(obj: any): any[]; - - /** - * Translate all items in an array or object to new array of items. - * - * @param array The Array to translate. - * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object. - * @see {@link https://api.jquery.com/jQuery.map/#jQuery-map-array-callback} - */ - map(array: T[], callback: (elementOfArray?: T, indexInArray?: number) => U): U[]; - /** - * Translate all items in an array or object to new array of items. - * - * @param arrayOrObject The Array or Object to translate. - * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object. - * @see {@link https://api.jquery.com/jQuery.map/#jQuery-map-object-callback} - */ - map(arrayOrObject: any, callback: (value?: any, indexOrKey?: any) => any): any; - - /** - * Merge the contents of two arrays together into the first array. - * - * @param first The first array to merge, the elements of second added. - * @param second The second array to merge into the first, unaltered. - * @see {@link https://api.jquery.com/jQuery.merge/} - */ - merge(first: T[], second: T[]): T[]; - - /** - * An empty function. - * @see {@link https://api.jquery.com/jQuery.noop/} - */ - noop(): any; - - /** - * Return a number representing the current time. - * @see {@link https://api.jquery.com/jQuery.now/} - */ - now(): number; - - /** - * Takes a well-formed JSON string and returns the resulting JavaScript object. - * - * @param json The JSON string to parse. - * @see {@link https://api.jquery.com/jQuery.parseJSON/} - */ - parseJSON(json: string): any; - - /** - * Parses a string into an XML document. - * - * @param data a well-formed XML string to be parsed - * @see {@link https://api.jquery.com/jQuery.parseXML/} - */ - parseXML(data: string): XMLDocument; - - /** - * Remove the whitespace from the beginning and end of a string. - * - * @param str Remove the whitespace from the beginning and end of a string. - * @see {@link https://api.jquery.com/jQuery.trim/} - */ - trim(str: string): string; - - /** - * Determine the internal JavaScript [[Class]] of an object. - * - * @param obj Object to get the internal JavaScript [[Class]] of. - * @see {@link https://api.jquery.com/jQuery.type/} - */ - type(obj: any): "array" | "boolean" | "date" | "error" | "function" | "null" | "number" | "object" | "regexp" | "string" | "symbol" | "undefined"; - - /** - * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers. - * - * @param array The Array of DOM elements. - * @see {@link https://api.jquery.com/jQuery.unique/} - */ - unique(array: T[]): T[]; - - /** - * Parses a string into an array of DOM nodes. - * - * @param data HTML string to be parsed - * @param context DOM element to serve as the context in which the HTML fragment will be created - * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string - * @see {@link https://api.jquery.com/jQuery.parseHTML/} - */ - parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[]; - - /** - * Parses a string into an array of DOM nodes. - * - * @param data HTML string to be parsed - * @param context DOM element to serve as the context in which the HTML fragment will be created - * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string - * @see {@link https://api.jquery.com/jQuery.parseHTML/} - */ - parseHTML(data: string, context?: Document, keepScripts?: boolean): any[]; -} - -/** - * The jQuery instance members - * - * @see {@link https://api.jquery.com/Types/#jQuery} - */ -interface JQuery { - /** - * Register a handler to be called when Ajax requests complete. This is an AjaxEvent. - * - * @param handler The function to be invoked. - * @see {@link https://api.jquery.com/ajaxComplete/} - */ - ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery; - /** - * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. - * - * @param handler The function to be invoked. - * @see {@link https://api.jquery.com/ajaxError/} - */ - ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery; - /** - * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. - * - * @param handler The function to be invoked. - * @see {@link https://api.jquery.com/ajaxSend/} - */ - ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery; - /** - * Register a handler to be called when the first Ajax request begins. This is an Ajax Event. - * - * @param handler The function to be invoked. - * @see {@link https://api.jquery.com/ajaxStart/} - */ - ajaxStart(handler: () => any): JQuery; - /** - * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event. - * - * @param handler The function to be invoked. - * @see {@link https://api.jquery.com/ajaxStop/} - */ - ajaxStop(handler: () => any): JQuery; - /** - * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event. - * - * @param handler The function to be invoked. - * @see {@link https://api.jquery.com/ajaxSuccess/} - */ - ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery; - - /** - * Load data from the server and place the returned HTML into the matched element. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param complete A callback function that is executed when the request completes. - * @see {@link https://api.jquery.com/load/} - */ - load(url: string, data?: string|Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery; - - /** - * Encode a set of form elements as a string for submission. - * @see {@link https://api.jquery.com/serialize/} - */ - serialize(): string; - /** - * Encode a set of form elements as an array of names and values. - * @see {@link https://api.jquery.com/serializeArray/} - */ - serializeArray(): JQuerySerializeArrayElement[]; - - /** - * Adds the specified class(es) to each of the set of matched elements. - * - * @param className One or more space-separated classes to be added to the class attribute of each matched element. - * @see {@link https://api.jquery.com/addClass/#addClass-className} - */ - addClass(className: string): JQuery; - /** - * Adds the specified class(es) to each of the set of matched elements. - * - * @param func A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/addClass/#addClass-function} - */ - addClass(func: (index: number, className: string) => string): JQuery; - - /** - * Add the previous set of elements on the stack to the current set, optionally filtered by a selector. - * @see {@link https://api.jquery.com/addBack/} - */ - addBack(selector?: string): JQuery; - - /** - * Get the value of an attribute for the first element in the set of matched elements. - * - * @param attributeName The name of the attribute to get. - * @see {@link https://api.jquery.com/attr/#attr-attributeName} - */ - attr(attributeName: string): string; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributeName The name of the attribute to set. - * @param value A value to set for the attribute. If this is `null`, the attribute will be deleted. - * @see {@link https://api.jquery.com/attr/#attr-attributeName-value} - */ - attr(attributeName: string, value: string|number|null): JQuery; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributeName The name of the attribute to set. - * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments. - * @see {@link https://api.jquery.com/attr/#attr-attributeName-function} - */ - attr(attributeName: string, func: (index: number, attr: string) => string|number): JQuery; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributes An object of attribute-value pairs to set. - * @see {@link https://api.jquery.com/attr/#attr-attributes} - */ - attr(attributes: Object): JQuery; - - /** - * Determine whether any of the matched elements are assigned the given class. - * - * @param className The class name to search for. - * @see {@link https://api.jquery.com/hasClass/} - */ - hasClass(className: string): boolean; - - /** - * Get the HTML contents of the first element in the set of matched elements. - * @see {@link https://api.jquery.com/html/#html} - */ - html(): string; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param htmlString A string of HTML to set as the content of each matched element. - * @see {@link https://api.jquery.com/html/#html-htmlString} - */ - html(htmlString: string): JQuery; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/html/#html-function} - */ - html(func: (index: number, oldhtml: string) => string): JQuery; - - /** - * Get the value of a property for the first element in the set of matched elements. - * - * @param propertyName The name of the property to get. - * @see {@link https://api.jquery.com/prop/#prop-propertyName} - */ - prop(propertyName: string): any; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param value A value to set for the property. - * @see {@link https://api.jquery.com/prop/#prop-propertyName-value} - */ - prop(propertyName: string, value: string|number|boolean): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param properties An object of property-value pairs to set. - * @see {@link https://api.jquery.com/prop/#prop-properties} - */ - prop(properties: Object): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element. - * @see {@link https://api.jquery.com/prop/#prop-propertyName-function} - */ - prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery; - - /** - * Remove an attribute from each element in the set of matched elements. - * - * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. - * @see {@link https://api.jquery.com/removeAttr/} - */ - removeAttr(attributeName: string): JQuery; - - /** - * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. - * - * @param className One or more space-separated classes to be removed from the class attribute of each matched element. - * @see {@link https://api.jquery.com/removeClass/#removeClass-className} - */ - removeClass(className?: string): JQuery; - /** - * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. - * - * @param func A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments. - * @see {@link https://api.jquery.com/removeClass/#removeClass-function} - */ - removeClass(func: (index: number, className: string) => string): JQuery; - - /** - * Remove a property for the set of matched elements. - * - * @param propertyName The name of the property to remove. - * @see {@link https://api.jquery.com/removeProp/} - */ - removeProp(propertyName: string): JQuery; - - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set. - * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. - * @see {@link https://api.jquery.com/toggleClass/#toggleClass-className} - */ - toggleClass(className: string, swtch?: boolean): JQuery; - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param swtch A boolean value to determine whether the class should be added or removed. - * @see {@link https://api.jquery.com/toggleClass/#toggleClass-state} - */ - toggleClass(swtch?: boolean): JQuery; - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param func A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments. - * @param swtch A boolean value to determine whether the class should be added or removed. - * @see {@link https://api.jquery.com/toggleClass/#toggleClass-function-state} - */ - toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery; - - /** - * Get the current value of the first element in the set of matched elements. - * @see {@link https://api.jquery.com/val/#val} - */ - val(): any; - /** - * Set the value of each element in the set of matched elements. - * - * @param value A string of text, an array of strings or number corresponding to the value of each matched element to set as selected/checked. - * @see {@link https://api.jquery.com/val/#val-value} - */ - val(value: string|string[]|number): JQuery; - /** - * Set the value of each element in the set of matched elements. - * - * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. - * @see {@link https://api.jquery.com/val/#val-function} - */ - val(func: (index: number, value: string) => string): JQuery; - - /** - * Get the value of style properties for the first element in the set of matched elements. - * - * @param propertyName A CSS property. - * @see {@link https://api.jquery.com/css/#css-propertyName} - */ - css(propertyName: string): string; - /** - * Get the value of style properties for the first element in the set of matched elements. - * Results in an object of property-value pairs. - * - * @param propertyNames An array of one or more CSS properties. - * @see {@link https://api.jquery.com/css/#css-propertyNames} - */ - css(propertyNames: string[]): any; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A value to set for the property. - * @see {@link https://api.jquery.com/css/#css-propertyName-value} - */ - css(propertyName: string, value: string|number): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. - * @see {@link https://api.jquery.com/css/#css-propertyName-function} - */ - css(propertyName: string, value: (index: number, value: string) => string|number): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param properties An object of property-value pairs to set. - * @see {@link https://api.jquery.com/css/#css-properties} - */ - css(properties: Object): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements. - * @see {@link https://api.jquery.com/height/#height} - */ - height(): number; - /** - * Set the CSS height of every matched element. - * - * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string). - * @see {@link https://api.jquery.com/height/#height-value} - */ - height(value: number|string): JQuery; - /** - * Set the CSS height of every matched element. - * - * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/height/#height-function} - */ - height(func: (index: number, height: number) => number|string): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements, including padding but not border. - * @see {@link https://api.jquery.com/innerHeight/#innerHeight} - */ - innerHeight(): number; - - /** - * Sets the inner height on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - * @see {@link https://api.jquery.com/innerHeight/#innerHeight-value} - */ - innerHeight(value: number|string): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements, including padding but not border. - * @see {@link https://api.jquery.com/innerWidth/#innerWidth} - */ - innerWidth(): number; - - /** - * Sets the inner width on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - * @see {@link https://api.jquery.com/innerWidth/#innerWidth-value} - */ - innerWidth(value: number|string): JQuery; - - /** - * Get the current coordinates of the first element in the set of matched elements, relative to the document. - * @see {@link https://api.jquery.com/offset/#offset} - */ - offset(): JQueryCoordinates; - /** - * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - * - * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - * @see {@link https://api.jquery.com/offset/#offset-coordinates} - */ - offset(coordinates: JQueryCoordinates): JQuery; - /** - * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - * - * @param func A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties. - * @see {@link https://api.jquery.com/offset/#offset-function} - */ - offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements. - * - * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. - * @see {@link https://api.jquery.com/outerHeight/#outerHeight-includeMargin} - */ - outerHeight(includeMargin?: boolean): number; - - /** - * Sets the outer height on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - * @see {@link https://api.jquery.com/outerHeight/#outerHeight-value} - */ - outerHeight(value: number|string): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements, including padding and border. - * - * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. - * @see {@link https://api.jquery.com/outerWidth/#outerWidth-includeMargin} - */ - outerWidth(includeMargin?: boolean): number; - - /** - * Sets the outer width on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - * @see {@link https://api.jquery.com/outerWidth/#outerWidth-value} - */ - outerWidth(value: number|string): JQuery; - - /** - * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent. - * @see {@link https://api.jquery.com/position/} - */ - position(): JQueryCoordinates; - - /** - * Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element. - * @see {@link https://api.jquery.com/scrollLeft/#scrollLeft} - */ - scrollLeft(): number; - /** - * Set the current horizontal position of the scroll bar for each of the set of matched elements. - * - * @param value An integer indicating the new position to set the scroll bar to. - * @see {@link https://api.jquery.com/scrollLeft/#scrollLeft-value} - */ - scrollLeft(value: number): JQuery; - - /** - * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element. - * @see {@link https://api.jquery.com/scrollTop/#scrollTop} - */ - scrollTop(): number; - /** - * Set the current vertical position of the scroll bar for each of the set of matched elements. - * - * @param value An integer indicating the new position to set the scroll bar to. - * @see {@link https://api.jquery.com/scrollTop/#scrollTop-value} - */ - scrollTop(value: number): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements. - * @see {@link https://api.jquery.com/width/#width} - */ - width(): number; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - * @see {@link https://api.jquery.com/width/#width-value} - */ - width(value: number|string): JQuery; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/width/#width-function} - */ - width(func: (index: number, width: number) => number|string): JQuery; - - /** - * Remove from the queue all items that have not yet been run. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @see {@link https://api.jquery.com/clearQueue/} - */ - clearQueue(queueName?: string): JQuery; - - /** - * Store arbitrary data associated with the matched elements. - * - * @param key A string naming the piece of data to set. - * @param value The new data value; it can be any JavaScript type including Array or Object. - * @see {@link https://api.jquery.com/data/#data-key-value} - */ - data(key: string, value: any): JQuery; - /** - * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. - * - * @param key Name of the data stored. - * @see {@link https://api.jquery.com/data/#data-key} - */ - data(key: string): any; - /** - * Store arbitrary data associated with the matched elements. - * - * @param obj An object of key-value pairs of data to update. - * @see {@link https://api.jquery.com/data/#data-obj} - */ - data(obj: { [key: string]: any; }): JQuery; - /** - * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. - * @see {@link https://api.jquery.com/data/#data} - */ - data(): any; - - /** - * Execute the next function on the queue for the matched elements. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @see {@link https://api.jquery.com/dequeue/} - */ - dequeue(queueName?: string): JQuery; - - /** - * Remove a previously-stored piece of data. - * - * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete. - * @see {@link https://api.jquery.com/removeData/#removeData-name} - */ - removeData(name: string): JQuery; - /** - * Remove a previously-stored piece of data. - * - * @param list An array of strings naming the pieces of data to delete. - * @see {@link https://api.jquery.com/removeData/#removeData-list} - */ - removeData(list: string[]): JQuery; - /** - * Remove all previously-stored piece of data. - * @see {@link https://api.jquery.com/removeData/} - */ - removeData(): JQuery; - - /** - * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. - * - * @param type The type of queue that needs to be observed. (default: fx) - * @param target Object onto which the promise methods have to be attached - * @see {@link https://api.jquery.com/promise/} - */ - promise(type?: string, target?: Object): JQueryPromise; - - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/animate/#animate-properties-duration-easing-complete} - */ - animate(properties: Object, duration?: string|number, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. (default: swing) - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/animate/#animate-properties-duration-easing-complete} - */ - animate(properties: Object, duration?: string|number, easing?: string, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/animate/#animate-properties-options} - */ - animate(properties: Object, options: JQueryAnimationOptions): JQuery; - - /** - * Set a timer to delay execution of subsequent items in the queue. - * - * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @see {@link https://api.jquery.com/delay/} - */ - delay(duration: number, queueName?: string): JQuery; - - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/fadeIn/#fadeIn-duration-complete} - */ - fadeIn(duration?: number|string, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/fadeIn/#fadeIn-duration-easing-complete} - */ - fadeIn(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/fadeIn/#fadeIn-options} - */ - fadeIn(options: JQueryAnimationOptions): JQuery; - - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/fadeOut/#fadeOut-duration-complete} - */ - fadeOut(duration?: number|string, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/fadeOut/#fadeOut-duration-easing-complete} - */ - fadeOut(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/fadeOut/#fadeOut-options} - */ - fadeOut(options: JQueryAnimationOptions): JQuery; - - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/fadeTo/#fadeTo-duration-opacity-complete} - */ - fadeTo(duration: string|number, opacity: number, complete?: Function): JQuery; - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/fadeTo/#fadeTo-duration-opacity-easing-complete} - */ - fadeTo(duration: string|number, opacity: number, easing?: string, complete?: Function): JQuery; - - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/fadeToggle/#fadeToggle-duration-easing-complete} - */ - fadeToggle(duration?: number|string, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/fadeToggle/#fadeToggle-duration-easing-complete} - */ - fadeToggle(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/fadeToggle/#fadeToggle-options} - */ - fadeToggle(options: JQueryAnimationOptions): JQuery; - - /** - * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements. - * - * @param queue The name of the queue in which to stop animations. - * @see {@link https://api.jquery.com/finish/} - */ - finish(queue?: string): JQuery; - - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/hide/#hide} - */ - hide(duration?: number|string, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/hide/#hide-duration-easing-complete} - */ - hide(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/hide/#hide-options} - */ - hide(options: JQueryAnimationOptions): JQuery; - - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/show/#show} - */ - show(duration?: number|string, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/show/#show-duration-easing-complete} - */ - show(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/show/#show-options} - */ - show(options: JQueryAnimationOptions): JQuery; - - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/slideDown/#slideDown-duration-complete} - */ - slideDown(duration?: number|string, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/slideDown/#slideDown-duration-easing-complete} - */ - slideDown(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/slideDown/#slideDown-options} - */ - slideDown(options: JQueryAnimationOptions): JQuery; - - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/slideToggle/#slideToggle-duration-complete} - */ - slideToggle(duration?: number|string, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/slideToggle/#slideToggle-duration-easing-complete} - */ - slideToggle(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/slideToggle/#slideToggle-options} - */ - slideToggle(options: JQueryAnimationOptions): JQuery; - - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/slideUp/#slideUp-duration-complete} - */ - slideUp(duration?: number|string, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/slideUp/#slideUp-duration-easing-complete} - */ - slideUp(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/slideUp/#slideUp-options} - */ - slideUp(options: JQueryAnimationOptions): JQuery; - - /** - * Stop the currently-running animation on the matched elements. - * - * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. - * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. - * @see {@link https://api.jquery.com/stop/#stop-clearQueue-jumpToEnd} - */ - stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery; - /** - * Stop the currently-running animation on the matched elements. - * - * @param queue The name of the queue in which to stop animations. - * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. - * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. - * @see {@link https://api.jquery.com/stop/#stop-queue-clearQueue-jumpToEnd} - */ - stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery; - - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/toggle/#toggle-duration-complete} - */ - toggle(duration?: number|string, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - * @see {@link https://api.jquery.com/toggle/#toggle-duration-easing-complete} - */ - toggle(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param options A map of additional options to pass to the method. - * @see {@link https://api.jquery.com/toggle/#toggle-options} - */ - toggle(options: JQueryAnimationOptions): JQuery; - /** - * Display or hide the matched elements. - * - * @param showOrHide A Boolean indicating whether to show or hide the elements. - * @see {@link https://api.jquery.com/toggle/#toggle-display} - */ - toggle(showOrHide: boolean): JQuery; - - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/bind/#bind-eventType-eventData-handler} - */ - bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/bind/#bind-eventType-eventData-handler} - */ - bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param eventData An object containing data that will be passed to the event handler. - * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. - * @see {@link https://api.jquery.com/bind/#bind-eventType-eventData-preventBubble} - */ - bind(eventType: string, eventData: any, preventBubble: boolean): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. - * @see {@link https://api.jquery.com/bind/#bind-eventType-eventData-preventBubble} - */ - bind(eventType: string, preventBubble: boolean): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param events An object containing one or more DOM event types and functions to execute for them. - * @see {@link https://api.jquery.com/bind/#bind-events} - */ - bind(events: any): JQuery; - - /** - * Trigger the "blur" event on an element - * @see {@link https://api.jquery.com/blur/#blur} - */ - blur(): JQuery; - /** - * Bind an event handler to the "blur" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/blur/#blur-handler} - */ - blur(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "blur" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/blur/#blur-eventData-handler} - */ - blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "change" event on an element. - * @see {@link https://api.jquery.com/change/#change} - */ - change(): JQuery; - /** - * Bind an event handler to the "change" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/change/#change-handler} - */ - change(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "change" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/change/#change-eventData-handler} - */ - change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "click" event on an element. - * @see {@link https://api.jquery.com/click/#click} - */ - click(): JQuery; - /** - * Bind an event handler to the "click" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/click/#click-handler} - */ - click(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "click" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/click/#click-eventData-handler} - */ - click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "contextmenu" event on an element. - * @see {@link https://api.jquery.com/contextmenu/#contextmenu} - */ - contextmenu(): JQuery; - /** - * Bind an event handler to the "contextmenu" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/contextmenu/#contextmenu-handler} - */ - contextmenu(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "contextmenu" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/contextmenu/#contextmenu-eventData-handler} - */ - contextmenu(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "dblclick" event on an element. - * @see {@link https://api.jquery.com/dblclick/#dblclick} - */ - dblclick(): JQuery; - /** - * Bind an event handler to the "dblclick" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/dblclick/#dblclick-handler} - */ - dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "dblclick" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/dblclick/#dblclick-eventData-handler} - */ - dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. - * @see {@link https://api.jquery.com/delegate/#delegate-selector-eventType-handler} - */ - delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. - * @see {@link https://api.jquery.com/delegate/#delegate-selector-eventType-eventData-handler} - */ - delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "focus" event on an element. - * @see {@link https://api.jquery.com/focus/#focus} - */ - focus(): JQuery; - /** - * Bind an event handler to the "focus" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/focus/#focus-handler} - */ - focus(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focus" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/focus/#focus-eventData-handler} - */ - focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "focusin" event on an element. - * @see {@link https://api.jquery.com/focusin/#focusin} - */ - focusin(): JQuery; - /** - * Bind an event handler to the "focusin" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/focusin/#focusin-handler} - */ - focusin(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focusin" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/focusin/#focusin-eventData-handler} - */ - focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "focusout" event on an element. - * @see {@link https://api.jquery.com/focusout/#focusout} - */ - focusout(): JQuery; - /** - * Bind an event handler to the "focusout" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/focusout/#focusout-handler} - */ - focusout(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focusout" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/focusout/#focusout-eventData-handler} - */ - focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. - * - * @param handlerIn A function to execute when the mouse pointer enters the element. - * @param handlerOut A function to execute when the mouse pointer leaves the element. - * @see {@link https://api.jquery.com/hover/#hover-handlerIn-handlerOut} - */ - hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements. - * - * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. - * @see {@link https://api.jquery.com/hover/#hover-handlerInOut} - */ - hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "keydown" event on an element. - * @see {@link https://api.jquery.com/keydown/#keydown} - */ - keydown(): JQuery; - /** - * Bind an event handler to the "keydown" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/keydown/#keydown-handler} - */ - keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keydown" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/keydown/#keydown-eventData-handler} - */ - keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Trigger the "keypress" event on an element. - * @see {@link https://api.jquery.com/keypress/#keypress} - */ - keypress(): JQuery; - /** - * Bind an event handler to the "keypress" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/keypress/#keypress-handler} - */ - keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keypress" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/keypress/#keypress-eventData-handler} - */ - keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Trigger the "keyup" event on an element. - * @see {@link https://api.jquery.com/keyup/#keyup} - */ - keyup(): JQuery; - /** - * Bind an event handler to the "keyup" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/keyup/#keyup-handler} - */ - keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keyup" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/keyup/#keyup-eventData-handler} - */ - keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Bind an event handler to the "load" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/load/} - */ - load(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "load" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/load/} - */ - load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "mousedown" event on an element. - * @see {@link https://api.jquery.com/mousedown/#mousedown} - */ - mousedown(): JQuery; - /** - * Bind an event handler to the "mousedown" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mousedown/#mousedown-handler} - */ - mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mousedown" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mousedown/#mousedown-eventData-handler} - */ - mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseenter" event on an element. - * @see {@link https://api.jquery.com/mouseenter/#mouseenter} - */ - mouseenter(): JQuery; - /** - * Bind an event handler to be fired when the mouse enters an element. - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseenter/#mouseenter-handler} - */ - mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to be fired when the mouse enters an element. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseenter/#mouseenter-eventData-handler} - */ - mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseleave" event on an element. - * @see {@link https://api.jquery.com/mouseleave/#mouseleave} - */ - mouseleave(): JQuery; - /** - * Bind an event handler to be fired when the mouse leaves an element. - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseleave/#mouseleave-handler} - */ - mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to be fired when the mouse leaves an element. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseleave/#mouseleave-eventData-handler} - */ - mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mousemove" event on an element. - * @see {@link https://api.jquery.com/mousemove/#mousemove} - */ - mousemove(): JQuery; - /** - * Bind an event handler to the "mousemove" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mousemove/#mousemove-handler} - */ - mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mousemove" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mousemove/#mousemove-eventData-handler} - */ - mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseout" event on an element. - * @see {@link https://api.jquery.com/mouseout/#mouseout} - */ - mouseout(): JQuery; - /** - * Bind an event handler to the "mouseout" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseout/#mouseout-handler} - */ - mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseout" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseout/#mouseout-eventData-handler} - */ - mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseover" event on an element. - * @see {@link https://api.jquery.com/mouseover/#mouseover} - */ - mouseover(): JQuery; - /** - * Bind an event handler to the "mouseover" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseover/#mouseover-handler} - */ - mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseover" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseover/#mouseover-eventData-handler} - */ - mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseup" event on an element. - * @see {@link https://api.jquery.com/mouseup/#mouseup} - */ - mouseup(): JQuery; - /** - * Bind an event handler to the "mouseup" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseup/#mouseup-handler} - */ - mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseup" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/mouseup/#mouseup-eventData-handler} - */ - mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Remove an event handler. - * @see {@link https://api.jquery.com/off/#off} - */ - off(): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. - * @param handler A handler function previously attached for the event(s), or the special value false. - * @see {@link https://api.jquery.com/off/#off-events-selector-handler} - */ - off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param handler A handler function previously attached for the event(s), or the special value false. Takes handler with extra args that can be attached with on(). - * @see {@link https://api.jquery.com/off/#off-events-selector-handler} - */ - off(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param handler A handler function previously attached for the event(s), or the special value false. - * @see {@link https://api.jquery.com/off/#off-events-selector-handler} - */ - off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove an event handler. - * - * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s). - * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. - * @see {@link https://api.jquery.com/off/#off-events-selector} - */ - off(events: { [key: string]: any; }, selector?: string): JQuery; - - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax). - * @see {@link https://api.jquery.com/on/#on-events-selector-data-handler} - */ - on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - * @see {@link https://api.jquery.com/on/#on-events-selector-data-handler} - */ - on(events: string, data : any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - * @see {@link https://api.jquery.com/on/#on-events-selector-data-handler} - */ - on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - * @see {@link https://api.jquery.com/on/#on-events-selector-data-handler} - */ - on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event occurs. - * @see {@link https://api.jquery.com/on/#on-events-selector-data} - */ - on(events: { [key: string]: (eventObject: JQueryEventObject, ...args: any[]) => any; }, selector?: string, data?: any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param data Data to be passed to the handler in event.data when an event occurs. - * @see {@link https://api.jquery.com/on/#on-events-selector-data} - */ - on(events: { [key: string]: (eventObject: JQueryEventObject, ...args: any[]) => any; }, data?: any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. - * @param handler A function to execute at the time the event is triggered. - * @see {@link https://api.jquery.com/one/#one-events-data-handler} - */ - one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. - * @param data An object containing data that will be passed to the event handler. - * @param handler A function to execute at the time the event is triggered. - * @see {@link https://api.jquery.com/one/#one-events-data-handler} - */ - one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - * @see {@link https://api.jquery.com/one/#one-events-selector-data-handler} - */ - one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - * @see {@link https://api.jquery.com/one/#one-events-selector-data-handler} - */ - one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event occurs. - * @see {@link https://api.jquery.com/one/#one-events-selector-data} - */ - one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param data Data to be passed to the handler in event.data when an event occurs. - * @see {@link https://api.jquery.com/one/#one-events-selector-data} - */ - one(events: { [key: string]: any; }, data?: any): JQuery; - - - /** - * Specify a function to execute when the DOM is fully loaded. - * - * @param handler A function to execute after the DOM is ready. - * @see {@link https://api.jquery.com/ready/} - */ - ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery; - - /** - * Trigger the "resize" event on an element. - * @see {@link https://api.jquery.com/resize/#resize} - */ - resize(): JQuery; - /** - * Bind an event handler to the "resize" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/resize/#resize-handler} - */ - resize(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "resize" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/resize/#resize-eventData-handler} - */ - resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "scroll" event on an element. - * @see {@link https://api.jquery.com/scroll/#scroll} - */ - scroll(): JQuery; - /** - * Bind an event handler to the "scroll" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/scroll/#scroll-handler} - */ - scroll(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "scroll" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/scroll/#scroll-eventData-handler} - */ - scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "select" event on an element. - * @see {@link https://api.jquery.com/select/#select} - */ - select(): JQuery; - /** - * Bind an event handler to the "select" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/select/#select-handler} - */ - select(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "select" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/select/#select-eventData-handler} - */ - select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "submit" event on an element. - * @see {@link https://api.jquery.com/submit/#submit} - */ - submit(): JQuery; - /** - * Bind an event handler to the "submit" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/submit/#submit-handler} - */ - submit(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "submit" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - * @see {@link https://api.jquery.com/submit/#submit-eventData-handler} - */ - submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param extraParameters Additional parameters to pass along to the event handler. - * @see {@link https://api.jquery.com/trigger/#trigger-eventType-extraParameters} - */ - trigger(eventType: string, extraParameters?: any[]|Object): JQuery; - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param event A jQuery.Event object. - * @param extraParameters Additional parameters to pass along to the event handler. - * @see {@link https://api.jquery.com/trigger/#trigger-event-extraParameters} - */ - trigger(event: JQueryEventObject, extraParameters?: any[]|Object): JQuery; - - /** - * Execute all handlers attached to an element for an event. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param extraParameters An array of additional parameters to pass along to the event handler. - * @see {@link https://api.jquery.com/triggerHandler/#triggerHandler-eventType-extraParameters} - */ - triggerHandler(eventType: string, ...extraParameters: any[]): Object; - - /** - * Execute all handlers attached to an element for an event. - * - * @param event A jQuery.Event object. - * @param extraParameters An array of additional parameters to pass along to the event handler. - * @see {@link https://api.jquery.com/triggerHandler/#triggerHandler-event-extraParameters} - */ - triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object; - - /** - * Remove a previously-attached event handler from the elements. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param handler The function that is to be no longer executed. - * @see {@link https://api.jquery.com/unbind/#unbind-eventType-handler} - */ - unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove a previously-attached event handler from the elements. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ). - * @see {@link https://api.jquery.com/unbind/#unbind-eventType-false} - */ - unbind(eventType: string, fls: boolean): JQuery; - /** - * Remove a previously-attached event handler from the elements. - * - * @param evt A JavaScript event object as passed to an event handler. - * @see {@link https://api.jquery.com/unbind/#unbind-event} - */ - unbind(evt: any): JQuery; - - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * @see {@link https://api.jquery.com/undelegate/#undelegate} - */ - undelegate(): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param selector A selector which will be used to filter the event results. - * @param eventType A string containing a JavaScript event type, such as "click" or "keydown" - * @param handler A function to execute at the time the event is triggered. - * @see {@link https://api.jquery.com/undelegate/#undelegate-selector-eventType} - */ - undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param selector A selector which will be used to filter the event results. - * @param events An object of one or more event types and previously bound functions to unbind from them. - * @see {@link https://api.jquery.com/undelegate/#undelegate-selector-events} - */ - undelegate(selector: string, events: Object): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param namespace A string containing a namespace to unbind all events from. - * @see {@link https://api.jquery.com/undelegate/#undelegate-namespace} - */ - undelegate(namespace: string): JQuery; - - /** - * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/unload/#unload-handler} - */ - unload(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * - * @param eventData A plain object of data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/unload/#unload-eventData-handler} - */ - unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10) - * @see {@link https://api.jquery.com/context/} - */ - context: Element; - - jquery: string; - - /** - * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/error/#error-handler} - */ - error(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * - * @param eventData A plain object of data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - * @see {@link https://api.jquery.com/error/#error-eventData-handler} - */ - error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Add a collection of DOM elements onto the jQuery stack. - * - * @param elements An array of elements to push onto the stack and make into a new jQuery object. - * @see {@link https://api.jquery.com/pushStack/#pushStack-elements} - */ - pushStack(elements: any[]): JQuery; - /** - * Add a collection of DOM elements onto the jQuery stack. - * - * @param elements An array of elements to push onto the stack and make into a new jQuery object. - * @param name The name of a jQuery method that generated the array of elements. - * @param arguments The arguments that were passed in to the jQuery method (for serialization). - * @see {@link https://api.jquery.com/pushStack/#pushStack-elements-name-arguments} - */ - pushStack(elements: any[], name: string, arguments: any[]): JQuery; - - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * @param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements. - * @param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. - * @see {@link https://api.jquery.com/after/#after-content-content} - */ - after(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * @param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/after/#after-function} - */ - after(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * @param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. - * @param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. - * @see {@link https://api.jquery.com/append/#append-content-content} - */ - append(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * @param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/append/#append-function} - */ - append(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Insert every element in the set of matched elements to the end of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter. - * @see {@link https://api.jquery.com/appendTo/} - */ - appendTo(target: JQuery|any[]|Element|string): JQuery; - - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * @param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert before each element in the set of matched elements. - * @param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. - * @see {@link https://api.jquery.com/before/#before-content-content} - */ - before(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * @param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/before/#before-function} - */ - before(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Create a deep copy of the set of matched elements. - * - * @param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. - * @param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false). - * @see {@link https://api.jquery.com/clone/} - */ - clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery; - - /** - * Remove the set of matched elements from the DOM. - * - * @param selector A selector expression that filters the set of matched elements to be removed. - * @see {@link https://api.jquery.com/detach/} - */ - detach(selector?: string): JQuery; - - /** - * Remove all child nodes of the set of matched elements from the DOM. - * @see {@link https://api.jquery.com/empty/} - */ - empty(): JQuery; - - /** - * Insert every element in the set of matched elements after the target. - * - * @param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. - * @see {@link https://api.jquery.com/insertAfter/} - */ - insertAfter(target: JQuery|any[]|Element|Text|string): JQuery; - - /** - * Insert every element in the set of matched elements before the target. - * - * @param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. - * @see {@link https://api.jquery.com/insertBefore/} - */ - insertBefore(target: JQuery|any[]|Element|Text|string): JQuery; - - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * @param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. - * @param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. - * @see {@link https://api.jquery.com/prepend/#prepend-content-content} - */ - prepend(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * @param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/prepend/#prepend-function} - */ - prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Insert every element in the set of matched elements to the beginning of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter. - * @see {@link https://api.jquery.com/prependTo/} - */ - prependTo(target: JQuery|any[]|Element|string): JQuery; - - /** - * Remove the set of matched elements from the DOM. - * - * @param selector A selector expression that filters the set of matched elements to be removed. - * @see {@link https://api.jquery.com/remove/} - */ - remove(selector?: string): JQuery; - - /** - * Replace each target element with the set of matched elements. - * - * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. - * @see {@link https://api.jquery.com/replaceAll/} - */ - replaceAll(target: JQuery|any[]|Element|string): JQuery; - - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * @param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. - * @see {@link https://api.jquery.com/replaceWith/#replaceWith-newContent} - */ - replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery; - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * @param func A function that returns content with which to replace the set of matched elements. - * @see {@link https://api.jquery.com/replaceWith/#replaceWith-function} - */ - replaceWith(func: () => Element|JQuery): JQuery; - - /** - * Get the combined text contents of each element in the set of matched elements, including their descendants. - * @see {@link https://api.jquery.com/text/#text} - */ - text(): string; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation. - * @see {@link https://api.jquery.com/text/#text-text} - */ - text(text: string|number|boolean): JQuery; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments. - * @see {@link https://api.jquery.com/text/#text-function} - */ - text(func: (index: number, text: string) => string): JQuery; - - /** - * Retrieve all the elements contained in the jQuery set, as an array. - * @name toArray - * @see {@link https://api.jquery.com/toArray/} - */ - toArray(): HTMLElement[]; - - /** - * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. - * @see {@link https://api.jquery.com/unwrap/} - */ - unwrap(): JQuery; - - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - * @see {@link https://api.jquery.com/wrap/#wrap-wrappingElement} - */ - wrap(wrappingElement: JQuery|Element|string): JQuery; - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/wrap/#wrap-function} - */ - wrap(func: (index: number) => string|JQuery): JQuery; - - /** - * Wrap an HTML structure around all elements in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - * @see {@link https://api.jquery.com/wrapAll/#wrapAll-wrappingElement} - */ - wrapAll(wrappingElement: JQuery|Element|string): JQuery; - /** - * Wrap an HTML structure around all elements in the set of matched elements. - * - * @param func A callback function returning the HTML content or jQuery object to wrap around all the matched elements. Within the function, this refers to the first element in the set. - * @see {@link https://api.jquery.com/wrapAll/#wrapAll-function} - */ - wrapAll(func: (index: number) => string): JQuery; - - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements. - * @see {@link https://api.jquery.com/wrapInner/#wrapInner-wrappingElement} - */ - wrapInner(wrappingElement: JQuery|Element|string): JQuery; - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - * @see {@link https://api.jquery.com/wrapInner/#wrapInner-function} - */ - wrapInner(func: (index: number) => string): JQuery; - - /** - * Iterate over a jQuery object, executing a function for each matched element. - * - * @param func A function to execute for each matched element. Can stop the loop by returning false. - * @see {@link https://api.jquery.com/each/} - */ - each(func: (index: number, elem: Element) => boolean | void): JQuery; - - /** - * Retrieve one of the elements matched by the jQuery object. - * - * @param index A zero-based integer indicating which element to retrieve. - * @see {@link https://api.jquery.com/get/#get-index} - */ - get(index: number): HTMLElement; - /** - * Retrieve the elements matched by the jQuery object. - * @alias toArray - * @see {@link https://api.jquery.com/get/#get} - */ - get(): HTMLElement[]; - - /** - * Search for a given element from among the matched elements. - * @see {@link https://api.jquery.com/index/#index} - */ - index(): number; - /** - * Search for a given element from among the matched elements. - * - * @param selector A selector representing a jQuery collection in which to look for an element. - * @see {@link https://api.jquery.com/index/#index-selector} - */ - index(selector: string|JQuery|Element): number; - - /** - * The number of elements in the jQuery object. - * @see {@link https://api.jquery.com/length/} - */ - length: number; - /** - * A selector representing selector passed to jQuery(), if any, when creating the original set. - * version deprecated: 1.7, removed: 1.9 - * @see {@link https://api.jquery.com/selector/} - */ - selector: string; - [index: number]: HTMLElement; - - /** - * Add elements to the set of matched elements. - * - * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. - * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method. - * @see {@link https://api.jquery.com/add/#add-selector} - */ - add(selector: string, context?: Element): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param elements One or more elements to add to the set of matched elements. - * @see {@link https://api.jquery.com/add/#add-elements} - */ - add(...elements: Element[]): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param html An HTML fragment to add to the set of matched elements. - * @see {@link https://api.jquery.com/add/#add-html} - */ - add(html: string): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param obj An existing jQuery object to add to the set of matched elements. - * @see {@link https://api.jquery.com/add/#add-selection} - */ - add(obj: JQuery): JQuery; - - /** - * Get the children of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/children/} - */ - children(selector?: string): JQuery; - - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/closest/#closest-selector} - */ - closest(selector: string): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param selector A string containing a selector expression to match elements against. - * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. - * @see {@link https://api.jquery.com/closest/#closest-selector-context} - */ - closest(selector: string, context?: Element): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param obj A jQuery object to match elements against. - * @see {@link https://api.jquery.com/closest/#closest-selection} - */ - closest(obj: JQuery): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param element An element to match elements against. - * @see {@link https://api.jquery.com/closest/#closest-element} - */ - closest(element: Element): JQuery; - - /** - * Get an array of all the elements and selectors matched against the current element up through the DOM tree. - * - * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object). - * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. - * @see {@link https://api.jquery.com/closest/#closest-selectors-context} - */ - closest(selectors: any, context?: Element): any[]; - - /** - * Get the children of each element in the set of matched elements, including text and comment nodes. - * @see {@link https://api.jquery.com/contents/} - */ - contents(): JQuery; - - /** - * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state. - * @see {@link https://api.jquery.com/end/} - */ - end(): JQuery; - - /** - * Reduce the set of matched elements to the one at the specified index. - * - * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set. - * @see {@link https://api.jquery.com/eq/} - */ - eq(index: number): JQuery; - - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param selector A string containing a selector expression to match the current set of elements against. - * @see {@link https://api.jquery.com/filter/#filter-selector} - */ - filter(selector: string): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param func A function used as a test for each element in the set. this is the current DOM element. - * @see {@link https://api.jquery.com/filter/#filter-function} - */ - filter(func: (index: number, element: Element) => boolean): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param element An element to match the current set of elements against. - * @see {@link https://api.jquery.com/filter/#filter-elements} - */ - filter(element: Element): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param obj An existing jQuery object to match the current set of elements against. - * @see {@link https://api.jquery.com/filter/#filter-selection} - */ - filter(obj: JQuery): JQuery; - - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/find/#find-selector} - */ - find(selector: string): JQuery; - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param element An element to match elements against. - * @see {@link https://api.jquery.com/find/#find-element} - */ - find(element: Element): JQuery; - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param obj A jQuery object to match elements against. - * @see {@link https://api.jquery.com/find/#find-element} - */ - find(obj: JQuery): JQuery; - - /** - * Reduce the set of matched elements to the first in the set. - * @see {@link https://api.jquery.com/first/} - */ - first(): JQuery; - - /** - * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/has/#has-selector} - */ - has(selector: string): JQuery; - /** - * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * - * @param contained A DOM element to match elements against. - * @see {@link https://api.jquery.com/has/#has-contained} - */ - has(contained: Element): JQuery; - - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/is/#is-selector} - */ - is(selector: string): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element. - * @see {@link https://api.jquery.com/is/#is-function} - */ - is(func: (index: number, element: Element) => boolean): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param obj An existing jQuery object to match the current set of elements against. - * @see {@link https://api.jquery.com/is/#is-selection} - */ - is(obj: JQuery): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param elements One or more elements to match the current set of elements against. - * @see {@link https://api.jquery.com/is/#is-elements} - */ - is(elements: any): boolean; - - /** - * Reduce the set of matched elements to the final one in the set. - * @see {@link https://api.jquery.com/last/} - */ - last(): JQuery; - - /** - * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values. - * - * @param callback A function object that will be invoked for each element in the current set. - * @see {@link https://api.jquery.com/map/} - */ - map(callback: (index: number, domElement: Element) => any): JQuery; - - /** - * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/next/} - */ - next(selector?: string): JQuery; - - /** - * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/nextAll/} - */ - nextAll(selector?: string): JQuery; - - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/nextUntil/#nextUntil-selector-filter} - */ - nextUntil(selector?: string, filter?: string): JQuery; - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/nextUntil/#nextUntil-element-filter} - */ - nextUntil(element?: Element, filter?: string): JQuery; - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/nextUntil/#nextUntil-element-filter} - */ - nextUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Remove elements from the set of matched elements. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/not/#not-selector} - */ - not(selector: string): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param func A function used as a test for each element in the set. this is the current DOM element. - * @see {@link https://api.jquery.com/not/#not-function} - */ - not(func: (index: number, element: Element) => boolean): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param elements One or more DOM elements to remove from the matched set. - * @see {@link https://api.jquery.com/not/#not-selection} - */ - not(elements: Element|Element[]): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param obj An existing jQuery object to match the current set of elements against. - * @see {@link https://api.jquery.com/not/#not-selection} - */ - not(obj: JQuery): JQuery; - - /** - * Get the closest ancestor element that is positioned. - * @see {@link https://api.jquery.com/offsetParent/} - */ - offsetParent(): JQuery; - - /** - * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/parent/} - */ - parent(selector?: string): JQuery; - - /** - * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/parents/} - */ - parents(selector?: string): JQuery; - - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/parentsUntil/#parentsUntil-selector-filter} - */ - parentsUntil(selector?: string, filter?: string): JQuery; - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/parentsUntil/#parentsUntil-element-filter} - */ - parentsUntil(element?: Element, filter?: string): JQuery; - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/parentsUntil/#parentsUntil-element-filter} - */ - parentsUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/prev/} - */ - prev(selector?: string): JQuery; - - /** - * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/prevAll/} - */ - prevAll(selector?: string): JQuery; - - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/prevUntil/#prevUntil-selector-filter} - */ - prevUntil(selector?: string, filter?: string): JQuery; - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/prevUntil/#prevUntil-element-filter} - */ - prevUntil(element?: Element, filter?: string): JQuery; - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/prevUntil/#prevUntil-element-filter} - */ - prevUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Get the siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - * @see {@link https://api.jquery.com/siblings/} - */ - siblings(selector?: string): JQuery; - - /** - * Reduce the set of matched elements to a subset specified by a range of indices. - * - * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set. - * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set. - * @see {@link https://api.jquery.com/slice/} - */ - slice(start: number, end?: number): JQuery; - - /** - * Show the queue of functions to be executed on the matched elements. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @see {@link https://api.jquery.com/queue/#queue-queueName} - */ - queue(queueName?: string): any[]; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param newQueue An array of functions to replace the current queue contents. - * @see {@link https://api.jquery.com/queue/#queue-queueName-newQueue} - */ - queue(newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. - * @see {@link https://api.jquery.com/queue/#queue-queueName-callback} - */ - queue(callback: Function): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param newQueue An array of functions to replace the current queue contents. - * @see {@link https://api.jquery.com/queue/#queue-queueName-newQueue} - */ - queue(queueName: string, newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. - * @see {@link https://api.jquery.com/queue/#queue-queueName-callback} - */ - queue(queueName: string, callback: Function): JQuery; -} -declare module "jquery" { - export = $; -} -declare var jQuery: JQueryStatic; -declare var $: JQueryStatic; +// endregion diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index d2d58aa2a2..35b91fe1d3 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -1,3552 +1,5997 @@ +// tslint:disable:interface-name - -function test_add() { - $("p").add("div").addClass("widget"); - var pdiv = $("p").add("div"); - - $('li').add('p').css('background-color', 'red'); - $('li').add(document.getElementsByTagName('p')[0]) - .css('background-coailor', 'red'); - $('li').add('

    new paragraph

    ') - .css('background-color', 'red'); - $("div").css("border", "2px solid red") - .add("p") - .css("background", "yellow"); - $("p").add("span").css("background", "yellow"); - $("p").clone().add("Again").appendTo(document.body); - $("p").add(document.getElementById("a")).css("background", "yellow"); - var collection = $("p"); - - collection = collection.add(document.getElementById("a")); - collection.css("background", "yellow"); -} - -function test_addClass() { - $("p").addClass("myClass yourClass"); - $("p").removeClass("myClass noClass").addClass("yourClass"); - $("ul li:last").addClass(function (index) { - return "item-" + index; - }); - $("p:last").addClass("selected"); - $("p:last").addClass("selected highlight"); - $("div").addClass(function (index, currentClass) { - var addedClass: string; - if (currentClass === "red") { - addedClass = "green"; - $("p").text("There is one green div"); - } - return addedClass; - }); -} - -function test_after() { - $('.inner').after('

    Test

    '); - $('
    ').after('

    ').after(document.createDocumentFragment()); - $('
    ').after('

    ').addClass('foo') - .filter('p').attr('id', 'bar').html('hello') - .end() - .appendTo('body'); - $('p').after(function () { - return '
    ' + this.className + '
    '; - }); - var $newdiv1 = $('
    '), - newdiv2 = document.createElement('div'), - existingdiv1 = document.getElementById('foo'); - $('p').first().after($newdiv1, [newdiv2, existingdiv1]); - $("p").after(document.createTextNode("Hello")); - $("p").after($("b")); -} - -function test_ajax() { - $.ajax({ - url: "test.html", - context: document.body - }).done(function () { - $(this).addClass("done"); - }); - $.ajax({ - statusCode: { - 404: function () { - alert("page not found"); - } - } - }); - $.ajax({ - url: "http://fiddle.jshell.net/favicon.png", - beforeSend: function (xhr) { - xhr.overrideMimeType("text/plain; charset=x-user-defined"); - } - }).done(function (data) { - if (console && console.log) { - console.log("Sample of data:", data.slice(0, 100)); - } - }); - $.ajax({ - url: 'ajax/test.html', - success: function (data) { - $('.result').html(data); - alert('Load was performed.'); - }, - error: function (jqXHR, textStatus, errorThrown) { - alert('Load failed. responseJSON=' + jqXHR.responseJSON); - } - }); - var _super = jQuery.ajaxSettings.xhr; - jQuery.ajaxSettings.xhr = function () { - var xhr = _super(), - getAllResponseHeaders = xhr.getAllResponseHeaders; - - xhr.getAllResponseHeaders = function () { - if (getAllResponseHeaders()) { - return getAllResponseHeaders(); - } - - var allHeaders = ""; - var headersFieldNames = ["Cache-Control", "Content-Language", "Content-Type", - "Expires", "Last-Modified", "Pragma"]; - $(headersFieldNames).each(function (i, header_name) { - if (xhr.getResponseHeader(header_name)) { - allHeaders += header_name + ": " + xhr.getResponseHeader(header_name) + "\n"; - } - }); - return allHeaders; - }; - - return xhr; - }; - $.ajax({ - type: "POST", - url: "some.php", - data: { name: "John", location: "Boston" } - }).done(function (msg) { - alert("Data Saved: " + msg); - }); - $.ajax({ - method: "POST", - url: "some.php", - data: { name: "John", location: "Boston" } - }); - $.ajax({ - url: "test.html", - cache: false - }).done(function (html) { - $("#results").append(html); - }); - var xmlDocument = []; - var xmlRequest = $.ajax({ - url: "page.php", - processData: false, - data: xmlDocument - }); - var handleResponse; - xmlRequest.done(handleResponse); - - var menuId = $("ul.nav").first().attr("id"); - var request = $.ajax({ - url: "script.php", - type: "POST", - data: { id: menuId }, - dataType: "html" - }); - request.done(function (msg) { - $("#log").html(msg); - }); - request.fail(function (jqXHR, textStatus) { - alert("Request failed: " + textStatus); - }); - - $.ajax({ - type: "GET", - url: "test.js", - dataType: "script" - }); - - // Test the jqXHR object returned by $.ajax() as of 1.5 - // More details: http://api.jquery.com/jQuery.ajax/#jqXHR - - // done method - $.ajax({ - url: "test.js" - }).done((data, textStatus, jqXHR) => { - console.log(data, textStatus, jqXHR); - }); - - // then method can change promise type through promise chaining - var chainedValuePromise : JQueryPromise; - chainedValuePromise = $.ajax({ - url: "test.js" - }).then(() => $.when(1)); - - // fail method - $.ajax({ - url: "test.js" - }).fail((jqXHR, textStatus, errorThrown) => { - console.log(jqXHR, textStatus, errorThrown); - }); - - // always method with successful request - $.ajax({ - url: "test.js" - }).always((data, textStatus, jqXHR) => { - console.log(data, textStatus, jqXHR); - }); - - // always method with failed request - $.ajax({ - url: "test.js" - }).always((jqXHR, textStatus, errorThrown) => { - console.log(jqXHR, textStatus, errorThrown); - }); - - // then method (as of 1.8) - $.ajax({ - url: "test.js" - }).then((data, textStatus, jqXHR) => { - console.log(data, textStatus, jqXHR); - }, (jqXHR, textStatus, errorThrown) => { - console.log(jqXHR, textStatus, errorThrown); - }); - - // generic then method - var p: JQueryPromise = $.ajax({ url: "test.js" }) - .then(() => "Hello") - .then((x) => x.length); - - // jqXHR object - var jqXHR = $.ajax({ - url: "test.js" - }); - jqXHR.abort('aborting because I can'); - - //Test the promise exposed by the jqXHR object - - // done method - $.ajax({ - url: "test.js" - }).promise().done((data, textStatus, jqXHR) => { - console.log(data, textStatus, jqXHR); - }); - - // fail method - $.ajax({ - url: "test.js" - }).promise().fail((jqXHR, textStatus, errorThrown) => { - console.log(jqXHR, textStatus, errorThrown); - }); - - // always method with successful request - $.ajax({ - url: "test.js" - }).promise().always((data, textStatus, jqXHR) => { - console.log(data, textStatus, jqXHR); - }); - - // always method with failed request - $.ajax({ - url: "test.js" - }).promise().always((jqXHR, textStatus, errorThrown) => { - console.log(jqXHR, textStatus, errorThrown); - }); - - // then method (as of 1.8) - $.ajax({ - url: "test.js" - }).promise().then((data, textStatus, jqXHR) => { - console.log(data, textStatus, jqXHR); - }, (jqXHR, textStatus, errorThrown) => { - console.log(jqXHR, textStatus, errorThrown); - }); - - // generic then method - var p: JQueryPromise = $.ajax({ url: "test.js" }).promise() - .then(() => "Hello") - .then((x) => x.length); -} - -function test_ajaxComplete() { - $('.log').ajaxComplete(function () { - $(this).text('Triggered ajaxComplete handler.'); - }); - $('.trigger').click(function () { - $('.result').load('ajax/test.html'); - }); - $('.log').ajaxComplete(function (e, xhr, settings) { - if (settings.url == 'ajax/test.html') { - $(this).text('Triggered ajaxComplete handler. The result is ' + xhr.responseText); - } - }); - $("#msg").ajaxComplete(function (event, request, settings) { - $(this).append("
  • Request Complete.
  • "); - }); -} - -function test_ajaxError() { - $("div.log").ajaxError(function () { - $(this).text("Triggered ajaxError handler."); - }); - $("button.trigger").click(function () { - $("div.result").load("ajax/missing.html"); - }); - $("div.log").ajaxError(function (e, jqxhr, settings, exception) { - if (settings.url == "ajax/missing.html") { - $(this).text("Triggered ajaxError handler."); - } - }); - $("#msg").ajaxError(function (event, request, settings) { - $(this).append("
  • Error requesting page " + settings.url + "
  • "); - }); -} - -function test_ajaxPrefilter() { - var currentRequests = {}; - $.ajaxPrefilter(function (options, originalOptions, jqXHR) { - if (options.abortOnRetry) { - if (currentRequests[options.url]) { - currentRequests[options.url].abort(); - } - currentRequests[options.url] = jqXHR; - } - }); - $.ajaxPrefilter(function (options) { - if (options.crossDomain) { - options.url = "http://mydomain.net/proxy/" + encodeURIComponent(options.url); - options.crossDomain = false; - } - }); - $.ajaxPrefilter("json script", function (options, originalOptions, jqXHR) { - - }); - var isActuallyScript; - $.ajaxPrefilter(function (options) { - if (isActuallyScript(options.url)) { - return "script"; - } - }); -} - -function test_ajaxSend() { - $('.log').ajaxSend(function () { - $(this).text('Triggered ajaxSend handler.'); - }); - $('.trigger').click(function () { - $('.result').load('ajax/test.html'); - }); - $('.log').ajaxSend(function (e, jqxhr, settings) { - if (settings.url == 'ajax/test.html') { - $(this).text('Triggered ajaxSend handler.'); - } - }); - $("#msg").ajaxSend(function (evt, request, settings) { - $(this).append("
  • Starting request at " + settings.url + "
  • "); - }); -} - -function test_ajaxSetup() { - $.ajaxSetup({ - url: 'ping.php' - }); - $.ajax({ - data: { 'name': 'Dan' } - }); - $.ajaxSetup({ - url: "/xmlhttp/", - global: false, - type: "POST" - }); -} - -function test_ajaxStart() { - $('.log').ajaxStart(function () { - $(this).text('Triggered ajaxStart handler.'); - }); - $('.trigger').click(function () { - $('.result').load('ajax/test.html'); - }); - $("#loading").ajaxStart(function () { - $(this).show(); - }); -} - -function test_ajaxStop() { - $('.log').ajaxStop(function () { - $(this).text('Triggered ajaxStop handler.'); - }); - $('.trigger').click(function () { - $('.result').load('ajax/test.html'); - }); - $("#loading").ajaxStop(function () { - $(this).hide(); - }); -} - -function test_ajaxSuccess() { - $('.log').ajaxSuccess(function () { - $(this).text('Triggered ajaxSuccess handler.'); - }); - $('.trigger').click(function () { - $('.result').load('ajax/test.html'); - }); - $('.log').ajaxSuccess(function (e, xhr, settings) { - if (settings.url == 'ajax/test.html') { - $(this).text('Triggered ajaxSuccess handler. The ajax response was:' + xhr.responseText); - } - }); - $("#msg").ajaxSuccess(function (evt, request, settings) { - $(this).append("
  • Successful Request!
  • "); - }); -} - -function test_allSelector() { - var elementCount = $("*").css("border", "3px solid red").length; - $("body").prepend("

    " + elementCount + " elements found

    "); - var elementCount2 = $("#test").find("*").css("border", "3px solid red").length; - $("body").prepend("

    " + elementCount2 + " elements found

    "); -} - -function test_animate() { - $('#clickme').click(function () { - $('#book').animate({ - opacity: 0.25, - left: '+=50', - height: 'toggle' - }, 5000, function () { - }); - }); - $('li').animate({ - opacity: .5, - height: '50%' - }, { - step: function (now, fx) { - var data = fx.elem.id + ' ' + fx.prop + ': ' + now; - $('body').append('
    ' + data + '
    '); - } - }); - $('#clickme').click(function () { - $('#book').animate({ - width: ['toggle', 'swing'], - height: ['toggle', 'swing'], - opacity: 'toggle' - }, 5000, 'linear', function () { - $(this).after('
    Animation complete.
    '); - }); - }); - $('#clickme').click(function () { - $('#book').animate({ - width: 'toggle', - height: 'toggle' - }, { - duration: 5000, - specialEasing: { - width: 'linear', - height: 'easeOutBounce' - }, - complete: function () { - $(this).after('
    Animation complete.
    '); - } - }); - }); - $("#go").click(function () { - $("#block").animate({ - width: "70%", - opacity: 0.4, - marginLeft: "0.6in", - fontSize: "3em", - borderWidth: "10px" - }, 1500); - }); - $("#right").click(function () { - $(".block").animate({ "left": "+=50px" }, "slow"); - }); - $("#left").click(function () { - $(".block").animate({ "left": "-=50px" }, "slow"); - }); - $("#go1").click(function () { - $("#block1").animate({ width: "90%" }, { queue: false, duration: 3000 }) - .animate({ fontSize: "24px" }, 1500) - .animate({ borderRightWidth: "15px" }, 1500); - }); - $("#go2").click(function () { - $("#block2").animate({ width: "90%" }, 1000) - .animate({ fontSize: "24px" }, 1000) - .animate({ borderLeftWidth: "15px" }, 1000); - }); - $("#go3").click(function () { - $("#go1").add("#go2").click(); - }); - $("#go4").click(function () { - $("div").css({ width: "", fontSize: "", borderWidth: "" }); - }); - $("#go").click(function () { - $(".block:first").animate({ - left: 100 - }, { - duration: 1000, - step: function (now, fx) { - $(".block:gt(0)").css("left", now); - } - }); - }); - $("p").animate({ - height: "toggle", opacity: "toggle" - }, "slow"); - $("p").animate({ - left: 50, opacity: 1 - }, 500); - $("p").animate({ - left: "50px", opacity: 1 - }, { duration: 500, queue: false }); - $("p").animate({ - opacity: "show" - }, "slow", "easein"); - $("p").animate({ - height: "toggle", opacity: "toggle" - }, { duration: "slow" }); - $("p").animate({ - opacity: "show" - }, { duration: "slow", easing: "easein" }); - $("p").animate({ - height: 200, width: 400, opacity: 0.5 - }, 1000, "linear", function () { - alert("all done"); - }); -} - -function test_animatedSelector() { - $("#run").click(function () { - $("div:animated").toggleClass("colored"); - }); - function animateIt() { - $("#mover").slideToggle("slow", animateIt); - } - animateIt(); -} - -function test_slideToggle() { - $("button").click(function () { - $("p").slideToggle("slow"); - }); - - $("#aa").click(function () { - $("div:not(.still)").slideToggle("slow", function () { - var n = parseInt($("span").text(), 10); - $("span").text(n + 1); - }); - }); -} - -function test_toggle() { - $(".target").toggle(); - - $("#clickme").click(function () { - $("#book").toggle("slow", function () { - // Animation complete. - }); - }); - - $("#foo").toggle(true); - - $("button").click(function () { - $("p").toggle(); - }); - - $("button").click(function () { - $("p").toggle("slow"); - }); - - var flip = 0; - $("button").click(function () { - $("p").toggle(flip++ % 2 === 0); - }); -} - -function test_append() { - $('.inner').append('

    Test

    '); - $('.container').append($('h2')).append(document.createDocumentFragment()); - - var $newdiv1 = $('
    '), - newdiv2 = document.createElement('div'), - existingdiv1 = document.getElementById('foo'); - - $('body').append($newdiv1, [newdiv2, existingdiv1]); -} - -function test_appendTo() { - $('

    Test

    ').appendTo('.inner'); - $('h2').appendTo($('.container')); -} - -function test_attr() { - var title = $("em").attr("title"); - $("em").attr("title", null); // Delete an attribute. - $("div").text(title); - $('#greatphoto').attr('alt', 'Beijing Brush Seller'); - $('#greatphoto') - .attr('title', 'Photo by Kelly Clark'); - $('#greatphoto').attr({ - alt: 'Beijing Brush Seller', - title: 'photo by Kelly Clark' - }); - $('#greatphoto').attr('title', function (i, val) { - return val + ' - photo by Kelly Clark' - }); - $("div").attr("id", function (arr) { - return "div-id" + arr; - }) - .each(function () { - $("span", this).html("(ID = '" + this.id + "')"); - }); - $("img").attr("src", function () { - return "/images/" + this.title; - }); -} - -function test_attributeSelectors() { - $('a[hreflang|="en"]').css('border', '3px dotted green'); - $('input[name*="man"]').val('has man in it!'); - $('input[name~="man"]').val('mr. man is in it!'); - $('input[name$="letter"]').val('a letter'); - $('input[value="Hot Fuzz"]').next().text(" Hot Fuzz"); - $('input[name!="newsletter"]').next().append('; not newsletter'); - $('input[name^="news"]').val('news here!'); -} - -function test_before() { - $('.inner').before('

    Test

    '); - $('.container').before($('h2')).before(document.createDocumentFragment()); - $("
    ").before("

    "); - var $newdiv1 = $('
    '), - newdiv2 = document.createElement('div'), - existingdiv1 = document.getElementById('foo'); - $('p').first().before($newdiv1, [newdiv2, existingdiv1]); -} - -function test_bind() { - $('#foo').bind('click', function () { - alert('User clicked on "foo."'); - }); - $('#foo').bind('mouseenter mouseleave', function () { - $(this).toggleClass('entered'); - }); - $('#foo').bind({ - click: function () { }, - mouseenter: function () { } - }); - $('#foo').bind('click', function () { - alert($(this).text()); - }); - $(document).ready(function () { - $('#foo').bind('click', function (event) { - alert('The mouse cursor is at (' - + event.pageX + ', ' + event.pageY + ')'); - }); - }); - var message = 'Spoon!'; - $('#foo').bind('click', function () { - alert(message); - }); - message = 'Not in the face!'; - $('#bar').bind('click', function () { - alert(message); - }); - var message = 'Spoon!'; - $('#foo').bind('click', { msg: message }, function (event) { - alert(event.data.msg); - }); - message = 'Not in the face!'; - $('#bar').bind('click', { msg: message }, function (event) { - alert(event.data.msg); - }); - $("p").bind("click", function (event) { - var str = "( " + event.pageX + ", " + event.pageY + " )"; - $("span").text("Click happened! " + str); - }); - $("p").bind("dblclick", function () { - $("span").text("Double-click happened in " + this.nodeName); - }); - $("p").bind("mouseenter mouseleave", function (event) { - $(this).toggleClass("over"); - }); - $("p").bind("click", function () { - alert($(this).text()); - }); - function handler(event) { - alert(event.data.foo); - } - $("p").bind("click", { foo: "bar" }, handler) - $("form").bind("submit", function () { return false; }) - $("form").bind("submit", function (event) { - event.preventDefault(); - }); - $("form").bind("submit", function (event) { - event.stopPropagation(); - }); - $("p").bind("myCustomEvent", function (e, myName?, myValue?) { - $(this).text(myName + ", hi there!"); - $("span").stop().css("opacity", 1) - .text("myName = " + myName) - .fadeIn(30).fadeOut(1000); - }); - $("button").click(function () { - $("p").trigger("myCustomEvent", ["John"]); - }); - $("div.test").bind({ - click: function () { - $(this).addClass("active"); - }, - mouseenter: function () { - $(this).addClass("inside"); - }, - mouseleave: function () { - $(this).removeClass("inside"); - } - }); -} - -function test_unbind() { - $("#foo").unbind(); - - $("#foo").unbind("click"); - - var handler = function () { - alert("The quick brown fox jumps over the lazy dog."); - }; - $("#foo").bind("click", handler); - $("#foo").unbind("click", handler); - - $("#foo").bind("click", function () { - alert("The quick brown fox jumps over the lazy dog."); - }); - - // Will NOT work - $("#foo").unbind("click", function () { - alert("The quick brown fox jumps over the lazy dog."); - }); - - $("#foo").bind("click.myEvents", handler); - - $("#foo").unbind("click"); - - $("#foo").unbind("click.myEvents"); - - $("#foo").unbind(".myEvents"); - - var timesClicked = 0; - $("#foo").bind("click", function (event) { - alert("The quick brown fox jumps over the lazy dog."); - timesClicked++; - if (timesClicked >= 3) { - $(this).unbind(event); - } - }); - - function aClick() { - $("div").show().fadeOut("slow"); - } - $("#bind").click(function () { - $("#theone") - .bind("click", aClick) - .text("Can Click!"); - }); - $("#unbind").click(function () { - $("#theone") - .unbind("click", aClick) - .text("Does nothing..."); - }); - - $("p").unbind(); - - $("p").unbind("click"); - - var foo = function () { - // Code to handle some kind of event - }; - - $("p").bind("click", foo); // ... Now foo will be called when paragraphs are clicked ... - - $("p").unbind("click", foo); // ... foo will no longer be called. -} - -function test_blur() { - $('#target').blur(function () { - alert('Handler for .blur() called.'); - }); - $('#other').click(function () { - $('#target').blur(); - - }); - $("p").blur(); -} - -interface JQueryStatic { Topic; } -function test_callbacks() { - function fn1(value) { - console.log(value); - } - function fn2(value) { - fn1("fn2 says:" + value); - return false; - } - var callbacks = $.Callbacks(); - var callbacks2 = $.Callbacks("once"); - callbacks.add(fn1); - callbacks.fire("foo!"); - callbacks.add(fn2); - callbacks.fire("bar!"); - callbacks.remove(fn2); - callbacks.fire("foobar"); - var topics = {}; - - jQuery.Topic = function (id) { - var callbacks, - method, - topic = id && topics[id]; - if (!topic) { - callbacks = jQuery.Callbacks(); - topic = { - publish: callbacks.fire, - subscribe: callbacks.add, - unsubscribe: callbacks.remove - }; - if (id) { - topics[id] = topic; - } - } - return topic; - }; - $.Topic("mailArrived").subscribe(fn1); - $.Topic("mailArrived").subscribe(fn2); - $.Topic("mailSent").subscribe(fn1); - $.Topic("mailArrived").publish("hello world!"); - $.Topic("mailSent").publish("woo! mail!"); - $.Topic("mailArrived").subscribe(fn1); - - var dfd = $.Deferred(); - var topic = $.Topic("mailArrived"); - dfd.done(topic.publish); - dfd.resolve("its been published!"); -} - -function test_callbacksFunctions() { - var foo = function (value) { - console.log('foo:' + value); - } - var bar = function (value) { - console.log('bar:' + value); - } - var callbacks = $.Callbacks(); - callbacks.add(foo); - callbacks.fire('hello'); - callbacks.add(bar); - callbacks.fire('world'); - callbacks.disable(); - - // Test the disabled state of the list - console.log(callbacks.disabled()); - // Outputs: true - - callbacks.empty(); - callbacks.fire('hello'); - console.log(callbacks.fired()); - callbacks.fireWith(window, ['foo', 'bar']); - var foo2 = function (value1, value2) { - console.log('Received:' + value1 + ',' + value2); - }; - console.log(callbacks.has(foo2)); - callbacks.lock(); - console.log(callbacks.locked()); - callbacks.remove(foo); -} - -function test_change() { - $('.target').change(function () { - alert('Handler for .change() called.'); - }); - $('#other').click(function () { - $('.target').change(); - }); - $("input[type='text']").change(function () { }); - $("input[type='text']").change(); -} - -function test_children() { - $('ul.level-2').children().css('background-color', 'red'); - $("#container").click(function (e) { - $("*").removeClass("hilite"); - var $kids = $(e.target).children(); - var len = $kids.addClass("hilite").length; - - $("#results span:first").text(len); - //$("#results span:last").text(e.target.tagName); - - e.preventDefault(); - return false; - }); - $("div").children(".selected").css("color", "blue"); -} - -function test_clearQueue() { - $("#start").click(function () { - var myDiv = $("div"); - myDiv.show("slow"); - myDiv.animate({ left: '+=200' }, 5000); - myDiv.queue(function () { - var _this = $(this); - _this.addClass("newcolor"); - _this.dequeue(); - }); - myDiv.animate({ left: '-=200' }, 1500); - myDiv.queue(function () { - var _this = $(this); - _this.removeClass("newcolor"); - _this.dequeue(); - }); - myDiv.slideUp(); - - }); - $("#stop").click(function () { - var myDiv = $("div"); - myDiv.clearQueue(); - myDiv.stop(); - }); -} - -function test_click() { - $("#target").click(function () { - alert("Handler for .click() called."); - }); - $("#other").click(function () { - $("#target").click(); - }); - $("p").click(function () { - $(this).slideUp(); - }); - $("p").click(); -} - -function test_submit() { - $("#target").submit(function () { - alert("Handler for .submit() called."); - }); - $("#target").submit(); -} - -function test_trigger() { - - $("#foo").on("click", function () { - alert($(this).text()); - }); - $("#foo").trigger("click"); - - $("#foo").on("custom", function (event, param1?, param2?) { - alert(param1 + "\n" + param2); - }); - $("#foo").trigger("custom", ["Custom", "Event"]); - - $("button:first").click(function () { - update($("span:first")); - }); - - $("button:last").click(function () { - $("button:first").trigger("click"); - update($("span:last")); - }); - - function update(j) { - var n = parseInt(j.text(), 10); - j.text(n + 1); +function JQuery() { + function type_assertion() { + const $el = $(document.createElement('canvas')); + const $canvas = $el as JQuery; } - $("form:first").trigger("submit"); - - var event = jQuery.Event("submit"); - $("form:first").trigger(event); - if (event.isDefaultPrevented()) { - // Perform an action... - } - - $("p") - .click(function (event, a, b) { - // When a normal click fires, a and b are undefined - // for a trigger like below a refers to "foo" and b refers to "bar" - }) - .trigger("click", ["foo", "bar"]); - - var event = jQuery.Event("logged"); - (event).user = "foo"; - (event).pass = "bar"; - $("body").trigger(event); - - // Adapted from jQuery documentation which may be wrong on this occasion - var event2 = jQuery.Event("logged"); - $("body").trigger(event2, { - type: "logged", - user: "foo", - pass: "bar" - }); -} - -function test_clone() { - $('.hello').clone().appendTo('.goodbye'); - var $elem = $('#elem').data({ "arr": [1] }), - $clone = $elem.clone(true) - .data("arr", $.extend([], $elem.data("arr"))); - $("b").clone().prependTo("p"); - $('#copy').append($('#orig .elem') - .clone() - .children('a') - .prepend('foo - ') - .parent() - .clone()); -} - -function test_prepend() { - $('.inner').prepend('

    Test

    '); - $('.container').prepend($('h2')).prepend(document.createDocumentFragment()); - - var $newdiv1 = $('
    '), - newdiv2 = document.createElement('div'), - existingdiv1 = document.getElementById('foo'); - - $('body').prepend($newdiv1, [newdiv2, existingdiv1]); -} - -function test_prependTo() { - $("

    Test

    ").prependTo(".inner"); - $("h2").prependTo($(".container")); - $("span").prependTo("#foo"); -} - -function test_closest() { - $('li.item-a').closest('ul') - .css('background-color', 'red'); - $('li.item-a').closest('li') - .css('background-color', 'red'); - var listItemII = document.getElementById('ii'); - $('li.item-a').closest('ul', listItemII) - .css('background-color', 'red'); - $('li.item-a').closest('#one', listItemII) - .css('background-color', 'green'); - $(document).bind("click", function (e) { - $(e.target).closest("li").toggleClass("hilight"); - }); - var $listElements = $("li").css("color", "blue"); - $(document).bind("click", function (e) { - //$(e.target).closest($listElements).toggleClass("hilight"); - }); -} - -function test_contains() { - jQuery.contains(document.documentElement, document.body); - jQuery.contains(document.body, document.documentElement); -} - -function test_contents() { - $('.container').contents().filter(function () { - return this.nodeType == 3; - }) - .wrap('

    ') - .end() - .filter('br') - .remove(); - $("#frameDemo").contents().find("a").css("background-color", "#BADA55"); -} - -function test_context() { - $("ul") - .append("
  • " + $("ul").context + "
  • ") - .append("
  • " + $("ul", document.body).context.nodeName + "
  • "); -} - -function test_css() { - $("div").click(function () { - var color = $(this).css("background-color"); - $("#result").html("That div is " + color + "."); - }); - $('div.example').css('width', function (index) { - return index * 50; - }); - $("p").mouseover(function () { - $(this).css("color", "red"); - }); - $("#box").one("click", function () { - $(this).css("width", "+=200"); - }); - var words = $("p:first").text().split(" "); - var text = words.join(" "); - $("p:first").html("" + text + ""); - $("span").click(function () { - $(this).css("background-color", "yellow"); - }); - $("p").hover(function () { - $(this).css({ 'background-color': 'yellow', 'font-weight': 'bolder' }); - }, function () { - var cssObj = { - 'background-color': '#ddd', - 'font-weight': '', - 'color': 'rgb(0,40,244)' + function iterable() { + for (const a of $('div')) { + a.textContent = 'myDiv'; } - $(this).css(cssObj); - }); - $("div").click(function () { - $(this).css({ - width: function (index, value) { - return parseFloat(value) * 1.2; - }, - height: function (index, value) { - return parseFloat(value) * 1.2; - } - }); - }); - var dims = $("#box").css([ "width", "height", "backgroundColor" ]); -} - -function test_cssHooks() { - if (!$.cssHooks) { - throw ("jQuery 1.4.3 or above is required for this plugin to work"); - } - $.cssHooks["someCSSProp"] = { - get: function (elem, computed, extra) { }, - set: function (elem, value) { } - }; - function styleSupport(prop) { - var vendorProp, supportedProp, - capProp = prop.charAt(0).toUpperCase() + prop.slice(1), - prefixes = ["Moz", "Webkit", "O", "ms"], - div = document.createElement("div"); - - if (prop in div.style) { - supportedProp = prop; - } else { - for (var i = 0; i < prefixes.length; i++) { - vendorProp = prefixes[i] + capProp; - if (vendorProp in div.style) { - supportedProp = vendorProp; - break; - } - } - } - div = null; - $.support[prop] = supportedProp; - return supportedProp; - } - styleSupport("borderRadius"); - - $.cssNumber["someCSSProp"] = true; - $.fx.step["someCSSProp"] = function (fx) { - $.cssHooks["someCSSProp"].set(fx.elem, fx.now + fx.unit); - }; -} - -function test_data() { - $('body').data('foo', 52); - $('body').data('bar', { myType: 'test', count: 40 }); - $('body').data('foo'); - $('body').data(); - $("div").data("test", { first: 16, last: "pizza!" }); - $("span:first").text($("div").data("test").first); - $("span:last").text($("div").data("test").last); - alert($('body').data('foo')); - alert($('body').data()); - alert($("body").data("foo")); - $("body").data("bar", "foobar"); - alert($("body").data("bar")); - $("div").data("role") === "page"; - $("div").data("lastValue") === 43; - $("div").data("hidden") === true; - $("div").data("options").name === "John"; - var value; - switch ($("button").index(this)) { - case 0: - value = $("div").data("blah"); - break; - case 1: - $("div").data("blah", "hello"); - value = "Stored!"; - break; - case 2: - $("div").data("blah", 86); - value = "Stored!"; - break; - case 3: - $("div").removeData("blah"); - value = "Removed!"; - break; - } - $("span").text("" + value); - jQuery.data(document.body, 'foo', 52); - jQuery.data(document.body, 'bar', 'test'); - var div = $("div")[0]; - jQuery.data(div, "test", { first: 16, last: "pizza!" }); - $("span:first").text(jQuery.data(div, "test").first); - $("span:last").text(jQuery.data(div, "test").last); - $.data(document.getElementById("id"), "", 8).toFixed(2); - $.data(document.getElementById("id"), "", "8").toUpperCase(); -} - -function test_removeData() { - $("span:eq(0)").text("" + $("div").data("test1")); - $("div").data("test1", "VALUE-1"); - $("div").data("test2", "VALUE-2"); - $("span:eq(1)").text("" + $("div").data("test1")); - $("div").removeData("test1"); - $("span:eq(2)").text("" + $("div").data("test1")); - $("span:eq(3)").text("" + $("div").data("test2")); -} - -function test_jQuery_removeData() { - var div = $("div")[0]; - $("span:eq(0)").text("" + $("div").data("test1")); - jQuery.data(div, "test1", "VALUE-1"); - jQuery.data(div, "test2", "VALUE-2"); - $("span:eq(1)").text("" + jQuery.data(div, "test1")); - jQuery.removeData(div, "test1"); - $("span:eq(2)").text("" + jQuery.data(div, "test1")); - $("span:eq(3)").text("" + jQuery.data(div, "test2")); -} - -function test_removeDataAll() { - var el = $("div"); - el.data("test1", "VALUE-1"); - el.data("test2", "VALUE-2"); - el.removeData(); -} - -function test_dblclick() { - $('#target').dblclick(function () { - alert('Handler for .dblclick() called.'); - }); - $('#other').click(function () { - $('#target').dblclick(); - }); - $("p").dblclick(function () { alert("Hello World!"); }); - var divdbl = $("div:first"); - divdbl.dblclick(function () { - divdbl.toggleClass('dbl'); - }); - $('#target').dblclick(); -} - -function test_delay() { - $('#foo').slideUp(300).delay(800).fadeIn(400); - $("button").click(function () { - $("div.first").slideUp(300).delay(800).fadeIn(400); - $("div.second").slideUp(300).fadeIn(400); - }); -} - -function test_delegate() { - $("table").delegate("td", "click", function () { - $(this).toggleClass("chosen"); - }); - $("table").on("click", "td", function () { - $(this).toggleClass("chosen"); - }); - $("body").delegate("p", "click", function () { - $(this).after("

    Another paragraph!

    "); - }); - $("body").delegate("p", "click", function () { - alert($(this).text()); - }); - $("body").delegate("a", "click", function () { return false; }); - $("body").delegate("a", "click", function (event) { - event.preventDefault(); - }); - $("body").delegate("p", "myCustomEvent", function (e, myName?, myValue?) { - $(this).text("Hi there!"); - $("span").stop().css("opacity", 1) - .text("myName = " + myName) - .fadeIn(30).fadeOut(1000); - }); - $("button").click(function () { - $("p").trigger("myCustomEvent"); - }); -} - -function test_undelegate() { - function aClick() { - $("div").show().fadeOut("slow"); - } - $("#bind").click(function () { - $("body") - .delegate("#theone", "click", aClick) - .find("#theone").text("Can Click!"); - }); - $("#unbind").click(function () { - $("body") - .undelegate("#theone", "click", aClick) - .find("#theone").text("Does nothing..."); - }); - - $("p").undelegate(); - - $("p").undelegate("click"); - - var foo = function () { - // Code to handle some kind of event - }; - - // ... Now foo will be called when paragraphs are clicked ... - $("body").delegate("p", "click", foo); - - // ... foo will no longer be called. - $("body").undelegate("p", "click", foo); - - var foo = function () { - // Code to handle some kind of event - }; - - // Delegate events under the ".whatever" namespace - $("form").delegate(":button", "click.whatever", foo); - - $("form").delegate("input[type='text'] ", "keypress.whatever", foo); - - // Unbind all events delegated under the ".whatever" namespace - $("form").undelegate(".whatever"); -} - -function test_dequeue() { - $("button").click(function () { - $("div").animate({ left: '+=200px' }, 2000); - $("div").animate({ top: '0px' }, 600); - $("div").queue(function () { - $(this).toggleClass("red"); - $(this).dequeue(); - }); - $("div").animate({ left: '10px', top: '30px' }, 700); - }); -} - -function test_queue() { - - $("#show").click(function () { - var n = jQuery.queue($("div")[0], "fx"); - $("span").text("Queue length is: " + n.length); - }); - - function runIt() { - $("div") - .show("slow") - .animate({ - left: "+=200" - }, 2000) - .slideToggle(1000) - .slideToggle("fast") - .animate({ - left: "-=200" - }, 1500) - .hide("slow") - .show(1200) - .slideUp("normal", runIt); } - runIt(); + function arrayLike() { + // $ExpectType HTMLElement + $('div')[0]; - $(document.body).click(function () { - var divs = $("div") - .show("slow") - .animate({ left: "+=200" }, 2000); - jQuery.queue(divs[0], "fx", function () { - $(this).addClass("newcolor"); - jQuery.dequeue(this); - }); - divs.animate({ left: "-=200" }, 500); - jQuery.queue(divs[0], "fx", function () { - $(this).removeClass("newcolor"); - jQuery.dequeue(this); - }); - divs.slideUp(); - }); + $('div')[0] = new HTMLElement(); + } - $("#start").click(function () { - var divs = $("div") - .show("slow") - .animate({ left: "+=200" }, 5000); - jQuery.queue(divs[0], "fx", function () { - $(this).addClass("newcolor"); - jQuery.dequeue(this); - }); - divs.animate({ left: "-=200" }, 1500); - jQuery.queue(divs[0], "fx", function () { - $(this).removeClass("newcolor"); - jQuery.dequeue(this); - }); - divs.slideUp(); - }); - $("#stop").click(function () { - jQuery.queue($("div")[0], "fx", []); - $("div").stop(); - }); -} + function ajax() { + function ajaxComplete() { + // $ExpectType JQuery + $(document).ajaxComplete(function(event, jqXHR, ajaxOptions) { + // $ExpectType Document + this; + // $ExpectType Event + event; + // $ExpectType jqXHR + jqXHR; + // $ExpectType AjaxSettings + ajaxOptions; -function test_detach() { - $("p").click(function () { - $(this).toggleClass("off"); - }); - var p; - $("button").click(function () { - if (p) { - p.appendTo("body"); - p = null; - } else { - p = $("p").detach(); - } - }); -} - -function test_each() { - var numArray: number[]; - numArray = $.each([1, 2, 3, 4], function (index: number, value: number) { - alert(index + ': ' + value); - }); - numArray = $.each([1, 2, 3, 4], function (index: number, value: number) { - alert(index + ': ' + value); - return value < 2; - }); - - var res: {one: number, 2: string}; - res = $.each({ one: 1, 2: "two" }, function(key: string, value: any) { - alert(key + ': ' + value); - }); - res = $.each({ one: 1, 2: "two" }, function(key: string, value: any) { - alert(key + ': ' + value); - return key === "2"; - }); - - var map = { - 'flammable': 'inflammable', - 'duh': 'no duh' - }; - $.each(map, function (key, value) { - alert(key + ': ' + value); - }); - var arr = ["one", "two", "three", "four", "five"]; - var obj = { one: 1, two: 2, three: 3, four: 4, five: 5 }; - jQuery.each(arr, function () { - $("#" + this).text("Mine is " + this + "."); - return (this != "three"); - }); - jQuery.each(obj, function (i, val) { - $("#" + i).append(document.createTextNode(" - " + val)); - }); - $.each(['a', 'b', 'c'], function (i, l) { - alert("Index #" + i + ": " + l); - }); - $.each({ name: "John", lang: "JS" }, function (k, v) { - alert("Key: " + k + ", Value: " + v); - }); - $.each([{a: 1}, {a: 2}, {a: 3}], function (i, o) { - alert("Index #" + i + ": " + o.a); - }); - $('li').each(function (index) { - alert(index + ': ' + $(this).text()); - }); - $(document.body).click(function () { - $("div").each(function (i) { - if (this.style.color != "blue") { - this.style.color = "blue"; - } else { - this.style.color = ""; - } - }); - }); - $("span").click(function () { - $("li").each(function () { - $(this).toggleClass("example"); - }); - }); - $("button").click(function () { - $("div").each(function (index, domEle) { - // domEle == this - $(domEle).css("backgroundColor", "yellow"); - if ($(this).is("#stop")) { - $("span").text("Stopped at div index #" + index); return false; - } - }); - }); -} - -function test_empty() { - $('.hello').empty(); -} - -function test_end() { - $('ul.first').find('.foo').css('background-color', 'red') - .end().find('.bar').css('background-color', 'green'); - $('ul.first').find('.foo') - .css('background-color', 'red') - .end().find('.bar') - .css('background-color', 'green') - .end(); -} - -function test_eq() { - $('li').eq(2).css('background-color', 'red'); - $('li').eq(-2).css('background-color', 'red'); - $('li').eq(5).css('background-color', 'red'); - $("body").find("div").eq(2).addClass("blue"); -} - -function test_error() { - $('#book') - .error(function () { - alert('Handler for .error() called.') - }) - .attr("src", "missing.png"); - $("img") - .error(function () { - $(this).hide(); - }) - .attr("src", "missing.png"); - jQuery.error("Oups"); - jQuery.error = (message?: string) => { - console.error(message); return this; - }; -} - -function test_eventParams() { - $("p").click(function (event) { - event.currentTarget === this; - }); - $(".box").on("click", "button", function (event) { - $(event.delegateTarget).css("background-color", "red"); - }); - $("a").click(function (event) { - event.isDefaultPrevented(); - event.preventDefault(); - event.isDefaultPrevented(); - }); - function immediatePropStopped(e) { - var msg = ""; - if (e.isImmediatePropagationStopped()) { - msg = "called" - } else { - msg = "not called"; - } - $("#stop-log").append("
    " + msg + "
    "); - } - $("button").click(function (event) { - immediatePropStopped(event); - event.stopImmediatePropagation(); - immediatePropStopped(event); - }); - function propStopped(e) { - var msg = ""; - if (e.isPropagationStopped()) { - msg = "called"; - } else { - msg = "not called"; - } - $("#stop-log").append("
    " + msg + "
    "); - } - $("button").click(function (event) { - propStopped(event); - event.stopPropagation(); - propStopped(event); - }); - $("p").bind("test.something", function (event) { - alert(event.namespace); - }); - $("button").click(function (event) { - $("p").trigger("test.something"); - }); - $(document).bind('mousemove', function (e) { - $("#log").text("e.pageX: " + e.pageX + ", e.pageY: " + e.pageY); - }); - $("a").click(function (event) { - event.preventDefault(); - $('
    ') - .append('default ' + event.type + ' prevented') - .appendTo('#log'); - }); - $("a").mouseout(function (event) { - alert(event.relatedTarget.nodeName); - }); - $("button").click(function (event) { - return "hey"; - }); - $("button").click(function (event) { - $("p").html(event.result); - }); - $("p").click(function (event) { - event.stopImmediatePropagation(); - }); - $("p").click(function (event) { - $(this).css("background-color", "#f00"); - }); - $("div").click(function (event) { - $(this).css("background-color", "#f00"); - }); - $("p").click(function (event) { - event.stopPropagation(); - }); - $("body").click(function (event) { - //bugfix, duplicate identifier. see: http://stackoverflow.com/questions/14824143/duplicate-identifier-nodename-in-jquery-d-ts - //$("#log").html("clicked: " + event.target.nodeName); - }); - $('#whichkey').bind('keydown', function (e) { - $('#log').html(e.type + ': ' + e.which); - }); - $('#whichkey').bind('mousedown', function (e) { - $('#log').html(e.type + ': ' + e.which); - }); - $(window).on('mousewheel', (e) => { - var delta = (e.originalEvent).deltaY; - }); - $( "p" ).click(function( event ) { - alert( event.currentTarget === this ); // true - }); -} - -function test_extend() { - var object1 = { - apple: 0, - banana: { weight: 52, price: 100 }, - cherry: 97 - }; - var object2 = { - banana: { price: 200 }, - durian: 100 - }; - $.extend(object1, object2); - var printObj = typeof JSON != "undefined" ? JSON.stringify : function (obj) { - var arr = []; - $.each(obj, function (key, val) { - var next = key + ": "; - next += $.isPlainObject(val) ? printObj(val) : val; - arr.push(next); - }); - return "{ " + arr.join(", ") + " }"; - }; - $("#log").append(printObj(object1)); - - var defaults = { validate: false, limit: 5, name: "foo" }; - var options = { validate: true, name: "bar" }; - var settings: typeof defaults = $.extend({}, defaults, options); -} - -function test_fadeIn() { - $('#clickme').click(function () { - $('#book').fadeIn('slow', function () { }); - }); - $(document.body).click(function () { - $("div:hidden:first").fadeIn("slow"); - }); - $("a").click(function () { - $("div").fadeIn(3000, function () { - $("span").fadeIn(100); - }); - return false; - }); -} - -function test_fadeOut() { - $('#clickme').click(function () { - $('#book').fadeOut('slow', function () { }); - }); - $("p").click(function () { - $("p").fadeOut("slow"); - }); - $("span").click(function () { - $(this).fadeOut(1000, function () { - $("div").text("'" + $(this).text() + "' has faded!"); - $(this).remove(); - }); - }); - $("span").hover(function () { - $(this).addClass("hilite"); - }, function () { - $(this).removeClass("hilite"); - }); - $("#btn1").click(function () { - function complete() { - $("
    ").text(this.id).appendTo("#log"); - } - $("#box1").fadeOut(1600, "linear", complete); - $("#box2").fadeOut(1600, complete); - }); - $("#btn2").click(function () { - $("div").show(); - $("#log").empty(); - }); -} - -function test_fadeTo() { - $('#clickme').click(function () { - $('#book').fadeTo('slow', 0.5, function () { }); - }); - $("p:first").click(function () { - $(this).fadeTo("slow", 0.33); - }); - $("div").click(function () { - $(this).fadeTo("fast", Math.random()); - }); - var getPos = function (n) { - return (Math.floor(n) * 90) + "px"; - }; - $("p").each(function (n) { - var r = Math.floor(Math.random() * 3); - var tmp = $(this).text(); - $(this).text($("p:eq(" + r + ")").text()); - $("p:eq(" + r + ")").text(tmp); - $(this).css("left", getPos(n)); - }); - $("div").each(function (n) { - $(this).css("left", getPos(n)); - }) - .css("cursor", "pointer") - .click(function () { - $(this).fadeTo(250, 0.25, function () { - $(this).css("cursor", "") - .prev().css({ - "font-weight": "bolder", - "font-style": "italic" - }); - }); - }); -} - -function test_fadeToggle() { - $("button:first").click(function () { - $("p:first").fadeToggle("slow", "linear"); - }); - $("button:last").click(function () { - $("p:last").fadeToggle("fast", function () { - $("#log").append("
    finished
    "); - }); - }); -} - -function test_filter() { - $('li').filter(':even').css('background-color', 'red'); - $('li').filter(function (index) { - return index % 3 === 2; - }).css('background-color', 'red'); - $("div").css("background", "#b4b0da") - .filter(function (index) { - return index === 1 || $(this).attr("id") === "fourth"; - }) - .css("border", "3px double red"); - $("div").filter(document.getElementById("unique")); - $("div").filter($("#unique")); -} - -function test_find() { - $('li.item-ii').find('li').css('background-color', 'red'); - var item1 = $('li.item-1')[0]; - $('li.item-ii').find(item1).css('background-color', 'red'); - var $spans = $('span'); - $("p").find($spans).css('color', 'red'); - var newText = $("p").text().split(" ").join(" "); - newText = "" + newText + ""; - $("p").html(newText) - .find('span') - .hover(function () { - $(this).addClass("hilite"); - }, - function () { - $(this).removeClass("hilite"); - }) - .end() - .find(":contains('t')") - .css({ "font-style": "italic", "font-weight": "bolder" }); -} - -function test_finish() { - $(".box").finish(); -} - -function test_first() { - $('li').first().css('background-color', 'red'); -} - -function test_focus() { - $('#target').focus(function () { - alert('Handler for .focus() called.'); - }); - $('#other').click(function () { - $('#target').focus(); - }); - $("input").focus(function () { - $(this).next("span").css('display', 'inline').fadeOut(1000); - }); - $("input[type=text]").focus(function () { - $(this).blur(); - }); - $(document).ready(function () { - $("#login").focus(); - }); -} - -function test_focusin() { - $("p").focusin(function () { - $(this).find("span").css('display', 'inline').fadeOut(1000); - }); -} - -function test_focusout() { - var fo = 0, b = 0; - $("p").focusout(function () { - fo++; - $("#fo") - .text("focusout fired: " + fo + "x"); - }).blur(function () { - b++; - $("#b") - .text("blur fired: " + b + "x"); - }); -} - -function test_easing() { - const easing = jQuery.easing; - - function test_easing_function( name: string, fn: JQueryEasingFunction ) { - const step = Math.pow( 2, -3 ); // use power of 2 to prevent floating point rounding error - for( let i = 0; i <= 1; i += step ) { - console.log( `$.easing.${name}(${i}): ${fn.call(easing, i)}` ); - } - } - - test_easing_function( "linear", easing.linear ); - test_easing_function( "swing", easing.swing ); -} - -function test_fx() { - jQuery.fx.interval = 100; - $("input").click(function () { - $("div").toggle(3000); - }); - var toggleFx = function () { - $.fx.off = !$.fx.off; - }; - toggleFx(); - $("button").click(toggleFx) - $("input").click(function () { - $("div").toggle("slow"); - }); -} - -function test_get() { - $.get('ajax/test.html', function (data) { - $('.result').html(data); - alert('Load was performed.'); - }); - var jqxhr = $.get("example.php", function () { - alert("success"); - }) - .done(function () { alert("second success"); }) - .fail(function () { alert("error"); }); - - $.get("test.php"); - $.get("test.php", { name: "John", time: "2pm" }); - $.get("test.php", { 'choices[]': ["Jon", "Susan"] }); - $.get("test.php", function (data) { - alert("Data Loaded: " + data); - }); - $.get("test.cgi", { name: "John", time: "2pm" }, - function (data) { - alert("Data Loaded: " + data); - }); - $.get("test.php", - function (data) { - $('body').append("Name: " + data.name) - .append("Time: " + data.time); - }, "json"); - alert($('li').get()); - $('li').get(0); - $('li')[0]; - alert($('li').get(-1)); - function disp(divs) { - var a = []; - for (var i = 0; i < divs.length; i++) { - a.push(divs[i].innerHTML); - } - $("span").text(a.join(" ")); - } - disp($("div").get().reverse()); - $("*", document.body).click(function (e) { - e.stopPropagation(); - var domEl = $(this).get(0); - $("span:first").text("Clicked on - " + domEl.tagName); - }); -} - -function test_getJSON() { - $.getJSON('ajax/test.json', function (data) { - var items = []; - $.each(data, function (key, val) { - items.push('
  • ' + val + '
  • '); - }); - $('
      ', { - 'class': 'my-new-list', - html: items.join('') - }).appendTo('body'); - }); - var jqxhr = $.getJSON("example.json", function () { - alert("success"); - }) - .done(function () { alert("second success"); }) - .fail(function () { alert("error"); }); - $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?", - { - tags: "mount rainier", - tagmode: "any", - format: "json" - }, - function (data) { - $.each(data.items, function (i, item) { - $("").attr("src", item.media.m).appendTo("#images"); - if (i === "3") return false; - }); - }); - $.getJSON("test.js", function (json) { - alert("JSON Data: " + json.users[3].name); - }); - $.getJSON("test.js", { name: "John", time: "2pm" }, function (json) { - alert("JSON Data: " + json.users[3].name); - }); -} - -function test_getScript() { - $.getScript("ajax/test.js", function (data, textStatus, jqxhr) { - console.log(data); - console.log(textStatus); - console.log(jqxhr.status); - console.log('Load was performed.'); - }); - $.getScript("ajax/test.js") - .done(function (script, textStatus) { - console.log(textStatus); - }) - .fail(function (jqxhr, settings, exception) { - $("div.log").text("Triggered ajaxError handler."); - }); - $("div.log").ajaxError(function (e, jqxhr, settings, exception) { - if (settings.dataType == 'script') { - $(this).text("Triggered ajaxError handler."); - } - }); - $.ajaxSetup({ - cache: true - }); - $.getScript("/scripts/jquery.color.js", function () { - $("#go").click(function () { - $(".block").animate({ backgroundColor: "pink" }, 1000) - .delay(500) - .animate({ backgroundColor: "blue" }, 1000); - }); - }); -} - -function test_jQueryget() { - console.log($("li").get(0)); - console.log($("li")[0]); - console.log($("li").get(-1)); - $("*", document.body).click(function (event) { - event.stopPropagation(); - var domElement = $(this).get(0); - $("span:first").text("Clicked on - " + domElement.nodeName); - }); - - function display(divs) { - var a = []; - for (var i = 0; i < divs.length; i++) { - a.push(divs[i].innerHTML); - } - $("span").text(a.join(" ")); - } - display($("div").get().reverse()); -} - -function test_globalEval() { - jQuery.globalEval("var newVar = true;"); -} - -function test_grep() { - var arr = [1, 9, 3, 8, 6, 1, 5, 9, 4, 7, 3, 8, 6, 9, 1]; - $("div").text(arr.join(", ")); - arr = jQuery.grep(arr, function (n, i) { - return (n != 5 && i > 4); - }); - $("p").text(arr.join(", ")); - var arr2 = jQuery.grep(arr, function (a) { return a != 9; }); - $("span").text(arr.join(", ")); - $.grep([0, 1, 2], function (n, i) { - return n > 0; - }, true); - var arr3 = $.grep(["a", "b", "c"], function (n, i) { return n !== "b"; }); -} - -function test_has() { - $('li').has('ul').css('background-color', 'red'); - $("ul").append("
    • " + ($("ul").has("li").length ? "Yes" : "No") + "
    • "); - $("ul").has("li").addClass("full"); -} - -function test_hasClass() { - $('#mydiv').hasClass('foo'); - $("div#result1").append($("p:first").hasClass("selected").toString()); - $("div#result2").append($("p:last").hasClass("selected").toString()); - $("div#result3").append($("p").hasClass("selected").toString()); -} - -function test_hasData() { - var $p = jQuery("p"), p = $p[0]; - $p.append(jQuery.hasData(p) + " "); - $.data(p, "testing", 123); - $p.append(jQuery.hasData(p) + " "); - $.removeData(p, "testing"); - $p.append(jQuery.hasData(p) + " "); - $p.on('click', function () { }); - $p.append(jQuery.hasData(p) + " "); - $p.off('click'); - $p.append(jQuery.hasData(p) + " "); -} - -function test_jQuery_proxy() { - - function test1() { - var me = { - type: "zombie", - test: function (event?) { - // Without proxy, `this` would refer to the event target - // use event.target to reference that element. - var element = event.target; - $(element).css("background-color", "red"); - - // With proxy, `this` refers to the me object encapsulating - // this function. - $("#log").append("Hello " + this.type + "
      "); - $("#test").off("click", this.test); - } - }; - - var you = { - type: "person", - test: function (event?) { - $("#log").append(this.type + " "); - } - }; - - // Execute you.test() in the context of the `you` object - // no matter where it is called - // i.e. the `this` keyword will refer to `you` - var youClick = $.proxy(you.test, you); - - // attach click handlers to #test - $("#test") - // this === "zombie"; handler unbound after first click - .on("click", $.proxy(me.test, me)) - - // this === "person" - .on("click", youClick) - - // this === "zombie" - .on("click", $.proxy(you.test, me)) - - // this === "
    '); + }); + } + + function submit_1() { + $('form').submit(function(event) { + if ($('input:first').val() === 'correct') { + $('span').text('Validated...').show(); + return; + } + + $('span').text('Not valid!').show().fadeOut(1000); + event.preventDefault(); + }); + } + + function submit_2() { + $('form').submit(function() { + // return this.some_flag_variable; + }); + } + + function submit_3() { + $('form:first').submit(); + } + + function text_0() { + var input = $('form input:text').css({ + background: 'yellow', + border: '3px red solid', + }); + + $('div') + .text('For this type jQuery found ' + input.length + '.') + .css('color', 'red'); + + // Prevent form submission + $('form').submit(function(event) { + event.preventDefault(); + }); + } + + function text_1() { + var str = $('p:first').text(); + $('p:last').html(str); + } + + function text_2() { + $('p').text('Some new text.'); + } + + function to_array_0() { + function disp(divs: HTMLElement[]) { + var a: any[] = []; + for (var i = 0; i < divs.length; i++) { + a.push(divs[i].innerHTML); + } + $('span').text(a.join(' ')); + } + + disp($('div').toArray().reverse()); + } + + function toggle_0() { + $('button').click(function() { + $('p').toggle(); + }); + } + + function toggle_1() { + $('button').click(function() { + $('p').toggle('slow'); + }); + } + + function toggle_2() { + var flip = 0; + $('button').click(function() { + $('p').toggle(flip++ % 2 === 0); + }); + } + + function toggle_class_0() { + $('p').click(function() { + $(this).toggleClass('highlight'); + }); + } + + function toggle_class_1() { + var count = 0; + $('p').each(function() { + var $thisParagraph = $(this); + var count = 0; + $thisParagraph.click(function() { + count++; + $thisParagraph.find('span').text('clicks: ' + count); + $thisParagraph.toggleClass('highlight', count % 3 === 0); + }); + }); + } + + function toggle_class_2() { + var cls = ['', 'a', 'a b', 'a b c']; + var divs = $('div.wrap').children(); + var appendClass = function() { + divs.append(function() { + return '
    ' + ( this.className || 'none' ) + '
    '; + }); + }; + + appendClass(); + + $('button').on('click', function() { + var tc = this.className || undefined; + divs.toggleClass(tc!); + appendClass(); + }); + + $('a').on('click', function(event) { + event.preventDefault(); + divs.empty().each(function(i) { + this.className = cls[i]; + }); + appendClass(); + }); + } + + function trigger_0() { + $('button:first').click(function() { + update($('span:first')); + }); + + $('button:last').click(function() { + $('button:first').trigger('click'); + update($('span:last')); + }); + + function update(j: JQuery) { + var n = parseInt(j.text(), 10); + j.text(n + 1); + } + } + + function trigger_1() { + $('form:first').trigger('submit'); + } + + function trigger_2() { + var event = jQuery.Event('submit'); + $('form:first').trigger(event); + if (event.isDefaultPrevented()) { + // Perform an action... + } + } + + function trigger_3() { + $('p') + .click(function(event, a, b) { + // When a normal click fires, a and b are undefined + // for a trigger like below a refers to "foo" and b refers to "bar" + }) + .trigger('click', ['foo', 'bar']); + } + + function trigger_4() { + var event = jQuery.Event('logged'); + // event.user = 'foo'; + // event.pass = 'bar'; + $('body').trigger(event); + } + + function trigger_5() { + $('body').trigger({ + type: 'logged', + user: 'foo', + pass: 'bar', + } as any); + } + + function trigger_handler_0() { + $('#old').click(function() { + $('input').trigger('focus'); + }); + $('#new').click(function() { + $('input').triggerHandler('focus'); + }); + $('input').focus(function() { + $('Focused!').appendTo('body').fadeOut(1000); + }); + } + + function unbind_0() { + function aClick() { + $('div').show().fadeOut('slow'); + } + + $('#bind').click(function() { + $('#theone') + .bind('click', aClick) + .text('Can Click!'); + }); + $('#unbind').click(function() { + $('#theone') + .unbind('click', aClick) + .text('Does nothing...'); + }); + } + + function unbind_1() { + $('p').unbind(); + } + + function unbind_2() { + $('p').unbind('click'); + } + + function unbind_3() { + var foo = function() { + // Code to handle some kind of event + }; + + $('p').bind('click', foo); // ... Now foo will be called when paragraphs are clicked ... + + $('p').unbind('click', foo); // ... foo will no longer be called. + } + + function undelegate_0() { + function aClick() { + $('div').show().fadeOut('slow'); + } + + $('#bind').click(function() { + $('body') + .delegate('#theone', 'click', aClick) + .find('#theone').text('Can Click!'); + }); + $('#unbind').click(function() { + $('body') + .undelegate('#theone', 'click', aClick) + .find('#theone').text('Does nothing...'); + }); + } + + function undelegate_1() { + $('p').undelegate(); + } + + function undelegate_2() { + $('p').undelegate('click'); + } + + function undelegate_3() { + var foo = function() { + // Code to handle some kind of event + }; + + // ... Now foo will be called when paragraphs are clicked ... + $('body').delegate('p', 'click', foo); + + // ... foo will no longer be called. + $('body').undelegate('p', 'click', foo); + } + + function undelegate_4() { + var foo = function() { + // Code to handle some kind of event + }; + + // Delegate events under the ".whatever" namespace + $('form').delegate(':button', 'click.whatever', foo); + + $('form').delegate('input[type=\'text\'] ', 'keypress.whatever', foo); + + // Unbind all events delegated under the ".whatever" namespace + $('form').undelegate('.whatever'); + } + + function unwrap_0() { + var pTags = $('p'); + $('button').click(function() { + if (pTags.parent().is('div')) { + pTags.unwrap(); + } else { + pTags.wrap('
    '); + } + }); + } + + function val_0() { + function displayVals() { + var singleValues = $('#single').val(); + var multipleValues = $('#multiple').val() as string[] || []; + // When using jQuery 3: + // var multipleValues = $( "#multiple" ).val(); + $('p').html('Single: ' + singleValues + + ' Multiple: ' + multipleValues.join(', ')); + } + + $('select').change(displayVals); + displayVals(); + } + + function val_1() { + $('input') + .keyup(function() { + var value = $(this).val() as string; + $('p').text(value); + }) + .keyup(); + } + + function val_2() { + $('button').click(function() { + var text = $(this).text(); + $('input').val(text); + }); + } + + function val_3() { + $('input').on('blur', function() { + $(this).val(function(i, val) { + return val.toUpperCase(); + }); + }); + } + + function val_4() { + $('#single').val('Single2'); + $('#multiple').val(['Multiple2', 'Multiple3']); + $('input').val(['check1', 'check2', 'radio1']); + } + + function visible_0() { + $('div:visible').click(function() { + $(this).css('background', 'yellow'); + }); + $('button').click(function() { + $('div:hidden').show('fast'); + }); + } + + function width_0() { + function showWidth(ele: string, w: number) { + $('div').text('The width for the ' + ele + ' is ' + w + 'px.'); + } + + $('#getp').click(function() { + showWidth('paragraph', $('p').width()!); + }); + $('#getd').click(function() { + showWidth('document', $(document).width()!); + }); + $('#getw').click(function() { + showWidth('window', $(window).width()!); + }); + } + + function width_1() { + var modWidth = 50; + $('div').one('click', function() { + $(this).width(modWidth).addClass('mod'); + modWidth -= 8; + }); + } + + function wrap_0() { + $('p').wrap('
    '); + } + + function wrap_1() { + $('span').wrap('

    '); + } + + function wrap_2() { + $('p').wrap(document.createElement('div')); + } + + function wrap_3() { + $('p').wrap($('.doublediv')); + } + + function wrap_all_0() { + $('p').wrapAll('
    '); + } + + function wrap_all_1() { + $('span').wrapAll('

    '); + } + + function wrap_all_2() { + $('p').wrapAll(document.createElement('div')); + } + + function wrap_all_3() { + $('p').wrapAll($('.doublediv')); + } + + function wrap_inner_0() { + $('p').wrapInner(''); + } + + function wrap_inner_1() { + $('body').wrapInner('

    '); + } + + function wrap_inner_2() { + $('p').wrapInner(document.createElement('b')); + } + + function wrap_inner_3() { + $('p').wrapInner($('')); + } +} diff --git a/types/jquery/test/jquery-no-window-module-tests.ts b/types/jquery/test/jquery-no-window-module-tests.ts new file mode 100644 index 0000000000..2f2de4cc98 --- /dev/null +++ b/types/jquery/test/jquery-no-window-module-tests.ts @@ -0,0 +1,5 @@ +import jQueryFactory = require('jquery'); + +const jq = jQueryFactory(window, true); +// $ExpectType JQueryStatic +jq; diff --git a/types/jquery/test/jquery-slim-no-window-module-tests.ts b/types/jquery/test/jquery-slim-no-window-module-tests.ts new file mode 100644 index 0000000000..2e104af0eb --- /dev/null +++ b/types/jquery/test/jquery-slim-no-window-module-tests.ts @@ -0,0 +1,5 @@ +import jQueryFactory = require('jquery/dist/jquery.slim'); + +const jq = jQueryFactory(window, true); +// $ExpectType JQueryStatic +jq; diff --git a/types/jquery/test/jquery-slim-window-module-tests.ts b/types/jquery/test/jquery-slim-window-module-tests.ts new file mode 100644 index 0000000000..76870e7a04 --- /dev/null +++ b/types/jquery/test/jquery-slim-window-module-tests.ts @@ -0,0 +1,5 @@ +import * as jq from 'jquery/dist/jquery.slim'; + +const $window = jq(window); +// $ExpectType JQuery +$window; diff --git a/types/jquery/test/jquery-window-module-tests.ts b/types/jquery/test/jquery-window-module-tests.ts new file mode 100644 index 0000000000..71e20bc4a0 --- /dev/null +++ b/types/jquery/test/jquery-window-module-tests.ts @@ -0,0 +1,18 @@ +import * as jq from 'jquery'; + +const $window = jq(window); +// $ExpectType JQuery +$window; + +class CanvasLayersDirective { + private readonly $renderingCanvas: JQuery; + private readonly $offscreenCanvas: JQuery; + + constructor(elementRef: { nativeElement: any; }) { + // This type assertion results in an error when exporting 'typeof factory & JQueryStatic' where + // 'factory' is jQuery's factory function. + const $Canvas = $ as JQueryStatic; + this.$renderingCanvas = $Canvas(elementRef.nativeElement); + this.$offscreenCanvas = $Canvas(document.createElement('canvas')); + } +} diff --git a/types/jquery/test/longdesc-tests.ts b/types/jquery/test/longdesc-tests.ts new file mode 100644 index 0000000000..d77823ff78 --- /dev/null +++ b/types/jquery/test/longdesc-tests.ts @@ -0,0 +1,2524 @@ +/* tslint:disable:object-literal-key-quotes object-literal-shorthand one-variable-per-declaration only-arrow-functions prefer-const prefer-for-of triple-equals no-var */ + +function longdesc() { + function add_0() { + $('p').add('div').addClass('widget'); + var pdiv = $('p').add('div'); + } + + function add_1() { + var pdiv = $('p'); + pdiv.add('div'); // WRONG, pdiv will not change + } + + function add_2() { + $('li').add('p').css('background-color', 'red'); + } + + function add_3() { + $('li').add(document.getElementsByTagName('p')[0]) + .css('background-color', 'red'); + } + + function add_4() { + $('li').add('

    new paragraph

    ') + .css('background-color', 'red'); + } + + function add_back_0() { + $('li.third-item').nextAll().addBack() + .css('background-color', 'red'); + } + + function add_class_0() { + $('p').addClass('myClass yourClass'); + } + + function add_class_1() { + $('p').removeClass('myClass noClass').addClass('yourClass'); + } + + function add_class_2() { + $('ul li').addClass(function(index) { + return 'item-' + index; + }); + } + + function after_0() { + $('.inner').after('

    Test

    '); + } + + function after_1() { + $('.container').after($('h2')); + } + + function after_2() { + $('p').after(function() { + return '
    ' + this.className + '
    '; + }); + } + + function after_3() { + var $newdiv1 = $('
    '), + newdiv2 = document.createElement('div'), + existingdiv1 = document.getElementById('foo')!; + + $('p').first().after($newdiv1, [newdiv2, existingdiv1]); + } + + function ajax_complete_0() { + $(document).ajaxComplete(function() { + $('.log').text('Triggered ajaxComplete handler.'); + }); + } + + function ajax_complete_1() { + $('.trigger').click(function() { + $('.result').load('ajax/test.html'); + }); + } + + function ajax_complete_2() { + $(document).ajaxComplete(function(event, xhr, settings) { + if (settings.url === 'ajax/test.html') { + $('.log').text('Triggered ajaxComplete handler. The result is ' + + xhr.responseText); + } + }); + } + + function ajax_error_0() { + $(document).ajaxError(function() { + $('.log').text('Triggered ajaxError handler.'); + }); + } + + function ajax_error_1() { + $('button.trigger').on('click', function() { + $('div.result').load('ajax/missing.html'); + }); + } + + function ajax_error_2() { + $(document).ajaxError(function(event, jqxhr, settings, thrownError) { + if (settings.url == 'ajax/missing.html') { + $('div.log').text('Triggered ajaxError handler.'); + } + }); + } + + function ajax_send_0() { + $(document).ajaxSend(function() { + $('.log').text('Triggered ajaxSend handler.'); + }); + } + + function ajax_send_1() { + $('.trigger').click(function() { + $('.result').load('ajax/test.html'); + }); + } + + function ajax_send_2() { + $(document).ajaxSend(function(event, jqxhr, settings) { + if (settings.url == 'ajax/test.html') { + $('.log').text('Triggered ajaxSend handler.'); + } + }); + } + + function ajax_start_0() { + $(document).ajaxStart(function() { + $('.log').text('Triggered ajaxStart handler.'); + }); + } + + function ajax_start_1() { + $('.trigger').click(function() { + $('.result').load('ajax/test.html'); + }); + } + + function ajax_stop_0() { + $(document).ajaxStop(function() { + $('.log').text('Triggered ajaxStop handler.'); + }); + } + + function ajax_stop_1() { + $('.trigger').click(function() { + $('.result').load('ajax/test.html'); + }); + } + + function ajax_success_0() { + $(document).ajaxSuccess(function() { + $('.log').text('Triggered ajaxSuccess handler.'); + }); + } + + function ajax_success_1() { + $('.trigger').on('click', function() { + $('.result').load('ajax/test.html'); + }); + } + + function ajax_success_2() { + $(document).ajaxSuccess(function(event, xhr, settings) { + if (settings.url == 'ajax/test.html') { + $('.log').text('Triggered ajaxSuccess handler. The Ajax response was: ' + + xhr.responseText); + } + }); + } + + function animate_0() { + $('#clickme').click(function() { + $('#book').animate({ + opacity: 0.25, + left: '+=50', + height: 'toggle', + }, 5000, function() { + // Animation complete. + }); + }); + } + + function animate_1() { + $('li').animate({ + opacity: .5, + height: '50%', + }, { + step: function(now, fx) { + var data = fx.elem.id + ' ' + fx.prop + ': ' + now; + $('body').append('
    ' + data + '
    '); + }, + }); + } + + function animate_2() { + $('#clickme').click(function() { + $('#book').animate({ + width: ['toggle', 'swing'], + height: ['toggle', 'swing'], + opacity: 'toggle', + }, 5000, 'linear', function() { + $(this).after('
    Animation complete.
    '); + }); + }); + } + + function animate_3() { + $('#clickme').click(function() { + $('#book').animate({ + width: 'toggle', + height: 'toggle', + }, { + duration: 5000, + specialEasing: { + width: 'linear', + height: 'easeOutBounce', + }, + complete: function() { + $(this).after('
    Animation complete.
    '); + }, + }); + }); + } + + function append_0() { + $('.inner').append('

    Test

    '); + } + + function append_1() { + $('.container').append($('h2')); + } + + function append_2() { + var $newdiv1 = $('
    '), + newdiv2 = document.createElement('div'), + existingdiv1 = document.getElementById('foo')!; + + $('body').append($newdiv1, [newdiv2, existingdiv1]); + } + + function append_to_0() { + $('

    Test

    ').appendTo('.inner'); + } + + function append_to_1() { + $('h2').appendTo($('.container')); + } + + function attr_0() { + $('#greatphoto').attr('alt', 'Beijing Brush Seller'); + } + + function attr_1() { + $('#greatphoto').attr('title', 'Photo by Kelly Clark'); + } + + function attr_2() { + $('#greatphoto').attr({ + alt: 'Beijing Brush Seller', + title: 'photo by Kelly Clark', + }); + } + + function attr_3() { + $('#greatphoto').attr('title', function(i, val) { + return val + ' - photo by Kelly Clark'; + }); + } + + function before_0() { + $('.inner').before('

    Test

    '); + } + + function before_1() { + $('.container').before($('h2')); + } + + function before_2() { + var newdiv1 = $('
    '), + newdiv2 = document.createElement('div'), + existingdiv1 = document.getElementById('foo')!; + + $('p').first().before(newdiv1, [newdiv2, existingdiv1]); + } + + function bind_0() { + $('#foo').bind('click', function() { + alert('User clicked on \'foo.\''); + }); + } + + function bind_1() { + $('#foo').bind('mouseenter mouseleave', function() { + $(this).toggleClass('entered'); + }); + } + + function bind_2() { + $('#foo').bind({ + click: function() { + // Do something on click + }, + mouseenter: function() { + // Do something on mouseenter + }, + }); + } + + function bind_3() { + $('#foo').bind('click', function() { + alert($(this).text()); + }); + } + + function bind_4() { + $(document).ready(function() { + $('#foo').bind('click', function(event) { + alert('The mouse cursor is at (' + + event.pageX + ', ' + event.pageY + + ')'); + }); + }); + } + + function bind_5() { + var message = 'Spoon!'; + $('#foo').bind('click', function() { + alert(message); + }); + message = 'Not in the face!'; + $('#bar').bind('click', function() { + alert(message); + }); + } + + function bind_6() { + var message = 'Spoon!'; + $('#foo').bind('click', { + msg: message, + }, function(event) { + alert(event.data.msg); + }); + message = 'Not in the face!'; + $('#bar').bind('click', { + msg: message, + }, function(event) { + alert(event.data.msg); + }); + } + + function blur_0() { + $('#other').click(function() { + $('#target').blur(); + }); + } + + function change_0() { + $('.target').change(function() { + alert('Handler for .change() called.'); + }); + } + + function change_1() { + $('#other').click(function() { + $('.target').change(); + }); + } + + function children_0() { + $('ul.level-2').children().css('background-color', 'red'); + } + + function click_0() { + $('#target').click(function() { + alert('Handler for .click() called.'); + }); + } + + function click_1() { + $('#other').click(function() { + $('#target').click(); + }); + } + + function clone_0() { + $('.hello').appendTo('.goodbye'); + } + + function clone_1() { + $('.hello').clone().appendTo('.goodbye'); + } + + function clone_2() { + // Original element with attached data + var $elem = $('#elem').data('arr', [1]), + $clone = $elem.clone(true) + // Deep copy to prevent data sharing + .data('arr', $.extend([], $elem.data('arr'))); + } + + function closest_0() { + $('li.item-a') + .closest('ul') + .css('background-color', 'red'); + } + + function closest_1() { + $('li.item-a') + .closest('li') + .css('background-color', 'red'); + } + + function closest_2() { + var listItemII = document.getElementById('ii')!; + $('li.item-a') + .closest('ul', listItemII) + .css('background-color', 'red'); + $('li.item-a') + .closest('#one', listItemII) + .css('background-color', 'green'); + } + + function contents_0() { + $('.container') + .contents() + .filter(function() { + return this.nodeType === 3; + }) + .wrap('

    ') + .end() + .filter('br') + .remove(); + } + + function contextmenu_0() { + $('#target').contextmenu(function() { + alert('Handler for .contextmenu() called.'); + }); + } + + function contextmenu_1() { + $('#target').contextmenu(); + } + + function css_0() { + $('div.example').css('width', function(index) { + return index * 50; + }); + } + + function data_0() { + alert($('body').data('foo')); + alert($('body').data()); + } + + function data_1() { + alert($('body').data('foo')); // undefined + $('body').data('bar', 'foobar'); + alert($('body').data('bar')); // foobar + } + + function data_2() { + $('div').data('role') === 'page'; + $('div').data('lastValue') === 43; + $('div').data('hidden') === true; + $('div').data('options').name === 'John'; + } + + function data_3() { + var mydata = $('#mydiv').data(); + if (mydata.count < 9) { + mydata.count = 43; + mydata.status = 'embiggened'; + } + } + + function data_4() { + $('body').data('foo', 52); + $('body').data('bar', { myType: 'test', count: 40 }); + $('body').data({ baz: [1, 2, 3] }); + $('body').data('foo'); // 52 + $('body').data(); // { foo: 52, bar: { myType: "test", count: 40 }, baz: [ 1, 2, 3 ] } + } + + function data_5() { + alert($('body').data('foo')); + alert($('body').data()); + } + + function data_6() { + alert($('body').data('foo')); // undefined + $('body').data('bar', 'foobar'); + alert($('body').data('bar')); // foobar + } + + function data_7() { + $('div').data('role') === 'page'; + $('div').data('lastValue') === 43; + $('div').data('hidden') === true; + $('div').data('options').name === 'John'; + } + + function data_8() { + var mydata = $('#mydiv').data(); + if (mydata.count < 9) { + mydata.count = 43; + mydata.status = 'embiggened'; + } + } + + function dblclick_0() { + $('#target').dblclick(function() { + alert('Handler for .dblclick() called.'); + }); + } + + function dblclick_1() { + $('#other').click(function() { + $('#target').dblclick(); + }); + } + + function delay_0() { + $('#foo').slideUp(300).delay(800).fadeIn(400); + } + + function delegate_0(elements: HTMLElement[], selector: string, events: any, data: any, handler: JQuery.EventHandler) { + // jQuery 1.4.3+ + $(elements).delegate(selector, events, data, handler); + // jQuery 1.7+ + $(elements).on(events, selector, data, handler); + } + + function delegate_1() { + $('table').delegate('td', 'click', function() { + $(this).toggleClass('chosen'); + }); + } + + function delegate_2() { + $('table').on('click', 'td', function() { + $(this).toggleClass('chosen'); + }); + } + + function each_0() { + $('li').each(function(index) { + console.log(index + ': ' + $(this).text()); + }); + } + + function each_1() { + // The .each() method is unnecessary here: + $('li').each(function() { + $(this).addClass('foo'); + }); + + // Instead, you should rely on implicit iteration: + $('li').addClass('bar'); + } + + function empty_0() { + $('.hello').empty(); + } + + function end_0() { + $('ul.first') + .find('.foo') + .css('background-color', 'red') + .end() + .find('.bar') + .css('background-color', 'green'); + } + + function end_1() { + $('ul.first') + .find('.foo') + .css('background-color', 'red') + .end() + .find('.bar') + .css('background-color', 'green') + .end(); + } + + function eq_0() { + $('li').eq(2).css('background-color', 'red'); + } + + function eq_1() { + $('li').eq(-2).css('background-color', 'red'); + } + + function eq_2() { + $('li').eq(5).css('background-color', 'red'); + } + + function fade_out_0() { + $('#clickme').click(function() { + $('#book').fadeOut('slow', function() { + // Animation complete. + }); + }); + } + + function filter_0() { + $('li').filter(':even').css('background-color', 'red'); + } + + function filter_1() { + $('li') + .filter(function(index) { + return $('strong', this).length === 1; + }) + .css('background-color', 'red'); + } + + function filter_2() { + $('li') + .filter(function(index) { + return index % 3 === 2; + }) + .css('background-color', 'red'); + } + + function find_0() { + $('li.item-ii').find('li').css('background-color', 'red'); + } + + function find_1() { + var allListElements = $('li'); + } + + function find_2(allListElements: never) { + $('li.item-ii').find(allListElements); + } + + function find_3() { + var item1 = $('li.item-1')[0]; + $('li.item-ii').find(item1).css('background-color', 'red'); + } + + function first_0() { + $('li').first().css('background-color', 'red'); + } + + function focus_0() { + $('#target').focus(function() { + alert('Handler for .focus() called.'); + }); + } + + function focus_1() { + $('#other').click(function() { + $('#target').focus(); + }); + } + + function get_0() { + console.log($('li').get(0)); + } + + function get_1() { + console.log($('li')[0]); + } + + function get_2() { + console.log($('li').get(-1)); + } + + function get_3() { + console.log($('li').get()); + } + + function has_0() { + $('li').has('ul').css('background-color', 'red'); + } + + function has_class_0() { + $('#mydiv').hasClass('foo'); + } + + function has_class_1() { + $('#mydiv').hasClass('bar'); + } + + function has_class_2() { + $('#mydiv').hasClass('quux'); + } + + function height_0() { + // Returns height of browser viewport + $(window).height(); + + // Returns height of HTML document + $(document).height(); + } + + function hide_0() { + $('.target').hide(); + } + + function hide_1() { + // With the element initially shown, we can hide it slowly: + $('#clickme').click(function() { + $('#book').hide('slow', function() { + alert('Animation complete.'); + }); + }); + } + + function hover_0(selector: string, handlerInOut: never) { + $(selector).on('mouseenter mouseleave', handlerInOut); + } + + function html_0() { + $('div.demo-container').html(); + } + + function html_1() { + $('div.demo-container') + .html('

    All new content. You bet!

    '); + } + + function html_2() { + $('div.demo-container').html(function() { + var emphasis = '' + $('p').length + ' paragraphs!'; + return '

    All new content for ' + emphasis + '

    '; + }); + } + + function index_0() { + var listItem = document.getElementById('bar')!; + alert('Index: ' + $('li').index(listItem)); + } + + function index_1() { + var listItem = $('#bar'); + alert('Index: ' + $('li').index(listItem)); + } + + function index_2() { + var listItems = $('li:gt(0)'); + alert('Index: ' + $('li').index(listItems)); + } + + function index_3() { + var listItem = $('#bar'); + alert('Index: ' + listItem.index('li')); + } + + function index_4() { + alert('Index: ' + $('#bar').index()); + } + + function insert_after_0() { + $('

    Test

    ').insertAfter('.inner'); + } + + function insert_after_1() { + $('h2').insertAfter($('.container')); + } + + function insert_before_0() { + $('

    Test

    ').insertBefore('.inner'); + } + + function insert_before_1() { + $('h2').insertBefore($('.container')); + } + + function is_0() { + $('ul').click(function(event) { + var target = $(event.target); + if (target.is('li')) { + target.css('background-color', 'red'); + } + }); + } + + function is_1() { + $('li').click(function() { + var li = $(this), + isWithTwo = li.is(function() { + return $('strong', this).length === 2; + }); + if (isWithTwo) { + li.css('background-color', 'green'); + } else { + li.css('background-color', 'red'); + } + }); + } + + function jquery_ajax_0() { + $.ajax(); + } + + function jquery_ajax_1() { + $.ajax({ + url: 'http://fiddle.jshell.net/favicon.png', + beforeSend: function(xhr) { + xhr.overrideMimeType('text/plain; charset=x-user-defined'); + }, + }) + .done(function(data) { + if (console && console.log) { + console.log('Sample of data:', data.slice(0, 100)); + } + }); + } + + function jquery_ajax_2() { + // Assign handlers immediately after making the request, + // and remember the jqXHR object for this request + var jqxhr = $.ajax('example.php') + .done(function() { + alert('success'); + }) + .fail(function() { + alert('error'); + }) + .always(function() { + alert('complete'); + }); + + // Perform other work here ... + + // Set another completion function for the request above + jqxhr.always(function() { + alert('second complete'); + }); + } + + function jquery_ajax_3() { + $.ajaxSetup({ + contents: { + mycustomtype: /mycustomtype/, + }, + converters: { + 'mycustomtype json': function(result) { + // Do stuff + var newresult = ''; + return newresult; + }, + }, + }); + } + + function jquery_ajax_4() { + $.ajaxSetup({ + contents: { + mycustomtype: /mycustomtype/, + }, + converters: { + 'text mycustomtype': true, + 'mycustomtype json': function(result) { + // Do stuff + var newresult = ''; + return newresult; + }, + }, + }); + } + + function jquery_ajax_prefilter_0() { + $.ajaxPrefilter(function(options, originalOptions, jqXHR) { + // Modify options, control originalOptions, store jqXHR, etc + }); + } + + function jquery_ajax_prefilter_1() { + var currentRequests: JQuery.PlainObject = {}; + + $.ajaxPrefilter(function(options, originalOptions, jqXHR) { + if (( options).abortOnRetry) { + if (currentRequests[options.url!]) { + currentRequests[options.url!].abort(); + } + currentRequests[options.url!] = jqXHR; + } + }); + } + + function jquery_ajax_prefilter_2() { + $.ajaxPrefilter(function(options) { + if (options.crossDomain) { + options.url = 'http://mydomain.net/proxy/' + encodeURIComponent(options.url!); + options.crossDomain = false; + } + }); + } + + function jquery_ajax_prefilter_3() { + $.ajaxPrefilter('json script', function(options, originalOptions, jqXHR) { + // Modify options, control originalOptions, store jqXHR, etc + }); + } + + function jquery_ajax_prefilter_4(isActuallyScript: Function) { + $.ajaxPrefilter(function(options) { + if (isActuallyScript(options.url)) { + return 'script'; + } + }); + } + + function jquery_ajax_setup_0() { + $.ajaxSetup({ + url: 'ping.php', + }); + } + + function jquery_ajax_setup_1() { + $.ajax({ + // url not set here; uses ping.php + data: { 'name': 'Dan' }, + }); + } + + function jquery_ajax_transport_0(dataType: string, transportCanHandleRequest: boolean) { + $.ajaxTransport(dataType, function(options, originalOptions, jqXHR) { + if (transportCanHandleRequest) { + return { + send: function(headers, completeCallback) { + // Send code + }, + abort: function() { + // Abort code + }, + }; + } + }); + } + + function jquery_ajax_transport_1() { + // function(status, statusText, responses, headers) {} + } + + function jquery_ajax_transport_2() { + $.ajaxTransport('script', function(options, originalOptions, jqXHR) { + // Will only be called for script requests + return {} as JQuery.Transport; + }); + } + + function jquery_ajax_transport_3() { + $.ajaxTransport('image', function(s) { + if (s.type === 'GET' && s.async) { + var image: any; + return { + send: function(_, callback) { + image = new Image(); + function done(status: number) { + if (image) { + var statusText: JQuery.Ajax.TextStatus = ( status === 200 ) ? 'success' : 'error', + tmp = image; + image = image.onreadystatechange = image.onerror = image.onload = null; + // Error:(962, 50) TS2345:Argument of type 'string' is not assignable to parameter of type + // '"success" | "notmodified" | "nocontent" | "abort" | "timeout" | "error" | "parsererror"'. + // Why can't the compiler infer this? + callback(status, statusText, { image: tmp }); + } + } + + image.onreadystatechange = image.onload = function() { + done(200); + }; + image.onerror = function() { + done(404); + }; + image.src = s.url; + }, + abort: function() { + if (image) { + image = image.onreadystatechange = image.onerror = image.onload = null; + } + }, + }; + } + }); + } + + function jquery_ajax_transport_4() { + // List of data converters + // 1) Key format is "source_type destination_type" + // (a single space in-between) + // 2) The catchall symbol "*" can be used for source_type + return { + converters: { + // Convert anything to text + '* text': String, + // Text to html (true = no transformation) + 'text html': true, + // Evaluate text as a json expression + 'text json': jQuery.parseJSON, + // Parse text as xml + 'text xml': jQuery.parseXML, + }, + }; + } + + function jquery_ajax_transport_5() { + jQuery.ajaxSetup({ + accepts: { + script: 'text/javascript, application/javascript', + }, + contents: { + script: /javascript/, + }, + converters: { + 'text script': jQuery.globalEval, + }, + }); + } + + function jquery_callbacks_0() { + function fn1(value: string) { + console.log(value); + } + + function fn2(value: string) { + console.log('fn2 says: ' + value); + return false; + } + } + + function jquery_callbacks_1(fn1: Function, fn2: Function) { + var callbacks = $.Callbacks(); + callbacks.add(fn1); + + // Outputs: foo! + callbacks.fire('foo!'); + + callbacks.add(fn2); + + // Outputs: bar!, fn2 says: bar! + callbacks.fire('bar!'); + } + + function jquery_callbacks_2(fn1: Function, fn2: Function) { + var callbacks = $.Callbacks(); + callbacks.add(fn1); + + // Outputs: foo! + callbacks.fire('foo!'); + + callbacks.add(fn2); + + // Outputs: bar!, fn2 says: bar! + callbacks.fire('bar!'); + + callbacks.remove(fn2); + + // Only outputs foobar, as fn2 has been removed. + callbacks.fire('foobar'); + } + + function jquery_callbacks_3(fn1: Function, fn2: Function) { + var callbacks = $.Callbacks('once'); + callbacks.add(fn1); + callbacks.fire('foo'); + callbacks.add(fn2); + callbacks.fire('bar'); + callbacks.remove(fn2); + callbacks.fire('foobar'); + + /* + output: + foo + */ + } + + function jquery_callbacks_4(fn1: Function, fn2: Function) { + var callbacks = $.Callbacks('memory'); + callbacks.add(fn1); + callbacks.fire('foo'); + callbacks.add(fn2); + callbacks.fire('bar'); + callbacks.remove(fn2); + callbacks.fire('foobar'); + + /* + output: + foo + fn2 says:foo + bar + fn2 says:bar + foobar + */ + } + + function jquery_callbacks_5(fn1: Function, fn2: Function) { + var callbacks = $.Callbacks('unique'); + callbacks.add(fn1); + callbacks.fire('foo'); + callbacks.add(fn1); // Repeat addition + callbacks.add(fn2); + callbacks.fire('bar'); + callbacks.remove(fn2); + callbacks.fire('foobar'); + + /* + output: + foo + bar + fn2 says:bar + foobar + */ + } + + function jquery_callbacks_6() { + function fn1(value: string) { + console.log(value); + return false; + } + + function fn2(value: string) { + fn1('fn2 says: ' + value); + return false; + } + + var callbacks = $.Callbacks('stopOnFalse'); + callbacks.add(fn1); + callbacks.fire('foo'); + callbacks.add(fn2); + callbacks.fire('bar'); + callbacks.remove(fn2); + callbacks.fire('foobar'); + + /* + output: + foo + bar + foobar + */ + } + + function jquery_callbacks_7() { + function fn1(value: string) { + console.log(value); + return false; + } + + function fn2(value: string) { + fn1('fn2 says: ' + value); + return false; + } + + var callbacks = $.Callbacks('unique memory'); + callbacks.add(fn1); + callbacks.fire('foo'); + callbacks.add(fn1); // Repeat addition + callbacks.add(fn2); + callbacks.fire('bar'); + callbacks.add(fn2); + callbacks.fire('baz'); + callbacks.remove(fn2); + callbacks.fire('foobar'); + + /* + output: + foo + fn2 says:foo + bar + fn2 says:bar + baz + fn2 says:baz + foobar + */ + } + + function jquery_callbacks_8(fn1: Function, fn2: Function) { + var callbacks = $.Callbacks(), + add = callbacks.add, + remove = callbacks.remove, + fire = callbacks.fire; + + add(fn1); + fire('hello world'); + remove(fn1); + } + + function jquery_css_hooks_0() { + (function($) { + // First, check to see if cssHooks are supported + if (!$.cssHooks) { + // If not, output an error message + throw( new Error('jQuery 1.4.3 or above is required for this plugin to work') ); + } + + // Wrap in a document ready call, because jQuery writes + // cssHooks at this time and will blow away your functions + // if they exist. + $(function() { + $.cssHooks['someCSSProp'] = { + get: function(elem, computed, extra) { + // Handle getting the CSS property + }, + set: function(elem, value) { + // Handle setting the CSS value + }, + }; + }); + })(jQuery); + } + + function jquery_css_hooks_1() { + (function($) { + function styleSupport(prop: string) { + var vendorProp, + supportedProp, + + // Capitalize first character of the prop to test vendor prefix + capProp = prop.charAt(0).toUpperCase() + prop.slice(1), + prefixes = ['Moz', 'Webkit', 'O', 'ms'], + div: HTMLElement | null = document.createElement('div'); + + if (prop in div.style) { + // Browser supports standard CSS property name + supportedProp = prop; + } else { + // Otherwise test support for vendor-prefixed property names + for (var i = 0; i < prefixes.length; i++) { + vendorProp = prefixes[i] + capProp; + if (vendorProp in div.style) { + supportedProp = vendorProp; + break; + } + } + } + + // Avoid memory leak in IE + div = null; + + // Add property to $.support so it can be accessed elsewhere + $.support[prop] = supportedProp; + return supportedProp; + } + + // Call the function, e.g. testing for "border-radius" support: + styleSupport('borderRadius'); + })(jQuery); + } + + function jquery_css_hooks_2() { + (function($) { + if (!$.cssHooks) { + throw( new Error('jQuery 1.4.3+ is needed for this plugin to work') ); + } + + function styleSupport(prop: string) { + var vendorProp, + supportedProp, + capProp = prop.charAt(0).toUpperCase() + prop.slice(1), + prefixes = ['Moz', 'Webkit', 'O', 'ms'], + div: HTMLElement | null = document.createElement('div'); + + if (prop in div.style) { + supportedProp = prop; + } else { + for (var i = 0; i < prefixes.length; i++) { + vendorProp = prefixes[i] + capProp; + if (vendorProp in div.style) { + supportedProp = vendorProp; + break; + } + } + } + + div = null; + $.support[prop] = supportedProp; + return supportedProp; + } + + var borderRadius = styleSupport('borderRadius'); + + // Set cssHooks only for browsers that support a vendor-prefixed border radius + if (borderRadius && borderRadius !== 'borderRadius') { + $.cssHooks.borderRadius = { + get: function(elem, computed, extra) { + return $.css(elem, borderRadius); + }, + set: function(elem, value) { + ( elem.style)[borderRadius!] = value; + }, + }; + } + })(jQuery); + } + + function jquery_css_hooks_3() { + $('#element').css('borderRadius', '10px'); + $('#another').css('border-radius', '20px'); + } + + function jquery_css_hooks_4(supportsProprietaryAlternative: boolean) { + (function($) { + // Feature test for support of a CSS property + // and a proprietary alternative + // ... + if ($.support.someCSSProp && $.support.someCSSProp !== 'someCSSProp') { + // Set cssHooks for browsers that + // support only a vendor-prefixed someCSSProp + $.cssHooks.someCSSProp = { + get: function(elem, computed, extra) { + return $.css(elem, $.support.someCSSProp); + }, + set: function(elem, value) { + elem.style[$.support.someCSSProp] = value; + }, + }; + } else if (supportsProprietaryAlternative) { + $.cssHooks.someCSSProp = { + get: function(elem, computed, extra) { + // Handle crazy conversion from the proprietary alternative + }, + set: function(elem, value) { + // Handle crazy conversion to the proprietary alternative + }, + }; + } + })(jQuery); + } + + function jquery_css_hooks_5() { + $.cssNumber.someCSSProp = true; + } + + function jquery_css_hooks_6() { + $.fx.step.someCSSProp = function(fx) { + $.cssHooks.someCSSProp.set(fx.elem, fx.now + fx.unit); + }; + } + + function jquery_css_number_0() { + jQuery.cssNumber.someCSSProp = true; + } + + function jquery_data_0() { + jQuery.data(document.body, 'foo', 52); + jQuery.data(document.body, 'bar', 'test'); + } + + function jquery_data_1() { + alert(jQuery.data(document.body, 'foo')); + alert(jQuery.data(document.body)); + } + + function jquery_each_0() { + $.each([52, 97], function(index, value) { + alert(index + ': ' + value); + }); + } + + function jquery_each_1() { + var obj = { + 'flammable': 'inflammable', + 'duh': 'no duh', + }; + $.each(obj, function(key, value) { + alert(key + ': ' + value); + }); + } + + function jquery_each_2() { + $.each([52, 97], function(index, value) { + alert(index + ': ' + value); + }); + } + + function jquery_each_3() { + var obj = { + 'flammable': 'inflammable', + 'duh': 'no duh', + }; + $.each(obj, function(key, value) { + alert(key + ': ' + value); + }); + } + + function jquery_extend_0(object1: object, object2: object) { + var object = $.extend({}, object1, object2); + } + + function jquery_get_0(url: string, data: any, success: never, dataType: string) { + $.ajax({ + url: url, + data: data, + success: success, + dataType: dataType, + }); + } + + function jquery_get_1() { + $.get('ajax/test.html', function(data) { + $('.result').html(data); + alert('Load was performed.'); + }); + } + + function jquery_get_2() { + // Assign handlers immediately after making the request, + // and remember the jqxhr object for this request + var jqxhr = $.get('example.php', function() { + alert('success'); + }) + .done(function() { + alert('second success'); + }) + .fail(function() { + alert('error'); + }) + .always(function() { + alert('finished'); + }); + + // Perform other work here ... + + // Set another completion function for the request above + jqxhr.always(function() { + alert('second finished'); + }); + } + + function jquery_get_json_0(url: string, data: any, success: never) { + $.ajax({ + dataType: 'json', + url: url, + data: data, + success: success, + }); + } + + function jquery_get_json_1() { + $.getJSON('ajax/test.json', function(data) { + var items: string[] = []; + $.each(data, function(key, val) { + items.push('
  • ' + val + '
  • '); + }); + + $('
      ', { + 'class': 'my-new-list', + html: items.join(''), + }).appendTo('body'); + }); + } + + function jquery_get_json_2() { + return { + 'one': 'Singular sensation', + 'two': 'Beady little eyes', + 'three': 'Little birds pitch by my doorstep', + }; + } + + function jquery_get_script_0(url: string, success: never) { + $.ajax({ + url: url, + dataType: 'script', + success: success, + }); + } + + function jquery_get_script_1() { + $.getScript('ajax/test.js', function(data, textStatus, jqxhr) { + console.log(data); // Data returned + console.log(textStatus); // Success + console.log(jqxhr.status); // 200 + console.log('Load was performed.'); + }); + } + + function jquery_get_script_2() { + $.getScript('ajax/test.js') + .done(function(script, textStatus) { + console.log(textStatus); + }) + .fail(function(jqxhr, settings, exception) { + $('div.log').text('Triggered ajaxError handler.'); + }); + } + + function jquery_get_script_3() { + $('div.log').ajaxError(function(e, jqxhr, settings, exception) { + if (settings.dataType == 'script') { + $(this).text('Triggered ajaxError handler.'); + } + }); + } + + function jquery_get_script_4() { + $.ajaxSetup({ + cache: true, + }); + } + + function jquery_html_prefilter_0() { + var htmlPrefilter = $.htmlPrefilter, + rdel = /<(del)(?=[\s>])[\w\W]*?<\/\1\s*>/gi; + + $.htmlPrefilter = function(html) { + return htmlPrefilter.call(this, html).replace(rdel, ''); + }; + } + + function jquery_html_prefilter_1() { + $.htmlPrefilter = function(html) { + // Return HTML strings unchanged + return html; + }; + } + + function jquery_html_prefilter_2() { + var panything = '[\\w\\W]*?', + + // Whitespace + // https://html.spec.whatwg.org/multipage/infrastructure.html#space-character + pspace = '[\\x20\\t\\r\\n\\f]', + + // End of tag name (whitespace or greater-than) + pnameEnd = pspace.replace(']', '>]'), + + // Tag name (a leading letter, then almost anything) + // https://html.spec.whatwg.org/multipage/syntax.html#tag-open-state + // https://html.spec.whatwg.org/multipage/syntax.html#tag-name-state + pname = '[a-z]' + pnameEnd.replace('[', '[^/\\0') + '*', + + // Void element (end tag prohibited) + // https://html.spec.whatwg.org/multipage/syntax.html#void-elements + pvoidName = '(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|' + + 'source|track|wbr)(?=' + pnameEnd + ')', + + // Attributes (double-quoted value, single-quoted value, unquoted value, or no value) + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + pattrs = '(?:' + pspace + '+[^\\0-\\x20\\x7f-\\x9f="\'/>]+(?:' + pspace + '*=' + pspace + + '*(?:"' + panything + '"|\'' + panything + '\'|' + + pnameEnd.replace('[', '[^') + '*(?!/)' + + ')|))*' + pspace + '*', + + // Trailing content of a close tag + pcloseTail = '(?:' + pspace + panything + '|)', + + rspecialHtml = new RegExp( + // Non-void element that self-closes: $1–$5 + '(<)(?!' + pvoidName + ')(' + pname + ')(' + pattrs + ')(\\/)(>)|' + + // No-innerHTML container (element, comment, or CDATA): $6 + '(<(script|style|textarea)' + pattrs + '>' + panything + '<\\/\\7' + pcloseTail + '>|' + + '\n' }) .wrap(null) - .argv + .argv; } function Argv$default() { - var ya = yargs + let ya = yargs .default('random', function randomValue() { return Math.random() * 256; }) - .argv + .argv; } function Argv$configObject() { - var ya = yargs - .config({foo: 1, bar: 2}) - .argv + let ya = yargs + .config({ foo: 1, bar: 2 }) + .argv; } function Argv$configParseFunction() { - var ya = yargs - .config('settings', function (configPath) { - return JSON.parse(fs.readFileSync(configPath, 'utf-8')) + let ya = yargs + .config('settings', (configPath) => { + return JSON.parse(fs.readFileSync(configPath, 'utf-8')); }) - .config('settings', 'description', function (configPath) { - return JSON.parse(fs.readFileSync(configPath, 'utf-8')) + .config('settings', 'description', (configPath) => { + return JSON.parse(fs.readFileSync(configPath, 'utf-8')); }) - .argv + .argv; } function Argv$helpDescriptionExplicit() { - var ya = yargs + let ya = yargs .help('help', 'description', true) - .argv + .argv; } function Argv$showHelpConsoleLevel() { - yargs.showHelp("log"); //prints to stdout using console.log() + yargs.showHelp("log"); // prints to stdout using console.log() } function Argv$getCompletion() { - var ya = yargs + let ya = yargs .option('foobar', {}) .option('foobaz', {}) .completion() - .getCompletion(['./test.js', '--foo'], function (completions) { - console.log(completions) + .getCompletion(['./test.js', '--foo'], (completions) => { + console.log(completions); }) - .argv + .argv; } function Argv$pkgConf() { - var ya = yargs + let ya = yargs .pkgConf(['key1', 'key2'], 'configFile.json') - .argv + .argv; } function Argv$recommendCommands() { - var ya = yargs + let ya = yargs .recommendCommands() - .argv + .argv; } function Argv$showCompletionScript() { - var ya = yargs + let ya = yargs .showCompletionScript() - .argv + .argv; } function Argv$skipValidation() { - var ya = yargs + let ya = yargs .skipValidation('arg1') .skipValidation(['arg2', 'arg3']) - .argv + .argv; } function Argv$commandObject() { - var ya = yargs + let ya = yargs .command("commandname", "description", { - "arg": { + arg: ({ alias: "string", array: true, boolean: true, - choices: ["a", "b", "c"], + choices: [undefined, false, "a", "b", "c"], coerce: f => JSON.stringify(f), config: true, - configParser: t => t, + configParser: t => JSON.parse(fs.readFileSync(t, "utf8")), count: true, default: "myvalue", defaultDescription: "description", @@ -575,12 +587,12 @@ function Argv$commandObject() { skipValidation: false, string: true, type: "string" - } - }) + } as yargs.Options) + }); } function Argv$demandCommand() { - var ya = yargs + let ya = yargs .demandCommand(1) .demandCommand(1, 'at least 1 command required') .demandCommand(1, 2) @@ -590,7 +602,7 @@ function Argv$demandCommand() { } function Argv$demandOption() { - var ya = yargs + let ya = yargs .demandOption('a') .demandOption('a', 'a is required') .demandOption('a', true) @@ -601,7 +613,7 @@ function Argv$demandOption() { } function Argv$conflicts() { - var ya = yargs + let ya = yargs .conflicts('a', 'b') .conflicts({ a: 'b' diff --git a/types/yfiles/yfiles-tests.ts b/types/yfiles/yfiles-tests.ts index 05e284529c..1bcaefe8c9 100644 --- a/types/yfiles/yfiles-tests.ts +++ b/types/yfiles/yfiles-tests.ts @@ -19,7 +19,7 @@ class BasicTest { this.graphComponent.inputMode = graphEditorInputMode; - this.graphComponent.graph.nodeDefaults.style = new yfiles.styles.ShinyPlateNodeStyle(yfiles.view.Fill.ORANGE); + this.graphComponent.graph.nodeDefaults.style = new yfiles.styles.ShinyPlateNodeStyle({ fill: yfiles.view.Fill.ORANGE }); this.graphComponent.graph.createNode(new yfiles.geometry.Rect(0, 0, 10, 10), new MyNodeStyle()); diff --git a/types/yog-bigpipe/index.d.ts b/types/yog-bigpipe/index.d.ts new file mode 100644 index 0000000000..2c275f73b2 --- /dev/null +++ b/types/yog-bigpipe/index.d.ts @@ -0,0 +1,141 @@ +// Type definitions for yog-bigpipe 0.4 +// Project: https://github.com/fex-team/yog-bigpipe +// Definitions by: ssddi456 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { EventEmitter } from 'events'; +import { Readable } from 'stream'; +import { RequestHandler } from 'express'; + +interface BigPipeOption { + skipAnalysis?: boolean; + tpl?: { + _default?: string, + quickling?: string + }; +} + +type Callback = (done: (err: any, data: any) => any) => any; + +interface AddPageletConfig { + id: string; + lazy?: boolean; + mode?: yogBigpipe.Pagelet.mode; +} + +declare function yogBigpipe(option?: BigPipeOption): RequestHandler; + +export = yogBigpipe; +declare namespace yogBigpipe { + class BigPipe extends Readable { + constructor(option?: BigPipeOption) + map: { [key: string]: Pagelet }; + pagelets: Pagelet[]; + pipelines: Pagelet[]; + rendered: Pagelet[]; + sources: {}; + state: Pagelet.status; + quicklings: {}; + parentQuicklings: string[]; + Pagelet: PageletConstructor; + pageletData: {}; + + bind(id: string, fn: Callback): BigPipe; + + bindPageOnly(fn: Callback): void; + + addQuicklingPagelets(pagelets: string[]): void; + + isQuicklingMode(): boolean; + + isQuickingMode(): boolean; + + addPagelet(obj: AddPageletConfig): void; + + isQuicklingWidget(item: { 'mode': Pagelet.mode, [key: string]: any }): void; + + render(): void; + + preparePageOnly(): Promise; + + prepareAllSources(): Promise; + + renderPagelet(pagelet: Pagelet): void; + + destroy(): void; + + _onPageletDone(pagelet: Pagelet): void; + + _checkFinish(): void; + + outputPagelet(pagelet: Pagelet): void; + + format(pagelet: Pagelet): string; + + _markPageletRendered(pagelet: Pagelet): void; + } + + type PageletConstructor = new (obj: PageletOption) => T; + + interface PageletOption { + id: string; + mode?: Pagelet.mode; + lazy?: boolean; + reqID: string; + skipAnalysis: boolean; + + locals?: {}; + compiled?: boolean; + container?: string; + for?: string; + model: {}; + } + interface PageletData { + container: string; + reqID: string; + id: string; + html: string; + js: string[]; + css: string[]; + styles: string[]; + scripts: string[]; + } + class Pagelet extends EventEmitter { + constructor(obj: PageletOption) + + model: {}; + container: string; + mode: Pagelet.mode; + id: string; + locals: {}; + compiled: boolean; + reqID: string; + skipAnalysis: boolean; + state: Pagelet.status; + scripts: string[]; + styles: string[]; + js: string[]; + css: string[]; + html: string; + + addCss(css: string | string[]): void; + addCsses(css: string | string[]): void; + addJs(css: string | string[]): void; + addJses(css: string | string[]): void; + + addScript(css: string | string[]): void; + addScripts(css: string | string[]): void; + addStyle(css: string | string[]): void; + addStyles(css: string | string[]): void; + + destroy(): void; + + start(provider: Promise, sync: boolean): void; + toJson(): PageletData; + } + + namespace Pagelet { + type status = 'pending' | 'rendering' | 'fulfilled' | 'failed'; + type mode = 'async' | 'pipeline' | 'quickling'; + } +} diff --git a/types/yog-bigpipe/tsconfig.json b/types/yog-bigpipe/tsconfig.json new file mode 100644 index 0000000000..e2f641476b --- /dev/null +++ b/types/yog-bigpipe/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "yog-bigpipe-tests.ts" + ] +} diff --git a/types/yog-bigpipe/tslint.json b/types/yog-bigpipe/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/yog-bigpipe/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/yog-bigpipe/yog-bigpipe-tests.ts b/types/yog-bigpipe/yog-bigpipe-tests.ts new file mode 100644 index 0000000000..f23ac318a3 --- /dev/null +++ b/types/yog-bigpipe/yog-bigpipe-tests.ts @@ -0,0 +1,14 @@ +import yogBigpipe = require("yog-bigpipe"); + +yogBigpipe(); +yogBigpipe({}); +yogBigpipe({ + skipAnalysis: true +}); + +yogBigpipe({ + tpl: { + _default: '', + quickling: '[test]' + } +}); diff --git a/types/yog-log/index.d.ts b/types/yog-log/index.d.ts new file mode 100644 index 0000000000..ff30bc4b8a --- /dev/null +++ b/types/yog-log/index.d.ts @@ -0,0 +1,115 @@ +// Type definitions for yog-log 0.1 +// Project: https://github.com/fex-team/yog-log +// Definitions by: ssddi456 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { Request, Response, NextFunction } from "express"; + +interface LEVELS { + // 访问日志 + 0: 'ACCESS'; + 3: 'ACCESS_ERROR'; + // 应用日志等级 ODP格式 + 1: 'FATAL'; + 2: 'WARNING'; + 4: 'NOTICE'; + 8: 'TRACE'; + 16: 'DEBUG'; +} + +type LevelInt = keyof LEVELS | 0 | 3 | 1 | 2 | 4 | 8 | 16; +type LevelName = LEVELS[LevelInt]; + +type LogReturn = undefined | false; + +interface LogConfig { + LogIdName?: string; + // 模板文件地址,可以不填 + data_path?: string; + // 用户只需要填写log_path配置 + log_path?: string; + + debug?: 0 | 1; + intLevel?: 16; + auto_rotate?: 0 | 1; + use_sub_dir?: 0 | 1; + IS_ODP?: boolean; + IS_OMP?: 0 | 1; + + access_log_path?: string; + access_error_log_path?: string; + + access?: string; + format_wf?: string; +} + +interface WriteLogConfig { + filename_suffix: string; + errno: number; + escape_msg: boolean; +} + +interface LogInfo { + msg: string; + custom: {}; +} + +type LogInput = string | LogInfo | Error; + +declare function yog_log(config?: LogConfig): ((req: Request, resp: Response, next: NextFunction) => any); + +declare namespace yog_log { + class Logger { + constructor(opts: LogConfig, req: Request); + + extend(destination: {}, source: {}): {}; + + log(level: string, obj: string | {}): void | false; + + notice(info: LogInput): void | false; + + debug(info: LogInput): void | false; + + fatal(info: LogInput): void | false; + + trace(info: LogInput): void | false; + + warning(info: LogInput): void | false; + + getCookie(name: string): string | false; + + getLogFile(intLevel: LevelInt): string; + + getLogFormat(level: LevelName): string | false; + + getLogID(req: Request, logIDName: string): string; + + getLogLevelInt(level: LevelName): LevelInt | -1; + + getLogPrefix(): string; + + getLogString(format: string): string; + + getParams(name: string): string; + + md5(data: string | Buffer, len: number): string; + + parseCustomLog(obj: {}): void; + + // 解析日志配置,生成相应的模板函数的字符串内容 + parseFormat(format: string): string; + + parseReqParams(req: Request, res: Response): void | false; + + parseStackInfo(info: LogInfo | Error): void; + + setParams(name: string, value: any): void; + + writeLog(intLevel: LevelInt, options: WriteLogConfig, log_format: string): void | false; + } + + function getLogger(config?: LogConfig): Logger; +} + +export = yog_log; diff --git a/types/yog-log/tsconfig.json b/types/yog-log/tsconfig.json new file mode 100644 index 0000000000..b4b67074f8 --- /dev/null +++ b/types/yog-log/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "yog-log-tests.ts" + ] +} diff --git a/types/yog-log/tslint.json b/types/yog-log/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/yog-log/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/yog-log/yog-log-tests.ts b/types/yog-log/yog-log-tests.ts new file mode 100644 index 0000000000..c6129dd1eb --- /dev/null +++ b/types/yog-log/yog-log-tests.ts @@ -0,0 +1,39 @@ +import yogLog = require('yog-log'); +import express = require('express'); + +const log = yogLog.getLogger({}); + +log.log('debug', 'test'); + +log.notice('test'); +log.debug('test'); +log.fatal('test'); +log.fatal('test'); +log.trace('test'); +log.warning('test'); + +const cookie_value = log.getCookie('test'); +const getLogFile = log.getLogFile(0); +const log_format = log.getLogFormat('ACCESS'); + +const logid = log.getLogID( {}, 'test'); +const intlevel = log.getLogLevelInt('ACCESS'); +const prfix = log.getLogPrefix(); +const log_str = log.getLogString('test'); +const param = log.getParams('test'); +const md5_tag = log.md5('test', 123); + +log.parseCustomLog({ test : 1}); + +const formater = log.parseFormat('test'); + +log.parseStackInfo(new Error()); + +log.setParams('test', 'some'); + +log.writeLog(0, { escape_msg : false, filename_suffix : '123', errno : 0 }, 'test'); + +const middleware = yogLog({}); + +const app = express(); +app.get('/', middleware); diff --git a/types/yog2-kernel/index.d.ts b/types/yog2-kernel/index.d.ts new file mode 100644 index 0000000000..88dceb4de2 --- /dev/null +++ b/types/yog2-kernel/index.d.ts @@ -0,0 +1,92 @@ +// Type definitions for yog2-kernel 1.9 +// Project: https://github.com/fex-team/yog2-kernel +// Definitions by: ssddi456 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as express from "express"; +import * as _ from "lodash"; +import * as ral from "node-ral"; +import * as log from "yog-log"; +import * as yogBigpipe from "yog-bigpipe"; + +declare global { + const yog: yog.Yog; +} + +export interface YogBootstrapOption { + // 设置yog根目录,默认使用启动文件的目录 + rootPath?: string; + // 设置plugins目录 + pluginsPath?: string; + // 设置conf目录 + confPath?: string; + // 设置app,未设置则直接使用express + app?: express.Express; +} +export interface Request extends express.Request { + CURRENT_APP: string; + ral: typeof ral.RAL; + ralP: typeof ral.RALPromise; +} +export interface Response extends express.Response { + bigpipe: yogBigpipe.BigPipe; +} + +export interface ActionObject { + get?: express.RequestHandler; + post?: express.RequestHandler; + put?: express.RequestHandler; + delete?: express.RequestHandler; + del?: express.RequestHandler; + copy?: express.RequestHandler; + head?: express.RequestHandler; + options?: express.RequestHandler; + purge?: express.RequestHandler; + lock?: express.RequestHandler; + unlock?: express.RequestHandler; + propfind?: express.RequestHandler; + view?: express.RequestHandler; + link?: express.RequestHandler; + unlick?: express.RequestHandler; + patch?: express.RequestHandler; + [key: string]: any; +} + +export interface Router extends express.Router { + action(actionName: string): express.RequestHandler | ActionObject; + wrapAsync(fn: () => any): express.RequestHandler; +} + +export namespace yog { + class Yog { + express: typeof express; + app: express.Express; + _: typeof _; + + log: log.Logger; + + // 当 yog.conf.promise.overrideRAL 为true时,可以当作promise使用 + ral: typeof ral.RAL | typeof ral.RALPromise; + RAL: typeof ral.RAL; + + ralP: typeof ral.RALPromise; + + view: { + // 清除viewcache + cleanCache(): void; + }; + + // debug模式时存在 + reloadApp?(appName: string): void; + // debug模式时存在 + reloadView?(): void; + // debug模式时存在 + reloadIsomorphic?(): void; + + ROOT_PATH: string; + + bootstrap(option: YogBootstrapOption, callback?: () => void): void; + } +} + +export default yog; diff --git a/types/yog2-kernel/tsconfig.json b/types/yog2-kernel/tsconfig.json new file mode 100644 index 0000000000..f78a6c3483 --- /dev/null +++ b/types/yog2-kernel/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "es2015", + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "yog2-kernel-tests.ts" + ] +} diff --git a/types/yog2-kernel/tslint.json b/types/yog2-kernel/tslint.json new file mode 100644 index 0000000000..b3fc134bd9 --- /dev/null +++ b/types/yog2-kernel/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "only-arrow-functions": [ + false + ] + } +} \ No newline at end of file diff --git a/types/yog2-kernel/yog2-kernel-tests.ts b/types/yog2-kernel/yog2-kernel-tests.ts new file mode 100644 index 0000000000..e7267d89d5 --- /dev/null +++ b/types/yog2-kernel/yog2-kernel-tests.ts @@ -0,0 +1,29 @@ +import * as yog2Kernel from 'yog2-kernel'; +import { NextFunction } from 'express'; + +yog.log.notice('some debug'); +yog.log.debug('some debug'); +yog.log.trace('some debug'); +yog.log.warning('some debug'); +yog.log.fatal('some debug'); + +const handler = async function(req: yog2Kernel.Request, resp: yog2Kernel.Response, next: NextFunction) { + const test = await req.ralP("test", {}); + + resp.bigpipe.bind("test", function(done) { + done(null, 'yeap'); + }); + + resp.render("test", {}); +}; + +const router = {}; +( router.action("test")).get; + +const handler2 = router.wrapAsync(function() { }); + +yog.bootstrap({}); + +yog.bootstrap({ + rootPath: '' +}); diff --git a/types/youtube/index.d.ts b/types/youtube/index.d.ts index a45ec6a8c8..11e2a4e30d 100644 --- a/types/youtube/index.d.ts +++ b/types/youtube/index.d.ts @@ -2,7 +2,8 @@ // Project: https://developers.google.com/youtube/ // Definitions by: Daz Wilkin , // Ian Obermiller , -// Josh Goldberg +// Josh Goldberg +// Eliot Fallon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -250,6 +251,22 @@ declare namespace YT */ Modest = 1 } + + /** + * Whether to playback video inline or full-screen in an HTML5 player on iOS + */ + export const enum PlaysInline + { + /** + * Playback in fullscreen. + */ + Fullscreen = 0, + + /** + * Playback inline + */ + Inline = 1 + } /** * Whether to show related videos after the video finishes. @@ -266,7 +283,7 @@ declare namespace YT */ Show = 1 } - + /** * Whether to show video information before playing. */ @@ -518,6 +535,11 @@ declare namespace YT * Comma separated list of video IDs to play after the URL path's video. */ playlist?: string; + + /** + * Whether videos play inline or fullscreen in an HTML5 player on iOS. (currently by default, Fullscreen). + */ + playsinline?: PlaysInline; /** * Whether to show related videos after the video finishes (by default, Show). diff --git a/types/zeroclipboard/index.d.ts b/types/zeroclipboard/index.d.ts index 2600359826..e9c6e28dd7 100644 --- a/types/zeroclipboard/index.d.ts +++ b/types/zeroclipboard/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/zeroclipboard/zeroclipboard // Definitions by: Eric J. Smith , Blake Niemyjski , György Balássy , Leon Yu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare namespace ZC { // Basic collection types for shorthands and interoperation @@ -329,13 +330,13 @@ declare namespace ZC { * @param {string} eventType * @param {EventListener} listener */ - off(eventType: string, listener: EventListenerOrEventListenerObject): void; off(eventType: "ready", listener: EventListenerOrEventListenerObject): void; off(eventType: "beforecopy", listener: EventListenerOrEventListenerObject): void; off(eventType: "copy", listener: EventListenerOrEventListenerObject): void; off(eventType: "aftercopy", listener: EventListenerOrEventListenerObject): void; off(eventType: "destroy", listener: EventListenerOrEventListenerObject): void; off(eventType: "error", listener: EventListenerOrEventListenerObject): void; + off(eventType: string, listener: EventListenerOrEventListenerObject): void; /** * Remove a set of eventType to listener function/object mappings. * @param {EventListener} listenerObj @@ -348,6 +349,16 @@ declare namespace ZC { destroy?: EventListenerOrEventListenerObject; error?: EventListenerOrEventListenerObject; }): void; + /** + * Remove a set of eventType to listener function/object mappings. + */ + off(eventType: "ready"): void; + off(eventType: "beforecopy"): void; + off(eventType: "copy"): void; + off(eventType: "aftercopy"): void; + off(eventType: "destroy"): void; + off(eventType: "error"): void; + off(eventType: string): void; /** * Remove ALL listener functions/objects for ALL registered event types. */ diff --git a/types/zeroclipboard/v1/index.d.ts b/types/zeroclipboard/v1/index.d.ts index a2ad3a5cfb..294594c45f 100644 --- a/types/zeroclipboard/v1/index.d.ts +++ b/types/zeroclipboard/v1/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jonrohan/ZeroClipboard // Definitions by: Eric J. Smith , Blake Niemyjski , György Balássy , Leon Yu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare class ZeroClipboard { constructor(elements?: Element | { [index: number]: Element }, options?: ZeroClipboardOptions); diff --git a/types/zeromq/index.d.ts b/types/zeromq/index.d.ts new file mode 100644 index 0000000000..1d33077d1d --- /dev/null +++ b/types/zeromq/index.d.ts @@ -0,0 +1,245 @@ +// Type definitions for zeromq 4.5 +// Project: https://github.com/zeromq/zeromq.js +// Definitions by: Dave McKeown , Erik Mavrinac +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// +// Forked from the DefinitelyTyped 'zmq' project originally created by Dave McKeown, +// then updated with recent changes in the 'zeromq' project from +// https://github.com/zeromq/zeromq.js/blob/master/lib/index.js + +/// + +export interface SocketTypes { + pub: number; + xpub: number; + sub: number; + xsub: number; + req: number; + xreq: number; + rep: number; + xrep: number; + push: number; + pull: number; + dealer: number; + router: number; + pair: number; + stream: number; +} + +export interface SocketOptions { + _fd: number; + _ioevents: number; + _receiveMore: number; + _subscribe: number; + _unsubscribe: number; + affinity: number; + backlog: number; + hwm: number; + identity: number; + linger: number; + mcast_loop: number; + rate: number; + rcvbuf: number; + last_endpoint: number; + reconnect_ivl: number; + recovery_ivl: number; + sndbuf: number; + swap: number; + mechanism: number; + plain_server: number; + plain_username: number; + plain_password: number; + curve_server: number; + curve_publickey: number; + curve_secretkey: number; + curve_serverkey: number; + zap_domain: number; +} + +export interface Socket { + /** + * Set `opt` to `val`. + * + * @param opt Option + * @param val Value + */ + setsocketopt(opt: number|string, val: any): Socket; + + /** + * Get socket `opt`. + * + * @param opt Option number + */ + getsocketopt(opt: number|string): any; + + /** + * Async bind. + * + * Emits the "bind" event. + * + * @param addr Socket address + * @param cb Bind callback + */ + bind(addr: string, callback?: (error: string) => void ): Socket; + + /** + * Sync bind. + * + * @param addr Socket address + */ + bindSync(addr: string): Socket; + + /** + * Async unbind. + * + * Emits the "unbind" event. + * + * @param addr Socket address + * @param cb Unind callback + */ + unbind(addr: string, callback?: (error: string) => void ): Socket; + + /** + * Sync unbind. + * + * @param addr Socket address + */ + unbindSync(addr: string): Socket; + + /** + * Connect to `addr`. + * + * @param addr Connection address + */ + connect(addr: string): Socket; + + /** + * Disconnect from `addr`. + * + * @param addr The address + */ + disconnect(addr: string): Socket; + + /** + * Subscribe with the given `filter`. + * + * @param filter The filter + */ + subscribe(filter: string): Socket; + + /** + * Unsubscribe with the given `filter`. + * + * @param filter The filter + */ + unsubscribe(filter: string): Socket; + + /** + * Send the given `msg`. + * + * @param msg The message + * @param flags Message flags + */ + send(msg: string|Buffer|any[], flags?: number): Socket; + + /** + * Enable monitoring of a Socket. This enables the following additional events: + * 'connect', 'connect_delay', 'connect_retry', 'listen', 'bind_error', + * 'accept', 'accept_error', 'close', 'close_error', 'disconnect'. + * Each event receives the parameters: (eventValue, eventEndpointAddrress, error) + * + * @param {Number} timer interval in ms > 0 or Undefined for default + * @return {Socket} for chaining + */ + monitor(interval?: number): Socket; + + /** + * Close the socket. + * + */ + close(): Socket; + + /** + * Socket event - 'message' + * @param eventName {string} + * @param callback {Function} + */ + on(eventName: string, callback: (...buffer: Buffer[]) => void): void; + + pause(): void; + resume(): void; + + // Socket Options + _fd: any; + _ioevents: any; + _receiveMore: any; + _subscribe: any; + _unsubscribe: any; + affinity: any; + backlog(): any; + hwm: any; + identity: any; + linger: any; + mcast_loop: any; + rate: any; + rcvbuf: any; + last_endpoint: any; + reconnect_ivl: any; + recovery_ivl: any; + sndbuf: any; + swap: any; + mechanism: any; + plain_server: any; + plain_username: any; + plain_password: any; + curve_server: number; + curve_publickey: string | Buffer; + curve_secretkey: string | Buffer; + curve_serverkey: string | Buffer; + zap_domain: any; +} + +/** The key material returned from a call to curveKeypair(). */ +export interface CurveKeyPair { + /** + * A Z85 string denoting the public portion of the Curve25519 key. + * + * @name CurveKeyPair#public + * @type string + */ + public: string; + + /** + * A Z85 string denoting the private, secret portion of the Curve25519 key. + * + * @name CurveKeyPair#secret + * @type string + */ + secret: string; +} + +/** + * Gets the ZeroMQ version. + */ +export let version: string; + +export let types: SocketTypes; +export let options: SocketOptions; + +/** + * Creates a ZeroMQ socket of the specified type. + * @return {Socket} The created socket in an unconnected state. + */ +export function socket(type: string|number, options?: any): Socket; + +/** + * Creates a ZeroMQ socket of the specified type. + * @return {Socket} The created socket in an unconnected state. + */ +export function createSocket(type: string, options?: any): Socket; + +/** + * Generates a CurveZMQ (Curve25519) key pair. + * @return {CurveKeyPair} The public and secret portions of the key. + */ +export function curveKeypair(): CurveKeyPair; diff --git a/types/zeromq/tsconfig.json b/types/zeromq/tsconfig.json new file mode 100644 index 0000000000..aa30afd4b0 --- /dev/null +++ b/types/zeromq/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", + "zeromq-tests.ts" + ] +} diff --git a/types/zeromq/tslint.json b/types/zeromq/tslint.json new file mode 100644 index 0000000000..495d29983d --- /dev/null +++ b/types/zeromq/tslint.json @@ -0,0 +1,5 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + } +} diff --git a/types/zeromq/zeromq-tests.ts b/types/zeromq/zeromq-tests.ts new file mode 100644 index 0000000000..af36166e64 --- /dev/null +++ b/types/zeromq/zeromq-tests.ts @@ -0,0 +1,49 @@ +import zeromq = require('zeromq'); + +function test1() { + let sock = zeromq.socket('push'); + sock.bindSync('tcp://127.0.0.1:3000'); + sock.unbindSync('tcp://127.0.0.1:3000'); + sock.send("some work"); +} + +function test2() { + let sock = zeromq.socket('push'); + sock.bindSync('tcp://127.0.0.1:3000'); + sock.send(new Buffer(1000)); +} + +function test3() { + let sock = zeromq.socket('push'); + sock.bindSync('tcp://127.0.0.1:3000'); + sock.send(['hello', 'world']); + sock.on('message', (buffer1: Buffer, buffer2: Buffer) => { }); +} + +function test4() { + let sock = zeromq.socket(zeromq.types.pull); + sock.bind('tcp://127.0.0.1', err => { + sock.send("some work"); + }); + sock.unbind('tcp://127.0.0.1', err => { + // + }); +} + +function test5() { + let sock = zeromq.socket(zeromq.types.pull, zeromq.options.linger); + sock.bind('tcp://127.0.0.1', err => { + sock.send("some work"); + }); + sock.monitor(); + sock.monitor(10); +} + +function test6() { + let sock = zeromq.socket(zeromq.types.dealer); + sock.bind('tcp://127.0.0.1', err => { + sock.send("some work"); + }); + sock.pause(); + sock.resume(); +}
    ' + inputEl[0].nodeName + inputType + '